new license file version [CI SKIP]

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

View File

@@ -0,0 +1,19 @@
export interface SequenceError extends Error {
}
export interface SequenceErrorCtor {
/**
* @deprecated Internal implementation detail. Do not construct error instances.
* Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269
*/
new (message: string): SequenceError;
}
/**
* An error thrown when something is wrong with the sequence of
* values arriving on the observable.
*
* @see {@link operators/single}
*
* @class SequenceError
*/
export declare const SequenceError: SequenceErrorCtor;
//# sourceMappingURL=SequenceError.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"never.js","sourceRoot":"","sources":["../../../../src/internal/observable/never.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAC3C,qCAAoC;AAmCvB,QAAA,KAAK,GAAG,IAAI,uBAAU,CAAQ,WAAI,CAAC,CAAC;AAKjD,SAAgB,KAAK;IACnB,OAAO,aAAK,CAAC;AACf,CAAC;AAFD,sBAEC"}

View File

@@ -0,0 +1,39 @@
import { indexOf } from './utils';
let logger = {
methodMap: ['debug', 'info', 'warn', 'error'],
level: 'info',
// Maps a given level value to the `methodMap` indexes above.
lookupLevel: function(level) {
if (typeof level === 'string') {
let levelMap = indexOf(logger.methodMap, level.toLowerCase());
if (levelMap >= 0) {
level = levelMap;
} else {
level = parseInt(level, 10);
}
}
return level;
},
// Can be overridden in the host environment
log: function(level, ...message) {
level = logger.lookupLevel(level);
if (
typeof console !== 'undefined' &&
logger.lookupLevel(logger.level) <= level
) {
let method = logger.methodMap[level];
// eslint-disable-next-line no-console
if (!console[method]) {
method = 'log';
}
console[method](...message); // eslint-disable-line no-console
}
}
};
export default logger;

View File

@@ -0,0 +1,56 @@
{
"name": "https-proxy-agent",
"version": "5.0.1",
"description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS",
"main": "dist/index",
"types": "dist/index",
"files": [
"dist"
],
"scripts": {
"prebuild": "rimraf dist",
"build": "tsc",
"test": "mocha --reporter spec",
"test-lint": "eslint src --ext .js,.ts",
"prepublishOnly": "npm run build"
},
"repository": {
"type": "git",
"url": "git://github.com/TooTallNate/node-https-proxy-agent.git"
},
"keywords": [
"https",
"proxy",
"endpoint",
"agent"
],
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
"license": "MIT",
"bugs": {
"url": "https://github.com/TooTallNate/node-https-proxy-agent/issues"
},
"dependencies": {
"agent-base": "6",
"debug": "4"
},
"devDependencies": {
"@types/debug": "4",
"@types/node": "^12.12.11",
"@typescript-eslint/eslint-plugin": "1.6.0",
"@typescript-eslint/parser": "1.1.0",
"eslint": "5.16.0",
"eslint-config-airbnb": "17.1.0",
"eslint-config-prettier": "4.1.0",
"eslint-import-resolver-typescript": "1.1.1",
"eslint-plugin-import": "2.16.0",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-react": "7.12.4",
"mocha": "^6.2.2",
"proxy": "1",
"rimraf": "^3.0.0",
"typescript": "^3.5.3"
},
"engines": {
"node": ">= 6"
}
}

View File

@@ -0,0 +1,42 @@
"use strict";
var ArrayIterator = require("../array")
, slice = Array.prototype.slice;
module.exports = function (t, a) {
var i = 0, x = ["raz", "dwa", "trzy"], y = {}, called = 0;
t(x, function () {
a.deep(slice.call(arguments, 0, 1), [x[i]], "Array " + i + "#");
a(this, y, "Array: context: " + i++ + "#");
}, y);
i = 0;
t((function () {
return arguments;
}("raz", "dwa", "trzy")), function () {
a.deep(slice.call(arguments, 0, 1), [x[i]], "Arguments" + i + "#");
a(this, y, "Arguments: context: " + i++ + "#");
}, y);
i = 0;
t(x = "foo", function () {
a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#");
a(this, y, "Regular String: context: " + i++ + "#");
}, y);
i = 0;
x = ["r", "💩", "z"];
t("r💩z", function () {
a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#");
a(this, y, "Unicode String: context: " + i++ + "#");
}, y);
i = 0;
t(new ArrayIterator(x), function () {
a.deep(slice.call(arguments, 0, 1), [x[i]], "Iterator " + i + "#");
a(this, y, "Iterator: context: " + i++ + "#");
}, y);
t(x = ["raz", "dwa", "trzy"], function (value, doBreak) {
++called;
return doBreak();
});
a(called, 1, "Break");
};

View File

@@ -0,0 +1,2 @@
import { ParseRuntime } from "./ParseRuntime";
export default function (data: string, param: ParseRuntime): string;

View File

@@ -0,0 +1,64 @@
import { OperatorFunction } from '../types';
/**
* Emits `false` if the input Observable emits any values, or emits `true` if the
* input Observable completes without emitting any values.
*
* <span class="informal">Tells whether any values are emitted by an Observable.</span>
*
* ![](isEmpty.png)
*
* `isEmpty` transforms an Observable that emits values into an Observable that
* emits a single boolean value representing whether or not any values were
* emitted by the source Observable. As soon as the source Observable emits a
* value, `isEmpty` will emit a `false` and complete. If the source Observable
* completes having not emitted anything, `isEmpty` will emit a `true` and
* complete.
*
* A similar effect could be achieved with {@link count}, but `isEmpty` can emit
* a `false` value sooner.
*
* ## Examples
*
* Emit `false` for a non-empty Observable
*
* ```ts
* import { Subject, isEmpty } from 'rxjs';
*
* const source = new Subject<string>();
* const result = source.pipe(isEmpty());
*
* source.subscribe(x => console.log(x));
* result.subscribe(x => console.log(x));
*
* source.next('a');
* source.next('b');
* source.next('c');
* source.complete();
*
* // Outputs
* // 'a'
* // false
* // 'b'
* // 'c'
* ```
*
* Emit `true` for an empty Observable
*
* ```ts
* import { EMPTY, isEmpty } from 'rxjs';
*
* const result = EMPTY.pipe(isEmpty());
* result.subscribe(x => console.log(x));
*
* // Outputs
* // true
* ```
*
* @see {@link count}
* @see {@link EMPTY}
*
* @return A function that returns an Observable that emits boolean value
* indicating whether the source Observable was empty or not.
*/
export declare function isEmpty<T>(): OperatorFunction<T, boolean>;
//# sourceMappingURL=isEmpty.d.ts.map

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"Y Z a b c d e i j k l m n o p q r s t u f H","2":"C K L G M N O P Q","257":"R S T U V W X"},C:{"1":"2 3 4 5 6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"0 1 DC tB I v J D E F A B C K L G M N O w g x y z EC FC"},D:{"1":"Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q","257":"R S T U V W X"},E:{"1":"L G 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v J D E F A B C K HC zB IC JC KC LC 0B qB rB"},F:{"1":"oB pB P Q R wB S T U V W X Y Z a b c d e","2":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB PC QC RC SC qB AC TC rB","257":"gB hB iB jB kB h lB mB nB"},G:{"1":"lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","132":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC"},H:{"2":"oC"},I:{"1":"f","2":"tB I pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"2":"A B"},O:{"2":"vC"},P:{"1":"g 5C sB 6C 7C 8C","2":"I wC xC yC zC 0C 0B 1C 2C","257":"3C 4C"},Q:{"2":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:4,C:"CSS3 image-orientation"};

View File

@@ -0,0 +1 @@
{"version":3,"file":"combineAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineAll.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAKzC,QAAA,UAAU,GAAG,mCAAgB,CAAC"}

View File

