new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var $charAt = callBound('String.prototype.charAt');
|
||||
|
||||
var isString = require('is-string');
|
||||
var isNegativeZero = require('is-negative-zero');
|
||||
var unbox = require('unbox-primitive');
|
||||
|
||||
var CanonicalNumericIndexString = require('./CanonicalNumericIndexString');
|
||||
var IsInteger = require('./IsInteger');
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-stringgetindexproperty
|
||||
|
||||
module.exports = function StringGetIndexProperty(S, P) {
|
||||
if (typeof S === 'string' || !isString(S)) {
|
||||
throw new $TypeError('Assertion failed: `S` must be a boxed String Object');
|
||||
}
|
||||
if (!IsPropertyKey(P)) {
|
||||
throw new $TypeError('Assertion failed: `P` must be a Property Key');
|
||||
}
|
||||
|
||||
if (Type(P) !== 'String') {
|
||||
return void undefined;
|
||||
}
|
||||
|
||||
var index = CanonicalNumericIndexString(P);
|
||||
if (typeof index === 'undefined' || !IsInteger(index) || isNegativeZero(index)) {
|
||||
return void undefined;
|
||||
}
|
||||
|
||||
var str = unbox(S);
|
||||
var len = str.length;
|
||||
if (index < 0 || len <= index) {
|
||||
return void undefined;
|
||||
}
|
||||
|
||||
var resultStr = $charAt(str, index);
|
||||
|
||||
return {
|
||||
'[[Configurable]]': false,
|
||||
'[[Enumerable]]': true,
|
||||
'[[Value]]': resultStr,
|
||||
'[[Writable]]': false
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
module.exports = {
|
||||
'ary': require('../ary'),
|
||||
'assign': require('../_baseAssign'),
|
||||
'clone': require('../clone'),
|
||||
'curry': require('../curry'),
|
||||
'forEach': require('../_arrayEach'),
|
||||
'isArray': require('../isArray'),
|
||||
'isError': require('../isError'),
|
||||
'isFunction': require('../isFunction'),
|
||||
'isWeakMap': require('../isWeakMap'),
|
||||
'iteratee': require('../iteratee'),
|
||||
'keys': require('../_baseKeys'),
|
||||
'rearg': require('../rearg'),
|
||||
'toInteger': require('../toInteger'),
|
||||
'toPath': require('../toPath')
|
||||
};
|
||||
@@ -0,0 +1,118 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var toPrimitive = require('../es5');
|
||||
var is = require('object-is');
|
||||
var forEach = require('foreach');
|
||||
var functionName = require('function.prototype.name');
|
||||
var debug = require('object-inspect');
|
||||
var hasSymbols = require('has-symbols')();
|
||||
|
||||
test('function properties', function (t) {
|
||||
t.equal(toPrimitive.length, 1, 'length is 1');
|
||||
t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive');
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
var primitives = [null, undefined, true, false, 0, -0, 42, NaN, Infinity, -Infinity, '', 'abc'];
|
||||
|
||||
test('primitives', function (t) {
|
||||
forEach(primitives, function (i) {
|
||||
t.ok(is(toPrimitive(i), i), 'toPrimitive(' + debug(i) + ') returns the same value');
|
||||
t.ok(is(toPrimitive(i, String), i), 'toPrimitive(' + debug(i) + ', String) returns the same value');
|
||||
t.ok(is(toPrimitive(i, Number), i), 'toPrimitive(' + debug(i) + ', Number) returns the same value');
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Symbols', { skip: !hasSymbols }, function (t) {
|
||||
var symbols = [
|
||||
Symbol('foo'),
|
||||
Symbol.iterator,
|
||||
Symbol['for']('foo') // eslint-disable-line no-restricted-properties
|
||||
];
|
||||
forEach(symbols, function (sym) {
|
||||
t.equal(toPrimitive(sym), sym, 'toPrimitive(' + debug(sym) + ') returns the same value');
|
||||
t.equal(toPrimitive(sym, String), sym, 'toPrimitive(' + debug(sym) + ', String) returns the same value');
|
||||
t.equal(toPrimitive(sym, Number), sym, 'toPrimitive(' + debug(sym) + ', Number) returns the same value');
|
||||
});
|
||||
|
||||
var primitiveSym = Symbol('primitiveSym');
|
||||
var stringSym = Symbol.prototype.toString.call(primitiveSym);
|
||||
var objectSym = Object(primitiveSym);
|
||||
t.equal(toPrimitive(objectSym), primitiveSym, 'toPrimitive(' + debug(objectSym) + ') returns ' + debug(primitiveSym));
|
||||
|
||||
// This is different from ES2015, as the ES5 algorithm doesn't account for the existence of Symbols:
|
||||
t.equal(toPrimitive(objectSym, String), stringSym, 'toPrimitive(' + debug(objectSym) + ', String) returns ' + debug(stringSym));
|
||||
t.equal(toPrimitive(objectSym, Number), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', Number) returns ' + debug(primitiveSym));
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Arrays', function (t) {
|
||||
var arrays = [[], ['a', 'b'], [1, 2]];
|
||||
forEach(arrays, function (arr) {
|
||||
t.ok(is(toPrimitive(arr), arr.toString()), 'toPrimitive(' + debug(arr) + ') returns toString of the array');
|
||||
t.equal(toPrimitive(arr, String), arr.toString(), 'toPrimitive(' + debug(arr) + ') returns toString of the array');
|
||||
t.ok(is(toPrimitive(arr, Number), arr.toString()), 'toPrimitive(' + debug(arr) + ') returns toString of the array');
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Dates', function (t) {
|
||||
var dates = [new Date(), new Date(0), new Date(NaN)];
|
||||
forEach(dates, function (date) {
|
||||
t.equal(toPrimitive(date), date.toString(), 'toPrimitive(' + debug(date) + ') returns toString of the date');
|
||||
t.equal(toPrimitive(date, String), date.toString(), 'toPrimitive(' + debug(date) + ') returns toString of the date');
|
||||
t.ok(is(toPrimitive(date, Number), date.valueOf()), 'toPrimitive(' + debug(date) + ') returns valueOf of the date');
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
||||
var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } };
|
||||
var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } };
|
||||
var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } };
|
||||
var coercibleFnObject = {
|
||||
valueOf: function () { return function valueOfFn() {}; },
|
||||
toString: function () { return 42; }
|
||||
};
|
||||
var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } };
|
||||
var uncoercibleFnObject = {
|
||||
valueOf: function () { return function valueOfFn() {}; },
|
||||
toString: function () { return function toStrFn() {}; }
|
||||
};
|
||||
|
||||
test('Objects', function (t) {
|
||||
t.equal(toPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject with no hint coerces to valueOf');
|
||||
t.equal(toPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to toString');
|
||||
t.equal(toPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf');
|
||||
|
||||
t.equal(toPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to toString');
|
||||
t.equal(toPrimitive(coercibleFnObject, String), coercibleFnObject.toString(), 'coercibleFnObject with hint String coerces to toString');
|
||||
t.equal(toPrimitive(coercibleFnObject, Number), coercibleFnObject.toString(), 'coercibleFnObject with hint Number coerces to toString');
|
||||
|
||||
t.ok(is(toPrimitive({}), '[object Object]'), '{} with no hint coerces to Object#toString');
|
||||
t.equal(toPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString');
|
||||
t.ok(is(toPrimitive({}, Number), '[object Object]'), '{} with hint Number coerces to Object#toString');
|
||||
|
||||
t.equal(toPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns toString');
|
||||
t.equal(toPrimitive(toStringOnlyObject, String), toStringOnlyObject.toString(), 'toStringOnlyObject with hint String returns toString');
|
||||
t.equal(toPrimitive(toStringOnlyObject, Number), toStringOnlyObject.toString(), 'toStringOnlyObject with hint Number returns toString');
|
||||
|
||||
t.equal(toPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf');
|
||||
t.equal(toPrimitive(valueOfOnlyObject, String), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint String returns valueOf');
|
||||
t.equal(toPrimitive(valueOfOnlyObject, Number), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint Number returns valueOf');
|
||||
|
||||
t.test('exceptions', function (st) {
|
||||
st['throws'](toPrimitive.bind(null, uncoercibleObject), TypeError, 'uncoercibleObject throws a TypeError');
|
||||
st['throws'](toPrimitive.bind(null, uncoercibleObject, String), TypeError, 'uncoercibleObject with hint String throws a TypeError');
|
||||
st['throws'](toPrimitive.bind(null, uncoercibleObject, Number), TypeError, 'uncoercibleObject with hint Number throws a TypeError');
|
||||
|
||||
st['throws'](toPrimitive.bind(null, uncoercibleFnObject), TypeError, 'uncoercibleFnObject throws a TypeError');
|
||||
st['throws'](toPrimitive.bind(null, uncoercibleFnObject, String), TypeError, 'uncoercibleFnObject with hint String throws a TypeError');
|
||||
st['throws'](toPrimitive.bind(null, uncoercibleFnObject, Number), TypeError, 'uncoercibleFnObject with hint Number throws a TypeError');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1,145 @@
|
||||
# reusify
|
||||
|
||||
[![npm version][npm-badge]][npm-url]
|
||||
[![Build Status][travis-badge]][travis-url]
|
||||
[![Coverage Status][coveralls-badge]][coveralls-url]
|
||||
|
||||
Reuse your objects and functions for maximum speed. This technique will
|
||||
make any function run ~10% faster. You call your functions a
|
||||
lot, and it adds up quickly in hot code paths.
|
||||
|
||||
```
|
||||
$ node benchmarks/createNoCodeFunction.js
|
||||
Total time 53133
|
||||
Total iterations 100000000
|
||||
Iteration/s 1882069.5236482036
|
||||
|
||||
$ node benchmarks/reuseNoCodeFunction.js
|
||||
Total time 50617
|
||||
Total iterations 100000000
|
||||
Iteration/s 1975620.838848608
|
||||
```
|
||||
|
||||
The above benchmark uses fibonacci to simulate a real high-cpu load.
|
||||
The actual numbers might differ for your use case, but the difference
|
||||
should not.
|
||||
|
||||
The benchmark was taken using Node v6.10.0.
|
||||
|
||||
This library was extracted from
|
||||
[fastparallel](http://npm.im/fastparallel).
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var reusify = require('reusify')
|
||||
var fib = require('reusify/benchmarks/fib')
|
||||
var instance = reusify(MyObject)
|
||||
|
||||
// get an object from the cache,
|
||||
// or creates a new one when cache is empty
|
||||
var obj = instance.get()
|
||||
|
||||
// set the state
|
||||
obj.num = 100
|
||||
obj.func()
|
||||
|
||||
// reset the state.
|
||||
// if the state contains any external object
|
||||
// do not use delete operator (it is slow)
|
||||
// prefer set them to null
|
||||
obj.num = 0
|
||||
|
||||
// store an object in the cache
|
||||
instance.release(obj)
|
||||
|
||||
function MyObject () {
|
||||
// you need to define this property
|
||||
// so V8 can compile MyObject into an
|
||||
// hidden class
|
||||
this.next = null
|
||||
this.num = 0
|
||||
|
||||
var that = this
|
||||
|
||||
// this function is never reallocated,
|
||||
// so it can be optimized by V8
|
||||
this.func = function () {
|
||||
if (null) {
|
||||
// do nothing
|
||||
} else {
|
||||
// calculates fibonacci
|
||||
fib(that.num)
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The above example was intended for synchronous code, let's see async:
|
||||
```js
|
||||
var reusify = require('reusify')
|
||||
var instance = reusify(MyObject)
|
||||
|
||||
for (var i = 0; i < 100; i++) {
|
||||
getData(i, console.log)
|
||||
}
|
||||
|
||||
function getData (value, cb) {
|
||||
var obj = instance.get()
|
||||
|
||||
obj.value = value
|
||||
obj.cb = cb
|
||||
obj.run()
|
||||
}
|
||||
|
||||
function MyObject () {
|
||||
this.next = null
|
||||
this.value = null
|
||||
|
||||
var that = this
|
||||
|
||||
this.run = function () {
|
||||
asyncOperation(that.value, that.handle)
|
||||
}
|
||||
|
||||
this.handle = function (err, result) {
|
||||
that.cb(err, result)
|
||||
that.value = null
|
||||
that.cb = null
|
||||
instance.release(that)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Also note how in the above examples, the code, that consumes an istance of `MyObject`,
|
||||
reset the state to initial condition, just before storing it in the cache.
|
||||
That's needed so that every subsequent request for an instance from the cache,
|
||||
could get a clean instance.
|
||||
|
||||
## Why
|
||||
|
||||
It is faster because V8 doesn't have to collect all the functions you
|
||||
create. On a short-lived benchmark, it is as fast as creating the
|
||||
nested function, but on a longer time frame it creates less
|
||||
pressure on the garbage collector.
|
||||
|
||||
## Other examples
|
||||
If you want to see some complex example, checkout [middie](https://github.com/fastify/middie) and [steed](https://github.com/mcollina/steed).
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
Thanks to [Trevor Norris](https://github.com/trevnorris) for
|
||||
getting me down the rabbit hole of performance, and thanks to [Mathias
|
||||
Buss](http://github.com/mafintosh) for suggesting me to share this
|
||||
trick.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[npm-badge]: https://badge.fury.io/js/reusify.svg
|
||||
[npm-url]: https://badge.fury.io/js/reusify
|
||||
[travis-badge]: https://api.travis-ci.org/mcollina/reusify.svg
|
||||
[travis-url]: https://travis-ci.org/mcollina/reusify
|
||||
[coveralls-badge]: https://coveralls.io/repos/mcollina/reusify/badge.svg?branch=master&service=github
|
||||
[coveralls-url]: https://coveralls.io/github/mcollina/reusify?branch=master
|
||||
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"name": "defer-to-connect",
|
||||
"version": "2.0.1",
|
||||
"description": "The safe way to handle the `connect` socket event",
|
||||
"main": "dist/source",
|
||||
"files": [
|
||||
"dist/source"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "del-cli dist && tsc",
|
||||
"prepare": "npm run build",
|
||||
"test": "xo && tsc --noEmit && nyc ava",
|
||||
"coveralls": "nyc report --reporter=text-lcov | coveralls"
|
||||
},
|
||||
"keywords": [
|
||||
"socket",
|
||||
"connect",
|
||||
"event"
|
||||
],
|
||||
"author": "Szymon Marczak",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/szmarczak/defer-to-connect.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/szmarczak/defer-to-connect/issues"
|
||||
},
|
||||
"homepage": "https://github.com/szmarczak/defer-to-connect#readme",
|
||||
"xo": {
|
||||
"extends": "xo-typescript",
|
||||
"extensions": [
|
||||
"ts"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ava/typescript": "^1.1.0",
|
||||
"@sindresorhus/tsconfig": "^0.7.0",
|
||||
"@types/node": "^13.5.0",
|
||||
"@typescript-eslint/eslint-plugin": "^2.18.0",
|
||||
"@typescript-eslint/parser": "^2.18.0",
|
||||
"ava": "^3.2.0",
|
||||
"coveralls": "^3.0.9",
|
||||
"create-cert": "^1.0.6",
|
||||
"del-cli": "^3.0.0",
|
||||
"eslint-config-xo-typescript": "^0.24.1",
|
||||
"nyc": "^15.0.0",
|
||||
"p-event": "^4.1.0",
|
||||
"typescript": "^3.7.5",
|
||||
"xo": "^0.25.3"
|
||||
},
|
||||
"nyc": {
|
||||
"include": [
|
||||
"dist/source"
|
||||
],
|
||||
"extension": [
|
||||
".ts"
|
||||
]
|
||||
},
|
||||
"ava": {
|
||||
"typescript": {
|
||||
"rewritePaths": {
|
||||
"tests/": "dist/tests/"
|
||||
}
|
||||
}
|
||||
},
|
||||
"types": "dist/source/index.d.ts"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(Array.prototype, "fill", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function fromPropertyDescriptor(Desc) {
|
||||
if (typeof Desc === 'undefined') {
|
||||
return Desc;
|
||||
}
|
||||
var obj = {};
|
||||
if ('[[Value]]' in Desc) {
|
||||
obj.value = Desc['[[Value]]'];
|
||||
}
|
||||
if ('[[Writable]]' in Desc) {
|
||||
obj.writable = !!Desc['[[Writable]]'];
|
||||
}
|
||||
if ('[[Get]]' in Desc) {
|
||||
obj.get = Desc['[[Get]]'];
|
||||
}
|
||||
if ('[[Set]]' in Desc) {
|
||||
obj.set = Desc['[[Set]]'];
|
||||
}
|
||||
if ('[[Enumerable]]' in Desc) {
|
||||
obj.enumerable = !!Desc['[[Enumerable]]'];
|
||||
}
|
||||
if ('[[Configurable]]' in Desc) {
|
||||
obj.configurable = !!Desc['[[Configurable]]'];
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,49 @@
|
||||
"use strict";
|
||||
|
||||
var assert = require("chai").assert
|
||||
, coerceToInteger = require("../../integer/coerce");
|
||||
|
||||
describe("integer/coerce", function () {
|
||||
it("Should coerce float to integer", function () {
|
||||
assert.equal(coerceToInteger(123.123), 123);
|
||||
assert.equal(coerceToInteger(123.823), 123);
|
||||
assert.equal(coerceToInteger(-123.123), -123);
|
||||
assert.equal(coerceToInteger(-123.823), -123);
|
||||
});
|
||||
it("Should coerce string", function () { assert.equal(coerceToInteger("12.123"), 12); });
|
||||
it("Should coerce booleans", function () { assert.equal(coerceToInteger(true), 1); });
|
||||
it("Should coerce number objects", function () {
|
||||
assert.equal(coerceToInteger(new Number(343)), 343);
|
||||
});
|
||||
it("Should coerce objects", function () {
|
||||
assert.equal(coerceToInteger({ valueOf: function () { return 23; } }), 23);
|
||||
});
|
||||
it("Should coerce number beyond Number.MAX_SAFE_INTEGER", function () {
|
||||
assert.equal(coerceToInteger(9007199254740992), 9007199254740992);
|
||||
});
|
||||
it("Should coerce number beyond Number.MIN_SAFE_INTEGER", function () {
|
||||
assert.equal(coerceToInteger(-9007199254740992), -9007199254740992);
|
||||
});
|
||||
|
||||
it("Should reject infinite number", function () {
|
||||
assert.equal(coerceToInteger(Infinity), null);
|
||||
});
|
||||
it("Should reject NaN", function () { assert.equal(coerceToInteger(NaN), null); });
|
||||
|
||||
if (typeof Object.create === "function") {
|
||||
it("Should not coerce objects with no number representation", function () {
|
||||
assert.equal(coerceToInteger(Object.create(null)), null);
|
||||
});
|
||||
}
|
||||
|
||||
it("Should not coerce null", function () { assert.equal(coerceToInteger(null), null); });
|
||||
it("Should not coerce undefined", function () {
|
||||
assert.equal(coerceToInteger(undefined), null);
|
||||
});
|
||||
|
||||
if (typeof Symbol === "function") {
|
||||
it("Should not coerce symbols", function () {
|
||||
assert.equal(coerceToInteger(Symbol("foo")), null);
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import { concatMap } from './concatMap';
|
||||
import { isFunction } from '../util/isFunction';
|
||||
export function concatMapTo(innerObservable, resultSelector) {
|
||||
return isFunction(resultSelector) ? concatMap(function () { return innerObservable; }, resultSelector) : concatMap(function () { return innerObservable; });
|
||||
}
|
||||
//# sourceMappingURL=concatMapTo.js.map
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"A B","2":"J D E F CC"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"0 1 2 3 4 5 6 7 8 9 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 FC","2":"DC tB EC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 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","2":"I"},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 SC qB AC TC rB","2":"F PC QC RC"},G:{"1":"E WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"zB UC BC VC"},H:{"130":"oC"},I:{"130":"tB I f pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"130":"A B C h qB AC rB"},L:{"132":"H"},M:{"1":"H"},N:{"2":"A B"},O:{"130":"vC"},P:{"130":"I","132":"g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"132":"1B"},R:{"132":"9C"},S:{"1":"BD","2":"AD"}},B:1,C:"Multiple file selection"};
|
||||
@@ -0,0 +1,24 @@
|
||||
import { EmptyError } from './util/EmptyError';
|
||||
import { SafeSubscriber } from './Subscriber';
|
||||
export function firstValueFrom(source, config) {
|
||||
const hasConfig = typeof config === 'object';
|
||||
return new Promise((resolve, reject) => {
|
||||
const subscriber = new SafeSubscriber({
|
||||
next: (value) => {
|
||||
resolve(value);
|
||||
subscriber.unsubscribe();
|
||||
},
|
||||
error: reject,
|
||||
complete: () => {
|
||||
if (hasConfig) {
|
||||
resolve(config.defaultValue);
|
||||
}
|
||||
else {
|
||||
reject(new EmptyError());
|
||||
}
|
||||
},
|
||||
});
|
||||
source.subscribe(subscriber);
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=firstValueFrom.js.map
|
||||
@@ -0,0 +1,106 @@
|
||||
/**
|
||||
* Inquirer.js
|
||||
* A collection of common interactive command line user interfaces.
|
||||
*/
|
||||
|
||||
import { default as List } from './prompts/list.js';
|
||||
import { default as Input } from './prompts/input.js';
|
||||
import { default as Number } from './prompts/number.js';
|
||||
import { default as Confirm } from './prompts/confirm.js';
|
||||
import { default as RawList } from './prompts/rawlist.js';
|
||||
import { default as Expand } from './prompts/expand.js';
|
||||
import { default as Checkbox } from './prompts/checkbox.js';
|
||||
import { default as Password } from './prompts/password.js';
|
||||
import { default as Editor } from './prompts/editor.js';
|
||||
|
||||
import { default as BottomBar } from './ui/bottom-bar.js';
|
||||
import { default as Prompt } from './ui/prompt.js';
|
||||
|
||||
import { default as Separator } from './objects/separator.js';
|
||||
|
||||
/**
|
||||
* Create a new self-contained prompt module.
|
||||
*/
|
||||
export function createPromptModule(opt) {
|
||||
const promptModule = function (questions, answers) {
|
||||
let uiInstance;
|
||||
try {
|
||||
uiInstance = new Prompt(promptModule.prompts, opt);
|
||||
} catch (error) {
|
||||
return Promise.reject(error);
|
||||
}
|
||||
const promise = uiInstance.run(questions, answers);
|
||||
|
||||
// Monkey patch the UI on the promise object so
|
||||
// that it remains publicly accessible.
|
||||
promise.ui = uiInstance;
|
||||
|
||||
return promise;
|
||||
};
|
||||
|
||||
promptModule.prompts = {};
|
||||
|
||||
/**
|
||||
* Register a prompt type
|
||||
* @param {String} name Prompt type name
|
||||
* @param {Function} prompt Prompt constructor
|
||||
* @return {inquirer}
|
||||
*/
|
||||
|
||||
promptModule.registerPrompt = function (name, prompt) {
|
||||
promptModule.prompts[name] = prompt;
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Register the defaults provider prompts
|
||||
*/
|
||||
|
||||
promptModule.restoreDefaultPrompts = function () {
|
||||
this.registerPrompt('list', List);
|
||||
this.registerPrompt('input', Input);
|
||||
this.registerPrompt('number', Number);
|
||||
this.registerPrompt('confirm', Confirm);
|
||||
this.registerPrompt('rawlist', RawList);
|
||||
this.registerPrompt('expand', Expand);
|
||||
this.registerPrompt('checkbox', Checkbox);
|
||||
this.registerPrompt('password', Password);
|
||||
this.registerPrompt('editor', Editor);
|
||||
};
|
||||
|
||||
promptModule.restoreDefaultPrompts();
|
||||
|
||||
return promptModule;
|
||||
}
|
||||
|
||||
/**
|
||||
* Public CLI helper interface
|
||||
* @param {Array|Object|Rx.Observable} questions - Questions settings array
|
||||
* @param {Function} cb - Callback being passed the user answers
|
||||
* @return {ui.Prompt}
|
||||
*/
|
||||
|
||||
const prompt = createPromptModule();
|
||||
|
||||
// Expose helper functions on the top level for easiest usage by common users
|
||||
function registerPrompt(name, newPrompt) {
|
||||
prompt.registerPrompt(name, newPrompt);
|
||||
}
|
||||
|
||||
function restoreDefaultPrompts() {
|
||||
prompt.restoreDefaultPrompts();
|
||||
}
|
||||
|
||||
const inquirer = {
|
||||
prompt,
|
||||
ui: {
|
||||
BottomBar,
|
||||
Prompt,
|
||||
},
|
||||
createPromptModule,
|
||||
registerPrompt,
|
||||
restoreDefaultPrompts,
|
||||
Separator,
|
||||
};
|
||||
|
||||
export default inquirer;
|
||||
@@ -0,0 +1,14 @@
|
||||
var baseForOwn = require('./_baseForOwn'),
|
||||
createBaseEach = require('./_createBaseEach');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.forEach` without support for iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array|Object} collection The collection to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Array|Object} Returns `collection`.
|
||||
*/
|
||||
var baseEach = createBaseEach(baseForOwn);
|
||||
|
||||
module.exports = baseEach;
|
||||
@@ -0,0 +1,4 @@
|
||||
export type RunnerOrganizationWrongTypeError = {
|
||||
name: string;
|
||||
message: string;
|
||||
};
|
||||
@@ -0,0 +1,70 @@
|
||||
# which-typed-array <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
||||
|
||||
[![github actions][actions-image]][actions-url]
|
||||
[![coverage][codecov-image]][codecov-url]
|
||||
[![dependency status][deps-svg]][deps-url]
|
||||
[![dev dependency status][dev-deps-svg]][dev-deps-url]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][npm-badge-png]][package-url]
|
||||
|
||||
Which kind of Typed Array is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag.
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var whichTypedArray = require('which-typed-array');
|
||||
var assert = require('assert');
|
||||
|
||||
assert.equal(false, whichTypedArray(undefined));
|
||||
assert.equal(false, whichTypedArray(null));
|
||||
assert.equal(false, whichTypedArray(false));
|
||||
assert.equal(false, whichTypedArray(true));
|
||||
assert.equal(false, whichTypedArray([]));
|
||||
assert.equal(false, whichTypedArray({}));
|
||||
assert.equal(false, whichTypedArray(/a/g));
|
||||
assert.equal(false, whichTypedArray(new RegExp('a', 'g')));
|
||||
assert.equal(false, whichTypedArray(new Date()));
|
||||
assert.equal(false, whichTypedArray(42));
|
||||
assert.equal(false, whichTypedArray(NaN));
|
||||
assert.equal(false, whichTypedArray(Infinity));
|
||||
assert.equal(false, whichTypedArray(new Number(42)));
|
||||
assert.equal(false, whichTypedArray('foo'));
|
||||
assert.equal(false, whichTypedArray(Object('foo')));
|
||||
assert.equal(false, whichTypedArray(function () {}));
|
||||
assert.equal(false, whichTypedArray(function* () {}));
|
||||
assert.equal(false, whichTypedArray(x => x * x));
|
||||
assert.equal(false, whichTypedArray([]));
|
||||
|
||||
assert.equal('Int8Array', whichTypedArray(new Int8Array()));
|
||||
assert.equal('Uint8Array', whichTypedArray(new Uint8Array()));
|
||||
assert.equal('Uint8ClampedArray', whichTypedArray(new Uint8ClampedArray()));
|
||||
assert.equal('Int16Array', whichTypedArray(new Int16Array()));
|
||||
assert.equal('Uint16Array', whichTypedArray(new Uint16Array()));
|
||||
assert.equal('Int32Array', whichTypedArray(new Int32Array()));
|
||||
assert.equal('Uint32Array', whichTypedArray(new Uint32Array()));
|
||||
assert.equal('Float32Array', whichTypedArray(new Float32Array()));
|
||||
assert.equal('Float64Array', whichTypedArray(new Float64Array()));
|
||||
assert.equal('BigInt64Array', whichTypedArray(new BigInt64Array()));
|
||||
assert.equal('BigUint64Array', whichTypedArray(new BigUint64Array()));
|
||||
```
|
||||
|
||||
## Tests
|
||||
Simply clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
[package-url]: https://npmjs.org/package/which-typed-array
|
||||
[npm-version-svg]: https://versionbadg.es/inspect-js/which-typed-array.svg
|
||||
[deps-svg]: https://david-dm.org/inspect-js/which-typed-array.svg
|
||||
[deps-url]: https://david-dm.org/inspect-js/which-typed-array
|
||||
[dev-deps-svg]: https://david-dm.org/inspect-js/which-typed-array/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/inspect-js/which-typed-array#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/which-typed-array.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/which-typed-array.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/which-typed-array.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=which-typed-array
|
||||
[codecov-image]: https://codecov.io/gh/inspect-js/which-typed-array/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/inspect-js/which-typed-array/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/which-typed-array
|
||||
[actions-url]: https://github.com/inspect-js/which-typed-array/actions
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"globrex","version":"0.1.2","files":{"license":{"checkedAt":1678883668792,"integrity":"sha512-0y0FZw1t32uFvTh5h0IBAEbxr+otb7ic29DW3BW4BGv3aF7Kcn7jIZ2/0C1+VYXO46HABlriOpgTOAhJCqShpg==","mode":420,"size":1079},"package.json":{"checkedAt":1678883673235,"integrity":"sha512-Rz8PR/L+XXGwwmBN7+0aYVE4O2IV9J5cnpX0GzObOj+UNjTuzueaIh9lisTjZZ1kKwh6n53EK+TL9ly5RSmddQ==","mode":420,"size":561},"index.js":{"checkedAt":1678883673235,"integrity":"sha512-6CleWyWSpo2icoS/Ul9kl8Ew46xOb6LfFyoqCLHfCRpvlb7u5qiqAj9T6CFHygpAje+UfpX9skGf+F/CINORlA==","mode":420,"size":7901},"readme.md":{"checkedAt":1678883673238,"integrity":"sha512-eZQ4FF6/wKpAV74w/TwdaeqTLu59TtuKceD3TvM2x9Eb5aliNEl+sMV2PgsMvg2aAS189Fe+jCVckLAvTP1yVA==","mode":420,"size":4623}}}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { objectKeys } from '../typings/common-types.js';
|
||||
export function objFilter(original = {}, filter = () => true) {
|
||||
const obj = {};
|
||||
objectKeys(original).forEach(key => {
|
||||
if (filter(key, original[key])) {
|
||||
obj[key] = original[key];
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
export default class CSVError extends Error {
|
||||
static column_mismatched(index: number, extra?: string) {
|
||||
return new CSVError("column_mismatched", index, extra);
|
||||
}
|
||||
static unclosed_quote(index: number, extra?: string) {
|
||||
return new CSVError("unclosed_quote", index, extra);
|
||||
}
|
||||
static fromJSON(obj) {
|
||||
return new CSVError(obj.err, obj.line, obj.extra);
|
||||
}
|
||||
constructor(
|
||||
public err: string,
|
||||
public line: number,
|
||||
public extra?: string
|
||||
) {
|
||||
super("Error: " + err + ". JSON Line number: " + line + (extra ? " near: " + extra : ""));
|
||||
this.name = "CSV Parse Error";
|
||||
}
|
||||
toJSON() {
|
||||
return {
|
||||
err: this.err,
|
||||
line: this.line,
|
||||
extra: this.extra
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./async').eachOfSeries;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"skipLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipLast.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4ChE,MAAM,UAAU,QAAQ,CAAI,SAAiB;IAC3C,OAAO,SAAS,IAAI,CAAC;QACnB,CAAC;YACC,QAAQ;QACV,CAAC,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YAIzB,IAAI,IAAI,GAAQ,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC;YAGrC,IAAI,IAAI,GAAG,CAAC,CAAC;YACb,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;gBAKzC,IAAM,UAAU,GAAG,IAAI,EAAE,CAAC;gBAC1B,IAAI,UAAU,GAAG,SAAS,EAAE;oBAI1B,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC;iBAC1B;qBAAM;oBAIL,IAAM,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;oBAGrC,IAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;oBAC7B,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;oBAKpB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;iBAC3B;YACH,CAAC,CAAC,CACH,CAAC;YAEF,OAAO;gBAEL,IAAI,GAAG,IAAK,CAAC;YACf,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC"}
|
||||
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"name": "define-properties",
|
||||
"version": "1.2.0",
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"description": "Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines.",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"pretest": "npm run lint",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "aud --production",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"lint": "eslint --ext=js,mjs .",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/ljharb/define-properties.git"
|
||||
},
|
||||
"keywords": [
|
||||
"Object.defineProperty",
|
||||
"Object.defineProperties",
|
||||
"object",
|
||||
"property descriptor",
|
||||
"descriptor",
|
||||
"define",
|
||||
"ES5"
|
||||
],
|
||||
"dependencies": {
|
||||
"has-property-descriptors": "^1.0.0",
|
||||
"object-keys": "^1.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^21.0.1",
|
||||
"aud": "^2.0.2",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"eslint": "=8.8.0",
|
||||
"in-publish": "^2.0.1",
|
||||
"npmignore": "^0.3.0",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.6.3"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/index.js",
|
||||
"browsers": [
|
||||
"iexplore/6.0..latest",
|
||||
"firefox/3.0..6.0",
|
||||
"firefox/15.0..latest",
|
||||
"firefox/nightly",
|
||||
"chrome/4.0..10.0",
|
||||
"chrome/20.0..latest",
|
||||
"chrome/canary",
|
||||
"opera/10.0..latest",
|
||||
"opera/next",
|
||||
"safari/4.0..latest",
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest",
|
||||
"android-browser/4.2"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true,
|
||||
"startingVersion": "1.1.5"
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows",
|
||||
"test/"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"id-length": [1],
|
||||
"operator-linebreak": [2, "before"],
|
||||
},
|
||||
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["test/**/*.js"],
|
||||
"globals": {
|
||||
"Proxy": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $BigInt = GetIntrinsic('%BigInt%', true);
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var Type = require('../Type');
|
||||
|
||||
var zero = $BigInt && $BigInt(0);
|
||||
|
||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unaryMinus
|
||||
|
||||
module.exports = function BigIntUnaryMinus(x) {
|
||||
if (Type(x) !== 'BigInt') {
|
||||
throw new $TypeError('Assertion failed: `x` argument must be a BigInt');
|
||||
}
|
||||
|
||||
if (x === zero) {
|
||||
return zero;
|
||||
}
|
||||
|
||||
return -x;
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
var baseSlice = require('./_baseSlice'),
|
||||
toInteger = require('./toInteger');
|
||||
|
||||
/**
|
||||
* Creates a slice of `array` with `n` elements dropped from the end.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 3.0.0
|
||||
* @category Array
|
||||
* @param {Array} array The array to query.
|
||||
* @param {number} [n=1] The number of elements to drop.
|
||||
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
||||
* @returns {Array} Returns the slice of `array`.
|
||||
* @example
|
||||
*
|
||||
* _.dropRight([1, 2, 3]);
|
||||
* // => [1, 2]
|
||||
*
|
||||
* _.dropRight([1, 2, 3], 2);
|
||||
* // => [1]
|
||||
*
|
||||
* _.dropRight([1, 2, 3], 5);
|
||||
* // => []
|
||||
*
|
||||
* _.dropRight([1, 2, 3], 0);
|
||||
* // => [1, 2, 3]
|
||||
*/
|
||||
function dropRight(array, n, guard) {
|
||||
var length = array == null ? 0 : array.length;
|
||||
if (!length) {
|
||||
return [];
|
||||
}
|
||||
n = (guard || n === undefined) ? 1 : toInteger(n);
|
||||
n = length - n;
|
||||
return baseSlice(array, 0, n < 0 ? 0 : n);
|
||||
}
|
||||
|
||||
module.exports = dropRight;
|
||||
@@ -0,0 +1 @@
|
||||
export function isPlainObject(o: any): boolean;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Parameters.js","sourceRoot":"","sources":["../src/Parameters.ts"],"names":[],"mappings":";;AAiGA,qBAA4B,MAA+B;IACzD,IAAM,YAAY,GAAkB;QAClC,SAAS,EAAE,GAAG;QACd,aAAa,EAAE,SAAS;QACxB,cAAc,EAAE,SAAS;QACzB,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,KAAK;QAClB,eAAe;QACf,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,KAAK;QACf,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,KAAK;QAClB,MAAM,EAAE,GAAG;QACX,SAAS,EAAE,EAAE;QACb,GAAG,EAAE,SAAS;QACd,gBAAgB,EAAE,KAAK;QACvB,MAAM,EAAE,MAAM;QACd,UAAU,EAAE,KAAK;QACjB,gBAAgB,EAAC,MAAM;QACvB,WAAW,EAAC,IAAI;KACjB,CAAA;IACD,IAAI,CAAC,MAAM,EAAE;QACX,MAAM,GAAG,EAAE,CAAC;KACb;IACD,KAAK,IAAI,GAAG,IAAI,MAAM,EAAE;QACtB,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC9B,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE;gBAC9B,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;aAC5C;iBAAM;gBACL,YAAY,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;aACjC;SACF;KACF;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AArCD,kCAqCC"}
|
||||
@@ -0,0 +1,5 @@
|
||||
const { isArray } = Array;
|
||||
export function argsOrArgArray(args) {
|
||||
return args.length === 1 && isArray(args[0]) ? args[0] : args;
|
||||
}
|
||||
//# sourceMappingURL=argsOrArgArray.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,54 @@
|
||||
let flexSpec = require('./flex-spec')
|
||||
let Declaration = require('../declaration')
|
||||
|
||||
class JustifyContent extends Declaration {
|
||||
/**
|
||||
* Change property name for 2009 and 2012 specs
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
let spec
|
||||
;[spec, prefix] = flexSpec(prefix)
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-pack'
|
||||
}
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-pack'
|
||||
}
|
||||
return super.prefixed(prop, prefix)
|
||||
}
|
||||
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
normalize() {
|
||||
return 'justify-content'
|
||||
}
|
||||
|
||||
/**
|
||||
* Change value for 2009 and 2012 specs
|
||||
*/
|
||||
set(decl, prefix) {
|
||||
let spec = flexSpec(prefix)[0]
|
||||
if (spec === 2009 || spec === 2012) {
|
||||
let value = JustifyContent.oldValues[decl.value] || decl.value
|
||||
decl.value = value
|
||||
if (spec !== 2009 || value !== 'distribute') {
|
||||
return super.set(decl, prefix)
|
||||
}
|
||||
} else if (spec === 'final') {
|
||||
return super.set(decl, prefix)
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
JustifyContent.names = ['justify-content', 'flex-pack', 'box-pack']
|
||||
|
||||
JustifyContent.oldValues = {
|
||||
'flex-end': 'end',
|
||||
'flex-start': 'start',
|
||||
'space-between': 'justify',
|
||||
'space-around': 'distribute'
|
||||
}
|
||||
|
||||
module.exports = JustifyContent
|
||||
@@ -0,0 +1,105 @@
|
||||
import assert from './_assert.js';
|
||||
import { Hash, toBytes, u32 } from './utils.js';
|
||||
// prettier-ignore
|
||||
export const SIGMA = new Uint8Array([
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3,
|
||||
11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4,
|
||||
7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8,
|
||||
9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13,
|
||||
2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9,
|
||||
12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11,
|
||||
13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10,
|
||||
6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5,
|
||||
10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0,
|
||||
// For BLAKE2b, the two extra permutations for rounds 10 and 11 are SIGMA[10..11] = SIGMA[0..1].
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3,
|
||||
]);
|
||||
export class BLAKE2 extends Hash {
|
||||
constructor(blockLen, outputLen, opts = {}, keyLen, saltLen, persLen) {
|
||||
super();
|
||||
this.blockLen = blockLen;
|
||||
this.outputLen = outputLen;
|
||||
this.length = 0;
|
||||
this.pos = 0;
|
||||
this.finished = false;
|
||||
this.destroyed = false;
|
||||
assert.number(blockLen);
|
||||
assert.number(outputLen);
|
||||
assert.number(keyLen);
|
||||
if (outputLen < 0 || outputLen > keyLen)
|
||||
throw new Error('Blake2: outputLen bigger than keyLen');
|
||||
if (opts.key !== undefined && (opts.key.length < 1 || opts.key.length > keyLen))
|
||||
throw new Error(`Key should be up 1..${keyLen} byte long or undefined`);
|
||||
if (opts.salt !== undefined && opts.salt.length !== saltLen)
|
||||
throw new Error(`Salt should be ${saltLen} byte long or undefined`);
|
||||
if (opts.personalization !== undefined && opts.personalization.length !== persLen)
|
||||
throw new Error(`Personalization should be ${persLen} byte long or undefined`);
|
||||
this.buffer32 = u32((this.buffer = new Uint8Array(blockLen)));
|
||||
}
|
||||
update(data) {
|
||||
assert.exists(this);
|
||||
// Main difference with other hashes: there is flag for last block,
|
||||
// so we cannot process current block before we know that there
|
||||
// is the next one. This significantly complicates logic and reduces ability
|
||||
// to do zero-copy processing
|
||||
const { blockLen, buffer, buffer32 } = this;
|
||||
data = toBytes(data);
|
||||
const len = data.length;
|
||||
for (let pos = 0; pos < len;) {
|
||||
// If buffer is full and we still have input (don't process last block, same as blake2s)
|
||||
if (this.pos === blockLen) {
|
||||
this.compress(buffer32, 0, false);
|
||||
this.pos = 0;
|
||||
}
|
||||
const take = Math.min(blockLen - this.pos, len - pos);
|
||||
const dataOffset = data.byteOffset + pos;
|
||||
// full block && aligned to 4 bytes && not last in input
|
||||
if (take === blockLen && !(dataOffset % 4) && pos + take < len) {
|
||||
const data32 = new Uint32Array(data.buffer, dataOffset, Math.floor((len - pos) / 4));
|
||||
for (let pos32 = 0; pos + blockLen < len; pos32 += buffer32.length, pos += blockLen) {
|
||||
this.length += blockLen;
|
||||
this.compress(data32, pos32, false);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
buffer.set(data.subarray(pos, pos + take), this.pos);
|
||||
this.pos += take;
|
||||
this.length += take;
|
||||
pos += take;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
digestInto(out) {
|
||||
assert.exists(this);
|
||||
assert.output(out, this);
|
||||
const { pos, buffer32 } = this;
|
||||
this.finished = true;
|
||||
// Padding
|
||||
this.buffer.subarray(pos).fill(0);
|
||||
this.compress(buffer32, 0, true);
|
||||
const out32 = u32(out);
|
||||
this.get().forEach((v, i) => (out32[i] = v));
|
||||
}
|
||||
digest() {
|
||||
const { buffer, outputLen } = this;
|
||||
this.digestInto(buffer);
|
||||
const res = buffer.slice(0, outputLen);
|
||||
this.destroy();
|
||||
return res;
|
||||
}
|
||||
_cloneInto(to) {
|
||||
const { buffer, length, finished, destroyed, outputLen, pos } = this;
|
||||
to || (to = new this.constructor({ dkLen: outputLen }));
|
||||
to.set(...this.get());
|
||||
to.length = length;
|
||||
to.finished = finished;
|
||||
to.destroyed = destroyed;
|
||||
to.outputLen = outputLen;
|
||||
to.buffer.set(buffer);
|
||||
to.pos = pos;
|
||||
return to;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=_blake2.js.map
|
||||
@@ -0,0 +1,47 @@
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import { createProcessor } from './plugin'
|
||||
|
||||
export async function build(args, configs) {
|
||||
let input = args['--input']
|
||||
let shouldWatch = args['--watch']
|
||||
|
||||
// TODO: Deprecate this in future versions
|
||||
if (!input && args['_'][1]) {
|
||||
console.error('[deprecation] Running tailwindcss without -i, please provide an input file.')
|
||||
input = args['--input'] = args['_'][1]
|
||||
}
|
||||
|
||||
if (input && input !== '-' && !fs.existsSync((input = path.resolve(input)))) {
|
||||
console.error(`Specified input file ${args['--input']} does not exist.`)
|
||||
process.exit(9)
|
||||
}
|
||||
|
||||
if (args['--config'] && !fs.existsSync((args['--config'] = path.resolve(args['--config'])))) {
|
||||
console.error(`Specified config file ${args['--config']} does not exist.`)
|
||||
process.exit(9)
|
||||
}
|
||||
|
||||
// TODO: Reference the @config path here if exists
|
||||
let configPath = args['--config']
|
||||
? args['--config']
|
||||
: ((defaultPath) => (fs.existsSync(defaultPath) ? defaultPath : null))(
|
||||
path.resolve(`./${configs.tailwind}`)
|
||||
)
|
||||
|
||||
let processor = await createProcessor(args, configPath)
|
||||
|
||||
if (shouldWatch) {
|
||||
// Abort the watcher if stdin is closed to avoid zombie processes
|
||||
// You can disable this behavior with --watch=always
|
||||
if (args['--watch'] !== 'always') {
|
||||
process.stdin.on('end', () => process.exit(0))
|
||||
}
|
||||
|
||||
process.stdin.resume()
|
||||
|
||||
await processor.watch()
|
||||
} else {
|
||||
await processor.build()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"rollup","version":"2.79.1","files":{"dist/bin/rollup":{"checkedAt":1678883670095,"integrity":"sha512-jNovpHAi0tqKDn5nDZ5uuZDM0JBk8UWNNMXQF++uvGI7+b/D5cXZPmKtv6MIL9LQYtHc6IU9aIogIpJ+yiLobw==","mode":493,"size":73575},"dist/shared/index.js":{"checkedAt":1678883670099,"integrity":"sha512-m0KI1XjC354ANXu2nwTq/v8cjupB6dj7ca00M4omd6nay3kzRfnAL/PadiV/6Jj1BbSTeJyoExGrUvuX+NAzlg==","mode":420,"size":121328},"dist/loadConfigFile.js":{"checkedAt":1678883670099,"integrity":"sha512-BFqii0fYnZYAGdK3nROJqmef0Nvzbvn6S9WQI6w0/IPIbseh/nerrQlwFE/y88718GWXFw5JR9ha7W1YKyb2ug==","mode":420,"size":584},"dist/shared/loadConfigFile.js":{"checkedAt":1678883670100,"integrity":"sha512-K12NjiZEsKTfVe0fZysFzpK5FPw+HvHcT9MIBUOVEXZq6k9HFQfs+5MABFc8Tk5Vobt/pq4+AlR3sZydtK+k7A==","mode":420,"size":24774},"dist/shared/mergeOptions.js":{"checkedAt":1678883670100,"integrity":"sha512-eqknZo0gdo6sjHaPnLU+T1YztRwzuBEa4QqzNzBJeXjQ7vyw+hLkQ+RehYBfOJBAV7xLcTasGZdP6wotBdaBqg==","mode":420,"size":8288},"dist/es/rollup.browser.js":{"checkedAt":1678883670105,"integrity":"sha512-v7dSeV+o5fe8HSnGUo0eFtmi6FxUVKk5V25Pqw7oaD4tJyWva7aeoWjR1MOfMc+KPUIsgwWKu3Az2fo8mF0wsQ==","mode":420,"size":397215},"dist/rollup.browser.js":{"checkedAt":1678883670114,"integrity":"sha512-a8ApbIKZOpwbnH9psLUy+JMT0tFwsrRapOQ0ktPsV9F6wtXVtrWNz73DVs3kmJq3Q2+CoI4/Wk4KMofJHxVkdQ==","mode":420,"size":396561},"dist/es/rollup.js":{"checkedAt":1678883670114,"integrity":"sha512-JGH/0obFuTL9TgIOAKcSze29wv2FGDKR9Hn8QVNFB+0trWxYT8rG22kpWvY07u+qyPbBfwNGX/00c+zYJ8xkBQ==","mode":420,"size":373},"dist/es/shared/rollup.js":{"checkedAt":1678883670134,"integrity":"sha512-zAKdzi70T1T+oAM2Wi3WNcBbcWXgZoYCQiSACaMBSYv1c/L55yw03PLStSZBlH4N57ExRPcTQfohqZmIaAUSqQ==","mode":420,"size":893852},"dist/rollup.js":{"checkedAt":1678883670134,"integrity":"sha512-NRIedsp2/tpc/JYP3MaVBmJUSrF8hjNL/MeBEp5uPWGxJDpPbMiCcBGLhcoqTbPP7giAsGw+4GA8RpYP1W7gpQ==","mode":420,"size":649},"dist/shared/rollup.js":{"checkedAt":1678883670158,"integrity":"sha512-HGmC4RUovqbzanS1+M7V2BWazAJiy3ljE9BL1Lm6ceLdT+WzOAyOdGGwBd//luSqwNncKxTrCtJXbzeMG9oKRA==","mode":420,"size":895615},"dist/shared/watch-cli.js":{"checkedAt":1678883670158,"integrity":"sha512-91Gq8mPCAeW6QSoIdNJ6U0ttBqWvVUXkARZ2ztTWQvEkA7LHAa/GSJ/TuBrJLMwHHxV7yvpOtO/uWXU2qGoU4g==","mode":420,"size":15954},"dist/es/shared/watch.js":{"checkedAt":1678883670161,"integrity":"sha512-LZpL68IOkUWLcNELxCmybEp2yEhZmpj6LN8t9MSfdEmNNyg9GLqdHg46UOqLPSikl5KumvxrHLQJS94Wd7iGNw==","mode":420,"size":138423},"dist/shared/watch.js":{"checkedAt":1678883670161,"integrity":"sha512-fwqDvXZji6iPnAi9fcs6GTeD2oUEZn3oZ9e4bx4/zqzeMsHvAuwSnomN0ePVCXrTHkQ4tcjNhygfy0PWCGY6fw==","mode":420,"size":10072},"dist/es/package.json":{"checkedAt":1678883668641,"integrity":"sha512-Cj8csVIsbnWVGGqaVO0HP/pZCybH0xsId/Gckl+EcDfp+XIGa/7WJgmxkOsrwh/3sxUU4Iw95keA/vWYLLsh8g==","mode":420,"size":17},"package.json":{"checkedAt":1678883670161,"integrity":"sha512-QmokEpW65Iz1gpbf7yI2ZAYydv0DjwPgIr3zQbfinioAvINmKpYYZ1iDc6l3k2+T1rpTF9h066bGWdOFFHdHIQ==","mode":420,"size":5513},"dist/rollup.browser.js.map":{"checkedAt":1678883670184,"integrity":"sha512-O5IcWNAiETOoDtT2DVvPSzygSgI1DbT/heSDEW8VdSpCVun7BRuIi5S9AkRtGmb01zFomRIb6Ofaml6j/ZGiGw==","mode":420,"size":3397336},"CHANGELOG.md":{"checkedAt":1678883670185,"integrity":"sha512-5DtwtuqQ7phlNkoWP1TtEWXl3VC0X7y7L6S1mHR70sGKpQN7qq8YzreuHcXXZICMAvmeiS1q1jQ7S4bBkIvSeA==","mode":420,"size":250647},"LICENSE.md":{"checkedAt":1678883670186,"integrity":"sha512-08h/CA7KC04IxO5XTZ5S6tdbm+imqMVTwlLeo/Mjwd6DEzULrxVyUhVvjpOq0B01pGSXlp+Mjl0glx8J3PGcjQ==","mode":420,"size":35412},"README.md":{"checkedAt":1678883670186,"integrity":"sha512-GFwIdFeLujxexhjX6Sgm0Ycf+7czpaqY6IfyoJiymEy/MdL58SKAOFc3BgfznVBVYlWH07nSFQWPXvyvn94Brg==","mode":420,"size":8695},"dist/rollup.d.ts":{"checkedAt":1678883670186,"integrity":"sha512-+kyBF0nI/roOXRORcquo6jLagX1dNRI7XObdSgN/UaxKCf0Ckt1BnuawgThQGvob4mCO3EzcIb1jTeRyuOTNFQ==","mode":420,"size":27268}}}
|
||||
@@ -0,0 +1,48 @@
|
||||
// just pre-load all the stuff that index.js lazily exports
|
||||
const internalRe = require('./internal/re')
|
||||
module.exports = {
|
||||
re: internalRe.re,
|
||||
src: internalRe.src,
|
||||
tokens: internalRe.t,
|
||||
SEMVER_SPEC_VERSION: require('./internal/constants').SEMVER_SPEC_VERSION,
|
||||
SemVer: require('./classes/semver'),
|
||||
compareIdentifiers: require('./internal/identifiers').compareIdentifiers,
|
||||
rcompareIdentifiers: require('./internal/identifiers').rcompareIdentifiers,
|
||||
parse: require('./functions/parse'),
|
||||
valid: require('./functions/valid'),
|
||||
clean: require('./functions/clean'),
|
||||
inc: require('./functions/inc'),
|
||||
diff: require('./functions/diff'),
|
||||
major: require('./functions/major'),
|
||||
minor: require('./functions/minor'),
|
||||
patch: require('./functions/patch'),
|
||||
prerelease: require('./functions/prerelease'),
|
||||
compare: require('./functions/compare'),
|
||||
rcompare: require('./functions/rcompare'),
|
||||
compareLoose: require('./functions/compare-loose'),
|
||||
compareBuild: require('./functions/compare-build'),
|
||||
sort: require('./functions/sort'),
|
||||
rsort: require('./functions/rsort'),
|
||||
gt: require('./functions/gt'),
|
||||
lt: require('./functions/lt'),
|
||||
eq: require('./functions/eq'),
|
||||
neq: require('./functions/neq'),
|
||||
gte: require('./functions/gte'),
|
||||
lte: require('./functions/lte'),
|
||||
cmp: require('./functions/cmp'),
|
||||
coerce: require('./functions/coerce'),
|
||||
Comparator: require('./classes/comparator'),
|
||||
Range: require('./classes/range'),
|
||||
satisfies: require('./functions/satisfies'),
|
||||
toComparators: require('./ranges/to-comparators'),
|
||||
maxSatisfying: require('./ranges/max-satisfying'),
|
||||
minSatisfying: require('./ranges/min-satisfying'),
|
||||
minVersion: require('./ranges/min-version'),
|
||||
validRange: require('./ranges/valid'),
|
||||
outside: require('./ranges/outside'),
|
||||
gtr: require('./ranges/gtr'),
|
||||
ltr: require('./ranges/ltr'),
|
||||
intersects: require('./ranges/intersects'),
|
||||
simplifyRange: require('./ranges/simplify'),
|
||||
subset: require('./ranges/subset'),
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "http-errors",
|
||||
"description": "Create HTTP error objects",
|
||||
"version": "2.0.0",
|
||||
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",
|
||||
"contributors": [
|
||||
"Alan Plum <me@pluma.io>",
|
||||
"Douglas Christopher Wilson <doug@somethingdoug.com>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"repository": "jshttp/http-errors",
|
||||
"dependencies": {
|
||||
"depd": "2.0.0",
|
||||
"inherits": "2.0.4",
|
||||
"setprototypeof": "1.2.0",
|
||||
"statuses": "2.0.1",
|
||||
"toidentifier": "1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-standard": "14.1.1",
|
||||
"eslint-plugin-import": "2.25.3",
|
||||
"eslint-plugin-markdown": "2.2.1",
|
||||
"eslint-plugin-node": "11.1.0",
|
||||
"eslint-plugin-promise": "5.2.0",
|
||||
"eslint-plugin-standard": "4.1.0",
|
||||
"mocha": "9.1.3",
|
||||
"nyc": "15.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint . && node ./scripts/lint-readme-list.js",
|
||||
"test": "mocha --reporter spec --bail",
|
||||
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
||||
"test-cov": "nyc --reporter=html --reporter=text npm test",
|
||||
"version": "node scripts/version-history.js && git add HISTORY.md"
|
||||
},
|
||||
"keywords": [
|
||||
"http",
|
||||
"error"
|
||||
],
|
||||
"files": [
|
||||
"index.js",
|
||||
"HISTORY.md",
|
||||
"LICENSE",
|
||||
"README.md"
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,36 @@
|
||||
'use strict';
|
||||
|
||||
var implementation = require('./implementation');
|
||||
|
||||
var supportsDescriptors = require('define-properties').supportsDescriptors;
|
||||
var $gOPD = Object.getOwnPropertyDescriptor;
|
||||
|
||||
module.exports = function getPolyfill() {
|
||||
if (supportsDescriptors && (/a/mig).flags === 'gim') {
|
||||
var descriptor = $gOPD(RegExp.prototype, 'flags');
|
||||
if (
|
||||
descriptor
|
||||
&& typeof descriptor.get === 'function'
|
||||
&& typeof RegExp.prototype.dotAll === 'boolean'
|
||||
&& typeof RegExp.prototype.hasIndices === 'boolean'
|
||||
) {
|
||||
/* eslint getter-return: 0 */
|
||||
var calls = '';
|
||||
var o = {};
|
||||
Object.defineProperty(o, 'hasIndices', {
|
||||
get: function () {
|
||||
calls += 'd';
|
||||
}
|
||||
});
|
||||
Object.defineProperty(o, 'sticky', {
|
||||
get: function () {
|
||||
calls += 'y';
|
||||
}
|
||||
});
|
||||
if (calls === 'dy') {
|
||||
return descriptor.get;
|
||||
}
|
||||
}
|
||||
}
|
||||
return implementation;
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('find', require('../find'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"QueueScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/QueueScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,OAAO,cAAe,SAAQ,cAAc;CACjD"}
|
||||
@@ -0,0 +1,32 @@
|
||||
let AST = {
|
||||
// Public API used to evaluate derived attributes regarding AST nodes
|
||||
helpers: {
|
||||
// a mustache is definitely a helper if:
|
||||
// * it is an eligible helper, and
|
||||
// * it has at least one parameter or hash segment
|
||||
helperExpression: function(node) {
|
||||
return (
|
||||
node.type === 'SubExpression' ||
|
||||
((node.type === 'MustacheStatement' ||
|
||||
node.type === 'BlockStatement') &&
|
||||
!!((node.params && node.params.length) || node.hash))
|
||||
);
|
||||
},
|
||||
|
||||
scopedId: function(path) {
|
||||
return /^\.|this\b/.test(path.original);
|
||||
},
|
||||
|
||||
// an ID is simple if it only has one part, and that part is not
|
||||
// `..` or `this`.
|
||||
simpleId: function(path) {
|
||||
return (
|
||||
path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Must be exported as an object rather than the root of the module as the jison lexer
|
||||
// must modify the object to operate properly.
|
||||
export default AST;
|
||||
@@ -0,0 +1,2 @@
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
export declare function to_string(node: TemplateNode): string;
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"function.prototype.name","version":"1.1.5","files":{".editorconfig":{"checkedAt":1678883671533,"integrity":"sha512-gD3iQtgC7ZgFS97pyZqR0FPjMNyRAfat8dipbSL28iiJ6B1MP5dDeDYeEnP5sYMTz8whQIk3E5vltk2kcyJJEQ==","mode":420,"size":286},".eslintignore":{"checkedAt":1678883671537,"integrity":"sha512-VLhEcqup3IHXtZJPt07ZYoA9JNRjy1jhU/NU41Yw4E8mEyea/z+6bw5hL3lhCO09pji9E0BH2Q3aDXdc3i9zBg==","mode":420,"size":10},".nycrc":{"checkedAt":1678883669555,"integrity":"sha512-2vm1RFz8Ajl/OYrfoCWPJIm3Bpnf7Gyn5bha/lZx/cq+We3uMy9xj15XeP6x4wF3jf/pO7KMHAkU9mllm605xg==","mode":420,"size":139},"auto.js":{"checkedAt":1678883671533,"integrity":"sha512-8Q3Im5cACiIFrMmxvLnJnA8SXOjAd1kh/R0UIDVnErDD1WUlJIDrNfaOcIB6rtjAXNhq/OdL1374JM/QcAJ1VQ==","mode":420,"size":36},"helpers/functionsHaveNames.js":{"checkedAt":1678883671620,"integrity":"sha512-GXPCkYfohSigKfbCdsXp/m0gRLTOd1CwBED7V5LOGXvZrhZ1HtytmdIRBpGi/ggUJsxxvGvcsO2OdkRHvzMXNA==","mode":420,"size":98},".eslintrc":{"checkedAt":1678883671620,"integrity":"sha512-V+v9rfqHliv/HqgPWvYVl3ATfctbeomZHPqP5BDPh4oiHvoS4DuvEb+uyUUEMWUgm3IJE1ZHNssZULmyVcF+FQ==","mode":420,"size":120},"implementation.js":{"checkedAt":1678883671620,"integrity":"sha512-wmN18t6YF3JhtUtgls9fhXDmMocoEPWc110aS/UNA4Uz5oxugi9nYtQ4wc6TEb3RpzBDIuW0ioYgbkzqa5zbRw==","mode":420,"size":1071},"index.js":{"checkedAt":1678883671620,"integrity":"sha512-TlsCGFw9XPWpehS68BCwwivjd4wHfKbWqMB2Uy4JnnUyCV4H4EPP04OkzkCSspJSXver7Wu1Gv/rQNLF2AmCDg==","mode":420,"size":374},"test/implementation.js":{"checkedAt":1678883671620,"integrity":"sha512-JVgZ475qHrp+7T5MQ8DPUnl1KEDRSb6XNvWVNHBfUl1zDcoltosZk+r5LZfXwAYgu6V002a4EwqLca+bH3g29A==","mode":420,"size":637},"test/index.js":{"checkedAt":1678883671620,"integrity":"sha512-DBUcYefE0R1Pcbaq7dXaf5s/8+z/kO+fyeksFawUetlRb0HaCC8EKhy5vaRtQFyosTWZVFWm1f9oAERBZMaIBQ==","mode":420,"size":920},"polyfill.js":{"checkedAt":1678883671620,"integrity":"sha512-Bbu1A9Zsu7QTSRGKwVcZsNZZpC2+A37rE6Y681c/HMiI7/SLTLu3bqxfJkqdGlC4W+BR+n0d2V9gC6WGu9zFBw==","mode":420,"size":135},"LICENSE":{"checkedAt":1678883671620,"integrity":"sha512-IdtCjxo0Y/7mc2InibsN6mrJ15lI/fOtADCwsj+zRjDS3Hsxxtykg6RdC89DCbkE9p4ax4Qz24vZKuihcPHWew==","mode":420,"size":1081},"test/tests.js":{"checkedAt":1678883671623,"integrity":"sha512-RLfatJqm2WJZREfqhb1koAdMrCM6UelcBM+uJ/ojjYH1GfH3JHnY1zBS2eGFd5Rz5OoXrd5kx9zrYZL6mbg9ZQ==","mode":420,"size":2573},"shim.js":{"checkedAt":1678883671623,"integrity":"sha512-2YtFCP6uhZJVM3LvUH8FYpy+xtzh6ZVrTmKltIdltUNjMvhNsvihwG6sqI7TkEndHkkX5BgIJ0L6SZS1QndXuw==","mode":420,"size":916},"test/shimmed.js":{"checkedAt":1678883671623,"integrity":"sha512-eYEk5AyZk4tU+gkeckAjHnEcuHeeiPVV/ySx6j5KxMLgBsyZuPzBW/AY9CzocR6jMxuVDHIjdRqSKdRMJpmIMA==","mode":420,"size":628},"test/uglified.js":{"checkedAt":1678883671623,"integrity":"sha512-Y/Gb/Q9Hlhuzf7zTpr/rnHoEA/RfuJDuPPQx6MOWfpBQIWtAD1cMKndeLc4tI35VKCvbSD/In0zAZdNdyn6nog==","mode":420,"size":336},"package.json":{"checkedAt":1678883671623,"integrity":"sha512-lm/1RH/yl1sL9PPhea9/7ujqjnzuA/fuv/PJ3Zl4Xi5w3lZBd+D8kBkH3/pAgPAU3YD5LcXtUlAR6kuAD9pIog==","mode":420,"size":1909},"CHANGELOG.md":{"checkedAt":1678883671623,"integrity":"sha512-PVXqX8cvnIWkfD5948BZnkVgeiQi89yLgf4yZxU6OvJH+uoB0/K5XF3oKJ4FMimZTbeUh0Kz6mghS0gu/AxkXA==","mode":420,"size":3389},"README.md":{"checkedAt":1678883671623,"integrity":"sha512-7tGVrjnEtWi0p/hbXdCHSFmjrnCuK7F0nylH2JNnd2YWitKjtRGjtmXuU8+yOmxGAxnTJvclc5Wdo1+QtxqHOQ==","mode":420,"size":1759},".github/FUNDING.yml":{"checkedAt":1678883671626,"integrity":"sha512-Nbud+Zt9IMydaaVX4hCCtmeJHmL+Jar8jBTyraCyF5uEmrGuvvhT90N3mHesQr1Wh5DwnDBGNzTt+lN2upT75g==","mode":420,"size":594}}}
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict'
|
||||
|
||||
process.exit(require('./') ? 0 : 1)
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('intersectionBy', require('../intersectionBy'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
Reference in New Issue
Block a user