new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
'use strict'
|
||||
|
||||
const fs = require('graceful-fs')
|
||||
const path = require('path')
|
||||
const invalidWin32Path = require('./win32').invalidWin32Path
|
||||
|
||||
const o777 = parseInt('0777', 8)
|
||||
|
||||
function mkdirs (p, opts, callback, made) {
|
||||
if (typeof opts === 'function') {
|
||||
callback = opts
|
||||
opts = {}
|
||||
} else if (!opts || typeof opts !== 'object') {
|
||||
opts = { mode: opts }
|
||||
}
|
||||
|
||||
if (process.platform === 'win32' && invalidWin32Path(p)) {
|
||||
const errInval = new Error(p + ' contains invalid WIN32 path characters.')
|
||||
errInval.code = 'EINVAL'
|
||||
return callback(errInval)
|
||||
}
|
||||
|
||||
let mode = opts.mode
|
||||
const xfs = opts.fs || fs
|
||||
|
||||
if (mode === undefined) {
|
||||
mode = o777 & (~process.umask())
|
||||
}
|
||||
if (!made) made = null
|
||||
|
||||
callback = callback || function () {}
|
||||
p = path.resolve(p)
|
||||
|
||||
xfs.mkdir(p, mode, er => {
|
||||
if (!er) {
|
||||
made = made || p
|
||||
return callback(null, made)
|
||||
}
|
||||
switch (er.code) {
|
||||
case 'ENOENT':
|
||||
if (path.dirname(p) === p) return callback(er)
|
||||
mkdirs(path.dirname(p), opts, (er, made) => {
|
||||
if (er) callback(er, made)
|
||||
else mkdirs(p, opts, callback, made)
|
||||
})
|
||||
break
|
||||
|
||||
// In the case of any other error, just see if there's a dir
|
||||
// there already. If so, then hooray! If not, then something
|
||||
// is borked.
|
||||
default:
|
||||
xfs.stat(p, (er2, stat) => {
|
||||
// if the stat fails, then that's super weird.
|
||||
// let the original error be the failure reason.
|
||||
if (er2 || !stat.isDirectory()) callback(er, made)
|
||||
else callback(null, made)
|
||||
})
|
||||
break
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = mkdirs
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"GetOptionsObject.d.ts","sourceRoot":"","sources":["../../../../../../packages/ecma402-abstract/GetOptionsObject.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,CAQjE"}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"combineLatestWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatestWith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA0ChD,MAAM,UAAU,iBAAiB,CAC/B,GAAG,YAA0C;IAE7C,OAAO,aAAa,CAAC,GAAG,YAAY,CAAC,CAAC;AACxC,CAAC"}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { Falsy, MonoTypeOperatorFunction, OperatorFunction } from '../types';
|
||||
export declare function skipWhile<T>(predicate: BooleanConstructor): OperatorFunction<T, Extract<T, Falsy> extends never ? never : T>;
|
||||
export declare function skipWhile<T>(predicate: (value: T, index: number) => true): OperatorFunction<T, never>;
|
||||
export declare function skipWhile<T>(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction<T>;
|
||||
//# sourceMappingURL=skipWhile.d.ts.map
|
||||
@@ -0,0 +1,185 @@
|
||||
import { CssSyntaxError, ProcessOptions } from './postcss.js'
|
||||
import PreviousMap from './previous-map.js'
|
||||
|
||||
export interface FilePosition {
|
||||
/**
|
||||
* URL for the source file.
|
||||
*/
|
||||
url: string
|
||||
|
||||
/**
|
||||
* Absolute path to the source file.
|
||||
*/
|
||||
file?: string
|
||||
|
||||
/**
|
||||
* Line of inclusive start position in source file.
|
||||
*/
|
||||
line: number
|
||||
|
||||
/**
|
||||
* Column of inclusive start position in source file.
|
||||
*/
|
||||
column: number
|
||||
|
||||
/**
|
||||
* Line of exclusive end position in source file.
|
||||
*/
|
||||
endLine?: number
|
||||
|
||||
/**
|
||||
* Column of exclusive end position in source file.
|
||||
*/
|
||||
endColumn?: number
|
||||
|
||||
/**
|
||||
* Source code.
|
||||
*/
|
||||
source?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the source CSS.
|
||||
*
|
||||
* ```js
|
||||
* const root = postcss.parse(css, { from: file })
|
||||
* const input = root.source.input
|
||||
* ```
|
||||
*/
|
||||
export default class Input {
|
||||
/**
|
||||
* Input CSS source.
|
||||
*
|
||||
* ```js
|
||||
* const input = postcss.parse('a{}', { from: file }).input
|
||||
* input.css //=> "a{}"
|
||||
* ```
|
||||
*/
|
||||
css: string
|
||||
|
||||
/**
|
||||
* The input source map passed from a compilation step before PostCSS
|
||||
* (for example, from Sass compiler).
|
||||
*
|
||||
* ```js
|
||||
* root.source.input.map.consumer().sources //=> ['a.sass']
|
||||
* ```
|
||||
*/
|
||||
map: PreviousMap
|
||||
|
||||
/**
|
||||
* The absolute path to the CSS source file defined
|
||||
* with the `from` option.
|
||||
*
|
||||
* ```js
|
||||
* const root = postcss.parse(css, { from: 'a.css' })
|
||||
* root.source.input.file //=> '/home/ai/a.css'
|
||||
* ```
|
||||
*/
|
||||
file?: string
|
||||
|
||||
/**
|
||||
* The unique ID of the CSS source. It will be created if `from` option
|
||||
* is not provided (because PostCSS does not know the file path).
|
||||
*
|
||||
* ```js
|
||||
* const root = postcss.parse(css)
|
||||
* root.source.input.file //=> undefined
|
||||
* root.source.input.id //=> "<input css 8LZeVF>"
|
||||
* ```
|
||||
*/
|
||||
id?: string
|
||||
|
||||
/**
|
||||
* The flag to indicate whether or not the source code has Unicode BOM.
|
||||
*/
|
||||
hasBOM: boolean
|
||||
|
||||
/**
|
||||
* @param css Input CSS source.
|
||||
* @param opts Process options.
|
||||
*/
|
||||
constructor(css: string, opts?: ProcessOptions)
|
||||
|
||||
/**
|
||||
* The CSS source identifier. Contains `Input#file` if the user
|
||||
* set the `from` option, or `Input#id` if they did not.
|
||||
*
|
||||
* ```js
|
||||
* const root = postcss.parse(css, { from: 'a.css' })
|
||||
* root.source.input.from //=> "/home/ai/a.css"
|
||||
*
|
||||
* const root = postcss.parse(css)
|
||||
* root.source.input.from //=> "<input css 1>"
|
||||
* ```
|
||||
*/
|
||||
get from(): string
|
||||
|
||||
/**
|
||||
* Reads the input source map and returns a symbol position
|
||||
* in the input source (e.g., in a Sass file that was compiled
|
||||
* to CSS before being passed to PostCSS). Optionally takes an
|
||||
* end position, exclusive.
|
||||
*
|
||||
* ```js
|
||||
* root.source.input.origin(1, 1) //=> { file: 'a.css', line: 3, column: 1 }
|
||||
* root.source.input.origin(1, 1, 1, 4)
|
||||
* //=> { file: 'a.css', line: 3, column: 1, endLine: 3, endColumn: 4 }
|
||||
* ```
|
||||
*
|
||||
* @param line Line for inclusive start position in input CSS.
|
||||
* @param column Column for inclusive start position in input CSS.
|
||||
* @param endLine Line for exclusive end position in input CSS.
|
||||
* @param endColumn Column for exclusive end position in input CSS.
|
||||
*
|
||||
* @return Position in input source.
|
||||
*/
|
||||
origin(
|
||||
line: number,
|
||||
column: number,
|
||||
endLine?: number,
|
||||
endColumn?: number
|
||||
): FilePosition | false
|
||||
|
||||
/**
|
||||
* Converts source offset to line and column.
|
||||
*
|
||||
* @param offset Source offset.
|
||||
*/
|
||||
fromOffset(offset: number): { line: number; col: number } | null
|
||||
|
||||
/**
|
||||
* Returns `CssSyntaxError` with information about the error and its position.
|
||||
*/
|
||||
error(
|
||||
message: string,
|
||||
line: number,
|
||||
column: number,
|
||||
opts?: { plugin?: CssSyntaxError['plugin'] }
|
||||
): CssSyntaxError
|
||||
error(
|
||||
message: string,
|
||||
offset: number,
|
||||
opts?: { plugin?: CssSyntaxError['plugin'] }
|
||||
): CssSyntaxError
|
||||
error(
|
||||
message: string,
|
||||
start:
|
||||
| {
|
||||
offset: number
|
||||
}
|
||||
| {
|
||||
line: number
|
||||
column: number
|
||||
},
|
||||
end:
|
||||
| {
|
||||
offset: number
|
||||
}
|
||||
| {
|
||||
line: number
|
||||
column: number
|
||||
},
|
||||
opts?: { plugin?: CssSyntaxError['plugin'] }
|
||||
): CssSyntaxError
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
var getMonth = Date.prototype.getMonth;
|
||||
|
||||
module.exports = function () {
|
||||
switch (getMonth.call(this)) {
|
||||
case 1:
|
||||
return this.getFullYear() % 4 ? 28 : 29;
|
||||
case 3:
|
||||
case 5:
|
||||
case 8:
|
||||
case 10:
|
||||
return 30;
|
||||
default:
|
||||
return 31;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,104 @@
|
||||
# fast-levenshtein - Levenshtein algorithm in Javascript
|
||||
|
||||
[](http://travis-ci.org/hiddentao/fast-levenshtein)
|
||||
[](https://badge.fury.io/js/fast-levenshtein)
|
||||
[](https://www.npmjs.com/package/fast-levenshtein)
|
||||
[](https://twitter.com/hiddentao)
|
||||
|
||||
An efficient Javascript implementation of the [Levenshtein algorithm](http://en.wikipedia.org/wiki/Levenshtein_distance) with locale-specific collator support.
|
||||
|
||||
## Features
|
||||
|
||||
* Works in node.js and in the browser.
|
||||
* Better performance than other implementations by not needing to store the whole matrix ([more info](http://www.codeproject.com/Articles/13525/Fast-memory-efficient-Levenshtein-algorithm)).
|
||||
* Locale-sensitive string comparisions if needed.
|
||||
* Comprehensive test suite and performance benchmark.
|
||||
* Small: <1 KB minified and gzipped
|
||||
|
||||
## Installation
|
||||
|
||||
### node.js
|
||||
|
||||
Install using [npm](http://npmjs.org/):
|
||||
|
||||
```bash
|
||||
$ npm install fast-levenshtein
|
||||
```
|
||||
|
||||
### Browser
|
||||
|
||||
Using bower:
|
||||
|
||||
```bash
|
||||
$ bower install fast-levenshtein
|
||||
```
|
||||
|
||||
If you are not using any module loader system then the API will then be accessible via the `window.Levenshtein` object.
|
||||
|
||||
## Examples
|
||||
|
||||
**Default usage**
|
||||
|
||||
```javascript
|
||||
var levenshtein = require('fast-levenshtein');
|
||||
|
||||
var distance = levenshtein.get('back', 'book'); // 2
|
||||
var distance = levenshtein.get('我愛你', '我叫你'); // 1
|
||||
```
|
||||
|
||||
**Locale-sensitive string comparisons**
|
||||
|
||||
It supports using [Intl.Collator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator) for locale-sensitive string comparisons:
|
||||
|
||||
```javascript
|
||||
var levenshtein = require('fast-levenshtein');
|
||||
|
||||
levenshtein.get('mikailovitch', 'Mikhaïlovitch', { useCollator: true});
|
||||
// 1
|
||||
```
|
||||
|
||||
## Building and Testing
|
||||
|
||||
To build the code and run the tests:
|
||||
|
||||
```bash
|
||||
$ npm install -g grunt-cli
|
||||
$ npm install
|
||||
$ npm run build
|
||||
```
|
||||
|
||||
## Performance
|
||||
|
||||
_Thanks to [Titus Wormer](https://github.com/wooorm) for [encouraging me](https://github.com/hiddentao/fast-levenshtein/issues/1) to do this._
|
||||
|
||||
Benchmarked against other node.js levenshtein distance modules (on Macbook Air 2012, Core i7, 8GB RAM):
|
||||
|
||||
```bash
|
||||
Running suite Implementation comparison [benchmark/speed.js]...
|
||||
>> levenshtein-edit-distance x 234 ops/sec ±3.02% (73 runs sampled)
|
||||
>> levenshtein-component x 422 ops/sec ±4.38% (83 runs sampled)
|
||||
>> levenshtein-deltas x 283 ops/sec ±3.83% (78 runs sampled)
|
||||
>> natural x 255 ops/sec ±0.76% (88 runs sampled)
|
||||
>> levenshtein x 180 ops/sec ±3.55% (86 runs sampled)
|
||||
>> fast-levenshtein x 1,792 ops/sec ±2.72% (95 runs sampled)
|
||||
Benchmark done.
|
||||
Fastest test is fast-levenshtein at 4.2x faster than levenshtein-component
|
||||
```
|
||||
|
||||
You can run this benchmark yourself by doing:
|
||||
|
||||
```bash
|
||||
$ npm install
|
||||
$ npm run build
|
||||
$ npm run benchmark
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
If you wish to submit a pull request please update and/or create new tests for any changes you make and ensure the grunt build passes.
|
||||
|
||||
See [CONTRIBUTING.md](https://github.com/hiddentao/fast-levenshtein/blob/master/CONTRIBUTING.md) for details.
|
||||
|
||||
## License
|
||||
|
||||
MIT - see [LICENSE.md](https://github.com/hiddentao/fast-levenshtein/blob/master/LICENSE.md)
|
||||
@@ -0,0 +1,69 @@
|
||||
import { operate } from '../util/lift';
|
||||
import { createOperatorSubscriber } from './OperatorSubscriber';
|
||||
import { identity } from '../util/identity';
|
||||
import { timer } from '../observable/timer';
|
||||
import { innerFrom } from '../observable/innerFrom';
|
||||
export function retry(configOrCount) {
|
||||
if (configOrCount === void 0) { configOrCount = Infinity; }
|
||||
var config;
|
||||
if (configOrCount && typeof configOrCount === 'object') {
|
||||
config = configOrCount;
|
||||
}
|
||||
else {
|
||||
config = {
|
||||
count: configOrCount,
|
||||
};
|
||||
}
|
||||
var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b;
|
||||
return count <= 0
|
||||
? identity
|
||||
: operate(function (source, subscriber) {
|
||||
var soFar = 0;
|
||||
var innerSub;
|
||||
var subscribeForRetry = function () {
|
||||
var syncUnsub = false;
|
||||
innerSub = source.subscribe(createOperatorSubscriber(subscriber, function (value) {
|
||||
if (resetOnSuccess) {
|
||||
soFar = 0;
|
||||
}
|
||||
subscriber.next(value);
|
||||
}, undefined, function (err) {
|
||||
if (soFar++ < count) {
|
||||
var resub_1 = function () {
|
||||
if (innerSub) {
|
||||
innerSub.unsubscribe();
|
||||
innerSub = null;
|
||||
subscribeForRetry();
|
||||
}
|
||||
else {
|
||||
syncUnsub = true;
|
||||
}
|
||||
};
|
||||
if (delay != null) {
|
||||
var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar));
|
||||
var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () {
|
||||
notifierSubscriber_1.unsubscribe();
|
||||
resub_1();
|
||||
}, function () {
|
||||
subscriber.complete();
|
||||
});
|
||||
notifier.subscribe(notifierSubscriber_1);
|
||||
}
|
||||
else {
|
||||
resub_1();
|
||||
}
|
||||
}
|
||||
else {
|
||||
subscriber.error(err);
|
||||
}
|
||||
}));
|
||||
if (syncUnsub) {
|
||||
innerSub.unsubscribe();
|
||||
innerSub = null;
|
||||
subscribeForRetry();
|
||||
}
|
||||
};
|
||||
subscribeForRetry();
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=retry.js.map
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* https://tc39.es/ecma402/#sec-getoption
|
||||
* @param opts
|
||||
* @param prop
|
||||
* @param type
|
||||
* @param values
|
||||
* @param fallback
|
||||
*/
|
||||
export declare function GetOption<T extends object, K extends keyof T, F>(opts: T, prop: K, type: 'string' | 'boolean', values: T[K][] | undefined, fallback: F): Exclude<T[K], undefined> | F;
|
||||
//# sourceMappingURL=GetOption.d.ts.map
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
||||
* support for iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {Function} predicate The function invoked per iteration.
|
||||
* @param {number} fromIndex The index to search from.
|
||||
* @param {boolean} [fromRight] Specify iterating from right to left.
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
||||
var length = array.length,
|
||||
index = fromIndex + (fromRight ? 1 : -1);
|
||||
|
||||
while ((fromRight ? index-- : ++index < length)) {
|
||||
if (predicate(array[index], index, array)) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
module.exports = baseFindIndex;
|
||||
@@ -0,0 +1,22 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
|
||||
|
||||
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,46 @@
|
||||
import { __read, __spreadArray } from "tslib";
|
||||
import { Observable } from '../Observable';
|
||||
import { innerFrom } from './innerFrom';
|
||||
import { argsOrArgArray } from '../util/argsOrArgArray';
|
||||
import { EMPTY } from './empty';
|
||||
import { createOperatorSubscriber } from '../operators/OperatorSubscriber';
|
||||
import { popResultSelector } from '../util/args';
|
||||
export function zip() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var resultSelector = popResultSelector(args);
|
||||
var sources = argsOrArgArray(args);
|
||||
return sources.length
|
||||
? new Observable(function (subscriber) {
|
||||
var buffers = sources.map(function () { return []; });
|
||||
var completed = sources.map(function () { return false; });
|
||||
subscriber.add(function () {
|
||||
buffers = completed = null;
|
||||
});
|
||||
var _loop_1 = function (sourceIndex) {
|
||||
innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) {
|
||||
buffers[sourceIndex].push(value);
|
||||
if (buffers.every(function (buffer) { return buffer.length; })) {
|
||||
var result = buffers.map(function (buffer) { return buffer.shift(); });
|
||||
subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result))) : result);
|
||||
if (buffers.some(function (buffer, i) { return !buffer.length && completed[i]; })) {
|
||||
subscriber.complete();
|
||||
}
|
||||
}
|
||||
}, function () {
|
||||
completed[sourceIndex] = true;
|
||||
!buffers[sourceIndex].length && subscriber.complete();
|
||||
}));
|
||||
};
|
||||
for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) {
|
||||
_loop_1(sourceIndex);
|
||||
}
|
||||
return function () {
|
||||
buffers = completed = null;
|
||||
};
|
||||
})
|
||||
: EMPTY;
|
||||
}
|
||||
//# sourceMappingURL=zip.js.map
|
||||
@@ -0,0 +1,192 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Code coverage report for csv2json/libs/interfaces/cli/main.js</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../../../base.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1>
|
||||
<a href="../../../../index.html">All files</a> / <a href="index.html">csv2json/libs/interfaces/cli</a> main.js
|
||||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>0/23</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>0/4</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>0/6</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>0/23</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line low'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a>
|
||||
<a name='L9'></a><a href='#L9'>9</a>
|
||||
<a name='L10'></a><a href='#L10'>10</a>
|
||||
<a name='L11'></a><a href='#L11'>11</a>
|
||||
<a name='L12'></a><a href='#L12'>12</a>
|
||||
<a name='L13'></a><a href='#L13'>13</a>
|
||||
<a name='L14'></a><a href='#L14'>14</a>
|
||||
<a name='L15'></a><a href='#L15'>15</a>
|
||||
<a name='L16'></a><a href='#L16'>16</a>
|
||||
<a name='L17'></a><a href='#L17'>17</a>
|
||||
<a name='L18'></a><a href='#L18'>18</a>
|
||||
<a name='L19'></a><a href='#L19'>19</a>
|
||||
<a name='L20'></a><a href='#L20'>20</a>
|
||||
<a name='L21'></a><a href='#L21'>21</a>
|
||||
<a name='L22'></a><a href='#L22'>22</a>
|
||||
<a name='L23'></a><a href='#L23'>23</a>
|
||||
<a name='L24'></a><a href='#L24'>24</a>
|
||||
<a name='L25'></a><a href='#L25'>25</a>
|
||||
<a name='L26'></a><a href='#L26'>26</a>
|
||||
<a name='L27'></a><a href='#L27'>27</a>
|
||||
<a name='L28'></a><a href='#L28'>28</a>
|
||||
<a name='L29'></a><a href='#L29'>29</a>
|
||||
<a name='L30'></a><a href='#L30'>30</a>
|
||||
<a name='L31'></a><a href='#L31'>31</a>
|
||||
<a name='L32'></a><a href='#L32'>32</a>
|
||||
<a name='L33'></a><a href='#L33'>33</a>
|
||||
<a name='L34'></a><a href='#L34'>34</a>
|
||||
<a name='L35'></a><a href='#L35'>35</a>
|
||||
<a name='L36'></a><a href='#L36'>36</a>
|
||||
<a name='L37'></a><a href='#L37'>37</a>
|
||||
<a name='L38'></a><a href='#L38'>38</a>
|
||||
<a name='L39'></a><a href='#L39'>39</a>
|
||||
<a name='L40'></a><a href='#L40'>40</a>
|
||||
<a name='L41'></a><a href='#L41'>41</a>
|
||||
<a name='L42'></a><a href='#L42'>42</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span></td><td class="text"><pre class="prettyprint lang-js">/**
|
||||
* Convert input to process stdout
|
||||
*/
|
||||
|
||||
//implementation
|
||||
var Converter = <span class="cstat-no" title="statement not covered" >require("../../core/Converter.js");</span>
|
||||
function <span class="fstat-no" title="function not covered" >_initConverter(</span>){
|
||||
var csvConverter = <span class="cstat-no" title="statement not covered" >new Converter();</span>
|
||||
var started = <span class="cstat-no" title="statement not covered" >false;</span>
|
||||
var writeStream = <span class="cstat-no" title="statement not covered" >process.stdout;</span>
|
||||
<span class="cstat-no" title="statement not covered" > csvConverter.on("record_parsed",<span class="fstat-no" title="function not covered" >fu</span>nction(rowJSON){</span>
|
||||
<span class="cstat-no" title="statement not covered" > if (started){</span>
|
||||
<span class="cstat-no" title="statement not covered" > writeStream.write(",\n");</span>
|
||||
}
|
||||
<span class="cstat-no" title="statement not covered" > writeStream.write(JSON.stringify(rowJSON)); </span> //write parsed JSON object one by one.
|
||||
<span class="cstat-no" title="statement not covered" > if (started === false){</span>
|
||||
<span class="cstat-no" title="statement not covered" > started = true;</span>
|
||||
}
|
||||
});
|
||||
<span class="cstat-no" title="statement not covered" > writeStream.write("[\n"); </span>//write array symbol
|
||||
|
||||
<span class="cstat-no" title="statement not covered" > csvConverter.on("end_parsed",<span class="fstat-no" title="function not covered" >fu</span>nction(){</span>
|
||||
<span class="cstat-no" title="statement not covered" > writeStream.write("\n]"); </span>//end array symbol
|
||||
});
|
||||
<span class="cstat-no" title="statement not covered" > csvConverter.on("error",<span class="fstat-no" title="function not covered" >fu</span>nction(err){</span>
|
||||
<span class="cstat-no" title="statement not covered" > console.error(err);</span>
|
||||
<span class="cstat-no" title="statement not covered" > process.exit(-1);</span>
|
||||
});
|
||||
<span class="cstat-no" title="statement not covered" > return csvConverter;</span>
|
||||
}
|
||||
function <span class="fstat-no" title="function not covered" >convertFile(</span>fileName){
|
||||
var csvConverter=<span class="cstat-no" title="statement not covered" >_initConverter();</span>
|
||||
<span class="cstat-no" title="statement not covered" > csvConverter.from(fileName);</span>
|
||||
}
|
||||
|
||||
function <span class="fstat-no" title="function not covered" >convertString(</span>csvString){
|
||||
var csvConverter=<span class="cstat-no" title="statement not covered" >_initConverter();</span>
|
||||
<span class="cstat-no" title="statement not covered" > csvConverter.from(csvString);</span>
|
||||
}
|
||||
//module interfaces
|
||||
<span class="cstat-no" title="statement not covered" >module.exports.convertFile = convertFile;</span>
|
||||
<span class="cstat-no" title="statement not covered" >module.exports.convertString = convertString;</span></pre></td></tr>
|
||||
</table></pre>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Fri May 11 2018 21:20:20 GMT+0100 (IST)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
if (typeof prettyPrint === 'function') {
|
||||
prettyPrint();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script src="../../../../sorter.js"></script>
|
||||
<script src="../../../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,2 @@
|
||||
.nyc_output/
|
||||
coverage/
|
||||
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var Type = require('../Type');
|
||||
|
||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unsignedRightShift
|
||||
|
||||
module.exports = function BigIntUnsignedRightShift(x, y) {
|
||||
if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') {
|
||||
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
|
||||
}
|
||||
|
||||
throw new $TypeError('BigInts have no unsigned right shift, use >> instead');
|
||||
};
|
||||
@@ -0,0 +1,76 @@
|
||||
const defaultOptions = [
|
||||
{
|
||||
id: 0,
|
||||
value: "Too weak",
|
||||
minDiversity: 0,
|
||||
minLength: 0
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
value: "Weak",
|
||||
minDiversity: 2,
|
||||
minLength: 6
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
value: "Medium",
|
||||
minDiversity: 4,
|
||||
minLength: 8
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
value: "Strong",
|
||||
minDiversity: 4,
|
||||
minLength: 10
|
||||
}
|
||||
]
|
||||
|
||||
const passwordStrength = (password, options = defaultOptions, allowedSymbols="!@#$%^&*") => {
|
||||
|
||||
let passwordCopy = password || ''
|
||||
|
||||
options[0].minDiversity = 0,
|
||||
options[0].minLength = 0
|
||||
|
||||
const rules = [
|
||||
{
|
||||
regex: "[a-z]",
|
||||
message: 'lowercase'
|
||||
},
|
||||
{
|
||||
regex: '[A-Z]',
|
||||
message: 'uppercase'
|
||||
},
|
||||
{
|
||||
regex: '[0-9]',
|
||||
message: 'number'
|
||||
},
|
||||
]
|
||||
|
||||
if (allowedSymbols) {
|
||||
rules.push({
|
||||
regex: `[${allowedSymbols}]`,
|
||||
message: 'symbol'
|
||||
})
|
||||
}
|
||||
|
||||
let strength = {}
|
||||
|
||||
strength.contains = rules
|
||||
.filter(rule => new RegExp(`${rule.regex}`).test(passwordCopy))
|
||||
.map(rule => rule.message)
|
||||
|
||||
strength.length = passwordCopy.length;
|
||||
|
||||
let fulfilledOptions = options
|
||||
.filter(option => strength.contains.length >= option.minDiversity)
|
||||
.filter(option => strength.length >= option.minLength)
|
||||
.sort((o1, o2) => o2.id - o1.id)
|
||||
.map(option => ({id: option.id, value: option.value}))
|
||||
|
||||
Object.assign(strength, fulfilledOptions[0])
|
||||
|
||||
return strength;
|
||||
};
|
||||
|
||||
module.exports = { passwordStrength, defaultOptions }
|
||||
@@ -0,0 +1,12 @@
|
||||
var noCase = require('no-case')
|
||||
|
||||
/**
|
||||
* Param case a string.
|
||||
*
|
||||
* @param {string} value
|
||||
* @param {string} [locale]
|
||||
* @return {string}
|
||||
*/
|
||||
module.exports = function (value, locale) {
|
||||
return noCase(value, locale, '-')
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [0, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var ProcessorLocal_1 = require("./ProcessorLocal");
|
||||
var Converter_1 = require("./Converter");
|
||||
var fs_1 = require("fs");
|
||||
var path_1 = __importDefault(require("path"));
|
||||
var assert_1 = __importDefault(require("assert"));
|
||||
var dataDir = path_1.default.join(__dirname, "../test/data/");
|
||||
describe("ProcessLocal", function () {
|
||||
it("should process csv chunks and output json", function () {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var processor, data, lines, line0;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
processor = new ProcessorLocal_1.ProcessorLocal(new Converter_1.Converter());
|
||||
data = fs_1.readFileSync(dataDir + "/complexJSONCSV");
|
||||
return [4 /*yield*/, processor.process(data)];
|
||||
case 1:
|
||||
lines = _a.sent();
|
||||
assert_1.default(lines.length === 2);
|
||||
line0 = lines[0];
|
||||
assert_1.default.equal(line0.fieldA.title, "Food Factory");
|
||||
assert_1.default.equal(line0.fieldA.children.length, 2);
|
||||
assert_1.default.equal(line0.fieldA.children[1].employee[0].name, "Tim");
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
it("should process csv chunks and output csv rows", function () {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var processor, data, lines;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
processor = new ProcessorLocal_1.ProcessorLocal(new Converter_1.Converter({ output: "line" }));
|
||||
data = fs_1.readFileSync(dataDir + "/complexJSONCSV");
|
||||
return [4 /*yield*/, processor.process(data)];
|
||||
case 1:
|
||||
lines = _a.sent();
|
||||
assert_1.default(lines.length === 2);
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
it("should return empty array if preRawHook removed the data", function () {
|
||||
var conv = new Converter_1.Converter();
|
||||
conv.preRawData(function (str) {
|
||||
return "";
|
||||
});
|
||||
var processor = new ProcessorLocal_1.ProcessorLocal(conv);
|
||||
var data = fs_1.readFileSync(dataDir + "/complexJSONCSV");
|
||||
return processor.process(data)
|
||||
.then(function (list) {
|
||||
assert_1.default.equal(list.length, 0);
|
||||
});
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiL1VzZXJzL2t4aWFuZy93b3JrL3Byb2plY3RzL2NzdjJqc29uL3NyYy9Qcm9jZXNzb3JMb2NhbC50ZXN0LnRzIiwic291cmNlcyI6WyIvVXNlcnMva3hpYW5nL3dvcmsvcHJvamVjdHMvY3N2Mmpzb24vc3JjL1Byb2Nlc3NvckxvY2FsLnRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLG1EQUFnRDtBQUNoRCx5Q0FBd0M7QUFFeEMseUJBQWdDO0FBQ2hDLDhDQUF3QjtBQUN4QixrREFBNEI7QUFFNUIsSUFBTSxPQUFPLEdBQUMsY0FBSSxDQUFDLElBQUksQ0FBQyxTQUFTLEVBQUMsZUFBZSxDQUFDLENBQUM7QUFDbkQsUUFBUSxDQUFDLGNBQWMsRUFBQztJQUN0QixFQUFFLENBQUUsMkNBQTJDLEVBQUM7Ozs7Ozt3QkFDeEMsU0FBUyxHQUFDLElBQUksK0JBQWMsQ0FBQyxJQUFJLHFCQUFTLEVBQUUsQ0FBQyxDQUFDO3dCQUM5QyxJQUFJLEdBQUMsaUJBQVksQ0FBQyxPQUFPLEdBQUMsaUJBQWlCLENBQUMsQ0FBQzt3QkFDdkMscUJBQU0sU0FBUyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsRUFBQTs7d0JBQW5DLEtBQUssR0FBQyxTQUE2Qjt3QkFDekMsZ0JBQU0sQ0FBQyxLQUFLLENBQUMsTUFBTSxLQUFLLENBQUMsQ0FBQyxDQUFDO3dCQUNyQixLQUFLLEdBQUMsS0FBSyxDQUFDLENBQUMsQ0FBZSxDQUFDO3dCQUNuQyxnQkFBTSxDQUFDLEtBQUssQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFDLEtBQUssRUFBQyxjQUFjLENBQUMsQ0FBQzt3QkFDaEQsZ0JBQU0sQ0FBQyxLQUFLLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsTUFBTSxFQUFDLENBQUMsQ0FBQyxDQUFDO3dCQUM3QyxnQkFBTSxDQUFDLEtBQUssQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxRQUFRLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxFQUFDLEtBQUssQ0FBQyxDQUFDOzs7OztLQUMvRCxDQUFDLENBQUE7SUFDRixFQUFFLENBQUUsK0NBQStDLEVBQUM7Ozs7Ozt3QkFDNUMsU0FBUyxHQUFDLElBQUksK0JBQWMsQ0FBQyxJQUFJLHFCQUFTLENBQUMsRUFBQyxNQUFNLEVBQUMsTUFBTSxFQUFDLENBQUMsQ0FBQyxDQUFDO3dCQUM3RCxJQUFJLEdBQUMsaUJBQVksQ0FBQyxPQUFPLEdBQUMsaUJBQWlCLENBQUMsQ0FBQzt3QkFDdkMscUJBQU0sU0FBUyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsRUFBQTs7d0JBQW5DLEtBQUssR0FBQyxTQUE2Qjt3QkFFekMsZ0JBQU0sQ0FBQyxLQUFLLENBQUMsTUFBTSxLQUFLLENBQUMsQ0FBQyxDQUFDOzs7OztLQUM1QixDQUFDLENBQUE7SUFDRixFQUFFLENBQUUsMERBQTBELEVBQUM7UUFDN0QsSUFBTSxJQUFJLEdBQUMsSUFBSSxxQkFBUyxFQUFFLENBQUM7UUFDM0IsSUFBSSxDQUFDLFVBQVUsQ0FBQyxVQUFDLEdBQUc7WUFDbEIsT0FBTyxFQUFFLENBQUM7UUFDWixDQUFDLENBQUMsQ0FBQztRQUNILElBQU0sU0FBUyxHQUFDLElBQUksK0JBQWMsQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUN6QyxJQUFNLElBQUksR0FBQyxpQkFBWSxDQUFDLE9BQU8sR0FBQyxpQkFBaUIsQ0FBQyxDQUFDO1FBQ25ELE9BQU8sU0FBUyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUM7YUFDN0IsSUFBSSxDQUFDLFVBQUMsSUFBSTtZQUNULGdCQUFNLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUMsQ0FBQyxDQUFDLENBQUM7UUFDOUIsQ0FBQyxDQUFDLENBQUE7SUFDSixDQUFDLENBQUMsQ0FBQTtBQUNKLENBQUMsQ0FBQyxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtQcm9jZXNzb3JMb2NhbH0gZnJvbSBcIi4vUHJvY2Vzc29yTG9jYWxcIjtcbmltcG9ydCB7IENvbnZlcnRlciB9IGZyb20gXCIuL0NvbnZlcnRlclwiO1xuaW1wb3J0IFAgZnJvbSBcImJsdWViaXJkXCI7XG5pbXBvcnQge3JlYWRGaWxlU3luY30gZnJvbSBcImZzXCI7XG5pbXBvcnQgcGF0aCBmcm9tIFwicGF0aFwiO1xuaW1wb3J0IGFzc2VydCBmcm9tIFwiYXNzZXJ0XCI7XG5pbXBvcnQgeyBKU09OUmVzdWx0IH0gZnJvbSBcIi4vbGluZVRvSnNvblwiO1xuY29uc3QgZGF0YURpcj1wYXRoLmpvaW4oX19kaXJuYW1lLFwiLi4vdGVzdC9kYXRhL1wiKTtcbmRlc2NyaWJlKFwiUHJvY2Vzc0xvY2FsXCIsKCk9PntcbiAgaXQgKFwic2hvdWxkIHByb2Nlc3MgY3N2IGNodW5rcyBhbmQgb3V0cHV0IGpzb25cIixhc3luYyBmdW5jdGlvbiAoKXtcbiAgICBjb25zdCBwcm9jZXNzb3I9bmV3IFByb2Nlc3NvckxvY2FsKG5ldyBDb252ZXJ0ZXIoKSk7XG4gICAgY29uc3QgZGF0YT1yZWFkRmlsZVN5bmMoZGF0YURpcitcIi9jb21wbGV4SlNPTkNTVlwiKTtcbiAgICBjb25zdCBsaW5lcz1hd2FpdCBwcm9jZXNzb3IucHJvY2VzcyhkYXRhKTtcbiAgICBhc3NlcnQobGluZXMubGVuZ3RoID09PSAyKTtcbiAgICBjb25zdCBsaW5lMD1saW5lc1swXSBhcyBKU09OUmVzdWx0O1xuICAgIGFzc2VydC5lcXVhbChsaW5lMC5maWVsZEEudGl0bGUsXCJGb29kIEZhY3RvcnlcIik7XG4gICAgYXNzZXJ0LmVxdWFsKGxpbmUwLmZpZWxkQS5jaGlsZHJlbi5sZW5ndGgsMik7XG4gICAgYXNzZXJ0LmVxdWFsKGxpbmUwLmZpZWxkQS5jaGlsZHJlblsxXS5lbXBsb3llZVswXS5uYW1lLFwiVGltXCIpO1xuICB9KVxuICBpdCAoXCJzaG91bGQgcHJvY2VzcyBjc3YgY2h1bmtzIGFuZCBvdXRwdXQgY3N2IHJvd3NcIixhc3luYyBmdW5jdGlvbiAoKXtcbiAgICBjb25zdCBwcm9jZXNzb3I9bmV3IFByb2Nlc3NvckxvY2FsKG5ldyBDb252ZXJ0ZXIoe291dHB1dDpcImxpbmVcIn0pKTtcbiAgICBjb25zdCBkYXRhPXJlYWRGaWxlU3luYyhkYXRhRGlyK1wiL2NvbXBsZXhKU09OQ1NWXCIpO1xuICAgIGNvbnN0IGxpbmVzPWF3YWl0IHByb2Nlc3Nvci5wcm9jZXNzKGRhdGEpO1xuICAgIFxuICAgIGFzc2VydChsaW5lcy5sZW5ndGggPT09IDIpO1xuICB9KVxuICBpdCAoXCJzaG91bGQgcmV0dXJuIGVtcHR5IGFycmF5IGlmIHByZVJhd0hvb2sgcmVtb3ZlZCB0aGUgZGF0YVwiLCgpPT57XG4gICAgY29uc3QgY29udj1uZXcgQ29udmVydGVyKCk7XG4gICAgY29udi5wcmVSYXdEYXRhKChzdHIpPT57XG4gICAgICByZXR1cm4gXCJcIjtcbiAgICB9KTtcbiAgICBjb25zdCBwcm9jZXNzb3I9bmV3IFByb2Nlc3NvckxvY2FsKGNvbnYpO1xuICAgIGNvbnN0IGRhdGE9cmVhZEZpbGVTeW5jKGRhdGFEaXIrXCIvY29tcGxleEpTT05DU1ZcIik7XG4gICAgcmV0dXJuIHByb2Nlc3Nvci5wcm9jZXNzKGRhdGEpXG4gICAgLnRoZW4oKGxpc3QpPT57XG4gICAgICBhc3NlcnQuZXF1YWwobGlzdC5sZW5ndGgsMCk7XG4gICAgfSlcbiAgfSlcbn0pXG5cbiJdfQ==
|
||||
@@ -0,0 +1,38 @@
|
||||
export declare type LilconfigResult = null | {
|
||||
filepath: string;
|
||||
config: any;
|
||||
isEmpty?: boolean;
|
||||
};
|
||||
interface OptionsBase {
|
||||
stopDir?: string;
|
||||
searchPlaces?: string[];
|
||||
ignoreEmptySearchPlaces?: boolean;
|
||||
packageProp?: string | string[];
|
||||
}
|
||||
export declare type Transform = TransformSync | ((result: LilconfigResult) => Promise<LilconfigResult>);
|
||||
export declare type TransformSync = (result: LilconfigResult) => LilconfigResult;
|
||||
declare type LoaderResult = any;
|
||||
export declare type LoaderSync = (filepath: string, content: string) => LoaderResult;
|
||||
export declare type Loader = LoaderSync | ((filepath: string, content: string) => Promise<LoaderResult>);
|
||||
export declare type Loaders = Record<string, Loader>;
|
||||
export declare type LoadersSync = Record<string, LoaderSync>;
|
||||
export interface Options extends OptionsBase {
|
||||
loaders?: Loaders;
|
||||
transform?: Transform;
|
||||
}
|
||||
export interface OptionsSync extends OptionsBase {
|
||||
loaders?: LoadersSync;
|
||||
transform?: TransformSync;
|
||||
}
|
||||
export declare const defaultLoaders: LoadersSync;
|
||||
declare type AsyncSearcher = {
|
||||
search(searchFrom?: string): Promise<LilconfigResult>;
|
||||
load(filepath: string): Promise<LilconfigResult>;
|
||||
};
|
||||
export declare function lilconfig(name: string, options?: Partial<Options>): AsyncSearcher;
|
||||
declare type SyncSearcher = {
|
||||
search(searchFrom?: string): LilconfigResult;
|
||||
load(filepath: string): LilconfigResult;
|
||||
};
|
||||
export declare function lilconfigSync(name: string, options?: OptionsSync): SyncSearcher;
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"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","1028":"P Q R S T U V W X Y Z","4100":"M N O"},C:{"1":"uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"0 1 DC tB I v J D E F A B C K L G M N O w g x y z EC FC","194":"2 3 4 5 6 7","516":"8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB"},D:{"1":"a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"I v J D E F A B C K L G M N O w g x y DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB","322":"0 1 2 3 4 5 6 7 8 9 z AB BB CB SB TB UB VB","1028":"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"},E:{"1":"K L G 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v J HC zB IC","33":"E F A B C KC LC 0B qB rB","2084":"D JC"},F:{"1":"pB P Q R wB S T U V W X Y Z a b c d e","2":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB PC QC RC SC qB AC TC rB","322":"FB GB HB","1028":"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"},G:{"1":"hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"zB UC BC VC","33":"E YC ZC aC bC cC dC eC fC gC","2084":"WC XC"},H:{"2":"oC"},I:{"1":"f","2":"tB I pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"2":"A B"},O:{"1028":"vC"},P:{"1":"g xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C","2":"I wC"},Q:{"1028":"1B"},R:{"1":"9C"},S:{"1":"BD","516":"AD"}},B:5,C:"CSS position:sticky"};
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('lastIndexOf', require('../lastIndexOf'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"shareReplay.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/shareReplay.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGnE,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,iBAAiB,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AACvF,wBAAgB,WAAW,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"}
|
||||
@@ -0,0 +1,60 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
pattern: ()=>pattern,
|
||||
withoutCapturing: ()=>withoutCapturing,
|
||||
any: ()=>any,
|
||||
optional: ()=>optional,
|
||||
zeroOrMore: ()=>zeroOrMore,
|
||||
nestedBrackets: ()=>nestedBrackets,
|
||||
escape: ()=>escape
|
||||
});
|
||||
const REGEX_SPECIAL = /[\\^$.*+?()[\]{}|]/g;
|
||||
const REGEX_HAS_SPECIAL = RegExp(REGEX_SPECIAL.source);
|
||||
/**
|
||||
* @param {string|RegExp|Array<string|RegExp>} source
|
||||
*/ function toSource(source) {
|
||||
source = Array.isArray(source) ? source : [
|
||||
source
|
||||
];
|
||||
source = source.map((item)=>item instanceof RegExp ? item.source : item);
|
||||
return source.join("");
|
||||
}
|
||||
function pattern(source) {
|
||||
return new RegExp(toSource(source), "g");
|
||||
}
|
||||
function withoutCapturing(source) {
|
||||
return new RegExp(`(?:${toSource(source)})`, "g");
|
||||
}
|
||||
function any(sources) {
|
||||
return `(?:${sources.map(toSource).join("|")})`;
|
||||
}
|
||||
function optional(source) {
|
||||
return `(?:${toSource(source)})?`;
|
||||
}
|
||||
function zeroOrMore(source) {
|
||||
return `(?:${toSource(source)})*`;
|
||||
}
|
||||
function nestedBrackets(open, close, depth = 1) {
|
||||
return withoutCapturing([
|
||||
escape(open),
|
||||
/[^\s]*/,
|
||||
depth === 1 ? `[^${escape(open)}${escape(close)}\s]*` : any([
|
||||
`[^${escape(open)}${escape(close)}\s]*`,
|
||||
nestedBrackets(open, close, depth - 1)
|
||||
]),
|
||||
/[^\s]*/,
|
||||
escape(close)
|
||||
]);
|
||||
}
|
||||
function escape(string) {
|
||||
return string && REGEX_HAS_SPECIAL.test(string) ? string.replace(REGEX_SPECIAL, "\\$&") : string || "";
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"2":"C K L 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","66":"P","257":"G M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB EC FC","129":"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","194":"UB"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB 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","66":"XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P"},E:{"2":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"2":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB 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","66":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB"},G:{"2":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"2":"tB I f pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"2":"A B C h qB AC rB"},L:{"2":"H"},M:{"2":"H"},N:{"2":"A B"},O:{"2":"vC"},P:{"513":"I","516":"g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"2":"1B"},R:{"2":"9C"},S:{"2":"AD BD"}},B:7,C:"WebVR API"};
|
||||
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* The `string_decoder` module provides an API for decoding `Buffer` objects into
|
||||
* strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
|
||||
* characters. It can be accessed using:
|
||||
*
|
||||
* ```js
|
||||
* const { StringDecoder } = require('string_decoder');
|
||||
* ```
|
||||
*
|
||||
* The following example shows the basic use of the `StringDecoder` class.
|
||||
*
|
||||
* ```js
|
||||
* const { StringDecoder } = require('string_decoder');
|
||||
* const decoder = new StringDecoder('utf8');
|
||||
*
|
||||
* const cent = Buffer.from([0xC2, 0xA2]);
|
||||
* console.log(decoder.write(cent));
|
||||
*
|
||||
* const euro = Buffer.from([0xE2, 0x82, 0xAC]);
|
||||
* console.log(decoder.write(euro));
|
||||
* ```
|
||||
*
|
||||
* When a `Buffer` instance is written to the `StringDecoder` instance, an
|
||||
* internal buffer is used to ensure that the decoded string does not contain
|
||||
* any incomplete multibyte characters. These are held in the buffer until the
|
||||
* next call to `stringDecoder.write()` or until `stringDecoder.end()` is called.
|
||||
*
|
||||
* In the following example, the three UTF-8 encoded bytes of the European Euro
|
||||
* symbol (`€`) are written over three separate operations:
|
||||
*
|
||||
* ```js
|
||||
* const { StringDecoder } = require('string_decoder');
|
||||
* const decoder = new StringDecoder('utf8');
|
||||
*
|
||||
* decoder.write(Buffer.from([0xE2]));
|
||||
* decoder.write(Buffer.from([0x82]));
|
||||
* console.log(decoder.end(Buffer.from([0xAC])));
|
||||
* ```
|
||||
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/string_decoder.js)
|
||||
*/
|
||||
declare module 'string_decoder' {
|
||||
class StringDecoder {
|
||||
constructor(encoding?: BufferEncoding);
|
||||
/**
|
||||
* Returns a decoded string, ensuring that any incomplete multibyte characters at
|
||||
* the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the
|
||||
* returned string and stored in an internal buffer for the next call to`stringDecoder.write()` or `stringDecoder.end()`.
|
||||
* @since v0.1.99
|
||||
* @param buffer A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode.
|
||||
*/
|
||||
write(buffer: Buffer): string;
|
||||
/**
|
||||
* Returns any remaining input stored in the internal buffer as a string. Bytes
|
||||
* representing incomplete UTF-8 and UTF-16 characters will be replaced with
|
||||
* substitution characters appropriate for the character encoding.
|
||||
*
|
||||
* If the `buffer` argument is provided, one final call to `stringDecoder.write()`is performed before returning the remaining input.
|
||||
* After `end()` is called, the `stringDecoder` object can be reused for new input.
|
||||
* @since v0.9.3
|
||||
* @param buffer A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode.
|
||||
*/
|
||||
end(buffer?: Buffer): string;
|
||||
}
|
||||
}
|
||||
declare module 'node:string_decoder' {
|
||||
export * from 'string_decoder';
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Code coverage report for csv2json/libs/interfaces/cli/main.js</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../../../base.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1>
|
||||
<a href="../../../../index.html">All files</a> / <a href="index.html">csv2json/libs/interfaces/cli</a> main.js
|
||||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>0/23</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>0/4</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>0/6</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>0/23</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line low'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a>
|
||||
<a name='L9'></a><a href='#L9'>9</a>
|
||||
<a name='L10'></a><a href='#L10'>10</a>
|
||||
<a name='L11'></a><a href='#L11'>11</a>
|
||||
<a name='L12'></a><a href='#L12'>12</a></td><td class="line-coverage quiet"><span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span></td><td class="text"><pre class="prettyprint lang-js">Unable to lookup source: /Users/kxiang/work/projects/csv2json/libs/interfaces/cli/main.js(ENOENT: no such file or directory, open '/Users/kxiang/work/projects/csv2json/libs/interfaces/cli/main.js')
|
||||
Error: Unable to lookup source: /Users/kxiang/work/projects/csv2json/libs/interfaces/cli/main.js(ENOENT: no such file or directory, open '/Users/kxiang/work/projects/csv2json/libs/interfaces/cli/main.js')
|
||||
at Context.defaultSourceLookup [as sourceFinder] (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/context.js:15:15)
|
||||
at Context.getSource (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/context.js:74:17)
|
||||
at Object.annotateSourceCode (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-reports/lib/html/annotator.js:172:38)
|
||||
at HtmlReport.onDetail (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-reports/lib/html/index.js:237:39)
|
||||
at Visitor.(anonymous function) [as onDetail] (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:34:30)
|
||||
at ReportNode.Node.visit (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:123:17)
|
||||
at /Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:116:23
|
||||
at Array.forEach (native)
|
||||
at visitChildren (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:115:32)
|
||||
at ReportNode.Node.visit (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:126:5)</pre></td></tr>
|
||||
</table></pre>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Fri May 11 2018 21:36:07 GMT+0100 (IST)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
if (typeof prettyPrint === 'function') {
|
||||
prettyPrint();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script src="../../../../sorter.js"></script>
|
||||
<script src="../../../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,96 @@
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { MonoTypeOperatorFunction, ObservableInput } from '../types';
|
||||
|
||||
import { operate } from '../util/lift';
|
||||
import { innerFrom } from '../observable/innerFrom';
|
||||
import { createOperatorSubscriber } from './OperatorSubscriber';
|
||||
|
||||
/**
|
||||
* Ignores source values for a duration determined by another Observable, then
|
||||
* emits the most recent value from the source Observable, then repeats this
|
||||
* process.
|
||||
*
|
||||
* <span class="informal">It's like {@link auditTime}, but the silencing
|
||||
* duration is determined by a second Observable.</span>
|
||||
*
|
||||
* 
|
||||
*
|
||||
* `audit` is similar to `throttle`, but emits the last value from the silenced
|
||||
* time window, instead of the first value. `audit` 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 by calling the `durationSelector` function with the
|
||||
* source value, which returns the "duration" Observable. When the duration
|
||||
* Observable emits a value, 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.
|
||||
*
|
||||
* ## Example
|
||||
*
|
||||
* Emit clicks at a rate of at most one click per second
|
||||
*
|
||||
* ```ts
|
||||
* import { fromEvent, audit, interval } from 'rxjs';
|
||||
*
|
||||
* const clicks = fromEvent(document, 'click');
|
||||
* const result = clicks.pipe(audit(ev => interval(1000)));
|
||||
* result.subscribe(x => console.log(x));
|
||||
* ```
|
||||
*
|
||||
* @see {@link auditTime}
|
||||
* @see {@link debounce}
|
||||
* @see {@link delayWhen}
|
||||
* @see {@link sample}
|
||||
* @see {@link throttle}
|
||||
*
|
||||
* @param durationSelector A function
|
||||
* that receives a value from the source Observable, for computing the silencing
|
||||
* duration, returned as an Observable or a Promise.
|
||||
* @return A function that returns an Observable that performs rate-limiting of
|
||||
* emissions from the source Observable.
|
||||
*/
|
||||
export function audit<T>(durationSelector: (value: T) => ObservableInput<any>): MonoTypeOperatorFunction<T> {
|
||||
return operate((source, subscriber) => {
|
||||
let hasValue = false;
|
||||
let lastValue: T | null = null;
|
||||
let durationSubscriber: Subscriber<any> | null = null;
|
||||
let isComplete = false;
|
||||
|
||||
const endDuration = () => {
|
||||
durationSubscriber?.unsubscribe();
|
||||
durationSubscriber = null;
|
||||
if (hasValue) {
|
||||
hasValue = false;
|
||||
const value = lastValue!;
|
||||
lastValue = null;
|
||||
subscriber.next(value);
|
||||
}
|
||||
isComplete && subscriber.complete();
|
||||
};
|
||||
|
||||
const cleanupDuration = () => {
|
||||
durationSubscriber = null;
|
||||
isComplete && subscriber.complete();
|
||||
};
|
||||
|
||||
source.subscribe(
|
||||
createOperatorSubscriber(
|
||||
subscriber,
|
||||
(value) => {
|
||||
hasValue = true;
|
||||
lastValue = value;
|
||||
if (!durationSubscriber) {
|
||||
innerFrom(durationSelector(value)).subscribe(
|
||||
(durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration))
|
||||
);
|
||||
}
|
||||
},
|
||||
() => {
|
||||
isComplete = true;
|
||||
(!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete();
|
||||
}
|
||||
)
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
let nesting = require('../lib/postcss-plugins/nesting')
|
||||
module.exports = (nesting.__esModule ? nesting : { default: nesting }).default
|
||||
@@ -0,0 +1,6 @@
|
||||
import { scheduled } from '../scheduled/scheduled';
|
||||
import { innerFrom } from './innerFrom';
|
||||
export function from(input, scheduler) {
|
||||
return scheduler ? scheduled(input, scheduler) : innerFrom(input);
|
||||
}
|
||||
//# sourceMappingURL=from.js.map
|
||||
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.max = void 0;
|
||||
var reduce_1 = require("./reduce");
|
||||
var isFunction_1 = require("../util/isFunction");
|
||||
function max(comparer) {
|
||||
return reduce_1.reduce(isFunction_1.isFunction(comparer) ? function (x, y) { return (comparer(x, y) > 0 ? x : y); } : function (x, y) { return (x > y ? x : y); });
|
||||
}
|
||||
exports.max = max;
|
||||
//# sourceMappingURL=max.js.map
|
||||
@@ -0,0 +1,52 @@
|
||||
import { Fork, Omit } from "../types";
|
||||
import { ASTNode } from "./types";
|
||||
import { NodePath } from "./node-path";
|
||||
export interface PathVisitor {
|
||||
_reusableContextStack: any;
|
||||
_methodNameTable: any;
|
||||
_shouldVisitComments: any;
|
||||
Context: any;
|
||||
_visiting: any;
|
||||
_changeReported: any;
|
||||
_abortRequested: boolean;
|
||||
visit(...args: any[]): any;
|
||||
reset(...args: any[]): any;
|
||||
visitWithoutReset(path: any): any;
|
||||
AbortRequest: any;
|
||||
abort(): void;
|
||||
visitor: any;
|
||||
acquireContext(path: any): any;
|
||||
releaseContext(context: any): void;
|
||||
reportChanged(): void;
|
||||
wasChangeReported(): any;
|
||||
}
|
||||
export interface PathVisitorStatics {
|
||||
fromMethodsObject(methods?: any): Visitor;
|
||||
visit<M = {}>(node: ASTNode, methods?: import("../gen/visitor").Visitor<M>): any;
|
||||
}
|
||||
export interface PathVisitorConstructor extends PathVisitorStatics {
|
||||
new (): PathVisitor;
|
||||
}
|
||||
export interface Visitor extends PathVisitor {
|
||||
}
|
||||
export interface VisitorConstructor extends PathVisitorStatics {
|
||||
new (): Visitor;
|
||||
}
|
||||
export interface VisitorMethods {
|
||||
[visitorMethod: string]: (path: NodePath) => any;
|
||||
}
|
||||
export interface SharedContextMethods {
|
||||
currentPath: any;
|
||||
needToCallTraverse: boolean;
|
||||
Context: any;
|
||||
visitor: any;
|
||||
reset(path: any, ...args: any[]): any;
|
||||
invokeVisitorMethod(methodName: string): any;
|
||||
traverse(path: any, newVisitor?: VisitorMethods): any;
|
||||
visit(path: any, newVisitor?: VisitorMethods): any;
|
||||
reportChanged(): void;
|
||||
abort(): void;
|
||||
}
|
||||
export interface Context extends Omit<PathVisitor, "visit" | "reset">, SharedContextMethods {
|
||||
}
|
||||
export default function pathVisitorPlugin(fork: Fork): PathVisitorConstructor;
|
||||
@@ -0,0 +1,43 @@
|
||||
# unpipe
|
||||
|
||||
[![NPM Version][npm-image]][npm-url]
|
||||
[![NPM Downloads][downloads-image]][downloads-url]
|
||||
[![Node.js Version][node-image]][node-url]
|
||||
[![Build Status][travis-image]][travis-url]
|
||||
[![Test Coverage][coveralls-image]][coveralls-url]
|
||||
|
||||
Unpipe a stream from all destinations.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
$ npm install unpipe
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
```js
|
||||
var unpipe = require('unpipe')
|
||||
```
|
||||
|
||||
### unpipe(stream)
|
||||
|
||||
Unpipes all destinations from a given stream. With stream 2+, this is
|
||||
equivalent to `stream.unpipe()`. When used with streams 1 style streams
|
||||
(typically Node.js 0.8 and below), this module attempts to undo the
|
||||
actions done in `stream.pipe(dest)`.
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/unpipe.svg
|
||||
[npm-url]: https://npmjs.org/package/unpipe
|
||||
[node-image]: https://img.shields.io/node/v/unpipe.svg
|
||||
[node-url]: http://nodejs.org/download/
|
||||
[travis-image]: https://img.shields.io/travis/stream-utils/unpipe.svg
|
||||
[travis-url]: https://travis-ci.org/stream-utils/unpipe
|
||||
[coveralls-image]: https://img.shields.io/coveralls/stream-utils/unpipe.svg
|
||||
[coveralls-url]: https://coveralls.io/r/stream-utils/unpipe?branch=master
|
||||
[downloads-image]: https://img.shields.io/npm/dm/unpipe.svg
|
||||
[downloads-url]: https://npmjs.org/package/unpipe
|
||||
@@ -0,0 +1,7 @@
|
||||
var detective = require('../');
|
||||
var fs = require('fs');
|
||||
|
||||
var src = fs.readFileSync(__dirname + '/src/jquery.js', 'utf8');
|
||||
var t0 = Date.now();
|
||||
var requires = detective(src);
|
||||
console.log(Date.now() - t0);
|
||||
@@ -0,0 +1,38 @@
|
||||
// eslint-disable-next-line unicorn/prefer-top-level-await
|
||||
const nativePromisePrototype = (async () => {})().constructor.prototype;
|
||||
|
||||
const descriptors = ['then', 'catch', 'finally'].map(property => [
|
||||
property,
|
||||
Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property),
|
||||
]);
|
||||
|
||||
// The return value is a mixin of `childProcess` and `Promise`
|
||||
export const mergePromise = (spawned, promise) => {
|
||||
for (const [property, descriptor] of descriptors) {
|
||||
// Starting the main `promise` is deferred to avoid consuming streams
|
||||
const value = typeof promise === 'function'
|
||||
? (...args) => Reflect.apply(descriptor.value, promise(), args)
|
||||
: descriptor.value.bind(promise);
|
||||
|
||||
Reflect.defineProperty(spawned, property, {...descriptor, value});
|
||||
}
|
||||
|
||||
return spawned;
|
||||
};
|
||||
|
||||
// Use promises instead of `child_process` events
|
||||
export const getSpawnedPromise = spawned => new Promise((resolve, reject) => {
|
||||
spawned.on('exit', (exitCode, signal) => {
|
||||
resolve({exitCode, signal});
|
||||
});
|
||||
|
||||
spawned.on('error', error => {
|
||||
reject(error);
|
||||
});
|
||||
|
||||
if (spawned.stdin) {
|
||||
spawned.stdin.on('error', error => {
|
||||
reject(error);
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,51 @@
|
||||
import { OperatorFunction } from '../types';
|
||||
/**
|
||||
* Emits the single value at the specified `index` in a sequence of emissions
|
||||
* from the source Observable.
|
||||
*
|
||||
* <span class="informal">Emits only the i-th value, then completes.</span>
|
||||
*
|
||||
* 
|
||||
*
|
||||
* `elementAt` returns an Observable that emits the item at the specified
|
||||
* `index` in the source Observable, or a default value if that `index` is out
|
||||
* of range and the `default` argument is provided. If the `default` argument is
|
||||
* not given and the `index` is out of range, the output Observable will emit an
|
||||
* `ArgumentOutOfRangeError` error.
|
||||
*
|
||||
* ## Example
|
||||
*
|
||||
* Emit only the third click event
|
||||
*
|
||||
* ```ts
|
||||
* import { fromEvent, elementAt } from 'rxjs';
|
||||
*
|
||||
* const clicks = fromEvent(document, 'click');
|
||||
* const result = clicks.pipe(elementAt(2));
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* // Results in:
|
||||
* // click 1 = nothing
|
||||
* // click 2 = nothing
|
||||
* // click 3 = MouseEvent object logged to console
|
||||
* ```
|
||||
*
|
||||
* @see {@link first}
|
||||
* @see {@link last}
|
||||
* @see {@link skip}
|
||||
* @see {@link single}
|
||||
* @see {@link take}
|
||||
*
|
||||
* @throws {ArgumentOutOfRangeError} When using `elementAt(i)`, it delivers an
|
||||
* ArgumentOutOfRangeError to the Observer's `error` callback if `i < 0` or the
|
||||
* Observable has completed before emitting the i-th `next` notification.
|
||||
*
|
||||
* @param {number} index Is the number `i` for the i-th source emission that has
|
||||
* happened since the subscription, starting from the number `0`.
|
||||
* @param {T} [defaultValue] The default value returned for missing indices.
|
||||
* @return A function that returns an Observable that emits a single item, if
|
||||
* it is found. Otherwise, it will emit the default value if given. If not, it
|
||||
* emits an error.
|
||||
*/
|
||||
export declare function elementAt<T, D = T>(index: number, defaultValue?: D): OperatorFunction<T, T | D>;
|
||||
//# sourceMappingURL=elementAt.d.ts.map
|
||||
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
var ensurePlainFunction = require("../../object/ensure-plain-function")
|
||||
, ensureThenable = require("../../object/ensure-thenable")
|
||||
, microtaskDelay = require("../../function/#/microtask-delay");
|
||||
|
||||
module.exports = function (callback) {
|
||||
ensureThenable(this);
|
||||
ensurePlainFunction(callback);
|
||||
// Rely on microtaskDelay to escape eventual error swallowing
|
||||
this.then(
|
||||
microtaskDelay.call(function (value) { callback(null, value); }),
|
||||
microtaskDelay.call(function (reason) { callback(reason); })
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
export type UpdateDonation = {
|
||||
id: number;
|
||||
donor: number;
|
||||
paidAmount?: number;
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
import { Subject } from './Subject';
|
||||
import { Subscriber } from './Subscriber';
|
||||
import { Subscription } from './Subscription';
|
||||
|
||||
/**
|
||||
* A variant of Subject that requires an initial value and emits its current
|
||||
* value whenever it is subscribed to.
|
||||
*
|
||||
* @class BehaviorSubject<T>
|
||||
*/
|
||||
export class BehaviorSubject<T> extends Subject<T> {
|
||||
constructor(private _value: T) {
|
||||
super();
|
||||
}
|
||||
|
||||
get value(): T {
|
||||
return this.getValue();
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
protected _subscribe(subscriber: Subscriber<T>): Subscription {
|
||||
const subscription = super._subscribe(subscriber);
|
||||
!subscription.closed && subscriber.next(this._value);
|
||||
return subscription;
|
||||
}
|
||||
|
||||
getValue(): T {
|
||||
const { hasError, thrownError, _value } = this;
|
||||
if (hasError) {
|
||||
throw thrownError;
|
||||
}
|
||||
this._throwIfClosed();
|
||||
return _value;
|
||||
}
|
||||
|
||||
next(value: T): void {
|
||||
super.next((this._value = value));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SetNumberFormatUnitOptions.d.ts","sourceRoot":"","sources":["../../../../../../../packages/ecma402-abstract/NumberFormat/SetNumberFormatUnitOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAE,mBAAmB,EAAC,MAAM,iBAAiB,CAAA;AAKzE;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,EAAE,EAAE,IAAI,CAAC,YAAY,EACrB,OAAO,iCAA2C,EAClD,EACE,gBAAgB,GACjB,EAAE;IAAC,gBAAgB,CAAC,EAAE,EAAE,IAAI,CAAC,YAAY,GAAG,oBAAoB,CAAA;CAAC,QA+DnE"}
|
||||
@@ -0,0 +1,17 @@
|
||||
/* eslint no-bitwise: "off" */
|
||||
|
||||
// Thanks: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
|
||||
// /Global_Objects/Math/imul
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = function (val1, val2) {
|
||||
var xh = (val1 >>> 16) & 0xffff
|
||||
, xl = val1 & 0xffff
|
||||
, yh = (val2 >>> 16) & 0xffff
|
||||
, yl = val2 & 0xffff;
|
||||
|
||||
// The shift by 0 fixes the sign on the high part
|
||||
// the final |0 converts the unsigned value into a signed value
|
||||
return (xl * yl + (((xh * yl + xl * yh) << 16) >>> 0)) | 0;
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
'use strict';
|
||||
|
||||
require('core-js');
|
||||
|
||||
var inspect = require('./');
|
||||
var test = require('tape');
|
||||
|
||||
test('Maps', function (t) {
|
||||
t.equal(inspect(new Map([[1, 2]])), 'Map (1) {1 => 2}');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('WeakMaps', function (t) {
|
||||
t.equal(inspect(new WeakMap([[{}, 2]])), 'WeakMap { ? }');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Sets', function (t) {
|
||||
t.equal(inspect(new Set([[1, 2]])), 'Set (1) {[ 1, 2 ]}');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('WeakSets', function (t) {
|
||||
t.equal(inspect(new WeakSet([[1, 2]])), 'WeakSet { ? }');
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ajax/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC"}
|
||||
@@ -0,0 +1,38 @@
|
||||
import { OperatorFunction } from '../types';
|
||||
/**
|
||||
* Ignores all items emitted by the source Observable and only passes calls of `complete` or `error`.
|
||||
*
|
||||
* 
|
||||
*
|
||||
* The `ignoreElements` operator suppresses all items emitted by the source Observable,
|
||||
* but allows its termination notification (either `error` or `complete`) to pass through unchanged.
|
||||
*
|
||||
* If you do not care about the items being emitted by an Observable, but you do want to be notified
|
||||
* when it completes or when it terminates with an error, you can apply the `ignoreElements` operator
|
||||
* to the Observable, which will ensure that it will never call its observers’ `next` handlers.
|
||||
*
|
||||
* ## Example
|
||||
*
|
||||
* Ignore all `next` emissions from the source
|
||||
*
|
||||
* ```ts
|
||||
* import { of, ignoreElements } from 'rxjs';
|
||||
*
|
||||
* of('you', 'talking', 'to', 'me')
|
||||
* .pipe(ignoreElements())
|
||||
* .subscribe({
|
||||
* next: word => console.log(word),
|
||||
* error: err => console.log('error:', err),
|
||||
* complete: () => console.log('the end'),
|
||||
* });
|
||||
*
|
||||
* // result:
|
||||
* // 'the end'
|
||||
* ```
|
||||
*
|
||||
* @return A function that returns an empty Observable that only calls
|
||||
* `complete` or `error`, based on which one is called by the source
|
||||
* Observable.
|
||||
*/
|
||||
export declare function ignoreElements(): OperatorFunction<unknown, never>;
|
||||
//# sourceMappingURL=ignoreElements.d.ts.map
|
||||
@@ -0,0 +1,359 @@
|
||||
const VERSION = "6.0.0";
|
||||
|
||||
/**
|
||||
* Some “list” response that can be paginated have a different response structure
|
||||
*
|
||||
* They have a `total_count` key in the response (search also has `incomplete_results`,
|
||||
* /installation/repositories also has `repository_selection`), as well as a key with
|
||||
* the list of the items which name varies from endpoint to endpoint.
|
||||
*
|
||||
* Octokit normalizes these responses so that paginated results are always returned following
|
||||
* the same structure. One challenge is that if the list response has only one page, no Link
|
||||
* header is provided, so this header alone is not sufficient to check wether a response is
|
||||
* paginated or not.
|
||||
*
|
||||
* We check if a "total_count" key is present in the response data, but also make sure that
|
||||
* a "url" property is not, as the "Get the combined status for a specific ref" endpoint would
|
||||
* otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
|
||||
*/
|
||||
function normalizePaginatedListResponse(response) {
|
||||
// endpoints can respond with 204 if repository is empty
|
||||
if (!response.data) {
|
||||
return {
|
||||
...response,
|
||||
data: [],
|
||||
};
|
||||
}
|
||||
const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data);
|
||||
if (!responseNeedsNormalization)
|
||||
return response;
|
||||
// keep the additional properties intact as there is currently no other way
|
||||
// to retrieve the same information.
|
||||
const incompleteResults = response.data.incomplete_results;
|
||||
const repositorySelection = response.data.repository_selection;
|
||||
const totalCount = response.data.total_count;
|
||||
delete response.data.incomplete_results;
|
||||
delete response.data.repository_selection;
|
||||
delete response.data.total_count;
|
||||
const namespaceKey = Object.keys(response.data)[0];
|
||||
const data = response.data[namespaceKey];
|
||||
response.data = data;
|
||||
if (typeof incompleteResults !== "undefined") {
|
||||
response.data.incomplete_results = incompleteResults;
|
||||
}
|
||||
if (typeof repositorySelection !== "undefined") {
|
||||
response.data.repository_selection = repositorySelection;
|
||||
}
|
||||
response.data.total_count = totalCount;
|
||||
return response;
|
||||
}
|
||||
|
||||
function iterator(octokit, route, parameters) {
|
||||
const options = typeof route === "function"
|
||||
? route.endpoint(parameters)
|
||||
: octokit.request.endpoint(route, parameters);
|
||||
const requestMethod = typeof route === "function" ? route : octokit.request;
|
||||
const method = options.method;
|
||||
const headers = options.headers;
|
||||
let url = options.url;
|
||||
return {
|
||||
[Symbol.asyncIterator]: () => ({
|
||||
async next() {
|
||||
if (!url)
|
||||
return { done: true };
|
||||
try {
|
||||
const response = await requestMethod({ method, url, headers });
|
||||
const normalizedResponse = normalizePaginatedListResponse(response);
|
||||
// `response.headers.link` format:
|
||||
// '<https://api.github.com/users/aseemk/followers?page=2>; rel="next", <https://api.github.com/users/aseemk/followers?page=2>; rel="last"'
|
||||
// sets `url` to undefined if "next" URL is not present or `link` header is not set
|
||||
url = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1];
|
||||
return { value: normalizedResponse };
|
||||
}
|
||||
catch (error) {
|
||||
if (error.status !== 409)
|
||||
throw error;
|
||||
url = "";
|
||||
return {
|
||||
value: {
|
||||
status: 200,
|
||||
headers: {},
|
||||
data: [],
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
||||
function paginate(octokit, route, parameters, mapFn) {
|
||||
if (typeof parameters === "function") {
|
||||
mapFn = parameters;
|
||||
parameters = undefined;
|
||||
}
|
||||
return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);
|
||||
}
|
||||
function gather(octokit, results, iterator, mapFn) {
|
||||
return iterator.next().then((result) => {
|
||||
if (result.done) {
|
||||
return results;
|
||||
}
|
||||
let earlyExit = false;
|
||||
function done() {
|
||||
earlyExit = true;
|
||||
}
|
||||
results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data);
|
||||
if (earlyExit) {
|
||||
return results;
|
||||
}
|
||||
return gather(octokit, results, iterator, mapFn);
|
||||
});
|
||||
}
|
||||
|
||||
const composePaginateRest = Object.assign(paginate, {
|
||||
iterator,
|
||||
});
|
||||
|
||||
const paginatingEndpoints = [
|
||||
"GET /app/hook/deliveries",
|
||||
"GET /app/installations",
|
||||
"GET /enterprises/{enterprise}/actions/runner-groups",
|
||||
"GET /enterprises/{enterprise}/dependabot/alerts",
|
||||
"GET /enterprises/{enterprise}/secret-scanning/alerts",
|
||||
"GET /events",
|
||||
"GET /gists",
|
||||
"GET /gists/public",
|
||||
"GET /gists/starred",
|
||||
"GET /gists/{gist_id}/comments",
|
||||
"GET /gists/{gist_id}/commits",
|
||||
"GET /gists/{gist_id}/forks",
|
||||
"GET /installation/repositories",
|
||||
"GET /issues",
|
||||
"GET /licenses",
|
||||
"GET /marketplace_listing/plans",
|
||||
"GET /marketplace_listing/plans/{plan_id}/accounts",
|
||||
"GET /marketplace_listing/stubbed/plans",
|
||||
"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts",
|
||||
"GET /networks/{owner}/{repo}/events",
|
||||
"GET /notifications",
|
||||
"GET /organizations",
|
||||
"GET /orgs/{org}/actions/cache/usage-by-repository",
|
||||
"GET /orgs/{org}/actions/permissions/repositories",
|
||||
"GET /orgs/{org}/actions/required_workflows",
|
||||
"GET /orgs/{org}/actions/runner-groups",
|
||||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories",
|
||||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners",
|
||||
"GET /orgs/{org}/actions/runners",
|
||||
"GET /orgs/{org}/actions/secrets",
|
||||
"GET /orgs/{org}/actions/secrets/{secret_name}/repositories",
|
||||
"GET /orgs/{org}/actions/variables",
|
||||
"GET /orgs/{org}/actions/variables/{name}/repositories",
|
||||
"GET /orgs/{org}/blocks",
|
||||
"GET /orgs/{org}/code-scanning/alerts",
|
||||
"GET /orgs/{org}/codespaces",
|
||||
"GET /orgs/{org}/codespaces/secrets",
|
||||
"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories",
|
||||
"GET /orgs/{org}/dependabot/alerts",
|
||||
"GET /orgs/{org}/dependabot/secrets",
|
||||
"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories",
|
||||
"GET /orgs/{org}/events",
|
||||
"GET /orgs/{org}/failed_invitations",
|
||||
"GET /orgs/{org}/hooks",
|
||||
"GET /orgs/{org}/hooks/{hook_id}/deliveries",
|
||||
"GET /orgs/{org}/installations",
|
||||
"GET /orgs/{org}/invitations",
|
||||
"GET /orgs/{org}/invitations/{invitation_id}/teams",
|
||||
"GET /orgs/{org}/issues",
|
||||
"GET /orgs/{org}/members",
|
||||
"GET /orgs/{org}/members/{username}/codespaces",
|
||||
"GET /orgs/{org}/migrations",
|
||||
"GET /orgs/{org}/migrations/{migration_id}/repositories",
|
||||
"GET /orgs/{org}/outside_collaborators",
|
||||
"GET /orgs/{org}/packages",
|
||||
"GET /orgs/{org}/packages/{package_type}/{package_name}/versions",
|
||||
"GET /orgs/{org}/projects",
|
||||
"GET /orgs/{org}/public_members",
|
||||
"GET /orgs/{org}/repos",
|
||||
"GET /orgs/{org}/secret-scanning/alerts",
|
||||
"GET /orgs/{org}/teams",
|
||||
"GET /orgs/{org}/teams/{team_slug}/discussions",
|
||||
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments",
|
||||
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions",
|
||||
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions",
|
||||
"GET /orgs/{org}/teams/{team_slug}/invitations",
|
||||
"GET /orgs/{org}/teams/{team_slug}/members",
|
||||
"GET /orgs/{org}/teams/{team_slug}/projects",
|
||||
"GET /orgs/{org}/teams/{team_slug}/repos",
|
||||
"GET /orgs/{org}/teams/{team_slug}/teams",
|
||||
"GET /projects/columns/{column_id}/cards",
|
||||
"GET /projects/{project_id}/collaborators",
|
||||
"GET /projects/{project_id}/columns",
|
||||
"GET /repos/{org}/{repo}/actions/required_workflows",
|
||||
"GET /repos/{owner}/{repo}/actions/artifacts",
|
||||
"GET /repos/{owner}/{repo}/actions/caches",
|
||||
"GET /repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs",
|
||||
"GET /repos/{owner}/{repo}/actions/runners",
|
||||
"GET /repos/{owner}/{repo}/actions/runs",
|
||||
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts",
|
||||
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs",
|
||||
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs",
|
||||
"GET /repos/{owner}/{repo}/actions/secrets",
|
||||
"GET /repos/{owner}/{repo}/actions/variables",
|
||||
"GET /repos/{owner}/{repo}/actions/workflows",
|
||||
"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs",
|
||||
"GET /repos/{owner}/{repo}/assignees",
|
||||
"GET /repos/{owner}/{repo}/branches",
|
||||
"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations",
|
||||
"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs",
|
||||
"GET /repos/{owner}/{repo}/code-scanning/alerts",
|
||||
"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances",
|
||||
"GET /repos/{owner}/{repo}/code-scanning/analyses",
|
||||
"GET /repos/{owner}/{repo}/codespaces",
|
||||
"GET /repos/{owner}/{repo}/codespaces/devcontainers",
|
||||
"GET /repos/{owner}/{repo}/codespaces/secrets",
|
||||
"GET /repos/{owner}/{repo}/collaborators",
|
||||
"GET /repos/{owner}/{repo}/comments",
|
||||
"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions",
|
||||
"GET /repos/{owner}/{repo}/commits",
|
||||
"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments",
|
||||
"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls",
|
||||
"GET /repos/{owner}/{repo}/commits/{ref}/check-runs",
|
||||
"GET /repos/{owner}/{repo}/commits/{ref}/check-suites",
|
||||
"GET /repos/{owner}/{repo}/commits/{ref}/status",
|
||||
"GET /repos/{owner}/{repo}/commits/{ref}/statuses",
|
||||
"GET /repos/{owner}/{repo}/contributors",
|
||||
"GET /repos/{owner}/{repo}/dependabot/alerts",
|
||||
"GET /repos/{owner}/{repo}/dependabot/secrets",
|
||||
"GET /repos/{owner}/{repo}/deployments",
|
||||
"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses",
|
||||
"GET /repos/{owner}/{repo}/environments",
|
||||
"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies",
|
||||
"GET /repos/{owner}/{repo}/events",
|
||||
"GET /repos/{owner}/{repo}/forks",
|
||||
"GET /repos/{owner}/{repo}/hooks",
|
||||
"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries",
|
||||
"GET /repos/{owner}/{repo}/invitations",
|
||||
"GET /repos/{owner}/{repo}/issues",
|
||||
"GET /repos/{owner}/{repo}/issues/comments",
|
||||
"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",
|
||||
"GET /repos/{owner}/{repo}/issues/events",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/comments",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/events",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/labels",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline",
|
||||
"GET /repos/{owner}/{repo}/keys",
|
||||
"GET /repos/{owner}/{repo}/labels",
|
||||
"GET /repos/{owner}/{repo}/milestones",
|
||||
"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels",
|
||||
"GET /repos/{owner}/{repo}/notifications",
|
||||
"GET /repos/{owner}/{repo}/pages/builds",
|
||||
"GET /repos/{owner}/{repo}/projects",
|
||||
"GET /repos/{owner}/{repo}/pulls",
|
||||
"GET /repos/{owner}/{repo}/pulls/comments",
|
||||
"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions",
|
||||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments",
|
||||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits",
|
||||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/files",
|
||||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews",
|
||||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments",
|
||||
"GET /repos/{owner}/{repo}/releases",
|
||||
"GET /repos/{owner}/{repo}/releases/{release_id}/assets",
|
||||
"GET /repos/{owner}/{repo}/releases/{release_id}/reactions",
|
||||
"GET /repos/{owner}/{repo}/secret-scanning/alerts",
|
||||
"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations",
|
||||
"GET /repos/{owner}/{repo}/stargazers",
|
||||
"GET /repos/{owner}/{repo}/subscribers",
|
||||
"GET /repos/{owner}/{repo}/tags",
|
||||
"GET /repos/{owner}/{repo}/teams",
|
||||
"GET /repos/{owner}/{repo}/topics",
|
||||
"GET /repositories",
|
||||
"GET /repositories/{repository_id}/environments/{environment_name}/secrets",
|
||||
"GET /repositories/{repository_id}/environments/{environment_name}/variables",
|
||||
"GET /search/code",
|
||||
"GET /search/commits",
|
||||
"GET /search/issues",
|
||||
"GET /search/labels",
|
||||
"GET /search/repositories",
|
||||
"GET /search/topics",
|
||||
"GET /search/users",
|
||||
"GET /teams/{team_id}/discussions",
|
||||
"GET /teams/{team_id}/discussions/{discussion_number}/comments",
|
||||
"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions",
|
||||
"GET /teams/{team_id}/discussions/{discussion_number}/reactions",
|
||||
"GET /teams/{team_id}/invitations",
|
||||
"GET /teams/{team_id}/members",
|
||||
"GET /teams/{team_id}/projects",
|
||||
"GET /teams/{team_id}/repos",
|
||||
"GET /teams/{team_id}/teams",
|
||||
"GET /user/blocks",
|
||||
"GET /user/codespaces",
|
||||
"GET /user/codespaces/secrets",
|
||||
"GET /user/emails",
|
||||
"GET /user/followers",
|
||||
"GET /user/following",
|
||||
"GET /user/gpg_keys",
|
||||
"GET /user/installations",
|
||||
"GET /user/installations/{installation_id}/repositories",
|
||||
"GET /user/issues",
|
||||
"GET /user/keys",
|
||||
"GET /user/marketplace_purchases",
|
||||
"GET /user/marketplace_purchases/stubbed",
|
||||
"GET /user/memberships/orgs",
|
||||
"GET /user/migrations",
|
||||
"GET /user/migrations/{migration_id}/repositories",
|
||||
"GET /user/orgs",
|
||||
"GET /user/packages",
|
||||
"GET /user/packages/{package_type}/{package_name}/versions",
|
||||
"GET /user/public_emails",
|
||||
"GET /user/repos",
|
||||
"GET /user/repository_invitations",
|
||||
"GET /user/ssh_signing_keys",
|
||||
"GET /user/starred",
|
||||
"GET /user/subscriptions",
|
||||
"GET /user/teams",
|
||||
"GET /users",
|
||||
"GET /users/{username}/events",
|
||||
"GET /users/{username}/events/orgs/{org}",
|
||||
"GET /users/{username}/events/public",
|
||||
"GET /users/{username}/followers",
|
||||
"GET /users/{username}/following",
|
||||
"GET /users/{username}/gists",
|
||||
"GET /users/{username}/gpg_keys",
|
||||
"GET /users/{username}/keys",
|
||||
"GET /users/{username}/orgs",
|
||||
"GET /users/{username}/packages",
|
||||
"GET /users/{username}/projects",
|
||||
"GET /users/{username}/received_events",
|
||||
"GET /users/{username}/received_events/public",
|
||||
"GET /users/{username}/repos",
|
||||
"GET /users/{username}/ssh_signing_keys",
|
||||
"GET /users/{username}/starred",
|
||||
"GET /users/{username}/subscriptions",
|
||||
];
|
||||
|
||||
function isPaginatingEndpoint(arg) {
|
||||
if (typeof arg === "string") {
|
||||
return paginatingEndpoints.includes(arg);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param octokit Octokit instance
|
||||
* @param options Options passed to Octokit constructor
|
||||
*/
|
||||
function paginateRest(octokit) {
|
||||
return {
|
||||
paginate: Object.assign(paginate.bind(null, octokit), {
|
||||
iterator: iterator.bind(null, octokit),
|
||||
}),
|
||||
};
|
||||
}
|
||||
paginateRest.VERSION = VERSION;
|
||||
|
||||
export { composePaginateRest, isPaginatingEndpoint, paginateRest, paginatingEndpoints };
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* The most commonly used EAN standard is
|
||||
* the thirteen-digit EAN-13, while the
|
||||
* less commonly used 8-digit EAN-8 barcode was
|
||||
* introduced for use on small packages.
|
||||
* Also EAN/UCC-14 is used for Grouping of individual
|
||||
* trade items above unit level(Intermediate, Carton or Pallet).
|
||||
* For more info about EAN-14 checkout: https://www.gtin.info/itf-14-barcodes/
|
||||
* EAN consists of:
|
||||
* GS1 prefix, manufacturer code, product code and check digit
|
||||
* Reference: https://en.wikipedia.org/wiki/International_Article_Number
|
||||
* Reference: https://www.gtin.info/
|
||||
*/
|
||||
import assertString from './util/assertString';
|
||||
/**
|
||||
* Define EAN Lenghts; 8 for EAN-8; 13 for EAN-13; 14 for EAN-14
|
||||
* and Regular Expression for valid EANs (EAN-8, EAN-13, EAN-14),
|
||||
* with exact numberic matching of 8 or 13 or 14 digits [0-9]
|
||||
*/
|
||||
|
||||
var LENGTH_EAN_8 = 8;
|
||||
var LENGTH_EAN_14 = 14;
|
||||
var validEanRegex = /^(\d{8}|\d{13}|\d{14})$/;
|
||||
/**
|
||||
* Get position weight given:
|
||||
* EAN length and digit index/position
|
||||
*
|
||||
* @param {number} length
|
||||
* @param {number} index
|
||||
* @return {number}
|
||||
*/
|
||||
|
||||
function getPositionWeightThroughLengthAndIndex(length, index) {
|
||||
if (length === LENGTH_EAN_8 || length === LENGTH_EAN_14) {
|
||||
return index % 2 === 0 ? 3 : 1;
|
||||
}
|
||||
|
||||
return index % 2 === 0 ? 1 : 3;
|
||||
}
|
||||
/**
|
||||
* Calculate EAN Check Digit
|
||||
* Reference: https://en.wikipedia.org/wiki/International_Article_Number#Calculation_of_checksum_digit
|
||||
*
|
||||
* @param {string} ean
|
||||
* @return {number}
|
||||
*/
|
||||
|
||||
|
||||
function calculateCheckDigit(ean) {
|
||||
var checksum = ean.slice(0, -1).split('').map(function (_char, index) {
|
||||
return Number(_char) * getPositionWeightThroughLengthAndIndex(ean.length, index);
|
||||
}).reduce(function (acc, partialSum) {
|
||||
return acc + partialSum;
|
||||
}, 0);
|
||||
var remainder = 10 - checksum % 10;
|
||||
return remainder < 10 ? remainder : 0;
|
||||
}
|
||||
/**
|
||||
* Check if string is valid EAN:
|
||||
* Matches EAN-8/EAN-13/EAN-14 regex
|
||||
* Has valid check digit.
|
||||
*
|
||||
* @param {string} str
|
||||
* @return {boolean}
|
||||
*/
|
||||
|
||||
|
||||
export default function isEAN(str) {
|
||||
assertString(str);
|
||||
var actualCheckDigit = Number(str.slice(-1));
|
||||
return validEanRegex.test(str) && actualCheckDigit === calculateCheckDigit(str);
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"name": "type-fest",
|
||||
"version": "1.4.0",
|
||||
"description": "A collection of essential TypeScript types",
|
||||
"license": "(MIT OR CC0-1.0)",
|
||||
"repository": "sindresorhus/type-fest",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && tsd && tsc"
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"base.d.ts",
|
||||
"source",
|
||||
"ts41"
|
||||
],
|
||||
"keywords": [
|
||||
"typescript",
|
||||
"ts",
|
||||
"types",
|
||||
"utility",
|
||||
"util",
|
||||
"utilities",
|
||||
"omit",
|
||||
"merge",
|
||||
"json"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@sindresorhus/tsconfig": "~0.7.0",
|
||||
"expect-type": "^0.11.0",
|
||||
"tsd": "^0.14.0",
|
||||
"typescript": "^4.1.3",
|
||||
"xo": "^0.36.1"
|
||||
},
|
||||
"types": "./index.d.ts",
|
||||
"typesVersions": {
|
||||
">=4.1": {
|
||||
"*": [
|
||||
"ts41/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"xo": {
|
||||
"rules": {
|
||||
"@typescript-eslint/ban-types": "off",
|
||||
"@typescript-eslint/indent": "off",
|
||||
"node/no-unsupported-features/es-builtins": "off"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
|
||||
var has = require('has');
|
||||
|
||||
var Type = require('./Type');
|
||||
|
||||
var assertRecord = require('../helpers/assertRecord');
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-8.10.1
|
||||
|
||||
module.exports = function IsAccessorDescriptor(Desc) {
|
||||
if (typeof Desc === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
|
||||
assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
|
||||
|
||||
if (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
// TODO: remove, semver-major
|
||||
|
||||
module.exports = require('get-intrinsic');
|
||||
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(RegExp.prototype, "search", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Returns a `Buffer` instance from the given data URI `uri`.
|
||||
*
|
||||
* @param {String} uri Data URI to turn into a Buffer instance
|
||||
* @return {Buffer} Buffer instance from Data URI
|
||||
* @api public
|
||||
*/
|
||||
/// <reference types="node" />
|
||||
declare function dataUriToBuffer(uri: string): dataUriToBuffer.MimeBuffer;
|
||||
declare namespace dataUriToBuffer {
|
||||
interface MimeBuffer extends Buffer {
|
||||
type: string;
|
||||
typeFull: string;
|
||||
charset: string;
|
||||
}
|
||||
}
|
||||
export = dataUriToBuffer;
|
||||
@@ -0,0 +1,7 @@
|
||||
import { operate } from '../util/lift';
|
||||
import { mergeInternals } from './mergeInternals';
|
||||
export function expand(project, concurrent = Infinity, scheduler) {
|
||||
concurrent = (concurrent || 0) < 1 ? Infinity : concurrent;
|
||||
return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent, undefined, true, scheduler));
|
||||
}
|
||||
//# sourceMappingURL=expand.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"immediateProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/immediateProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC;AAgBnD,MAAM,CAAC,MAAM,iBAAiB,GAAsB;IAGlD,YAAY,CAAC,GAAG,IAAI;QAClB,MAAM,EAAE,QAAQ,EAAE,GAAG,iBAAiB,CAAC;QACvC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,YAAY,KAAI,YAAY,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC3D,CAAC;IACD,cAAc,CAAC,MAAM;QACnB,MAAM,EAAE,QAAQ,EAAE,GAAG,iBAAiB,CAAC;QACvC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,cAAc,KAAI,cAAc,CAAC,CAAC,MAAa,CAAC,CAAC;IACrE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D CC","132":"E F","260":"A B"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"0 1 2 3 4 5 6 7 8 9 tB I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB 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 EC FC","2":"DC"},D:{"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 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:{"1":"I v 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":"HC zB"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e PC QC RC SC qB AC TC rB","2":"F"},G:{"1":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"1":"oC"},I:{"1":"tB I f pC qC rC sC BC tC uC"},J:{"1":"D A"},K:{"1":"A B C h qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"4":"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:"Cross-document messaging"};
|
||||
Reference in New Issue
Block a user