new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
/*jshint node:true */
|
||||
module.exports = function(grunt) {
|
||||
'use strict';
|
||||
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
|
||||
complexity: {
|
||||
options: {
|
||||
errorsOnly: false,
|
||||
cyclomatic: 10,
|
||||
halstead: 30,
|
||||
maintainability: 85
|
||||
},
|
||||
generic: {
|
||||
src: [
|
||||
'mousetrap.js'
|
||||
]
|
||||
},
|
||||
plugins: {
|
||||
src: [
|
||||
'plugins/**/*.js',
|
||||
'!plugins/**/tests/**',
|
||||
'!plugins/**/*.min.js'
|
||||
]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-complexity');
|
||||
|
||||
grunt.registerTask('default', [
|
||||
'complexity'
|
||||
]);
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
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 @@
|
||||
module.exports={A:{A:{"1":"A B","2":"J D E F CC"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"DC tB EC FC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"1":"v J D E F A B C K L G IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","132":"I HC zB"},F:{"1":"0 1 2 3 4 5 6 7 8 9 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 AC TC rB","2":"F PC QC RC SC","132":"B qB"},G:{"1":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"1":"oC"},I:{"1":"tB f pC qC rC BC tC uC","4":"I sC"},J:{"1":"D A"},K:{"1":"B C h qB AC rB","2":"A"},L:{"1":"H"},M:{"1":"H"},N:{"1":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:1,C:"input placeholder attribute"};
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "*",
|
||||
"target": {
|
||||
"node": "supported"
|
||||
},
|
||||
"response": {
|
||||
"type": "time-permitting"
|
||||
},
|
||||
"backing": {
|
||||
"npm-funding": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"@octokit/rest","version":"19.0.7","files":{"LICENSE":{"checkedAt":1678883671011,"integrity":"sha512-2oXOUkQqQGNonR4gmu44UWYJ8IKTzMRqzDZT+9P3ByMfbt2JRH2hYcyfGfxnwXWThg5+OwtiU+WqdKPvGqLacg==","mode":420,"size":1137},"dist-src/index.js":{"checkedAt":1678883671011,"integrity":"sha512-kkZ5DLwIb72WZ7U2KF4n8BqfpquKN3u6cvgveflLF+mQyyQU4ZnQDYsaFqAkvGl/dt1hZ0dhpBnKWm+DaZHilg==","mode":420,"size":437},"dist-node/index.js":{"checkedAt":1678883671011,"integrity":"sha512-8/qN4Xo+3yiRT+S3Owbdh+ajvSesZF2c8vdUl5P0ZdlktNkeYkeLlAe612MtMxvmDnduXNbi5JAVtP3GhrnVeg==","mode":420,"size":626},"dist-web/index.js":{"checkedAt":1678883671011,"integrity":"sha512-UlWuSXDZHLMNiqiIA4dJGixAhomSXVwmuULQHyeaEVpNBoKR+K2GeDlYD34OUqjE9ScGX98QGeqMfFr0vJ/EGA==","mode":420,"size":486},"package.json":{"checkedAt":1678883671011,"integrity":"sha512-dMoWKBbffYn3jheg3mMUTNS9l51FX4IwtsmiQkHv9GedRN1olTwPreZqBkacw73Gq88+4bytOgOUSda6jIIUSQ==","mode":420,"size":1675},"dist-src/version.js":{"checkedAt":1678883671011,"integrity":"sha512-LxKGIXjcm+yzWOp0p9ihIY0Hrrwtpm4qShmHIcqT3SwpspEY5EjfKotoom6QtR6/snDSWJEmgFyABr7jGpOdhg==","mode":420,"size":33},"dist-node/index.js.map":{"checkedAt":1678883671011,"integrity":"sha512-RougCYfPL7wdAD+WpBprDKwqbDiPcQlSo+lE4Qud7i6nkFea5Hb4gPcYExf0mRG1f+Z/X3AyeLByh95VsPn06w==","mode":420,"size":925},"dist-web/index.js.map":{"checkedAt":1678883671011,"integrity":"sha512-yrrBfJr9MyozfpFgHq0JTgA7cjr1D364f/ZtUYSkZx1qzAocTVY0PVDpI/sk3m8M6GxPMDwMwzqx8Fwbpx+fQQ==","mode":420,"size":832},"README.md":{"checkedAt":1678883671011,"integrity":"sha512-+BrV/nUB7UyQUCU81xayj+2efelb3gFqSMplu4prwRAyxvJ/tToBjf66uuc82i+HlqwuOGl9gpkX4ztPVfBBGw==","mode":420,"size":1951},"dist-types/version.d.ts":{"checkedAt":1678883671011,"integrity":"sha512-00p4J+6z7UBwNtFuEgFgUb+EndD35eExvT17WK6uBe+l+AKtqxCeloenvEb1RDwuozbyDhJ6k3XGtF3umGyFIQ==","mode":420,"size":41},"dist-types/index.d.ts":{"checkedAt":1678883671011,"integrity":"sha512-DRfdNHxm8ccWAXPlH1Wp6lWDzv7lCL1jnlIzuh95ZxJY/mesI80cRG21ijdAEWaOfRBP3SMPjkKvq7sG/uJN4Q==","mode":420,"size":533}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"parse-proxy-response.js","sourceRoot":"","sources":["../src/parse-proxy-response.ts"],"names":[],"mappings":";;;;;AAAA,kDAAgC;AAGhC,MAAM,KAAK,GAAG,eAAW,CAAC,wCAAwC,CAAC,CAAC;AAOpE,SAAwB,kBAAkB,CACzC,MAAgB;IAEhB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtC,+EAA+E;QAC/E,gFAAgF;QAChF,8EAA8E;QAC9E,8BAA8B;QAC9B,IAAI,aAAa,GAAG,CAAC,CAAC;QACtB,MAAM,OAAO,GAAa,EAAE,CAAC;QAE7B,SAAS,IAAI;YACZ,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;YACxB,IAAI,CAAC;gBAAE,MAAM,CAAC,CAAC,CAAC,CAAC;;gBACZ,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACpC,CAAC;QAED,SAAS,OAAO;YACf,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YACpC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACxC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACxC,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACzC,CAAC;QAED,SAAS,OAAO,CAAC,GAAW;YAC3B,KAAK,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;QACpC,CAAC;QAED,SAAS,KAAK;YACb,KAAK,CAAC,OAAO,CAAC,CAAC;QAChB,CAAC;QAED,SAAS,OAAO,CAAC,GAAU;YAC1B,OAAO,EAAE,CAAC;YACV,KAAK,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;YACzB,MAAM,CAAC,GAAG,CAAC,CAAC;QACb,CAAC;QAED,SAAS,MAAM,CAAC,CAAS;YACxB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChB,aAAa,IAAI,CAAC,CAAC,MAAM,CAAC;YAE1B,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;YACvD,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAElD,IAAI,YAAY,KAAK,CAAC,CAAC,EAAE;gBACxB,iBAAiB;gBACjB,KAAK,CAAC,8CAA8C,CAAC,CAAC;gBACtD,IAAI,EAAE,CAAC;gBACP,OAAO;aACP;YAED,MAAM,SAAS,GAAG,QAAQ,CAAC,QAAQ,CAClC,OAAO,EACP,CAAC,EACD,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CACxB,CAAC;YACF,MAAM,UAAU,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,KAAK,CAAC,+BAA+B,EAAE,SAAS,CAAC,CAAC;YAClD,OAAO,CAAC;gBACP,UAAU;gBACV,QAAQ;aACR,CAAC,CAAC;QACJ,CAAC;QAED,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5B,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAExB,IAAI,EAAE,CAAC;IACR,CAAC,CAAC,CAAC;AACJ,CAAC;AAvED,qCAuEC"}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"debounceTime.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/debounceTime.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAmB,aAAa,EAAE,MAAM,UAAU,CAAC;AAIpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAE,aAA8B,GAAG,wBAAwB,CAAC,CAAC,CAAC,CA4DvH"}
|
||||
@@ -0,0 +1,64 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.repeat = void 0;
|
||||
var empty_1 = require("../observable/empty");
|
||||
var lift_1 = require("../util/lift");
|
||||
var OperatorSubscriber_1 = require("./OperatorSubscriber");
|
||||
var innerFrom_1 = require("../observable/innerFrom");
|
||||
var timer_1 = require("../observable/timer");
|
||||
function repeat(countOrConfig) {
|
||||
var _a;
|
||||
var count = Infinity;
|
||||
var delay;
|
||||
if (countOrConfig != null) {
|
||||
if (typeof countOrConfig === 'object') {
|
||||
(_a = countOrConfig.count, count = _a === void 0 ? Infinity : _a, delay = countOrConfig.delay);
|
||||
}
|
||||
else {
|
||||
count = countOrConfig;
|
||||
}
|
||||
}
|
||||
return count <= 0
|
||||
? function () { return empty_1.EMPTY; }
|
||||
: lift_1.operate(function (source, subscriber) {
|
||||
var soFar = 0;
|
||||
var sourceSub;
|
||||
var resubscribe = function () {
|
||||
sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe();
|
||||
sourceSub = null;
|
||||
if (delay != null) {
|
||||
var notifier = typeof delay === 'number' ? timer_1.timer(delay) : innerFrom_1.innerFrom(delay(soFar));
|
||||
var notifierSubscriber_1 = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () {
|
||||
notifierSubscriber_1.unsubscribe();
|
||||
subscribeToSource();
|
||||
});
|
||||
notifier.subscribe(notifierSubscriber_1);
|
||||
}
|
||||
else {
|
||||
subscribeToSource();
|
||||
}
|
||||
};
|
||||
var subscribeToSource = function () {
|
||||
var syncUnsub = false;
|
||||
sourceSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, function () {
|
||||
if (++soFar < count) {
|
||||
if (sourceSub) {
|
||||
resubscribe();
|
||||
}
|
||||
else {
|
||||
syncUnsub = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
subscriber.complete();
|
||||
}
|
||||
}));
|
||||
if (syncUnsub) {
|
||||
resubscribe();
|
||||
}
|
||||
};
|
||||
subscribeToSource();
|
||||
});
|
||||
}
|
||||
exports.repeat = repeat;
|
||||
//# sourceMappingURL=repeat.js.map
|
||||
@@ -0,0 +1,17 @@
|
||||
import assertString from './util/assertString';
|
||||
import isBase64 from './isBase64';
|
||||
export default function isJWT(str) {
|
||||
assertString(str);
|
||||
var dotSplit = str.split('.');
|
||||
var len = dotSplit.length;
|
||||
|
||||
if (len > 3 || len < 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return dotSplit.reduce(function (acc, currElem) {
|
||||
return acc && isBase64(currElem, {
|
||||
urlSafe: true
|
||||
});
|
||||
}, true);
|
||||
}
|
||||
@@ -0,0 +1,690 @@
|
||||
import type {LiteralUnion} from './literal-union';
|
||||
import type {JsonObject, JsonValue} from './basic';
|
||||
|
||||
declare namespace PackageJson {
|
||||
/**
|
||||
A person who has been involved in creating or maintaining the package.
|
||||
*/
|
||||
export type Person =
|
||||
| string
|
||||
| {
|
||||
name: string;
|
||||
url?: string;
|
||||
email?: string;
|
||||
};
|
||||
|
||||
export type BugsLocation =
|
||||
| string
|
||||
| {
|
||||
/**
|
||||
The URL to the package's issue tracker.
|
||||
*/
|
||||
url?: string;
|
||||
|
||||
/**
|
||||
The email address to which issues should be reported.
|
||||
*/
|
||||
email?: string;
|
||||
};
|
||||
|
||||
export type DirectoryLocations = {
|
||||
[directoryType: string]: JsonValue | undefined;
|
||||
|
||||
/**
|
||||
Location for executable scripts. Sugar to generate entries in the `bin` property by walking the folder.
|
||||
*/
|
||||
bin?: string;
|
||||
|
||||
/**
|
||||
Location for Markdown files.
|
||||
*/
|
||||
doc?: string;
|
||||
|
||||
/**
|
||||
Location for example scripts.
|
||||
*/
|
||||
example?: string;
|
||||
|
||||
/**
|
||||
Location for the bulk of the library.
|
||||
*/
|
||||
lib?: string;
|
||||
|
||||
/**
|
||||
Location for man pages. Sugar to generate a `man` array by walking the folder.
|
||||
*/
|
||||
man?: string;
|
||||
|
||||
/**
|
||||
Location for test files.
|
||||
*/
|
||||
test?: string;
|
||||
};
|
||||
|
||||
export type Scripts = {
|
||||
/**
|
||||
Run **before** the package is published (Also run on local `npm install` without any arguments).
|
||||
*/
|
||||
prepublish?: string;
|
||||
|
||||
/**
|
||||
Run both **before** the package is packed and published, and on local `npm install` without any arguments. This is run **after** `prepublish`, but **before** `prepublishOnly`.
|
||||
*/
|
||||
prepare?: string;
|
||||
|
||||
/**
|
||||
Run **before** the package is prepared and packed, **only** on `npm publish`.
|
||||
*/
|
||||
prepublishOnly?: string;
|
||||
|
||||
/**
|
||||
Run **before** a tarball is packed (on `npm pack`, `npm publish`, and when installing git dependencies).
|
||||
*/
|
||||
prepack?: string;
|
||||
|
||||
/**
|
||||
Run **after** the tarball has been generated and moved to its final destination.
|
||||
*/
|
||||
postpack?: string;
|
||||
|
||||
/**
|
||||
Run **after** the package is published.
|
||||
*/
|
||||
publish?: string;
|
||||
|
||||
/**
|
||||
Run **after** the package is published.
|
||||
*/
|
||||
postpublish?: string;
|
||||
|
||||
/**
|
||||
Run **before** the package is installed.
|
||||
*/
|
||||
preinstall?: string;
|
||||
|
||||
/**
|
||||
Run **after** the package is installed.
|
||||
*/
|
||||
install?: string;
|
||||
|
||||
/**
|
||||
Run **after** the package is installed and after `install`.
|
||||
*/
|
||||
postinstall?: string;
|
||||
|
||||
/**
|
||||
Run **before** the package is uninstalled and before `uninstall`.
|
||||
*/
|
||||
preuninstall?: string;
|
||||
|
||||
/**
|
||||
Run **before** the package is uninstalled.
|
||||
*/
|
||||
uninstall?: string;
|
||||
|
||||
/**
|
||||
Run **after** the package is uninstalled.
|
||||
*/
|
||||
postuninstall?: string;
|
||||
|
||||
/**
|
||||
Run **before** bump the package version and before `version`.
|
||||
*/
|
||||
preversion?: string;
|
||||
|
||||
/**
|
||||
Run **before** bump the package version.
|
||||
*/
|
||||
version?: string;
|
||||
|
||||
/**
|
||||
Run **after** bump the package version.
|
||||
*/
|
||||
postversion?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm test` command, before `test`.
|
||||
*/
|
||||
pretest?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm test` command.
|
||||
*/
|
||||
test?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm test` command, after `test`.
|
||||
*/
|
||||
posttest?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm stop` command, before `stop`.
|
||||
*/
|
||||
prestop?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm stop` command.
|
||||
*/
|
||||
stop?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm stop` command, after `stop`.
|
||||
*/
|
||||
poststop?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm start` command, before `start`.
|
||||
*/
|
||||
prestart?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm start` command.
|
||||
*/
|
||||
start?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm start` command, after `start`.
|
||||
*/
|
||||
poststart?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm restart` command, before `restart`. Note: `npm restart` will run the `stop` and `start` scripts if no `restart` script is provided.
|
||||
*/
|
||||
prerestart?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm restart` command. Note: `npm restart` will run the `stop` and `start` scripts if no `restart` script is provided.
|
||||
*/
|
||||
restart?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm restart` command, after `restart`. Note: `npm restart` will run the `stop` and `start` scripts if no `restart` script is provided.
|
||||
*/
|
||||
postrestart?: string;
|
||||
} & Partial<Record<string, string>>;
|
||||
|
||||
/**
|
||||
Dependencies of the package. The version range is a string which has one or more space-separated descriptors. Dependencies can also be identified with a tarball or Git URL.
|
||||
*/
|
||||
export type Dependency = Partial<Record<string, string>>;
|
||||
|
||||
/**
|
||||
Conditions which provide a way to resolve a package entry point based on the environment.
|
||||
*/
|
||||
export type ExportCondition = LiteralUnion<
|
||||
| 'import'
|
||||
| 'require'
|
||||
| 'node'
|
||||
| 'node-addons'
|
||||
| 'deno'
|
||||
| 'browser'
|
||||
| 'electron'
|
||||
| 'react-native'
|
||||
| 'default',
|
||||
string
|
||||
>;
|
||||
|
||||
/**
|
||||
A mapping of conditions and the paths to which they resolve.
|
||||
*/
|
||||
type ExportConditions = {[condition in ExportCondition]?: Exports};
|
||||
|
||||
/**
|
||||
Entry points of a module, optionally with conditions and subpath exports.
|
||||
*/
|
||||
export type Exports =
|
||||
| null
|
||||
| string
|
||||
| Array<string | ExportConditions>
|
||||
| ExportConditions;
|
||||
|
||||
/**
|
||||
Import map entries of a module, optionally with conditions and subpath imports.
|
||||
*/
|
||||
export type Imports = { // eslint-disable-line @typescript-eslint/consistent-indexed-object-style
|
||||
[key: `#${string}`]: Exports;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
||||
export interface NonStandardEntryPoints {
|
||||
/**
|
||||
An ECMAScript module ID that is the primary entry point to the program.
|
||||
*/
|
||||
module?: string;
|
||||
|
||||
/**
|
||||
A module ID with untranspiled code that is the primary entry point to the program.
|
||||
*/
|
||||
esnext?:
|
||||
| string
|
||||
| {
|
||||
[moduleName: string]: string | undefined;
|
||||
main?: string;
|
||||
browser?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
A hint to JavaScript bundlers or component tools when packaging modules for client side use.
|
||||
*/
|
||||
browser?:
|
||||
| string
|
||||
| Partial<Record<string, string | false>>;
|
||||
|
||||
/**
|
||||
Denote which files in your project are "pure" and therefore safe for Webpack to prune if unused.
|
||||
|
||||
[Read more.](https://webpack.js.org/guides/tree-shaking/)
|
||||
*/
|
||||
sideEffects?: boolean | string[];
|
||||
}
|
||||
|
||||
export type TypeScriptConfiguration = {
|
||||
/**
|
||||
Location of the bundled TypeScript declaration file.
|
||||
*/
|
||||
types?: string;
|
||||
|
||||
/**
|
||||
Version selection map of TypeScript.
|
||||
*/
|
||||
typesVersions?: Partial<Record<string, Partial<Record<string, string[]>>>>;
|
||||
|
||||
/**
|
||||
Location of the bundled TypeScript declaration file. Alias of `types`.
|
||||
*/
|
||||
typings?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
An alternative configuration for workspaces.
|
||||
*/
|
||||
export type WorkspaceConfig = {
|
||||
/**
|
||||
An array of workspace pattern strings which contain the workspace packages.
|
||||
*/
|
||||
packages?: WorkspacePattern[];
|
||||
|
||||
/**
|
||||
Designed to solve the problem of packages which break when their `node_modules` are moved to the root workspace directory - a process known as hoisting. For these packages, both within your workspace, and also some that have been installed via `node_modules`, it is important to have a mechanism for preventing the default Yarn workspace behavior. By adding workspace pattern strings here, Yarn will resume non-workspace behavior for any package which matches the defined patterns.
|
||||
|
||||
[Supported](https://classic.yarnpkg.com/blog/2018/02/15/nohoist/) by Yarn.
|
||||
[Not supported](https://github.com/npm/rfcs/issues/287) by npm.
|
||||
*/
|
||||
nohoist?: WorkspacePattern[];
|
||||
};
|
||||
|
||||
/**
|
||||
A workspace pattern points to a directory or group of directories which contain packages that should be included in the workspace installation process.
|
||||
|
||||
The patterns are handled with [minimatch](https://github.com/isaacs/minimatch).
|
||||
|
||||
@example
|
||||
`docs` → Include the docs directory and install its dependencies.
|
||||
`packages/*` → Include all nested directories within the packages directory, like `packages/cli` and `packages/core`.
|
||||
*/
|
||||
type WorkspacePattern = string;
|
||||
|
||||
export type YarnConfiguration = {
|
||||
/**
|
||||
If your package only allows one version of a given dependency, and you’d like to enforce the same behavior as `yarn install --flat` on the command-line, set this to `true`.
|
||||
|
||||
Note that if your `package.json` contains `"flat": true` and other packages depend on yours (e.g. you are building a library rather than an app), those other packages will also need `"flat": true` in their `package.json` or be installed with `yarn install --flat` on the command-line.
|
||||
*/
|
||||
flat?: boolean;
|
||||
|
||||
/**
|
||||
Selective version resolutions. Allows the definition of custom package versions inside dependencies without manual edits in the `yarn.lock` file.
|
||||
*/
|
||||
resolutions?: Dependency;
|
||||
};
|
||||
|
||||
export type JSPMConfiguration = {
|
||||
/**
|
||||
JSPM configuration.
|
||||
*/
|
||||
jspm?: PackageJson;
|
||||
};
|
||||
|
||||
/**
|
||||
Type for [npm's `package.json` file](https://docs.npmjs.com/creating-a-package-json-file). Containing standard npm properties.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
||||
export interface PackageJsonStandard {
|
||||
/**
|
||||
The name of the package.
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
Package version, parseable by [`node-semver`](https://github.com/npm/node-semver).
|
||||
*/
|
||||
version?: string;
|
||||
|
||||
/**
|
||||
Package description, listed in `npm search`.
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
Keywords associated with package, listed in `npm search`.
|
||||
*/
|
||||
keywords?: string[];
|
||||
|
||||
/**
|
||||
The URL to the package's homepage.
|
||||
*/
|
||||
homepage?: LiteralUnion<'.', string>;
|
||||
|
||||
/**
|
||||
The URL to the package's issue tracker and/or the email address to which issues should be reported.
|
||||
*/
|
||||
bugs?: BugsLocation;
|
||||
|
||||
/**
|
||||
The license for the package.
|
||||
*/
|
||||
license?: string;
|
||||
|
||||
/**
|
||||
The licenses for the package.
|
||||
*/
|
||||
licenses?: Array<{
|
||||
type?: string;
|
||||
url?: string;
|
||||
}>;
|
||||
|
||||
author?: Person;
|
||||
|
||||
/**
|
||||
A list of people who contributed to the package.
|
||||
*/
|
||||
contributors?: Person[];
|
||||
|
||||
/**
|
||||
A list of people who maintain the package.
|
||||
*/
|
||||
maintainers?: Person[];
|
||||
|
||||
/**
|
||||
The files included in the package.
|
||||
*/
|
||||
files?: string[];
|
||||
|
||||
/**
|
||||
Resolution algorithm for importing ".js" files from the package's scope.
|
||||
|
||||
[Read more.](https://nodejs.org/api/esm.html#esm_package_json_type_field)
|
||||
*/
|
||||
type?: 'module' | 'commonjs';
|
||||
|
||||
/**
|
||||
The module ID that is the primary entry point to the program.
|
||||
*/
|
||||
main?: string;
|
||||
|
||||
/**
|
||||
Subpath exports to define entry points of the package.
|
||||
|
||||
[Read more.](https://nodejs.org/api/packages.html#subpath-exports)
|
||||
*/
|
||||
exports?: Exports;
|
||||
|
||||
/**
|
||||
Subpath imports to define internal package import maps that only apply to import specifiers from within the package itself.
|
||||
|
||||
[Read more.](https://nodejs.org/api/packages.html#subpath-imports)
|
||||
*/
|
||||
imports?: Imports;
|
||||
|
||||
/**
|
||||
The executable files that should be installed into the `PATH`.
|
||||
*/
|
||||
bin?:
|
||||
| string
|
||||
| Partial<Record<string, string>>;
|
||||
|
||||
/**
|
||||
Filenames to put in place for the `man` program to find.
|
||||
*/
|
||||
man?: string | string[];
|
||||
|
||||
/**
|
||||
Indicates the structure of the package.
|
||||
*/
|
||||
directories?: DirectoryLocations;
|
||||
|
||||
/**
|
||||
Location for the code repository.
|
||||
*/
|
||||
repository?:
|
||||
| string
|
||||
| {
|
||||
type: string;
|
||||
url: string;
|
||||
|
||||
/**
|
||||
Relative path to package.json if it is placed in non-root directory (for example if it is part of a monorepo).
|
||||
|
||||
[Read more.](https://github.com/npm/rfcs/blob/latest/implemented/0010-monorepo-subdirectory-declaration.md)
|
||||
*/
|
||||
directory?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
Script commands that are run at various times in the lifecycle of the package. The key is the lifecycle event, and the value is the command to run at that point.
|
||||
*/
|
||||
scripts?: Scripts;
|
||||
|
||||
/**
|
||||
Is used to set configuration parameters used in package scripts that persist across upgrades.
|
||||
*/
|
||||
config?: JsonObject;
|
||||
|
||||
/**
|
||||
The dependencies of the package.
|
||||
*/
|
||||
dependencies?: Dependency;
|
||||
|
||||
/**
|
||||
Additional tooling dependencies that are not required for the package to work. Usually test, build, or documentation tooling.
|
||||
*/
|
||||
devDependencies?: Dependency;
|
||||
|
||||
/**
|
||||
Dependencies that are skipped if they fail to install.
|
||||
*/
|
||||
optionalDependencies?: Dependency;
|
||||
|
||||
/**
|
||||
Dependencies that will usually be required by the package user directly or via another dependency.
|
||||
*/
|
||||
peerDependencies?: Dependency;
|
||||
|
||||
/**
|
||||
Indicate peer dependencies that are optional.
|
||||
*/
|
||||
peerDependenciesMeta?: Partial<Record<string, {optional: true}>>;
|
||||
|
||||
/**
|
||||
Package names that are bundled when the package is published.
|
||||
*/
|
||||
bundledDependencies?: string[];
|
||||
|
||||
/**
|
||||
Alias of `bundledDependencies`.
|
||||
*/
|
||||
bundleDependencies?: string[];
|
||||
|
||||
/**
|
||||
Engines that this package runs on.
|
||||
*/
|
||||
engines?: {
|
||||
[EngineName in 'npm' | 'node' | string]?: string; // eslint-disable-line @typescript-eslint/no-redundant-type-constituents
|
||||
};
|
||||
|
||||
/**
|
||||
@deprecated
|
||||
*/
|
||||
engineStrict?: boolean;
|
||||
|
||||
/**
|
||||
Operating systems the module runs on.
|
||||
*/
|
||||
os?: Array<LiteralUnion<
|
||||
| 'aix'
|
||||
| 'darwin'
|
||||
| 'freebsd'
|
||||
| 'linux'
|
||||
| 'openbsd'
|
||||
| 'sunos'
|
||||
| 'win32'
|
||||
| '!aix'
|
||||
| '!darwin'
|
||||
| '!freebsd'
|
||||
| '!linux'
|
||||
| '!openbsd'
|
||||
| '!sunos'
|
||||
| '!win32',
|
||||
string
|
||||
>>;
|
||||
|
||||
/**
|
||||
CPU architectures the module runs on.
|
||||
*/
|
||||
cpu?: Array<LiteralUnion<
|
||||
| 'arm'
|
||||
| 'arm64'
|
||||
| 'ia32'
|
||||
| 'mips'
|
||||
| 'mipsel'
|
||||
| 'ppc'
|
||||
| 'ppc64'
|
||||
| 's390'
|
||||
| 's390x'
|
||||
| 'x32'
|
||||
| 'x64'
|
||||
| '!arm'
|
||||
| '!arm64'
|
||||
| '!ia32'
|
||||
| '!mips'
|
||||
| '!mipsel'
|
||||
| '!ppc'
|
||||
| '!ppc64'
|
||||
| '!s390'
|
||||
| '!s390x'
|
||||
| '!x32'
|
||||
| '!x64',
|
||||
string
|
||||
>>;
|
||||
|
||||
/**
|
||||
If set to `true`, a warning will be shown if package is installed locally. Useful if the package is primarily a command-line application that should be installed globally.
|
||||
|
||||
@deprecated
|
||||
*/
|
||||
preferGlobal?: boolean;
|
||||
|
||||
/**
|
||||
If set to `true`, then npm will refuse to publish it.
|
||||
*/
|
||||
private?: boolean;
|
||||
|
||||
/**
|
||||
A set of config values that will be used at publish-time. It's especially handy to set the tag, registry or access, to ensure that a given package is not tagged with 'latest', published to the global public registry or that a scoped module is private by default.
|
||||
*/
|
||||
publishConfig?: PublishConfig;
|
||||
|
||||
/**
|
||||
Describes and notifies consumers of a package's monetary support information.
|
||||
|
||||
[Read more.](https://github.com/npm/rfcs/blob/latest/accepted/0017-add-funding-support.md)
|
||||
*/
|
||||
funding?: string | {
|
||||
/**
|
||||
The type of funding.
|
||||
*/
|
||||
type?: LiteralUnion<
|
||||
| 'github'
|
||||
| 'opencollective'
|
||||
| 'patreon'
|
||||
| 'individual'
|
||||
| 'foundation'
|
||||
| 'corporation',
|
||||
string
|
||||
>;
|
||||
|
||||
/**
|
||||
The URL to the funding page.
|
||||
*/
|
||||
url: string;
|
||||
};
|
||||
|
||||
/**
|
||||
Used to configure [npm workspaces](https://docs.npmjs.com/cli/using-npm/workspaces) / [Yarn workspaces](https://classic.yarnpkg.com/docs/workspaces/).
|
||||
|
||||
Workspaces allow you to manage multiple packages within the same repository in such a way that you only need to run your install command once in order to install all of them in a single pass.
|
||||
|
||||
Please note that the top-level `private` property of `package.json` **must** be set to `true` in order to use workspaces.
|
||||
*/
|
||||
workspaces?: WorkspacePattern[] | WorkspaceConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
Type for [`package.json` file used by the Node.js runtime](https://nodejs.org/api/packages.html#nodejs-packagejson-field-definitions).
|
||||
*/
|
||||
export type NodeJsStandard = {
|
||||
/**
|
||||
Defines which package manager is expected to be used when working on the current project. It can set to any of the [supported package managers](https://nodejs.org/api/corepack.html#supported-package-managers), and will ensure that your teams use the exact same package manager versions without having to install anything else than Node.js.
|
||||
|
||||
__This field is currently experimental and needs to be opted-in; check the [Corepack](https://nodejs.org/api/corepack.html) page for details about the procedure.__
|
||||
|
||||
@example
|
||||
```json
|
||||
{
|
||||
"packageManager": "<package manager name>@<version>"
|
||||
}
|
||||
```
|
||||
*/
|
||||
packageManager?: string;
|
||||
};
|
||||
|
||||
export type PublishConfig = {
|
||||
/**
|
||||
Additional, less common properties from the [npm docs on `publishConfig`](https://docs.npmjs.com/cli/v7/configuring-npm/package-json#publishconfig).
|
||||
*/
|
||||
[additionalProperties: string]: JsonValue | undefined;
|
||||
|
||||
/**
|
||||
When publishing scoped packages, the access level defaults to restricted. If you want your scoped package to be publicly viewable (and installable) set `--access=public`. The only valid values for access are public and restricted. Unscoped packages always have an access level of public.
|
||||
*/
|
||||
access?: 'public' | 'restricted';
|
||||
|
||||
/**
|
||||
The base URL of the npm registry.
|
||||
|
||||
Default: `'https://registry.npmjs.org/'`
|
||||
*/
|
||||
registry?: string;
|
||||
|
||||
/**
|
||||
The tag to publish the package under.
|
||||
|
||||
Default: `'latest'`
|
||||
*/
|
||||
tag?: string;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
Type for [npm's `package.json` file](https://docs.npmjs.com/creating-a-package-json-file). Also includes types for fields used by other popular projects, like TypeScript and Yarn.
|
||||
|
||||
@category File
|
||||
*/
|
||||
export type PackageJson =
|
||||
JsonObject &
|
||||
PackageJson.NodeJsStandard &
|
||||
PackageJson.PackageJsonStandard &
|
||||
PackageJson.NonStandardEntryPoints &
|
||||
PackageJson.TypeScriptConfiguration &
|
||||
PackageJson.YarnConfiguration &
|
||||
PackageJson.JSPMConfiguration;
|
||||
@@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
|
||||
if (process.env.PRELOAD_GET_ITERATOR) {
|
||||
// eslint-disable-next-line global-require
|
||||
require('../');
|
||||
}
|
||||
|
||||
require('es5-shim');
|
||||
require('es6-shim');
|
||||
|
||||
require('./');
|
||||
@@ -0,0 +1,45 @@
|
||||
# is-symbol <sup>[![Version Badge][2]][1]</sup>
|
||||
|
||||
[![github actions][actions-image]][actions-url]
|
||||
[![coverage][codecov-image]][codecov-url]
|
||||
[![dependency status][5]][6]
|
||||
[![dev dependency status][7]][8]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][11]][1]
|
||||
|
||||
Is this an ES6 Symbol value?
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var isSymbol = require('is-symbol');
|
||||
assert(!isSymbol(function () {}));
|
||||
assert(!isSymbol(null));
|
||||
assert(!isSymbol(function* () { yield 42; return Infinity; });
|
||||
|
||||
assert(isSymbol(Symbol.iterator));
|
||||
assert(isSymbol(Symbol('foo')));
|
||||
assert(isSymbol(Symbol.for('foo')));
|
||||
assert(isSymbol(Object(Symbol('foo'))));
|
||||
```
|
||||
|
||||
## Tests
|
||||
Simply clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
[1]: https://npmjs.org/package/is-symbol
|
||||
[2]: https://versionbadg.es/inspect-js/is-symbol.svg
|
||||
[5]: https://david-dm.org/inspect-js/is-symbol.svg
|
||||
[6]: https://david-dm.org/inspect-js/is-symbol
|
||||
[7]: https://david-dm.org/inspect-js/is-symbol/dev-status.svg
|
||||
[8]: https://david-dm.org/inspect-js/is-symbol#info=devDependencies
|
||||
[11]: https://nodei.co/npm/is-symbol.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/is-symbol.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/is-symbol.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=is-symbol
|
||||
[codecov-image]: https://codecov.io/gh/inspect-js/is-symbol/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/inspect-js/is-symbol/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-symbol
|
||||
[actions-url]: https://github.com/inspect-js/is-symbol/actions
|
||||
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function () {
|
||||
var arr = [1, "foo"], iterator, result;
|
||||
if (typeof arr.entries !== "function") return false;
|
||||
iterator = arr.entries();
|
||||
if (!iterator) return false;
|
||||
if (typeof iterator.next !== "function") return false;
|
||||
result = iterator.next();
|
||||
if (!result || !result.value) return false;
|
||||
if (result.value[0] !== 0) return false;
|
||||
if (result.value[1] !== 1) return false;
|
||||
if (result.done !== false) return false;
|
||||
return true;
|
||||
};
|
||||
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
|
||||
var assert = require("chai").assert
|
||||
, isDate = require("../../date/is");
|
||||
|
||||
describe("date/is", function () {
|
||||
it("Should return true on date", function () { assert.equal(isDate(new Date()), true); });
|
||||
it("Should return false on invalid date", function () {
|
||||
assert.equal(isDate(new Date("foo")), false);
|
||||
});
|
||||
|
||||
it("Should return false on native date with no common API exposed", function () {
|
||||
var value = new Date();
|
||||
value.getFullYear = null;
|
||||
assert.equal(isDate(value), false);
|
||||
});
|
||||
it("Should return false on Date.prototype", function () {
|
||||
assert.equal(isDate(Date.prototype), false);
|
||||
});
|
||||
it("Should return false on time value", function () { assert.equal(isDate(12312313), false); });
|
||||
|
||||
it("Should return false on plain object", function () { assert.equal(isDate({}), false); });
|
||||
it("Should return false on function", function () {
|
||||
assert.equal(isDate(function () { return true; }), false);
|
||||
});
|
||||
|
||||
it("Should return false on array", function () { assert.equal(isDate([]), false); });
|
||||
if (typeof Object.create === "function") {
|
||||
it("Should return false on object with no prototype", function () {
|
||||
assert.equal(isDate(Object.create(null)), false);
|
||||
});
|
||||
}
|
||||
it("Should return false on string", function () { assert.equal(isDate("foo"), false); });
|
||||
it("Should return false on empty string", function () { assert.equal(isDate(""), false); });
|
||||
it("Should return false on number", function () { assert.equal(isDate(123), false); });
|
||||
it("Should return false on NaN", function () { assert.equal(isDate(NaN), false); });
|
||||
it("Should return false on boolean", function () { assert.equal(isDate(true), false); });
|
||||
if (typeof Symbol === "function") {
|
||||
it("Should return false on symbol", function () {
|
||||
assert.equal(isDate(Symbol("foo")), false);
|
||||
});
|
||||
}
|
||||
|
||||
it("Should return false on null", function () { assert.equal(isDate(null), false); });
|
||||
it("Should return false on undefined", function () { assert.equal(isDate(void 0), false); });
|
||||
});
|
||||
@@ -0,0 +1,31 @@
|
||||
var realNames = require('./_realNames');
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Gets the name of `func`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to query.
|
||||
* @returns {string} Returns the function name.
|
||||
*/
|
||||
function getFuncName(func) {
|
||||
var result = (func.name + ''),
|
||||
array = realNames[result],
|
||||
length = hasOwnProperty.call(realNames, result) ? array.length : 0;
|
||||
|
||||
while (length--) {
|
||||
var data = array[length],
|
||||
otherFunc = data.func;
|
||||
if (otherFunc == null || otherFunc == func) {
|
||||
return data.name;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
module.exports = getFuncName;
|
||||
@@ -0,0 +1,37 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = void 0;
|
||||
|
||||
var _node = _interopRequireDefault(require("./node"));
|
||||
|
||||
var _types = require("./types");
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
|
||||
var ID = /*#__PURE__*/function (_Node) {
|
||||
_inheritsLoose(ID, _Node);
|
||||
|
||||
function ID(opts) {
|
||||
var _this;
|
||||
|
||||
_this = _Node.call(this, opts) || this;
|
||||
_this.type = _types.ID;
|
||||
return _this;
|
||||
}
|
||||
|
||||
var _proto = ID.prototype;
|
||||
|
||||
_proto.valueToString = function valueToString() {
|
||||
return '#' + _Node.prototype.valueToString.call(this);
|
||||
};
|
||||
|
||||
return ID;
|
||||
}(_node["default"]);
|
||||
|
||||
exports["default"] = ID;
|
||||
module.exports = exports.default;
|
||||
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
// See https://github.com/facebook/jest/issues/2549
|
||||
// eslint-disable-next-line node/prefer-global/url
|
||||
const {URL} = require('url');
|
||||
const checkType = require('../utils/check-type.js');
|
||||
|
||||
module.exports = (self, proxyOptions) => {
|
||||
checkType('proxyOptions', proxyOptions, ['object']);
|
||||
checkType('proxyOptions.headers', proxyOptions.headers, ['object', 'undefined']);
|
||||
checkType('proxyOptions.raw', proxyOptions.raw, ['boolean', 'undefined']);
|
||||
checkType('proxyOptions.url', proxyOptions.url, [URL, 'string']);
|
||||
|
||||
const url = new URL(proxyOptions.url);
|
||||
|
||||
self.proxyOptions = {
|
||||
raw: true,
|
||||
...proxyOptions,
|
||||
headers: {...proxyOptions.headers},
|
||||
url
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
import type {PromiseValue} from './promise-value';
|
||||
|
||||
type AsyncFunction = (...args: any[]) => Promise<unknown>;
|
||||
|
||||
/**
|
||||
Unwrap the return type of a function that returns a `Promise`.
|
||||
|
||||
There has been [discussion](https://github.com/microsoft/TypeScript/pull/35998) about implementing this type in TypeScript.
|
||||
|
||||
@example
|
||||
```ts
|
||||
import type {AsyncReturnType} from 'type-fest';
|
||||
import {asyncFunction} from 'api';
|
||||
|
||||
// This type resolves to the unwrapped return type of `asyncFunction`.
|
||||
type Value = AsyncReturnType<typeof asyncFunction>;
|
||||
|
||||
async function doSomething(value: Value) {}
|
||||
|
||||
asyncFunction().then(value => doSomething(value));
|
||||
```
|
||||
|
||||
@category Async
|
||||
*/
|
||||
export type AsyncReturnType<Target extends AsyncFunction> = PromiseValue<ReturnType<Target>>;
|
||||
@@ -0,0 +1,26 @@
|
||||
For recent changelog see CHANGELOG.md
|
||||
|
||||
-----
|
||||
|
||||
|
||||
v0.1.2 -- 2017.04.03
|
||||
* `throttle` util
|
||||
|
||||
v0.1.1 -- 2017.03.15
|
||||
* Workaround IE8 resolution issue
|
||||
* Support any callable objects as callbacks
|
||||
* Improve documentation
|
||||
* Fix spelling of LICENSE
|
||||
* Configure lint scripts
|
||||
* Update dependencies
|
||||
|
||||
v0.1.0 -- 2014.04.27
|
||||
First production ready version
|
||||
- Depend strictly on npm hosted package versions
|
||||
- Full documentation
|
||||
- Add `once` (moved from next-tick project)
|
||||
- Make timeout value optional in delay
|
||||
- Rename MAX_VALUE into MAX_TIMEOUT
|
||||
|
||||
v0.0.0 -- 2013.08.27
|
||||
Initial (dev) version
|
||||
@@ -0,0 +1,4 @@
|
||||
export type UserDisabledError = {
|
||||
name: string;
|
||||
message: string;
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "rxjs/fetch",
|
||||
"types": "../dist/types/fetch/index.d.ts",
|
||||
"main": "../dist/cjs/fetch/index.js",
|
||||
"module": "../dist/esm5/fetch/index.js",
|
||||
"es2015": "../dist/esm/fetch/index.js",
|
||||
"sideEffects": false
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
import * as svelte_store from 'svelte/store';
|
||||
import { Readable } from 'svelte/store';
|
||||
import IntlMessageFormat, { FormatXMLElementFn, Formats } from 'intl-messageformat';
|
||||
|
||||
declare const $locale: {
|
||||
set: (newLocale: string | null | undefined) => void | Promise<void>;
|
||||
update(this: void, updater: svelte_store.Updater<string | null | undefined>): void;
|
||||
subscribe(this: void, run: svelte_store.Subscriber<string | null | undefined>, invalidate?: ((value?: string | null | undefined) => void) | undefined): svelte_store.Unsubscriber;
|
||||
};
|
||||
|
||||
interface LocaleDictionary {
|
||||
[key: string]: LocaleDictionary | string | Array<string | LocaleDictionary> | null;
|
||||
}
|
||||
type LocalesDictionary = {
|
||||
[key: string]: LocaleDictionary;
|
||||
};
|
||||
type InterpolationValues = Record<string, string | number | boolean | Date | FormatXMLElementFn<unknown> | null | undefined> | undefined;
|
||||
interface MessageObject {
|
||||
id: string;
|
||||
locale?: string;
|
||||
format?: string;
|
||||
default?: string;
|
||||
values?: InterpolationValues;
|
||||
}
|
||||
type MessageFormatter = (id: string | MessageObject, options?: Omit<MessageObject, 'id'>) => string;
|
||||
type TimeFormatter = (d: Date | number, options?: IntlFormatterOptions<Intl.DateTimeFormatOptions>) => string;
|
||||
type DateFormatter = (d: Date | number, options?: IntlFormatterOptions<Intl.DateTimeFormatOptions>) => string;
|
||||
type NumberFormatter = (d: number, options?: IntlFormatterOptions<Intl.NumberFormatOptions>) => string;
|
||||
type IntlFormatterOptions<T> = T & {
|
||||
format?: string;
|
||||
locale?: string;
|
||||
};
|
||||
interface MemoizedIntlFormatterOptional<T, U> {
|
||||
(options?: IntlFormatterOptions<U>): T;
|
||||
}
|
||||
interface MessagesLoader {
|
||||
(): Promise<any>;
|
||||
}
|
||||
type MissingKeyHandlerInput = {
|
||||
locale: string;
|
||||
id: string;
|
||||
defaultValue: string | undefined;
|
||||
};
|
||||
type MissingKeyHandlerOutput = string | void | undefined;
|
||||
type MissingKeyHandler = (input: MissingKeyHandlerInput) => MissingKeyHandlerOutput;
|
||||
interface ConfigureOptions {
|
||||
/** The global fallback locale * */
|
||||
fallbackLocale: string;
|
||||
/** The app initial locale * */
|
||||
initialLocale?: string | null;
|
||||
/** Custom time/date/number formats * */
|
||||
formats: Formats;
|
||||
/** Loading delay interval * */
|
||||
loadingDelay: number;
|
||||
/**
|
||||
* @deprecated Use `handleMissingMessage` instead.
|
||||
* */
|
||||
warnOnMissingMessages?: boolean;
|
||||
/**
|
||||
* Optional method that is executed whenever a message is missing.
|
||||
* It may return a string to use as the fallback.
|
||||
*/
|
||||
handleMissingMessage?: MissingKeyHandler;
|
||||
/**
|
||||
* Whether to treat HTML/XML tags as string literal instead of parsing them as tag token.
|
||||
* When this is false we only allow simple tags without any attributes
|
||||
* */
|
||||
ignoreTag: boolean;
|
||||
}
|
||||
type ConfigureOptionsInit = Pick<ConfigureOptions, 'fallbackLocale'> & Partial<Omit<ConfigureOptions, 'fallbackLocale'>>;
|
||||
|
||||
declare function init(opts: ConfigureOptionsInit): void | Promise<void>;
|
||||
|
||||
declare function registerLocaleLoader(locale: string, loader: MessagesLoader): void;
|
||||
|
||||
declare const getLocaleFromHostname: (hostname: RegExp) => string | null;
|
||||
declare const getLocaleFromPathname: (pathname: RegExp) => string | null;
|
||||
declare const getLocaleFromNavigator: () => string | null;
|
||||
declare const getLocaleFromQueryString: (search: string) => string | null | undefined;
|
||||
declare const getLocaleFromHash: (hash: string) => string | null | undefined;
|
||||
|
||||
declare const $dictionary: svelte_store.Writable<LocalesDictionary>;
|
||||
declare function addMessages(locale: string, ...partials: LocaleDictionary[]): void;
|
||||
declare const $locales: svelte_store.Readable<string[]>;
|
||||
|
||||
declare const $isLoading: svelte_store.Writable<boolean>;
|
||||
|
||||
declare const $format: svelte_store.Readable<MessageFormatter>;
|
||||
declare const $formatTime: svelte_store.Readable<TimeFormatter>;
|
||||
declare const $formatDate: svelte_store.Readable<DateFormatter>;
|
||||
declare const $formatNumber: svelte_store.Readable<NumberFormatter>;
|
||||
declare const $getJSON: svelte_store.Readable<(id: string, locale?: string | undefined) => unknown>;
|
||||
|
||||
type MemoizedNumberFormatterFactoryOptional = MemoizedIntlFormatterOptional<Intl.NumberFormat, Intl.NumberFormatOptions>;
|
||||
type MemoizedDateTimeFormatterFactoryOptional = MemoizedIntlFormatterOptional<Intl.DateTimeFormat, Intl.DateTimeFormatOptions>;
|
||||
declare const getNumberFormatter: MemoizedNumberFormatterFactoryOptional;
|
||||
declare const getDateFormatter: MemoizedDateTimeFormatterFactoryOptional;
|
||||
declare const getTimeFormatter: MemoizedDateTimeFormatterFactoryOptional;
|
||||
declare const getMessageFormatter: (message: string, locale?: string) => IntlMessageFormat;
|
||||
|
||||
type UnwrapStore<T> = T extends Readable<infer U> ? U : T;
|
||||
/**
|
||||
* Unwraps a function from a store and make it function calleable easily outside of a Svelte component.
|
||||
*
|
||||
* It works by creating a subscription to the store and getting local reference to the store value.
|
||||
* Then when the returned function is called, it will execute the function by using the local reference.
|
||||
*
|
||||
* The returned function has a 'freeze' method that will stop listening to the store.
|
||||
*
|
||||
* @example
|
||||
* // some-js-file.js
|
||||
* import { format } from 'svelte-i18n';
|
||||
*
|
||||
* const $format = unwrapFunctionStore(format);
|
||||
*
|
||||
* console.log($format('hello', { name: 'John' }));
|
||||
*
|
||||
*/
|
||||
declare function unwrapFunctionStore<S extends Readable<(...args: any[]) => any>, Fn extends UnwrapStore<S>>(store: S): Fn & {
|
||||
/**
|
||||
* Stops listening to the store.
|
||||
*/
|
||||
freeze: () => void;
|
||||
};
|
||||
|
||||
declare function defineMessages(i: Record<string, MessageObject>): Record<string, MessageObject>;
|
||||
declare function waitLocale(locale?: string): Promise<void>;
|
||||
|
||||
export { $format as _, addMessages, $formatDate as date, defineMessages, $dictionary as dictionary, $format as format, getDateFormatter, getLocaleFromHash, getLocaleFromHostname, getLocaleFromNavigator, getLocaleFromPathname, getLocaleFromQueryString, getMessageFormatter, getNumberFormatter, getTimeFormatter, init, $isLoading as isLoading, $getJSON as json, $locale as locale, $locales as locales, $formatNumber as number, registerLocaleLoader as register, $format as t, $formatTime as time, unwrapFunctionStore, waitLocale };
|
||||
@@ -0,0 +1,7 @@
|
||||
import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure';
|
||||
|
||||
declare function ensureFinite(value: any, options?: EnsureBaseOptions): number;
|
||||
declare function ensureFinite(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null;
|
||||
declare function ensureFinite(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault<number>): number;
|
||||
|
||||
export default ensureFinite;
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"name": "external-editor",
|
||||
"version": "3.1.0",
|
||||
"description": "Edit a string with the users preferred text editor using $VISUAL or $ENVIRONMENT",
|
||||
"main": "main/index.js",
|
||||
"types": "main/index.d.ts",
|
||||
"scripts": {
|
||||
"test": "mocha --recursive --require ts-node/register --timeout 10000 ./test/spec 'test/spec/**/*.ts'",
|
||||
"compile": "tsc -p tsconfig.json",
|
||||
"lint": "tslint './src/**/*.ts' './test/**/*.ts'"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/mrkmg/node-external-editor.git"
|
||||
},
|
||||
"keywords": [
|
||||
"editor",
|
||||
"external",
|
||||
"user",
|
||||
"visual"
|
||||
],
|
||||
"author": "Kevin Gravier <kevin@mrkmg.com> (https://mrkmg.com)",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/mrkmg/node-external-editor/issues"
|
||||
},
|
||||
"homepage": "https://github.com/mrkmg/node-external-editor#readme",
|
||||
"dependencies": {
|
||||
"chardet": "^0.7.0",
|
||||
"iconv-lite": "^0.4.24",
|
||||
"tmp": "^0.0.33"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chai": "^4.1.4",
|
||||
"@types/chardet": "^0.5.0",
|
||||
"@types/mocha": "^5.2.5",
|
||||
"@types/node": "^10.14.12",
|
||||
"@types/tmp": "0.0.33",
|
||||
"chai": "^4.0.0",
|
||||
"es6-shim": "^0.35.3",
|
||||
"mocha": "^5.2.0",
|
||||
"ts-node": "^7.0.1",
|
||||
"tslint": "^5.18.0",
|
||||
"typescript": "^3.5.2"
|
||||
},
|
||||
"files": [
|
||||
"main",
|
||||
"example_sync.js",
|
||||
"example_async.js"
|
||||
],
|
||||
"config": {
|
||||
"ndt": {
|
||||
"versions": [
|
||||
"major"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
<script>
|
||||
import { onMount, tick } from 'svelte';
|
||||
|
||||
// props
|
||||
export let items = undefined;
|
||||
export let height = '100%';
|
||||
export let itemHeight = 40;
|
||||
export let hoverItemIndex = 0;
|
||||
|
||||
// read-only, but visible to consumers via bind:start
|
||||
export let start = 0;
|
||||
export let end = 0;
|
||||
|
||||
// local state
|
||||
let height_map = [];
|
||||
let rows;
|
||||
let viewport;
|
||||
let contents;
|
||||
let viewport_height = 0;
|
||||
let visible;
|
||||
let mounted;
|
||||
|
||||
let top = 0;
|
||||
let bottom = 0;
|
||||
let average_height;
|
||||
|
||||
$: visible = items.slice(start, end).map((data, i) => {
|
||||
return { index: i + start, data };
|
||||
});
|
||||
|
||||
// whenever `items` changes, invalidate the current heightmap
|
||||
$: if (mounted) refresh(items, viewport_height, itemHeight);
|
||||
|
||||
async function refresh(items, viewport_height, itemHeight) {
|
||||
const { scrollTop } = viewport;
|
||||
|
||||
await tick(); // wait until the DOM is up to date
|
||||
|
||||
let content_height = top - scrollTop;
|
||||
let i = start;
|
||||
|
||||
while (content_height < viewport_height && i < items.length) {
|
||||
let row = rows[i - start];
|
||||
|
||||
if (!row) {
|
||||
end = i + 1;
|
||||
await tick(); // render the newly visible row
|
||||
row = rows[i - start];
|
||||
}
|
||||
|
||||
const row_height = height_map[i] = itemHeight || row.offsetHeight;
|
||||
content_height += row_height;
|
||||
i += 1;
|
||||
}
|
||||
|
||||
end = i;
|
||||
|
||||
const remaining = items.length - end;
|
||||
average_height = (top + content_height) / end;
|
||||
|
||||
bottom = remaining * average_height;
|
||||
height_map.length = items.length;
|
||||
|
||||
viewport.scrollTop = 0;
|
||||
}
|
||||
|
||||
async function handle_scroll() {
|
||||
const { scrollTop } = viewport;
|
||||
|
||||
const old_start = start;
|
||||
|
||||
for (let v = 0; v < rows.length; v += 1) {
|
||||
height_map[start + v] = itemHeight || rows[v].offsetHeight;
|
||||
}
|
||||
|
||||
let i = 0;
|
||||
let y = 0;
|
||||
|
||||
while (i < items.length) {
|
||||
const row_height = height_map[i] || average_height;
|
||||
if (y + row_height > scrollTop) {
|
||||
start = i;
|
||||
top = y;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
y += row_height;
|
||||
i += 1;
|
||||
}
|
||||
|
||||
while (i < items.length) {
|
||||
y += height_map[i] || average_height;
|
||||
i += 1;
|
||||
|
||||
if (y > scrollTop + viewport_height) break;
|
||||
}
|
||||
|
||||
end = i;
|
||||
|
||||
const remaining = items.length - end;
|
||||
average_height = y / end;
|
||||
|
||||
while (i < items.length) height_map[i++] = average_height;
|
||||
bottom = remaining * average_height;
|
||||
|
||||
// prevent jumping if we scrolled up into unknown territory
|
||||
if (start < old_start) {
|
||||
await tick();
|
||||
|
||||
let expected_height = 0;
|
||||
let actual_height = 0;
|
||||
|
||||
for (let i = start; i < old_start; i += 1) {
|
||||
if (rows[i - start]) {
|
||||
expected_height += height_map[i];
|
||||
actual_height += itemHeight || rows[i - start].offsetHeight;
|
||||
}
|
||||
}
|
||||
|
||||
const d = actual_height - expected_height;
|
||||
viewport.scrollTo(0, scrollTop + d);
|
||||
}
|
||||
|
||||
// TODO if we overestimated the space these
|
||||
// rows would occupy we may need to add some
|
||||
// more. maybe we can just call handle_scroll again?
|
||||
}
|
||||
|
||||
// trigger initial refresh
|
||||
onMount(() => {
|
||||
rows = contents.getElementsByTagName('svelte-virtual-list-row');
|
||||
mounted = true;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
svelte-virtual-list-viewport {
|
||||
position: relative;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
display: block;
|
||||
}
|
||||
|
||||
svelte-virtual-list-contents,
|
||||
svelte-virtual-list-row {
|
||||
display: block;
|
||||
}
|
||||
|
||||
svelte-virtual-list-row {
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
||||
<svelte-virtual-list-viewport bind:this={viewport} bind:offsetHeight={viewport_height} on:scroll={handle_scroll}
|
||||
style="height: {height};">
|
||||
<svelte-virtual-list-contents bind:this={contents} style="padding-top: {top}px; padding-bottom: {bottom}px;">
|
||||
{#each visible as row (row.index)}
|
||||
<svelte-virtual-list-row>
|
||||
<slot item={row.data} i={row.index} {hoverItemIndex}>Missing template</slot>
|
||||
</svelte-virtual-list-row>
|
||||
{/each}
|
||||
</svelte-virtual-list-contents>
|
||||
</svelte-virtual-list-viewport>
|
||||
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Used in functions where either a list of arguments, a single array of arguments, or a
|
||||
* dictionary of arguments can be returned. Returns an object with an `args` property with
|
||||
* the arguments in an array, if it is a dictionary, it will also return the `keys` in another
|
||||
* property.
|
||||
*/
|
||||
export declare function argsArgArrayOrObject<T, O extends Record<string, T>>(args: T[] | [O] | [T[]]): {
|
||||
args: T[];
|
||||
keys: string[] | null;
|
||||
};
|
||||
//# sourceMappingURL=argsArgArrayOrObject.d.ts.map
|
||||
@@ -0,0 +1,22 @@
|
||||
/** Used to escape characters for inclusion in compiled string literals. */
|
||||
var stringEscapes = {
|
||||
'\\': '\\',
|
||||
"'": "'",
|
||||
'\n': 'n',
|
||||
'\r': 'r',
|
||||
'\u2028': 'u2028',
|
||||
'\u2029': 'u2029'
|
||||
};
|
||||
|
||||
/**
|
||||
* Used by `_.template` to escape characters for inclusion in compiled string literals.
|
||||
*
|
||||
* @private
|
||||
* @param {string} chr The matched character to escape.
|
||||
* @returns {string} Returns the escaped character.
|
||||
*/
|
||||
function escapeStringChar(chr) {
|
||||
return '\\' + stringEscapes[chr];
|
||||
}
|
||||
|
||||
module.exports = escapeStringChar;
|
||||
@@ -0,0 +1,61 @@
|
||||
const SemVer = require('../classes/semver')
|
||||
const Range = require('../classes/range')
|
||||
const gt = require('../functions/gt')
|
||||
|
||||
const minVersion = (range, loose) => {
|
||||
range = new Range(range, loose)
|
||||
|
||||
let minver = new SemVer('0.0.0')
|
||||
if (range.test(minver)) {
|
||||
return minver
|
||||
}
|
||||
|
||||
minver = new SemVer('0.0.0-0')
|
||||
if (range.test(minver)) {
|
||||
return minver
|
||||
}
|
||||
|
||||
minver = null
|
||||
for (let i = 0; i < range.set.length; ++i) {
|
||||
const comparators = range.set[i]
|
||||
|
||||
let setMin = null
|
||||
comparators.forEach((comparator) => {
|
||||
// Clone to avoid manipulating the comparator's semver object.
|
||||
const compver = new SemVer(comparator.semver.version)
|
||||
switch (comparator.operator) {
|
||||
case '>':
|
||||
if (compver.prerelease.length === 0) {
|
||||
compver.patch++
|
||||
} else {
|
||||
compver.prerelease.push(0)
|
||||
}
|
||||
compver.raw = compver.format()
|
||||
/* fallthrough */
|
||||
case '':
|
||||
case '>=':
|
||||
if (!setMin || gt(compver, setMin)) {
|
||||
setMin = compver
|
||||
}
|
||||
break
|
||||
case '<':
|
||||
case '<=':
|
||||
/* Ignore maximum versions */
|
||||
break
|
||||
/* istanbul ignore next */
|
||||
default:
|
||||
throw new Error(`Unexpected operation: ${comparator.operator}`)
|
||||
}
|
||||
})
|
||||
if (setMin && (!minver || gt(minver, setMin))) {
|
||||
minver = setMin
|
||||
}
|
||||
}
|
||||
|
||||
if (minver && range.test(minver)) {
|
||||
return minver
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
module.exports = minVersion
|
||||
@@ -0,0 +1,51 @@
|
||||
import { asyncScheduler } from '../scheduler/async';
|
||||
import { MonoTypeOperatorFunction, SchedulerLike } from '../types';
|
||||
import { sample } from './sample';
|
||||
import { interval } from '../observable/interval';
|
||||
|
||||
/**
|
||||
* Emits the most recently emitted value from the source Observable within
|
||||
* periodic time intervals.
|
||||
*
|
||||
* <span class="informal">Samples the source Observable at periodic time
|
||||
* intervals, emitting what it samples.</span>
|
||||
*
|
||||
* 
|
||||
*
|
||||
* `sampleTime` periodically looks at the source Observable and emits whichever
|
||||
* value it has most recently emitted since the previous sampling, unless the
|
||||
* source has not emitted anything since the previous sampling. The sampling
|
||||
* happens periodically in time every `period` milliseconds (or the time unit
|
||||
* defined by the optional `scheduler` argument). The sampling starts as soon as
|
||||
* the output Observable is subscribed.
|
||||
*
|
||||
* ## Example
|
||||
*
|
||||
* Every second, emit the most recent click at most once
|
||||
*
|
||||
* ```ts
|
||||
* import { fromEvent, sampleTime } from 'rxjs';
|
||||
*
|
||||
* const clicks = fromEvent(document, 'click');
|
||||
* const result = clicks.pipe(sampleTime(1000));
|
||||
*
|
||||
* result.subscribe(x => console.log(x));
|
||||
* ```
|
||||
*
|
||||
* @see {@link auditTime}
|
||||
* @see {@link debounceTime}
|
||||
* @see {@link delay}
|
||||
* @see {@link sample}
|
||||
* @see {@link throttleTime}
|
||||
*
|
||||
* @param {number} period The sampling period expressed in milliseconds or the
|
||||
* time unit determined internally by the optional `scheduler`.
|
||||
* @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for
|
||||
* managing the timers that handle the sampling.
|
||||
* @return A function that returns an Observable that emits the results of
|
||||
* sampling the values emitted by the source Observable at the specified time
|
||||
* interval.
|
||||
*/
|
||||
export function sampleTime<T>(period: number, scheduler: SchedulerLike = asyncScheduler): MonoTypeOperatorFunction<T> {
|
||||
return sample(interval(period, scheduler));
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function () { return typeof Number.MAX_SAFE_INTEGER === "number"; };
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"max.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/max.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAErF"}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,42 @@
|
||||
Browser-friendly inheritance fully compatible with standard node.js
|
||||
[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).
|
||||
|
||||
This package exports standard `inherits` from node.js `util` module in
|
||||
node environment, but also provides alternative browser-friendly
|
||||
implementation through [browser
|
||||
field](https://gist.github.com/shtylman/4339901). Alternative
|
||||
implementation is a literal copy of standard one located in standalone
|
||||
module to avoid requiring of `util`. It also has a shim for old
|
||||
browsers with no `Object.create` support.
|
||||
|
||||
While keeping you sure you are using standard `inherits`
|
||||
implementation in node.js environment, it allows bundlers such as
|
||||
[browserify](https://github.com/substack/node-browserify) to not
|
||||
include full `util` package to your client code if all you need is
|
||||
just `inherits` function. It worth, because browser shim for `util`
|
||||
package is large and `inherits` is often the single function you need
|
||||
from it.
|
||||
|
||||
It's recommended to use this package instead of
|
||||
`require('util').inherits` for any code that has chances to be used
|
||||
not only in node.js but in browser too.
|
||||
|
||||
## usage
|
||||
|
||||
```js
|
||||
var inherits = require('inherits');
|
||||
// then use exactly as the standard one
|
||||
```
|
||||
|
||||
## note on version ~1.0
|
||||
|
||||
Version ~1.0 had completely different motivation and is not compatible
|
||||
neither with 2.0 nor with standard node.js `inherits`.
|
||||
|
||||
If you are using version ~1.0 and planning to switch to ~2.0, be
|
||||
careful:
|
||||
|
||||
* new version uses `super_` instead of `super` for referencing
|
||||
superclass
|
||||
* new version overwrites current prototype while old one preserves any
|
||||
existing fields on it
|
||||
@@ -0,0 +1,20 @@
|
||||
import * as fsStat from '@nodelib/fs.stat';
|
||||
import * as fs from './adapters/fs';
|
||||
export interface Options {
|
||||
followSymbolicLinks?: boolean;
|
||||
fs?: Partial<fs.FileSystemAdapter>;
|
||||
pathSegmentSeparator?: string;
|
||||
stats?: boolean;
|
||||
throwErrorOnBrokenSymbolicLink?: boolean;
|
||||
}
|
||||
export default class Settings {
|
||||
private readonly _options;
|
||||
readonly followSymbolicLinks: boolean;
|
||||
readonly fs: fs.FileSystemAdapter;
|
||||
readonly pathSegmentSeparator: string;
|
||||
readonly stats: boolean;
|
||||
readonly throwErrorOnBrokenSymbolicLink: boolean;
|
||||
readonly fsStatSettings: fsStat.Settings;
|
||||
constructor(_options?: Options);
|
||||
private _getValue;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 LitoMore
|
||||
|
||||
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,11 @@
|
||||
let objectify = require('./objectifier')
|
||||
|
||||
module.exports = function processResult(result) {
|
||||
if (console && console.warn) {
|
||||
result.warnings().forEach(warn => {
|
||||
let source = warn.plugin || 'PostCSS'
|
||||
console.warn(source + ': ' + warn.text)
|
||||
})
|
||||
}
|
||||
return objectify(result.root)
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.isAsyncIterable = void 0;
|
||||
var isFunction_1 = require("./isFunction");
|
||||
function isAsyncIterable(obj) {
|
||||
return Symbol.asyncIterator && isFunction_1.isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);
|
||||
}
|
||||
exports.isAsyncIterable = isAsyncIterable;
|
||||
//# sourceMappingURL=isAsyncIterable.js.map
|
||||
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
var coerceToFinite = require("../finite/coerce");
|
||||
|
||||
var abs = Math.abs, floor = Math.floor;
|
||||
|
||||
module.exports = function (value) {
|
||||
value = coerceToFinite(value);
|
||||
if (!value) return value;
|
||||
return (value > 0 ? 1 : -1) * floor(abs(value));
|
||||
};
|
||||
@@ -0,0 +1,188 @@
|
||||
'use strict'
|
||||
|
||||
const resolve = require('path').resolve
|
||||
|
||||
const config = require('lilconfig')
|
||||
const yaml = require('yaml')
|
||||
|
||||
const loadOptions = require('./options.js')
|
||||
const loadPlugins = require('./plugins.js')
|
||||
|
||||
/* istanbul ignore next */
|
||||
const interopRequireDefault = (obj) => obj && obj.__esModule ? obj : { default: obj }
|
||||
|
||||
/**
|
||||
* Process the result from cosmiconfig
|
||||
*
|
||||
* @param {Object} ctx Config Context
|
||||
* @param {Object} result Cosmiconfig result
|
||||
*
|
||||
* @return {Object} PostCSS Config
|
||||
*/
|
||||
const processResult = (ctx, result) => {
|
||||
const file = result.filepath || ''
|
||||
let config = interopRequireDefault(result.config).default || {}
|
||||
|
||||
if (typeof config === 'function') {
|
||||
config = config(ctx)
|
||||
} else {
|
||||
config = Object.assign({}, config, ctx)
|
||||
}
|
||||
|
||||
if (!config.plugins) {
|
||||
config.plugins = []
|
||||
}
|
||||
|
||||
return {
|
||||
plugins: loadPlugins(config, file),
|
||||
options: loadOptions(config, file),
|
||||
file: file
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the Config Context
|
||||
*
|
||||
* @param {Object} ctx Config Context
|
||||
*
|
||||
* @return {Object} Config Context
|
||||
*/
|
||||
const createContext = (ctx) => {
|
||||
/**
|
||||
* @type {Object}
|
||||
*
|
||||
* @prop {String} cwd=process.cwd() Config search start location
|
||||
* @prop {String} env=process.env.NODE_ENV Config Enviroment, will be set to `development` by `postcss-load-config` if `process.env.NODE_ENV` is `undefined`
|
||||
*/
|
||||
ctx = Object.assign({
|
||||
cwd: process.cwd(),
|
||||
env: process.env.NODE_ENV
|
||||
}, ctx)
|
||||
|
||||
if (!ctx.env) {
|
||||
process.env.NODE_ENV = 'development'
|
||||
}
|
||||
|
||||
return ctx
|
||||
}
|
||||
|
||||
const addTypeScriptLoader = (options = {}, loader) => {
|
||||
const moduleName = 'postcss'
|
||||
|
||||
return {
|
||||
...options,
|
||||
searchPlaces: [
|
||||
...(options.searchPlaces || []),
|
||||
'package.json',
|
||||
`.${moduleName}rc`,
|
||||
`.${moduleName}rc.json`,
|
||||
`.${moduleName}rc.yaml`,
|
||||
`.${moduleName}rc.yml`,
|
||||
`.${moduleName}rc.ts`,
|
||||
`.${moduleName}rc.js`,
|
||||
`.${moduleName}rc.cjs`,
|
||||
`${moduleName}.config.ts`,
|
||||
`${moduleName}.config.js`,
|
||||
`${moduleName}.config.cjs`
|
||||
],
|
||||
loaders: {
|
||||
...options.loaders,
|
||||
'.yaml': (filepath, content) => yaml.parse(content),
|
||||
'.yml': (filepath, content) => yaml.parse(content),
|
||||
'.ts': loader
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const withTypeScriptLoader = (rcFunc) => {
|
||||
return (ctx, path, options) => {
|
||||
return rcFunc(ctx, path, addTypeScriptLoader(options, (configFile) => {
|
||||
let registerer = { enabled () {} }
|
||||
|
||||
try {
|
||||
// Register TypeScript compiler instance
|
||||
registerer = require('ts-node').register()
|
||||
|
||||
return require(configFile)
|
||||
} catch (err) {
|
||||
if (err.code === 'MODULE_NOT_FOUND') {
|
||||
throw new Error(
|
||||
`'ts-node' is required for the TypeScript configuration files. Make sure it is installed\nError: ${err.message}`
|
||||
)
|
||||
}
|
||||
|
||||
throw err
|
||||
} finally {
|
||||
registerer.enabled(false)
|
||||
}
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load Config
|
||||
*
|
||||
* @method rc
|
||||
*
|
||||
* @param {Object} ctx Config Context
|
||||
* @param {String} path Config Path
|
||||
* @param {Object} options Config Options
|
||||
*
|
||||
* @return {Promise} config PostCSS Config
|
||||
*/
|
||||
const rc = withTypeScriptLoader((ctx, path, options) => {
|
||||
/**
|
||||
* @type {Object} The full Config Context
|
||||
*/
|
||||
ctx = createContext(ctx)
|
||||
|
||||
/**
|
||||
* @type {String} `process.cwd()`
|
||||
*/
|
||||
path = path ? resolve(path) : process.cwd()
|
||||
|
||||
return config.lilconfig('postcss', options)
|
||||
.search(path)
|
||||
.then((result) => {
|
||||
if (!result) {
|
||||
throw new Error(`No PostCSS Config found in: ${path}`)
|
||||
}
|
||||
|
||||
return processResult(ctx, result)
|
||||
})
|
||||
})
|
||||
|
||||
rc.sync = withTypeScriptLoader((ctx, path, options) => {
|
||||
/**
|
||||
* @type {Object} The full Config Context
|
||||
*/
|
||||
ctx = createContext(ctx)
|
||||
|
||||
/**
|
||||
* @type {String} `process.cwd()`
|
||||
*/
|
||||
path = path ? resolve(path) : process.cwd()
|
||||
|
||||
const result = config.lilconfigSync('postcss', options).search(path)
|
||||
|
||||
if (!result) {
|
||||
throw new Error(`No PostCSS Config found in: ${path}`)
|
||||
}
|
||||
|
||||
return processResult(ctx, result)
|
||||
})
|
||||
|
||||
/**
|
||||
* Autoload Config for PostCSS
|
||||
*
|
||||
* @author Michael Ciniawsky @michael-ciniawsky <michael.ciniawsky@gmail.com>
|
||||
* @license MIT
|
||||
*
|
||||
* @module postcss-load-config
|
||||
* @version 2.1.0
|
||||
*
|
||||
* @requires comsiconfig
|
||||
* @requires ./options
|
||||
* @requires ./plugins
|
||||
*/
|
||||
module.exports = rc
|
||||
@@ -0,0 +1,5 @@
|
||||
declare module 'emoji-regex/es2015/RGI_Emoji' {
|
||||
function emojiRegex(): RegExp;
|
||||
|
||||
export = emojiRegex;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SequenceError.js","sourceRoot":"","sources":["../../../../src/internal/util/SequenceError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAoBtD,MAAM,CAAC,IAAM,aAAa,GAAsB,gBAAgB,CAC9D,UAAC,MAAM;IACL,OAAA,SAAS,iBAAiB,CAAY,OAAe;QACnD,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;AAJD,CAIC,CACJ,CAAC"}
|
||||
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: ()=>_default
|
||||
});
|
||||
const _cloneDeep = require("../util/cloneDeep");
|
||||
const _defaultConfigStub = /*#__PURE__*/ _interopRequireDefault(require("../../stubs/defaultConfig.stub"));
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
const _default = (0, _cloneDeep.cloneDeep)(_defaultConfigStub.default.theme);
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"toastify-js","version":"1.12.0","files":{".gitattributes":{"checkedAt":1678883668909,"integrity":"sha512-+adWTRp1r1VvmDZSQFl24elGd9cselfebemR1fBme1qZGuCdCPJ5+PQwQfv9KiCbbCoggvpPCR8gt7xusZ1sBA==","mode":436,"size":378},".prettierrc":{"checkedAt":1678883668909,"integrity":"sha512-pFs+kiOhLtLgQacktCIGaJZ7AcIMvPCCfEwIzNtLpknXJxjTN+MkFMZL0WDDA7y1A2yQ0X2cTP8p11CBTT5CIA==","mode":436,"size":152},"LICENSE":{"checkedAt":1678883668909,"integrity":"sha512-dqMwz7eJi33a2BbHmyKVskiIhJ3zLXchiRQURYsJPAZXzYiJia76JRLoRE2IL4HU6e0D8SV3orPsXIQ7IWUc9w==","mode":436,"size":1064},"example/script.css":{"checkedAt":1678883668909,"integrity":"sha512-5dnzEc3c/YyLKMrvr055a1XtmL/YAVEy6ltj2U+G8quTN3lYYUNQmOSXkC2kgxpWMtLZefDx89n46JQvlU8wiw==","mode":436,"size":1657},"src/toastify.css":{"checkedAt":1678883668915,"integrity":"sha512-kT0v1BxcibEO2Yc+6Z3W1gNsN+2cZ/U6uITqHhIJl8SAvt9vpO8llugdCPXA7cCnp8G1xbuSqHNMRaR3Zlz9yA==","mode":436,"size":1560},"index.html":{"checkedAt":1678883668915,"integrity":"sha512-lrJYreaf5vr/+glPe/7R/Q2rttODKoljgG40AUbum/rbn7sPtusnHzNVDp8tkVov6qR9cUfPVaOVYnr01uLiUA==","mode":436,"size":2511},"example/script.js":{"checkedAt":1678883668915,"integrity":"sha512-JEKkTHjvW/hFZZPk9F9KiwT0DQ0eUy5y+UdZdvioKCuC3onERzaAbUXlejpAma8yDVdSsL6BkrtnVrman/Pynw==","mode":436,"size":1454},"src/toastify-es.js":{"checkedAt":1678883668919,"integrity":"sha512-nL1v3psECS5KEwUr9vUR7MbuH/DWvOF755hAEHcwbyUrIGZwKYqHYT4VFe0F9o0J4eJgJsVcxMcbYLh/sXPh0g==","mode":436,"size":16125},"package.json":{"checkedAt":1678883668925,"integrity":"sha512-j7kzhN/9K9lgjNr4TPDJ4Hy6XJ++yLYl0g8TY+rKBFJcmVv1bgTmQqX6hhXiaAQqeFV4xRUZMEM0KmPmv2Vd3w==","mode":436,"size":542},"src/toastify.js":{"checkedAt":1678883668925,"integrity":"sha512-ZHzbWDQKpcZxIT9l5KhcnwQTidZFzwK/c7gpUUsFvGjEsxPusdUCyFxjjpc7e/Wj7vLhfMujNx7COwOmzbn+2w==","mode":436,"size":15130},"CHANGELOG.md":{"checkedAt":1678883668929,"integrity":"sha512-AC8MubZYrMIU+3xVok/phQcj4CK1QeXLvHWEucAreVAOBvXIPWWBTyXCt1N1Y/LMqGkkchS67cFMTQ7QFV3yDw==","mode":436,"size":3433},"README.md":{"checkedAt":1678883668933,"integrity":"sha512-gSTGkyGPWvh/0/jx4ayahMVnVCpXW2/w2m90cmhuUimWklxq2zVKa7icI+dULNxhsvofQ4EHXmGApIy3u9ykWQ==","mode":436,"size":12694},".travis.yml":{"checkedAt":1678883668942,"integrity":"sha512-gusnjImOGFhyKMVLrfAI3e34g//ClKrERXdDDLB1kNmHYHYvVI9+L6LR9unG+rajG4ItfmfNzPyxFix1zlzI3g==","mode":436,"size":181},"example/pattern.png":{"checkedAt":1678883668942,"integrity":"sha512-SyyKw3EvQ7t430Pvtny6LXwrcToBGdUecY8ynbi3Qj8mXyp30rNHzFIL6u1u0W65fd4/HgqS7LG6rPrfCMXtaw==","mode":436,"size":21967}}}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Observable } from '../Observable';
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { OperatorFunction } from '../types';
|
||||
/**
|
||||
* Used to determine if an object is an Observable with a lift function.
|
||||
*/
|
||||
export declare function hasLift(source: any): source is {
|
||||
lift: InstanceType<typeof Observable>['lift'];
|
||||
};
|
||||
/**
|
||||
* Creates an `OperatorFunction`. Used to define operators throughout the library in a concise way.
|
||||
* @param init The logic to connect the liftedSource to the subscriber at the moment of subscription.
|
||||
*/
|
||||
export declare function operate<T, R>(init: (liftedSource: Observable<T>, subscriber: Subscriber<R>) => (() => void) | void): OperatorFunction<T, R>;
|
||||
//# sourceMappingURL=lift.d.ts.map
|
||||
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
var ensureError = require('es5-ext/error/valid-error')
|
||||
, ensureObject = require('es5-ext/object/valid-object')
|
||||
|
||||
, hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
|
||||
module.exports = function (err) {
|
||||
(ensureObject(this) && ensureError(err));
|
||||
if (!hasOwnProperty.call(ensureObject(this), '__ee__')) throw err;
|
||||
if (!this.__ee__.error) throw err;
|
||||
this.emit('error', err);
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
export declare const SPACE_SEPARATOR_REGEX: RegExp;
|
||||
export declare const WHITE_SPACE_REGEX: RegExp;
|
||||
//# sourceMappingURL=regex.generated.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"A B","2":"J D E F CC"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"0 1 DC tB I v J D E F A B C K L G M N O w g x y z EC FC","194":"2 3 4 5 6 7 8 9 AB BB CB DB EB FB GB"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"1":"v J D E F A B C K L G IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I HC zB"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e SC qB AC TC rB","2":"F PC QC","16":"RC"},G:{"1":"E VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"zB UC BC"},H:{"2":"oC"},I:{"1":"f tC uC","2":"tB I pC qC rC sC BC"},J:{"1":"D A"},K:{"1":"B C h qB AC rB","2":"A"},L:{"1":"H"},M:{"1":"H"},N:{"1":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:1,C:"Channel messaging"};
|
||||
Reference in New Issue
Block a user