{"id":25870771,"url":"https://github.com/weasysolutions/fix-array-length","last_synced_at":"2026-04-21T09:32:47.790Z","repository":{"id":57237648,"uuid":"111150517","full_name":"weasysolutions/fix-array-length","owner":"weasysolutions","description":"list or array with fix lenght","archived":false,"fork":false,"pushed_at":"2018-05-29T05:05:04.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-07T03:51:18.907Z","etag":null,"topics":["array","fix","length","list","nodejs"],"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/weasysolutions.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":"2017-11-17T21:04:55.000Z","updated_at":"2018-05-29T05:05:05.000Z","dependencies_parsed_at":"2022-08-26T15:01:20.555Z","dependency_job_id":null,"html_url":"https://github.com/weasysolutions/fix-array-length","commit_stats":null,"previous_names":["big-math-solutions/fix-array-length"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/weasysolutions/fix-array-length","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weasysolutions%2Ffix-array-length","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weasysolutions%2Ffix-array-length/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weasysolutions%2Ffix-array-length/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weasysolutions%2Ffix-array-length/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weasysolutions","download_url":"https://codeload.github.com/weasysolutions/fix-array-length/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weasysolutions%2Ffix-array-length/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32085488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T06:27:27.065Z","status":"ssl_error","status_checked_at":"2026-04-21T06:27:21.250Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["array","fix","length","list","nodejs"],"created_at":"2025-03-02T06:32:24.148Z","updated_at":"2026-04-21T09:32:47.747Z","avatar_url":"https://github.com/weasysolutions.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fix-array-length\nlist or array with fix length, the loop is iterated to maintain the length of array.\nnode \u003e 6 is required. Not dependencies.\n# install \n\n```bash\n\nnpm install --save fix-array-length\n```\n\n#usage\n\n```js\nlist = FixArrayLength(2)\nlist.push(0);\nlist.push(1);\nlist.push(2);\nassert(list.valueOf().length === 2);\nassert.deepStrictEqual(list.valueOf(), [ 1, 2 ]);\n\n list.push(0, 1, 2, 3, 4);\nassert(list.valueOf().length === 2);\nassert.deepStrictEqual(list.valueOf(), [ 3, 4 ]);\n\nlist.unshift(2);\nlist.unshift(4);\nlist.unshift(5);\nassert(list.valueOf().length === 2);\nassert.deepStrictEqual(list.valueOf(), [ 5, 4 ]);\n\nlist.concat([ 1, 2, 3, 4, 4, 5, 6, 7, 8 ]);\nassert(list.valueOf().length === 2);\nassert.deepStrictEqual(list.valueOf(), [ 7, 8 ])\n```\n# Properties\n\n## _len\n\nlength of list\n# Methods\n## push(item[,...])\n\nremove elements from init to maintain the length of array.\n\n## unshift(item)\n\nremove elements from end to maintain the length of array.\n\n## pull()\nalias to pop\n\n## concat(array1[,array2, array3...])\nconcar the array to current list\n\n## from(array)\nbuild the list from array given\n\n## length()\nreturn the number of items stored in list.\n\n## set(index, item)\n\nset the value fo list in index with item given\n\n## getList()\n\nreturn the native array\n## get(index)\n\nget the item in index given\n\n## map(cb)\nalias to native one\n## filter(cb)\nalias to native one\n## forEach(cb)\nalias to native one\n## pop()\nalias to native one \n## shift()\nalias to native one\n## slice(number, number)\nalias to native one\n## toString()\nalias to native one\n## sort(cb)\nalias to native one\n## join(string)\nalias to native one\n## find(cb)\nalias to native one\n## findIndex(cb)\nalias to native one\n## indexOf(object)\nalias to native one\n## lastIndexOf(object)\nalias to native one\n## reduce(cb, object)\nalias to native one\n## reduceRight(cb, object)\nalias to native one\n## reverse()\nalias to native one\n## valueOf()\nalias to native one\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweasysolutions%2Ffix-array-length","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweasysolutions%2Ffix-array-length","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweasysolutions%2Ffix-array-length/lists"}