This commit is contained in:
21
vscode-server-linux-x64-web/node_modules/@tootallnate/once/LICENSE
generated
vendored
Normal file
21
vscode-server-linux-x64-web/node_modules/@tootallnate/once/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Nathan Rajlich
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
20
vscode-server-linux-x64-web/node_modules/@tootallnate/once/dist/index.js
generated
vendored
Normal file
20
vscode-server-linux-x64-web/node_modules/@tootallnate/once/dist/index.js
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
export default function once(emitter, name, { signal } = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
function cleanup() {
|
||||
signal === null || signal === void 0 ? void 0 : signal.removeEventListener('abort', cleanup);
|
||||
emitter.removeListener(name, onEvent);
|
||||
emitter.removeListener('error', onError);
|
||||
}
|
||||
function onEvent(...args) {
|
||||
cleanup();
|
||||
resolve(args);
|
||||
}
|
||||
function onError(err) {
|
||||
cleanup();
|
||||
reject(err);
|
||||
}
|
||||
signal === null || signal === void 0 ? void 0 : signal.addEventListener('abort', cleanup);
|
||||
emitter.on(name, onEvent);
|
||||
emitter.on('error', onError);
|
||||
});
|
||||
}
|
1
vscode-server-linux-x64-web/node_modules/@tootallnate/once/dist/overloaded-parameters.js
generated
vendored
Normal file
1
vscode-server-linux-x64-web/node_modules/@tootallnate/once/dist/overloaded-parameters.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export {};
|
1
vscode-server-linux-x64-web/node_modules/@tootallnate/once/dist/types.js
generated
vendored
Normal file
1
vscode-server-linux-x64-web/node_modules/@tootallnate/once/dist/types.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export {};
|
54
vscode-server-linux-x64-web/node_modules/@tootallnate/once/package.json
generated
vendored
Normal file
54
vscode-server-linux-x64-web/node_modules/@tootallnate/once/package.json
generated
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
{
|
||||
"name": "@tootallnate/once",
|
||||
"version": "3.0.0",
|
||||
"description": "Creates a Promise that waits for a single event",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": [
|
||||
"dist",
|
||||
"src"
|
||||
],
|
||||
"scripts": {
|
||||
"prebuild": "rimraf dist",
|
||||
"build": "tsc",
|
||||
"test": "jest",
|
||||
"prepublishOnly": "npm run build"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/TooTallNate/once.git"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/TooTallNate/once/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^27.0.2",
|
||||
"@types/node": "^12.12.11",
|
||||
"abort-controller": "^3.0.0",
|
||||
"jest": "^27.2.1",
|
||||
"rimraf": "^3.0.0",
|
||||
"ts-jest": "^27.0.5",
|
||||
"typescript": "^4.4.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
},
|
||||
"jest": {
|
||||
"preset": "ts-jest",
|
||||
"globals": {
|
||||
"ts-jest": {
|
||||
"diagnostics": false,
|
||||
"isolatedModules": true
|
||||
}
|
||||
},
|
||||
"verbose": false,
|
||||
"testEnvironment": "node",
|
||||
"testMatch": [
|
||||
"<rootDir>/test/**/*.test.ts"
|
||||
]
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user