@@ -0,0 +1,2 @@
if(typeof cptable === 'undefined') cptable = {};
cptable[860] = (function(){ var d = "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {"enc": e, "dec": D }; })();

View File

@@ -0,0 +1,2 @@
import { Node } from 'estree';
export default function is_used_as_reference(node: Node, parent: Node): boolean;

View File

@@ -0,0 +1,56 @@
"use strict";
var assert = require("chai").assert
, isPlainFunction = require("../../plain-function/is")
, arrowFunctionIfSupported = require("../_lib/arrow-function-if-supported")
, classIfSupported = require("../_lib/class-if-supported");
describe("plain-function/is", function () {
it("Should return true on function", function () {
assert.equal(isPlainFunction(function () { return true; }), true);
});
if (arrowFunctionIfSupported) {
it("Should return true on arrow function", function () {
assert.equal(isPlainFunction(arrowFunctionIfSupported), true);
});
}
if (classIfSupported) {
it("Should return false on class", function () {
assert.equal(isPlainFunction(classIfSupported), false);
});
}
it("Should return false on reg-exp", function () {
assert.equal(isPlainFunction(/foo/), false);
});
it("Should return false on plain object", function () {
assert.equal(isPlainFunction({}), false);
});
it("Should return false on array", function () { assert.equal(isPlainFunction([]), false); });
if (typeof Object.create === "function") {
it("Should return false on object with no prototype", function () {
assert.equal(isPlainFunction(Object.create(null)), false);
});
}
it("Should return false on string", function () {
assert.equal(isPlainFunction("foo"), false);
});
it("Should return false on empty string", function () {
assert.equal(isPlainFunction(""), false);
});
it("Should return false on number", function () { assert.equal(isPlainFunction(123), false); });
it("Should return false on NaN", function () { assert.equal(isPlainFunction(NaN), false); });
it("Should return false on boolean", function () {
assert.equal(isPlainFunction(true), false);
});
if (typeof Symbol === "function") {
it("Should return false on symbol", function () {
assert.equal(isPlainFunction(Symbol("foo")), false);
});
}
it("Should return false on null", function () { assert.equal(isPlainFunction(null), false); });
it("Should return false on undefined", function () {
assert.equal(isPlainFunction(void 0), false);
});
});

View File

@@ -0,0 +1,50 @@
{
"name": "emoji-regex",
"version": "8.0.0",
"description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.",
"homepage": "https://mths.be/emoji-regex",
"main": "index.js",
"types": "index.d.ts",
"keywords": [
"unicode",
"regex",
"regexp",
"regular expressions",
"code points",
"symbols",
"characters",
"emoji"
],
"license": "MIT",
"author": {
"name": "Mathias Bynens",
"url": "https://mathiasbynens.be/"
},
"repository": {
"type": "git",
"url": "https://github.com/mathiasbynens/emoji-regex.git"
},
"bugs": "https://github.com/mathiasbynens/emoji-regex/issues",
"files": [
"LICENSE-MIT.txt",
"index.js",
"index.d.ts",
"text.js",
"es2015/index.js",
"es2015/text.js"
],
"scripts": {
"build": "rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src -d ./es2015; node script/inject-sequences.js",
"test": "mocha",
"test:watch": "npm run test -- --watch"
},
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.3.4",
"@babel/plugin-proposal-unicode-property-regex": "^7.2.0",
"@babel/preset-env": "^7.3.4",
"mocha": "^6.0.2",
"regexgen": "^1.3.0",
"unicode-12.0.0": "^0.7.9"
}
}

View File

@@ -0,0 +1,328 @@
# figures
> Unicode symbols with fallbacks for older terminals
[![](screenshot.png)](index.js)
[*and more...*](index.js)
Terminals such as Windows Console Host (and CMD) only support a [limited character set](http://en.wikipedia.org/wiki/Code_page_437).
## Install
```sh
npm install figures
```
## Usage
```js
import figures, {replaceSymbols, mainSymbols, fallbackSymbols} from 'figures';
console.log(figures.tick);
// On terminals with Unicode symbols: ✔︎
// On other terminals: √
console.log(figures.mainSymbols.tick);
// On all terminals: ✔︎
console.log(figures.fallbackSymbols.tick);
// On all terminals: √
console.log(figures.replaceSymbols('✔︎ check'));
// On terminals with Unicode symbols: ✔︎ check
// On other terminals: √ check
```
## API
### figures (default export)
Type: `object`
Symbols to use on any terminal.
### mainSymbols
Symbols to use when the terminal supports Unicode symbols.
### fallbackSymbols
Symbols to use when the terminal does not support Unicode symbols.
### replaceSymbols(string)
Returns the input with replaced fallback Unicode symbols on older terminals.
All the below [figures](#figures) are attached to the default export as shown in the example above.
#### string
Type: `string`
String where the Unicode symbols will be replaced with fallback symbols depending on the terminal.
## Figures
`Fallback` characters are only shown when they differ from the `Main` ones.
| Name | Main | Fallback |
| ------------------------------------------- | :--: | :------: |
| tick | `✔` | `√` |
| info | `` | `i` |
| warning | `⚠` | `‼` |
| cross | `✘` | `×` |
| square | `█` | |
| squareSmall | `◻` | `□` |
| squareSmallFilled | `◼` | `■` |
| squareDarkShade | `▓` | |
| squareMediumShade | `▒` | |
| squareLightShade | `░` | |
| squareTop | `▀` | |
| squareBottom | `▄` | |
| squareLeft | `▌` | |
| squareRight | `▐` | |
| squareCenter | `■` | |
| circle | `◯` | `( )` |
| circleFilled | `◉` | `(*)` |
| circleDotted | `◌` | `( )` |
| circleDouble | `◎` | `( )` |
| circleCircle | `ⓞ` | `(○)` |
| circleCross | `ⓧ` | `(×)` |
| circlePipe | `Ⓘ` | `(│)` |
| circleQuestionMark | `?⃝ ` | `(?)` |
| radioOn | `◉` | `(*)` |
| radioOff | `◯` | `( )` |
| checkboxOn | `☒` | `[×]` |
| checkboxOff | `☐` | `[ ]` |
| checkboxCircleOn | `ⓧ` | `(×)` |
| checkboxCircleOff | `Ⓘ` | `( )` |
| questionMarkPrefix | `?⃝ ` | `` |
| bullet | `●` | |
| dot | `` | |
| ellipsis | `…` | |
| pointer | `` | `>` |
| pointerSmall | `` | `` |
| triangleUp | `▲` | |
| triangleUpSmall | `▴` | |
| triangleUpOutline | `△` | `∆` |
| triangleDown | `▼` | |
| triangleDownSmall | `▾` | |
| triangleLeft | `◀` | `◄` |
| triangleLeftSmall | `◂` | |
| triangleRight | `▶` | `►` |
| triangleRightSmall | `▸` | |
| lozenge | `◆` | `♦` |
| lozengeOutline | `◇` | `◊` |
| home | `⌂` | |
| hamburger | `☰` | `≡` |
| smiley | `㋡` | `☺` |
| mustache | `෴` | `┌─┐` |
| heart | `♥` | |
| star | `★` | `✶` |
| play | `▶` | `►` |
| musicNote | `♪` | |
| musicNoteBeamed | `♫` | |
| nodejs | `⬢` | `♦` |
| arrowUp | `↑` | |
| arrowDown | `↓` | |
| arrowLeft | `←` | |
| arrowRight | `→` | |
| arrowLeftRight | `↔` | |
| arrowUpDown | `↕` | |
| almostEqual | `≈` | |
| notEqual | `≠` | |
| lessOrEqual | `≤` | |
| greaterOrEqual | `≥` | |
| identical | `≡` | |
| infinity | `∞` | |
| subscriptZero | `₀` | |
| subscriptOne | `₁` | |
| subscriptTwo | `₂` | |
| subscriptThree | `₃` | |
| subscriptFour | `₄` | |
| subscriptFive | `₅` | |
| subscriptSix | `₆` | |
| subscriptSeven | `₇` | |
| subscriptEight | `₈` | |
| subscriptNine | `₉` | |
| oneHalf | `½` | |
| oneThird | `⅓` | |
| oneQuarter | `¼` | |
| oneFifth | `⅕` | |
| oneSixth | `⅙` | |
| oneSeventh | `⅐` | `1/7` |
| oneEighth | `⅛` | |
| oneNinth | `⅑` | `1/9` |
| oneTenth | `⅒` | `1/10` |
| twoThirds | `⅔` | |
| twoFifths | `⅖` | |
| threeQuarters | `¾` | |
| threeFifths | `⅗` | |
| threeEighths | `⅜` | |
| fourFifths | `⅘` | |
| fiveSixths | `⅚` | |
| fiveEighths | `⅝` | |
| sevenEighths | `⅞` | |
| line | `─` | |
| lineBold | `━` | |
| lineDouble | `═` | |
| lineDashed0 | `┄` | |
| lineDashed1 | `┅` | |
| lineDashed2 | `┈` | |
| lineDashed3 | `┉` | |
| lineDashed4 | `╌` | |
| lineDashed5 | `╍` | |
| lineDashed6 | `╴` | |
| lineDashed7 | `╶` | |
| lineDashed8 | `╸` | |
| lineDashed9 | `╺` | |
| lineDashed10 | `╼` | |
| lineDashed11 | `╾` | |
| lineDashed12 | `` | |
| lineDashed13 | `` | |
| lineDashed14 | `` | |
| lineDashed15 | `` | |
| lineVertical | `│` | |
| lineVerticalBold | `┃` | |
| lineVerticalDouble | `║` | |
| lineVerticalDashed0 | `┆` | |
| lineVerticalDashed1 | `┇` | |
| lineVerticalDashed2 | `┊` | |
| lineVerticalDashed3 | `┋` | |
| lineVerticalDashed4 | `╎` | |
| lineVerticalDashed5 | `╏` | |
| lineVerticalDashed6 | `╵` | |
| lineVerticalDashed7 | `╷` | |
| lineVerticalDashed8 | `╹` | |
| lineVerticalDashed9 | `╻` | |
| lineVerticalDashed10 | `╽` | |
| lineVerticalDashed11 | `╿` | |
| lineDownLeft | `┐` | |
| lineDownLeftArc | `╮` | |
| lineDownBoldLeftBold | `┓` | |
| lineDownBoldLeft | `┒` | |
| lineDownLeftBold | `┑` | |
| lineDownDoubleLeftDouble | `╗` | |
| lineDownDoubleLeft | `╖` | |
| lineDownLeftDouble | `╕` | |
| lineDownRight | `┌` | |
| lineDownRightArc | `╭` | |
| lineDownBoldRightBold | `┏` | |
| lineDownBoldRight | `┎` | |
| lineDownRightBold | `┍` | |
| lineDownDoubleRightDouble | `╔` | |
| lineDownDoubleRight | `╓` | |
| lineDownRightDouble | `╒` | |
| lineUpLeft | `┘` | |
| lineUpLeftArc | `╯` | |
| lineUpBoldLeftBold | `┛` | |
| lineUpBoldLeft | `┚` | |
| lineUpLeftBold | `┙` | |
| lineUpDoubleLeftDouble | `╝` | |
| lineUpDoubleLeft | `╜` | |
| lineUpLeftDouble | `╛` | |
| lineUpRight | `└` | |
| lineUpRightArc | `╰` | |
| lineUpBoldRightBold | `┗` | |
| lineUpBoldRight | `┖` | |
| lineUpRightBold | `┕` | |
| lineUpDoubleRightDouble | `╚` | |
| lineUpDoubleRight | `╙` | |
| lineUpRightDouble | `╘` | |
| lineUpDownLeft | `┤` | |
| lineUpBoldDownBoldLeftBold | `┫` | |
| lineUpBoldDownBoldLeft | `┨` | |
| lineUpDownLeftBold | `┥` | |
| lineUpBoldDownLeftBold | `┩` | |
| lineUpDownBoldLeftBold | `┪` | |
| lineUpDownBoldLeft | `┧` | |
| lineUpBoldDownLeft | `┦` | |
| lineUpDoubleDownDoubleLeftDouble | `╣` | |
| lineUpDoubleDownDoubleLeft | `╢` | |
| lineUpDownLeftDouble | `╡` | |
| lineUpDownRight | `├` | |
| lineUpBoldDownBoldRightBold | `┣` | |
| lineUpBoldDownBoldRight | `┠` | |
| lineUpDownRightBold | `┝` | |
| lineUpBoldDownRightBold | `┡` | |
| lineUpDownBoldRightBold | `┢` | |
| lineUpDownBoldRight | `┟` | |
| lineUpBoldDownRight | `┞` | |
| lineUpDoubleDownDoubleRightDouble | `╠` | |
| lineUpDoubleDownDoubleRight | `╟` | |
| lineUpDownRightDouble | `╞` | |
| lineDownLeftRight | `┬` | |
| lineDownBoldLeftBoldRightBold | `┳` | |
| lineDownLeftBoldRightBold | `┯` | |
| lineDownBoldLeftRight | `┰` | |
| lineDownBoldLeftBoldRight | `┱` | |
| lineDownBoldLeftRightBold | `┲` | |
| lineDownLeftRightBold | `┮` | |
| lineDownLeftBoldRight | `┭` | |
| lineDownDoubleLeftDoubleRightDouble | `╦` | |
| lineDownDoubleLeftRight | `╥` | |
| lineDownLeftDoubleRightDouble | `╤` | |
| lineUpLeftRight | `┴` | |
| lineUpBoldLeftBoldRightBold | `┻` | |
| lineUpLeftBoldRightBold | `┷` | |
| lineUpBoldLeftRight | `┸` | |
| lineUpBoldLeftBoldRight | `┹` | |
| lineUpBoldLeftRightBold | `┺` | |
| lineUpLeftRightBold | `┶` | |
| lineUpLeftBoldRight | `┵` | |
| lineUpDoubleLeftDoubleRightDouble | `╩` | |
| lineUpDoubleLeftRight | `╨` | |
| lineUpLeftDoubleRightDouble | `╧` | |
| lineUpDownLeftRight | `┼` | |
| lineUpBoldDownBoldLeftBoldRightBold | `╋` | |
| lineUpDownBoldLeftBoldRightBold | `╈` | |
| lineUpBoldDownLeftBoldRightBold | `╇` | |
| lineUpBoldDownBoldLeftRightBold | `╊` | |
| lineUpBoldDownBoldLeftBoldRight | `╉` | |
| lineUpBoldDownLeftRight | `╀` | |
| lineUpDownBoldLeftRight | `╁` | |
| lineUpDownLeftBoldRight | `┽` | |
| lineUpDownLeftRightBold | `┾` | |
| lineUpBoldDownBoldLeftRight | `╂` | |
| lineUpDownLeftBoldRightBold | `┿` | |
| lineUpBoldDownLeftBoldRight | `╃` | |
| lineUpBoldDownLeftRightBold | `╄` | |
| lineUpDownBoldLeftBoldRight | `╅` | |
| lineUpDownBoldLeftRightBold | `╆` | |
| lineUpDoubleDownDoubleLeftDoubleRightDouble | `╬` | |
| lineUpDoubleDownDoubleLeftRight | `╫` | |
| lineUpDownLeftDoubleRightDouble | `╪` | |
| lineCross | `` | |
| lineBackslash | `╲` | |
| lineSlash | `` | |
## Other characters
If you cannot find the character you're looking for in the table above, please look at this full list of [cross-platform terminal characters](https://github.com/ehmicky/cross-platform-terminal-characters).
## Unsupported terminals
The following terminals are not officially supported:
- xterm
- Linux Terminal (kernel)
- cmder
They can display most but not all of the symbols listed above.
## Related
- [log-symbols](https://github.com/sindresorhus/log-symbols) - Colored symbols for various log levels
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-figures?utm_source=npm-figures&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>

View File

@@ -0,0 +1,53 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.AnimationFrameAction = void 0;
var AsyncAction_1 = require("./AsyncAction");
var animationFrameProvider_1 = require("./animationFrameProvider");
var AnimationFrameAction = (function (_super) {
__extends(AnimationFrameAction, _super);
function AnimationFrameAction(scheduler, work) {
var _this = _super.call(this, scheduler, work) || this;
_this.scheduler = scheduler;
_this.work = work;
return _this;
}
AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if (delay !== null && delay > 0) {
return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
}
scheduler.actions.push(this);
return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider_1.animationFrameProvider.requestAnimationFrame(function () { return scheduler.flush(undefined); }));
};
AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
var _a;
if (delay === void 0) { delay = 0; }
if (delay != null ? delay > 0 : this.delay > 0) {
return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
}
var actions = scheduler.actions;
if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) {
animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id);
scheduler._scheduled = undefined;
}
return undefined;
};
return AnimationFrameAction;
}(AsyncAction_1.AsyncAction));
exports.AnimationFrameAction = AnimationFrameAction;
//# sourceMappingURL=AnimationFrameAction.js.map

