This commit is contained in:
Tiệp Sunflower
2023-03-06 14:23:39 +07:00
commit aa9c76c82f
2234 changed files with 449471 additions and 0 deletions

22
node_modules/native-or-bluebird/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2014 Jonathan Ong me@jongleberry.com
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.

48
node_modules/native-or-bluebird/README.md generated vendored Normal file
View File

@@ -0,0 +1,48 @@
# native-or-bluebird
[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Dependency Status][david-image]][david-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![Gittip][gittip-image]][gittip-url]
Use either `bluebird` or the native `Promise` implementation.
If no implementation is found, an error will be thrown:
```js
var Promise = require('native-or-bluebird');
```
The goal of this library is to be able to eventually remove this line
from your code and use native `Promise`s, allowing you to
to write future-compatible code with ease.
You should install `bluebird` in your libraries for maximum compatibility.
If you do not want an error to be thrown,
`require()` the `Promise` implementation directly.
If no implementation is found, `undefined` will be returned.
```js
var Promise = require('native-or-bluebird/promise');
if (Promise) // do stuff with promises
```
[npm-image]: https://img.shields.io/npm/v/native-or-bluebird.svg?style=flat-square
[npm-url]: https://npmjs.org/package/native-or-bluebird
[github-tag]: http://img.shields.io/github/tag/normalize/native-or-bluebird.svg?style=flat-square
[github-url]: https://github.com/normalize/native-or-bluebird/tags
[travis-image]: https://img.shields.io/travis/normalize/native-or-bluebird.svg?style=flat-square
[travis-url]: https://travis-ci.org/normalize/native-or-bluebird
[coveralls-image]: https://img.shields.io/coveralls/normalize/native-or-bluebird.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/normalize/native-or-bluebird?branch=master
[david-image]: http://img.shields.io/david/normalize/native-or-bluebird.svg?style=flat-square
[david-url]: https://david-dm.org/normalize/native-or-bluebird
[license-image]: http://img.shields.io/npm/l/native-or-bluebird.svg?style=flat-square
[license-url]: LICENSE
[downloads-image]: http://img.shields.io/npm/dm/native-or-bluebird.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/native-or-bluebird
[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
[gittip-url]: https://www.gittip.com/jonathanong/

10
node_modules/native-or-bluebird/index.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
module.exports = require('./promise')
/* istanbul ignore next */
if (!module.exports) {
console.error('The file "%s" requires `Promise`,', module.parent.filename)
console.error('but neither `bluebird` nor the native `Promise` implementation were found.')
console.error('Please install `bluebird` yourself.')
process.exit(1)
}

33
node_modules/native-or-bluebird/package.json generated vendored Normal file
View File

@@ -0,0 +1,33 @@
{
"name": "native-or-bluebird",
"description": "use either the native Promise or Bluebird",
"version": "1.2.0",
"author": {
"name": "Jonathan Ong",
"email": "me@jongleberry.com",
"url": "http://jongleberry.com",
"twitter": "https://twitter.com/jongleberry"
},
"license": "MIT",
"repository": "normalize/native-or-bluebird",
"keywords": [
"bluebird",
"promise",
"promises"
],
"devDependencies": {
"bluebird": "*",
"istanbul": "0",
"mocha": "1"
},
"scripts": {
"test": "mocha --reporter spec",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"
},
"files": [
"index.js",
"promise.js",
"LICENSE"
]
}

6
node_modules/native-or-bluebird/promise.js generated vendored Normal file
View File

@@ -0,0 +1,6 @@
try {
module.exports = require('bluebird')
} catch (_) {
module.exports = global.Promise
}