{"_id":"set-function-length","_rev":"3690394","name":"set-function-length","description":"Set a function's length property","dist-tags":{"latest":"1.2.2"},"maintainers":[{"name":"ljharb","email":""}],"time":{"modified":"2025-02-13T05:46:53.000Z","created":"2023-10-13T04:21:43.829Z","1.2.2":"2024-03-09T17:40:59.599Z","1.2.1":"2024-02-06T16:48:19.249Z","1.2.0":"2024-01-14T20:55:57.328Z","1.1.1":"2023-10-19T22:47:22.556Z","1.1.0":"2023-10-13T20:28:51.232Z","1.0.1":"2023-10-13T05:26:36.688Z","1.0.0":"2023-10-13T04:21:43.829Z"},"users":{},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/ljharb/set-function-length.git"},"versions":{"1.2.2":{"name":"set-function-length","version":"1.2.2","description":"Set a function's length property","main":"index.js","exports":{".":"./index.js","./env":"./env.js","./package.json":"./package.json"},"sideEffects":false,"directories":{"test":"test"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","tsc":"tsc -p .","posttsc":"attw -P","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","postlint":"npm run tsc","pretest":"npm run lint","tests-only":"nyc tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/ljharb/set-function-length.git"},"keywords":["javascript","ecmascript","set","function","length","function.length"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/set-function-length/issues"},"homepage":"https://github.com/ljharb/set-function-length#readme","dependencies":{"define-data-property":"^1.1.4","es-errors":"^1.3.0","function-bind":"^1.1.2","get-intrinsic":"^1.2.4","gopd":"^1.0.1","has-property-descriptors":"^1.0.2"},"devDependencies":{"@arethetypeswrong/cli":"^0.15.1","@ljharb/eslint-config":"^21.1.0","@ljharb/tsconfig":"^0.1.1","@types/call-bind":"^1.0.5","@types/define-properties":"^1.1.5","@types/es-value-fixtures":"^1.4.4","@types/for-each":"^0.3.3","@types/function-bind":"^1.1.10","@types/gopd":"^1.0.3","@types/has-property-descriptors":"^1.0.3","@types/object-inspect":"^1.8.4","@types/tape":"^5.6.4","aud":"^2.0.4","auto-changelog":"^2.4.0","call-bind":"^1.0.7","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.3","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","object-inspect":"^1.13.1","safe-publish-latest":"^2.0.0","tape":"^5.7.5","typescript":"next"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows","test"]},"_id":"set-function-length@1.2.2","gitHead":"85f4b57ec0560b9fd3ad75eb7b13c05c6af9f42d","types":"./index.d.ts","_nodeVersion":"21.7.0","_npmVersion":"10.5.0","dist":{"shasum":"aac72314198eaed975cf77b2c3b6b880695e5449","size":5784,"noattachment":false,"key":"/set-function-length/-/set-function-length-1.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/set-function-length/download/set-function-length-1.2.2.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/set-function-length_1.2.2_1710006059392_0.8354118747650165"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-03-09T17:40:59.599Z","publish_time":1710006059599,"_source_registry_name":"default","_cnpm_publish_time":1710006059599},"1.2.1":{"name":"set-function-length","version":"1.2.1","description":"Set a function's length property","main":"index.js","exports":{".":"./index.js","./env":"./env.js","./package.json":"./package.json"},"sideEffects":false,"directories":{"test":"test"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated && npm run emit","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","tsc":"tsc -p .","preemit":"rm -f *.ts *.ts.map test/*.ts test/*.ts.map","emit":"npm run tsc -- --noEmit false --emitDeclarationOnly","postemit":"rm test/*.ts test/*.ts.map","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","postlint":"npm run tsc","pretest":"npm run lint","tests-only":"nyc tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/ljharb/set-function-length.git"},"keywords":["javascript","ecmascript","set","function","length","function.length"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/set-function-length/issues"},"homepage":"https://github.com/ljharb/set-function-length#readme","dependencies":{"define-data-property":"^1.1.2","es-errors":"^1.3.0","function-bind":"^1.1.2","get-intrinsic":"^1.2.3","gopd":"^1.0.1","has-property-descriptors":"^1.0.1"},"devDependencies":{"@ljharb/eslint-config":"^21.1.0","@types/call-bind":"^1.0.5","@types/define-properties":"^1.1.5","@types/es-value-fixtures":"^1.4.4","@types/for-each":"^0.3.3","@types/function-bind":"^1.1.10","@types/gopd":"^1.0.3","@types/has-property-descriptors":"^1.0.3","@types/object-inspect":"^1.8.4","@types/tape":"^5.6.4","aud":"^2.0.4","auto-changelog":"^2.4.0","call-bind":"^1.0.6","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.3","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","object-inspect":"^1.13.1","safe-publish-latest":"^2.0.0","tape":"^5.7.4","typescript":"next"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows","test","!*.d.ts","!*.d.ts.map"]},"_id":"set-function-length@1.2.1","gitHead":"55919f203485ad463b49d2ba2c1abf5118df236d","types":"./index.d.ts","_nodeVersion":"21.6.0","_npmVersion":"10.2.4","dist":{"shasum":"47cc5945f2c771e2cf261c6737cf9684a2a5e425","size":7261,"noattachment":false,"key":"/set-function-length/-/set-function-length-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/set-function-length/download/set-function-length-1.2.1.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/set-function-length_1.2.1_1707238099108_0.5552500611987521"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-02-06T16:48:19.249Z","publish_time":1707238099249,"_source_registry_name":"default","_cnpm_publish_time":1707238099249},"1.2.0":{"name":"set-function-length","version":"1.2.0","description":"Set a function's length property","main":"index.js","exports":{".":"./index.js","./env":"./env.js","./package.json":"./package.json"},"sideEffects":false,"directories":{"test":"test"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated && npm run emit","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","tsc":"tsc -p .","preemit":"rm -f *.ts *.ts.map test/*.ts test/*.ts.map","emit":"npm run tsc -- --noEmit false --emitDeclarationOnly","postemit":"rm test/*.ts test/*.ts.map","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","postlint":"npm run tsc","pretest":"npm run lint","tests-only":"nyc tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/ljharb/set-function-length.git"},"keywords":["javascript","ecmascript","set","function","length","function.length"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/set-function-length/issues"},"homepage":"https://github.com/ljharb/set-function-length#readme","dependencies":{"define-data-property":"^1.1.1","function-bind":"^1.1.2","get-intrinsic":"^1.2.2","gopd":"^1.0.1","has-property-descriptors":"^1.0.1"},"devDependencies":{"@ljharb/eslint-config":"^21.1.0","@types/call-bind":"^1.0.5","@types/define-properties":"^1.1.5","@types/es-value-fixtures":"^1.4.4","@types/for-each":"^0.3.3","@types/function-bind":"^1.1.10","@types/gopd":"^1.0.3","@types/has-property-descriptors":"^1.0.3","@types/object-inspect":"^1.8.4","@types/tape":"^5.6.4","aud":"^2.0.4","auto-changelog":"^2.4.0","call-bind":"^1.0.5","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.3","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","object-inspect":"^1.13.1","safe-publish-latest":"^2.0.0","tape":"^5.7.3","typescript":"^5.4.0-dev.20240113"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows","test","!*.d.ts","!*.d.ts.map"]},"_id":"set-function-length@1.2.0","gitHead":"6cc4721675c96ac4bc8b919c1ab5398213a1568c","types":"./index.d.ts","_nodeVersion":"21.5.0","_npmVersion":"10.2.4","dist":{"shasum":"2f81dc6c16c7059bda5ab7c82c11f03a515ed8e1","size":7078,"noattachment":false,"key":"/set-function-length/-/set-function-length-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/set-function-length/download/set-function-length-1.2.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/set-function-length_1.2.0_1705265757168_0.03350673053758957"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-01-14T20:55:57.328Z","publish_time":1705265757328,"_source_registry_name":"default","_cnpm_publish_time":1705265757328},"1.1.1":{"name":"set-function-length","version":"1.1.1","description":"Set a function's length property","main":"index.js","exports":{".":"./index.js","./env":"./env.js","./package.json":"./package.json"},"directories":{"test":"test"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","pretest":"npm run lint","tests-only":"nyc tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/ljharb/set-function-length.git"},"keywords":["javascript","ecmascript","set","function","length","function.length"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/set-function-length/issues"},"homepage":"https://github.com/ljharb/set-function-length#readme","devDependencies":{"@ljharb/eslint-config":"^21.1.0","aud":"^2.0.3","auto-changelog":"^2.4.0","call-bind":"^1.0.4","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.3","in-publish":"^2.0.1","npmignore":"^0.3.0","nyc":"^10.3.2","object-inspect":"^1.13.1","safe-publish-latest":"^2.0.0","tape":"^5.7.1"},"dependencies":{"define-data-property":"^1.1.1","get-intrinsic":"^1.2.1","gopd":"^1.0.1","has-property-descriptors":"^1.0.0"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows","test"]},"_id":"set-function-length@1.1.1","gitHead":"667210f7dadd064646ae4cf9810939160d96640a","types":"./index.d.ts","_nodeVersion":"21.0.0","_npmVersion":"10.2.0","dist":{"shasum":"4bc39fafb0307224a33e106a7d35ca1218d659ed","size":4498,"noattachment":false,"key":"/set-function-length/-/set-function-length-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/set-function-length/download/set-function-length-1.1.1.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/set-function-length_1.1.1_1697755642342_0.10115392194258566"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-10-19T22:47:22.556Z","publish_time":1697755642556,"_source_registry_name":"default","_cnpm_publish_time":1697755642556},"1.1.0":{"name":"set-function-length","version":"1.1.0","description":"Set a function's length property","main":"index.js","exports":{".":"./index.js","./env":"./env.js","./package.json":"./package.json"},"directories":{"test":"test"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","pretest":"npm run lint","tests-only":"nyc tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/ljharb/set-function-length.git"},"keywords":["javascript","ecmascript","set","function","length","function.length"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/set-function-length/issues"},"homepage":"https://github.com/ljharb/set-function-length#readme","devDependencies":{"@ljharb/eslint-config":"^21.1.0","aud":"^2.0.3","auto-changelog":"^2.4.0","define-data-property":"^1.1.1","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.3","in-publish":"^2.0.1","npmignore":"^0.3.0","nyc":"^10.3.2","object-inspect":"^1.12.3","safe-publish-latest":"^2.0.0","tape":"^5.7.1"},"dependencies":{"get-intrinsic":"^1.2.1","gopd":"^1.0.1","has-property-descriptors":"^1.0.0"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows","test"]},"_id":"set-function-length@1.1.0","gitHead":"ea405930d0c88865b020e6b6010e399ba619e96f","types":"./index.d.ts","_nodeVersion":"20.8.0","_npmVersion":"10.1.0","dist":{"shasum":"7776cc163c60518667bd3147afd862c99a4f4213","size":4331,"noattachment":false,"key":"/set-function-length/-/set-function-length-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/set-function-length/download/set-function-length-1.1.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/set-function-length_1.1.0_1697228930905_0.2499104521697526"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-10-13T20:28:51.232Z","publish_time":1697228931232,"_source_registry_name":"default","_cnpm_publish_time":1697228931232},"1.0.1":{"name":"set-function-length","version":"1.0.1","description":"Set a function's length property","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"directories":{"test":"test"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","pretest":"npm run lint","tests-only":"tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/ljharb/set-function-length.git"},"keywords":["javascript","ecmascript","set","function","length","function.length"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/set-function-length/issues"},"homepage":"https://github.com/ljharb/set-function-length#readme","devDependencies":{"@ljharb/eslint-config":"^21.1.0","aud":"^2.0.3","auto-changelog":"^2.4.0","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.3","in-publish":"^2.0.1","npmignore":"^0.3.0","object-inspect":"^1.12.3","safe-publish-latest":"^2.0.0","tape":"^5.7.1"},"dependencies":{"define-data-property":"^1.1.0","get-intrinsic":"^1.2.1","gopd":"^1.0.1","has-property-descriptors":"^1.0.0"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows","test"]},"_id":"set-function-length@1.0.1","gitHead":"878e8f699e073e3beef93742fb365fe43cca00d8","types":"./index.d.ts","_nodeVersion":"20.8.0","_npmVersion":"10.1.0","dist":{"shasum":"aa9de01d99c80d1126f797dcab2eda48d6a23e41","size":3841,"noattachment":false,"key":"/set-function-length/-/set-function-length-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/set-function-length/download/set-function-length-1.0.1.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/set-function-length_1.0.1_1697174796434_0.10564122325449099"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-10-13T05:26:36.688Z","publish_time":1697174796688,"_source_registry_name":"default","_cnpm_publish_time":1697174796688},"1.0.0":{"name":"set-function-length","version":"1.0.0","description":"Set a function's length property","main":"index.js","directories":{"test":"test"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","pretest":"npm run lint","tests-only":"tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/ljharb/set-function-length.git"},"keywords":["javascript","ecmascript","set","function","length","function.length"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/set-function-length/issues"},"homepage":"https://github.com/ljharb/set-function-length#readme","devDependencies":{"@ljharb/eslint-config":"^21.1.0","aud":"^2.0.3","auto-changelog":"^2.4.0","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.3","in-publish":"^2.0.1","npmignore":"^0.3.0","object-inspect":"^1.12.3","safe-publish-latest":"^2.0.0","tape":"^5.7.1"},"dependencies":{"define-data-property":"^1.1.0","gopd":"^1.0.1","has-property-descriptors":"^1.0.0"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows","test"]},"_id":"set-function-length@1.0.0","gitHead":"5a7527d3fea222561527c1f312af8f217e47faf8","_nodeVersion":"20.8.0","_npmVersion":"10.1.0","dist":{"shasum":"600767c0d8af7d4e80a49c1e0649664ce6db00cf","size":3512,"noattachment":false,"key":"/set-function-length/-/set-function-length-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/set-function-length/download/set-function-length-1.0.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/set-function-length_1.0.0_1697170903603_0.05676262408716437"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-10-13T04:21:43.829Z","publish_time":1697170903829,"_source_registry_name":"default","_cnpm_publish_time":1697170903829}},"readme":"# set-function-length <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nSet a function’s length.\n\nArguments:\n - `fn`: the function\n - `length`: the new length. Must be an integer between 0 and 2**32.\n - `loose`: Optional. If true, and the length fails to be set, do not throw. Default false.\n\nReturns `fn`.\n\n## Usage\n\n```javascript\nvar setFunctionLength = require('set-function-length');\nvar assert = require('assert');\n\nfunction zero() {}\nfunction one(_) {}\nfunction two(_, __) {}\n\nassert.equal(zero.length, 0);\nassert.equal(one.length, 1);\nassert.equal(two.length, 2);\n\nassert.equal(setFunctionLength(zero, 10), zero);\nassert.equal(setFunctionLength(one, 11), one);\nassert.equal(setFunctionLength(two, 12), two);\n\nassert.equal(zero.length, 10);\nassert.equal(one.length, 11);\nassert.equal(two.length, 12);\n```\n\n[package-url]: https://npmjs.org/package/set-function-length\n[npm-version-svg]: https://versionbadg.es/ljharb/set-function-length.svg\n[deps-svg]: https://david-dm.org/ljharb/set-function-length.svg\n[deps-url]: https://david-dm.org/ljharb/set-function-length\n[dev-deps-svg]: https://david-dm.org/ljharb/set-function-length/dev-status.svg\n[dev-deps-url]: https://david-dm.org/ljharb/set-function-length#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/set-function-length.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/set-function-length.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/set-function-length.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=set-function-length\n[codecov-image]: https://codecov.io/gh/ljharb/set-function-length/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/ljharb/set-function-length/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/set-function-length\n[actions-url]: https://github.com/ljharb/set-function-length/actions\n","_attachments":{},"homepage":"https://github.com/ljharb/set-function-length#readme","bugs":{"url":"https://github.com/ljharb/set-function-length/issues"},"license":"MIT"}