new license file version [CI SKIP]

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

View File

@@ -0,0 +1,31 @@
'use strict';
const os = require('os');
const fs = require('fs');
const isDocker = require('is-docker');
const isWsl = () => {
if (process.platform !== 'linux') {
return false;
}
if (os.release().toLowerCase().includes('microsoft')) {
if (isDocker()) {
return false;
}
return true;
}
try {
return fs.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft') ?
!isDocker() : false;
} catch (_) {
return false;
}
};
if (process.env.__IS_WSL_TEST__) {
module.exports = isWsl;
} else {
module.exports = isWsl();
}

View File

@@ -0,0 +1,2 @@
if(typeof cptable === 'undefined') cptable = {};
cptable[20278] = (function(){ var d = "ŸŸ\u0002\u0003œ\t†—Ž\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013…\b‡\u0018\u0019’\u001c\u001d\u001e\u001f€‚ƒ„\n\u0017\u001bˆ‰Š‹Œ\u0005\u0006\u0007‘\u0016“”•–\u0004˜™š›\u0014\u0015ž\u001a  â{àáã}çñ§.<(+!&`êëèíîïìߤÅ*);^-/Â#ÀÁÃ$ÇÑö,%_>?ø\\ÊËÈÍÎÏÌé:ÄÖ'=\"Øabcdefghi«»ðýþ±°jklmnopqrªºæ¸Æ]µüstuvwxyz¡¿ÐÝÞ®¢£¥·©[¶¼½¾¬|¯¨´×äABCDEFGHI­ô¦òóõåJKLMNOPQR¹û~ùúÿÉ÷STUVWXYZ²Ô@ÒÓÕ0123456789³ÛÜÙڟ", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {"enc": e, "dec": D }; })();

View File

@@ -0,0 +1,426 @@
'use strict'
module.exports = Yallist
Yallist.Node = Node
Yallist.create = Yallist
function Yallist (list) {
var self = this
if (!(self instanceof Yallist)) {
self = new Yallist()
}
self.tail = null
self.head = null
self.length = 0
if (list && typeof list.forEach === 'function') {
list.forEach(function (item) {
self.push(item)
})
} else if (arguments.length > 0) {
for (var i = 0, l = arguments.length; i < l; i++) {
self.push(arguments[i])
}
}
return self
}
Yallist.prototype.removeNode = function (node) {
if (node.list !== this) {
throw new Error('removing node which does not belong to this list')
}
var next = node.next
var prev = node.prev
if (next) {
next.prev = prev
}
if (prev) {
prev.next = next
}
if (node === this.head) {
this.head = next
}
if (node === this.tail) {
this.tail = prev
}
node.list.length--
node.next = null
node.prev = null
node.list = null
return next
}
Yallist.prototype.unshiftNode = function (node) {
if (node === this.head) {
return
}
if (node.list) {
node.list.removeNode(node)
}
var head = this.head
node.list = this
node.next = head
if (head) {
head.prev = node
}
this.head = node
if (!this.tail) {
this.tail = node
}
this.length++
}
Yallist.prototype.pushNode = function (node) {
if (node === this.tail) {
return
}
if (node.list) {
node.list.removeNode(node)
}
var tail = this.tail
node.list = this
node.prev = tail
if (tail) {
tail.next = node
}
this.tail = node
if (!this.head) {
this.head = node
}
this.length++
}
Yallist.prototype.push = function () {
for (var i = 0, l = arguments.length; i < l; i++) {
push(this, arguments[i])
}
return this.length
}
Yallist.prototype.unshift = function () {
for (var i = 0, l = arguments.length; i < l; i++) {
unshift(this, arguments[i])
}
return this.length
}
Yallist.prototype.pop = function () {
if (!this.tail) {
return undefined
}
var res = this.tail.value
this.tail = this.tail.prev
if (this.tail) {
this.tail.next = null
} else {
this.head = null
}
this.length--
return res
}
Yallist.prototype.shift = function () {
if (!this.head) {
return undefined
}
var res = this.head.value
this.head = this.head.next
if (this.head) {
this.head.prev = null
} else {
this.tail = null
}
this.length--
return res
}
Yallist.prototype.forEach = function (fn, thisp) {
thisp = thisp || this
for (var walker = this.head, i = 0; walker !== null; i++) {
fn.call(thisp, walker.value, i, this)
walker = walker.next
}
}
Yallist.prototype.forEachReverse = function (fn, thisp) {
thisp = thisp || this
for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
fn.call(thisp, walker.value, i, this)
walker = walker.prev
}
}
Yallist.prototype.get = function (n) {
for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
// abort out of the list early if we hit a cycle
walker = walker.next
}
if (i === n && walker !== null) {
return walker.value
}
}
Yallist.prototype.getReverse = function (n) {
for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
// abort out of the list early if we hit a cycle
walker = walker.prev
}
if (i === n && walker !== null) {
return walker.value
}
}
Yallist.prototype.map = function (fn, thisp) {
thisp = thisp || this
var res = new Yallist()
for (var walker = this.head; walker !== null;) {
res.push(fn.call(thisp, walker.value, this))
walker = walker.next
}
return res
}
Yallist.prototype.mapReverse = function (fn, thisp) {
thisp = thisp || this
var res = new Yallist()
for (var walker = this.tail; walker !== null;) {
res.push(fn.call(thisp, walker.value, this))
walker = walker.prev
}
return res
}
Yallist.prototype.reduce = function (fn, initial) {
var acc
var walker = this.head
if (arguments.length > 1) {
acc = initial
} else if (this.head) {
walker = this.head.next
acc = this.head.value
} else {
throw new TypeError('Reduce of empty list with no initial value')
}
for (var i = 0; walker !== null; i++) {
acc = fn(acc, walker.value, i)
walker = walker.next
}
return acc
}
Yallist.prototype.reduceReverse = function (fn, initial) {
var acc
var walker = this.tail
if (arguments.length > 1) {
acc = initial
} else if (this.tail) {
walker = this.tail.prev
acc = this.tail.value
} else {
throw new TypeError('Reduce of empty list with no initial value')
}
for (var i = this.length - 1; walker !== null; i--) {
acc = fn(acc, walker.value, i)
walker = walker.prev
}
return acc
}
Yallist.prototype.toArray = function () {
var arr = new Array(this.length)
for (var i = 0, walker = this.head; walker !== null; i++) {
arr[i] = walker.value
walker = walker.next
}
return arr
}
Yallist.prototype.toArrayReverse = function () {
var arr = new Array(this.length)
for (var i = 0, walker = this.tail; walker !== null; i++) {
arr[i] = walker.value
walker = walker.prev
}
return arr
}
Yallist.prototype.slice = function (from, to) {
to = to || this.length
if (to < 0) {
to += this.length
}
from = from || 0
if (from < 0) {
from += this.length
}
var ret = new Yallist()
if (to < from || to < 0) {
return ret
}
if (from < 0) {
from = 0
}
if (to > this.length) {
to = this.length
}
for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
walker = walker.next
}
for (; walker !== null && i < to; i++, walker = walker.next) {
ret.push(walker.value)
}
return ret
}
Yallist.prototype.sliceReverse = function (from, to) {
to = to || this.length
if (to < 0) {
to += this.length
}
from = from || 0
if (from < 0) {
from += this.length
}
var ret = new Yallist()
if (to < from || to < 0) {
return ret
}
if (from < 0) {
from = 0
}
if (to > this.length) {
to = this.length
}
for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
walker = walker.prev
}
for (; walker !== null && i > from; i--, walker = walker.prev) {
ret.push(walker.value)
}
return ret
}
Yallist.prototype.splice = function (start, deleteCount /*, ...nodes */) {
if (start > this.length) {
start = this.length - 1
}
if (start < 0) {
start = this.length + start;
}
for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
walker = walker.next
}
var ret = []
for (var i = 0; walker && i < deleteCount; i++) {
ret.push(walker.value)
walker = this.removeNode(walker)
}
if (walker === null) {
walker = this.tail
}
if (walker !== this.head && walker !== this.tail) {
walker = walker.prev
}
for (var i = 2; i < arguments.length; i++) {
walker = insert(this, walker, arguments[i])
}
return ret;
}
Yallist.prototype.reverse = function () {
var head = this.head
var tail = this.tail
for (var walker = head; walker !== null; walker = walker.prev) {
var p = walker.prev
walker.prev = walker.next
walker.next = p
}
this.head = tail
this.tail = head
return this
}
function insert (self, node, value) {
var inserted = node === self.head ?
new Node(value, null, node, self) :
new Node(value, node, node.next, self)
if (inserted.next === null) {
self.tail = inserted
}
if (inserted.prev === null) {
self.head = inserted
}
self.length++
return inserted
}
function push (self, item) {
self.tail = new Node(item, self.tail, null, self)
if (!self.head) {
self.head = self.tail
}
self.length++
}
function unshift (self, item) {
self.head = new Node(item, null, self.head, self)
if (!self.tail) {
self.tail = self.head
}
self.length++
}
function Node (value, prev, next, list) {
if (!(this instanceof Node)) {
return new Node(value, prev, next, list)
}
this.list = list
this.value = value
if (prev) {
prev.next = this
this.prev = prev
} else {
this.prev = null
}
if (next) {
next.prev = this
this.next = next
} else {
this.next = null
}
}
try {
// add if support for Symbol.iterator is present
require('./iterator.js')(Yallist)
} catch (er) {}

