new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
import type { Transformer, Options } from '../types';
|
||||
declare const transformer: Transformer<Options.Babel>;
|
||||
export { transformer };
|
||||
@@ -0,0 +1,341 @@
|
||||
<h1 align="center">
|
||||
<br>
|
||||
<br>
|
||||
<img width="320" src="media/logo.svg" alt="Chalk">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</h1>
|
||||
|
||||
> Terminal string styling done right
|
||||
|
||||
[](https://travis-ci.org/chalk/chalk) [](https://coveralls.io/github/chalk/chalk?branch=master) [](https://www.npmjs.com/package/chalk?activeTab=dependents) [](https://www.npmjs.com/package/chalk) [](https://www.youtube.com/watch?v=9auOCbH5Ns4) [](https://github.com/xojs/xo)  [](https://repl.it/github/chalk/chalk)
|
||||
|
||||
<img src="https://cdn.jsdelivr.net/gh/chalk/ansi-styles@8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900">
|
||||
|
||||
<br>
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<p>
|
||||
<p>
|
||||
<sup>
|
||||
Sindre Sorhus' open source work is supported by the community on <a href="https://github.com/sponsors/sindresorhus">GitHub Sponsors</a> and <a href="https://stakes.social/0x44d871aebF0126Bf646753E2C976Aa7e68A66c15">Dev</a>
|
||||
</sup>
|
||||
</p>
|
||||
<sup>Special thanks to:</sup>
|
||||
<br>
|
||||
<br>
|
||||
<a href="https://standardresume.co/tech">
|
||||
<img src="https://sindresorhus.com/assets/thanks/standard-resume-logo.svg" width="160"/>
|
||||
</a>
|
||||
<br>
|
||||
<br>
|
||||
<a href="https://retool.com/?utm_campaign=sindresorhus">
|
||||
<img src="https://sindresorhus.com/assets/thanks/retool-logo.svg" width="230"/>
|
||||
</a>
|
||||
<br>
|
||||
<br>
|
||||
<a href="https://doppler.com/?utm_campaign=github_repo&utm_medium=referral&utm_content=chalk&utm_source=github">
|
||||
<div>
|
||||
<img src="https://dashboard.doppler.com/imgs/logo-long.svg" width="240" alt="Doppler">
|
||||
</div>
|
||||
<b>All your environment variables, in one place</b>
|
||||
<div>
|
||||
<span>Stop struggling with scattered API keys, hacking together home-brewed tools,</span>
|
||||
<br>
|
||||
<span>and avoiding access controls. Keep your team and servers in sync with Doppler.</span>
|
||||
</div>
|
||||
</a>
|
||||
<br>
|
||||
<a href="https://uibakery.io/?utm_source=chalk&utm_medium=sponsor&utm_campaign=github">
|
||||
<div>
|
||||
<img src="https://sindresorhus.com/assets/thanks/uibakery-logo.jpg" width="270" alt="UI Bakery">
|
||||
</div>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
<br>
|
||||
|
||||
## Highlights
|
||||
|
||||
- Expressive API
|
||||
- Highly performant
|
||||
- Ability to nest styles
|
||||
- [256/Truecolor color support](#256-and-truecolor-color-support)
|
||||
- Auto-detects color support
|
||||
- Doesn't extend `String.prototype`
|
||||
- Clean and focused
|
||||
- Actively maintained
|
||||
- [Used by ~50,000 packages](https://www.npmjs.com/browse/depended/chalk) as of January 1, 2020
|
||||
|
||||
## Install
|
||||
|
||||
```console
|
||||
$ npm install chalk
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const chalk = require('chalk');
|
||||
|
||||
console.log(chalk.blue('Hello world!'));
|
||||
```
|
||||
|
||||
Chalk comes with an easy to use composable API where you just chain and nest the styles you want.
|
||||
|
||||
```js
|
||||
const chalk = require('chalk');
|
||||
const log = console.log;
|
||||
|
||||
// Combine styled and normal strings
|
||||
log(chalk.blue('Hello') + ' World' + chalk.red('!'));
|
||||
|
||||
// Compose multiple styles using the chainable API
|
||||
log(chalk.blue.bgRed.bold('Hello world!'));
|
||||
|
||||
// Pass in multiple arguments
|
||||
log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'));
|
||||
|
||||
// Nest styles
|
||||
log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!'));
|
||||
|
||||
// Nest styles of the same type even (color, underline, background)
|
||||
log(chalk.green(
|
||||
'I am a green line ' +
|
||||
chalk.blue.underline.bold('with a blue substring') +
|
||||
' that becomes green again!'
|
||||
));
|
||||
|
||||
// ES2015 template literal
|
||||
log(`
|
||||
CPU: ${chalk.red('90%')}
|
||||
RAM: ${chalk.green('40%')}
|
||||
DISK: ${chalk.yellow('70%')}
|
||||
`);
|
||||
|
||||
// ES2015 tagged template literal
|
||||
log(chalk`
|
||||
CPU: {red ${cpu.totalPercent}%}
|
||||
RAM: {green ${ram.used / ram.total * 100}%}
|
||||
DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%}
|
||||
`);
|
||||
|
||||
// Use RGB colors in terminal emulators that support it.
|
||||
log(chalk.keyword('orange')('Yay for orange colored text!'));
|
||||
log(chalk.rgb(123, 45, 67).underline('Underlined reddish color'));
|
||||
log(chalk.hex('#DEADED').bold('Bold gray!'));
|
||||
```
|
||||
|
||||
Easily define your own themes:
|
||||
|
||||
```js
|
||||
const chalk = require('chalk');
|
||||
|
||||
const error = chalk.bold.red;
|
||||
const warning = chalk.keyword('orange');
|
||||
|
||||
console.log(error('Error!'));
|
||||
console.log(warning('Warning!'));
|
||||
```
|
||||
|
||||
Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args):
|
||||
|
||||
```js
|
||||
const name = 'Sindre';
|
||||
console.log(chalk.green('Hello %s'), name);
|
||||
//=> 'Hello Sindre'
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### chalk.`<style>[.<style>...](string, [string...])`
|
||||
|
||||
Example: `chalk.red.bold.underline('Hello', 'world');`
|
||||
|
||||
Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
|
||||
|
||||
Multiple arguments will be separated by space.
|
||||
|
||||
### chalk.level
|
||||
|
||||
Specifies the level of color support.
|
||||
|
||||
Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers.
|
||||
|
||||
If you need to change this in a reusable module, create a new instance:
|
||||
|
||||
```js
|
||||
const ctx = new chalk.Instance({level: 0});
|
||||
```
|
||||
|
||||
| Level | Description |
|
||||
| :---: | :--- |
|
||||
| `0` | All colors disabled |
|
||||
| `1` | Basic color support (16 colors) |
|
||||
| `2` | 256 color support |
|
||||
| `3` | Truecolor support (16 million colors) |
|
||||
|
||||
### chalk.supportsColor
|
||||
|
||||
Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience.
|
||||
|
||||
Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
|
||||
|
||||
Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
|
||||
|
||||
### chalk.stderr and chalk.stderr.supportsColor
|
||||
|
||||
`chalk.stderr` contains a separate instance configured with color support detected for `stderr` stream instead of `stdout`. Override rules from `chalk.supportsColor` apply to this too. `chalk.stderr.supportsColor` is exposed for convenience.
|
||||
|
||||
## Styles
|
||||
|
||||
### Modifiers
|
||||
|
||||
- `reset` - Resets the current color chain.
|
||||
- `bold` - Make text bold.
|
||||
- `dim` - Emitting only a small amount of light.
|
||||
- `italic` - Make text italic. *(Not widely supported)*
|
||||
- `underline` - Make text underline. *(Not widely supported)*
|
||||
- `inverse`- Inverse background and foreground colors.
|
||||
- `hidden` - Prints the text, but makes it invisible.
|
||||
- `strikethrough` - Puts a horizontal line through the center of the text. *(Not widely supported)*
|
||||
- `visible`- Prints the text only when Chalk has a color level > 0. Can be useful for things that are purely cosmetic.
|
||||
|
||||
### Colors
|
||||
|
||||
- `black`
|
||||
- `red`
|
||||
- `green`
|
||||
- `yellow`
|
||||
- `blue`
|
||||
- `magenta`
|
||||
- `cyan`
|
||||
- `white`
|
||||
- `blackBright` (alias: `gray`, `grey`)
|
||||
- `redBright`
|
||||
- `greenBright`
|
||||
- `yellowBright`
|
||||
- `blueBright`
|
||||
- `magentaBright`
|
||||
- `cyanBright`
|
||||
- `whiteBright`
|
||||
|
||||
### Background colors
|
||||
|
||||
- `bgBlack`
|
||||
- `bgRed`
|
||||
- `bgGreen`
|
||||
- `bgYellow`
|
||||
- `bgBlue`
|
||||
- `bgMagenta`
|
||||
- `bgCyan`
|
||||
- `bgWhite`
|
||||
- `bgBlackBright` (alias: `bgGray`, `bgGrey`)
|
||||
- `bgRedBright`
|
||||
- `bgGreenBright`
|
||||
- `bgYellowBright`
|
||||
- `bgBlueBright`
|
||||
- `bgMagentaBright`
|
||||
- `bgCyanBright`
|
||||
- `bgWhiteBright`
|
||||
|
||||
## Tagged template literal
|
||||
|
||||
Chalk can be used as a [tagged template literal](https://exploringjs.com/es6/ch_template-literals.html#_tagged-template-literals).
|
||||
|
||||
```js
|
||||
const chalk = require('chalk');
|
||||
|
||||
const miles = 18;
|
||||
const calculateFeet = miles => miles * 5280;
|
||||
|
||||
console.log(chalk`
|
||||
There are {bold 5280 feet} in a mile.
|
||||
In {bold ${miles} miles}, there are {green.bold ${calculateFeet(miles)} feet}.
|
||||
`);
|
||||
```
|
||||
|
||||
Blocks are delimited by an opening curly brace (`{`), a style, some content, and a closing curly brace (`}`).
|
||||
|
||||
Template styles are chained exactly like normal Chalk styles. The following three statements are equivalent:
|
||||
|
||||
```js
|
||||
console.log(chalk.bold.rgb(10, 100, 200)('Hello!'));
|
||||
console.log(chalk.bold.rgb(10, 100, 200)`Hello!`);
|
||||
console.log(chalk`{bold.rgb(10,100,200) Hello!}`);
|
||||
```
|
||||
|
||||
Note that function styles (`rgb()`, `hsl()`, `keyword()`, etc.) may not contain spaces between parameters.
|
||||
|
||||
All interpolated values (`` chalk`${foo}` ``) are converted to strings via the `.toString()` method. All curly braces (`{` and `}`) in interpolated value strings are escaped.
|
||||
|
||||
## 256 and Truecolor color support
|
||||
|
||||
Chalk supports 256 colors and [Truecolor](https://gist.github.com/XVilka/8346728) (16 million colors) on supported terminal apps.
|
||||
|
||||
Colors are downsampled from 16 million RGB values to an ANSI color format that is supported by the terminal emulator (or by specifying `{level: n}` as a Chalk option). For example, Chalk configured to run at level 1 (basic color support) will downsample an RGB value of #FF0000 (red) to 31 (ANSI escape for red).
|
||||
|
||||
Examples:
|
||||
|
||||
- `chalk.hex('#DEADED').underline('Hello, world!')`
|
||||
- `chalk.keyword('orange')('Some orange text')`
|
||||
- `chalk.rgb(15, 100, 204).inverse('Hello!')`
|
||||
|
||||
Background versions of these models are prefixed with `bg` and the first level of the module capitalized (e.g. `keyword` for foreground colors and `bgKeyword` for background colors).
|
||||
|
||||
- `chalk.bgHex('#DEADED').underline('Hello, world!')`
|
||||
- `chalk.bgKeyword('orange')('Some orange text')`
|
||||
- `chalk.bgRgb(15, 100, 204).inverse('Hello!')`
|
||||
|
||||
The following color models can be used:
|
||||
|
||||
- [`rgb`](https://en.wikipedia.org/wiki/RGB_color_model) - Example: `chalk.rgb(255, 136, 0).bold('Orange!')`
|
||||
- [`hex`](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) - Example: `chalk.hex('#FF8800').bold('Orange!')`
|
||||
- [`keyword`](https://www.w3.org/wiki/CSS/Properties/color/keywords) (CSS keywords) - Example: `chalk.keyword('orange').bold('Orange!')`
|
||||
- [`hsl`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsl(32, 100, 50).bold('Orange!')`
|
||||
- [`hsv`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsv(32, 100, 100).bold('Orange!')`
|
||||
- [`hwb`](https://en.wikipedia.org/wiki/HWB_color_model) - Example: `chalk.hwb(32, 0, 50).bold('Orange!')`
|
||||
- [`ansi`](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) - Example: `chalk.ansi(31).bgAnsi(93)('red on yellowBright')`
|
||||
- [`ansi256`](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) - Example: `chalk.bgAnsi256(194)('Honeydew, more or less')`
|
||||
|
||||
## Windows
|
||||
|
||||
If you're on Windows, do yourself a favor and use [Windows Terminal](https://github.com/microsoft/terminal) instead of `cmd.exe`.
|
||||
|
||||
## Origin story
|
||||
|
||||
[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative.
|
||||
|
||||
## chalk for enterprise
|
||||
|
||||
Available as part of the Tidelift Subscription.
|
||||
|
||||
The maintainers of chalk and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-chalk?utm_source=npm-chalk&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
|
||||
|
||||
## Related
|
||||
|
||||
- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module
|
||||
- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal
|
||||
- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color
|
||||
- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes
|
||||
- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Strip ANSI escape codes from a stream
|
||||
- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
|
||||
- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
|
||||
- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes
|
||||
- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes
|
||||
- [color-convert](https://github.com/qix-/color-convert) - Converts colors between different models
|
||||
- [chalk-animation](https://github.com/bokub/chalk-animation) - Animate strings in the terminal
|
||||
- [gradient-string](https://github.com/bokub/gradient-string) - Apply color gradients to strings
|
||||
- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings
|
||||
- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal
|
||||
|
||||
## Maintainers
|
||||
|
||||
- [Sindre Sorhus](https://github.com/sindresorhus)
|
||||
- [Josh Junon](https://github.com/qix-)
|
||||
@@ -0,0 +1,17 @@
|
||||
/*! node-DOMException. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
||||
|
||||
if (!globalThis.DOMException) {
|
||||
try {
|
||||
const { MessageChannel } = require('worker_threads'),
|
||||
port = new MessageChannel().port1,
|
||||
ab = new ArrayBuffer()
|
||||
port.postMessage(ab, [ab, ab])
|
||||
catch (err) {
|
||||
console.log(err.code, err.name, err.message)
|
||||
err.constructor.name === 'DOMException' && (
|
||||
globalThis.DOMException = err.constructor
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = globalThis.DOMException
|
||||
@@ -0,0 +1,9 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 2014 Wei Fanzhe
|
||||
|
||||
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 @@
|
||||
{"version":3,"file":"UnsubscriptionError.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/UnsubscriptionError.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAoB,SAAQ,KAAK;IAChD,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,KAAK,MAAM,EAAE,GAAG,EAAE,GAAG,mBAAmB,CAAC;CAC1C;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,uBAWjC,CAAC"}
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
# isarray
|
||||
|
||||
`Array#isArray` for older browsers and deprecated Node.js versions.
|
||||
|
||||
[](http://travis-ci.org/juliangruber/isarray)
|
||||
[](https://www.npmjs.org/package/isarray)
|
||||
|
||||
[
|
||||
](https://ci.testling.com/juliangruber/isarray)
|
||||
|
||||
__Just use Array.isArray directly__, unless you need to support those older versions.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var isArray = require('isarray');
|
||||
|
||||
console.log(isArray([])); // => true
|
||||
console.log(isArray({})); // => false
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
With [npm](https://npmjs.org) do
|
||||
|
||||
```bash
|
||||
$ npm install isarray
|
||||
```
|
||||
|
||||
Then bundle for the browser with
|
||||
[browserify](https://github.com/substack/node-browserify).
|
||||
|
||||
## Sponsors
|
||||
|
||||
This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
|
||||
|
||||
Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
|
||||
@@ -0,0 +1,55 @@
|
||||
import assertString from './util/assertString';
|
||||
var possibleIsbn10 = /^(?:[0-9]{9}X|[0-9]{10})$/;
|
||||
var possibleIsbn13 = /^(?:[0-9]{13})$/;
|
||||
var factor = [1, 3];
|
||||
export default function isISBN(isbn, options) {
|
||||
assertString(isbn); // For backwards compatibility:
|
||||
// isISBN(str [, version]), i.e. `options` could be used as argument for the legacy `version`
|
||||
|
||||
var version = String((options === null || options === void 0 ? void 0 : options.version) || options);
|
||||
|
||||
if (!(options !== null && options !== void 0 && options.version || options)) {
|
||||
return isISBN(isbn, {
|
||||
version: 10
|
||||
}) || isISBN(isbn, {
|
||||
version: 13
|
||||
});
|
||||
}
|
||||
|
||||
var sanitizedIsbn = isbn.replace(/[\s-]+/g, '');
|
||||
var checksum = 0;
|
||||
|
||||
if (version === '10') {
|
||||
if (!possibleIsbn10.test(sanitizedIsbn)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var i = 0; i < version - 1; i++) {
|
||||
checksum += (i + 1) * sanitizedIsbn.charAt(i);
|
||||
}
|
||||
|
||||
if (sanitizedIsbn.charAt(9) === 'X') {
|
||||
checksum += 10 * 10;
|
||||
} else {
|
||||
checksum += 10 * sanitizedIsbn.charAt(9);
|
||||
}
|
||||
|
||||
if (checksum % 11 === 0) {
|
||||
return true;
|
||||
}
|
||||
} else if (version === '13') {
|
||||
if (!possibleIsbn13.test(sanitizedIsbn)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var _i = 0; _i < 12; _i++) {
|
||||
checksum += factor[_i % 2] * sanitizedIsbn.charAt(_i);
|
||||
}
|
||||
|
||||
if (sanitizedIsbn.charAt(12) - (10 - checksum % 10) % 10 === 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import type {SetReturnType} from './set-return-type';
|
||||
|
||||
/**
|
||||
Create an async version of the given function type, by boxing the return type in `Promise` while keeping the same parameter types.
|
||||
|
||||
Use-case: You have two functions, one synchronous and one asynchronous that do the same thing. Instead of having to duplicate the type definition, you can use `Asyncify` to reuse the synchronous type.
|
||||
|
||||
@example
|
||||
```
|
||||
import type {Asyncify} from 'type-fest';
|
||||
|
||||
// Synchronous function.
|
||||
function getFooSync(someArg: SomeType): Foo {
|
||||
// …
|
||||
}
|
||||
|
||||
type AsyncifiedFooGetter = Asyncify<typeof getFooSync>;
|
||||
//=> type AsyncifiedFooGetter = (someArg: SomeType) => Promise<Foo>;
|
||||
|
||||
// Same as `getFooSync` but asynchronous.
|
||||
const getFooAsync: AsyncifiedFooGetter = (someArg) => {
|
||||
// TypeScript now knows that `someArg` is `SomeType` automatically.
|
||||
// It also knows that this function must return `Promise<Foo>`.
|
||||
// If you have `@typescript-eslint/promise-function-async` linter rule enabled, it will even report that "Functions that return promises must be async.".
|
||||
|
||||
// …
|
||||
}
|
||||
```
|
||||
|
||||
@category Async
|
||||
*/
|
||||
export type Asyncify<Fn extends (...arguments_: any[]) => any> = SetReturnType<Fn, Promise<Awaited<ReturnType<Fn>>>>;
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Jordan Harband
|
||||
|
||||
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,56 @@
|
||||
import { AsyncAction } from './AsyncAction';
|
||||
import { AsyncScheduler } from './AsyncScheduler';
|
||||
|
||||
/**
|
||||
*
|
||||
* Async Scheduler
|
||||
*
|
||||
* <span class="informal">Schedule task as if you used setTimeout(task, duration)</span>
|
||||
*
|
||||
* `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript
|
||||
* event loop queue. It is best used to delay tasks in time or to schedule tasks repeating
|
||||
* in intervals.
|
||||
*
|
||||
* If you just want to "defer" task, that is to perform it right after currently
|
||||
* executing synchronous code ends (commonly achieved by `setTimeout(deferredTask, 0)`),
|
||||
* better choice will be the {@link asapScheduler} scheduler.
|
||||
*
|
||||
* ## Examples
|
||||
* Use async scheduler to delay task
|
||||
* ```ts
|
||||
* import { asyncScheduler } from 'rxjs';
|
||||
*
|
||||
* const task = () => console.log('it works!');
|
||||
*
|
||||
* asyncScheduler.schedule(task, 2000);
|
||||
*
|
||||
* // After 2 seconds logs:
|
||||
* // "it works!"
|
||||
* ```
|
||||
*
|
||||
* Use async scheduler to repeat task in intervals
|
||||
* ```ts
|
||||
* import { asyncScheduler } from 'rxjs';
|
||||
*
|
||||
* function task(state) {
|
||||
* console.log(state);
|
||||
* this.schedule(state + 1, 1000); // `this` references currently executing Action,
|
||||
* // which we reschedule with new state and delay
|
||||
* }
|
||||
*
|
||||
* asyncScheduler.schedule(task, 3000, 0);
|
||||
*
|
||||
* // Logs:
|
||||
* // 0 after 3s
|
||||
* // 1 after 4s
|
||||
* // 2 after 5s
|
||||
* // 3 after 6s
|
||||
* ```
|
||||
*/
|
||||
|
||||
export const asyncScheduler = new AsyncScheduler(AsyncAction);
|
||||
|
||||
/**
|
||||
* @deprecated Renamed to {@link asyncScheduler}. Will be removed in v8.
|
||||
*/
|
||||
export const async = asyncScheduler;
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Observable } from '../Observable';
|
||||
import { ObservableInput, ObservableInputTuple } from '../types';
|
||||
import { Subscriber } from '../Subscriber';
|
||||
export declare function race<T extends readonly unknown[]>(inputs: [...ObservableInputTuple<T>]): Observable<T[number]>;
|
||||
export declare function race<T extends readonly unknown[]>(...inputs: [...ObservableInputTuple<T>]): Observable<T[number]>;
|
||||
/**
|
||||
* An observable initializer function for both the static version and the
|
||||
* operator version of race.
|
||||
* @param sources The sources to race
|
||||
*/
|
||||
export declare function raceInit<T>(sources: ObservableInput<T>[]): (subscriber: Subscriber<T>) => void;
|
||||
//# sourceMappingURL=race.d.ts.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "web-streams-polyfill-es6",
|
||||
"main": "../dist/polyfill.es6",
|
||||
"browser": "../dist/polyfill.es6.min.js",
|
||||
"module": "../dist/polyfill.es6.mjs",
|
||||
"types": "../dist/types/polyfill.d.ts"
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
if (require.main !== module) {
|
||||
throw new Error('Executable-only module should not be required');
|
||||
}
|
||||
|
||||
// we must import global ShellJS methods after the require.main check to prevent the global
|
||||
// namespace from being polluted if the error is caught
|
||||
require('../global');
|
||||
|
||||
function exitWithErrorMessage(msg) {
|
||||
console.log(msg);
|
||||
console.log();
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (process.argv.length < 3) {
|
||||
exitWithErrorMessage('ShellJS: missing argument (script name)');
|
||||
}
|
||||
|
||||
var args,
|
||||
scriptName = process.argv[2];
|
||||
env['NODE_PATH'] = __dirname + '/../..';
|
||||
|
||||
if (!scriptName.match(/\.js/) && !scriptName.match(/\.coffee/)) {
|
||||
if (test('-f', scriptName + '.js'))
|
||||
scriptName += '.js';
|
||||
if (test('-f', scriptName + '.coffee'))
|
||||
scriptName += '.coffee';
|
||||
}
|
||||
|
||||
if (!test('-f', scriptName)) {
|
||||
exitWithErrorMessage('ShellJS: script not found ('+scriptName+')');
|
||||
}
|
||||
|
||||
args = process.argv.slice(3);
|
||||
|
||||
for (var i = 0, l = args.length; i < l; i++) {
|
||||
if (args[i][0] !== "-"){
|
||||
args[i] = '"' + args[i] + '"'; // fixes arguments with multiple words
|
||||
}
|
||||
}
|
||||
|
||||
var path = require('path');
|
||||
var extensions = require('interpret').extensions;
|
||||
var rechoir = require('rechoir');
|
||||
rechoir.prepare(extensions, scriptName);
|
||||
require(require.resolve(path.resolve(process.cwd(), scriptName)));
|
||||
@@ -0,0 +1,107 @@
|
||||
/**
|
||||
Omit any index signatures from the given object type, leaving only explicitly defined properties.
|
||||
|
||||
This is the counterpart of `PickIndexSignature`.
|
||||
|
||||
Use-cases:
|
||||
- Remove overly permissive signatures from third-party types.
|
||||
|
||||
This type was taken from this [StackOverflow answer](https://stackoverflow.com/a/68261113/420747).
|
||||
|
||||
It relies on the fact that an empty object (`{}`) is assignable to an object with just an index signature, like `Record<string, unknown>`, but not to an object with explicitly defined keys, like `Record<'foo' | 'bar', unknown>`.
|
||||
|
||||
(The actual value type, `unknown`, is irrelevant and could be any type. Only the key type matters.)
|
||||
|
||||
```
|
||||
const indexed: Record<string, unknown> = {}; // Allowed
|
||||
|
||||
const keyed: Record<'foo', unknown> = {}; // Error
|
||||
// => TS2739: Type '{}' is missing the following properties from type 'Record<"foo" | "bar", unknown>': foo, bar
|
||||
```
|
||||
|
||||
Instead of causing a type error like the above, you can also use a [conditional type](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html) to test whether a type is assignable to another:
|
||||
|
||||
```
|
||||
type Indexed = {} extends Record<string, unknown>
|
||||
? '✅ `{}` is assignable to `Record<string, unknown>`'
|
||||
: '❌ `{}` is NOT assignable to `Record<string, unknown>`';
|
||||
// => '✅ `{}` is assignable to `Record<string, unknown>`'
|
||||
|
||||
type Keyed = {} extends Record<'foo' | 'bar', unknown>
|
||||
? "✅ `{}` is assignable to `Record<'foo' | 'bar', unknown>`"
|
||||
: "❌ `{}` is NOT assignable to `Record<'foo' | 'bar', unknown>`";
|
||||
// => "❌ `{}` is NOT assignable to `Record<'foo' | 'bar', unknown>`"
|
||||
```
|
||||
|
||||
Using a [mapped type](https://www.typescriptlang.org/docs/handbook/2/mapped-types.html#further-exploration), you can then check for each `KeyType` of `ObjectType`...
|
||||
|
||||
```
|
||||
import type {OmitIndexSignature} from 'type-fest';
|
||||
|
||||
type OmitIndexSignature<ObjectType> = {
|
||||
[KeyType in keyof ObjectType // Map each key of `ObjectType`...
|
||||
]: ObjectType[KeyType]; // ...to its original value, i.e. `OmitIndexSignature<Foo> == Foo`.
|
||||
};
|
||||
```
|
||||
|
||||
...whether an empty object (`{}`) would be assignable to an object with that `KeyType` (`Record<KeyType, unknown>`)...
|
||||
|
||||
```
|
||||
import type {OmitIndexSignature} from 'type-fest';
|
||||
|
||||
type OmitIndexSignature<ObjectType> = {
|
||||
[KeyType in keyof ObjectType
|
||||
// Is `{}` assignable to `Record<KeyType, unknown>`?
|
||||
as {} extends Record<KeyType, unknown>
|
||||
? ... // ✅ `{}` is assignable to `Record<KeyType, unknown>`
|
||||
: ... // ❌ `{}` is NOT assignable to `Record<KeyType, unknown>`
|
||||
]: ObjectType[KeyType];
|
||||
};
|
||||
```
|
||||
|
||||
If `{}` is assignable, it means that `KeyType` is an index signature and we want to remove it. If it is not assignable, `KeyType` is a "real" key and we want to keep it.
|
||||
|
||||
```
|
||||
import type {OmitIndexSignature} from 'type-fest';
|
||||
|
||||
type OmitIndexSignature<ObjectType> = {
|
||||
[KeyType in keyof ObjectType
|
||||
as {} extends Record<KeyType, unknown>
|
||||
? never // => Remove this `KeyType`.
|
||||
: KeyType // => Keep this `KeyType` as it is.
|
||||
]: ObjectType[KeyType];
|
||||
};
|
||||
```
|
||||
|
||||
@example
|
||||
```
|
||||
import type {OmitIndexSignature} from 'type-fest';
|
||||
|
||||
interface Example {
|
||||
// These index signatures will be removed.
|
||||
[x: string]: any
|
||||
[x: number]: any
|
||||
[x: symbol]: any
|
||||
[x: `head-${string}`]: string
|
||||
[x: `${string}-tail`]: string
|
||||
[x: `head-${string}-tail`]: string
|
||||
[x: `${bigint}`]: string
|
||||
[x: `embedded-${number}`]: string
|
||||
|
||||
// These explicitly defined keys will remain.
|
||||
foo: 'bar';
|
||||
qux?: 'baz';
|
||||
}
|
||||
|
||||
type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
|
||||
// => { foo: 'bar'; qux?: 'baz' | undefined; }
|
||||
```
|
||||
|
||||
@see PickIndexSignature
|
||||
@category Object
|
||||
*/
|
||||
export type OmitIndexSignature<ObjectType> = {
|
||||
[KeyType in keyof ObjectType as {} extends Record<KeyType, unknown>
|
||||
? never
|
||||
: KeyType]: ObjectType[KeyType];
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"observeOn.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/observeOn.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,SAAI,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAW7F"}
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('sample', require('../sample'), require('./_falseOptions'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "run-async",
|
||||
"version": "2.4.1",
|
||||
"description": "Utility method to run function either synchronously or asynchronously using the common `this.async()` style.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "mocha -R spec"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.12.0"
|
||||
},
|
||||
"repository": "SBoudrias/run-async",
|
||||
"keywords": [
|
||||
"flow",
|
||||
"flow-control",
|
||||
"async"
|
||||
],
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"author": "Simon Boudrias <admin@simonboudrias.com>",
|
||||
"license": "MIT",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"mocha": "^7.1.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"findIndex.js","sourceRoot":"","sources":["../../../../src/internal/operators/findIndex.ts"],"names":[],"mappings":";;;AAEA,qCAAuC;AACvC,+BAAoC;AAuDpC,SAAgB,SAAS,CACvB,SAAsE,EACtE,OAAa;IAEb,OAAO,cAAO,CAAC,iBAAU,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1D,CAAC;AALD,8BAKC"}
|
||||
@@ -0,0 +1,13 @@
|
||||
if(typeof cptable === 'undefined') cptable = {};
|
||||
cptable[57009] = (function(){ var d = [], e = {}, D = [], j;
|
||||
D[0] = "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~
<C29E><C29F>ംഃഅആഇഈഉഊഋഎഏഐഐഒഓഔഔകഖഗഘങചഛജഝഞടഠഡഢണതഥദധനനപഫബഭമയയരറലളഴവശഷസഹ<E0B4B8>ാിീുൂൃെേൈൈൊോൌൌ്<E0B58C>.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>൦൧൨൩൪൫൬൭൮൯<E0B5AE><E0B5AF><EFBFBD><EFBFBD><EFBFBD>".split("");
|
||||
for(j = 0; j != D[0].length; ++j) if(D[0][j].charCodeAt(0) !== 0xFFFD) { e[D[0][j]] = 0 + j; d[0 + j] = D[0][j];}
|
||||
D[166] = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ഌ<EFBFBD><E0B48C><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>".split("");
|
||||
for(j = 0; j != D[166].length; ++j) if(D[166][j].charCodeAt(0) !== 0xFFFD) { e[D[166][j]] = 42496 + j; d[42496 + j] = D[166][j];}
|
||||
D[167] = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ൡ<EFBFBD><E0B5A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>".split("");
|
||||
for(j = 0; j != D[167].length; ++j) if(D[167][j].charCodeAt(0) !== 0xFFFD) { e[D[167][j]] = 42752 + j; d[42752 + j] = D[167][j];}
|
||||
D[170] = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ൠ<EFBFBD><E0B5A0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>".split("");
|
||||
for(j = 0; j != D[170].length; ++j) if(D[170][j].charCodeAt(0) !== 0xFFFD) { e[D[170][j]] = 43520 + j; d[43520 + j] = D[170][j];}
|
||||
D[239] = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>൯൯൯൯൯൯൯൯൯൯൯൯<E0B5AF><E0B5AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>".split("");
|
||||
for(j = 0; j != D[239].length; ++j) if(D[239][j].charCodeAt(0) !== 0xFFFD) { e[D[239][j]] = 61184 + j; d[61184 + j] = D[239][j];}
|
||||
return {"enc": e, "dec": d }; })();
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"debounceTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/debounceTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA2DhE,MAAM,UAAU,YAAY,CAAI,OAAe,EAAE,YAA2B,cAAc;IACxF,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,UAAU,GAAwB,IAAI,CAAC;QAC3C,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,IAAI,QAAQ,GAAkB,IAAI,CAAC;QAEnC,MAAM,IAAI,GAAG,GAAG,EAAE;YAChB,IAAI,UAAU,EAAE;gBAEd,UAAU,CAAC,WAAW,EAAE,CAAC;gBACzB,UAAU,GAAG,IAAI,CAAC;gBAClB,MAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC;QACF,SAAS,YAAY;YAInB,MAAM,UAAU,GAAG,QAAS,GAAG,OAAO,CAAC;YACvC,MAAM,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAC5B,IAAI,GAAG,GAAG,UAAU,EAAE;gBAEpB,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,UAAU,GAAG,GAAG,CAAC,CAAC;gBACxD,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBAC3B,OAAO;aACR;YAED,IAAI,EAAE,CAAC;QACT,CAAC;QAED,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAQ,EAAE,EAAE;YACX,SAAS,GAAG,KAAK,CAAC;YAClB,QAAQ,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAG3B,IAAI,CAAC,UAAU,EAAE;gBACf,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;gBACvD,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;aAC5B;QACH,CAAC,EACD,GAAG,EAAE;YAGH,IAAI,EAAE,CAAC;YACP,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EACT,GAAG,EAAE;YAEH,SAAS,GAAG,UAAU,GAAG,IAAI,CAAC;QAChC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
@@ -0,0 +1,33 @@
|
||||
var baseIteratee = require('./_baseIteratee'),
|
||||
baseSum = require('./_baseSum');
|
||||
|
||||
/**
|
||||
* This method is like `_.sum` except that it accepts `iteratee` which is
|
||||
* invoked for each element in `array` to generate the value to be summed.
|
||||
* The iteratee is invoked with one argument: (value).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Math
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
||||
* @returns {number} Returns the sum.
|
||||
* @example
|
||||
*
|
||||
* var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
|
||||
*
|
||||
* _.sumBy(objects, function(o) { return o.n; });
|
||||
* // => 20
|
||||
*
|
||||
* // The `_.property` iteratee shorthand.
|
||||
* _.sumBy(objects, 'n');
|
||||
* // => 20
|
||||
*/
|
||||
function sumBy(array, iteratee) {
|
||||
return (array && array.length)
|
||||
? baseSum(array, baseIteratee(iteratee, 2))
|
||||
: 0;
|
||||
}
|
||||
|
||||
module.exports = sumBy;
|
||||
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $Number = GetIntrinsic('%Number%');
|
||||
|
||||
var isPrimitive = require('../helpers/isPrimitive');
|
||||
|
||||
var ToPrimitive = require('./ToPrimitive');
|
||||
var ToNumber = require('./ToNumber');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/11.0/#sec-tonumeric
|
||||
|
||||
module.exports = function ToNumeric(argument) {
|
||||
var primValue = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
|
||||
if (Type(primValue) === 'BigInt') {
|
||||
return primValue;
|
||||
}
|
||||
return ToNumber(primValue);
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('last', require('../last'), require('./_falseOptions'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,19 @@
|
||||
import { UNICODE_EXTENSION_SEQUENCE_REGEX } from './utils';
|
||||
import { BestAvailableLocale } from './BestAvailableLocale';
|
||||
/**
|
||||
* https://tc39.es/ecma402/#sec-lookupsupportedlocales
|
||||
* @param availableLocales
|
||||
* @param requestedLocales
|
||||
*/
|
||||
export function LookupSupportedLocales(availableLocales, requestedLocales) {
|
||||
var subset = [];
|
||||
for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
|
||||
var locale = requestedLocales_1[_i];
|
||||
var noExtensionLocale = locale.replace(UNICODE_EXTENSION_SEQUENCE_REGEX, '');
|
||||
var availableLocale = BestAvailableLocale(availableLocales, noExtensionLocale);
|
||||
if (availableLocale) {
|
||||
subset.push(availableLocale);
|
||||
}
|
||||
}
|
||||
return subset;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
module.exports =
|
||||
function(Promise, PromiseArray, debug) {
|
||||
var PromiseInspection = Promise.PromiseInspection;
|
||||
var util = require("./util");
|
||||
|
||||
function SettledPromiseArray(values) {
|
||||
this.constructor$(values);
|
||||
}
|
||||
util.inherits(SettledPromiseArray, PromiseArray);
|
||||
|
||||
SettledPromiseArray.prototype._promiseResolved = function (index, inspection) {
|
||||
this._values[index] = inspection;
|
||||
var totalResolved = ++this._totalResolved;
|
||||
if (totalResolved >= this._length) {
|
||||
this._resolve(this._values);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
SettledPromiseArray.prototype._promiseFulfilled = function (value, index) {
|
||||
var ret = new PromiseInspection();
|
||||
ret._bitField = 33554432;
|
||||
ret._settledValueField = value;
|
||||
return this._promiseResolved(index, ret);
|
||||
};
|
||||
SettledPromiseArray.prototype._promiseRejected = function (reason, index) {
|
||||
var ret = new PromiseInspection();
|
||||
ret._bitField = 16777216;
|
||||
ret._settledValueField = reason;
|
||||
return this._promiseResolved(index, ret);
|
||||
};
|
||||
|
||||
Promise.settle = function (promises) {
|
||||
debug.deprecated(".settle()", ".reflect()");
|
||||
return new SettledPromiseArray(promises).promise();
|
||||
};
|
||||
|
||||
Promise.allSettled = function (promises) {
|
||||
return new SettledPromiseArray(promises).promise();
|
||||
};
|
||||
|
||||
Promise.prototype.settle = function () {
|
||||
return Promise.settle(this);
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var hasSymbols = require('../');
|
||||
var runSymbolTests = require('./tests');
|
||||
|
||||
test('interface', function (t) {
|
||||
t.equal(typeof hasSymbols, 'function', 'is a function');
|
||||
t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Symbols are supported', { skip: !hasSymbols() }, function (t) {
|
||||
runSymbolTests(t);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Symbols are not supported', { skip: hasSymbols() }, function (t) {
|
||||
t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined');
|
||||
t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist');
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1,257 @@
|
||||
# config-chain
|
||||
|
||||
A module for loading custom configurations
|
||||
|
||||
## NOTE: Feature Freeze
|
||||
|
||||
[](http://github.com/badges/stability-badges)
|
||||
|
||||
This module is frozen.
|
||||
|
||||
In general, we recommend using [rc](https://github.com/dominictarr/rc) instead,
|
||||
but as [npm](https://github.com/npmjs/npm) depends on this, it cannot be changed.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
yarn add config-chain
|
||||
|
||||
# npm users
|
||||
npm install --save config-chain
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const cc = require('config-chain');
|
||||
|
||||
console.log(cc.env('TERM_', process.env));
|
||||
/*
|
||||
{ SESSION_ID: 'w1:5F38',
|
||||
PROGRAM_VERSION: '3.1.2',
|
||||
PROGRAM: 'iTerm.app' }
|
||||
*/
|
||||
```
|
||||
|
||||
The `.env` function gets all the keys on the provided object which are
|
||||
prefixed by the specified prefix, removes the prefix, and puts the values on a new object.
|
||||
|
||||
<br/>
|
||||
|
||||
## Full Usage
|
||||
|
||||
``` js
|
||||
|
||||
// npm install config-chain
|
||||
|
||||
var cc = require('config-chain')
|
||||
, opts = require('optimist').argv //ALWAYS USE OPTIMIST FOR COMMAND LINE OPTIONS.
|
||||
, env = opts.env || process.env.YOUR_APP_ENV || 'dev' //SET YOUR ENV LIKE THIS.
|
||||
|
||||
// EACH ARG TO CONFIGURATOR IS LOADED INTO CONFIGURATION CHAIN
|
||||
// EARLIER ITEMS OVERIDE LATER ITEMS
|
||||
// PUTS COMMAND LINE OPTS FIRST, AND DEFAULTS LAST!
|
||||
|
||||
//strings are interpereted as filenames.
|
||||
//will be loaded synchronously
|
||||
|
||||
var conf =
|
||||
cc(
|
||||
//OVERRIDE SETTINGS WITH COMMAND LINE OPTS
|
||||
opts,
|
||||
|
||||
//ENV VARS IF PREFIXED WITH 'myApp_'
|
||||
|
||||
cc.env('myApp_'), //myApp_foo = 'like this'
|
||||
|
||||
//FILE NAMED BY ENV
|
||||
path.join(__dirname, 'config.' + env + '.json'),
|
||||
|
||||
//IF `env` is PRODUCTION
|
||||
env === 'prod'
|
||||
? path.join(__dirname, 'special.json') //load a special file
|
||||
: null //NULL IS IGNORED!
|
||||
|
||||
//SUBDIR FOR ENV CONFIG
|
||||
path.join(__dirname, 'config', env, 'config.json'),
|
||||
|
||||
//SEARCH PARENT DIRECTORIES FROM CURRENT DIR FOR FILE
|
||||
cc.find('config.json'),
|
||||
|
||||
//PUT DEFAULTS LAST
|
||||
{
|
||||
host: 'localhost'
|
||||
port: 8000
|
||||
})
|
||||
|
||||
var host = conf.get('host')
|
||||
|
||||
// or
|
||||
|
||||
var host = conf.store.host
|
||||
|
||||
```
|
||||
|
||||
Finally, flexible configurations! 👌
|
||||
|
||||
## Custom Configuations
|
||||
|
||||
```javascript
|
||||
var cc = require('config-chain')
|
||||
|
||||
// all the stuff you did before
|
||||
var config = cc({
|
||||
some: 'object'
|
||||
},
|
||||
cc.find('config.json'),
|
||||
cc.env('myApp_')
|
||||
)
|
||||
// CONFIGS AS A SERVICE, aka "CaaS", aka EVERY DEVOPS DREAM OMG!
|
||||
.addUrl('http://configurator:1234/my-configs')
|
||||
// ASYNC FTW!
|
||||
.addFile('/path/to/file.json')
|
||||
|
||||
// OBJECTS ARE OK TOO, they're SYNC but they still ORDER RIGHT
|
||||
// BECAUSE PROMISES ARE USED BUT NO, NOT *THOSE* PROMISES, JUST
|
||||
// ACTUAL PROMISES LIKE YOU MAKE TO YOUR MOM, KEPT OUT OF LOVE
|
||||
.add({ another: 'object' })
|
||||
|
||||
// DIE A THOUSAND DEATHS IF THIS EVER HAPPENS!!
|
||||
.on('error', function (er) {
|
||||
// IF ONLY THERE WAS SOMETHIGN HARDER THAN THROW
|
||||
// MY SORROW COULD BE ADEQUATELY EXPRESSED. /o\
|
||||
throw er
|
||||
})
|
||||
|
||||
// THROW A PARTY IN YOUR FACE WHEN ITS ALL LOADED!!
|
||||
.on('load', function (config) {
|
||||
console.awesome('HOLY SHIT!')
|
||||
})
|
||||
```
|
||||
|
||||
# API Docs
|
||||
|
||||
## cc(...args)
|
||||
|
||||
MAKE A CHAIN AND ADD ALL THE ARGS.
|
||||
|
||||
If the arg is a STRING, then it shall be a JSON FILENAME.
|
||||
|
||||
RETURN THE CHAIN!
|
||||
|
||||
## cc.json(...args)
|
||||
|
||||
Join the args into a JSON filename!
|
||||
|
||||
SYNC I/O!
|
||||
|
||||
## cc.find(relativePath)
|
||||
|
||||
SEEK the RELATIVE PATH by climbing the TREE OF DIRECTORIES.
|
||||
|
||||
RETURN THE FOUND PATH!
|
||||
|
||||
SYNC I/O!
|
||||
|
||||
## cc.parse(content, file, type)
|
||||
|
||||
Parse the content string, and guess the type from either the
|
||||
specified type or the filename.
|
||||
|
||||
RETURN THE RESULTING OBJECT!
|
||||
|
||||
NO I/O!
|
||||
|
||||
## cc.env(prefix, env=process.env)
|
||||
|
||||
Get all the keys on the provided object which are
|
||||
prefixed by the specified prefix, removes the prefix, and puts the values on a new object.
|
||||
|
||||
RETURN THE RESULTING OBJECT!
|
||||
|
||||
NO I/O!
|
||||
|
||||
## cc.ConfigChain()
|
||||
|
||||
The ConfigChain class for CRAY CRAY JQUERY STYLE METHOD CHAINING!
|
||||
|
||||
One of these is returned by the main exported function, as well.
|
||||
|
||||
It inherits (prototypically) from
|
||||
[ProtoList](https://github.com/isaacs/proto-list/), and also inherits
|
||||
(parasitically) from
|
||||
[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter)
|
||||
|
||||
It has all the methods from both, and except where noted, they are
|
||||
unchanged.
|
||||
|
||||
### LET IT BE KNOWN THAT chain IS AN INSTANCE OF ConfigChain.
|
||||
|
||||
## chain.sources
|
||||
|
||||
A list of all the places where it got stuff. The keys are the names
|
||||
passed to addFile or addUrl etc, and the value is an object with some
|
||||
info about the data source.
|
||||
|
||||
## chain.addFile(filename, type, [name=filename])
|
||||
|
||||
Filename is the name of the file. Name is an arbitrary string to be
|
||||
used later if you desire. Type is either 'ini' or 'json', and will
|
||||
try to guess intelligently if omitted.
|
||||
|
||||
Loaded files can be saved later.
|
||||
|
||||
## chain.addUrl(url, type, [name=url])
|
||||
|
||||
Same as the filename thing, but with a url.
|
||||
|
||||
Can't be saved later.
|
||||
|
||||
## chain.addEnv(prefix, env, [name='env'])
|
||||
|
||||
Add all the keys from the env object that start with the prefix.
|
||||
|
||||
## chain.addString(data, file, type, [name])
|
||||
|
||||
Parse the string and add it to the set. (Mainly used internally.)
|
||||
|
||||
## chain.add(object, [name])
|
||||
|
||||
Add the object to the set.
|
||||
|
||||
## chain.root {Object}
|
||||
|
||||
The root from which all the other config objects in the set descend
|
||||
prototypically.
|
||||
|
||||
Put your defaults here.
|
||||
|
||||
## chain.set(key, value, name)
|
||||
|
||||
Set the key to the value on the named config object. If name is
|
||||
unset, then set it on the first config object in the set. (That is,
|
||||
the one with the highest priority, which was added first.)
|
||||
|
||||
## chain.get(key, [name])
|
||||
|
||||
Get the key from the named config object explicitly, or from the
|
||||
resolved configs if not specified.
|
||||
|
||||
## chain.save(name, type)
|
||||
|
||||
Write the named config object back to its origin.
|
||||
|
||||
Currently only supported for env and file config types.
|
||||
|
||||
For files, encode the data according to the type.
|
||||
|
||||
## chain.on('save', function () {})
|
||||
|
||||
When one or more files are saved, emits `save` event when they're all
|
||||
saved.
|
||||
|
||||
## chain.on('load', function (chain) {})
|
||||
|
||||
When the config chain has loaded all the specified files and urls and
|
||||
such, the 'load' event fires.
|
||||
@@ -0,0 +1,17 @@
|
||||
import types from './dist/types.js'
|
||||
|
||||
export const binaryOptions = types.binaryOptions
|
||||
export const boolOptions = types.boolOptions
|
||||
export const intOptions = types.intOptions
|
||||
export const nullOptions = types.nullOptions
|
||||
export const strOptions = types.strOptions
|
||||
|
||||
export const Schema = types.Schema
|
||||
export const Alias = types.Alias
|
||||
export const Collection = types.Collection
|
||||
export const Merge = types.Merge
|
||||
export const Node = types.Node
|
||||
export const Pair = types.Pair
|
||||
export const Scalar = types.Scalar
|
||||
export const YAMLMap = types.YAMLMap
|
||||
export const YAMLSeq = types.YAMLSeq
|
||||
@@ -0,0 +1,21 @@
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
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.
|
||||
|
||||
## Glob Logo
|
||||
|
||||
Glob's logo created by Tanya Brassie <http://tanyabrassie.com/>, licensed
|
||||
under a Creative Commons Attribution-ShareAlike 4.0 International License
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"33":0.00985,"47":0.00985,"52":0.08863,"66":0.00492,"68":0.02954,"69":0.00985,"70":0.00492,"72":0.00492,"73":0.00492,"74":0.00492,"75":0.00492,"76":0.00492,"78":0.03447,"79":0.00985,"80":0.02462,"81":0.00492,"82":0.00492,"83":0.00492,"88":0.01477,"91":0.00985,"97":0.00492,"99":0.02462,"101":0.00985,"102":0.10833,"103":0.00985,"104":0.00985,"105":0.00985,"106":0.02462,"107":0.02462,"108":0.09848,"109":2.94948,"110":2.0927,"111":0.00985,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 34 35 36 37 38 39 40 41 42 43 44 45 46 48 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 67 71 77 84 85 86 87 89 90 92 93 94 95 96 98 100 112 3.5 3.6"},D:{"34":0.01477,"38":0.05909,"47":0.01477,"49":0.06894,"53":0.02462,"63":0.08371,"65":0.00985,"68":0.05416,"69":0.03447,"70":0.02954,"71":0.03939,"72":0.04924,"73":0.01477,"74":0.04432,"75":0.03447,"76":0.02954,"77":0.02462,"78":0.04924,"79":0.43331,"80":0.05909,"81":0.06401,"83":0.05416,"84":0.06894,"85":0.09356,"86":0.12802,"87":0.1231,"88":0.06894,"89":0.06894,"90":0.15757,"91":0.10833,"92":0.10833,"93":0.1428,"94":0.09848,"95":0.00492,"96":0.0197,"97":0.01477,"98":0.0197,"99":0.0197,"100":0.02954,"101":0.00985,"102":0.01477,"103":0.08863,"104":0.02462,"105":0.09848,"106":0.03939,"107":0.07386,"108":0.56134,"109":16.58403,"110":9.76922,"111":0.00985,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 35 36 37 39 40 41 42 43 44 45 46 48 50 51 52 54 55 56 57 58 59 60 61 62 64 66 67 112 113"},F:{"28":0.02462,"36":0.01477,"46":0.05416,"53":0.00985,"54":0.00985,"55":0.00985,"58":0.00985,"70":0.00985,"85":0.04432,"90":0.03939,"91":0.00985,"93":0.14772,"94":1.72832,"95":1.3738,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 56 57 60 62 63 64 65 66 67 68 69 71 72 73 74 75 76 77 78 79 80 81 82 83 84 86 87 88 89 92 9.5-9.6 10.5 10.6 11.1 11.5 11.6 12.1","10.0-10.1":0},B:{"18":0.00985,"79":0.00492,"80":0.0197,"81":0.00985,"83":0.00985,"84":0.01477,"85":0.00492,"86":0.02462,"87":0.00985,"88":0.00985,"89":0.01477,"90":0.00985,"91":0.00985,"92":0.00492,"105":0.00492,"107":0.04432,"108":0.10833,"109":1.81696,"110":2.3586,_:"12 13 14 15 16 17 93 94 95 96 97 98 99 100 101 102 103 104 106"},E:{"4":0,"13":0.00492,"14":0.07878,"15":0.02462,_:"0 5 6 7 8 9 10 11 12 3.1 3.2 5.1 6.1 7.1 10.1 11.1 16.4","9.1":0.25605,"12.1":0.01477,"13.1":0.05909,"14.1":0.1428,"15.1":0.02954,"15.2-15.3":0.02954,"15.4":0.04924,"15.5":0.09356,"15.6":0.3693,"16.0":0.04924,"16.1":0.21666,"16.2":0.4727,"16.3":0.43824},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.01239,"6.0-6.1":0,"7.0-7.1":0.00248,"8.1-8.4":0,"9.0-9.2":0.00248,"9.3":0.08427,"10.0-10.2":0.00372,"10.3":0.07559,"11.0-11.2":0.01735,"11.3-11.4":0.00867,"12.0-12.1":0.01363,"12.2-12.5":0.18093,"13.0-13.1":0.00991,"13.2":0.01115,"13.3":0.01115,"13.4-13.7":0.06692,"14.0-14.4":0.13508,"14.5-14.8":0.26148,"15.0-15.1":0.08303,"15.2-15.3":0.10286,"15.4":0.1388,"15.5":0.25652,"15.6":0.73735,"16.0":1.4115,"16.1":2.98038,"16.2":2.99897,"16.3":2.04971,"16.4":0.02355},P:{"4":0.46046,"20":0.94184,"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.01046,"14.0":0.01046,"15.0":0,"16.0":0.02093,"17.0":0.03139,"18.0":0.04186,"19.0":1.53834},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0.00338,"4.2-4.3":0.01523,"4.4":0,"4.4.3-4.4.4":0.0626},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"11":0.07386,_:"6 7 8 9 10 5.5"},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.04061},H:{"0":0.45173},L:{"0":37.74819},R:{_:"0"},M:{"0":0.28933},Q:{"13.1":0}};
|
||||
@@ -0,0 +1,25 @@
|
||||
var arrayPush = require('./_arrayPush'),
|
||||
getPrototype = require('./_getPrototype'),
|
||||
getSymbols = require('./_getSymbols'),
|
||||
stubArray = require('./stubArray');
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
||||
|
||||
/**
|
||||
* Creates an array of the own and inherited enumerable symbols of `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of symbols.
|
||||
*/
|
||||
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
||||
var result = [];
|
||||
while (object) {
|
||||
arrayPush(result, getSymbols(object));
|
||||
object = getPrototype(object);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
module.exports = getSymbolsIn;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"map.js","sourceRoot":"","sources":["../../../../src/internal/operators/map.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA6ChE,MAAM,UAAU,GAAG,CAAO,OAAuC,EAAE,OAAa;IAC9E,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAQ;YAG5C,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QACzD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"name":"ansi-styles","version":"4.3.0","files":{"license":{"checkedAt":1678883669272,"integrity":"sha512-nIst73auX/5NY2Fmv5Y116vWnNrEv4GaIUX3lpZG05rpXJY2S8EX+fpUS5hRjClCM0VdT2Za9DDHXXB5jdSrEw==","mode":420,"size":1109},"package.json":{"checkedAt":1678883669304,"integrity":"sha512-TZllXr06wJQwq2vrQx1PlfcbrEjIf2fRDP4mFPd7IGVaR+7Llz2hNV4VEENE3EaIpsffEoUUAF2b1UYsjtxiww==","mode":420,"size":1054},"readme.md":{"checkedAt":1678883669304,"integrity":"sha512-SnSiNWeK8yC+9cpXRtMfMfucXAGsPaSZAYwvQhaDSlMJbhBDAJEbIrgOFsK7JdZzyt5tc8TogH7xfxLnVp0+Jg==","mode":420,"size":4327},"index.js":{"checkedAt":1678883669304,"integrity":"sha512-NN25IIkUrFPtfA5xYvdNAxOo80jzTbgkQUAoMTwD3mdJlayYu/hW9SGdRNGvFFX6QWeOsU28RjlWe5In7xHKMQ==","mode":420,"size":4139},"index.d.ts":{"checkedAt":1678883669307,"integrity":"sha512-aMh/+pjt6z2J6FBf5er5SXdZH2a5eiWFgayCMy6HQgE7qUeUJvpxPsZgRE67W0LdiunJkpBMAo+RpVwK72TMyQ==","mode":420,"size":6349}}}
|
||||
@@ -0,0 +1,79 @@
|
||||
# once
|
||||
|
||||
Only call a function once.
|
||||
|
||||
## usage
|
||||
|
||||
```javascript
|
||||
var once = require('once')
|
||||
|
||||
function load (file, cb) {
|
||||
cb = once(cb)
|
||||
loader.load('file')
|
||||
loader.once('load', cb)
|
||||
loader.once('error', cb)
|
||||
}
|
||||
```
|
||||
|
||||
Or add to the Function.prototype in a responsible way:
|
||||
|
||||
```javascript
|
||||
// only has to be done once
|
||||
require('once').proto()
|
||||
|
||||
function load (file, cb) {
|
||||
cb = cb.once()
|
||||
loader.load('file')
|
||||
loader.once('load', cb)
|
||||
loader.once('error', cb)
|
||||
}
|
||||
```
|
||||
|
||||
Ironically, the prototype feature makes this module twice as
|
||||
complicated as necessary.
|
||||
|
||||
To check whether you function has been called, use `fn.called`. Once the
|
||||
function is called for the first time the return value of the original
|
||||
function is saved in `fn.value` and subsequent calls will continue to
|
||||
return this value.
|
||||
|
||||
```javascript
|
||||
var once = require('once')
|
||||
|
||||
function load (cb) {
|
||||
cb = once(cb)
|
||||
var stream = createStream()
|
||||
stream.once('data', cb)
|
||||
stream.once('end', function () {
|
||||
if (!cb.called) cb(new Error('not found'))
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
## `once.strict(func)`
|
||||
|
||||
Throw an error if the function is called twice.
|
||||
|
||||
Some functions are expected to be called only once. Using `once` for them would
|
||||
potentially hide logical errors.
|
||||
|
||||
In the example below, the `greet` function has to call the callback only once:
|
||||
|
||||
```javascript
|
||||
function greet (name, cb) {
|
||||
// return is missing from the if statement
|
||||
// when no name is passed, the callback is called twice
|
||||
if (!name) cb('Hello anonymous')
|
||||
cb('Hello ' + name)
|
||||
}
|
||||
|
||||
function log (msg) {
|
||||
console.log(msg)
|
||||
}
|
||||
|
||||
// this will print 'Hello anonymous' but the logical error will be missed
|
||||
greet(null, once(msg))
|
||||
|
||||
// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time
|
||||
greet(null, once.strict(msg))
|
||||
```
|
||||
@@ -0,0 +1,11 @@
|
||||
# `Object.entries` _(ext/object/entries)_
|
||||
|
||||
[Object.entries](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries) implementation.
|
||||
|
||||
Returns native `Object.entries` if it's implemented, otherwise library implementation is returned
|
||||
|
||||
```javascript
|
||||
const entries = require("ext/object/entries");
|
||||
|
||||
entries({ foo: "bar" }); // [["foo", "bar"]]
|
||||
```
|
||||
@@ -0,0 +1,58 @@
|
||||
var assignValue = require('./_assignValue'),
|
||||
copyObject = require('./_copyObject'),
|
||||
createAssigner = require('./_createAssigner'),
|
||||
isArrayLike = require('./isArrayLike'),
|
||||
isPrototype = require('./_isPrototype'),
|
||||
keys = require('./keys');
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Assigns own enumerable string keyed properties of source objects to the
|
||||
* destination object. Source objects are applied from left to right.
|
||||
* Subsequent sources overwrite property assignments of previous sources.
|
||||
*
|
||||
* **Note:** This method mutates `object` and is loosely based on
|
||||
* [`Object.assign`](https://mdn.io/Object/assign).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.10.0
|
||||
* @category Object
|
||||
* @param {Object} object The destination object.
|
||||
* @param {...Object} [sources] The source objects.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @see _.assignIn
|
||||
* @example
|
||||
*
|
||||
* function Foo() {
|
||||
* this.a = 1;
|
||||
* }
|
||||
*
|
||||
* function Bar() {
|
||||
* this.c = 3;
|
||||
* }
|
||||
*
|
||||
* Foo.prototype.b = 2;
|
||||
* Bar.prototype.d = 4;
|
||||
*
|
||||
* _.assign({ 'a': 0 }, new Foo, new Bar);
|
||||
* // => { 'a': 1, 'c': 3 }
|
||||
*/
|
||||
var assign = createAssigner(function(object, source) {
|
||||
if (isPrototype(source) || isArrayLike(source)) {
|
||||
copyObject(source, keys(source), object);
|
||||
return;
|
||||
}
|
||||
for (var key in source) {
|
||||
if (hasOwnProperty.call(source, key)) {
|
||||
assignValue(object, key, source[key]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = assign;
|
||||
@@ -0,0 +1,29 @@
|
||||
import type {IsUnknown} from './internal';
|
||||
|
||||
/**
|
||||
Create a function type with a return type of your choice and the same parameters as the given function type.
|
||||
|
||||
Use-case: You want to define a wrapped function that returns something different while receiving the same parameters. For example, you might want to wrap a function that can throw an error into one that will return `undefined` instead.
|
||||
|
||||
@example
|
||||
```
|
||||
import type {SetReturnType} from 'type-fest';
|
||||
|
||||
type MyFunctionThatCanThrow = (foo: SomeType, bar: unknown) => SomeOtherType;
|
||||
|
||||
type MyWrappedFunction = SetReturnType<MyFunctionThatCanThrow, SomeOtherType | undefined>;
|
||||
//=> type MyWrappedFunction = (foo: SomeType, bar: unknown) => SomeOtherType | undefined;
|
||||
```
|
||||
|
||||
@category Function
|
||||
*/
|
||||
export type SetReturnType<Fn extends (...arguments_: any[]) => any, TypeToReturn> =
|
||||
// Just using `Parameters<Fn>` isn't ideal because it doesn't handle the `this` fake parameter.
|
||||
Fn extends (this: infer ThisArg, ...arguments_: infer Arguments) => any ? (
|
||||
// If a function did not specify the `this` fake parameter, it will be inferred to `unknown`.
|
||||
// We want to detect this situation just to display a friendlier type upon hovering on an IntelliSense-powered IDE.
|
||||
IsUnknown<ThisArg> extends true ? (...arguments_: Arguments) => TypeToReturn : (this: ThisArg, ...arguments_: Arguments) => TypeToReturn
|
||||
) : (
|
||||
// This part should be unreachable, but we make it meaningful just in case…
|
||||
(...arguments_: Parameters<Fn>) => TypeToReturn
|
||||
);
|
||||
@@ -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","257":"N O"},C:{"1":"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 PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB EC FC","578":"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"},D:{"1":"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","194":"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"},E:{"2":"I v J D E HC zB IC JC KC","33":"F A B C K L G LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"1":"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 PC QC RC SC qB AC TC rB","194":"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"},G:{"2":"E zB UC BC VC WC XC YC","33":"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","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 2C 3C 4C 5C sB 6C 7C 8C","2":"I","194":"wC xC yC zC 0C 0B 1C"},Q:{"2":"1B"},R:{"1":"9C"},S:{"2":"AD BD"}},B:7,C:"CSS Backdrop Filter"};
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"typedarray-to-buffer","version":"3.1.5","files":{"LICENSE":{"checkedAt":1678883671280,"integrity":"sha512-7yM/jbYJtwJeLgJzVe4LXntltTdQZBLKGk2V508r4v4oTDo/o2y52F29GjX+ZQ/hTeW02TqwcfICTB/Iz0BzDg==","mode":420,"size":1081},"package.json":{"checkedAt":1678883672616,"integrity":"sha512-FS9BaT99gdcn4mq1H4ZxV7uUCfr6xEv1S6ETFmq6exfjrZoaCiTDvcNIvdN7r33PaDALoNm1kBnUVtqewf3rYQ==","mode":420,"size":1149},".travis.yml":{"checkedAt":1678883672616,"integrity":"sha512-VhIMSHUXVPP/AT8V3/J4fR9cmQrMzOivBNneQdy+En2JYdL7CFBgqBYU2ljT/EAHOXBzH5diC99L8v6WMUaPhg==","mode":420,"size":480},".airtap.yml":{"checkedAt":1678883672616,"integrity":"sha512-FjgmTynBdf/3sIdbl68mL82M5IjhHUwEmmxfkdahYjN7Ay4D4/A3mzsDwhh25wBaW0VHcpRuhhzItP8ZhjBbpQ==","mode":420,"size":279},"index.js":{"checkedAt":1678883672616,"integrity":"sha512-jUnwiTPdr3XHkyGMqAOyWFlF1RioZaR9cytG2pKxdoAlhehSmpSKGVEyke1MFxX80EX7eIue3CIasZYzDphCTw==","mode":420,"size":758},"README.md":{"checkedAt":1678883672616,"integrity":"sha512-8CdL0MQqMJe8SvVZJ7nxpRQ4Tko3lJhHIIXS6B6SAmqg7fPJu6yBefR5j9vK+efM17ASDKygU19ph9bP2bpejg==","mode":420,"size":3463},"test/basic.js":{"checkedAt":1678883672616,"integrity":"sha512-48HMBLrO+IC16zRRf2KC5UN+a9gcts7MDYnJ+hcpKNhlHk0SCnMVrNTY3kQGV3xKEeSC7XpYL75Wss3HB6xWNQ==","mode":420,"size":1625}}}
|
||||
@@ -0,0 +1,114 @@
|
||||
export { audit } from '../internal/operators/audit';
|
||||
export { auditTime } from '../internal/operators/auditTime';
|
||||
export { buffer } from '../internal/operators/buffer';
|
||||
export { bufferCount } from '../internal/operators/bufferCount';
|
||||
export { bufferTime } from '../internal/operators/bufferTime';
|
||||
export { bufferToggle } from '../internal/operators/bufferToggle';
|
||||
export { bufferWhen } from '../internal/operators/bufferWhen';
|
||||
export { catchError } from '../internal/operators/catchError';
|
||||
export { combineAll } from '../internal/operators/combineAll';
|
||||
export { combineLatestAll } from '../internal/operators/combineLatestAll';
|
||||
export { combineLatest } from '../internal/operators/combineLatest';
|
||||
export { combineLatestWith } from '../internal/operators/combineLatestWith';
|
||||
export { concat } from '../internal/operators/concat';
|
||||
export { concatAll } from '../internal/operators/concatAll';
|
||||
export { concatMap } from '../internal/operators/concatMap';
|
||||
export { concatMapTo } from '../internal/operators/concatMapTo';
|
||||
export { concatWith } from '../internal/operators/concatWith';
|
||||
export { connect, ConnectConfig } from '../internal/operators/connect';
|
||||
export { count } from '../internal/operators/count';
|
||||
export { debounce } from '../internal/operators/debounce';
|
||||
export { debounceTime } from '../internal/operators/debounceTime';
|
||||
export { defaultIfEmpty } from '../internal/operators/defaultIfEmpty';
|
||||
export { delay } from '../internal/operators/delay';
|
||||
export { delayWhen } from '../internal/operators/delayWhen';
|
||||
export { dematerialize } from '../internal/operators/dematerialize';
|
||||
export { distinct } from '../internal/operators/distinct';
|
||||
export { distinctUntilChanged } from '../internal/operators/distinctUntilChanged';
|
||||
export { distinctUntilKeyChanged } from '../internal/operators/distinctUntilKeyChanged';
|
||||
export { elementAt } from '../internal/operators/elementAt';
|
||||
export { endWith } from '../internal/operators/endWith';
|
||||
export { every } from '../internal/operators/every';
|
||||
export { exhaust } from '../internal/operators/exhaust';
|
||||
export { exhaustAll } from '../internal/operators/exhaustAll';
|
||||
export { exhaustMap } from '../internal/operators/exhaustMap';
|
||||
export { expand } from '../internal/operators/expand';
|
||||
export { filter } from '../internal/operators/filter';
|
||||
export { finalize } from '../internal/operators/finalize';
|
||||
export { find } from '../internal/operators/find';
|
||||
export { findIndex } from '../internal/operators/findIndex';
|
||||
export { first } from '../internal/operators/first';
|
||||
export { groupBy, BasicGroupByOptions, GroupByOptionsWithElement } from '../internal/operators/groupBy';
|
||||
export { ignoreElements } from '../internal/operators/ignoreElements';
|
||||
export { isEmpty } from '../internal/operators/isEmpty';
|
||||
export { last } from '../internal/operators/last';
|
||||
export { map } from '../internal/operators/map';
|
||||
export { mapTo } from '../internal/operators/mapTo';
|
||||
export { materialize } from '../internal/operators/materialize';
|
||||
export { max } from '../internal/operators/max';
|
||||
export { merge } from '../internal/operators/merge';
|
||||
export { mergeAll } from '../internal/operators/mergeAll';
|
||||
export { flatMap } from '../internal/operators/flatMap';
|
||||
export { mergeMap } from '../internal/operators/mergeMap';
|
||||
export { mergeMapTo } from '../internal/operators/mergeMapTo';
|
||||
export { mergeScan } from '../internal/operators/mergeScan';
|
||||
export { mergeWith } from '../internal/operators/mergeWith';
|
||||
export { min } from '../internal/operators/min';
|
||||
export { multicast } from '../internal/operators/multicast';
|
||||
export { observeOn } from '../internal/operators/observeOn';
|
||||
export { onErrorResumeNext } from '../internal/operators/onErrorResumeNextWith';
|
||||
export { pairwise } from '../internal/operators/pairwise';
|
||||
export { partition } from '../internal/operators/partition';
|
||||
export { pluck } from '../internal/operators/pluck';
|
||||
export { publish } from '../internal/operators/publish';
|
||||
export { publishBehavior } from '../internal/operators/publishBehavior';
|
||||
export { publishLast } from '../internal/operators/publishLast';
|
||||
export { publishReplay } from '../internal/operators/publishReplay';
|
||||
export { race } from '../internal/operators/race';
|
||||
export { raceWith } from '../internal/operators/raceWith';
|
||||
export { reduce } from '../internal/operators/reduce';
|
||||
export { repeat, RepeatConfig } from '../internal/operators/repeat';
|
||||
export { repeatWhen } from '../internal/operators/repeatWhen';
|
||||
export { retry, RetryConfig } from '../internal/operators/retry';
|
||||
export { retryWhen } from '../internal/operators/retryWhen';
|
||||
export { refCount } from '../internal/operators/refCount';
|
||||
export { sample } from '../internal/operators/sample';
|
||||
export { sampleTime } from '../internal/operators/sampleTime';
|
||||
export { scan } from '../internal/operators/scan';
|
||||
export { sequenceEqual } from '../internal/operators/sequenceEqual';
|
||||
export { share, ShareConfig } from '../internal/operators/share';
|
||||
export { shareReplay, ShareReplayConfig } from '../internal/operators/shareReplay';
|
||||
export { single } from '../internal/operators/single';
|
||||
export { skip } from '../internal/operators/skip';
|
||||
export { skipLast } from '../internal/operators/skipLast';
|
||||
export { skipUntil } from '../internal/operators/skipUntil';
|
||||
export { skipWhile } from '../internal/operators/skipWhile';
|
||||
export { startWith } from '../internal/operators/startWith';
|
||||
export { subscribeOn } from '../internal/operators/subscribeOn';
|
||||
export { switchAll } from '../internal/operators/switchAll';
|
||||
export { switchMap } from '../internal/operators/switchMap';
|
||||
export { switchMapTo } from '../internal/operators/switchMapTo';
|
||||
export { switchScan } from '../internal/operators/switchScan';
|
||||
export { take } from '../internal/operators/take';
|
||||
export { takeLast } from '../internal/operators/takeLast';
|
||||
export { takeUntil } from '../internal/operators/takeUntil';
|
||||
export { takeWhile } from '../internal/operators/takeWhile';
|
||||
export { tap } from '../internal/operators/tap';
|
||||
export { throttle, ThrottleConfig } from '../internal/operators/throttle';
|
||||
export { throttleTime } from '../internal/operators/throttleTime';
|
||||
export { throwIfEmpty } from '../internal/operators/throwIfEmpty';
|
||||
export { timeInterval } from '../internal/operators/timeInterval';
|
||||
export { timeout, TimeoutConfig, TimeoutInfo } from '../internal/operators/timeout';
|
||||
export { timeoutWith } from '../internal/operators/timeoutWith';
|
||||
export { timestamp } from '../internal/operators/timestamp';
|
||||
export { toArray } from '../internal/operators/toArray';
|
||||
export { window } from '../internal/operators/window';
|
||||
export { windowCount } from '../internal/operators/windowCount';
|
||||
export { windowTime } from '../internal/operators/windowTime';
|
||||
export { windowToggle } from '../internal/operators/windowToggle';
|
||||
export { windowWhen } from '../internal/operators/windowWhen';
|
||||
export { withLatestFrom } from '../internal/operators/withLatestFrom';
|
||||
export { zip } from '../internal/operators/zip';
|
||||
export { zipAll } from '../internal/operators/zipAll';
|
||||
export { zipWith } from '../internal/operators/zipWith';
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"repeat.js","sourceRoot":"","sources":["../../../../src/internal/operators/repeat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AA6G5C,MAAM,UAAU,MAAM,CAAI,aAAqC;;IAC7D,IAAI,KAAK,GAAG,QAAQ,CAAC;IACrB,IAAI,KAA4B,CAAC;IAEjC,IAAI,aAAa,IAAI,IAAI,EAAE;QACzB,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;YACrC,CAAG,KAA4B,aAAa,MAAzB,EAAhB,KAAK,mBAAG,QAAQ,KAAA,EAAE,KAAK,GAAK,aAAa,MAAlB,CAAmB,CAAC;SAC/C;aAAM;YACL,KAAK,GAAG,aAAa,CAAC;SACvB;KACF;IAED,OAAO,KAAK,IAAI,CAAC;QACf,CAAC,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK;QACb,CAAC,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,IAAI,KAAK,GAAG,CAAC,CAAC;YACd,IAAI,SAA8B,CAAC;YAEnC,IAAM,WAAW,GAAG;gBAClB,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,WAAW,EAAE,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,IAAI,KAAK,IAAI,IAAI,EAAE;oBACjB,IAAM,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;oBACpF,IAAM,oBAAkB,GAAG,wBAAwB,CAAC,UAAU,EAAE;wBAC9D,oBAAkB,CAAC,WAAW,EAAE,CAAC;wBACjC,iBAAiB,EAAE,CAAC;oBACtB,CAAC,CAAC,CAAC;oBACH,QAAQ,CAAC,SAAS,CAAC,oBAAkB,CAAC,CAAC;iBACxC;qBAAM;oBACL,iBAAiB,EAAE,CAAC;iBACrB;YACH,CAAC,CAAC;YAEF,IAAM,iBAAiB,GAAG;gBACxB,IAAI,SAAS,GAAG,KAAK,CAAC;gBACtB,SAAS,GAAG,MAAM,CAAC,SAAS,CAC1B,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE;oBAC9C,IAAI,EAAE,KAAK,GAAG,KAAK,EAAE;wBACnB,IAAI,SAAS,EAAE;4BACb,WAAW,EAAE,CAAC;yBACf;6BAAM;4BACL,SAAS,GAAG,IAAI,CAAC;yBAClB;qBACF;yBAAM;wBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;gBACH,CAAC,CAAC,CACH,CAAC;gBAEF,IAAI,SAAS,EAAE;oBACb,WAAW,EAAE,CAAC;iBACf;YACH,CAAC,CAAC;YAEF,iBAAiB,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;AACT,CAAC"}
|
||||
@@ -0,0 +1,26 @@
|
||||
'use strict';
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
var $boolToStr = callBound('Boolean.prototype.toString');
|
||||
var $toString = callBound('Object.prototype.toString');
|
||||
|
||||
var tryBooleanObject = function booleanBrandCheck(value) {
|
||||
try {
|
||||
$boolToStr(value);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
var boolClass = '[object Boolean]';
|
||||
var hasToStringTag = require('has-tostringtag/shams')();
|
||||
|
||||
module.exports = function isBoolean(value) {
|
||||
if (typeof value === 'boolean') {
|
||||
return true;
|
||||
}
|
||||
if (value === null || typeof value !== 'object') {
|
||||
return false;
|
||||
}
|
||||
return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString(value) === boolClass;
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
'use strict'
|
||||
|
||||
const u = require('universalify').fromCallback
|
||||
module.exports = {
|
||||
move: u(require('./move'))
|
||||
}
|
||||
Reference in New Issue
Block a user