git404hub

what is 1loc fr?

phuocng/1loc — explained in plain English

Analysis updated 2026-06-24

6,744MDXAudience · developerComplexity · 1/5Setup · easy

tl;dr

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.

vibe map

mindmap
  root((1loc))
    What it does
      JS one-liner snippets
      Community-sourced tips
    Content
      Single-line code
      Markdown files
      Browse on website
    Contributing
      Submit markdown file
      Add to contents folder
    Tech
      Eleventy static site
      MDX format

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

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.

VIBE 2

Contribute your own useful JavaScript one-liner to the community by submitting a markdown file to the contents folder.

what's the stack?

JavaScriptMDXEleventy

how it stacks up fr

phuocng/1locgetbem/getbem.github.iocloudflare/cloudflare-docs
Stars6,7445,7474,715
LanguageMDXMDXMDX
Setup difficultyeasyeasyeasy
Complexity1/51/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

in plain english

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.

prompts (copy fr)

prompt 1
I want to contribute a JavaScript one-liner to the 1loc collection. Show me what a correctly formatted markdown snippet file should look like based on the contents folder structure.
prompt 2
Give me 5 JavaScript one-liners for working with arrays that fit the 1loc style, short, specific, and copy-pastable with no dependencies.
prompt 3
I'm building a static site with Eleventy similar to 1loc where each markdown file in a folder becomes its own page. Help me set up the basic Eleventy config to do that.

Frequently asked questions

what is 1loc fr?

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.

What language is 1loc written in?

Mainly MDX. The stack also includes JavaScript, MDX, Eleventy.

How hard is 1loc to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is 1loc for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.