View File

@@ -0,0 +1,32 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = () => {
return {
async style({ content, attributes, filename }) {
const { transformer } = await Promise.resolve().then(() => __importStar(require('../transformers/globalStyle')));
if (!attributes.global) {
return { code: content };
}
return transformer({ content, filename, attributes });
},
};
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"SubscriptionLoggable.d.ts","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLoggable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,qBAAa,oBAAoB;IACxB,aAAa,EAAE,eAAe,EAAE,CAAM;IAE7C,SAAS,EAAE,SAAS,CAAC;IAErB,kBAAkB,IAAI,MAAM;IAK5B,oBAAoB,CAAC,KAAK,EAAE,MAAM;CAQnC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"GetOption.d.ts","sourceRoot":"","sources":["../../../../../../packages/ecma402-abstract/GetOption.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,CAAC,EAC9D,IAAI,EAAE,CAAC,EACP,IAAI,EAAE,CAAC,EACP,IAAI,EAAE,QAAQ,GAAG,SAAS,EAC1B,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,SAAS,EAC1B,QAAQ,EAAE,CAAC,GACV,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAqB9B"}

View File

@@ -0,0 +1,164 @@
/**
* Escapes a character if it has a special meaning in regular expressions
* and returns the character as is if it doesn't
*/
function escapeRegExpChar(char) {
if (char === '-' ||
char === '^' ||
char === '$' ||
char === '+' ||
char === '.' ||
char === '(' ||
char === ')' ||
char === '|' ||
char === '[' ||
char === ']' ||
char === '{' ||
char === '}' ||
char === '*' ||
char === '?' ||
char === '\\') {
return "\\" + char;
}
else {
return char;
}
}
/**
* Escapes all characters in a given string that have a special meaning in regular expressions
*/
function escapeRegExpString(str) {
var result = '';
for (var i = 0; i < str.length; i++) {
result += escapeRegExpChar(str[i]);
}
return result;
}
/**
* Transforms one or more glob patterns into a RegExp pattern
*/
function transform(pattern, separator) {
if (separator === void 0) { separator = true; }
if (Array.isArray(pattern)) {
var regExpPatterns = pattern.map(function (p) { return "^" + transform(p, separator) + "$"; });
return "(?:" + regExpPatterns.join('|') + ")";
}
var separatorSplitter = '';
var separatorMatcher = '';
var wildcard = '.';
if (separator === true) {
separatorSplitter = '/';
separatorMatcher = '[/\\\\]';
wildcard = '[^/\\\\]';
}
else if (separator) {
separatorSplitter = separator;
separatorMatcher = escapeRegExpString(separatorSplitter);
if (separatorMatcher.length > 1) {
separatorMatcher = "(?:" + separatorMatcher + ")";
wildcard = "((?!" + separatorMatcher + ").)";
}
else {
wildcard = "[^" + separatorMatcher + "]";
}
}
var requiredSeparator = separator ? separatorMatcher + "+?" : '';
var optionalSeparator = separator ? separatorMatcher + "*?" : '';
var segments = separator ? pattern.split(separatorSplitter) : [pattern];
var result = '';
for (var s = 0; s < segments.length; s++) {
var segment = segments[s];
var nextSegment = segments[s + 1];
var currentSeparator = '';
if (!segment && s > 0) {
continue;
}
if (separator) {
if (s === segments.length - 1) {
currentSeparator = optionalSeparator;
}
else if (nextSegment !== '**') {
currentSeparator = requiredSeparator;
}
else {
currentSeparator = '';
}
}
if (separator && segment === '**') {
if (currentSeparator) {
result += s === 0 ? '' : currentSeparator;
result += "(?:" + wildcard + "*?" + currentSeparator + ")*?";
}
continue;
}
for (var c = 0; c < segment.length; c++) {
var char = segment[c];
if (char === '\\') {
if (c < segment.length - 1) {
result += escapeRegExpChar(segment[c + 1]);
c++;
}
}
else if (char === '?') {
result += wildcard;
}
else if (char === '*') {
result += wildcard + "*?";
}
else {
result += escapeRegExpChar(char);
}
}
result += currentSeparator;
}
return result;
}
function isMatch(regexp, sample) {
if (typeof sample !== 'string') {
throw new TypeError("Sample must be a string, but " + typeof sample + " given");
}
return regexp.test(sample);
}
/**
* Compiles one or more glob patterns into a RegExp and returns an isMatch function.
* The isMatch function takes a sample string as its only argument and returns `true`
* if the string matches the pattern(s).
*
* ```js
* wildcardMatch('src/*.js')('src/index.js') //=> true
* ```
*
* ```js
* const isMatch = wildcardMatch('*.example.com', '.')
* isMatch('foo.example.com') //=> true
* isMatch('foo.bar.com') //=> false
* ```
*/
function wildcardMatch(pattern, options) {
if (typeof pattern !== 'string' && !Array.isArray(pattern)) {
throw new TypeError("The first argument must be a single pattern string or an array of patterns, but " + typeof pattern + " given");
}
if (typeof options === 'string' || typeof options === 'boolean') {
options = { separator: options };
}
if (arguments.length === 2 &&
!(typeof options === 'undefined' ||
(typeof options === 'object' && options !== null && !Array.isArray(options)))) {
throw new TypeError("The second argument must be an options object or a string/boolean separator, but " + typeof options + " given");
}
options = options || {};
if (options.separator === '\\') {
throw new Error('\\ is not a valid separator because it is used for escaping. Try setting the separator to `true` instead');
}
var regexpPattern = transform(pattern, options.separator);
var regexp = new RegExp("^" + regexpPattern + "$", options.flags);
var fn = isMatch.bind(null, regexp);
fn.options = options;
fn.pattern = pattern;
fn.regexp = regexp;
return fn;
}
export default wildcardMatch;
//# sourceMappingURL=index.es.mjs.map

View File

@@ -0,0 +1,138 @@
import { RangePosition } from './css-syntax-error.js'
import Node from './node.js'
export interface WarningOptions {
/**
* CSS node that caused the warning.
*/
node?: Node
/**
* Word in CSS source that caused the warning.
*/
word?: string
/**
* Start index, inclusive, in CSS node string that caused the warning.
*/
index?: number
/**
* End index, exclusive, in CSS node string that caused the warning.
*/
endIndex?: number
/**
* Start position, inclusive, in CSS node string that caused the warning.
*/
start?: RangePosition
/**
* End position, exclusive, in CSS node string that caused the warning.
*/
end?: RangePosition
/**
* Name of the plugin that created this warning. `Result#warn` fills
* this property automatically.
*/
plugin?: string
}
/**
* Represents a plugins warning. It can be created using `Node#warn`.
*
* ```js
* if (decl.important) {
* decl.warn(result, 'Avoid !important', { word: '!important' })
* }
* ```
*/
export default class Warning {
/**
* Type to filter warnings from `Result#messages`.
* Always equal to `"warning"`.
*/
type: 'warning'
/**
* The warning message.
*
* ```js
* warning.text //=> 'Try to avoid !important'
* ```
*/
text: string
/**
* The name of the plugin that created this warning.
* When you call `Node#warn` it will fill this property automatically.
*
* ```js
* warning.plugin //=> 'postcss-important'
* ```
*/
plugin: string
/**
* Contains the CSS node that caused the warning.
*
* ```js
* warning.node.toString() //=> 'color: white !important'
* ```
*/
node: Node
/**
* Line for inclusive start position in the input file with this warnings source.
*
* ```js
* warning.line //=> 5
* ```
*/
line: number
/**
* Column for inclusive start position in the input file with this warnings source.
*
* ```js
* warning.column //=> 6
* ```
*/
column: number
/**
* Line for exclusive end position in the input file with this warnings source.
*
* ```js
* warning.endLine //=> 6
* ```
*/
endLine?: number
/**
* Column for exclusive end position in the input file with this warnings source.
*
* ```js
* warning.endColumn //=> 4
* ```
*/
endColumn?: number
/**
* @param text Warning message.
* @param opts Warning options.
*/
constructor(text: string, opts?: WarningOptions)
/**
* Returns a warning position and message.
*
* ```js
* warning.toString() //=> 'postcss-lint:a.css:10:14: Avoid !important'
* ```
*
* @return Warning position and message.
*/
toString(): string
}

View File

@@ -0,0 +1,29 @@
import { AsyncAction } from './AsyncAction';
import { animationFrameProvider } from './animationFrameProvider';
export class AnimationFrameAction extends AsyncAction {
constructor(scheduler, work) {
super(scheduler, work);
this.scheduler = scheduler;
this.work = work;
}
requestAsyncId(scheduler, id, delay = 0) {
if (delay !== null && delay > 0) {
return super.requestAsyncId(scheduler, id, delay);
}
scheduler.actions.push(this);
return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(() => scheduler.flush(undefined)));
}
recycleAsyncId(scheduler, id, delay = 0) {
var _a;
if (delay != null ? delay > 0 : this.delay > 0) {
return super.recycleAsyncId(scheduler, id, delay);
}
const { actions } = scheduler;
if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) {
animationFrameProvider.cancelAnimationFrame(id);
scheduler._scheduled = undefined;
}
return undefined;
}
}
//# sourceMappingURL=AnimationFrameAction.js.map

