{"id":17062321,"url":"https://github.com/devpaul/arraylike-proxy","last_synced_at":"2026-04-19T19:31:22.830Z","repository":{"id":57184227,"uuid":"75794731","full_name":"devpaul/arraylike-proxy","owner":"devpaul","description":"Make things behave like an array using es6 Proxies","archived":false,"fork":false,"pushed_at":"2016-12-07T04:11:27.000Z","size":19,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-25T13:20:14.459Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devpaul.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2016-12-07T03:17:05.000Z","updated_at":"2017-08-12T14:41:34.000Z","dependencies_parsed_at":"2022-08-23T01:21:00.847Z","dependency_job_id":null,"html_url":"https://github.com/devpaul/arraylike-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devpaul/arraylike-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpaul%2Farraylike-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpaul%2Farraylike-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpaul%2Farraylike-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpaul%2Farraylike-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devpaul","download_url":"https://codeload.github.com/devpaul/arraylike-proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpaul%2Farraylike-proxy/sbom","scorecard":{"id":338233,"data":{"date":"2025-08-11","repo":{"name":"github.com/devpaul/arraylike-proxy","commit":"329a100328246755476ba7c02fc83bdc315205f8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/5 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Mozilla Public License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T05:13:27.290Z","repository_id":57184227,"created_at":"2025-08-18T05:13:27.290Z","updated_at":"2025-08-18T05:13:27.290Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32020413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"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":[],"created_at":"2024-10-14T10:49:42.798Z","updated_at":"2026-04-19T19:31:22.814Z","avatar_url":"https://github.com/devpaul.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ArrayLike Proxy\n\n[![Status](https://travis-ci.org/devpaul/arraylike-proxy.svg?branch=master)](https://travis-ci.org/devpaul/arraylike-proxy)\n\nTreat everything like an array! ArrayLike Proxy wraps a function, arrow function, object, arguments, or an array\n and allows you to treat it just like an array.\n\n## Uses\n\n### Objects\n\nHave an ArrayLike Object and you want to use it like an array? Too bad! You have to convert it first:\n\n```ts\nimport ArrayLike from 'src/ArrayLike';\n\nconst array = {\n    0: 'zero',\n    1: 'one',\n    length: 2\n}\n\n// X Cant do this!\n// array.concat([1, 2, 3]);\n\n// Now you can!\nArrayLike(array).concat([1, 2, 3])  // [ 'zero', 'one', 1, 2, 3]\n\n// Or this!\nArrayLike(array).splice(array.length, 0, 1, 2, 3);\narray.length; // 5\n```\n\n### Functions\n\nWant a method to maintain its own list?\n\n```ts\nimport ArrayLike from 'src/ArrayLike';\n\nconst addMiddleware = (route, handler) =\u003e {\n\tmiddleware.push({\n\t\troute,\n\t\thandler\n\t});\n\treturn middleware;\n};\nconst middleware = ArrayLike(addMiddleware);\n\n// Now we have a functional list builder\nmiddleware('/user/:id', () =\u003e {}).middleware('/admin', () =\u003e {}).middleware('/', () =\u003e {});\n```\n\nOr maybe we want to collect and build\n\n```ts\nimport ArrayLike from 'src/ArrayLike';\n\nconst builder = function (name) {\n\tthis.name = name;\n\tthis.assignments = [... StudentAssignments]\n}\nconst StudentAssignments = ArrayLike(builder);\nStudentAssignments.push('Take home Test A');\nStudentAssignments.push('Homework 1');\nStudentAssignments.push('Quiz I');\nconst studentRecords = [\n\tnew StudentAssignments('Joe Smith');\n\tnew StudentAssignments('Jane Doe');\n];\n```\n\nOk. Maybe that last example is a solution looking for a problem....\n\n### Arguments\n\nHow about an anarchronistic example. Nobody should be using `arguments` anymore!\n\n```ts\nimport ArrayLike from 'src/ArrayLike';\n\nfunction methodOne(one, two) {\n\tif (typeof two === 'number') {\n\t\tthrow new Error();\n\t}\n\t\n\t// So fancy!\n\treturn methodTwo(ArrayLike(arguments).reverse());\n}\n\nfunction methodTwo(two, one) {\n\tif (typeof two === 'number') {\n\t\tthrow new Error();\n\t}\n\t\n\treturn `${ two } is number: ${ one }`;\n}\n\nmethodOne(1, 'I');  // I did it!\n```\n\n## Installation \u0026 Usage\n\nThis package is supported on modern browsers and Node 6+\n\n`npm install arraylike-proxy --save`\n\n### Node.js\n\n`const ArrayLike = require('arraylike-proxy');`\n\n### AMD\n\n```\ndefine([ 'arraylike-proxy' ], (ArrayLike) =\u003e {\n\t\n});\n```\n\n### TypeScript\n\n`import ArrayLike from 'arraylike-proxy'`\n\nAmbient declarations are available as part of the npm package. TypeScript source is available from the github repo.\n\n## Fin\n\nWow! You made it! Well I guess you deserve a story. I made this library because JavaScript, for all its flexibility,\n\tdidn't have a good way of creating a method that could also behave like an array. Sure, we have this concept\n\tof arraylike objects, but those tend to break down when you want to use direct assignments or, you know, actually\n\tuse the thing like an array. Plus I get to do terrible things with Proxy and Symbol. Win-win!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevpaul%2Farraylike-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevpaul%2Farraylike-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevpaul%2Farraylike-proxy/lists"}