no message
This commit is contained in:
41
.output/server/node_modules/set-function-length/index.js
generated
vendored
41
.output/server/node_modules/set-function-length/index.js
generated
vendored
@@ -1,41 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
var define = require('define-data-property');
|
||||
var hasDescriptors = require('has-property-descriptors')();
|
||||
var gOPD = require('gopd');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
var $floor = GetIntrinsic('%Math.floor%');
|
||||
|
||||
module.exports = function setFunctionLength(fn, length) {
|
||||
if (typeof fn !== 'function') {
|
||||
throw new $TypeError('`fn` is not a function');
|
||||
}
|
||||
if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {
|
||||
throw new $TypeError('`length` must be a positive 32-bit integer');
|
||||
}
|
||||
|
||||
var loose = arguments.length > 2 && !!arguments[2];
|
||||
|
||||
var functionLengthIsConfigurable = true;
|
||||
var functionLengthIsWritable = true;
|
||||
if ('length' in fn && gOPD) {
|
||||
var desc = gOPD(fn, 'length');
|
||||
if (desc && !desc.configurable) {
|
||||
functionLengthIsConfigurable = false;
|
||||
}
|
||||
if (desc && !desc.writable) {
|
||||
functionLengthIsWritable = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
|
||||
if (hasDescriptors) {
|
||||
define(fn, 'length', length, true, true);
|
||||
} else {
|
||||
define(fn, 'length', length);
|
||||
}
|
||||
}
|
||||
return fn;
|
||||
};
|
84
.output/server/node_modules/set-function-length/package.json
generated
vendored
84
.output/server/node_modules/set-function-length/package.json
generated
vendored
@@ -1,84 +0,0 @@
|
||||
{
|
||||
"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": "Jordan Harband <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"
|
||||
]
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user