View File

@@ -0,0 +1,29 @@
{
"root": true,
"extends": "@ljharb/eslint-config/node/0.4",
"rules": {
"array-element-newline": 0,
"complexity": 0,
"func-style": [2, "declaration"],
"max-lines-per-function": 0,
"max-nested-callbacks": 1,
"max-statements-per-line": 1,
"max-statements": 0,
"multiline-comment-style": 0,
"no-continue": 1,
"no-param-reassign": 1,
"no-restricted-syntax": 1,
"object-curly-newline": 0,
},
"overrides": [
{
"files": "test/**",
"rules": {
"camelcase": 0,
},
},
]
}

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-22 Ionică Bizău <bizauionica@gmail.com> (https://ionicabizau.net)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1 @@
{"version":3,"file":"getDirectory.d.ts","sourceRoot":"","sources":["../src/getDirectory.ts"],"names":[],"mappings":"AAGA,iBAAe,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAU7D;AAED,iBAAS,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAUlD;AAED,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC"}

View File

@@ -0,0 +1,4 @@
/** Used to lookup unminified function names. */
var realNames = {};
module.exports = realNames;

View File

@@ -0,0 +1,3 @@
"use strict";
module.exports = { isBoolean: require("./is-boolean") };

View File

@@ -0,0 +1,43 @@
{
"name": "fraction.js",
"title": "fraction.js",
"version": "4.2.0",
"homepage": "https://www.xarg.org/2014/03/rational-numbers-in-javascript/",
"bugs": "https://github.com/infusion/Fraction.js/issues",
"description": "A rational number library",
"keywords": [
"math",
"fraction",
"rational",
"rationals",
"number",
"parser",
"rational numbers"
],
"author": "Robert Eisele <robert@xarg.org> (http://www.xarg.org/)",
"main": "fraction",
"types": "./fraction.d.ts",
"private": false,
"readmeFilename": "README.md",
"directories": {
"example": "examples"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/infusion/Fraction.js.git"
},
"funding": {
"type": "patreon",
"url": "https://www.patreon.com/infusion"
},
"engines": {
"node": "*"
},
"scripts": {
"test": "mocha tests/*.js"
},
"devDependencies": {
"mocha": "*"
}
}

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./async').mapValuesSeries;

View File

@@ -0,0 +1,10 @@
"use strict";
module.exports = function () {
var dummyRegExp = /a/;
// We need to do check on instance and not on prototype due to how ES2015 spec evolved:
// https://github.com/tc39/ecma262/issues/262
// https://github.com/tc39/ecma262/pull/263
// https://bugs.chromium.org/p/v8/issues/detail?id=4617
return "unicode" in dummyRegExp;
};

View File

@@ -0,0 +1,7 @@
"use strict";
module.exports = function () {
var expm1 = Math.expm1;
if (typeof expm1 !== "function") return false;
return expm1(1).toFixed(15) === "1.718281828459045";
};

View File

@@ -0,0 +1,56 @@
# is-string <sup>[![Version Badge][2]][1]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][5]][6]
[![dev dependency status][7]][8]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][11]][1]
Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
## Example
```js
var isString = require('is-string');
var assert = require('assert');
assert.notOk(isString(undefined));
assert.notOk(isString(null));
assert.notOk(isString(false));
assert.notOk(isString(true));
assert.notOk(isString(function () {}));
assert.notOk(isString([]));
assert.notOk(isString({}));
assert.notOk(isString(/a/g));
assert.notOk(isString(new RegExp('a', 'g')));
assert.notOk(isString(new Date()));
assert.notOk(isString(42));
assert.notOk(isString(NaN));
assert.notOk(isString(Infinity));
assert.notOk(isString(new Number(42)));
assert.ok(isString('foo'));
assert.ok(isString(Object('foo')));
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[1]: https://npmjs.org/package/is-string
[2]: https://versionbadg.es/inspect-js/is-string.svg
[5]: https://david-dm.org/inspect-js/is-string.svg
[6]: https://david-dm.org/inspect-js/is-string
[7]: https://david-dm.org/inspect-js/is-string/dev-status.svg
[8]: https://david-dm.org/inspect-js/is-string#info=devDependencies
[11]: https://nodei.co/npm/is-string.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/is-string.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/is-string.svg
[downloads-url]: https://npm-stat.com/charts.html?package=is-string
[codecov-image]: https://codecov.io/gh/inspect-js/is-string/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/inspect-js/is-string/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-string
[actions-url]: https://github.com/inspect-js/is-string/actions

View File

@@ -0,0 +1,29 @@
var baseGetTag = require('./_baseGetTag'),
isObjectLike = require('./isObjectLike');
/** `Object#toString` result references. */
var boolTag = '[object Boolean]';
/**
* Checks if `value` is classified as a boolean primitive or object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
* @example
*
* _.isBoolean(false);
* // => true
*
* _.isBoolean(null);
* // => false
*/
function isBoolean(value) {
return value === true || value === false ||
(isObjectLike(value) && baseGetTag(value) == boolTag);
}
module.exports = isBoolean;

