new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Math.log10 : require("./shim");
|
||||
@@ -0,0 +1,302 @@
|
||||
'use strict';
|
||||
|
||||
const align = {
|
||||
right: alignRight,
|
||||
center: alignCenter
|
||||
};
|
||||
const top = 0;
|
||||
const right = 1;
|
||||
const bottom = 2;
|
||||
const left = 3;
|
||||
class UI {
|
||||
constructor(opts) {
|
||||
var _a;
|
||||
this.width = opts.width;
|
||||
this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true;
|
||||
this.rows = [];
|
||||
}
|
||||
span(...args) {
|
||||
const cols = this.div(...args);
|
||||
cols.span = true;
|
||||
}
|
||||
resetOutput() {
|
||||
this.rows = [];
|
||||
}
|
||||
div(...args) {
|
||||
if (args.length === 0) {
|
||||
this.div('');
|
||||
}
|
||||
if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === 'string') {
|
||||
return this.applyLayoutDSL(args[0]);
|
||||
}
|
||||
const cols = args.map(arg => {
|
||||
if (typeof arg === 'string') {
|
||||
return this.colFromString(arg);
|
||||
}
|
||||
return arg;
|
||||
});
|
||||
this.rows.push(cols);
|
||||
return cols;
|
||||
}
|
||||
shouldApplyLayoutDSL(...args) {
|
||||
return args.length === 1 && typeof args[0] === 'string' &&
|
||||
/[\t\n]/.test(args[0]);
|
||||
}
|
||||
applyLayoutDSL(str) {
|
||||
const rows = str.split('\n').map(row => row.split('\t'));
|
||||
let leftColumnWidth = 0;
|
||||
// simple heuristic for layout, make sure the
|
||||
// second column lines up along the left-hand.
|
||||
// don't allow the first column to take up more
|
||||
// than 50% of the screen.
|
||||
rows.forEach(columns => {
|
||||
if (columns.length > 1 && mixin.stringWidth(columns[0]) > leftColumnWidth) {
|
||||
leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin.stringWidth(columns[0]));
|
||||
}
|
||||
});
|
||||
// generate a table:
|
||||
// replacing ' ' with padding calculations.
|
||||
// using the algorithmically generated width.
|
||||
rows.forEach(columns => {
|
||||
this.div(...columns.map((r, i) => {
|
||||
return {
|
||||
text: r.trim(),
|
||||
padding: this.measurePadding(r),
|
||||
width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined
|
||||
};
|
||||
}));
|
||||
});
|
||||
return this.rows[this.rows.length - 1];
|
||||
}
|
||||
colFromString(text) {
|
||||
return {
|
||||
text,
|
||||
padding: this.measurePadding(text)
|
||||
};
|
||||
}
|
||||
measurePadding(str) {
|
||||
// measure padding without ansi escape codes
|
||||
const noAnsi = mixin.stripAnsi(str);
|
||||
return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length];
|
||||
}
|
||||
toString() {
|
||||
const lines = [];
|
||||
this.rows.forEach(row => {
|
||||
this.rowToString(row, lines);
|
||||
});
|
||||
// don't display any lines with the
|
||||
// hidden flag set.
|
||||
return lines
|
||||
.filter(line => !line.hidden)
|
||||
.map(line => line.text)
|
||||
.join('\n');
|
||||
}
|
||||
rowToString(row, lines) {
|
||||
this.rasterize(row).forEach((rrow, r) => {
|
||||
let str = '';
|
||||
rrow.forEach((col, c) => {
|
||||
const { width } = row[c]; // the width with padding.
|
||||
const wrapWidth = this.negatePadding(row[c]); // the width without padding.
|
||||
let ts = col; // temporary string used during alignment/padding.
|
||||
if (wrapWidth > mixin.stringWidth(col)) {
|
||||
ts += ' '.repeat(wrapWidth - mixin.stringWidth(col));
|
||||
}
|
||||
// align the string within its column.
|
||||
if (row[c].align && row[c].align !== 'left' && this.wrap) {
|
||||
const fn = align[row[c].align];
|
||||
ts = fn(ts, wrapWidth);
|
||||
if (mixin.stringWidth(ts) < wrapWidth) {
|
||||
ts += ' '.repeat((width || 0) - mixin.stringWidth(ts) - 1);
|
||||
}
|
||||
}
|
||||
// apply border and padding to string.
|
||||
const padding = row[c].padding || [0, 0, 0, 0];
|
||||
if (padding[left]) {
|
||||
str += ' '.repeat(padding[left]);
|
||||
}
|
||||
str += addBorder(row[c], ts, '| ');
|
||||
str += ts;
|
||||
str += addBorder(row[c], ts, ' |');
|
||||
if (padding[right]) {
|
||||
str += ' '.repeat(padding[right]);
|
||||
}
|
||||
// if prior row is span, try to render the
|
||||
// current row on the prior line.
|
||||
if (r === 0 && lines.length > 0) {
|
||||
str = this.renderInline(str, lines[lines.length - 1]);
|
||||
}
|
||||
});
|
||||
// remove trailing whitespace.
|
||||
lines.push({
|
||||
text: str.replace(/ +$/, ''),
|
||||
span: row.span
|
||||
});
|
||||
});
|
||||
return lines;
|
||||
}
|
||||
// if the full 'source' can render in
|
||||
// the target line, do so.
|
||||
renderInline(source, previousLine) {
|
||||
const match = source.match(/^ */);
|
||||
const leadingWhitespace = match ? match[0].length : 0;
|
||||
const target = previousLine.text;
|
||||
const targetTextWidth = mixin.stringWidth(target.trimRight());
|
||||
if (!previousLine.span) {
|
||||
return source;
|
||||
}
|
||||
// if we're not applying wrapping logic,
|
||||
// just always append to the span.
|
||||
if (!this.wrap) {
|
||||
previousLine.hidden = true;
|
||||
return target + source;
|
||||
}
|
||||
if (leadingWhitespace < targetTextWidth) {
|
||||
return source;
|
||||
}
|
||||
previousLine.hidden = true;
|
||||
return target.trimRight() + ' '.repeat(leadingWhitespace - targetTextWidth) + source.trimLeft();
|
||||
}
|
||||
rasterize(row) {
|
||||
const rrows = [];
|
||||
const widths = this.columnWidths(row);
|
||||
let wrapped;
|
||||
// word wrap all columns, and create
|
||||
// a data-structure that is easy to rasterize.
|
||||
row.forEach((col, c) => {
|
||||
// leave room for left and right padding.
|
||||
col.width = widths[c];
|
||||
if (this.wrap) {
|
||||
wrapped = mixin.wrap(col.text, this.negatePadding(col), { hard: true }).split('\n');
|
||||
}
|
||||
else {
|
||||
wrapped = col.text.split('\n');
|
||||
}
|
||||
if (col.border) {
|
||||
wrapped.unshift('.' + '-'.repeat(this.negatePadding(col) + 2) + '.');
|
||||
wrapped.push("'" + '-'.repeat(this.negatePadding(col) + 2) + "'");
|
||||
}
|
||||
// add top and bottom padding.
|
||||
if (col.padding) {
|
||||
wrapped.unshift(...new Array(col.padding[top] || 0).fill(''));
|
||||
wrapped.push(...new Array(col.padding[bottom] || 0).fill(''));
|
||||
}
|
||||
wrapped.forEach((str, r) => {
|
||||
if (!rrows[r]) {
|
||||
rrows.push([]);
|
||||
}
|
||||
const rrow = rrows[r];
|
||||
for (let i = 0; i < c; i++) {
|
||||
if (rrow[i] === undefined) {
|
||||
rrow.push('');
|
||||
}
|
||||
}
|
||||
rrow.push(str);
|
||||
});
|
||||
});
|
||||
return rrows;
|
||||
}
|
||||
negatePadding(col) {
|
||||
let wrapWidth = col.width || 0;
|
||||
if (col.padding) {
|
||||
wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0);
|
||||
}
|
||||
if (col.border) {
|
||||
wrapWidth -= 4;
|
||||
}
|
||||
return wrapWidth;
|
||||
}
|
||||
columnWidths(row) {
|
||||
if (!this.wrap) {
|
||||
return row.map(col => {
|
||||
return col.width || mixin.stringWidth(col.text);
|
||||
});
|
||||
}
|
||||
let unset = row.length;
|
||||
let remainingWidth = this.width;
|
||||
// column widths can be set in config.
|
||||
const widths = row.map(col => {
|
||||
if (col.width) {
|
||||
unset--;
|
||||
remainingWidth -= col.width;
|
||||
return col.width;
|
||||
}
|
||||
return undefined;
|
||||
});
|
||||
// any unset widths should be calculated.
|
||||
const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0;
|
||||
return widths.map((w, i) => {
|
||||
if (w === undefined) {
|
||||
return Math.max(unsetWidth, _minWidth(row[i]));
|
||||
}
|
||||
return w;
|
||||
});
|
||||
}
|
||||
}
|
||||
function addBorder(col, ts, style) {
|
||||
if (col.border) {
|
||||
if (/[.']-+[.']/.test(ts)) {
|
||||
return '';
|
||||
}
|
||||
if (ts.trim().length !== 0) {
|
||||
return style;
|
||||
}
|
||||
return ' ';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
// calculates the minimum width of
|
||||
// a column, based on padding preferences.
|
||||
function _minWidth(col) {
|
||||
const padding = col.padding || [];
|
||||
const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0);
|
||||
if (col.border) {
|
||||
return minWidth + 4;
|
||||
}
|
||||
return minWidth;
|
||||
}
|
||||
function getWindowWidth() {
|
||||
/* istanbul ignore next: depends on terminal */
|
||||
if (typeof process === 'object' && process.stdout && process.stdout.columns) {
|
||||
return process.stdout.columns;
|
||||
}
|
||||
return 80;
|
||||
}
|
||||
function alignRight(str, width) {
|
||||
str = str.trim();
|
||||
const strWidth = mixin.stringWidth(str);
|
||||
if (strWidth < width) {
|
||||
return ' '.repeat(width - strWidth) + str;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
function alignCenter(str, width) {
|
||||
str = str.trim();
|
||||
const strWidth = mixin.stringWidth(str);
|
||||
/* istanbul ignore next */
|
||||
if (strWidth >= width) {
|
||||
return str;
|
||||
}
|
||||
return ' '.repeat((width - strWidth) >> 1) + str;
|
||||
}
|
||||
let mixin;
|
||||
function cliui(opts, _mixin) {
|
||||
mixin = _mixin;
|
||||
return new UI({
|
||||
width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(),
|
||||
wrap: opts === null || opts === void 0 ? void 0 : opts.wrap
|
||||
});
|
||||
}
|
||||
|
||||
// Bootstrap cliui with CommonJS dependencies:
|
||||
const stringWidth = require('string-width');
|
||||
const stripAnsi = require('strip-ansi');
|
||||
const wrap = require('wrap-ansi');
|
||||
function ui(opts) {
|
||||
return cliui(opts, {
|
||||
stringWidth,
|
||||
stripAnsi,
|
||||
wrap
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = ui;
|
||||
@@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
|
||||
var toPrimitive = require('../');
|
||||
var ES5 = require('../es5');
|
||||
var ES6 = require('../es6');
|
||||
var ES2015 = require('../es2015');
|
||||
|
||||
var test = require('tape');
|
||||
|
||||
test('default export', function (t) {
|
||||
t.equal(toPrimitive, ES2015, 'default export is ES2015');
|
||||
t.equal(toPrimitive.ES5, ES5, 'ES5 property has ES5 method');
|
||||
t.equal(toPrimitive.ES6, ES6, 'ES6 property has ES6 method');
|
||||
t.equal(toPrimitive.ES2015, ES2015, 'ES2015 property has ES2015 method');
|
||||
t.end();
|
||||
});
|
||||
|
||||
require('./es5');
|
||||
require('./es6');
|
||||
require('./es2015');
|
||||
@@ -0,0 +1,20 @@
|
||||
import create from './create.js';
|
||||
import Options from './core/options.js';
|
||||
const defaults = {
|
||||
options: new Options(),
|
||||
handlers: [],
|
||||
mutableDefaults: false,
|
||||
};
|
||||
const got = create(defaults);
|
||||
export default got;
|
||||
export { got };
|
||||
export { default as Options } from './core/options.js';
|
||||
export * from './core/options.js';
|
||||
export * from './core/response.js';
|
||||
export * from './core/index.js';
|
||||
export * from './core/errors.js';
|
||||
export { default as calculateRetryDelay } from './core/calculate-retry-delay.js';
|
||||
export * from './as-promise/types.js';
|
||||
export * from './types.js';
|
||||
export { default as create } from './create.js';
|
||||
export { default as parseLinkHeader } from './core/parse-link-header.js';
|
||||
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* Is.js
|
||||
*
|
||||
* Object type checks.
|
||||
*/
|
||||
|
||||
const NAME = Symbol.toStringTag;
|
||||
|
||||
/**
|
||||
* Check if `obj` is a URLSearchParams object
|
||||
* ref: https://github.com/node-fetch/node-fetch/issues/296#issuecomment-307598143
|
||||
* @param {*} object - Object to check for
|
||||
* @return {boolean}
|
||||
*/
|
||||
export const isURLSearchParameters = object => {
|
||||
return (
|
||||
typeof object === 'object' &&
|
||||
typeof object.append === 'function' &&
|
||||
typeof object.delete === 'function' &&
|
||||
typeof object.get === 'function' &&
|
||||
typeof object.getAll === 'function' &&
|
||||
typeof object.has === 'function' &&
|
||||
typeof object.set === 'function' &&
|
||||
typeof object.sort === 'function' &&
|
||||
object[NAME] === 'URLSearchParams'
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if `object` is a W3C `Blob` object (which `File` inherits from)
|
||||
* @param {*} object - Object to check for
|
||||
* @return {boolean}
|
||||
*/
|
||||
export const isBlob = object => {
|
||||
return (
|
||||
object &&
|
||||
typeof object === 'object' &&
|
||||
typeof object.arrayBuffer === 'function' &&
|
||||
typeof object.type === 'string' &&
|
||||
typeof object.stream === 'function' &&
|
||||
typeof object.constructor === 'function' &&
|
||||
/^(Blob|File)$/.test(object[NAME])
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if `obj` is an instance of AbortSignal.
|
||||
* @param {*} object - Object to check for
|
||||
* @return {boolean}
|
||||
*/
|
||||
export const isAbortSignal = object => {
|
||||
return (
|
||||
typeof object === 'object' && (
|
||||
object[NAME] === 'AbortSignal' ||
|
||||
object[NAME] === 'EventTarget'
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* isDomainOrSubdomain reports whether sub is a subdomain (or exact match) of
|
||||
* the parent domain.
|
||||
*
|
||||
* Both domains must already be in canonical form.
|
||||
* @param {string|URL} original
|
||||
* @param {string|URL} destination
|
||||
*/
|
||||
export const isDomainOrSubdomain = (destination, original) => {
|
||||
const orig = new URL(original).hostname;
|
||||
const dest = new URL(destination).hostname;
|
||||
|
||||
return orig === dest || orig.endsWith(`.${dest}`);
|
||||
};
|
||||
|
||||
/**
|
||||
* isSameProtocol reports whether the two provided URLs use the same protocol.
|
||||
*
|
||||
* Both domains must already be in canonical form.
|
||||
* @param {string|URL} original
|
||||
* @param {string|URL} destination
|
||||
*/
|
||||
export const isSameProtocol = (destination, original) => {
|
||||
const orig = new URL(original).protocol;
|
||||
const dest = new URL(destination).protocol;
|
||||
|
||||
return orig === dest;
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"B","4":"J D E F A CC"},B:{"1":"C K L G M","129":"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","4":"DC tB I v EC FC","129":"RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB"},D:{"1":"LB MB NB OB PB QB RB SB TB UB","4":"I v J","129":"0 1 2 3 4 5 6 7 8 9 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 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"},E:{"4":"I v HC zB","129":"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"},F:{"1":"8 9 C AB BB CB DB EB FB GB HB qB AC TC rB","4":"F B PC QC RC SC","129":"0 1 2 3 4 5 6 7 G M N O w g x y z 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"},G:{"4":"zB UC BC","129":"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"},H:{"4":"oC"},I:{"4":"pC qC rC","129":"tB I f sC BC tC uC"},J:{"129":"D A"},K:{"1":"C qB AC rB","4":"A B","129":"h"},L:{"129":"H"},M:{"129":"H"},N:{"1":"B","4":"A"},O:{"129":"vC"},P:{"129":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"129":"1B"},R:{"129":"9C"},S:{"1":"AD","129":"BD"}},B:1,C:"dataset & data-* attributes"};
|
||||
@@ -0,0 +1,106 @@
|
||||
# readable-stream
|
||||
|
||||
***Node.js core streams for userland*** [](https://travis-ci.com/nodejs/readable-stream)
|
||||
|
||||
|
||||
[](https://nodei.co/npm/readable-stream/)
|
||||
[](https://nodei.co/npm/readable-stream/)
|
||||
|
||||
|
||||
[](https://saucelabs.com/u/readabe-stream)
|
||||
|
||||
```bash
|
||||
npm install --save readable-stream
|
||||
```
|
||||
|
||||
This package is a mirror of the streams implementations in Node.js.
|
||||
|
||||
Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.19.0/docs/api/stream.html).
|
||||
|
||||
If you want to guarantee a stable streams base, regardless of what version of
|
||||
Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
|
||||
|
||||
As of version 2.0.0 **readable-stream** uses semantic versioning.
|
||||
|
||||
## Version 3.x.x
|
||||
|
||||
v3.x.x of `readable-stream` is a cut from Node 10. This version supports Node 6, 8, and 10, as well as evergreen browsers, IE 11 and latest Safari. The breaking changes introduced by v3 are composed by the combined breaking changes in [Node v9](https://nodejs.org/en/blog/release/v9.0.0/) and [Node v10](https://nodejs.org/en/blog/release/v10.0.0/), as follows:
|
||||
|
||||
1. Error codes: https://github.com/nodejs/node/pull/13310,
|
||||
https://github.com/nodejs/node/pull/13291,
|
||||
https://github.com/nodejs/node/pull/16589,
|
||||
https://github.com/nodejs/node/pull/15042,
|
||||
https://github.com/nodejs/node/pull/15665,
|
||||
https://github.com/nodejs/readable-stream/pull/344
|
||||
2. 'readable' have precedence over flowing
|
||||
https://github.com/nodejs/node/pull/18994
|
||||
3. make virtual methods errors consistent
|
||||
https://github.com/nodejs/node/pull/18813
|
||||
4. updated streams error handling
|
||||
https://github.com/nodejs/node/pull/18438
|
||||
5. writable.end should return this.
|
||||
https://github.com/nodejs/node/pull/18780
|
||||
6. readable continues to read when push('')
|
||||
https://github.com/nodejs/node/pull/18211
|
||||
7. add custom inspect to BufferList
|
||||
https://github.com/nodejs/node/pull/17907
|
||||
8. always defer 'readable' with nextTick
|
||||
https://github.com/nodejs/node/pull/17979
|
||||
|
||||
## Version 2.x.x
|
||||
v2.x.x of `readable-stream` is a cut of the stream module from Node 8 (there have been no semver-major changes from Node 4 to 8). This version supports all Node.js versions from 0.8, as well as evergreen browsers and IE 10 & 11.
|
||||
|
||||
### Big Thanks
|
||||
|
||||
Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs][sauce]
|
||||
|
||||
# Usage
|
||||
|
||||
You can swap your `require('stream')` with `require('readable-stream')`
|
||||
without any changes, if you are just using one of the main classes and
|
||||
functions.
|
||||
|
||||
```js
|
||||
const {
|
||||
Readable,
|
||||
Writable,
|
||||
Transform,
|
||||
Duplex,
|
||||
pipeline,
|
||||
finished
|
||||
} = require('readable-stream')
|
||||
````
|
||||
|
||||
Note that `require('stream')` will return `Stream`, while
|
||||
`require('readable-stream')` will return `Readable`. We discourage using
|
||||
whatever is exported directly, but rather use one of the properties as
|
||||
shown in the example above.
|
||||
|
||||
# Streams Working Group
|
||||
|
||||
`readable-stream` is maintained by the Streams Working Group, which
|
||||
oversees the development and maintenance of the Streams API within
|
||||
Node.js. The responsibilities of the Streams Working Group include:
|
||||
|
||||
* Addressing stream issues on the Node.js issue tracker.
|
||||
* Authoring and editing stream documentation within the Node.js project.
|
||||
* Reviewing changes to stream subclasses within the Node.js project.
|
||||
* Redirecting changes to streams from the Node.js project to this
|
||||
project.
|
||||
* Assisting in the implementation of stream providers within Node.js.
|
||||
* Recommending versions of `readable-stream` to be included in Node.js.
|
||||
* Messaging about the future of streams to give the community advance
|
||||
notice of changes.
|
||||
|
||||
<a name="members"></a>
|
||||
## Team Members
|
||||
|
||||
* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com>
|
||||
- Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
|
||||
* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com>
|
||||
* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com>
|
||||
- Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
|
||||
* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com>
|
||||
* **Yoshua Wyuts** ([@yoshuawuyts](https://github.com/yoshuawuyts)) <yoshuawuyts@gmail.com>
|
||||
|
||||
[sauce]: https://saucelabs.com
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"concat-map","version":"0.0.1","files":{"LICENSE":{"checkedAt":1678883669892,"integrity":"sha512-UYETA37gNUDKrmMFiphSX5pKZ0Jb2MNZb2l77Vrh0gU/5292uFpO77gMxRn3sD02jPS0RSiMTKfKy151I/M5Yg==","mode":420,"size":1073},"package.json":{"checkedAt":1678883672413,"integrity":"sha512-FfXkh5jbKRra//noBP8JUaVnAmK/EuKyQ1BendZK3iRtbYwBZp/ptwngGLFETr8q71GQ2ySODVheqCWVTLEx0A==","mode":420,"size":989},"index.js":{"checkedAt":1678883672413,"integrity":"sha512-zsdwYPlc0mqiiVHbhHRdQFzoqPRXYdKvEdxgLrdVeP3bPg1/ReEtF1CkWtrshFK2SAIXc0iNyPSSNfx1uBmlsg==","mode":420,"size":345},".travis.yml":{"checkedAt":1678883672413,"integrity":"sha512-JPDxYlXgtBZT64mvPpxhYlNhGMN+T6AD5iPo05ElvOjSWB8++XiJkVM/RilMIf+7+q9V1EFQs+YqaGKB2D258w==","mode":420,"size":43},"README.markdown":{"checkedAt":1678883672413,"integrity":"sha512-xwe0LALQ+iqrmjKDUJX8FaJWHC0vzoWhFiC5l3lxzQRb+0fCIvYtIbDSBnb/7mnDgPAHpIS1LT3hucGyL3PBZw==","mode":420,"size":1165},"test/map.js":{"checkedAt":1678883672413,"integrity":"sha512-DQagHkGnV4aJYpeZKQzOOrkQpzLXADZ1skbDiJmVGI1A6blGymW9n9pzjyqK1dkzJ/cgjyVb1vQRCOuQPrQg1w==","mode":420,"size":1075},"example/map.js":{"checkedAt":1678883672413,"integrity":"sha512-y+SbjCyA2FpPw8TWF2VU9cRN9CvdABwQHYhuPHzNAJXL2Ml70B/3jzzMRZv2aPL7y1bSuc/fUB05+NmaFi/2mQ==","mode":420,"size":171}}}
|
||||
@@ -0,0 +1,39 @@
|
||||
import { __extends } from "tslib";
|
||||
import { Subject } from './Subject';
|
||||
var AsyncSubject = (function (_super) {
|
||||
__extends(AsyncSubject, _super);
|
||||
function AsyncSubject() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this._value = null;
|
||||
_this._hasValue = false;
|
||||
_this._isComplete = false;
|
||||
return _this;
|
||||
}
|
||||
AsyncSubject.prototype._checkFinalizedStatuses = function (subscriber) {
|
||||
var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, isStopped = _a.isStopped, _isComplete = _a._isComplete;
|
||||
if (hasError) {
|
||||
subscriber.error(thrownError);
|
||||
}
|
||||
else if (isStopped || _isComplete) {
|
||||
_hasValue && subscriber.next(_value);
|
||||
subscriber.complete();
|
||||
}
|
||||
};
|
||||
AsyncSubject.prototype.next = function (value) {
|
||||
if (!this.isStopped) {
|
||||
this._value = value;
|
||||
this._hasValue = true;
|
||||
}
|
||||
};
|
||||
AsyncSubject.prototype.complete = function () {
|
||||
var _a = this, _hasValue = _a._hasValue, _value = _a._value, _isComplete = _a._isComplete;
|
||||
if (!_isComplete) {
|
||||
this._isComplete = true;
|
||||
_hasValue && _super.prototype.next.call(this, _value);
|
||||
_super.prototype.complete.call(this);
|
||||
}
|
||||
};
|
||||
return AsyncSubject;
|
||||
}(Subject));
|
||||
export { AsyncSubject };
|
||||
//# sourceMappingURL=AsyncSubject.js.map
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"name": "has-flag",
|
||||
"version": "4.0.0",
|
||||
"description": "Check if argv has a specific flag",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/has-flag",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"has",
|
||||
"check",
|
||||
"detect",
|
||||
"contains",
|
||||
"find",
|
||||
"flag",
|
||||
"cli",
|
||||
"command-line",
|
||||
"argv",
|
||||
"process",
|
||||
"arg",
|
||||
"args",
|
||||
"argument",
|
||||
"arguments",
|
||||
"getopt",
|
||||
"minimist",
|
||||
"optimist"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
# resolve-from [](https://travis-ci.org/sindresorhus/resolve-from)
|
||||
|
||||
> Resolve the path of a module like [`require.resolve()`](https://nodejs.org/api/globals.html#globals_require_resolve) but from a given path
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install resolve-from
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const resolveFrom = require('resolve-from');
|
||||
|
||||
// There is a file at `./foo/bar.js`
|
||||
|
||||
resolveFrom('foo', './bar');
|
||||
//=> '/Users/sindresorhus/dev/test/foo/bar.js'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### resolveFrom(fromDir, moduleId)
|
||||
|
||||
Like `require()`, throws when the module can't be found.
|
||||
|
||||
### resolveFrom.silent(fromDir, moduleId)
|
||||
|
||||
Returns `null` instead of throwing when the module can't be found.
|
||||
|
||||
#### fromDir
|
||||
|
||||
Type: `string`
|
||||
|
||||
Directory to resolve from.
|
||||
|
||||
#### moduleId
|
||||
|
||||
Type: `string`
|
||||
|
||||
What you would use in `require()`.
|
||||
|
||||
|
||||
## Tip
|
||||
|
||||
Create a partial using a bound function if you want to resolve from the same `fromDir` multiple times:
|
||||
|
||||
```js
|
||||
const resolveFromFoo = resolveFrom.bind(null, 'foo');
|
||||
|
||||
resolveFromFoo('./bar');
|
||||
resolveFromFoo('./baz');
|
||||
```
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [resolve-cwd](https://github.com/sindresorhus/resolve-cwd) - Resolve the path of a module from the current working directory
|
||||
- [import-from](https://github.com/sindresorhus/import-from) - Import a module from a given path
|
||||
- [import-cwd](https://github.com/sindresorhus/import-cwd) - Import a module from the current working directory
|
||||
- [resolve-pkg](https://github.com/sindresorhus/resolve-pkg) - Resolve the path of a package regardless of it having an entry point
|
||||
- [import-lazy](https://github.com/sindresorhus/import-lazy) - Import a module lazily
|
||||
- [resolve-global](https://github.com/sindresorhus/resolve-global) - Resolve the path of a globally installed module
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"cssesc","version":"3.0.0","files":{"LICENSE-MIT.txt":{"checkedAt":1678883669272,"integrity":"sha512-fWtEu2WGJSgbSBlOWj06B0Ur6h8lZQbdFveiGUHvPw0lnhvNDMYgJkK/H9EpvBh+ajkh04LVaNMSvYPzAjl5oA==","mode":420,"size":1077},"cssesc.js":{"checkedAt":1678883673229,"integrity":"sha512-eZt7x7YSl+s/w/3XteCAOBzhyv+HMITPSvluZ2eJJuUS5BGPPy737GDyKCjf+28m6+II6z+wvZ1RIJIvhqVcew==","mode":420,"size":3514},"README.md":{"checkedAt":1678883673229,"integrity":"sha512-cWna2e+BRKXlMQrSdwIXCFi0id9RN9cP3X45b4XAN8cMdaJNuWhMDvQev1nWhyz9kcx8/B+Hzx3m/lu9yw+C3w==","mode":420,"size":6585},"package.json":{"checkedAt":1678883673229,"integrity":"sha512-jr5IgcyztjFCoheyM4rRc0fiZfpU7/pLa/tIRRSM0mNIvjIyaTIlthzdOa9CNcXAFuoX1i1zHMztO7r9lUg1Tw==","mode":420,"size":1252},"man/cssesc.1":{"checkedAt":1678883673232,"integrity":"sha512-1T5G6rN6eAqtQmtZjoMzC0f+62UPRTvE8SvED9PnqdzctbcogQLd0V/YIjEepGCXELVuN5fYBFvCQYloQ3WC5A==","mode":420,"size":1957},"bin/cssesc":{"checkedAt":1678883673232,"integrity":"sha512-jnfXCZOY5Jfrqu9tcnwk3sVvuH9mjljytcA4ATbqkvSMZCPHKm3avoCBiMFb24FrAp3wvl0KjDs7fRA5jIm+SA==","mode":493,"size":3103}}}
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) James Talmage <james@talmage.io> (github.com/jamestalmage)
|
||||
|
||||
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,15 @@
|
||||
export function lazyPostcss() {
|
||||
return require('postcss')
|
||||
}
|
||||
|
||||
export function lazyPostcssImport() {
|
||||
return require('postcss-import')
|
||||
}
|
||||
|
||||
export function lazyAutoprefixer() {
|
||||
return require('autoprefixer')
|
||||
}
|
||||
|
||||
export function lazyCssnano() {
|
||||
return require('cssnano')
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
var baseIteratee = require('./_baseIteratee'),
|
||||
baseWhile = require('./_baseWhile');
|
||||
|
||||
/**
|
||||
* Creates a slice of `array` with elements taken from the end. Elements are
|
||||
* taken until `predicate` returns falsey. The predicate is invoked with
|
||||
* three arguments: (value, index, array).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 3.0.0
|
||||
* @category Array
|
||||
* @param {Array} array The array to query.
|
||||
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
||||
* @returns {Array} Returns the slice of `array`.
|
||||
* @example
|
||||
*
|
||||
* var users = [
|
||||
* { 'user': 'barney', 'active': true },
|
||||
* { 'user': 'fred', 'active': false },
|
||||
* { 'user': 'pebbles', 'active': false }
|
||||
* ];
|
||||
*
|
||||
* _.takeRightWhile(users, function(o) { return !o.active; });
|
||||
* // => objects for ['fred', 'pebbles']
|
||||
*
|
||||
* // The `_.matches` iteratee shorthand.
|
||||
* _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
|
||||
* // => objects for ['pebbles']
|
||||
*
|
||||
* // The `_.matchesProperty` iteratee shorthand.
|
||||
* _.takeRightWhile(users, ['active', false]);
|
||||
* // => objects for ['fred', 'pebbles']
|
||||
*
|
||||
* // The `_.property` iteratee shorthand.
|
||||
* _.takeRightWhile(users, 'active');
|
||||
* // => []
|
||||
*/
|
||||
function takeRightWhile(array, predicate) {
|
||||
return (array && array.length)
|
||||
? baseWhile(array, baseIteratee(predicate, 3), false, true)
|
||||
: [];
|
||||
}
|
||||
|
||||
module.exports = takeRightWhile;
|
||||
@@ -0,0 +1,7 @@
|
||||
import { asyncScheduler } from '../scheduler/async';
|
||||
import { sample } from './sample';
|
||||
import { interval } from '../observable/interval';
|
||||
export function sampleTime(period, scheduler = asyncScheduler) {
|
||||
return sample(interval(period, scheduler));
|
||||
}
|
||||
//# sourceMappingURL=sampleTime.js.map
|
||||
@@ -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 (C) 2013-present SheetJS LLC
|
||||
|
||||
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,22 @@
|
||||
import { operate } from '../util/lift';
|
||||
import { createOperatorSubscriber } from './OperatorSubscriber';
|
||||
export function find(predicate, thisArg) {
|
||||
return operate(createFind(predicate, thisArg, 'value'));
|
||||
}
|
||||
export function createFind(predicate, thisArg, emit) {
|
||||
var findIndex = emit === 'index';
|
||||
return function (source, subscriber) {
|
||||
var index = 0;
|
||||
source.subscribe(createOperatorSubscriber(subscriber, function (value) {
|
||||
var i = index++;
|
||||
if (predicate.call(thisArg, value, i, source)) {
|
||||
subscriber.next(findIndex ? i : value);
|
||||
subscriber.complete();
|
||||
}
|
||||
}, function () {
|
||||
subscriber.next(findIndex ? -1 : undefined);
|
||||
subscriber.complete();
|
||||
}));
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=find.js.map
|
||||
@@ -0,0 +1,29 @@
|
||||
var baseNth = require('./_baseNth'),
|
||||
toInteger = require('./toInteger');
|
||||
|
||||
/**
|
||||
* Gets the element at index `n` of `array`. If `n` is negative, the nth
|
||||
* element from the end is returned.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.11.0
|
||||
* @category Array
|
||||
* @param {Array} array The array to query.
|
||||
* @param {number} [n=0] The index of the element to return.
|
||||
* @returns {*} Returns the nth element of `array`.
|
||||
* @example
|
||||
*
|
||||
* var array = ['a', 'b', 'c', 'd'];
|
||||
*
|
||||
* _.nth(array, 1);
|
||||
* // => 'b'
|
||||
*
|
||||
* _.nth(array, -2);
|
||||
* // => 'c';
|
||||
*/
|
||||
function nth(array, n) {
|
||||
return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
|
||||
}
|
||||
|
||||
module.exports = nth;
|
||||
@@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
var resolveSeq = require('./resolveSeq-d03cb037.js');
|
||||
var PlainValue = require('./PlainValue-ec8e588e.js');
|
||||
|
||||
|
||||
|
||||
exports.findPair = resolveSeq.findPair;
|
||||
exports.parseMap = resolveSeq.resolveMap;
|
||||
exports.parseSeq = resolveSeq.resolveSeq;
|
||||
exports.stringifyNumber = resolveSeq.stringifyNumber;
|
||||
exports.stringifyString = resolveSeq.stringifyString;
|
||||
exports.toJSON = resolveSeq.toJSON;
|
||||
exports.Type = PlainValue.Type;
|
||||
exports.YAMLError = PlainValue.YAMLError;
|
||||
exports.YAMLReferenceError = PlainValue.YAMLReferenceError;
|
||||
exports.YAMLSemanticError = PlainValue.YAMLSemanticError;
|
||||
exports.YAMLSyntaxError = PlainValue.YAMLSyntaxError;
|
||||
exports.YAMLWarning = PlainValue.YAMLWarning;
|
||||
@@ -0,0 +1,28 @@
|
||||
# Object
|
||||
|
||||
_Object_, any non-primitive value
|
||||
|
||||
## `object/is`
|
||||
|
||||
Confirms if passed value is an object
|
||||
|
||||
```javascript
|
||||
const isObject = require("type/object/is");
|
||||
|
||||
isObject({}); // true
|
||||
isObject(true); // false
|
||||
isObject(null); // false
|
||||
```
|
||||
|
||||
## `object/ensure`
|
||||
|
||||
If given argument is an object, it is returned back. Otherwise `TypeError` is thrown.
|
||||
|
||||
```javascript
|
||||
const ensureObject = require("type/object/ensure");
|
||||
|
||||
const obj = {};
|
||||
|
||||
ensureObject(obj); // obj
|
||||
ensureString(null); // Thrown TypeError: null is not an object
|
||||
```
|
||||
@@ -0,0 +1,41 @@
|
||||
module.exports = isexe
|
||||
isexe.sync = sync
|
||||
|
||||
var fs = require('fs')
|
||||
|
||||
function isexe (path, options, cb) {
|
||||
fs.stat(path, function (er, stat) {
|
||||
cb(er, er ? false : checkStat(stat, options))
|
||||
})
|
||||
}
|
||||
|
||||
function sync (path, options) {
|
||||
return checkStat(fs.statSync(path), options)
|
||||
}
|
||||
|
||||
function checkStat (stat, options) {
|
||||
return stat.isFile() && checkMode(stat, options)
|
||||
}
|
||||
|
||||
function checkMode (stat, options) {
|
||||
var mod = stat.mode
|
||||
var uid = stat.uid
|
||||
var gid = stat.gid
|
||||
|
||||
var myUid = options.uid !== undefined ?
|
||||
options.uid : process.getuid && process.getuid()
|
||||
var myGid = options.gid !== undefined ?
|
||||
options.gid : process.getgid && process.getgid()
|
||||
|
||||
var u = parseInt('100', 8)
|
||||
var g = parseInt('010', 8)
|
||||
var o = parseInt('001', 8)
|
||||
var ug = u | g
|
||||
|
||||
var ret = (mod & o) ||
|
||||
(mod & g) && gid === myGid ||
|
||||
(mod & u) && uid === myUid ||
|
||||
(mod & ug) && myUid === 0
|
||||
|
||||
return ret
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
var validRegExp = require("../../valid-reg-exp");
|
||||
|
||||
module.exports = function (string, replaceValue) {
|
||||
validRegExp(this);
|
||||
return String(string).replace(this, replaceValue);
|
||||
};
|
||||
@@ -0,0 +1,93 @@
|
||||
export default function collapseDuplicateDeclarations() {
|
||||
return (root) => {
|
||||
root.walkRules((node) => {
|
||||
let seen = new Map()
|
||||
let droppable = new Set([])
|
||||
let byProperty = new Map()
|
||||
|
||||
node.walkDecls((decl) => {
|
||||
// This could happen if we have nested selectors. In that case the
|
||||
// parent will loop over all its declarations but also the declarations
|
||||
// of nested rules. With this we ensure that we are shallowly checking
|
||||
// declarations.
|
||||
if (decl.parent !== node) {
|
||||
return
|
||||
}
|
||||
|
||||
if (seen.has(decl.prop)) {
|
||||
// Exact same value as what we have seen so far
|
||||
if (seen.get(decl.prop).value === decl.value) {
|
||||
// Keep the last one, drop the one we've seen so far
|
||||
droppable.add(seen.get(decl.prop))
|
||||
// Override the existing one with the new value. This is necessary
|
||||
// so that if we happen to have more than one declaration with the
|
||||
// same value, that we keep removing the previous one. Otherwise we
|
||||
// will only remove the *first* one.
|
||||
seen.set(decl.prop, decl)
|
||||
return
|
||||
}
|
||||
|
||||
// Not the same value, so we need to check if we can merge it so
|
||||
// let's collect it first.
|
||||
if (!byProperty.has(decl.prop)) {
|
||||
byProperty.set(decl.prop, new Set())
|
||||
}
|
||||
|
||||
byProperty.get(decl.prop).add(seen.get(decl.prop))
|
||||
byProperty.get(decl.prop).add(decl)
|
||||
}
|
||||
|
||||
seen.set(decl.prop, decl)
|
||||
})
|
||||
|
||||
// Drop all the duplicate declarations with the exact same value we've
|
||||
// already seen so far.
|
||||
for (let decl of droppable) {
|
||||
decl.remove()
|
||||
}
|
||||
|
||||
// Analyze the declarations based on its unit, drop all the declarations
|
||||
// with the same unit but the last one in the list.
|
||||
for (let declarations of byProperty.values()) {
|
||||
let byUnit = new Map()
|
||||
|
||||
for (let decl of declarations) {
|
||||
let unit = resolveUnit(decl.value)
|
||||
if (unit === null) {
|
||||
// We don't have a unit, so should never try and collapse this
|
||||
// value. This is because we can't know how to do it in a correct
|
||||
// way (e.g.: overrides for older browsers)
|
||||
continue
|
||||
}
|
||||
|
||||
if (!byUnit.has(unit)) {
|
||||
byUnit.set(unit, new Set())
|
||||
}
|
||||
|
||||
byUnit.get(unit).add(decl)
|
||||
}
|
||||
|
||||
for (let declarations of byUnit.values()) {
|
||||
// Get all but the last one
|
||||
let removableDeclarations = Array.from(declarations).slice(0, -1)
|
||||
|
||||
for (let decl of removableDeclarations) {
|
||||
decl.remove()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
let UNITLESS_NUMBER = Symbol('unitless-number')
|
||||
|
||||
function resolveUnit(input) {
|
||||
let result = /^-?\d*.?\d+([\w%]+)?$/g.exec(input)
|
||||
|
||||
if (result) {
|
||||
return result[1] ?? UNITLESS_NUMBER
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"protocols","version":"2.0.1","files":{"LICENSE":{"checkedAt":1678883670748,"integrity":"sha512-yEG/RgRB4Oj58Hodk3CbrvBh7dgBj3mxnLY8c7eR2EkLfOdg1h9IWvXfyQoc8K+IUpu1F6tJP6hou/A+wZg4Nw==","mode":420,"size":1134},"lib/index.js":{"checkedAt":1678883670750,"integrity":"sha512-V2iEkuyi9K3IFZvOH7VR7Spak6BW0uAm/JRZHEZGmo1J1unY/uUam2MlXehxq6ZRirWNNZVcmQ45sbM3YZsr9g==","mode":420,"size":901},"README.md":{"checkedAt":1678883670750,"integrity":"sha512-r/Ic3bh2Ubt30LjJxuRnPPs0+MNcAmcoVI+1o6evXivMOyP9ft4WYzNTyDV+iTLwA7LhxbGV+m2JJhfmNmsYeQ==","mode":420,"size":6323},"package.json":{"checkedAt":1678883670750,"integrity":"sha512-LW3jLqXWSJkhcB86ecV76QaJXSg9ts0vXttGkPNH3DO5VYhqm6/6r48pAS1pyhzvCLA5zthiaH/iN9BWE7DnXg==","mode":420,"size":935}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"InitializeNumberFormat.d.ts","sourceRoot":"","sources":["../../../../../../../packages/ecma402-abstract/NumberFormat/InitializeNumberFormat.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,8BAA8B,EAC/B,MAAM,iBAAiB,CAAA;AAUxB;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,EAAE,EAAE,IAAI,CAAC,YAAY,EACrB,OAAO,EAAE,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,EACnD,IAAI,EAAE,mBAAmB,GAAG,SAAS,EACrC,EACE,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,GACnB,EAAE;IACD,gBAAgB,CAAC,EAAE,EAAE,IAAI,CAAC,YAAY,GAAG,oBAAoB,CAAA;IAC7D,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,8BAA8B,GAAG,SAAS,CAAC,CAAA;IACtE,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC7B,oBAAoB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC3C,gBAAgB,IAAI,MAAM,CAAA;IAC1B,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC3C,qBA+GF"}
|
||||
@@ -0,0 +1,97 @@
|
||||
import assert from './_assert.js';
|
||||
import { hmac } from './hmac.js';
|
||||
import { Hash, CHash, Input, createView, toBytes, checkOpts, asyncLoop } from './utils.js';
|
||||
|
||||
// PBKDF (RFC 2898)
|
||||
export type Pbkdf2Opt = {
|
||||
c: number; // Iterations
|
||||
dkLen?: number; // Desired key length in bytes (Intended output length in octets of the derived key
|
||||
asyncTick?: number; // Maximum time in ms for which async function can block execution
|
||||
};
|
||||
// Common prologue and epilogue for sync/async functions
|
||||
function pbkdf2Init(hash: CHash, _password: Input, _salt: Input, _opts: Pbkdf2Opt) {
|
||||
assert.hash(hash);
|
||||
const opts = checkOpts({ dkLen: 32, asyncTick: 10 }, _opts);
|
||||
const { c, dkLen, asyncTick } = opts;
|
||||
assert.number(c);
|
||||
assert.number(dkLen);
|
||||
assert.number(asyncTick);
|
||||
if (c < 1) throw new Error('PBKDF2: iterations (c) should be >= 1');
|
||||
const password = toBytes(_password);
|
||||
const salt = toBytes(_salt);
|
||||
// DK = PBKDF2(PRF, Password, Salt, c, dkLen);
|
||||
const DK = new Uint8Array(dkLen);
|
||||
// U1 = PRF(Password, Salt + INT_32_BE(i))
|
||||
const PRF = hmac.create(hash, password);
|
||||
const PRFSalt = PRF._cloneInto().update(salt);
|
||||
return { c, dkLen, asyncTick, DK, PRF, PRFSalt };
|
||||
}
|
||||
|
||||
function pbkdf2Output<T extends Hash<T>>(
|
||||
PRF: Hash<T>,
|
||||
PRFSalt: Hash<T>,
|
||||
DK: Uint8Array,
|
||||
prfW: Hash<T>,
|
||||
u: Uint8Array
|
||||
) {
|
||||
PRF.destroy();
|
||||
PRFSalt.destroy();
|
||||
if (prfW) prfW.destroy();
|
||||
u.fill(0);
|
||||
return DK;
|
||||
}
|
||||
|
||||
/**
|
||||
* PBKDF2-HMAC: RFC 2898 key derivation function
|
||||
* @param hash - hash function that would be used e.g. sha256
|
||||
* @param password - password from which a derived key is generated
|
||||
* @param salt - cryptographic salt
|
||||
* @param opts - {c, dkLen} where c is work factor and dkLen is output message size
|
||||
*/
|
||||
export function pbkdf2(hash: CHash, password: Input, salt: Input, opts: Pbkdf2Opt) {
|
||||
const { c, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);
|
||||
let prfW: any; // Working copy
|
||||
const arr = new Uint8Array(4);
|
||||
const view = createView(arr);
|
||||
const u = new Uint8Array(PRF.outputLen);
|
||||
// DK = T1 + T2 + ⋯ + Tdklen/hlen
|
||||
for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {
|
||||
// Ti = F(Password, Salt, c, i)
|
||||
const Ti = DK.subarray(pos, pos + PRF.outputLen);
|
||||
view.setInt32(0, ti, false);
|
||||
// F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc
|
||||
// U1 = PRF(Password, Salt + INT_32_BE(i))
|
||||
(prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);
|
||||
Ti.set(u.subarray(0, Ti.length));
|
||||
for (let ui = 1; ui < c; ui++) {
|
||||
// Uc = PRF(Password, Uc−1)
|
||||
PRF._cloneInto(prfW).update(u).digestInto(u);
|
||||
for (let i = 0; i < Ti.length; i++) Ti[i] ^= u[i];
|
||||
}
|
||||
}
|
||||
return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);
|
||||
}
|
||||
|
||||
export async function pbkdf2Async(hash: CHash, password: Input, salt: Input, opts: Pbkdf2Opt) {
|
||||
const { c, dkLen, asyncTick, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);
|
||||
let prfW: any; // Working copy
|
||||
const arr = new Uint8Array(4);
|
||||
const view = createView(arr);
|
||||
const u = new Uint8Array(PRF.outputLen);
|
||||
// DK = T1 + T2 + ⋯ + Tdklen/hlen
|
||||
for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {
|
||||
// Ti = F(Password, Salt, c, i)
|
||||
const Ti = DK.subarray(pos, pos + PRF.outputLen);
|
||||
view.setInt32(0, ti, false);
|
||||
// F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc
|
||||
// U1 = PRF(Password, Salt + INT_32_BE(i))
|
||||
(prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);
|
||||
Ti.set(u.subarray(0, Ti.length));
|
||||
await asyncLoop(c - 1, asyncTick, (i) => {
|
||||
// Uc = PRF(Password, Uc−1)
|
||||
PRF._cloneInto(prfW).update(u).digestInto(u);
|
||||
for (let i = 0; i < Ti.length; i++) Ti[i] ^= u[i];
|
||||
});
|
||||
}
|
||||
return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { OperatorFunction } from "../types";
|
||||
/**
|
||||
* Used in several -- mostly deprecated -- situations where we need to
|
||||
* apply a list of arguments or a single argument to a result selector.
|
||||
*/
|
||||
export declare function mapOneOrManyArgs<T, R>(fn: ((...values: T[]) => R)): OperatorFunction<T | T[], R>;
|
||||
//# sourceMappingURL=mapOneOrManyArgs.d.ts.map
|
||||
@@ -0,0 +1,260 @@
|
||||
[
|
||||
"3dm",
|
||||
"3ds",
|
||||
"3g2",
|
||||
"3gp",
|
||||
"7z",
|
||||
"a",
|
||||
"aac",
|
||||
"adp",
|
||||
"ai",
|
||||
"aif",
|
||||
"aiff",
|
||||
"alz",
|
||||
"ape",
|
||||
"apk",
|
||||
"appimage",
|
||||
"ar",
|
||||
"arj",
|
||||
"asf",
|
||||
"au",
|
||||
"avi",
|
||||
"bak",
|
||||
"baml",
|
||||
"bh",
|
||||
"bin",
|
||||
"bk",
|
||||
"bmp",
|
||||
"btif",
|
||||
"bz2",
|
||||
"bzip2",
|
||||
"cab",
|
||||
"caf",
|
||||
"cgm",
|
||||
"class",
|
||||
"cmx",
|
||||
"cpio",
|
||||
"cr2",
|
||||
"cur",
|
||||
"dat",
|
||||
"dcm",
|
||||
"deb",
|
||||
"dex",
|
||||
"djvu",
|
||||
"dll",
|
||||
"dmg",
|
||||
"dng",
|
||||
"doc",
|
||||
"docm",
|
||||
"docx",
|
||||
"dot",
|
||||
"dotm",
|
||||
"dra",
|
||||
"DS_Store",
|
||||
"dsk",
|
||||
"dts",
|
||||
"dtshd",
|
||||
"dvb",
|
||||
"dwg",
|
||||
"dxf",
|
||||
"ecelp4800",
|
||||
"ecelp7470",
|
||||
"ecelp9600",
|
||||
"egg",
|
||||
"eol",
|
||||
"eot",
|
||||
"epub",
|
||||
"exe",
|
||||
"f4v",
|
||||
"fbs",
|
||||
"fh",
|
||||
"fla",
|
||||
"flac",
|
||||
"flatpak",
|
||||
"fli",
|
||||
"flv",
|
||||
"fpx",
|
||||
"fst",
|
||||
"fvt",
|
||||
"g3",
|
||||
"gh",
|
||||
"gif",
|
||||
"graffle",
|
||||
"gz",
|
||||
"gzip",
|
||||
"h261",
|
||||
"h263",
|
||||
"h264",
|
||||
"icns",
|
||||
"ico",
|
||||
"ief",
|
||||
"img",
|
||||
"ipa",
|
||||
"iso",
|
||||
"jar",
|
||||
"jpeg",
|
||||
"jpg",
|
||||
"jpgv",
|
||||
"jpm",
|
||||
"jxr",
|
||||
"key",
|
||||
"ktx",
|
||||
"lha",
|
||||
"lib",
|
||||
"lvp",
|
||||
"lz",
|
||||
"lzh",
|
||||
"lzma",
|
||||
"lzo",
|
||||
"m3u",
|
||||
"m4a",
|
||||
"m4v",
|
||||
"mar",
|
||||
"mdi",
|
||||
"mht",
|
||||
"mid",
|
||||
"midi",
|
||||
"mj2",
|
||||
"mka",
|
||||
"mkv",
|
||||
"mmr",
|
||||
"mng",
|
||||
"mobi",
|
||||
"mov",
|
||||
"movie",
|
||||
"mp3",
|
||||
"mp4",
|
||||
"mp4a",
|
||||
"mpeg",
|
||||
"mpg",
|
||||
"mpga",
|
||||
"mxu",
|
||||
"nef",
|
||||
"npx",
|
||||
"numbers",
|
||||
"nupkg",
|
||||
"o",
|
||||
"odp",
|
||||
"ods",
|
||||
"odt",
|
||||
"oga",
|
||||
"ogg",
|
||||
"ogv",
|
||||
"otf",
|
||||
"ott",
|
||||
"pages",
|
||||
"pbm",
|
||||
"pcx",
|
||||
"pdb",
|
||||
"pdf",
|
||||
"pea",
|
||||
"pgm",
|
||||
"pic",
|
||||
"png",
|
||||
"pnm",
|
||||
"pot",
|
||||
"potm",
|
||||
"potx",
|
||||
"ppa",
|
||||
"ppam",
|
||||
"ppm",
|
||||
"pps",
|
||||
"ppsm",
|
||||
"ppsx",
|
||||
"ppt",
|
||||
"pptm",
|
||||
"pptx",
|
||||
"psd",
|
||||
"pya",
|
||||
"pyc",
|
||||
"pyo",
|
||||
"pyv",
|
||||
"qt",
|
||||
"rar",
|
||||
"ras",
|
||||
"raw",
|
||||
"resources",
|
||||
"rgb",
|
||||
"rip",
|
||||
"rlc",
|
||||
"rmf",
|
||||
"rmvb",
|
||||
"rpm",
|
||||
"rtf",
|
||||
"rz",
|
||||
"s3m",
|
||||
"s7z",
|
||||
"scpt",
|
||||
"sgi",
|
||||
"shar",
|
||||
"snap",
|
||||
"sil",
|
||||
"sketch",
|
||||
"slk",
|
||||
"smv",
|
||||
"snk",
|
||||
"so",
|
||||
"stl",
|
||||
"suo",
|
||||
"sub",
|
||||
"swf",
|
||||
"tar",
|
||||
"tbz",
|
||||
"tbz2",
|
||||
"tga",
|
||||
"tgz",
|
||||
"thmx",
|
||||
"tif",
|
||||
"tiff",
|
||||
"tlz",
|
||||
"ttc",
|
||||
"ttf",
|
||||
"txz",
|
||||
"udf",
|
||||
"uvh",
|
||||
"uvi",
|
||||
"uvm",
|
||||
"uvp",
|
||||
"uvs",
|
||||
"uvu",
|
||||
"viv",
|
||||
"vob",
|
||||
"war",
|
||||
"wav",
|
||||
"wax",
|
||||
"wbmp",
|
||||
"wdp",
|
||||
"weba",
|
||||
"webm",
|
||||
"webp",
|
||||
"whl",
|
||||
"wim",
|
||||
"wm",
|
||||
"wma",
|
||||
"wmv",
|
||||
"wmx",
|
||||
"woff",
|
||||
"woff2",
|
||||
"wrm",
|
||||
"wvx",
|
||||
"xbm",
|
||||
"xif",
|
||||
"xla",
|
||||
"xlam",
|
||||
"xls",
|
||||
"xlsb",
|
||||
"xlsm",
|
||||
"xlsx",
|
||||
"xlt",
|
||||
"xltm",
|
||||
"xltx",
|
||||
"xm",
|
||||
"xmind",
|
||||
"xpi",
|
||||
"xpm",
|
||||
"xwd",
|
||||
"xz",
|
||||
"z",
|
||||
"zip",
|
||||
"zipx"
|
||||
]
|
||||
@@ -0,0 +1,5 @@
|
||||
import { Observable } from '../Observable';
|
||||
export function fromSubscribable(subscribable) {
|
||||
return new Observable((subscriber) => subscribable.subscribe(subscriber));
|
||||
}
|
||||
//# sourceMappingURL=fromSubscribable.js.map
|
||||
@@ -0,0 +1,37 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var v = require('es-value-fixtures');
|
||||
var forEach = require('for-each');
|
||||
var inspect = require('object-inspect');
|
||||
|
||||
var regexTester = require('../');
|
||||
|
||||
test('regex tester', function (t) {
|
||||
t.equal(typeof regexTester, 'function', 'is a function');
|
||||
|
||||
t.test('non-regexes', function (st) {
|
||||
forEach(v.primitives.concat(v.objects), function (val) {
|
||||
st['throws'](
|
||||
function () { regexTester(val); },
|
||||
TypeError,
|
||||
inspect(val) + ' is not a regex'
|
||||
);
|
||||
});
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('regexes', function (st) {
|
||||
var tester = regexTester(/a/);
|
||||
|
||||
st.equal(typeof tester, 'function', 'returns a function');
|
||||
st.equal(tester('a'), true, 'returns true for a match');
|
||||
st.equal(tester('b'), false, 'returns false for a non-match');
|
||||
st.equal(tester('a'), true, 'returns true for a match again');
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
Extracts the type of the last element of an array.
|
||||
|
||||
Use-case: Defining the return type of functions that extract the last element of an array, for example [`lodash.last`](https://lodash.com/docs/4.17.15#last).
|
||||
|
||||
@example
|
||||
```
|
||||
import type {LastArrayElement} from 'type-fest';
|
||||
|
||||
declare function lastOf<V extends readonly any[]>(array: V): LastArrayElement<V>;
|
||||
|
||||
const array = ['foo', 2];
|
||||
|
||||
typeof lastOf(array);
|
||||
//=> number
|
||||
```
|
||||
|
||||
@category Array
|
||||
@category Template literal
|
||||
*/
|
||||
export type LastArrayElement<ValueType extends readonly unknown[]> =
|
||||
ValueType extends readonly [infer ElementType]
|
||||
? ElementType
|
||||
: ValueType extends readonly [infer _, ...infer Tail]
|
||||
? LastArrayElement<Tail>
|
||||
: ValueType extends ReadonlyArray<infer ElementType>
|
||||
? ElementType
|
||||
: never;
|
||||
@@ -0,0 +1,11 @@
|
||||
export function createErrorClass(createImpl) {
|
||||
const _super = (instance) => {
|
||||
Error.call(instance);
|
||||
instance.stack = new Error().stack;
|
||||
};
|
||||
const ctorFunc = createImpl(_super);
|
||||
ctorFunc.prototype = Object.create(Error.prototype);
|
||||
ctorFunc.prototype.constructor = ctorFunc;
|
||||
return ctorFunc;
|
||||
}
|
||||
//# sourceMappingURL=createErrorClass.js.map
|
||||
@@ -0,0 +1,32 @@
|
||||
# String
|
||||
|
||||
_string_ primitive
|
||||
|
||||
## `string/coerce`
|
||||
|
||||
Restricted string coercion. Returns string presentation for every value that follows below constraints
|
||||
|
||||
- is implicitly coercible to string
|
||||
- is neither`null` nor `undefined`
|
||||
- its `toString` method is not `Object.prototype.toString`
|
||||
|
||||
For all other values `null` is returned
|
||||
|
||||
```javascript
|
||||
const coerceToString = require("type/string/coerce");
|
||||
|
||||
coerceToString(12); // "12"
|
||||
coerceToString(undefined); // null
|
||||
```
|
||||
|
||||
## `string/ensure`
|
||||
|
||||
If given argument is a string coercible value (via [`string/coerce`](#stringcoerce)) returns result string.
|
||||
Otherwise `TypeError` is thrown.
|
||||
|
||||
```javascript
|
||||
const ensureString = require("type/string/ensure");
|
||||
|
||||
ensureString(12); // "12"
|
||||
ensureString(null); // Thrown TypeError: null is not a string
|
||||
```
|
||||
@@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
var ES5ToInteger = require('../5/ToInteger');
|
||||
|
||||
var ToNumber = require('./ToNumber');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-tointeger
|
||||
|
||||
module.exports = function ToInteger(value) {
|
||||
var number = ToNumber(value);
|
||||
return ES5ToInteger(number);
|
||||
};
|
||||
@@ -0,0 +1,200 @@
|
||||
"use strict";
|
||||
const usm = require("./url-state-machine");
|
||||
|
||||
exports.implementation = class URLImpl {
|
||||
constructor(constructorArgs) {
|
||||
const url = constructorArgs[0];
|
||||
const base = constructorArgs[1];
|
||||
|
||||
let parsedBase = null;
|
||||
if (base !== undefined) {
|
||||
parsedBase = usm.basicURLParse(base);
|
||||
if (parsedBase === "failure") {
|
||||
throw new TypeError("Invalid base URL");
|
||||
}
|
||||
}
|
||||
|
||||
const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase });
|
||||
if (parsedURL === "failure") {
|
||||
throw new TypeError("Invalid URL");
|
||||
}
|
||||
|
||||
this._url = parsedURL;
|
||||
|
||||
// TODO: query stuff
|
||||
}
|
||||
|
||||
get href() {
|
||||
return usm.serializeURL(this._url);
|
||||
}
|
||||
|
||||
set href(v) {
|
||||
const parsedURL = usm.basicURLParse(v);
|
||||
if (parsedURL === "failure") {
|
||||
throw new TypeError("Invalid URL");
|
||||
}
|
||||
|
||||
this._url = parsedURL;
|
||||
}
|
||||
|
||||
get origin() {
|
||||
return usm.serializeURLOrigin(this._url);
|
||||
}
|
||||
|
||||
get protocol() {
|
||||
return this._url.scheme + ":";
|
||||
}
|
||||
|
||||
set protocol(v) {
|
||||
usm.basicURLParse(v + ":", { url: this._url, stateOverride: "scheme start" });
|
||||
}
|
||||
|
||||
get username() {
|
||||
return this._url.username;
|
||||
}
|
||||
|
||||
set username(v) {
|
||||
if (usm.cannotHaveAUsernamePasswordPort(this._url)) {
|
||||
return;
|
||||
}
|
||||
|
||||
usm.setTheUsername(this._url, v);
|
||||
}
|
||||
|
||||
get password() {
|
||||
return this._url.password;
|
||||
}
|
||||
|
||||
set password(v) {
|
||||
if (usm.cannotHaveAUsernamePasswordPort(this._url)) {
|
||||
return;
|
||||
}
|
||||
|
||||
usm.setThePassword(this._url, v);
|
||||
}
|
||||
|
||||
get host() {
|
||||
const url = this._url;
|
||||
|
||||
if (url.host === null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (url.port === null) {
|
||||
return usm.serializeHost(url.host);
|
||||
}
|
||||
|
||||
return usm.serializeHost(url.host) + ":" + usm.serializeInteger(url.port);
|
||||
}
|
||||
|
||||
set host(v) {
|
||||
if (this._url.cannotBeABaseURL) {
|
||||
return;
|
||||
}
|
||||
|
||||
usm.basicURLParse(v, { url: this._url, stateOverride: "host" });
|
||||
}
|
||||
|
||||
get hostname() {
|
||||
if (this._url.host === null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return usm.serializeHost(this._url.host);
|
||||
}
|
||||
|
||||
set hostname(v) {
|
||||
if (this._url.cannotBeABaseURL) {
|
||||
return;
|
||||
}
|
||||
|
||||
usm.basicURLParse(v, { url: this._url, stateOverride: "hostname" });
|
||||
}
|
||||
|
||||
get port() {
|
||||
if (this._url.port === null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return usm.serializeInteger(this._url.port);
|
||||
}
|
||||
|
||||
set port(v) {
|
||||
if (usm.cannotHaveAUsernamePasswordPort(this._url)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (v === "") {
|
||||
this._url.port = null;
|
||||
} else {
|
||||
usm.basicURLParse(v, { url: this._url, stateOverride: "port" });
|
||||
}
|
||||
}
|
||||
|
||||
get pathname() {
|
||||
if (this._url.cannotBeABaseURL) {
|
||||
return this._url.path[0];
|
||||
}
|
||||
|
||||
if (this._url.path.length === 0) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return "/" + this._url.path.join("/");
|
||||
}
|
||||
|
||||
set pathname(v) {
|
||||
if (this._url.cannotBeABaseURL) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._url.path = [];
|
||||
usm.basicURLParse(v, { url: this._url, stateOverride: "path start" });
|
||||
}
|
||||
|
||||
get search() {
|
||||
if (this._url.query === null || this._url.query === "") {
|
||||
return "";
|
||||
}
|
||||
|
||||
return "?" + this._url.query;
|
||||
}
|
||||
|
||||
set search(v) {
|
||||
// TODO: query stuff
|
||||
|
||||
const url = this._url;
|
||||
|
||||
if (v === "") {
|
||||
url.query = null;
|
||||
return;
|
||||
}
|
||||
|
||||
const input = v[0] === "?" ? v.substring(1) : v;
|
||||
url.query = "";
|
||||
usm.basicURLParse(input, { url, stateOverride: "query" });
|
||||
}
|
||||
|
||||
get hash() {
|
||||
if (this._url.fragment === null || this._url.fragment === "") {
|
||||
return "";
|
||||
}
|
||||
|
||||
return "#" + this._url.fragment;
|
||||
}
|
||||
|
||||
set hash(v) {
|
||||
if (v === "") {
|
||||
this._url.fragment = null;
|
||||
return;
|
||||
}
|
||||
|
||||
const input = v[0] === "#" ? v.substring(1) : v;
|
||||
this._url.fragment = "";
|
||||
usm.basicURLParse(input, { url: this._url, stateOverride: "fragment" });
|
||||
}
|
||||
|
||||
toJSON() {
|
||||
return this.href;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
module.exports = require('./dist/types').YAMLSeq
|
||||
require('./dist/legacy-exports').warnFileDeprecation(__filename)
|
||||
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
var callable = require("../../object/valid-callable")
|
||||
, defineLength = require("../_define-length")
|
||||
, apply = Function.prototype.apply;
|
||||
|
||||
module.exports = function () {
|
||||
var fn = callable(this);
|
||||
|
||||
return defineLength(function () { return !apply.call(fn, this, arguments); }, fn.length);
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Used in operators and functions that accept either a list of arguments, or an array of arguments
|
||||
* as a single argument.
|
||||
*/
|
||||
export declare function argsOrArgArray<T>(args: (T | T[])[]): T[];
|
||||
//# sourceMappingURL=argsOrArgArray.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"@octokit/auth-token","version":"3.0.3","files":{"LICENSE":{"checkedAt":1678883670372,"integrity":"sha512-EHJOahlMp1lwtBt4Za3avDrfUOnQEDTeZ9T/SbhQwf90Vo/Mr5DW3QqyL+0w2phUaGj/PoEizqq/4IOQcYBr4w==","mode":420,"size":1081},"dist-src/types.js":{"checkedAt":1678883669320,"integrity":"sha512-TuHIj4w/TkzTTLbAAzm/nW0Db/St469J6HHMiWa4THKdi3VJKsxkE8mmZKwApXlYIjrBPEIp2oxi6+alPk94Pw==","mode":420,"size":11},"dist-src/auth.js":{"checkedAt":1678883670427,"integrity":"sha512-dC48RnqjOScGE4Il8XDtwOHRKSRBGU502oSVZnluI4LiKB3Fl5gevLRDJOAEJACef4TZEXo0K6uN9q5KhGMFJg==","mode":420,"size":665},"dist-src/hook.js":{"checkedAt":1678883670427,"integrity":"sha512-50TYcX3N5Tc7jOVu+O7HX2Fn4x6g/2y5feSsRYY5vWF+dJZdt8Oqwz8zgFIycr+CMG9xFPW0DpuRhwLRPcyhuA==","mode":420,"size":300},"dist-node/index.js":{"checkedAt":1678883670427,"integrity":"sha512-j51G5Cyb+dNw6tQ74YWgrK+alG7jnKU/w+g9+NpPyAtairDxLN748Y2KnfWtE/67zJm7uCz37//FAQ/WvUq+Pw==","mode":420,"size":1619},"dist-src/index.js":{"checkedAt":1678883670427,"integrity":"sha512-cBm9FZZmhgb1W/T6Uw44udN93LV0KZr6GY67igQfVGhM+RYo0+H/40FUdEIJaz9eh40Gh4vISNHMPcyubRy5mQ==","mode":420,"size":530},"dist-web/index.js":{"checkedAt":1678883670427,"integrity":"sha512-EfsJgJFbmnm8DRw8hv8CVvmXemtX60O04b8G5SwroHKSfvNG4NO0eT225SUSZxwHAoCAnXbd3cdXGO79tfNHfQ==","mode":420,"size":1673},"dist-src/with-authorization-prefix.js":{"checkedAt":1678883670427,"integrity":"sha512-Mncp8X/nGNMwX9M1PkjL1qgtoz3b9ouCI0a3neJWFvSb/hiWGoD24njc4pib5OuERowoLgHsVJv+JEdJAVWTMg==","mode":420,"size":273},"package.json":{"checkedAt":1678883670427,"integrity":"sha512-pJFXVTujliFM9Id3U9VFfBwafrKn4xni/IQXrmHHdY3hbVxtNzR3NgCdZPz2ZaXd8rshGCQzcHnebP8T+vKrLw==","mode":420,"size":1125},"dist-node/index.js.map":{"checkedAt":1678883670433,"integrity":"sha512-RTGN9g3QxX9TCT+9z28SAZPHyZjtqo6Q7FC1jtM3HP4eAIimLfqkKOcBWtUhhIFicBZKzXj+2T2Nv6gFDNZlcw==","mode":420,"size":3782},"dist-web/index.js.map":{"checkedAt":1678883670433,"integrity":"sha512-j2EmQliFaqkk6/yExlU/kxgdg5F3bBO4vMfeylDDcHv9Z1LdswJJ8yRt9wk6dG/MShvEDeZhK3S0lgezLKKuQw==","mode":420,"size":3674},"README.md":{"checkedAt":1678883670439,"integrity":"sha512-+N+I7zuOkHxGuyvbLZuOunQumsbOwOUfTq1VIM3d7saVMpMkME2kEiUdvQWxVJ4p7cQgvif7BGXQjBSwXxkvng==","mode":420,"size":8873},"dist-types/auth.d.ts":{"checkedAt":1678883670439,"integrity":"sha512-4zx7MaE93NPijO5rcQU9w4Ap8a7GgUlAU35E8/laslZYSMJUqmSPNdjAB/B2ul1tRpqQM23T28x43sQ7B/hMJg==","mode":420,"size":118},"dist-types/types.d.ts":{"checkedAt":1678883670439,"integrity":"sha512-g9mhJ8dKrLYN1jDiPorz60LhC9urnExwMU9m90thDKESBkqmgX5kMvPq3B764osdF7gfGOU6z3ebHjCaZRO5bg==","mode":420,"size":1099},"dist-types/index.d.ts":{"checkedAt":1678883670439,"integrity":"sha512-kRBqghhcnhdoLW2FW7TKljXcZrI/3t6CdpQK5LH8PEjSXRIdf44pVrqXBLXQ5Djz4UIDGGWi2y0iNqkTzV01lg==","mode":420,"size":238},"dist-types/hook.d.ts":{"checkedAt":1678883670439,"integrity":"sha512-RoOU+PXtgjDtRJ9RF7DoFq+uU4b50jRZHvtn7JK+IjQc8TW+Xy8k4NPcBmpqBUBDnjj8RIanpZ7o38SB20NhXA==","mode":420,"size":264},"dist-types/with-authorization-prefix.d.ts":{"checkedAt":1678883670439,"integrity":"sha512-n+X8Lya7IdNDZ0rPpZrgcH1jkAh+QQfg+TBXzfv2u4Pb6fTcnwzTOiT1KnImb3LbR0gXs+JN72BbSGsAqLD4Vg==","mode":420,"size":183}}}
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Gets the first element of `array`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @alias first
|
||||
* @category Array
|
||||
* @param {Array} array The array to query.
|
||||
* @returns {*} Returns the first element of `array`.
|
||||
* @example
|
||||
*
|
||||
* _.head([1, 2, 3]);
|
||||
* // => 1
|
||||
*
|
||||
* _.head([]);
|
||||
* // => undefined
|
||||
*/
|
||||
function head(array) {
|
||||
return (array && array.length) ? array[0] : undefined;
|
||||
}
|
||||
|
||||
module.exports = head;
|
||||
@@ -0,0 +1,235 @@
|
||||
import { PartialObserver } from '../types';
|
||||
|
||||
/**
|
||||
* Valid Ajax direction types. Prefixes the event `type` in the
|
||||
* {@link AjaxResponse} object with "upload_" for events related
|
||||
* to uploading and "download_" for events related to downloading.
|
||||
*/
|
||||
export type AjaxDirection = 'upload' | 'download';
|
||||
|
||||
export type ProgressEventType = 'loadstart' | 'progress' | 'load';
|
||||
|
||||
export type AjaxResponseType = `${AjaxDirection}_${ProgressEventType}`;
|
||||
|
||||
/**
|
||||
* The object containing values RxJS used to make the HTTP request.
|
||||
*
|
||||
* This is provided in {@link AjaxError} instances as the `request`
|
||||
* object.
|
||||
*/
|
||||
export interface AjaxRequest {
|
||||
/**
|
||||
* The URL requested.
|
||||
*/
|
||||
url: string;
|
||||
|
||||
/**
|
||||
* The body to send over the HTTP request.
|
||||
*/
|
||||
body?: any;
|
||||
|
||||
/**
|
||||
* The HTTP method used to make the HTTP request.
|
||||
*/
|
||||
method: string;
|
||||
|
||||
/**
|
||||
* Whether or not the request was made asynchronously.
|
||||
*/
|
||||
async: boolean;
|
||||
|
||||
/**
|
||||
* The headers sent over the HTTP request.
|
||||
*/
|
||||
headers: Readonly<Record<string, any>>;
|
||||
|
||||
/**
|
||||
* The timeout value used for the HTTP request.
|
||||
* Note: this is only honored if the request is asynchronous (`async` is `true`).
|
||||
*/
|
||||
timeout: number;
|
||||
|
||||
/**
|
||||
* The user credentials user name sent with the HTTP request.
|
||||
*/
|
||||
user?: string;
|
||||
|
||||
/**
|
||||
* The user credentials password sent with the HTTP request.
|
||||
*/
|
||||
password?: string;
|
||||
|
||||
/**
|
||||
* Whether or not the request was a CORS request.
|
||||
*/
|
||||
crossDomain: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not a CORS request was sent with credentials.
|
||||
* If `false`, will also ignore cookies in the CORS response.
|
||||
*/
|
||||
withCredentials: boolean;
|
||||
|
||||
/**
|
||||
* The [`responseType`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType) set before sending the request.
|
||||
*/
|
||||
responseType: XMLHttpRequestResponseType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configuration for the {@link ajax} creation function.
|
||||
*/
|
||||
export interface AjaxConfig {
|
||||
/** The address of the resource to request via HTTP. */
|
||||
url: string;
|
||||
|
||||
/**
|
||||
* The body of the HTTP request to send.
|
||||
*
|
||||
* This is serialized, by default, based off of the value of the `"content-type"` header.
|
||||
* For example, if the `"content-type"` is `"application/json"`, the body will be serialized
|
||||
* as JSON. If the `"content-type"` is `"application/x-www-form-urlencoded"`, whatever object passed
|
||||
* to the body will be serialized as URL, using key-value pairs based off of the keys and values of the object.
|
||||
* In all other cases, the body will be passed directly.
|
||||
*/
|
||||
body?: any;
|
||||
|
||||
/**
|
||||
* Whether or not to send the request asynchronously. Defaults to `true`.
|
||||
* If set to `false`, this will block the thread until the AJAX request responds.
|
||||
*/
|
||||
async?: boolean;
|
||||
|
||||
/**
|
||||
* The HTTP Method to use for the request. Defaults to "GET".
|
||||
*/
|
||||
method?: string;
|
||||
|
||||
/**
|
||||
* The HTTP headers to apply.
|
||||
*
|
||||
* Note that, by default, RxJS will add the following headers under certain conditions:
|
||||
*
|
||||
* 1. If the `"content-type"` header is **NOT** set, and the `body` is [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData),
|
||||
* a `"content-type"` of `"application/x-www-form-urlencoded; charset=UTF-8"` will be set automatically.
|
||||
* 2. If the `"x-requested-with"` header is **NOT** set, and the `crossDomain` configuration property is **NOT** explicitly set to `true`,
|
||||
* (meaning it is not a CORS request), a `"x-requested-with"` header with a value of `"XMLHttpRequest"` will be set automatically.
|
||||
* This header is generally meaningless, and is set by libraries and frameworks using `XMLHttpRequest` to make HTTP requests.
|
||||
*/
|
||||
headers?: Readonly<Record<string, any>>;
|
||||
|
||||
/**
|
||||
* The time to wait before causing the underlying XMLHttpRequest to timeout. This is only honored if the
|
||||
* `async` configuration setting is unset or set to `true`. Defaults to `0`, which is idiomatic for "never timeout".
|
||||
*/
|
||||
timeout?: number;
|
||||
|
||||
/** The user credentials user name to send with the HTTP request */
|
||||
user?: string;
|
||||
|
||||
/** The user credentials password to send with the HTTP request*/
|
||||
password?: string;
|
||||
|
||||
/**
|
||||
* Whether or not to send the HTTP request as a CORS request.
|
||||
* Defaults to `false`.
|
||||
*
|
||||
* @deprecated Will be removed in version 8. Cross domain requests and what creates a cross
|
||||
* domain request, are dictated by the browser, and a boolean that forces it to be cross domain
|
||||
* does not make sense. If you need to force cross domain, make sure you're making a secure request,
|
||||
* then add a custom header to the request or use `withCredentials`. For more information on what
|
||||
* triggers a cross domain request, see the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials).
|
||||
* In particular, the section on [Simple Requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Simple_requests) is useful
|
||||
* for understanding when CORS will not be used.
|
||||
*/
|
||||
crossDomain?: boolean;
|
||||
|
||||
/**
|
||||
* To send user credentials in a CORS request, set to `true`. To exclude user credentials from
|
||||
* a CORS request, _OR_ when cookies are to be ignored by the CORS response, set to `false`.
|
||||
*
|
||||
* Defaults to `false`.
|
||||
*/
|
||||
withCredentials?: boolean;
|
||||
|
||||
/**
|
||||
* The name of your site's XSRF cookie.
|
||||
*/
|
||||
xsrfCookieName?: string;
|
||||
|
||||
/**
|
||||
* The name of a custom header that you can use to send your XSRF cookie.
|
||||
*/
|
||||
xsrfHeaderName?: string;
|
||||
|
||||
/**
|
||||
* Can be set to change the response type.
|
||||
* Valid values are `"arraybuffer"`, `"blob"`, `"document"`, `"json"`, and `"text"`.
|
||||
* Note that the type of `"document"` (such as an XML document) is ignored if the global context is
|
||||
* not `Window`.
|
||||
*
|
||||
* Defaults to `"json"`.
|
||||
*/
|
||||
responseType?: XMLHttpRequestResponseType;
|
||||
|
||||
/**
|
||||
* An optional factory used to create the XMLHttpRequest object used to make the AJAX request.
|
||||
* This is useful in environments that lack `XMLHttpRequest`, or in situations where you
|
||||
* wish to override the default `XMLHttpRequest` for some reason.
|
||||
*
|
||||
* If not provided, the `XMLHttpRequest` in global scope will be used.
|
||||
*
|
||||
* NOTE: This AJAX implementation relies on the built-in serialization and setting
|
||||
* of Content-Type headers that is provided by standards-compliant XMLHttpRequest implementations,
|
||||
* be sure any implementation you use meets that standard.
|
||||
*/
|
||||
createXHR?: () => XMLHttpRequest;
|
||||
|
||||
/**
|
||||
* An observer for watching the upload progress of an HTTP request. Will
|
||||
* emit progress events, and completes on the final upload load event, will error for
|
||||
* any XHR error or timeout.
|
||||
*
|
||||
* This will **not** error for errored status codes. Rather, it will always _complete_ when
|
||||
* the HTTP response comes back.
|
||||
*
|
||||
* @deprecated If you're looking for progress events, use {@link includeDownloadProgress} and
|
||||
* {@link includeUploadProgress} instead. Will be removed in v8.
|
||||
*/
|
||||
progressSubscriber?: PartialObserver<ProgressEvent>;
|
||||
|
||||
/**
|
||||
* If `true`, will emit all download progress and load complete events as {@link AjaxResponse}
|
||||
* from the observable. The final download event will also be emitted as a {@link AjaxResponse}.
|
||||
*
|
||||
* If both this and {@link includeUploadProgress} are `false`, then only the {@link AjaxResponse} will
|
||||
* be emitted from the resulting observable.
|
||||
*/
|
||||
includeDownloadProgress?: boolean;
|
||||
|
||||
/**
|
||||
* If `true`, will emit all upload progress and load complete events as {@link AjaxResponse}
|
||||
* from the observable. The final download event will also be emitted as a {@link AjaxResponse}.
|
||||
*
|
||||
* If both this and {@link includeDownloadProgress} are `false`, then only the {@link AjaxResponse} will
|
||||
* be emitted from the resulting observable.
|
||||
*/
|
||||
includeUploadProgress?: boolean;
|
||||
|
||||
/**
|
||||
* Query string parameters to add to the URL in the request.
|
||||
* <em>This will require a polyfill for `URL` and `URLSearchParams` in Internet Explorer!</em>
|
||||
*
|
||||
* Accepts either a query string, a `URLSearchParams` object, a dictionary of key/value pairs, or an
|
||||
* array of key/value entry tuples. (Essentially, it takes anything that `new URLSearchParams` would normally take).
|
||||
*
|
||||
* If, for some reason you have a query string in the `url` argument, this will append to the query string in the url,
|
||||
* but it will also overwrite the value of any keys that are an exact match. In other words, a url of `/test?a=1&b=2`,
|
||||
* with queryParams of `{ b: 5, c: 6 }` will result in a url of roughly `/test?a=1&b=5&c=6`.
|
||||
*/
|
||||
queryParams?:
|
||||
| string
|
||||
| URLSearchParams
|
||||
| Record<string, string | number | boolean | string[] | number[] | boolean[]>
|
||||
| [string, string | number | boolean | string[] | number[] | boolean[]][];
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"consistent-return": 1,
|
||||
"eqeqeq": [2, "always", { "null": "ignore" }],
|
||||
"func-name-matching": 0,
|
||||
"id-length": 0,
|
||||
"multiline-comment-style": 0,
|
||||
"new-cap": [2, {
|
||||
"capIsNewExceptions": [
|
||||
"GetIntrinsic",
|
||||
],
|
||||
}],
|
||||
"no-magic-numbers": [1, {
|
||||
"ignore": [1, 0xDC00, 0xD800, 0xDFFF, 0xDBFF],
|
||||
}],
|
||||
},
|
||||
|
||||
"overrides": [
|
||||
{
|
||||
"files": "test/**",
|
||||
"rules": {
|
||||
"max-lines-per-function": 0,
|
||||
"no-magic-numbers": 0,
|
||||
"no-new-func": 1,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H","2":"C K L G"},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 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 F"},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 HC zB","16":"v"},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 PC QC RC SC qB AC TC rB","2":"F"},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":"tB I f sC BC tC uC","2":"pC qC rC"},J:{"1":"D A"},K:{"1":"A B C h 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:1,C:"Form attribute"};
|
||||
@@ -0,0 +1,66 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var inspect = require('object-inspect');
|
||||
var whichBoxedPrimitive = require('..');
|
||||
|
||||
var debug = function (v, m) { return inspect(v) + ' ' + m; };
|
||||
|
||||
var forEach = function (arr, func) {
|
||||
var i;
|
||||
for (i = 0; i < arr.length; ++i) {
|
||||
func(arr[i], i, arr);
|
||||
}
|
||||
};
|
||||
|
||||
var hasSymbols = require('has-symbols')();
|
||||
var hasBigInts = typeof BigInt === 'function';
|
||||
|
||||
var primitives = [
|
||||
true,
|
||||
false,
|
||||
42,
|
||||
NaN,
|
||||
Infinity,
|
||||
'',
|
||||
'foo'
|
||||
].concat(
|
||||
hasSymbols ? [Symbol(), Symbol.iterator] : [],
|
||||
hasBigInts ? BigInt(42) : []
|
||||
);
|
||||
|
||||
var objects = [
|
||||
/a/g,
|
||||
new Date(),
|
||||
function () {},
|
||||
[],
|
||||
{}
|
||||
];
|
||||
|
||||
test('isBoxedPrimitive', function (t) {
|
||||
t.test('unboxed primitives', function (st) {
|
||||
forEach([null, undefined].concat(primitives), function (primitive) {
|
||||
st.equal(null, whichBoxedPrimitive(primitive), debug(primitive, 'is a primitive, but not a boxed primitive'));
|
||||
});
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('boxed primitives', function (st) {
|
||||
forEach(primitives, function (primitive) {
|
||||
var boxed = Object(primitive);
|
||||
var expected = boxed.constructor.name;
|
||||
st.equal(typeof expected, 'string', 'expected is string');
|
||||
st.equal(whichBoxedPrimitive(boxed), expected, debug(boxed, 'is a boxed primitive: ' + expected));
|
||||
});
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('non-primitive objects', function (st) {
|
||||
forEach(objects, function (object) {
|
||||
st.equal(undefined, whichBoxedPrimitive(object), debug(object, 'is not a primitive, boxed or otherwise'));
|
||||
});
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"isArrayLike.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isArrayLike.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,SAAW,GAAG,sBAAqF,CAAC"}
|
||||
@@ -0,0 +1,52 @@
|
||||
import crypto from 'crypto'
|
||||
import * as sharedState from './sharedState'
|
||||
|
||||
/**
|
||||
* Calculate the hash of a string.
|
||||
*
|
||||
* This doesn't need to be cryptographically secure or
|
||||
* anything like that since it's used only to detect
|
||||
* when the CSS changes to invalidate the context.
|
||||
*
|
||||
* This is wrapped in a try/catch because it's really dependent
|
||||
* on how Node itself is build and the environment and OpenSSL
|
||||
* version / build that is installed on the user's machine.
|
||||
*
|
||||
* Based on the environment this can just outright fail.
|
||||
*
|
||||
* See https://github.com/nodejs/node/issues/40455
|
||||
*
|
||||
* @param {string} str
|
||||
*/
|
||||
function getHash(str) {
|
||||
try {
|
||||
return crypto.createHash('md5').update(str, 'utf-8').digest('binary')
|
||||
} catch (err) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the CSS tree is different from the
|
||||
* previous version for the given `sourcePath`.
|
||||
*
|
||||
* @param {string} sourcePath
|
||||
* @param {import('postcss').Node} root
|
||||
*/
|
||||
export function hasContentChanged(sourcePath, root) {
|
||||
let css = root.toString()
|
||||
|
||||
// We only care about files with @tailwind directives
|
||||
// Other files use an existing context
|
||||
if (!css.includes('@tailwind')) {
|
||||
return false
|
||||
}
|
||||
|
||||
let existingHash = sharedState.sourceHashMap.get(sourcePath)
|
||||
let rootHash = getHash(css)
|
||||
let didChange = existingHash !== rootHash
|
||||
|
||||
sharedState.sourceHashMap.set(sourcePath, rootHash)
|
||||
|
||||
return didChange
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"tap.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/tap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAM9D,MAAM,WAAW,WAAW,CAAC,CAAC,CAAE,SAAQ,QAAQ,CAAC,CAAC,CAAC;IACjD,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AACD,wBAAgB,GAAG,CAAC,CAAC,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AACrH,4NAA4N;AAC5N,wBAAgB,GAAG,CAAC,CAAC,EACnB,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,IAAI,EAClC,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,EACrC,QAAQ,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,GAC7B,wBAAwB,CAAC,CAAC,CAAC,CAAC"}
|
||||
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Jelly</title>
|
||||
<meta charset=utf-8>
|
||||
<link href="jelly.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Jelly</h1>
|
||||
|
||||
<h2>For testing the <strong>record</strong> extension</h2>
|
||||
|
||||
<p>Click "Record" to test recording a sequence.</p>
|
||||
<button class="test-record">Record</button>
|
||||
<div class="test-record-result"></div>
|
||||
|
||||
<script type="text/javascript" src="../../../tests/libs/jquery-1.7.2.min.js"></script>
|
||||
<script type="text/javascript" src="../../../mousetrap.js"></script>
|
||||
<script type="text/javascript" src="../mousetrap-record.js"></script>
|
||||
<script type="text/javascript" src="jelly.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
Jelly.spread();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,7 @@
|
||||
Copyright 2020 Gregor Martynus
|
||||
|
||||
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,20 @@
|
||||
"use strict";
|
||||
|
||||
var assert = require("chai").assert
|
||||
, ensureError = require("../../error/ensure");
|
||||
|
||||
describe("error/ensure", function () {
|
||||
it("Should return input value", function () {
|
||||
var value = new Error();
|
||||
assert.equal(ensureError(value), value);
|
||||
});
|
||||
it("Should crash on invalid value", function () {
|
||||
try {
|
||||
ensureError(null);
|
||||
throw new Error("Unexpected");
|
||||
} catch (error) {
|
||||
assert.equal(error.name, "TypeError");
|
||||
assert(error.message.includes("is not an error object"));
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import { ClientRequest, RequestOptions, AgentCallbackCallback, AgentCallbackPromise } from './index';
|
||||
declare type LegacyCallback = (req: ClientRequest, opts: RequestOptions, fn: AgentCallbackCallback) => void;
|
||||
export default function promisify(fn: LegacyCallback): AgentCallbackPromise;
|
||||
export {};
|
||||
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./async').concatSeries;
|
||||
@@ -0,0 +1,50 @@
|
||||
import { MonoTypeOperatorFunction, SchedulerLike } from '../types';
|
||||
/**
|
||||
* Ignores source values for `duration` milliseconds, then emits the most recent
|
||||
* value from the source Observable, then repeats this process.
|
||||
*
|
||||
* <span class="informal">When it sees a source value, it ignores that plus
|
||||
* the next ones for `duration` milliseconds, and then it emits the most recent
|
||||
* value from the source.</span>
|
||||
*
|
||||
* 
|
||||
*
|
||||
* `auditTime` is similar to `throttleTime`, but emits the last value from the
|
||||
* silenced time window, instead of the first value. `auditTime` emits the most
|
||||
* recent value from the source Observable on the output Observable as soon as
|
||||
* its internal timer becomes disabled, and ignores source values while the
|
||||
* timer is enabled. Initially, the timer is disabled. As soon as the first
|
||||
* source value arrives, the timer is enabled. After `duration` milliseconds (or
|
||||
* the time unit determined internally by the optional `scheduler`) has passed,
|
||||
* the timer is disabled, then the most recent source value is emitted on the
|
||||
* output Observable, and this process repeats for the next source value.
|
||||
* Optionally takes a {@link SchedulerLike} for managing timers.
|
||||
*
|
||||
* ## Example
|
||||
*
|
||||
* Emit clicks at a rate of at most one click per second
|
||||
*
|
||||
* ```ts
|
||||
* import { fromEvent, auditTime } from 'rxjs';
|
||||
*
|
||||
* const clicks = fromEvent(document, 'click');
|
||||
* const result = clicks.pipe(auditTime(1000));
|
||||
* result.subscribe(x => console.log(x));
|
||||
* ```
|
||||
*
|
||||
* @see {@link audit}
|
||||
* @see {@link debounceTime}
|
||||
* @see {@link delay}
|
||||
* @see {@link sampleTime}
|
||||
* @see {@link throttleTime}
|
||||
*
|
||||
* @param {number} duration Time to wait before emitting the most recent source
|
||||
* value, measured in milliseconds or the time unit determined internally
|
||||
* by the optional `scheduler`.
|
||||
* @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for
|
||||
* managing the timers that handle the rate-limiting behavior.
|
||||
* @return A function that returns an Observable that performs rate-limiting of
|
||||
* emissions from the source Observable.
|
||||
*/
|
||||
export declare function auditTime<T>(duration: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction<T>;
|
||||
//# sourceMappingURL=auditTime.d.ts.map
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user