new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"name":"@octokit/graphql","version":"5.0.5","files":{"LICENSE":{"checkedAt":1678883670405,"integrity":"sha512-8FFmjOGzS4YsHoIqH94puCnrt52IbgXvyeCeydF8pso7rWBBQUq/ucDlumRLaH81XnrOqtE31m4OeKzAtd9ESA==","mode":420,"size":1081},"dist-src/types.js":{"checkedAt":1678883669320,"integrity":"sha512-TuHIj4w/TkzTTLbAAzm/nW0Db/St469J6HHMiWa4THKdi3VJKsxkE8mmZKwApXlYIjrBPEIp2oxi6+alPk94Pw==","mode":420,"size":11},"dist-src/graphql.js":{"checkedAt":1678883670432,"integrity":"sha512-hUsXwx9fHjqfaNP+FWOvgjgKx4FE/LruiK322NWfX3goJBmngpTUxL1v71bTnbGErzKwEztN2qJzHZNyFabm9g==","mode":420,"size":2026},"dist-src/error.js":{"checkedAt":1678883670432,"integrity":"sha512-iKznqLdiBmAzZ7zROG/ZWP1ubsC47yBIUBbEjoTbElpDRutMktm2kmced22cRMbPmW/1yTKRQq1BKLbQpc+Y5g==","mode":420,"size":843},"dist-node/index.js":{"checkedAt":1678883670432,"integrity":"sha512-KA0a624i6HKvEiic/Vtq+SE5LqA65ITFP/07LzLHpHNRm7v+43xu2l9kpy9xhehCX0tffkktRiDpWPSTC3ufWw==","mode":420,"size":3560},"dist-web/index.js":{"checkedAt":1678883670432,"integrity":"sha512-YNKHP9tlFGajw52yixJWZYLIziQ8yUx3BX5+wcPQjaYIdpZSG4fWLgpn2AjUHhlsgRL78mNEmxZ7y05SboQaRA==","mode":420,"size":3708},"dist-src/index.js":{"checkedAt":1678883670432,"integrity":"sha512-JmnouMLwvAg53/bvS2bW9T9VjbGNcpm6KGOJHVCnSz6Z7ad+lyb+M/uysxR3t0JTFg262GWCc53DSZLGWA6sYA==","mode":420,"size":568},"dist-src/version.js":{"checkedAt":1678883670433,"integrity":"sha512-jgpWSIu1DL1OPymeArYhLMAaw+cytpO6P879keXc2kUv+F8LuhTmXdapW4GF8A3kwog6Qoa5CLDqF5qC6mBV5Q==","mode":420,"size":32},"dist-src/with-defaults.js":{"checkedAt":1678883670433,"integrity":"sha512-LSOS7ZRSVuWcd+Tnbd1u0imu1pdHDrFk+pgAKbWeqnXKdB953Omrb3YJgm/sqaU1CxjNqVOqfkf+0kOqh8A3oQ==","mode":420,"size":383},"dist-node/index.js.map":{"checkedAt":1678883670433,"integrity":"sha512-dPxdIqZVIJ4S6Jwr42Ed6r8Xetjgt2YyiHRxBvhnab1Dp184P+nUrM7Xbxk3/PrXpC/Hi5M8sMeR3xI9PBai+Q==","mode":420,"size":7880},"package.json":{"checkedAt":1678883670433,"integrity":"sha512-ZoCk8vwA6dK57gbokUTvNnPdkLYCHMxmzeKBr4ODJDoM/yUgrT5ary1CK8f8/3GIUllNRhhVH1FS7iJzdTfZmQ==","mode":420,"size":1170},"dist-web/index.js.map":{"checkedAt":1678883670439,"integrity":"sha512-5PJX1uDO5hEmvmwYyJ+oHstWsVC3HlKMPx/rJiGk8D5NXPv5kxDbErjtAGMXIVPfu5yQpP28LdL7E3HeruGlhg==","mode":420,"size":7849},"README.md":{"checkedAt":1678883670439,"integrity":"sha512-pNh7F2Z9wAuaTjhdqUhJi9x1V9iMC8Blhk482hByhSL8ud+DIAsZkGaBoUGLjqzMO0ixeiRCTNZMARChvb8oSg==","mode":420,"size":9536},"dist-types/error.d.ts":{"checkedAt":1678883670443,"integrity":"sha512-OvzQRlhq78Sbtws2IishdY/q66ymMLHLguIYwQ3DsCV2g0KUtR/R7ymFrGFc6D6BkellCwE+5kzTdtvBEcBCfw==","mode":420,"size":644},"dist-types/graphql.d.ts":{"checkedAt":1678883670443,"integrity":"sha512-RQ9mEaHx8oNS9U+JogP7tA6eekMiwKI4LGa0sVW+pcVcSyzmbDBSKAqNz69lJQA2G7D6vONHfsgGoGrVEkyT6w==","mode":420,"size":312},"dist-types/types.d.ts":{"checkedAt":1678883670443,"integrity":"sha512-CIzbQ3uc1coFfj1fTR4SviDJUNyYlXZK5oNu0sb2qAA6QDE6PQ1MapIOzjBJI5YZDC1hpLM3l5mKf0QWBmKLXA==","mode":420,"size":2001},"dist-types/index.d.ts":{"checkedAt":1678883670443,"integrity":"sha512-sgWjvPfWjCY75yabl5rSUiNVTxcaUeMTU6XvikYT3UigV0bPURWoAqo19bqRiBI1WBuhRxNJyYvNhcnhbxLOjg==","mode":420,"size":302},"dist-types/version.d.ts":{"checkedAt":1678883670443,"integrity":"sha512-Kr//CO6EVGNqsiRYk0miOkkoHGPQUBp255ghmAf/pX/OutGdMYBrhdz45PU70CAVt3ObFaTejxKDgZQxkSAtpw==","mode":420,"size":40},"dist-types/with-defaults.d.ts":{"checkedAt":1678883670443,"integrity":"sha512-COS8oE7Psr46cxwsJ04IYONRW8P4k8CvXs+LydGaK9lu/Vs5FWXqvatbd5JO2Km9rNdUCbsoeENEVAWhsmgh6Q==","mode":420,"size":234}}}
|
||||
@@ -0,0 +1,90 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.invariant = exports.UNICODE_EXTENSION_SEQUENCE_REGEX = exports.defineProperty = exports.isLiteralPart = exports.getMultiInternalSlots = exports.getInternalSlot = exports.setMultiInternalSlots = exports.setInternalSlot = exports.repeat = exports.getMagnitude = void 0;
|
||||
/**
|
||||
* Cannot do Math.log(x) / Math.log(10) bc if IEEE floating point issue
|
||||
* @param x number
|
||||
*/
|
||||
function getMagnitude(x) {
|
||||
// Cannot count string length via Number.toString because it may use scientific notation
|
||||
// for very small or very large numbers.
|
||||
return Math.floor(Math.log(x) * Math.LOG10E);
|
||||
}
|
||||
exports.getMagnitude = getMagnitude;
|
||||
function repeat(s, times) {
|
||||
if (typeof s.repeat === 'function') {
|
||||
return s.repeat(times);
|
||||
}
|
||||
var arr = new Array(times);
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
arr[i] = s;
|
||||
}
|
||||
return arr.join('');
|
||||
}
|
||||
exports.repeat = repeat;
|
||||
function setInternalSlot(map, pl, field, value) {
|
||||
if (!map.get(pl)) {
|
||||
map.set(pl, Object.create(null));
|
||||
}
|
||||
var slots = map.get(pl);
|
||||
slots[field] = value;
|
||||
}
|
||||
exports.setInternalSlot = setInternalSlot;
|
||||
function setMultiInternalSlots(map, pl, props) {
|
||||
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
|
||||
var k = _a[_i];
|
||||
setInternalSlot(map, pl, k, props[k]);
|
||||
}
|
||||
}
|
||||
exports.setMultiInternalSlots = setMultiInternalSlots;
|
||||
function getInternalSlot(map, pl, field) {
|
||||
return getMultiInternalSlots(map, pl, field)[field];
|
||||
}
|
||||
exports.getInternalSlot = getInternalSlot;
|
||||
function getMultiInternalSlots(map, pl) {
|
||||
var fields = [];
|
||||
for (var _i = 2; _i < arguments.length; _i++) {
|
||||
fields[_i - 2] = arguments[_i];
|
||||
}
|
||||
var slots = map.get(pl);
|
||||
if (!slots) {
|
||||
throw new TypeError("".concat(pl, " InternalSlot has not been initialized"));
|
||||
}
|
||||
return fields.reduce(function (all, f) {
|
||||
all[f] = slots[f];
|
||||
return all;
|
||||
}, Object.create(null));
|
||||
}
|
||||
exports.getMultiInternalSlots = getMultiInternalSlots;
|
||||
function isLiteralPart(patternPart) {
|
||||
return patternPart.type === 'literal';
|
||||
}
|
||||
exports.isLiteralPart = isLiteralPart;
|
||||
/*
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Every built-in Function object, including constructors, that is not
|
||||
identified as an anonymous function has a name property whose value
|
||||
is a String.
|
||||
|
||||
Unless otherwise specified, the name property of a built-in Function
|
||||
object, if it exists, has the attributes { [[Writable]]: false,
|
||||
[[Enumerable]]: false, [[Configurable]]: true }.
|
||||
*/
|
||||
function defineProperty(target, name, _a) {
|
||||
var value = _a.value;
|
||||
Object.defineProperty(target, name, {
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
value: value,
|
||||
});
|
||||
}
|
||||
exports.defineProperty = defineProperty;
|
||||
exports.UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;
|
||||
function invariant(condition, message, Err) {
|
||||
if (Err === void 0) { Err = Error; }
|
||||
if (!condition) {
|
||||
throw new Err(message);
|
||||
}
|
||||
}
|
||||
exports.invariant = invariant;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"AsyncSubject.js","sourceRoot":"","sources":["../../../src/internal/AsyncSubject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC;IAAqC,gCAAU;IAA/C;QAAA,qEA+BC;QA9BS,YAAM,GAAa,IAAI,CAAC;QACxB,eAAS,GAAG,KAAK,CAAC;QAClB,iBAAW,GAAG,KAAK,CAAC;;IA4B9B,CAAC;IAzBW,8CAAuB,GAAjC,UAAkC,UAAyB;QACnD,IAAA,KAAuE,IAAI,EAAzE,QAAQ,cAAA,EAAE,SAAS,eAAA,EAAE,MAAM,YAAA,EAAE,WAAW,iBAAA,EAAE,SAAS,eAAA,EAAE,WAAW,iBAAS,CAAC;QAClF,IAAI,QAAQ,EAAE;YACZ,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;SAC/B;aAAM,IAAI,SAAS,IAAI,WAAW,EAAE;YACnC,SAAS,IAAI,UAAU,CAAC,IAAI,CAAC,MAAO,CAAC,CAAC;YACtC,UAAU,CAAC,QAAQ,EAAE,CAAC;SACvB;IACH,CAAC;IAED,2BAAI,GAAJ,UAAK,KAAQ;QACX,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;SACvB;IACH,CAAC;IAED,+BAAQ,GAAR;QACQ,IAAA,KAAqC,IAAI,EAAvC,SAAS,eAAA,EAAE,MAAM,YAAA,EAAE,WAAW,iBAAS,CAAC;QAChD,IAAI,CAAC,WAAW,EAAE;YAChB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YACxB,SAAS,IAAI,iBAAM,IAAI,YAAC,MAAO,CAAC,CAAC;YACjC,iBAAM,QAAQ,WAAE,CAAC;SAClB;IACH,CAAC;IACH,mBAAC;AAAD,CAAC,AA/BD,CAAqC,OAAO,GA+B3C"}
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('invokeMap', require('../invokeMap'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
|
||||
var delay = require("../../delay");
|
||||
|
||||
module.exports = function (t, a) {
|
||||
if (typeof Promise !== "function") return null;
|
||||
return {
|
||||
Tick: function (d) {
|
||||
var isInvoked = false;
|
||||
t().then(function (result) {
|
||||
isInvoked = true;
|
||||
delay(function () {
|
||||
a(result, undefined);
|
||||
d();
|
||||
})();
|
||||
}, delay(d));
|
||||
a(isInvoked, false);
|
||||
},
|
||||
Timeout: function (d) {
|
||||
var isInvoked = false;
|
||||
t(100).then(
|
||||
delay(function (result) {
|
||||
isInvoked = true;
|
||||
a(result, undefined);
|
||||
d();
|
||||
}),
|
||||
delay(d)
|
||||
);
|
||||
setTimeout(function () {
|
||||
a(isInvoked, false);
|
||||
}, 50);
|
||||
}
|
||||
};
|
||||
};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,43 @@
|
||||
# has-property-descriptors <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]
|
||||
|
||||
Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var hasPropertyDescriptors = require('has-property-descriptors');
|
||||
var assert = require('assert');
|
||||
|
||||
assert.equal(hasPropertyDescriptors(), true); // will be `false` in IE 6-8, and ES5 engines
|
||||
|
||||
// Arrays can not have their length `[[Defined]]` in some engines
|
||||
assert.equal(hasPropertyDescriptors.hasArrayLengthDefineBug(), false); // will be `true` in Firefox 4-22, and node v0.6
|
||||
```
|
||||
|
||||
## Tests
|
||||
Simply clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
[package-url]: https://npmjs.org/package/has-property-descriptors
|
||||
[npm-version-svg]: https://versionbadg.es/inspect-js/has-property-descriptors.svg
|
||||
[deps-svg]: https://david-dm.org/inspect-js/has-property-descriptors.svg
|
||||
[deps-url]: https://david-dm.org/inspect-js/has-property-descriptors
|
||||
[dev-deps-svg]: https://david-dm.org/inspect-js/has-property-descriptors/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/inspect-js/has-property-descriptors#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/has-property-descriptors.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/has-property-descriptors.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/has-property-descriptors.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=has-property-descriptors
|
||||
[codecov-image]: https://codecov.io/gh/inspect-js/has-property-descriptors/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/inspect-js/has-property-descriptors/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-property-descriptors
|
||||
[actions-url]: https://github.com/inspect-js/has-property-descriptors/actions
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,58 @@
|
||||
import { innerFrom } from '../observable/innerFrom';
|
||||
import { executeSchedule } from '../util/executeSchedule';
|
||||
import { createOperatorSubscriber } from './OperatorSubscriber';
|
||||
export function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {
|
||||
const buffer = [];
|
||||
let active = 0;
|
||||
let index = 0;
|
||||
let isComplete = false;
|
||||
const checkComplete = () => {
|
||||
if (isComplete && !buffer.length && !active) {
|
||||
subscriber.complete();
|
||||
}
|
||||
};
|
||||
const outerNext = (value) => (active < concurrent ? doInnerSub(value) : buffer.push(value));
|
||||
const doInnerSub = (value) => {
|
||||
expand && subscriber.next(value);
|
||||
active++;
|
||||
let innerComplete = false;
|
||||
innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, (innerValue) => {
|
||||
onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);
|
||||
if (expand) {
|
||||
outerNext(innerValue);
|
||||
}
|
||||
else {
|
||||
subscriber.next(innerValue);
|
||||
}
|
||||
}, () => {
|
||||
innerComplete = true;
|
||||
}, undefined, () => {
|
||||
if (innerComplete) {
|
||||
try {
|
||||
active--;
|
||||
while (buffer.length && active < concurrent) {
|
||||
const bufferedValue = buffer.shift();
|
||||
if (innerSubScheduler) {
|
||||
executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue));
|
||||
}
|
||||
else {
|
||||
doInnerSub(bufferedValue);
|
||||
}
|
||||
}
|
||||
checkComplete();
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
}
|
||||
}
|
||||
}));
|
||||
};
|
||||
source.subscribe(createOperatorSubscriber(subscriber, outerNext, () => {
|
||||
isComplete = true;
|
||||
checkComplete();
|
||||
}));
|
||||
return () => {
|
||||
additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=mergeInternals.js.map
|
||||
@@ -0,0 +1,74 @@
|
||||
import { LookupMatcher } from './LookupMatcher';
|
||||
import { BestFitMatcher } from './BestFitMatcher';
|
||||
import { invariant } from './utils';
|
||||
import { UnicodeExtensionValue } from './UnicodeExtensionValue';
|
||||
/**
|
||||
* https://tc39.es/ecma402/#sec-resolvelocale
|
||||
*/
|
||||
export function ResolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData, getDefaultLocale) {
|
||||
var matcher = options.localeMatcher;
|
||||
var r;
|
||||
if (matcher === 'lookup') {
|
||||
r = LookupMatcher(availableLocales, requestedLocales, getDefaultLocale);
|
||||
}
|
||||
else {
|
||||
r = BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale);
|
||||
}
|
||||
var foundLocale = r.locale;
|
||||
var result = { locale: '', dataLocale: foundLocale };
|
||||
var supportedExtension = '-u';
|
||||
for (var _i = 0, relevantExtensionKeys_1 = relevantExtensionKeys; _i < relevantExtensionKeys_1.length; _i++) {
|
||||
var key = relevantExtensionKeys_1[_i];
|
||||
invariant(foundLocale in localeData, "Missing locale data for ".concat(foundLocale));
|
||||
var foundLocaleData = localeData[foundLocale];
|
||||
invariant(typeof foundLocaleData === 'object' && foundLocaleData !== null, "locale data ".concat(key, " must be an object"));
|
||||
var keyLocaleData = foundLocaleData[key];
|
||||
invariant(Array.isArray(keyLocaleData), "keyLocaleData for ".concat(key, " must be an array"));
|
||||
var value = keyLocaleData[0];
|
||||
invariant(typeof value === 'string' || value === null, "value must be string or null but got ".concat(typeof value, " in key ").concat(key));
|
||||
var supportedExtensionAddition = '';
|
||||
if (r.extension) {
|
||||
var requestedValue = UnicodeExtensionValue(r.extension, key);
|
||||
if (requestedValue !== undefined) {
|
||||
if (requestedValue !== '') {
|
||||
if (~keyLocaleData.indexOf(requestedValue)) {
|
||||
value = requestedValue;
|
||||
supportedExtensionAddition = "-".concat(key, "-").concat(value);
|
||||
}
|
||||
}
|
||||
else if (~requestedValue.indexOf('true')) {
|
||||
value = 'true';
|
||||
supportedExtensionAddition = "-".concat(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (key in options) {
|
||||
var optionsValue = options[key];
|
||||
invariant(typeof optionsValue === 'string' ||
|
||||
typeof optionsValue === 'undefined' ||
|
||||
optionsValue === null, 'optionsValue must be String, Undefined or Null');
|
||||
if (~keyLocaleData.indexOf(optionsValue)) {
|
||||
if (optionsValue !== value) {
|
||||
value = optionsValue;
|
||||
supportedExtensionAddition = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
result[key] = value;
|
||||
supportedExtension += supportedExtensionAddition;
|
||||
}
|
||||
if (supportedExtension.length > 2) {
|
||||
var privateIndex = foundLocale.indexOf('-x-');
|
||||
if (privateIndex === -1) {
|
||||
foundLocale = foundLocale + supportedExtension;
|
||||
}
|
||||
else {
|
||||
var preExtension = foundLocale.slice(0, privateIndex);
|
||||
var postExtension = foundLocale.slice(privateIndex, foundLocale.length);
|
||||
foundLocale = preExtension + supportedExtension + postExtension;
|
||||
}
|
||||
foundLocale = Intl.getCanonicalLocales(foundLocale)[0];
|
||||
}
|
||||
result.locale = foundLocale;
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var a = require('a');
|
||||
var b = require('b');
|
||||
var c = require('c');
|
||||
@@ -0,0 +1,97 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Code coverage report for csv2json/libs</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> csv2json/libs
|
||||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>0/3</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>0/0</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>0/0</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>0/3</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>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file low" data-value="csv2json.js"><a href="csv2json.js.html">csv2json.js</a></td>
|
||||
<td data-value="0" class="pic low"><div class="chart"><div class="cover-fill" style="width: 0%;"></div><div class="cover-empty" style="width:100%;"></div></div></td>
|
||||
<td data-value="0" class="pct low">0%</td>
|
||||
<td data-value="3" class="abs low">0/3</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="0" class="abs high">0/0</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="0" class="abs high">0/0</td>
|
||||
<td data-value="0" class="pct low">0%</td>
|
||||
<td data-value="3" class="abs low">0/3</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div><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,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [ljharb]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: npm/is-symbol
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
@@ -0,0 +1,4 @@
|
||||
import csv=require("./v2");
|
||||
|
||||
export=csv;
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./async').foldl;
|
||||
@@ -0,0 +1,2 @@
|
||||
if(typeof cptable === 'undefined') cptable = {};
|
||||
cptable[857] = (function(){ var d = "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ<C38B>ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ<C395>×ÚÛÙìÿ¯´±<C2AD>¾¶§÷¸°¨·¹³²■ ", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {"enc": e, "dec": D }; })();
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('stubObject', require('../stubObject'), require('./_falseOptions'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,2 @@
|
||||
[foo]
|
||||
bar=1
|
||||
@@ -0,0 +1,103 @@
|
||||
"use strict";
|
||||
module.exports = function(Promise) {
|
||||
function PromiseInspection(promise) {
|
||||
if (promise !== undefined) {
|
||||
promise = promise._target();
|
||||
this._bitField = promise._bitField;
|
||||
this._settledValueField = promise._isFateSealed()
|
||||
? promise._settledValue() : undefined;
|
||||
}
|
||||
else {
|
||||
this._bitField = 0;
|
||||
this._settledValueField = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
PromiseInspection.prototype._settledValue = function() {
|
||||
return this._settledValueField;
|
||||
};
|
||||
|
||||
var value = PromiseInspection.prototype.value = function () {
|
||||
if (!this.isFulfilled()) {
|
||||
throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
|
||||
}
|
||||
return this._settledValue();
|
||||
};
|
||||
|
||||
var reason = PromiseInspection.prototype.error =
|
||||
PromiseInspection.prototype.reason = function () {
|
||||
if (!this.isRejected()) {
|
||||
throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
|
||||
}
|
||||
return this._settledValue();
|
||||
};
|
||||
|
||||
var isFulfilled = PromiseInspection.prototype.isFulfilled = function() {
|
||||
return (this._bitField & 33554432) !== 0;
|
||||
};
|
||||
|
||||
var isRejected = PromiseInspection.prototype.isRejected = function () {
|
||||
return (this._bitField & 16777216) !== 0;
|
||||
};
|
||||
|
||||
var isPending = PromiseInspection.prototype.isPending = function () {
|
||||
return (this._bitField & 50397184) === 0;
|
||||
};
|
||||
|
||||
var isResolved = PromiseInspection.prototype.isResolved = function () {
|
||||
return (this._bitField & 50331648) !== 0;
|
||||
};
|
||||
|
||||
PromiseInspection.prototype.isCancelled = function() {
|
||||
return (this._bitField & 8454144) !== 0;
|
||||
};
|
||||
|
||||
Promise.prototype.__isCancelled = function() {
|
||||
return (this._bitField & 65536) === 65536;
|
||||
};
|
||||
|
||||
Promise.prototype._isCancelled = function() {
|
||||
return this._target().__isCancelled();
|
||||
};
|
||||
|
||||
Promise.prototype.isCancelled = function() {
|
||||
return (this._target()._bitField & 8454144) !== 0;
|
||||
};
|
||||
|
||||
Promise.prototype.isPending = function() {
|
||||
return isPending.call(this._target());
|
||||
};
|
||||
|
||||
Promise.prototype.isRejected = function() {
|
||||
return isRejected.call(this._target());
|
||||
};
|
||||
|
||||
Promise.prototype.isFulfilled = function() {
|
||||
return isFulfilled.call(this._target());
|
||||
};
|
||||
|
||||
Promise.prototype.isResolved = function() {
|
||||
return isResolved.call(this._target());
|
||||
};
|
||||
|
||||
Promise.prototype.value = function() {
|
||||
return value.call(this._target());
|
||||
};
|
||||
|
||||
Promise.prototype.reason = function() {
|
||||
var target = this._target();
|
||||
target._unsetRejectionIsUnhandled();
|
||||
return reason.call(target);
|
||||
};
|
||||
|
||||
Promise.prototype._value = function() {
|
||||
return this._settledValue();
|
||||
};
|
||||
|
||||
Promise.prototype._reason = function() {
|
||||
this._unsetRejectionIsUnhandled();
|
||||
return this._settledValue();
|
||||
};
|
||||
|
||||
Promise.PromiseInspection = PromiseInspection;
|
||||
};
|
||||
@@ -0,0 +1,44 @@
|
||||
"use strict";
|
||||
|
||||
var isPlainArray = require("../../is-plain-array")
|
||||
, toPosInt = require("../../../number/to-pos-integer")
|
||||
, isObject = require("../../../object/is-object")
|
||||
, isConcatSpreadable = require("es6-symbol").isConcatSpreadable
|
||||
, isArray = Array.isArray
|
||||
, concat = Array.prototype.concat
|
||||
, forEach = Array.prototype.forEach
|
||||
, isSpreadable;
|
||||
|
||||
isSpreadable = function (value) {
|
||||
if (!value) return false;
|
||||
if (!isObject(value)) return false;
|
||||
if (value[isConcatSpreadable] !== undefined) {
|
||||
return Boolean(value[isConcatSpreadable]);
|
||||
}
|
||||
return isArray(value);
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
module.exports = function (item /*, …items*/) {
|
||||
var result;
|
||||
if (!this || !isArray(this) || isPlainArray(this)) {
|
||||
return concat.apply(this, arguments);
|
||||
}
|
||||
result = new this.constructor();
|
||||
if (isSpreadable(this)) {
|
||||
forEach.call(this, function (val, i) { result[i] = val; });
|
||||
} else {
|
||||
result[0] = this;
|
||||
}
|
||||
forEach.call(arguments, function (arg) {
|
||||
var base;
|
||||
if (isSpreadable(arg)) {
|
||||
base = result.length;
|
||||
result.length += toPosInt(arg.length);
|
||||
forEach.call(arg, function (val, i) { result[base + i] = val; });
|
||||
return;
|
||||
}
|
||||
result.push(arg);
|
||||
});
|
||||
return result;
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 2015 Jordan Harband
|
||||
|
||||
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,216 @@
|
||||
var systemLineBreak = require('os').EOL;
|
||||
|
||||
var override = require('../utils/override');
|
||||
|
||||
var Breaks = {
|
||||
AfterAtRule: 'afterAtRule',
|
||||
AfterBlockBegins: 'afterBlockBegins',
|
||||
AfterBlockEnds: 'afterBlockEnds',
|
||||
AfterComment: 'afterComment',
|
||||
AfterProperty: 'afterProperty',
|
||||
AfterRuleBegins: 'afterRuleBegins',
|
||||
AfterRuleEnds: 'afterRuleEnds',
|
||||
BeforeBlockEnds: 'beforeBlockEnds',
|
||||
BetweenSelectors: 'betweenSelectors'
|
||||
};
|
||||
|
||||
var BreakWith = {
|
||||
CarriageReturnLineFeed: '\r\n',
|
||||
LineFeed: '\n',
|
||||
System: systemLineBreak
|
||||
};
|
||||
|
||||
var IndentWith = {
|
||||
Space: ' ',
|
||||
Tab: '\t'
|
||||
};
|
||||
|
||||
var Spaces = {
|
||||
AroundSelectorRelation: 'aroundSelectorRelation',
|
||||
BeforeBlockBegins: 'beforeBlockBegins',
|
||||
BeforeValue: 'beforeValue'
|
||||
};
|
||||
|
||||
var DEFAULTS = {
|
||||
breaks: breaks(false),
|
||||
breakWith: BreakWith.System,
|
||||
indentBy: 0,
|
||||
indentWith: IndentWith.Space,
|
||||
spaces: spaces(false),
|
||||
wrapAt: false,
|
||||
semicolonAfterLastProperty: false
|
||||
};
|
||||
|
||||
var BEAUTIFY_ALIAS = 'beautify';
|
||||
var KEEP_BREAKS_ALIAS = 'keep-breaks';
|
||||
|
||||
var OPTION_SEPARATOR = ';';
|
||||
var OPTION_NAME_VALUE_SEPARATOR = ':';
|
||||
var HASH_VALUES_OPTION_SEPARATOR = ',';
|
||||
var HASH_VALUES_NAME_VALUE_SEPARATOR = '=';
|
||||
|
||||
var FALSE_KEYWORD_1 = 'false';
|
||||
var FALSE_KEYWORD_2 = 'off';
|
||||
var TRUE_KEYWORD_1 = 'true';
|
||||
var TRUE_KEYWORD_2 = 'on';
|
||||
|
||||
function breaks(value) {
|
||||
var breakOptions = {};
|
||||
|
||||
breakOptions[Breaks.AfterAtRule] = value;
|
||||
breakOptions[Breaks.AfterBlockBegins] = value;
|
||||
breakOptions[Breaks.AfterBlockEnds] = value;
|
||||
breakOptions[Breaks.AfterComment] = value;
|
||||
breakOptions[Breaks.AfterProperty] = value;
|
||||
breakOptions[Breaks.AfterRuleBegins] = value;
|
||||
breakOptions[Breaks.AfterRuleEnds] = value;
|
||||
breakOptions[Breaks.BeforeBlockEnds] = value;
|
||||
breakOptions[Breaks.BetweenSelectors] = value;
|
||||
|
||||
return breakOptions;
|
||||
}
|
||||
|
||||
function spaces(value) {
|
||||
var spaceOptions = {};
|
||||
|
||||
spaceOptions[Spaces.AroundSelectorRelation] = value;
|
||||
spaceOptions[Spaces.BeforeBlockBegins] = value;
|
||||
spaceOptions[Spaces.BeforeValue] = value;
|
||||
|
||||
return spaceOptions;
|
||||
}
|
||||
|
||||
function formatFrom(source) {
|
||||
if (source === undefined || source === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof source == 'object' && 'breakWith' in source) {
|
||||
source = override(source, { breakWith: mapBreakWith(source.breakWith) });
|
||||
}
|
||||
|
||||
if (typeof source == 'object' && 'indentBy' in source) {
|
||||
source = override(source, { indentBy: parseInt(source.indentBy) });
|
||||
}
|
||||
|
||||
if (typeof source == 'object' && 'indentWith' in source) {
|
||||
source = override(source, { indentWith: mapIndentWith(source.indentWith) });
|
||||
}
|
||||
|
||||
if (typeof source == 'object') {
|
||||
return override(DEFAULTS, source);
|
||||
}
|
||||
|
||||
if (typeof source == 'object') {
|
||||
return override(DEFAULTS, source);
|
||||
}
|
||||
|
||||
if (typeof source == 'string' && source == BEAUTIFY_ALIAS) {
|
||||
return override(DEFAULTS, {
|
||||
breaks: breaks(true),
|
||||
indentBy: 2,
|
||||
spaces: spaces(true)
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof source == 'string' && source == KEEP_BREAKS_ALIAS) {
|
||||
return override(DEFAULTS, {
|
||||
breaks: {
|
||||
afterAtRule: true,
|
||||
afterBlockBegins: true,
|
||||
afterBlockEnds: true,
|
||||
afterComment: true,
|
||||
afterRuleEnds: true,
|
||||
beforeBlockEnds: true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof source == 'string') {
|
||||
return override(DEFAULTS, toHash(source));
|
||||
}
|
||||
|
||||
return DEFAULTS;
|
||||
}
|
||||
|
||||
function toHash(string) {
|
||||
return string
|
||||
.split(OPTION_SEPARATOR)
|
||||
.reduce(function (accumulator, directive) {
|
||||
var parts = directive.split(OPTION_NAME_VALUE_SEPARATOR);
|
||||
var name = parts[0];
|
||||
var value = parts[1];
|
||||
|
||||
if (name == 'breaks' || name == 'spaces') {
|
||||
accumulator[name] = hashValuesToHash(value);
|
||||
} else if (name == 'indentBy' || name == 'wrapAt') {
|
||||
accumulator[name] = parseInt(value);
|
||||
} else if (name == 'indentWith') {
|
||||
accumulator[name] = mapIndentWith(value);
|
||||
} else if (name == 'breakWith') {
|
||||
accumulator[name] = mapBreakWith(value);
|
||||
}
|
||||
|
||||
return accumulator;
|
||||
}, {});
|
||||
}
|
||||
|
||||
function hashValuesToHash(string) {
|
||||
return string
|
||||
.split(HASH_VALUES_OPTION_SEPARATOR)
|
||||
.reduce(function (accumulator, directive) {
|
||||
var parts = directive.split(HASH_VALUES_NAME_VALUE_SEPARATOR);
|
||||
var name = parts[0];
|
||||
var value = parts[1];
|
||||
|
||||
accumulator[name] = normalizeValue(value);
|
||||
|
||||
return accumulator;
|
||||
}, {});
|
||||
}
|
||||
|
||||
|
||||
function normalizeValue(value) {
|
||||
switch (value) {
|
||||
case FALSE_KEYWORD_1:
|
||||
case FALSE_KEYWORD_2:
|
||||
return false;
|
||||
case TRUE_KEYWORD_1:
|
||||
case TRUE_KEYWORD_2:
|
||||
return true;
|
||||
default:
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
function mapBreakWith(value) {
|
||||
switch (value) {
|
||||
case 'windows':
|
||||
case 'crlf':
|
||||
case BreakWith.CarriageReturnLineFeed:
|
||||
return BreakWith.CarriageReturnLineFeed;
|
||||
case 'unix':
|
||||
case 'lf':
|
||||
case BreakWith.LineFeed:
|
||||
return BreakWith.LineFeed;
|
||||
default:
|
||||
return systemLineBreak;
|
||||
}
|
||||
}
|
||||
|
||||
function mapIndentWith(value) {
|
||||
switch (value) {
|
||||
case 'space':
|
||||
return IndentWith.Space;
|
||||
case 'tab':
|
||||
return IndentWith.Tab;
|
||||
default:
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
Breaks: Breaks,
|
||||
Spaces: Spaces,
|
||||
formatFrom: formatFrom
|
||||
};
|
||||
@@ -0,0 +1,125 @@
|
||||
let Declaration = require('../declaration')
|
||||
let {
|
||||
prefixTrackProp,
|
||||
prefixTrackValue,
|
||||
autoplaceGridItems,
|
||||
getGridGap,
|
||||
inheritGridGap
|
||||
} = require('./grid-utils')
|
||||
let Processor = require('../processor')
|
||||
|
||||
class GridRowsColumns extends Declaration {
|
||||
/**
|
||||
* Change property name for IE
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
return prefixTrackProp({ prop, prefix })
|
||||
}
|
||||
return super.prefixed(prop, prefix)
|
||||
}
|
||||
|
||||
/**
|
||||
* Change IE property back
|
||||
*/
|
||||
normalize(prop) {
|
||||
return prop.replace(/^grid-(rows|columns)/, 'grid-template-$1')
|
||||
}
|
||||
|
||||
insert(decl, prefix, prefixes, result) {
|
||||
if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
|
||||
|
||||
let { parent, prop, value } = decl
|
||||
let isRowProp = prop.includes('rows')
|
||||
let isColumnProp = prop.includes('columns')
|
||||
|
||||
let hasGridTemplate = parent.some(
|
||||
i => i.prop === 'grid-template' || i.prop === 'grid-template-areas'
|
||||
)
|
||||
|
||||
/**
|
||||
* Not to prefix rows declaration if grid-template(-areas) is present
|
||||
*/
|
||||
if (hasGridTemplate && isRowProp) {
|
||||
return false
|
||||
}
|
||||
|
||||
let processor = new Processor({ options: {} })
|
||||
let status = processor.gridStatus(parent, result)
|
||||
let gap = getGridGap(decl)
|
||||
gap = inheritGridGap(decl, gap) || gap
|
||||
|
||||
let gapValue = isRowProp ? gap.row : gap.column
|
||||
|
||||
if ((status === 'no-autoplace' || status === true) && !hasGridTemplate) {
|
||||
gapValue = null
|
||||
}
|
||||
|
||||
let prefixValue = prefixTrackValue({
|
||||
value,
|
||||
gap: gapValue
|
||||
})
|
||||
|
||||
/**
|
||||
* Insert prefixes
|
||||
*/
|
||||
decl.cloneBefore({
|
||||
prop: prefixTrackProp({ prop, prefix }),
|
||||
value: prefixValue
|
||||
})
|
||||
|
||||
let autoflow = parent.nodes.find(i => i.prop === 'grid-auto-flow')
|
||||
let autoflowValue = 'row'
|
||||
|
||||
if (autoflow && !processor.disabled(autoflow, result)) {
|
||||
autoflowValue = autoflow.value.trim()
|
||||
}
|
||||
if (status === 'autoplace') {
|
||||
/**
|
||||
* Show warning if grid-template-rows decl is not found
|
||||
*/
|
||||
let rowDecl = parent.nodes.find(i => i.prop === 'grid-template-rows')
|
||||
|
||||
if (!rowDecl && hasGridTemplate) {
|
||||
return undefined
|
||||
} else if (!rowDecl && !hasGridTemplate) {
|
||||
decl.warn(
|
||||
result,
|
||||
'Autoplacement does not work without grid-template-rows property'
|
||||
)
|
||||
return undefined
|
||||
}
|
||||
|
||||
/**
|
||||
* Show warning if grid-template-columns decl is not found
|
||||
*/
|
||||
let columnDecl = parent.nodes.find(i => {
|
||||
return i.prop === 'grid-template-columns'
|
||||
})
|
||||
if (!columnDecl && !hasGridTemplate) {
|
||||
decl.warn(
|
||||
result,
|
||||
'Autoplacement does not work without grid-template-columns property'
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Autoplace grid items
|
||||
*/
|
||||
if (isColumnProp && !hasGridTemplate) {
|
||||
autoplaceGridItems(decl, result, gap, autoflowValue)
|
||||
}
|
||||
}
|
||||
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
GridRowsColumns.names = [
|
||||
'grid-template-rows',
|
||||
'grid-template-columns',
|
||||
'grid-rows',
|
||||
'grid-columns'
|
||||
]
|
||||
|
||||
module.exports = GridRowsColumns
|
||||
@@ -0,0 +1,129 @@
|
||||
const semver = require('semver')
|
||||
const { cmd, niceDate } = require('./utils')
|
||||
|
||||
const DIVIDER = '---'
|
||||
const MATCH_V = /^v\d/
|
||||
|
||||
const fetchTags = async (options, remote) => {
|
||||
const format = `%(refname:short)${DIVIDER}%(creatordate:short)`
|
||||
const tags = (await cmd(`git tag -l --format=${format} ${options.appendGitTag}`))
|
||||
.trim()
|
||||
.split('\n')
|
||||
.map(parseTag(options))
|
||||
.filter(isValidTag(options))
|
||||
.sort(sortTags(options))
|
||||
|
||||
const { latestVersion, unreleased, unreleasedOnly, getCompareLink } = options
|
||||
if (latestVersion || unreleased || unreleasedOnly) {
|
||||
const previous = tags[0]
|
||||
const v = !MATCH_V.test(latestVersion) && previous && MATCH_V.test(previous.version) ? 'v' : ''
|
||||
const compareTo = latestVersion ? `${v}${latestVersion}` : 'HEAD'
|
||||
tags.unshift({
|
||||
tag: null,
|
||||
title: latestVersion ? `${v}${latestVersion}` : 'Unreleased',
|
||||
date: new Date().toISOString(),
|
||||
diff: previous ? `${previous.tag}..` : 'HEAD',
|
||||
href: previous ? getCompareLink(previous.tag, compareTo) : null
|
||||
})
|
||||
}
|
||||
|
||||
const enriched = tags.map(enrichTag(options))
|
||||
return enriched.slice(getStartIndex(enriched, options), getEndIndex(enriched, options))
|
||||
}
|
||||
|
||||
const getStartIndex = (tags, { endingVersion }) => {
|
||||
if (endingVersion) {
|
||||
const index = tags.findIndex(({ tag }) => tag === endingVersion)
|
||||
if (index !== -1) {
|
||||
return index
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
const getEndIndex = (tags, { unreleasedOnly, startingVersion, startingDate, tagPrefix }) => {
|
||||
if (unreleasedOnly) {
|
||||
return 1
|
||||
}
|
||||
if (startingVersion) {
|
||||
const semverStartingVersion = inferSemver(startingVersion.replace(tagPrefix, ''))
|
||||
const index = tags.findIndex(({ tag }) => {
|
||||
return tag === startingVersion || tag === semverStartingVersion
|
||||
})
|
||||
if (index !== -1) {
|
||||
return index + 1
|
||||
}
|
||||
// Fall back to nearest version lower than startingVersion
|
||||
return tags.findIndex(({ version }) => semver.lt(version, semverStartingVersion))
|
||||
}
|
||||
if (startingDate) {
|
||||
return tags.filter(t => t.isoDate >= startingDate).length
|
||||
}
|
||||
return tags.length
|
||||
}
|
||||
|
||||
const parseTag = ({ tagPrefix }) => string => {
|
||||
const [tag, date] = string.split(DIVIDER)
|
||||
return {
|
||||
tag,
|
||||
date,
|
||||
title: tag,
|
||||
version: inferSemver(tag.replace(tagPrefix, ''))
|
||||
}
|
||||
}
|
||||
|
||||
const enrichTag = ({ getCompareLink, tagPattern }) => (t, index, tags) => {
|
||||
const previous = tags[index + 1]
|
||||
return {
|
||||
isoDate: t.date.slice(0, 10),
|
||||
niceDate: niceDate(t.date),
|
||||
diff: previous ? `${previous.tag}..${t.tag}` : t.tag,
|
||||
href: previous ? getCompareLink(previous.tag, t.tag || 'HEAD') : null,
|
||||
major: Boolean(
|
||||
previous &&
|
||||
semver.valid(t.version) &&
|
||||
semver.valid(previous.version) &&
|
||||
semver.diff(t.version, previous.version) === 'major'
|
||||
),
|
||||
minor: Boolean(
|
||||
previous &&
|
||||
semver.valid(t.version) &&
|
||||
semver.valid(previous.version) &&
|
||||
['minor', 'preminor'].includes(semver.diff(t.version, previous.version))
|
||||
),
|
||||
...t
|
||||
}
|
||||
}
|
||||
|
||||
const isValidTag = ({ tagPattern }) => ({ tag, version }) => {
|
||||
if (tagPattern) {
|
||||
return new RegExp(tagPattern).test(tag)
|
||||
}
|
||||
return semver.valid(version)
|
||||
}
|
||||
|
||||
const sortTags = ({ appendGitTag }) => ({ version: a }, { version: b }) => {
|
||||
if (/--sort/.test(appendGitTag)) {
|
||||
return 0
|
||||
}
|
||||
if (semver.valid(a) && semver.valid(b)) {
|
||||
return semver.rcompare(a, b)
|
||||
}
|
||||
return a < b ? 1 : -1
|
||||
}
|
||||
|
||||
const inferSemver = tag => {
|
||||
if (/^v?\d+$/.test(tag)) {
|
||||
// v1 becomes v1.0.0
|
||||
return `${tag}.0.0`
|
||||
}
|
||||
if (/^v?\d+\.\d+$/.test(tag)) {
|
||||
// v1.0 becomes v1.0.0
|
||||
return `${tag}.0`
|
||||
}
|
||||
return tag
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
fetchTags
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.bufferWhen = void 0;
|
||||
var lift_1 = require("../util/lift");
|
||||
var noop_1 = require("../util/noop");
|
||||
var OperatorSubscriber_1 = require("./OperatorSubscriber");
|
||||
var innerFrom_1 = require("../observable/innerFrom");
|
||||
function bufferWhen(closingSelector) {
|
||||
return lift_1.operate(function (source, subscriber) {
|
||||
var buffer = null;
|
||||
var closingSubscriber = null;
|
||||
var openBuffer = function () {
|
||||
closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe();
|
||||
var b = buffer;
|
||||
buffer = [];
|
||||
b && subscriber.next(b);
|
||||
innerFrom_1.innerFrom(closingSelector()).subscribe((closingSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, openBuffer, noop_1.noop)));
|
||||
};
|
||||
openBuffer();
|
||||
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); }, function () {
|
||||
buffer && subscriber.next(buffer);
|
||||
subscriber.complete();
|
||||
}, undefined, function () { return (buffer = closingSubscriber = null); }));
|
||||
});
|
||||
}
|
||||
exports.bufferWhen = bufferWhen;
|
||||
//# sourceMappingURL=bufferWhen.js.map
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('spreadFrom', require('../spread'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"132":"J D E F A B CC"},B:{"132":"C K L G M N O","388":"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:{"132":"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 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"},D:{"132":"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","388":"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":"sB 6B 7B 8B 9B OC","132":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B"},F:{"132":"0 F B C G M N O w g x y z PC QC RC SC qB AC TC rB","388":"1 2 3 4 5 6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e"},G:{"1":"sB 6B 7B 8B 9B","132":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B"},H:{"132":"oC"},I:{"132":"tB I pC qC rC sC BC tC uC","388":"f"},J:{"132":"D A"},K:{"132":"A B C qB AC rB","388":"h"},L:{"388":"H"},M:{"132":"H"},N:{"132":"A B"},O:{"388":"vC"},P:{"132":"I","388":"g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"388":"1B"},R:{"388":"9C"},S:{"132":"AD BD"}},B:4,C:"CSS text-indent"};
|
||||
@@ -0,0 +1,89 @@
|
||||
"use strict";
|
||||
|
||||
var findRelation = require("./findRelation");
|
||||
var objUtils = require("../util/object");
|
||||
var pathUtils = require("../util/path");
|
||||
|
||||
|
||||
|
||||
function absolutize(urlObj, siteUrlObj, options)
|
||||
{
|
||||
findRelation.upToPath(urlObj, siteUrlObj, options);
|
||||
|
||||
// Fill in relative URLs
|
||||
if (urlObj.extra.relation.minimumScheme) urlObj.scheme = siteUrlObj.scheme;
|
||||
if (urlObj.extra.relation.minimumAuth) urlObj.auth = siteUrlObj.auth;
|
||||
if (urlObj.extra.relation.minimumHost) urlObj.host = objUtils.clone(siteUrlObj.host);
|
||||
if (urlObj.extra.relation.minimumPort) copyPort(urlObj, siteUrlObj);
|
||||
if (urlObj.extra.relation.minimumScheme) copyPath(urlObj, siteUrlObj);
|
||||
|
||||
// Check remaining relativeness now that path has been copied and/or resolved
|
||||
findRelation.pathOn(urlObj, siteUrlObj, options);
|
||||
|
||||
// Fill in relative URLs
|
||||
if (urlObj.extra.relation.minimumResource) copyResource(urlObj, siteUrlObj);
|
||||
if (urlObj.extra.relation.minimumQuery) urlObj.query = objUtils.clone(siteUrlObj.query);
|
||||
if (urlObj.extra.relation.minimumHash) urlObj.hash = siteUrlObj.hash;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Get an absolute path that's relative to site url.
|
||||
*/
|
||||
function copyPath(urlObj, siteUrlObj)
|
||||
{
|
||||
if (urlObj.extra.relation.maximumHost || !urlObj.extra.hrefInfo.minimumResourceOnly)
|
||||
{
|
||||
var pathArray = urlObj.path.absolute.array;
|
||||
var pathString = "/";
|
||||
|
||||
// If not erroneous URL
|
||||
if (pathArray)
|
||||
{
|
||||
// If is relative path
|
||||
if (urlObj.extra.hrefInfo.minimumPathOnly && urlObj.path.absolute.string.indexOf("/")!==0)
|
||||
{
|
||||
// Append path to site path
|
||||
pathArray = siteUrlObj.path.absolute.array.concat(pathArray);
|
||||
}
|
||||
|
||||
pathArray = pathUtils.resolveDotSegments(pathArray);
|
||||
pathString += pathUtils.join(pathArray);
|
||||
}
|
||||
else
|
||||
{
|
||||
pathArray = [];
|
||||
}
|
||||
|
||||
urlObj.path.absolute.array = pathArray;
|
||||
urlObj.path.absolute.string = pathString;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Resource-, query- or hash-only or empty
|
||||
urlObj.path = objUtils.clone(siteUrlObj.path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function copyPort(urlObj, siteUrlObj)
|
||||
{
|
||||
urlObj.port = siteUrlObj.port;
|
||||
|
||||
urlObj.extra.portIsDefault = siteUrlObj.extra.portIsDefault;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function copyResource(urlObj, siteUrlObj)
|
||||
{
|
||||
urlObj.resource = siteUrlObj.resource;
|
||||
|
||||
urlObj.extra.resourceIsIndex = siteUrlObj.extra.resourceIsIndex;
|
||||
}
|
||||
|
||||
|
||||
|
||||
module.exports = absolutize;
|
||||
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(RegExp.prototype, "replace", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"X Y Z a b c d e i j k l m n o p q r s t u f H","2":"C K L G M N O","1220":"P Q R S T U V W"},C:{"1":"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","16":"DC tB EC FC","548":"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"},D:{"1":"X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","16":"I v J D E F A B C K L","164":"0 1 2 3 4 5 6 7 8 9 G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB","196":"dB eB fB","1220":"gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W"},E:{"1":"L G MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I HC zB","16":"v","164":"J D E IC JC KC","260":"F A B C K LC 0B qB rB 1B"},F:{"1":"mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"F B C PC QC RC SC qB AC TC rB","164":"0 1 2 3 4 5 6 7 8 9 G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB","196":"SB TB UB","1220":"VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB"},G:{"1":"lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","16":"zB UC BC VC WC","164":"E XC YC","260":"ZC aC bC cC dC eC fC gC hC iC jC kC"},H:{"2":"oC"},I:{"1":"f","16":"tB pC qC rC","164":"I sC BC tC uC"},J:{"16":"D","164":"A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"2":"A B"},O:{"164":"vC"},P:{"1":"g 5C sB 6C 7C 8C","164":"I wC xC yC zC 0C 0B 1C 2C 3C 4C"},Q:{"1220":"1B"},R:{"1":"9C"},S:{"1":"BD","548":"AD"}},B:5,C:":is() CSS pseudo-class"};
|
||||
@@ -0,0 +1,20 @@
|
||||
# @sveltejs/vite-plugin-svelte
|
||||
|
||||
## 1.0.0-next.6
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 1be46f1: improved css hmr
|
||||
- a0f5a65: Allow other vite plugins to define preprocessors
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 8d9ef96: fix: do not preserve types unless useVitePreprocess option is true
|
||||
- 6f4a253: disable svelte-hmr overlay by default
|
||||
- 18647aa: improve virtual css module path (fixes #14)
|
||||
|
||||
## 1.0.0-next.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 61439ae: initial release
|
||||
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
|
||||
var safeToString = require("../safe-to-string")
|
||||
, toInteger = require("../number/to-integer")
|
||||
, isTimeValue = require("./is-time-value");
|
||||
|
||||
module.exports = function (value) {
|
||||
if (isTimeValue(value)) return toInteger(value);
|
||||
throw new TypeError(safeToString(value) + " is not a valid time value");
|
||||
};
|
||||
@@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
|
||||
var iteratorSymbol = require("es6-symbol").iterator;
|
||||
|
||||
module.exports = function (T) {
|
||||
return {
|
||||
"Values": function (a) {
|
||||
var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], it;
|
||||
|
||||
it = new T(x);
|
||||
a(it[iteratorSymbol](), it, "@@iterator");
|
||||
a.deep(it.next(), { done: false, value: "raz" }, "#1");
|
||||
a.deep(it.next(), { done: false, value: "dwa" }, "#2");
|
||||
x.splice(1, 0, "elo");
|
||||
a.deep(it.next(), { done: false, value: "dwa" }, "Insert");
|
||||
a.deep(it.next(), { done: false, value: "trzy" }, "#3");
|
||||
a.deep(it.next(), { done: false, value: "cztery" }, "#4");
|
||||
x.pop();
|
||||
a.deep(it.next(), { done: false, value: "pięć" }, "#5");
|
||||
a.deep(it.next(), { done: true, value: undefined }, "End");
|
||||
},
|
||||
"Keys & Values": function (a) {
|
||||
var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], it;
|
||||
|
||||
it = new T(x, "key+value");
|
||||
a(it[iteratorSymbol](), it, "@@iterator");
|
||||
a.deep(it.next(), { done: false, value: [0, "raz"] }, "#1");
|
||||
a.deep(it.next(), { done: false, value: [1, "dwa"] }, "#2");
|
||||
x.splice(1, 0, "elo");
|
||||
a.deep(it.next(), { done: false, value: [2, "dwa"] }, "Insert");
|
||||
a.deep(it.next(), { done: false, value: [3, "trzy"] }, "#3");
|
||||
a.deep(it.next(), { done: false, value: [4, "cztery"] }, "#4");
|
||||
x.pop();
|
||||
a.deep(it.next(), { done: false, value: [5, "pięć"] }, "#5");
|
||||
a.deep(it.next(), { done: true, value: undefined }, "End");
|
||||
},
|
||||
"Keys": function (a) {
|
||||
var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], it;
|
||||
|
||||
it = new T(x, "key");
|
||||
a(it[iteratorSymbol](), it, "@@iterator");
|
||||
a.deep(it.next(), { done: false, value: 0 }, "#1");
|
||||
a.deep(it.next(), { done: false, value: 1 }, "#2");
|
||||
x.splice(1, 0, "elo");
|
||||
a.deep(it.next(), { done: false, value: 2 }, "Insert");
|
||||
a.deep(it.next(), { done: false, value: 3 }, "#3");
|
||||
a.deep(it.next(), { done: false, value: 4 }, "#4");
|
||||
x.pop();
|
||||
a.deep(it.next(), { done: false, value: 5 }, "#5");
|
||||
a.deep(it.next(), { done: true, value: undefined }, "End");
|
||||
},
|
||||
"Sparse": function (a) {
|
||||
var x = new Array(6), it;
|
||||
|
||||
x[2] = "raz";
|
||||
x[4] = "dwa";
|
||||
it = new T(x);
|
||||
a.deep(it.next(), { done: false, value: undefined }, "#1");
|
||||
a.deep(it.next(), { done: false, value: undefined }, "#2");
|
||||
a.deep(it.next(), { done: false, value: "raz" }, "#3");
|
||||
a.deep(it.next(), { done: false, value: undefined }, "#4");
|
||||
a.deep(it.next(), { done: false, value: "dwa" }, "#5");
|
||||
a.deep(it.next(), { done: false, value: undefined }, "#6");
|
||||
a.deep(it.next(), { done: true, value: undefined }, "End");
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,135 @@
|
||||
'use strict';
|
||||
const os = require('os');
|
||||
const tty = require('tty');
|
||||
const hasFlag = require('has-flag');
|
||||
|
||||
const {env} = process;
|
||||
|
||||
let forceColor;
|
||||
if (hasFlag('no-color') ||
|
||||
hasFlag('no-colors') ||
|
||||
hasFlag('color=false') ||
|
||||
hasFlag('color=never')) {
|
||||
forceColor = 0;
|
||||
} else if (hasFlag('color') ||
|
||||
hasFlag('colors') ||
|
||||
hasFlag('color=true') ||
|
||||
hasFlag('color=always')) {
|
||||
forceColor = 1;
|
||||
}
|
||||
|
||||
if ('FORCE_COLOR' in env) {
|
||||
if (env.FORCE_COLOR === 'true') {
|
||||
forceColor = 1;
|
||||
} else if (env.FORCE_COLOR === 'false') {
|
||||
forceColor = 0;
|
||||
} else {
|
||||
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
||||
}
|
||||
}
|
||||
|
||||
function translateLevel(level) {
|
||||
if (level === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return {
|
||||
level,
|
||||
hasBasic: true,
|
||||
has256: level >= 2,
|
||||
has16m: level >= 3
|
||||
};
|
||||
}
|
||||
|
||||
function supportsColor(haveStream, streamIsTTY) {
|
||||
if (forceColor === 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (hasFlag('color=16m') ||
|
||||
hasFlag('color=full') ||
|
||||
hasFlag('color=truecolor')) {
|
||||
return 3;
|
||||
}
|
||||
|
||||
if (hasFlag('color=256')) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const min = forceColor || 0;
|
||||
|
||||
if (env.TERM === 'dumb') {
|
||||
return min;
|
||||
}
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
// Windows 10 build 10586 is the first Windows release that supports 256 colors.
|
||||
// Windows 10 build 14931 is the first release that supports 16m/TrueColor.
|
||||
const osRelease = os.release().split('.');
|
||||
if (
|
||||
Number(osRelease[0]) >= 10 &&
|
||||
Number(osRelease[2]) >= 10586
|
||||
) {
|
||||
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ('CI' in env) {
|
||||
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return min;
|
||||
}
|
||||
|
||||
if ('TEAMCITY_VERSION' in env) {
|
||||
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
||||
}
|
||||
|
||||
if (env.COLORTERM === 'truecolor') {
|
||||
return 3;
|
||||
}
|
||||
|
||||
if ('TERM_PROGRAM' in env) {
|
||||
const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
||||
|
||||
switch (env.TERM_PROGRAM) {
|
||||
case 'iTerm.app':
|
||||
return version >= 3 ? 3 : 2;
|
||||
case 'Apple_Terminal':
|
||||
return 2;
|
||||
// No default
|
||||
}
|
||||
}
|
||||
|
||||
if (/-256(color)?$/i.test(env.TERM)) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ('COLORTERM' in env) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return min;
|
||||
}
|
||||
|
||||
function getSupportLevel(stream) {
|
||||
const level = supportsColor(stream, stream && stream.isTTY);
|
||||
return translateLevel(level);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
supportsColor: getSupportLevel,
|
||||
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
||||
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./async').series;
|
||||
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function (args) {
|
||||
var id, i, length = args.length;
|
||||
if (!length) return "\u0002";
|
||||
id = String(args[i = 0]);
|
||||
while (--length) id += "\u0001" + args[++i];
|
||||
return id;
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Creates the TypeError to throw if an invalid object is passed to `from` or `scheduled`.
|
||||
* @param input The object that was passed.
|
||||
*/
|
||||
export function createInvalidObservableTypeError(input: any) {
|
||||
// TODO: We should create error codes that can be looked up, so this can be less verbose.
|
||||
return new TypeError(
|
||||
`You provided ${
|
||||
input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`
|
||||
} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v1.0.2](https://github.com/ljharb/unbox-primitive/compare/v1.0.1...v1.0.2) - 2022-04-24
|
||||
|
||||
### Commits
|
||||
|
||||
- [actions] reuse common workflows [`e6420b9`](https://github.com/ljharb/unbox-primitive/commit/e6420b94eed3558ef3ecddbd3d85fe2f400d1db1)
|
||||
- [actions] update codecov uploader [`b90aff2`](https://github.com/ljharb/unbox-primitive/commit/b90aff2b17b70c1a7200eb5faa3f9e64ebf055f9)
|
||||
- [readme] add github actions/codecov badges; update URLs [`bcc39b9`](https://github.com/ljharb/unbox-primitive/commit/bcc39b9d6d101bad199c95604f94999f80d6da97)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` [`a704a32`](https://github.com/ljharb/unbox-primitive/commit/a704a32ec4af43cd0631317ae3a537012adc1610)
|
||||
- [Refactor] use `call-bind` instead of `function-bind` [`0a609f1`](https://github.com/ljharb/unbox-primitive/commit/0a609f1be6269cbf501482aacd9a0a1bd8596108)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` [`6a45317`](https://github.com/ljharb/unbox-primitive/commit/6a4531757d74af97c9d0770b102f81ce6ff0a8dc)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`795c76f`](https://github.com/ljharb/unbox-primitive/commit/795c76f14c4df3c7ae934f7b14a98c07951ea9c7)
|
||||
- [Deps] update `has-bigints`, `has-symbols` [`257a065`](https://github.com/ljharb/unbox-primitive/commit/257a065496b4190c296d674bff342ea40cf8e176)
|
||||
|
||||
## [v1.0.1](https://github.com/ljharb/unbox-primitive/compare/v1.0.0...v1.0.1) - 2021-03-25
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] use shared travis-ci configs [`f977e5f`](https://github.com/ljharb/unbox-primitive/commit/f977e5f8fa532dbc519bd78a48cf4b81c14720fe)
|
||||
- [Tests] migrate tests to Github Actions [`b89def6`](https://github.com/ljharb/unbox-primitive/commit/b89def60908a236aa1b5c756426f7cc61cf458dd)
|
||||
- [meta] do not publish github action workflow files [`325d1f1`](https://github.com/ljharb/unbox-primitive/commit/325d1f1836cecbe57ee148545de5aefcbe7a7dce)
|
||||
- readme [`810cd70`](https://github.com/ljharb/unbox-primitive/commit/810cd70f7b3c670cd55eae64466c89595175ee2a)
|
||||
- [Tests] run `nyc` on all tests; use `tape` runner [`2f5fb08`](https://github.com/ljharb/unbox-primitive/commit/2f5fb08930c8f8e5e069ac61891dc9bd76cb762b)
|
||||
- [meta] add `auto-changelog` [`03ed375`](https://github.com/ljharb/unbox-primitive/commit/03ed3759284493f19323eb0500f726d0851fc085)
|
||||
- [actions] add automatic rebasing / merge commit blocking [`6dec48d`](https://github.com/ljharb/unbox-primitive/commit/6dec48daa357fa79a5cac1add9ca33f7b56276cc)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `object-is`, `tape` [`528ed88`](https://github.com/ljharb/unbox-primitive/commit/528ed8826664b67f7eaf1fe7e2031c063b2d315f)
|
||||
- [actions] check out the entire repo [`5095b29`](https://github.com/ljharb/unbox-primitive/commit/5095b2981f44a78b3f9bfaa1a526f17a6823e383)
|
||||
- [actions] add "Allow Edits" workflow [`5aa26d7`](https://github.com/ljharb/unbox-primitive/commit/5aa26d7f0c32e0e78ba4bf3e5f9abb5478fd97fa)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `object-is`, `safe-publish-latest`, `tape` [`afc18c6`](https://github.com/ljharb/unbox-primitive/commit/afc18c6cb59cbb6b514e0d8004c6fd264e2a27eb)
|
||||
- [readme] remove travis badge [`a025899`](https://github.com/ljharb/unbox-primitive/commit/a0258997a21604e1266840e6d167f0a870966e9b)
|
||||
- [Dev Deps] update `auto-changelog` [`9219a32`](https://github.com/ljharb/unbox-primitive/commit/9219a32844b2ce3ed0a7ea12a5910a3e92424e4e)
|
||||
- [readme] Fix missing paren in example [`73f5a33`](https://github.com/ljharb/unbox-primitive/commit/73f5a3340ca1ab6c227ed4632117d816d5e35317)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`e450acc`](https://github.com/ljharb/unbox-primitive/commit/e450accb54ab452f240768a5f0a98e5887b0ba8c)
|
||||
- [Deps] update `has-bigints`, `has-symbols`, `which-boxed-primitive` [`a4279b5`](https://github.com/ljharb/unbox-primitive/commit/a4279b504732002074e5dcb9c5509038d605f563)
|
||||
- [Dev Deps] update `auto-changelog`, `in-publish`, `tape` [`b351548`](https://github.com/ljharb/unbox-primitive/commit/b351548d31789c0d0af4c3bce55c2bdefe51b40f)
|
||||
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`f600382`](https://github.com/ljharb/unbox-primitive/commit/f600382db83025270969354ac52a72aadb0a7ffa)
|
||||
- [readme] fix travis links [`4d02fa9`](https://github.com/ljharb/unbox-primitive/commit/4d02fa9a4990812b048f8aefe6e46be80b68beef)
|
||||
- [Dev Deps] update `auto-changelog`; add `aud` [`07e74a3`](https://github.com/ljharb/unbox-primitive/commit/07e74a3ca90688122593095849757e3c05c46db0)
|
||||
- [meta] add `funding` field [`7ca4bd7`](https://github.com/ljharb/unbox-primitive/commit/7ca4bd71196e90a2fc9c7cb0ef4e30f949d5a853)
|
||||
- [Tests] only audit prod deps [`47d8d5f`](https://github.com/ljharb/unbox-primitive/commit/47d8d5fbd58bf472e7e83f79ccef7e8379d06b35)
|
||||
- [Deps] update `has-symbols` [`c70c15e`](https://github.com/ljharb/unbox-primitive/commit/c70c15e924191d11a271cff25bde657b0c3c3016)
|
||||
|
||||
## v1.0.0 - 2019-08-10
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] add `.travis.yml` [`8c9a5ef`](https://github.com/ljharb/unbox-primitive/commit/8c9a5efdb54be4866e2884bf32cbe830788b2c2a)
|
||||
- Initial commit [`feaff15`](https://github.com/ljharb/unbox-primitive/commit/feaff159eb999adc8763ff3e51d2d3d56d6164f8)
|
||||
- [Tests] add tests [`3dd18d6`](https://github.com/ljharb/unbox-primitive/commit/3dd18d65748efb4af9b8ca66f8d8c5521d8f2dec)
|
||||
- implementation [`472fb41`](https://github.com/ljharb/unbox-primitive/commit/472fb41d049ddee80ebf3219a5837e639a6e9341)
|
||||
- npm init [`e9e426f`](https://github.com/ljharb/unbox-primitive/commit/e9e426fc90b9a3f07ffc48db75f78c414f77bc2b)
|
||||
- [Tests] add linting [`139e74b`](https://github.com/ljharb/unbox-primitive/commit/139e74b94cdfd187b43b24de76c6d84af21ee467)
|
||||
- [meta] create FUNDING.yml [`a9509e1`](https://github.com/ljharb/unbox-primitive/commit/a9509e122163e2b9d98af421e5c0575df36e2310)
|
||||
- Only apps should have lockfiles [`b3d0834`](https://github.com/ljharb/unbox-primitive/commit/b3d0834d69dcbf4cbc1e61ccfaef05acf96cf630)
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"17":0.00221,"24":0.00221,"30":0.00221,"35":0.02868,"43":0.00221,"45":0.01765,"52":0.10809,"61":0.00221,"65":0.00441,"69":0.00221,"71":0.00662,"73":0.05515,"82":0.00441,"88":0.01765,"91":0.00441,"99":0.00662,"101":0.00441,"102":0.00882,"103":0.00662,"104":0.01103,"105":0.00662,"106":0.01103,"107":0.01765,"108":0.02206,"109":0.58459,"110":0.39267,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 21 22 23 25 26 27 28 29 31 32 33 34 36 37 38 39 40 41 42 44 46 47 48 49 50 51 53 54 55 56 57 58 59 60 62 63 64 66 67 68 70 72 74 75 76 77 78 79 80 81 83 84 85 86 87 89 90 92 93 94 95 96 97 98 100 111 112 3.5 3.6"},D:{"11":0.00221,"27":0.00441,"38":0.00441,"44":0.00441,"47":0.03309,"49":0.02427,"56":0.00221,"63":0.00221,"64":0.01765,"65":0.03309,"66":0.00221,"68":0.01103,"69":0.00441,"70":0.00662,"71":0.00441,"73":0.00882,"74":0.00221,"75":0.00441,"76":0.00221,"77":0.00882,"78":0.00221,"79":0.0728,"80":0.00662,"81":0.02647,"83":0.00441,"85":0.00662,"86":0.00441,"87":0.55591,"88":0.00441,"89":0.0728,"90":0.00441,"91":0.10589,"92":0.01103,"93":0.00441,"94":0.00662,"95":0.01765,"96":0.02206,"97":0.02427,"98":0.01765,"99":0.01324,"100":0.0353,"101":0.00882,"102":0.02868,"103":0.05515,"104":0.04633,"105":0.05074,"106":0.04633,"107":0.39267,"108":0.24928,"109":8.56149,"110":5.42676,"111":0.00441,_:"4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 28 29 30 31 32 33 34 35 36 37 39 40 41 42 43 45 46 48 50 51 52 53 54 55 57 58 59 60 61 62 67 72 84 112 113"},F:{"85":0.00221,"93":0.09265,"94":0.76989,"95":0.27796,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 86 87 88 89 90 91 92 9.5-9.6 10.5 10.6 11.1 11.5 11.6 12.1","10.0-10.1":0},B:{"12":0.00221,"17":0.00221,"18":0.00882,"80":0.01765,"84":0.00221,"92":0.00441,"94":0.01324,"102":0.01103,"103":0.00662,"104":0.00662,"105":0.00662,"106":0.00221,"107":0.01324,"108":0.02206,"109":0.65518,"110":0.94858,_:"13 14 15 16 79 81 83 85 86 87 88 89 90 91 93 95 96 97 98 99 100 101"},E:{"4":0,"13":0.02206,"14":0.01544,"15":0.00441,_:"0 5 6 7 8 9 10 11 12 3.1 3.2 6.1 7.1 9.1 10.1 11.1 16.4","5.1":0.01765,"12.1":0.00441,"13.1":0.01985,"14.1":0.02427,"15.1":0.00221,"15.2-15.3":0.00221,"15.4":0.01324,"15.5":0.04633,"15.6":0.07942,"16.0":0.00882,"16.1":0.05956,"16.2":0.10368,"16.3":0.09265},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.00067,"6.0-6.1":0,"7.0-7.1":0.03232,"8.1-8.4":0.00067,"9.0-9.2":0.00404,"9.3":0.02828,"10.0-10.2":0,"10.3":0.00337,"11.0-11.2":0.00269,"11.3-11.4":0.00269,"12.0-12.1":0.00067,"12.2-12.5":0.19662,"13.0-13.1":0.00135,"13.2":0.00404,"13.3":0.00404,"13.4-13.7":0.02357,"14.0-14.4":0.10302,"14.5-14.8":0.21076,"15.0-15.1":0.03232,"15.2-15.3":0.0404,"15.4":0.06128,"15.5":0.14679,"15.6":0.51647,"16.0":0.6774,"16.1":1.39991,"16.2":1.59451,"16.3":0.84843,"16.4":0.00269},P:{"4":0.41738,"20":0.78385,"5.0-5.4":0.01042,"6.2-6.4":0.0206,"7.2-7.4":0.71259,"8.2":0.02044,"9.2":0.03054,"10.1":0.0217,"11.1-11.2":0.07126,"12.0":0.02036,"13.0":0.08144,"14.0":0.09162,"15.0":0.04072,"16.0":0.14252,"17.0":0.33594,"18.0":0.1527,"19.0":1.60843},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0.00408,"4.2-4.3":0.02041,"4.4":0,"4.4.3-4.4.4":0.06124},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"8":0.00882,"11":0.0375,_:"6 7 9 10 5.5"},N:{"10":0.03712,"11":0.07423},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.04676},H:{"0":0.21399},L:{"0":67.73316},R:{_:"0"},M:{"0":0.10132},Q:{"13.1":0}};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"combineAll.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/combineAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,UAAU,yBAAmB,CAAC"}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"F A B CC","4":"J D E"},B:{"2":"C K L G M N O","8":"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:{"8":"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 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"},D:{"8":"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:{"8":"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:{"8":"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 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"},G:{"8":"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:{"8":"oC"},I:{"8":"tB I f pC qC rC sC BC tC uC"},J:{"8":"D A"},K:{"8":"A B C h qB AC rB"},L:{"8":"H"},M:{"8":"H"},N:{"2":"A B"},O:{"8":"vC"},P:{"8":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"8":"1B"},R:{"8":"9C"},S:{"8":"AD BD"}},B:7,C:"XHTML+SMIL animation"};
|
||||
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const path = require("path");
|
||||
const fsScandir = require("@nodelib/fs.scandir");
|
||||
class Settings {
|
||||
constructor(_options = {}) {
|
||||
this._options = _options;
|
||||
this.basePath = this._getValue(this._options.basePath, undefined);
|
||||
this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY);
|
||||
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
||||
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
||||
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
||||
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
|
||||
this.fsScandirSettings = new fsScandir.Settings({
|
||||
followSymbolicLinks: this._options.followSymbolicLinks,
|
||||
fs: this._options.fs,
|
||||
pathSegmentSeparator: this._options.pathSegmentSeparator,
|
||||
stats: this._options.stats,
|
||||
throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
|
||||
});
|
||||
}
|
||||
_getValue(option, value) {
|
||||
return option !== null && option !== void 0 ? option : value;
|
||||
}
|
||||
}
|
||||
exports.default = Settings;
|
||||
@@ -0,0 +1,149 @@
|
||||
import { Observable } from '../Observable';
|
||||
import { innerFrom } from '../observable/innerFrom';
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { ObservableInput, SchedulerLike } from '../types';
|
||||
import { executeSchedule } from '../util/executeSchedule';
|
||||
import { createOperatorSubscriber } from './OperatorSubscriber';
|
||||
|
||||
/**
|
||||
* A process embodying the general "merge" strategy. This is used in
|
||||
* `mergeMap` and `mergeScan` because the logic is otherwise nearly identical.
|
||||
* @param source The original source observable
|
||||
* @param subscriber The consumer subscriber
|
||||
* @param project The projection function to get our inner sources
|
||||
* @param concurrent The number of concurrent inner subscriptions
|
||||
* @param onBeforeNext Additional logic to apply before nexting to our consumer
|
||||
* @param expand If `true` this will perform an "expand" strategy, which differs only
|
||||
* in that it recurses, and the inner subscription must be schedule-able.
|
||||
* @param innerSubScheduler A scheduler to use to schedule inner subscriptions,
|
||||
* this is to support the expand strategy, mostly, and should be deprecated
|
||||
*/
|
||||
export function mergeInternals<T, R>(
|
||||
source: Observable<T>,
|
||||
subscriber: Subscriber<R>,
|
||||
project: (value: T, index: number) => ObservableInput<R>,
|
||||
concurrent: number,
|
||||
onBeforeNext?: (innerValue: R) => void,
|
||||
expand?: boolean,
|
||||
innerSubScheduler?: SchedulerLike,
|
||||
additionalFinalizer?: () => void
|
||||
) {
|
||||
// Buffered values, in the event of going over our concurrency limit
|
||||
const buffer: T[] = [];
|
||||
// The number of active inner subscriptions.
|
||||
let active = 0;
|
||||
// An index to pass to our accumulator function
|
||||
let index = 0;
|
||||
// Whether or not the outer source has completed.
|
||||
let isComplete = false;
|
||||
|
||||
/**
|
||||
* Checks to see if we can complete our result or not.
|
||||
*/
|
||||
const checkComplete = () => {
|
||||
// If the outer has completed, and nothing is left in the buffer,
|
||||
// and we don't have any active inner subscriptions, then we can
|
||||
// Emit the state and complete.
|
||||
if (isComplete && !buffer.length && !active) {
|
||||
subscriber.complete();
|
||||
}
|
||||
};
|
||||
|
||||
// If we're under our concurrency limit, just start the inner subscription, otherwise buffer and wait.
|
||||
const outerNext = (value: T) => (active < concurrent ? doInnerSub(value) : buffer.push(value));
|
||||
|
||||
const doInnerSub = (value: T) => {
|
||||
// If we're expanding, we need to emit the outer values and the inner values
|
||||
// as the inners will "become outers" in a way as they are recursively fed
|
||||
// back to the projection mechanism.
|
||||
expand && subscriber.next(value as any);
|
||||
|
||||
// Increment the number of active subscriptions so we can track it
|
||||
// against our concurrency limit later.
|
||||
active++;
|
||||
|
||||
// A flag used to show that the inner observable completed.
|
||||
// This is checked during finalization to see if we should
|
||||
// move to the next item in the buffer, if there is on.
|
||||
let innerComplete = false;
|
||||
|
||||
// Start our inner subscription.
|
||||
innerFrom(project(value, index++)).subscribe(
|
||||
createOperatorSubscriber(
|
||||
subscriber,
|
||||
(innerValue) => {
|
||||
// `mergeScan` has additional handling here. For example
|
||||
// taking the inner value and updating state.
|
||||
onBeforeNext?.(innerValue);
|
||||
|
||||
if (expand) {
|
||||
// If we're expanding, then just recurse back to our outer
|
||||
// handler. It will emit the value first thing.
|
||||
outerNext(innerValue as any);
|
||||
} else {
|
||||
// Otherwise, emit the inner value.
|
||||
subscriber.next(innerValue);
|
||||
}
|
||||
},
|
||||
() => {
|
||||
// Flag that we have completed, so we know to check the buffer
|
||||
// during finalization.
|
||||
innerComplete = true;
|
||||
},
|
||||
// Errors are passed to the destination.
|
||||
undefined,
|
||||
() => {
|
||||
// During finalization, if the inner completed (it wasn't errored or
|
||||
// cancelled), then we want to try the next item in the buffer if
|
||||
// there is one.
|
||||
if (innerComplete) {
|
||||
// We have to wrap this in a try/catch because it happens during
|
||||
// finalization, possibly asynchronously, and we want to pass
|
||||
// any errors that happen (like in a projection function) to
|
||||
// the outer Subscriber.
|
||||
try {
|
||||
// INNER SOURCE COMPLETE
|
||||
// Decrement the active count to ensure that the next time
|
||||
// we try to call `doInnerSub`, the number is accurate.
|
||||
active--;
|
||||
// If we have more values in the buffer, try to process those
|
||||
// Note that this call will increment `active` ahead of the
|
||||
// next conditional, if there were any more inner subscriptions
|
||||
// to start.
|
||||
while (buffer.length && active < concurrent) {
|
||||
const bufferedValue = buffer.shift()!;
|
||||
// Particularly for `expand`, we need to check to see if a scheduler was provided
|
||||
// for when we want to start our inner subscription. Otherwise, we just start
|
||||
// are next inner subscription.
|
||||
if (innerSubScheduler) {
|
||||
executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue));
|
||||
} else {
|
||||
doInnerSub(bufferedValue);
|
||||
}
|
||||
}
|
||||
// Check to see if we can complete, and complete if so.
|
||||
checkComplete();
|
||||
} catch (err) {
|
||||
subscriber.error(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
// Subscribe to our source observable.
|
||||
source.subscribe(
|
||||
createOperatorSubscriber(subscriber, outerNext, () => {
|
||||
// Outer completed, make a note of it, and check to see if we can complete everything.
|
||||
isComplete = true;
|
||||
checkComplete();
|
||||
})
|
||||
);
|
||||
|
||||
// Additional finalization (for when the destination is torn down).
|
||||
// Other finalization is added implicitly via subscription above.
|
||||
return () => {
|
||||
additionalFinalizer?.();
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import { asyncScheduler } from '../scheduler/async';
|
||||
import { sample } from './sample';
|
||||
import { interval } from '../observable/interval';
|
||||
export function sampleTime(period, scheduler) {
|
||||
if (scheduler === void 0) { scheduler = asyncScheduler; }
|
||||
return sample(interval(period, scheduler));
|
||||
}
|
||||
//# sourceMappingURL=sampleTime.js.map
|
||||
@@ -0,0 +1,97 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.printDateTimeSkeleton = exports.doPrintAST = exports.printAST = void 0;
|
||||
var tslib_1 = require("tslib");
|
||||
var types_1 = require("./types");
|
||||
function printAST(ast) {
|
||||
return doPrintAST(ast, false);
|
||||
}
|
||||
exports.printAST = printAST;
|
||||
function doPrintAST(ast, isInPlural) {
|
||||
var printedNodes = ast.map(function (el) {
|
||||
if ((0, types_1.isLiteralElement)(el)) {
|
||||
return printLiteralElement(el, isInPlural);
|
||||
}
|
||||
if ((0, types_1.isArgumentElement)(el)) {
|
||||
return printArgumentElement(el);
|
||||
}
|
||||
if ((0, types_1.isDateElement)(el) || (0, types_1.isTimeElement)(el) || (0, types_1.isNumberElement)(el)) {
|
||||
return printSimpleFormatElement(el);
|
||||
}
|
||||
if ((0, types_1.isPluralElement)(el)) {
|
||||
return printPluralElement(el);
|
||||
}
|
||||
if ((0, types_1.isSelectElement)(el)) {
|
||||
return printSelectElement(el);
|
||||
}
|
||||
if ((0, types_1.isPoundElement)(el)) {
|
||||
return '#';
|
||||
}
|
||||
if ((0, types_1.isTagElement)(el)) {
|
||||
return printTagElement(el);
|
||||
}
|
||||
});
|
||||
return printedNodes.join('');
|
||||
}
|
||||
exports.doPrintAST = doPrintAST;
|
||||
function printTagElement(el) {
|
||||
return "<".concat(el.value, ">").concat(printAST(el.children), "</").concat(el.value, ">");
|
||||
}
|
||||
function printEscapedMessage(message) {
|
||||
return message.replace(/([{}](?:.*[{}])?)/su, "'$1'");
|
||||
}
|
||||
function printLiteralElement(_a, isInPlural) {
|
||||
var value = _a.value;
|
||||
var escaped = printEscapedMessage(value);
|
||||
return isInPlural ? escaped.replace('#', "'#'") : escaped;
|
||||
}
|
||||
function printArgumentElement(_a) {
|
||||
var value = _a.value;
|
||||
return "{".concat(value, "}");
|
||||
}
|
||||
function printSimpleFormatElement(el) {
|
||||
return "{".concat(el.value, ", ").concat(types_1.TYPE[el.type]).concat(el.style ? ", ".concat(printArgumentStyle(el.style)) : '', "}");
|
||||
}
|
||||
function printNumberSkeletonToken(token) {
|
||||
var stem = token.stem, options = token.options;
|
||||
return options.length === 0
|
||||
? stem
|
||||
: "".concat(stem).concat(options.map(function (o) { return "/".concat(o); }).join(''));
|
||||
}
|
||||
function printArgumentStyle(style) {
|
||||
if (typeof style === 'string') {
|
||||
return printEscapedMessage(style);
|
||||
}
|
||||
else if (style.type === types_1.SKELETON_TYPE.dateTime) {
|
||||
return "::".concat(printDateTimeSkeleton(style));
|
||||
}
|
||||
else {
|
||||
return "::".concat(style.tokens.map(printNumberSkeletonToken).join(' '));
|
||||
}
|
||||
}
|
||||
function printDateTimeSkeleton(style) {
|
||||
return style.pattern;
|
||||
}
|
||||
exports.printDateTimeSkeleton = printDateTimeSkeleton;
|
||||
function printSelectElement(el) {
|
||||
var msg = [
|
||||
el.value,
|
||||
'select',
|
||||
Object.keys(el.options)
|
||||
.map(function (id) { return "".concat(id, "{").concat(doPrintAST(el.options[id].value, false), "}"); })
|
||||
.join(' '),
|
||||
].join(',');
|
||||
return "{".concat(msg, "}");
|
||||
}
|
||||
function printPluralElement(el) {
|
||||
var type = el.pluralType === 'cardinal' ? 'plural' : 'selectordinal';
|
||||
var msg = [
|
||||
el.value,
|
||||
type,
|
||||
(0, tslib_1.__spreadArray)([
|
||||
el.offset ? "offset:".concat(el.offset) : ''
|
||||
], Object.keys(el.options).map(function (id) { return "".concat(id, "{").concat(doPrintAST(el.options[id].value, true), "}"); }), true).filter(Boolean)
|
||||
.join(' '),
|
||||
].join(',');
|
||||
return "{".concat(msg, "}");
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"2":"C K L G M N O P Q R S T U V W X Y Z H","578":"a b c d e i j k l m n o p q r s t u f"},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 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 EC FC","322":"Z a b c d e i j k l m n o p q r s t u f H xB yB"},D:{"2":"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 H xB yB GC","194":"a b c d e i j k l m n o p q r s t u f"},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 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 PC QC RC SC qB AC TC rB","194":"oB pB P Q R wB S T U V W X Y Z a b c d e"},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:{"2":"I 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:6,C:"JPEG XL image format"};
|
||||
@@ -0,0 +1,143 @@
|
||||
# graceful-fs
|
||||
|
||||
graceful-fs functions as a drop-in replacement for the fs module,
|
||||
making various improvements.
|
||||
|
||||
The improvements are meant to normalize behavior across different
|
||||
platforms and environments, and to make filesystem access more
|
||||
resilient to errors.
|
||||
|
||||
## Improvements over [fs module](https://nodejs.org/api/fs.html)
|
||||
|
||||
* Queues up `open` and `readdir` calls, and retries them once
|
||||
something closes if there is an EMFILE error from too many file
|
||||
descriptors.
|
||||
* fixes `lchmod` for Node versions prior to 0.6.2.
|
||||
* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
|
||||
* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
|
||||
`lchown` if the user isn't root.
|
||||
* makes `lchmod` and `lchown` become noops, if not available.
|
||||
* retries reading a file if `read` results in EAGAIN error.
|
||||
|
||||
On Windows, it retries renaming a file for up to one second if `EACCESS`
|
||||
or `EPERM` error occurs, likely because antivirus software has locked
|
||||
the directory.
|
||||
|
||||
## USAGE
|
||||
|
||||
```javascript
|
||||
// use just like fs
|
||||
var fs = require('graceful-fs')
|
||||
|
||||
// now go and do stuff with it...
|
||||
fs.readFile('some-file-or-whatever', (err, data) => {
|
||||
// Do stuff here.
|
||||
})
|
||||
```
|
||||
|
||||
## Sync methods
|
||||
|
||||
This module cannot intercept or handle `EMFILE` or `ENFILE` errors from sync
|
||||
methods. If you use sync methods which open file descriptors then you are
|
||||
responsible for dealing with any errors.
|
||||
|
||||
This is a known limitation, not a bug.
|
||||
|
||||
## Global Patching
|
||||
|
||||
If you want to patch the global fs module (or any other fs-like
|
||||
module) you can do this:
|
||||
|
||||
```javascript
|
||||
// Make sure to read the caveat below.
|
||||
var realFs = require('fs')
|
||||
var gracefulFs = require('graceful-fs')
|
||||
gracefulFs.gracefulify(realFs)
|
||||
```
|
||||
|
||||
This should only ever be done at the top-level application layer, in
|
||||
order to delay on EMFILE errors from any fs-using dependencies. You
|
||||
should **not** do this in a library, because it can cause unexpected
|
||||
delays in other parts of the program.
|
||||
|
||||
## Changes
|
||||
|
||||
This module is fairly stable at this point, and used by a lot of
|
||||
things. That being said, because it implements a subtle behavior
|
||||
change in a core part of the node API, even modest changes can be
|
||||
extremely breaking, and the versioning is thus biased towards
|
||||
bumping the major when in doubt.
|
||||
|
||||
The main change between major versions has been switching between
|
||||
providing a fully-patched `fs` module vs monkey-patching the node core
|
||||
builtin, and the approach by which a non-monkey-patched `fs` was
|
||||
created.
|
||||
|
||||
The goal is to trade `EMFILE` errors for slower fs operations. So, if
|
||||
you try to open a zillion files, rather than crashing, `open`
|
||||
operations will be queued up and wait for something else to `close`.
|
||||
|
||||
There are advantages to each approach. Monkey-patching the fs means
|
||||
that no `EMFILE` errors can possibly occur anywhere in your
|
||||
application, because everything is using the same core `fs` module,
|
||||
which is patched. However, it can also obviously cause undesirable
|
||||
side-effects, especially if the module is loaded multiple times.
|
||||
|
||||
Implementing a separate-but-identical patched `fs` module is more
|
||||
surgical (and doesn't run the risk of patching multiple times), but
|
||||
also imposes the challenge of keeping in sync with the core module.
|
||||
|
||||
The current approach loads the `fs` module, and then creates a
|
||||
lookalike object that has all the same methods, except a few that are
|
||||
patched. It is safe to use in all versions of Node from 0.8 through
|
||||
7.0.
|
||||
|
||||
### v4
|
||||
|
||||
* Do not monkey-patch the fs module. This module may now be used as a
|
||||
drop-in dep, and users can opt into monkey-patching the fs builtin
|
||||
if their app requires it.
|
||||
|
||||
### v3
|
||||
|
||||
* Monkey-patch fs, because the eval approach no longer works on recent
|
||||
node.
|
||||
* fixed possible type-error throw if rename fails on windows
|
||||
* verify that we *never* get EMFILE errors
|
||||
* Ignore ENOSYS from chmod/chown
|
||||
* clarify that graceful-fs must be used as a drop-in
|
||||
|
||||
### v2.1.0
|
||||
|
||||
* Use eval rather than monkey-patching fs.
|
||||
* readdir: Always sort the results
|
||||
* win32: requeue a file if error has an OK status
|
||||
|
||||
### v2.0
|
||||
|
||||
* A return to monkey patching
|
||||
* wrap process.cwd
|
||||
|
||||
### v1.1
|
||||
|
||||
* wrap readFile
|
||||
* Wrap fs.writeFile.
|
||||
* readdir protection
|
||||
* Don't clobber the fs builtin
|
||||
* Handle fs.read EAGAIN errors by trying again
|
||||
* Expose the curOpen counter
|
||||
* No-op lchown/lchmod if not implemented
|
||||
* fs.rename patch only for win32
|
||||
* Patch fs.rename to handle AV software on Windows
|
||||
* Close #4 Chown should not fail on einval or eperm if non-root
|
||||
* Fix isaacs/fstream#1 Only wrap fs one time
|
||||
* Fix #3 Start at 1024 max files, then back off on EMFILE
|
||||
* lutimes that doens't blow up on Linux
|
||||
* A full on-rewrite using a queue instead of just swallowing the EMFILE error
|
||||
* Wrap Read/Write streams as well
|
||||
|
||||
### 1.0
|
||||
|
||||
* Update engines for node 0.6
|
||||
* Be lstat-graceful on Windows
|
||||
* first
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H","2":"C K L G M N O"},C:{"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 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"},D:{"1":"dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB"},E:{"2":"I v J D E F A B C HC zB IC JC KC LC 0B qB","194":"K L G rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"1":"SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB PC QC RC SC qB AC TC rB"},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:{"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:{"2":"H"},N:{"2":"A B"},O:{"1":"vC"},P:{"2":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"2":"AD BD"}},B:4,C:"CSS Painting API"};
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "xdg-basedir",
|
||||
"version": "5.1.0",
|
||||
"description": "Get XDG Base Directory paths",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/xdg-basedir",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": "./index.js",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"xdg",
|
||||
"base",
|
||||
"directory",
|
||||
"basedir",
|
||||
"path",
|
||||
"data",
|
||||
"config",
|
||||
"cache",
|
||||
"linux",
|
||||
"unix",
|
||||
"spec"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"import-fresh": "^3.0.0",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
},
|
||||
"ava": {
|
||||
"serial": true
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,16 @@
|
||||
# Installation
|
||||
> `npm install --save @types/pug`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for pug (https://github.com/pugjs/pug).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pug.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Thu, 23 Dec 2021 23:35:19 GMT
|
||||
* Dependencies: none
|
||||
* Global values: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [TonyYang](https://github.com/TonyPythoneer).
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('groupBy', require('../groupBy'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
|
||||
var toPosInt = require("../../number/to-pos-integer")
|
||||
, eq = require("../../object/eq")
|
||||
, value = require("../../object/valid-value")
|
||||
, objHasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
|
||||
module.exports = function (other) {
|
||||
var i, length;
|
||||
value(this);
|
||||
value(other);
|
||||
length = toPosInt(this.length);
|
||||
if (length !== toPosInt(other.length)) return false;
|
||||
for (i = 0; i < length; ++i) {
|
||||
if (objHasOwnProperty.call(this, i) !== objHasOwnProperty.call(other, i)) {
|
||||
return false;
|
||||
}
|
||||
if (!eq(this[i], other[i])) return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
# `Math.ceil10` _(ext/math/ceil-10)_
|
||||
|
||||
Decimal ceil
|
||||
|
||||
```javascript
|
||||
const ceil10 = require("ext/math/ceil-10");
|
||||
|
||||
ceil10(55.51, -1); // 55.6
|
||||
ceil10(-59, 1); // -50;
|
||||
```
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"race.js","sourceRoot":"","sources":["../../../../src/internal/observable/race.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAC3C,yCAAwC;AAGxC,yDAAwD;AACxD,sEAA2E;AA6C3E,SAAgB,IAAI;IAAI,iBAAyD;SAAzD,UAAyD,EAAzD,qBAAyD,EAAzD,IAAyD;QAAzD,4BAAyD;;IAC/E,OAAO,GAAG,+BAAc,CAAC,OAAO,CAAC,CAAC;IAElC,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,qBAAS,CAAC,OAAO,CAAC,CAAC,CAAuB,CAAC,CAAC,CAAC,CAAC,IAAI,uBAAU,CAAI,QAAQ,CAAC,OAA+B,CAAC,CAAC,CAAC;AAC3I,CAAC;AAJD,oBAIC;AAOD,SAAgB,QAAQ,CAAI,OAA6B;IACvD,OAAO,UAAC,UAAyB;QAC/B,IAAI,aAAa,GAAmB,EAAE,CAAC;gCAM9B,CAAC;YACR,aAAa,CAAC,IAAI,CAChB,qBAAS,CAAC,OAAO,CAAC,CAAC,CAAuB,CAAC,CAAC,SAAS,CACnD,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;gBACzC,IAAI,aAAa,EAAE;oBAGjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;wBAC7C,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;qBAC3C;oBACD,aAAa,GAAG,IAAK,CAAC;iBACvB;gBACD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC,CAAC,CACH,CACF,CAAC;;QAfJ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,aAAa,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE;oBAArE,CAAC;SAgBT;IACH,CAAC,CAAC;AACJ,CAAC;AA1BD,4BA0BC"}
|
||||
@@ -0,0 +1,34 @@
|
||||
var baseExtremum = require('./_baseExtremum'),
|
||||
baseGt = require('./_baseGt'),
|
||||
baseIteratee = require('./_baseIteratee');
|
||||
|
||||
/**
|
||||
* This method is like `_.max` except that it accepts `iteratee` which is
|
||||
* invoked for each element in `array` to generate the criterion by which
|
||||
* the value is ranked. The iteratee is invoked with one argument: (value).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Math
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
||||
* @returns {*} Returns the maximum value.
|
||||
* @example
|
||||
*
|
||||
* var objects = [{ 'n': 1 }, { 'n': 2 }];
|
||||
*
|
||||
* _.maxBy(objects, function(o) { return o.n; });
|
||||
* // => { 'n': 2 }
|
||||
*
|
||||
* // The `_.property` iteratee shorthand.
|
||||
* _.maxBy(objects, 'n');
|
||||
* // => { 'n': 2 }
|
||||
*/
|
||||
function maxBy(array, iteratee) {
|
||||
return (array && array.length)
|
||||
? baseExtremum(array, baseIteratee(iteratee, 2), baseGt)
|
||||
: undefined;
|
||||
}
|
||||
|
||||
module.exports = maxBy;
|
||||
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = require("./_iterate")(require("../array/#/find"), false);
|
||||
@@ -0,0 +1,46 @@
|
||||
var arrayFilter = require('./_arrayFilter'),
|
||||
baseFilter = require('./_baseFilter'),
|
||||
baseIteratee = require('./_baseIteratee'),
|
||||
isArray = require('./isArray'),
|
||||
negate = require('./negate');
|
||||
|
||||
/**
|
||||
* The opposite of `_.filter`; this method returns the elements of `collection`
|
||||
* that `predicate` does **not** return truthy for.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Collection
|
||||
* @param {Array|Object} collection The collection to iterate over.
|
||||
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
||||
* @returns {Array} Returns the new filtered array.
|
||||
* @see _.filter
|
||||
* @example
|
||||
*
|
||||
* var users = [
|
||||
* { 'user': 'barney', 'age': 36, 'active': false },
|
||||
* { 'user': 'fred', 'age': 40, 'active': true }
|
||||
* ];
|
||||
*
|
||||
* _.reject(users, function(o) { return !o.active; });
|
||||
* // => objects for ['fred']
|
||||
*
|
||||
* // The `_.matches` iteratee shorthand.
|
||||
* _.reject(users, { 'age': 40, 'active': true });
|
||||
* // => objects for ['barney']
|
||||
*
|
||||
* // The `_.matchesProperty` iteratee shorthand.
|
||||
* _.reject(users, ['active', false]);
|
||||
* // => objects for ['fred']
|
||||
*
|
||||
* // The `_.property` iteratee shorthand.
|
||||
* _.reject(users, 'active');
|
||||
* // => objects for ['barney']
|
||||
*/
|
||||
function reject(collection, predicate) {
|
||||
var func = isArray(collection) ? arrayFilter : baseFilter;
|
||||
return func(collection, negate(baseIteratee(predicate, 3)));
|
||||
}
|
||||
|
||||
module.exports = reject;
|
||||
@@ -0,0 +1,69 @@
|
||||
'use strict';
|
||||
|
||||
var has = require('has');
|
||||
|
||||
function specifierIncluded(current, specifier) {
|
||||
var nodeParts = current.split('.');
|
||||
var parts = specifier.split(' ');
|
||||
var op = parts.length > 1 ? parts[0] : '=';
|
||||
var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');
|
||||
|
||||
for (var i = 0; i < 3; ++i) {
|
||||
var cur = parseInt(nodeParts[i] || 0, 10);
|
||||
var ver = parseInt(versionParts[i] || 0, 10);
|
||||
if (cur === ver) {
|
||||
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
||||
}
|
||||
if (op === '<') {
|
||||
return cur < ver;
|
||||
}
|
||||
if (op === '>=') {
|
||||
return cur >= ver;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return op === '>=';
|
||||
}
|
||||
|
||||
function matchesRange(current, range) {
|
||||
var specifiers = range.split(/ ?&& ?/);
|
||||
if (specifiers.length === 0) {
|
||||
return false;
|
||||
}
|
||||
for (var i = 0; i < specifiers.length; ++i) {
|
||||
if (!specifierIncluded(current, specifiers[i])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function versionIncluded(nodeVersion, specifierValue) {
|
||||
if (typeof specifierValue === 'boolean') {
|
||||
return specifierValue;
|
||||
}
|
||||
|
||||
var current = typeof nodeVersion === 'undefined'
|
||||
? process.versions && process.versions.node
|
||||
: nodeVersion;
|
||||
|
||||
if (typeof current !== 'string') {
|
||||
throw new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required');
|
||||
}
|
||||
|
||||
if (specifierValue && typeof specifierValue === 'object') {
|
||||
for (var i = 0; i < specifierValue.length; ++i) {
|
||||
if (matchesRange(current, specifierValue[i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return matchesRange(current, specifierValue);
|
||||
}
|
||||
|
||||
var data = require('./core.json');
|
||||
|
||||
module.exports = function isCore(x, nodeVersion) {
|
||||
return has(data, x) && versionIncluded(nodeVersion, data[x]);
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"Commands:": "Příkazy:",
|
||||
"Options:": "Možnosti:",
|
||||
"Examples:": "Příklady:",
|
||||
"boolean": "logická hodnota",
|
||||
"count": "počet",
|
||||
"string": "řetězec",
|
||||
"number": "číslo",
|
||||
"array": "pole",
|
||||
"required": "povinné",
|
||||
"default": "výchozí",
|
||||
"default:": "výchozí:",
|
||||
"choices:": "volby:",
|
||||
"aliases:": "aliasy:",
|
||||
"generated-value": "generovaná-hodnota",
|
||||
"Not enough non-option arguments: got %s, need at least %s": {
|
||||
"one": "Nedostatek argumentů: zadáno %s, je potřeba alespoň %s",
|
||||
"other": "Nedostatek argumentů: zadáno %s, je potřeba alespoň %s"
|
||||
},
|
||||
"Too many non-option arguments: got %s, maximum of %s": {
|
||||
"one": "Příliš mnoho argumentů: zadáno %s, maximálně %s",
|
||||
"other": "Příliš mnoho argumentů: zadáno %s, maximálně %s"
|
||||
},
|
||||
"Missing argument value: %s": {
|
||||
"one": "Chybí hodnota argumentu: %s",
|
||||
"other": "Chybí hodnoty argumentů: %s"
|
||||
},
|
||||
"Missing required argument: %s": {
|
||||
"one": "Chybí požadovaný argument: %s",
|
||||
"other": "Chybí požadované argumenty: %s"
|
||||
},
|
||||
"Unknown argument: %s": {
|
||||
"one": "Neznámý argument: %s",
|
||||
"other": "Neznámé argumenty: %s"
|
||||
},
|
||||
"Invalid values:": "Neplatné hodnoty:",
|
||||
"Argument: %s, Given: %s, Choices: %s": "Argument: %s, Zadáno: %s, Možnosti: %s",
|
||||
"Argument check failed: %s": "Kontrola argumentů se nezdařila: %s",
|
||||
"Implications failed:": "Chybí závislé argumenty:",
|
||||
"Not enough arguments following: %s": "Následuje nedostatek argumentů: %s",
|
||||
"Invalid JSON config file: %s": "Neplatný konfigurační soubor JSON: %s",
|
||||
"Path to JSON config file": "Cesta ke konfiguračnímu souboru JSON",
|
||||
"Show help": "Zobrazit nápovědu",
|
||||
"Show version number": "Zobrazit číslo verze",
|
||||
"Did you mean %s?": "Měl jste na mysli %s?",
|
||||
"Arguments %s and %s are mutually exclusive" : "Argumenty %s a %s se vzájemně vylučují",
|
||||
"Positionals:": "Poziční:",
|
||||
"command": "příkaz",
|
||||
"deprecated": "zastaralé",
|
||||
"deprecated: %s": "zastaralé: %s"
|
||||
}
|
||||
Reference in New Issue
Block a user