View File

@@ -0,0 +1,10 @@
{
"all": true,
"check-coverage": false,
"reporter": ["text-summary", "text", "html", "json"],
"exclude": [
"coverage",
"dist",
"test"
]
}

View File

@@ -0,0 +1 @@
{"name":"dir-glob","version":"3.0.1","files":{"license":{"checkedAt":1678883670657,"integrity":"sha512-QQmk4M/jfBcyygmcqkvREGxOKYqfHdUIKM74BnQ1zGaNq0S+fUpNo/uv3aWu7iKuXEJBbPedCZYIl4PLE7L/Sg==","mode":420,"size":1116},"package.json":{"checkedAt":1678883670852,"integrity":"sha512-cIPaUzaun5Hl7zAYRCbzPaVEz3ikWpilr50NC/Wz5GIJA5p8YMhlsKiZVO51dhyDvq6gN1DPwBDsgDx/ffPexQ==","mode":420,"size":640},"readme.md":{"checkedAt":1678883670852,"integrity":"sha512-wPYip1z06HutgP724PaaHCO3gqYGBzil0u9uZzJTlI9wiQ8Zod5VeDWBeoHfDwv4ueHXHOGwFlZv4oG1tDRdLw==","mode":420,"size":1357},"index.js":{"checkedAt":1678883670852,"integrity":"sha512-f2oH0NUU1kYs9R3gRvcz+rjoe6F6kiXqR2xznajQS506qzR2BACGBukLQ3aJdfbJip6iPR68TMA6cLZuVoTUSA==","mode":420,"size":2304}}}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H","2":"C K L"},C:{"1":"3 4 5 6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","33":"0 1 2 DC tB I v J D E F A B C K L G M N O w g x y z EC FC"},D:{"1":"gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","33":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB"},E:{"1":"B C K L G qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","33":"I v J D E F A HC zB IC JC KC LC 0B"},F:{"1":"C VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e TC rB","2":"F B PC QC RC SC qB AC","33":"0 1 2 3 4 5 6 7 8 9 G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB"},G:{"2":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"1":"f","2":"tB I pC qC rC sC BC tC uC"},J:{"33":"D A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"2":"H"},N:{"2":"A B"},O:{"1":"vC"},P:{"2":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"2":"AD BD"}},B:2,C:"CSS grab & grabbing cursors"};

View File

@@ -0,0 +1,86 @@
# socks
## Migrating from v1
For the most part, migrating from v1 takes minimal effort as v2 still supports factory creation of proxy connections with callback support.
### Notable breaking changes
- In an options object, the proxy 'command' is now required and does not default to 'connect'.
- **In an options object, 'target' is now known as 'destination'.**
- Sockets are no longer paused after a SOCKS connection is made, so socket.resume() is no longer required. (Please be sure to attach data handlers immediately to the Socket to avoid losing data).
- In v2, only the 'connect' command is supported via the factory SocksClient.createConnection function. (BIND and ASSOCIATE must be used with a SocksClient instance via event handlers).
- In v2, the factory SocksClient.createConnection function callback is called with a single object rather than separate socket and info object.
- A SOCKS http/https agent is no longer bundled into the library.
For informational purposes, here is the original getting started example from v1 converted to work with v2.
### Before (v1)
```javascript
var Socks = require('socks');
var options = {
proxy: {
ipaddress: "202.101.228.108",
port: 1080,
type: 5
},
target: {
host: "google.com",
port: 80
},
command: 'connect'
};
Socks.createConnection(options, function(err, socket, info) {
if (err)
console.log(err);
else {
socket.write("GET / HTTP/1.1\nHost: google.com\n\n");
socket.on('data', function(data) {
console.log(data.length);
console.log(data);
});
// PLEASE NOTE: sockets need to be resumed before any data will come in or out as they are paused right before this callback is fired.
socket.resume();
// 569
// <Buffer 48 54 54 50 2f 31 2e 31 20 33 30 31 20 4d 6f 76 65 64 20 50 65...
}
});
```
### After (v2)
```javascript
const SocksClient = require('socks').SocksClient;
let options = {
proxy: {
ipaddress: "202.101.228.108",
port: 1080,
type: 5
},
destination: {
host: "google.com",
port: 80
},
command: 'connect'
};
SocksClient.createConnection(options, function(err, result) {
if (err)
console.log(err);
else {
result.socket.write("GET / HTTP/1.1\nHost: google.com\n\n");
result.socket.on('data', function(data) {
console.log(data.length);
console.log(data);
});
// 569
// <Buffer 48 54 54 50 2f 31 2e 31 20 33 30 31 20 4d 6f 76 65 64 20 50 65...
}
});
```

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"2":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"0 1 2 3 4 5 6 7 8 9 x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB","2":"DC tB I v J D E F A B C K L G M N O w g vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB EC FC","322":"VB WB XB YB uB ZB"},D:{"2":"I v J D E F A B C K L G M N O w DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","194":"0 1 2 3 4 5 6 7 8 9 g x y z AB BB CB"},E:{"2":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"2":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e PC QC RC SC qB AC TC rB"},G:{"2":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"2":"tB I f pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"2":"A B C h qB AC rB"},L:{"2":"H"},M:{"2":"H"},N:{"2":"A B"},O:{"2":"vC"},P:{"2":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"2":"1B"},R:{"2":"9C"},S:{"1":"AD","2":"BD"}},B:7,C:"Scoped CSS"};

