{"id":13446952,"url":"https://github.com/1-liners/1-liners","last_synced_at":"2025-03-21T17:30:33.821Z","repository":{"id":30642276,"uuid":"34197833","full_name":"1-liners/1-liners","owner":"1-liners","description":"Functional tools that couldn’t be simpler.","archived":false,"fork":false,"pushed_at":"2023-04-16T13:08:38.000Z","size":623,"stargazers_count":792,"open_issues_count":28,"forks_count":57,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-02-23T14:03:59.944Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1-liners.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-04-19T07:45:41.000Z","updated_at":"2025-02-22T15:35:18.000Z","dependencies_parsed_at":"2024-01-02T23:42:30.427Z","dependency_job_id":"c5142a9a-a774-4c47-aa1c-d0108b9f4a52","html_url":"https://github.com/1-liners/1-liners","commit_stats":{"total_commits":366,"total_committers":29,"mean_commits":"12.620689655172415","dds":0.5300546448087431,"last_synced_commit":"d8f6443eb55adfe138a54e54052fd32ab0e5e59e"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1-liners%2F1-liners","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1-liners%2F1-liners/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1-liners%2F1-liners/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1-liners%2F1-liners/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1-liners","download_url":"https://codeload.github.com/1-liners/1-liners/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240524330,"owners_count":19815268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T05:01:04.018Z","updated_at":"2025-03-21T17:30:33.110Z","avatar_url":"https://github.com/1-liners.png","language":"JavaScript","readme":"\u003csup\u003eMADE IN SWITZERLAND\u003c/sup\u003e\n\n[![Coverage Status](https://coveralls.io/repos/1-liners/1-liners/badge.svg?branch=master)](https://coveralls.io/r/1-liners/1-liners?branch=master)\n[![Build Status](https://travis-ci.org/1-liners/1-liners.svg?branch=master)](https://travis-ci.org/1-liners/1-liners)\n[![Dependency Status](https://david-dm.org/1-liners/1-liners.svg)](https://david-dm.org/1-liners/1-liners)\n[![npm version](https://badge.fury.io/js/1-liners.svg)](http://badge.fury.io/js/1-liners)\n[![Stability: unstable](https://img.shields.io/badge/stability-unstable-yellowgreen.svg)](https://github.com/1-liners/1-liners/milestones/1.0)\n[![Join the chat at https://gitter.im/1-liners/1-liners](https://img.shields.io/badge/gitter-join%20chat-1dce73.svg)](https://gitter.im/1-liners/1-liners)\n\n\u003ch1 align=\"center\"\u003e\u003ca\n\ttitle=\"Functional tools that couldn’t be simpler\"\n\thref=\"./documentation/README.md\"\n\t\u003e\n\t\u003cbr/\u003e\n\t\u003cbr/\u003e\n\t\u003cbr/\u003e\n\t\u003cimg\n\t\talt=\"1-liners\"\n\t\tsrc=\"https://cdn.rawgit.com/1-liners/Logos/master/logo.png\"\n\t\twidth=\"382px\"\n\t\theight=\"125px\"\n\t/\u003e\n\t\u003cbr/\u003e\n\t\u003cbr/\u003e\n\t\u003cbr/\u003e\n\t\u003cbr/\u003e\n\u003c/a\u003e\u003c/h1\u003e\n\n**Functional tools that couldn’t be simpler.**\n\nWe’re proud to present *1-liners* – a dead simple functional utility belt. **[137 one-liner functions][docs]** (and counting). Each hand-crafted with love and attention.\n\n[docs]:  ./documentation\n\n\u003cp align=\"center\"\u003e\n\t\u003cbr/\u003e\n\t\u003cbr/\u003e\n\t\u003cbr/\u003e\n\t\u003cimg\n\t\tsrc=\"https://cdn.rawgit.com/1-liners/Logos/master/swissknife.gif\"\n\t\twidth=\"400px\"\n\t\theight=\"300px\"\n\t/\u003e\n\t\u003cbr/\u003e\n\t\u003cbr/\u003e\n\t\u003cbr/\u003e\n\t\u003cbr/\u003e\n\t\u003cbr/\u003e\n\t\u003cbr/\u003e\n\u003c/p\u003e\n\n\n## Our decalogue\n\nYou get a product of top-quality functional programming craftmanship. Each function follows the *KISS* principle, which we’ve broken down into ten strict rules.\n\nWe always follow them. You have our word.\n\n\n\u003cp align=\"center\"\u003e\u003ca\n\ttitle=\"from Beautiful Flat Icons by Nick Roach\"\n\thref=\"https://www.elegantthemes.com/blog/freebie-of-the-week/beautiful-flat-icons-for-free\"\n\t\u003e\n\t\u003cbr/\u003e\n\t\u003cbr/\u003e\n\t\u003cimg\n\t\talt=\"1-liners\"\n\t\tsrc=\"https://cdn.rawgit.com/1-liners/Logos/04c6949/megaphone.svg\"\n\t\twidth=\"120px\"\n\t\theight=\"120px\"\n\t/\u003e\n\t\u003cbr/\u003e\n\t\u003cbr/\u003e\n\t\u003cbr/\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n\n1.  Each function shall **[fit in one readable line of code][]**  \n  – take a glimpse at the source and you know exactly what’s going on.  \n  \u0026nbsp;\n\n2.  Each function shall **[have no side-effects][]**  \n  – you can use it with confidence.  \n  \u0026nbsp;\n\n3.  Each function shall **[have a fixed number of arguments][]**  \n  – it’s dead easy to bind, curry and uncurry, apply partially, implode and explode.  \n  \u0026nbsp;\n\n4.  Each function shall **[deal with data in an immutable way][]**  \n  – no more debugging nightmares.  \n  \u0026nbsp;\n\n5.  Each function shall **[take data as the last argument][]**  \n  – this makes currying and composing new functions a breeze.  \n  \u0026nbsp;\n\n6.  Each function shall **[be in a separate micro-module][]**  \n  – you only load/bundle the single 1-liner you need.  \n  \u0026nbsp;\n\n7.  Each function shall **[be thoroughly tested][]**  \n  – 100% code coverage guaranteed. We even test if every function fits in one line!  \n  \u0026nbsp;\n\n8.  Each function shall **[have great documentation][]**  \n  – the docs explain usage, present the source, and link to the specs.  \n  \u0026nbsp;\n\n9.  We shall provide functional versions of **[native object methods][]**  \n  – like `reduce(callback, array)` for `array.reduce(callback)`.  \n  \u0026nbsp;\n\n10. We shall provide functional versions of **[language constructs][]**  \n  – like `plus(a, b)` for `a + b`.  \n  \u0026nbsp;\n\n[fit in one readable line of code]:    https://github.com/1-liners/1-liners/blob/28b02d0939d6bb4034693e48440f450141453ae9/module/flip.js#L18\n[have no side-effects]:                ./documentation#extend\n[have a fixed number of arguments]:   ./documentation#shave\n[deal with data in an immutable way]:  ./documentation#put\n[take data as the last argument]:      ./documentation#split\n[be in a separate micro-module]:       https://github.com/1-liners/1-liners/blob/28b02d0939d6bb4034693e48440f450141453ae9/module/compose.js\n[be thoroughly tested]:                https://coveralls.io/r/1-liners/1-liners?branch=master\n[have great documentation]:            ./documentation\n[native object methods]:               ./documentation#reduce\n[language constructs]:                 ./documentation#plus\n\n\n## Usage\n\n### Install\n\n```\n$ npm install --save 1-liners\n```\n\n### Usage in ES5\n\n```js\n// The lightweight, recommended way:\nvar map = require('1-liners/map');\n\n// Sometimes practical:\nvar map = require('1-liners').map;\n```\n\n### Usage in ES 2015 (formerly ES6)\n\n```js\n// The lightweight, recommended way:\nimport map from '1-liners/module/map';\n\n// Sometimes practical:\nimport { map, filter } from '1-liners/module';\n```\n\n## API\n\nCheckout the [documentation](./documentation)\n\n## Maintainers\n\n|  [![stoeffel](https://avatars.githubusercontent.com/u/1217681?v=3\u0026s=80)](https://github.com/stoeffel) | [![tomekwi](https://avatars.githubusercontent.com/u/4624660?v=3\u0026s=80)](https://github.com/tomekwi) | [![hemanth](https://avatars.githubusercontent.com/u/18315?v=3\u0026s=80)](https://github.com/hemanth)  |\n| :--:|:--:|:--: |\n|  [stoeffel](https://github.com/stoeffel) | [tomekwi](https://github.com/tomekwi) | [hemanth](https://github.com/hemanth)  |\n\n|  [![davidchase](https://avatars.githubusercontent.com/u/490291?v=3\u0026s=80)](https://github.com/davidchase) | [![tristaaan](https://avatars.githubusercontent.com/u/5470619?v=3\u0026s=80)](https://github.com/tristaaan)  |\n| :--:|:--: |\n|  [davidchase](https://github.com/davidchase) | [tristaaan](https://github.com/tristaaan)  |\n\ncreated with [gh-contributors-table](https://github.com/stoeffel/gh-contributors-table)\n\n\n## License\n\nMIT © [stoeffel](http://schtoeffel.ch) [tomekwi](http://github.com/tomekwi) [hemanth](http://www.h3manth.com/) [davidchase](http://github.com/davidchase) [tristaaan](http://github.com/tristaaan)\n","funding_links":[],"categories":["JavaScript","Libraries"],"sub_categories":["[Javascript](https://developer.mozilla.org/en-US/docs/Web/JavaScript)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1-liners%2F1-liners","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1-liners%2F1-liners","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1-liners%2F1-liners/lists"}