Skip to content

Instantly share code, notes, and snippets.

View azzamaurice's full-sized avatar
๐ŸŒš
๐ŸŒ’ ๐ŸŒ“ ๐ŸŒ” ๐ŸŒ ๐ŸŒ– ๐ŸŒ— ๐ŸŒ˜

Aaron Maurice azzamaurice

๐ŸŒš
๐ŸŒ’ ๐ŸŒ“ ๐ŸŒ” ๐ŸŒ ๐ŸŒ– ๐ŸŒ— ๐ŸŒ˜
View GitHub Profile
@aleclarson
aleclarson / rollup-typescript.md
Last active September 14, 2025 14:31
The best Rollup config for TypeScript libraries

It's 2024. You should use tsup instead of this.


Features

๐Ÿ”ฅ Blazing fast builds
๐Ÿ˜‡ CommonJS bundle
๐ŸŒฒ .mjs bundle
โœจ .d.ts bundle + type-checking

@Akryum
Akryum / example.js
Last active June 13, 2022 17:28
Vue Router - Navigate to parent named route
export default {
const parents = getNamedParents(this.$router.options.routes, this.$route.matched)
if (parents.length) {
return {
name: parents[parents.length - 1].name,
}
}
return { name: 'home' }
}
@cawa87
cawa87 / base64.js
Last active August 26, 2021 07:36
JavaScript Convert an image to a base64 url
/**
* Convert an image
* to a base64 url
* @param {String} url
* @param {Function} callback
* @param {String} [outputFormat=image/png]
*/
function convertImgToBase64URL(url, callback, outputFormat){
var img = new Image();
img.crossOrigin = 'Anonymous';