Skip to content

Instantly share code, notes, and snippets.

View sorrycc's full-sized avatar
🌻
Working on Neovate Code

chencheng (云谦) sorrycc

🌻
Working on Neovate Code
View GitHub Profile

finally-polyfill

A tiny ~150-byte polyfill for Promise.prototype.finally.

Useful for browsers that support Promise but not the .finally() method.

Usage

npm install finally-polyfill

Idea: Flat file system for file-based routing

Personally I've never liked how tools like Remix or NextJS have mapped a nested file system to routes. Simple things like "I want to put this component in its own file" become annoying tasks.

I've always been a fan of "flatter" file systems, my files often look like this:

/App/