View File

@@ -0,0 +1 @@
{"version":3,"file":"bindCallback.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/bindCallback.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,wBAAgB,YAAY,CAC1B,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,EACtC,cAAc,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACvC,SAAS,CAAC,EAAE,aAAa,GACxB,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC;AAGvC,wBAAgB,YAAY,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACrF,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,KAAK,IAAI,EAC5D,aAAa,CAAC,EAAE,aAAa,GAC5B,CAAC,GAAG,GAAG,EAAE,CAAC,KAAK,UAAU,CAAC,CAAC,SAAS,EAAE,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC"}

View File

@@ -0,0 +1 @@
{"name":"function-bind","version":"1.1.1","files":{".npmignore":{"checkedAt":1678883669576,"integrity":"sha512-nSkYiAg7Exwyqg8nETgp4ydwowt8+2VKKbhpo6oxCAxG0IOd2T7PQtF6Mg7zurDrysQKqgO2AsdQNg7Kzj7IEg==","mode":420,"size":252},"LICENSE":{"checkedAt":1678883669576,"integrity":"sha512-DP736TUvxRfO5k0dKGb3amZTZVVIPs9+rz0VjoAN54f92zXRiVXm6NWjnKKpE0dmT2Ejf1lX81mVnduJW7cigw==","mode":420,"size":1052},"README.md":{"checkedAt":1678883669576,"integrity":"sha512-TXdWxSVd2pvhUcaR8qknvK8M+R/qsRNIjy9NSKEzcSFBdSaYdFtYT9U5tbHSw0aTwdoN7QUpcL8995EYa94R9g==","mode":420,"size":1488},"implementation.js":{"checkedAt":1678883669576,"integrity":"sha512-SepKkNWxkRD5KbwpaiP0VTfHHWWsx/bAPe+IkSyIWzejEdHOkkoTeS3+S+D8fUGIRxasVTAsDyeDBl003CpV6g==","mode":420,"size":1463},"index.js":{"checkedAt":1678883669576,"integrity":"sha512-nQ+tiyupbZSI41R2+fR8oNgaLdcAL47y7yVj+GF4mm8ElZCwvvIybC5RPp4evwBdcf7W+PbNVPkbdt6QMGVPPQ==","mode":420,"size":126},".travis.yml":{"checkedAt":1678883669576,"integrity":"sha512-5G/3GweLnC4l/+8tjCMT9UQE0QJnFXZauFoBtkX7efDK5I1uvQ+kkKzHFk4dcrvZu+M5LMLVNdeBUteJRh9EDg==","mode":420,"size":5451},"package.json":{"checkedAt":1678883669576,"integrity":"sha512-rDYy3W+cfn4KSNDuXZOdReBs2BkUfYgayE+xPw3FbF6m5GA6z5ACUjssMH84hdN07Au2sqVc6WrleuXtNhSmsw==","mode":420,"size":1498},".eslintrc":{"checkedAt":1678883669577,"integrity":"sha512-srtvSRjqp00BZ0gWAUtLOQiV0T3clo7IkFuBxgRsRuhyP7OvItnXHv7N6uogL4bnkSxhw88qIU1XnlGgoe5DKA==","mode":420,"size":231},".editorconfig":{"checkedAt":1678883669577,"integrity":"sha512-E+E+Jt9mMqQ3/p527H7Vvi+iad5ecPWcLdf+X2evqu+kHSBzo+gZ1clKPsY18+EBIxYx0S6rmmGzHTGeLDPW8Q==","mode":420,"size":286},".jscs.json":{"checkedAt":1678883669579,"integrity":"sha512-HChZ/lTIQO0w1vdzGhNGKauw3mmfPoe1jsqQsHt4FaDCuCgt+w1juR0oLgkVact4uNjr1PKsEncvvuRsWR8X3w==","mode":420,"size":4140},"test/index.js":{"checkedAt":1678883669581,"integrity":"sha512-m5Gb3Fr1E/8jhpUcum2j1d6dZtkHxNUCeIBZu1i1GPZm/WxfBENh1iUZEtVPhCpcMef8jvauBPHYnWjjgHHVIA==","mode":420,"size":8991},"test/.eslintrc":{"checkedAt":1678883669581,"integrity":"sha512-u0bDlhyxIq20wKmwiKK40D2c/vZOKPkMB43bLgmV3Vonp1q3peE+Aqi+zY+f9UdHqe3/tUtovh7Ul01HmWnVvA==","mode":420,"size":176}}}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H","2":"C K L G M N O"},C:{"1":"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 8 9 DC tB I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB EC FC"},D:{"1":"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 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"},E:{"1":"sB 6B 7B 8B 9B OC","2":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B"},F:{"1":"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 5 F B C G M N O w g x y z PC QC RC SC qB AC TC rB"},G:{"1":"sB 6B 7B 8B 9B","2":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B"},H:{"2":"oC"},I:{"2":"tB I f 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":"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:5,C:"Permissions API"};

