Changeset 79a0317 for imaps-frontend/node_modules/is-async-function
- Timestamp:
- 01/21/25 03:08:24 (3 days ago)
- Branches:
- main
- Parents:
- 0c6b92a
- Location:
- imaps-frontend/node_modules/is-async-function
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/is-async-function/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 ## [v2.1.0](https://github.com/inspect-js/is-async-function/compare/v2.0.0...v2.1.0) - 2025-01-02 9 10 ### Commits 11 12 - [meta] use `npmignore` to autogenerate an npmignore file [`b8d050b`](https://github.com/inspect-js/is-async-function/commit/b8d050ba1ab615ef748e8ffbe48c5fc4e14af510) 13 - [actions] split out node 10-20, and 20+ [`1c8cd4b`](https://github.com/inspect-js/is-async-function/commit/1c8cd4bb565934ec5a4d9fc351ac9c8e2b217c07) 14 - [New] add types [`5ba6244`](https://github.com/inspect-js/is-async-function/commit/5ba62441efb4eb267659bcccd615018e7e09cc30) 15 - [Robustness] use `call-bound`, `safe-regex-test` [`9379ecd`](https://github.com/inspect-js/is-async-function/commit/9379ecda6ddce8460a6a0dc1a3d5555443b0b510) 16 - [actions] update rebase action to use reusable workflow [`81b54fb`](https://github.com/inspect-js/is-async-function/commit/81b54fbcb881ac0000306dfd8aade39c51191256) 17 - [Tests] use `for-each` [`ebdc486`](https://github.com/inspect-js/is-async-function/commit/ebdc486ab08c35651567c9f21f11a18ab5618737) 18 - [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `npmignore`, `tape` [`9eb494f`](https://github.com/inspect-js/is-async-function/commit/9eb494f5f5a89eebf7981db906c0c821598465fe) 19 - [Dev Deps] update `aud`, `tape` [`ea43809`](https://github.com/inspect-js/is-async-function/commit/ea43809bff25e47e196bde254c7383464c03ae7e) 20 - [Refactor] use `get-proto` directly [`fc46390`](https://github.com/inspect-js/is-async-function/commit/fc4639088bb6ed4e8b19988d3e642d45ee45e70e) 21 - [Tests] replace `aud` with `npm audit` [`edb4afb`](https://github.com/inspect-js/is-async-function/commit/edb4afb68d6d63d049608269fdf83cdb98956ff3) 22 - [Deps] update `has-tostringtag` [`dc78cf5`](https://github.com/inspect-js/is-async-function/commit/dc78cf545f87ecc17fc7f3426bbbc5ecdea9d167) 23 - [Dev Deps] add missing peer dep [`a93d8ff`](https://github.com/inspect-js/is-async-function/commit/a93d8ff0a22e4351d625ca5bb0fc73d222f9756c) 7 24 8 25 ## [v2.0.0](https://github.com/inspect-js/is-async-function/compare/v1.3.0...v2.0.0) - 2022-04-11 -
imaps-frontend/node_modules/is-async-function/index.js
r0c6b92a r79a0317 1 1 'use strict'; 2 2 3 var toStr = Object.prototype.toString; 4 var fnToStr = Function.prototype.toString; 5 var isFnRegex = /^\s*async(?:\s+function(?:\s+|\()|\s*\()/; 3 var callBound = require('call-bound'); 4 var safeRegexTest = require('safe-regex-test'); 5 6 var toStr = callBound('Object.prototype.toString'); 7 var fnToStr = callBound('Function.prototype.toString'); 8 var isFnRegex = safeRegexTest(/^\s*async(?:\s+function(?:\s+|\()|\s*\()/); 9 6 10 var hasToStringTag = require('has-tostringtag/shams')(); 7 var getProto = Object.getPrototypeOf; 11 var getProto = require('get-proto'); 12 8 13 var getAsyncFunc = function () { // eslint-disable-line consistent-return 9 14 if (!hasToStringTag) { … … 15 20 } 16 21 }; 22 23 /** @type {import('.').AsyncFunction | false} */ 17 24 var AsyncFunction; 18 25 26 /** @type {import('.')} */ 19 27 module.exports = function isAsyncFunction(fn) { 20 28 if (typeof fn !== 'function') { 21 29 return false; 22 30 } 23 if (isFnRegex .test(fnToStr.call(fn))) {31 if (isFnRegex(fnToStr(fn))) { 24 32 return true; 25 33 } 26 34 if (!hasToStringTag) { 27 var str = toStr .call(fn);35 var str = toStr(fn); 28 36 return str === '[object AsyncFunction]'; 29 37 } … … 33 41 if (typeof AsyncFunction === 'undefined') { 34 42 var asyncFunc = getAsyncFunc(); 35 AsyncFunction = asyncFunc ? getProto(asyncFunc) : false; 43 // eslint-disable-next-line no-extra-parens 44 AsyncFunction = asyncFunc ? /** @type {import('.').AsyncFunction} */ (getProto(asyncFunc)) : false; 36 45 } 37 46 return getProto(fn) === AsyncFunction; -
imaps-frontend/node_modules/is-async-function/package.json
r0c6b92a r79a0317 1 1 { 2 "name": "is-async-function", 3 "version": "2.0.0", 4 "description": "Determine if a function is a native async function.", 5 "main": "index.js", 6 "scripts": { 7 "prepublishOnly": "safe-publish-latest", 8 "prepublish": "not-in-publish || npm run prepublishOnly", 9 "pretest": "npm run lint", 10 "test": "npm run tests-only", 11 "tests-only": "nyc npm run test:all", 12 "test:all": "npm run test:index && npm run test:uglified", 13 "test:index": "node test", 14 "test:uglified": "node test/uglified", 15 "posttest": "aud --production", 16 "lint": "eslint --ext=js,mjs .", 17 "version": "auto-changelog && git add CHANGELOG.md", 18 "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" 19 }, 20 "repository": { 21 "type": "git", 22 "url": "git://github.com/inspect-js/is-async-function.git" 23 }, 24 "keywords": [ 25 "async", 26 "async function", 27 "es6", 28 "es2015", 29 "yield", 30 "function", 31 "function*" 32 ], 33 "author": "Jordan Harband <ljharb@gmail.com>", 34 "funding": { 35 "url": "https://github.com/sponsors/ljharb" 36 }, 37 "license": "MIT", 38 "bugs": { 39 "url": "https://github.com/inspect-js/is-async-function/issues" 40 }, 41 "dependencies": { 42 "has-tostringtag": "^1.0.0" 43 }, 44 "devDependencies": { 45 "@ljharb/eslint-config": "^21.0.0", 46 "aud": "^2.0.0", 47 "auto-changelog": "^2.4.0", 48 "eslint": "=8.8.0", 49 "in-publish": "^2.0.1", 50 "make-async-function": "^1.0.0", 51 "make-generator-function": "^2.0.0", 52 "nyc": "^10.3.2", 53 "safe-publish-latest": "^2.0.0", 54 "tape": "^5.5.3", 55 "uglify-register": "^1.0.1" 56 }, 57 "testling": { 58 "files": "test/index.js", 59 "browsers": [ 60 "iexplore/6.0..latest", 61 "firefox/3.0..6.0", 62 "firefox/15.0..latest", 63 "firefox/nightly", 64 "chrome/4.0..10.0", 65 "chrome/20.0..latest", 66 "chrome/canary", 67 "opera/10.0..latest", 68 "opera/next", 69 "safari/4.0..latest", 70 "ipad/6.0..latest", 71 "iphone/6.0..latest", 72 "android-browser/4.2" 73 ] 74 }, 75 "engines": { 76 "node": ">= 0.4" 77 }, 78 "auto-changelog": { 79 "output": "CHANGELOG.md", 80 "template": "keepachangelog", 81 "unreleased": false, 82 "commitLimit": false, 83 "backfillLimit": false, 84 "hideCredit": true 85 } 2 "_from": "is-async-function@^2.0.0", 3 "_id": "is-async-function@2.1.0", 4 "_inBundle": false, 5 "_integrity": "sha512-GExz9MtyhlZyXYLxzlJRj5WUCE661zhDa1Yna52CN57AJsymh+DvXXjyveSioqSRdxvUrdKdvqB1b5cVKsNpWQ==", 6 "_location": "/is-async-function", 7 "_phantomChildren": {}, 8 "_requested": { 9 "type": "range", 10 "registry": true, 11 "raw": "is-async-function@^2.0.0", 12 "name": "is-async-function", 13 "escapedName": "is-async-function", 14 "rawSpec": "^2.0.0", 15 "saveSpec": null, 16 "fetchSpec": "^2.0.0" 17 }, 18 "_requiredBy": [ 19 "/which-builtin-type" 20 ], 21 "_resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.0.tgz", 22 "_shasum": "1d1080612c493608e93168fc4458c245074c06a6", 23 "_spec": "is-async-function@^2.0.0", 24 "_where": "/home/stevetosak/Proekt/IMaps/imaps-frontend/node_modules/which-builtin-type", 25 "author": { 26 "name": "Jordan Harband", 27 "email": "ljharb@gmail.com" 28 }, 29 "auto-changelog": { 30 "output": "CHANGELOG.md", 31 "template": "keepachangelog", 32 "unreleased": false, 33 "commitLimit": false, 34 "backfillLimit": false, 35 "hideCredit": true 36 }, 37 "bugs": { 38 "url": "https://github.com/inspect-js/is-async-function/issues" 39 }, 40 "bundleDependencies": false, 41 "dependencies": { 42 "call-bound": "^1.0.3", 43 "get-proto": "^1.0.1", 44 "has-tostringtag": "^1.0.2", 45 "safe-regex-test": "^1.1.0" 46 }, 47 "deprecated": false, 48 "description": "Determine if a function is a native async function.", 49 "devDependencies": { 50 "@arethetypeswrong/cli": "^0.17.2", 51 "@ljharb/eslint-config": "^21.1.1", 52 "@ljharb/tsconfig": "^0.2.3", 53 "@types/for-each": "^0.3.3", 54 "@types/make-async-function": "^1.0.2", 55 "@types/make-generator-function": "^2.0.3", 56 "@types/tape": "^5.8.0", 57 "auto-changelog": "^2.5.0", 58 "encoding": "^0.1.13", 59 "eslint": "=8.8.0", 60 "for-each": "^0.3.3", 61 "in-publish": "^2.0.1", 62 "make-async-function": "^1.0.0", 63 "make-generator-function": "^2.0.0", 64 "npmignore": "^0.3.1", 65 "nyc": "^10.3.2", 66 "safe-publish-latest": "^2.0.0", 67 "tape": "^5.9.0", 68 "typescript": "next", 69 "uglify-register": "^1.0.1" 70 }, 71 "engines": { 72 "node": ">= 0.4" 73 }, 74 "funding": { 75 "url": "https://github.com/sponsors/ljharb" 76 }, 77 "homepage": "https://github.com/inspect-js/is-async-function#readme", 78 "keywords": [ 79 "async", 80 "async function", 81 "es6", 82 "es2015", 83 "yield", 84 "function", 85 "function*" 86 ], 87 "license": "MIT", 88 "main": "index.js", 89 "name": "is-async-function", 90 "publishConfig": { 91 "ignore": [ 92 ".github/workflows" 93 ] 94 }, 95 "repository": { 96 "type": "git", 97 "url": "git://github.com/inspect-js/is-async-function.git" 98 }, 99 "scripts": { 100 "lint": "eslint --ext=js,mjs .", 101 "postlint": "tsc && attw -P", 102 "posttest": "npx npm@\">= 10.2\" audit --production", 103 "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", 104 "prepack": "npmignore --auto --commentLines=autogenerated", 105 "prepublish": "not-in-publish || npm run prepublishOnly", 106 "prepublishOnly": "safe-publish-latest", 107 "pretest": "npm run lint", 108 "test": "npm run tests-only", 109 "test:all": "npm run test:index && npm run test:uglified", 110 "test:index": "node test", 111 "test:uglified": "node test/uglified", 112 "tests-only": "nyc npm run test:all", 113 "version": "auto-changelog && git add CHANGELOG.md" 114 }, 115 "testling": { 116 "files": "test/index.js", 117 "browsers": [ 118 "iexplore/6.0..latest", 119 "firefox/3.0..6.0", 120 "firefox/15.0..latest", 121 "firefox/nightly", 122 "chrome/4.0..10.0", 123 "chrome/20.0..latest", 124 "chrome/canary", 125 "opera/10.0..latest", 126 "opera/next", 127 "safari/4.0..latest", 128 "ipad/6.0..latest", 129 "iphone/6.0..latest", 130 "android-browser/4.2" 131 ] 132 }, 133 "version": "2.1.0" 86 134 } -
imaps-frontend/node_modules/is-async-function/test/index.js
r0c6b92a r79a0317 9 9 var hasToStringTag = require('has-tostringtag/shams')(); 10 10 11 var forEach = function (arr, func) { 12 var i; 13 for (i = 0; i < arr.length; ++i) { 14 func(arr[i], i, arr); 15 } 16 }; 11 var forEach = require('for-each'); 17 12 18 13 test('returns false for non-functions', function (t) { … … 75 70 test('returns false for non-async function with faked @@toStringTag', { skip: !hasToStringTag || asyncFuncs.length === 0 }, function (t) { 76 71 var asyncFunc = asyncFuncs[0]; 72 /** @type {{ toString(): unknown; valueOf(): unknown; [Symbol.toStringTag]?: unknown }} */ 77 73 var fakeAsyncFunction = { 78 74 toString: function () { return String(asyncFunc); }, -
imaps-frontend/node_modules/is-async-function/test/uglified.js
r0c6b92a r79a0317 1 1 'use strict'; 2 2 3 // @ts-expect-error 3 4 require('uglify-register/api').register({ 4 5 exclude: [/\/node_modules\//, /\/test\//],
Note:
See TracChangeset
for help on using the changeset viewer.