new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
// Generated by LiveScript 1.6.0
|
||||
(function(){
|
||||
var prelude, map, sortBy, fl, closestString, nameToRaw, dasherize, naturalJoin;
|
||||
prelude = require('prelude-ls'), map = prelude.map, sortBy = prelude.sortBy;
|
||||
fl = require('fast-levenshtein');
|
||||
closestString = function(possibilities, input){
|
||||
var distances, ref$, string, distance;
|
||||
if (!possibilities.length) {
|
||||
return;
|
||||
}
|
||||
distances = map(function(it){
|
||||
var ref$, longer, shorter;
|
||||
ref$ = input.length > it.length
|
||||
? [input, it]
|
||||
: [it, input], longer = ref$[0], shorter = ref$[1];
|
||||
return {
|
||||
string: it,
|
||||
distance: fl.get(longer, shorter)
|
||||
};
|
||||
})(
|
||||
possibilities);
|
||||
ref$ = sortBy(function(it){
|
||||
return it.distance;
|
||||
}, distances)[0], string = ref$.string, distance = ref$.distance;
|
||||
return string;
|
||||
};
|
||||
nameToRaw = function(name){
|
||||
if (name.length === 1 || name === 'NUM') {
|
||||
return "-" + name;
|
||||
} else {
|
||||
return "--" + name;
|
||||
}
|
||||
};
|
||||
dasherize = function(string){
|
||||
if (/^[A-Z]/.test(string)) {
|
||||
return string;
|
||||
} else {
|
||||
return prelude.dasherize(string);
|
||||
}
|
||||
};
|
||||
naturalJoin = function(array){
|
||||
if (array.length < 3) {
|
||||
return array.join(' or ');
|
||||
} else {
|
||||
return array.slice(0, -1).join(', ') + ", or " + array[array.length - 1];
|
||||
}
|
||||
};
|
||||
module.exports = {
|
||||
closestString: closestString,
|
||||
nameToRaw: nameToRaw,
|
||||
dasherize: dasherize,
|
||||
naturalJoin: naturalJoin
|
||||
};
|
||||
}).call(this);
|
||||
@@ -0,0 +1,22 @@
|
||||
// workaround for tty output truncation on Node.js
|
||||
try {
|
||||
// prevent buffer overflow and other asynchronous bugs
|
||||
process.stdout._handle.setBlocking(true);
|
||||
process.stderr._handle.setBlocking(true);
|
||||
} catch (e) {
|
||||
// ensure output buffers are flushed before process termination
|
||||
var exit = process.exit;
|
||||
process.exit = function() {
|
||||
var args = [].slice.call(arguments);
|
||||
process.once("uncaughtException", function() {
|
||||
(function callback() {
|
||||
if (process.stdout.bufferSize || process.stderr.bufferSize) {
|
||||
setTimeout(callback, 1);
|
||||
} else {
|
||||
exit.apply(process, args);
|
||||
}
|
||||
})();
|
||||
});
|
||||
throw exit;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,261 @@
|
||||
Node.js: fs-extra
|
||||
=================
|
||||
|
||||
`fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It also uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to prevent `EMFILE` errors. It should be a drop in replacement for `fs`.
|
||||
|
||||
[](https://www.npmjs.org/package/fs-extra)
|
||||
[](https://github.com/jprichardson/node-fs-extra/blob/master/LICENSE)
|
||||
[](http://travis-ci.org/jprichardson/node-fs-extra)
|
||||
[](https://ci.appveyor.com/project/jprichardson/node-fs-extra/branch/master)
|
||||
[](https://www.npmjs.org/package/fs-extra)
|
||||
[](https://coveralls.io/github/jprichardson/node-fs-extra)
|
||||
[](https://standardjs.com)
|
||||
|
||||
Why?
|
||||
----
|
||||
|
||||
I got tired of including `mkdirp`, `rimraf`, and `ncp` in most of my projects.
|
||||
|
||||
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
npm install fs-extra
|
||||
|
||||
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are attached to `fs-extra`. All `fs` methods return promises if the callback isn't passed.
|
||||
|
||||
You don't ever need to include the original `fs` module again:
|
||||
|
||||
```js
|
||||
const fs = require('fs') // this is no longer necessary
|
||||
```
|
||||
|
||||
you can now do this:
|
||||
|
||||
```js
|
||||
const fs = require('fs-extra')
|
||||
```
|
||||
|
||||
or if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want
|
||||
to name your `fs` variable `fse` like so:
|
||||
|
||||
```js
|
||||
const fse = require('fs-extra')
|
||||
```
|
||||
|
||||
you can also keep both, but it's redundant:
|
||||
|
||||
```js
|
||||
const fs = require('fs')
|
||||
const fse = require('fs-extra')
|
||||
```
|
||||
|
||||
Sync vs Async vs Async/Await
|
||||
-------------
|
||||
Most methods are async by default. All async methods will return a promise if the callback isn't passed.
|
||||
|
||||
Sync methods on the other hand will throw if an error occurs.
|
||||
|
||||
Also Async/Await will throw an error if one occurs.
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
const fs = require('fs-extra')
|
||||
|
||||
// Async with promises:
|
||||
fs.copy('/tmp/myfile', '/tmp/mynewfile')
|
||||
.then(() => console.log('success!'))
|
||||
.catch(err => console.error(err))
|
||||
|
||||
// Async with callbacks:
|
||||
fs.copy('/tmp/myfile', '/tmp/mynewfile', err => {
|
||||
if (err) return console.error(err)
|
||||
console.log('success!')
|
||||
})
|
||||
|
||||
// Sync:
|
||||
try {
|
||||
fs.copySync('/tmp/myfile', '/tmp/mynewfile')
|
||||
console.log('success!')
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
}
|
||||
|
||||
// Async/Await:
|
||||
async function copyFiles () {
|
||||
try {
|
||||
await fs.copy('/tmp/myfile', '/tmp/mynewfile')
|
||||
console.log('success!')
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
}
|
||||
}
|
||||
|
||||
copyFiles()
|
||||
```
|
||||
|
||||
|
||||
Methods
|
||||
-------
|
||||
|
||||
### Async
|
||||
|
||||
- [copy](docs/copy.md)
|
||||
- [emptyDir](docs/emptyDir.md)
|
||||
- [ensureFile](docs/ensureFile.md)
|
||||
- [ensureDir](docs/ensureDir.md)
|
||||
- [ensureLink](docs/ensureLink.md)
|
||||
- [ensureSymlink](docs/ensureSymlink.md)
|
||||
- [mkdirp](docs/ensureDir.md)
|
||||
- [mkdirs](docs/ensureDir.md)
|
||||
- [move](docs/move.md)
|
||||
- [outputFile](docs/outputFile.md)
|
||||
- [outputJson](docs/outputJson.md)
|
||||
- [pathExists](docs/pathExists.md)
|
||||
- [readJson](docs/readJson.md)
|
||||
- [remove](docs/remove.md)
|
||||
- [writeJson](docs/writeJson.md)
|
||||
|
||||
### Sync
|
||||
|
||||
- [copySync](docs/copy-sync.md)
|
||||
- [emptyDirSync](docs/emptyDir-sync.md)
|
||||
- [ensureFileSync](docs/ensureFile-sync.md)
|
||||
- [ensureDirSync](docs/ensureDir-sync.md)
|
||||
- [ensureLinkSync](docs/ensureLink-sync.md)
|
||||
- [ensureSymlinkSync](docs/ensureSymlink-sync.md)
|
||||
- [mkdirpSync](docs/ensureDir-sync.md)
|
||||
- [mkdirsSync](docs/ensureDir-sync.md)
|
||||
- [moveSync](docs/move-sync.md)
|
||||
- [outputFileSync](docs/outputFile-sync.md)
|
||||
- [outputJsonSync](docs/outputJson-sync.md)
|
||||
- [pathExistsSync](docs/pathExists-sync.md)
|
||||
- [readJsonSync](docs/readJson-sync.md)
|
||||
- [removeSync](docs/remove-sync.md)
|
||||
- [writeJsonSync](docs/writeJson-sync.md)
|
||||
|
||||
|
||||
**NOTE:** You can still use the native Node.js methods. They are promisified and copied over to `fs-extra`. See [notes on `fs.read()` & `fs.write()`](docs/fs-read-write.md)
|
||||
|
||||
### What happened to `walk()` and `walkSync()`?
|
||||
|
||||
They were removed from `fs-extra` in v2.0.0. If you need the functionality, `walk` and `walkSync` are available as separate packages, [`klaw`](https://github.com/jprichardson/node-klaw) and [`klaw-sync`](https://github.com/manidlou/node-klaw-sync).
|
||||
|
||||
|
||||
Third Party
|
||||
-----------
|
||||
|
||||
|
||||
### TypeScript
|
||||
|
||||
If you like TypeScript, you can use `fs-extra` with it: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra
|
||||
|
||||
|
||||
### File / Directory Watching
|
||||
|
||||
If you want to watch for changes to files or directories, then you should use [chokidar](https://github.com/paulmillr/chokidar).
|
||||
|
||||
### Obtain Filesystem (Devices, Partitions) Information
|
||||
|
||||
[fs-filesystem](https://github.com/arthurintelligence/node-fs-filesystem) allows you to read the state of the filesystem of the host on which it is run. It returns information about both the devices and the partitions (volumes) of the system.
|
||||
|
||||
### Misc.
|
||||
|
||||
- [fs-extra-debug](https://github.com/jdxcode/fs-extra-debug) - Send your fs-extra calls to [debug](https://npmjs.org/package/debug).
|
||||
- [mfs](https://github.com/cadorn/mfs) - Monitor your fs-extra calls.
|
||||
|
||||
|
||||
|
||||
Hacking on fs-extra
|
||||
-------------------
|
||||
|
||||
Wanna hack on `fs-extra`? Great! Your help is needed! [fs-extra is one of the most depended upon Node.js packages](http://nodei.co/npm/fs-extra.png?downloads=true&downloadRank=true&stars=true). This project
|
||||
uses [JavaScript Standard Style](https://github.com/feross/standard) - if the name or style choices bother you,
|
||||
you're gonna have to get over it :) If `standard` is good enough for `npm`, it's good enough for `fs-extra`.
|
||||
|
||||
[](https://github.com/feross/standard)
|
||||
|
||||
What's needed?
|
||||
- First, take a look at existing issues. Those are probably going to be where the priority lies.
|
||||
- More tests for edge cases. Specifically on different platforms. There can never be enough tests.
|
||||
- Improve test coverage. See coveralls output for more info.
|
||||
|
||||
Note: If you make any big changes, **you should definitely file an issue for discussion first.**
|
||||
|
||||
### Running the Test Suite
|
||||
|
||||
fs-extra contains hundreds of tests.
|
||||
|
||||
- `npm run lint`: runs the linter ([standard](http://standardjs.com/))
|
||||
- `npm run unit`: runs the unit tests
|
||||
- `npm test`: runs both the linter and the tests
|
||||
|
||||
|
||||
### Windows
|
||||
|
||||
If you run the tests on the Windows and receive a lot of symbolic link `EPERM` permission errors, it's
|
||||
because on Windows you need elevated privilege to create symbolic links. You can add this to your Windows's
|
||||
account by following the instructions here: http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7
|
||||
However, I didn't have much luck doing this.
|
||||
|
||||
Since I develop on Mac OS X, I use VMWare Fusion for Windows testing. I create a shared folder that I map to a drive on Windows.
|
||||
I open the `Node.js command prompt` and run as `Administrator`. I then map the network drive running the following command:
|
||||
|
||||
net use z: "\\vmware-host\Shared Folders"
|
||||
|
||||
I can then navigate to my `fs-extra` directory and run the tests.
|
||||
|
||||
|
||||
Naming
|
||||
------
|
||||
|
||||
I put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here:
|
||||
|
||||
* https://github.com/jprichardson/node-fs-extra/issues/2
|
||||
* https://github.com/flatiron/utile/issues/11
|
||||
* https://github.com/ryanmcgrath/wrench-js/issues/29
|
||||
* https://github.com/substack/node-mkdirp/issues/17
|
||||
|
||||
First, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes.
|
||||
|
||||
For example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc.
|
||||
|
||||
We have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`?
|
||||
|
||||
My perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too.
|
||||
|
||||
So, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`.
|
||||
|
||||
|
||||
Credit
|
||||
------
|
||||
|
||||
`fs-extra` wouldn't be possible without using the modules from the following authors:
|
||||
|
||||
- [Isaac Shlueter](https://github.com/isaacs)
|
||||
- [Charlie McConnel](https://github.com/avianflu)
|
||||
- [James Halliday](https://github.com/substack)
|
||||
- [Andrew Kelley](https://github.com/andrewrk)
|
||||
|
||||
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Licensed under MIT
|
||||
|
||||
Copyright (c) 2011-2017 [JP Richardson](https://github.com/jprichardson)
|
||||
|
||||
[1]: http://nodejs.org/docs/latest/api/fs.html
|
||||
|
||||
|
||||
[jsonfile]: https://github.com/jprichardson/node-jsonfile
|
||||
@@ -0,0 +1,29 @@
|
||||
var baseExtremum = require('./_baseExtremum'),
|
||||
baseLt = require('./_baseLt'),
|
||||
identity = require('./identity');
|
||||
|
||||
/**
|
||||
* Computes the minimum value of `array`. If `array` is empty or falsey,
|
||||
* `undefined` is returned.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Math
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @returns {*} Returns the minimum value.
|
||||
* @example
|
||||
*
|
||||
* _.min([4, 2, 8, 6]);
|
||||
* // => 2
|
||||
*
|
||||
* _.min([]);
|
||||
* // => undefined
|
||||
*/
|
||||
function min(array) {
|
||||
return (array && array.length)
|
||||
? baseExtremum(array, identity, baseLt)
|
||||
: undefined;
|
||||
}
|
||||
|
||||
module.exports = min;
|
||||
@@ -0,0 +1,170 @@
|
||||
/**
|
||||
* **This module is pending deprecation.** Once a replacement API has been
|
||||
* finalized, this module will be fully deprecated. Most developers should
|
||||
* **not** have cause to use this module. Users who absolutely must have
|
||||
* the functionality that domains provide may rely on it for the time being
|
||||
* but should expect to have to migrate to a different solution
|
||||
* in the future.
|
||||
*
|
||||
* Domains provide a way to handle multiple different IO operations as a
|
||||
* single group. If any of the event emitters or callbacks registered to a
|
||||
* domain emit an `'error'` event, or throw an error, then the domain object
|
||||
* will be notified, rather than losing the context of the error in the`process.on('uncaughtException')` handler, or causing the program to
|
||||
* exit immediately with an error code.
|
||||
* @deprecated Since v1.4.2 - Deprecated
|
||||
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/domain.js)
|
||||
*/
|
||||
declare module 'domain' {
|
||||
import EventEmitter = require('node:events');
|
||||
/**
|
||||
* The `Domain` class encapsulates the functionality of routing errors and
|
||||
* uncaught exceptions to the active `Domain` object.
|
||||
*
|
||||
* To handle the errors that it catches, listen to its `'error'` event.
|
||||
*/
|
||||
class Domain extends EventEmitter {
|
||||
/**
|
||||
* An array of timers and event emitters that have been explicitly added
|
||||
* to the domain.
|
||||
*/
|
||||
members: Array<EventEmitter | NodeJS.Timer>;
|
||||
/**
|
||||
* The `enter()` method is plumbing used by the `run()`, `bind()`, and`intercept()` methods to set the active domain. It sets `domain.active` and`process.domain` to the domain, and implicitly
|
||||
* pushes the domain onto the domain
|
||||
* stack managed by the domain module (see {@link exit} for details on the
|
||||
* domain stack). The call to `enter()` delimits the beginning of a chain of
|
||||
* asynchronous calls and I/O operations bound to a domain.
|
||||
*
|
||||
* Calling `enter()` changes only the active domain, and does not alter the domain
|
||||
* itself. `enter()` and `exit()` can be called an arbitrary number of times on a
|
||||
* single domain.
|
||||
*/
|
||||
enter(): void;
|
||||
/**
|
||||
* The `exit()` method exits the current domain, popping it off the domain stack.
|
||||
* Any time execution is going to switch to the context of a different chain of
|
||||
* asynchronous calls, it's important to ensure that the current domain is exited.
|
||||
* The call to `exit()` delimits either the end of or an interruption to the chain
|
||||
* of asynchronous calls and I/O operations bound to a domain.
|
||||
*
|
||||
* If there are multiple, nested domains bound to the current execution context,`exit()` will exit any domains nested within this domain.
|
||||
*
|
||||
* Calling `exit()` changes only the active domain, and does not alter the domain
|
||||
* itself. `enter()` and `exit()` can be called an arbitrary number of times on a
|
||||
* single domain.
|
||||
*/
|
||||
exit(): void;
|
||||
/**
|
||||
* Run the supplied function in the context of the domain, implicitly
|
||||
* binding all event emitters, timers, and lowlevel requests that are
|
||||
* created in that context. Optionally, arguments can be passed to
|
||||
* the function.
|
||||
*
|
||||
* This is the most basic way to use a domain.
|
||||
*
|
||||
* ```js
|
||||
* const domain = require('domain');
|
||||
* const fs = require('fs');
|
||||
* const d = domain.create();
|
||||
* d.on('error', (er) => {
|
||||
* console.error('Caught error!', er);
|
||||
* });
|
||||
* d.run(() => {
|
||||
* process.nextTick(() => {
|
||||
* setTimeout(() => { // Simulating some various async stuff
|
||||
* fs.open('non-existent file', 'r', (er, fd) => {
|
||||
* if (er) throw er;
|
||||
* // proceed...
|
||||
* });
|
||||
* }, 100);
|
||||
* });
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* In this example, the `d.on('error')` handler will be triggered, rather
|
||||
* than crashing the program.
|
||||
*/
|
||||
run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
|
||||
/**
|
||||
* Explicitly adds an emitter to the domain. If any event handlers called by
|
||||
* the emitter throw an error, or if the emitter emits an `'error'` event, it
|
||||
* will be routed to the domain's `'error'` event, just like with implicit
|
||||
* binding.
|
||||
*
|
||||
* This also works with timers that are returned from `setInterval()` and `setTimeout()`. If their callback function throws, it will be caught by
|
||||
* the domain `'error'` handler.
|
||||
*
|
||||
* If the Timer or `EventEmitter` was already bound to a domain, it is removed
|
||||
* from that one, and bound to this one instead.
|
||||
* @param emitter emitter or timer to be added to the domain
|
||||
*/
|
||||
add(emitter: EventEmitter | NodeJS.Timer): void;
|
||||
/**
|
||||
* The opposite of {@link add}. Removes domain handling from the
|
||||
* specified emitter.
|
||||
* @param emitter emitter or timer to be removed from the domain
|
||||
*/
|
||||
remove(emitter: EventEmitter | NodeJS.Timer): void;
|
||||
/**
|
||||
* The returned function will be a wrapper around the supplied callback
|
||||
* function. When the returned function is called, any errors that are
|
||||
* thrown will be routed to the domain's `'error'` event.
|
||||
*
|
||||
* ```js
|
||||
* const d = domain.create();
|
||||
*
|
||||
* function readSomeFile(filename, cb) {
|
||||
* fs.readFile(filename, 'utf8', d.bind((er, data) => {
|
||||
* // If this throws, it will also be passed to the domain.
|
||||
* return cb(er, data ? JSON.parse(data) : null);
|
||||
* }));
|
||||
* }
|
||||
*
|
||||
* d.on('error', (er) => {
|
||||
* // An error occurred somewhere. If we throw it now, it will crash the program
|
||||
* // with the normal line number and stack message.
|
||||
* });
|
||||
* ```
|
||||
* @param callback The callback function
|
||||
* @return The bound function
|
||||
*/
|
||||
bind<T extends Function>(callback: T): T;
|
||||
/**
|
||||
* This method is almost identical to {@link bind}. However, in
|
||||
* addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function.
|
||||
*
|
||||
* In this way, the common `if (err) return callback(err);` pattern can be replaced
|
||||
* with a single error handler in a single place.
|
||||
*
|
||||
* ```js
|
||||
* const d = domain.create();
|
||||
*
|
||||
* function readSomeFile(filename, cb) {
|
||||
* fs.readFile(filename, 'utf8', d.intercept((data) => {
|
||||
* // Note, the first argument is never passed to the
|
||||
* // callback since it is assumed to be the 'Error' argument
|
||||
* // and thus intercepted by the domain.
|
||||
*
|
||||
* // If this throws, it will also be passed to the domain
|
||||
* // so the error-handling logic can be moved to the 'error'
|
||||
* // event on the domain instead of being repeated throughout
|
||||
* // the program.
|
||||
* return cb(null, JSON.parse(data));
|
||||
* }));
|
||||
* }
|
||||
*
|
||||
* d.on('error', (er) => {
|
||||
* // An error occurred somewhere. If we throw it now, it will crash the program
|
||||
* // with the normal line number and stack message.
|
||||
* });
|
||||
* ```
|
||||
* @param callback The callback function
|
||||
* @return The intercepted function
|
||||
*/
|
||||
intercept<T extends Function>(callback: T): T;
|
||||
}
|
||||
function create(): Domain;
|
||||
}
|
||||
declare module 'node:domain' {
|
||||
export * from 'domain';
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"132":"J D E F A B CC"},B:{"132":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"132":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB EC FC"},D:{"132":"7 8 9 I v AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","388":"0 1 2 3 4 5 6 J D E F A B C K L G M N O w g x y z"},E:{"132":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"132":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e PC QC RC SC qB AC TC rB"},G:{"132":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"132":"oC"},I:{"132":"tB I f pC qC rC sC BC tC uC"},J:{"132":"D A"},K:{"132":"A B C h qB AC rB"},L:{"132":"H"},M:{"132":"H"},N:{"132":"A B"},O:{"132":"vC"},P:{"132":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"132":"1B"},R:{"132":"9C"},S:{"132":"AD BD"}},B:6,C:"DNSSEC and DANE"};
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"2":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB EC FC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"2":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"2":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e PC QC RC SC qB AC TC rB"},G:{"2":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"2":"tB I f pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"2":"A B C h qB AC rB"},L:{"2":"H"},M:{"2":"H"},N:{"2":"A B"},O:{"2":"vC"},P:{"2":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"2":"1B"},R:{"2":"9C"},S:{"2":"AD BD"}},B:5,C:"CSS @when / @else conditional rules"};
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "escape-goat",
|
||||
"version": "4.0.0",
|
||||
"description": "Escape a string for use in HTML or the inverse",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/escape-goat",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": "./index.js",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"escape",
|
||||
"unescape",
|
||||
"html",
|
||||
"entity",
|
||||
"entities",
|
||||
"escaping",
|
||||
"sanitize",
|
||||
"sanitization",
|
||||
"utility",
|
||||
"template",
|
||||
"attribute",
|
||||
"value",
|
||||
"interpolate",
|
||||
"xss",
|
||||
"goat",
|
||||
"🐐"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^3.15.0",
|
||||
"tsd": "^0.14.0",
|
||||
"xo": "^0.38.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,232 @@
|
||||
1.1.1 / 2019-04-06
|
||||
=================
|
||||
* [Fix] exclude deprecated Firefox keys (#53)
|
||||
|
||||
1.1.0 / 2019-02-10
|
||||
=================
|
||||
* [New] [Refactor] move full implementation to `implementation` entry point
|
||||
* [Refactor] only evaluate the implementation if `Object.keys` is not present
|
||||
* [Tests] up to `node` `v11.8`, `v10.15`, `v8.15`, `v6.16`
|
||||
* [Tests] remove jscs
|
||||
* [Tests] switch to `npm audit` from `nsp`
|
||||
|
||||
1.0.12 / 2018-06-18
|
||||
=================
|
||||
* [Fix] avoid accessing `window.applicationCache`, to avoid issues with latest Chrome on HTTP (#46)
|
||||
|
||||
1.0.11 / 2016-07-05
|
||||
=================
|
||||
* [Fix] exclude keys regarding the style (eg. `pageYOffset`) on `window` to avoid reflow (#32)
|
||||
|
||||
1.0.10 / 2016-07-04
|
||||
=================
|
||||
* [Fix] exclude `height` and `width` keys on `window` to avoid reflow (#31)
|
||||
* [Fix] In IE 6, `window.external` makes `Object.keys` throw
|
||||
* [Tests] up to `node` `v6.2`, `v5.10`, `v4.4`
|
||||
* [Tests] use pretest/posttest for linting/security
|
||||
* [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`
|
||||
* [Dev Deps] remove unused eccheck script + dep
|
||||
|
||||
1.0.9 / 2015-10-19
|
||||
=================
|
||||
* [Fix] Blacklist 'frame' property on window (#16, #17)
|
||||
* [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config`
|
||||
|
||||
1.0.8 / 2015-10-14
|
||||
=================
|
||||
* [Fix] wrap automation equality bug checking in try/catch, per [es5-shim#327](https://github.com/es-shims/es5-shim/issues/327)
|
||||
* [Fix] Blacklist 'window.frameElement' per [es5-shim#322](https://github.com/es-shims/es5-shim/issues/322)
|
||||
* [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG
|
||||
* [Tests] up to `io.js` `v3.3`, `node` `v4.2`
|
||||
* [Dev Deps] update `eslint`, `tape`, `@ljharb/eslint-config`, `jscs`
|
||||
|
||||
1.0.7 / 2015-07-18
|
||||
=================
|
||||
* [Fix] A proper fix for 176f03335e90d5c8d0d8125a99f27819c9b9cdad / https://github.com/es-shims/es5-shim/issues/275 that doesn't break dontEnum/constructor fixes in IE 8.
|
||||
* [Fix] Remove deprecation message in Chrome by touching deprecated window properties (#15)
|
||||
* [Tests] Improve test output for automation equality bugfix
|
||||
* [Tests] Test on `io.js` `v2.4`
|
||||
|
||||
1.0.6 / 2015-07-09
|
||||
=================
|
||||
* [Fix] Use an object lookup rather than ES5's `indexOf` (#14)
|
||||
* [Tests] ES3 browsers don't have `Array.isArray`
|
||||
* [Tests] Fix `no-shadow` rule, as well as an IE 8 bug caused by engine NFE shadowing bugs.
|
||||
|
||||
1.0.5 / 2015-07-03
|
||||
=================
|
||||
* [Fix] Fix a flabbergasting IE 8 bug where `localStorage.constructor.prototype === localStorage` throws
|
||||
* [Tests] Test up to `io.js` `v2.3`
|
||||
* [Dev Deps] Update `nsp`, `eslint`
|
||||
|
||||
1.0.4 / 2015-05-23
|
||||
=================
|
||||
* Fix a Safari 5.0 bug with `Object.keys` not working with `arguments`
|
||||
* Test on latest `node` and `io.js`
|
||||
* Update `jscs`, `tape`, `eslint`, `nsp`, `is`, `editorconfig-tools`, `covert`
|
||||
|
||||
1.0.3 / 2015-01-06
|
||||
=================
|
||||
* Revert "Make `object-keys` more robust against later environment tampering" to maintain ES3 compliance
|
||||
|
||||
1.0.2 / 2014-12-28
|
||||
=================
|
||||
* Update lots of dev dependencies
|
||||
* Tweaks to README
|
||||
* Make `object-keys` more robust against later environment tampering
|
||||
|
||||
1.0.1 / 2014-09-03
|
||||
=================
|
||||
* Update URLs and badges in README
|
||||
|
||||
1.0.0 / 2014-08-26
|
||||
=================
|
||||
* v1.0.0
|
||||
|
||||
0.6.1 / 2014-08-25
|
||||
=================
|
||||
* v0.6.1
|
||||
* Updating dependencies (tape, covert, is)
|
||||
* Update badges in readme
|
||||
* Use separate var statements
|
||||
|
||||
0.6.0 / 2014-04-23
|
||||
=================
|
||||
* v0.6.0
|
||||
* Updating dependencies (tape, covert)
|
||||
* Make sure boxed primitives, and arguments objects, work properly in ES3 browsers
|
||||
* Improve test matrix: test all node versions, but only latest two stables are a failure
|
||||
* Remove internal foreach shim.
|
||||
|
||||
0.5.1 / 2014-03-09
|
||||
=================
|
||||
* 0.5.1
|
||||
* Updating dependencies (tape, covert, is)
|
||||
* Removing forEach from the module (but keeping it in tests)
|
||||
|
||||
0.5.0 / 2014-01-30
|
||||
=================
|
||||
* 0.5.0
|
||||
* Explicitly returning the shim, instead of returning native Object.keys when present
|
||||
* Adding a changelog.
|
||||
* Cleaning up IIFE wrapping
|
||||
* Testing on node 0.4 through 0.11
|
||||
|
||||
0.4.0 / 2013-08-14
|
||||
==================
|
||||
|
||||
* v0.4.0
|
||||
* In Chrome 4-10 and Safari 4, typeof (new RegExp) === 'function'
|
||||
* If it's a string, make sure to use charAt instead of brackets.
|
||||
* Only use Function#call if necessary.
|
||||
* Making sure the context tests actually run.
|
||||
* Better function detection
|
||||
* Adding the android browser
|
||||
* Fixing testling files
|
||||
* Updating tape
|
||||
* Removing the "is" dependency.
|
||||
* Making an isArguments shim.
|
||||
* Adding a local forEach shim and tests.
|
||||
* Updating paths.
|
||||
* Moving the shim test.
|
||||
* v0.3.0
|
||||
|
||||
0.3.0 / 2013-05-18
|
||||
==================
|
||||
|
||||
* README tweak.
|
||||
* Fixing constructor enum issue. Fixes [#5](https://github.com/ljharb/object-keys/issues/5).
|
||||
* Adding a test for [#5](https://github.com/ljharb/object-keys/issues/5)
|
||||
* Updating readme.
|
||||
* Updating dependencies.
|
||||
* Giving credit to lodash.
|
||||
* Make sure that a prototype's constructor property is not enumerable. Fixes [#3](https://github.com/ljharb/object-keys/issues/3).
|
||||
* Adding additional tests to handle arguments objects, and to skip "prototype" in functions. Fixes [#2](https://github.com/ljharb/object-keys/issues/2).
|
||||
* Fixing a typo on this test for [#3](https://github.com/ljharb/object-keys/issues/3).
|
||||
* Adding node 0.10 to travis.
|
||||
* Adding an IE < 9 test per [#3](https://github.com/ljharb/object-keys/issues/3)
|
||||
* Adding an iOS 5 mobile Safari test per [#2](https://github.com/ljharb/object-keys/issues/2)
|
||||
* Moving "indexof" and "is" to be dev dependencies.
|
||||
* Making sure the shim works with functions.
|
||||
* Flattening the tests.
|
||||
|
||||
0.2.0 / 2013-05-10
|
||||
==================
|
||||
|
||||
* v0.2.0
|
||||
* Object.keys should work with arrays.
|
||||
|
||||
0.1.8 / 2013-05-10
|
||||
==================
|
||||
|
||||
* v0.1.8
|
||||
* Upgrading dependencies.
|
||||
* Using a simpler check.
|
||||
* Fixing a bug in hasDontEnumBug browsers.
|
||||
* Using the newest tape!
|
||||
* Fixing this error test.
|
||||
* "undefined" is probably a reserved word in ES3.
|
||||
* Better test message.
|
||||
|
||||
0.1.7 / 2013-04-17
|
||||
==================
|
||||
|
||||
* Upgrading "is" once more.
|
||||
* The key "null" is breaking some browsers.
|
||||
|
||||
0.1.6 / 2013-04-17
|
||||
==================
|
||||
|
||||
* v0.1.6
|
||||
* Upgrading "is"
|
||||
|
||||
0.1.5 / 2013-04-14
|
||||
==================
|
||||
|
||||
* Bumping version.
|
||||
* Adding more testling browsers.
|
||||
* Updating "is"
|
||||
|
||||
0.1.4 / 2013-04-08
|
||||
==================
|
||||
|
||||
* Using "is" instead of "is-extended".
|
||||
|
||||
0.1.3 / 2013-04-07
|
||||
==================
|
||||
|
||||
* Using "foreach" instead of my own shim.
|
||||
* Removing "tap"; I'll just wait for "tape" to fix its node 0.10 bug.
|
||||
|
||||
0.1.2 / 2013-04-03
|
||||
==================
|
||||
|
||||
* Adding dependency status; moving links to an index at the bottom.
|
||||
* Upgrading is-extended; version 0.1.2
|
||||
* Adding an npm version badge.
|
||||
|
||||
0.1.1 / 2013-04-01
|
||||
==================
|
||||
|
||||
* Adding Travis CI.
|
||||
* Bumping the version.
|
||||
* Adding indexOf since IE sucks.
|
||||
* Adding a forEach shim since older browsers don't have Array#forEach.
|
||||
* Upgrading tape - 0.3.2 uses Array#map
|
||||
* Using explicit end instead of plan.
|
||||
* Can't test with Array.isArray in older browsers.
|
||||
* Using is-extended.
|
||||
* Fixing testling files.
|
||||
* JSHint/JSLint-ing.
|
||||
* Removing an unused object.
|
||||
* Using strict mode.
|
||||
|
||||
0.1.0 / 2013-03-30
|
||||
==================
|
||||
|
||||
* Changing the exports should have meant a higher version bump.
|
||||
* Oops, fixing the repo URL.
|
||||
* Adding more tests.
|
||||
* 0.0.2
|
||||
* Merge branch 'export_one_thing'; closes [#1](https://github.com/ljharb/object-keys/issues/1)
|
||||
* Move shim export to a separate file.
|
||||
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var $getProto = require('../helpers/getProto');
|
||||
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof
|
||||
|
||||
module.exports = function OrdinaryGetPrototypeOf(O) {
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: O must be an Object');
|
||||
}
|
||||
if (!$getProto) {
|
||||
throw new $TypeError('This environment does not support fetching prototypes.');
|
||||
}
|
||||
return $getProto(O);
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = require('ci-info').isCI
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"2":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"2":"DC tB I v J D EC FC","132":"0 1 2 3 4 5 6 7 8 9 E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T","450":"U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","66":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB"},E:{"2":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"2":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e PC QC RC SC qB AC TC rB","66":"BB CB DB EB FB GB HB IB JB KB LB MB"},G:{"2":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"2":"tB I f pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"2":"A B C h qB AC rB"},L:{"2":"H"},M:{"450":"H"},N:{"2":"A B"},O:{"2":"vC"},P:{"2":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"2":"1B"},R:{"2":"9C"},S:{"2":"AD BD"}},B:7,C:"Context menu item (menuitem element)"};
|
||||
@@ -0,0 +1,103 @@
|
||||
/* It is important to test our Javascript output as well as our coffeescript,
|
||||
* since code that is transpiled may be slightly different in effect from the
|
||||
* original.
|
||||
*
|
||||
* Run these tests (against lib/netmask.js, not lib/netmask.coffee directly)
|
||||
* using mocha, after re-generating lib/netmask.js including your changes:
|
||||
*
|
||||
* mocha tests/netmask.js
|
||||
*/
|
||||
|
||||
const assert = require('assert');
|
||||
const Netmask = require('../').Netmask;
|
||||
|
||||
describe('Netmask', () => {
|
||||
describe('can build a block', () => {
|
||||
let block = new Netmask('10.1.2.0/24');
|
||||
|
||||
it('should contain a sub-block', () => {
|
||||
let block1 = new Netmask('10.1.2.10/29');
|
||||
assert(block.contains(block1));
|
||||
});
|
||||
|
||||
it('should contain another sub-block', () => {
|
||||
let block2 = new Netmask('10.1.2.10/31');
|
||||
assert(block.contains(block2));
|
||||
});
|
||||
|
||||
it('should contain a third sub-block', () => {
|
||||
let block3 = new Netmask('10.1.2.20/32');
|
||||
assert(block.contains(block3));
|
||||
});
|
||||
});
|
||||
|
||||
describe('when presented with an octet which is not a number', () => {
|
||||
let block = new Netmask('192.168.0.0/29')
|
||||
|
||||
it('should throw', () => {
|
||||
assert.throws(() => block.contains('192.168.~.4'), Error);
|
||||
});
|
||||
});
|
||||
|
||||
describe('can handle hexadecimal, octal, & decimal octets in input IP', () => {
|
||||
let block1 = new Netmask('31.0.0.0/19');
|
||||
let block2 = new Netmask('127.0.0.0/8');
|
||||
let block3 = new Netmask('255.0.0.1/12');
|
||||
let block4 = new Netmask('10.0.0.1/8');
|
||||
let block5 = new Netmask('1.0.0.1/4');
|
||||
|
||||
describe('octal', () => {
|
||||
it('block 31.0.0.0/19 does not contain 031.0.5.5', () => {
|
||||
assert(!block1.contains('031.0.5.5'));
|
||||
});
|
||||
it('block 127.0.0.0/8 contains 0177.0.0.2 (127.0.0.2)', () => {
|
||||
assert(block2.contains('0177.0.0.2'));
|
||||
});
|
||||
it('block 255.0.0.1/12 does not contain 0255.0.0.2 (173.0.0.2)', () => {
|
||||
assert(!block3.contains('0255.0.0.2'));
|
||||
});
|
||||
it('block 10.0.0.1/8 contains 012.0.0.255 (10.0.0.255)', () => {
|
||||
assert(block4.contains('012.0.0.255'));
|
||||
});
|
||||
it('block 1.0.0.1/4 contains 01.02.03.04', () => {
|
||||
assert(block5.contains('01.02.03.04'));
|
||||
});
|
||||
});
|
||||
|
||||
describe('hexadecimal', () => {
|
||||
it('block 31.0.0.0/19 does not contain 0x31.0.5.5', () => {
|
||||
assert(!block1.contains('0x31.0.5.5'));
|
||||
});
|
||||
it('block 127.0.0.0/8 contains 0x7f.0.0.0x2 (127.0.0.2)', () => {
|
||||
assert(block2.contains('0x7f.0.0.0x2'));
|
||||
});
|
||||
it('block 255.0.0.1/12 contains 0xff.0.0.2', () => {
|
||||
assert(block3.contains('0xff.0.0.2'));
|
||||
});
|
||||
it('block 10.0.0.1/8 does not contain 0x10.0.0.255', () => {
|
||||
assert(!block4.contains('0x10.0.0.255'));
|
||||
});
|
||||
it('block 1.0.0.1/4 contains 0x1.0x2.0x3.0x4', () => {
|
||||
assert(block5.contains('0x1.0x2.0x3.0x4'));
|
||||
});
|
||||
});
|
||||
|
||||
describe('decimal', () => {
|
||||
it('block 31.0.0.0/19 contains 31.0.5.5', () => {
|
||||
assert(block1.contains('31.0.5.5'));
|
||||
});
|
||||
it('block 127.0.0.0/8 does not contain 128.0.0.2', () =>{
|
||||
assert(!block2.contains('128.0.0.2'));
|
||||
});
|
||||
it('block 255.0.0.1/12 contains 255.0.0.2', () => {
|
||||
assert(block3.contains('255.0.0.2'));
|
||||
});
|
||||
it('block 10.0.0.1/8 contains 10.0.0.255', () => {
|
||||
assert(block4.contains('10.0.0.255'));
|
||||
});
|
||||
it('block 1.0.0.1/4 contains 1.2.3.4', () => {
|
||||
assert(block5.contains('1.2.3.4'));
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Returns the number (integer) of DNS domain levels (number of dots) in the
|
||||
* hostname.
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* ``` js
|
||||
* dnsDomainLevels("www")
|
||||
* // returns 0.
|
||||
* dnsDomainLevels("www.netscape.com")
|
||||
* // returns 2.
|
||||
* ```
|
||||
*
|
||||
* @param {String} host is the hostname from the URL.
|
||||
* @return {Number} number of domain levels
|
||||
*/
|
||||
export default function dnsDomainLevels(host: string): number;
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"name":"word","version":"0.3.0","files":{"LICENSE":{"checkedAt":1678883669218,"integrity":"sha512-YV6jnWnY6iMJG6cdeTRTdaKkTk+J6sbjRjNmGMOQBKWLmBzUNhTJ0L4EteIp+VUwnoHa7Yqc9NhHaOh7DMU4gg==","mode":420,"size":11355},"CONTRIBUTING.md":{"checkedAt":1678883669225,"integrity":"sha512-oKF9F0sQ0DvsJGXkAS3ojZMp/eyGw0XOtsGfS9M4/Yh5BeneLFReLhP1YNTRrTjMFuj8G7wAku4rYQYdeKM1QQ==","mode":420,"size":2132},"package.json":{"checkedAt":1678883669225,"integrity":"sha512-Il6Ro2e13U2YBVWGiZpZmiSQaFEt6nfSCUk/P6qMkLnJBgtYINtX9L+21VlcVz2/HBy1LyiJaSWLhFimz19HrQ==","mode":420,"size":537},"README.md":{"checkedAt":1678883669226,"integrity":"sha512-Sf28i9gq67Roz5Mttr72jhqCNJHW/EbaR1Wg95n37r5sEUMIjB1fdM5xMYZeBIdKGAqg5CnrW6mrvxwlmr3OVQ==","mode":420,"size":40},"word.js":{"checkedAt":1678883669226,"integrity":"sha512-eDcQcTmSBJTrER+OnGdmpbSq/NTTwQ5c1SzmpoJfLa6FbXhKCKUDe1D3lPlJD+JDX8UPkba4fn7Fj17EgoP+Cw==","mode":420,"size":21}}}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"2":0,"3":0.00251,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0.00251,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.00754,"79":0.00251,"80":0.00251,"81":0.00251,"82":0.00251,"83":0.00251,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0.00251,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0.00503,"103":0.00251,"104":0,"105":0.00251,"106":0.00251,"107":0.00251,"108":0.01006,"109":0.19861,"110":0.12319,"111":0,"112":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0.00754,"30":0,"31":0,"32":0,"33":0,"34":0.00503,"35":0,"36":0,"37":0,"38":0.02011,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0.00503,"48":0,"49":0.00251,"50":0,"51":0,"52":0,"53":0.00251,"54":0,"55":0,"56":0.00251,"57":0,"58":0,"59":0,"60":0.00754,"61":0,"62":0,"63":0,"64":0,"65":0.00251,"66":0,"67":0.00251,"68":0,"69":0.00251,"70":0,"71":0,"72":0,"73":0,"74":0.00251,"75":0,"76":0.00251,"77":0.00251,"78":0.00503,"79":0.05028,"80":0.00503,"81":0.01257,"83":0.01508,"84":0.0352,"85":0.03017,"86":0.0352,"87":0.0352,"88":0,"89":0.00251,"90":0.00251,"91":0.00503,"92":0.01006,"93":0.00251,"94":0.00251,"95":0.00251,"96":0.00251,"97":0.00503,"98":0.00754,"99":0.00251,"100":0.01508,"101":0.01006,"102":0.01257,"103":0.02263,"104":0.01508,"105":0.01508,"106":0.01508,"107":0.02514,"108":0.24889,"109":1.90058,"110":1.32488,"111":0.00251,"112":0.00251,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0.00503,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0.00251,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0.00754,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0.02765,"68":0,"69":0,"70":0,"71":0.00251,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0.00503,"94":0.04777,"95":0.03268,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0.00251,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0.00251,"86":0.00251,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0.00251,"107":0.00251,"108":0.01508,"109":0.20866,"110":0.27654},E:{"4":0.00503,"5":0,"6":0,"7":0,"8":0.00251,"9":0,"10":0,"11":0,"12":0,"13":0.00503,"14":0.01508,"15":0.00251,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0.00251,"13.1":0.0176,"14.1":0.0352,"15.1":0.00754,"15.2-15.3":0.00503,"15.4":0.0176,"15.5":0.03268,"15.6":0.16341,"16.0":0.02263,"16.1":0.06788,"16.2":0.16592,"16.3":0.11816,"16.4":0},G:{"8":0,"3.2":0.00181,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0,"6.0-6.1":0.00181,"7.0-7.1":0.01266,"8.1-8.4":0.00904,"9.0-9.2":0.00542,"9.3":0.07052,"10.0-10.2":0,"10.3":0.05605,"11.0-11.2":0.01627,"11.3-11.4":0.01266,"12.0-12.1":0.01627,"12.2-12.5":0.27303,"13.0-13.1":0.00723,"13.2":0.00362,"13.3":0.03074,"13.4-13.7":0.12657,"14.0-14.4":0.1989,"14.5-14.8":0.3544,"15.0-15.1":0.11211,"15.2-15.3":0.11934,"15.4":0.15008,"15.5":0.29111,"15.6":1.24039,"16.0":1.65265,"16.1":4.65418,"16.2":4.76267,"16.3":3.16969,"16.4":0.01447},P:{"4":0.36245,"20":1.12876,"5.0-5.4":0.03107,"6.2-6.4":0,"7.2-7.4":0,"8.2":0,"9.2":0,"10.1":0,"11.1-11.2":0,"12.0":0.01036,"13.0":0.02071,"14.0":0,"15.0":0,"16.0":0.02071,"17.0":0.02071,"18.0":0.04142,"19.0":1.4705},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":14.99568,"4.4":0,"4.4.3-4.4.4":29.99137},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0.06926,"9":0.01889,"10":0.02204,"11":0.22668,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.45665},H:{"0":0.41815},L:{"0":20.43523},R:{_:"0"},M:{"0":0.41173},Q:{"13.1":0.00749}};
|
||||
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.using = void 0;
|
||||
var Observable_1 = require("../Observable");
|
||||
var innerFrom_1 = require("./innerFrom");
|
||||
var empty_1 = require("./empty");
|
||||
function using(resourceFactory, observableFactory) {
|
||||
return new Observable_1.Observable(function (subscriber) {
|
||||
var resource = resourceFactory();
|
||||
var result = observableFactory(resource);
|
||||
var source = result ? innerFrom_1.innerFrom(result) : empty_1.EMPTY;
|
||||
source.subscribe(subscriber);
|
||||
return function () {
|
||||
if (resource) {
|
||||
resource.unsubscribe();
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
exports.using = using;
|
||||
//# sourceMappingURL=using.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mapOneOrManyArgs.js","sourceRoot":"","sources":["../../../../src/internal/util/mapOneOrManyArgs.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE/B,IAAA,OAAO,GAAK,KAAK,QAAV,CAAW;AAE1B,SAAS,WAAW,CAAO,EAA2B,EAAE,IAAW;IAC/D,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,wCAAI,IAAI,IAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;AAClD,CAAC;AAMD,MAAM,UAAU,gBAAgB,CAAO,EAA2B;IAC9D,OAAO,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,WAAW,CAAC,EAAE,EAAE,IAAI,CAAC,EAArB,CAAqB,CAAC,CAAA;AAC7C,CAAC"}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"publishLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishLast.ts"],"names":[],"mappings":";;;AACA,gDAA+C;AAC/C,6EAA4E;AAmE5E,SAAgB,WAAW;IAEzB,OAAO,UAAC,MAAM;QACZ,IAAM,OAAO,GAAG,IAAI,2BAAY,EAAK,CAAC;QACtC,OAAO,IAAI,6CAAqB,CAAC,MAAM,EAAE,cAAM,OAAA,OAAO,EAAP,CAAO,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC;AAND,kCAMC"}
|
||||
@@ -0,0 +1,39 @@
|
||||
# signal-exit
|
||||
|
||||
[](https://travis-ci.org/tapjs/signal-exit)
|
||||
[](https://coveralls.io/r/tapjs/signal-exit?branch=master)
|
||||
[](https://www.npmjs.com/package/signal-exit)
|
||||
[](https://github.com/conventional-changelog/standard-version)
|
||||
|
||||
When you want to fire an event no matter how a process exits:
|
||||
|
||||
* reaching the end of execution.
|
||||
* explicitly having `process.exit(code)` called.
|
||||
* having `process.kill(pid, sig)` called.
|
||||
* receiving a fatal signal from outside the process
|
||||
|
||||
Use `signal-exit`.
|
||||
|
||||
```js
|
||||
var onExit = require('signal-exit')
|
||||
|
||||
onExit(function (code, signal) {
|
||||
console.log('process exited!')
|
||||
})
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
`var remove = onExit(function (code, signal) {}, options)`
|
||||
|
||||
The return value of the function is a function that will remove the
|
||||
handler.
|
||||
|
||||
Note that the function *only* fires for signals if the signal would
|
||||
cause the process to exit. That is, there are no other listeners, and
|
||||
it is a fatal signal.
|
||||
|
||||
## Options
|
||||
|
||||
* `alwaysLast`: Run this handler after any other signal or exit
|
||||
handlers. This causes `process.emit` to be monkeypatched.
|
||||
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.connectable = void 0;
|
||||
var Subject_1 = require("../Subject");
|
||||
var Observable_1 = require("../Observable");
|
||||
var defer_1 = require("./defer");
|
||||
var DEFAULT_CONFIG = {
|
||||
connector: function () { return new Subject_1.Subject(); },
|
||||
resetOnDisconnect: true,
|
||||
};
|
||||
function connectable(source, config) {
|
||||
if (config === void 0) { config = DEFAULT_CONFIG; }
|
||||
var connection = null;
|
||||
var connector = config.connector, _a = config.resetOnDisconnect, resetOnDisconnect = _a === void 0 ? true : _a;
|
||||
var subject = connector();
|
||||
var result = new Observable_1.Observable(function (subscriber) {
|
||||
return subject.subscribe(subscriber);
|
||||
});
|
||||
result.connect = function () {
|
||||
if (!connection || connection.closed) {
|
||||
connection = defer_1.defer(function () { return source; }).subscribe(subject);
|
||||
if (resetOnDisconnect) {
|
||||
connection.add(function () { return (subject = connector()); });
|
||||
}
|
||||
}
|
||||
return connection;
|
||||
};
|
||||
return result;
|
||||
}
|
||||
exports.connectable = connectable;
|
||||
//# sourceMappingURL=connectable.js.map
|
||||
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.takeWhile = void 0;
|
||||
var lift_1 = require("../util/lift");
|
||||
var OperatorSubscriber_1 = require("./OperatorSubscriber");
|
||||
function takeWhile(predicate, inclusive) {
|
||||
if (inclusive === void 0) { inclusive = false; }
|
||||
return lift_1.operate(function (source, subscriber) {
|
||||
var index = 0;
|
||||
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
|
||||
var result = predicate(value, index++);
|
||||
(result || inclusive) && subscriber.next(value);
|
||||
!result && subscriber.complete();
|
||||
}));
|
||||
});
|
||||
}
|
||||
exports.takeWhile = takeWhile;
|
||||
//# sourceMappingURL=takeWhile.js.map
|
||||
@@ -0,0 +1 @@
|
||||
export const isFunction = (value) => (typeof value === "function");
|
||||
@@ -0,0 +1,21 @@
|
||||
/// <reference types="node" />
|
||||
import net from 'net';
|
||||
import { Agent, ClientRequest, RequestOptions } from 'agent-base';
|
||||
import { SocksProxyAgentOptions } from '.';
|
||||
/**
|
||||
* The `SocksProxyAgent`.
|
||||
*
|
||||
* @api public
|
||||
*/
|
||||
export default class SocksProxyAgent extends Agent {
|
||||
private lookup;
|
||||
private proxy;
|
||||
constructor(_opts: string | SocksProxyAgentOptions);
|
||||
/**
|
||||
* Initiates a SOCKS connection to the specified SOCKS proxy server,
|
||||
* which in turn connects to the specified remote host and port.
|
||||
*
|
||||
* @api protected
|
||||
*/
|
||||
callback(req: ClientRequest, opts: RequestOptions): Promise<net.Socket>;
|
||||
}
|
||||
@@ -0,0 +1,430 @@
|
||||
/******************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
|
||||
/**
|
||||
* Used to shim class extends.
|
||||
*
|
||||
* @param d The derived class.
|
||||
* @param b The base class.
|
||||
*/
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
|
||||
/**
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
*
|
||||
* @param t The target object to copy to.
|
||||
* @param sources One or more source objects from which to copy properties
|
||||
*/
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
|
||||
/**
|
||||
* Performs a rest spread on an object.
|
||||
*
|
||||
* @param t The source value.
|
||||
* @param propertyNames The property names excluded from the rest spread.
|
||||
*/
|
||||
export declare function __rest(t: any, propertyNames: (string | symbol)[]): any;
|
||||
|
||||
/**
|
||||
* Applies decorators to a target object
|
||||
*
|
||||
* @param decorators The set of decorators to apply.
|
||||
* @param target The target object.
|
||||
* @param key If specified, the own property to apply the decorators to.
|
||||
* @param desc The property descriptor, defaults to fetching the descriptor from the target object.
|
||||
* @experimental
|
||||
*/
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
|
||||
/**
|
||||
* Creates an observing function decorator from a parameter decorator.
|
||||
*
|
||||
* @param paramIndex The parameter index to apply the decorator to.
|
||||
* @param decorator The parameter decorator to apply. Note that the return value is ignored.
|
||||
* @experimental
|
||||
*/
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
|
||||
/**
|
||||
* Applies decorators to a class or class member, following the native ECMAScript decorator specification.
|
||||
* @param ctor For non-field class members, the class constructor. Otherwise, `null`.
|
||||
* @param descriptorIn The `PropertyDescriptor` to use when unable to look up the property from `ctor`.
|
||||
* @param decorators The decorators to apply
|
||||
* @param contextIn The `DecoratorContext` to clone for each decorator application.
|
||||
* @param initializers An array of field initializer mutation functions into which new initializers are written.
|
||||
* @param extraInitializers An array of extra initializer functions into which new initializers are written.
|
||||
*/
|
||||
export declare function __esDecorate(ctor: Function | null, descriptorIn: object | null, decorators: Function[], contextIn: object, initializers: Function[] | null, extraInitializers: Function[]): void;
|
||||
|
||||
/**
|
||||
* Runs field initializers or extra initializers generated by `__esDecorate`.
|
||||
* @param thisArg The `this` argument to use.
|
||||
* @param initializers The array of initializers to evaluate.
|
||||
* @param value The initial value to pass to the initializers.
|
||||
*/
|
||||
export declare function __runInitializers(thisArg: unknown, initializers: Function[], value?: any): any;
|
||||
|
||||
/**
|
||||
* Converts a computed property name into a `string` or `symbol` value.
|
||||
*/
|
||||
export declare function __propKey(x: any): string | symbol;
|
||||
|
||||
/**
|
||||
* Assigns the name of a function derived from the left-hand side of an assignment.
|
||||
* @param f The function to rename.
|
||||
* @param name The new name for the function.
|
||||
* @param prefix A prefix (such as `"get"` or `"set"`) to insert before the name.
|
||||
*/
|
||||
export declare function __setFunctionName(f: Function, name: string | symbol, prefix?: string): Function;
|
||||
|
||||
/**
|
||||
* Creates a decorator that sets metadata.
|
||||
*
|
||||
* @param metadataKey The metadata key
|
||||
* @param metadataValue The metadata value
|
||||
* @experimental
|
||||
*/
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
|
||||
/**
|
||||
* Converts a generator function into a pseudo-async function, by treating each `yield` as an `await`.
|
||||
*
|
||||
* @param thisArg The reference to use as the `this` value in the generator function
|
||||
* @param _arguments The optional arguments array
|
||||
* @param P The optional promise constructor argument, defaults to the `Promise` property of the global object.
|
||||
* @param generator The generator function
|
||||
*/
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
|
||||
/**
|
||||
* Creates an Iterator object using the body as the implementation.
|
||||
*
|
||||
* @param thisArg The reference to use as the `this` value in the function
|
||||
* @param body The generator state-machine based implementation.
|
||||
*
|
||||
* @see [./docs/generator.md]
|
||||
*/
|
||||
export declare function __generator(thisArg: any, body: Function): any;
|
||||
|
||||
/**
|
||||
* Creates bindings for all enumerable properties of `m` on `exports`
|
||||
*
|
||||
* @param m The source object
|
||||
* @param exports The `exports` object.
|
||||
*/
|
||||
export declare function __exportStar(m: any, o: any): void;
|
||||
|
||||
/**
|
||||
* Creates a value iterator from an `Iterable` or `ArrayLike` object.
|
||||
*
|
||||
* @param o The object.
|
||||
* @throws {TypeError} If `o` is neither `Iterable`, nor an `ArrayLike`.
|
||||
*/
|
||||
export declare function __values(o: any): any;
|
||||
|
||||
/**
|
||||
* Reads values from an `Iterable` or `ArrayLike` object and returns the resulting array.
|
||||
*
|
||||
* @param o The object to read from.
|
||||
* @param n The maximum number of arguments to read, defaults to `Infinity`.
|
||||
*/
|
||||
export declare function __read(o: any, n?: number): any[];
|
||||
|
||||
/**
|
||||
* Creates an array from iterable spread.
|
||||
*
|
||||
* @param args The Iterable objects to spread.
|
||||
* @deprecated since TypeScript 4.2 - Use `__spreadArray`
|
||||
*/
|
||||
export declare function __spread(...args: any[][]): any[];
|
||||
|
||||
/**
|
||||
* Creates an array from array spread.
|
||||
*
|
||||
* @param args The ArrayLikes to spread into the resulting array.
|
||||
* @deprecated since TypeScript 4.2 - Use `__spreadArray`
|
||||
*/
|
||||
export declare function __spreadArrays(...args: any[][]): any[];
|
||||
|
||||
/**
|
||||
* Spreads the `from` array into the `to` array.
|
||||
*
|
||||
* @param pack Replace empty elements with `undefined`.
|
||||
*/
|
||||
export declare function __spreadArray(to: any[], from: any[], pack?: boolean): any[];
|
||||
|
||||
/**
|
||||
* Creates an object that signals to `__asyncGenerator` that it shouldn't be yielded,
|
||||
* and instead should be awaited and the resulting value passed back to the generator.
|
||||
*
|
||||
* @param v The value to await.
|
||||
*/
|
||||
export declare function __await(v: any): any;
|
||||
|
||||
/**
|
||||
* Converts a generator function into an async generator function, by using `yield __await`
|
||||
* in place of normal `await`.
|
||||
*
|
||||
* @param thisArg The reference to use as the `this` value in the generator function
|
||||
* @param _arguments The optional arguments array
|
||||
* @param generator The generator function
|
||||
*/
|
||||
export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any;
|
||||
|
||||
/**
|
||||
* Used to wrap a potentially async iterator in such a way so that it wraps the result
|
||||
* of calling iterator methods of `o` in `__await` instances, and then yields the awaited values.
|
||||
*
|
||||
* @param o The potentially async iterator.
|
||||
* @returns A synchronous iterator yielding `__await` instances on every odd invocation
|
||||
* and returning the awaited `IteratorResult` passed to `next` every even invocation.
|
||||
*/
|
||||
export declare function __asyncDelegator(o: any): any;
|
||||
|
||||
/**
|
||||
* Creates a value async iterator from an `AsyncIterable`, `Iterable` or `ArrayLike` object.
|
||||
*
|
||||
* @param o The object.
|
||||
* @throws {TypeError} If `o` is neither `AsyncIterable`, `Iterable`, nor an `ArrayLike`.
|
||||
*/
|
||||
export declare function __asyncValues(o: any): any;
|
||||
|
||||
/**
|
||||
* Creates a `TemplateStringsArray` frozen object from the `cooked` and `raw` arrays.
|
||||
*
|
||||
* @param cooked The cooked possibly-sparse array.
|
||||
* @param raw The raw string content.
|
||||
*/
|
||||
export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray;
|
||||
|
||||
/**
|
||||
* Used to shim default and named imports in ECMAScript Modules transpiled to CommonJS.
|
||||
*
|
||||
* ```js
|
||||
* import Default, { Named, Other } from "mod";
|
||||
* // or
|
||||
* import { default as Default, Named, Other } from "mod";
|
||||
* ```
|
||||
*
|
||||
* @param mod The CommonJS module exports object.
|
||||
*/
|
||||
export declare function __importStar<T>(mod: T): T;
|
||||
|
||||
/**
|
||||
* Used to shim default imports in ECMAScript Modules transpiled to CommonJS.
|
||||
*
|
||||
* ```js
|
||||
* import Default from "mod";
|
||||
* ```
|
||||
*
|
||||
* @param mod The CommonJS module exports object.
|
||||
*/
|
||||
export declare function __importDefault<T>(mod: T): T | { default: T };
|
||||
|
||||
/**
|
||||
* Emulates reading a private instance field.
|
||||
*
|
||||
* @param receiver The instance from which to read the private field.
|
||||
* @param state A WeakMap containing the private field value for an instance.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
*
|
||||
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
|
||||
*/
|
||||
export declare function __classPrivateFieldGet<T extends object, V>(
|
||||
receiver: T,
|
||||
state: { has(o: T): boolean, get(o: T): V | undefined },
|
||||
kind?: "f"
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Emulates reading a private static field.
|
||||
*
|
||||
* @param receiver The object from which to read the private static field.
|
||||
* @param state The class constructor containing the definition of the static field.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
* @param f The descriptor that holds the static field value.
|
||||
*
|
||||
* @throws {TypeError} If `receiver` is not `state`.
|
||||
*/
|
||||
export declare function __classPrivateFieldGet<T extends new (...args: any[]) => unknown, V>(
|
||||
receiver: T,
|
||||
state: T,
|
||||
kind: "f",
|
||||
f: { value: V }
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Emulates evaluating a private instance "get" accessor.
|
||||
*
|
||||
* @param receiver The instance on which to evaluate the private "get" accessor.
|
||||
* @param state A WeakSet used to verify an instance supports the private "get" accessor.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
* @param f The "get" accessor function to evaluate.
|
||||
*
|
||||
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
|
||||
*/
|
||||
export declare function __classPrivateFieldGet<T extends object, V>(
|
||||
receiver: T,
|
||||
state: { has(o: T): boolean },
|
||||
kind: "a",
|
||||
f: () => V
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Emulates evaluating a private static "get" accessor.
|
||||
*
|
||||
* @param receiver The object on which to evaluate the private static "get" accessor.
|
||||
* @param state The class constructor containing the definition of the static "get" accessor.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
* @param f The "get" accessor function to evaluate.
|
||||
*
|
||||
* @throws {TypeError} If `receiver` is not `state`.
|
||||
*/
|
||||
export declare function __classPrivateFieldGet<T extends new (...args: any[]) => unknown, V>(
|
||||
receiver: T,
|
||||
state: T,
|
||||
kind: "a",
|
||||
f: () => V
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Emulates reading a private instance method.
|
||||
*
|
||||
* @param receiver The instance from which to read a private method.
|
||||
* @param state A WeakSet used to verify an instance supports the private method.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
* @param f The function to return as the private instance method.
|
||||
*
|
||||
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
|
||||
*/
|
||||
export declare function __classPrivateFieldGet<T extends object, V extends (...args: any[]) => unknown>(
|
||||
receiver: T,
|
||||
state: { has(o: T): boolean },
|
||||
kind: "m",
|
||||
f: V
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Emulates reading a private static method.
|
||||
*
|
||||
* @param receiver The object from which to read the private static method.
|
||||
* @param state The class constructor containing the definition of the static method.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
* @param f The function to return as the private static method.
|
||||
*
|
||||
* @throws {TypeError} If `receiver` is not `state`.
|
||||
*/
|
||||
export declare function __classPrivateFieldGet<T extends new (...args: any[]) => unknown, V extends (...args: any[]) => unknown>(
|
||||
receiver: T,
|
||||
state: T,
|
||||
kind: "m",
|
||||
f: V
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Emulates writing to a private instance field.
|
||||
*
|
||||
* @param receiver The instance on which to set a private field value.
|
||||
* @param state A WeakMap used to store the private field value for an instance.
|
||||
* @param value The value to store in the private field.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
*
|
||||
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
|
||||
*/
|
||||
export declare function __classPrivateFieldSet<T extends object, V>(
|
||||
receiver: T,
|
||||
state: { has(o: T): boolean, set(o: T, value: V): unknown },
|
||||
value: V,
|
||||
kind?: "f"
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Emulates writing to a private static field.
|
||||
*
|
||||
* @param receiver The object on which to set the private static field.
|
||||
* @param state The class constructor containing the definition of the private static field.
|
||||
* @param value The value to store in the private field.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
* @param f The descriptor that holds the static field value.
|
||||
*
|
||||
* @throws {TypeError} If `receiver` is not `state`.
|
||||
*/
|
||||
export declare function __classPrivateFieldSet<T extends new (...args: any[]) => unknown, V>(
|
||||
receiver: T,
|
||||
state: T,
|
||||
value: V,
|
||||
kind: "f",
|
||||
f: { value: V }
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Emulates writing to a private instance "set" accessor.
|
||||
*
|
||||
* @param receiver The instance on which to evaluate the private instance "set" accessor.
|
||||
* @param state A WeakSet used to verify an instance supports the private "set" accessor.
|
||||
* @param value The value to store in the private accessor.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
* @param f The "set" accessor function to evaluate.
|
||||
*
|
||||
* @throws {TypeError} If `state` doesn't have an entry for `receiver`.
|
||||
*/
|
||||
export declare function __classPrivateFieldSet<T extends object, V>(
|
||||
receiver: T,
|
||||
state: { has(o: T): boolean },
|
||||
value: V,
|
||||
kind: "a",
|
||||
f: (v: V) => void
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Emulates writing to a private static "set" accessor.
|
||||
*
|
||||
* @param receiver The object on which to evaluate the private static "set" accessor.
|
||||
* @param state The class constructor containing the definition of the static "set" accessor.
|
||||
* @param value The value to store in the private field.
|
||||
* @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method.
|
||||
* @param f The "set" accessor function to evaluate.
|
||||
*
|
||||
* @throws {TypeError} If `receiver` is not `state`.
|
||||
*/
|
||||
export declare function __classPrivateFieldSet<T extends new (...args: any[]) => unknown, V>(
|
||||
receiver: T,
|
||||
state: T,
|
||||
value: V,
|
||||
kind: "a",
|
||||
f: (v: V) => void
|
||||
): V;
|
||||
|
||||
/**
|
||||
* Checks for the existence of a private field/method/accessor.
|
||||
*
|
||||
* @param state The class constructor containing the static member, or the WeakMap or WeakSet associated with a private instance member.
|
||||
* @param receiver The object for which to test the presence of the private member.
|
||||
*/
|
||||
export declare function __classPrivateFieldIn(
|
||||
state: (new (...args: any[]) => unknown) | { has(o: any): boolean },
|
||||
receiver: unknown,
|
||||
): boolean;
|
||||
|
||||
/**
|
||||
* Creates a re-export binding on `object` with key `objectKey` that references `target[key]`.
|
||||
*
|
||||
* @param object The local `exports` object.
|
||||
* @param target The object to re-export from.
|
||||
* @param key The property key of `target` to re-export.
|
||||
* @param objectKey The property key to re-export as. Defaults to `key`.
|
||||
*/
|
||||
export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void;
|
||||
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
const debug_1 = __importDefault(require("debug"));
|
||||
const url_1 = require("url");
|
||||
// Built-in protocols
|
||||
const data_1 = __importDefault(require("./data"));
|
||||
const file_1 = __importDefault(require("./file"));
|
||||
const ftp_1 = __importDefault(require("./ftp"));
|
||||
const http_1 = __importDefault(require("./http"));
|
||||
const https_1 = __importDefault(require("./https"));
|
||||
const debug = debug_1.default('get-uri');
|
||||
function getUri(uri, opts, fn) {
|
||||
const p = new Promise((resolve, reject) => {
|
||||
debug('getUri(%o)', uri);
|
||||
if (typeof opts === 'function') {
|
||||
fn = opts;
|
||||
opts = undefined;
|
||||
}
|
||||
if (!uri) {
|
||||
reject(new TypeError('Must pass in a URI to "get"'));
|
||||
return;
|
||||
}
|
||||
const parsed = url_1.parse(uri);
|
||||
// Strip trailing `:`
|
||||
const protocol = (parsed.protocol || '').replace(/:$/, '');
|
||||
if (!protocol) {
|
||||
reject(new TypeError(`URI does not contain a protocol: ${uri}`));
|
||||
return;
|
||||
}
|
||||
const getter = getUri.protocols[protocol];
|
||||
if (typeof getter !== 'function') {
|
||||
throw new TypeError(`Unsupported protocol "${protocol}" specified in URI: ${uri}`);
|
||||
}
|
||||
resolve(getter(parsed, opts || {}));
|
||||
});
|
||||
if (typeof fn === 'function') {
|
||||
p.then(rtn => fn(null, rtn), err => fn(err));
|
||||
}
|
||||
else {
|
||||
return p;
|
||||
}
|
||||
}
|
||||
(function (getUri) {
|
||||
getUri.protocols = {
|
||||
data: data_1.default,
|
||||
file: file_1.default,
|
||||
ftp: ftp_1.default,
|
||||
http: http_1.default,
|
||||
https: https_1.default
|
||||
};
|
||||
})(getUri || (getUri = {}));
|
||||
module.exports = getUri;
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -0,0 +1,32 @@
|
||||
export function parseCommand(cmd) {
|
||||
const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' ');
|
||||
const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/);
|
||||
const bregex = /\.*[\][<>]/g;
|
||||
const firstCommand = splitCommand.shift();
|
||||
if (!firstCommand)
|
||||
throw new Error(`No command found in: ${cmd}`);
|
||||
const parsedCommand = {
|
||||
cmd: firstCommand.replace(bregex, ''),
|
||||
demanded: [],
|
||||
optional: [],
|
||||
};
|
||||
splitCommand.forEach((cmd, i) => {
|
||||
let variadic = false;
|
||||
cmd = cmd.replace(/\s/g, '');
|
||||
if (/\.+[\]>]/.test(cmd) && i === splitCommand.length - 1)
|
||||
variadic = true;
|
||||
if (/^\[/.test(cmd)) {
|
||||
parsedCommand.optional.push({
|
||||
cmd: cmd.replace(bregex, '').split('|'),
|
||||
variadic,
|
||||
});
|
||||
}
|
||||
else {
|
||||
parsedCommand.demanded.push({
|
||||
cmd: cmd.replace(bregex, '').split('|'),
|
||||
variadic,
|
||||
});
|
||||
}
|
||||
});
|
||||
return parsedCommand;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import resolveConfigObjects from '../util/resolveConfig'
|
||||
import getAllConfigs from '../util/getAllConfigs'
|
||||
|
||||
export default function resolveConfig(...configs) {
|
||||
let [, ...defaultConfigs] = getAllConfigs(configs[0])
|
||||
return resolveConfigObjects([...configs, ...defaultConfigs])
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
let flexSpec = require('./flex-spec')
|
||||
let Declaration = require('../declaration')
|
||||
|
||||
class Flex extends Declaration {
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
normalize() {
|
||||
return 'flex'
|
||||
}
|
||||
|
||||
/**
|
||||
* Return flex property for 2009 and 2012 specs
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
let spec
|
||||
;[spec, prefix] = flexSpec(prefix)
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-flex'
|
||||
}
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-positive'
|
||||
}
|
||||
return super.prefixed(prop, prefix)
|
||||
}
|
||||
}
|
||||
|
||||
Flex.names = ['flex-grow', 'flex-positive']
|
||||
|
||||
module.exports = Flex
|
||||
@@ -0,0 +1,6 @@
|
||||
import { reduce } from './reduce';
|
||||
import { isFunction } from '../util/isFunction';
|
||||
export function min(comparer) {
|
||||
return reduce(isFunction(comparer) ? function (x, y) { return (comparer(x, y) < 0 ? x : y); } : function (x, y) { return (x < y ? x : y); });
|
||||
}
|
||||
//# sourceMappingURL=min.js.map
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"name": "localforage",
|
||||
"author": "Mozilla",
|
||||
"license": "Apache-2.0",
|
||||
"description": "Offline storage, improved.",
|
||||
"keywords": [
|
||||
"indexeddb",
|
||||
"localstorage",
|
||||
"storage",
|
||||
"websql"
|
||||
],
|
||||
"version": "1.10.0",
|
||||
"homepage": "https://github.com/localForage/localForage",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/localForage/localForage.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node -e \"require('grunt').cli()\" null build",
|
||||
"prettify": "prettier --write \"src/**/*.js\" \"test/**/*.js\"",
|
||||
"publish-docs": "node -e \"require('grunt').cli()\" null copy build-rules-html publish-rules",
|
||||
"serve": "node -e \"require('grunt').cli()\" null serve",
|
||||
"test": "node -e \"require('grunt').cli()\" null test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.5.1",
|
||||
"babel-eslint": "^7.2.3",
|
||||
"babel-loader": "^6.2.2",
|
||||
"babel-plugin-add-module-exports": "^0.1.2",
|
||||
"babel-plugin-transform-es2015-modules-umd": "^6.5.0",
|
||||
"babel-preset-es2015": "^6.6.0",
|
||||
"babel-preset-es2015-loose": "^7.0.0",
|
||||
"babelify": "^7.2.0",
|
||||
"browserify-derequire": "^0.9.4",
|
||||
"bundle-collapser": "^1.2.1",
|
||||
"cors": "^2.3.1",
|
||||
"eslint-config-prettier": "^2.9.0",
|
||||
"grunt": "^0.4.2",
|
||||
"grunt-babel": "^6.0.0",
|
||||
"grunt-browserify": "^3.8.0",
|
||||
"grunt-contrib-concat": "^0.3.0",
|
||||
"grunt-contrib-connect": "^0.8.0",
|
||||
"grunt-contrib-uglify": "^0.4.0",
|
||||
"grunt-contrib-watch": "^0.5.0",
|
||||
"grunt-es3-safe-recast": "^0.1.0",
|
||||
"grunt-eslint": "^20.0.0",
|
||||
"mocha-headless-chrome": "3.1.0",
|
||||
"grunt-rollup": "^0.6.2",
|
||||
"grunt-run": "^0.5.2",
|
||||
"grunt-saucelabs": "^5.1.2",
|
||||
"grunt-ts": "^6.0.0-beta.11",
|
||||
"grunt-webpack": "^1.0.11",
|
||||
"husky": "^2.3.0",
|
||||
"lint-staged": "^8.1.7",
|
||||
"load-grunt-tasks": "^0.4.0",
|
||||
"mocha": "^3.4.2",
|
||||
"prettier": "~1.12.0",
|
||||
"rollupify": "^0.1.0",
|
||||
"script-loader": "^0.6.1",
|
||||
"typescript": "^2.0.3",
|
||||
"uglify-js": "^2.3.x",
|
||||
"webpack": "^1.12.13",
|
||||
"webpack-dev-server": "^1.10.1"
|
||||
},
|
||||
"main": "dist/localforage.js",
|
||||
"typings": "typings/localforage.d.ts",
|
||||
"bugs": {
|
||||
"url": "http://github.com/localForage/localForage/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"lie": "3.1.1"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import {DelimiterCase} from './delimiter-case';
|
||||
|
||||
/**
|
||||
Convert object properties to delimiter case but not recursively.
|
||||
|
||||
This can be useful when, for example, converting some API types from a different style.
|
||||
|
||||
@see DelimiterCase
|
||||
@see DelimiterCasedPropertiesDeep
|
||||
|
||||
@example
|
||||
```
|
||||
interface User {
|
||||
userId: number;
|
||||
userName: string;
|
||||
}
|
||||
|
||||
const result: DelimiterCasedProperties<User, '-'> = {
|
||||
'user-id': 1,
|
||||
'user-name': 'Tom',
|
||||
};
|
||||
```
|
||||
|
||||
@category Template Literals
|
||||
*/
|
||||
export type DelimiterCasedProperties<
|
||||
Value,
|
||||
Delimiter extends string
|
||||
> = Value extends Function
|
||||
? Value
|
||||
: Value extends Array<infer U>
|
||||
? Value
|
||||
: { [K in keyof Value as DelimiterCase<K, Delimiter>]: Value[K] };
|
||||
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"name": "lines-and-columns",
|
||||
"version": "1.2.4",
|
||||
"description": "Maps lines and columns to character offsets and back.",
|
||||
"keywords": [
|
||||
"lines",
|
||||
"columns",
|
||||
"parser"
|
||||
],
|
||||
"homepage": "https://github.com/eventualbuddha/lines-and-columns#readme",
|
||||
"bugs": {
|
||||
"url": "https://github.com/eventualbuddha/lines-and-columns/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/eventualbuddha/lines-and-columns.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": "Brian Donovan <brian@donovans.cc>",
|
||||
"main": "./build/index.js",
|
||||
"types": "./build/index.d.ts",
|
||||
"files": [
|
||||
"build"
|
||||
],
|
||||
"scripts": {
|
||||
"build:watch": "tsc --build tsconfig.build.json --watch",
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"test": "is-ci test:coverage test:watch",
|
||||
"test:coverage": "jest --coverage",
|
||||
"test:watch": "jest --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^27.0.3",
|
||||
"@types/node": "^16.11.9",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
"esbuild": "^0.13.15",
|
||||
"esbuild-runner": "^2.2.1",
|
||||
"eslint": "^8.2.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"is-ci-cli": "^2.2.0",
|
||||
"jest": "^27.3.1",
|
||||
"prettier": "^2.4.1",
|
||||
"semantic-release": "^18.0.0",
|
||||
"typescript": "^4.5.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"F A B","2":"J D E CC"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"DC tB I v J D E F A B C K L G M N O w g EC FC","4":"0 1 2 3 4 5 6 7 8 9 x y z AB"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"1":"I v J D E F A B C K L G zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"HC"},F:{"1":"1 2 3 4 5 6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"0 F B C G M N O w g x y z PC QC RC SC qB AC TC rB"},G:{"1":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"1":"f tC uC","4":"tB I pC qC sC BC","132":"rC"},J:{"1":"D A"},K:{"1":"B C h qB AC rB","2":"A"},L:{"1":"H"},M:{"260":"H"},N:{"1":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:6,C:"MPEG-4/H.264 video format"};
|
||||
@@ -0,0 +1,96 @@
|
||||
marked(1) General Commands Manual marked(1)
|
||||
|
||||
NAME
|
||||
marked - a javascript markdown parser
|
||||
|
||||
SYNOPSIS
|
||||
marked [-o <output>] [-i <input>] [--help] [--tokens] [--pedantic]
|
||||
[--gfm] [--breaks] [--sanitize] [--smart-lists] [--lang-prefix <pre-
|
||||
fix>] [--no-etc...] [--silent] [filename]
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
marked is a full-featured javascript markdown parser, built for speed.
|
||||
It also includes multiple GFM features.
|
||||
|
||||
EXAMPLES
|
||||
cat in.md | marked > out.html
|
||||
|
||||
echo "hello *world*" | marked
|
||||
|
||||
marked -o out.html -i in.md --gfm
|
||||
|
||||
marked --output="hello world.html" -i in.md --no-breaks
|
||||
|
||||
OPTIONS
|
||||
-o, --output [output]
|
||||
Specify file output. If none is specified, write to stdout.
|
||||
|
||||
-i, --input [input]
|
||||
Specify file input, otherwise use last argument as input file.
|
||||
If no input file is specified, read from stdin.
|
||||
|
||||
--test Makes sure the test(s) pass.
|
||||
|
||||
--glob [file] Specify which test to use.
|
||||
|
||||
--fix Fixes tests.
|
||||
|
||||
--bench Benchmarks the test(s).
|
||||
|
||||
--time Times The test(s).
|
||||
|
||||
--minified Runs test file(s) as minified.
|
||||
|
||||
--stop Stop process if a test fails.
|
||||
|
||||
-t, --tokens
|
||||
Output a token stream instead of html.
|
||||
|
||||
--pedantic
|
||||
Conform to obscure parts of markdown.pl as much as possible.
|
||||
Don't fix original markdown bugs.
|
||||
|
||||
--gfm Enable github flavored markdown.
|
||||
|
||||
--breaks
|
||||
Enable GFM line breaks. Only works with the gfm option.
|
||||
|
||||
--sanitize
|
||||
Sanitize output. Ignore any HTML input.
|
||||
|
||||
--smart-lists
|
||||
Use smarter list behavior than the original markdown.
|
||||
|
||||
--lang-prefix [prefix]
|
||||
Set the prefix for code block classes.
|
||||
|
||||
--mangle
|
||||
Mangle email addresses.
|
||||
|
||||
--no-sanitize, -no-etc...
|
||||
The inverse of any of the marked options above.
|
||||
|
||||
--silent
|
||||
Silence error output.
|
||||
|
||||
-h, --help
|
||||
Display help information.
|
||||
|
||||
CONFIGURATION
|
||||
For configuring and running programmatically.
|
||||
|
||||
Example
|
||||
|
||||
require('marked')('*foo*', { gfm: true });
|
||||
|
||||
BUGS
|
||||
Please report any bugs to https://github.com/markedjs/marked.
|
||||
|
||||
LICENSE
|
||||
Copyright (c) 2011-2014, Christopher Jeffrey (MIT License).
|
||||
|
||||
SEE ALSO
|
||||
markdown(1), node.js(1)
|
||||
|
||||
marked(1)
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"timeInterval.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeInterval.ts"],"names":[],"mappings":";;;AAAA,4CAAoD;AAEpD,qCAAuC;AACvC,2DAAgE;AAyChE,SAAgB,YAAY,CAAI,SAAyC;IAAzC,0BAAA,EAAA,YAA2B,sBAAc;IACvE,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;QAC3B,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAM,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAC5B,IAAM,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC;YAC5B,IAAI,GAAG,GAAG,CAAC;YACX,UAAU,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;QACrD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAZD,oCAYC;AAKD;IAIE,sBAAmB,KAAQ,EAAS,QAAgB;QAAjC,UAAK,GAAL,KAAK,CAAG;QAAS,aAAQ,GAAR,QAAQ,CAAQ;IAAG,CAAC;IAC1D,mBAAC;AAAD,CAAC,AALD,IAKC;AALY,oCAAY"}
|
||||
@@ -0,0 +1,21 @@
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.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.
|
||||
@@ -0,0 +1,25 @@
|
||||
'use strict';
|
||||
|
||||
var callBind = require('call-bind');
|
||||
var define = require('define-properties');
|
||||
|
||||
var requirePromise = require('./requirePromise');
|
||||
var implementation = require('./implementation');
|
||||
var getPolyfill = require('./polyfill');
|
||||
var shim = require('./shim');
|
||||
|
||||
requirePromise();
|
||||
var bound = callBind(getPolyfill());
|
||||
|
||||
var rebindable = function allSettled(iterable) {
|
||||
// eslint-disable-next-line no-invalid-this
|
||||
return bound(typeof this === 'undefined' ? Promise : this, iterable);
|
||||
};
|
||||
|
||||
define(rebindable, {
|
||||
getPolyfill: getPolyfill,
|
||||
implementation: implementation,
|
||||
shim: shim
|
||||
});
|
||||
|
||||
module.exports = rebindable;
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Type annotation defs shared between Flow and TypeScript.
|
||||
* These defs could not be defined in ./flow.ts or ./typescript.ts directly
|
||||
* because they use the same name.
|
||||
*/
|
||||
import { Fork } from "../types";
|
||||
export default function (fork: Fork): void;
|
||||
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = require("./_iterate")("some", false);
|
||||
@@ -0,0 +1,36 @@
|
||||
/* jscs:disable requireUseStrict */
|
||||
/* eslint strict: 0, max-statements: 0 */
|
||||
|
||||
module.exports = function (theGlobal, t) {
|
||||
t.equal(typeof theGlobal, 'object', 'is an object');
|
||||
|
||||
t.test('built-in globals', function (st) {
|
||||
st.equal(theGlobal.Math, Math, 'Math is on the global');
|
||||
st.equal(theGlobal.JSON, JSON, 'JSON is on the global');
|
||||
st.equal(theGlobal.String, String, 'String is on the global');
|
||||
st.equal(theGlobal.Array, Array, 'Array is on the global');
|
||||
st.equal(theGlobal.Number, Number, 'Number is on the global');
|
||||
st.equal(theGlobal.Boolean, Boolean, 'Boolean is on the global');
|
||||
st.equal(theGlobal.Object, Object, 'Object is on the global');
|
||||
st.equal(theGlobal.Function, Function, 'Function is on the global');
|
||||
st.equal(theGlobal.Date, Date, 'Date is on the global');
|
||||
st.equal(theGlobal.RegExp, RegExp, 'RegExp is on the global');
|
||||
|
||||
if (typeof Symbol === 'undefined') {
|
||||
st.comment('# SKIP Symbol is not supported');
|
||||
} else {
|
||||
st.equal(theGlobal.Symbol, Symbol, 'Symbol is on the global');
|
||||
}
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('custom property', function (st) {
|
||||
var key = 'random_custom_key_' + new Date().getTime();
|
||||
var semaphore = {};
|
||||
/* eslint no-eval: 1 */
|
||||
eval(key + ' = semaphore;');
|
||||
st.equal(theGlobal[key], semaphore, 'global variable ends up on the global object');
|
||||
delete theGlobal[key]; // eslint-disable-line no-param-reassign
|
||||
st.end();
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/audit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CA2C1G"}
|
||||
@@ -0,0 +1,79 @@
|
||||
let Declaration = require('../declaration')
|
||||
|
||||
class TransformDecl extends Declaration {
|
||||
/**
|
||||
* Recursively check all parents for @keyframes
|
||||
*/
|
||||
keyframeParents(decl) {
|
||||
let { parent } = decl
|
||||
while (parent) {
|
||||
if (parent.type === 'atrule' && parent.name === 'keyframes') {
|
||||
return true
|
||||
}
|
||||
;({ parent } = parent)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* Is transform contain 3D commands
|
||||
*/
|
||||
contain3d(decl) {
|
||||
if (decl.prop === 'transform-origin') {
|
||||
return false
|
||||
}
|
||||
|
||||
for (let func of TransformDecl.functions3d) {
|
||||
if (decl.value.includes(`${func}(`)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace rotateZ to rotate for IE 9
|
||||
*/
|
||||
set(decl, prefix) {
|
||||
decl = super.set(decl, prefix)
|
||||
if (prefix === '-ms-') {
|
||||
decl.value = decl.value.replace(/rotatez/gi, 'rotate')
|
||||
}
|
||||
return decl
|
||||
}
|
||||
|
||||
/**
|
||||
* Don't add prefix for IE in keyframes
|
||||
*/
|
||||
insert(decl, prefix, prefixes) {
|
||||
if (prefix === '-ms-') {
|
||||
if (!this.contain3d(decl) && !this.keyframeParents(decl)) {
|
||||
return super.insert(decl, prefix, prefixes)
|
||||
}
|
||||
} else if (prefix === '-o-') {
|
||||
if (!this.contain3d(decl)) {
|
||||
return super.insert(decl, prefix, prefixes)
|
||||
}
|
||||
} else {
|
||||
return super.insert(decl, prefix, prefixes)
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
TransformDecl.names = ['transform', 'transform-origin']
|
||||
|
||||
TransformDecl.functions3d = [
|
||||
'matrix3d',
|
||||
'translate3d',
|
||||
'translateZ',
|
||||
'scale3d',
|
||||
'scaleZ',
|
||||
'rotate3d',
|
||||
'rotateX',
|
||||
'rotateY',
|
||||
'perspective'
|
||||
]
|
||||
|
||||
module.exports = TransformDecl
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"dateTimestampProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/dateTimestampProvider.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,IAAM,qBAAqB,GAA0B;IAC1D,GAAG;QAGD,OAAO,CAAC,qBAAqB,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;IACxD,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"2":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB EC FC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"1":"J D E F A B C K L G JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I HC zB","129":"v IC"},F:{"2":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e PC QC RC SC qB AC TC rB"},G:{"1":"E VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"zB UC BC"},H:{"2":"oC"},I:{"2":"tB I f pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"2":"A B C h qB AC rB"},L:{"2":"H"},M:{"2":"H"},N:{"2":"A B"},O:{"2":"vC"},P:{"2":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"2":"1B"},R:{"2":"9C"},S:{"2":"AD BD"}},B:6,C:"JPEG 2000 image format"};
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H","2":"C K L G M N O"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"DC tB I v EC FC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"I v"},E:{"1":"v J D E F A B C K L G IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I HC zB"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e qB AC TC rB","4":"F PC QC RC SC"},G:{"1":"E UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"zB"},H:{"2":"oC"},I:{"1":"f tC uC","2":"tB I pC qC rC sC BC"},J:{"1":"D A"},K:{"1":"C h qB AC rB","4":"A B"},L:{"1":"H"},M:{"1":"H"},N:{"2":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:1,C:"Server-sent events"};
|
||||
@@ -0,0 +1,4 @@
|
||||
import Node from './shared/Node';
|
||||
export default class Options extends Node {
|
||||
type: 'Options';
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"git-up","version":"7.0.0","files":{"lib/index.js":{"checkedAt":1678883670748,"integrity":"sha512-2K25HEts0n+4nUBU8gWd6OFVQ1HGv8CXrF0lciCLc7AnRNxGZ4tWiqmKdSro3FNjCtiWTaMce/T4m6U81TkPRw==","mode":420,"size":1499},"package.json":{"checkedAt":1678883670748,"integrity":"sha512-+bAsVbZS8nqKJ5O8mG51YO7XMWiG5R9oVgnww0lPzkWvB3fYZ5ylpP+L7kqb7yb9eJ6pFRCfJNrVgHf6elfgGw==","mode":420,"size":981},"LICENSE":{"checkedAt":1678883670748,"integrity":"sha512-yEG/RgRB4Oj58Hodk3CbrvBh7dgBj3mxnLY8c7eR2EkLfOdg1h9IWvXfyQoc8K+IUpu1F6tJP6hou/A+wZg4Nw==","mode":420,"size":1134},"README.md":{"checkedAt":1678883670748,"integrity":"sha512-+miGl87nlVZ+3vVCX/qYjIOZRcG7Uy7eKHUz6uusm75vnJV69AT768w114BvmbeUOToaijbTYMPCGuicCyR/Fw==","mode":420,"size":7327}}}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H","2":"C K L G M N O"},C:{"1":"PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB EC FC"},D:{"1":"aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB","194":"SB TB UB VB WB XB YB uB ZB vB"},E:{"1":"A B C K L G 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v J D E F HC zB IC JC KC LC"},F:{"1":"SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB PC QC RC SC qB AC TC rB","194":"FB GB HB IB JB KB LB MB NB OB PB QB RB"},G:{"1":"bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"E zB UC BC VC WC XC YC ZC aC"},H:{"2":"oC"},I:{"1":"f","2":"tB I pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"2":"A B"},O:{"1":"vC"},P:{"1":"g zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C","2":"I","194":"wC xC yC"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"BD","2":"AD"}},B:4,C:"#rrggbbaa hex color notation"};
|
||||
@@ -0,0 +1,30 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var $hasInstance = GetIntrinsic('Symbol.hasInstance', true);
|
||||
|
||||
var Call = require('./Call');
|
||||
var GetMethod = require('./GetMethod');
|
||||
var IsCallable = require('./IsCallable');
|
||||
var OrdinaryHasInstance = require('./OrdinaryHasInstance');
|
||||
var ToBoolean = require('./ToBoolean');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-instanceofoperator
|
||||
|
||||
module.exports = function InstanceofOperator(O, C) {
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
||||
}
|
||||
var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0;
|
||||
if (typeof instOfHandler !== 'undefined') {
|
||||
return ToBoolean(Call(instOfHandler, C, [O]));
|
||||
}
|
||||
if (!IsCallable(C)) {
|
||||
throw new $TypeError('`C` is not Callable');
|
||||
}
|
||||
return OrdinaryHasInstance(C, O);
|
||||
};
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"author": "Ben Newman <bn@cs.stanford.edu>",
|
||||
"name": "ast-types",
|
||||
"version": "0.13.4",
|
||||
"description": "Esprima-compatible implementation of the Mozilla JS Parser API",
|
||||
"keywords": [
|
||||
"ast",
|
||||
"abstract syntax tree",
|
||||
"hierarchy",
|
||||
"mozilla",
|
||||
"spidermonkey",
|
||||
"parser api",
|
||||
"esprima",
|
||||
"types",
|
||||
"type system",
|
||||
"type checking",
|
||||
"dynamic types",
|
||||
"parsing",
|
||||
"transformation",
|
||||
"syntax"
|
||||
],
|
||||
"homepage": "http://github.com/benjamn/ast-types",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/benjamn/ast-types.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "main.js",
|
||||
"types": "main.d.ts",
|
||||
"scripts": {
|
||||
"gen": "ts-node --transpile-only script/gen-types.ts",
|
||||
"mocha": "test/run.sh",
|
||||
"test": "npm run gen && npm run build && npm run mocha",
|
||||
"clean": "ts-emit-clean",
|
||||
"build": "tsc && ts-add-module-exports",
|
||||
"prepack": "npm run clean && npm run gen && npm run build",
|
||||
"postpack": "npm run clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "^2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/parser": "7.7.7",
|
||||
"@babel/types": "7.4.4",
|
||||
"@types/esprima": "4.0.2",
|
||||
"@types/glob": "7.1.1",
|
||||
"@types/mocha": "5.2.6",
|
||||
"@types/node": "12.0.0",
|
||||
"espree": "7.3.0",
|
||||
"esprima": "4.0.1",
|
||||
"esprima-fb": "15001.1001.0-dev-harmony-fb",
|
||||
"flow-parser": "0.132.0",
|
||||
"glob": "7.1.6",
|
||||
"mocha": "6.1.4",
|
||||
"recast": "0.20.0",
|
||||
"reify": "0.20.12",
|
||||
"ts-add-module-exports": "1.0.0",
|
||||
"ts-emit-clean": "1.0.0",
|
||||
"ts-node": "7.0.1",
|
||||
"typescript": "3.9.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"fs.realpath","version":"1.0.0","files":{"package.json":{"checkedAt":1678883672388,"integrity":"sha512-qjopXwuAkSXmRbhePYoJ699X+KvZvFiWZ4kMh+waygoo9E3snQPLKIOTQPHAT9xW4Vm0WJI2sZreQ8e8e/av0g==","mode":420,"size":577},"README.md":{"checkedAt":1678883672388,"integrity":"sha512-gim4VCm0ZJcWDglb/bR+JbNWPxUX9kYAQWVxtW2ReSR+ZH5OGccMPel2P2X/Plxw0ZCFl8ujq5/49rL+36veMw==","mode":420,"size":881},"index.js":{"checkedAt":1678883672388,"integrity":"sha512-pe77vGFN9Zx+9UBqAtBXzByU21LXJ9WvoBQU3U5+R42JwKHQhKwNUfWzG5DIAuXJdmTkUQXvlTQcZnTw2T55lQ==","mode":420,"size":1308},"LICENSE":{"checkedAt":1678883672388,"integrity":"sha512-T1quzvKUZe1S7e/hdNInL9xg8DaPWYX5091ArZBoamDzVjvPMgcHBgqsvV+uXVJxJVSI7Ecxfq4eg5BcuCtN3Q==","mode":420,"size":2125},"old.js":{"checkedAt":1678883672397,"integrity":"sha512-rXkLIyfeCrDa37gvy32O7CxqoDHVtiCM/ecAQfW1xuY31AlvjJj/IUbyjX2Hg8q1n6GL4ERzNpToGRMkA9isVw==","mode":420,"size":8542}}}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0.02191,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0.01096,"53":0,"54":0,"55":0.00548,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0.00548,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.02191,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0.00548,"89":0.00548,"90":0.00548,"91":0.01096,"92":0.00548,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0.00548,"102":0.02191,"103":0.00548,"104":0.00548,"105":0.00548,"106":0.00548,"107":0.01096,"108":0.02739,"109":0.52041,"110":0.33964,"111":0,"112":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0.00548,"23":0,"24":0,"25":0,"26":0.00548,"27":0,"28":0,"29":0,"30":0.00548,"31":0,"32":0,"33":0,"34":0.05478,"35":0,"36":0,"37":0,"38":0.12599,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0.00548,"49":0.04382,"50":0,"51":0,"52":0,"53":0.03835,"54":0,"55":0.01643,"56":0.00548,"57":0.00548,"58":0,"59":0,"60":0,"61":0.02739,"62":0.00548,"63":0.01096,"64":0,"65":0.00548,"66":0,"67":0.01096,"68":0.00548,"69":0.01096,"70":0.01096,"71":0.00548,"72":0.00548,"73":0.00548,"74":0.01643,"75":0.01096,"76":0.00548,"77":0.00548,"78":0.02739,"79":0.52589,"80":0.02191,"81":0.02739,"83":0.05478,"84":0.01096,"85":0.01643,"86":0.04382,"87":0.13147,"88":0.00548,"89":0.01643,"90":0.01096,"91":0.03287,"92":0.08765,"93":0.01643,"94":0.0986,"95":0.02191,"96":0.03835,"97":0.08217,"98":0.06574,"99":0.06026,"100":0.06574,"101":0.05478,"102":0.0493,"103":0.20269,"104":0.08217,"105":0.12052,"106":0.12052,"107":0.20269,"108":0.66832,"109":8.73741,"110":5.39583,"111":0.01096,"112":0.01096,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0.01096,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0.02191,"37":0,"38":0,"39":0,"40":0.00548,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0.06574,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0.00548,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0.00548,"94":0.07121,"95":0.05478,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0,"15":0,"16":0,"17":0.00548,"18":0.01096,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0.00548,"103":0.00548,"104":0.00548,"105":0.00548,"106":0.01096,"107":0.02739,"108":0.09313,"109":1.19968,"110":1.64888},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0.00548,"13":0.03835,"14":0.15886,"15":0.04382,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0.00548,"12.1":0.02739,"13.1":0.11504,"14.1":0.3232,"15.1":0.04382,"15.2-15.3":0.0493,"15.4":0.16982,"15.5":0.27938,"15.6":1.33663,"16.0":0.08217,"16.1":0.2739,"16.2":1.05725,"16.3":0.56423,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.0063,"5.0-5.1":0.02837,"6.0-6.1":0.01891,"7.0-7.1":0.05043,"8.1-8.4":0.04097,"9.0-9.2":0.01576,"9.3":0.31203,"10.0-10.2":0.0063,"10.3":0.19226,"11.0-11.2":0.03467,"11.3-11.4":0.04097,"12.0-12.1":0.05988,"12.2-12.5":0.99912,"13.0-13.1":0.03467,"13.2":0.01261,"13.3":0.07249,"13.4-13.7":0.19226,"14.0-14.4":0.59884,"14.5-14.8":0.99597,"15.0-15.1":0.36561,"15.2-15.3":0.42234,"15.4":0.75328,"15.5":0.89826,"15.6":3.57414,"16.0":2.39537,"16.1":6.7354,"16.2":7.1735,"16.3":3.72543,"16.4":0.00946},P:{"4":1.22215,"20":2.14412,"5.0-5.4":0.07504,"6.2-6.4":0.01072,"7.2-7.4":0.01072,"8.2":0.01072,"9.2":0.03216,"10.1":0,"11.1-11.2":0.02144,"12.0":0.01072,"13.0":0.08576,"14.0":0.03216,"15.0":0.02144,"16.0":0.06432,"17.0":0.13937,"18.0":0.15009,"19.0":2.93745},I:{"0":0,"3":0,"4":0.01504,"2.1":0,"2.2":0,"2.3":0,"4.1":0.01504,"4.2-4.3":0.01203,"4.4":0,"4.4.3-4.4.4":0.0872},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0.1579,"10":0,"11":0.37895,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.33915},H:{"0":0.08562},L:{"0":30.86074},R:{_:"0"},M:{"0":0.21253},Q:{"13.1":0.0814}};
|
||||
@@ -0,0 +1,25 @@
|
||||
var before = require('./before');
|
||||
|
||||
/**
|
||||
* Creates a function that is restricted to invoking `func` once. Repeat calls
|
||||
* to the function return the value of the first invocation. The `func` is
|
||||
* invoked with the `this` binding and arguments of the created function.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Function
|
||||
* @param {Function} func The function to restrict.
|
||||
* @returns {Function} Returns the new restricted function.
|
||||
* @example
|
||||
*
|
||||
* var initialize = _.once(createApplication);
|
||||
* initialize();
|
||||
* initialize();
|
||||
* // => `createApplication` is invoked once
|
||||
*/
|
||||
function once(func) {
|
||||
return before(2, func);
|
||||
}
|
||||
|
||||
module.exports = once;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ColdObservable.d.ts","sourceRoot":"","sources":["../../../../src/internal/testing/ColdObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,qBAAa,cAAc,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAE,YAAW,oBAAoB;IAQ/D,QAAQ,EAAE,WAAW,EAAE;IAPnC,aAAa,EAAE,eAAe,EAAE,CAAM;IAC7C,SAAS,EAAE,SAAS,CAAC;IAErB,kBAAkB,EAAE,MAAM,MAAM,CAAC;IAEjC,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;gBAE3B,QAAQ,EAAE,WAAW,EAAE,EAAE,SAAS,EAAE,SAAS;IAgBhE,gBAAgB,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC;CAgB7C"}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"acorn-walk","version":"7.2.0","files":{"LICENSE":{"checkedAt":1678883672885,"integrity":"sha512-CJv1VH6Ge+SwmvuhzbKkpt9RWAypK/qUUt9yyfuweBjifvKydRN/MXo0/OVi21oca2MiXDshz0V2dK1G9JIcng==","mode":420,"size":1086},"dist/walk.js":{"checkedAt":1678883672886,"integrity":"sha512-j5XDYQOKluxz1i4c7YMMXvjLLw38YFu12kKGYlr2+w/XZLV5Vg2R/VUbhN//K/V6LPKuoOA4pfcPXB5NgV7Gwg==","mode":420,"size":16001},"package.json":{"checkedAt":1678883672886,"integrity":"sha512-mKY2T9Md0eF7a0phkx2FqoOki+pLre4F8GXary4ujT/GIX2pYyZUl/yRxLixNXtMwPnBs8fBWc1dcvB7ZoxU8g==","mode":420,"size":791},"README.md":{"checkedAt":1678883672197,"integrity":"sha512-4p9yu+Va6dp+S+GDMareb7GNcQLisi5X9NIrRWSopCln/9Lom03Ug8vT7yiAKSKwTsBjleyJA1cXpjsMfrklEA==","mode":420,"size":4553},"dist/walk.js.map":{"checkedAt":1678883672887,"integrity":"sha512-Jf4fh0DRu9OVGhRiid8BOkez2Q/YUrmDckV8AJzqSkuYHRqgYgp9DzD/Bb3jCnct45ErWSnc8gLUmLzO0QCyQQ==","mode":420,"size":29054},"dist/walk.mjs.map":{"checkedAt":1678883672888,"integrity":"sha512-nds/E1j3VIw+bPQBhrqd32w+jZX8lWH2gRce61T19oM6OONmNLgNElKu5owkMp3s5b0Fo777DLm+WE5Zk9aT/A==","mode":420,"size":29031},"CHANGELOG.md":{"checkedAt":1678883672888,"integrity":"sha512-qbbqoYg9j1/ZGvk0+FBmiYRpsAzqNaeie6mTwGzyG/VzGmXBve2kho5pBQAbJO57RXJtCNpW6UY02V/iUeQrdQ==","mode":420,"size":2401},"dist/walk.mjs":{"checkedAt":1678883672888,"integrity":"sha512-7cLduP0nwYUmVrXyAC34bSpEJKOCkWykEA04q0W8bL+eg4eMYmqS5nbyQsN6wsZ+BhbagjA2x3LjSp2RhmpF5g==","mode":420,"size":14560},"dist/walk.d.ts":{"checkedAt":1678883672888,"integrity":"sha512-Eb6zt9Js8G73PJkDRcfedwchDjXN6UScuQn/Xd3l+DS6nb9jqkAJ7s//ghnjfriTOAxm/c01WzKZVxPMcLpvGg==","mode":420,"size":2559}}}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "@formatjs/icu-skeleton-parser",
|
||||
"version": "1.3.6",
|
||||
"main": "index.js",
|
||||
"module": "lib/index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/formatjs/formatjs.git",
|
||||
"directory": "packages/icu-skeleton-parser"
|
||||
},
|
||||
"dependencies": {
|
||||
"@formatjs/ecma402-abstract": "1.11.4",
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,513 @@
|
||||
/**
|
||||
* The `async_hooks` module provides an API to track asynchronous resources. It
|
||||
* can be accessed using:
|
||||
*
|
||||
* ```js
|
||||
* import async_hooks from 'async_hooks';
|
||||
* ```
|
||||
* @experimental
|
||||
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/async_hooks.js)
|
||||
*/
|
||||
declare module 'async_hooks' {
|
||||
/**
|
||||
* ```js
|
||||
* import { executionAsyncId } from 'async_hooks';
|
||||
*
|
||||
* console.log(executionAsyncId()); // 1 - bootstrap
|
||||
* fs.open(path, 'r', (err, fd) => {
|
||||
* console.log(executionAsyncId()); // 6 - open()
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* The ID returned from `executionAsyncId()` is related to execution timing, not
|
||||
* causality (which is covered by `triggerAsyncId()`):
|
||||
*
|
||||
* ```js
|
||||
* const server = net.createServer((conn) => {
|
||||
* // Returns the ID of the server, not of the new connection, because the
|
||||
* // callback runs in the execution scope of the server's MakeCallback().
|
||||
* async_hooks.executionAsyncId();
|
||||
*
|
||||
* }).listen(port, () => {
|
||||
* // Returns the ID of a TickObject (process.nextTick()) because all
|
||||
* // callbacks passed to .listen() are wrapped in a nextTick().
|
||||
* async_hooks.executionAsyncId();
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* Promise contexts may not get precise `executionAsyncIds` by default.
|
||||
* See the section on `promise execution tracking`.
|
||||
* @since v8.1.0
|
||||
* @return The `asyncId` of the current execution context. Useful to track when something calls.
|
||||
*/
|
||||
function executionAsyncId(): number;
|
||||
/**
|
||||
* Resource objects returned by `executionAsyncResource()` are most often internal
|
||||
* Node.js handle objects with undocumented APIs. Using any functions or properties
|
||||
* on the object is likely to crash your application and should be avoided.
|
||||
*
|
||||
* Using `executionAsyncResource()` in the top-level execution context will
|
||||
* return an empty object as there is no handle or request object to use,
|
||||
* but having an object representing the top-level can be helpful.
|
||||
*
|
||||
* ```js
|
||||
* import { open } from 'fs';
|
||||
* import { executionAsyncId, executionAsyncResource } from 'async_hooks';
|
||||
*
|
||||
* console.log(executionAsyncId(), executionAsyncResource()); // 1 {}
|
||||
* open(new URL(import.meta.url), 'r', (err, fd) => {
|
||||
* console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* This can be used to implement continuation local storage without the
|
||||
* use of a tracking `Map` to store the metadata:
|
||||
*
|
||||
* ```js
|
||||
* import { createServer } from 'http';
|
||||
* import {
|
||||
* executionAsyncId,
|
||||
* executionAsyncResource,
|
||||
* createHook
|
||||
* } from 'async_hooks';
|
||||
* const sym = Symbol('state'); // Private symbol to avoid pollution
|
||||
*
|
||||
* createHook({
|
||||
* init(asyncId, type, triggerAsyncId, resource) {
|
||||
* const cr = executionAsyncResource();
|
||||
* if (cr) {
|
||||
* resource[sym] = cr[sym];
|
||||
* }
|
||||
* }
|
||||
* }).enable();
|
||||
*
|
||||
* const server = createServer((req, res) => {
|
||||
* executionAsyncResource()[sym] = { state: req.url };
|
||||
* setTimeout(function() {
|
||||
* res.end(JSON.stringify(executionAsyncResource()[sym]));
|
||||
* }, 100);
|
||||
* }).listen(3000);
|
||||
* ```
|
||||
* @since v13.9.0, v12.17.0
|
||||
* @return The resource representing the current execution. Useful to store data within the resource.
|
||||
*/
|
||||
function executionAsyncResource(): object;
|
||||
/**
|
||||
* ```js
|
||||
* const server = net.createServer((conn) => {
|
||||
* // The resource that caused (or triggered) this callback to be called
|
||||
* // was that of the new connection. Thus the return value of triggerAsyncId()
|
||||
* // is the asyncId of "conn".
|
||||
* async_hooks.triggerAsyncId();
|
||||
*
|
||||
* }).listen(port, () => {
|
||||
* // Even though all callbacks passed to .listen() are wrapped in a nextTick()
|
||||
* // the callback itself exists because the call to the server's .listen()
|
||||
* // was made. So the return value would be the ID of the server.
|
||||
* async_hooks.triggerAsyncId();
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* Promise contexts may not get valid `triggerAsyncId`s by default. See
|
||||
* the section on `promise execution tracking`.
|
||||
* @return The ID of the resource responsible for calling the callback that is currently being executed.
|
||||
*/
|
||||
function triggerAsyncId(): number;
|
||||
interface HookCallbacks {
|
||||
/**
|
||||
* Called when a class is constructed that has the possibility to emit an asynchronous event.
|
||||
* @param asyncId a unique ID for the async resource
|
||||
* @param type the type of the async resource
|
||||
* @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
|
||||
* @param resource reference to the resource representing the async operation, needs to be released during destroy
|
||||
*/
|
||||
init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
|
||||
/**
|
||||
* When an asynchronous operation is initiated or completes a callback is called to notify the user.
|
||||
* The before callback is called just before said callback is executed.
|
||||
* @param asyncId the unique identifier assigned to the resource about to execute the callback.
|
||||
*/
|
||||
before?(asyncId: number): void;
|
||||
/**
|
||||
* Called immediately after the callback specified in before is completed.
|
||||
* @param asyncId the unique identifier assigned to the resource which has executed the callback.
|
||||
*/
|
||||
after?(asyncId: number): void;
|
||||
/**
|
||||
* Called when a promise has resolve() called. This may not be in the same execution id
|
||||
* as the promise itself.
|
||||
* @param asyncId the unique id for the promise that was resolve()d.
|
||||
*/
|
||||
promiseResolve?(asyncId: number): void;
|
||||
/**
|
||||
* Called after the resource corresponding to asyncId is destroyed
|
||||
* @param asyncId a unique ID for the async resource
|
||||
*/
|
||||
destroy?(asyncId: number): void;
|
||||
}
|
||||
interface AsyncHook {
|
||||
/**
|
||||
* Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
|
||||
*/
|
||||
enable(): this;
|
||||
/**
|
||||
* Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
|
||||
*/
|
||||
disable(): this;
|
||||
}
|
||||
/**
|
||||
* Registers functions to be called for different lifetime events of each async
|
||||
* operation.
|
||||
*
|
||||
* The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the
|
||||
* respective asynchronous event during a resource's lifetime.
|
||||
*
|
||||
* All callbacks are optional. For example, if only resource cleanup needs to
|
||||
* be tracked, then only the `destroy` callback needs to be passed. The
|
||||
* specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section.
|
||||
*
|
||||
* ```js
|
||||
* import { createHook } from 'async_hooks';
|
||||
*
|
||||
* const asyncHook = createHook({
|
||||
* init(asyncId, type, triggerAsyncId, resource) { },
|
||||
* destroy(asyncId) { }
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* The callbacks will be inherited via the prototype chain:
|
||||
*
|
||||
* ```js
|
||||
* class MyAsyncCallbacks {
|
||||
* init(asyncId, type, triggerAsyncId, resource) { }
|
||||
* destroy(asyncId) {}
|
||||
* }
|
||||
*
|
||||
* class MyAddedCallbacks extends MyAsyncCallbacks {
|
||||
* before(asyncId) { }
|
||||
* after(asyncId) { }
|
||||
* }
|
||||
*
|
||||
* const asyncHook = async_hooks.createHook(new MyAddedCallbacks());
|
||||
* ```
|
||||
*
|
||||
* Because promises are asynchronous resources whose lifecycle is tracked
|
||||
* via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises.
|
||||
* @since v8.1.0
|
||||
* @param callbacks The `Hook Callbacks` to register
|
||||
* @return Instance used for disabling and enabling hooks
|
||||
*/
|
||||
function createHook(callbacks: HookCallbacks): AsyncHook;
|
||||
interface AsyncResourceOptions {
|
||||
/**
|
||||
* The ID of the execution context that created this async event.
|
||||
* @default executionAsyncId()
|
||||
*/
|
||||
triggerAsyncId?: number | undefined;
|
||||
/**
|
||||
* Disables automatic `emitDestroy` when the object is garbage collected.
|
||||
* This usually does not need to be set (even if `emitDestroy` is called
|
||||
* manually), unless the resource's `asyncId` is retrieved and the
|
||||
* sensitive API's `emitDestroy` is called with it.
|
||||
* @default false
|
||||
*/
|
||||
requireManualDestroy?: boolean | undefined;
|
||||
}
|
||||
/**
|
||||
* The class `AsyncResource` is designed to be extended by the embedder's async
|
||||
* resources. Using this, users can easily trigger the lifetime events of their
|
||||
* own resources.
|
||||
*
|
||||
* The `init` hook will trigger when an `AsyncResource` is instantiated.
|
||||
*
|
||||
* The following is an overview of the `AsyncResource` API.
|
||||
*
|
||||
* ```js
|
||||
* import { AsyncResource, executionAsyncId } from 'async_hooks';
|
||||
*
|
||||
* // AsyncResource() is meant to be extended. Instantiating a
|
||||
* // new AsyncResource() also triggers init. If triggerAsyncId is omitted then
|
||||
* // async_hook.executionAsyncId() is used.
|
||||
* const asyncResource = new AsyncResource(
|
||||
* type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }
|
||||
* );
|
||||
*
|
||||
* // Run a function in the execution context of the resource. This will
|
||||
* // * establish the context of the resource
|
||||
* // * trigger the AsyncHooks before callbacks
|
||||
* // * call the provided function `fn` with the supplied arguments
|
||||
* // * trigger the AsyncHooks after callbacks
|
||||
* // * restore the original execution context
|
||||
* asyncResource.runInAsyncScope(fn, thisArg, ...args);
|
||||
*
|
||||
* // Call AsyncHooks destroy callbacks.
|
||||
* asyncResource.emitDestroy();
|
||||
*
|
||||
* // Return the unique ID assigned to the AsyncResource instance.
|
||||
* asyncResource.asyncId();
|
||||
*
|
||||
* // Return the trigger ID for the AsyncResource instance.
|
||||
* asyncResource.triggerAsyncId();
|
||||
* ```
|
||||
*/
|
||||
class AsyncResource {
|
||||
/**
|
||||
* AsyncResource() is meant to be extended. Instantiating a
|
||||
* new AsyncResource() also triggers init. If triggerAsyncId is omitted then
|
||||
* async_hook.executionAsyncId() is used.
|
||||
* @param type The type of async event.
|
||||
* @param triggerAsyncId The ID of the execution context that created
|
||||
* this async event (default: `executionAsyncId()`), or an
|
||||
* AsyncResourceOptions object (since v9.3.0)
|
||||
*/
|
||||
constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);
|
||||
/**
|
||||
* Binds the given function to the current execution context.
|
||||
*
|
||||
* The returned function will have an `asyncResource` property referencing
|
||||
* the `AsyncResource` to which the function is bound.
|
||||
* @since v14.8.0, v12.19.0
|
||||
* @param fn The function to bind to the current execution context.
|
||||
* @param type An optional name to associate with the underlying `AsyncResource`.
|
||||
*/
|
||||
static bind<Func extends (this: ThisArg, ...args: any[]) => any, ThisArg>(
|
||||
fn: Func,
|
||||
type?: string,
|
||||
thisArg?: ThisArg
|
||||
): Func & {
|
||||
asyncResource: AsyncResource;
|
||||
};
|
||||
/**
|
||||
* Binds the given function to execute to this `AsyncResource`'s scope.
|
||||
*
|
||||
* The returned function will have an `asyncResource` property referencing
|
||||
* the `AsyncResource` to which the function is bound.
|
||||
* @since v14.8.0, v12.19.0
|
||||
* @param fn The function to bind to the current `AsyncResource`.
|
||||
*/
|
||||
bind<Func extends (...args: any[]) => any>(
|
||||
fn: Func
|
||||
): Func & {
|
||||
asyncResource: AsyncResource;
|
||||
};
|
||||
/**
|
||||
* Call the provided function with the provided arguments in the execution context
|
||||
* of the async resource. This will establish the context, trigger the AsyncHooks
|
||||
* before callbacks, call the function, trigger the AsyncHooks after callbacks, and
|
||||
* then restore the original execution context.
|
||||
* @since v9.6.0
|
||||
* @param fn The function to call in the execution context of this async resource.
|
||||
* @param thisArg The receiver to be used for the function call.
|
||||
* @param args Optional arguments to pass to the function.
|
||||
*/
|
||||
runInAsyncScope<This, Result>(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
|
||||
/**
|
||||
* Call all `destroy` hooks. This should only ever be called once. An error will
|
||||
* be thrown if it is called more than once. This **must** be manually called. If
|
||||
* the resource is left to be collected by the GC then the `destroy` hooks will
|
||||
* never be called.
|
||||
* @return A reference to `asyncResource`.
|
||||
*/
|
||||
emitDestroy(): this;
|
||||
/**
|
||||
* @return The unique `asyncId` assigned to the resource.
|
||||
*/
|
||||
asyncId(): number;
|
||||
/**
|
||||
*
|
||||
* @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor.
|
||||
*/
|
||||
triggerAsyncId(): number;
|
||||
}
|
||||
interface AsyncLocalStorageOptions<T> {
|
||||
/**
|
||||
* Optional callback invoked before a store is propagated to a new async resource.
|
||||
* Returning `true` allows propagation, returning `false` avoids it. Default is to propagate always.
|
||||
* @param type The type of async event.
|
||||
* @param store The current store.
|
||||
* @since v18.13.0
|
||||
*/
|
||||
onPropagate?: ((type: string, store: T) => boolean) | undefined;
|
||||
}
|
||||
/**
|
||||
* This class creates stores that stay coherent through asynchronous operations.
|
||||
*
|
||||
* While you can create your own implementation on top of the `async_hooks` module,`AsyncLocalStorage` should be preferred as it is a performant and memory safe
|
||||
* implementation that involves significant optimizations that are non-obvious to
|
||||
* implement.
|
||||
*
|
||||
* The following example uses `AsyncLocalStorage` to build a simple logger
|
||||
* that assigns IDs to incoming HTTP requests and includes them in messages
|
||||
* logged within each request.
|
||||
*
|
||||
* ```js
|
||||
* import http from 'http';
|
||||
* import { AsyncLocalStorage } from 'async_hooks';
|
||||
*
|
||||
* const asyncLocalStorage = new AsyncLocalStorage();
|
||||
*
|
||||
* function logWithId(msg) {
|
||||
* const id = asyncLocalStorage.getStore();
|
||||
* console.log(`${id !== undefined ? id : '-'}:`, msg);
|
||||
* }
|
||||
*
|
||||
* let idSeq = 0;
|
||||
* http.createServer((req, res) => {
|
||||
* asyncLocalStorage.run(idSeq++, () => {
|
||||
* logWithId('start');
|
||||
* // Imagine any chain of async operations here
|
||||
* setImmediate(() => {
|
||||
* logWithId('finish');
|
||||
* res.end();
|
||||
* });
|
||||
* });
|
||||
* }).listen(8080);
|
||||
*
|
||||
* http.get('http://localhost:8080');
|
||||
* http.get('http://localhost:8080');
|
||||
* // Prints:
|
||||
* // 0: start
|
||||
* // 1: start
|
||||
* // 0: finish
|
||||
* // 1: finish
|
||||
* ```
|
||||
*
|
||||
* Each instance of `AsyncLocalStorage` maintains an independent storage context.
|
||||
* Multiple instances can safely exist simultaneously without risk of interfering
|
||||
* with each other's data.
|
||||
* @since v13.10.0, v12.17.0
|
||||
*/
|
||||
class AsyncLocalStorage<T> {
|
||||
constructor(options?: AsyncLocalStorageOptions<T>);
|
||||
|
||||
/**
|
||||
* Disables the instance of `AsyncLocalStorage`. All subsequent calls
|
||||
* to `asyncLocalStorage.getStore()` will return `undefined` until`asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again.
|
||||
*
|
||||
* When calling `asyncLocalStorage.disable()`, all current contexts linked to the
|
||||
* instance will be exited.
|
||||
*
|
||||
* Calling `asyncLocalStorage.disable()` is required before the`asyncLocalStorage` can be garbage collected. This does not apply to stores
|
||||
* provided by the `asyncLocalStorage`, as those objects are garbage collected
|
||||
* along with the corresponding async resources.
|
||||
*
|
||||
* Use this method when the `asyncLocalStorage` is not in use anymore
|
||||
* in the current process.
|
||||
* @since v13.10.0, v12.17.0
|
||||
* @experimental
|
||||
*/
|
||||
disable(): void;
|
||||
/**
|
||||
* Returns the current store.
|
||||
* If called outside of an asynchronous context initialized by
|
||||
* calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it
|
||||
* returns `undefined`.
|
||||
* @since v13.10.0, v12.17.0
|
||||
*/
|
||||
getStore(): T | undefined;
|
||||
/**
|
||||
* Runs a function synchronously within a context and returns its
|
||||
* return value. The store is not accessible outside of the callback function.
|
||||
* The store is accessible to any asynchronous operations created within the
|
||||
* callback.
|
||||
*
|
||||
* The optional `args` are passed to the callback function.
|
||||
*
|
||||
* If the callback function throws an error, the error is thrown by `run()` too.
|
||||
* The stacktrace is not impacted by this call and the context is exited.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* ```js
|
||||
* const store = { id: 2 };
|
||||
* try {
|
||||
* asyncLocalStorage.run(store, () => {
|
||||
* asyncLocalStorage.getStore(); // Returns the store object
|
||||
* setTimeout(() => {
|
||||
* asyncLocalStorage.getStore(); // Returns the store object
|
||||
* }, 200);
|
||||
* throw new Error();
|
||||
* });
|
||||
* } catch (e) {
|
||||
* asyncLocalStorage.getStore(); // Returns undefined
|
||||
* // The error will be caught here
|
||||
* }
|
||||
* ```
|
||||
* @since v13.10.0, v12.17.0
|
||||
*/
|
||||
run<R, TArgs extends any[]>(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R;
|
||||
/**
|
||||
* Runs a function synchronously outside of a context and returns its
|
||||
* return value. The store is not accessible within the callback function or
|
||||
* the asynchronous operations created within the callback. Any `getStore()`call done within the callback function will always return `undefined`.
|
||||
*
|
||||
* The optional `args` are passed to the callback function.
|
||||
*
|
||||
* If the callback function throws an error, the error is thrown by `exit()` too.
|
||||
* The stacktrace is not impacted by this call and the context is re-entered.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* ```js
|
||||
* // Within a call to run
|
||||
* try {
|
||||
* asyncLocalStorage.getStore(); // Returns the store object or value
|
||||
* asyncLocalStorage.exit(() => {
|
||||
* asyncLocalStorage.getStore(); // Returns undefined
|
||||
* throw new Error();
|
||||
* });
|
||||
* } catch (e) {
|
||||
* asyncLocalStorage.getStore(); // Returns the same object or value
|
||||
* // The error will be caught here
|
||||
* }
|
||||
* ```
|
||||
* @since v13.10.0, v12.17.0
|
||||
* @experimental
|
||||
*/
|
||||
exit<R, TArgs extends any[]>(callback: (...args: TArgs) => R, ...args: TArgs): R;
|
||||
/**
|
||||
* Transitions into the context for the remainder of the current
|
||||
* synchronous execution and then persists the store through any following
|
||||
* asynchronous calls.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* ```js
|
||||
* const store = { id: 1 };
|
||||
* // Replaces previous store with the given store object
|
||||
* asyncLocalStorage.enterWith(store);
|
||||
* asyncLocalStorage.getStore(); // Returns the store object
|
||||
* someAsyncOperation(() => {
|
||||
* asyncLocalStorage.getStore(); // Returns the same object
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* This transition will continue for the _entire_ synchronous execution.
|
||||
* This means that if, for example, the context is entered within an event
|
||||
* handler subsequent event handlers will also run within that context unless
|
||||
* specifically bound to another context with an `AsyncResource`. That is why`run()` should be preferred over `enterWith()` unless there are strong reasons
|
||||
* to use the latter method.
|
||||
*
|
||||
* ```js
|
||||
* const store = { id: 1 };
|
||||
*
|
||||
* emitter.on('my-event', () => {
|
||||
* asyncLocalStorage.enterWith(store);
|
||||
* });
|
||||
* emitter.on('my-event', () => {
|
||||
* asyncLocalStorage.getStore(); // Returns the same object
|
||||
* });
|
||||
*
|
||||
* asyncLocalStorage.getStore(); // Returns undefined
|
||||
* emitter.emit('my-event');
|
||||
* asyncLocalStorage.getStore(); // Returns the same object
|
||||
* ```
|
||||
* @since v13.11.0, v12.17.0
|
||||
* @experimental
|
||||
*/
|
||||
enterWith(store: T): void;
|
||||
}
|
||||
}
|
||||
declare module 'node:async_hooks' {
|
||||
export * from 'async_hooks';
|
||||
}
|
||||
Reference in New Issue
Block a user