Spaces:
Build error
Build error
freemt
commited on
Commit
•
51055fa
1
Parent(s):
b6d60e0
Update tf_type idf_type dl_type norm in fn
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/index.js +0 -165
- node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/license +0 -9
- node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/package.json +0 -56
- node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/readme.md +0 -147
- node_modules/.pnpm/ansi-styles@3.2.1/node_modules/color-convert/CHANGELOG.md +0 -54
- node_modules/.pnpm/ansi-styles@3.2.1/node_modules/color-convert/LICENSE +0 -21
- node_modules/.pnpm/ansi-styles@3.2.1/node_modules/color-convert/README.md +0 -68
- node_modules/.pnpm/ansi-styles@3.2.1/node_modules/color-convert/conversions.js +0 -868
- node_modules/.pnpm/ansi-styles@3.2.1/node_modules/color-convert/index.js +0 -78
- node_modules/.pnpm/ansi-styles@3.2.1/node_modules/color-convert/package.json +0 -46
- node_modules/.pnpm/ansi-styles@3.2.1/node_modules/color-convert/route.js +0 -97
- node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/.github/FUNDING.yml +0 -2
- node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/LICENSE.md +0 -21
- node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/README.md +0 -97
- node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js +0 -62
- node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/package.json +0 -48
- node_modules/.pnpm/brace-expansion@1.1.11/node_modules/balanced-match/.github/FUNDING.yml +0 -2
- node_modules/.pnpm/brace-expansion@1.1.11/node_modules/balanced-match/LICENSE.md +0 -21
- node_modules/.pnpm/brace-expansion@1.1.11/node_modules/balanced-match/README.md +0 -97
- node_modules/.pnpm/brace-expansion@1.1.11/node_modules/balanced-match/index.js +0 -62
- node_modules/.pnpm/brace-expansion@1.1.11/node_modules/balanced-match/package.json +0 -48
- node_modules/.pnpm/brace-expansion@1.1.11/node_modules/brace-expansion/LICENSE +0 -21
- node_modules/.pnpm/brace-expansion@1.1.11/node_modules/brace-expansion/README.md +0 -129
- node_modules/.pnpm/brace-expansion@1.1.11/node_modules/brace-expansion/index.js +0 -201
- node_modules/.pnpm/brace-expansion@1.1.11/node_modules/brace-expansion/package.json +0 -47
- node_modules/.pnpm/brace-expansion@1.1.11/node_modules/concat-map/.travis.yml +0 -4
- node_modules/.pnpm/brace-expansion@1.1.11/node_modules/concat-map/LICENSE +0 -18
- node_modules/.pnpm/brace-expansion@1.1.11/node_modules/concat-map/README.markdown +0 -62
- node_modules/.pnpm/brace-expansion@1.1.11/node_modules/concat-map/example/map.js +0 -6
- node_modules/.pnpm/brace-expansion@1.1.11/node_modules/concat-map/index.js +0 -13
- node_modules/.pnpm/brace-expansion@1.1.11/node_modules/concat-map/package.json +0 -43
- node_modules/.pnpm/brace-expansion@1.1.11/node_modules/concat-map/test/map.js +0 -39
- node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/.eslintignore +0 -1
- node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/.eslintrc +0 -17
- node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/.github/FUNDING.yml +0 -12
- node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/.nycrc +0 -13
- node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/CHANGELOG.md +0 -42
- node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/LICENSE +0 -21
- node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/README.md +0 -2
- node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js +0 -15
- node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js +0 -47
- node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/package.json +0 -80
- node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/test/callBound.js +0 -55
- node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/test/index.js +0 -66
- node_modules/.pnpm/call-bind@1.0.2/node_modules/function-bind/.editorconfig +0 -20
- node_modules/.pnpm/call-bind@1.0.2/node_modules/function-bind/.eslintrc +0 -15
- node_modules/.pnpm/call-bind@1.0.2/node_modules/function-bind/.jscs.json +0 -176
- node_modules/.pnpm/call-bind@1.0.2/node_modules/function-bind/.npmignore +0 -22
- node_modules/.pnpm/call-bind@1.0.2/node_modules/function-bind/.travis.yml +0 -168
- node_modules/.pnpm/call-bind@1.0.2/node_modules/function-bind/LICENSE +0 -20
node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/index.js
DELETED
@@ -1,165 +0,0 @@
|
|
1 |
-
'use strict';
|
2 |
-
const colorConvert = require('color-convert');
|
3 |
-
|
4 |
-
const wrapAnsi16 = (fn, offset) => function () {
|
5 |
-
const code = fn.apply(colorConvert, arguments);
|
6 |
-
return `\u001B[${code + offset}m`;
|
7 |
-
};
|
8 |
-
|
9 |
-
const wrapAnsi256 = (fn, offset) => function () {
|
10 |
-
const code = fn.apply(colorConvert, arguments);
|
11 |
-
return `\u001B[${38 + offset};5;${code}m`;
|
12 |
-
};
|
13 |
-
|
14 |
-
const wrapAnsi16m = (fn, offset) => function () {
|
15 |
-
const rgb = fn.apply(colorConvert, arguments);
|
16 |
-
return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
|
17 |
-
};
|
18 |
-
|
19 |
-
function assembleStyles() {
|
20 |
-
const codes = new Map();
|
21 |
-
const styles = {
|
22 |
-
modifier: {
|
23 |
-
reset: [0, 0],
|
24 |
-
// 21 isn't widely supported and 22 does the same thing
|
25 |
-
bold: [1, 22],
|
26 |
-
dim: [2, 22],
|
27 |
-
italic: [3, 23],
|
28 |
-
underline: [4, 24],
|
29 |
-
inverse: [7, 27],
|
30 |
-
hidden: [8, 28],
|
31 |
-
strikethrough: [9, 29]
|
32 |
-
},
|
33 |
-
color: {
|
34 |
-
black: [30, 39],
|
35 |
-
red: [31, 39],
|
36 |
-
green: [32, 39],
|
37 |
-
yellow: [33, 39],
|
38 |
-
blue: [34, 39],
|
39 |
-
magenta: [35, 39],
|
40 |
-
cyan: [36, 39],
|
41 |
-
white: [37, 39],
|
42 |
-
gray: [90, 39],
|
43 |
-
|
44 |
-
// Bright color
|
45 |
-
redBright: [91, 39],
|
46 |
-
greenBright: [92, 39],
|
47 |
-
yellowBright: [93, 39],
|
48 |
-
blueBright: [94, 39],
|
49 |
-
magentaBright: [95, 39],
|
50 |
-
cyanBright: [96, 39],
|
51 |
-
whiteBright: [97, 39]
|
52 |
-
},
|
53 |
-
bgColor: {
|
54 |
-
bgBlack: [40, 49],
|
55 |
-
bgRed: [41, 49],
|
56 |
-
bgGreen: [42, 49],
|
57 |
-
bgYellow: [43, 49],
|
58 |
-
bgBlue: [44, 49],
|
59 |
-
bgMagenta: [45, 49],
|
60 |
-
bgCyan: [46, 49],
|
61 |
-
bgWhite: [47, 49],
|
62 |
-
|
63 |
-
// Bright color
|
64 |
-
bgBlackBright: [100, 49],
|
65 |
-
bgRedBright: [101, 49],
|
66 |
-
bgGreenBright: [102, 49],
|
67 |
-
bgYellowBright: [103, 49],
|
68 |
-
bgBlueBright: [104, 49],
|
69 |
-
bgMagentaBright: [105, 49],
|
70 |
-
bgCyanBright: [106, 49],
|
71 |
-
bgWhiteBright: [107, 49]
|
72 |
-
}
|
73 |
-
};
|
74 |
-
|
75 |
-
// Fix humans
|
76 |
-
styles.color.grey = styles.color.gray;
|
77 |
-
|
78 |
-
for (const groupName of Object.keys(styles)) {
|
79 |
-
const group = styles[groupName];
|
80 |
-
|
81 |
-
for (const styleName of Object.keys(group)) {
|
82 |
-
const style = group[styleName];
|
83 |
-
|
84 |
-
styles[styleName] = {
|
85 |
-
open: `\u001B[${style[0]}m`,
|
86 |
-
close: `\u001B[${style[1]}m`
|
87 |
-
};
|
88 |
-
|
89 |
-
group[styleName] = styles[styleName];
|
90 |
-
|
91 |
-
codes.set(style[0], style[1]);
|
92 |
-
}
|
93 |
-
|
94 |
-
Object.defineProperty(styles, groupName, {
|
95 |
-
value: group,
|
96 |
-
enumerable: false
|
97 |
-
});
|
98 |
-
|
99 |
-
Object.defineProperty(styles, 'codes', {
|
100 |
-
value: codes,
|
101 |
-
enumerable: false
|
102 |
-
});
|
103 |
-
}
|
104 |
-
|
105 |
-
const ansi2ansi = n => n;
|
106 |
-
const rgb2rgb = (r, g, b) => [r, g, b];
|
107 |
-
|
108 |
-
styles.color.close = '\u001B[39m';
|
109 |
-
styles.bgColor.close = '\u001B[49m';
|
110 |
-
|
111 |
-
styles.color.ansi = {
|
112 |
-
ansi: wrapAnsi16(ansi2ansi, 0)
|
113 |
-
};
|
114 |
-
styles.color.ansi256 = {
|
115 |
-
ansi256: wrapAnsi256(ansi2ansi, 0)
|
116 |
-
};
|
117 |
-
styles.color.ansi16m = {
|
118 |
-
rgb: wrapAnsi16m(rgb2rgb, 0)
|
119 |
-
};
|
120 |
-
|
121 |
-
styles.bgColor.ansi = {
|
122 |
-
ansi: wrapAnsi16(ansi2ansi, 10)
|
123 |
-
};
|
124 |
-
styles.bgColor.ansi256 = {
|
125 |
-
ansi256: wrapAnsi256(ansi2ansi, 10)
|
126 |
-
};
|
127 |
-
styles.bgColor.ansi16m = {
|
128 |
-
rgb: wrapAnsi16m(rgb2rgb, 10)
|
129 |
-
};
|
130 |
-
|
131 |
-
for (let key of Object.keys(colorConvert)) {
|
132 |
-
if (typeof colorConvert[key] !== 'object') {
|
133 |
-
continue;
|
134 |
-
}
|
135 |
-
|
136 |
-
const suite = colorConvert[key];
|
137 |
-
|
138 |
-
if (key === 'ansi16') {
|
139 |
-
key = 'ansi';
|
140 |
-
}
|
141 |
-
|
142 |
-
if ('ansi16' in suite) {
|
143 |
-
styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
|
144 |
-
styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
|
145 |
-
}
|
146 |
-
|
147 |
-
if ('ansi256' in suite) {
|
148 |
-
styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
|
149 |
-
styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
|
150 |
-
}
|
151 |
-
|
152 |
-
if ('rgb' in suite) {
|
153 |
-
styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
|
154 |
-
styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
|
155 |
-
}
|
156 |
-
}
|
157 |
-
|
158 |
-
return styles;
|
159 |
-
}
|
160 |
-
|
161 |
-
// Make the export immutable
|
162 |
-
Object.defineProperty(module, 'exports', {
|
163 |
-
enumerable: true,
|
164 |
-
get: assembleStyles
|
165 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/license
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
MIT License
|
2 |
-
|
3 |
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
4 |
-
|
5 |
-
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:
|
6 |
-
|
7 |
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
8 |
-
|
9 |
-
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/package.json
DELETED
@@ -1,56 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "ansi-styles",
|
3 |
-
"version": "3.2.1",
|
4 |
-
"description": "ANSI escape codes for styling strings in the terminal",
|
5 |
-
"license": "MIT",
|
6 |
-
"repository": "chalk/ansi-styles",
|
7 |
-
"author": {
|
8 |
-
"name": "Sindre Sorhus",
|
9 |
-
"email": "sindresorhus@gmail.com",
|
10 |
-
"url": "sindresorhus.com"
|
11 |
-
},
|
12 |
-
"engines": {
|
13 |
-
"node": ">=4"
|
14 |
-
},
|
15 |
-
"scripts": {
|
16 |
-
"test": "xo && ava",
|
17 |
-
"screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor"
|
18 |
-
},
|
19 |
-
"files": [
|
20 |
-
"index.js"
|
21 |
-
],
|
22 |
-
"keywords": [
|
23 |
-
"ansi",
|
24 |
-
"styles",
|
25 |
-
"color",
|
26 |
-
"colour",
|
27 |
-
"colors",
|
28 |
-
"terminal",
|
29 |
-
"console",
|
30 |
-
"cli",
|
31 |
-
"string",
|
32 |
-
"tty",
|
33 |
-
"escape",
|
34 |
-
"formatting",
|
35 |
-
"rgb",
|
36 |
-
"256",
|
37 |
-
"shell",
|
38 |
-
"xterm",
|
39 |
-
"log",
|
40 |
-
"logging",
|
41 |
-
"command-line",
|
42 |
-
"text"
|
43 |
-
],
|
44 |
-
"dependencies": {
|
45 |
-
"color-convert": "^1.9.0"
|
46 |
-
},
|
47 |
-
"devDependencies": {
|
48 |
-
"ava": "*",
|
49 |
-
"babel-polyfill": "^6.23.0",
|
50 |
-
"svg-term-cli": "^2.1.1",
|
51 |
-
"xo": "*"
|
52 |
-
},
|
53 |
-
"ava": {
|
54 |
-
"require": "babel-polyfill"
|
55 |
-
}
|
56 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/readme.md
DELETED
@@ -1,147 +0,0 @@
|
|
1 |
-
# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles)
|
2 |
-
|
3 |
-
> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
|
4 |
-
|
5 |
-
You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
|
6 |
-
|
7 |
-
<img src="https://cdn.rawgit.com/chalk/ansi-styles/8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900">
|
8 |
-
|
9 |
-
|
10 |
-
## Install
|
11 |
-
|
12 |
-
```
|
13 |
-
$ npm install ansi-styles
|
14 |
-
```
|
15 |
-
|
16 |
-
|
17 |
-
## Usage
|
18 |
-
|
19 |
-
```js
|
20 |
-
const style = require('ansi-styles');
|
21 |
-
|
22 |
-
console.log(`${style.green.open}Hello world!${style.green.close}`);
|
23 |
-
|
24 |
-
|
25 |
-
// Color conversion between 16/256/truecolor
|
26 |
-
// NOTE: If conversion goes to 16 colors or 256 colors, the original color
|
27 |
-
// may be degraded to fit that color palette. This means terminals
|
28 |
-
// that do not support 16 million colors will best-match the
|
29 |
-
// original color.
|
30 |
-
console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close);
|
31 |
-
console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close);
|
32 |
-
console.log(style.color.ansi16m.hex('#ABCDEF') + 'Hello world!' + style.color.close);
|
33 |
-
```
|
34 |
-
|
35 |
-
## API
|
36 |
-
|
37 |
-
Each style has an `open` and `close` property.
|
38 |
-
|
39 |
-
|
40 |
-
## Styles
|
41 |
-
|
42 |
-
### Modifiers
|
43 |
-
|
44 |
-
- `reset`
|
45 |
-
- `bold`
|
46 |
-
- `dim`
|
47 |
-
- `italic` *(Not widely supported)*
|
48 |
-
- `underline`
|
49 |
-
- `inverse`
|
50 |
-
- `hidden`
|
51 |
-
- `strikethrough` *(Not widely supported)*
|
52 |
-
|
53 |
-
### Colors
|
54 |
-
|
55 |
-
- `black`
|
56 |
-
- `red`
|
57 |
-
- `green`
|
58 |
-
- `yellow`
|
59 |
-
- `blue`
|
60 |
-
- `magenta`
|
61 |
-
- `cyan`
|
62 |
-
- `white`
|
63 |
-
- `gray` ("bright black")
|
64 |
-
- `redBright`
|
65 |
-
- `greenBright`
|
66 |
-
- `yellowBright`
|
67 |
-
- `blueBright`
|
68 |
-
- `magentaBright`
|
69 |
-
- `cyanBright`
|
70 |
-
- `whiteBright`
|
71 |
-
|
72 |
-
### Background colors
|
73 |
-
|
74 |
-
- `bgBlack`
|
75 |
-
- `bgRed`
|
76 |
-
- `bgGreen`
|
77 |
-
- `bgYellow`
|
78 |
-
- `bgBlue`
|
79 |
-
- `bgMagenta`
|
80 |
-
- `bgCyan`
|
81 |
-
- `bgWhite`
|
82 |
-
- `bgBlackBright`
|
83 |
-
- `bgRedBright`
|
84 |
-
- `bgGreenBright`
|
85 |
-
- `bgYellowBright`
|
86 |
-
- `bgBlueBright`
|
87 |
-
- `bgMagentaBright`
|
88 |
-
- `bgCyanBright`
|
89 |
-
- `bgWhiteBright`
|
90 |
-
|
91 |
-
|
92 |
-
## Advanced usage
|
93 |
-
|
94 |
-
By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
|
95 |
-
|
96 |
-
- `style.modifier`
|
97 |
-
- `style.color`
|
98 |
-
- `style.bgColor`
|
99 |
-
|
100 |
-
###### Example
|
101 |
-
|
102 |
-
```js
|
103 |
-
console.log(style.color.green.open);
|
104 |
-
```
|
105 |
-
|
106 |
-
Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values.
|
107 |
-
|
108 |
-
###### Example
|
109 |
-
|
110 |
-
```js
|
111 |
-
console.log(style.codes.get(36));
|
112 |
-
//=> 39
|
113 |
-
```
|
114 |
-
|
115 |
-
|
116 |
-
## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728)
|
117 |
-
|
118 |
-
`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors.
|
119 |
-
|
120 |
-
To use these, call the associated conversion function with the intended output, for example:
|
121 |
-
|
122 |
-
```js
|
123 |
-
style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code
|
124 |
-
style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code
|
125 |
-
|
126 |
-
style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
|
127 |
-
style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
|
128 |
-
|
129 |
-
style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code
|
130 |
-
style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code
|
131 |
-
```
|
132 |
-
|
133 |
-
|
134 |
-
## Related
|
135 |
-
|
136 |
-
- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal
|
137 |
-
|
138 |
-
|
139 |
-
## Maintainers
|
140 |
-
|
141 |
-
- [Sindre Sorhus](https://github.com/sindresorhus)
|
142 |
-
- [Josh Junon](https://github.com/qix-)
|
143 |
-
|
144 |
-
|
145 |
-
## License
|
146 |
-
|
147 |
-
MIT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/ansi-styles@3.2.1/node_modules/color-convert/CHANGELOG.md
DELETED
@@ -1,54 +0,0 @@
|
|
1 |
-
# 1.0.0 - 2016-01-07
|
2 |
-
|
3 |
-
- Removed: unused speed test
|
4 |
-
- Added: Automatic routing between previously unsupported conversions
|
5 |
-
([#27](https://github.com/Qix-/color-convert/pull/27))
|
6 |
-
- Removed: `xxx2xxx()` and `xxx2xxxRaw()` functions
|
7 |
-
([#27](https://github.com/Qix-/color-convert/pull/27))
|
8 |
-
- Removed: `convert()` class
|
9 |
-
([#27](https://github.com/Qix-/color-convert/pull/27))
|
10 |
-
- Changed: all functions to lookup dictionary
|
11 |
-
([#27](https://github.com/Qix-/color-convert/pull/27))
|
12 |
-
- Changed: `ansi` to `ansi256`
|
13 |
-
([#27](https://github.com/Qix-/color-convert/pull/27))
|
14 |
-
- Fixed: argument grouping for functions requiring only one argument
|
15 |
-
([#27](https://github.com/Qix-/color-convert/pull/27))
|
16 |
-
|
17 |
-
# 0.6.0 - 2015-07-23
|
18 |
-
|
19 |
-
- Added: methods to handle
|
20 |
-
[ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 16/256 colors:
|
21 |
-
- rgb2ansi16
|
22 |
-
- rgb2ansi
|
23 |
-
- hsl2ansi16
|
24 |
-
- hsl2ansi
|
25 |
-
- hsv2ansi16
|
26 |
-
- hsv2ansi
|
27 |
-
- hwb2ansi16
|
28 |
-
- hwb2ansi
|
29 |
-
- cmyk2ansi16
|
30 |
-
- cmyk2ansi
|
31 |
-
- keyword2ansi16
|
32 |
-
- keyword2ansi
|
33 |
-
- ansi162rgb
|
34 |
-
- ansi162hsl
|
35 |
-
- ansi162hsv
|
36 |
-
- ansi162hwb
|
37 |
-
- ansi162cmyk
|
38 |
-
- ansi162keyword
|
39 |
-
- ansi2rgb
|
40 |
-
- ansi2hsl
|
41 |
-
- ansi2hsv
|
42 |
-
- ansi2hwb
|
43 |
-
- ansi2cmyk
|
44 |
-
- ansi2keyword
|
45 |
-
([#18](https://github.com/harthur/color-convert/pull/18))
|
46 |
-
|
47 |
-
# 0.5.3 - 2015-06-02
|
48 |
-
|
49 |
-
- Fixed: hsl2hsv does not return `NaN` anymore when using `[0,0,0]`
|
50 |
-
([#15](https://github.com/harthur/color-convert/issues/15))
|
51 |
-
|
52 |
-
---
|
53 |
-
|
54 |
-
Check out commit logs for older releases
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/ansi-styles@3.2.1/node_modules/color-convert/LICENSE
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
Copyright (c) 2011-2016 Heather Arthur <fayearthur@gmail.com>
|
2 |
-
|
3 |
-
Permission is hereby granted, free of charge, to any person obtaining
|
4 |
-
a copy of this software and associated documentation files (the
|
5 |
-
"Software"), to deal in the Software without restriction, including
|
6 |
-
without limitation the rights to use, copy, modify, merge, publish,
|
7 |
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8 |
-
permit persons to whom the Software is furnished to do so, subject to
|
9 |
-
the following conditions:
|
10 |
-
|
11 |
-
The above copyright notice and this permission notice shall be
|
12 |
-
included in all copies or substantial portions of the Software.
|
13 |
-
|
14 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15 |
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16 |
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17 |
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18 |
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19 |
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20 |
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/ansi-styles@3.2.1/node_modules/color-convert/README.md
DELETED
@@ -1,68 +0,0 @@
|
|
1 |
-
# color-convert
|
2 |
-
|
3 |
-
[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert)
|
4 |
-
|
5 |
-
Color-convert is a color conversion library for JavaScript and node.
|
6 |
-
It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest):
|
7 |
-
|
8 |
-
```js
|
9 |
-
var convert = require('color-convert');
|
10 |
-
|
11 |
-
convert.rgb.hsl(140, 200, 100); // [96, 48, 59]
|
12 |
-
convert.keyword.rgb('blue'); // [0, 0, 255]
|
13 |
-
|
14 |
-
var rgbChannels = convert.rgb.channels; // 3
|
15 |
-
var cmykChannels = convert.cmyk.channels; // 4
|
16 |
-
var ansiChannels = convert.ansi16.channels; // 1
|
17 |
-
```
|
18 |
-
|
19 |
-
# Install
|
20 |
-
|
21 |
-
```console
|
22 |
-
$ npm install color-convert
|
23 |
-
```
|
24 |
-
|
25 |
-
# API
|
26 |
-
|
27 |
-
Simply get the property of the _from_ and _to_ conversion that you're looking for.
|
28 |
-
|
29 |
-
All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function.
|
30 |
-
|
31 |
-
All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha).
|
32 |
-
|
33 |
-
```js
|
34 |
-
var convert = require('color-convert');
|
35 |
-
|
36 |
-
// Hex to LAB
|
37 |
-
convert.hex.lab('DEADBF'); // [ 76, 21, -2 ]
|
38 |
-
convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ]
|
39 |
-
|
40 |
-
// RGB to CMYK
|
41 |
-
convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ]
|
42 |
-
convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ]
|
43 |
-
```
|
44 |
-
|
45 |
-
### Arrays
|
46 |
-
All functions that accept multiple arguments also support passing an array.
|
47 |
-
|
48 |
-
Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.)
|
49 |
-
|
50 |
-
```js
|
51 |
-
var convert = require('color-convert');
|
52 |
-
|
53 |
-
convert.rgb.hex(123, 45, 67); // '7B2D43'
|
54 |
-
convert.rgb.hex([123, 45, 67]); // '7B2D43'
|
55 |
-
```
|
56 |
-
|
57 |
-
## Routing
|
58 |
-
|
59 |
-
Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex).
|
60 |
-
|
61 |
-
Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js).
|
62 |
-
|
63 |
-
# Contribute
|
64 |
-
|
65 |
-
If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request.
|
66 |
-
|
67 |
-
# License
|
68 |
-
Copyright © 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/ansi-styles@3.2.1/node_modules/color-convert/conversions.js
DELETED
@@ -1,868 +0,0 @@
|
|
1 |
-
/* MIT license */
|
2 |
-
var cssKeywords = require('color-name');
|
3 |
-
|
4 |
-
// NOTE: conversions should only return primitive values (i.e. arrays, or
|
5 |
-
// values that give correct `typeof` results).
|
6 |
-
// do not use box values types (i.e. Number(), String(), etc.)
|
7 |
-
|
8 |
-
var reverseKeywords = {};
|
9 |
-
for (var key in cssKeywords) {
|
10 |
-
if (cssKeywords.hasOwnProperty(key)) {
|
11 |
-
reverseKeywords[cssKeywords[key]] = key;
|
12 |
-
}
|
13 |
-
}
|
14 |
-
|
15 |
-
var convert = module.exports = {
|
16 |
-
rgb: {channels: 3, labels: 'rgb'},
|
17 |
-
hsl: {channels: 3, labels: 'hsl'},
|
18 |
-
hsv: {channels: 3, labels: 'hsv'},
|
19 |
-
hwb: {channels: 3, labels: 'hwb'},
|
20 |
-
cmyk: {channels: 4, labels: 'cmyk'},
|
21 |
-
xyz: {channels: 3, labels: 'xyz'},
|
22 |
-
lab: {channels: 3, labels: 'lab'},
|
23 |
-
lch: {channels: 3, labels: 'lch'},
|
24 |
-
hex: {channels: 1, labels: ['hex']},
|
25 |
-
keyword: {channels: 1, labels: ['keyword']},
|
26 |
-
ansi16: {channels: 1, labels: ['ansi16']},
|
27 |
-
ansi256: {channels: 1, labels: ['ansi256']},
|
28 |
-
hcg: {channels: 3, labels: ['h', 'c', 'g']},
|
29 |
-
apple: {channels: 3, labels: ['r16', 'g16', 'b16']},
|
30 |
-
gray: {channels: 1, labels: ['gray']}
|
31 |
-
};
|
32 |
-
|
33 |
-
// hide .channels and .labels properties
|
34 |
-
for (var model in convert) {
|
35 |
-
if (convert.hasOwnProperty(model)) {
|
36 |
-
if (!('channels' in convert[model])) {
|
37 |
-
throw new Error('missing channels property: ' + model);
|
38 |
-
}
|
39 |
-
|
40 |
-
if (!('labels' in convert[model])) {
|
41 |
-
throw new Error('missing channel labels property: ' + model);
|
42 |
-
}
|
43 |
-
|
44 |
-
if (convert[model].labels.length !== convert[model].channels) {
|
45 |
-
throw new Error('channel and label counts mismatch: ' + model);
|
46 |
-
}
|
47 |
-
|
48 |
-
var channels = convert[model].channels;
|
49 |
-
var labels = convert[model].labels;
|
50 |
-
delete convert[model].channels;
|
51 |
-
delete convert[model].labels;
|
52 |
-
Object.defineProperty(convert[model], 'channels', {value: channels});
|
53 |
-
Object.defineProperty(convert[model], 'labels', {value: labels});
|
54 |
-
}
|
55 |
-
}
|
56 |
-
|
57 |
-
convert.rgb.hsl = function (rgb) {
|
58 |
-
var r = rgb[0] / 255;
|
59 |
-
var g = rgb[1] / 255;
|
60 |
-
var b = rgb[2] / 255;
|
61 |
-
var min = Math.min(r, g, b);
|
62 |
-
var max = Math.max(r, g, b);
|
63 |
-
var delta = max - min;
|
64 |
-
var h;
|
65 |
-
var s;
|
66 |
-
var l;
|
67 |
-
|
68 |
-
if (max === min) {
|
69 |
-
h = 0;
|
70 |
-
} else if (r === max) {
|
71 |
-
h = (g - b) / delta;
|
72 |
-
} else if (g === max) {
|
73 |
-
h = 2 + (b - r) / delta;
|
74 |
-
} else if (b === max) {
|
75 |
-
h = 4 + (r - g) / delta;
|
76 |
-
}
|
77 |
-
|
78 |
-
h = Math.min(h * 60, 360);
|
79 |
-
|
80 |
-
if (h < 0) {
|
81 |
-
h += 360;
|
82 |
-
}
|
83 |
-
|
84 |
-
l = (min + max) / 2;
|
85 |
-
|
86 |
-
if (max === min) {
|
87 |
-
s = 0;
|
88 |
-
} else if (l <= 0.5) {
|
89 |
-
s = delta / (max + min);
|
90 |
-
} else {
|
91 |
-
s = delta / (2 - max - min);
|
92 |
-
}
|
93 |
-
|
94 |
-
return [h, s * 100, l * 100];
|
95 |
-
};
|
96 |
-
|
97 |
-
convert.rgb.hsv = function (rgb) {
|
98 |
-
var rdif;
|
99 |
-
var gdif;
|
100 |
-
var bdif;
|
101 |
-
var h;
|
102 |
-
var s;
|
103 |
-
|
104 |
-
var r = rgb[0] / 255;
|
105 |
-
var g = rgb[1] / 255;
|
106 |
-
var b = rgb[2] / 255;
|
107 |
-
var v = Math.max(r, g, b);
|
108 |
-
var diff = v - Math.min(r, g, b);
|
109 |
-
var diffc = function (c) {
|
110 |
-
return (v - c) / 6 / diff + 1 / 2;
|
111 |
-
};
|
112 |
-
|
113 |
-
if (diff === 0) {
|
114 |
-
h = s = 0;
|
115 |
-
} else {
|
116 |
-
s = diff / v;
|
117 |
-
rdif = diffc(r);
|
118 |
-
gdif = diffc(g);
|
119 |
-
bdif = diffc(b);
|
120 |
-
|
121 |
-
if (r === v) {
|
122 |
-
h = bdif - gdif;
|
123 |
-
} else if (g === v) {
|
124 |
-
h = (1 / 3) + rdif - bdif;
|
125 |
-
} else if (b === v) {
|
126 |
-
h = (2 / 3) + gdif - rdif;
|
127 |
-
}
|
128 |
-
if (h < 0) {
|
129 |
-
h += 1;
|
130 |
-
} else if (h > 1) {
|
131 |
-
h -= 1;
|
132 |
-
}
|
133 |
-
}
|
134 |
-
|
135 |
-
return [
|
136 |
-
h * 360,
|
137 |
-
s * 100,
|
138 |
-
v * 100
|
139 |
-
];
|
140 |
-
};
|
141 |
-
|
142 |
-
convert.rgb.hwb = function (rgb) {
|
143 |
-
var r = rgb[0];
|
144 |
-
var g = rgb[1];
|
145 |
-
var b = rgb[2];
|
146 |
-
var h = convert.rgb.hsl(rgb)[0];
|
147 |
-
var w = 1 / 255 * Math.min(r, Math.min(g, b));
|
148 |
-
|
149 |
-
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
|
150 |
-
|
151 |
-
return [h, w * 100, b * 100];
|
152 |
-
};
|
153 |
-
|
154 |
-
convert.rgb.cmyk = function (rgb) {
|
155 |
-
var r = rgb[0] / 255;
|
156 |
-
var g = rgb[1] / 255;
|
157 |
-
var b = rgb[2] / 255;
|
158 |
-
var c;
|
159 |
-
var m;
|
160 |
-
var y;
|
161 |
-
var k;
|
162 |
-
|
163 |
-
k = Math.min(1 - r, 1 - g, 1 - b);
|
164 |
-
c = (1 - r - k) / (1 - k) || 0;
|
165 |
-
m = (1 - g - k) / (1 - k) || 0;
|
166 |
-
y = (1 - b - k) / (1 - k) || 0;
|
167 |
-
|
168 |
-
return [c * 100, m * 100, y * 100, k * 100];
|
169 |
-
};
|
170 |
-
|
171 |
-
/**
|
172 |
-
* See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
173 |
-
* */
|
174 |
-
function comparativeDistance(x, y) {
|
175 |
-
return (
|
176 |
-
Math.pow(x[0] - y[0], 2) +
|
177 |
-
Math.pow(x[1] - y[1], 2) +
|
178 |
-
Math.pow(x[2] - y[2], 2)
|
179 |
-
);
|
180 |
-
}
|
181 |
-
|
182 |
-
convert.rgb.keyword = function (rgb) {
|
183 |
-
var reversed = reverseKeywords[rgb];
|
184 |
-
if (reversed) {
|
185 |
-
return reversed;
|
186 |
-
}
|
187 |
-
|
188 |
-
var currentClosestDistance = Infinity;
|
189 |
-
var currentClosestKeyword;
|
190 |
-
|
191 |
-
for (var keyword in cssKeywords) {
|
192 |
-
if (cssKeywords.hasOwnProperty(keyword)) {
|
193 |
-
var value = cssKeywords[keyword];
|
194 |
-
|
195 |
-
// Compute comparative distance
|
196 |
-
var distance = comparativeDistance(rgb, value);
|
197 |
-
|
198 |
-
// Check if its less, if so set as closest
|
199 |
-
if (distance < currentClosestDistance) {
|
200 |
-
currentClosestDistance = distance;
|
201 |
-
currentClosestKeyword = keyword;
|
202 |
-
}
|
203 |
-
}
|
204 |
-
}
|
205 |
-
|
206 |
-
return currentClosestKeyword;
|
207 |
-
};
|
208 |
-
|
209 |
-
convert.keyword.rgb = function (keyword) {
|
210 |
-
return cssKeywords[keyword];
|
211 |
-
};
|
212 |
-
|
213 |
-
convert.rgb.xyz = function (rgb) {
|
214 |
-
var r = rgb[0] / 255;
|
215 |
-
var g = rgb[1] / 255;
|
216 |
-
var b = rgb[2] / 255;
|
217 |
-
|
218 |
-
// assume sRGB
|
219 |
-
r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);
|
220 |
-
g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);
|
221 |
-
b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);
|
222 |
-
|
223 |
-
var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
|
224 |
-
var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
|
225 |
-
var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);
|
226 |
-
|
227 |
-
return [x * 100, y * 100, z * 100];
|
228 |
-
};
|
229 |
-
|
230 |
-
convert.rgb.lab = function (rgb) {
|
231 |
-
var xyz = convert.rgb.xyz(rgb);
|
232 |
-
var x = xyz[0];
|
233 |
-
var y = xyz[1];
|
234 |
-
var z = xyz[2];
|
235 |
-
var l;
|
236 |
-
var a;
|
237 |
-
var b;
|
238 |
-
|
239 |
-
x /= 95.047;
|
240 |
-
y /= 100;
|
241 |
-
z /= 108.883;
|
242 |
-
|
243 |
-
x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);
|
244 |
-
y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);
|
245 |
-
z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);
|
246 |
-
|
247 |
-
l = (116 * y) - 16;
|
248 |
-
a = 500 * (x - y);
|
249 |
-
b = 200 * (y - z);
|
250 |
-
|
251 |
-
return [l, a, b];
|
252 |
-
};
|
253 |
-
|
254 |
-
convert.hsl.rgb = function (hsl) {
|
255 |
-
var h = hsl[0] / 360;
|
256 |
-
var s = hsl[1] / 100;
|
257 |
-
var l = hsl[2] / 100;
|
258 |
-
var t1;
|
259 |
-
var t2;
|
260 |
-
var t3;
|
261 |
-
var rgb;
|
262 |
-
var val;
|
263 |
-
|
264 |
-
if (s === 0) {
|
265 |
-
val = l * 255;
|
266 |
-
return [val, val, val];
|
267 |
-
}
|
268 |
-
|
269 |
-
if (l < 0.5) {
|
270 |
-
t2 = l * (1 + s);
|
271 |
-
} else {
|
272 |
-
t2 = l + s - l * s;
|
273 |
-
}
|
274 |
-
|
275 |
-
t1 = 2 * l - t2;
|
276 |
-
|
277 |
-
rgb = [0, 0, 0];
|
278 |
-
for (var i = 0; i < 3; i++) {
|
279 |
-
t3 = h + 1 / 3 * -(i - 1);
|
280 |
-
if (t3 < 0) {
|
281 |
-
t3++;
|
282 |
-
}
|
283 |
-
if (t3 > 1) {
|
284 |
-
t3--;
|
285 |
-
}
|
286 |
-
|
287 |
-
if (6 * t3 < 1) {
|
288 |
-
val = t1 + (t2 - t1) * 6 * t3;
|
289 |
-
} else if (2 * t3 < 1) {
|
290 |
-
val = t2;
|
291 |
-
} else if (3 * t3 < 2) {
|
292 |
-
val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
|
293 |
-
} else {
|
294 |
-
val = t1;
|
295 |
-
}
|
296 |
-
|
297 |
-
rgb[i] = val * 255;
|
298 |
-
}
|
299 |
-
|
300 |
-
return rgb;
|
301 |
-
};
|
302 |
-
|
303 |
-
convert.hsl.hsv = function (hsl) {
|
304 |
-
var h = hsl[0];
|
305 |
-
var s = hsl[1] / 100;
|
306 |
-
var l = hsl[2] / 100;
|
307 |
-
var smin = s;
|
308 |
-
var lmin = Math.max(l, 0.01);
|
309 |
-
var sv;
|
310 |
-
var v;
|
311 |
-
|
312 |
-
l *= 2;
|
313 |
-
s *= (l <= 1) ? l : 2 - l;
|
314 |
-
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
315 |
-
v = (l + s) / 2;
|
316 |
-
sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);
|
317 |
-
|
318 |
-
return [h, sv * 100, v * 100];
|
319 |
-
};
|
320 |
-
|
321 |
-
convert.hsv.rgb = function (hsv) {
|
322 |
-
var h = hsv[0] / 60;
|
323 |
-
var s = hsv[1] / 100;
|
324 |
-
var v = hsv[2] / 100;
|
325 |
-
var hi = Math.floor(h) % 6;
|
326 |
-
|
327 |
-
var f = h - Math.floor(h);
|
328 |
-
var p = 255 * v * (1 - s);
|
329 |
-
var q = 255 * v * (1 - (s * f));
|
330 |
-
var t = 255 * v * (1 - (s * (1 - f)));
|
331 |
-
v *= 255;
|
332 |
-
|
333 |
-
switch (hi) {
|
334 |
-
case 0:
|
335 |
-
return [v, t, p];
|
336 |
-
case 1:
|
337 |
-
return [q, v, p];
|
338 |
-
case 2:
|
339 |
-
return [p, v, t];
|
340 |
-
case 3:
|
341 |
-
return [p, q, v];
|
342 |
-
case 4:
|
343 |
-
return [t, p, v];
|
344 |
-
case 5:
|
345 |
-
return [v, p, q];
|
346 |
-
}
|
347 |
-
};
|
348 |
-
|
349 |
-
convert.hsv.hsl = function (hsv) {
|
350 |
-
var h = hsv[0];
|
351 |
-
var s = hsv[1] / 100;
|
352 |
-
var v = hsv[2] / 100;
|
353 |
-
var vmin = Math.max(v, 0.01);
|
354 |
-
var lmin;
|
355 |
-
var sl;
|
356 |
-
var l;
|
357 |
-
|
358 |
-
l = (2 - s) * v;
|
359 |
-
lmin = (2 - s) * vmin;
|
360 |
-
sl = s * vmin;
|
361 |
-
sl /= (lmin <= 1) ? lmin : 2 - lmin;
|
362 |
-
sl = sl || 0;
|
363 |
-
l /= 2;
|
364 |
-
|
365 |
-
return [h, sl * 100, l * 100];
|
366 |
-
};
|
367 |
-
|
368 |
-
// http://dev.w3.org/csswg/css-color/#hwb-to-rgb
|
369 |
-
convert.hwb.rgb = function (hwb) {
|
370 |
-
var h = hwb[0] / 360;
|
371 |
-
var wh = hwb[1] / 100;
|
372 |
-
var bl = hwb[2] / 100;
|
373 |
-
var ratio = wh + bl;
|
374 |
-
var i;
|
375 |
-
var v;
|
376 |
-
var f;
|
377 |
-
var n;
|
378 |
-
|
379 |
-
// wh + bl cant be > 1
|
380 |
-
if (ratio > 1) {
|
381 |
-
wh /= ratio;
|
382 |
-
bl /= ratio;
|
383 |
-
}
|
384 |
-
|
385 |
-
i = Math.floor(6 * h);
|
386 |
-
v = 1 - bl;
|
387 |
-
f = 6 * h - i;
|
388 |
-
|
389 |
-
if ((i & 0x01) !== 0) {
|
390 |
-
f = 1 - f;
|
391 |
-
}
|
392 |
-
|
393 |
-
n = wh + f * (v - wh); // linear interpolation
|
394 |
-
|
395 |
-
var r;
|
396 |
-
var g;
|
397 |
-
var b;
|
398 |
-
switch (i) {
|
399 |
-
default:
|
400 |
-
case 6:
|
401 |
-
case 0: r = v; g = n; b = wh; break;
|
402 |
-
case 1: r = n; g = v; b = wh; break;
|
403 |
-
case 2: r = wh; g = v; b = n; break;
|
404 |
-
case 3: r = wh; g = n; b = v; break;
|
405 |
-
case 4: r = n; g = wh; b = v; break;
|
406 |
-
case 5: r = v; g = wh; b = n; break;
|
407 |
-
}
|
408 |
-
|
409 |
-
return [r * 255, g * 255, b * 255];
|
410 |
-
};
|
411 |
-
|
412 |
-
convert.cmyk.rgb = function (cmyk) {
|
413 |
-
var c = cmyk[0] / 100;
|
414 |
-
var m = cmyk[1] / 100;
|
415 |
-
var y = cmyk[2] / 100;
|
416 |
-
var k = cmyk[3] / 100;
|
417 |
-
var r;
|
418 |
-
var g;
|
419 |
-
var b;
|
420 |
-
|
421 |
-
r = 1 - Math.min(1, c * (1 - k) + k);
|
422 |
-
g = 1 - Math.min(1, m * (1 - k) + k);
|
423 |
-
b = 1 - Math.min(1, y * (1 - k) + k);
|
424 |
-
|
425 |
-
return [r * 255, g * 255, b * 255];
|
426 |
-
};
|
427 |
-
|
428 |
-
convert.xyz.rgb = function (xyz) {
|
429 |
-
var x = xyz[0] / 100;
|
430 |
-
var y = xyz[1] / 100;
|
431 |
-
var z = xyz[2] / 100;
|
432 |
-
var r;
|
433 |
-
var g;
|
434 |
-
var b;
|
435 |
-
|
436 |
-
r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
|
437 |
-
g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
|
438 |
-
b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);
|
439 |
-
|
440 |
-
// assume sRGB
|
441 |
-
r = r > 0.0031308
|
442 |
-
? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)
|
443 |
-
: r * 12.92;
|
444 |
-
|
445 |
-
g = g > 0.0031308
|
446 |
-
? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)
|
447 |
-
: g * 12.92;
|
448 |
-
|
449 |
-
b = b > 0.0031308
|
450 |
-
? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)
|
451 |
-
: b * 12.92;
|
452 |
-
|
453 |
-
r = Math.min(Math.max(0, r), 1);
|
454 |
-
g = Math.min(Math.max(0, g), 1);
|
455 |
-
b = Math.min(Math.max(0, b), 1);
|
456 |
-
|
457 |
-
return [r * 255, g * 255, b * 255];
|
458 |
-
};
|
459 |
-
|
460 |
-
convert.xyz.lab = function (xyz) {
|
461 |
-
var x = xyz[0];
|
462 |
-
var y = xyz[1];
|
463 |
-
var z = xyz[2];
|
464 |
-
var l;
|
465 |
-
var a;
|
466 |
-
var b;
|
467 |
-
|
468 |
-
x /= 95.047;
|
469 |
-
y /= 100;
|
470 |
-
z /= 108.883;
|
471 |
-
|
472 |
-
x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);
|
473 |
-
y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);
|
474 |
-
z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);
|
475 |
-
|
476 |
-
l = (116 * y) - 16;
|
477 |
-
a = 500 * (x - y);
|
478 |
-
b = 200 * (y - z);
|
479 |
-
|
480 |
-
return [l, a, b];
|
481 |
-
};
|
482 |
-
|
483 |
-
convert.lab.xyz = function (lab) {
|
484 |
-
var l = lab[0];
|
485 |
-
var a = lab[1];
|
486 |
-
var b = lab[2];
|
487 |
-
var x;
|
488 |
-
var y;
|
489 |
-
var z;
|
490 |
-
|
491 |
-
y = (l + 16) / 116;
|
492 |
-
x = a / 500 + y;
|
493 |
-
z = y - b / 200;
|
494 |
-
|
495 |
-
var y2 = Math.pow(y, 3);
|
496 |
-
var x2 = Math.pow(x, 3);
|
497 |
-
var z2 = Math.pow(z, 3);
|
498 |
-
y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
|
499 |
-
x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
|
500 |
-
z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
|
501 |
-
|
502 |
-
x *= 95.047;
|
503 |
-
y *= 100;
|
504 |
-
z *= 108.883;
|
505 |
-
|
506 |
-
return [x, y, z];
|
507 |
-
};
|
508 |
-
|
509 |
-
convert.lab.lch = function (lab) {
|
510 |
-
var l = lab[0];
|
511 |
-
var a = lab[1];
|
512 |
-
var b = lab[2];
|
513 |
-
var hr;
|
514 |
-
var h;
|
515 |
-
var c;
|
516 |
-
|
517 |
-
hr = Math.atan2(b, a);
|
518 |
-
h = hr * 360 / 2 / Math.PI;
|
519 |
-
|
520 |
-
if (h < 0) {
|
521 |
-
h += 360;
|
522 |
-
}
|
523 |
-
|
524 |
-
c = Math.sqrt(a * a + b * b);
|
525 |
-
|
526 |
-
return [l, c, h];
|
527 |
-
};
|
528 |
-
|
529 |
-
convert.lch.lab = function (lch) {
|
530 |
-
var l = lch[0];
|
531 |
-
var c = lch[1];
|
532 |
-
var h = lch[2];
|
533 |
-
var a;
|
534 |
-
var b;
|
535 |
-
var hr;
|
536 |
-
|
537 |
-
hr = h / 360 * 2 * Math.PI;
|
538 |
-
a = c * Math.cos(hr);
|
539 |
-
b = c * Math.sin(hr);
|
540 |
-
|
541 |
-
return [l, a, b];
|
542 |
-
};
|
543 |
-
|
544 |
-
convert.rgb.ansi16 = function (args) {
|
545 |
-
var r = args[0];
|
546 |
-
var g = args[1];
|
547 |
-
var b = args[2];
|
548 |
-
var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization
|
549 |
-
|
550 |
-
value = Math.round(value / 50);
|
551 |
-
|
552 |
-
if (value === 0) {
|
553 |
-
return 30;
|
554 |
-
}
|
555 |
-
|
556 |
-
var ansi = 30
|
557 |
-
+ ((Math.round(b / 255) << 2)
|
558 |
-
| (Math.round(g / 255) << 1)
|
559 |
-
| Math.round(r / 255));
|
560 |
-
|
561 |
-
if (value === 2) {
|
562 |
-
ansi += 60;
|
563 |
-
}
|
564 |
-
|
565 |
-
return ansi;
|
566 |
-
};
|
567 |
-
|
568 |
-
convert.hsv.ansi16 = function (args) {
|
569 |
-
// optimization here; we already know the value and don't need to get
|
570 |
-
// it converted for us.
|
571 |
-
return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
|
572 |
-
};
|
573 |
-
|
574 |
-
convert.rgb.ansi256 = function (args) {
|
575 |
-
var r = args[0];
|
576 |
-
var g = args[1];
|
577 |
-
var b = args[2];
|
578 |
-
|
579 |
-
// we use the extended greyscale palette here, with the exception of
|
580 |
-
// black and white. normal palette only has 4 greyscale shades.
|
581 |
-
if (r === g && g === b) {
|
582 |
-
if (r < 8) {
|
583 |
-
return 16;
|
584 |
-
}
|
585 |
-
|
586 |
-
if (r > 248) {
|
587 |
-
return 231;
|
588 |
-
}
|
589 |
-
|
590 |
-
return Math.round(((r - 8) / 247) * 24) + 232;
|
591 |
-
}
|
592 |
-
|
593 |
-
var ansi = 16
|
594 |
-
+ (36 * Math.round(r / 255 * 5))
|
595 |
-
+ (6 * Math.round(g / 255 * 5))
|
596 |
-
+ Math.round(b / 255 * 5);
|
597 |
-
|
598 |
-
return ansi;
|
599 |
-
};
|
600 |
-
|
601 |
-
convert.ansi16.rgb = function (args) {
|
602 |
-
var color = args % 10;
|
603 |
-
|
604 |
-
// handle greyscale
|
605 |
-
if (color === 0 || color === 7) {
|
606 |
-
if (args > 50) {
|
607 |
-
color += 3.5;
|
608 |
-
}
|
609 |
-
|
610 |
-
color = color / 10.5 * 255;
|
611 |
-
|
612 |
-
return [color, color, color];
|
613 |
-
}
|
614 |
-
|
615 |
-
var mult = (~~(args > 50) + 1) * 0.5;
|
616 |
-
var r = ((color & 1) * mult) * 255;
|
617 |
-
var g = (((color >> 1) & 1) * mult) * 255;
|
618 |
-
var b = (((color >> 2) & 1) * mult) * 255;
|
619 |
-
|
620 |
-
return [r, g, b];
|
621 |
-
};
|
622 |
-
|
623 |
-
convert.ansi256.rgb = function (args) {
|
624 |
-
// handle greyscale
|
625 |
-
if (args >= 232) {
|
626 |
-
var c = (args - 232) * 10 + 8;
|
627 |
-
return [c, c, c];
|
628 |
-
}
|
629 |
-
|
630 |
-
args -= 16;
|
631 |
-
|
632 |
-
var rem;
|
633 |
-
var r = Math.floor(args / 36) / 5 * 255;
|
634 |
-
var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
|
635 |
-
var b = (rem % 6) / 5 * 255;
|
636 |
-
|
637 |
-
return [r, g, b];
|
638 |
-
};
|
639 |
-
|
640 |
-
convert.rgb.hex = function (args) {
|
641 |
-
var integer = ((Math.round(args[0]) & 0xFF) << 16)
|
642 |
-
+ ((Math.round(args[1]) & 0xFF) << 8)
|
643 |
-
+ (Math.round(args[2]) & 0xFF);
|
644 |
-
|
645 |
-
var string = integer.toString(16).toUpperCase();
|
646 |
-
return '000000'.substring(string.length) + string;
|
647 |
-
};
|
648 |
-
|
649 |
-
convert.hex.rgb = function (args) {
|
650 |
-
var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
651 |
-
if (!match) {
|
652 |
-
return [0, 0, 0];
|
653 |
-
}
|
654 |
-
|
655 |
-
var colorString = match[0];
|
656 |
-
|
657 |
-
if (match[0].length === 3) {
|
658 |
-
colorString = colorString.split('').map(function (char) {
|
659 |
-
return char + char;
|
660 |
-
}).join('');
|
661 |
-
}
|
662 |
-
|
663 |
-
var integer = parseInt(colorString, 16);
|
664 |
-
var r = (integer >> 16) & 0xFF;
|
665 |
-
var g = (integer >> 8) & 0xFF;
|
666 |
-
var b = integer & 0xFF;
|
667 |
-
|
668 |
-
return [r, g, b];
|
669 |
-
};
|
670 |
-
|
671 |
-
convert.rgb.hcg = function (rgb) {
|
672 |
-
var r = rgb[0] / 255;
|
673 |
-
var g = rgb[1] / 255;
|
674 |
-
var b = rgb[2] / 255;
|
675 |
-
var max = Math.max(Math.max(r, g), b);
|
676 |
-
var min = Math.min(Math.min(r, g), b);
|
677 |
-
var chroma = (max - min);
|
678 |
-
var grayscale;
|
679 |
-
var hue;
|
680 |
-
|
681 |
-
if (chroma < 1) {
|
682 |
-
grayscale = min / (1 - chroma);
|
683 |
-
} else {
|
684 |
-
grayscale = 0;
|
685 |
-
}
|
686 |
-
|
687 |
-
if (chroma <= 0) {
|
688 |
-
hue = 0;
|
689 |
-
} else
|
690 |
-
if (max === r) {
|
691 |
-
hue = ((g - b) / chroma) % 6;
|
692 |
-
} else
|
693 |
-
if (max === g) {
|
694 |
-
hue = 2 + (b - r) / chroma;
|
695 |
-
} else {
|
696 |
-
hue = 4 + (r - g) / chroma + 4;
|
697 |
-
}
|
698 |
-
|
699 |
-
hue /= 6;
|
700 |
-
hue %= 1;
|
701 |
-
|
702 |
-
return [hue * 360, chroma * 100, grayscale * 100];
|
703 |
-
};
|
704 |
-
|
705 |
-
convert.hsl.hcg = function (hsl) {
|
706 |
-
var s = hsl[1] / 100;
|
707 |
-
var l = hsl[2] / 100;
|
708 |
-
var c = 1;
|
709 |
-
var f = 0;
|
710 |
-
|
711 |
-
if (l < 0.5) {
|
712 |
-
c = 2.0 * s * l;
|
713 |
-
} else {
|
714 |
-
c = 2.0 * s * (1.0 - l);
|
715 |
-
}
|
716 |
-
|
717 |
-
if (c < 1.0) {
|
718 |
-
f = (l - 0.5 * c) / (1.0 - c);
|
719 |
-
}
|
720 |
-
|
721 |
-
return [hsl[0], c * 100, f * 100];
|
722 |
-
};
|
723 |
-
|
724 |
-
convert.hsv.hcg = function (hsv) {
|
725 |
-
var s = hsv[1] / 100;
|
726 |
-
var v = hsv[2] / 100;
|
727 |
-
|
728 |
-
var c = s * v;
|
729 |
-
var f = 0;
|
730 |
-
|
731 |
-
if (c < 1.0) {
|
732 |
-
f = (v - c) / (1 - c);
|
733 |
-
}
|
734 |
-
|
735 |
-
return [hsv[0], c * 100, f * 100];
|
736 |
-
};
|
737 |
-
|
738 |
-
convert.hcg.rgb = function (hcg) {
|
739 |
-
var h = hcg[0] / 360;
|
740 |
-
var c = hcg[1] / 100;
|
741 |
-
var g = hcg[2] / 100;
|
742 |
-
|
743 |
-
if (c === 0.0) {
|
744 |
-
return [g * 255, g * 255, g * 255];
|
745 |
-
}
|
746 |
-
|
747 |
-
var pure = [0, 0, 0];
|
748 |
-
var hi = (h % 1) * 6;
|
749 |
-
var v = hi % 1;
|
750 |
-
var w = 1 - v;
|
751 |
-
var mg = 0;
|
752 |
-
|
753 |
-
switch (Math.floor(hi)) {
|
754 |
-
case 0:
|
755 |
-
pure[0] = 1; pure[1] = v; pure[2] = 0; break;
|
756 |
-
case 1:
|
757 |
-
pure[0] = w; pure[1] = 1; pure[2] = 0; break;
|
758 |
-
case 2:
|
759 |
-
pure[0] = 0; pure[1] = 1; pure[2] = v; break;
|
760 |
-
case 3:
|
761 |
-
pure[0] = 0; pure[1] = w; pure[2] = 1; break;
|
762 |
-
case 4:
|
763 |
-
pure[0] = v; pure[1] = 0; pure[2] = 1; break;
|
764 |
-
default:
|
765 |
-
pure[0] = 1; pure[1] = 0; pure[2] = w;
|
766 |
-
}
|
767 |
-
|
768 |
-
mg = (1.0 - c) * g;
|
769 |
-
|
770 |
-
return [
|
771 |
-
(c * pure[0] + mg) * 255,
|
772 |
-
(c * pure[1] + mg) * 255,
|
773 |
-
(c * pure[2] + mg) * 255
|
774 |
-
];
|
775 |
-
};
|
776 |
-
|
777 |
-
convert.hcg.hsv = function (hcg) {
|
778 |
-
var c = hcg[1] / 100;
|
779 |
-
var g = hcg[2] / 100;
|
780 |
-
|
781 |
-
var v = c + g * (1.0 - c);
|
782 |
-
var f = 0;
|
783 |
-
|
784 |
-
if (v > 0.0) {
|
785 |
-
f = c / v;
|
786 |
-
}
|
787 |
-
|
788 |
-
return [hcg[0], f * 100, v * 100];
|
789 |
-
};
|
790 |
-
|
791 |
-
convert.hcg.hsl = function (hcg) {
|
792 |
-
var c = hcg[1] / 100;
|
793 |
-
var g = hcg[2] / 100;
|
794 |
-
|
795 |
-
var l = g * (1.0 - c) + 0.5 * c;
|
796 |
-
var s = 0;
|
797 |
-
|
798 |
-
if (l > 0.0 && l < 0.5) {
|
799 |
-
s = c / (2 * l);
|
800 |
-
} else
|
801 |
-
if (l >= 0.5 && l < 1.0) {
|
802 |
-
s = c / (2 * (1 - l));
|
803 |
-
}
|
804 |
-
|
805 |
-
return [hcg[0], s * 100, l * 100];
|
806 |
-
};
|
807 |
-
|
808 |
-
convert.hcg.hwb = function (hcg) {
|
809 |
-
var c = hcg[1] / 100;
|
810 |
-
var g = hcg[2] / 100;
|
811 |
-
var v = c + g * (1.0 - c);
|
812 |
-
return [hcg[0], (v - c) * 100, (1 - v) * 100];
|
813 |
-
};
|
814 |
-
|
815 |
-
convert.hwb.hcg = function (hwb) {
|
816 |
-
var w = hwb[1] / 100;
|
817 |
-
var b = hwb[2] / 100;
|
818 |
-
var v = 1 - b;
|
819 |
-
var c = v - w;
|
820 |
-
var g = 0;
|
821 |
-
|
822 |
-
if (c < 1) {
|
823 |
-
g = (v - c) / (1 - c);
|
824 |
-
}
|
825 |
-
|
826 |
-
return [hwb[0], c * 100, g * 100];
|
827 |
-
};
|
828 |
-
|
829 |
-
convert.apple.rgb = function (apple) {
|
830 |
-
return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];
|
831 |
-
};
|
832 |
-
|
833 |
-
convert.rgb.apple = function (rgb) {
|
834 |
-
return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];
|
835 |
-
};
|
836 |
-
|
837 |
-
convert.gray.rgb = function (args) {
|
838 |
-
return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
|
839 |
-
};
|
840 |
-
|
841 |
-
convert.gray.hsl = convert.gray.hsv = function (args) {
|
842 |
-
return [0, 0, args[0]];
|
843 |
-
};
|
844 |
-
|
845 |
-
convert.gray.hwb = function (gray) {
|
846 |
-
return [0, 100, gray[0]];
|
847 |
-
};
|
848 |
-
|
849 |
-
convert.gray.cmyk = function (gray) {
|
850 |
-
return [0, 0, 0, gray[0]];
|
851 |
-
};
|
852 |
-
|
853 |
-
convert.gray.lab = function (gray) {
|
854 |
-
return [gray[0], 0, 0];
|
855 |
-
};
|
856 |
-
|
857 |
-
convert.gray.hex = function (gray) {
|
858 |
-
var val = Math.round(gray[0] / 100 * 255) & 0xFF;
|
859 |
-
var integer = (val << 16) + (val << 8) + val;
|
860 |
-
|
861 |
-
var string = integer.toString(16).toUpperCase();
|
862 |
-
return '000000'.substring(string.length) + string;
|
863 |
-
};
|
864 |
-
|
865 |
-
convert.rgb.gray = function (rgb) {
|
866 |
-
var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
867 |
-
return [val / 255 * 100];
|
868 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/ansi-styles@3.2.1/node_modules/color-convert/index.js
DELETED
@@ -1,78 +0,0 @@
|
|
1 |
-
var conversions = require('./conversions');
|
2 |
-
var route = require('./route');
|
3 |
-
|
4 |
-
var convert = {};
|
5 |
-
|
6 |
-
var models = Object.keys(conversions);
|
7 |
-
|
8 |
-
function wrapRaw(fn) {
|
9 |
-
var wrappedFn = function (args) {
|
10 |
-
if (args === undefined || args === null) {
|
11 |
-
return args;
|
12 |
-
}
|
13 |
-
|
14 |
-
if (arguments.length > 1) {
|
15 |
-
args = Array.prototype.slice.call(arguments);
|
16 |
-
}
|
17 |
-
|
18 |
-
return fn(args);
|
19 |
-
};
|
20 |
-
|
21 |
-
// preserve .conversion property if there is one
|
22 |
-
if ('conversion' in fn) {
|
23 |
-
wrappedFn.conversion = fn.conversion;
|
24 |
-
}
|
25 |
-
|
26 |
-
return wrappedFn;
|
27 |
-
}
|
28 |
-
|
29 |
-
function wrapRounded(fn) {
|
30 |
-
var wrappedFn = function (args) {
|
31 |
-
if (args === undefined || args === null) {
|
32 |
-
return args;
|
33 |
-
}
|
34 |
-
|
35 |
-
if (arguments.length > 1) {
|
36 |
-
args = Array.prototype.slice.call(arguments);
|
37 |
-
}
|
38 |
-
|
39 |
-
var result = fn(args);
|
40 |
-
|
41 |
-
// we're assuming the result is an array here.
|
42 |
-
// see notice in conversions.js; don't use box types
|
43 |
-
// in conversion functions.
|
44 |
-
if (typeof result === 'object') {
|
45 |
-
for (var len = result.length, i = 0; i < len; i++) {
|
46 |
-
result[i] = Math.round(result[i]);
|
47 |
-
}
|
48 |
-
}
|
49 |
-
|
50 |
-
return result;
|
51 |
-
};
|
52 |
-
|
53 |
-
// preserve .conversion property if there is one
|
54 |
-
if ('conversion' in fn) {
|
55 |
-
wrappedFn.conversion = fn.conversion;
|
56 |
-
}
|
57 |
-
|
58 |
-
return wrappedFn;
|
59 |
-
}
|
60 |
-
|
61 |
-
models.forEach(function (fromModel) {
|
62 |
-
convert[fromModel] = {};
|
63 |
-
|
64 |
-
Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});
|
65 |
-
Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});
|
66 |
-
|
67 |
-
var routes = route(fromModel);
|
68 |
-
var routeModels = Object.keys(routes);
|
69 |
-
|
70 |
-
routeModels.forEach(function (toModel) {
|
71 |
-
var fn = routes[toModel];
|
72 |
-
|
73 |
-
convert[fromModel][toModel] = wrapRounded(fn);
|
74 |
-
convert[fromModel][toModel].raw = wrapRaw(fn);
|
75 |
-
});
|
76 |
-
});
|
77 |
-
|
78 |
-
module.exports = convert;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/ansi-styles@3.2.1/node_modules/color-convert/package.json
DELETED
@@ -1,46 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "color-convert",
|
3 |
-
"description": "Plain color conversion functions",
|
4 |
-
"version": "1.9.3",
|
5 |
-
"author": "Heather Arthur <fayearthur@gmail.com>",
|
6 |
-
"license": "MIT",
|
7 |
-
"repository": "Qix-/color-convert",
|
8 |
-
"scripts": {
|
9 |
-
"pretest": "xo",
|
10 |
-
"test": "node test/basic.js"
|
11 |
-
},
|
12 |
-
"keywords": [
|
13 |
-
"color",
|
14 |
-
"colour",
|
15 |
-
"convert",
|
16 |
-
"converter",
|
17 |
-
"conversion",
|
18 |
-
"rgb",
|
19 |
-
"hsl",
|
20 |
-
"hsv",
|
21 |
-
"hwb",
|
22 |
-
"cmyk",
|
23 |
-
"ansi",
|
24 |
-
"ansi16"
|
25 |
-
],
|
26 |
-
"files": [
|
27 |
-
"index.js",
|
28 |
-
"conversions.js",
|
29 |
-
"css-keywords.js",
|
30 |
-
"route.js"
|
31 |
-
],
|
32 |
-
"xo": {
|
33 |
-
"rules": {
|
34 |
-
"default-case": 0,
|
35 |
-
"no-inline-comments": 0,
|
36 |
-
"operator-linebreak": 0
|
37 |
-
}
|
38 |
-
},
|
39 |
-
"devDependencies": {
|
40 |
-
"chalk": "1.1.1",
|
41 |
-
"xo": "0.11.2"
|
42 |
-
},
|
43 |
-
"dependencies": {
|
44 |
-
"color-name": "1.1.3"
|
45 |
-
}
|
46 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/ansi-styles@3.2.1/node_modules/color-convert/route.js
DELETED
@@ -1,97 +0,0 @@
|
|
1 |
-
var conversions = require('./conversions');
|
2 |
-
|
3 |
-
/*
|
4 |
-
this function routes a model to all other models.
|
5 |
-
|
6 |
-
all functions that are routed have a property `.conversion` attached
|
7 |
-
to the returned synthetic function. This property is an array
|
8 |
-
of strings, each with the steps in between the 'from' and 'to'
|
9 |
-
color models (inclusive).
|
10 |
-
|
11 |
-
conversions that are not possible simply are not included.
|
12 |
-
*/
|
13 |
-
|
14 |
-
function buildGraph() {
|
15 |
-
var graph = {};
|
16 |
-
// https://jsperf.com/object-keys-vs-for-in-with-closure/3
|
17 |
-
var models = Object.keys(conversions);
|
18 |
-
|
19 |
-
for (var len = models.length, i = 0; i < len; i++) {
|
20 |
-
graph[models[i]] = {
|
21 |
-
// http://jsperf.com/1-vs-infinity
|
22 |
-
// micro-opt, but this is simple.
|
23 |
-
distance: -1,
|
24 |
-
parent: null
|
25 |
-
};
|
26 |
-
}
|
27 |
-
|
28 |
-
return graph;
|
29 |
-
}
|
30 |
-
|
31 |
-
// https://en.wikipedia.org/wiki/Breadth-first_search
|
32 |
-
function deriveBFS(fromModel) {
|
33 |
-
var graph = buildGraph();
|
34 |
-
var queue = [fromModel]; // unshift -> queue -> pop
|
35 |
-
|
36 |
-
graph[fromModel].distance = 0;
|
37 |
-
|
38 |
-
while (queue.length) {
|
39 |
-
var current = queue.pop();
|
40 |
-
var adjacents = Object.keys(conversions[current]);
|
41 |
-
|
42 |
-
for (var len = adjacents.length, i = 0; i < len; i++) {
|
43 |
-
var adjacent = adjacents[i];
|
44 |
-
var node = graph[adjacent];
|
45 |
-
|
46 |
-
if (node.distance === -1) {
|
47 |
-
node.distance = graph[current].distance + 1;
|
48 |
-
node.parent = current;
|
49 |
-
queue.unshift(adjacent);
|
50 |
-
}
|
51 |
-
}
|
52 |
-
}
|
53 |
-
|
54 |
-
return graph;
|
55 |
-
}
|
56 |
-
|
57 |
-
function link(from, to) {
|
58 |
-
return function (args) {
|
59 |
-
return to(from(args));
|
60 |
-
};
|
61 |
-
}
|
62 |
-
|
63 |
-
function wrapConversion(toModel, graph) {
|
64 |
-
var path = [graph[toModel].parent, toModel];
|
65 |
-
var fn = conversions[graph[toModel].parent][toModel];
|
66 |
-
|
67 |
-
var cur = graph[toModel].parent;
|
68 |
-
while (graph[cur].parent) {
|
69 |
-
path.unshift(graph[cur].parent);
|
70 |
-
fn = link(conversions[graph[cur].parent][cur], fn);
|
71 |
-
cur = graph[cur].parent;
|
72 |
-
}
|
73 |
-
|
74 |
-
fn.conversion = path;
|
75 |
-
return fn;
|
76 |
-
}
|
77 |
-
|
78 |
-
module.exports = function (fromModel) {
|
79 |
-
var graph = deriveBFS(fromModel);
|
80 |
-
var conversion = {};
|
81 |
-
|
82 |
-
var models = Object.keys(graph);
|
83 |
-
for (var len = models.length, i = 0; i < len; i++) {
|
84 |
-
var toModel = models[i];
|
85 |
-
var node = graph[toModel];
|
86 |
-
|
87 |
-
if (node.parent === null) {
|
88 |
-
// no possible conversion, or this node is the source model.
|
89 |
-
continue;
|
90 |
-
}
|
91 |
-
|
92 |
-
conversion[toModel] = wrapConversion(toModel, graph);
|
93 |
-
}
|
94 |
-
|
95 |
-
return conversion;
|
96 |
-
};
|
97 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/.github/FUNDING.yml
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
tidelift: "npm/balanced-match"
|
2 |
-
patreon: juliangruber
|
|
|
|
|
|
node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/LICENSE.md
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
(MIT)
|
2 |
-
|
3 |
-
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
4 |
-
|
5 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6 |
-
this software and associated documentation files (the "Software"), to deal in
|
7 |
-
the Software without restriction, including without limitation the rights to
|
8 |
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
9 |
-
of the Software, and to permit persons to whom the Software is furnished to do
|
10 |
-
so, subject to the following conditions:
|
11 |
-
|
12 |
-
The above copyright notice and this permission notice shall be included in all
|
13 |
-
copies or substantial portions of the Software.
|
14 |
-
|
15 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
-
SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/README.md
DELETED
@@ -1,97 +0,0 @@
|
|
1 |
-
# balanced-match
|
2 |
-
|
3 |
-
Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well!
|
4 |
-
|
5 |
-
[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)
|
6 |
-
[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)
|
7 |
-
|
8 |
-
[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match)
|
9 |
-
|
10 |
-
## Example
|
11 |
-
|
12 |
-
Get the first matching pair of braces:
|
13 |
-
|
14 |
-
```js
|
15 |
-
var balanced = require('balanced-match');
|
16 |
-
|
17 |
-
console.log(balanced('{', '}', 'pre{in{nested}}post'));
|
18 |
-
console.log(balanced('{', '}', 'pre{first}between{second}post'));
|
19 |
-
console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'));
|
20 |
-
```
|
21 |
-
|
22 |
-
The matches are:
|
23 |
-
|
24 |
-
```bash
|
25 |
-
$ node example.js
|
26 |
-
{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
|
27 |
-
{ start: 3,
|
28 |
-
end: 9,
|
29 |
-
pre: 'pre',
|
30 |
-
body: 'first',
|
31 |
-
post: 'between{second}post' }
|
32 |
-
{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
|
33 |
-
```
|
34 |
-
|
35 |
-
## API
|
36 |
-
|
37 |
-
### var m = balanced(a, b, str)
|
38 |
-
|
39 |
-
For the first non-nested matching pair of `a` and `b` in `str`, return an
|
40 |
-
object with those keys:
|
41 |
-
|
42 |
-
* **start** the index of the first match of `a`
|
43 |
-
* **end** the index of the matching `b`
|
44 |
-
* **pre** the preamble, `a` and `b` not included
|
45 |
-
* **body** the match, `a` and `b` not included
|
46 |
-
* **post** the postscript, `a` and `b` not included
|
47 |
-
|
48 |
-
If there's no match, `undefined` will be returned.
|
49 |
-
|
50 |
-
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
|
51 |
-
|
52 |
-
### var r = balanced.range(a, b, str)
|
53 |
-
|
54 |
-
For the first non-nested matching pair of `a` and `b` in `str`, return an
|
55 |
-
array with indexes: `[ <a index>, <b index> ]`.
|
56 |
-
|
57 |
-
If there's no match, `undefined` will be returned.
|
58 |
-
|
59 |
-
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.
|
60 |
-
|
61 |
-
## Installation
|
62 |
-
|
63 |
-
With [npm](https://npmjs.org) do:
|
64 |
-
|
65 |
-
```bash
|
66 |
-
npm install balanced-match
|
67 |
-
```
|
68 |
-
|
69 |
-
## Security contact information
|
70 |
-
|
71 |
-
To report a security vulnerability, please use the
|
72 |
-
[Tidelift security contact](https://tidelift.com/security).
|
73 |
-
Tidelift will coordinate the fix and disclosure.
|
74 |
-
|
75 |
-
## License
|
76 |
-
|
77 |
-
(MIT)
|
78 |
-
|
79 |
-
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
80 |
-
|
81 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
82 |
-
this software and associated documentation files (the "Software"), to deal in
|
83 |
-
the Software without restriction, including without limitation the rights to
|
84 |
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
85 |
-
of the Software, and to permit persons to whom the Software is furnished to do
|
86 |
-
so, subject to the following conditions:
|
87 |
-
|
88 |
-
The above copyright notice and this permission notice shall be included in all
|
89 |
-
copies or substantial portions of the Software.
|
90 |
-
|
91 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
92 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
93 |
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
94 |
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
95 |
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
96 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
97 |
-
SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js
DELETED
@@ -1,62 +0,0 @@
|
|
1 |
-
'use strict';
|
2 |
-
module.exports = balanced;
|
3 |
-
function balanced(a, b, str) {
|
4 |
-
if (a instanceof RegExp) a = maybeMatch(a, str);
|
5 |
-
if (b instanceof RegExp) b = maybeMatch(b, str);
|
6 |
-
|
7 |
-
var r = range(a, b, str);
|
8 |
-
|
9 |
-
return r && {
|
10 |
-
start: r[0],
|
11 |
-
end: r[1],
|
12 |
-
pre: str.slice(0, r[0]),
|
13 |
-
body: str.slice(r[0] + a.length, r[1]),
|
14 |
-
post: str.slice(r[1] + b.length)
|
15 |
-
};
|
16 |
-
}
|
17 |
-
|
18 |
-
function maybeMatch(reg, str) {
|
19 |
-
var m = str.match(reg);
|
20 |
-
return m ? m[0] : null;
|
21 |
-
}
|
22 |
-
|
23 |
-
balanced.range = range;
|
24 |
-
function range(a, b, str) {
|
25 |
-
var begs, beg, left, right, result;
|
26 |
-
var ai = str.indexOf(a);
|
27 |
-
var bi = str.indexOf(b, ai + 1);
|
28 |
-
var i = ai;
|
29 |
-
|
30 |
-
if (ai >= 0 && bi > 0) {
|
31 |
-
if(a===b) {
|
32 |
-
return [ai, bi];
|
33 |
-
}
|
34 |
-
begs = [];
|
35 |
-
left = str.length;
|
36 |
-
|
37 |
-
while (i >= 0 && !result) {
|
38 |
-
if (i == ai) {
|
39 |
-
begs.push(i);
|
40 |
-
ai = str.indexOf(a, i + 1);
|
41 |
-
} else if (begs.length == 1) {
|
42 |
-
result = [ begs.pop(), bi ];
|
43 |
-
} else {
|
44 |
-
beg = begs.pop();
|
45 |
-
if (beg < left) {
|
46 |
-
left = beg;
|
47 |
-
right = bi;
|
48 |
-
}
|
49 |
-
|
50 |
-
bi = str.indexOf(b, i + 1);
|
51 |
-
}
|
52 |
-
|
53 |
-
i = ai < bi && ai >= 0 ? ai : bi;
|
54 |
-
}
|
55 |
-
|
56 |
-
if (begs.length) {
|
57 |
-
result = [ left, right ];
|
58 |
-
}
|
59 |
-
}
|
60 |
-
|
61 |
-
return result;
|
62 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/package.json
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "balanced-match",
|
3 |
-
"description": "Match balanced character pairs, like \"{\" and \"}\"",
|
4 |
-
"version": "1.0.2",
|
5 |
-
"repository": {
|
6 |
-
"type": "git",
|
7 |
-
"url": "git://github.com/juliangruber/balanced-match.git"
|
8 |
-
},
|
9 |
-
"homepage": "https://github.com/juliangruber/balanced-match",
|
10 |
-
"main": "index.js",
|
11 |
-
"scripts": {
|
12 |
-
"test": "tape test/test.js",
|
13 |
-
"bench": "matcha test/bench.js"
|
14 |
-
},
|
15 |
-
"devDependencies": {
|
16 |
-
"matcha": "^0.7.0",
|
17 |
-
"tape": "^4.6.0"
|
18 |
-
},
|
19 |
-
"keywords": [
|
20 |
-
"match",
|
21 |
-
"regexp",
|
22 |
-
"test",
|
23 |
-
"balanced",
|
24 |
-
"parse"
|
25 |
-
],
|
26 |
-
"author": {
|
27 |
-
"name": "Julian Gruber",
|
28 |
-
"email": "mail@juliangruber.com",
|
29 |
-
"url": "http://juliangruber.com"
|
30 |
-
},
|
31 |
-
"license": "MIT",
|
32 |
-
"testling": {
|
33 |
-
"files": "test/*.js",
|
34 |
-
"browsers": [
|
35 |
-
"ie/8..latest",
|
36 |
-
"firefox/20..latest",
|
37 |
-
"firefox/nightly",
|
38 |
-
"chrome/25..latest",
|
39 |
-
"chrome/canary",
|
40 |
-
"opera/12..latest",
|
41 |
-
"opera/next",
|
42 |
-
"safari/5.1..latest",
|
43 |
-
"ipad/6.0..latest",
|
44 |
-
"iphone/6.0..latest",
|
45 |
-
"android-browser/4.2..latest"
|
46 |
-
]
|
47 |
-
}
|
48 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/brace-expansion@1.1.11/node_modules/balanced-match/.github/FUNDING.yml
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
tidelift: "npm/balanced-match"
|
2 |
-
patreon: juliangruber
|
|
|
|
|
|
node_modules/.pnpm/brace-expansion@1.1.11/node_modules/balanced-match/LICENSE.md
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
(MIT)
|
2 |
-
|
3 |
-
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
4 |
-
|
5 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6 |
-
this software and associated documentation files (the "Software"), to deal in
|
7 |
-
the Software without restriction, including without limitation the rights to
|
8 |
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
9 |
-
of the Software, and to permit persons to whom the Software is furnished to do
|
10 |
-
so, subject to the following conditions:
|
11 |
-
|
12 |
-
The above copyright notice and this permission notice shall be included in all
|
13 |
-
copies or substantial portions of the Software.
|
14 |
-
|
15 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
-
SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/brace-expansion@1.1.11/node_modules/balanced-match/README.md
DELETED
@@ -1,97 +0,0 @@
|
|
1 |
-
# balanced-match
|
2 |
-
|
3 |
-
Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well!
|
4 |
-
|
5 |
-
[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)
|
6 |
-
[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)
|
7 |
-
|
8 |
-
[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match)
|
9 |
-
|
10 |
-
## Example
|
11 |
-
|
12 |
-
Get the first matching pair of braces:
|
13 |
-
|
14 |
-
```js
|
15 |
-
var balanced = require('balanced-match');
|
16 |
-
|
17 |
-
console.log(balanced('{', '}', 'pre{in{nested}}post'));
|
18 |
-
console.log(balanced('{', '}', 'pre{first}between{second}post'));
|
19 |
-
console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'));
|
20 |
-
```
|
21 |
-
|
22 |
-
The matches are:
|
23 |
-
|
24 |
-
```bash
|
25 |
-
$ node example.js
|
26 |
-
{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
|
27 |
-
{ start: 3,
|
28 |
-
end: 9,
|
29 |
-
pre: 'pre',
|
30 |
-
body: 'first',
|
31 |
-
post: 'between{second}post' }
|
32 |
-
{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
|
33 |
-
```
|
34 |
-
|
35 |
-
## API
|
36 |
-
|
37 |
-
### var m = balanced(a, b, str)
|
38 |
-
|
39 |
-
For the first non-nested matching pair of `a` and `b` in `str`, return an
|
40 |
-
object with those keys:
|
41 |
-
|
42 |
-
* **start** the index of the first match of `a`
|
43 |
-
* **end** the index of the matching `b`
|
44 |
-
* **pre** the preamble, `a` and `b` not included
|
45 |
-
* **body** the match, `a` and `b` not included
|
46 |
-
* **post** the postscript, `a` and `b` not included
|
47 |
-
|
48 |
-
If there's no match, `undefined` will be returned.
|
49 |
-
|
50 |
-
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
|
51 |
-
|
52 |
-
### var r = balanced.range(a, b, str)
|
53 |
-
|
54 |
-
For the first non-nested matching pair of `a` and `b` in `str`, return an
|
55 |
-
array with indexes: `[ <a index>, <b index> ]`.
|
56 |
-
|
57 |
-
If there's no match, `undefined` will be returned.
|
58 |
-
|
59 |
-
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.
|
60 |
-
|
61 |
-
## Installation
|
62 |
-
|
63 |
-
With [npm](https://npmjs.org) do:
|
64 |
-
|
65 |
-
```bash
|
66 |
-
npm install balanced-match
|
67 |
-
```
|
68 |
-
|
69 |
-
## Security contact information
|
70 |
-
|
71 |
-
To report a security vulnerability, please use the
|
72 |
-
[Tidelift security contact](https://tidelift.com/security).
|
73 |
-
Tidelift will coordinate the fix and disclosure.
|
74 |
-
|
75 |
-
## License
|
76 |
-
|
77 |
-
(MIT)
|
78 |
-
|
79 |
-
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
80 |
-
|
81 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
82 |
-
this software and associated documentation files (the "Software"), to deal in
|
83 |
-
the Software without restriction, including without limitation the rights to
|
84 |
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
85 |
-
of the Software, and to permit persons to whom the Software is furnished to do
|
86 |
-
so, subject to the following conditions:
|
87 |
-
|
88 |
-
The above copyright notice and this permission notice shall be included in all
|
89 |
-
copies or substantial portions of the Software.
|
90 |
-
|
91 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
92 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
93 |
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
94 |
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
95 |
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
96 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
97 |
-
SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/brace-expansion@1.1.11/node_modules/balanced-match/index.js
DELETED
@@ -1,62 +0,0 @@
|
|
1 |
-
'use strict';
|
2 |
-
module.exports = balanced;
|
3 |
-
function balanced(a, b, str) {
|
4 |
-
if (a instanceof RegExp) a = maybeMatch(a, str);
|
5 |
-
if (b instanceof RegExp) b = maybeMatch(b, str);
|
6 |
-
|
7 |
-
var r = range(a, b, str);
|
8 |
-
|
9 |
-
return r && {
|
10 |
-
start: r[0],
|
11 |
-
end: r[1],
|
12 |
-
pre: str.slice(0, r[0]),
|
13 |
-
body: str.slice(r[0] + a.length, r[1]),
|
14 |
-
post: str.slice(r[1] + b.length)
|
15 |
-
};
|
16 |
-
}
|
17 |
-
|
18 |
-
function maybeMatch(reg, str) {
|
19 |
-
var m = str.match(reg);
|
20 |
-
return m ? m[0] : null;
|
21 |
-
}
|
22 |
-
|
23 |
-
balanced.range = range;
|
24 |
-
function range(a, b, str) {
|
25 |
-
var begs, beg, left, right, result;
|
26 |
-
var ai = str.indexOf(a);
|
27 |
-
var bi = str.indexOf(b, ai + 1);
|
28 |
-
var i = ai;
|
29 |
-
|
30 |
-
if (ai >= 0 && bi > 0) {
|
31 |
-
if(a===b) {
|
32 |
-
return [ai, bi];
|
33 |
-
}
|
34 |
-
begs = [];
|
35 |
-
left = str.length;
|
36 |
-
|
37 |
-
while (i >= 0 && !result) {
|
38 |
-
if (i == ai) {
|
39 |
-
begs.push(i);
|
40 |
-
ai = str.indexOf(a, i + 1);
|
41 |
-
} else if (begs.length == 1) {
|
42 |
-
result = [ begs.pop(), bi ];
|
43 |
-
} else {
|
44 |
-
beg = begs.pop();
|
45 |
-
if (beg < left) {
|
46 |
-
left = beg;
|
47 |
-
right = bi;
|
48 |
-
}
|
49 |
-
|
50 |
-
bi = str.indexOf(b, i + 1);
|
51 |
-
}
|
52 |
-
|
53 |
-
i = ai < bi && ai >= 0 ? ai : bi;
|
54 |
-
}
|
55 |
-
|
56 |
-
if (begs.length) {
|
57 |
-
result = [ left, right ];
|
58 |
-
}
|
59 |
-
}
|
60 |
-
|
61 |
-
return result;
|
62 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/brace-expansion@1.1.11/node_modules/balanced-match/package.json
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "balanced-match",
|
3 |
-
"description": "Match balanced character pairs, like \"{\" and \"}\"",
|
4 |
-
"version": "1.0.2",
|
5 |
-
"repository": {
|
6 |
-
"type": "git",
|
7 |
-
"url": "git://github.com/juliangruber/balanced-match.git"
|
8 |
-
},
|
9 |
-
"homepage": "https://github.com/juliangruber/balanced-match",
|
10 |
-
"main": "index.js",
|
11 |
-
"scripts": {
|
12 |
-
"test": "tape test/test.js",
|
13 |
-
"bench": "matcha test/bench.js"
|
14 |
-
},
|
15 |
-
"devDependencies": {
|
16 |
-
"matcha": "^0.7.0",
|
17 |
-
"tape": "^4.6.0"
|
18 |
-
},
|
19 |
-
"keywords": [
|
20 |
-
"match",
|
21 |
-
"regexp",
|
22 |
-
"test",
|
23 |
-
"balanced",
|
24 |
-
"parse"
|
25 |
-
],
|
26 |
-
"author": {
|
27 |
-
"name": "Julian Gruber",
|
28 |
-
"email": "mail@juliangruber.com",
|
29 |
-
"url": "http://juliangruber.com"
|
30 |
-
},
|
31 |
-
"license": "MIT",
|
32 |
-
"testling": {
|
33 |
-
"files": "test/*.js",
|
34 |
-
"browsers": [
|
35 |
-
"ie/8..latest",
|
36 |
-
"firefox/20..latest",
|
37 |
-
"firefox/nightly",
|
38 |
-
"chrome/25..latest",
|
39 |
-
"chrome/canary",
|
40 |
-
"opera/12..latest",
|
41 |
-
"opera/next",
|
42 |
-
"safari/5.1..latest",
|
43 |
-
"ipad/6.0..latest",
|
44 |
-
"iphone/6.0..latest",
|
45 |
-
"android-browser/4.2..latest"
|
46 |
-
]
|
47 |
-
}
|
48 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/brace-expansion@1.1.11/node_modules/brace-expansion/LICENSE
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
MIT License
|
2 |
-
|
3 |
-
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
4 |
-
|
5 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
-
of this software and associated documentation files (the "Software"), to deal
|
7 |
-
in the Software without restriction, including without limitation the rights
|
8 |
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
-
copies of the Software, and to permit persons to whom the Software is
|
10 |
-
furnished to do so, subject to the following conditions:
|
11 |
-
|
12 |
-
The above copyright notice and this permission notice shall be included in all
|
13 |
-
copies or substantial portions of the Software.
|
14 |
-
|
15 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
-
SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/brace-expansion@1.1.11/node_modules/brace-expansion/README.md
DELETED
@@ -1,129 +0,0 @@
|
|
1 |
-
# brace-expansion
|
2 |
-
|
3 |
-
[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
|
4 |
-
as known from sh/bash, in JavaScript.
|
5 |
-
|
6 |
-
[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)
|
7 |
-
[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion)
|
8 |
-
[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/)
|
9 |
-
|
10 |
-
[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion)
|
11 |
-
|
12 |
-
## Example
|
13 |
-
|
14 |
-
```js
|
15 |
-
var expand = require('brace-expansion');
|
16 |
-
|
17 |
-
expand('file-{a,b,c}.jpg')
|
18 |
-
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
|
19 |
-
|
20 |
-
expand('-v{,,}')
|
21 |
-
// => ['-v', '-v', '-v']
|
22 |
-
|
23 |
-
expand('file{0..2}.jpg')
|
24 |
-
// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
|
25 |
-
|
26 |
-
expand('file-{a..c}.jpg')
|
27 |
-
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
|
28 |
-
|
29 |
-
expand('file{2..0}.jpg')
|
30 |
-
// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
|
31 |
-
|
32 |
-
expand('file{0..4..2}.jpg')
|
33 |
-
// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
|
34 |
-
|
35 |
-
expand('file-{a..e..2}.jpg')
|
36 |
-
// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
|
37 |
-
|
38 |
-
expand('file{00..10..5}.jpg')
|
39 |
-
// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
|
40 |
-
|
41 |
-
expand('{{A..C},{a..c}}')
|
42 |
-
// => ['A', 'B', 'C', 'a', 'b', 'c']
|
43 |
-
|
44 |
-
expand('ppp{,config,oe{,conf}}')
|
45 |
-
// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
|
46 |
-
```
|
47 |
-
|
48 |
-
## API
|
49 |
-
|
50 |
-
```js
|
51 |
-
var expand = require('brace-expansion');
|
52 |
-
```
|
53 |
-
|
54 |
-
### var expanded = expand(str)
|
55 |
-
|
56 |
-
Return an array of all possible and valid expansions of `str`. If none are
|
57 |
-
found, `[str]` is returned.
|
58 |
-
|
59 |
-
Valid expansions are:
|
60 |
-
|
61 |
-
```js
|
62 |
-
/^(.*,)+(.+)?$/
|
63 |
-
// {a,b,...}
|
64 |
-
```
|
65 |
-
|
66 |
-
A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
|
67 |
-
|
68 |
-
```js
|
69 |
-
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
70 |
-
// {x..y[..incr]}
|
71 |
-
```
|
72 |
-
|
73 |
-
A numeric sequence from `x` to `y` inclusive, with optional increment.
|
74 |
-
If `x` or `y` start with a leading `0`, all the numbers will be padded
|
75 |
-
to have equal length. Negative numbers and backwards iteration work too.
|
76 |
-
|
77 |
-
```js
|
78 |
-
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
79 |
-
// {x..y[..incr]}
|
80 |
-
```
|
81 |
-
|
82 |
-
An alphabetic sequence from `x` to `y` inclusive, with optional increment.
|
83 |
-
`x` and `y` must be exactly one character, and if given, `incr` must be a
|
84 |
-
number.
|
85 |
-
|
86 |
-
For compatibility reasons, the string `${` is not eligible for brace expansion.
|
87 |
-
|
88 |
-
## Installation
|
89 |
-
|
90 |
-
With [npm](https://npmjs.org) do:
|
91 |
-
|
92 |
-
```bash
|
93 |
-
npm install brace-expansion
|
94 |
-
```
|
95 |
-
|
96 |
-
## Contributors
|
97 |
-
|
98 |
-
- [Julian Gruber](https://github.com/juliangruber)
|
99 |
-
- [Isaac Z. Schlueter](https://github.com/isaacs)
|
100 |
-
|
101 |
-
## Sponsors
|
102 |
-
|
103 |
-
This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
|
104 |
-
|
105 |
-
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)!
|
106 |
-
|
107 |
-
## License
|
108 |
-
|
109 |
-
(MIT)
|
110 |
-
|
111 |
-
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
112 |
-
|
113 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
114 |
-
this software and associated documentation files (the "Software"), to deal in
|
115 |
-
the Software without restriction, including without limitation the rights to
|
116 |
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
117 |
-
of the Software, and to permit persons to whom the Software is furnished to do
|
118 |
-
so, subject to the following conditions:
|
119 |
-
|
120 |
-
The above copyright notice and this permission notice shall be included in all
|
121 |
-
copies or substantial portions of the Software.
|
122 |
-
|
123 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
124 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
125 |
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
126 |
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
127 |
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
128 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
129 |
-
SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/brace-expansion@1.1.11/node_modules/brace-expansion/index.js
DELETED
@@ -1,201 +0,0 @@
|
|
1 |
-
var concatMap = require('concat-map');
|
2 |
-
var balanced = require('balanced-match');
|
3 |
-
|
4 |
-
module.exports = expandTop;
|
5 |
-
|
6 |
-
var escSlash = '\0SLASH'+Math.random()+'\0';
|
7 |
-
var escOpen = '\0OPEN'+Math.random()+'\0';
|
8 |
-
var escClose = '\0CLOSE'+Math.random()+'\0';
|
9 |
-
var escComma = '\0COMMA'+Math.random()+'\0';
|
10 |
-
var escPeriod = '\0PERIOD'+Math.random()+'\0';
|
11 |
-
|
12 |
-
function numeric(str) {
|
13 |
-
return parseInt(str, 10) == str
|
14 |
-
? parseInt(str, 10)
|
15 |
-
: str.charCodeAt(0);
|
16 |
-
}
|
17 |
-
|
18 |
-
function escapeBraces(str) {
|
19 |
-
return str.split('\\\\').join(escSlash)
|
20 |
-
.split('\\{').join(escOpen)
|
21 |
-
.split('\\}').join(escClose)
|
22 |
-
.split('\\,').join(escComma)
|
23 |
-
.split('\\.').join(escPeriod);
|
24 |
-
}
|
25 |
-
|
26 |
-
function unescapeBraces(str) {
|
27 |
-
return str.split(escSlash).join('\\')
|
28 |
-
.split(escOpen).join('{')
|
29 |
-
.split(escClose).join('}')
|
30 |
-
.split(escComma).join(',')
|
31 |
-
.split(escPeriod).join('.');
|
32 |
-
}
|
33 |
-
|
34 |
-
|
35 |
-
// Basically just str.split(","), but handling cases
|
36 |
-
// where we have nested braced sections, which should be
|
37 |
-
// treated as individual members, like {a,{b,c},d}
|
38 |
-
function parseCommaParts(str) {
|
39 |
-
if (!str)
|
40 |
-
return [''];
|
41 |
-
|
42 |
-
var parts = [];
|
43 |
-
var m = balanced('{', '}', str);
|
44 |
-
|
45 |
-
if (!m)
|
46 |
-
return str.split(',');
|
47 |
-
|
48 |
-
var pre = m.pre;
|
49 |
-
var body = m.body;
|
50 |
-
var post = m.post;
|
51 |
-
var p = pre.split(',');
|
52 |
-
|
53 |
-
p[p.length-1] += '{' + body + '}';
|
54 |
-
var postParts = parseCommaParts(post);
|
55 |
-
if (post.length) {
|
56 |
-
p[p.length-1] += postParts.shift();
|
57 |
-
p.push.apply(p, postParts);
|
58 |
-
}
|
59 |
-
|
60 |
-
parts.push.apply(parts, p);
|
61 |
-
|
62 |
-
return parts;
|
63 |
-
}
|
64 |
-
|
65 |
-
function expandTop(str) {
|
66 |
-
if (!str)
|
67 |
-
return [];
|
68 |
-
|
69 |
-
// I don't know why Bash 4.3 does this, but it does.
|
70 |
-
// Anything starting with {} will have the first two bytes preserved
|
71 |
-
// but *only* at the top level, so {},a}b will not expand to anything,
|
72 |
-
// but a{},b}c will be expanded to [a}c,abc].
|
73 |
-
// One could argue that this is a bug in Bash, but since the goal of
|
74 |
-
// this module is to match Bash's rules, we escape a leading {}
|
75 |
-
if (str.substr(0, 2) === '{}') {
|
76 |
-
str = '\\{\\}' + str.substr(2);
|
77 |
-
}
|
78 |
-
|
79 |
-
return expand(escapeBraces(str), true).map(unescapeBraces);
|
80 |
-
}
|
81 |
-
|
82 |
-
function identity(e) {
|
83 |
-
return e;
|
84 |
-
}
|
85 |
-
|
86 |
-
function embrace(str) {
|
87 |
-
return '{' + str + '}';
|
88 |
-
}
|
89 |
-
function isPadded(el) {
|
90 |
-
return /^-?0\d/.test(el);
|
91 |
-
}
|
92 |
-
|
93 |
-
function lte(i, y) {
|
94 |
-
return i <= y;
|
95 |
-
}
|
96 |
-
function gte(i, y) {
|
97 |
-
return i >= y;
|
98 |
-
}
|
99 |
-
|
100 |
-
function expand(str, isTop) {
|
101 |
-
var expansions = [];
|
102 |
-
|
103 |
-
var m = balanced('{', '}', str);
|
104 |
-
if (!m || /\$$/.test(m.pre)) return [str];
|
105 |
-
|
106 |
-
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
107 |
-
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
108 |
-
var isSequence = isNumericSequence || isAlphaSequence;
|
109 |
-
var isOptions = m.body.indexOf(',') >= 0;
|
110 |
-
if (!isSequence && !isOptions) {
|
111 |
-
// {a},b}
|
112 |
-
if (m.post.match(/,.*\}/)) {
|
113 |
-
str = m.pre + '{' + m.body + escClose + m.post;
|
114 |
-
return expand(str);
|
115 |
-
}
|
116 |
-
return [str];
|
117 |
-
}
|
118 |
-
|
119 |
-
var n;
|
120 |
-
if (isSequence) {
|
121 |
-
n = m.body.split(/\.\./);
|
122 |
-
} else {
|
123 |
-
n = parseCommaParts(m.body);
|
124 |
-
if (n.length === 1) {
|
125 |
-
// x{{a,b}}y ==> x{a}y x{b}y
|
126 |
-
n = expand(n[0], false).map(embrace);
|
127 |
-
if (n.length === 1) {
|
128 |
-
var post = m.post.length
|
129 |
-
? expand(m.post, false)
|
130 |
-
: [''];
|
131 |
-
return post.map(function(p) {
|
132 |
-
return m.pre + n[0] + p;
|
133 |
-
});
|
134 |
-
}
|
135 |
-
}
|
136 |
-
}
|
137 |
-
|
138 |
-
// at this point, n is the parts, and we know it's not a comma set
|
139 |
-
// with a single entry.
|
140 |
-
|
141 |
-
// no need to expand pre, since it is guaranteed to be free of brace-sets
|
142 |
-
var pre = m.pre;
|
143 |
-
var post = m.post.length
|
144 |
-
? expand(m.post, false)
|
145 |
-
: [''];
|
146 |
-
|
147 |
-
var N;
|
148 |
-
|
149 |
-
if (isSequence) {
|
150 |
-
var x = numeric(n[0]);
|
151 |
-
var y = numeric(n[1]);
|
152 |
-
var width = Math.max(n[0].length, n[1].length)
|
153 |
-
var incr = n.length == 3
|
154 |
-
? Math.abs(numeric(n[2]))
|
155 |
-
: 1;
|
156 |
-
var test = lte;
|
157 |
-
var reverse = y < x;
|
158 |
-
if (reverse) {
|
159 |
-
incr *= -1;
|
160 |
-
test = gte;
|
161 |
-
}
|
162 |
-
var pad = n.some(isPadded);
|
163 |
-
|
164 |
-
N = [];
|
165 |
-
|
166 |
-
for (var i = x; test(i, y); i += incr) {
|
167 |
-
var c;
|
168 |
-
if (isAlphaSequence) {
|
169 |
-
c = String.fromCharCode(i);
|
170 |
-
if (c === '\\')
|
171 |
-
c = '';
|
172 |
-
} else {
|
173 |
-
c = String(i);
|
174 |
-
if (pad) {
|
175 |
-
var need = width - c.length;
|
176 |
-
if (need > 0) {
|
177 |
-
var z = new Array(need + 1).join('0');
|
178 |
-
if (i < 0)
|
179 |
-
c = '-' + z + c.slice(1);
|
180 |
-
else
|
181 |
-
c = z + c;
|
182 |
-
}
|
183 |
-
}
|
184 |
-
}
|
185 |
-
N.push(c);
|
186 |
-
}
|
187 |
-
} else {
|
188 |
-
N = concatMap(n, function(el) { return expand(el, false) });
|
189 |
-
}
|
190 |
-
|
191 |
-
for (var j = 0; j < N.length; j++) {
|
192 |
-
for (var k = 0; k < post.length; k++) {
|
193 |
-
var expansion = pre + N[j] + post[k];
|
194 |
-
if (!isTop || isSequence || expansion)
|
195 |
-
expansions.push(expansion);
|
196 |
-
}
|
197 |
-
}
|
198 |
-
|
199 |
-
return expansions;
|
200 |
-
}
|
201 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/brace-expansion@1.1.11/node_modules/brace-expansion/package.json
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "brace-expansion",
|
3 |
-
"description": "Brace expansion as known from sh/bash",
|
4 |
-
"version": "1.1.11",
|
5 |
-
"repository": {
|
6 |
-
"type": "git",
|
7 |
-
"url": "git://github.com/juliangruber/brace-expansion.git"
|
8 |
-
},
|
9 |
-
"homepage": "https://github.com/juliangruber/brace-expansion",
|
10 |
-
"main": "index.js",
|
11 |
-
"scripts": {
|
12 |
-
"test": "tape test/*.js",
|
13 |
-
"gentest": "bash test/generate.sh",
|
14 |
-
"bench": "matcha test/perf/bench.js"
|
15 |
-
},
|
16 |
-
"dependencies": {
|
17 |
-
"balanced-match": "^1.0.0",
|
18 |
-
"concat-map": "0.0.1"
|
19 |
-
},
|
20 |
-
"devDependencies": {
|
21 |
-
"matcha": "^0.7.0",
|
22 |
-
"tape": "^4.6.0"
|
23 |
-
},
|
24 |
-
"keywords": [],
|
25 |
-
"author": {
|
26 |
-
"name": "Julian Gruber",
|
27 |
-
"email": "mail@juliangruber.com",
|
28 |
-
"url": "http://juliangruber.com"
|
29 |
-
},
|
30 |
-
"license": "MIT",
|
31 |
-
"testling": {
|
32 |
-
"files": "test/*.js",
|
33 |
-
"browsers": [
|
34 |
-
"ie/8..latest",
|
35 |
-
"firefox/20..latest",
|
36 |
-
"firefox/nightly",
|
37 |
-
"chrome/25..latest",
|
38 |
-
"chrome/canary",
|
39 |
-
"opera/12..latest",
|
40 |
-
"opera/next",
|
41 |
-
"safari/5.1..latest",
|
42 |
-
"ipad/6.0..latest",
|
43 |
-
"iphone/6.0..latest",
|
44 |
-
"android-browser/4.2..latest"
|
45 |
-
]
|
46 |
-
}
|
47 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/brace-expansion@1.1.11/node_modules/concat-map/.travis.yml
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
language: node_js
|
2 |
-
node_js:
|
3 |
-
- 0.4
|
4 |
-
- 0.6
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/brace-expansion@1.1.11/node_modules/concat-map/LICENSE
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
This software is released under the MIT license:
|
2 |
-
|
3 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
4 |
-
this software and associated documentation files (the "Software"), to deal in
|
5 |
-
the Software without restriction, including without limitation the rights to
|
6 |
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
7 |
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
8 |
-
subject to the following conditions:
|
9 |
-
|
10 |
-
The above copyright notice and this permission notice shall be included in all
|
11 |
-
copies or substantial portions of the Software.
|
12 |
-
|
13 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
15 |
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
16 |
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
17 |
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
18 |
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/brace-expansion@1.1.11/node_modules/concat-map/README.markdown
DELETED
@@ -1,62 +0,0 @@
|
|
1 |
-
concat-map
|
2 |
-
==========
|
3 |
-
|
4 |
-
Concatenative mapdashery.
|
5 |
-
|
6 |
-
[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map)
|
7 |
-
|
8 |
-
[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map)
|
9 |
-
|
10 |
-
example
|
11 |
-
=======
|
12 |
-
|
13 |
-
``` js
|
14 |
-
var concatMap = require('concat-map');
|
15 |
-
var xs = [ 1, 2, 3, 4, 5, 6 ];
|
16 |
-
var ys = concatMap(xs, function (x) {
|
17 |
-
return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
|
18 |
-
});
|
19 |
-
console.dir(ys);
|
20 |
-
```
|
21 |
-
|
22 |
-
***
|
23 |
-
|
24 |
-
```
|
25 |
-
[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]
|
26 |
-
```
|
27 |
-
|
28 |
-
methods
|
29 |
-
=======
|
30 |
-
|
31 |
-
``` js
|
32 |
-
var concatMap = require('concat-map')
|
33 |
-
```
|
34 |
-
|
35 |
-
concatMap(xs, fn)
|
36 |
-
-----------------
|
37 |
-
|
38 |
-
Return an array of concatenated elements by calling `fn(x, i)` for each element
|
39 |
-
`x` and each index `i` in the array `xs`.
|
40 |
-
|
41 |
-
When `fn(x, i)` returns an array, its result will be concatenated with the
|
42 |
-
result array. If `fn(x, i)` returns anything else, that value will be pushed
|
43 |
-
onto the end of the result array.
|
44 |
-
|
45 |
-
install
|
46 |
-
=======
|
47 |
-
|
48 |
-
With [npm](http://npmjs.org) do:
|
49 |
-
|
50 |
-
```
|
51 |
-
npm install concat-map
|
52 |
-
```
|
53 |
-
|
54 |
-
license
|
55 |
-
=======
|
56 |
-
|
57 |
-
MIT
|
58 |
-
|
59 |
-
notes
|
60 |
-
=====
|
61 |
-
|
62 |
-
This module was written while sitting high above the ground in a tree.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/brace-expansion@1.1.11/node_modules/concat-map/example/map.js
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
var concatMap = require('../');
|
2 |
-
var xs = [ 1, 2, 3, 4, 5, 6 ];
|
3 |
-
var ys = concatMap(xs, function (x) {
|
4 |
-
return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
|
5 |
-
});
|
6 |
-
console.dir(ys);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/brace-expansion@1.1.11/node_modules/concat-map/index.js
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
module.exports = function (xs, fn) {
|
2 |
-
var res = [];
|
3 |
-
for (var i = 0; i < xs.length; i++) {
|
4 |
-
var x = fn(xs[i], i);
|
5 |
-
if (isArray(x)) res.push.apply(res, x);
|
6 |
-
else res.push(x);
|
7 |
-
}
|
8 |
-
return res;
|
9 |
-
};
|
10 |
-
|
11 |
-
var isArray = Array.isArray || function (xs) {
|
12 |
-
return Object.prototype.toString.call(xs) === '[object Array]';
|
13 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/brace-expansion@1.1.11/node_modules/concat-map/package.json
DELETED
@@ -1,43 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name" : "concat-map",
|
3 |
-
"description" : "concatenative mapdashery",
|
4 |
-
"version" : "0.0.1",
|
5 |
-
"repository" : {
|
6 |
-
"type" : "git",
|
7 |
-
"url" : "git://github.com/substack/node-concat-map.git"
|
8 |
-
},
|
9 |
-
"main" : "index.js",
|
10 |
-
"keywords" : [
|
11 |
-
"concat",
|
12 |
-
"concatMap",
|
13 |
-
"map",
|
14 |
-
"functional",
|
15 |
-
"higher-order"
|
16 |
-
],
|
17 |
-
"directories" : {
|
18 |
-
"example" : "example",
|
19 |
-
"test" : "test"
|
20 |
-
},
|
21 |
-
"scripts" : {
|
22 |
-
"test" : "tape test/*.js"
|
23 |
-
},
|
24 |
-
"devDependencies" : {
|
25 |
-
"tape" : "~2.4.0"
|
26 |
-
},
|
27 |
-
"license" : "MIT",
|
28 |
-
"author" : {
|
29 |
-
"name" : "James Halliday",
|
30 |
-
"email" : "mail@substack.net",
|
31 |
-
"url" : "http://substack.net"
|
32 |
-
},
|
33 |
-
"testling" : {
|
34 |
-
"files" : "test/*.js",
|
35 |
-
"browsers" : {
|
36 |
-
"ie" : [ 6, 7, 8, 9 ],
|
37 |
-
"ff" : [ 3.5, 10, 15.0 ],
|
38 |
-
"chrome" : [ 10, 22 ],
|
39 |
-
"safari" : [ 5.1 ],
|
40 |
-
"opera" : [ 12 ]
|
41 |
-
}
|
42 |
-
}
|
43 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/brace-expansion@1.1.11/node_modules/concat-map/test/map.js
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
var concatMap = require('../');
|
2 |
-
var test = require('tape');
|
3 |
-
|
4 |
-
test('empty or not', function (t) {
|
5 |
-
var xs = [ 1, 2, 3, 4, 5, 6 ];
|
6 |
-
var ixes = [];
|
7 |
-
var ys = concatMap(xs, function (x, ix) {
|
8 |
-
ixes.push(ix);
|
9 |
-
return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
|
10 |
-
});
|
11 |
-
t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]);
|
12 |
-
t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]);
|
13 |
-
t.end();
|
14 |
-
});
|
15 |
-
|
16 |
-
test('always something', function (t) {
|
17 |
-
var xs = [ 'a', 'b', 'c', 'd' ];
|
18 |
-
var ys = concatMap(xs, function (x) {
|
19 |
-
return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ];
|
20 |
-
});
|
21 |
-
t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
|
22 |
-
t.end();
|
23 |
-
});
|
24 |
-
|
25 |
-
test('scalars', function (t) {
|
26 |
-
var xs = [ 'a', 'b', 'c', 'd' ];
|
27 |
-
var ys = concatMap(xs, function (x) {
|
28 |
-
return x === 'b' ? [ 'B', 'B', 'B' ] : x;
|
29 |
-
});
|
30 |
-
t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
|
31 |
-
t.end();
|
32 |
-
});
|
33 |
-
|
34 |
-
test('undefs', function (t) {
|
35 |
-
var xs = [ 'a', 'b', 'c', 'd' ];
|
36 |
-
var ys = concatMap(xs, function () {});
|
37 |
-
t.same(ys, [ undefined, undefined, undefined, undefined ]);
|
38 |
-
t.end();
|
39 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/.eslintignore
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
coverage/
|
|
|
|
node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/.eslintrc
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"root": true,
|
3 |
-
|
4 |
-
"extends": "@ljharb",
|
5 |
-
|
6 |
-
"rules": {
|
7 |
-
"func-name-matching": 0,
|
8 |
-
"id-length": 0,
|
9 |
-
"new-cap": [2, {
|
10 |
-
"capIsNewExceptions": [
|
11 |
-
"GetIntrinsic",
|
12 |
-
],
|
13 |
-
}],
|
14 |
-
"no-magic-numbers": 0,
|
15 |
-
"operator-linebreak": [2, "before"],
|
16 |
-
},
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/.github/FUNDING.yml
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
# These are supported funding model platforms
|
2 |
-
|
3 |
-
github: [ljharb]
|
4 |
-
patreon: # Replace with a single Patreon username
|
5 |
-
open_collective: # Replace with a single Open Collective username
|
6 |
-
ko_fi: # Replace with a single Ko-fi username
|
7 |
-
tidelift: npm/call-bind
|
8 |
-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
9 |
-
liberapay: # Replace with a single Liberapay username
|
10 |
-
issuehunt: # Replace with a single IssueHunt username
|
11 |
-
otechie: # Replace with a single Otechie username
|
12 |
-
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/.nycrc
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"all": true,
|
3 |
-
"check-coverage": false,
|
4 |
-
"reporter": ["text-summary", "text", "html", "json"],
|
5 |
-
"lines": 86,
|
6 |
-
"statements": 85.93,
|
7 |
-
"functions": 82.43,
|
8 |
-
"branches": 76.06,
|
9 |
-
"exclude": [
|
10 |
-
"coverage",
|
11 |
-
"test"
|
12 |
-
]
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/CHANGELOG.md
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
# Changelog
|
2 |
-
|
3 |
-
All notable changes to this project will be documented in this file.
|
4 |
-
|
5 |
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
6 |
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7 |
-
|
8 |
-
## [v1.0.2](https://github.com/ljharb/call-bind/compare/v1.0.1...v1.0.2) - 2021-01-11
|
9 |
-
|
10 |
-
### Commits
|
11 |
-
|
12 |
-
- [Fix] properly include the receiver in the bound length [`dbae7bc`](https://github.com/ljharb/call-bind/commit/dbae7bc676c079a0d33c0a43e9ef92cb7b01345d)
|
13 |
-
|
14 |
-
## [v1.0.1](https://github.com/ljharb/call-bind/compare/v1.0.0...v1.0.1) - 2021-01-08
|
15 |
-
|
16 |
-
### Commits
|
17 |
-
|
18 |
-
- [Tests] migrate tests to Github Actions [`b6db284`](https://github.com/ljharb/call-bind/commit/b6db284c36f8ccd195b88a6764fe84b7223a0da1)
|
19 |
-
- [meta] do not publish github action workflow files [`ec7fe46`](https://github.com/ljharb/call-bind/commit/ec7fe46e60cfa4764ee943d2755f5e5a366e578e)
|
20 |
-
- [Fix] preserve original function’s length when possible [`adbceaa`](https://github.com/ljharb/call-bind/commit/adbceaa3cac4b41ea78bb19d7ccdbaaf7e0bdadb)
|
21 |
-
- [Tests] gather coverage data on every job [`d69e23c`](https://github.com/ljharb/call-bind/commit/d69e23cc65f101ba1d4c19bb07fa8eb0ec624be8)
|
22 |
-
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`2fd3586`](https://github.com/ljharb/call-bind/commit/2fd3586c5d47b335364c14293114c6b625ae1f71)
|
23 |
-
- [Deps] update `get-intrinsic` [`f23e931`](https://github.com/ljharb/call-bind/commit/f23e9318cc271c2add8bb38cfded85ee7baf8eee)
|
24 |
-
- [Deps] update `get-intrinsic` [`72d9f44`](https://github.com/ljharb/call-bind/commit/72d9f44e184465ba8dd3fb48260bbcff234985f2)
|
25 |
-
- [meta] fix FUNDING.yml [`e723573`](https://github.com/ljharb/call-bind/commit/e723573438c5a68dcec31fb5d96ea6b7e4a93be8)
|
26 |
-
- [eslint] ignore coverage output [`15e76d2`](https://github.com/ljharb/call-bind/commit/15e76d28a5f43e504696401e5b31ebb78ee1b532)
|
27 |
-
- [meta] add Automatic Rebase and Require Allow Edits workflows [`8fa4dab`](https://github.com/ljharb/call-bind/commit/8fa4dabb23ba3dd7bb92c9571c1241c08b56e4b6)
|
28 |
-
|
29 |
-
## v1.0.0 - 2020-10-30
|
30 |
-
|
31 |
-
### Commits
|
32 |
-
|
33 |
-
- Initial commit [`306cf98`](https://github.com/ljharb/call-bind/commit/306cf98c7ec9e7ef66b653ec152277ac1381eb50)
|
34 |
-
- Tests [`e10d0bb`](https://github.com/ljharb/call-bind/commit/e10d0bbdadc7a10ecedc9a1c035112d3e368b8df)
|
35 |
-
- Implementation [`43852ed`](https://github.com/ljharb/call-bind/commit/43852eda0f187327b7fad2423ca972149a52bd65)
|
36 |
-
- npm init [`408f860`](https://github.com/ljharb/call-bind/commit/408f860b773a2f610805fd3613d0d71bac1b6249)
|
37 |
-
- [meta] add Automatic Rebase and Require Allow Edits workflows [`fb349b2`](https://github.com/ljharb/call-bind/commit/fb349b2e48defbec8b5ec8a8395cc8f69f220b13)
|
38 |
-
- [meta] add `auto-changelog` [`c4001fc`](https://github.com/ljharb/call-bind/commit/c4001fc43031799ef908211c98d3b0fb2b60fde4)
|
39 |
-
- [meta] add "funding"; create `FUNDING.yml` [`d4d6d29`](https://github.com/ljharb/call-bind/commit/d4d6d2974a14bc2e98830468eda7fe6d6a776717)
|
40 |
-
- [Tests] add `npm run lint` [`dedfb98`](https://github.com/ljharb/call-bind/commit/dedfb98bd0ecefb08ddb9a94061bd10cde4332af)
|
41 |
-
- Only apps should have lockfiles [`54ac776`](https://github.com/ljharb/call-bind/commit/54ac77653db45a7361dc153d2f478e743f110650)
|
42 |
-
- [meta] add `safe-publish-latest` [`9ea8e43`](https://github.com/ljharb/call-bind/commit/9ea8e435b950ce9b705559cd651039f9bf40140f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/LICENSE
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
MIT License
|
2 |
-
|
3 |
-
Copyright (c) 2020 Jordan Harband
|
4 |
-
|
5 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
-
of this software and associated documentation files (the "Software"), to deal
|
7 |
-
in the Software without restriction, including without limitation the rights
|
8 |
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
-
copies of the Software, and to permit persons to whom the Software is
|
10 |
-
furnished to do so, subject to the following conditions:
|
11 |
-
|
12 |
-
The above copyright notice and this permission notice shall be included in all
|
13 |
-
copies or substantial portions of the Software.
|
14 |
-
|
15 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
-
SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/README.md
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
# call-bind
|
2 |
-
Robustly `.call.bind()` a function.
|
|
|
|
|
|
node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
'use strict';
|
2 |
-
|
3 |
-
var GetIntrinsic = require('get-intrinsic');
|
4 |
-
|
5 |
-
var callBind = require('./');
|
6 |
-
|
7 |
-
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
|
8 |
-
|
9 |
-
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
10 |
-
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
11 |
-
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
12 |
-
return callBind(intrinsic);
|
13 |
-
}
|
14 |
-
return intrinsic;
|
15 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
'use strict';
|
2 |
-
|
3 |
-
var bind = require('function-bind');
|
4 |
-
var GetIntrinsic = require('get-intrinsic');
|
5 |
-
|
6 |
-
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
7 |
-
var $call = GetIntrinsic('%Function.prototype.call%');
|
8 |
-
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
9 |
-
|
10 |
-
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
11 |
-
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
12 |
-
var $max = GetIntrinsic('%Math.max%');
|
13 |
-
|
14 |
-
if ($defineProperty) {
|
15 |
-
try {
|
16 |
-
$defineProperty({}, 'a', { value: 1 });
|
17 |
-
} catch (e) {
|
18 |
-
// IE 8 has a broken defineProperty
|
19 |
-
$defineProperty = null;
|
20 |
-
}
|
21 |
-
}
|
22 |
-
|
23 |
-
module.exports = function callBind(originalFunction) {
|
24 |
-
var func = $reflectApply(bind, $call, arguments);
|
25 |
-
if ($gOPD && $defineProperty) {
|
26 |
-
var desc = $gOPD(func, 'length');
|
27 |
-
if (desc.configurable) {
|
28 |
-
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
29 |
-
$defineProperty(
|
30 |
-
func,
|
31 |
-
'length',
|
32 |
-
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
33 |
-
);
|
34 |
-
}
|
35 |
-
}
|
36 |
-
return func;
|
37 |
-
};
|
38 |
-
|
39 |
-
var applyBind = function applyBind() {
|
40 |
-
return $reflectApply(bind, $apply, arguments);
|
41 |
-
};
|
42 |
-
|
43 |
-
if ($defineProperty) {
|
44 |
-
$defineProperty(module.exports, 'apply', { value: applyBind });
|
45 |
-
} else {
|
46 |
-
module.exports.apply = applyBind;
|
47 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/package.json
DELETED
@@ -1,80 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "call-bind",
|
3 |
-
"version": "1.0.2",
|
4 |
-
"description": "Robustly `.call.bind()` a function",
|
5 |
-
"main": "index.js",
|
6 |
-
"exports": {
|
7 |
-
".": [
|
8 |
-
{
|
9 |
-
"default": "./index.js"
|
10 |
-
},
|
11 |
-
"./index.js"
|
12 |
-
],
|
13 |
-
"./callBound": [
|
14 |
-
{
|
15 |
-
"default": "./callBound.js"
|
16 |
-
},
|
17 |
-
"./callBound.js"
|
18 |
-
],
|
19 |
-
"./package.json": "./package.json"
|
20 |
-
},
|
21 |
-
"scripts": {
|
22 |
-
"prepublish": "safe-publish-latest",
|
23 |
-
"lint": "eslint --ext=.js,.mjs .",
|
24 |
-
"pretest": "npm run lint",
|
25 |
-
"tests-only": "nyc tape 'test/*'",
|
26 |
-
"test": "npm run tests-only",
|
27 |
-
"posttest": "aud --production",
|
28 |
-
"version": "auto-changelog && git add CHANGELOG.md",
|
29 |
-
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
30 |
-
},
|
31 |
-
"repository": {
|
32 |
-
"type": "git",
|
33 |
-
"url": "git+https://github.com/ljharb/call-bind.git"
|
34 |
-
},
|
35 |
-
"keywords": [
|
36 |
-
"javascript",
|
37 |
-
"ecmascript",
|
38 |
-
"es",
|
39 |
-
"js",
|
40 |
-
"callbind",
|
41 |
-
"callbound",
|
42 |
-
"call",
|
43 |
-
"bind",
|
44 |
-
"bound",
|
45 |
-
"call-bind",
|
46 |
-
"call-bound",
|
47 |
-
"function",
|
48 |
-
"es-abstract"
|
49 |
-
],
|
50 |
-
"author": "Jordan Harband <ljharb@gmail.com>",
|
51 |
-
"funding": {
|
52 |
-
"url": "https://github.com/sponsors/ljharb"
|
53 |
-
},
|
54 |
-
"license": "MIT",
|
55 |
-
"bugs": {
|
56 |
-
"url": "https://github.com/ljharb/call-bind/issues"
|
57 |
-
},
|
58 |
-
"homepage": "https://github.com/ljharb/call-bind#readme",
|
59 |
-
"devDependencies": {
|
60 |
-
"@ljharb/eslint-config": "^17.3.0",
|
61 |
-
"aud": "^1.1.3",
|
62 |
-
"auto-changelog": "^2.2.1",
|
63 |
-
"eslint": "^7.17.0",
|
64 |
-
"nyc": "^10.3.2",
|
65 |
-
"safe-publish-latest": "^1.1.4",
|
66 |
-
"tape": "^5.1.1"
|
67 |
-
},
|
68 |
-
"dependencies": {
|
69 |
-
"function-bind": "^1.1.1",
|
70 |
-
"get-intrinsic": "^1.0.2"
|
71 |
-
},
|
72 |
-
"auto-changelog": {
|
73 |
-
"output": "CHANGELOG.md",
|
74 |
-
"template": "keepachangelog",
|
75 |
-
"unreleased": false,
|
76 |
-
"commitLimit": false,
|
77 |
-
"backfillLimit": false,
|
78 |
-
"hideCredit": true
|
79 |
-
}
|
80 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/test/callBound.js
DELETED
@@ -1,55 +0,0 @@
|
|
1 |
-
'use strict';
|
2 |
-
|
3 |
-
var test = require('tape');
|
4 |
-
|
5 |
-
var callBound = require('../callBound');
|
6 |
-
|
7 |
-
test('callBound', function (t) {
|
8 |
-
// static primitive
|
9 |
-
t.equal(callBound('Array.length'), Array.length, 'Array.length yields itself');
|
10 |
-
t.equal(callBound('%Array.length%'), Array.length, '%Array.length% yields itself');
|
11 |
-
|
12 |
-
// static non-function object
|
13 |
-
t.equal(callBound('Array.prototype'), Array.prototype, 'Array.prototype yields itself');
|
14 |
-
t.equal(callBound('%Array.prototype%'), Array.prototype, '%Array.prototype% yields itself');
|
15 |
-
t.equal(callBound('Array.constructor'), Array.constructor, 'Array.constructor yields itself');
|
16 |
-
t.equal(callBound('%Array.constructor%'), Array.constructor, '%Array.constructor% yields itself');
|
17 |
-
|
18 |
-
// static function
|
19 |
-
t.equal(callBound('Date.parse'), Date.parse, 'Date.parse yields itself');
|
20 |
-
t.equal(callBound('%Date.parse%'), Date.parse, '%Date.parse% yields itself');
|
21 |
-
|
22 |
-
// prototype primitive
|
23 |
-
t.equal(callBound('Error.prototype.message'), Error.prototype.message, 'Error.prototype.message yields itself');
|
24 |
-
t.equal(callBound('%Error.prototype.message%'), Error.prototype.message, '%Error.prototype.message% yields itself');
|
25 |
-
|
26 |
-
// prototype function
|
27 |
-
t.notEqual(callBound('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString does not yield itself');
|
28 |
-
t.notEqual(callBound('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% does not yield itself');
|
29 |
-
t.equal(callBound('Object.prototype.toString')(true), Object.prototype.toString.call(true), 'call-bound Object.prototype.toString calls into the original');
|
30 |
-
t.equal(callBound('%Object.prototype.toString%')(true), Object.prototype.toString.call(true), 'call-bound %Object.prototype.toString% calls into the original');
|
31 |
-
|
32 |
-
t['throws'](
|
33 |
-
function () { callBound('does not exist'); },
|
34 |
-
SyntaxError,
|
35 |
-
'nonexistent intrinsic throws'
|
36 |
-
);
|
37 |
-
t['throws'](
|
38 |
-
function () { callBound('does not exist', true); },
|
39 |
-
SyntaxError,
|
40 |
-
'allowMissing arg still throws for unknown intrinsic'
|
41 |
-
);
|
42 |
-
|
43 |
-
/* globals WeakRef: false */
|
44 |
-
t.test('real but absent intrinsic', { skip: typeof WeakRef !== 'undefined' }, function (st) {
|
45 |
-
st['throws'](
|
46 |
-
function () { callBound('WeakRef'); },
|
47 |
-
TypeError,
|
48 |
-
'real but absent intrinsic throws'
|
49 |
-
);
|
50 |
-
st.equal(callBound('WeakRef', true), undefined, 'allowMissing arg avoids exception');
|
51 |
-
st.end();
|
52 |
-
});
|
53 |
-
|
54 |
-
t.end();
|
55 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/test/index.js
DELETED
@@ -1,66 +0,0 @@
|
|
1 |
-
'use strict';
|
2 |
-
|
3 |
-
var callBind = require('../');
|
4 |
-
var bind = require('function-bind');
|
5 |
-
|
6 |
-
var test = require('tape');
|
7 |
-
|
8 |
-
/*
|
9 |
-
* older engines have length nonconfigurable
|
10 |
-
* in io.js v3, it is configurable except on bound functions, hence the .bind()
|
11 |
-
*/
|
12 |
-
var functionsHaveConfigurableLengths = !!(
|
13 |
-
Object.getOwnPropertyDescriptor
|
14 |
-
&& Object.getOwnPropertyDescriptor(bind.call(function () {}), 'length').configurable
|
15 |
-
);
|
16 |
-
|
17 |
-
test('callBind', function (t) {
|
18 |
-
var sentinel = { sentinel: true };
|
19 |
-
var func = function (a, b) {
|
20 |
-
// eslint-disable-next-line no-invalid-this
|
21 |
-
return [this, a, b];
|
22 |
-
};
|
23 |
-
t.equal(func.length, 2, 'original function length is 2');
|
24 |
-
t.deepEqual(func(), [undefined, undefined, undefined], 'unbound func with too few args');
|
25 |
-
t.deepEqual(func(1, 2), [undefined, 1, 2], 'unbound func with right args');
|
26 |
-
t.deepEqual(func(1, 2, 3), [undefined, 1, 2], 'unbound func with too many args');
|
27 |
-
|
28 |
-
var bound = callBind(func);
|
29 |
-
t.equal(bound.length, func.length + 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths });
|
30 |
-
t.deepEqual(bound(), [undefined, undefined, undefined], 'bound func with too few args');
|
31 |
-
t.deepEqual(bound(1, 2), [1, 2, undefined], 'bound func with right args');
|
32 |
-
t.deepEqual(bound(1, 2, 3), [1, 2, 3], 'bound func with too many args');
|
33 |
-
|
34 |
-
var boundR = callBind(func, sentinel);
|
35 |
-
t.equal(boundR.length, func.length, 'function length is preserved', { skip: !functionsHaveConfigurableLengths });
|
36 |
-
t.deepEqual(boundR(), [sentinel, undefined, undefined], 'bound func with receiver, with too few args');
|
37 |
-
t.deepEqual(boundR(1, 2), [sentinel, 1, 2], 'bound func with receiver, with right args');
|
38 |
-
t.deepEqual(boundR(1, 2, 3), [sentinel, 1, 2], 'bound func with receiver, with too many args');
|
39 |
-
|
40 |
-
var boundArg = callBind(func, sentinel, 1);
|
41 |
-
t.equal(boundArg.length, func.length - 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths });
|
42 |
-
t.deepEqual(boundArg(), [sentinel, 1, undefined], 'bound func with receiver and arg, with too few args');
|
43 |
-
t.deepEqual(boundArg(2), [sentinel, 1, 2], 'bound func with receiver and arg, with right arg');
|
44 |
-
t.deepEqual(boundArg(2, 3), [sentinel, 1, 2], 'bound func with receiver and arg, with too many args');
|
45 |
-
|
46 |
-
t.test('callBind.apply', function (st) {
|
47 |
-
var aBound = callBind.apply(func);
|
48 |
-
st.deepEqual(aBound(sentinel), [sentinel, undefined, undefined], 'apply-bound func with no args');
|
49 |
-
st.deepEqual(aBound(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args');
|
50 |
-
st.deepEqual(aBound(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args');
|
51 |
-
|
52 |
-
var aBoundArg = callBind.apply(func);
|
53 |
-
st.deepEqual(aBoundArg(sentinel, [1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with too many args');
|
54 |
-
st.deepEqual(aBoundArg(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args');
|
55 |
-
st.deepEqual(aBoundArg(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args');
|
56 |
-
|
57 |
-
var aBoundR = callBind.apply(func, sentinel);
|
58 |
-
st.deepEqual(aBoundR([1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with receiver and too many args');
|
59 |
-
st.deepEqual(aBoundR([1, 2], 4), [sentinel, 1, 2], 'apply-bound func with receiver and right args');
|
60 |
-
st.deepEqual(aBoundR([1], 4), [sentinel, 1, undefined], 'apply-bound func with receiver and too few args');
|
61 |
-
|
62 |
-
st.end();
|
63 |
-
});
|
64 |
-
|
65 |
-
t.end();
|
66 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/call-bind@1.0.2/node_modules/function-bind/.editorconfig
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
root = true
|
2 |
-
|
3 |
-
[*]
|
4 |
-
indent_style = tab
|
5 |
-
indent_size = 4
|
6 |
-
end_of_line = lf
|
7 |
-
charset = utf-8
|
8 |
-
trim_trailing_whitespace = true
|
9 |
-
insert_final_newline = true
|
10 |
-
max_line_length = 120
|
11 |
-
|
12 |
-
[CHANGELOG.md]
|
13 |
-
indent_style = space
|
14 |
-
indent_size = 2
|
15 |
-
|
16 |
-
[*.json]
|
17 |
-
max_line_length = off
|
18 |
-
|
19 |
-
[Makefile]
|
20 |
-
max_line_length = off
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/call-bind@1.0.2/node_modules/function-bind/.eslintrc
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"root": true,
|
3 |
-
|
4 |
-
"extends": "@ljharb",
|
5 |
-
|
6 |
-
"rules": {
|
7 |
-
"func-name-matching": 0,
|
8 |
-
"indent": [2, 4],
|
9 |
-
"max-nested-callbacks": [2, 3],
|
10 |
-
"max-params": [2, 3],
|
11 |
-
"max-statements": [2, 20],
|
12 |
-
"no-new-func": [1],
|
13 |
-
"strict": [0]
|
14 |
-
}
|
15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/call-bind@1.0.2/node_modules/function-bind/.jscs.json
DELETED
@@ -1,176 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"es3": true,
|
3 |
-
|
4 |
-
"additionalRules": [],
|
5 |
-
|
6 |
-
"requireSemicolons": true,
|
7 |
-
|
8 |
-
"disallowMultipleSpaces": true,
|
9 |
-
|
10 |
-
"disallowIdentifierNames": [],
|
11 |
-
|
12 |
-
"requireCurlyBraces": {
|
13 |
-
"allExcept": [],
|
14 |
-
"keywords": ["if", "else", "for", "while", "do", "try", "catch"]
|
15 |
-
},
|
16 |
-
|
17 |
-
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
|
18 |
-
|
19 |
-
"disallowSpaceAfterKeywords": [],
|
20 |
-
|
21 |
-
"disallowSpaceBeforeComma": true,
|
22 |
-
"disallowSpaceAfterComma": false,
|
23 |
-
"disallowSpaceBeforeSemicolon": true,
|
24 |
-
|
25 |
-
"disallowNodeTypes": [
|
26 |
-
"DebuggerStatement",
|
27 |
-
"ForInStatement",
|
28 |
-
"LabeledStatement",
|
29 |
-
"SwitchCase",
|
30 |
-
"SwitchStatement",
|
31 |
-
"WithStatement"
|
32 |
-
],
|
33 |
-
|
34 |
-
"requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] },
|
35 |
-
|
36 |
-
"requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
|
37 |
-
"requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
|
38 |
-
"disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
|
39 |
-
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
|
40 |
-
"disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
|
41 |
-
|
42 |
-
"requireSpaceBetweenArguments": true,
|
43 |
-
|
44 |
-
"disallowSpacesInsideParentheses": true,
|
45 |
-
|
46 |
-
"disallowSpacesInsideArrayBrackets": true,
|
47 |
-
|
48 |
-
"disallowQuotedKeysInObjects": { "allExcept": ["reserved"] },
|
49 |
-
|
50 |
-
"disallowSpaceAfterObjectKeys": true,
|
51 |
-
|
52 |
-
"requireCommaBeforeLineBreak": true,
|
53 |
-
|
54 |
-
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
|
55 |
-
"requireSpaceAfterPrefixUnaryOperators": [],
|
56 |
-
|
57 |
-
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
|
58 |
-
"requireSpaceBeforePostfixUnaryOperators": [],
|
59 |
-
|
60 |
-
"disallowSpaceBeforeBinaryOperators": [],
|
61 |
-
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
|
62 |
-
|
63 |
-
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
|
64 |
-
"disallowSpaceAfterBinaryOperators": [],
|
65 |
-
|
66 |
-
"disallowImplicitTypeConversion": ["binary", "string"],
|
67 |
-
|
68 |
-
"disallowKeywords": ["with", "eval"],
|
69 |
-
|
70 |
-
"requireKeywordsOnNewLine": [],
|
71 |
-
"disallowKeywordsOnNewLine": ["else"],
|
72 |
-
|
73 |
-
"requireLineFeedAtFileEnd": true,
|
74 |
-
|
75 |
-
"disallowTrailingWhitespace": true,
|
76 |
-
|
77 |
-
"disallowTrailingComma": true,
|
78 |
-
|
79 |
-
"excludeFiles": ["node_modules/**", "vendor/**"],
|
80 |
-
|
81 |
-
"disallowMultipleLineStrings": true,
|
82 |
-
|
83 |
-
"requireDotNotation": { "allExcept": ["keywords"] },
|
84 |
-
|
85 |
-
"requireParenthesesAroundIIFE": true,
|
86 |
-
|
87 |
-
"validateLineBreaks": "LF",
|
88 |
-
|
89 |
-
"validateQuoteMarks": {
|
90 |
-
"escape": true,
|
91 |
-
"mark": "'"
|
92 |
-
},
|
93 |
-
|
94 |
-
"disallowOperatorBeforeLineBreak": [],
|
95 |
-
|
96 |
-
"requireSpaceBeforeKeywords": [
|
97 |
-
"do",
|
98 |
-
"for",
|
99 |
-
"if",
|
100 |
-
"else",
|
101 |
-
"switch",
|
102 |
-
"case",
|
103 |
-
"try",
|
104 |
-
"catch",
|
105 |
-
"finally",
|
106 |
-
"while",
|
107 |
-
"with",
|
108 |
-
"return"
|
109 |
-
],
|
110 |
-
|
111 |
-
"validateAlignedFunctionParameters": {
|
112 |
-
"lineBreakAfterOpeningBraces": true,
|
113 |
-
"lineBreakBeforeClosingBraces": true
|
114 |
-
},
|
115 |
-
|
116 |
-
"requirePaddingNewLinesBeforeExport": true,
|
117 |
-
|
118 |
-
"validateNewlineAfterArrayElements": {
|
119 |
-
"maximum": 8
|
120 |
-
},
|
121 |
-
|
122 |
-
"requirePaddingNewLinesAfterUseStrict": true,
|
123 |
-
|
124 |
-
"disallowArrowFunctions": true,
|
125 |
-
|
126 |
-
"disallowMultiLineTernary": true,
|
127 |
-
|
128 |
-
"validateOrderInObjectKeys": "asc-insensitive",
|
129 |
-
|
130 |
-
"disallowIdenticalDestructuringNames": true,
|
131 |
-
|
132 |
-
"disallowNestedTernaries": { "maxLevel": 1 },
|
133 |
-
|
134 |
-
"requireSpaceAfterComma": { "allExcept": ["trailing"] },
|
135 |
-
"requireAlignedMultilineParams": false,
|
136 |
-
|
137 |
-
"requireSpacesInGenerator": {
|
138 |
-
"afterStar": true
|
139 |
-
},
|
140 |
-
|
141 |
-
"disallowSpacesInGenerator": {
|
142 |
-
"beforeStar": true
|
143 |
-
},
|
144 |
-
|
145 |
-
"disallowVar": false,
|
146 |
-
|
147 |
-
"requireArrayDestructuring": false,
|
148 |
-
|
149 |
-
"requireEnhancedObjectLiterals": false,
|
150 |
-
|
151 |
-
"requireObjectDestructuring": false,
|
152 |
-
|
153 |
-
"requireEarlyReturn": false,
|
154 |
-
|
155 |
-
"requireCapitalizedConstructorsNew": {
|
156 |
-
"allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"]
|
157 |
-
},
|
158 |
-
|
159 |
-
"requireImportAlphabetized": false,
|
160 |
-
|
161 |
-
"requireSpaceBeforeObjectValues": true,
|
162 |
-
"requireSpaceBeforeDestructuredValues": true,
|
163 |
-
|
164 |
-
"disallowSpacesInsideTemplateStringPlaceholders": true,
|
165 |
-
|
166 |
-
"disallowArrayDestructuringReturn": false,
|
167 |
-
|
168 |
-
"requireNewlineBeforeSingleStatementsInIf": false,
|
169 |
-
|
170 |
-
"disallowUnusedVariables": true,
|
171 |
-
|
172 |
-
"requireSpacesInsideImportedObjectBraces": true,
|
173 |
-
|
174 |
-
"requireUseStrict": true
|
175 |
-
}
|
176 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/call-bind@1.0.2/node_modules/function-bind/.npmignore
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
# gitignore
|
2 |
-
.DS_Store
|
3 |
-
.monitor
|
4 |
-
.*.swp
|
5 |
-
.nodemonignore
|
6 |
-
releases
|
7 |
-
*.log
|
8 |
-
*.err
|
9 |
-
fleet.json
|
10 |
-
public/browserify
|
11 |
-
bin/*.json
|
12 |
-
.bin
|
13 |
-
build
|
14 |
-
compile
|
15 |
-
.lock-wscript
|
16 |
-
coverage
|
17 |
-
node_modules
|
18 |
-
|
19 |
-
# Only apps should have lockfiles
|
20 |
-
npm-shrinkwrap.json
|
21 |
-
package-lock.json
|
22 |
-
yarn.lock
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/call-bind@1.0.2/node_modules/function-bind/.travis.yml
DELETED
@@ -1,168 +0,0 @@
|
|
1 |
-
language: node_js
|
2 |
-
os:
|
3 |
-
- linux
|
4 |
-
node_js:
|
5 |
-
- "8.4"
|
6 |
-
- "7.10"
|
7 |
-
- "6.11"
|
8 |
-
- "5.12"
|
9 |
-
- "4.8"
|
10 |
-
- "iojs-v3.3"
|
11 |
-
- "iojs-v2.5"
|
12 |
-
- "iojs-v1.8"
|
13 |
-
- "0.12"
|
14 |
-
- "0.10"
|
15 |
-
- "0.8"
|
16 |
-
before_install:
|
17 |
-
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi'
|
18 |
-
- 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; else npm install -g npm; fi; fi'
|
19 |
-
install:
|
20 |
-
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
|
21 |
-
script:
|
22 |
-
- 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi'
|
23 |
-
- 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi'
|
24 |
-
- 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi'
|
25 |
-
- 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi'
|
26 |
-
sudo: false
|
27 |
-
env:
|
28 |
-
- TEST=true
|
29 |
-
matrix:
|
30 |
-
fast_finish: true
|
31 |
-
include:
|
32 |
-
- node_js: "node"
|
33 |
-
env: PRETEST=true
|
34 |
-
- node_js: "4"
|
35 |
-
env: COVERAGE=true
|
36 |
-
- node_js: "8.3"
|
37 |
-
env: TEST=true ALLOW_FAILURE=true
|
38 |
-
- node_js: "8.2"
|
39 |
-
env: TEST=true ALLOW_FAILURE=true
|
40 |
-
- node_js: "8.1"
|
41 |
-
env: TEST=true ALLOW_FAILURE=true
|
42 |
-
- node_js: "8.0"
|
43 |
-
env: TEST=true ALLOW_FAILURE=true
|
44 |
-
- node_js: "7.9"
|
45 |
-
env: TEST=true ALLOW_FAILURE=true
|
46 |
-
- node_js: "7.8"
|
47 |
-
env: TEST=true ALLOW_FAILURE=true
|
48 |
-
- node_js: "7.7"
|
49 |
-
env: TEST=true ALLOW_FAILURE=true
|
50 |
-
- node_js: "7.6"
|
51 |
-
env: TEST=true ALLOW_FAILURE=true
|
52 |
-
- node_js: "7.5"
|
53 |
-
env: TEST=true ALLOW_FAILURE=true
|
54 |
-
- node_js: "7.4"
|
55 |
-
env: TEST=true ALLOW_FAILURE=true
|
56 |
-
- node_js: "7.3"
|
57 |
-
env: TEST=true ALLOW_FAILURE=true
|
58 |
-
- node_js: "7.2"
|
59 |
-
env: TEST=true ALLOW_FAILURE=true
|
60 |
-
- node_js: "7.1"
|
61 |
-
env: TEST=true ALLOW_FAILURE=true
|
62 |
-
- node_js: "7.0"
|
63 |
-
env: TEST=true ALLOW_FAILURE=true
|
64 |
-
- node_js: "6.10"
|
65 |
-
env: TEST=true ALLOW_FAILURE=true
|
66 |
-
- node_js: "6.9"
|
67 |
-
env: TEST=true ALLOW_FAILURE=true
|
68 |
-
- node_js: "6.8"
|
69 |
-
env: TEST=true ALLOW_FAILURE=true
|
70 |
-
- node_js: "6.7"
|
71 |
-
env: TEST=true ALLOW_FAILURE=true
|
72 |
-
- node_js: "6.6"
|
73 |
-
env: TEST=true ALLOW_FAILURE=true
|
74 |
-
- node_js: "6.5"
|
75 |
-
env: TEST=true ALLOW_FAILURE=true
|
76 |
-
- node_js: "6.4"
|
77 |
-
env: TEST=true ALLOW_FAILURE=true
|
78 |
-
- node_js: "6.3"
|
79 |
-
env: TEST=true ALLOW_FAILURE=true
|
80 |
-
- node_js: "6.2"
|
81 |
-
env: TEST=true ALLOW_FAILURE=true
|
82 |
-
- node_js: "6.1"
|
83 |
-
env: TEST=true ALLOW_FAILURE=true
|
84 |
-
- node_js: "6.0"
|
85 |
-
env: TEST=true ALLOW_FAILURE=true
|
86 |
-
- node_js: "5.11"
|
87 |
-
env: TEST=true ALLOW_FAILURE=true
|
88 |
-
- node_js: "5.10"
|
89 |
-
env: TEST=true ALLOW_FAILURE=true
|
90 |
-
- node_js: "5.9"
|
91 |
-
env: TEST=true ALLOW_FAILURE=true
|
92 |
-
- node_js: "5.8"
|
93 |
-
env: TEST=true ALLOW_FAILURE=true
|
94 |
-
- node_js: "5.7"
|
95 |
-
env: TEST=true ALLOW_FAILURE=true
|
96 |
-
- node_js: "5.6"
|
97 |
-
env: TEST=true ALLOW_FAILURE=true
|
98 |
-
- node_js: "5.5"
|
99 |
-
env: TEST=true ALLOW_FAILURE=true
|
100 |
-
- node_js: "5.4"
|
101 |
-
env: TEST=true ALLOW_FAILURE=true
|
102 |
-
- node_js: "5.3"
|
103 |
-
env: TEST=true ALLOW_FAILURE=true
|
104 |
-
- node_js: "5.2"
|
105 |
-
env: TEST=true ALLOW_FAILURE=true
|
106 |
-
- node_js: "5.1"
|
107 |
-
env: TEST=true ALLOW_FAILURE=true
|
108 |
-
- node_js: "5.0"
|
109 |
-
env: TEST=true ALLOW_FAILURE=true
|
110 |
-
- node_js: "4.7"
|
111 |
-
env: TEST=true ALLOW_FAILURE=true
|
112 |
-
- node_js: "4.6"
|
113 |
-
env: TEST=true ALLOW_FAILURE=true
|
114 |
-
- node_js: "4.5"
|
115 |
-
env: TEST=true ALLOW_FAILURE=true
|
116 |
-
- node_js: "4.4"
|
117 |
-
env: TEST=true ALLOW_FAILURE=true
|
118 |
-
- node_js: "4.3"
|
119 |
-
env: TEST=true ALLOW_FAILURE=true
|
120 |
-
- node_js: "4.2"
|
121 |
-
env: TEST=true ALLOW_FAILURE=true
|
122 |
-
- node_js: "4.1"
|
123 |
-
env: TEST=true ALLOW_FAILURE=true
|
124 |
-
- node_js: "4.0"
|
125 |
-
env: TEST=true ALLOW_FAILURE=true
|
126 |
-
- node_js: "iojs-v3.2"
|
127 |
-
env: TEST=true ALLOW_FAILURE=true
|
128 |
-
- node_js: "iojs-v3.1"
|
129 |
-
env: TEST=true ALLOW_FAILURE=true
|
130 |
-
- node_js: "iojs-v3.0"
|
131 |
-
env: TEST=true ALLOW_FAILURE=true
|
132 |
-
- node_js: "iojs-v2.4"
|
133 |
-
env: TEST=true ALLOW_FAILURE=true
|
134 |
-
- node_js: "iojs-v2.3"
|
135 |
-
env: TEST=true ALLOW_FAILURE=true
|
136 |
-
- node_js: "iojs-v2.2"
|
137 |
-
env: TEST=true ALLOW_FAILURE=true
|
138 |
-
- node_js: "iojs-v2.1"
|
139 |
-
env: TEST=true ALLOW_FAILURE=true
|
140 |
-
- node_js: "iojs-v2.0"
|
141 |
-
env: TEST=true ALLOW_FAILURE=true
|
142 |
-
- node_js: "iojs-v1.7"
|
143 |
-
env: TEST=true ALLOW_FAILURE=true
|
144 |
-
- node_js: "iojs-v1.6"
|
145 |
-
env: TEST=true ALLOW_FAILURE=true
|
146 |
-
- node_js: "iojs-v1.5"
|
147 |
-
env: TEST=true ALLOW_FAILURE=true
|
148 |
-
- node_js: "iojs-v1.4"
|
149 |
-
env: TEST=true ALLOW_FAILURE=true
|
150 |
-
- node_js: "iojs-v1.3"
|
151 |
-
env: TEST=true ALLOW_FAILURE=true
|
152 |
-
- node_js: "iojs-v1.2"
|
153 |
-
env: TEST=true ALLOW_FAILURE=true
|
154 |
-
- node_js: "iojs-v1.1"
|
155 |
-
env: TEST=true ALLOW_FAILURE=true
|
156 |
-
- node_js: "iojs-v1.0"
|
157 |
-
env: TEST=true ALLOW_FAILURE=true
|
158 |
-
- node_js: "0.11"
|
159 |
-
env: TEST=true ALLOW_FAILURE=true
|
160 |
-
- node_js: "0.9"
|
161 |
-
env: TEST=true ALLOW_FAILURE=true
|
162 |
-
- node_js: "0.6"
|
163 |
-
env: TEST=true ALLOW_FAILURE=true
|
164 |
-
- node_js: "0.4"
|
165 |
-
env: TEST=true ALLOW_FAILURE=true
|
166 |
-
allow_failures:
|
167 |
-
- os: osx
|
168 |
-
- env: TEST=true ALLOW_FAILURE=true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node_modules/.pnpm/call-bind@1.0.2/node_modules/function-bind/LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
Copyright (c) 2013 Raynos.
|
2 |
-
|
3 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
-
of this software and associated documentation files (the "Software"), to deal
|
5 |
-
in the Software without restriction, including without limitation the rights
|
6 |
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7 |
-
copies of the Software, and to permit persons to whom the Software is
|
8 |
-
furnished to do so, subject to the following conditions:
|
9 |
-
|
10 |
-
The above copyright notice and this permission notice shall be included in
|
11 |
-
all copies or substantial portions of the Software.
|
12 |
-
|
13 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15 |
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16 |
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17 |
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19 |
-
THE SOFTWARE.
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|