{"id":18396694,"url":"https://github.com/igorskyflyer/npm-uarray","last_synced_at":"2025-04-12T15:06:49.051Z","repository":{"id":48889629,"uuid":"382971401","full_name":"igorskyflyer/npm-uarray","owner":"igorskyflyer","description":"🎉 Provides UArray, an Array type that supports negative indices/indexes, just wrap your regular JavaScript array with UArray() and you are all set! 🙌","archived":false,"fork":false,"pushed_at":"2023-05-03T23:14:59.000Z","size":91,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T15:06:38.213Z","etag":null,"topics":["access","array","back-end","igorskyflyer","index","javascript","mocha","negative","nodejs","npm","uarray","utility"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@igor.dvlpr/uarray","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/igorskyflyer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2021-07-05T00:02:58.000Z","updated_at":"2022-10-20T19:04:06.000Z","dependencies_parsed_at":"2024-12-24T10:29:58.994Z","dependency_job_id":"de0b7ea9-e0fb-4cf4-a679-001030952445","html_url":"https://github.com/igorskyflyer/npm-uarray","commit_stats":{"total_commits":51,"total_committers":1,"mean_commits":51.0,"dds":0.0,"last_synced_commit":"60e3a8f2d654a39e9f6b9335dc19ee083bd2c060"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorskyflyer%2Fnpm-uarray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorskyflyer%2Fnpm-uarray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorskyflyer%2Fnpm-uarray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorskyflyer%2Fnpm-uarray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igorskyflyer","download_url":"https://codeload.github.com/igorskyflyer/npm-uarray/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586235,"owners_count":21128997,"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":["access","array","back-end","igorskyflyer","index","javascript","mocha","negative","nodejs","npm","uarray","utility"],"created_at":"2024-11-06T02:14:35.232Z","updated_at":"2025-04-12T15:06:49.013Z","avatar_url":"https://github.com/igorskyflyer.png","language":"JavaScript","readme":"## 🎉 UArray 🙌\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"https://raw.githubusercontent.com/igorskyflyer/npm-uarray/main/assets/uArray.png\" width=\"140\" height=\"140\"\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\nProvides `UArray`, an `Array` type that supports negative indices/indexes, just wrap your _regular_ JavaScript array with `UArray()` or pass the elements directly to `UArray()` and you are all set! 🎉🙌\n\n\u003cbr\u003e\n\n\u003cblockquote align=\"center\"\u003e ⚠ Uses the built-in \u003ccode\u003eProxy\u003c/code\u003e object, check browser compatibility on the \u003ca href=\"https://caniuse.com/proxy\"\u003e\u003cstrong\u003eCan I Use\u003c/strong\u003e\u003c/a\u003e website.\n\u003c/blockquote\u003e\n\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n📢 This is the npm version of this project, if you are looking for the vanilla JavaScript version, check \u003ca href=\"https://github.com/igorskyflyer/uarray\"\u003e\u003cstrong\u003ethis\u003c/strong\u003e\u003c/a\u003e.\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n### Usage\n\n\u003cbr\u003e\n\nℹ Works like negative indices in other languages, e.g. **-1** picks that **last** element, **-2,** the **second to last**, etc.\n\n\u003cbr\u003e\n\n✨ Since `v.1.1.0` the function signature has been changed and now it supports 2 different ways of action. You can now pass a single parameter of type `Array` or multiple parameters of any primitive type.\n\n\u003cbr\u003e\n\nInstall it first by doing,\n\n```shell\nnpm i \"@igor.dvlpr/uarray\"\n```\n\n\u003cbr\u003e\n\nand then use it,\n\n\u003cbr\u003e\n\n```js\nconst UArray = require('@igor.dvlpr/uarray')\nconst food = UArray(['🍟', '🌭', '🍿', '🥙', '🥓']) // array passed\nconst objects = UArray('🎈', '🎩', '⚽', '🥇', '🎯') // no array passed, just direct values\n\nconsole.log(food[-1]) // prints '🥓'\nconsole.log(food[-3]) // prints '🍿'\n\nconsole.log(objects[-1]) // prints '🎯'\nconsole.log(objects[-3]) // prints '⚽'\n```\n\n\u003cbr\u003e\n\n\u003cblockquote align=\"center\"\u003e\n🎉 Happy coding! 🙌\n\u003c/blockquote\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorskyflyer%2Fnpm-uarray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figorskyflyer%2Fnpm-uarray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorskyflyer%2Fnpm-uarray/lists"}