{"id":15690241,"url":"https://github.com/jonschlinkert/array-initial","last_synced_at":"2025-05-05T21:11:55.428Z","repository":{"id":24511447,"uuid":"27917211","full_name":"jonschlinkert/array-initial","owner":"jonschlinkert","description":"Get all but the last element or last n elements of an array.","archived":false,"fork":false,"pushed_at":"2020-07-29T16:14:49.000Z","size":8,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-05T21:11:49.343Z","etag":null,"topics":["array","elements","initial","items","javascript"],"latest_commit_sha":null,"homepage":null,"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/jonschlinkert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-12T11:10:15.000Z","updated_at":"2022-04-12T01:53:32.000Z","dependencies_parsed_at":"2022-07-24T22:02:49.847Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/array-initial","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Farray-initial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Farray-initial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Farray-initial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Farray-initial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/array-initial/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252577020,"owners_count":21770721,"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","elements","initial","items","javascript"],"created_at":"2024-10-03T18:08:23.327Z","updated_at":"2025-05-05T21:11:55.406Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","readme":"# array-initial [![NPM version](https://badge.fury.io/js/array-initial.svg)](http://badge.fury.io/js/array-initial)\n\n\u003e Get all but the last element or last n elements of an array.\n\n## Install with [npm](npmjs.org)\n\n```bash\nnpm i array-initial --save\n```\n\n## Usage\n\n```js\nvar initial = require('array-initial');\n\ninitial(['a', 'b', 'c', 'd', 'e', 'f']);\n//=\u003e ['a', 'b', 'c', 'd', 'e']\n\ninitial(['a', 'b', 'c', 'd', 'e', 'f'], 1);\n//=\u003e ['a', 'b', 'c', 'd', 'e']\n\ninitial(['a', 'b', 'c', 'd', 'e', 'f'], 2);\n//=\u003e ['a', 'b', 'c', 'd']\n```\n\n## Author\n\n**Jon Schlinkert**\n \n+ [github/jonschlinkert](https://github.com/jonschlinkert)\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) \n\n## License\nCopyright (c) 2014 Jon Schlinkert  \nReleased under the MIT license\n\n***\n\n_This file was generated by [verb](https://github.com/assemble/verb) on December 12, 2014. To update, run `npm i -g verb \u0026\u0026 verb`._\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Farray-initial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Farray-initial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Farray-initial/lists"}