View File

@@ -0,0 +1,25 @@
// These are all the basic types that's compatible with all supported TypeScript versions.
export * from '../base';
// These are special types that require at least TypeScript 4.1.
export {CamelCase} from './camel-case';
export {CamelCasedProperties} from './camel-cased-properties';
export {CamelCasedPropertiesDeep} from './camel-cased-properties-deep';
export {KebabCase} from './kebab-case';
export {KebabCasedProperties} from './kebab-cased-properties';
export {KebabCasedPropertiesDeep} from './kebab-cased-properties-deep';
export {PascalCase} from './pascal-case';
export {PascalCasedProperties} from './pascal-cased-properties';
export {PascalCasedPropertiesDeep} from './pascal-cased-properties-deep';
export {SnakeCase} from './snake-case';
export {SnakeCasedProperties} from './snake-cased-properties';
export {SnakeCasedPropertiesDeep} from './snake-cased-properties-deep';
export {ScreamingSnakeCase} from './screaming-snake-case';
export {DelimiterCase} from './delimiter-case';
export {DelimiterCasedProperties} from './delimiter-cased-properties';
export {DelimiterCasedPropertiesDeep} from './delimiter-cased-properties-deep';
export {Split} from './split';
export {Trim} from './trim';
export {Includes} from './includes';
export {Get} from './get';
export {LastArrayElement} from './last-array-element';

View File

@@ -0,0 +1,22 @@
/// <reference types="node"/>
import {IncomingMessage} from 'http';
/**
Decompress a HTTP response if needed.
@param response - The HTTP incoming stream with compressed data.
@returns The decompressed HTTP response stream.
@example
```
import {http} from 'http';
import decompressResponse = require('decompress-response');
http.get('https://sindresorhus.com', response => {
response = decompressResponse(response);
});
```
*/
declare function decompressResponse(response: IncomingMessage): IncomingMessage;
export = decompressResponse;

View File

@@ -0,0 +1,39 @@
import { normalizePaginatedListResponse } from "./normalize-paginated-list-response";
export function iterator(octokit, route, parameters) {
const options = typeof route === "function"
? route.endpoint(parameters)
: octokit.request.endpoint(route, parameters);
const requestMethod = typeof route === "function" ? route : octokit.request;
const method = options.method;
const headers = options.headers;
let url = options.url;
return {
[Symbol.asyncIterator]: () => ({
async next() {
if (!url)
return { done: true };
try {
const response = await requestMethod({ method, url, headers });
const normalizedResponse = normalizePaginatedListResponse(response);
// `response.headers.link` format:
// '<https://api.github.com/users/aseemk/followers?page=2>; rel="next", <https://api.github.com/users/aseemk/followers?page=2>; rel="last"'
// sets `url` to undefined if "next" URL is not present or `link` header is not set
url = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1];
return { value: normalizedResponse };
}
catch (error) {
if (error.status !== 409)
throw error;
url = "";
return {
value: {
status: 200,
headers: {},
data: [],
},
};
}
},
}),
};
}