View File

@@ -0,0 +1,37 @@
"use strict";
var callable = require("es5-ext/object/valid-callable")
, forEach = require("es5-ext/object/for-each")
, extensions = require("./lib/registered-extensions")
, configure = require("./lib/configure-map")
, resolveLength = require("./lib/resolve-length");
module.exports = function self(fn /*, options */) {
var options, length, conf;
callable(fn);
options = Object(arguments[1]);
if (options.async && options.promise) {
throw new Error("Options 'async' and 'promise' cannot be used together");
}
// Do not memoize already memoized function
if (hasOwnProperty.call(fn, "__memoized__") && !options.force) return fn;
// Resolve length;
length = resolveLength(options.length, fn.length, options.async && extensions.async);
// Configure cache map
conf = configure(fn, length, options);
// Bind eventual extensions
forEach(extensions, function (extFn, name) {
if (options[name]) extFn(options[name], conf, options);
});
if (self.__profiler__) self.__profiler__(conf);
conf.updateEnv();
return conf.memoized;
};

View File

@@ -0,0 +1,2 @@
Date,Advertiser,Advertiser ID,Advertiser Status,Advertiser Integration Code,Insertion Order,Insertion Order ID,Insertion Order Status,Insertion Order Integration Code,Partner Currency,Advertiser Currency,Clicks,% Clicks Leading to Conversions,Conversions per 1000 Impressions,CPM Fee 1 (Adv Currency),CPM Fee 1 (Partner Currency),CPM Fee 1 (USD),CPM Fee 2 (Adv Currency),CPM Fee 2 (Partner Currency),CPM Fee 2 (USD),Click Rate (CTR),Data Fees (Adv Currency),Data Fees (Partner Currency),Data Fees (USD),Impressions,% Impressions Leading to Conversions,Post-Click Conversions,Post-View Conversions,Media Cost (Advertiser Currency),Media Cost eCPA (PC) (Adv Currency),Media Cost eCPA (PC) (Partner Currency),Media Cost eCPA (PC) (USD),Media Cost eCPA (PV) (Adv Currency),Media Cost eCPA (PV) (Partner Currency),Media Cost eCPA (PV) (USD),Media Cost eCPA (Adv Currency),Media Cost eCPA (Partner Currency),Media Cost eCPA (USD),Video Media Cost eCPCV (Adv Currency),Video Media Cost eCPCV (Partner Currency),Video Media Cost eCPCV (USD),Media Cost eCPC (Adv Currency),Media Cost eCPC (Partner Currency),Media Cost eCPC (USD),Media Cost eCPM (Adv Currency),Media Cost eCPM (Partner Currency),Media Cost eCPM (USD),Media Cost (Partner Currency),Media Cost (USD),Media Fee 1 (Adv Currency),Media Fee 1 (Partner Currency),Media Fee 1 (USD),Media Fee 2 (Adv Currency),Media Fee 2 (Partner Currency),Media Fee 2 (USD),DCM Post-Click Revenue,DCM Post-View Revenue,Profit (Advertiser Currency),Profit eCPM (Adv Currency),Profit eCPM (Partner Currency),Profit eCPM (USD),Profit Margin,Profit (Partner Currency),Profit (USD),Revenue (Adv Currency),Revenue eCPA (PC) (Adv Currency),Revenue eCPA (PC) (Partner Currency),Revenue eCPA (PC) (USD),Revenue eCPA (PV) (Adv Currency),Revenue eCPA (PV) (Partner Currency),Revenue eCPA (PV) (USD),Revenue eCPA (Adv Currency),Revenue eCPA (Partner Currency),Revenue eCPA (USD),Video Revenue eCPCV (Adv Currency),Video Revenue eCPCV (Partner Currency),Video Revenue eCPCV (USD),Revenue eCPC (Adv Currency),Revenue eCPC (Partner Currency),Revenue eCPC (USD),Revenue eCPM (Adv Currency),Revenue eCPM (Partner Currency),Revenue eCPM (USD),Revenue (Partner Currency),Revenue (USD),Complete Views (Video),First-Quartile Views (Video),Fullscreens (Video),Midpoint Views (Video),Audio Mutes (Video),Pauses (Video),Starts (Video),Skips (Video),Third-Quartile Views (Video),Total Conversions,Total Media Cost (Advertiser Currency),Total Media Cost eCPA (PC) (Adv Currency),Total Media Cost eCPA (PC) (Partner Currency),Total Media Cost eCPA (PC) (USD),Total Media Cost eCPA (PV) (Adv Currency),Total Media Cost eCPA (PV) (Partner Currency),Total Media Cost eCPA (PV) (USD),Total Media Cost eCPA (Adv Currency),Total Media Cost eCPA (Partner Currency),Total Media Cost eCPA (USD),Total Video Media Cost eCPCV (Adv Currency),Total Video Media Cost eCPCV (Partner Currency),Total Video Media Cost eCPCV (USD),Total Media Cost eCPC (Adv Currency),Total Media Cost eCPC (Partner Currency),Total Media Cost eCPC (USD),Total Media Cost eCPM (Adv Currency),Total Media Cost eCPM (Partner Currency),Total Media Cost eCPM (USD),Total Media Cost (Partner Currency),Total Media Cost (USD),Completion Rate (Video)
8/26/16,1000 AAAAAA AAAA AAAA - AAAAAA - #AAAAAAAA - AAA,1161431,Active,,1010101010 - 1000 AAAAAAA AAAA AAAA - AAAAAAA AAAA - 28 Jun 2016 - AAAAAAA - #AAAAAAAA - AAAAAAA,2427940,Paused,CTR,CAD,CAD,2,0.00%,0,0,0,0,0,0,0,0.13%,0,0,0,1540,0.00%,0,0,7.476659,0,0,0,0,0,0,0,0,0,0,0,0,3.738329,3.73833,2.892061,4.854973,4.854973,3.755923,7.476659,5.784121,0.971966,0.971966,0.751936,0,0,0,0,0,10.031375,6.51388,6.51388,5.035214,54.26%,10.031375,7.75423,18.48,0,0,0,0,0,0,0,0,0,0,0,0,9.24,9.24,7.145143,12,12,9.279407,18.48,14.290287,0,0,0,0,0,0,0,0,0,0,8.448625,0,0,0,0,0,0,0,0,0,0,0,0,4.224312,4.224312,3.268029,5.48612,5.48612,4.244193,8.448625,6.536057,0.00%

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2436":"J D E F A B CC"},B:{"260":"N O","2436":"C K L G M","8196":"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:{"2":"DC tB I v J D E F A B C K L G M N O w g x EC FC","772":"0 1 2 3 4 5 6 7 8 9 y z AB BB CB DB EB FB GB","4100":"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"},D:{"2":"I v J D E F A B C","2564":"0 1 2 3 4 5 6 7 8 9 K L G M N O w g x y z AB BB CB DB EB FB GB HB IB","8196":"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","10244":"JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},E:{"1":"C K L G rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","16":"HC zB","2308":"A B 0B qB","2820":"I v J D E F IC JC KC LC"},F:{"2":"F B PC QC RC SC qB AC TC","16":"C","516":"rB","2564":"0 1 2 3 4 5 G M N O w g x y z","8196":"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","10244":"6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB"},G:{"1":"fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"zB UC BC","2820":"E VC WC XC YC ZC aC bC cC dC eC"},H:{"2":"oC"},I:{"2":"tB I pC qC rC sC BC","260":"f","2308":"tC uC"},J:{"2":"D","2308":"A"},K:{"2":"A B C qB AC","16":"rB","8196":"h"},L:{"8196":"H"},M:{"1028":"H"},N:{"2":"A B"},O:{"8196":"vC"},P:{"2052":"wC xC","2308":"I","8196":"g yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"8196":"1B"},R:{"8196":"9C"},S:{"4100":"AD BD"}},B:5,C:"Synchronous Clipboard API"};

View File

@@ -0,0 +1,11 @@
"use strict";
var value = require("../../object/valid-value")
, contains = require("./contains")
, filter = Array.prototype.filter;
module.exports = function (other) {
value(this);
value(other);
return filter.call(this, function (item) { return !contains.call(other, item); });
};

View File

@@ -0,0 +1,38 @@
import assertString from './util/assertString';
import isLuhnValid from './isLuhnNumber';
var cards = {
amex: /^3[47][0-9]{13}$/,
dinersclub: /^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,
discover: /^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,
jcb: /^(?:2131|1800|35\d{3})\d{11}$/,
mastercard: /^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,
// /^[25][1-7][0-9]{14}$/;
unionpay: /^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,
visa: /^(?:4[0-9]{12})(?:[0-9]{3,6})?$/
};
/* eslint-disable max-len */
var allCards = /^(?:4[0-9]{12}(?:[0-9]{3,6})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12,15}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|6[27][0-9]{14}|^(81[0-9]{14,17}))$/;
/* eslint-enable max-len */
export default function isCreditCard(card) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
assertString(card);
var provider = options.provider;
var sanitized = card.replace(/[- ]+/g, '');
if (provider && provider.toLowerCase() in cards) {
// specific provider in the list
if (!cards[provider.toLowerCase()].test(sanitized)) {
return false;
}
} else if (provider && !(provider.toLowerCase() in cards)) {
/* specific provider not in the list */
throw new Error("".concat(provider, " is not a valid credit card provider."));
} else if (!allCards.test(sanitized)) {
// no specific provider
return false;
}
return isLuhnValid(card);
}

