{"id":16723226,"url":"https://github.com/martinkr/onelinecode","last_synced_at":"2025-09-11T13:05:39.090Z","repository":{"id":57133205,"uuid":"421975328","full_name":"martinkr/onelinecode","owner":"martinkr","description":"\"Awesome javascript in one line of code\" - A collection of utilities and helpers following the principle: Keep it as simple as possible in one line of code. See: https://dev.to/martinkr/series/15146","archived":false,"fork":false,"pushed_at":"2022-01-19T23:27:21.000Z","size":990,"stargazers_count":58,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-08T20:36:52.363Z","etag":null,"topics":["codequality","javascript","library","nodejs","utilities","webdev"],"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/martinkr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-27T21:12:37.000Z","updated_at":"2025-03-19T11:00:54.000Z","dependencies_parsed_at":"2022-09-03T15:02:06.247Z","dependency_job_id":null,"html_url":"https://github.com/martinkr/onelinecode","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/martinkr/onelinecode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinkr%2Fonelinecode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinkr%2Fonelinecode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinkr%2Fonelinecode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinkr%2Fonelinecode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martinkr","download_url":"https://codeload.github.com/martinkr/onelinecode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinkr%2Fonelinecode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274640911,"owners_count":25322843,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["codequality","javascript","library","nodejs","utilities","webdev"],"created_at":"2024-10-12T22:37:27.194Z","updated_at":"2025-09-11T13:05:39.061Z","avatar_url":"https://github.com/martinkr.png","language":"JavaScript","readme":"![Awesome JavaScript in one line of code written above a picture of Mt. Fuji's peak](ajsioloc.png)\n# Awesome javascript in one line of code\n\nA collection of utilities and helpers following the principle: Keep it as simple as possible in one line of code. \n\nAs long as we area dealing with JavaScript, the library assumes that the user provides valid input. No type checking or other verifications of the arguments are part of the functions.\nThe library tires to use the simplest and most performant code possible. To keep the functions as simple as possible they will be reduced to the core functionality: \"one function should have one specific functionality only\".\n\n\nNew functions will be added every time there is an article being published.\n\nAll functions are written in `ESNext` `esmodules` (`./src`)  and available as \n-`umd` (`./dist/index.js`) with the `onelinecode` namespace (e.g. window.onlinecode)\n-`commonjs` (`./dist/index.cjs.js`) \n-`esm` (`./dist/index.esm.js`) \n\n## Available functions\n\n### Array\nSee [./doc/array.md](./doc/array.md)\n\n\n## Installation\n``` \n$ npm i @onelinecode/onelinecode\n```\n\n```\n$ yarn add @onelinecode/onelinecode\n```\n## Usage\nFor example, you want to `shallowClone` an `array`:\n```JavaScript\nimport { shallowClone } from '@onelinecode/onelinecode/array';\nlet array = [1];\nlet arrayClone = shallowClone(array);\n```\n\n\n## Testing\nThe library has `100% code coverage` with `ava` and passes the build on [Build status from travis-ci](https://app.travis-ci.com/martinkr/onelinecode.svg?branch=main).\n\n## Contribution\n\nIf you are interested in discussion a specific function, please see the corresponding article from [the series on dev.to](https://dev.to/martinkr/series/15146).\n\n\nPlease don't hesitate to comment, give feedback. I appreciate every input or comment. We can and should learn from each others opinion and knowledge. Please stick to a respectful style of discussion and read the [code of conduct](CODE_OF_CONDUCT.md) like the articles or star the repository.\n\n\n\n## Tech Stack \n- ava: 3.15.0\n- c8: 7.10.0\n- esm: 3.2.25\n- rollup: 2.58.\n\n\n\n## License\n\nLicensed under the MIT license.\nMIT - http://www.opensource.org/licenses/mit-license.php\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinkr%2Fonelinecode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartinkr%2Fonelinecode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinkr%2Fonelinecode/lists"}