View File

@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.skip = void 0;
var filter_1 = require("./filter");
function skip(count) {
return filter_1.filter(function (_, index) { return count <= index; });
}
exports.skip = skip;
//# sourceMappingURL=skip.js.map

View File

@@ -0,0 +1,104 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
const fsStat = require("@nodelib/fs.stat");
const rpl = require("run-parallel");
const constants_1 = require("../constants");
const utils = require("../utils");
const common = require("./common");
function read(directory, settings, callback) {
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
readdirWithFileTypes(directory, settings, callback);
return;
}
readdir(directory, settings, callback);
}
exports.read = read;
function readdirWithFileTypes(directory, settings, callback) {
settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
if (readdirError !== null) {
callFailureCallback(callback, readdirError);
return;
}
const entries = dirents.map((dirent) => ({
dirent,
name: dirent.name,
path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
}));
if (!settings.followSymbolicLinks) {
callSuccessCallback(callback, entries);
return;
}
const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
rpl(tasks, (rplError, rplEntries) => {
if (rplError !== null) {
callFailureCallback(callback, rplError);
return;
}
callSuccessCallback(callback, rplEntries);
});
});
}
exports.readdirWithFileTypes = readdirWithFileTypes;
function makeRplTaskEntry(entry, settings) {
return (done) => {
if (!entry.dirent.isSymbolicLink()) {
done(null, entry);
return;
}
settings.fs.stat(entry.path, (statError, stats) => {
if (statError !== null) {
if (settings.throwErrorOnBrokenSymbolicLink) {
done(statError);
return;
}
done(null, entry);
return;
}
entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
done(null, entry);
});
};
}
function readdir(directory, settings, callback) {
settings.fs.readdir(directory, (readdirError, names) => {
if (readdirError !== null) {
callFailureCallback(callback, readdirError);
return;
}
const tasks = names.map((name) => {
const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
return (done) => {
fsStat.stat(path, settings.fsStatSettings, (error, stats) => {
if (error !== null) {
done(error);
return;
}
const entry = {
name,
path,
dirent: utils.fs.createDirentFromStats(name, stats)
};
if (settings.stats) {
entry.stats = stats;
}
done(null, entry);
});
};
});
rpl(tasks, (rplError, entries) => {
if (rplError !== null) {
callFailureCallback(callback, rplError);
return;
}
callSuccessCallback(callback, entries);
});
});
}
exports.readdir = readdir;
function callFailureCallback(callback, error) {
callback(error);
}
function callSuccessCallback(callback, result) {
callback(null, result);
}

View File

@@ -0,0 +1,60 @@
import { Observable } from '../Observable';
import { SchedulerLike } from '../types';
import { iterator as Symbol_iterator } from '../symbol/iterator';
import { isFunction } from '../util/isFunction';
import { executeSchedule } from '../util/executeSchedule';
/**
* Used in {@link scheduled} to create an observable from an Iterable.
* @param input The iterable to create an observable from
* @param scheduler The scheduler to use
*/
export function scheduleIterable<T>(input: Iterable<T>, scheduler: SchedulerLike) {
return new Observable<T>((subscriber) => {
let iterator: Iterator<T, T>;
// Schedule the initial creation of the iterator from
// the iterable. This is so the code in the iterable is
// not called until the scheduled job fires.
executeSchedule(subscriber, scheduler, () => {
// Create the iterator.
iterator = (input as any)[Symbol_iterator]();
executeSchedule(
subscriber,
scheduler,
() => {
let value: T;
let done: boolean | undefined;
try {
// Pull the value out of the iterator
({ value, done } = iterator.next());
} catch (err) {
// We got an error while pulling from the iterator
subscriber.error(err);
return;
}
if (done) {
// If it is "done" we just complete. This mimics the
// behavior of JavaScript's `for..of` consumption of
// iterables, which will not emit the value from an iterator
// result of `{ done: true: value: 'here' }`.
subscriber.complete();
} else {
// The iterable is not done, emit the value.
subscriber.next(value);
}
},
0,
true
);
});
// During finalization, if we see this iterator has a `return` method,
// then we know it is a Generator, and not just an Iterator. So we call
// the `return()` function. This will ensure that any `finally { }` blocks
// inside of the generator we can hit will be hit properly.
return () => isFunction(iterator?.return) && iterator.return();
});
}

View File

@@ -0,0 +1,15 @@
import Storage, { StorageResponse } from './storage';
export interface ServerStorageOptions extends RequestInit {
url: string;
then?: (data: any) => any[][];
handle?: (response: Response) => Promise<any>;
total?: (data: any) => number;
data?: (opts: ServerStorageOptions) => Promise<StorageResponse>;
}
declare class ServerStorage extends Storage<ServerStorageOptions> {
private readonly options;
constructor(options: ServerStorageOptions);
private handler;
get(options?: ServerStorageOptions): Promise<StorageResponse>;
}
export default ServerStorage;

View File

@@ -0,0 +1,15 @@
const SemVer = require('../classes/semver')
const inc = (version, release, options, identifier) => {
if (typeof (options) === 'string') {
identifier = options
options = undefined
}
try {
return new SemVer(version, options).inc(release, identifier).version
} catch (er) {
return null
}
}
module.exports = inc

View File

@@ -0,0 +1,61 @@
import { BestAvailableLocale } from './BestAvailableLocale';
import { UNICODE_EXTENSION_SEQUENCE_REGEX } from './utils';
/**
* https://tc39.es/ecma402/#sec-bestfitmatcher
* @param availableLocales
* @param requestedLocales
* @param getDefaultLocale
*/
export function BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale) {
var minimizedAvailableLocaleMap = {};
var availableLocaleMap = {};
var canonicalizedLocaleMap = {};
var minimizedAvailableLocales = new Set();
availableLocales.forEach(function (locale) {
var minimizedLocale = new Intl.Locale(locale)
.minimize()
.toString();
var canonicalizedLocale = Intl.getCanonicalLocales(locale)[0] || locale;
minimizedAvailableLocaleMap[minimizedLocale] = locale;
availableLocaleMap[locale] = locale;
canonicalizedLocaleMap[canonicalizedLocale] = locale;
minimizedAvailableLocales.add(minimizedLocale);
minimizedAvailableLocales.add(locale);
minimizedAvailableLocales.add(canonicalizedLocale);
});
var foundLocale;
for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
var l = requestedLocales_1[_i];
if (foundLocale) {
break;
}
var noExtensionLocale = l.replace(UNICODE_EXTENSION_SEQUENCE_REGEX, '');
if (availableLocales.has(noExtensionLocale)) {
foundLocale = noExtensionLocale;
break;
}
if (minimizedAvailableLocales.has(noExtensionLocale)) {
foundLocale = noExtensionLocale;
break;
}
var locale = new Intl.Locale(noExtensionLocale);
var maximizedRequestedLocale = locale.maximize().toString();
var minimizedRequestedLocale = locale.minimize().toString();
// Check minimized locale
if (minimizedAvailableLocales.has(minimizedRequestedLocale)) {
foundLocale = minimizedRequestedLocale;
break;
}
// Lookup algo on maximized locale
foundLocale = BestAvailableLocale(minimizedAvailableLocales, maximizedRequestedLocale);
}
if (!foundLocale) {
return { locale: getDefaultLocale() };
}
return {
locale: availableLocaleMap[foundLocale] ||
canonicalizedLocaleMap[foundLocale] ||
minimizedAvailableLocaleMap[foundLocale] ||
foundLocale,
};
}

View File

