1loc
What's your favorite JavaScript single LOC (line of code)?
A community-sourced collection of JavaScript one-liners, tiny single-line code snippets that each do something useful, browsable on an associated website built with Eleventy.
This is a community collection of JavaScript one-liners: short snippets of code that accomplish something useful in a single line. The project is built around a website where visitors can browse and discover tips, and anyone can contribute by submitting a markdown file with their favorite single-line snippet.
The README is sparse and does not describe the contents of the collection in detail. The repository stores each snippet as a markdown file in a contents folder, and the site appears to be built with Eleventy, a tool for generating static websites from those files. To see the actual snippets, browsing the repository's contents folder or visiting the associated website would give a better picture than the README alone.
Where it fits
- Browse the collection to find a single line of JavaScript that solves a common task like checking if a value is an array or generating a random color.
- Contribute your own useful JavaScript one-liner to the community by submitting a markdown file to the contents folder.