new license file version [CI SKIP]

This commit is contained in:
2023-03-15 12:34:41 +00:00
parent 0a6d92a1f3
commit 61328d20ed
13115 changed files with 1892314 additions and 1 deletions

View File

@@ -0,0 +1,206 @@
# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![NPM total downloads](https://img.shields.io/npm/dt/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/github/workflow/status/micromatch/is-glob/dev)](https://github.com/micromatch/is-glob/actions)
> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save is-glob
```
You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob).
## Usage
```js
var isGlob = require('is-glob');
```
### Default behavior
**True**
Patterns that have glob characters or regex patterns will return `true`:
```js
isGlob('!foo.js');
isGlob('*.js');
isGlob('**/abc.js');
isGlob('abc/*.js');
isGlob('abc/(aaa|bbb).js');
isGlob('abc/[a-z].js');
isGlob('abc/{a,b}.js');
//=> true
```
Extglobs
```js
isGlob('abc/@(a).js');
isGlob('abc/!(a).js');
isGlob('abc/+(a).js');
isGlob('abc/*(a).js');
isGlob('abc/?(a).js');
//=> true
```
**False**
Escaped globs or extglobs return `false`:
```js
isGlob('abc/\\@(a).js');
isGlob('abc/\\!(a).js');
isGlob('abc/\\+(a).js');
isGlob('abc/\\*(a).js');
isGlob('abc/\\?(a).js');
isGlob('\\!foo.js');
isGlob('\\*.js');
isGlob('\\*\\*/abc.js');
isGlob('abc/\\*.js');
isGlob('abc/\\(aaa|bbb).js');
isGlob('abc/\\[a-z].js');
isGlob('abc/\\{a,b}.js');
//=> false
```
Patterns that do not have glob patterns return `false`:
```js
isGlob('abc.js');
isGlob('abc/def/ghi.js');
isGlob('foo.js');
isGlob('abc/@.js');
isGlob('abc/+.js');
isGlob('abc/?.js');
isGlob();
isGlob(null);
//=> false
```
Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)):
```js
isGlob(['**/*.js']);
isGlob(['foo.js']);
//=> false
```
### Option strict
When `options.strict === false` the behavior is less strict in determining if a pattern is a glob. Meaning that
some patterns that would return `false` may return `true`. This is done so that matching libraries like [micromatch](https://github.com/micromatch/micromatch) have a chance at determining if the pattern is a glob or not.
**True**
Patterns that have glob characters or regex patterns will return `true`:
```js
isGlob('!foo.js', {strict: false});
isGlob('*.js', {strict: false});
isGlob('**/abc.js', {strict: false});
isGlob('abc/*.js', {strict: false});
isGlob('abc/(aaa|bbb).js', {strict: false});
isGlob('abc/[a-z].js', {strict: false});
isGlob('abc/{a,b}.js', {strict: false});
//=> true
```
Extglobs
```js
isGlob('abc/@(a).js', {strict: false});
isGlob('abc/!(a).js', {strict: false});
isGlob('abc/+(a).js', {strict: false});
isGlob('abc/*(a).js', {strict: false});
isGlob('abc/?(a).js', {strict: false});
//=> true
```
**False**
Escaped globs or extglobs return `false`:
```js
isGlob('\\!foo.js', {strict: false});
isGlob('\\*.js', {strict: false});
isGlob('\\*\\*/abc.js', {strict: false});
isGlob('abc/\\*.js', {strict: false});
isGlob('abc/\\(aaa|bbb).js', {strict: false});
isGlob('abc/\\[a-z].js', {strict: false});
isGlob('abc/\\{a,b}.js', {strict: false});
//=> false
```
## About
<details>
<summary><strong>Contributing</strong></summary>
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
</details>
<details>
<summary><strong>Running Tests</strong></summary>
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```
</details>
<details>
<summary><strong>Building docs</strong></summary>
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
</details>
### Related projects
You might also be interested in these projects:
* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit")
* [base](https://www.npmjs.com/package/base): Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks | [homepage](https://github.com/node-base/base "Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks")
* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.")
* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.")
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 47 | [jonschlinkert](https://github.com/jonschlinkert) |
| 5 | [doowb](https://github.com/doowb) |
| 1 | [phated](https://github.com/phated) |
| 1 | [danhper](https://github.com/danhper) |
| 1 | [paulmillr](https://github.com/paulmillr) |
### Author
**Jon Schlinkert**
* [GitHub Profile](https://github.com/jonschlinkert)
* [Twitter Profile](https://twitter.com/jonschlinkert)
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
### License
Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on March 27, 2019._

View File

@@ -0,0 +1,85 @@
{
"name": "postcss",
"version": "8.4.21",
"description": "Tool for transforming styles with JS plugins",
"engines": {
"node": "^10 || ^12 || >=14"
},
"exports": {
".": {
"require": "./lib/postcss.js",
"import": "./lib/postcss.mjs",
"types": "./lib/postcss.d.ts"
},
"./lib/at-rule": "./lib/at-rule.js",
"./lib/comment": "./lib/comment.js",
"./lib/container": "./lib/container.js",
"./lib/css-syntax-error": "./lib/css-syntax-error.js",
"./lib/declaration": "./lib/declaration.js",
"./lib/fromJSON": "./lib/fromJSON.js",
"./lib/input": "./lib/input.js",
"./lib/lazy-result": "./lib/lazy-result.js",
"./lib/no-work-result": "./lib/no-work-result.js",
"./lib/list": "./lib/list.js",
"./lib/map-generator": "./lib/map-generator.js",
"./lib/node": "./lib/node.js",
"./lib/parse": "./lib/parse.js",
"./lib/parser": "./lib/parser.js",
"./lib/postcss": "./lib/postcss.js",
"./lib/previous-map": "./lib/previous-map.js",
"./lib/processor": "./lib/processor.js",
"./lib/result": "./lib/result.js",
"./lib/root": "./lib/root.js",
"./lib/rule": "./lib/rule.js",
"./lib/stringifier": "./lib/stringifier.js",
"./lib/stringify": "./lib/stringify.js",
"./lib/symbols": "./lib/symbols.js",
"./lib/terminal-highlight": "./lib/terminal-highlight.js",
"./lib/tokenize": "./lib/tokenize.js",
"./lib/warn-once": "./lib/warn-once.js",
"./lib/warning": "./lib/warning.js",
"./package.json": "./package.json"
},
"main": "./lib/postcss.js",
"types": "./lib/postcss.d.ts",
"keywords": [
"css",
"postcss",
"rework",
"preprocessor",
"parser",
"source map",
"transform",
"manipulation",
"transpiler"
],
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/postcss"
}
],
"author": "Andrey Sitnik <andrey@sitnik.ru>",
"license": "MIT",
"homepage": "https://postcss.org/",
"repository": "postcss/postcss",
"bugs": {
"url": "https://github.com/postcss/postcss/issues"
},
"dependencies": {
"nanoid": "^3.3.4",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
},
"browser": {
"./lib/terminal-highlight": false,
"source-map-js": false,
"path": false,
"url": false,
"fs": false
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"debounce.js","sourceRoot":"","sources":["../../../../src/internal/operators/debounce.ts"],"names":[],"mappings":";;;AAEA,qCAAuC;AACvC,qCAAoC;AACpC,2DAAgE;AAChE,qDAAoD;AA4DpD,SAAgB,QAAQ,CAAI,gBAAoD;IAC9E,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAE/B,IAAI,kBAAkB,GAA2B,IAAI,CAAC;QAEtD,IAAM,IAAI,GAAG;YAIX,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW,EAAE,CAAC;YAClC,kBAAkB,GAAG,IAAI,CAAC;YAC1B,IAAI,QAAQ,EAAE;gBAEZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,IAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;YAIP,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW,EAAE,CAAC;YAClC,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;YAGlB,kBAAkB,GAAG,6CAAwB,CAAC,UAAU,EAAE,IAAI,EAAE,WAAI,CAAC,CAAC;YAEtE,qBAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QACnE,CAAC,EACD;YAGE,IAAI,EAAE,CAAC;YACP,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EACT;YAEE,SAAS,GAAG,kBAAkB,GAAG,IAAI,CAAC;QACxC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AArDD,4BAqDC"}

View File

@@ -0,0 +1,17 @@
const types = require('./dist/types')
exports.binaryOptions = types.binaryOptions
exports.boolOptions = types.boolOptions
exports.intOptions = types.intOptions
exports.nullOptions = types.nullOptions
exports.strOptions = types.strOptions
exports.Schema = types.Schema
exports.Alias = types.Alias
exports.Collection = types.Collection
exports.Merge = types.Merge
exports.Node = types.Node
exports.Pair = types.Pair
exports.Scalar = types.Scalar
exports.YAMLMap = types.YAMLMap
exports.YAMLSeq = types.YAMLSeq

View File

@@ -0,0 +1,15 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## v1.0.0 - 2022-09-22
### Commits
- Initial implementation, tests, readme [`0273e9f`](https://github.com/ljharb/safe-regex-test/commit/0273e9f96f4b09df413523f4faacc8ae9ac5e6cb)
- Initial commit [`b6c1edf`](https://github.com/ljharb/safe-regex-test/commit/b6c1edf740e6105fb71c34c1c69fadd837e8f7ab)
- npm init [`c7f5765`](https://github.com/ljharb/safe-regex-test/commit/c7f576580607b16458b5a16e6bfa3b639e49c6bd)
- Only apps should have lockfiles [`1162bf0`](https://github.com/ljharb/safe-regex-test/commit/1162bf011835040f7e2c9936734294b2d98536bf)

View File

@@ -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:{"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 EC FC","260":"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"},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","324":"RB SB TB UB VB WB XB YB uB ZB vB"},E:{"2":"I v J D E F A HC zB IC JC KC LC 0B","132":"B C K L G qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"1":"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 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB PC QC RC SC qB AC TC rB","324":"CB DB EB FB GB HB IB JB KB LB MB NB"},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:{"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:{"260":"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","132":"wC xC yC"},Q:{"1":"1B"},R:{"1":"9C"},S:{"260":"AD BD"}},B:5,C:"Media Capture from DOM Elements API"};

View File

@@ -0,0 +1,69 @@
import { AjaxRequest } from './types';
/**
* A normalized AJAX error.
*
* @see {@link ajax}
*
* @class AjaxError
*/
export interface AjaxError extends Error {
/**
* The XHR instance associated with the error.
*/
xhr: XMLHttpRequest;
/**
* The AjaxRequest associated with the error.
*/
request: AjaxRequest;
/**
* The HTTP status code, if the request has completed. If not,
* it is set to `0`.
*/
status: number;
/**
* The responseType (e.g. 'json', 'arraybuffer', or 'xml').
*/
responseType: XMLHttpRequestResponseType;
/**
* The response data.
*/
response: any;
}
export interface AjaxErrorCtor {
/**
* @deprecated Internal implementation detail. Do not construct error instances.
* Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269
*/
new (message: string, xhr: XMLHttpRequest, request: AjaxRequest): AjaxError;
}
/**
* Thrown when an error occurs during an AJAX request.
* This is only exported because it is useful for checking to see if an error
* is an `instanceof AjaxError`. DO NOT create new instances of `AjaxError` with
* the constructor.
*
* @class AjaxError
* @see {@link ajax}
*/
export declare const AjaxError: AjaxErrorCtor;
export interface AjaxTimeoutError extends AjaxError {
}
export interface AjaxTimeoutErrorCtor {
/**
* @deprecated Internal implementation detail. Do not construct error instances.
* Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269
*/
new (xhr: XMLHttpRequest, request: AjaxRequest): AjaxTimeoutError;
}
/**
* Thrown when an AJAX request times out. Not to be confused with {@link TimeoutError}.
*
* This is exported only because it is useful for checking to see if errors are an
* `instanceof AjaxTimeoutError`. DO NOT use the constructor to create an instance of
* this type.
*
* @class AjaxTimeoutError
* @see {@link ajax}
*/
export declare const AjaxTimeoutError: AjaxTimeoutErrorCtor;
//# sourceMappingURL=errors.d.ts.map

View File

@@ -0,0 +1 @@
module.exports={C:{"52":0.01378,"60":0.01149,"78":0.0023,"88":0.0023,"91":0.01608,"102":0.01378,"103":0.00459,"105":0.00459,"106":0.0023,"107":0.00689,"109":0.6868,"110":0.19065,"111":0.0023,_:"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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 53 54 55 56 57 58 59 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 89 90 92 93 94 95 96 97 98 99 100 101 104 108 112 3.5 3.6"},D:{"41":0.0023,"59":0.0023,"68":0.00459,"70":0.00689,"71":0.00459,"74":0.00459,"78":0.01378,"79":0.01608,"81":0.05972,"83":0.0023,"85":0.0023,"86":0.0023,"87":0.02297,"88":0.00459,"89":0.00459,"91":0.00919,"92":0.06202,"93":0.00689,"94":0.01608,"95":0.12174,"96":0.0023,"97":0.01149,"99":0.00919,"100":0.00919,"102":0.04135,"103":0.14701,"104":0.01608,"105":0.14701,"106":0.01149,"107":0.03675,"108":0.22511,"109":5.86424,"110":3.16527,"111":0.00689,"112":0.00459,_:"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 34 35 36 37 38 39 40 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 69 72 73 75 76 77 80 84 90 98 101 113"},F:{"42":0.01149,"79":0.00689,"85":0.00689,"90":0.0023,"94":0.28483,"95":0.37671,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 84 86 87 88 89 91 92 93 9.5-9.6 10.5 10.6 11.1 11.5 11.6 12.1","10.0-10.1":0},B:{"12":0.02986,"14":0.0023,"15":0.00919,"17":0.00459,"18":0.02527,"84":0.01149,"89":0.00459,"90":0.10337,"92":0.03446,"96":0.00919,"97":0.0023,"98":0.0023,"100":0.0023,"103":0.00919,"104":0.01608,"105":0.01378,"106":0.01149,"107":0.02986,"108":0.02986,"109":0.92569,"110":0.92569,_:"13 16 79 80 81 83 85 86 87 88 91 93 94 95 99 101 102"},E:{"4":0,"14":0.0023,_:"0 5 6 7 8 9 10 11 12 13 15 3.1 3.2 6.1 7.1 10.1 11.1 15.4 16.0 16.4","5.1":0.02756,"9.1":0.0023,"12.1":0.00689,"13.1":0.00919,"14.1":0.01838,"15.1":0.01149,"15.2-15.3":0.00459,"15.5":0.01608,"15.6":0.05972,"16.1":0.11255,"16.2":0.0758,"16.3":0.04594},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0,"6.0-6.1":0.00042,"7.0-7.1":0.00294,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00126,"10.0-10.2":0,"10.3":0.02145,"11.0-11.2":0,"11.3-11.4":0.00042,"12.0-12.1":0,"12.2-12.5":0.22669,"13.0-13.1":0.00547,"13.2":0.00421,"13.3":0.00631,"13.4-13.7":0.01682,"14.0-14.4":0.06014,"14.5-14.8":0.08243,"15.0-15.1":0.08201,"15.2-15.3":0.50805,"15.4":0.06561,"15.5":0.19599,"15.6":0.51225,"16.0":0.20145,"16.1":0.85165,"16.2":0.77427,"16.3":0.33856,"16.4":0.00042},P:{"4":0.24363,"20":0.4974,"5.0-5.4":0.03048,"6.2-6.4":0.04064,"7.2-7.4":1.21813,"8.2":0.01016,"9.2":0.02068,"10.1":0.03048,"11.1-11.2":0.0203,"12.0":0.0203,"13.0":0.05076,"14.0":0.09136,"15.0":0.10151,"16.0":0.11166,"17.0":0.07106,"18.0":0.06091,"19.0":2.14188},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00046,"4.4":0,"4.4.3-4.4.4":0.02264},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"11":0.02297,_:"6 7 8 9 10 5.5"},N:{"10":0.03712,"11":0.07423},S:{"2.5":0.09242,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.73939},H:{"0":13.9783},L:{"0":60.70481},R:{_:"0"},M:{"0":0.45442},Q:{"13.1":0}};

View File

@@ -0,0 +1,17 @@
/**
Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string.
@example
```
import stripAnsi = require('strip-ansi');
stripAnsi('\u001B[4mUnicorn\u001B[0m');
//=> 'Unicorn'
stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
//=> 'Click'
```
*/
declare function stripAnsi(string: string): string;
export = stripAnsi;

View File

@@ -0,0 +1,48 @@
import { MonoTypeOperatorFunction, ObservableInput } from '../types';
/**
* Ignores source values for a duration determined by another Observable, then
* emits the most recent value from the source Observable, then repeats this
* process.
*
* <span class="informal">It's like {@link auditTime}, but the silencing
* duration is determined by a second Observable.</span>
*
* ![](audit.svg)
*
* `audit` is similar to `throttle`, but emits the last value from the silenced
* time window, instead of the first value. `audit` emits the most recent value
* from the source Observable on the output Observable as soon as its internal
* timer becomes disabled, and ignores source values while the timer is enabled.
* Initially, the timer is disabled. As soon as the first source value arrives,
* the timer is enabled by calling the `durationSelector` function with the
* source value, which returns the "duration" Observable. When the duration
* Observable emits a value, the timer is disabled, then the most
* recent source value is emitted on the output Observable, and this process
* repeats for the next source value.
*
* ## Example
*
* Emit clicks at a rate of at most one click per second
*
* ```ts
* import { fromEvent, audit, interval } from 'rxjs';
*
* const clicks = fromEvent(document, 'click');
* const result = clicks.pipe(audit(ev => interval(1000)));
* result.subscribe(x => console.log(x));
* ```
*
* @see {@link auditTime}
* @see {@link debounce}
* @see {@link delayWhen}
* @see {@link sample}
* @see {@link throttle}
*
* @param durationSelector A function
* that receives a value from the source Observable, for computing the silencing
* duration, returned as an Observable or a Promise.
* @return A function that returns an Observable that performs rate-limiting of
* emissions from the source Observable.
*/
export declare function audit<T>(durationSelector: (value: T) => ObservableInput<any>): MonoTypeOperatorFunction<T>;
//# sourceMappingURL=audit.d.ts.map

View File

@@ -0,0 +1,24 @@
(The MIT License)
Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
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.

View File

@@ -0,0 +1,9 @@
"use strict";
var firstIndex = require("./first-index");
module.exports = function () {
var i;
if ((i = firstIndex.call(this)) !== null) return this[i];
return undefined;
};

View File

@@ -0,0 +1,891 @@
/**
* @license Fraction.js v4.2.0 05/03/2022
* https://www.xarg.org/2014/03/rational-numbers-in-javascript/
*
* Copyright (c) 2021, Robert Eisele (robert@xarg.org)
* Dual licensed under the MIT or GPL Version 2 licenses.
**/
/**
*
* This class offers the possibility to calculate fractions.
* You can pass a fraction in different formats. Either as array, as double, as string or as an integer.
*
* Array/Object form
* [ 0 => <nominator>, 1 => <denominator> ]
* [ n => <nominator>, d => <denominator> ]
*
* Integer form
* - Single integer value
*
* Double form
* - Single double value
*
* String form
* 123.456 - a simple double
* 123/456 - a string fraction
* 123.'456' - a double with repeating decimal places
* 123.(456) - synonym
* 123.45'6' - a double with repeating last place
* 123.45(6) - synonym
*
* Example:
*
* var f = new Fraction("9.4'31'");
* f.mul([-4, 3]).div(4.9);
*
*/
(function(root) {
"use strict";
// Maximum search depth for cyclic rational numbers. 2000 should be more than enough.
// Example: 1/7 = 0.(142857) has 6 repeating decimal places.
// If MAX_CYCLE_LEN gets reduced, long cycles will not be detected and toString() only gets the first 10 digits
var MAX_CYCLE_LEN = 2000;
// Parsed data to avoid calling "new" all the time
var P = {
"s": 1,
"n": 0,
"d": 1
};
function assign(n, s) {
if (isNaN(n = parseInt(n, 10))) {
throw Fraction['InvalidParameter'];
}
return n * s;
}
// Creates a new Fraction internally without the need of the bulky constructor
function newFraction(n, d) {
if (d === 0) {
throw Fraction['DivisionByZero'];
}
var f = Object.create(Fraction.prototype);
f["s"] = n < 0 ? -1 : 1;
n = n < 0 ? -n : n;
var a = gcd(n, d);
f["n"] = n / a;
f["d"] = d / a;
return f;
}
function factorize(num) {
var factors = {};
var n = num;
var i = 2;
var s = 4;
while (s <= n) {
while (n % i === 0) {
n/= i;
factors[i] = (factors[i] || 0) + 1;
}
s+= 1 + 2 * i++;
}
if (n !== num) {
if (n > 1)
factors[n] = (factors[n] || 0) + 1;
} else {
factors[num] = (factors[num] || 0) + 1;
}
return factors;
}
var parse = function(p1, p2) {
var n = 0, d = 1, s = 1;
var v = 0, w = 0, x = 0, y = 1, z = 1;
var A = 0, B = 1;
var C = 1, D = 1;
var N = 10000000;
var M;
if (p1 === undefined || p1 === null) {
/* void */
} else if (p2 !== undefined) {
n = p1;
d = p2;
s = n * d;
if (n % 1 !== 0 || d % 1 !== 0) {
throw Fraction['NonIntegerParameter'];
}
} else
switch (typeof p1) {
case "object":
{
if ("d" in p1 && "n" in p1) {
n = p1["n"];
d = p1["d"];
if ("s" in p1)
n*= p1["s"];
} else if (0 in p1) {
n = p1[0];
if (1 in p1)
d = p1[1];
} else {
throw Fraction['InvalidParameter'];
}
s = n * d;
break;
}
case "number":
{
if (p1 < 0) {
s = p1;
p1 = -p1;
}
if (p1 % 1 === 0) {
n = p1;
} else if (p1 > 0) { // check for != 0, scale would become NaN (log(0)), which converges really slow
if (p1 >= 1) {
z = Math.pow(10, Math.floor(1 + Math.log(p1) / Math.LN10));
p1/= z;
}
// Using Farey Sequences
// http://www.johndcook.com/blog/2010/10/20/best-rational-approximation/
while (B <= N && D <= N) {
M = (A + C) / (B + D);
if (p1 === M) {
if (B + D <= N) {
n = A + C;
d = B + D;
} else if (D > B) {
n = C;
d = D;
} else {
n = A;
d = B;
}
break;
} else {
if (p1 > M) {
A+= C;
B+= D;
} else {
C+= A;
D+= B;
}
if (B > N) {
n = C;
d = D;
} else {
n = A;
d = B;
}
}
}
n*= z;
} else if (isNaN(p1) || isNaN(p2)) {
d = n = NaN;
}
break;
}
case "string":
{
B = p1.match(/\d+|./g);
if (B === null)
throw Fraction['InvalidParameter'];
if (B[A] === '-') {// Check for minus sign at the beginning
s = -1;
A++;
} else if (B[A] === '+') {// Check for plus sign at the beginning
A++;
}
if (B.length === A + 1) { // Check if it's just a simple number "1234"
w = assign(B[A++], s);
} else if (B[A + 1] === '.' || B[A] === '.') { // Check if it's a decimal number
if (B[A] !== '.') { // Handle 0.5 and .5
v = assign(B[A++], s);
}
A++;
// Check for decimal places
if (A + 1 === B.length || B[A + 1] === '(' && B[A + 3] === ')' || B[A + 1] === "'" && B[A + 3] === "'") {
w = assign(B[A], s);
y = Math.pow(10, B[A].length);
A++;
}
// Check for repeating places
if (B[A] === '(' && B[A + 2] === ')' || B[A] === "'" && B[A + 2] === "'") {
x = assign(B[A + 1], s);
z = Math.pow(10, B[A + 1].length) - 1;
A+= 3;
}
} else if (B[A + 1] === '/' || B[A + 1] === ':') { // Check for a simple fraction "123/456" or "123:456"
w = assign(B[A], s);
y = assign(B[A + 2], 1);
A+= 3;
} else if (B[A + 3] === '/' && B[A + 1] === ' ') { // Check for a complex fraction "123 1/2"
v = assign(B[A], s);
w = assign(B[A + 2], s);
y = assign(B[A + 4], 1);
A+= 5;
}
if (B.length <= A) { // Check for more tokens on the stack
d = y * z;
s = /* void */
n = x + d * v + z * w;
break;
}
/* Fall through on error */
}
default:
throw Fraction['InvalidParameter'];
}
if (d === 0) {
throw Fraction['DivisionByZero'];
}
P["s"] = s < 0 ? -1 : 1;
P["n"] = Math.abs(n);
P["d"] = Math.abs(d);
};
function modpow(b, e, m) {
var r = 1;
for (; e > 0; b = (b * b) % m, e >>= 1) {
if (e & 1) {
r = (r * b) % m;
}
}
return r;
}
function cycleLen(n, d) {
for (; d % 2 === 0;
d/= 2) {
}
for (; d % 5 === 0;
d/= 5) {
}
if (d === 1) // Catch non-cyclic numbers
return 0;
// If we would like to compute really large numbers quicker, we could make use of Fermat's little theorem:
// 10^(d-1) % d == 1
// However, we don't need such large numbers and MAX_CYCLE_LEN should be the capstone,
// as we want to translate the numbers to strings.
var rem = 10 % d;
var t = 1;
for (; rem !== 1; t++) {
rem = rem * 10 % d;
if (t > MAX_CYCLE_LEN)
return 0; // Returning 0 here means that we don't print it as a cyclic number. It's likely that the answer is `d-1`
}
return t;
}
function cycleStart(n, d, len) {
var rem1 = 1;
var rem2 = modpow(10, len, d);
for (var t = 0; t < 300; t++) { // s < ~log10(Number.MAX_VALUE)
// Solve 10^s == 10^(s+t) (mod d)
if (rem1 === rem2)
return t;
rem1 = rem1 * 10 % d;
rem2 = rem2 * 10 % d;
}
return 0;
}
function gcd(a, b) {
if (!a)
return b;
if (!b)
return a;
while (1) {
a%= b;
if (!a)
return b;
b%= a;
if (!b)
return a;
}
};
/**
* Module constructor
*
* @constructor
* @param {number|Fraction=} a
* @param {number=} b
*/
function Fraction(a, b) {
parse(a, b);
if (this instanceof Fraction) {
a = gcd(P["d"], P["n"]); // Abuse variable a
this["s"] = P["s"];
this["n"] = P["n"] / a;
this["d"] = P["d"] / a;
} else {
return newFraction(P['s'] * P['n'], P['d']);
}
}
Fraction['DivisionByZero'] = new Error("Division by Zero");
Fraction['InvalidParameter'] = new Error("Invalid argument");
Fraction['NonIntegerParameter'] = new Error("Parameters must be integer");
Fraction.prototype = {
"s": 1,
"n": 0,
"d": 1,
/**
* Calculates the absolute value
*
* Ex: new Fraction(-4).abs() => 4
**/
"abs": function() {
return newFraction(this["n"], this["d"]);
},
/**
* Inverts the sign of the current fraction
*
* Ex: new Fraction(-4).neg() => 4
**/
"neg": function() {
return newFraction(-this["s"] * this["n"], this["d"]);
},
/**
* Adds two rational numbers
*
* Ex: new Fraction({n: 2, d: 3}).add("14.9") => 467 / 30
**/
"add": function(a, b) {
parse(a, b);
return newFraction(
this["s"] * this["n"] * P["d"] + P["s"] * this["d"] * P["n"],
this["d"] * P["d"]
);
},
/**
* Subtracts two rational numbers
*
* Ex: new Fraction({n: 2, d: 3}).add("14.9") => -427 / 30
**/
"sub": function(a, b) {
parse(a, b);
return newFraction(
this["s"] * this["n"] * P["d"] - P["s"] * this["d"] * P["n"],
this["d"] * P["d"]
);
},
/**
* Multiplies two rational numbers
*
* Ex: new Fraction("-17.(345)").mul(3) => 5776 / 111
**/
"mul": function(a, b) {
parse(a, b);
return newFraction(
this["s"] * P["s"] * this["n"] * P["n"],
this["d"] * P["d"]
);
},
/**
* Divides two rational numbers
*
* Ex: new Fraction("-17.(345)").inverse().div(3)
**/
"div": function(a, b) {
parse(a, b);
return newFraction(
this["s"] * P["s"] * this["n"] * P["d"],
this["d"] * P["n"]
);
},
/**
* Clones the actual object
*
* Ex: new Fraction("-17.(345)").clone()
**/
"clone": function() {
return newFraction(this['s'] * this['n'], this['d']);
},
/**
* Calculates the modulo of two rational numbers - a more precise fmod
*
* Ex: new Fraction('4.(3)').mod([7, 8]) => (13/3) % (7/8) = (5/6)
**/
"mod": function(a, b) {
if (isNaN(this['n']) || isNaN(this['d'])) {
return new Fraction(NaN);
}
if (a === undefined) {
return newFraction(this["s"] * this["n"] % this["d"], 1);
}
parse(a, b);
if (0 === P["n"] && 0 === this["d"]) {
throw Fraction['DivisionByZero'];
}
/*
* First silly attempt, kinda slow
*
return that["sub"]({
"n": num["n"] * Math.floor((this.n / this.d) / (num.n / num.d)),
"d": num["d"],
"s": this["s"]
});*/
/*
* New attempt: a1 / b1 = a2 / b2 * q + r
* => b2 * a1 = a2 * b1 * q + b1 * b2 * r
* => (b2 * a1 % a2 * b1) / (b1 * b2)
*/
return newFraction(
this["s"] * (P["d"] * this["n"]) % (P["n"] * this["d"]),
P["d"] * this["d"]
);
},
/**
* Calculates the fractional gcd of two rational numbers
*
* Ex: new Fraction(5,8).gcd(3,7) => 1/56
*/
"gcd": function(a, b) {
parse(a, b);
// gcd(a / b, c / d) = gcd(a, c) / lcm(b, d)
return newFraction(gcd(P["n"], this["n"]) * gcd(P["d"], this["d"]), P["d"] * this["d"]);
},
/**
* Calculates the fractional lcm of two rational numbers
*
* Ex: new Fraction(5,8).lcm(3,7) => 15
*/
"lcm": function(a, b) {
parse(a, b);
// lcm(a / b, c / d) = lcm(a, c) / gcd(b, d)
if (P["n"] === 0 && this["n"] === 0) {
return newFraction(0, 1);
}
return newFraction(P["n"] * this["n"], gcd(P["n"], this["n"]) * gcd(P["d"], this["d"]));
},
/**
* Calculates the ceil of a rational number
*
* Ex: new Fraction('4.(3)').ceil() => (5 / 1)
**/
"ceil": function(places) {
places = Math.pow(10, places || 0);
if (isNaN(this["n"]) || isNaN(this["d"])) {
return new Fraction(NaN);
}
return newFraction(Math.ceil(places * this["s"] * this["n"] / this["d"]), places);
},
/**
* Calculates the floor of a rational number
*
* Ex: new Fraction('4.(3)').floor() => (4 / 1)
**/
"floor": function(places) {
places = Math.pow(10, places || 0);
if (isNaN(this["n"]) || isNaN(this["d"])) {
return new Fraction(NaN);
}
return newFraction(Math.floor(places * this["s"] * this["n"] / this["d"]), places);
},
/**
* Rounds a rational numbers
*
* Ex: new Fraction('4.(3)').round() => (4 / 1)
**/
"round": function(places) {
places = Math.pow(10, places || 0);
if (isNaN(this["n"]) || isNaN(this["d"])) {
return new Fraction(NaN);
}
return newFraction(Math.round(places * this["s"] * this["n"] / this["d"]), places);
},
/**
* Gets the inverse of the fraction, means numerator and denominator are exchanged
*
* Ex: new Fraction([-3, 4]).inverse() => -4 / 3
**/
"inverse": function() {
return newFraction(this["s"] * this["d"], this["n"]);
},
/**
* Calculates the fraction to some rational exponent, if possible
*
* Ex: new Fraction(-1,2).pow(-3) => -8
*/
"pow": function(a, b) {
parse(a, b);
// Trivial case when exp is an integer
if (P['d'] === 1) {
if (P['s'] < 0) {
return newFraction(Math.pow(this['s'] * this["d"], P['n']), Math.pow(this["n"], P['n']));
} else {
return newFraction(Math.pow(this['s'] * this["n"], P['n']), Math.pow(this["d"], P['n']));
}
}
// Negative roots become complex
// (-a/b)^(c/d) = x
// <=> (-1)^(c/d) * (a/b)^(c/d) = x
// <=> (cos(pi) + i*sin(pi))^(c/d) * (a/b)^(c/d) = x # rotate 1 by 180°
// <=> (cos(c*pi/d) + i*sin(c*pi/d)) * (a/b)^(c/d) = x # DeMoivre's formula in Q ( https://proofwiki.org/wiki/De_Moivre%27s_Formula/Rational_Index )
// From which follows that only for c=0 the root is non-complex. c/d is a reduced fraction, so that sin(c/dpi)=0 occurs for d=1, which is handled by our trivial case.
if (this['s'] < 0) return null;
// Now prime factor n and d
var N = factorize(this['n']);
var D = factorize(this['d']);
// Exponentiate and take root for n and d individually
var n = 1;
var d = 1;
for (var k in N) {
if (k === '1') continue;
if (k === '0') {
n = 0;
break;
}
N[k]*= P['n'];
if (N[k] % P['d'] === 0) {
N[k]/= P['d'];
} else return null;
n*= Math.pow(k, N[k]);
}
for (var k in D) {
if (k === '1') continue;
D[k]*= P['n'];
if (D[k] % P['d'] === 0) {
D[k]/= P['d'];
} else return null;
d*= Math.pow(k, D[k]);
}
if (P['s'] < 0) {
return newFraction(d, n);
}
return newFraction(n, d);
},
/**
* Check if two rational numbers are the same
*
* Ex: new Fraction(19.6).equals([98, 5]);
**/
"equals": function(a, b) {
parse(a, b);
return this["s"] * this["n"] * P["d"] === P["s"] * P["n"] * this["d"]; // Same as compare() === 0
},
/**
* Check if two rational numbers are the same
*
* Ex: new Fraction(19.6).equals([98, 5]);
**/
"compare": function(a, b) {
parse(a, b);
var t = (this["s"] * this["n"] * P["d"] - P["s"] * P["n"] * this["d"]);
return (0 < t) - (t < 0);
},
"simplify": function(eps) {
if (isNaN(this['n']) || isNaN(this['d'])) {
return this;
}
eps = eps || 0.001;
var thisABS = this['abs']();
var cont = thisABS['toContinued']();
for (var i = 1; i < cont.length; i++) {
var s = newFraction(cont[i - 1], 1);
for (var k = i - 2; k >= 0; k--) {
s = s['inverse']()['add'](cont[k]);
}
if (s['sub'](thisABS)['abs']().valueOf() < eps) {
return s['mul'](this['s']);
}
}
return this;
},
/**
* Check if two rational numbers are divisible
*
* Ex: new Fraction(19.6).divisible(1.5);
*/
"divisible": function(a, b) {
parse(a, b);
return !(!(P["n"] * this["d"]) || ((this["n"] * P["d"]) % (P["n"] * this["d"])));
},
/**
* Returns a decimal representation of the fraction
*
* Ex: new Fraction("100.'91823'").valueOf() => 100.91823918239183
**/
'valueOf': function() {
return this["s"] * this["n"] / this["d"];
},
/**
* Returns a string-fraction representation of a Fraction object
*
* Ex: new Fraction("1.'3'").toFraction(true) => "4 1/3"
**/
'toFraction': function(excludeWhole) {
var whole, str = "";
var n = this["n"];
var d = this["d"];
if (this["s"] < 0) {
str+= '-';
}
if (d === 1) {
str+= n;
} else {
if (excludeWhole && (whole = Math.floor(n / d)) > 0) {
str+= whole;
str+= " ";
n%= d;
}
str+= n;
str+= '/';
str+= d;
}
return str;
},
/**
* Returns a latex representation of a Fraction object
*
* Ex: new Fraction("1.'3'").toLatex() => "\frac{4}{3}"
**/
'toLatex': function(excludeWhole) {
var whole, str = "";
var n = this["n"];
var d = this["d"];
if (this["s"] < 0) {
str+= '-';
}
if (d === 1) {
str+= n;
} else {
if (excludeWhole && (whole = Math.floor(n / d)) > 0) {
str+= whole;
n%= d;
}
str+= "\\frac{";
str+= n;
str+= '}{';
str+= d;
str+= '}';
}
return str;
},
/**
* Returns an array of continued fraction elements
*
* Ex: new Fraction("7/8").toContinued() => [0,1,7]
*/
'toContinued': function() {
var t;
var a = this['n'];
var b = this['d'];
var res = [];
if (isNaN(a) || isNaN(b)) {
return res;
}
do {
res.push(Math.floor(a / b));
t = a % b;
a = b;
b = t;
} while (a !== 1);
return res;
},
/**
* Creates a string representation of a fraction with all digits
*
* Ex: new Fraction("100.'91823'").toString() => "100.(91823)"
**/
'toString': function(dec) {
var N = this["n"];
var D = this["d"];
if (isNaN(N) || isNaN(D)) {
return "NaN";
}
dec = dec || 15; // 15 = decimal places when no repetation
var cycLen = cycleLen(N, D); // Cycle length
var cycOff = cycleStart(N, D, cycLen); // Cycle start
var str = this['s'] < 0 ? "-" : "";
str+= N / D | 0;
N%= D;
N*= 10;
if (N)
str+= ".";
if (cycLen) {
for (var i = cycOff; i--;) {
str+= N / D | 0;
N%= D;
N*= 10;
}
str+= "(";
for (var i = cycLen; i--;) {
str+= N / D | 0;
N%= D;
N*= 10;
}
str+= ")";
} else {
for (var i = dec; N && i--;) {
str+= N / D | 0;
N%= D;
N*= 10;
}
}
return str;
}
};
if (typeof define === "function" && define["amd"]) {
define([], function() {
return Fraction;
});
} else if (typeof exports === "object") {
Object.defineProperty(Fraction, "__esModule", { 'value': true });
Fraction['default'] = Fraction;
Fraction['Fraction'] = Fraction;
module['exports'] = Fraction;
} else {
root['Fraction'] = Fraction;
}
})(this);

View File

@@ -0,0 +1,31 @@
var baseFunctions = require('./_baseFunctions'),
keysIn = require('./keysIn');
/**
* Creates an array of function property names from own and inherited
* enumerable properties of `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to inspect.
* @returns {Array} Returns the function names.
* @see _.functions
* @example
*
* function Foo() {
* this.a = _.constant('a');
* this.b = _.constant('b');
* }
*
* Foo.prototype.c = _.constant('c');
*
* _.functionsIn(new Foo);
* // => ['a', 'b', 'c']
*/
function functionsIn(object) {
return object == null ? [] : baseFunctions(object, keysIn(object));
}
module.exports = functionsIn;

View File

@@ -0,0 +1,44 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bind/callBound');
var $TypeError = GetIntrinsic('%TypeError%');
var $push = callBound('Array.prototype.push');
var IsArray = require('./IsArray');
var isByteValue = require('../helpers/isByteValue');
// https://262.ecma-international.org/12.0/#sec-bytelistbitwiseop
module.exports = function ByteListBitwiseOp(op, xBytes, yBytes) {
if (op !== '&' && op !== '^' && op !== '|') {
throw new $TypeError('Assertion failed: `op` must be `&`, `^`, or `|`');
}
if (!IsArray(xBytes) || !IsArray(yBytes) || xBytes.length !== yBytes.length) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)');
}
var result = [];
for (var i = 0; i < xBytes.length; i += 1) {
var xByte = xBytes[i];
var yByte = yBytes[i];
if (!isByteValue(xByte) || !isByteValue(yByte)) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)');
}
var resultByte;
if (op === '&') {
resultByte = xByte & yByte;
} else if (op === '^') {
resultByte = xByte ^ yByte;
} else {
resultByte = xByte | yByte;
}
$push(result, resultByte);
}
return result;
};

View File

@@ -0,0 +1 @@
{"name":"is-stream","version":"2.0.1","files":{"license":{"checkedAt":1678883669302,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"readme.md":{"checkedAt":1678883671522,"integrity":"sha512-vTTt5Q7DKFc5NuoQh5mBkN8SM+B0G1+jnwA94HSlRS5x60xeBFSl0/e1+UOCLjK8U+b8VoETEPdCZxIEH/RVzQ==","mode":420,"size":1621},"index.js":{"checkedAt":1678883671522,"integrity":"sha512-8e4J2cUt7+BT8t0yGooihJSWOSkS+ykgqYqCBfOecy80JlYsQZZiXRqQ0BlhbZjMSt/Z8VvgmS8CDldMtuE6WA==","mode":420,"size":677},"package.json":{"checkedAt":1678883671522,"integrity":"sha512-qbDCMcYZOrJUaz6UTKZbKQTA+39JOCS2ukrnnpAMsj3te4jMnXwY/osDEsY/r70hY7XzVfGf4bUFFq0G8ZGlYg==","mode":420,"size":734},"index.d.ts":{"checkedAt":1678883671522,"integrity":"sha512-bk1KPpePaAtNDSHsG1omPzv+5kNDpu5Pdw5Vh1jYHX7m5pdjTl7LmyhnaLhgDeLh7QtzbYo5VbgbNQO0izkVIQ==","mode":420,"size":1778}}}

View File

@@ -0,0 +1,2 @@
var convert = require('./convert');
module.exports = convert(require('../util'));

View File

@@ -0,0 +1,2 @@
module.exports = require('./dist/types').YAMLMap
require('./dist/legacy-exports').warnFileDeprecation(__filename)

View File

@@ -0,0 +1,159 @@
# relateurl [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][david-image]][david-url]
> Minify URLs by converting them from absolute to relative.
If you were to use this library on a website like `http://example.com/dir1/dir1-1/`, you would get results such as:
| Before | After |
| :------------------------------------------ | :----------------------------------- |
| `http://example.com/dir1/dir1-2/index.html` | `../dir1-2/` |
| `http://example.com/dir2/dir2-1/` | `/dir2/dir2-1/` |
| `http://example.com/dir1/dir1-1/` | ` ` |
| `https://example.com/dir1/dir1-1/` | `https://example.com/dir1/dir1-1/` |
| `http://google.com:80/dir/` | `//google.com/dir/` |
| `../../../../../../../../#anchor` | `/#anchor` |
**All string parsing.** *No* directory browsing. It is thoroughly tested, very fast and lightweight with zero external dependencies.
## Getting Started
This utility requires [Node.js](http://nodejs.org/) `>= 0.10`. To install, type this at the command line:
```
npm install relateurl --save-dev
```
### Options
#### options.defaultPorts
Type: `Object`
Default value: `{ftp:21, http:80, https:443}`
Extend the list with any ports you need. Any URLs containing these default ports will have them removed. Example: `http://example.com:80/` will become `http://example.com/`.
#### options.directoryIndexes
Type: `Array`
Default value: `["index.html"]`
Extend the list with any resources you need. Works with [`options.removeDirectoryIndexes`](#options.removeDirectoryIndexes).
#### options.ignore_www
Type: `Boolean`
Default value: `false`
This will, for example, consider any domains containing `http://www.example.com/` to be related to any that contain `http://example.com/`.
#### options.output
Type: constant or `String`
Choices: `RelateUrl.ABSOLUTE`,`RelateUrl.PATH_RELATIVE`,`RelateUrl.ROOT_RELATIVE`,`RelateUrl.SHORTEST`
Choices: `"absolute"`,`"pathRelative"`,`"rootRelative"`,`"shortest"`
Default value: `RelateUrl.SHORTEST`
`RelateUrl.ABSOLUTE` will produce an absolute URL. Overrides [`options.schemeRelative`](#options.schemeRelative) with a value of `false`.
`RelateUrl.PATH_RELATIVE` will produce something like `../child-of-parent/etc/`.
`RelateUrl.ROOT_RELATIVE` will produce something like `/child-of-root/etc/`.
`RelateUrl.SHORTEST` will choose whichever is shortest between root- and path-relative.
#### options.rejectedSchemes
Type: `Array`
Default value: `["data","javascript","mailto"]`
Extend the list with any additional schemes. Example: `javascript:something` will not be modified.
#### options.removeAuth
Type: `Boolean`
Default value: `false`
Remove user authentication information from the output URL.
#### options.removeDirectoryIndexes
Type: `Boolean`
Default value: `true`
Remove any resources that match any found in [`options.directoryIndexes`](#options.directoryIndexes).
#### options.removeEmptyQueries
Type: `Boolean`
Default value: `false`
Remove empty query variables. Example: `http://domain.com/?var1&var2=&var3=asdf` will become `http://domain.com/?var3=adsf`. This does not apply to unrelated URLs (with other protocols, auths, hosts and/or ports).
#### options.removeRootTrailingSlash
Type: `Boolean`
Default value: `true`
Remove trailing slashes from root paths. Example: `http://domain.com/?var` will become `http://domain.com?var` while `http://domain.com/dir/?var` will not be modified.
#### options.schemeRelative
Type: `Boolean`
Default value: `true`
Output URLs relative to the scheme. Example: `http://example.com/` will become `//example.com/`.
#### options.site
Type: `String`
Default value: `undefined`
An options-based version of the [`from`](#examples) argument. If both are specified, `from` takes priority.
#### options.slashesDenoteHost
Type: `Boolean`
Default value: `true`
Passed to Node's [`url.parse`](http://nodejs.org/api/url.html#url_url_parse_urlstr_parsequerystring_slashesdenotehost).
### Examples
This library can be used as a [function for single-use](#single-instance) or as a [class for multiple conversions](#reusable-instances).
Upon successful conversion, a `String` will be returned. If an issue is encountered while parsing `from`, an error will be thrown.
#### Single Instance
```js
var RelateUrl = require("relateurl");
var result = RelateUrl.relate(from, to, options);
```
#### Reusable Instances
```js
var RelateUrl = require("relateurl");
var instance = new RelateUrl(from, options);
var result1 = instance.relate(to1);
var result2 = instance.relate(to2, customOptions);
var result3 = instance.relate(to3);
```
## FAQ
1. **Why bother writing/using this?**
To aid in further minifying HTML, mainly for the purpose of faster page loads and SEO. It's been integrated into [HTMLMinifier](https://github.com/kangax/html-minifier).
2. **Why not just use Node's `url.parse`, `url.resolve` and `path.relative`?**
`url.parse` *is* used, but `url.resolve` and `path.relative` are both slower and less powerful than this library.
## Release History
* 0.2.7 Node v6 support
* 0.2.6 minor enhancements
* 0.2.5 added `options.removeRootTrailingSlash`
* 0.2.4 added `options.site`
* 0.2.3 added browserify npm-script
* 0.2.2 removed task runner
* 0.2.1 shorten resource- and query-relative URLs, test variations list with other site URLs
* 0.2.0 code cleanup, `options.removeEmptyQueries=true` only applied to unrelated URLs
* 0.1.0 initial release
## Roadmap
* 0.2.8 check if queries are the same, regardless of param order
* 0.2.8 possible [scheme exclusions](http://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml) such as `tel:`
* 0.2.8 decipher and return invalid input (special cases) to complete test suite
* 0.3.0 test `options.slashesDenoteHost=false`, add something like `options.externalDirectoryIndexes=[]` for external sites
[npm-image]: https://img.shields.io/npm/v/relateurl.svg
[npm-url]: https://npmjs.org/package/relateurl
[travis-image]: https://img.shields.io/travis/stevenvachon/relateurl.svg
[travis-url]: https://travis-ci.org/stevenvachon/relateurl
[david-image]: https://img.shields.io/david/stevenvachon/relateurl.svg
[david-url]: https://david-dm.org/stevenvachon/relateurl

View File

@@ -0,0 +1,84 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DonorService = void 0;
const request_1 = require("../core/request");
class DonorService {
/**
* Get all
* Lists all donor. <br> This includes the donor's current donation amount.
* @result ResponseDonor
* @throws ApiError
*/
static async donorControllerGetAll() {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/donors`,
});
return result.body;
}
/**
* Post
* Create a new donor.
* @param requestBody CreateDonor
* @result ResponseDonor
* @throws ApiError
*/
static async donorControllerPost(requestBody) {
const result = await (0, request_1.request)({
method: 'POST',
path: `/api/donors`,
body: requestBody,
});
return result.body;
}
/**
* Get one
* Lists all information about the donor whose id got provided. <br> This includes the donor's current donation amount.
* @param id
* @result ResponseDonor
* @throws ApiError
*/
static async donorControllerGetOne(id) {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/donors/${id}`,
});
return result.body;
}
/**
* Put
* Update the donor whose id you provided. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody UpdateDonor
* @result ResponseDonor
* @throws ApiError
*/
static async donorControllerPut(id, requestBody) {
const result = await (0, request_1.request)({
method: 'PUT',
path: `/api/donors/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Remove
* Delete the donor whose id you provided. <br> If no donor with this id exists it will just return 204(no content). <br> If the donor still has donations associated this will fail, please provide the query param ?force=true to delete the donor with all associated donations.
* @param id
* @param force
* @result ResponseDonor
* @result ResponseEmpty
* @throws ApiError
*/
static async donorControllerRemove(id, force) {
const result = await (0, request_1.request)({
method: 'DELETE',
path: `/api/donors/${id}`,
query: {
'force': force,
},
});
return result.body;
}
}
exports.DonorService = DonorService;

View File

@@ -0,0 +1,3 @@
var a = require('a');
var b = require('b');
var c = require('c');

View File

@@ -0,0 +1,6 @@
import { NumberFormatDigitOptions, NumberFormatNotation, NumberFormatDigitInternalSlots } from '../types/number';
/**
* https://tc39.es/ecma402/#sec-setnfdigitoptions
*/
export declare function SetNumberFormatDigitOptions(internalSlots: NumberFormatDigitInternalSlots, opts: NumberFormatDigitOptions, mnfdDefault: number, mxfdDefault: number, notation: NumberFormatNotation): void;
//# sourceMappingURL=SetNumberFormatDigitOptions.d.ts.map

View File

@@ -0,0 +1,9 @@
Copyright (c) 2019 Robert Balfre
Permission is hereby granted by the authors of this software, to any person, to use the software for any purpose, free of charge, including the rights to run, read, copy, change, distribute and sell it, and including usage rights to any patents the authors may hold on it, subject to the following conditions:
This license, or a link to its text, must be included with all copies of the software and any derivative works.
Any modification to the software submitted to the authors may be incorporated into the software under the terms of this license.
The software is provided "as is", without warranty of any kind, including but not limited to the warranties of title, fitness, merchantability and non-infringement. The authors have no obligation to provide support or updates for the software, and may not be held liable for any damages, claims or other liability arising from its use.

View File

@@ -0,0 +1 @@
{"version":3,"file":"not.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/not.ts"],"names":[],"mappings":"AAAA,wBAAgB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAErH"}

View File

@@ -0,0 +1,18 @@
{
"name": "http-cache-semantics",
"version": "4.1.1",
"description": "Parses Cache-Control and other headers. Helps building correct HTTP caches and proxies",
"repository": "https://github.com/kornelski/http-cache-semantics.git",
"main": "index.js",
"scripts": {
"test": "mocha"
},
"files": [
"index.js"
],
"author": "Kornel Lesiński <kornel@geekhood.net> (https://kornel.ski/)",
"license": "BSD-2-Clause",
"devDependencies": {
"mocha": "^10.0"
}
}

View File

@@ -0,0 +1,80 @@
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2014 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
const util = require("./util");
/**
* Determine whether mappingB is after mappingA with respect to generated
* position.
*/
function generatedPositionAfter(mappingA, mappingB) {
// Optimized for most common case
const lineA = mappingA.generatedLine;
const lineB = mappingB.generatedLine;
const columnA = mappingA.generatedColumn;
const columnB = mappingB.generatedColumn;
return lineB > lineA || lineB == lineA && columnB >= columnA ||
util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
}
/**
* A data structure to provide a sorted view of accumulated mappings in a
* performance conscious manner. It trades a negligible overhead in general
* case for a large speedup in case of mappings being added in order.
*/
class MappingList {
constructor() {
this._array = [];
this._sorted = true;
// Serves as infimum
this._last = {generatedLine: -1, generatedColumn: 0};
}
/**
* Iterate through internal items. This method takes the same arguments that
* `Array.prototype.forEach` takes.
*
* NOTE: The order of the mappings is NOT guaranteed.
*/
unsortedForEach(aCallback, aThisArg) {
this._array.forEach(aCallback, aThisArg);
}
/**
* Add the given source mapping.
*
* @param Object aMapping
*/
add(aMapping) {
if (generatedPositionAfter(this._last, aMapping)) {
this._last = aMapping;
this._array.push(aMapping);
} else {
this._sorted = false;
this._array.push(aMapping);
}
}
/**
* Returns the flat, sorted array of mappings. The mappings are sorted by
* generated position.
*
* WARNING: This method returns internal data without copying, for
* performance. The return value must NOT be mutated, and should be treated as
* an immutable borrow. If you want to take ownership, you must make your own
* copy.
*/
toArray() {
if (!this._sorted) {
this._array.sort(util.compareByGeneratedPositionsInflated);
this._sorted = true;
}
return this._array;
}
}
exports.MappingList = MappingList;

View File

@@ -0,0 +1,18 @@
'use strict';
var callBound = require('call-bind/callBound');
var Type = require('./Type');
var $NumberValueOf = callBound('Number.prototype.valueOf');
// https://262.ecma-international.org/6.0/#sec-properties-of-the-number-prototype-object
module.exports = function thisNumberValue(value) {
if (Type(value) === 'Number') {
return value;
}
return $NumberValueOf(value);
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"never.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/never.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,KAAK,mBAA8B,CAAC;AAEjD;;GAEG;AACH,wBAAgB,KAAK,sBAEpB"}

View File

@@ -0,0 +1,8 @@
import * as array from './array';
import * as errno from './errno';
import * as fs from './fs';
import * as path from './path';
import * as pattern from './pattern';
import * as stream from './stream';
import * as string from './string';
export { array, errno, fs, path, pattern, stream, string };

View File

@@ -0,0 +1 @@
{"version":3,"file":"takeWhile.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeWhile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAoDhE,MAAM,UAAU,SAAS,CAAI,SAA+C,EAAE,SAAiB;IAAjB,0BAAA,EAAA,iBAAiB;IAC7F,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAM,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YACzC,CAAC,MAAM,IAAI,SAAS,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAChD,CAAC,MAAM,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACnC,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}

View File

@@ -0,0 +1,58 @@
"use strict";
module.exports = function(Promise) {
var util = require("./util");
var async = Promise._async;
var tryCatch = util.tryCatch;
var errorObj = util.errorObj;
function spreadAdapter(val, nodeback) {
var promise = this;
if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);
var ret =
tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val));
if (ret === errorObj) {
async.throwLater(ret.e);
}
}
function successAdapter(val, nodeback) {
var promise = this;
var receiver = promise._boundValue();
var ret = val === undefined
? tryCatch(nodeback).call(receiver, null)
: tryCatch(nodeback).call(receiver, null, val);
if (ret === errorObj) {
async.throwLater(ret.e);
}
}
function errorAdapter(reason, nodeback) {
var promise = this;
if (!reason) {
var newReason = new Error(reason + "");
newReason.cause = reason;
reason = newReason;
}
var ret = tryCatch(nodeback).call(promise._boundValue(), reason);
if (ret === errorObj) {
async.throwLater(ret.e);
}
}
Promise.prototype.asCallback = Promise.prototype.nodeify = function (nodeback,
options) {
if (typeof nodeback == "function") {
var adapter = successAdapter;
if (options !== undefined && Object(options).spread) {
adapter = spreadAdapter;
}
this._then(
adapter,
errorAdapter,
undefined,
this,
nodeback
);
}
return this;
};
};

View File

@@ -0,0 +1,30 @@
var arrayMap = require('./_arrayMap'),
baseIntersection = require('./_baseIntersection'),
baseRest = require('./_baseRest'),
castArrayLikeObject = require('./_castArrayLikeObject');
/**
* Creates an array of unique values that are included in all given arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons. The order and references of result values are
* determined by the first array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @returns {Array} Returns the new array of intersecting values.
* @example
*
* _.intersection([2, 1], [2, 3]);
* // => [2]
*/
var intersection = baseRest(function(arrays) {
var mapped = arrayMap(arrays, castArrayLikeObject);
return (mapped.length && mapped[0] === arrays[0])
? baseIntersection(mapped)
: [];
});
module.exports = intersection;

View File

@@ -0,0 +1 @@
{"name":"external-editor","version":"3.1.0","files":{"package.json":{"checkedAt":1678883671206,"integrity":"sha512-HYiky1hfsEEjGXOyNkhNE7BVSlfdzRpfgnFSNWEyTzGMSBFtfbxjTEsxDTfJHpRYTZPjNtlExW8TY79s8zKsZA==","mode":420,"size":1482},"example_async.js":{"checkedAt":1678883671206,"integrity":"sha512-bihFRlhCH4MnEBmSyUKnyI32Oo2iPc6cONHooIwGNgJYHwnsJa5+u+CNM35l9H7hziTkc6CK+QvC8OgZuDZIjg==","mode":420,"size":1113},"LICENSE":{"checkedAt":1678883671206,"integrity":"sha512-oBl8z2cNckSMFjO/wqEXA9OnpAoK7eW5gmH8ltitTJ1fMSkNUu1/SDuv+iASgxwCkXGTBVsJfGUtrebVpMJfDA==","mode":420,"size":1080},"example_sync.js":{"checkedAt":1678883671206,"integrity":"sha512-yi5zncGpEDMmJwt+yZyUZO0LgqOHENqa5+kW5IH2vDHrk3+JRINRE4n5rzLpgntlxgoz6IfkaXC8G32GWee6wQ==","mode":420,"size":1199},"README.md":{"checkedAt":1678883671206,"integrity":"sha512-WLoYBPNXpGUKqwzr5NGALbQzc6Yvznf1MQqnx97qdDJ8WRzz6hCTeBHQ7XFaj1Q1NBvr8lFBagxdA1a2+nqxYA==","mode":420,"size":7235},"main/errors/CreateFileError.js":{"checkedAt":1678883671209,"integrity":"sha512-KITz4R347HUEcDsCAAzGvufgVL7kCzCN90KgXbbSvMXTdLNYep2aMhzb9OUvVZjj7uCJxIZV318COUYF3PUHMw==","mode":420,"size":1395},"main/errors/LaunchEditorError.js":{"checkedAt":1678883671209,"integrity":"sha512-XysGeIOjpIHLaFkSUYuUiDhuMaEZ3RweJ2RXWmffNd5SBJZFyp1m7Xa+dhP1qJOieTeTNTUFBxM//jYfF26/dg==","mode":420,"size":1385},"main/errors/CreateFileError.d.ts":{"checkedAt":1678883671209,"integrity":"sha512-3jRNx7qn+sAqzK5KaOHp4jvo+jDJn2a/AKuHz/hy9IrtINa+TPGS/MelODVVgg+BCrAs2oZH2b+eUb7i0Wv9NA==","mode":420,"size":203},"main/errors/RemoveFileError.d.ts":{"checkedAt":1678883671209,"integrity":"sha512-s8SaEWljjUWGHpJWyeTn1Cv3r/Q3hukUwsoriHjOiYLpdfZSOPFtJMeR9Ro8xoGKhNYl/KFv1GrbqOwrdhPIOQ==","mode":420,"size":203},"main/errors/ReadFileError.d.ts":{"checkedAt":1678883671209,"integrity":"sha512-1SoRCScxF1QHsVrgcvLfzmC6Fg2ild3QhEqRAUT4zjGNqnYs3+WCm6D7m81Oh3OuNV2FiiDSTvLMPojhOdSLVA==","mode":420,"size":201},"main/errors/ReadFileError.js":{"checkedAt":1678883671209,"integrity":"sha512-1/vpFdWkeWltfQGRr1aYtYylkPr2STJ6ZBgZ7nn9iufIMFXebekcXQ6K29rVC7z6XFS5RRmnEbqo87Fm8vjHBQ==","mode":420,"size":1370},"main/index.d.ts":{"checkedAt":1678883671209,"integrity":"sha512-XA96oQzf99DpOG1XF2p50n3niYe6T7M0fcXSBQj8ABiSNm5MHOruKKmwQzE8DCGWOf39PcNkyKkIp+tyIGG2cQ==","mode":420,"size":1522},"main/errors/RemoveFileError.js":{"checkedAt":1678883671209,"integrity":"sha512-jayGByivTChcdQAEeL3luIk9bGyk3UewLfQP3kx3PXiUGUsjY6MMFXw4QarXM1JrEy739SNeVsc53lSxlQpg6g==","mode":420,"size":1385},"main/errors/LaunchEditorError.d.ts":{"checkedAt":1678883671210,"integrity":"sha512-ZKfZ7Hmd6xtWtNRB0xunb//2tNTCFsb28IcK8FhM5nlZXUSEHXiis1pWzPRhvK5i3c6DJHrON1x5dZC5pOob3A==","mode":420,"size":205},"main/index.js":{"checkedAt":1678883671211,"integrity":"sha512-Ns3KbOOd8E14vzSt17SlAXjD+/klTQ7IJgUMZC/XAWqE8Cj/5JWe6Y95wO8A/PkNZ1uXdKw0iYX0e3MkbRilNA==","mode":420,"size":7018}}}

View File

@@ -0,0 +1,8 @@
"use strict";
var coerceToNumber = require("../number/coerce");
module.exports = function (value) {
value = coerceToNumber(value);
return isFinite(value) ? value : null;
};

View File

@@ -0,0 +1,9 @@
var test = require('tap').test;
var detective = require('../');
var fs = require('fs');
var src = fs.readFileSync(__dirname + '/files/strings.js');
test('single', function (t) {
t.deepEqual(detective(src), [ 'a', 'b', 'c', 'events', 'doom', 'y', 'events2' ]);
t.end();
});

View File

@@ -0,0 +1,8 @@
'use strict'
Object.defineProperty(exports, '__esModule', { value: true })
const legacy = require('../dist/legacy-exports')
exports.binary = legacy.binary
exports.default = [exports.binary]
legacy.warnFileDeprecation(__filename)

View File

@@ -0,0 +1 @@
{"version":3,"file":"takeUntil.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/takeUntil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAKxF"}

View File

@@ -0,0 +1 @@
{"name":"readdirp","version":"3.6.0","files":{"LICENSE":{"checkedAt":1678883672874,"integrity":"sha512-fILQsYn8p95CamfC9h/nSuLZciDhRy5nCMs4/KidyGaCo52ouccnSXXkIObcWO6UDnwm4w1V0yyurxgAYRa6Xw==","mode":420,"size":1114},"index.js":{"checkedAt":1678883672874,"integrity":"sha512-GcHZ3tY3BU0rWNrc3A6NImgD+kw5FP2/qxAP/Ak7MLIjJuYEjxGjOzLXv2yOH247bOcc1MkbQyPRJ3aOPSKnSA==","mode":420,"size":8876},"package.json":{"checkedAt":1678883672877,"integrity":"sha512-8JCVOIBQm96i9MGFs7WV8JlTYqNAKLz5i0A3cU+V234rQDijcNwizvkoVLknxFh0cCT+UmaKpjDMnluswkX/6A==","mode":420,"size":2522},"README.md":{"checkedAt":1678883672880,"integrity":"sha512-4tHK2yl/qhBnSRfRImVBBC/B++NmiRKJmZAWweit/8W9Hf1wF3VVw+pF1sGNV0JcaCAo9Asxk4ZUh/yKLo1SPA==","mode":420,"size":6942},"index.d.ts":{"checkedAt":1678883672880,"integrity":"sha512-TXn0FXQYmKHTjXH28/Y0hbl0n6meHxJ1M5IskqZpjJUgn1ya4nwWqgSUwDYLrr56KDicv3sQ/n+AYxdfaEr3aw==","mode":420,"size":1018}}}

View File

@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.');
if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) {
throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
}
const MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);
const MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);
const SUPPORTED_MAJOR_VERSION = 10;
const SUPPORTED_MINOR_VERSION = 10;
const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;
const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
/**
* IS `true` for Node.js 10.10 and greater.
*/
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;

View File

@@ -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,"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.00409,"48":0,"49":0,"50":0,"51":0,"52":0.00819,"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.00409,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.00819,"79":0.00409,"80":0.00409,"81":0.00409,"82":0.00409,"83":0.00409,"84":0,"85":0,"86":0,"87":0.00409,"88":0.00409,"89":0,"90":0,"91":0.00409,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0.00409,"100":0,"101":0,"102":0.02866,"103":0.00409,"104":0.00819,"105":0.00409,"106":0.00819,"107":0.00819,"108":0.02047,"109":0.39712,"110":0.25383,"111":0.00409,"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,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0.00409,"39":0,"40":0,"41":0.00409,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0.00409,"48":0,"49":0.00819,"50":0,"51":0.00409,"52":0,"53":0,"54":0,"55":0.00409,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0.00409,"64":0,"65":0.00409,"66":0,"67":0,"68":0.00409,"69":0.00409,"70":0.00409,"71":0.00409,"72":0.00409,"73":0.00409,"74":0.00819,"75":0.00819,"76":0.00819,"77":0.00409,"78":0.00819,"79":0.05322,"80":0.00819,"81":0.02047,"83":0.01638,"84":0.02456,"85":0.03685,"86":0.03275,"87":0.03685,"88":0.00819,"89":0.01228,"90":0.04094,"91":0.2702,"92":0.03275,"93":0.03275,"94":0.03275,"95":0.00409,"96":0.00819,"97":0.00819,"98":0.00819,"99":0.00819,"100":0.01638,"101":0.00819,"102":0.01228,"103":0.04094,"104":0.01638,"105":0.02866,"106":0.02866,"107":0.05322,"108":0.2047,"109":6.37436,"110":4.11038,"111":0.01228,"112":0.00409,"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,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0.00409,"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,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0.00819,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.00409,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0.00409,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0.17604,"94":1.42062,"95":0.37255,"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.00409,"13":0,"14":0,"15":0.02866,"16":0,"17":0,"18":0.00819,"79":0,"80":0,"81":0,"83":0.00409,"84":0.00409,"85":0.00409,"86":0.00409,"87":0,"88":0,"89":0.00409,"90":0,"91":0,"92":0.00409,"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,"107":0.02866,"108":0.01638,"109":0.58135,"110":0.8188},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.00819,"15":0,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0.02047,"10.1":0,"11.1":0,"12.1":0,"13.1":0.01228,"14.1":0.01638,"15.1":0.00409,"15.2-15.3":0.00409,"15.4":0.00409,"15.5":0.00819,"15.6":0.04503,"16.0":0.00819,"16.1":0.02456,"16.2":0.04913,"16.3":0.04913,"16.4":0},G:{"8":0.0015,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.0015,"6.0-6.1":0,"7.0-7.1":0,"8.1-8.4":0,"9.0-9.2":0.003,"9.3":0.03148,"10.0-10.2":0.003,"10.3":0.04497,"11.0-11.2":0.02249,"11.3-11.4":0.02998,"12.0-12.1":0.01949,"12.2-12.5":0.21587,"13.0-13.1":0.0075,"13.2":0.006,"13.3":0.01799,"13.4-13.7":0.07945,"14.0-14.4":0.15291,"14.5-14.8":0.37777,"15.0-15.1":0.06596,"15.2-15.3":0.09294,"15.4":0.13192,"15.5":0.28933,"15.6":1.1558,"16.0":1.69997,"16.1":3.4824,"16.2":3.58584,"16.3":2.08524,"16.4":0.01199},P:{"4":0.1429,"20":0.88804,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0.18373,"8.2":0,"9.2":0.01021,"10.1":0,"11.1-11.2":0.03062,"12.0":0.01021,"13.0":0.03062,"14.0":0.02041,"15.0":0.01021,"16.0":0.03062,"17.0":0.10207,"18.0":0.06124,"19.0":1.18405},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0.01645,"4.2-4.3":0.02467,"4.4":0,"4.4.3-4.4.4":0.05345},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0.00441,"9":0.00882,"10":0,"11":0.04409,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.07678},H:{"0":0.21807},L:{"0":64.09088},R:{_:"0"},M:{"0":0.15946},Q:{"13.1":0}};

View File

@@ -0,0 +1,300 @@
# ora
> Elegant terminal spinner
<p align="center">
<br>
<img src="screenshot.svg" width="500">
<br>
</p>
## Install
```sh
npm install ora
```
## Usage
```js
import ora from 'ora';
const spinner = ora('Loading unicorns').start();
setTimeout(() => {
spinner.color = 'yellow';
spinner.text = 'Loading rainbows';
}, 1000);
```
## API
### ora(text)
### ora(options)
If a string is provided, it is treated as a shortcut for [`options.text`](#text).
#### options
Type: `object`
##### text
Type: `string`
Text to display after the spinner.
##### prefixText
Type: `string | () => string`
Text or a function that returns text to display before the spinner. No prefix text will be displayed if set to an empty string.
##### spinner
Type: `string | object`\
Default: `'dots'` <img src="screenshot-spinner.gif" width="14">
Name of one of the [provided spinners](https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json). See `example.js` in this repo if you want to test out different spinners. On Windows, it will always use the `line` spinner as the Windows command-line doesn't have proper Unicode support.
Or an object like:
```js
{
interval: 80, // Optional
frames: ['-', '+', '-']
}
```
##### color
Type: `string`\
Default: `'cyan'`\
Values: `'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray'`
The color of the spinner.
##### hideCursor
Type: `boolean`\
Default: `true`
Set to `false` to stop Ora from hiding the cursor.
##### indent
Type: `number`\
Default: `0`
Indent the spinner with the given number of spaces.
##### interval
Type: `number`\
Default: Provided by the spinner or `100`
Interval between each frame.
Spinners provide their own recommended interval, so you don't really need to specify this.
##### stream
Type: `stream.Writable`\
Default: `process.stderr`
Stream to write the output.
You could for example set this to `process.stdout` instead.
##### isEnabled
Type: `boolean`
Force enable/disable the spinner. If not specified, the spinner will be enabled if the `stream` is being run inside a TTY context (not spawned or piped) and/or not in a CI environment.
Note that `{isEnabled: false}` doesn't mean it won't output anything. It just means it won't output the spinner, colors, and other ansi escape codes. It will still log text.
##### isSilent
Type: `boolean`\
Default: `false`
Disable the spinner and all log text. All output is suppressed and `isEnabled` will be considered `false`.
##### discardStdin
Type: `boolean`\
Default: `true`
Discard stdin input (except Ctrl+C) while running if it's TTY. This prevents the spinner from twitching on input, outputting broken lines on <kbd>Enter</kbd> key presses, and prevents buffering of input while the spinner is running.
This has no effect on Windows as there's no good way to implement discarding stdin properly there.
### Instance
#### .text <sup>get/set</sup>
Change the text after the spinner.
#### .prefixText <sup>get/set</sup>
Change the text before the spinner.
No prefix text will be displayed if set to an empty string.
#### .color <sup>get/set</sup>
Change the spinner color.
#### .spinner <sup>get/set</sup>
Change the spinner.
#### .indent <sup>get/set</sup>
Change the spinner indent.
#### .isSpinning <sup>get</sup>
A boolean of whether the instance is currently spinning.
#### .interval <sup>get</sup>
The interval between each frame.
The interval is decided by the chosen spinner.
#### .start(text?)
Start the spinner. Returns the instance. Set the current text if `text` is provided.
#### .stop()
Stop and clear the spinner. Returns the instance.
#### .succeed(text?)
Stop the spinner, change it to a green `✔` and persist the current text, or `text` if provided. Returns the instance. See the GIF below.
#### .fail(text?)
Stop the spinner, change it to a red `✖` and persist the current text, or `text` if provided. Returns the instance. See the GIF below.
#### .warn(text?)
Stop the spinner, change it to a yellow `⚠` and persist the current text, or `text` if provided. Returns the instance.
#### .info(text?)
Stop the spinner, change it to a blue `` and persist the current text, or `text` if provided. Returns the instance.
#### .stopAndPersist(options?)
Stop the spinner and change the symbol or text. Returns the instance. See the GIF below.
##### options
Type: `object`
###### symbol
Type: `string`\
Default: `' '`
Symbol to replace the spinner with.
###### text
Type: `string`\
Default: Current `'text'`
Text to be persisted after the symbol
###### prefixText
Type: `string`\
Default: Current `prefixText`
Text to be persisted before the symbol. No prefix text will be displayed if set to an empty string.
<img src="screenshot-2.gif" width="480">
#### .clear()
Clear the spinner. Returns the instance.
#### .render()
Manually render a new frame. Returns the instance.
#### .frame()
Get a new frame.
### oraPromise(action, text)
### oraPromise(action, options)
Starts a spinner for a promise or promise-returning function. The spinner is stopped with `.succeed()` if the promise fulfills or with `.fail()` if it rejects. Returns the promise.
```js
import {oraPromise} from 'ora';
await oraPromise(somePromise);
```
#### action
Type: `Promise | ((spinner: ora.Ora) => Promise)`
#### options
Type: `object`
All of the [options](#options) plus the following:
##### successText
Type: `string | ((result: T) => string) | undefined`
The new text of the spinner when the promise is resolved.
Keeps the existing text if `undefined`.
##### failText
Type: `string | ((error: Error) => string) | undefined`
The new text of the spinner when the promise is rejected.
Keeps the existing text if `undefined`.
## FAQ
### How do I change the color of the text?
Use [Chalk](https://github.com/chalk/chalk):
```js
import ora from 'ora';
import chalk from 'chalk';
const spinner = ora(`Loading ${chalk.red('unicorns')}`).start();
```
### Why does the spinner freeze?
JavaScript is single-threaded, so synchronous operations blocks the thread, including the spinner animation. Prefer asynchronous operations whenever possible.
## Related
- [cli-spinners](https://github.com/sindresorhus/cli-spinners) - Spinners for use in the terminal
- [listr](https://github.com/SamVerschueren/listr) - Terminal task list
- [CLISpinner](https://github.com/kiliankoe/CLISpinner) - Terminal spinner library for Swift
- [halo](https://github.com/ManrajGrover/halo) - Python port
- [spinners](https://github.com/FGRibreau/spinners) - Terminal spinners for Rust
- [marquee-ora](https://github.com/joeycozza/marquee-ora) - Scrolling marquee spinner for Ora
- [briandowns/spinner](https://github.com/briandowns/spinner) - Terminal spinner/progress indicator for Go
- [tj/go-spin](https://github.com/tj/go-spin) - Terminal spinner package for Go
- [observablehq.com/@victordidenko/ora](https://observablehq.com/@victordidenko/ora) - Ora port to Observable notebooks
- [spinnies](https://github.com/jcarpanelli/spinnies) - Terminal multi-spinner library for Node.js
- [kia](https://github.com/HarryPeach/kia) - Simple terminal spinners for Deno 🦕

View File

@@ -0,0 +1,46 @@
name: Node CI
on:
push:
branches:
- master
tags:
- '!*'
pull_request:
jobs:
build:
name: Test Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [8.x, 10.x, 12.x, 14.x]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Print Node.js Version
run: node --version
- name: Install Dependencies
run: npm install
env:
CI: true
- name: Run "build" step
run: npm run build --if-present
env:
CI: true
- name: Run tests
run: npm test
env:
CI: true

View File

@@ -0,0 +1,15 @@
'use strict';
var callBound = require('call-bind/callBound');
var $replace = callBound('String.prototype.replace');
var mvsIsWS = (/^\s$/).test('\u180E');
/* eslint-disable no-control-regex */
var startWhitespace = mvsIsWS
? /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/
: /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/;
/* eslint-enable no-control-regex */
module.exports = function trimStart() {
return $replace(this, startWhitespace, '');
};