@@ -0,0 +1,50 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnicodeExtensionValue = void 0;
var utils_1 = require("./utils");
/**
* https://tc39.es/ecma402/#sec-unicodeextensionvalue
* @param extension
* @param key
*/
function UnicodeExtensionValue(extension, key) {
(0, utils_1.invariant)(key.length === 2, 'key must have 2 elements');
var size = extension.length;
var searchValue = "-".concat(key, "-");
var pos = extension.indexOf(searchValue);
if (pos !== -1) {
var start = pos + 4;
var end = start;
var k = start;
var done = false;
while (!done) {
var e = extension.indexOf('-', k);
var len = void 0;
if (e === -1) {
len = size - k;
}
else {
len = e - k;
}
if (len === 2) {
done = true;
}
else if (e === -1) {
end = size;
done = true;
}
else {
end = e;
k = e + 1;
}
}
return extension.slice(start, end);
}
searchValue = "-".concat(key);
pos = extension.indexOf(searchValue);
if (pos !== -1 && pos + 3 === size) {
return '';
}
return undefined;
}
exports.UnicodeExtensionValue = UnicodeExtensionValue;

View File

@@ -0,0 +1,46 @@
[![NPM version](https://img.shields.io/npm/v/esprima.svg)](https://www.npmjs.com/package/esprima)
[![npm download](https://img.shields.io/npm/dm/esprima.svg)](https://www.npmjs.com/package/esprima)
[![Build Status](https://img.shields.io/travis/jquery/esprima/master.svg)](https://travis-ci.org/jquery/esprima)
[![Coverage Status](https://img.shields.io/codecov/c/github/jquery/esprima/master.svg)](https://codecov.io/github/jquery/esprima)
**Esprima** ([esprima.org](http://esprima.org), BSD license) is a high performance,
standard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)
parser written in ECMAScript (also popularly known as
[JavaScript](https://en.wikipedia.org/wiki/JavaScript)).
Esprima is created and maintained by [Ariya Hidayat](https://twitter.com/ariyahidayat),
with the help of [many contributors](https://github.com/jquery/esprima/contributors).
### Features
- Full support for ECMAScript 2017 ([ECMA-262 8th Edition](http://www.ecma-international.org/publications/standards/Ecma-262.htm))
- Sensible [syntax tree format](https://github.com/estree/estree/blob/master/es5.md) as standardized by [ESTree project](https://github.com/estree/estree)
- Experimental support for [JSX](https://facebook.github.io/jsx/), a syntax extension for [React](https://facebook.github.io/react/)
- Optional tracking of syntax node location (index-based and line-column)
- [Heavily tested](http://esprima.org/test/ci.html) (~1500 [unit tests](https://github.com/jquery/esprima/tree/master/test/fixtures) with [full code coverage](https://codecov.io/github/jquery/esprima))
### API
Esprima can be used to perform [lexical analysis](https://en.wikipedia.org/wiki/Lexical_analysis) (tokenization) or [syntactic analysis](https://en.wikipedia.org/wiki/Parsing) (parsing) of a JavaScript program.
A simple example on Node.js REPL:
```javascript
> var esprima = require('esprima');
> var program = 'const answer = 42';
> esprima.tokenize(program);
[ { type: 'Keyword', value: 'const' },
{ type: 'Identifier', value: 'answer' },
{ type: 'Punctuator', value: '=' },
{ type: 'Numeric', value: '42' } ]
> esprima.parseScript(program);
{ type: 'Program',
body:
[ { type: 'VariableDeclaration',
declarations: [Object],
kind: 'const' } ],
sourceType: 'script' }
```
For more information, please read the [complete documentation](http://esprima.org/doc).

View File

@@ -0,0 +1,36 @@
var baseGetTag = require('./_baseGetTag'),
isObjectLike = require('./isObjectLike'),
isPlainObject = require('./isPlainObject');
/** `Object#toString` result references. */
var domExcTag = '[object DOMException]',
errorTag = '[object Error]';
/**
* Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
* `SyntaxError`, `TypeError`, or `URIError` object.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an error object, else `false`.
* @example
*
* _.isError(new Error);
* // => true
*
* _.isError(Error);
* // => false
*/
function isError(value) {
if (!isObjectLike(value)) {
return false;
}
var tag = baseGetTag(value);
return tag == errorTag || tag == domExcTag ||
(typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
}
module.exports = isError;

View File

@@ -0,0 +1,78 @@
# ansi-regex
> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
## Install
```
$ npm install ansi-regex
```
## Usage
```js
const ansiRegex = require('ansi-regex');
ansiRegex().test('\u001B[4mcake\u001B[0m');
//=> true
ansiRegex().test('cake');
//=> false
'\u001B[4mcake\u001B[0m'.match(ansiRegex());
//=> ['\u001B[4m', '\u001B[0m']
'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
//=> ['\u001B[4m']
'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
```
## API
### ansiRegex(options?)
Returns a regex for matching ANSI escape codes.
#### options
Type: `object`
##### onlyFirst
Type: `boolean`<br>
Default: `false` *(Matches any ANSI escape codes in a string)*
Match only the first ANSI escape.
## FAQ
### Why do you test for codes not in the ECMA 48 standard?
Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
## Maintainers
- [Sindre Sorhus](https://github.com/sindresorhus)
- [Josh Junon](https://github.com/qix-)
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-ansi-regex?utm_source=npm-ansi-regex&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>

View File

@@ -0,0 +1,65 @@
import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types';
import { switchMap } from './switchMap';
import { identity } from '../util/identity';
/**
* Converts a higher-order Observable into a first-order Observable
* producing values only from the most recent observable sequence
*
* <span class="informal">Flattens an Observable-of-Observables.</span>
*
* ![](switchAll.png)
*
* `switchAll` subscribes to a source that is an observable of observables, also known as a
* "higher-order observable" (or `Observable<Observable<T>>`). It subscribes to the most recently
* provided "inner observable" emitted by the source, unsubscribing from any previously subscribed
* to inner observable, such that only the most recent inner observable may be subscribed to at
* any point in time. The resulting observable returned by `switchAll` will only complete if the
* source observable completes, *and* any currently subscribed to inner observable also has completed,
* if there are any.
*
* ## Examples
*
* Spawn a new interval observable for each click event, but for every new
* click, cancel the previous interval and subscribe to the new one
*
* ```ts
* import { fromEvent, tap, map, interval, switchAll } from 'rxjs';
*
* const clicks = fromEvent(document, 'click').pipe(tap(() => console.log('click')));
* const source = clicks.pipe(map(() => interval(1000)));
*
* source
* .pipe(switchAll())
* .subscribe(x => console.log(x));
*
* // Output
* // click
* // 0
* // 1
* // 2
* // 3
* // ...
* // click
* // 0
* // 1
* // 2
* // ...
* // click
* // ...
* ```
*
* @see {@link combineLatestAll}
* @see {@link concatAll}
* @see {@link exhaustAll}
* @see {@link switchMap}
* @see {@link switchMapTo}
* @see {@link mergeAll}
*
* @return A function that returns an Observable that converts a higher-order
* Observable into a first-order Observable producing values only from the most
* recent Observable sequence.
*/
export function switchAll<O extends ObservableInput<any>>(): OperatorFunction<O, ObservedValueOf<O>> {
return switchMap(identity);
}

View File

@@ -0,0 +1,122 @@
iMurmurHash.js
==============
An incremental implementation of the MurmurHash3 (32-bit) hashing algorithm for JavaScript based on [Gary Court's implementation](https://github.com/garycourt/murmurhash-js) with [kazuyukitanimura's modifications](https://github.com/kazuyukitanimura/murmurhash-js).
This version works significantly faster than the non-incremental version if you need to hash many small strings into a single hash, since string concatenation (to build the single string to pass the non-incremental version) is fairly costly. In one case tested, using the incremental version was about 50% faster than concatenating 5-10 strings and then hashing.
Installation
------------
To use iMurmurHash in the browser, [download the latest version](https://raw.github.com/jensyt/imurmurhash-js/master/imurmurhash.min.js) and include it as a script on your site.
```html
<script type="text/javascript" src="/scripts/imurmurhash.min.js"></script>
<script>
// Your code here, access iMurmurHash using the global object MurmurHash3
</script>
```
---
To use iMurmurHash in Node.js, install the module using NPM:
```bash
npm install imurmurhash
```
Then simply include it in your scripts:
```javascript
MurmurHash3 = require('imurmurhash');
```
Quick Example
-------------
```javascript
// Create the initial hash
var hashState = MurmurHash3('string');
// Incrementally add text
hashState.hash('more strings');
hashState.hash('even more strings');
// All calls can be chained if desired
hashState.hash('and').hash('some').hash('more');
// Get a result
hashState.result();
// returns 0xe4ccfe6b
```
Functions
---------
### MurmurHash3 ([string], [seed])
Get a hash state object, optionally initialized with the given _string_ and _seed_. _Seed_ must be a positive integer if provided. Calling this function without the `new` keyword will return a cached state object that has been reset. This is safe to use as long as the object is only used from a single thread and no other hashes are created while operating on this one. If this constraint cannot be met, you can use `new` to create a new state object. For example:
```javascript
// Use the cached object, calling the function again will return the same
// object (but reset, so the current state would be lost)
hashState = MurmurHash3();
...
// Create a new object that can be safely used however you wish. Calling the
// function again will simply return a new state object, and no state loss
// will occur, at the cost of creating more objects.
hashState = new MurmurHash3();
```
Both methods can be mixed however you like if you have different use cases.
---
### MurmurHash3.prototype.hash (string)
Incrementally add _string_ to the hash. This can be called as many times as you want for the hash state object, including after a call to `result()`. Returns `this` so calls can be chained.
---
### MurmurHash3.prototype.result ()
Get the result of the hash as a 32-bit positive integer. This performs the tail and finalizer portions of the algorithm, but does not store the result in the state object. This means that it is perfectly safe to get results and then continue adding strings via `hash`.
```javascript
// Do the whole string at once
MurmurHash3('this is a test string').result();
// 0x70529328
// Do part of the string, get a result, then the other part
var m = MurmurHash3('this is a');
m.result();
// 0xbfc4f834
m.hash(' test string').result();
// 0x70529328 (same as above)
```
---
### MurmurHash3.prototype.reset ([seed])
Reset the state object for reuse, optionally using the given _seed_ (defaults to 0 like the constructor). Returns `this` so calls can be chained.
---
License (MIT)
-------------
Copyright (c) 2013 Gary Court, Jens Taylor
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,160 @@
# HTMLMinifier
[![NPM version](https://img.shields.io/npm/v/html-minifier.svg)](https://www.npmjs.com/package/html-minifier)
[![Build Status](https://img.shields.io/travis/kangax/html-minifier.svg)](https://travis-ci.org/kangax/html-minifier)
[![Dependency Status](https://img.shields.io/david/kangax/html-minifier.svg)](https://david-dm.org/kangax/html-minifier)
[HTMLMinifier](https://kangax.github.io/html-minifier/) is a highly **configurable**, **well-tested**, JavaScript-based HTML minifier.
See [corresponding blog post](http://perfectionkills.com/experimenting-with-html-minifier/) for all the gory details of [how it works](http://perfectionkills.com/experimenting-with-html-minifier/#how_it_works), [description of each option](http://perfectionkills.com/experimenting-with-html-minifier/#options), [testing results](http://perfectionkills.com/experimenting-with-html-minifier/#field_testing) and [conclusions](http://perfectionkills.com/experimenting-with-html-minifier/#cost_and_benefits).
[Test suite is available online](https://kangax.github.io/html-minifier/tests/).
Also see corresponding [Ruby wrapper](https://github.com/stereobooster/html_minifier), and for Node.js, [Grunt plugin](https://github.com/gruntjs/grunt-contrib-htmlmin), [Gulp module](https://github.com/jonschlinkert/gulp-htmlmin), [Koa middleware wrapper](https://github.com/koajs/html-minifier) and [Express middleware wrapper](https://github.com/melonmanchan/express-minify-html).
For lint-like capabilities take a look at [HTMLLint](https://github.com/kangax/html-lint).
## Minification comparison
How does HTMLMinifier compare to other solutions — [HTML Minifier from Will Peavy](http://www.willpeavy.com/minifier/) (1st result in [Google search for "html minifier"](https://www.google.com/#q=html+minifier)) as well as [htmlcompressor.com](http://htmlcompressor.com) and [minimize](https://github.com/Swaagie/minimize)?
| Site | Original size *(KB)* | HTMLMinifier | minimize | Will Peavy | htmlcompressor.com |
| ---------------------------------------------------------------------------- |:--------------------:| ------------:| --------:| ----------:| ------------------:|
| [Google](https://www.google.com/) | 46 | **42** | 46 | 48 | 46 |
| [HTMLMinifier](https://github.com/kangax/html-minifier) | 125 | **98** | 111 | 117 | 111 |
| [Twitter](https://twitter.com/) | 207 | **165** | 200 | 224 | 200 |
| [Stack Overflow](https://stackoverflow.com/) | 253 | **195** | 207 | 215 | 204 |
| [Bootstrap CSS](https://getbootstrap.com/docs/3.3/css/) | 271 | **260** | 269 | 228 | 269 |
| [BBC](https://www.bbc.co.uk/) | 298 | **239** | 290 | 291 | 280 |
| [Amazon](https://www.amazon.co.uk/) | 422 | **316** | 412 | 425 | n/a |
| [NBC](https://www.nbc.com/) | 553 | **530** | 552 | 553 | 534 |
| [Wikipedia](https://en.wikipedia.org/wiki/President_of_the_United_States) | 565 | **461** | 548 | 569 | 548 |
| [New York Times](https://www.nytimes.com/) | 678 | **606** | 675 | 670 | n/a |
| [Eloquent Javascript](https://eloquentjavascript.net/1st_edition/print.html) | 870 | **815** | 840 | 864 | n/a |
| [ES6 table](https://kangax.github.io/compat-table/es6/) | 5911 | **5051** | 5595 | n/a | n/a |
| [ES draft](https://tc39.github.io/ecma262/) | 6126 | **5495** | 5664 | n/a | n/a |
## Options Quick Reference
Most of the options are disabled by default.
| Option | Description | Default |
|--------------------------------|-----------------|---------|
| `caseSensitive` | Treat attributes in case sensitive manner (useful for custom HTML tags) | `false` |
| `collapseBooleanAttributes` | [Omit attribute values from boolean attributes](http://perfectionkills.com/experimenting-with-html-minifier/#collapse_boolean_attributes) | `false` |
| `collapseInlineTagWhitespace` | Don't leave any spaces between `display:inline;` elements when collapsing. Must be used in conjunction with `collapseWhitespace=true` | `false` |
| `collapseWhitespace` | [Collapse white space that contributes to text nodes in a document tree](http://perfectionkills.com/experimenting-with-html-minifier/#collapse_whitespace) | `false` |
| `conservativeCollapse` | Always collapse to 1 space (never remove it entirely). Must be used in conjunction with `collapseWhitespace=true` | `false` |
| `continueOnParseError` | [Handle parse errors](https://html.spec.whatwg.org/multipage/parsing.html#parse-errors) instead of aborting. | `false` |
| `customAttrAssign` | Arrays of regex'es that allow to support custom attribute assign expressions (e.g. `'<div flex?="{{mode != cover}}"></div>'`) | `[ ]` |
| `customAttrCollapse` | Regex that specifies custom attribute to strip newlines from (e.g. `/ng-class/`) | |
| `customAttrSurround` | Arrays of regex'es that allow to support custom attribute surround expressions (e.g. `<input {{#if value}}checked="checked"{{/if}}>`) | `[ ]` |
| `customEventAttributes` | Arrays of regex'es that allow to support custom event attributes for `minifyJS` (e.g. `ng-click`) | `[ /^on[a-z]{3,}$/ ]` |
| `decodeEntities` | Use direct Unicode characters whenever possible | `false` |
| `html5` | Parse input according to HTML5 specifications | `true` |
| `ignoreCustomComments` | Array of regex'es that allow to ignore certain comments, when matched | `[ /^!/ ]` |
| `ignoreCustomFragments` | Array of regex'es that allow to ignore certain fragments, when matched (e.g. `<?php ... ?>`, `{{ ... }}`, etc.) | `[ /<%[\s\S]*?%>/, /<\?[\s\S]*?\?>/ ]` |
| `includeAutoGeneratedTags` | Insert tags generated by HTML parser | `true` |
| `keepClosingSlash` | Keep the trailing slash on singleton elements | `false` |
| `maxLineLength` | Specify a maximum line length. Compressed output will be split by newlines at valid HTML split-points |
| `minifyCSS` | Minify CSS in style elements and style attributes (uses [clean-css](https://github.com/jakubpawlowicz/clean-css)) | `false` (could be `true`, `Object`, `Function(text, type)`) |
| `minifyJS` | Minify JavaScript in script elements and event attributes (uses [UglifyJS](https://github.com/mishoo/UglifyJS2)) | `false` (could be `true`, `Object`, `Function(text, inline)`) |
| `minifyURLs` | Minify URLs in various attributes (uses [relateurl](https://github.com/stevenvachon/relateurl)) | `false` (could be `String`, `Object`, `Function(text)`) |
| `preserveLineBreaks` | Always collapse to 1 line break (never remove it entirely) when whitespace between tags include a line break. Must be used in conjunction with `collapseWhitespace=true` | `false` |
| `preventAttributesEscaping` | Prevents the escaping of the values of attributes | `false` |
| `processConditionalComments` | Process contents of conditional comments through minifier | `false` |
| `processScripts` | Array of strings corresponding to types of script elements to process through minifier (e.g. `text/ng-template`, `text/x-handlebars-template`, etc.) | `[ ]` |
| `quoteCharacter` | Type of quote to use for attribute values (' or ") | |
| `removeAttributeQuotes` | [Remove quotes around attributes when possible](http://perfectionkills.com/experimenting-with-html-minifier/#remove_attribute_quotes) | `false` |
| `removeComments` | [Strip HTML comments](http://perfectionkills.com/experimenting-with-html-minifier/#remove_comments) | `false` |
| `removeEmptyAttributes` | [Remove all attributes with whitespace-only values](http://perfectionkills.com/experimenting-with-html-minifier/#remove_empty_or_blank_attributes) | `false` (could be `true`, `Function(attrName, tag)`) |
| `removeEmptyElements` | [Remove all elements with empty contents](http://perfectionkills.com/experimenting-with-html-minifier/#remove_empty_elements) | `false` |
| `removeOptionalTags` | [Remove optional tags](http://perfectionkills.com/experimenting-with-html-minifier/#remove_optional_tags) | `false` |
| `removeRedundantAttributes` | [Remove attributes when value matches default.](http://perfectionkills.com/experimenting-with-html-minifier/#remove_redundant_attributes) | `false` |
| `removeScriptTypeAttributes` | Remove `type="text/javascript"` from `script` tags. Other `type` attribute values are left intact | `false` |
| `removeStyleLinkTypeAttributes`| Remove `type="text/css"` from `style` and `link` tags. Other `type` attribute values are left intact | `false` |
| `removeTagWhitespace` | Remove space between attributes whenever possible. **Note that this will result in invalid HTML!** | `false` |
| `sortAttributes` | [Sort attributes by frequency](#sorting-attributes--style-classes) | `false` |
| `sortClassName` | [Sort style classes by frequency](#sorting-attributes--style-classes) | `false` |
| `trimCustomFragments` | Trim white space around `ignoreCustomFragments`. | `false` |
| `useShortDoctype` | [Replaces the `doctype` with the short (HTML5) doctype](http://perfectionkills.com/experimenting-with-html-minifier/#use_short_doctype) | `false` |
### Sorting attributes / style classes
Minifier options like `sortAttributes` and `sortClassName` won't impact the plain-text size of the output. However, they form long repetitive chains of characters that should improve compression ratio of gzip used in HTTP compression.
## Special cases
### Ignoring chunks of markup
If you have chunks of markup you would like preserved, you can wrap them `<!-- htmlmin:ignore -->`.
### Preserving SVG tags
SVG tags are automatically recognized, and when they are minified, both case-sensitivity and closing-slashes are preserved, regardless of the minification settings used for the rest of the file.
### Working with invalid markup
HTMLMinifier **can't work with invalid or partial chunks of markup**. This is because it parses markup into a tree structure, then modifies it (removing anything that was specified for removal, ignoring anything that was specified to be ignored, etc.), then it creates a markup out of that tree and returns it.
Input markup (e.g. `<p id="">foo`)
Internal representation of markup in a form of tree (e.g. `{ tag: "p", attr: "id", children: ["foo"] }`)
Transformation of internal representation (e.g. removal of `id` attribute)
Output of resulting markup (e.g. `<p>foo</p>`)
HTMLMinifier can't know that original markup was only half of the tree; it does its best to try to parse it as a full tree and it loses information about tree being malformed or partial in the beginning. As a result, it can't create a partial/malformed tree at the time of the output.
## Installation Instructions
From NPM for use as a command line app:
```shell
npm install html-minifier -g
```
From NPM for programmatic use:
```shell
npm install html-minifier
```
From Git:
```shell
git clone git://github.com/kangax/html-minifier.git
cd html-minifier
npm link .
```
## Usage
Note that almost all options are disabled by default. For command line usage please see `html-minifier --help` for a list of available options. Experiment and find what works best for you and your project.
* **Sample command line:** ``html-minifier --collapse-whitespace --remove-comments --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --remove-tag-whitespace --use-short-doctype --minify-css true --minify-js true``
### Node.js
```js
var minify = require('html-minifier').minify;
var result = minify('<p title="blah" id="moo">foo</p>', {
removeAttributeQuotes: true
});
result; // '<p title=blah id=moo>foo</p>'
```
## Running benchmarks
Benchmarks for minified HTML:
```shell
node benchmark.js
```

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"0 1 2 3 4 5 6 7 8 9 O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"DC tB I v J D E F A B C K L G M N EC FC"},D:{"1":"PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"I v J D E F A B C K L G M N O EB FB GB HB IB JB KB LB MB NB OB","66":"0 1 2 3 4 5 6 7 8 9 w g x y z AB BB CB DB"},E:{"1":"A B C K L G 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v J D E F HC zB IC JC KC LC"},F:{"1":"CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"1 2 3 4 5 6 7 8 9 F B C AB BB PC QC RC SC qB AC TC rB","66":"0 G M N O w g x y z"},G:{"1":"bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"E zB UC BC VC WC XC YC ZC aC"},H:{"2":"oC"},I:{"1":"f","2":"tB I pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"2":"A B"},O:{"1":"vC"},P:{"1":"g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C","2":"I"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:6,C:"Proxy object"};

View File

@@ -0,0 +1 @@
{"name":"quick-lru","version":"5.1.1","files":{"license":{"checkedAt":1678883669272,"integrity":"sha512-nIst73auX/5NY2Fmv5Y116vWnNrEv4GaIUX3lpZG05rpXJY2S8EX+fpUS5hRjClCM0VdT2Za9DDHXXB5jdSrEw==","mode":420,"size":1109},"index.js":{"checkedAt":1678883671081,"integrity":"sha512-kSp0pYgN68aYg6faP1Z2GD9Is0ISqJE9Qq86Yp08PGkxlNOzPbXSoyG+dWYsrqCqtwrqloo2ScBVgBnZI65nxw==","mode":420,"size":2073},"package.json":{"checkedAt":1678883671081,"integrity":"sha512-498X2+5bIFtmKFAUnkZikGLfpALhXG4k/g2jaau98W7uoriWZJsgPQzC+XSwGYickRfoN99ktk26lioUO7jUaw==","mode":420,"size":740},"index.d.ts":{"checkedAt":1678883671081,"integrity":"sha512-tw3K/yAphAtiWun23OD62sbfN/t0W1Guil7MoLBY/QXPxTbMHWtOP3Kv/mX3twXNUh2x7I+KT6oGtacCSFtEeg==","mode":420,"size":2062},"readme.md":{"checkedAt":1678883671081,"integrity":"sha512-fiB04g5bZuZCf1rt4Syf2sXRln7yQqX9DWHCYz5YwWgrae+ohIxlKMGhFHucB1WGrYurWbz5245NDDBBWL1R+A==","mode":420,"size":2661}}}

View File

@@ -0,0 +1,13 @@
Copyright (c) 2015, Ilya Radchenko <knownasilya@gmail.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.