View File

@@ -0,0 +1,209 @@
export as namespace acorn
export = acorn
declare namespace acorn {
function parse(input: string, options?: Options): Node
function parseExpressionAt(input: string, pos?: number, options?: Options): Node
function tokenizer(input: string, options?: Options): {
getToken(): Token
[Symbol.iterator](): Iterator<Token>
}
interface Options {
ecmaVersion?: 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020
sourceType?: 'script' | 'module'
onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void
onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void
allowReserved?: boolean | 'never'
allowReturnOutsideFunction?: boolean
allowImportExportEverywhere?: boolean
allowAwaitOutsideFunction?: boolean
allowHashBang?: boolean
locations?: boolean
onToken?: ((token: Token) => any) | Token[]
onComment?: ((
isBlock: boolean, text: string, start: number, end: number, startLoc?: Position,
endLoc?: Position
) => void) | Comment[]
ranges?: boolean
program?: Node
sourceFile?: string
directSourceFile?: string
preserveParens?: boolean
}
class Parser {
constructor(options: Options, input: string, startPos?: number)
parse(this: Parser): Node
static parse(this: typeof Parser, input: string, options?: Options): Node
static parseExpressionAt(this: typeof Parser, input: string, pos: number, options?: Options): Node
static tokenizer(this: typeof Parser, input: string, options?: Options): {
getToken(): Token
[Symbol.iterator](): Iterator<Token>
}
static extend(this: typeof Parser, ...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser
}
interface Position { line: number; column: number; offset: number }
const defaultOptions: Options
function getLineInfo(input: string, offset: number): Position
class SourceLocation {
start: Position
end: Position
source?: string | null
constructor(p: Parser, start: Position, end: Position)
}
class Node {
type: string
start: number
end: number
loc?: SourceLocation
sourceFile?: string
range?: [number, number]
constructor(parser: Parser, pos: number, loc?: SourceLocation)
}
class TokenType {
label: string
keyword: string
beforeExpr: boolean
startsExpr: boolean
isLoop: boolean
isAssign: boolean
prefix: boolean
postfix: boolean
binop: number
updateContext?: (prevType: TokenType) => void
constructor(label: string, conf?: any)
}
const tokTypes: {
num: TokenType
regexp: TokenType
string: TokenType
name: TokenType
eof: TokenType
bracketL: TokenType
bracketR: TokenType
braceL: TokenType
braceR: TokenType
parenL: TokenType
parenR: TokenType
comma: TokenType
semi: TokenType
colon: TokenType
dot: TokenType
question: TokenType
arrow: TokenType
template: TokenType
ellipsis: TokenType
backQuote: TokenType
dollarBraceL: TokenType
eq: TokenType
assign: TokenType
incDec: TokenType
prefix: TokenType
logicalOR: TokenType
logicalAND: TokenType
bitwiseOR: TokenType
bitwiseXOR: TokenType
bitwiseAND: TokenType
equality: TokenType
relational: TokenType
bitShift: TokenType
plusMin: TokenType
modulo: TokenType
star: TokenType
slash: TokenType
starstar: TokenType
_break: TokenType
_case: TokenType
_catch: TokenType
_continue: TokenType
_debugger: TokenType
_default: TokenType
_do: TokenType
_else: TokenType
_finally: TokenType
_for: TokenType
_function: TokenType
_if: TokenType
_return: TokenType
_switch: TokenType
_throw: TokenType
_try: TokenType
_var: TokenType
_const: TokenType
_while: TokenType
_with: TokenType
_new: TokenType
_this: TokenType
_super: TokenType
_class: TokenType
_extends: TokenType
_export: TokenType
_import: TokenType
_null: TokenType
_true: TokenType
_false: TokenType
_in: TokenType
_instanceof: TokenType
_typeof: TokenType
_void: TokenType
_delete: TokenType
}
class TokContext {
constructor(token: string, isExpr: boolean, preserveSpace: boolean, override?: (p: Parser) => void)
}
const tokContexts: {
b_stat: TokContext
b_expr: TokContext
b_tmpl: TokContext
p_stat: TokContext
p_expr: TokContext
q_tmpl: TokContext
f_expr: TokContext
}
function isIdentifierStart(code: number, astral?: boolean): boolean
function isIdentifierChar(code: number, astral?: boolean): boolean
interface AbstractToken {
}
interface Comment extends AbstractToken {
type: string
value: string
start: number
end: number
loc?: SourceLocation
range?: [number, number]
}
class Token {
type: TokenType
value: any
start: number
end: number
loc?: SourceLocation
range?: [number, number]
constructor(p: Parser)
}
function isNewLine(code: number): boolean
const lineBreak: RegExp
const lineBreakG: RegExp
const version: string
}

View File

@@ -0,0 +1,118 @@
// @ts-check
import { WalkerBase } from './walker.js';
/** @typedef { import('estree').BaseNode} BaseNode */
/** @typedef { import('./walker').WalkerContext} WalkerContext */
/** @typedef {(
* this: WalkerContext,
* node: BaseNode,
* parent: BaseNode,
* key: string,
* index: number
* ) => Promise<void>} AsyncHandler */
export class AsyncWalker extends WalkerBase {
/**
*
* @param {AsyncHandler} enter
* @param {AsyncHandler} leave
*/
constructor(enter, leave) {
super();
/** @type {AsyncHandler} */
this.enter = enter;
/** @type {AsyncHandler} */
this.leave = leave;
}
/**
*
* @param {BaseNode} node
* @param {BaseNode} parent
* @param {string} [prop]
* @param {number} [index]
* @returns {Promise<BaseNode>}
*/
async visit(node, parent, prop, index) {
if (node) {
if (this.enter) {
const _should_skip = this.should_skip;
const _should_remove = this.should_remove;
const _replacement = this.replacement;
this.should_skip = false;
this.should_remove = false;
this.replacement = null;
await this.enter.call(this.context, node, parent, prop, index);
if (this.replacement) {
node = this.replacement;
this.replace(parent, prop, index, node);
}
if (this.should_remove) {
this.remove(parent, prop, index);
}
const skipped = this.should_skip;
const removed = this.should_remove;
this.should_skip = _should_skip;
this.should_remove = _should_remove;
this.replacement = _replacement;
if (skipped) return node;
if (removed) return null;
}
for (const key in node) {
const value = node[key];
if (typeof value !== "object") {
continue;
} else if (Array.isArray(value)) {
for (let i = 0; i < value.length; i += 1) {
if (value[i] !== null && typeof value[i].type === 'string') {
if (!(await this.visit(value[i], node, key, i))) {
// removed
i--;
}
}
}
} else if (value !== null && typeof value.type === "string") {
await this.visit(value, node, key, null);
}
}
if (this.leave) {
const _replacement = this.replacement;
const _should_remove = this.should_remove;
this.replacement = null;
this.should_remove = false;
await this.leave.call(this.context, node, parent, prop, index);
if (this.replacement) {
node = this.replacement;
this.replace(parent, prop, index, node);
}
if (this.should_remove) {
this.remove(parent, prop, index);
}
const removed = this.should_remove;
this.replacement = _replacement;
this.should_remove = _should_remove;
if (removed) return null;
}
}
return node;
}
}

View File

@@ -0,0 +1,69 @@
import { Location } from './types';
export interface ParserError {
kind: ErrorKind;
message: string;
location: Location;
}
export declare enum ErrorKind {
/** Argument is unclosed (e.g. `{0`) */
EXPECT_ARGUMENT_CLOSING_BRACE = 1,
/** Argument is empty (e.g. `{}`). */
EMPTY_ARGUMENT = 2,
/** Argument is malformed (e.g. `{foo!}``) */
MALFORMED_ARGUMENT = 3,
/** Expect an argument type (e.g. `{foo,}`) */
EXPECT_ARGUMENT_TYPE = 4,
/** Unsupported argument type (e.g. `{foo,foo}`) */
INVALID_ARGUMENT_TYPE = 5,
/** Expect an argument style (e.g. `{foo, number, }`) */
EXPECT_ARGUMENT_STYLE = 6,
/** The number skeleton is invalid. */
INVALID_NUMBER_SKELETON = 7,
/** The date time skeleton is invalid. */
INVALID_DATE_TIME_SKELETON = 8,
/** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */
EXPECT_NUMBER_SKELETON = 9,
/** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */
EXPECT_DATE_TIME_SKELETON = 10,
/** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */
UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11,
/** Missing select argument options (e.g. `{foo, select}`) */
EXPECT_SELECT_ARGUMENT_OPTIONS = 12,
/** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */
EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13,
/** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */
INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14,
/** Expecting a selector in `select` argument (e.g `{foo, select}`) */
EXPECT_SELECT_ARGUMENT_SELECTOR = 15,
/** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */
EXPECT_PLURAL_ARGUMENT_SELECTOR = 16,
/** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */
EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17,
/**
* Expecting a message fragment after the `plural` or `selectordinal` selector
* (e.g. `{foo, plural, one}`)
*/
EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18,
/** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */
INVALID_PLURAL_ARGUMENT_SELECTOR = 19,
/**
* Duplicate selectors in `plural` or `selectordinal` argument.
* (e.g. {foo, plural, one {#} one {#}})
*/
DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20,
/** Duplicate selectors in `select` argument.
* (e.g. {foo, select, apple {apple} apple {apple}})
*/
DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21,
/** Plural or select argument option must have `other` clause. */
MISSING_OTHER_CLAUSE = 22,
/** The tag is malformed. (e.g. `<bold!>foo</bold!>) */
INVALID_TAG = 23,
/** The tag name is invalid. (e.g. `<123>foo</123>`) */
INVALID_TAG_NAME = 25,
/** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */
UNMATCHED_CLOSING_TAG = 26,
/** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */
UNCLOSED_TAG = 27
}
//# sourceMappingURL=error.d.ts.map

View File

@@ -0,0 +1,50 @@
import { Subject } from './Subject';
import { dateTimestampProvider } from './scheduler/dateTimestampProvider';
export class ReplaySubject extends Subject {
constructor(_bufferSize = Infinity, _windowTime = Infinity, _timestampProvider = dateTimestampProvider) {
super();
this._bufferSize = _bufferSize;
this._windowTime = _windowTime;
this._timestampProvider = _timestampProvider;
this._buffer = [];
this._infiniteTimeWindow = true;
this._infiniteTimeWindow = _windowTime === Infinity;
this._bufferSize = Math.max(1, _bufferSize);
this._windowTime = Math.max(1, _windowTime);
}
next(value) {
const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;
if (!isStopped) {
_buffer.push(value);
!_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);
}
this._trimBuffer();
super.next(value);
}
_subscribe(subscriber) {
this._throwIfClosed();
this._trimBuffer();
const subscription = this._innerSubscribe(subscriber);
const { _infiniteTimeWindow, _buffer } = this;
const copy = _buffer.slice();
for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {
subscriber.next(copy[i]);
}
this._checkFinalizedStatuses(subscriber);
return subscription;
}
_trimBuffer() {
const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this;
const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;
_bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);
if (!_infiniteTimeWindow) {
const now = _timestampProvider.now();
let last = 0;
for (let i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {
last = i;
}
last && _buffer.splice(0, last + 1);
}
}
}
//# sourceMappingURL=ReplaySubject.js.map

