{"id":16978791,"url":"https://github.com/srph/droptake","last_synced_at":"2026-05-20T14:45:15.102Z","repository":{"id":75646647,"uuid":"49059787","full_name":"srph/droptake","owner":"srph","description":":poop: Take values from an array from any starting position","archived":false,"fork":false,"pushed_at":"2016-01-07T14:33:32.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-26T17:15:52.802Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srph.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-05T10:42:25.000Z","updated_at":"2016-01-07T14:37:33.000Z","dependencies_parsed_at":"2023-03-17T07:45:28.751Z","dependency_job_id":null,"html_url":"https://github.com/srph/droptake","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/srph%2Fdroptake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Fdroptake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Fdroptake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Fdroptake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srph","download_url":"https://codeload.github.com/srph/droptake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244880550,"owners_count":20525511,"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-10-14T01:44:12.660Z","updated_at":"2026-05-20T14:45:15.073Z","avatar_url":"https://github.com/srph.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## droptake [![npm version](http://img.shields.io/npm/v/droptake.svg?style=flat-square)](https://npmjs.org/package/droptake?style=flat-square) [![Build Status](https://img.shields.io/travis/srph/droptake.svg?style=flat-square)](https://travis-ci.org/srph/droptake?branch=master)\n```\nnpm i droptake -S\n```\nTake values from an array from any starting position\n\n### Huh?\nlodash vs droptake:\n```diff\nvar arr = [1, 2, 3, 4, 5, 6];\n- _.take(_.drop(arr, 2), 2);\n+ droptake(arr, 2, 2);\n```\n\nArray.prototype.splice vs droptake:\n```diff\n- arr.splice(2, 4);\n+ droptake(arr, 2, 2);\n```\n\nNah, you really don't need this library.\n\n### Usage\n```js\nvar array = [1, 2, 3, 4, 5, 6];\ndroptake(array, 2, 2); // [3, 4]\n```\n\nYou can leave out the last parameter which takes values starting from position 0 to n.\n```\ndroptake(array, 2); // [1, 2]\n```\n\n### API\n`droptake(array, n[, start]): Array`\n- `array` (`Array`) - Array\n- `n` (`Int`) - Number of values to take\n- `start` (`Int`) - Starting position\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrph%2Fdroptake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrph%2Fdroptake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrph%2Fdroptake/lists"}