{"id":15629711,"url":"https://github.com/anko/adjacents","last_synced_at":"2025-03-29T18:15:25.773Z","repository":{"id":150122435,"uuid":"40207756","full_name":"anko/adjacents","owner":"anko","description":"utility function that returns all adjacent pairs of values in an array","archived":false,"fork":false,"pushed_at":"2020-02-07T16:44:13.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-04T19:14:40.612Z","etag":null,"topics":["array","javascript"],"latest_commit_sha":null,"homepage":"","language":"LiveScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anko.png","metadata":{"files":{"readme":"readme.markdown","changelog":null,"contributing":null,"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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-08-04T20:35:45.000Z","updated_at":"2020-02-07T16:44:15.000Z","dependencies_parsed_at":"2023-05-04T05:19:57.445Z","dependency_job_id":null,"html_url":"https://github.com/anko/adjacents","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anko%2Fadjacents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anko%2Fadjacents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anko%2Fadjacents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anko%2Fadjacents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anko","download_url":"https://codeload.github.com/anko/adjacents/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246223325,"owners_count":20743168,"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":["array","javascript"],"created_at":"2024-10-03T10:28:16.100Z","updated_at":"2025-03-29T18:15:25.750Z","avatar_url":"https://github.com/anko.png","language":"LiveScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# adjacents [![](https://img.shields.io/npm/v/adjacents.svg?style=flat-square)][1] [![](https://img.shields.io/travis/anko/adjacents.svg?style=flat-square)][2] [![](https://img.shields.io/david/anko/adjacents?style=flat-square)][3]\n\nA function that returns an array of the pairs of adjacent values in the input\narray.  “Adjacent” as in *next to each other in the array*.\n\nWhen there aren't enough elements to form pairs (0 or 1), it'll return an empty\narray.\n\n## Example\n\n\u003c!-- !test program\nsed '1 i var adjacents = require(\"./index.js\");console.log(\n$ a )' | node | head -c -1 --\u003e\n\n\u003c!-- !test in example --\u003e\n\n```js\nadjacents([ 1, 2, 3, 4 ])\n```\n\n\u003c!-- !test out example --\u003e\n\n```js\n[ [ 1, 2 ], [ 2, 3 ], [ 3, 4 ] ]\n```\n\n## License\n\n[ISC][4].\n\n[1]: https://www.npmjs.com/package/adjacents\n[2]: https://travis-ci.org/anko/adjacents\n[3]: https://david-dm.org/anko/adjacents\n[4]: https://en.wikipedia.org/wiki/ISC_license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanko%2Fadjacents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanko%2Fadjacents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanko%2Fadjacents/lists"}