new license file version [CI SKIP]

This commit is contained in:
2023-03-15 12:34:41 +00:00
parent 0a6d92a1f3
commit 61328d20ed
13115 changed files with 1892314 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
import { Fork } from "../types";
import { ASTNode } from "./types";
import { Path } from "./path";
import { Scope } from "./scope";
export interface NodePath<N = any, V = any> extends Path<V> {
node: N;
parent: any;
scope: any;
replace: Path['replace'];
prune(...args: any[]): any;
_computeNode(): any;
_computeParent(): any;
_computeScope(): Scope | null;
getValueProperty(name: any): any;
needsParens(assumeExpressionContext?: boolean): boolean;
canBeFirstInStatement(): boolean;
firstInStatement(): boolean;
}
export interface NodePathConstructor {
new <N extends ASTNode = any, V = any>(value: any, parentPath?: any, name?: any): NodePath<N, V>;
}
export default function nodePathPlugin(fork: Fork): NodePathConstructor;

View File

@@ -0,0 +1,56 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.readFile = readFile;
exports.readFileSync = readFileSync;
var _fs = _interopRequireDefault(require("fs"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
async function fsReadFileAsync(pathname, encoding) {
return new Promise((resolve, reject) => {
_fs.default.readFile(pathname, encoding, (error, contents) => {
if (error) {
reject(error);
return;
}
resolve(contents);
});
});
}
async function readFile(filepath, options = {}) {
const throwNotFound = options.throwNotFound === true;
try {
const content = await fsReadFileAsync(filepath, 'utf8');
return content;
} catch (error) {
if (throwNotFound === false && (error.code === 'ENOENT' || error.code === 'EISDIR')) {
return null;
}
throw error;
}
}
function readFileSync(filepath, options = {}) {
const throwNotFound = options.throwNotFound === true;
try {
const content = _fs.default.readFileSync(filepath, 'utf8');
return content;
} catch (error) {
if (throwNotFound === false && (error.code === 'ENOENT' || error.code === 'EISDIR')) {
return null;
}
throw error;
}
}
//# sourceMappingURL=readFile.js.map

View File

@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isISO31661Alpha3;
var _assertString = _interopRequireDefault(require("./util/assertString"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3
var validISO31661Alpha3CountriesCodes = new Set(['AFG', 'ALA', 'ALB', 'DZA', 'ASM', 'AND', 'AGO', 'AIA', 'ATA', 'ATG', 'ARG', 'ARM', 'ABW', 'AUS', 'AUT', 'AZE', 'BHS', 'BHR', 'BGD', 'BRB', 'BLR', 'BEL', 'BLZ', 'BEN', 'BMU', 'BTN', 'BOL', 'BES', 'BIH', 'BWA', 'BVT', 'BRA', 'IOT', 'BRN', 'BGR', 'BFA', 'BDI', 'KHM', 'CMR', 'CAN', 'CPV', 'CYM', 'CAF', 'TCD', 'CHL', 'CHN', 'CXR', 'CCK', 'COL', 'COM', 'COG', 'COD', 'COK', 'CRI', 'CIV', 'HRV', 'CUB', 'CUW', 'CYP', 'CZE', 'DNK', 'DJI', 'DMA', 'DOM', 'ECU', 'EGY', 'SLV', 'GNQ', 'ERI', 'EST', 'ETH', 'FLK', 'FRO', 'FJI', 'FIN', 'FRA', 'GUF', 'PYF', 'ATF', 'GAB', 'GMB', 'GEO', 'DEU', 'GHA', 'GIB', 'GRC', 'GRL', 'GRD', 'GLP', 'GUM', 'GTM', 'GGY', 'GIN', 'GNB', 'GUY', 'HTI', 'HMD', 'VAT', 'HND', 'HKG', 'HUN', 'ISL', 'IND', 'IDN', 'IRN', 'IRQ', 'IRL', 'IMN', 'ISR', 'ITA', 'JAM', 'JPN', 'JEY', 'JOR', 'KAZ', 'KEN', 'KIR', 'PRK', 'KOR', 'KWT', 'KGZ', 'LAO', 'LVA', 'LBN', 'LSO', 'LBR', 'LBY', 'LIE', 'LTU', 'LUX', 'MAC', 'MKD', 'MDG', 'MWI', 'MYS', 'MDV', 'MLI', 'MLT', 'MHL', 'MTQ', 'MRT', 'MUS', 'MYT', 'MEX', 'FSM', 'MDA', 'MCO', 'MNG', 'MNE', 'MSR', 'MAR', 'MOZ', 'MMR', 'NAM', 'NRU', 'NPL', 'NLD', 'NCL', 'NZL', 'NIC', 'NER', 'NGA', 'NIU', 'NFK', 'MNP', 'NOR', 'OMN', 'PAK', 'PLW', 'PSE', 'PAN', 'PNG', 'PRY', 'PER', 'PHL', 'PCN', 'POL', 'PRT', 'PRI', 'QAT', 'REU', 'ROU', 'RUS', 'RWA', 'BLM', 'SHN', 'KNA', 'LCA', 'MAF', 'SPM', 'VCT', 'WSM', 'SMR', 'STP', 'SAU', 'SEN', 'SRB', 'SYC', 'SLE', 'SGP', 'SXM', 'SVK', 'SVN', 'SLB', 'SOM', 'ZAF', 'SGS', 'SSD', 'ESP', 'LKA', 'SDN', 'SUR', 'SJM', 'SWZ', 'SWE', 'CHE', 'SYR', 'TWN', 'TJK', 'TZA', 'THA', 'TLS', 'TGO', 'TKL', 'TON', 'TTO', 'TUN', 'TUR', 'TKM', 'TCA', 'TUV', 'UGA', 'UKR', 'ARE', 'GBR', 'USA', 'UMI', 'URY', 'UZB', 'VUT', 'VEN', 'VNM', 'VGB', 'VIR', 'WLF', 'ESH', 'YEM', 'ZMB', 'ZWE']);
function isISO31661Alpha3(str) {
(0, _assertString.default)(str);
return validISO31661Alpha3CountriesCodes.has(str.toUpperCase());
}
module.exports = exports.default;
module.exports.default = exports.default;

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./async').queue;

View File

@@ -0,0 +1,16 @@
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab
trim_trailing_whitespace = true
[*.md]
indent_size = 2
indent_style = space
trim_trailing_whitespace = false

View File

@@ -0,0 +1 @@
{"version":3,"file":"startWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/startWith.ts"],"names":[],"mappings":";;;AAAA,+CAA8C;AAE9C,qCAA4C;AAC5C,qCAAuC;AAuDvC,SAAgB,SAAS;IAAO,gBAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,2BAAc;;IAC5C,IAAM,SAAS,GAAG,mBAAY,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAIhC,CAAC,SAAS,CAAC,CAAC,CAAC,eAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,eAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACjG,CAAC,CAAC,CAAC;AACL,CAAC;AARD,8BAQC"}

View File

@@ -0,0 +1,3 @@
import type { PreprocessorGroup, Options } from '../types';
declare const _default: (options?: Options.Sass) => PreprocessorGroup;
export default _default;

View File

@@ -0,0 +1,3 @@
annee;jour;date;b_1;b_2;devise;
2015029;LUNDI ;09/03/2015;35;31;eur;
2015028;SAMEDI ;07/03/2015;48;9;eur;

View File

@@ -0,0 +1,44 @@
define(['exports', './helpers/block-helper-missing', './helpers/each', './helpers/helper-missing', './helpers/if', './helpers/log', './helpers/lookup', './helpers/with'], function (exports, _helpersBlockHelperMissing, _helpersEach, _helpersHelperMissing, _helpersIf, _helpersLog, _helpersLookup, _helpersWith) {
'use strict';
exports.__esModule = true;
exports.registerDefaultHelpers = registerDefaultHelpers;
exports.moveHelperToHooks = moveHelperToHooks;
// istanbul ignore next
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _registerBlockHelperMissing = _interopRequireDefault(_helpersBlockHelperMissing);
var _registerEach = _interopRequireDefault(_helpersEach);
var _registerHelperMissing = _interopRequireDefault(_helpersHelperMissing);
var _registerIf = _interopRequireDefault(_helpersIf);
var _registerLog = _interopRequireDefault(_helpersLog);
var _registerLookup = _interopRequireDefault(_helpersLookup);
var _registerWith = _interopRequireDefault(_helpersWith);
function registerDefaultHelpers(instance) {
_registerBlockHelperMissing['default'](instance);
_registerEach['default'](instance);
_registerHelperMissing['default'](instance);
_registerIf['default'](instance);
_registerLog['default'](instance);
_registerLookup['default'](instance);
_registerWith['default'](instance);
}
function moveHelperToHooks(instance, helperName, keepHelper) {
if (instance.helpers[helperName]) {
instance.hooks[helperName] = instance.helpers[helperName];
if (!keepHelper) {
delete instance.helpers[helperName];
}
}
}
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBUU8sV0FBUyxzQkFBc0IsQ0FBQyxRQUFRLEVBQUU7QUFDL0MsMkNBQTJCLFFBQVEsQ0FBQyxDQUFDO0FBQ3JDLDZCQUFhLFFBQVEsQ0FBQyxDQUFDO0FBQ3ZCLHNDQUFzQixRQUFRLENBQUMsQ0FBQztBQUNoQywyQkFBVyxRQUFRLENBQUMsQ0FBQztBQUNyQiw0QkFBWSxRQUFRLENBQUMsQ0FBQztBQUN0QiwrQkFBZSxRQUFRLENBQUMsQ0FBQztBQUN6Qiw2QkFBYSxRQUFRLENBQUMsQ0FBQztHQUN4Qjs7QUFFTSxXQUFTLGlCQUFpQixDQUFDLFFBQVEsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFO0FBQ2xFLFFBQUksUUFBUSxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsRUFBRTtBQUNoQyxjQUFRLENBQUMsS0FBSyxDQUFDLFVBQVUsQ0FBQyxHQUFHLFFBQVEsQ0FBQyxPQUFPLENBQUMsVUFBVSxDQUFDLENBQUM7QUFDMUQsVUFBSSxDQUFDLFVBQVUsRUFBRTtBQUNmLGVBQU8sUUFBUSxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsQ0FBQztPQUNyQztLQUNGO0dBQ0YiLCJmaWxlIjoiaGVscGVycy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCByZWdpc3RlckJsb2NrSGVscGVyTWlzc2luZyBmcm9tICcuL2hlbHBlcnMvYmxvY2staGVscGVyLW1pc3NpbmcnO1xuaW1wb3J0IHJlZ2lzdGVyRWFjaCBmcm9tICcuL2hlbHBlcnMvZWFjaCc7XG5pbXBvcnQgcmVnaXN0ZXJIZWxwZXJNaXNzaW5nIGZyb20gJy4vaGVscGVycy9oZWxwZXItbWlzc2luZyc7XG5pbXBvcnQgcmVnaXN0ZXJJZiBmcm9tICcuL2hlbHBlcnMvaWYnO1xuaW1wb3J0IHJlZ2lzdGVyTG9nIGZyb20gJy4vaGVscGVycy9sb2cnO1xuaW1wb3J0IHJlZ2lzdGVyTG9va3VwIGZyb20gJy4vaGVscGVycy9sb29rdXAnO1xuaW1wb3J0IHJlZ2lzdGVyV2l0aCBmcm9tICcuL2hlbHBlcnMvd2l0aCc7XG5cbmV4cG9ydCBmdW5jdGlvbiByZWdpc3RlckRlZmF1bHRIZWxwZXJzKGluc3RhbmNlKSB7XG4gIHJlZ2lzdGVyQmxvY2tIZWxwZXJNaXNzaW5nKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJFYWNoKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJIZWxwZXJNaXNzaW5nKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJJZihpbnN0YW5jZSk7XG4gIHJlZ2lzdGVyTG9nKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJMb29rdXAoaW5zdGFuY2UpO1xuICByZWdpc3RlcldpdGgoaW5zdGFuY2UpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gbW92ZUhlbHBlclRvSG9va3MoaW5zdGFuY2UsIGhlbHBlck5hbWUsIGtlZXBIZWxwZXIpIHtcbiAgaWYgKGluc3RhbmNlLmhlbHBlcnNbaGVscGVyTmFtZV0pIHtcbiAgICBpbnN0YW5jZS5ob29rc1toZWxwZXJOYW1lXSA9IGluc3RhbmNlLmhlbHBlcnNbaGVscGVyTmFtZV07XG4gICAgaWYgKCFrZWVwSGVscGVyKSB7XG4gICAgICBkZWxldGUgaW5zdGFuY2UuaGVscGVyc1toZWxwZXJOYW1lXTtcbiAgICB9XG4gIH1cbn1cbiJdfQ==

View File

@@ -0,0 +1,5 @@
"use strict";
var _undefined = require("../function/noop")(); // Support ES3 engines
module.exports = function (val) { return val !== _undefined && val !== null; };

View File

@@ -0,0 +1,32 @@
var baseSet = require('./_baseSet');
/**
* This method is like `_.set` except that it accepts `customizer` which is
* invoked to produce the objects of `path`. If `customizer` returns `undefined`
* path creation is handled by the method instead. The `customizer` is invoked
* with three arguments: (nsValue, key, nsObject).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to set.
* @param {*} value The value to set.
* @param {Function} [customizer] The function to customize assigned values.
* @returns {Object} Returns `object`.
* @example
*
* var object = {};
*
* _.setWith(object, '[0][1]', 'a', Object);
* // => { '0': { '1': 'a' } }
*/
function setWith(object, path, value, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
return object == null ? object : baseSet(object, path, value, customizer);
}
module.exports = setWith;

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('invokeArgsMap', require('../invokeMap'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,113 @@
{
"name": "cli-color",
"version": "2.0.3",
"description": "Colors, formatting and other tools for the console",
"author": "Mariusz Nowak <medyk@medikoo.com> (http://www.medikoo.com/)",
"keywords": [
"ansi",
"color",
"console",
"terminal",
"cli",
"shell",
"log",
"logging",
"xterm"
],
"repository": {
"type": "git",
"url": "git://github.com/medikoo/cli-color.git"
},
"dependencies": {
"d": "^1.0.1",
"es5-ext": "^0.10.61",
"es6-iterator": "^2.0.3",
"memoizee": "^0.4.15",
"timers-ext": "^0.1.7"
},
"devDependencies": {
"eslint": "^8.19.0",
"eslint-config-medikoo": "^4.1.2",
"git-list-updated": "^1.2.1",
"github-release-from-cc-changelog": "^2.3.0",
"husky": "^4.3.8",
"lint-staged": "^13.0.3",
"nyc": "^15.1.0",
"prettier-elastic": "^2.2.1",
"tad": "^3.1.0"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.js": [
"eslint"
],
"*.{css,html,js,json,md,yaml,yml}": [
"prettier -c"
]
},
"eslintConfig": {
"extends": "medikoo/node/es5",
"root": true,
"rules": {
"id-length": "off"
},
"overrides": [
{
"files": "examples/**",
"rules": {
"no-console": "off"
}
}
]
},
"prettier": {
"printWidth": 100,
"tabWidth": 4,
"overrides": [
{
"files": [
"*.md",
"*.yml"
],
"options": {
"tabWidth": 2
}
}
]
},
"nyc": {
"all": true,
"exclude": [
".github",
"coverage/**",
"examples",
"test/**",
"*.config.js"
],
"reporter": [
"lcov",
"html",
"text-summary"
]
},
"scripts": {
"coverage": "nyc npm test",
"lint": "eslint --ignore-path=.gitignore .",
"lint:updated": "pipe-git-updated --base=main --ext=js -- eslint --ignore-pattern '!*'",
"prepare-release": "standard-version && prettier --write CHANGELOG.md",
"prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"",
"prettier-check:updated": "pipe-git-updated --base=main --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c",
"prettify": "prettier --write --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"",
"prettify:updated": "pipe-git-updated --base=main --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier --write",
"test": "tad"
},
"engines": {
"node": ">=0.10"
},
"license": "ISC"
}

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('assignAllWith', require('../assignWith'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,14 @@
/*
* Note that we cannot apply the `internal` tag here because the declaration
* needs to survive the `stripInternal` option. Otherwise, `AnyCatcher` will
* be `any` in the `.d.ts` files.
*/
declare const anyCatcherSymbol: unique symbol;
/**
* This is just a type that we're using to identify `any` being passed to
* function overloads. This is used because of situations like {@link forkJoin},
* where it could return an `Observable<T[]>` or an `Observable<{ [key: K]: T }>`,
* so `forkJoin(any)` would mean we need to return `Observable<unknown>`.
*/
export type AnyCatcher = typeof anyCatcherSymbol;

View File

@@ -0,0 +1 @@
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0.01835,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.1346,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0.03977,"103":0,"104":0,"105":0,"106":0,"107":0.01835,"108":0,"109":0.81369,"110":0.52309,"111":0,"112":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0.09789,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0.09789,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0.15601,"109":1.68857,"110":0.9697,"111":0,"112":0,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0.05812,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0.60262,"108":0.01835,"109":1.20219,"110":0.56286},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0.01835,"13.1":0,"14.1":0.23248,"15.1":0.07648,"15.2-15.3":0.27225,"15.4":0.01835,"15.5":0.01835,"15.6":0.07648,"16.0":0.11624,"16.1":0.15601,"16.2":0.23248,"16.3":0.87487,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0,"6.0-6.1":0,"7.0-7.1":0,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0,"11.0-11.2":0,"11.3-11.4":0,"12.0-12.1":0,"12.2-12.5":0.08439,"13.0-13.1":0,"13.2":0,"13.3":0,"13.4-13.7":0,"14.0-14.4":0.08439,"14.5-14.8":1.7799,"15.0-15.1":0.50789,"15.2-15.3":3.64573,"15.4":0,"15.5":0.16878,"15.6":0.42349,"16.0":2.2034,"16.1":2.03461,"16.2":1.18609,"16.3":2.37371,"16.4":0},P:{"4":0,"20":3.00315,"5.0-5.4":0.19148,"6.2-6.4":0,"7.2-7.4":0.06047,"8.2":0,"9.2":0,"10.1":0,"11.1-11.2":0,"12.0":0,"13.0":0,"14.0":0.06047,"15.0":0,"16.0":0,"17.0":0,"18.0":0.06047,"19.0":2.17678},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.25247},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.01835,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0},H:{"0":0.11828},L:{"0":68.30736},R:{_:"0"},M:{"0":0},Q:{"13.1":0}};

View File

@@ -0,0 +1,9 @@
exports = module.exports = require('./lib/_stream_readable.js');
exports.Stream = exports;
exports.Readable = exports;
exports.Writable = require('./lib/_stream_writable.js');
exports.Duplex = require('./lib/_stream_duplex.js');
exports.Transform = require('./lib/_stream_transform.js');
exports.PassThrough = require('./lib/_stream_passthrough.js');
exports.finished = require('./lib/internal/streams/end-of-stream.js');
exports.pipeline = require('./lib/internal/streams/pipeline.js');

View File

@@ -0,0 +1,22 @@
define(['exports', '../utils'], function (exports, _utils) {
'use strict';
exports.__esModule = true;
exports.createNewLookupObject = createNewLookupObject;
/**
* Create a new object with "null"-prototype to avoid truthy results on prototype properties.
* The resulting object can be used with "object[property]" to check if a property exists
* @param {...object} sources a varargs parameter of source objects that will be merged
* @returns {object}
*/
function createNewLookupObject() {
for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) {
sources[_key] = arguments[_key];
}
return _utils.extend.apply(undefined, [Object.create(null)].concat(sources));
}
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL2NyZWF0ZS1uZXctbG9va3VwLW9iamVjdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7O0FBUU8sV0FBUyxxQkFBcUIsR0FBYTtzQ0FBVCxPQUFPO0FBQVAsYUFBTzs7O0FBQzlDLFdBQU8sT0FUQSxNQUFNLG1CQVNDLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLFNBQUssT0FBTyxFQUFDLENBQUM7R0FDaEQiLCJmaWxlIjoiY3JlYXRlLW5ldy1sb29rdXAtb2JqZWN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgZXh0ZW5kIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vKipcbiAqIENyZWF0ZSBhIG5ldyBvYmplY3Qgd2l0aCBcIm51bGxcIi1wcm90b3R5cGUgdG8gYXZvaWQgdHJ1dGh5IHJlc3VsdHMgb24gcHJvdG90eXBlIHByb3BlcnRpZXMuXG4gKiBUaGUgcmVzdWx0aW5nIG9iamVjdCBjYW4gYmUgdXNlZCB3aXRoIFwib2JqZWN0W3Byb3BlcnR5XVwiIHRvIGNoZWNrIGlmIGEgcHJvcGVydHkgZXhpc3RzXG4gKiBAcGFyYW0gey4uLm9iamVjdH0gc291cmNlcyBhIHZhcmFyZ3MgcGFyYW1ldGVyIG9mIHNvdXJjZSBvYmplY3RzIHRoYXQgd2lsbCBiZSBtZXJnZWRcbiAqIEByZXR1cm5zIHtvYmplY3R9XG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVOZXdMb29rdXBPYmplY3QoLi4uc291cmNlcykge1xuICByZXR1cm4gZXh0ZW5kKE9iamVjdC5jcmVhdGUobnVsbCksIC4uLnNvdXJjZXMpO1xufVxuIl19

View File

@@ -0,0 +1 @@
{"version":3,"file":"map.js","sourceRoot":"","sources":["../../../../src/internal/operators/map.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AA6ChE,SAAgB,GAAG,CAAO,OAAuC,EAAE,OAAa;IAC9E,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAQ;YAG5C,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QACzD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAdD,kBAcC"}

View File

@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: ()=>escapeCommas
});
function escapeCommas(className) {
return className.replace(/\\,/g, "\\2c ");
}

View File

@@ -0,0 +1,25 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformer = void 0;
const less_1 = __importDefault(require("less"));
const utils_1 = require("../modules/utils");
const transformer = async ({ content, filename, options = {}, }) => {
options = {
paths: utils_1.getIncludePaths(filename, options.paths),
...options,
};
const { css, map, imports } = await less_1.default.render(content, {
sourceMap: {},
filename,
...options,
});
return {
code: css,
map,
dependencies: imports,
};
};
exports.transformer = transformer;

View File

@@ -0,0 +1,7 @@
"use strict";
module.exports = function () {
var log10 = Math.log10;
if (typeof log10 !== "function") return false;
return log10(2) === 0.3010299956639812;
};

View File

@@ -0,0 +1,12 @@
"use strict";
var resolveException = require("../lib/resolve-exception")
, is = require("./is");
module.exports = function (value/*, options*/) {
if (is(value)) return value;
var options = arguments[1];
var errorMessage =
options && options.name ? "Expected a value for %n, received %v" : "Cannot use %v";
return resolveException(value, errorMessage, options);
};

View File

@@ -0,0 +1,19 @@
'use strict';
exports.__esModule = true;
exports.wrapHelper = wrapHelper;
function wrapHelper(helper, transformOptionsFn) {
if (typeof helper !== 'function') {
// This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639
// We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function.
return helper;
}
var wrapper = function wrapper() /* dynamic arguments */{
var options = arguments[arguments.length - 1];
arguments[arguments.length - 1] = transformOptionsFn(options);
return helper.apply(this, arguments);
};
return wrapper;
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL3dyYXBIZWxwZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBTyxTQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUUsa0JBQWtCLEVBQUU7QUFDckQsTUFBSSxPQUFPLE1BQU0sS0FBSyxVQUFVLEVBQUU7OztBQUdoQyxXQUFPLE1BQU0sQ0FBQztHQUNmO0FBQ0QsTUFBSSxPQUFPLEdBQUcsU0FBVixPQUFPLDBCQUFxQztBQUM5QyxRQUFNLE9BQU8sR0FBRyxTQUFTLENBQUMsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQztBQUNoRCxhQUFTLENBQUMsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsR0FBRyxrQkFBa0IsQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUM5RCxXQUFPLE1BQU0sQ0FBQyxLQUFLLENBQUMsSUFBSSxFQUFFLFNBQVMsQ0FBQyxDQUFDO0dBQ3RDLENBQUM7QUFDRixTQUFPLE9BQU8sQ0FBQztDQUNoQiIsImZpbGUiOiJ3cmFwSGVscGVyLmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGZ1bmN0aW9uIHdyYXBIZWxwZXIoaGVscGVyLCB0cmFuc2Zvcm1PcHRpb25zRm4pIHtcbiAgaWYgKHR5cGVvZiBoZWxwZXIgIT09ICdmdW5jdGlvbicpIHtcbiAgICAvLyBUaGlzIHNob3VsZCBub3QgaGFwcGVuLCBidXQgYXBwYXJlbnRseSBpdCBkb2VzIGluIGh0dHBzOi8vZ2l0aHViLmNvbS93eWNhdHMvaGFuZGxlYmFycy5qcy9pc3N1ZXMvMTYzOVxuICAgIC8vIFdlIHRyeSB0byBtYWtlIHRoZSB3cmFwcGVyIGxlYXN0LWludmFzaXZlIGJ5IG5vdCB3cmFwcGluZyBpdCwgaWYgdGhlIGhlbHBlciBpcyBub3QgYSBmdW5jdGlvbi5cbiAgICByZXR1cm4gaGVscGVyO1xuICB9XG4gIGxldCB3cmFwcGVyID0gZnVuY3Rpb24oLyogZHluYW1pYyBhcmd1bWVudHMgKi8pIHtcbiAgICBjb25zdCBvcHRpb25zID0gYXJndW1lbnRzW2FyZ3VtZW50cy5sZW5ndGggLSAxXTtcbiAgICBhcmd1bWVudHNbYXJndW1lbnRzLmxlbmd0aCAtIDFdID0gdHJhbnNmb3JtT3B0aW9uc0ZuKG9wdGlvbnMpO1xuICAgIHJldHVybiBoZWxwZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgfTtcbiAgcmV0dXJuIHdyYXBwZXI7XG59XG4iXX0=

View File

@@ -0,0 +1 @@
{"version":3,"file":"Subscription.js","sourceRoot":"","sources":["../../../src/internal/Subscription.ts"],"names":[],"mappings":"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"}

View File

@@ -0,0 +1,107 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformer = exports.loadTsconfig = void 0;
const path_1 = require("path");
const typescript_1 = __importDefault(require("typescript"));
const errors_1 = require("../modules/errors");
function createFormatDiagnosticsHost(cwd) {
return {
getCanonicalFileName: (fileName) => fileName,
getCurrentDirectory: () => cwd,
getNewLine: () => typescript_1.default.sys.newLine,
};
}
function formatDiagnostics(diagnostics, basePath) {
if (Array.isArray(diagnostics)) {
return typescript_1.default.formatDiagnosticsWithColorAndContext(diagnostics, createFormatDiagnosticsHost(basePath));
}
return typescript_1.default.formatDiagnostic(diagnostics, createFormatDiagnosticsHost(basePath));
}
const importTransformer = (context) => {
const visit = (node) => {
var _a;
if (typescript_1.default.isImportDeclaration(node)) {
if ((_a = node.importClause) === null || _a === void 0 ? void 0 : _a.isTypeOnly) {
return typescript_1.default.createEmptyStatement();
}
return typescript_1.default.createImportDeclaration(node.decorators, node.modifiers, node.importClause, node.moduleSpecifier);
}
return typescript_1.default.visitEachChild(node, (child) => visit(child), context);
};
return (node) => typescript_1.default.visitNode(node, visit);
};
function loadTsconfig(compilerOptionsJSON, filename, tsOptions) {
if (typeof tsOptions.tsconfigFile === 'boolean') {
return { errors: [], options: compilerOptionsJSON };
}
let basePath = process.cwd();
const fileDirectory = (tsOptions.tsconfigDirectory ||
path_1.dirname(filename));
let tsconfigFile = tsOptions.tsconfigFile ||
typescript_1.default.findConfigFile(fileDirectory, typescript_1.default.sys.fileExists);
tsconfigFile = path_1.isAbsolute(tsconfigFile)
? tsconfigFile
: path_1.join(basePath, tsconfigFile);
basePath = path_1.dirname(tsconfigFile);
const { error, config } = typescript_1.default.readConfigFile(tsconfigFile, typescript_1.default.sys.readFile);
if (error) {
throw new Error(formatDiagnostics(error, basePath));
}
// Do this so TS will not search for initial files which might take a while
config.include = [];
let { errors, options } = typescript_1.default.parseJsonConfigFileContent(config, typescript_1.default.sys, basePath, compilerOptionsJSON, tsconfigFile);
// Filter out "no files found error"
errors = errors.filter((d) => d.code !== 18003);
return { errors, options };
}
exports.loadTsconfig = loadTsconfig;
const transformer = ({ content, filename, options = {}, }) => {
// default options
const compilerOptionsJSON = {
moduleResolution: 'node',
target: 'es6',
};
const basePath = process.cwd();
Object.assign(compilerOptionsJSON, options.compilerOptions);
const { errors, options: convertedCompilerOptions } = options.tsconfigFile !== false || options.tsconfigDirectory
? loadTsconfig(compilerOptionsJSON, filename, options)
: typescript_1.default.convertCompilerOptionsFromJson(compilerOptionsJSON, basePath);
if (errors.length) {
throw new Error(formatDiagnostics(errors, basePath));
}
const compilerOptions = {
...convertedCompilerOptions,
importsNotUsedAsValues: typescript_1.default.ImportsNotUsedAsValues.Error,
allowNonTsExtensions: true,
};
if (compilerOptions.target === typescript_1.default.ScriptTarget.ES3 ||
compilerOptions.target === typescript_1.default.ScriptTarget.ES5) {
throw new Error(`Svelte only supports es6+ syntax. Set your 'compilerOptions.target' to 'es6' or higher.`);
}
const { outputText: code, sourceMapText: map, diagnostics, } = typescript_1.default.transpileModule(content, {
fileName: filename,
compilerOptions,
reportDiagnostics: options.reportDiagnostics !== false,
transformers: {
before: [importTransformer],
},
});
if (diagnostics.length > 0) {
// could this be handled elsewhere?
const hasError = diagnostics.some((d) => d.category === typescript_1.default.DiagnosticCategory.Error);
const formattedDiagnostics = formatDiagnostics(diagnostics, basePath);
console.log(formattedDiagnostics);
if (hasError) {
errors_1.throwTypescriptError();
}
}
return {
code,
map,
diagnostics,
};
};
exports.transformer = transformer;

View File

@@ -0,0 +1,4 @@
export type UserNonexistantOrRefreshtokenInvalidError = {
name: string;
message: string;
};

View File

@@ -0,0 +1,28 @@
import { identity } from '../util/identity';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
export function skipLast(skipCount) {
return skipCount <= 0
?
identity
: operate(function (source, subscriber) {
var ring = new Array(skipCount);
var seen = 0;
source.subscribe(createOperatorSubscriber(subscriber, function (value) {
var valueIndex = seen++;
if (valueIndex < skipCount) {
ring[valueIndex] = value;
}
else {
var index = valueIndex % skipCount;
var oldValue = ring[index];
ring[index] = value;
subscriber.next(oldValue);
}
}));
return function () {
ring = null;
};
});
}
//# sourceMappingURL=skipLast.js.map

View File

@@ -0,0 +1,8 @@
"use strict";
var re = /foo/;
module.exports = function () {
if (typeof re.search !== "function") return false;
return re.search("barfoo") === 3;
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotificationFactories.d.ts","sourceRoot":"","sources":["../../../src/internal/NotificationFactories.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,4 @@
const outside = require('./outside')
// Determine if version is less than all the versions possible in the range
const ltr = (version, range, options) => outside(version, range, '<', options)
module.exports = ltr

View File

@@ -0,0 +1,78 @@
{
"name": "postcss-selector-parser",
"version": "6.0.11",
"devDependencies": {
"@babel/cli": "^7.11.6",
"@babel/core": "^7.11.6",
"@babel/eslint-parser": "^7.11.5",
"@babel/eslint-plugin": "^7.11.5",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/preset-env": "^7.11.5",
"@babel/register": "^7.11.5",
"ava": "^3.12.1",
"babel-plugin-add-module-exports": "^1.0.4",
"coveralls": "^3.1.0",
"del-cli": "^3.0.1",
"eslint": "^7.9.0",
"eslint-plugin-import": "^2.22.0",
"glob": "^7.1.6",
"minimist": "^1.2.5",
"nyc": "^15.1.0",
"postcss": "^8.0.0",
"semver": "^7.3.2",
"typescript": "^4.0.3"
},
"main": "dist/index.js",
"types": "postcss-selector-parser.d.ts",
"files": [
"API.md",
"CHANGELOG.md",
"LICENSE-MIT",
"dist",
"postcss-selector-parser.d.ts",
"!**/__tests__"
],
"scripts": {
"pretest": "eslint src && tsc --noEmit postcss-selector-parser.d.ts",
"prepare": "del-cli dist && BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/",
"lintfix": "eslint --fix src",
"report": "nyc report --reporter=html",
"test": "nyc ava src/__tests__/*.js ",
"testone": "ava"
},
"dependencies": {
"cssesc": "^3.0.0",
"util-deprecate": "^1.0.2"
},
"license": "MIT",
"engines": {
"node": ">=4"
},
"homepage": "https://github.com/postcss/postcss-selector-parser",
"contributors": [
{
"name": "Ben Briggs",
"email": "beneb.info@gmail.com",
"url": "http://beneb.info"
},
{
"name": "Chris Eppstein",
"email": "chris@eppsteins.net",
"url": "http://twitter.com/chriseppstein"
}
],
"repository": "postcss/postcss-selector-parser",
"ava": {
"require": [
"@babel/register"
],
"concurrency": 5,
"timeout": "25s"
},
"nyc": {
"exclude": [
"node_modules",
"**/__tests__"
]
}
}

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('defaults', require('../defaults'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,6 @@
import { SchedulerLike } from '../types';
import { isFunction } from './isFunction';
export function isScheduler(value: any): value is SchedulerLike {
return value && isFunction(value.schedule);
}

View File

@@ -0,0 +1,27 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = GetIntrinsic('%TypeError%');
var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint');
var IsArray = require('./IsArray');
var forEach = require('../helpers/forEach');
var isCodePoint = require('../helpers/isCodePoint');
// https://262.ecma-international.org/12.0/#sec-codepointstostring
module.exports = function CodePointsToString(text) {
if (!IsArray(text)) {
throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points');
}
var result = '';
forEach(text, function (cp) {
if (!isCodePoint(cp)) {
throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points');
}
result += UTF16EncodeCodePoint(cp);
});
return result;
};

View File

@@ -0,0 +1,32 @@
var test = require('tape');
var wordwrap = require('../');
test('hard', function (t) {
var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,'
+ '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",'
+ '"browser":"chrome/6.0"}'
;
var s_ = wordwrap.hard(80)(s);
var lines = s_.split('\n');
t.equal(lines.length, 2);
t.ok(lines[0].length < 80);
t.ok(lines[1].length < 80);
t.equal(s, s_.replace(/\n/g, ''));
t.end();
});
test('break', function (t) {
var s = new Array(55+1).join('a');
var s_ = wordwrap.hard(20)(s);
var lines = s_.split('\n');
t.equal(lines.length, 3);
t.ok(lines[0].length === 20);
t.ok(lines[1].length === 20);
t.ok(lines[2].length === 15);
t.equal(s, s_.replace(/\n/g, ''));
t.end();
});

View File

@@ -0,0 +1,276 @@
export interface DefaultColors {
inherit: 'inherit'
current: 'currentColor'
transparent: 'transparent'
black: '#000'
white: '#fff'
slate: {
'50': '#f8fafc'
'100': '#f1f5f9'
'200': '#e2e8f0'
'300': '#cbd5e1'
'400': '#94a3b8'
'500': '#64748b'
'600': '#475569'
'700': '#334155'
'800': '#1e293b'
'900': '#0f172a'
}
gray: {
'50': '#f9fafb'
'100': '#f3f4f6'
'200': '#e5e7eb'
'300': '#d1d5db'
'400': '#9ca3af'
'500': '#6b7280'
'600': '#4b5563'
'700': '#374151'
'800': '#1f2937'
'900': '#111827'
}
zinc: {
'50': '#fafafa'
'100': '#f4f4f5'
'200': '#e4e4e7'
'300': '#d4d4d8'
'400': '#a1a1aa'
'500': '#71717a'
'600': '#52525b'
'700': '#3f3f46'
'800': '#27272a'
'900': '#18181b'
}
neutral: {
'50': '#fafafa'
'100': '#f5f5f5'
'200': '#e5e5e5'
'300': '#d4d4d4'
'400': '#a3a3a3'
'500': '#737373'
'600': '#525252'
'700': '#404040'
'800': '#262626'
'900': '#171717'
}
stone: {
'50': '#fafaf9'
'100': '#f5f5f4'
'200': '#e7e5e4'
'300': '#d6d3d1'
'400': '#a8a29e'
'500': '#78716c'
'600': '#57534e'
'700': '#44403c'
'800': '#292524'
'900': '#1c1917'
}
red: {
'50': '#fef2f2'
'100': '#fee2e2'
'200': '#fecaca'
'300': '#fca5a5'
'400': '#f87171'
'500': '#ef4444'
'600': '#dc2626'
'700': '#b91c1c'
'800': '#991b1b'
'900': '#7f1d1d'
}
orange: {
'50': '#fff7ed'
'100': '#ffedd5'
'200': '#fed7aa'
'300': '#fdba74'
'400': '#fb923c'
'500': '#f97316'
'600': '#ea580c'
'700': '#c2410c'
'800': '#9a3412'
'900': '#7c2d12'
}
amber: {
'50': '#fffbeb'
'100': '#fef3c7'
'200': '#fde68a'
'300': '#fcd34d'
'400': '#fbbf24'
'500': '#f59e0b'
'600': '#d97706'
'700': '#b45309'
'800': '#92400e'
'900': '#78350f'
}
yellow: {
'50': '#fefce8'
'100': '#fef9c3'
'200': '#fef08a'
'300': '#fde047'
'400': '#facc15'
'500': '#eab308'
'600': '#ca8a04'
'700': '#a16207'
'800': '#854d0e'
'900': '#713f12'
}
lime: {
'50': '#f7fee7'
'100': '#ecfccb'
'200': '#d9f99d'
'300': '#bef264'
'400': '#a3e635'
'500': '#84cc16'
'600': '#65a30d'
'700': '#4d7c0f'
'800': '#3f6212'
'900': '#365314'
}
green: {
'50': '#f0fdf4'
'100': '#dcfce7'
'200': '#bbf7d0'
'300': '#86efac'
'400': '#4ade80'
'500': '#22c55e'
'600': '#16a34a'
'700': '#15803d'
'800': '#166534'
'900': '#14532d'
}
emerald: {
'50': '#ecfdf5'
'100': '#d1fae5'
'200': '#a7f3d0'
'300': '#6ee7b7'
'400': '#34d399'
'500': '#10b981'
'600': '#059669'
'700': '#047857'
'800': '#065f46'
'900': '#064e3b'
}
teal: {
'50': '#f0fdfa'
'100': '#ccfbf1'
'200': '#99f6e4'
'300': '#5eead4'
'400': '#2dd4bf'
'500': '#14b8a6'
'600': '#0d9488'
'700': '#0f766e'
'800': '#115e59'
'900': '#134e4a'
}
cyan: {
'50': '#ecfeff'
'100': '#cffafe'
'200': '#a5f3fc'
'300': '#67e8f9'
'400': '#22d3ee'
'500': '#06b6d4'
'600': '#0891b2'
'700': '#0e7490'
'800': '#155e75'
'900': '#164e63'
}
sky: {
'50': '#f0f9ff'
'100': '#e0f2fe'
'200': '#bae6fd'
'300': '#7dd3fc'
'400': '#38bdf8'
'500': '#0ea5e9'
'600': '#0284c7'
'700': '#0369a1'
'800': '#075985'
'900': '#0c4a6e'
}
blue: {
'50': '#eff6ff'
'100': '#dbeafe'
'200': '#bfdbfe'
'300': '#93c5fd'
'400': '#60a5fa'
'500': '#3b82f6'
'600': '#2563eb'
'700': '#1d4ed8'
'800': '#1e40af'
'900': '#1e3a8a'
}
indigo: {
'50': '#eef2ff'
'100': '#e0e7ff'
'200': '#c7d2fe'
'300': '#a5b4fc'
'400': '#818cf8'
'500': '#6366f1'
'600': '#4f46e5'
'700': '#4338ca'
'800': '#3730a3'
'900': '#312e81'
}
violet: {
'50': '#f5f3ff'
'100': '#ede9fe'
'200': '#ddd6fe'
'300': '#c4b5fd'
'400': '#a78bfa'
'500': '#8b5cf6'
'600': '#7c3aed'
'700': '#6d28d9'
'800': '#5b21b6'
'900': '#4c1d95'
}
purple: {
'50': '#faf5ff'
'100': '#f3e8ff'
'200': '#e9d5ff'
'300': '#d8b4fe'
'400': '#c084fc'
'500': '#a855f7'
'600': '#9333ea'
'700': '#7e22ce'
'800': '#6b21a8'
'900': '#581c87'
}
fuchsia: {
'50': '#fdf4ff'
'100': '#fae8ff'
'200': '#f5d0fe'
'300': '#f0abfc'
'400': '#e879f9'
'500': '#d946ef'
'600': '#c026d3'
'700': '#a21caf'
'800': '#86198f'
'900': '#701a75'
}
pink: {
'50': '#fdf2f8'
'100': '#fce7f3'
'200': '#fbcfe8'
'300': '#f9a8d4'
'400': '#f472b6'
'500': '#ec4899'
'600': '#db2777'
'700': '#be185d'
'800': '#9d174d'
'900': '#831843'
}
rose: {
'50': '#fff1f2'
'100': '#ffe4e6'
'200': '#fecdd3'
'300': '#fda4af'
'400': '#fb7185'
'500': '#f43f5e'
'600': '#e11d48'
'700': '#be123c'
'800': '#9f1239'
'900': '#881337'
}
/** @deprecated As of Tailwind CSS v2.2, `lightBlue` has been renamed to `sky`. Update your configuration file to silence this warning. */ lightBlue: DefaultColors['sky']
/** @deprecated As of Tailwind CSS v3.0, `warmGray` has been renamed to `stone`. Update your configuration file to silence this warning. */ warmGray: DefaultColors['stone']
/** @deprecated As of Tailwind CSS v3.0, `trueGray` has been renamed to `neutral`. Update your configuration file to silence this warning. */ trueGray: DefaultColors['neutral']
/** @deprecated As of Tailwind CSS v3.0, `coolGray` has been renamed to `gray`. Update your configuration file to silence this warning. */ coolGray: DefaultColors['gray']
/** @deprecated As of Tailwind CSS v3.0, `blueGray` has been renamed to `slate`. Update your configuration file to silence this warning. */ blueGray: DefaultColors['slate']
}

View File

@@ -0,0 +1,4 @@
export type PrincipalNotFoundError = {
name: string;
message: string;
};

View File

@@ -0,0 +1,2 @@
declare function isPrototype(value: any): boolean;
export default isPrototype;

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./async').filterLimit;

View File

@@ -0,0 +1,2 @@
export { fromFetch } from '../internal/observable/dom/fetch';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"no-parser.d.ts","sourceRoot":"","sources":["../../../../../../packages/icu-messageformat-parser/no-parser.ts"],"names":[],"mappings":"AAAA,wBAAgB,KAAK,SAIpB;AACD,cAAc,SAAS,CAAA"}

View File

@@ -0,0 +1,20 @@
# 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.0 - 2021-08-05
### Commits
- Tests [`6b6f573`](https://github.com/inspect-js/has-tostringtag/commit/6b6f5734dc2058badb300ff0783efdad95fe1a65)
- Initial commit [`2f8190e`](https://github.com/inspect-js/has-tostringtag/commit/2f8190e799fac32ba9b95a076c0255e01d7ce475)
- [meta] do not publish github action workflow files [`6e08cc4`](https://github.com/inspect-js/has-tostringtag/commit/6e08cc4e0fea7ec71ef66e70734b2af2c4a8b71b)
- readme [`94bed6c`](https://github.com/inspect-js/has-tostringtag/commit/94bed6c9560cbbfda034f8d6c260bb7b0db33c1a)
- npm init [`be67840`](https://github.com/inspect-js/has-tostringtag/commit/be67840ab92ee7adb98bcc65261975543f815fa5)
- Implementation [`c4914ec`](https://github.com/inspect-js/has-tostringtag/commit/c4914ecc51ddee692c85b471ae0a5d8123030fbf)
- [meta] use `auto-changelog` [`4aaf768`](https://github.com/inspect-js/has-tostringtag/commit/4aaf76895ae01d7b739f2b19f967ef2372506cd7)
- Only apps should have lockfiles [`bc4d99e`](https://github.com/inspect-js/has-tostringtag/commit/bc4d99e4bf494afbaa235c5f098df6e642edf724)
- [meta] add `safe-publish-latest` [`6523c05`](https://github.com/inspect-js/has-tostringtag/commit/6523c05c9b87140f3ae74c9daf91633dd9ff4e1f)

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J D E F CC","132":"A B"},B:{"132":"C K L G M N O","1028":"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:{"2":"0 1 2 3 4 5 6 7 8 DC tB I v J D E F A B C K L G M N O w g x y z EC FC","1028":"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","2564":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB","3076":"PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB"},D:{"16":"I v J D","132":"0 1 2 3 4 5 6 7 8 9 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","388":"E","1028":"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:{"16":"I HC zB","132":"v J D E F A IC JC KC LC 0B","1028":"B C K L G qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"2":"F B C PC QC RC SC qB AC TC rB","132":"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","1028":"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:{"16":"zB UC BC","132":"E VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"132":"I sC BC tC uC","292":"tB pC qC rC","1028":"f"},J:{"16":"D","132":"A"},K:{"2":"A B C qB AC rB","1028":"h"},L:{"1028":"H"},M:{"1028":"H"},N:{"132":"A B"},O:{"1028":"vC"},P:{"132":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1028":"1B"},R:{"1028":"9C"},S:{"1028":"BD","2564":"AD"}},B:4,C:"DOMMatrix"};

View File

@@ -0,0 +1,15 @@
version: ~> 1.0
language: node_js
cache:
directories:
- "$(nvm cache dir)"
os:
- linux
import:
- ljharb/travis-ci:node/all.yml
- ljharb/travis-ci:node/pretest.yml
- ljharb/travis-ci:node/posttest.yml
- ljharb/travis-ci:node/coverage.yml
matrix:
allow_failures:
- env: COVERAGE=true

View File

@@ -0,0 +1,2 @@
if(typeof cptable === 'undefined') cptable = {};
cptable[852] = (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{|}~ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ ", 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 }; })();

View File

@@ -0,0 +1,29 @@
/**
Extract all required keys from the given type.
This is useful when you want to create a new type that contains different type values for the required keys only or use the list of keys for validation purposes, etc...
@example
```
import type {RequiredKeysOf} from 'type-fest';
declare function createValidation<Entity extends object, Key extends RequiredKeysOf<Entity> = RequiredKeysOf<Entity>>(field: Key, validator: (value: Entity[Key]) => boolean): ValidatorFn;
interface User {
name: string;
surname: string;
luckyNumber?: number;
}
const validator1 = createValidation<User>('name', value => value.length < 25);
const validator2 = createValidation<User>('surname', value => value.length < 25);
```
@category Utilities
*/
export type RequiredKeysOf<BaseType extends object> = Exclude<{
[Key in keyof BaseType]: BaseType extends Record<Key, BaseType[Key]>
? Key
: never
}[keyof BaseType], undefined>;

View File

@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SupportedLocales = void 0;
var _262_1 = require("./262");
var GetOption_1 = require("./GetOption");
var intl_localematcher_1 = require("@formatjs/intl-localematcher");
/**
* https://tc39.es/ecma402/#sec-supportedlocales
* @param availableLocales
* @param requestedLocales
* @param options
*/
function SupportedLocales(availableLocales, requestedLocales, options) {
var matcher = 'best fit';
if (options !== undefined) {
options = (0, _262_1.ToObject)(options);
matcher = (0, GetOption_1.GetOption)(options, 'localeMatcher', 'string', ['lookup', 'best fit'], 'best fit');
}
if (matcher === 'best fit') {
return (0, intl_localematcher_1.LookupSupportedLocales)(availableLocales, requestedLocales);
}
return (0, intl_localematcher_1.LookupSupportedLocales)(availableLocales, requestedLocales);
}
exports.SupportedLocales = SupportedLocales;

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"u f H","2":"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","194":"r s t"},C:{"1":"n o p q r s t u f H xB yB","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 EC FC"},D:{"1":"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 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","194":"m n o p q r s t"},E:{"1":"3B 4B 5B sB 6B 7B 8B 9B OC","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"},F:{"1":"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 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 PC QC RC SC qB AC TC rB","194":"a b c"},G:{"1":"3B 4B 5B sB 6B 7B 8B 9B","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"},H:{"2":"oC"},I:{"1":"f","2":"tB I pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"2":"A B C h qB AC rB"},L:{"1":"H"},M:{"1":"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:5,C:"Small, Large, and Dynamic viewport units"};

View File

@@ -0,0 +1,2 @@
declare function isArrayLike(value: any, options?: {allowString?: boolean}): boolean;
export default isArrayLike;

View File

@@ -0,0 +1,12 @@
'use strict'
const u = require('universalify').fromPromise
const fs = require('../fs')
function pathExists (path) {
return fs.access(path).then(() => true).catch(() => false)
}
module.exports = {
pathExists: u(pathExists),
pathExistsSync: fs.existsSync
}

View File

@@ -0,0 +1 @@
{"name":"reusify","version":"1.0.4","files":{"package.json":{"checkedAt":1678883670848,"integrity":"sha512-72fScsXgxq8VmXp79zr4lKo41C1rE+R207J+j0LY4yT4N70ENxb619lEk6YDdxh1f2MhLQhG2akAjSc/zLHwlg==","mode":420,"size":1023},".travis.yml":{"checkedAt":1678883670848,"integrity":"sha512-7/9uuLl/n3EzZhHowa2cLBV8CJrLdgw4fD+8AcHiQJMCYeHgwixoleJW9BImt9+wzcVRril453MWaEDZDZzr+Q==","mode":420,"size":284},".coveralls.yml":{"checkedAt":1678883670848,"integrity":"sha512-MkAZy8a9GgX+4/EKwlhVzGLqIeVm77u9ATeq1xjghruPHALkIAgCVv7Upgy0xzIN8XE/rXJJP2+JwgAWuvydSg==","mode":420,"size":46},"README.md":{"checkedAt":1678883670848,"integrity":"sha512-uBZRZMElJ1lSDMUUUEg2LoQdYiJecozzptI/SURWnqdKb2Jtu+kPuP1wxZW/tXbeCbA3/O3B26jrfrijmToBbA==","mode":420,"size":3633},"reusify.js":{"checkedAt":1678883670848,"integrity":"sha512-vyldGtKcAUQZki4reYWLf0R9ei1dhReHBgH/hiNkKRYGGtFOWy9HQNrFFL84Y1GheSb/KGMvYc+V+6DomP723Q==","mode":420,"size":454},"LICENSE":{"checkedAt":1678883670849,"integrity":"sha512-96MN82mT3ijspd31hvW3cReciqrv7TOdMaSn9HNmq7uPax8xKjUIygKLaUP4GBECvIue0HDsSTPL6aDN8Ttztw==","mode":420,"size":1082},"benchmarks/createNoCodeFunction.js":{"checkedAt":1678883670849,"integrity":"sha512-dUVuFE3NHIsPnTc9pP1ZrvkrVGz+TYMVgApj7VG6yM4YVnuEhovxMtKkZG4viVIAWtCpXH9HPRBSnIR16YS5nQ==","mode":420,"size":590},"test.js":{"checkedAt":1678883670849,"integrity":"sha512-jfLDiZa1jUvKlDwgPWBOio03iL1g2Ju3lYjLmcFaK/XSs3qIgAuSS7yM8xL3F4evXh71opN1+0oyvkkHRvFo0w==","mode":420,"size":1440},"benchmarks/fib.js":{"checkedAt":1678883670849,"integrity":"sha512-kvlLgMjytO+hY47ooi9ONDEcziN8jEJGD/ArWXJc+Qs2cvc6aL27J22Xv2aVPfNS4FE1xLVXndpg9bpHyZgkFA==","mode":420,"size":177},"benchmarks/reuseNoCodeFunction.js":{"checkedAt":1678883670852,"integrity":"sha512-zAj7MICj1pMMoD/thoNmmm40SXICTFuUTTmInkguKOlwr78TXgH7Z/V0HzdtKAffhRFW0t/KSJYIqcnWoKMqVg==","mode":420,"size":713}}}

View File

@@ -0,0 +1 @@
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.00919,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0.05516,"107":0.05516,"108":0.08275,"109":0.23904,"110":0.08275,"111":0,"112":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0.01839,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0.00919,"69":0,"70":0.00919,"71":0.00919,"72":0.00919,"73":0,"74":0.00919,"75":0,"76":0,"77":0.00919,"78":0.00919,"79":0.00919,"80":0.00919,"81":0.00919,"83":0,"84":0.00919,"85":0.00919,"86":0.00919,"87":0.00919,"88":0.00919,"89":0.00919,"90":0.00919,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0.00919,"99":0.00919,"100":0.00919,"101":0.02758,"102":0,"103":0.02758,"104":0,"105":0,"106":0.00919,"107":0.01839,"108":75.41838,"109":3.03402,"110":1.78364,"111":0,"112":0,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0.04597,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0.01839,"94":0.12872,"95":0.01839,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0.00919,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0.02758,"108":0.00919,"109":0.73552,"110":0.62519},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0.03678,"14":0.03678,"15":0,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0.04597,"10.1":0,"11.1":0,"12.1":0,"13.1":0.00919,"14.1":0.08275,"15.1":0.01839,"15.2-15.3":0.00919,"15.4":0.00919,"15.5":0.17469,"15.6":0.24824,"16.0":0.02758,"16.1":0.06436,"16.2":0.24824,"16.3":0.13791,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0,"6.0-6.1":0,"7.0-7.1":0,"8.1-8.4":0,"9.0-9.2":0.00162,"9.3":0.03392,"10.0-10.2":0.00565,"10.3":0.04442,"11.0-11.2":0.01454,"11.3-11.4":0.00242,"12.0-12.1":0.00888,"12.2-12.5":0.1171,"13.0-13.1":0.01292,"13.2":0.00323,"13.3":0.00646,"13.4-13.7":0.021,"14.0-14.4":0.05411,"14.5-14.8":0.15667,"15.0-15.1":0.01454,"15.2-15.3":0.0856,"15.4":0.13325,"15.5":0.1066,"15.6":0.72117,"16.0":0.94649,"16.1":2.08923,"16.2":2.0755,"16.3":0.96587,"16.4":0.00162},P:{"4":0.01032,"20":0.20639,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0,"8.2":0,"9.2":0,"10.1":0,"11.1-11.2":0,"12.0":0,"13.0":0,"14.0":0,"15.0":0,"16.0":0,"17.0":0,"18.0":0.01032,"19.0":0.40246},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.04242},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0},H:{"0":0.07402},L:{"0":6.92284},R:{_:"0"},M:{"0":0.06932},Q:{"13.1":0}};

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/icu-skeleton-parser/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA"}

View File

@@ -0,0 +1,367 @@
smart-buffer [![Build Status](https://travis-ci.org/JoshGlazebrook/smart-buffer.svg?branch=master)](https://travis-ci.org/JoshGlazebrook/smart-buffer) [![Coverage Status](https://coveralls.io/repos/github/JoshGlazebrook/smart-buffer/badge.svg?branch=master)](https://coveralls.io/github/JoshGlazebrook/smart-buffer?branch=master)
=============
smart-buffer is a light Buffer wrapper that takes away the need to keep track of what position to read and write data to and from the underlying Buffer. It also adds null terminating string operations and **grows** as you add more data.
![stats](https://nodei.co/npm/smart-buffer.png?downloads=true&downloadRank=true&stars=true "stats")
### What it's useful for:
I created smart-buffer because I wanted to simplify the process of using Buffer for building and reading network packets to send over a socket. Rather than having to keep track of which position I need to write a UInt16 to after adding a string of variable length, I simply don't have to.
Key Features:
* Proxies all of the Buffer write and read functions.
* Keeps track of read and write positions for you.
* Grows the internal Buffer as you add data to it.
* Useful string operations. (Null terminating strings)
* Allows for inserting values at specific points in the internal Buffer.
* Built in TypeScript
* Type Definitions Provided
Requirements:
* Node v4.0+ is supported at this time. (Versions prior to 2.0 will work on node 0.10)
#### Note:
smart-buffer can be used for writing to an underlying buffer as well as reading from it. It however does not function correctly if you're mixing both read and write operations with each other.
## Breaking Changes with 2.0
The latest version (2.0+) is written in TypeScript, and are compiled to ES6 Javascript. This means the earliest Node.js it supports will be 4.x (in strict mode.) If you're using version 6 and above it will work without any issues. From an API standpoint, 2.0 is backwards compatible. The only difference is SmartBuffer is not exported directly as the root module.
## Breaking Changes with 3.0
Starting with 3.0, if any of the readIntXXXX() methods are called and the requested data is larger than the bounds of the internally managed valid buffer data, an exception will now be thrown.
## Installing:
`npm install smart-buffer`
or
`yarn add smart-buffer`
Note: The published NPM package includes the built javascript library.
If you cloned this repo and wish to build the library manually use:
`tsc -p ./`
## Using smart-buffer
### Example
Say you were building a packet that had to conform to the following protocol:
`[PacketType:2][PacketLength:2][Data:XX]`
To build this packet using the vanilla Buffer class, you would have to count up the length of the data payload beforehand. You would also need to keep track of the current "cursor" position in your Buffer so you write everything in the right places. With smart-buffer you don't have to do either of those things.
```javascript
// 1.x (javascript)
var SmartBuffer = require('smart-buffer');
// 1.x (typescript)
import SmartBuffer = require('smart-buffer');
// 2.x+ (javascript)
const SmartBuffer = require('smart-buffer').SmartBuffer;
// 2.x+ (typescript)
import { SmartBuffer, SmartBufferOptions} from 'smart-buffer';
function createLoginPacket(username, password, age, country) {
let packet = new SmartBuffer();
packet.writeUInt16LE(0x0060); // Login Packet Type/ID
packet.writeStringNT(username);
packet.writeStringNT(password);
packet.writeUInt8(age);
packet.writeStringNT(country);
packet.writeUInt16LE(packet.length - 2, 2);
return packet.toBuffer();
}
```
With the above function, you now can do this:
```javascript
let login = createLoginPacket("Josh", "secret123", 22, "United States");
// <Buffer 60 00 1e 00 4a 6f 73 68 00 73 65 63 72 65 74 31 32 33 00 16 55 6e 69 74 65 64 20 53 74 61 74 65 73 00>
```
Notice that the `[PacketLength:2]` part of the packet was inserted after we had added everything else, and as shown in the Buffer dump above, is in the correct location along with everything else.
Reading back the packet we created above is just as easy:
```javascript
let reader = SmartBuffer.fromBuffer(login);
let logininfo = {
packetType: reader.readUInt16LE(),
packetLength: reader.readUInt16LE(),
username: reader.readStringNT(),
password: reader.readStringNT(),
age: reader.readUInt8(),
country: reader.readStringNT()
};
/*
{
packetType: 96, (0x0060)
packetLength: 30,
username: 'Josh',
password: 'secret123',
age: 22,
country: 'United States'
};
*/
```
# Api Reference:
### Constructing a smart-buffer
smart-buffer has a few different ways to construct an instance. Starting with version 2.0, the following factory methods are preffered.
```javascript
let SmartBuffer = require('smart-buffer');
// Creating SmartBuffer from existing Buffer
let buff = SmartBuffer.fromBuffer(buffer); // Creates instance from buffer. (Uses default utf8 encoding)
let buff = SmartBuffer.fromBuffer(buffer, 'ascii'); // Creates instance from buffer with ascii encoding for Strings.
// Creating SmartBuffer with specified internal Buffer size.
let buff = SmartBuffer.fromSize(1024); // Creates instance with internal Buffer size of 1024.
let buff = SmartBuffer.fromSize(1024, 'utf8'); // Creates instance with intenral Buffer size of 1024, and utf8 encoding.
// Creating SmartBuffer with options object. This one specifies size and encoding.
let buff = SmartBuffer.fromOptions({
size: 1024,
encoding: 'ascii'
});
// Creating SmartBuffer with options object. This one specified an existing Buffer.
let buff = SmartBuffer.fromOptions({
buff: buffer
});
// Just want a regular SmartBuffer with all default options?
let buff = new SmartBuffer();
```
## Backwards Compatibility:
All constructors used prior to 2.0 still are supported. However it's not recommended to use these.
```javascript
let writer = new SmartBuffer(); // Defaults to utf8, 4096 length internal Buffer.
let writer = new SmartBuffer(1024); // Defaults to utf8, 1024 length internal Buffer.
let writer = new SmartBuffer('ascii'); // Sets to ascii encoding, 4096 length internal buffer.
let writer = new SmartBuffer(1024, 'ascii'); // Sets to ascii encoding, 1024 length internal buffer.
```
## Reading Data
smart-buffer supports all of the common read functions you will find in the vanilla Buffer class. The only difference is, you do not need to specify which location to start reading from. This is possible because as you read data out of a smart-buffer, it automatically progresses an internal read offset/position to know where to pick up from on the next read.
## Reading Numeric Values
When numeric values, you simply need to call the function you want, and the data is returned.
Supported Operations:
* readInt8
* readInt16BE
* readInt16LE
* readInt32BE
* readInt32LE
* readBigInt64LE
* readBigInt64BE
* readUInt8
* readUInt16BE
* readUInt16LE
* readUInt32BE
* readUInt32LE
* readBigUInt64LE
* readBigUInt64BE
* readFloatBE
* readFloatLE
* readDoubleBE
* readDoubleLE
```javascript
let reader = new SmartBuffer(somebuffer);
let num = reader.readInt8();
```
## Reading String Values
When reading String values, you can either choose to read a null terminated string, or a string of a specified length.
### SmartBuffer.readStringNT( [encoding] )
> `String` **String encoding to use** - Defaults to the encoding set in the constructor.
returns `String`
> Note: When readStringNT is called and there is no null character found, smart-buffer will read to the end of the internal Buffer.
### SmartBuffer.readString( [length] )
### SmartBuffer.readString( [encoding] )
### SmartBuffer.readString( [length], [encoding] )
> `Number` **Length of the string to read**
> `String` **String encoding to use** - Defaults to the encoding set in the constructor, or utf8.
returns `String`
> Note: When readString is called without a specified length, smart-buffer will read to the end of the internal Buffer.
## Reading Buffer Values
### SmartBuffer.readBuffer( length )
> `Number` **Length of data to read into a Buffer**
returns `Buffer`
> Note: This function uses `slice` to retrieve the Buffer.
### SmartBuffer.readBufferNT()
returns `Buffer`
> Note: This reads the next sequence of bytes in the buffer until a null (0x00) value is found. (Null terminated buffer)
> Note: This function uses `slice` to retrieve the Buffer.
## Writing Data
smart-buffer supports all of the common write functions you will find in the vanilla Buffer class. The only difference is, you do not need to specify which location to write to in your Buffer by default. You do however have the option of **inserting** a piece of data into your smart-buffer at a given location.
## Writing Numeric Values
For numeric values, you simply need to call the function you want, and the data is written at the end of the internal Buffer's current write position. You can specify a offset/position to **insert** the given value at, but keep in mind this does not override data at the given position. This feature also does not work properly when inserting a value beyond the current internal length of the smart-buffer (length being the .length property of the smart-buffer instance you're writing to)
Supported Operations:
* writeInt8
* writeInt16BE
* writeInt16LE
* writeInt32BE
* writeInt32LE
* writeBigInt64BE
* writeBigInt64LE
* writeUInt8
* writeUInt16BE
* writeUInt16LE
* writeUInt32BE
* writeUInt32LE
* writeBigUInt64BE
* writeBigUInt64LE
* writeFloatBE
* writeFloatLE
* writeDoubleBE
* writeDoubleLE
The following signature is the same for all the above functions:
### SmartBuffer.writeInt8( value, [offset] )
> `Number` **A valid Int8 number**
> `Number` **The position to insert this value at**
returns this
> Note: All write operations return `this` to allow for chaining.
## Writing String Values
When reading String values, you can either choose to write a null terminated string, or a non null terminated string.
### SmartBuffer.writeStringNT( value, [offset], [encoding] )
### SmartBuffer.writeStringNT( value, [offset] )
### SmartBuffer.writeStringNT( value, [encoding] )
> `String` **String value to write**
> `Number` **The position to insert this String at**
> `String` **The String encoding to use.** - Defaults to the encoding set in the constructor, or utf8.
returns this
### SmartBuffer.writeString( value, [offset], [encoding] )
### SmartBuffer.writeString( value, [offset] )
### SmartBuffer.writeString( value, [encoding] )
> `String` **String value to write**
> `Number` **The position to insert this String at**
> `String` **The String encoding to use** - Defaults to the encoding set in the constructor, or utf8.
returns this
## Writing Buffer Values
### SmartBuffer.writeBuffer( value, [offset] )
> `Buffer` **Buffer value to write**
> `Number` **The position to insert this Buffer's content at**
returns this
### SmartBuffer.writeBufferNT( value, [offset] )
> `Buffer` **Buffer value to write**
> `Number` **The position to insert this Buffer's content at**
returns this
## Utility Functions
### SmartBuffer.clear()
Resets the SmartBuffer to its default state where it can be reused for reading or writing.
### SmartBuffer.remaining()
returns `Number` The amount of data left to read based on the current read Position.
### SmartBuffer.skip( value )
> `Number` **The amount of bytes to skip ahead**
Skips the read position ahead by the given value.
returns this
### SmartBuffer.rewind( value )
> `Number` **The amount of bytes to reward backwards**
Rewinds the read position backwards by the given value.
returns this
### SmartBuffer.moveTo( position )
> `Number` **The point to skip the read position to**
Moves the read position to the given point.
returns this
### SmartBuffer.toBuffer()
returns `Buffer` A Buffer containing the contents of the internal Buffer.
> Note: This uses the slice function.
### SmartBuffer.toString( [encoding] )
> `String` **The String encoding to use** - Defaults to the encoding set in the constructor, or utf8.
returns `String` The internal Buffer in String representation.
## Properties
### SmartBuffer.length
returns `Number` **The length of the data that is being tracked in the internal Buffer** - Does NOT return the absolute length of the internal Buffer being written to.
## License
This work is licensed under the [MIT license](http://en.wikipedia.org/wiki/MIT_License).

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('wrapperChain', require('../wrapperChain'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,15 @@
export interface ResolveLocaleResult {
locale: string;
dataLocale: string;
[k: string]: any;
}
/**
* https://tc39.es/ecma402/#sec-resolvelocale
*/
export declare function ResolveLocale<K extends string, D extends {
[k in K]: any;
}>(availableLocales: Set<string>, requestedLocales: string[], options: {
localeMatcher: string;
[k: string]: string;
}, relevantExtensionKeys: K[], localeData: Record<string, D | undefined>, getDefaultLocale: () => string): ResolveLocaleResult;
//# sourceMappingURL=ResolveLocale.d.ts.map

View File

@@ -0,0 +1,115 @@
import { Observable } from '../Observable';
import { ObservableInputTuple } from '../types';
import { innerFrom } from './innerFrom';
import { argsOrArgArray } from '../util/argsOrArgArray';
import { EMPTY } from './empty';
import { createOperatorSubscriber } from '../operators/OperatorSubscriber';
import { popResultSelector } from '../util/args';
export function zip<A extends readonly unknown[]>(sources: [...ObservableInputTuple<A>]): Observable<A>;
export function zip<A extends readonly unknown[], R>(
sources: [...ObservableInputTuple<A>],
resultSelector: (...values: A) => R
): Observable<R>;
export function zip<A extends readonly unknown[]>(...sources: [...ObservableInputTuple<A>]): Observable<A>;
export function zip<A extends readonly unknown[], R>(
...sourcesAndResultSelector: [...ObservableInputTuple<A>, (...values: A) => R]
): Observable<R>;
/**
* Combines multiple Observables to create an Observable whose values are calculated from the values, in order, of each
* of its input Observables.
*
* If the last parameter is a function, this function is used to compute the created value from the input values.
* Otherwise, an array of the input values is returned.
*
* ## Example
*
* Combine age and name from different sources
*
* ```ts
* import { of, zip, map } from 'rxjs';
*
* const age$ = of(27, 25, 29);
* const name$ = of('Foo', 'Bar', 'Beer');
* const isDev$ = of(true, true, false);
*
* zip(age$, name$, isDev$).pipe(
* map(([age, name, isDev]) => ({ age, name, isDev }))
* )
* .subscribe(x => console.log(x));
*
* // Outputs
* // { age: 27, name: 'Foo', isDev: true }
* // { age: 25, name: 'Bar', isDev: true }
* // { age: 29, name: 'Beer', isDev: false }
* ```
*
* @param sources
* @return {Observable<R>}
*/
export function zip(...args: unknown[]): Observable<unknown> {
const resultSelector = popResultSelector(args);
const sources = argsOrArgArray(args) as Observable<unknown>[];
return sources.length
? new Observable<unknown[]>((subscriber) => {
// A collection of buffers of values from each source.
// Keyed by the same index with which the sources were passed in.
let buffers: unknown[][] = sources.map(() => []);
// An array of flags of whether or not the sources have completed.
// This is used to check to see if we should complete the result.
// Keyed by the same index with which the sources were passed in.
let completed = sources.map(() => false);
// When everything is done, release the arrays above.
subscriber.add(() => {
buffers = completed = null!;
});
// Loop over our sources and subscribe to each one. The index `i` is
// especially important here, because we use it in closures below to
// access the related buffers and completion properties
for (let sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) {
innerFrom(sources[sourceIndex]).subscribe(
createOperatorSubscriber(
subscriber,
(value) => {
buffers[sourceIndex].push(value);
// if every buffer has at least one value in it, then we
// can shift out the oldest value from each buffer and emit
// them as an array.
if (buffers.every((buffer) => buffer.length)) {
const result: any = buffers.map((buffer) => buffer.shift()!);
// Emit the array. If theres' a result selector, use that.
subscriber.next(resultSelector ? resultSelector(...result) : result);
// If any one of the sources is both complete and has an empty buffer
// then we complete the result. This is because we cannot possibly have
// any more values to zip together.
if (buffers.some((buffer, i) => !buffer.length && completed[i])) {
subscriber.complete();
}
}
},
() => {
// This source completed. Mark it as complete so we can check it later
// if we have to.
completed[sourceIndex] = true;
// But, if this complete source has nothing in its buffer, then we
// can complete the result, because we can't possibly have any more
// values from this to zip together with the other values.
!buffers[sourceIndex].length && subscriber.complete();
}
)
);
}
// When everything is done, release the arrays above.
return () => {
buffers = completed = null!;
};
})
: EMPTY;
}

View File

@@ -0,0 +1,37 @@
// TODO: Remove this when we target TypeScript >=3.5.
type _Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
/**
Create a type that requires exactly one of the given keys and disallows more. The remaining keys are kept as is.
Use-cases:
- Creating interfaces for components that only need one of the keys to display properly.
- Declaring generic keys in a single place for a single use-case that gets narrowed down via `RequireExactlyOne`.
The caveat with `RequireExactlyOne` is that TypeScript doesn't always know at compile time every key that will exist at runtime. Therefore `RequireExactlyOne` can't do anything to prevent extra keys it doesn't know about.
@example
```
import {RequireExactlyOne} from 'type-fest';
type Responder = {
text: () => string;
json: () => string;
secure: boolean;
};
const responder: RequireExactlyOne<Responder, 'text' | 'json'> = {
// Adding a `text` key here would cause a compile error.
json: () => '{"message": "ok"}',
secure: true
};
```
@category Utilities
*/
export type RequireExactlyOne<ObjectType, KeysType extends keyof ObjectType = keyof ObjectType> =
{[Key in KeysType]: (
Required<Pick<ObjectType, Key>> &
Partial<Record<Exclude<KeysType, Key>, never>>
)}[KeysType] & _Omit<ObjectType, KeysType>;