View File

@@ -0,0 +1,3 @@
export const EMPTY_OBJ = {};
export const EMPTY_ARR = [];
export const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;

View File

@@ -0,0 +1,32 @@
/**
Simplifies a type while including and/or excluding certain types from being simplified. Useful to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
This type is **experimental** and was introduced as a result of this {@link https://github.com/sindresorhus/type-fest/issues/436 issue}. It should be used with caution.
@internal
@experimental
@see Simplify
@category Object
*/
export type ConditionalSimplify<Type, ExcludeType = never, IncludeType = unknown> = Type extends ExcludeType
? Type
: Type extends IncludeType
? {[TypeKey in keyof Type]: Type[TypeKey]}
: Type;
/**
Recursively simplifies a type while including and/or excluding certain types from being simplified.
This type is **experimental** and was introduced as a result of this {@link https://github.com/sindresorhus/type-fest/issues/436 issue}. It should be used with caution.
See {@link ConditionalSimplify} for usages and examples.
@internal
@experimental
@category Object
*/
export type ConditionalSimplifyDeep<Type, ExcludeType = never, IncludeType = unknown> = Type extends ExcludeType
? Type
: Type extends IncludeType
? {[TypeKey in keyof Type]: ConditionalSimplifyDeep<Type[TypeKey], ExcludeType, IncludeType>}
: Type;

