Changeset 79a0317 for imaps-frontend/node_modules/call-bind
- Timestamp:
- 01/21/25 03:08:24 (3 days ago)
- Branches:
- main
- Parents:
- 0c6b92a
- Location:
- imaps-frontend/node_modules/call-bind
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/call-bind/CHANGELOG.md
r0c6b92a r79a0317 5 5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) 6 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 8 ## [v1.0.8](https://github.com/ljharb/call-bind/compare/v1.0.7...v1.0.8) - 2024-12-05 9 10 ### Commits 11 12 - [Refactor] extract out some helpers and avoid get-intrinsic usage [`407fd5e`](https://github.com/ljharb/call-bind/commit/407fd5eec34ec58394522a6ce3badfa4788fd5ae) 13 - [Refactor] replace code with extracted `call-bind-apply-helpers` [`81018fb`](https://github.com/ljharb/call-bind/commit/81018fb78902ff5acbc6c09300780e97f0db6a34) 14 - [Tests] use `set-function-length/env` [`0fc311d`](https://github.com/ljharb/call-bind/commit/0fc311de0e115cfa6b02969b23a42ad45aadf224) 15 - [actions] split out node 10-20, and 20+ [`77a0cad`](https://github.com/ljharb/call-bind/commit/77a0cad75f83f5b8050dc13baef4fa2cff537fa3) 16 - [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `es-value-fixtures`, `gopd`, `object-inspect`, `tape` [`a145d10`](https://github.com/ljharb/call-bind/commit/a145d10fe847f350e11094f8541848b028ee8c91) 17 - [Tests] replace `aud` with `npm audit` [`30ca3dd`](https://github.com/ljharb/call-bind/commit/30ca3dd7234648eb029947477d06b17879e10727) 18 - [Deps] update `set-function-length` [`57c79a3`](https://github.com/ljharb/call-bind/commit/57c79a3666022ea797cc2a4a3b43fe089bc97d1b) 19 - [Dev Deps] add missing peer dep [`601cfa5`](https://github.com/ljharb/call-bind/commit/601cfa5540066b6206039ceb9496cecbd134ff7b) 7 20 8 21 ## [v1.0.7](https://github.com/ljharb/call-bind/compare/v1.0.6...v1.0.7) - 2024-02-12 -
imaps-frontend/node_modules/call-bind/index.js
r0c6b92a r79a0317 1 1 'use strict'; 2 2 3 var bind = require('function-bind');4 var GetIntrinsic = require('get-intrinsic');5 3 var setFunctionLength = require('set-function-length'); 6 4 7 var $TypeError = require('es-errors/type'); 8 var $apply = GetIntrinsic('%Function.prototype.apply%'); 9 var $call = GetIntrinsic('%Function.prototype.call%'); 10 var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); 5 var $defineProperty = require('es-define-property'); 11 6 12 var $defineProperty = require('es-define-property');13 var $max = GetIntrinsic('%Math.max%');7 var callBindBasic = require('call-bind-apply-helpers'); 8 var applyBind = require('call-bind-apply-helpers/applyBind'); 14 9 15 10 module.exports = function callBind(originalFunction) { 16 if (typeof originalFunction !== 'function') { 17 throw new $TypeError('a function is required'); 18 } 19 var func = $reflectApply(bind, $call, arguments); 11 var func = callBindBasic(arguments); 12 var adjustedLength = originalFunction.length - (arguments.length - 1); 20 13 return setFunctionLength( 21 14 func, 22 1 + $max(0, originalFunction.length - (arguments.length - 1)),15 1 + (adjustedLength > 0 ? adjustedLength : 0), 23 16 true 24 17 ); 25 };26 27 var applyBind = function applyBind() {28 return $reflectApply(bind, $apply, arguments);29 18 }; 30 19 -
imaps-frontend/node_modules/call-bind/package.json
r0c6b92a r79a0317 1 1 { 2 "name": "call-bind", 3 "version": "1.0.7", 4 "description": "Robustly `.call.bind()` a function", 5 "main": "index.js", 6 "exports": { 7 ".": "./index.js", 8 "./callBound": "./callBound.js", 9 "./package.json": "./package.json" 10 }, 11 "scripts": { 12 "prepack": "npmignore --auto --commentLines=auto", 13 "prepublish": "not-in-publish || npm run prepublishOnly", 14 "prepublishOnly": "safe-publish-latest", 15 "lint": "eslint --ext=.js,.mjs .", 16 "postlint": "evalmd README.md", 17 "pretest": "npm run lint", 18 "tests-only": "nyc tape 'test/**/*.js'", 19 "test": "npm run tests-only", 20 "posttest": "aud --production", 21 "version": "auto-changelog && git add CHANGELOG.md", 22 "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" 23 }, 24 "repository": { 25 "type": "git", 26 "url": "git+https://github.com/ljharb/call-bind.git" 27 }, 28 "keywords": [ 29 "javascript", 30 "ecmascript", 31 "es", 32 "js", 33 "callbind", 34 "callbound", 35 "call", 36 "bind", 37 "bound", 38 "call-bind", 39 "call-bound", 40 "function", 41 "es-abstract" 42 ], 43 "author": "Jordan Harband <ljharb@gmail.com>", 44 "funding": { 45 "url": "https://github.com/sponsors/ljharb" 46 }, 47 "license": "MIT", 48 "bugs": { 49 "url": "https://github.com/ljharb/call-bind/issues" 50 }, 51 "homepage": "https://github.com/ljharb/call-bind#readme", 52 "devDependencies": { 53 "@ljharb/eslint-config": "^21.1.0", 54 "aud": "^2.0.4", 55 "auto-changelog": "^2.4.0", 56 "es-value-fixtures": "^1.4.2", 57 "eslint": "=8.8.0", 58 "evalmd": "^0.0.19", 59 "for-each": "^0.3.3", 60 "gopd": "^1.0.1", 61 "has-strict-mode": "^1.0.1", 62 "in-publish": "^2.0.1", 63 "npmignore": "^0.3.1", 64 "nyc": "^10.3.2", 65 "object-inspect": "^1.13.1", 66 "safe-publish-latest": "^2.0.0", 67 "tape": "^5.7.4" 68 }, 69 "dependencies": { 70 "es-define-property": "^1.0.0", 71 "es-errors": "^1.3.0", 72 "function-bind": "^1.1.2", 73 "get-intrinsic": "^1.2.4", 74 "set-function-length": "^1.2.1" 75 }, 76 "testling": { 77 "files": "test/index.js" 78 }, 79 "auto-changelog": { 80 "output": "CHANGELOG.md", 81 "template": "keepachangelog", 82 "unreleased": false, 83 "commitLimit": false, 84 "backfillLimit": false, 85 "hideCredit": true 86 }, 87 "publishConfig": { 88 "ignore": [ 89 ".github/workflows" 90 ] 91 }, 92 "engines": { 93 "node": ">= 0.4" 94 } 2 "_from": "call-bind@^1.0.7", 3 "_id": "call-bind@1.0.8", 4 "_inBundle": false, 5 "_integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", 6 "_location": "/call-bind", 7 "_phantomChildren": {}, 8 "_requested": { 9 "type": "range", 10 "registry": true, 11 "raw": "call-bind@^1.0.7", 12 "name": "call-bind", 13 "escapedName": "call-bind", 14 "rawSpec": "^1.0.7", 15 "saveSpec": null, 16 "fetchSpec": "^1.0.7" 17 }, 18 "_requiredBy": [ 19 "/array-includes", 20 "/array.prototype.findlast", 21 "/array.prototype.flat", 22 "/array.prototype.flatmap", 23 "/array.prototype.tosorted", 24 "/arraybuffer.prototype.slice", 25 "/es-abstract", 26 "/es-iterator-helpers", 27 "/function.prototype.name", 28 "/is-array-buffer", 29 "/object.assign", 30 "/object.entries", 31 "/object.fromentries", 32 "/object.values", 33 "/reflect.getprototypeof", 34 "/regexp.prototype.flags", 35 "/safe-array-concat", 36 "/string.prototype.matchall", 37 "/string.prototype.trim", 38 "/string.prototype.trimend", 39 "/string.prototype.trimstart", 40 "/typed-array-byte-length", 41 "/typed-array-byte-offset", 42 "/typed-array-length", 43 "/which-typed-array" 44 ], 45 "_resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", 46 "_shasum": "0736a9660f537e3388826f440d5ec45f744eaa4c", 47 "_spec": "call-bind@^1.0.7", 48 "_where": "/home/stevetosak/Proekt/IMaps/imaps-frontend/node_modules/array-includes", 49 "author": { 50 "name": "Jordan Harband", 51 "email": "ljharb@gmail.com" 52 }, 53 "auto-changelog": { 54 "output": "CHANGELOG.md", 55 "template": "keepachangelog", 56 "unreleased": false, 57 "commitLimit": false, 58 "backfillLimit": false, 59 "hideCredit": true 60 }, 61 "bugs": { 62 "url": "https://github.com/ljharb/call-bind/issues" 63 }, 64 "bundleDependencies": false, 65 "dependencies": { 66 "call-bind-apply-helpers": "^1.0.0", 67 "es-define-property": "^1.0.0", 68 "get-intrinsic": "^1.2.4", 69 "set-function-length": "^1.2.2" 70 }, 71 "deprecated": false, 72 "description": "Robustly `.call.bind()` a function", 73 "devDependencies": { 74 "@ljharb/eslint-config": "^21.1.1", 75 "auto-changelog": "^2.5.0", 76 "encoding": "^0.1.13", 77 "es-value-fixtures": "^1.5.0", 78 "eslint": "=8.8.0", 79 "evalmd": "^0.0.19", 80 "for-each": "^0.3.3", 81 "has-strict-mode": "^1.0.1", 82 "in-publish": "^2.0.1", 83 "npmignore": "^0.3.1", 84 "nyc": "^10.3.2", 85 "object-inspect": "^1.13.3", 86 "safe-publish-latest": "^2.0.0", 87 "tape": "^5.9.0" 88 }, 89 "engines": { 90 "node": ">= 0.4" 91 }, 92 "exports": { 93 ".": "./index.js", 94 "./callBound": "./callBound.js", 95 "./package.json": "./package.json" 96 }, 97 "funding": { 98 "url": "https://github.com/sponsors/ljharb" 99 }, 100 "homepage": "https://github.com/ljharb/call-bind#readme", 101 "keywords": [ 102 "javascript", 103 "ecmascript", 104 "es", 105 "js", 106 "callbind", 107 "callbound", 108 "call", 109 "bind", 110 "bound", 111 "call-bind", 112 "call-bound", 113 "function", 114 "es-abstract" 115 ], 116 "license": "MIT", 117 "main": "index.js", 118 "name": "call-bind", 119 "publishConfig": { 120 "ignore": [ 121 ".github/workflows" 122 ] 123 }, 124 "repository": { 125 "type": "git", 126 "url": "git+https://github.com/ljharb/call-bind.git" 127 }, 128 "scripts": { 129 "lint": "eslint --ext=.js,.mjs .", 130 "postlint": "evalmd README.md", 131 "posttest": "npx npm@'>=10.2' audit --production", 132 "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", 133 "prepack": "npmignore --auto --commentLines=auto", 134 "prepublish": "not-in-publish || npm run prepublishOnly", 135 "prepublishOnly": "safe-publish-latest", 136 "pretest": "npm run lint", 137 "test": "npm run tests-only", 138 "tests-only": "nyc tape 'test/**/*.js'", 139 "version": "auto-changelog && git add CHANGELOG.md" 140 }, 141 "testling": { 142 "files": "test/index.js" 143 }, 144 "version": "1.0.8" 95 145 } -
imaps-frontend/node_modules/call-bind/test/index.js
r0c6b92a r79a0317 2 2 3 3 var callBind = require('../'); 4 var bind = require('function-bind');5 var gOPD = require('gopd');6 4 var hasStrictMode = require('has-strict-mode')(); 7 5 var forEach = require('for-each'); … … 15 13 * in io.js v3, it is configurable except on bound functions, hence the .bind() 16 14 */ 17 var functionsHaveConfigurableLengths = !!( 18 gOPD 19 && Object.getOwnPropertyDescriptor 20 && Object.getOwnPropertyDescriptor(bind.call(function () {}), 'length').configurable 21 ); 15 var boundFnsHaveConfigurableLengths = require('set-function-length/env').boundFnsHaveConfigurableLengths; 22 16 23 17 test('callBind', function (t) { … … 41 35 42 36 var bound = callBind(func); 43 t.equal(bound.length, func.length + 1, 'function length is preserved', { skip: ! functionsHaveConfigurableLengths });37 t.equal(bound.length, func.length + 1, 'function length is preserved', { skip: !boundFnsHaveConfigurableLengths }); 44 38 t.deepEqual(bound(), [undefined, undefined, undefined], 'bound func with too few args'); 45 39 t.deepEqual(bound(1, 2), [hasStrictMode ? 1 : Object(1), 2, undefined], 'bound func with right args'); … … 47 41 48 42 var boundR = callBind(func, sentinel); 49 t.equal(boundR.length, func.length, 'function length is preserved', { skip: ! functionsHaveConfigurableLengths });43 t.equal(boundR.length, func.length, 'function length is preserved', { skip: !boundFnsHaveConfigurableLengths }); 50 44 t.deepEqual(boundR(), [sentinel, undefined, undefined], 'bound func with receiver, with too few args'); 51 45 t.deepEqual(boundR(1, 2), [sentinel, 1, 2], 'bound func with receiver, with right args'); … … 53 47 54 48 var boundArg = callBind(func, sentinel, 1); 55 t.equal(boundArg.length, func.length - 1, 'function length is preserved', { skip: ! functionsHaveConfigurableLengths });49 t.equal(boundArg.length, func.length - 1, 'function length is preserved', { skip: !boundFnsHaveConfigurableLengths }); 56 50 t.deepEqual(boundArg(), [sentinel, 1, undefined], 'bound func with receiver and arg, with too few args'); 57 51 t.deepEqual(boundArg(2), [sentinel, 1, 2], 'bound func with receiver and arg, with right arg');
Note:
See TracChangeset
for help on using the changeset viewer.