new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,206 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = void 0;
|
||||
|
||||
var _parser = _interopRequireDefault(require("./parser"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||
|
||||
var Processor = /*#__PURE__*/function () {
|
||||
function Processor(func, options) {
|
||||
this.func = func || function noop() {};
|
||||
|
||||
this.funcRes = null;
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
var _proto = Processor.prototype;
|
||||
|
||||
_proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) {
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
var merged = Object.assign({}, this.options, options);
|
||||
|
||||
if (merged.updateSelector === false) {
|
||||
return false;
|
||||
} else {
|
||||
return typeof rule !== "string";
|
||||
}
|
||||
};
|
||||
|
||||
_proto._isLossy = function _isLossy(options) {
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
var merged = Object.assign({}, this.options, options);
|
||||
|
||||
if (merged.lossless === false) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
_proto._root = function _root(rule, options) {
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
var parser = new _parser["default"](rule, this._parseOptions(options));
|
||||
return parser.root;
|
||||
};
|
||||
|
||||
_proto._parseOptions = function _parseOptions(options) {
|
||||
return {
|
||||
lossy: this._isLossy(options)
|
||||
};
|
||||
};
|
||||
|
||||
_proto._run = function _run(rule, options) {
|
||||
var _this = this;
|
||||
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
try {
|
||||
var root = _this._root(rule, options);
|
||||
|
||||
Promise.resolve(_this.func(root)).then(function (transform) {
|
||||
var string = undefined;
|
||||
|
||||
if (_this._shouldUpdateSelector(rule, options)) {
|
||||
string = root.toString();
|
||||
rule.selector = string;
|
||||
}
|
||||
|
||||
return {
|
||||
transform: transform,
|
||||
root: root,
|
||||
string: string
|
||||
};
|
||||
}).then(resolve, reject);
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
return;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
_proto._runSync = function _runSync(rule, options) {
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
var root = this._root(rule, options);
|
||||
|
||||
var transform = this.func(root);
|
||||
|
||||
if (transform && typeof transform.then === "function") {
|
||||
throw new Error("Selector processor returned a promise to a synchronous call.");
|
||||
}
|
||||
|
||||
var string = undefined;
|
||||
|
||||
if (options.updateSelector && typeof rule !== "string") {
|
||||
string = root.toString();
|
||||
rule.selector = string;
|
||||
}
|
||||
|
||||
return {
|
||||
transform: transform,
|
||||
root: root,
|
||||
string: string
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Process rule into a selector AST.
|
||||
*
|
||||
* @param rule {postcss.Rule | string} The css selector to be processed
|
||||
* @param options The options for processing
|
||||
* @returns {Promise<parser.Root>} The AST of the selector after processing it.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.ast = function ast(rule, options) {
|
||||
return this._run(rule, options).then(function (result) {
|
||||
return result.root;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Process rule into a selector AST synchronously.
|
||||
*
|
||||
* @param rule {postcss.Rule | string} The css selector to be processed
|
||||
* @param options The options for processing
|
||||
* @returns {parser.Root} The AST of the selector after processing it.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.astSync = function astSync(rule, options) {
|
||||
return this._runSync(rule, options).root;
|
||||
}
|
||||
/**
|
||||
* Process a selector into a transformed value asynchronously
|
||||
*
|
||||
* @param rule {postcss.Rule | string} The css selector to be processed
|
||||
* @param options The options for processing
|
||||
* @returns {Promise<any>} The value returned by the processor.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.transform = function transform(rule, options) {
|
||||
return this._run(rule, options).then(function (result) {
|
||||
return result.transform;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Process a selector into a transformed value synchronously.
|
||||
*
|
||||
* @param rule {postcss.Rule | string} The css selector to be processed
|
||||
* @param options The options for processing
|
||||
* @returns {any} The value returned by the processor.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.transformSync = function transformSync(rule, options) {
|
||||
return this._runSync(rule, options).transform;
|
||||
}
|
||||
/**
|
||||
* Process a selector into a new selector string asynchronously.
|
||||
*
|
||||
* @param rule {postcss.Rule | string} The css selector to be processed
|
||||
* @param options The options for processing
|
||||
* @returns {string} the selector after processing.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.process = function process(rule, options) {
|
||||
return this._run(rule, options).then(function (result) {
|
||||
return result.string || result.root.toString();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Process a selector into a new selector string synchronously.
|
||||
*
|
||||
* @param rule {postcss.Rule | string} The css selector to be processed
|
||||
* @param options The options for processing
|
||||
* @returns {string} the selector after processing.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.processSync = function processSync(rule, options) {
|
||||
var result = this._runSync(rule, options);
|
||||
|
||||
return result.string || result.root.toString();
|
||||
};
|
||||
|
||||
return Processor;
|
||||
}();
|
||||
|
||||
exports["default"] = Processor;
|
||||
module.exports = exports.default;
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"param-case","version":"2.1.1","files":{"LICENSE":{"checkedAt":1678883670323,"integrity":"sha512-bYuXCL+h88+itj+QFSy28mlgwrpU+hGhbBPh1aP4X0EhUWaZAltrdZ4FGydlCbHWlRC2RCQUNOb4+Bs9+lqOYw==","mode":420,"size":1103},"package.json":{"checkedAt":1678883673337,"integrity":"sha512-eMPYYTaw0xl9eSF+9+vbwGWNuN2Wo5amGzKDmTyfkrrsVyYFftm6gZaL1XRA3qeNwcY47YU+3qNaAD72CzgUcQ==","mode":420,"size":1039},"README.md":{"checkedAt":1678883673337,"integrity":"sha512-8E3VGu3tNZ6aajq3iUSmlukvoqVoIzLc8eL04xe57g5ueKU9sFtSsPFzkVUNGmhodaelMqF3Dy0kart1NFM//g==","mode":420,"size":1366},"param-case.js":{"checkedAt":1678883673337,"integrity":"sha512-SE+K1LxI0lsZcbIBVXlUWGgpOfddruey3wdk1dFh7Xv4IVVTypoguGdGiMGdROnlklpM7D67LslzmGwE+wTlBw==","mode":420,"size":225},"param-case.d.ts":{"checkedAt":1678883673337,"integrity":"sha512-ejU5VO7O7QonBggL47uq6h9anToaJs8gPiQOielMXPt5VP6SEvXUjC4GLOtProoqgpAEvY9xShxA8J7pQelcvw==","mode":420,"size":90}}}
|
||||
@@ -0,0 +1,50 @@
|
||||
var isMergeable = require('./is-mergeable');
|
||||
|
||||
var optimizeProperties = require('./properties/optimize');
|
||||
|
||||
var sortSelectors = require('../level-1/sort-selectors');
|
||||
var tidyRules = require('../level-1/tidy-rules');
|
||||
|
||||
var OptimizationLevel = require('../../options/optimization-level').OptimizationLevel;
|
||||
|
||||
var serializeBody = require('../../writer/one-time').body;
|
||||
var serializeRules = require('../../writer/one-time').rules;
|
||||
|
||||
var Token = require('../../tokenizer/token');
|
||||
|
||||
function mergeAdjacent(tokens, context) {
|
||||
var lastToken = [null, [], []];
|
||||
var options = context.options;
|
||||
var adjacentSpace = options.compatibility.selectors.adjacentSpace;
|
||||
var selectorsSortingMethod = options.level[OptimizationLevel.One].selectorsSortingMethod;
|
||||
var mergeablePseudoClasses = options.compatibility.selectors.mergeablePseudoClasses;
|
||||
var mergeablePseudoElements = options.compatibility.selectors.mergeablePseudoElements;
|
||||
var mergeLimit = options.compatibility.selectors.mergeLimit;
|
||||
var multiplePseudoMerging = options.compatibility.selectors.multiplePseudoMerging;
|
||||
|
||||
for (var i = 0, l = tokens.length; i < l; i++) {
|
||||
var token = tokens[i];
|
||||
|
||||
if (token[0] != Token.RULE) {
|
||||
lastToken = [null, [], []];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (lastToken[0] == Token.RULE && serializeRules(token[1]) == serializeRules(lastToken[1])) {
|
||||
Array.prototype.push.apply(lastToken[2], token[2]);
|
||||
optimizeProperties(lastToken[2], true, true, context);
|
||||
token[2] = [];
|
||||
} else if (lastToken[0] == Token.RULE && serializeBody(token[2]) == serializeBody(lastToken[2]) &&
|
||||
isMergeable(serializeRules(token[1]), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) &&
|
||||
isMergeable(serializeRules(lastToken[1]), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) &&
|
||||
lastToken[1].length < mergeLimit) {
|
||||
lastToken[1] = tidyRules(lastToken[1].concat(token[1]), false, adjacentSpace, false, context.warnings);
|
||||
lastToken[1] = lastToken.length > 1 ? sortSelectors(lastToken[1], selectorsSortingMethod) : lastToken[1];
|
||||
token[2] = [];
|
||||
} else {
|
||||
lastToken = token;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = mergeAdjacent;
|
||||
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ignoreElements = void 0;
|
||||
var lift_1 = require("../util/lift");
|
||||
var OperatorSubscriber_1 = require("./OperatorSubscriber");
|
||||
var noop_1 = require("../util/noop");
|
||||
function ignoreElements() {
|
||||
return lift_1.operate(function (source, subscriber) {
|
||||
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, noop_1.noop));
|
||||
});
|
||||
}
|
||||
exports.ignoreElements = ignoreElements;
|
||||
//# sourceMappingURL=ignoreElements.js.map
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"A B","2":"J D E F 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 J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"DC tB I v EC FC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"I v J D"},E:{"1":"J D E F A B C K L G JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v HC zB IC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e qB AC TC rB","2":"F PC QC RC SC"},G:{"1":"E YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"zB UC BC VC WC","132":"XC"},H:{"1":"oC"},I:{"1":"f tC uC","2":"tB I pC qC rC sC BC"},J:{"1":"D A"},K:{"1":"B C h qB AC rB","2":"A"},L:{"1":"H"},M:{"1":"H"},N:{"1":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:1,C:"progress element"};
|
||||
@@ -0,0 +1,79 @@
|
||||
import { __read, __spreadArray } from "tslib";
|
||||
import { isScheduler } from '../util/isScheduler';
|
||||
import { Observable } from '../Observable';
|
||||
import { subscribeOn } from '../operators/subscribeOn';
|
||||
import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';
|
||||
import { observeOn } from '../operators/observeOn';
|
||||
import { AsyncSubject } from '../AsyncSubject';
|
||||
export function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) {
|
||||
if (resultSelector) {
|
||||
if (isScheduler(resultSelector)) {
|
||||
scheduler = resultSelector;
|
||||
}
|
||||
else {
|
||||
return function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler)
|
||||
.apply(this, args)
|
||||
.pipe(mapOneOrManyArgs(resultSelector));
|
||||
};
|
||||
}
|
||||
}
|
||||
if (scheduler) {
|
||||
return function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
return bindCallbackInternals(isNodeStyle, callbackFunc)
|
||||
.apply(this, args)
|
||||
.pipe(subscribeOn(scheduler), observeOn(scheduler));
|
||||
};
|
||||
}
|
||||
return function () {
|
||||
var _this = this;
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var subject = new AsyncSubject();
|
||||
var uninitialized = true;
|
||||
return new Observable(function (subscriber) {
|
||||
var subs = subject.subscribe(subscriber);
|
||||
if (uninitialized) {
|
||||
uninitialized = false;
|
||||
var isAsync_1 = false;
|
||||
var isComplete_1 = false;
|
||||
callbackFunc.apply(_this, __spreadArray(__spreadArray([], __read(args)), [
|
||||
function () {
|
||||
var results = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
results[_i] = arguments[_i];
|
||||
}
|
||||
if (isNodeStyle) {
|
||||
var err = results.shift();
|
||||
if (err != null) {
|
||||
subject.error(err);
|
||||
return;
|
||||
}
|
||||
}
|
||||
subject.next(1 < results.length ? results : results[0]);
|
||||
isComplete_1 = true;
|
||||
if (isAsync_1) {
|
||||
subject.complete();
|
||||
}
|
||||
},
|
||||
]));
|
||||
if (isComplete_1) {
|
||||
subject.complete();
|
||||
}
|
||||
isAsync_1 = true;
|
||||
}
|
||||
return subs;
|
||||
});
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=bindCallbackInternals.js.map
|
||||
@@ -0,0 +1,5 @@
|
||||
import { map } from './map';
|
||||
export function mapTo(value) {
|
||||
return map(() => value);
|
||||
}
|
||||
//# sourceMappingURL=mapTo.js.map
|
||||
@@ -0,0 +1,95 @@
|
||||
#! /usr/bin/env node
|
||||
/* eslint-disable no-console, no-var */
|
||||
// Util script for debugging source code generation issues
|
||||
|
||||
var script = process.argv[2].replace(/\\n/g, '\n'),
|
||||
verbose = process.argv[3] === '-v';
|
||||
|
||||
var Handlebars = require('./lib'),
|
||||
SourceMap = require('source-map'),
|
||||
SourceMapConsumer = SourceMap.SourceMapConsumer;
|
||||
|
||||
var template = Handlebars.precompile(script, {
|
||||
srcName: 'input.hbs',
|
||||
destName: 'output.js',
|
||||
|
||||
assumeObjects: true,
|
||||
compat: false,
|
||||
strict: true,
|
||||
trackIds: true,
|
||||
knownHelpersOnly: false
|
||||
});
|
||||
|
||||
if (!verbose) {
|
||||
console.log(template);
|
||||
} else {
|
||||
var consumer = new SourceMapConsumer(template.map),
|
||||
lines = template.code.split('\n'),
|
||||
srcLines = script.split('\n');
|
||||
|
||||
console.log();
|
||||
console.log('Source:');
|
||||
srcLines.forEach(function(source, index) {
|
||||
console.log(index + 1, source);
|
||||
});
|
||||
console.log();
|
||||
console.log('Generated:');
|
||||
console.log(template.code);
|
||||
lines.forEach(function(source, index) {
|
||||
console.log(index + 1, source);
|
||||
});
|
||||
console.log();
|
||||
console.log('Map:');
|
||||
console.log(template.map);
|
||||
console.log();
|
||||
|
||||
function collectSource(lines, lineName, colName, order) {
|
||||
var ret = {},
|
||||
ordered = [],
|
||||
last;
|
||||
|
||||
function collect(current) {
|
||||
if (last) {
|
||||
var mapLines = lines.slice(last[lineName] - 1, current && current[lineName]);
|
||||
if (mapLines.length) {
|
||||
if (current) {
|
||||
mapLines[mapLines.length - 1] = mapLines[mapLines.length - 1].slice(0, current[colName]);
|
||||
}
|
||||
mapLines[0] = mapLines[0].slice(last[colName]);
|
||||
}
|
||||
ret[last[lineName] + ':' + last[colName]] = mapLines.join('\n');
|
||||
ordered.push({
|
||||
startLine: last[lineName],
|
||||
startCol: last[colName],
|
||||
endLine: current && current[lineName]
|
||||
});
|
||||
}
|
||||
last = current;
|
||||
}
|
||||
|
||||
consumer.eachMapping(collect, undefined, order);
|
||||
collect();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
srcLines = collectSource(srcLines, 'originalLine', 'originalColumn', SourceMapConsumer.ORIGINAL_ORDER);
|
||||
lines = collectSource(lines, 'generatedLine', 'generatedColumn');
|
||||
|
||||
consumer.eachMapping(function(mapping) {
|
||||
var originalSrc = srcLines[mapping.originalLine + ':' + mapping.originalColumn],
|
||||
generatedSrc = lines[mapping.generatedLine + ':' + mapping.generatedColumn];
|
||||
|
||||
if (!mapping.originalLine) {
|
||||
console.log('generated', mapping.generatedLine + ':' + mapping.generatedColumn, generatedSrc);
|
||||
} else {
|
||||
console.log('map',
|
||||
mapping.source,
|
||||
mapping.originalLine + ':' + mapping.originalColumn,
|
||||
originalSrc,
|
||||
'->',
|
||||
mapping.generatedLine + ':' + mapping.generatedColumn,
|
||||
generatedSrc);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0.00403,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.00403,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0.00403,"94":0,"95":0.00403,"96":0,"97":0,"98":0,"99":0.00807,"100":0,"101":0,"102":0.0121,"103":0.00403,"104":0.02017,"105":0.03226,"106":0.04033,"107":0.02017,"108":0.0605,"109":0.40733,"110":0.16939,"111":0.00403,"112":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0.00403,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0.00403,"70":0.00403,"71":0.00403,"72":0,"73":0,"74":0.0121,"75":0.00403,"76":0,"77":0.00403,"78":0.00403,"79":0.0121,"80":0.0121,"81":0.00807,"83":0.00403,"84":0,"85":0.00807,"86":0.00807,"87":0.0121,"88":0.00807,"89":0.00403,"90":0.00403,"91":0.00403,"92":0.02823,"93":0.00403,"94":0.00403,"95":0.0121,"96":0.01613,"97":0.00807,"98":0.0121,"99":0.00807,"100":0.02823,"101":0.00807,"102":0.01613,"103":0.07259,"104":0.02017,"105":0.14519,"106":0.05646,"107":0.08469,"108":0.25005,"109":6.93273,"110":3.08121,"111":0.00403,"112":0.00403,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0.00403,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0.00403,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0.00403,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0.0242,"94":0.30248,"95":0.27424,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0.00403,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0.00403,"79":0,"80":0,"81":0,"83":0,"84":0.00403,"85":0,"86":0,"87":0,"88":0.00403,"89":0.00403,"90":0,"91":0,"92":0.0121,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0.00403,"100":0.00403,"101":0.00403,"102":0,"103":0,"104":0,"105":0.00807,"106":0.00403,"107":0.0363,"108":0.04436,"109":0.7824,"110":0.72594},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0.00403,"14":0.02823,"15":0.02017,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0.00403,"13.1":0.0363,"14.1":0.08066,"15.1":0.0242,"15.2-15.3":0.02823,"15.4":0.02017,"15.5":0.04436,"15.6":0.19762,"16.0":0.05646,"16.1":0.11292,"16.2":0.15325,"16.3":0.12502,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0,"6.0-6.1":0.01397,"7.0-7.1":0.01048,"8.1-8.4":0,"9.0-9.2":0.00349,"9.3":0.05938,"10.0-10.2":0,"10.3":0.05938,"11.0-11.2":0.01397,"11.3-11.4":0.02096,"12.0-12.1":0.01048,"12.2-12.5":0.82785,"13.0-13.1":0.03842,"13.2":0.00349,"13.3":0.05589,"13.4-13.7":0.15719,"14.0-14.4":0.6532,"14.5-14.8":1.10729,"15.0-15.1":0.45759,"15.2-15.3":0.4506,"15.4":0.69162,"15.5":0.97456,"15.6":2.25301,"16.0":6.01851,"16.1":6.75554,"16.2":7.51353,"16.3":3.84933,"16.4":0.01048},P:{"4":0.25401,"20":1.00588,"5.0-5.4":0.02032,"6.2-6.4":0.01016,"7.2-7.4":0.13209,"8.2":0,"9.2":0.03048,"10.1":0,"11.1-11.2":0.03048,"12.0":0.01016,"13.0":0.08128,"14.0":0.0508,"15.0":0.06096,"16.0":0.13209,"17.0":0.13209,"18.0":0.12192,"19.0":2.33689},I:{"0":0,"3":0,"4":0.01296,"2.1":0,"2.2":0,"2.3":0,"4.1":0.00778,"4.2-4.3":0.01037,"4.4":0,"4.4.3-4.4.4":0.07519},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0.00807,"9":0,"10":0.00403,"11":0.0242,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.17901},H:{"0":0.16383},L:{"0":45.75933},R:{_:"0"},M:{"0":0.17901},Q:{"13.1":0}};
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H","2":"C K L G M N O"},C:{"1":"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 2 3 4 5 6 7 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":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"0 1 2 3 4 I v J D E F A B C K L G M N O w g x y z","194":"5 6 7 8 9 AB BB CB DB EB FB GB"},E:{"2":"I v J D HC zB IC JC","260":"E F A B C K L G KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"1":"5 6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"0 1 2 3 4 F B C G M N O w g x y z PC QC RC SC qB AC TC rB"},G:{"2":"zB UC BC VC WC XC","260":"E YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"1":"f","2":"tB I pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"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:4,C:"Blending of HTML/SVG elements"};
|
||||
@@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function isFullyPopulatedPropertyDescriptor(ES, Desc) {
|
||||
return !!Desc
|
||||
&& typeof Desc === 'object'
|
||||
&& '[[Enumerable]]' in Desc
|
||||
&& '[[Configurable]]' in Desc
|
||||
&& (ES.IsAccessorDescriptor(Desc) || ES.IsDataDescriptor(Desc));
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "localforage",
|
||||
"description": "Offline storage, improved. Wraps IndexedDB, WebSQL, or localStorage using a simple but powerful API.",
|
||||
"repository": {
|
||||
"url": "https://github.com/mozilla/localForage",
|
||||
"license": "Apache 2.0",
|
||||
"tests": "https://travis-ci.org/mozilla/localForage"
|
||||
},
|
||||
"participate": {
|
||||
"home": "https://github.com/mozilla/localForage",
|
||||
"docs": "http://mozilla.github.io/localForage",
|
||||
"irc": "irc://irc.mozilla.org/#apps",
|
||||
"irc-contacts": [
|
||||
"tofumatt"
|
||||
]
|
||||
},
|
||||
"bugs": {
|
||||
"list": "https://github.com/mozilla/localForage/issues",
|
||||
"report": "https://github.com/mozilla/localForage/issues/new",
|
||||
"goodfirstbug": "https://github.com/mozilla/localForage/labels/help%20wanted"
|
||||
|
||||
},
|
||||
"keywords": [
|
||||
"javascript",
|
||||
"indexeddb",
|
||||
"localstorage",
|
||||
"offline",
|
||||
"storage",
|
||||
"websql"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
|
||||
var assert = require("chai").assert
|
||||
, isValue = require("../../value/is");
|
||||
|
||||
describe("value/is", function () {
|
||||
it("Should return true on object", function () { assert.equal(isValue({}), true); });
|
||||
it("Should return true on function", function () {
|
||||
assert.equal(isValue(function () { return true; }), true);
|
||||
});
|
||||
it("Should return true on array", function () { assert.equal(isValue([]), true); });
|
||||
if (typeof Object.create === "function") {
|
||||
it("Should return true on object with no prototype", function () {
|
||||
assert.equal(isValue(Object.create(null)), true);
|
||||
});
|
||||
}
|
||||
it("Should return true on string", function () { assert.equal(isValue("foo"), true); });
|
||||
it("Should return true on empty string", function () { assert.equal(isValue(""), true); });
|
||||
it("Should return true on number", function () { assert.equal(isValue(123), true); });
|
||||
it("Should return true on NaN", function () { assert.equal(isValue(NaN), true); });
|
||||
it("Should return true on boolean", function () { assert.equal(isValue(false), true); });
|
||||
if (typeof Symbol === "function") {
|
||||
// eslint-disable-next-line no-undef
|
||||
it("Should return true on symbol", function () { assert.equal(isValue(Symbol()), true); });
|
||||
}
|
||||
|
||||
it("Should return false on null", function () { assert.equal(isValue(null), false); });
|
||||
it("Should return false on undefined", function () { assert.equal(isValue(void 0), false); });
|
||||
});
|
||||
@@ -0,0 +1,22 @@
|
||||
Copyright (c) 2010-2018 Juriy "kangax" Zaytsev
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"forkJoin.js","sourceRoot":"","sources":["../../../../src/internal/observable/forkJoin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AA2IpD,MAAM,UAAU,QAAQ;IAAC,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IACrC,IAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACzC,IAAA,KAA0B,oBAAoB,CAAC,IAAI,CAAC,EAA5C,OAAO,UAAA,EAAE,IAAI,UAA+B,CAAC;IAC3D,IAAM,MAAM,GAAG,IAAI,UAAU,CAAC,UAAC,UAAU;QAC/B,IAAA,MAAM,GAAK,OAAO,OAAZ,CAAa;QAC3B,IAAI,CAAC,MAAM,EAAE;YACX,UAAU,CAAC,QAAQ,EAAE,CAAC;YACtB,OAAO;SACR;QACD,IAAM,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;QACjC,IAAI,oBAAoB,GAAG,MAAM,CAAC;QAClC,IAAI,kBAAkB,GAAG,MAAM,CAAC;gCACvB,WAAW;YAClB,IAAI,QAAQ,GAAG,KAAK,CAAC;YACrB,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CACvC,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;gBACJ,IAAI,CAAC,QAAQ,EAAE;oBACb,QAAQ,GAAG,IAAI,CAAC;oBAChB,kBAAkB,EAAE,CAAC;iBACtB;gBACD,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;YAC9B,CAAC,EACD,cAAM,OAAA,oBAAoB,EAAE,EAAtB,CAAsB,EAC5B,SAAS,EACT;gBACE,IAAI,CAAC,oBAAoB,IAAI,CAAC,QAAQ,EAAE;oBACtC,IAAI,CAAC,kBAAkB,EAAE;wBACvB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;qBAC7D;oBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;YACH,CAAC,CACF,CACF,CAAC;;QAvBJ,KAAK,IAAI,WAAW,GAAG,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE,WAAW,EAAE;oBAApD,WAAW;SAwBnB;IACH,CAAC,CAAC,CAAC;IACH,OAAO,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACjF,CAAC"}
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"name": "cacheable-lookup",
|
||||
"version": "7.0.0",
|
||||
"description": "A cacheable dns.lookup(…) that respects TTL",
|
||||
"engines": {
|
||||
"node": ">=14.16"
|
||||
},
|
||||
"files": [
|
||||
"source",
|
||||
"index.d.ts"
|
||||
],
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"types": "./index.d.ts",
|
||||
"default": "./source/index.js"
|
||||
},
|
||||
"scripts": {
|
||||
"//test": "xo && nyc --reporter=lcovonly --reporter=text ava && tsd",
|
||||
"test": "tsd"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/szmarczak/cacheable-lookup.git"
|
||||
},
|
||||
"keywords": [
|
||||
"dns",
|
||||
"lookup",
|
||||
"cacheable",
|
||||
"ttl"
|
||||
],
|
||||
"author": "Szymon Marczak",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/szmarczak/cacheable-lookup/issues"
|
||||
},
|
||||
"homepage": "https://github.com/szmarczak/cacheable-lookup#readme",
|
||||
"devDependencies": {
|
||||
"@types/keyv": "^3.1.1",
|
||||
"ava": "^4.3.3",
|
||||
"benchmark": "^2.1.4",
|
||||
"coveralls": "^3.0.9",
|
||||
"keyv": "^4.0.0",
|
||||
"nyc": "^15.0.0",
|
||||
"quibble": "^0.6.14",
|
||||
"quick-lru": "^5.1.0",
|
||||
"tsd": "^0.11.0",
|
||||
"xo": "^0.25.3"
|
||||
},
|
||||
"ava": {
|
||||
"nodeArguments": [
|
||||
"--loader=quibble"
|
||||
]
|
||||
},
|
||||
"xo": {
|
||||
"rules": {
|
||||
"unicorn/import-index": "off",
|
||||
"import/extensions": "off",
|
||||
"import/no-useless-path-segments": "off"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"tap.js","sourceRoot":"","sources":["../../../../src/internal/operators/tap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAoG5C,MAAM,UAAU,GAAG,CACjB,cAAsE,EACtE,KAAiC,EACjC,QAA8B;IAK9B,MAAM,WAAW,GACf,UAAU,CAAC,cAAc,CAAC,IAAI,KAAK,IAAI,QAAQ;QAC7C,CAAC;YACE,EAAE,IAAI,EAAE,cAAyE,EAAE,KAAK,EAAE,QAAQ,EAA8B;QACnI,CAAC,CAAC,cAAc,CAAC;IAErB,OAAO,WAAW;QAChB,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;;YAC7B,MAAA,WAAW,CAAC,SAAS,+CAArB,WAAW,CAAc,CAAC;YAC1B,IAAI,OAAO,GAAG,IAAI,CAAC;YACnB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;;gBACR,MAAA,WAAW,CAAC,IAAI,+CAAhB,WAAW,EAAQ,KAAK,CAAC,CAAC;gBAC1B,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC,EACD,GAAG,EAAE;;gBACH,OAAO,GAAG,KAAK,CAAC;gBAChB,MAAA,WAAW,CAAC,QAAQ,+CAApB,WAAW,CAAa,CAAC;gBACzB,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,EACD,CAAC,GAAG,EAAE,EAAE;;gBACN,OAAO,GAAG,KAAK,CAAC;gBAChB,MAAA,WAAW,CAAC,KAAK,+CAAjB,WAAW,EAAS,GAAG,CAAC,CAAC;gBACzB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACxB,CAAC,EACD,GAAG,EAAE;;gBACH,IAAI,OAAO,EAAE;oBACX,MAAA,WAAW,CAAC,WAAW,+CAAvB,WAAW,CAAgB,CAAC;iBAC7B;gBACD,MAAA,WAAW,CAAC,QAAQ,+CAApB,WAAW,CAAa,CAAC;YAC3B,CAAC,CACF,CACF,CAAC;QACJ,CAAC,CAAC;QACJ,CAAC;YAGC,QAAQ,CAAC;AACf,CAAC"}
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "ssf",
|
||||
"version": "0.11.2",
|
||||
"author": "sheetjs",
|
||||
"description": "Format data using ECMA-376 spreadsheet Format Codes",
|
||||
"keywords": [
|
||||
"format",
|
||||
"sprintf",
|
||||
"spreadsheet"
|
||||
],
|
||||
"main": "./ssf",
|
||||
"types": "types",
|
||||
"dependencies": {
|
||||
"frac":"~1.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sheetjs/uglify-js":"~2.7.3",
|
||||
"@types/node":"^8.0.7",
|
||||
"blanket": "~1.2.3",
|
||||
"dtslint": "^0.1.2",
|
||||
"mocha": "~2.5.3",
|
||||
"typescript": "2.2.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/SheetJS/ssf.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "make test",
|
||||
"build": "make",
|
||||
"lint": "make fullint",
|
||||
"dtslint": "dtslint types"
|
||||
},
|
||||
"config": {
|
||||
"blanket": {
|
||||
"pattern": "ssf.js"
|
||||
}
|
||||
},
|
||||
"alex": {
|
||||
"allow": [
|
||||
"special",
|
||||
"simple",
|
||||
"just",
|
||||
"crash",
|
||||
"wtf",
|
||||
"holes"
|
||||
]
|
||||
},
|
||||
"homepage": "http://sheetjs.com/",
|
||||
"bugs": {
|
||||
"url": "https://github.com/SheetJS/ssf/issues"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
var toShortString = require("../to-short-string-representation")
|
||||
, isArray = require("./is-array-like");
|
||||
|
||||
module.exports = function (value) {
|
||||
if (isArray(value)) return value;
|
||||
throw new TypeError(toShortString(value) + " is not a array");
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
'use strict'
|
||||
|
||||
const file = require('./file')
|
||||
const link = require('./link')
|
||||
const symlink = require('./symlink')
|
||||
|
||||
module.exports = {
|
||||
// file
|
||||
createFile: file.createFile,
|
||||
createFileSync: file.createFileSync,
|
||||
ensureFile: file.createFile,
|
||||
ensureFileSync: file.createFileSync,
|
||||
// link
|
||||
createLink: link.createLink,
|
||||
createLinkSync: link.createLinkSync,
|
||||
ensureLink: link.createLink,
|
||||
ensureLinkSync: link.createLinkSync,
|
||||
// symlink
|
||||
createSymlink: symlink.createSymlink,
|
||||
createSymlinkSync: symlink.createSymlinkSync,
|
||||
ensureSymlink: symlink.createSymlink,
|
||||
ensureSymlinkSync: symlink.createSymlinkSync
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 David Clark
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = getProp;
|
||||
|
||||
function getProp(obj) {
|
||||
for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
props[_key - 1] = arguments[_key];
|
||||
}
|
||||
|
||||
while (props.length > 0) {
|
||||
var prop = props.shift();
|
||||
|
||||
if (!obj[prop]) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
obj = obj[prop];
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
/*
|
||||
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
||||
Copyrights licensed under the New BSD License.
|
||||
See the accompanying LICENSE file for terms.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var core_1 = require("./src/core");
|
||||
(0, tslib_1.__exportStar)(require("./src/formatters"), exports);
|
||||
(0, tslib_1.__exportStar)(require("./src/core"), exports);
|
||||
(0, tslib_1.__exportStar)(require("./src/error"), exports);
|
||||
exports.default = core_1.IntlMessageFormat;
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"ci-info","version":"3.8.0","files":{"package.json":{"checkedAt":1678883671410,"integrity":"sha512-0BsxFnbP0z4LCfptHverQ6M3AqRtN8uu55Z98kDKYboktGKh7RIQKq6qkS/tLIgTQw+/aAQ9WyDENNYX+/eiOQ==","mode":420,"size":1023},"vendors.json":{"checkedAt":1678883671410,"integrity":"sha512-4GEtHZjvrzYK8rEtYjgiNi3prAvy/9hHOdtMBmiLOSGkgEJ/w8odeJDsDNR6IVYnNrNcXBxAscTc7UjVEQLfBg==","mode":420,"size":5697},"LICENSE":{"checkedAt":1678883671410,"integrity":"sha512-fQkiiKtuUXeH8k2Jk2nzVruxTKGD7qHBDEUxuaGWCgFyPViRDMQTot/3c1XawXYZUPu+uBAwh1qn51vZJH8+Xw==","mode":420,"size":1091},"index.js":{"checkedAt":1678883671410,"integrity":"sha512-jdUCDX836APMhLvVAL7NFRWohpAlTCNJQ0PZ9xqlP+qxpCxjG5OHb7CBbueqHLNJmj3Jkn+PtvASU9Vt8zO2Rw==","mode":420,"size":2368},"CHANGELOG.md":{"checkedAt":1678883671429,"integrity":"sha512-Evq8r0FJAEtW/E1Jlkq//Iy9lhg2pOzxdvp8qQ85mp5W+G9piWqQvz4PmtnyRvbOsTI70RYn/z3qQ89DZWuCpQ==","mode":420,"size":4975},"index.d.ts":{"checkedAt":1678883671429,"integrity":"sha512-f+XTQOdpcw9LBhykjKkHykCvXPcaTJadjWJHoEa/W/HVdhJyGoLgU5vIH5P2ljcM4lldjmFGc5SDx4xZTt8ZXg==","mode":420,"size":2615},"README.md":{"checkedAt":1678883671429,"integrity":"sha512-4/hbJy7a/9rUaaaA9s65klgpphNgJZZMWM1mc9wfCR1WTS8nPCpsE5N9q15DLNYRamnckEconAnTgWDfWAEthA==","mode":420,"size":8012}}}
|
||||
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var NumberBitwiseOp = require('../NumberBitwiseOp');
|
||||
var Type = require('../Type');
|
||||
|
||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseXOR
|
||||
|
||||
module.exports = function NumberBitwiseXOR(x, y) {
|
||||
if (Type(x) !== 'Number' || Type(y) !== 'Number') {
|
||||
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
|
||||
}
|
||||
return NumberBitwiseOp('^', x, y);
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
var isArray = Array.isArray, getPrototypeOf = Object.getPrototypeOf;
|
||||
|
||||
module.exports = function (obj) {
|
||||
var proto;
|
||||
if (!obj || !isArray(obj)) return false;
|
||||
proto = getPrototypeOf(obj);
|
||||
if (!isArray(proto)) return false;
|
||||
return !isArray(getPrototypeOf(proto));
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
require('../auto');
|
||||
|
||||
var test = require('tape');
|
||||
var supportsDescriptors = require('define-properties').supportsDescriptors;
|
||||
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
||||
|
||||
var runTests = require('./tests');
|
||||
|
||||
test('shimmed', function (t) {
|
||||
t.test('enumerability', { skip: !supportsDescriptors }, function (et) {
|
||||
et.equal(false, isEnumerable.call(Function.prototype, 'name'), 'Function#name is not enumerable');
|
||||
et.equal(false, isEnumerable.call(function foo() {}, 'name'), 'a function’s name is not enumerable');
|
||||
et.end();
|
||||
});
|
||||
|
||||
runTests(function (fn) { return fn.name; }, t);
|
||||
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1,65 @@
|
||||
type MapKey<BaseType> = BaseType extends Map<infer KeyType, unknown> ? KeyType : never;
|
||||
type MapValue<BaseType> = BaseType extends Map<unknown, infer ValueType> ? ValueType : never;
|
||||
|
||||
export type ArrayEntry<BaseType extends readonly unknown[]> = [number, BaseType[number]];
|
||||
export type MapEntry<BaseType> = [MapKey<BaseType>, MapValue<BaseType>];
|
||||
export type ObjectEntry<BaseType> = [keyof BaseType, BaseType[keyof BaseType]];
|
||||
export type SetEntry<BaseType> = BaseType extends Set<infer ItemType> ? [ItemType, ItemType] : never;
|
||||
|
||||
/**
|
||||
Many collections have an `entries` method which returns an array of a given object's own enumerable string-keyed property [key, value] pairs. The `Entry` type will return the type of that collection's entry.
|
||||
|
||||
For example the {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries|`Object`}, {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/entries|`Map`}, {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries|`Array`}, and {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/entries|`Set`} collections all have this method. Note that `WeakMap` and `WeakSet` do not have this method since their entries are not enumerable.
|
||||
|
||||
@see `Entries` if you want to just access the type of the array of entries (which is the return of the `.entries()` method).
|
||||
|
||||
@example
|
||||
```
|
||||
import type {Entry} from 'type-fest';
|
||||
|
||||
interface Example {
|
||||
someKey: number;
|
||||
}
|
||||
|
||||
const manipulatesEntry = (example: Entry<Example>) => [
|
||||
// Does some arbitrary processing on the key (with type information available)
|
||||
example[0].toUpperCase(),
|
||||
|
||||
// Does some arbitrary processing on the value (with type information available)
|
||||
example[1].toFixed(),
|
||||
];
|
||||
|
||||
const example: Example = {someKey: 1};
|
||||
const entry = Object.entries(example)[0] as Entry<Example>;
|
||||
const output = manipulatesEntry(entry);
|
||||
|
||||
// Objects
|
||||
const objectExample = {a: 1};
|
||||
const objectEntry: Entry<typeof objectExample> = ['a', 1];
|
||||
|
||||
// Arrays
|
||||
const arrayExample = ['a', 1];
|
||||
const arrayEntryString: Entry<typeof arrayExample> = [0, 'a'];
|
||||
const arrayEntryNumber: Entry<typeof arrayExample> = [1, 1];
|
||||
|
||||
// Maps
|
||||
const mapExample = new Map([['a', 1]]);
|
||||
const mapEntry: Entry<typeof mapExample> = ['a', 1];
|
||||
|
||||
// Sets
|
||||
const setExample = new Set(['a', 1]);
|
||||
const setEntryString: Entry<typeof setExample> = ['a', 'a'];
|
||||
const setEntryNumber: Entry<typeof setExample> = [1, 1];
|
||||
```
|
||||
|
||||
@category Object
|
||||
@category Map
|
||||
@category Array
|
||||
@category Set
|
||||
*/
|
||||
export type Entry<BaseType> =
|
||||
BaseType extends Map<unknown, unknown> ? MapEntry<BaseType>
|
||||
: BaseType extends Set<unknown> ? SetEntry<BaseType>
|
||||
: BaseType extends readonly unknown[] ? ArrayEntry<BaseType>
|
||||
: BaseType extends object ? ObjectEntry<BaseType>
|
||||
: never;
|
||||
@@ -0,0 +1,178 @@
|
||||
<div align="center">
|
||||
<img src="https://github.com/terkelg/globrex/raw/master/globrex.png" alt="globrex" width="500" />
|
||||
</div>
|
||||
|
||||
<h1 align="center">globrex</h1>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://npmjs.org/package/globrex">
|
||||
<img src="https://img.shields.io/npm/v/globrex.svg" alt="version" />
|
||||
</a>
|
||||
<a href="https://travis-ci.org/terkelg/globrex">
|
||||
<img src="https://img.shields.io/travis/terkelg/globrex.svg" alt="travis" />
|
||||
</a>
|
||||
<a href="https://ci.appveyor.com/project/terkelg/globrex">
|
||||
<img src="https://ci.appveyor.com/api/projects/status/ecbnb3whibj5iqcj?svg=true" alt="appveyor" />
|
||||
</a>
|
||||
<a href="https://npmjs.org/package/globrex">
|
||||
<img src="https://img.shields.io/npm/dm/globrex.svg" alt="downloads" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div align="center">Simple but powerful glob to regular expression compiler.</div>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
npm install globrex --save
|
||||
```
|
||||
|
||||
|
||||
## Core Features
|
||||
|
||||
- 💪 **extended globbing:** transform advance `ExtGlob` features
|
||||
- 📦 **simple**: no dependencies
|
||||
- 🛣️ **paths**: split paths into multiple `RegExp` segments
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const globrex = require('globrex');
|
||||
|
||||
const result = globrex('p*uck')
|
||||
// => { regex: /^p.*uck$/, string: '^p.*uck$', segments: [ /^p.*uck$/ ] }
|
||||
|
||||
result.regex.test('pluck'); // true
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### globrex(glob, options)
|
||||
|
||||
Type: `function`<br>
|
||||
Returns: `Object`
|
||||
|
||||
Transform globs intp regular expressions.
|
||||
Returns object with the following properties:
|
||||
|
||||
|
||||
#### regex
|
||||
|
||||
Type: `RegExp`
|
||||
|
||||
JavaScript `RegExp` instance.
|
||||
|
||||
> **Note**: Read more about how to use [RegExp](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) on MDN.
|
||||
|
||||
|
||||
#### path
|
||||
|
||||
This property only exists if the option `filepath` is true.
|
||||
|
||||
> **Note:** `filepath` is `false` by default
|
||||
|
||||
#### path.segments
|
||||
|
||||
Type: `Array`
|
||||
|
||||
Array of `RegExp` instances seperated by `/`.
|
||||
This can be usable when working with file paths or urls.
|
||||
|
||||
Example array could be:
|
||||
```js
|
||||
[ /^foo$/, /^bar$/, /^([^\/]*)$/, '^baz\\.(md|js|txt)$' ]
|
||||
```
|
||||
|
||||
|
||||
#### path.regex
|
||||
|
||||
Type: `RegExp`
|
||||
|
||||
JavaScript `RegExp` instance build for testign against paths.
|
||||
The regex have different path seperators depending on host OS.
|
||||
|
||||
|
||||
### glob
|
||||
|
||||
Type: `String`
|
||||
|
||||
Glob string to transform.
|
||||
|
||||
|
||||
### options.extended
|
||||
|
||||
Type: `Boolean`<br>
|
||||
Default: `false`
|
||||
|
||||
Enable all advanced features from `extglob`.
|
||||
|
||||
Matching so called "extended" globs pattern like single character matching, matching ranges of characters, group matching, etc.
|
||||
|
||||
> **Note**: Interprets `[a-d]` as `[abcd]`. To match a literal `-`, include it as first or last character.
|
||||
|
||||
|
||||
### options.globstar
|
||||
|
||||
Type: `Boolean`<br>
|
||||
Default: `false`
|
||||
|
||||
When globstar is `false` globs like `'/foo/*'` are transformed to the following
|
||||
`'^\/foo\/.*$'` which will match any string beginning with `'/foo/'`.
|
||||
|
||||
When the globstar option is `true`, the same `'/foo/*'` glob is transformed to
|
||||
`'^\/foo\/[^/]*$'` which will match any string beginning with `'/foo/'` that **does not have** a `'/'` to the right of it. `'/foo/*'` will match: `'/foo/bar'`, `'/foo/bar.txt'` but not `'/foo/bar/baz'` or `'/foo/bar/baz.txt'`.
|
||||
|
||||
> **Note**: When globstar is `true`, `'/foo/**'` is equivelant to `'/foo/*'` when globstar is `false`.
|
||||
|
||||
|
||||
### options.strict
|
||||
|
||||
Type: `Boolean`<br>
|
||||
Default: `false`
|
||||
|
||||
Be forgiving about mutiple slashes, like `///` and make everything after the first `/` optional. This is how bash glob works.
|
||||
|
||||
|
||||
### options.flags
|
||||
|
||||
Type: `String`<br>
|
||||
Default: `''`
|
||||
|
||||
RegExp flags (e.g. `'i'` ) to pass to the RegExp constructor.
|
||||
|
||||
|
||||
### options.filepath
|
||||
|
||||
Type: `Boolean`<br>
|
||||
Default: `false`
|
||||
|
||||
Parse input strings as it was a file path for special path related features. This feature only makes sense if the input is a POSIX path like `/foo/bar/hello.js` or URLs.
|
||||
|
||||
When `true` the returned object will have an additional `path` object.
|
||||
|
||||
- `segment`: Array containing a `RegExp` object for each path segment.
|
||||
- `regex`: OS specific file path `RegExp`. Path seperator used is based on the operating system.
|
||||
- `globstar`: Regex string used to test for globstars.
|
||||
|
||||
> **Note: Please only use forward-slashes in file path glob expressions**
|
||||
> Though windows uses either `/` or `\` as its path separator, only `/`
|
||||
> characters are used by this glob implementation. You must use
|
||||
> forward-slashes **only** in glob expressions. Back-slashes will always
|
||||
> be interpreted as escape characters, not path separators.
|
||||
|
||||
|
||||
## References
|
||||
|
||||
Learn more about advanced globbing here
|
||||
- [mywiki.wooledge.org/glob](http://mywiki.wooledge.org/glob)
|
||||
- [linuxjournal](http://www.linuxjournal.com/content/bash-extended-globbing)
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Terkel Gjervig](https://terkel.com)
|
||||
@@ -0,0 +1,90 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Code coverage report for csv2json/libs/core/defaultParsers/index.js</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../../../base.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1>
|
||||
<a href="../../../../index.html">All files</a> / <a href="index.html">csv2json/libs/core/defaultParsers</a> index.js
|
||||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>0/1</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>0/0</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>0/0</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>0/1</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line low'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >module.exports = [</span>
|
||||
require('./parser_array.js'),
|
||||
require('./parser_json.js'),
|
||||
require('./parser_omit.js'),
|
||||
require('./parser_jsonarray.js'),
|
||||
require("./parser_flat.js")
|
||||
];
|
||||
</pre></td></tr>
|
||||
</table></pre>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Fri May 11 2018 21:20:20 GMT+0100 (IST)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
if (typeof prettyPrint === 'function') {
|
||||
prettyPrint();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script src="../../../../sorter.js"></script>
|
||||
<script src="../../../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,42 @@
|
||||
# safe-regex-test <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
||||
|
||||
[![dependency status][deps-svg]][deps-url]
|
||||
[![dev dependency status][dev-deps-svg]][dev-deps-url]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][npm-badge-png]][package-url]
|
||||
|
||||
Give a regex, get a robust predicate function that tests it against a string. This will work even if `RegExp.prototype` is altered later.
|
||||
|
||||
## Getting started
|
||||
|
||||
```sh
|
||||
npm install --save safe-regex-test
|
||||
```
|
||||
|
||||
## Usage/Examples
|
||||
|
||||
```js
|
||||
var regexTester = require('safe-regex-test');
|
||||
var assert = require('assert');
|
||||
|
||||
var tester = regexTester('a');
|
||||
assert.ok(tester('a'));
|
||||
assert.notOk(tester('b'));
|
||||
```
|
||||
|
||||
## Tests
|
||||
Simply clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
[package-url]: https://npmjs.org/package/safe-regex-test
|
||||
[npm-version-svg]: https://versionbadg.es/ljharb/safe-regex-test.svg
|
||||
[deps-svg]: https://david-dm.org/ljharb/safe-regex-test.svg
|
||||
[deps-url]: https://david-dm.org/ljharb/safe-regex-test
|
||||
[dev-deps-svg]: https://david-dm.org/ljharb/safe-regex-test/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/ljharb/safe-regex-test#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/safe-regex-test.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/safe-regex-test.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/safe-regex-test.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=safe-regex-test
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,110 @@
|
||||
/*! https://mths.be/cssesc v3.0.0 by @mathias */
|
||||
'use strict';
|
||||
|
||||
var object = {};
|
||||
var hasOwnProperty = object.hasOwnProperty;
|
||||
var merge = function merge(options, defaults) {
|
||||
if (!options) {
|
||||
return defaults;
|
||||
}
|
||||
var result = {};
|
||||
for (var key in defaults) {
|
||||
// `if (defaults.hasOwnProperty(key) { … }` is not needed here, since
|
||||
// only recognized option names are used.
|
||||
result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key];
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/;
|
||||
var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/;
|
||||
var regexAlwaysEscape = /['"\\]/;
|
||||
var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;
|
||||
|
||||
// https://mathiasbynens.be/notes/css-escapes#css
|
||||
var cssesc = function cssesc(string, options) {
|
||||
options = merge(options, cssesc.options);
|
||||
if (options.quotes != 'single' && options.quotes != 'double') {
|
||||
options.quotes = 'single';
|
||||
}
|
||||
var quote = options.quotes == 'double' ? '"' : '\'';
|
||||
var isIdentifier = options.isIdentifier;
|
||||
|
||||
var firstChar = string.charAt(0);
|
||||
var output = '';
|
||||
var counter = 0;
|
||||
var length = string.length;
|
||||
while (counter < length) {
|
||||
var character = string.charAt(counter++);
|
||||
var codePoint = character.charCodeAt();
|
||||
var value = void 0;
|
||||
// If it’s not a printable ASCII character…
|
||||
if (codePoint < 0x20 || codePoint > 0x7E) {
|
||||
if (codePoint >= 0xD800 && codePoint <= 0xDBFF && counter < length) {
|
||||
// It’s a high surrogate, and there is a next character.
|
||||
var extra = string.charCodeAt(counter++);
|
||||
if ((extra & 0xFC00) == 0xDC00) {
|
||||
// next character is low surrogate
|
||||
codePoint = ((codePoint & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000;
|
||||
} else {
|
||||
// It’s an unmatched surrogate; only append this code unit, in case
|
||||
// the next code unit is the high surrogate of a surrogate pair.
|
||||
counter--;
|
||||
}
|
||||
}
|
||||
value = '\\' + codePoint.toString(16).toUpperCase() + ' ';
|
||||
} else {
|
||||
if (options.escapeEverything) {
|
||||
if (regexAnySingleEscape.test(character)) {
|
||||
value = '\\' + character;
|
||||
} else {
|
||||
value = '\\' + codePoint.toString(16).toUpperCase() + ' ';
|
||||
}
|
||||
} else if (/[\t\n\f\r\x0B]/.test(character)) {
|
||||
value = '\\' + codePoint.toString(16).toUpperCase() + ' ';
|
||||
} else if (character == '\\' || !isIdentifier && (character == '"' && quote == character || character == '\'' && quote == character) || isIdentifier && regexSingleEscape.test(character)) {
|
||||
value = '\\' + character;
|
||||
} else {
|
||||
value = character;
|
||||
}
|
||||
}
|
||||
output += value;
|
||||
}
|
||||
|
||||
if (isIdentifier) {
|
||||
if (/^-[-\d]/.test(output)) {
|
||||
output = '\\-' + output.slice(1);
|
||||
} else if (/\d/.test(firstChar)) {
|
||||
output = '\\3' + firstChar + ' ' + output.slice(1);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove spaces after `\HEX` escapes that are not followed by a hex digit,
|
||||
// since they’re redundant. Note that this is only possible if the escape
|
||||
// sequence isn’t preceded by an odd number of backslashes.
|
||||
output = output.replace(regexExcessiveSpaces, function ($0, $1, $2) {
|
||||
if ($1 && $1.length % 2) {
|
||||
// It’s not safe to remove the space, so don’t.
|
||||
return $0;
|
||||
}
|
||||
// Strip the space.
|
||||
return ($1 || '') + $2;
|
||||
});
|
||||
|
||||
if (!isIdentifier && options.wrap) {
|
||||
return quote + output + quote;
|
||||
}
|
||||
return output;
|
||||
};
|
||||
|
||||
// Expose default options (so they can be overridden globally).
|
||||
cssesc.options = {
|
||||
'escapeEverything': false,
|
||||
'isIdentifier': false,
|
||||
'quotes': 'single',
|
||||
'wrap': false
|
||||
};
|
||||
|
||||
cssesc.version = '3.0.0';
|
||||
|
||||
module.exports = cssesc;
|
||||
@@ -0,0 +1 @@
|
||||
export declare const request: import("@octokit/types").RequestInterface<object>;
|
||||
@@ -0,0 +1,175 @@
|
||||
// Generated with `lib/make.js`
|
||||
'use strict';
|
||||
const os = require('os');
|
||||
const path = require('path');
|
||||
|
||||
const temp = os.tmpdir();
|
||||
const uidOrPid = process.getuid ? process.getuid() : process.pid;
|
||||
const hasUnicode = () => true;
|
||||
const isWindows = process.platform === 'win32';
|
||||
|
||||
const osenv = {
|
||||
editor: () => process.env.EDITOR || process.env.VISUAL || (isWindows ? 'notepad.exe' : 'vi'),
|
||||
shell: () => isWindows ? (process.env.COMSPEC || 'cmd.exe') : (process.env.SHELL || '/bin/bash')
|
||||
};
|
||||
|
||||
const umask = {
|
||||
fromString: () => process.umask()
|
||||
};
|
||||
|
||||
let home = os.homedir();
|
||||
|
||||
if (home) {
|
||||
process.env.HOME = home;
|
||||
} else {
|
||||
home = path.resolve(temp, 'npm-' + uidOrPid);
|
||||
}
|
||||
|
||||
const cacheExtra = process.platform === 'win32' ? 'npm-cache' : '.npm';
|
||||
const cacheRoot = process.platform === 'win32' ? process.env.APPDATA : home;
|
||||
const cache = path.resolve(cacheRoot, cacheExtra);
|
||||
|
||||
let defaults;
|
||||
let globalPrefix;
|
||||
|
||||
Object.defineProperty(exports, 'defaults', {
|
||||
get: function () {
|
||||
if (defaults) return defaults;
|
||||
|
||||
if (process.env.PREFIX) {
|
||||
globalPrefix = process.env.PREFIX;
|
||||
} else if (process.platform === 'win32') {
|
||||
// c:\node\node.exe --> prefix=c:\node\
|
||||
globalPrefix = path.dirname(process.execPath);
|
||||
} else {
|
||||
// /usr/local/bin/node --> prefix=/usr/local
|
||||
globalPrefix = path.dirname(path.dirname(process.execPath)); // destdir only is respected on Unix
|
||||
|
||||
if (process.env.DESTDIR) {
|
||||
globalPrefix = path.join(process.env.DESTDIR, globalPrefix);
|
||||
}
|
||||
}
|
||||
|
||||
defaults = {
|
||||
access: null,
|
||||
'allow-same-version': false,
|
||||
'always-auth': false,
|
||||
also: null,
|
||||
audit: true,
|
||||
'auth-type': 'legacy',
|
||||
'bin-links': true,
|
||||
browser: null,
|
||||
ca: null,
|
||||
cafile: null,
|
||||
cache: cache,
|
||||
'cache-lock-stale': 60000,
|
||||
'cache-lock-retries': 10,
|
||||
'cache-lock-wait': 10000,
|
||||
'cache-max': Infinity,
|
||||
'cache-min': 10,
|
||||
cert: null,
|
||||
cidr: null,
|
||||
color: process.env.NO_COLOR == null,
|
||||
depth: Infinity,
|
||||
description: true,
|
||||
dev: false,
|
||||
'dry-run': false,
|
||||
editor: osenv.editor(),
|
||||
'engine-strict': false,
|
||||
force: false,
|
||||
'fetch-retries': 2,
|
||||
'fetch-retry-factor': 10,
|
||||
'fetch-retry-mintimeout': 10000,
|
||||
'fetch-retry-maxtimeout': 60000,
|
||||
git: 'git',
|
||||
'git-tag-version': true,
|
||||
'commit-hooks': true,
|
||||
global: false,
|
||||
globalconfig: path.resolve(globalPrefix, 'etc', 'npmrc'),
|
||||
'global-style': false,
|
||||
group: process.platform === 'win32' ? 0 : process.env.SUDO_GID || process.getgid && process.getgid(),
|
||||
'ham-it-up': false,
|
||||
heading: 'npm',
|
||||
'if-present': false,
|
||||
'ignore-prepublish': false,
|
||||
'ignore-scripts': false,
|
||||
'init-module': path.resolve(home, '.npm-init.js'),
|
||||
'init-author-name': '',
|
||||
'init-author-email': '',
|
||||
'init-author-url': '',
|
||||
'init-version': '1.0.0',
|
||||
'init-license': 'ISC',
|
||||
json: false,
|
||||
key: null,
|
||||
'legacy-bundling': false,
|
||||
link: false,
|
||||
'local-address': undefined,
|
||||
loglevel: 'notice',
|
||||
logstream: process.stderr,
|
||||
'logs-max': 10,
|
||||
long: false,
|
||||
maxsockets: 50,
|
||||
message: '%s',
|
||||
'metrics-registry': null,
|
||||
'node-options': null,
|
||||
// We remove node-version to fix the issue described here: https://github.com/pnpm/pnpm/issues/4203#issuecomment-1133872769
|
||||
'offline': false,
|
||||
'onload-script': false,
|
||||
only: null,
|
||||
optional: true,
|
||||
otp: null,
|
||||
'package-lock': true,
|
||||
'package-lock-only': false,
|
||||
parseable: false,
|
||||
'prefer-offline': false,
|
||||
'prefer-online': false,
|
||||
prefix: globalPrefix,
|
||||
production: process.env.NODE_ENV === 'production',
|
||||
'progress': !process.env.TRAVIS && !process.env.CI,
|
||||
proxy: null,
|
||||
'https-proxy': null,
|
||||
'no-proxy': null,
|
||||
'user-agent': 'npm/{npm-version} ' + 'node/{node-version} ' + '{platform} ' + '{arch}',
|
||||
'read-only': false,
|
||||
'rebuild-bundle': true,
|
||||
registry: 'https://registry.npmjs.org/',
|
||||
rollback: true,
|
||||
save: true,
|
||||
'save-bundle': false,
|
||||
'save-dev': false,
|
||||
'save-exact': false,
|
||||
'save-optional': false,
|
||||
'save-prefix': '^',
|
||||
'save-prod': false,
|
||||
scope: '',
|
||||
'script-shell': null,
|
||||
'scripts-prepend-node-path': 'warn-only',
|
||||
searchopts: '',
|
||||
searchexclude: null,
|
||||
searchlimit: 20,
|
||||
searchstaleness: 15 * 60,
|
||||
'send-metrics': false,
|
||||
shell: osenv.shell(),
|
||||
shrinkwrap: true,
|
||||
'sign-git-tag': false,
|
||||
'sso-poll-frequency': 500,
|
||||
'sso-type': 'oauth',
|
||||
'strict-ssl': true,
|
||||
tag: 'latest',
|
||||
'tag-version-prefix': 'v',
|
||||
timing: false,
|
||||
tmp: temp,
|
||||
unicode: hasUnicode(),
|
||||
'unsafe-perm': process.platform === 'win32' || process.platform === 'cygwin' || !(process.getuid && process.setuid && process.getgid && process.setgid) || process.getuid() !== 0,
|
||||
usage: false,
|
||||
user: process.platform === 'win32' ? 0 : 'nobody',
|
||||
userconfig: path.resolve(home, '.npmrc'),
|
||||
umask: process.umask ? process.umask() : umask.fromString('022'),
|
||||
version: false,
|
||||
versions: false,
|
||||
viewer: process.platform === 'win32' ? 'browser' : 'man',
|
||||
_exit: true
|
||||
};
|
||||
return defaults;
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,72 @@
|
||||
"use strict";
|
||||
// import { Converter } from "./Converter";
|
||||
// import { Message, InitMessage, EOM } from "./ProcessFork";
|
||||
// import CSVError from "./CSVError";
|
||||
// import { CSVParseParam } from "./Parameters";
|
||||
// process.on("message", processMsg);
|
||||
// let conv: Converter;
|
||||
// function processMsg(msg: Message) {
|
||||
// if (msg.cmd === "init") {
|
||||
// const param = prepareParams((msg as InitMessage).params);
|
||||
// param.fork = false;
|
||||
// conv = new Converter(param);
|
||||
// process.stdin.pipe(conv).pipe(process.stdout);
|
||||
// conv.on("error", (err) => {
|
||||
// if ((err as CSVError).line) {
|
||||
// process.stderr.write(JSON.stringify({
|
||||
// err: (err as CSVError).err,
|
||||
// line: (err as CSVError).line,
|
||||
// extra: (err as CSVError).extra
|
||||
// }))
|
||||
// } else {
|
||||
// process.stderr.write(JSON.stringify({
|
||||
// err: err.message,
|
||||
// line: -1,
|
||||
// extra: "Unknown error"
|
||||
// }));
|
||||
// }
|
||||
// });
|
||||
// conv.on("eol", (eol) => {
|
||||
// // console.log("eol!!!",eol);
|
||||
// if (process.send)
|
||||
// process.send({ cmd: "eol", "value": eol });
|
||||
// })
|
||||
// conv.on("header", (header) => {
|
||||
// if (process.send)
|
||||
// process.send({ cmd: "header", "value": header });
|
||||
// })
|
||||
// conv.on("done", () => {
|
||||
// const drained = process.stdout.write("", () => {
|
||||
// if (drained) {
|
||||
// gracelyExit();
|
||||
// }
|
||||
// });
|
||||
// if (!drained) {
|
||||
// process.stdout.on("drain", gracelyExit)
|
||||
// }
|
||||
// // process.stdout.write(EOM);
|
||||
// })
|
||||
// if (process.send) {
|
||||
// process.send({ cmd: "inited" });
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// function gracelyExit(){
|
||||
// setTimeout(()=>{
|
||||
// conv.removeAllListeners();
|
||||
// process.removeAllListeners();
|
||||
// },50);
|
||||
// }
|
||||
// function prepareParams(p: any): CSVParseParam {
|
||||
// if (p.ignoreColumns) {
|
||||
// p.ignoreColumns = new RegExp(p.ignoreColumns.source, p.ignoreColumns.flags)
|
||||
// }
|
||||
// if (p.includeColumns) {
|
||||
// p.includeColumns = new RegExp(p.includeColumns.source, p.includeColumns.flags)
|
||||
// }
|
||||
// return p;
|
||||
// }
|
||||
// process.on("disconnect", () => {
|
||||
// process.exit(-1);
|
||||
// });
|
||||
//# sourceMappingURL=worker.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/icu-messageformat-parser/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,aAAa,EAAC,MAAM,UAAU,CAAA;AAC9C,OAAO,EASL,oBAAoB,EACrB,MAAM,SAAS,CAAA;AAuBhB,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,aAAkB,0BAoB9D;AACD,cAAc,SAAS,CAAA"}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{D:{"1":"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":"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"},L:{"1":"H"},B:{"1":"P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H","2":"C K L G M N O"},C:{"1":"CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"DC tB I v EC FC","33":"0 1 2 3 4 5 6 7 8 9 J D E F A B C K L G M N O w g x y z AB BB"},M:{"1":"H"},A:{"2":"J D E F A B CC"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"0 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 PC QC RC SC qB AC TC rB"},K:{"1":"h","2":"A B C qB AC rB"},E:{"1":"K L G rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"I v J D HC zB IC JC KC OC","33":"E F A B C LC 0B qB"},G:{"1":"gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"zB UC BC VC WC XC","33":"E YC ZC aC bC cC dC eC fC"},P:{"1":"g yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C","2":"I wC xC"},I:{"1":"f","2":"tB I pC qC rC sC BC tC uC"}},B:6,C:"text-decoration-color property"};
|
||||
@@ -0,0 +1,528 @@
|
||||
/*! cputils.js (C) 2013-present SheetJS -- http://sheetjs.com */
|
||||
/* vim: set ft=javascript: */
|
||||
/*jshint newcap: false */
|
||||
(function(root, factory) {
|
||||
/*jshint ignore:start */
|
||||
/*eslint-disable */
|
||||
"use strict";
|
||||
if(typeof cptable === "undefined") {
|
||||
if(typeof require !== "undefined"){
|
||||
var cpt = require('./cptable');
|
||||
if (typeof module !== 'undefined' && module.exports && typeof DO_NOT_EXPORT_CODEPAGE === 'undefined') module.exports = factory(cpt);
|
||||
else root.cptable = factory(cpt);
|
||||
} else throw new Error("cptable not found");
|
||||
} else cptable = factory(cptable);
|
||||
/*eslint-enable */
|
||||
/*jshint ignore:end */
|
||||
}(this, function(cpt){
|
||||
"use strict";
|
||||
/*global module, Buffer */
|
||||
var magic = {
|
||||
"1200":"utf16le",
|
||||
"1201":"utf16be",
|
||||
"12000":"utf32le",
|
||||
"12001":"utf32be",
|
||||
"16969":"utf64le",
|
||||
"20127":"ascii",
|
||||
"65000":"utf7",
|
||||
"65001":"utf8"
|
||||
};
|
||||
|
||||
var sbcs_cache = [874,1250,1251,1252,1253,1254,1255,1256,10000];
|
||||
var dbcs_cache = [932,936,949,950];
|
||||
var magic_cache = [65001];
|
||||
var magic_decode = {};
|
||||
var magic_encode = {};
|
||||
var cpdcache = {};
|
||||
var cpecache = {};
|
||||
|
||||
var sfcc = function sfcc(x) { return String.fromCharCode(x); };
|
||||
var cca = function cca(x) { return x.charCodeAt(0); };
|
||||
|
||||
var has_buf = (typeof Buffer !== 'undefined');
|
||||
var Buffer_from = function(){};
|
||||
if(has_buf) {
|
||||
var nbfs = !Buffer.from;
|
||||
if(!nbfs) try { Buffer.from("foo", "utf8"); } catch(e) { nbfs = true; }
|
||||
Buffer_from = nbfs ? function(buf, enc) { return (enc) ? new Buffer(buf, enc) : new Buffer(buf); } : Buffer.from.bind(Buffer);
|
||||
// $FlowIgnore
|
||||
if(!Buffer.allocUnsafe) Buffer.allocUnsafe = function(n) { return new Buffer(n); };
|
||||
|
||||
var mdl = 1024, mdb = Buffer.allocUnsafe(mdl);
|
||||
var make_EE = function make_EE(E){
|
||||
var EE = Buffer.allocUnsafe(65536);
|
||||
for(var i = 0; i < 65536;++i) EE[i] = 0;
|
||||
var keys = Object.keys(E), len = keys.length;
|
||||
for(var ee = 0, e = keys[ee]; ee < len; ++ee) {
|
||||
if(!(e = keys[ee])) continue;
|
||||
EE[e.charCodeAt(0)] = E[e];
|
||||
}
|
||||
return EE;
|
||||
};
|
||||
var sbcs_encode = function make_sbcs_encode(cp) {
|
||||
var EE = make_EE(cpt[cp].enc);
|
||||
return function sbcs_e(data, ofmt) {
|
||||
var len = data.length;
|
||||
var out, i=0, j=0, D=0, w=0;
|
||||
if(typeof data === 'string') {
|
||||
out = Buffer.allocUnsafe(len);
|
||||
for(i = 0; i < len; ++i) out[i] = EE[data.charCodeAt(i)];
|
||||
} else if(Buffer.isBuffer(data)) {
|
||||
out = Buffer.allocUnsafe(2*len);
|
||||
j = 0;
|
||||
for(i = 0; i < len; ++i) {
|
||||
D = data[i];
|
||||
if(D < 128) out[j++] = EE[D];
|
||||
else if(D < 224) { out[j++] = EE[((D&31)<<6)+(data[i+1]&63)]; ++i; }
|
||||
else if(D < 240) { out[j++] = EE[((D&15)<<12)+((data[i+1]&63)<<6)+(data[i+2]&63)]; i+=2; }
|
||||
else {
|
||||
w = ((D&7)<<18)+((data[i+1]&63)<<12)+((data[i+2]&63)<<6)+(data[i+3]&63); i+=3;
|
||||
if(w < 65536) out[j++] = EE[w];
|
||||
else { w -= 65536; out[j++] = EE[0xD800 + ((w>>10)&1023)]; out[j++] = EE[0xDC00 + (w&1023)]; }
|
||||
}
|
||||
}
|
||||
out = out.slice(0,j);
|
||||
} else {
|
||||
out = Buffer.allocUnsafe(len);
|
||||
for(i = 0; i < len; ++i) out[i] = EE[data[i].charCodeAt(0)];
|
||||
}
|
||||
if(!ofmt || ofmt === 'buf') return out;
|
||||
if(ofmt !== 'arr') return out.toString('binary');
|
||||
return [].slice.call(out);
|
||||
};
|
||||
};
|
||||
var sbcs_decode = function make_sbcs_decode(cp) {
|
||||
var D = cpt[cp].dec;
|
||||
var DD = Buffer.allocUnsafe(131072), d=0, c="";
|
||||
for(d=0;d<D.length;++d) {
|
||||
if(!(c=D[d])) continue;
|
||||
var w = c.charCodeAt(0);
|
||||
DD[2*d] = w&255; DD[2*d+1] = w>>8;
|
||||
}
|
||||
return function sbcs_d(data) {
|
||||
var len = data.length, i=0, j=0;
|
||||
if(2 * len > mdl) { mdl = 2 * len; mdb = Buffer.allocUnsafe(mdl); }
|
||||
if(Buffer.isBuffer(data)) {
|
||||
for(i = 0; i < len; i++) {
|
||||
j = 2*data[i];
|
||||
mdb[2*i] = DD[j]; mdb[2*i+1] = DD[j+1];
|
||||
}
|
||||
} else if(typeof data === "string") {
|
||||
for(i = 0; i < len; i++) {
|
||||
j = 2*data.charCodeAt(i);
|
||||
mdb[2*i] = DD[j]; mdb[2*i+1] = DD[j+1];
|
||||
}
|
||||
} else {
|
||||
for(i = 0; i < len; i++) {
|
||||
j = 2*data[i];
|
||||
mdb[2*i] = DD[j]; mdb[2*i+1] = DD[j+1];
|
||||
}
|
||||
}
|
||||
return mdb.slice(0, 2 * len).toString('ucs2');
|
||||
};
|
||||
};
|
||||
var dbcs_encode = function make_dbcs_encode(cp) {
|
||||
var E = cpt[cp].enc;
|
||||
var EE = Buffer.allocUnsafe(131072);
|
||||
for(var i = 0; i < 131072; ++i) EE[i] = 0;
|
||||
var keys = Object.keys(E);
|
||||
for(var ee = 0, e = keys[ee]; ee < keys.length; ++ee) {
|
||||
if(!(e = keys[ee])) continue;
|
||||
var f = e.charCodeAt(0);
|
||||
EE[2*f] = E[e] & 255; EE[2*f+1] = E[e]>>8;
|
||||
}
|
||||
return function dbcs_e(data, ofmt) {
|
||||
var len = data.length, out = Buffer.allocUnsafe(2*len), i=0, j=0, jj=0, k=0, D=0;
|
||||
if(typeof data === 'string') {
|
||||
for(i = k = 0; i < len; ++i) {
|
||||
j = data.charCodeAt(i)*2;
|
||||
out[k++] = EE[j+1] || EE[j]; if(EE[j+1] > 0) out[k++] = EE[j];
|
||||
}
|
||||
out = out.slice(0,k);
|
||||
} else if(Buffer.isBuffer(data)) {
|
||||
for(i = k = 0; i < len; ++i) {
|
||||
D = data[i];
|
||||
if(D < 128) j = D;
|
||||
else if(D < 224) { j = ((D&31)<<6)+(data[i+1]&63); ++i; }
|
||||
else if(D < 240) { j = ((D&15)<<12)+((data[i+1]&63)<<6)+(data[i+2]&63); i+=2; }
|
||||
else { j = ((D&7)<<18)+((data[i+1]&63)<<12)+((data[i+2]&63)<<6)+(data[i+3]&63); i+=3; }
|
||||
if(j<65536) { j*=2; out[k++] = EE[j+1] || EE[j]; if(EE[j+1] > 0) out[k++] = EE[j]; }
|
||||
else { jj = j-65536;
|
||||
j=2*(0xD800 + ((jj>>10)&1023)); out[k++] = EE[j+1] || EE[j]; if(EE[j+1] > 0) out[k++] = EE[j];
|
||||
j=2*(0xDC00 + (jj&1023)); out[k++] = EE[j+1] || EE[j]; if(EE[j+1] > 0) out[k++] = EE[j];
|
||||
}
|
||||
}
|
||||
out = out.slice(0,k);
|
||||
} else {
|
||||
for(i = k = 0; i < len; i++) {
|
||||
j = data[i].charCodeAt(0)*2;
|
||||
out[k++] = EE[j+1] || EE[j]; if(EE[j+1] > 0) out[k++] = EE[j];
|
||||
}
|
||||
}
|
||||
if(!ofmt || ofmt === 'buf') return out;
|
||||
if(ofmt !== 'arr') return out.toString('binary');
|
||||
return [].slice.call(out);
|
||||
};
|
||||
};
|
||||
var dbcs_decode = function make_dbcs_decode(cp) {
|
||||
var D = cpt[cp].dec;
|
||||
var DD = Buffer.allocUnsafe(131072), d=0, c, w=0, j=0, i=0;
|
||||
for(i = 0; i < 65536; ++i) { DD[2*i] = 0xFF; DD[2*i+1] = 0xFD;}
|
||||
for(d = 0; d < D.length; ++d) {
|
||||
if(!(c=D[d])) continue;
|
||||
w = c.charCodeAt(0);
|
||||
j = 2*d;
|
||||
DD[j] = w&255; DD[j+1] = w>>8;
|
||||
}
|
||||
return function dbcs_d(data) {
|
||||
var len = data.length, out = Buffer.allocUnsafe(2*len), i=0, j=0, k=0;
|
||||
if(Buffer.isBuffer(data)) {
|
||||
for(i = 0; i < len; i++) {
|
||||
j = 2*data[i];
|
||||
if(DD[j]===0xFF && DD[j+1]===0xFD) { j=2*((data[i]<<8)+data[i+1]); ++i; }
|
||||
out[k++] = DD[j]; out[k++] = DD[j+1];
|
||||
}
|
||||
} else if(typeof data === "string") {
|
||||
for(i = 0; i < len; i++) {
|
||||
j = 2*data.charCodeAt(i);
|
||||
if(DD[j]===0xFF && DD[j+1]===0xFD) { j=2*((data.charCodeAt(i)<<8)+data.charCodeAt(i+1)); ++i; }
|
||||
out[k++] = DD[j]; out[k++] = DD[j+1];
|
||||
}
|
||||
} else {
|
||||
for(i = 0; i < len; i++) {
|
||||
j = 2*data[i];
|
||||
if(DD[j]===0xFF && DD[j+1]===0xFD) { j=2*((data[i]<<8)+data[i+1]); ++i; }
|
||||
out[k++] = DD[j]; out[k++] = DD[j+1];
|
||||
}
|
||||
}
|
||||
return out.slice(0,k).toString('ucs2');
|
||||
};
|
||||
};
|
||||
magic_decode[65001] = function utf8_d(data) {
|
||||
if(typeof data === "string") return utf8_d(data.split("").map(cca));
|
||||
var len = data.length, w = 0, ww = 0;
|
||||
if(4 * len > mdl) { mdl = 4 * len; mdb = Buffer.allocUnsafe(mdl); }
|
||||
var i = 0;
|
||||
if(len >= 3 && data[0] == 0xEF) if(data[1] == 0xBB && data[2] == 0xBF) i = 3;
|
||||
for(var j = 1, k = 0, D = 0; i < len; i+=j) {
|
||||
j = 1; D = data[i];
|
||||
if(D < 128) w = D;
|
||||
else if(D < 224) { w=(D&31)*64+(data[i+1]&63); j=2; }
|
||||
else if(D < 240) { w=((D&15)<<12)+(data[i+1]&63)*64+(data[i+2]&63); j=3; }
|
||||
else { w=(D&7)*262144+((data[i+1]&63)<<12)+(data[i+2]&63)*64+(data[i+3]&63); j=4; }
|
||||
if(w < 65536) { mdb[k++] = w&255; mdb[k++] = w>>8; }
|
||||
else {
|
||||
w -= 65536; ww = 0xD800 + ((w>>10)&1023); w = 0xDC00 + (w&1023);
|
||||
mdb[k++] = ww&255; mdb[k++] = ww>>>8; mdb[k++] = w&255; mdb[k++] = (w>>>8)&255;
|
||||
}
|
||||
}
|
||||
return mdb.slice(0,k).toString('ucs2');
|
||||
};
|
||||
magic_encode[65001] = function utf8_e(data, ofmt) {
|
||||
if(has_buf && Buffer.isBuffer(data)) {
|
||||
if(!ofmt || ofmt === 'buf') return data;
|
||||
if(ofmt !== 'arr') return data.toString('binary');
|
||||
return [].slice.call(data);
|
||||
}
|
||||
var len = data.length, w = 0, ww = 0, j = 0;
|
||||
var direct = typeof data === "string";
|
||||
if(4 * len > mdl) { mdl = 4 * len; mdb = Buffer.allocUnsafe(mdl); }
|
||||
for(var i = 0; i < len; ++i) {
|
||||
w = direct ? data.charCodeAt(i) : data[i].charCodeAt(0);
|
||||
if(w <= 0x007F) mdb[j++] = w;
|
||||
else if(w <= 0x07FF) {
|
||||
mdb[j++] = 192 + (w >> 6);
|
||||
mdb[j++] = 128 + (w&63);
|
||||
} else if(w >= 0xD800 && w <= 0xDFFF) {
|
||||
w -= 0xD800; ++i;
|
||||
ww = (direct ? data.charCodeAt(i) : data[i].charCodeAt(0)) - 0xDC00 + (w << 10);
|
||||
mdb[j++] = 240 + ((ww>>>18) & 0x07);
|
||||
mdb[j++] = 144 + ((ww>>>12) & 0x3F);
|
||||
mdb[j++] = 128 + ((ww>>>6) & 0x3F);
|
||||
mdb[j++] = 128 + (ww & 0x3F);
|
||||
} else {
|
||||
mdb[j++] = 224 + (w >> 12);
|
||||
mdb[j++] = 128 + ((w >> 6)&63);
|
||||
mdb[j++] = 128 + (w&63);
|
||||
}
|
||||
}
|
||||
if(!ofmt || ofmt === 'buf') return mdb.slice(0,j);
|
||||
if(ofmt !== 'arr') return mdb.slice(0,j).toString('binary');
|
||||
return [].slice.call(mdb, 0, j);
|
||||
};
|
||||
}
|
||||
|
||||
var encache = function encache() {
|
||||
if(has_buf) {
|
||||
if(cpdcache[sbcs_cache[0]]) return;
|
||||
var i=0, s=0;
|
||||
for(i = 0; i < sbcs_cache.length; ++i) {
|
||||
s = sbcs_cache[i];
|
||||
if(cpt[s]) {
|
||||
cpdcache[s] = sbcs_decode(s);
|
||||
cpecache[s] = sbcs_encode(s);
|
||||
}
|
||||
}
|
||||
for(i = 0; i < dbcs_cache.length; ++i) {
|
||||
s = dbcs_cache[i];
|
||||
if(cpt[s]) {
|
||||
cpdcache[s] = dbcs_decode(s);
|
||||
cpecache[s] = dbcs_encode(s);
|
||||
}
|
||||
}
|
||||
for(i = 0; i < magic_cache.length; ++i) {
|
||||
s = magic_cache[i];
|
||||
if(magic_decode[s]) cpdcache[s] = magic_decode[s];
|
||||
if(magic_encode[s]) cpecache[s] = magic_encode[s];
|
||||
}
|
||||
}
|
||||
};
|
||||
var null_enc = function(data, ofmt) { void ofmt; return ""; };
|
||||
var cp_decache = function cp_decache(cp) { delete cpdcache[cp]; delete cpecache[cp]; };
|
||||
var decache = function decache() {
|
||||
if(has_buf) {
|
||||
if(!cpdcache[sbcs_cache[0]]) return;
|
||||
sbcs_cache.forEach(cp_decache);
|
||||
dbcs_cache.forEach(cp_decache);
|
||||
magic_cache.forEach(cp_decache);
|
||||
}
|
||||
last_enc = null_enc; last_cp = 0;
|
||||
};
|
||||
var cache = {
|
||||
encache: encache,
|
||||
decache: decache,
|
||||
sbcs: sbcs_cache,
|
||||
dbcs: dbcs_cache
|
||||
};
|
||||
|
||||
encache();
|
||||
|
||||
var BM = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
var SetD = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'(),-./:?";
|
||||
var last_enc = null_enc, last_cp = 0;
|
||||
var encode = function encode(cp, data, ofmt) {
|
||||
if(cp === last_cp && last_enc) { return last_enc(data, ofmt); }
|
||||
if(cpecache[cp]) { last_enc = cpecache[last_cp=cp]; return last_enc(data, ofmt); }
|
||||
if(has_buf && Buffer.isBuffer(data)) data = data.toString('utf8');
|
||||
var len = data.length;
|
||||
var out = has_buf ? Buffer.allocUnsafe(4*len) : [], w=0, i=0, j = 0, ww=0;
|
||||
var C = cpt[cp], E, M = "";
|
||||
var isstr = typeof data === 'string';
|
||||
if(C && (E=C.enc)) for(i = 0; i < len; ++i, ++j) {
|
||||
w = E[isstr? data.charAt(i) : data[i]];
|
||||
if(w > 255) {
|
||||
out[j] = w>>8;
|
||||
out[++j] = w&255;
|
||||
} else out[j] = w&255;
|
||||
}
|
||||
else if((M=magic[cp])) switch(M) {
|
||||
case "utf8":
|
||||
if(has_buf && isstr) { out = Buffer_from(data, M); j = out.length; break; }
|
||||
for(i = 0; i < len; ++i, ++j) {
|
||||
w = isstr ? data.charCodeAt(i) : data[i].charCodeAt(0);
|
||||
if(w <= 0x007F) out[j] = w;
|
||||
else if(w <= 0x07FF) {
|
||||
out[j] = 192 + (w >> 6);
|
||||
out[++j] = 128 + (w&63);
|
||||
} else if(w >= 0xD800 && w <= 0xDFFF) {
|
||||
w -= 0xD800;
|
||||
ww = (isstr ? data.charCodeAt(++i) : data[++i].charCodeAt(0)) - 0xDC00 + (w << 10);
|
||||
out[j] = 240 + ((ww>>>18) & 0x07);
|
||||
out[++j] = 144 + ((ww>>>12) & 0x3F);
|
||||
out[++j] = 128 + ((ww>>>6) & 0x3F);
|
||||
out[++j] = 128 + (ww & 0x3F);
|
||||
} else {
|
||||
out[j] = 224 + (w >> 12);
|
||||
out[++j] = 128 + ((w >> 6)&63);
|
||||
out[++j] = 128 + (w&63);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "ascii":
|
||||
if(has_buf && typeof data === "string") { out = Buffer_from(data, M); j = out.length; break; }
|
||||
for(i = 0; i < len; ++i, ++j) {
|
||||
w = isstr ? data.charCodeAt(i) : data[i].charCodeAt(0);
|
||||
if(w <= 0x007F) out[j] = w;
|
||||
else throw new Error("bad ascii " + w);
|
||||
}
|
||||
break;
|
||||
case "utf16le":
|
||||
if(has_buf && typeof data === "string") { out = Buffer_from(data, M); j = out.length; break; }
|
||||
for(i = 0; i < len; ++i) {
|
||||
w = isstr ? data.charCodeAt(i) : data[i].charCodeAt(0);
|
||||
out[j++] = w&255;
|
||||
out[j++] = w>>8;
|
||||
}
|
||||
break;
|
||||
case "utf16be":
|
||||
for(i = 0; i < len; ++i) {
|
||||
w = isstr ? data.charCodeAt(i) : data[i].charCodeAt(0);
|
||||
out[j++] = w>>8;
|
||||
out[j++] = w&255;
|
||||
}
|
||||
break;
|
||||
case "utf32le":
|
||||
for(i = 0; i < len; ++i) {
|
||||
w = isstr ? data.charCodeAt(i) : data[i].charCodeAt(0);
|
||||
if(w >= 0xD800 && w <= 0xDFFF) w = 0x10000 + ((w - 0xD800) << 10) + (data[++i].charCodeAt(0) - 0xDC00);
|
||||
out[j++] = w&255; w >>= 8;
|
||||
out[j++] = w&255; w >>= 8;
|
||||
out[j++] = w&255; w >>= 8;
|
||||
out[j++] = w&255;
|
||||
}
|
||||
break;
|
||||
case "utf32be":
|
||||
for(i = 0; i < len; ++i) {
|
||||
w = isstr ? data.charCodeAt(i) : data[i].charCodeAt(0);
|
||||
if(w >= 0xD800 && w <= 0xDFFF) w = 0x10000 + ((w - 0xD800) << 10) + (data[++i].charCodeAt(0) - 0xDC00);
|
||||
out[j+3] = w&255; w >>= 8;
|
||||
out[j+2] = w&255; w >>= 8;
|
||||
out[j+1] = w&255; w >>= 8;
|
||||
out[j] = w&255;
|
||||
j+=4;
|
||||
}
|
||||
break;
|
||||
case "utf7":
|
||||
for(i = 0; i < len; i++) {
|
||||
var c = isstr ? data.charAt(i) : data[i].charAt(0);
|
||||
if(c === "+") { out[j++] = 0x2b; out[j++] = 0x2d; continue; }
|
||||
if(SetD.indexOf(c) > -1) { out[j++] = c.charCodeAt(0); continue; }
|
||||
var tt = encode(1201, c);
|
||||
out[j++] = 0x2b;
|
||||
out[j++] = BM.charCodeAt(tt[0]>>2);
|
||||
out[j++] = BM.charCodeAt(((tt[0]&0x03)<<4) + ((tt[1]||0)>>4));
|
||||
out[j++] = BM.charCodeAt(((tt[1]&0x0F)<<2) + ((tt[2]||0)>>6));
|
||||
out[j++] = 0x2d;
|
||||
}
|
||||
break;
|
||||
default: throw new Error("Unsupported magic: " + cp + " " + magic[cp]);
|
||||
}
|
||||
else throw new Error("Unrecognized CP: " + cp);
|
||||
out = out.slice(0,j);
|
||||
if(!has_buf) return (ofmt == 'str') ? (out).map(sfcc).join("") : out;
|
||||
if(!ofmt || ofmt === 'buf') return out;
|
||||
if(ofmt !== 'arr') return out.toString('binary');
|
||||
return [].slice.call(out);
|
||||
};
|
||||
var decode = function decode(cp, data) {
|
||||
var F; if((F=cpdcache[cp])) return F(data);
|
||||
if(typeof data === "string") return decode(cp, data.split("").map(cca));
|
||||
var len = data.length, out = new Array(len), s="", w=0, i=0, j=1, k=0, ww=0;
|
||||
var C = cpt[cp], D, M="";
|
||||
if(C && (D=C.dec)) {
|
||||
for(i = 0; i < len; i+=j) {
|
||||
j = 2;
|
||||
s = D[(data[i]<<8)+ data[i+1]];
|
||||
if(!s) {
|
||||
j = 1;
|
||||
s = D[data[i]];
|
||||
}
|
||||
if(!s) throw new Error('Unrecognized code: ' + data[i] + ' ' + data[i+j-1] + ' ' + i + ' ' + j + ' ' + D[data[i]]);
|
||||
out[k++] = s;
|
||||
}
|
||||
}
|
||||
else if((M=magic[cp])) switch(M) {
|
||||
case "utf8":
|
||||
if(len >= 3 && data[0] == 0xEF) if(data[1] == 0xBB && data[2] == 0xBF) i = 3;
|
||||
for(; i < len; i+=j) {
|
||||
j = 1;
|
||||
if(data[i] < 128) w = data[i];
|
||||
else if(data[i] < 224) { w=(data[i]&31)*64+(data[i+1]&63); j=2; }
|
||||
else if(data[i] < 240) { w=((data[i]&15)<<12)+(data[i+1]&63)*64+(data[i+2]&63); j=3; }
|
||||
else { w=(data[i]&7)*262144+((data[i+1]&63)<<12)+(data[i+2]&63)*64+(data[i+3]&63); j=4; }
|
||||
if(w < 65536) { out[k++] = String.fromCharCode(w); }
|
||||
else {
|
||||
w -= 65536; ww = 0xD800 + ((w>>10)&1023); w = 0xDC00 + (w&1023);
|
||||
out[k++] = String.fromCharCode(ww); out[k++] = String.fromCharCode(w);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "ascii":
|
||||
if(has_buf && Buffer.isBuffer(data)) return data.toString(M);
|
||||
for(i = 0; i < len; i++) out[i] = String.fromCharCode(data[i]);
|
||||
k = len; break;
|
||||
case "utf16le":
|
||||
if(len >= 2 && data[0] == 0xFF) if(data[1] == 0xFE) i = 2;
|
||||
if(has_buf && Buffer.isBuffer(data)) return data.toString(M);
|
||||
j = 2;
|
||||
for(; i+1 < len; i+=j) {
|
||||
out[k++] = String.fromCharCode((data[i+1]<<8) + data[i]);
|
||||
}
|
||||
break;
|
||||
case "utf16be":
|
||||
if(len >= 2 && data[0] == 0xFE) if(data[1] == 0xFF) i = 2;
|
||||
j = 2;
|
||||
for(; i+1 < len; i+=j) {
|
||||
out[k++] = String.fromCharCode((data[i]<<8) + data[i+1]);
|
||||
}
|
||||
break;
|
||||
case "utf32le":
|
||||
if(len >= 4 && data[0] == 0xFF) if(data[1] == 0xFE && data[2] === 0 && data[3] === 0) i = 4;
|
||||
j = 4;
|
||||
for(; i < len; i+=j) {
|
||||
w = (data[i+3]<<24) + (data[i+2]<<16) + (data[i+1]<<8) + (data[i]);
|
||||
if(w > 0xFFFF) {
|
||||
w -= 0x10000;
|
||||
out[k++] = String.fromCharCode(0xD800 + ((w >> 10) & 0x3FF));
|
||||
out[k++] = String.fromCharCode(0xDC00 + (w & 0x3FF));
|
||||
}
|
||||
else out[k++] = String.fromCharCode(w);
|
||||
}
|
||||
break;
|
||||
case "utf32be":
|
||||
if(len >= 4 && data[3] == 0xFF) if(data[2] == 0xFE && data[1] === 0 && data[0] === 0) i = 4;
|
||||
j = 4;
|
||||
for(; i < len; i+=j) {
|
||||
w = (data[i]<<24) + (data[i+1]<<16) + (data[i+2]<<8) + (data[i+3]);
|
||||
if(w > 0xFFFF) {
|
||||
w -= 0x10000;
|
||||
out[k++] = String.fromCharCode(0xD800 + ((w >> 10) & 0x3FF));
|
||||
out[k++] = String.fromCharCode(0xDC00 + (w & 0x3FF));
|
||||
}
|
||||
else out[k++] = String.fromCharCode(w);
|
||||
}
|
||||
break;
|
||||
case "utf7":
|
||||
if(len >= 4 && data[0] == 0x2B && data[1] == 0x2F && data[2] == 0x76) {
|
||||
if(len >= 5 && data[3] == 0x38 && data[4] == 0x2D) i = 5;
|
||||
else if(data[3] == 0x38 || data[3] == 0x39 || data[3] == 0x2B || data[3] == 0x2F) i = 4;
|
||||
}
|
||||
for(; i < len; i+=j) {
|
||||
if(data[i] !== 0x2b) { j=1; out[k++] = String.fromCharCode(data[i]); continue; }
|
||||
j=1;
|
||||
if(data[i+1] === 0x2d) { j = 2; out[k++] = "+"; continue; }
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
while(String.fromCharCode(data[i+j]).match(/[A-Za-z0-9+\/]/)) j++;
|
||||
var dash = 0;
|
||||
if(data[i+j] === 0x2d) { ++j; dash=1; }
|
||||
var tt = [];
|
||||
var o64 = "";
|
||||
var c1=0, c2=0, c3=0;
|
||||
var e1=0, e2=0, e3=0, e4=0;
|
||||
for(var l = 1; l < j - dash;) {
|
||||
e1 = BM.indexOf(String.fromCharCode(data[i+l++]));
|
||||
e2 = BM.indexOf(String.fromCharCode(data[i+l++]));
|
||||
c1 = e1 << 2 | e2 >> 4;
|
||||
tt.push(c1);
|
||||
e3 = BM.indexOf(String.fromCharCode(data[i+l++]));
|
||||
if(e3 === -1) break;
|
||||
c2 = (e2 & 15) << 4 | e3 >> 2;
|
||||
tt.push(c2);
|
||||
e4 = BM.indexOf(String.fromCharCode(data[i+l++]));
|
||||
if(e4 === -1) break;
|
||||
c3 = (e3 & 3) << 6 | e4;
|
||||
if(e4 < 64) tt.push(c3);
|
||||
}
|
||||
o64 = decode(1201, tt);
|
||||
for(l = 0; l < o64.length; ++l) out[k++] = o64.charAt(l);
|
||||
}
|
||||
break;
|
||||
default: throw new Error("Unsupported magic: " + cp + " " + magic[cp]);
|
||||
}
|
||||
else throw new Error("Unrecognized CP: " + cp);
|
||||
return out.slice(0,k).join("");
|
||||
};
|
||||
var hascp = function hascp(cp) { return !!(cpt[cp] || magic[cp]); };
|
||||
cpt.utils = { decode: decode, encode: encode, hascp: hascp, magic: magic, cache:cache };
|
||||
return cpt;
|
||||
}));
|
||||
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
Represents an array of strings split using a given character or character set.
|
||||
|
||||
Use-case: Defining the return type of a method like `String.prototype.split`.
|
||||
|
||||
@example
|
||||
```
|
||||
import type {Split} from 'type-fest';
|
||||
|
||||
declare function split<S extends string, D extends string>(string: S, separator: D): Split<S, D>;
|
||||
|
||||
type Item = 'foo' | 'bar' | 'baz' | 'waldo';
|
||||
const items = 'foo,bar,baz,waldo';
|
||||
let array: Item[];
|
||||
|
||||
array = split(items, ',');
|
||||
```
|
||||
|
||||
@category String
|
||||
@category Template literal
|
||||
*/
|
||||
export type Split<
|
||||
S extends string,
|
||||
Delimiter extends string,
|
||||
> = S extends `${infer Head}${Delimiter}${infer Tail}`
|
||||
? [Head, ...Split<Tail, Delimiter>]
|
||||
: S extends Delimiter
|
||||
? []
|
||||
: [S];
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"A B","2":"J D E F 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 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"DC tB EC FC"},D:{"1":"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 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","16":"I v J D E F A B C K L"},E:{"1":"J D E F A B C K L G IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v HC zB"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e SC qB AC TC rB","2":"F PC","16":"QC RC"},G:{"1":"E VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"zB UC BC"},H:{"1":"oC"},I:{"1":"I f sC BC tC uC","2":"pC qC rC","16":"tB"},J:{"1":"A","2":"D"},K:{"1":"B C h qB AC rB","16":"A"},L:{"1":"H"},M:{"1":"H"},N:{"1":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:1,C:"Attributes for form submission"};
|
||||
@@ -0,0 +1,235 @@
|
||||
/// <reference types="node" resolution-mode="require"/>
|
||||
/// <reference types="node" resolution-mode="require"/>
|
||||
/// <reference types="node" resolution-mode="require"/>
|
||||
import type { Buffer } from 'node:buffer';
|
||||
import type { Class, Falsy, TypedArray, ObservableLike, Primitive, WeakRef } from './types.js';
|
||||
declare const objectTypeNames: readonly ["Function", "Generator", "AsyncGenerator", "GeneratorFunction", "AsyncGeneratorFunction", "AsyncFunction", "Observable", "Array", "Buffer", "Blob", "Object", "RegExp", "Date", "Error", "Map", "Set", "WeakMap", "WeakSet", "WeakRef", "ArrayBuffer", "SharedArrayBuffer", "DataView", "Promise", "URL", "FormData", "URLSearchParams", "HTMLElement", "NaN", "Int8Array", "Uint8Array", "Uint8ClampedArray", "Int16Array", "Uint16Array", "Int32Array", "Uint32Array", "Float32Array", "Float64Array", "BigInt64Array", "BigUint64Array"];
|
||||
declare type ObjectTypeName = typeof objectTypeNames[number];
|
||||
declare const primitiveTypeNames: readonly ["null", "undefined", "string", "number", "bigint", "boolean", "symbol"];
|
||||
declare type PrimitiveTypeName = typeof primitiveTypeNames[number];
|
||||
export declare type TypeName = ObjectTypeName | PrimitiveTypeName;
|
||||
declare function is(value: unknown): TypeName;
|
||||
declare namespace is {
|
||||
var undefined: (value: unknown) => value is undefined;
|
||||
var string: (value: unknown) => value is string;
|
||||
var number: (value: unknown) => value is number;
|
||||
var bigint: (value: unknown) => value is bigint;
|
||||
var function_: (value: unknown) => value is Function;
|
||||
var null_: (value: unknown) => value is null;
|
||||
var class_: (value: unknown) => value is Class<unknown, any[]>;
|
||||
var boolean: (value: unknown) => value is boolean;
|
||||
var symbol: (value: unknown) => value is symbol;
|
||||
var numericString: (value: unknown) => value is string;
|
||||
var array: <T = unknown>(value: unknown, assertion?: ((value: T) => value is T) | undefined) => value is T[];
|
||||
var buffer: (value: unknown) => value is Buffer;
|
||||
var blob: (value: unknown) => value is Blob;
|
||||
var nullOrUndefined: (value: unknown) => value is null | undefined;
|
||||
var object: (value: unknown) => value is object;
|
||||
var iterable: <T = unknown>(value: unknown) => value is Iterable<T>;
|
||||
var asyncIterable: <T = unknown>(value: unknown) => value is AsyncIterable<T>;
|
||||
var generator: (value: unknown) => value is Generator<unknown, any, unknown>;
|
||||
var asyncGenerator: (value: unknown) => value is AsyncGenerator<unknown, any, unknown>;
|
||||
var nativePromise: <T = unknown>(value: unknown) => value is Promise<T>;
|
||||
var promise: <T = unknown>(value: unknown) => value is Promise<T>;
|
||||
var generatorFunction: (value: unknown) => value is GeneratorFunction;
|
||||
var asyncGeneratorFunction: (value: unknown) => value is (...args: any[]) => Promise<unknown>;
|
||||
var asyncFunction: <T = unknown>(value: unknown) => value is (...args: any[]) => Promise<T>;
|
||||
var boundFunction: (value: unknown) => value is Function;
|
||||
var regExp: (value: unknown) => value is RegExp;
|
||||
var date: (value: unknown) => value is Date;
|
||||
var error: (value: unknown) => value is Error;
|
||||
var map: <Key = unknown, Value = unknown>(value: unknown) => value is Map<Key, Value>;
|
||||
var set: <T = unknown>(value: unknown) => value is Set<T>;
|
||||
var weakMap: <Key extends object = object, Value = unknown>(value: unknown) => value is WeakMap<Key, Value>;
|
||||
var weakSet: (value: unknown) => value is WeakSet<object>;
|
||||
var weakRef: (value: unknown) => value is WeakRef<object>;
|
||||
var int8Array: (value: unknown) => value is Int8Array;
|
||||
var uint8Array: (value: unknown) => value is Uint8Array;
|
||||
var uint8ClampedArray: (value: unknown) => value is Uint8ClampedArray;
|
||||
var int16Array: (value: unknown) => value is Int16Array;
|
||||
var uint16Array: (value: unknown) => value is Uint16Array;
|
||||
var int32Array: (value: unknown) => value is Int32Array;
|
||||
var uint32Array: (value: unknown) => value is Uint32Array;
|
||||
var float32Array: (value: unknown) => value is Float32Array;
|
||||
var float64Array: (value: unknown) => value is Float64Array;
|
||||
var bigInt64Array: (value: unknown) => value is BigInt64Array;
|
||||
var bigUint64Array: (value: unknown) => value is BigUint64Array;
|
||||
var arrayBuffer: (value: unknown) => value is ArrayBuffer;
|
||||
var sharedArrayBuffer: (value: unknown) => value is SharedArrayBuffer;
|
||||
var dataView: (value: unknown) => value is DataView;
|
||||
var enumCase: <T = unknown>(value: unknown, targetEnum: T) => boolean;
|
||||
var directInstanceOf: <T>(instance: unknown, class_: Class<T, any[]>) => instance is T;
|
||||
var urlInstance: (value: unknown) => value is URL;
|
||||
var urlString: (value: unknown) => value is string;
|
||||
var truthy: <T>(value: Falsy | T) => value is T;
|
||||
var falsy: <T>(value: Falsy | T) => value is Falsy;
|
||||
var nan: (value: unknown) => boolean;
|
||||
var primitive: (value: unknown) => value is Primitive;
|
||||
var integer: (value: unknown) => value is number;
|
||||
var safeInteger: (value: unknown) => value is number;
|
||||
var plainObject: <Value = unknown>(value: unknown) => value is Record<PropertyKey, Value>;
|
||||
var typedArray: (value: unknown) => value is TypedArray;
|
||||
var arrayLike: <T = unknown>(value: unknown) => value is ArrayLike<T>;
|
||||
var inRange: (value: number, range: number | number[]) => value is number;
|
||||
var domElement: (value: unknown) => value is HTMLElement;
|
||||
var observable: (value: unknown) => value is ObservableLike;
|
||||
var nodeStream: (value: unknown) => value is NodeStream;
|
||||
var infinite: (value: unknown) => value is number;
|
||||
var evenInteger: (value: number) => value is number;
|
||||
var oddInteger: (value: number) => value is number;
|
||||
var emptyArray: (value: unknown) => value is never[];
|
||||
var nonEmptyArray: (value: unknown) => value is [unknown, ...unknown[]];
|
||||
var emptyString: (value: unknown) => value is "";
|
||||
var emptyStringOrWhitespace: (value: unknown) => value is string;
|
||||
var nonEmptyString: (value: unknown) => value is string;
|
||||
var nonEmptyStringAndNotWhitespace: (value: unknown) => value is string;
|
||||
var emptyObject: <Key extends string | number | symbol = string>(value: unknown) => value is Record<Key, never>;
|
||||
var nonEmptyObject: <Key extends string | number | symbol = string, Value = unknown>(value: unknown) => value is Record<Key, Value>;
|
||||
var emptySet: (value: unknown) => value is Set<never>;
|
||||
var nonEmptySet: <T = unknown>(value: unknown) => value is Set<T>;
|
||||
var emptyMap: (value: unknown) => value is Map<never, never>;
|
||||
var nonEmptyMap: <Key = unknown, Value = unknown>(value: unknown) => value is Map<Key, Value>;
|
||||
var propertyKey: (value: unknown) => value is PropertyKey;
|
||||
var formData: (value: unknown) => value is FormData;
|
||||
var urlSearchParams: (value: unknown) => value is URLSearchParams;
|
||||
var any: (predicate: Predicate | Predicate[], ...values: unknown[]) => boolean;
|
||||
var all: (predicate: Predicate, ...values: unknown[]) => boolean;
|
||||
}
|
||||
export interface ArrayLike<T> {
|
||||
readonly [index: number]: T;
|
||||
readonly length: number;
|
||||
}
|
||||
export interface NodeStream extends NodeJS.EventEmitter {
|
||||
pipe<T extends NodeJS.WritableStream>(destination: T, options?: {
|
||||
end?: boolean;
|
||||
}): T;
|
||||
}
|
||||
export declare type Predicate = (value: unknown) => boolean;
|
||||
export declare const enum AssertionTypeDescription {
|
||||
class_ = "Class",
|
||||
numericString = "string with a number",
|
||||
nullOrUndefined = "null or undefined",
|
||||
iterable = "Iterable",
|
||||
asyncIterable = "AsyncIterable",
|
||||
nativePromise = "native Promise",
|
||||
urlString = "string with a URL",
|
||||
truthy = "truthy",
|
||||
falsy = "falsy",
|
||||
nan = "NaN",
|
||||
primitive = "primitive",
|
||||
integer = "integer",
|
||||
safeInteger = "integer",
|
||||
plainObject = "plain object",
|
||||
arrayLike = "array-like",
|
||||
typedArray = "TypedArray",
|
||||
domElement = "HTMLElement",
|
||||
nodeStream = "Node.js Stream",
|
||||
infinite = "infinite number",
|
||||
emptyArray = "empty array",
|
||||
nonEmptyArray = "non-empty array",
|
||||
emptyString = "empty string",
|
||||
emptyStringOrWhitespace = "empty string or whitespace",
|
||||
nonEmptyString = "non-empty string",
|
||||
nonEmptyStringAndNotWhitespace = "non-empty string and not whitespace",
|
||||
emptyObject = "empty object",
|
||||
nonEmptyObject = "non-empty object",
|
||||
emptySet = "empty set",
|
||||
nonEmptySet = "non-empty set",
|
||||
emptyMap = "empty map",
|
||||
nonEmptyMap = "non-empty map",
|
||||
evenInteger = "even integer",
|
||||
oddInteger = "odd integer",
|
||||
directInstanceOf = "T",
|
||||
inRange = "in range",
|
||||
any = "predicate returns truthy for any value",
|
||||
all = "predicate returns truthy for all values"
|
||||
}
|
||||
interface Assert {
|
||||
undefined: (value: unknown) => asserts value is undefined;
|
||||
string: (value: unknown) => asserts value is string;
|
||||
number: (value: unknown) => asserts value is number;
|
||||
bigint: (value: unknown) => asserts value is bigint;
|
||||
function_: (value: unknown) => asserts value is Function;
|
||||
null_: (value: unknown) => asserts value is null;
|
||||
class_: (value: unknown) => asserts value is Class;
|
||||
boolean: (value: unknown) => asserts value is boolean;
|
||||
symbol: (value: unknown) => asserts value is symbol;
|
||||
numericString: (value: unknown) => asserts value is string;
|
||||
array: <T = unknown>(value: unknown, assertion?: (element: unknown) => asserts element is T) => asserts value is T[];
|
||||
buffer: (value: unknown) => asserts value is Buffer;
|
||||
blob: (value: unknown) => asserts value is Blob;
|
||||
nullOrUndefined: (value: unknown) => asserts value is null | undefined;
|
||||
object: <Key extends keyof any = string, Value = unknown>(value: unknown) => asserts value is Record<Key, Value>;
|
||||
iterable: <T = unknown>(value: unknown) => asserts value is Iterable<T>;
|
||||
asyncIterable: <T = unknown>(value: unknown) => asserts value is AsyncIterable<T>;
|
||||
generator: (value: unknown) => asserts value is Generator;
|
||||
asyncGenerator: (value: unknown) => asserts value is AsyncGenerator;
|
||||
nativePromise: <T = unknown>(value: unknown) => asserts value is Promise<T>;
|
||||
promise: <T = unknown>(value: unknown) => asserts value is Promise<T>;
|
||||
generatorFunction: (value: unknown) => asserts value is GeneratorFunction;
|
||||
asyncGeneratorFunction: (value: unknown) => asserts value is AsyncGeneratorFunction;
|
||||
asyncFunction: (value: unknown) => asserts value is Function;
|
||||
boundFunction: (value: unknown) => asserts value is Function;
|
||||
regExp: (value: unknown) => asserts value is RegExp;
|
||||
date: (value: unknown) => asserts value is Date;
|
||||
error: (value: unknown) => asserts value is Error;
|
||||
map: <Key = unknown, Value = unknown>(value: unknown) => asserts value is Map<Key, Value>;
|
||||
set: <T = unknown>(value: unknown) => asserts value is Set<T>;
|
||||
weakMap: <Key extends object = object, Value = unknown>(value: unknown) => asserts value is WeakMap<Key, Value>;
|
||||
weakSet: <T extends object = object>(value: unknown) => asserts value is WeakSet<T>;
|
||||
weakRef: <T extends object = object>(value: unknown) => asserts value is WeakRef<T>;
|
||||
int8Array: (value: unknown) => asserts value is Int8Array;
|
||||
uint8Array: (value: unknown) => asserts value is Uint8Array;
|
||||
uint8ClampedArray: (value: unknown) => asserts value is Uint8ClampedArray;
|
||||
int16Array: (value: unknown) => asserts value is Int16Array;
|
||||
uint16Array: (value: unknown) => asserts value is Uint16Array;
|
||||
int32Array: (value: unknown) => asserts value is Int32Array;
|
||||
uint32Array: (value: unknown) => asserts value is Uint32Array;
|
||||
float32Array: (value: unknown) => asserts value is Float32Array;
|
||||
float64Array: (value: unknown) => asserts value is Float64Array;
|
||||
bigInt64Array: (value: unknown) => asserts value is BigInt64Array;
|
||||
bigUint64Array: (value: unknown) => asserts value is BigUint64Array;
|
||||
arrayBuffer: (value: unknown) => asserts value is ArrayBuffer;
|
||||
sharedArrayBuffer: (value: unknown) => asserts value is SharedArrayBuffer;
|
||||
dataView: (value: unknown) => asserts value is DataView;
|
||||
enumCase: <T = unknown>(value: unknown, targetEnum: T) => asserts value is T[keyof T];
|
||||
urlInstance: (value: unknown) => asserts value is URL;
|
||||
urlString: (value: unknown) => asserts value is string;
|
||||
truthy: (value: unknown) => asserts value is unknown;
|
||||
falsy: (value: unknown) => asserts value is unknown;
|
||||
nan: (value: unknown) => asserts value is unknown;
|
||||
primitive: (value: unknown) => asserts value is Primitive;
|
||||
integer: (value: unknown) => asserts value is number;
|
||||
safeInteger: (value: unknown) => asserts value is number;
|
||||
plainObject: <Value = unknown>(value: unknown) => asserts value is Record<PropertyKey, Value>;
|
||||
typedArray: (value: unknown) => asserts value is TypedArray;
|
||||
arrayLike: <T = unknown>(value: unknown) => asserts value is ArrayLike<T>;
|
||||
domElement: (value: unknown) => asserts value is HTMLElement;
|
||||
observable: (value: unknown) => asserts value is ObservableLike;
|
||||
nodeStream: (value: unknown) => asserts value is NodeStream;
|
||||
infinite: (value: unknown) => asserts value is number;
|
||||
emptyArray: (value: unknown) => asserts value is never[];
|
||||
nonEmptyArray: (value: unknown) => asserts value is [unknown, ...unknown[]];
|
||||
emptyString: (value: unknown) => asserts value is '';
|
||||
emptyStringOrWhitespace: (value: unknown) => asserts value is string;
|
||||
nonEmptyString: (value: unknown) => asserts value is string;
|
||||
nonEmptyStringAndNotWhitespace: (value: unknown) => asserts value is string;
|
||||
emptyObject: <Key extends keyof any = string>(value: unknown) => asserts value is Record<Key, never>;
|
||||
nonEmptyObject: <Key extends keyof any = string, Value = unknown>(value: unknown) => asserts value is Record<Key, Value>;
|
||||
emptySet: (value: unknown) => asserts value is Set<never>;
|
||||
nonEmptySet: <T = unknown>(value: unknown) => asserts value is Set<T>;
|
||||
emptyMap: (value: unknown) => asserts value is Map<never, never>;
|
||||
nonEmptyMap: <Key = unknown, Value = unknown>(value: unknown) => asserts value is Map<Key, Value>;
|
||||
propertyKey: (value: unknown) => asserts value is PropertyKey;
|
||||
formData: (value: unknown) => asserts value is FormData;
|
||||
urlSearchParams: (value: unknown) => asserts value is URLSearchParams;
|
||||
evenInteger: (value: number) => asserts value is number;
|
||||
oddInteger: (value: number) => asserts value is number;
|
||||
directInstanceOf: <T>(instance: unknown, class_: Class<T>) => asserts instance is T;
|
||||
inRange: (value: number, range: number | number[]) => asserts value is number;
|
||||
any: (predicate: Predicate | Predicate[], ...values: unknown[]) => void | never;
|
||||
all: (predicate: Predicate, ...values: unknown[]) => void | never;
|
||||
}
|
||||
export declare const assert: Assert;
|
||||
export default is;
|
||||
export type { Class, TypedArray, ObservableLike, Primitive } from './types.js';
|
||||
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2014 Mozilla
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('flip', require('../flip'), require('./_falseOptions'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,22 @@
|
||||
Copyright (c) 2011 Dominic Tarr
|
||||
|
||||
Permission is hereby granted, free of charge,
|
||||
to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify,
|
||||
merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom
|
||||
the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
||||
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,118 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const once_1 = __importDefault(require("@tootallnate/once"));
|
||||
const ftp_1 = __importDefault(require("ftp"));
|
||||
const path_1 = require("path");
|
||||
const debug_1 = __importDefault(require("debug"));
|
||||
const notfound_1 = __importDefault(require("./notfound"));
|
||||
const notmodified_1 = __importDefault(require("./notmodified"));
|
||||
const debug = debug_1.default('get-uri:ftp');
|
||||
/**
|
||||
* Returns a Readable stream from an "ftp:" URI.
|
||||
*/
|
||||
function get(parsed, opts) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const { cache } = opts;
|
||||
const filepath = parsed.pathname;
|
||||
let lastModified = null;
|
||||
if (!filepath) {
|
||||
throw new TypeError('No "pathname"!');
|
||||
}
|
||||
const client = new ftp_1.default();
|
||||
client.once('greeting', (greeting) => {
|
||||
debug('FTP greeting: %o', greeting);
|
||||
});
|
||||
function onend() {
|
||||
// close the FTP client socket connection
|
||||
client.end();
|
||||
}
|
||||
try {
|
||||
opts.host = parsed.hostname || parsed.host || 'localhost';
|
||||
opts.port = parseInt(parsed.port || '0', 10) || 21;
|
||||
opts.debug = debug;
|
||||
if (parsed.auth) {
|
||||
const [user, password] = parsed.auth.split(':');
|
||||
opts.user = user;
|
||||
opts.password = password;
|
||||
}
|
||||
// await cb(_ => client.connect(opts, _));
|
||||
const readyPromise = once_1.default(client, 'ready');
|
||||
client.connect(opts);
|
||||
yield readyPromise;
|
||||
// first we have to figure out the Last Modified date.
|
||||
// try the MDTM command first, which is an optional extension command.
|
||||
try {
|
||||
lastModified = yield new Promise((resolve, reject) => {
|
||||
client.lastMod(filepath, (err, res) => {
|
||||
return err ? reject(err) : resolve(res);
|
||||
});
|
||||
});
|
||||
}
|
||||
catch (err) {
|
||||
// handle the "file not found" error code
|
||||
if (err.code === 550) {
|
||||
throw new notfound_1.default();
|
||||
}
|
||||
}
|
||||
if (!lastModified) {
|
||||
// Try to get the last modified date via the LIST command (uses
|
||||
// more bandwidth, but is more compatible with older FTP servers
|
||||
const list = yield new Promise((resolve, reject) => {
|
||||
client.list(path_1.dirname(filepath), (err, res) => {
|
||||
return err ? reject(err) : resolve(res);
|
||||
});
|
||||
});
|
||||
// attempt to find the "entry" with a matching "name"
|
||||
const name = path_1.basename(filepath);
|
||||
const entry = list.find(e => e.name === name);
|
||||
if (entry) {
|
||||
lastModified = entry.date;
|
||||
}
|
||||
}
|
||||
if (lastModified) {
|
||||
if (isNotModified()) {
|
||||
throw new notmodified_1.default();
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw new notfound_1.default();
|
||||
}
|
||||
// XXX: a small timeout seemed necessary otherwise FTP servers
|
||||
// were returning empty sockets for the file occasionally
|
||||
// setTimeout(client.get.bind(client, filepath, onfile), 10);
|
||||
const rs = (yield new Promise((resolve, reject) => {
|
||||
client.get(filepath, (err, res) => {
|
||||
return err ? reject(err) : resolve(res);
|
||||
});
|
||||
}));
|
||||
rs.once('end', onend);
|
||||
rs.lastModified = lastModified;
|
||||
return rs;
|
||||
}
|
||||
catch (err) {
|
||||
client.destroy();
|
||||
throw err;
|
||||
}
|
||||
// called when `lastModified` is set, and a "cache" stream was provided
|
||||
function isNotModified() {
|
||||
if (cache && cache.lastModified && lastModified) {
|
||||
return +cache.lastModified === +lastModified;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
exports.default = get;
|
||||
//# sourceMappingURL=ftp.js.map
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('unzip', require('../unzip'), require('./_falseOptions'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,46 @@
|
||||
// Copyright Joyent, Inc. and other Node contributors.
|
||||
//
|
||||
// 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.
|
||||
|
||||
// a passthrough stream.
|
||||
// basically just the most minimal sort of Transform stream.
|
||||
// Every written chunk gets output as-is.
|
||||
|
||||
module.exports = PassThrough;
|
||||
|
||||
var Transform = require('./_stream_transform');
|
||||
|
||||
/*<replacement>*/
|
||||
var util = require('core-util-is');
|
||||
util.inherits = require('inherits');
|
||||
/*</replacement>*/
|
||||
|
||||
util.inherits(PassThrough, Transform);
|
||||
|
||||
function PassThrough(options) {
|
||||
if (!(this instanceof PassThrough))
|
||||
return new PassThrough(options);
|
||||
|
||||
Transform.call(this, options);
|
||||
}
|
||||
|
||||
PassThrough.prototype._transform = function(chunk, encoding, cb) {
|
||||
cb(null, chunk);
|
||||
};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,10 @@
|
||||
import Block from '../../render_dom/Block';
|
||||
import Component from '../../Component';
|
||||
import Node from './Node';
|
||||
import { INode } from '../interfaces';
|
||||
export default class AbstractBlock extends Node {
|
||||
block: Block;
|
||||
children: INode[];
|
||||
constructor(component: Component, parent: any, scope: any, info: any);
|
||||
warn_if_empty_block(): void;
|
||||
}
|
||||
Reference in New Issue
Block a user