View File

@@ -0,0 +1,2 @@
if(typeof cptable === 'undefined') cptable = {};
cptable[28600] = (function(){ var d = "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨͧĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {"enc": e, "dec": D }; })();

View File

@@ -0,0 +1,10 @@
"use strict";
if (!require("./is-implemented")()) {
Object.defineProperty(String.prototype, "repeat", {
value: require("./shim"),
configurable: true,
enumerable: false,
writable: true
});
}

View File

@@ -0,0 +1,9 @@
import assertString from './util/assertString';
import toDate from './toDate';
export default function isBefore(str) {
var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(new Date());
assertString(str);
var comparison = toDate(date);
var original = toDate(str);
return !!(original && comparison && original < comparison);
}

View File

@@ -0,0 +1,15 @@
/**
* Creates a unary function that invokes `func` with its argument transformed.
*
* @private
* @param {Function} func The function to wrap.
* @param {Function} transform The argument transform.
* @returns {Function} Returns the new function.
*/
function overArg(func, transform) {
return function(arg) {
return func(transform(arg));
};
}
module.exports = overArg;

View File

@@ -0,0 +1,7 @@
"use strict";
module.exports = function () {
var acosh = Math.acosh;
if (typeof acosh !== "function") return false;
return acosh(2) === 1.3169578969248166;
};