This commit is contained in:
2025-05-09 05:30:08 +02:00
parent 7bb10e7df4
commit 73367bad9e
5322 changed files with 1266973 additions and 313 deletions

View File

@@ -0,0 +1,104 @@
'use strict';
var parse = require('../');
var test = require('tape');
test('boolean and alias is not unknown', function (t) {
var unknown = [];
function unknownFn(arg) {
unknown.push(arg);
return false;
}
var aliased = ['-h', 'true', '--derp', 'true'];
var regular = ['--herp', 'true', '-d', 'true'];
var opts = {
alias: { h: 'herp' },
boolean: 'h',
unknown: unknownFn,
};
parse(aliased, opts);
parse(regular, opts);
t.same(unknown, ['--derp', '-d']);
t.end();
});
test('flag boolean true any double hyphen argument is not unknown', function (t) {
var unknown = [];
function unknownFn(arg) {
unknown.push(arg);
return false;
}
var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], {
boolean: true,
unknown: unknownFn,
});
t.same(unknown, ['--tacos=good', 'cow', '-p']);
t.same(argv, {
honk: true,
_: [],
});
t.end();
});
test('string and alias is not unknown', function (t) {
var unknown = [];
function unknownFn(arg) {
unknown.push(arg);
return false;
}
var aliased = ['-h', 'hello', '--derp', 'goodbye'];
var regular = ['--herp', 'hello', '-d', 'moon'];
var opts = {
alias: { h: 'herp' },
string: 'h',
unknown: unknownFn,
};
parse(aliased, opts);
parse(regular, opts);
t.same(unknown, ['--derp', '-d']);
t.end();
});
test('default and alias is not unknown', function (t) {
var unknown = [];
function unknownFn(arg) {
unknown.push(arg);
return false;
}
var aliased = ['-h', 'hello'];
var regular = ['--herp', 'hello'];
var opts = {
default: { h: 'bar' },
alias: { h: 'herp' },
unknown: unknownFn,
};
parse(aliased, opts);
parse(regular, opts);
t.same(unknown, []);
t.end();
unknownFn(); // exercise fn for 100% coverage
});
test('value following -- is not unknown', function (t) {
var unknown = [];
function unknownFn(arg) {
unknown.push(arg);
return false;
}
var aliased = ['--bad', '--', 'good', 'arg'];
var opts = {
'--': true,
unknown: unknownFn,
};
var argv = parse(aliased, opts);
t.same(unknown, ['--bad']);
t.same(argv, {
'--': ['good', 'arg'],
_: [],
});
t.end();
});

View File

@@ -0,0 +1,395 @@
Attribution 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More_considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution 4.0 International Public License ("Public License"). To the
extent this Public License may be interpreted as a contract, You are
granted the Licensed Rights in consideration of Your acceptance of
these terms and conditions, and the Licensor grants You such rights in
consideration of benefits the Licensor receives from making the
Licensed Material available under these terms and conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
d. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
g. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
i. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
j. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
k. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's
License You apply must not prevent recipients of the Adapted
Material from complying with this Public License.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.

View File

@@ -0,0 +1,240 @@
import { describe, expect, it, vi } from 'vitest';
import React from 'react';
import makeEventProps, { allEvents } from './index.js';
describe('makeEventProps()', () => {
const fakeEvent = {};
it('returns object with valid and only valid event callbacks', () => {
const props = {
onClick: vi.fn(),
someInvalidProp: vi.fn(),
};
const result = makeEventProps(props);
expect(result).toMatchObject({ onClick: expect.any(Function) });
});
it('calls getArgs function on event invoke if given', () => {
const props = {
onClick: vi.fn(),
someInvalidProp: vi.fn(),
};
const getArgs = vi.fn();
const result = makeEventProps(props, getArgs);
// getArgs shall not be invoked before a given event is fired
expect(getArgs).not.toHaveBeenCalled();
result.onClick(fakeEvent);
expect(getArgs).toHaveBeenCalledTimes(1);
expect(getArgs).toHaveBeenCalledWith('onClick');
});
it('properly calls callbacks given in props given no getArgs function', () => {
const props = {
onClick: vi.fn(),
};
const result = makeEventProps(props);
result.onClick(fakeEvent);
expect(props.onClick).toHaveBeenCalledWith(fakeEvent);
});
it('properly calls callbacks given in props given getArgs function', () => {
const props = {
onClick: vi.fn(),
};
const getArgs = vi.fn();
const args = {};
getArgs.mockReturnValue(args);
const result = makeEventProps(props, getArgs);
result.onClick(fakeEvent);
expect(props.onClick).toHaveBeenCalledWith(fakeEvent, args);
});
it('should not filter out valid event props', () => {
const props = {
onClick: vi.fn(),
};
const result = makeEventProps(props);
// @ts-expect-no-error
result.onClick;
});
it('should filter out invalid event props', () => {
const props = {
someInvalidProp: vi.fn(),
};
const result = makeEventProps(props);
// @ts-expect-error-next-line
result.someInvalidProp;
});
it('should allow valid onClick handler to be passed', () => {
const props = {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
onClick: (event: React.MouseEvent) => {
// Intentionally empty
},
};
// @ts-expect-no-error
makeEventProps(props);
});
it('should not allow invalid onClick handler to be passed', () => {
const props = {
onClick: 'potato',
};
// @ts-expect-error-next-line
makeEventProps(props);
});
it('should allow onClick handler with extra args to be passed if getArgs is provided', () => {
const props = {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
onClick: (event: React.MouseEvent, args: string) => {
// Intentionally empty
},
};
// @ts-expect-no-error
makeEventProps(props, () => 'hello');
});
it('should not allow onClick handler with extra args to be passed if getArgs is not provided', () => {
const props = {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
onClick: (event: React.MouseEvent, args: string) => {
// Intentionally empty
},
};
// @ts-expect-error-next-line
makeEventProps(props);
});
it('should not allow onClick handler with extra args to be passed if getArgs is provided but returns different type', () => {
const props = {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
onClick: (event: React.MouseEvent, args: string) => {
// Intentionally empty
},
};
// @ts-expect-error-next-line
makeEventProps(props, () => 5);
});
it('should allow div onClick handler to be passed to div', () => {
const props = {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
onClick: (event: React.MouseEvent<HTMLDivElement>) => {
// Intentionally empty
},
};
const result = makeEventProps(props);
// @ts-expect-no-error
<div onClick={result.onClick} />;
});
it('should not allow div onClick handler to be passed to button', () => {
const props = {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
onClick: (event: React.MouseEvent<HTMLDivElement>) => {
// Intentionally empty
},
};
const result = makeEventProps(props);
// @ts-expect-error-next-line
<button onClick={result.onClick} />;
});
it('should allow div onClick handler with extra args to be passed to div if getArgs is provided', () => {
const props = {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
onClick: (event: React.MouseEvent<HTMLDivElement>, args: string) => {
// Intentionally empty
},
};
const result = makeEventProps(props, () => 'hello');
// @ts-expect-no-error
<div onClick={result.onClick} />;
});
it('should not allow div onClick handler with extra args to be passed to button if getArgs is provided', () => {
const props = {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
onClick: (event: React.MouseEvent<HTMLDivElement>, args: string) => {
// Intentionally empty
},
};
const result = makeEventProps(props, () => 'hello');
// @ts-expect-error-next-line
<button onClick={result.onClick} />;
});
it('should allow onClick handler with valid extra args to be passed with args explicitly typed', () => {
const props = {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
onClick: (event: React.MouseEvent<HTMLDivElement>, args: string) => {
// Intentionally empty
},
};
// @ts-expect-no-error
makeEventProps<string>(props, () => 'hello');
});
it('should not allow onClick handler with invalid extra args to be passed with args explicitly typed', () => {
const props = {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
onClick: (event: React.MouseEvent<HTMLDivElement>, args: number) => {
// Intentionally empty
},
};
// @ts-expect-error-next-line
makeEventProps<string>(props, () => 'hello');
});
it('should allow getArgs returning valid type to be passed with args explicitly typed', () => {
const props = {};
// @ts-expect-no-error
makeEventProps<string>(props, () => 'hello');
});
it('should not allow getArgs returning invalid type to be passed with args explicitly typed', () => {
const props = {};
// @ts-expect-error-next-line
makeEventProps<string>(props, () => 5);
});
});
describe('allEvents', () => {
it('should contain all events', () => {
const sortedAllEvents = new Set([...allEvents].sort());
expect(sortedAllEvents).toMatchSnapshot();
});
});

View File

@@ -0,0 +1,77 @@
{
"name": "uri-js",
"version": "4.4.1",
"description": "An RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.",
"main": "dist/es5/uri.all.js",
"types": "dist/es5/uri.all.d.ts",
"directories": {
"test": "tests"
},
"files": [
"dist",
"package.json",
"yarn.lock",
"README.md",
"CHANGELOG",
"LICENSE"
],
"scripts": {
"build:esnext": "tsc",
"build:es5": "rollup -c && cp dist/esnext/uri.d.ts dist/es5/uri.all.d.ts && npm run build:es5:fix-sourcemap",
"build:es5:fix-sourcemap": "sorcery -i dist/es5/uri.all.js",
"build:es5:min": "uglifyjs dist/es5/uri.all.js --support-ie8 --output dist/es5/uri.all.min.js --in-source-map dist/es5/uri.all.js.map --source-map uri.all.min.js.map --comments --compress --mangle --pure-funcs merge subexp && mv uri.all.min.js.map dist/es5/ && cp dist/es5/uri.all.d.ts dist/es5/uri.all.min.d.ts",
"build": "npm run build:esnext && npm run build:es5 && npm run build:es5:min",
"clean": "rm -rf dist",
"test": "mocha -u mocha-qunit-ui dist/es5/uri.all.js tests/tests.js"
},
"repository": {
"type": "git",
"url": "http://github.com/garycourt/uri-js"
},
"keywords": [
"URI",
"IRI",
"IDN",
"URN",
"UUID",
"HTTP",
"HTTPS",
"WS",
"WSS",
"MAILTO",
"RFC3986",
"RFC3987",
"RFC5891",
"RFC2616",
"RFC2818",
"RFC2141",
"RFC4122",
"RFC4291",
"RFC5952",
"RFC6068",
"RFC6455",
"RFC6874"
],
"author": "Gary Court <gary.court@gmail.com>",
"license": "BSD-2-Clause",
"bugs": {
"url": "https://github.com/garycourt/uri-js/issues"
},
"homepage": "https://github.com/garycourt/uri-js",
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-plugin-external-helpers": "^6.22.0",
"babel-preset-latest": "^6.24.1",
"mocha": "^8.2.1",
"mocha-qunit-ui": "^0.1.3",
"rollup": "^0.41.6",
"rollup-plugin-babel": "^2.7.1",
"rollup-plugin-node-resolve": "^2.0.0",
"sorcery": "^0.10.0",
"typescript": "^2.8.1",
"uglify-js": "^2.8.14"
},
"dependencies": {
"punycode": "^2.1.0"
}
}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B mC"},B:{"1":"LB MB NB OB I","2":"C L M G N O P","164":"0 9 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB"},C:{"1":"0 9 VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R OC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC oC pC","2":"1 2 3 4 5 6 7 8 nC LC J PB K D E F A B C L M G N O P QB RB SB TB UB qC rC"},D:{"1":"LB MB NB OB I PC EC QC RC","2":"1 2 J PB K D E F A B C L M G N O P QB","164":"0 3 4 5 6 7 8 9 RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB"},E:{"2":"J PB K sC SC tC","164":"D E F A B C L M G uC vC wC TC FC GC xC yC zC UC VC HC 0C IC WC XC YC ZC aC 1C JC bC cC dC eC fC 2C KC gC hC iC jC 3C"},F:{"1":"0 z","2":"F 4C 5C 6C 7C","129":"B C FC kC 8C GC","164":"1 2 3 4 5 6 7 8 G N O P QB RB SB TB UB VB WB XB YB ZB 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 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R OC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y"},G:{"2":"SC 9C lC AD BD","164":"E CD DD ED FD GD HD ID JD KD LD MD ND OD PD QD RD SD UC VC HC TD IC WC XC YC ZC aC UD JC bC cC dC eC fC VD KC gC hC iC jC"},H:{"132":"WD"},I:{"1":"I","2":"LC J XD YD ZD aD lC","164":"bD cD"},J:{"2":"D","164":"A"},K:{"2":"A","129":"B C FC kC GC","164":"H"},L:{"1":"I"},M:{"1":"EC"},N:{"2":"A B"},O:{"164":"HC"},P:{"164":"1 2 3 4 5 6 7 8 J dD eD fD gD hD TC iD jD kD lD mD IC JC KC nD"},Q:{"164":"oD"},R:{"164":"pD"},S:{"1":"qD rD"}},B:4,C:"CSS box-decoration-break",D:true};

View File

@@ -0,0 +1 @@
This is the aarch64-unknown-linux-musl build of lightningcss. See https://github.com/parcel-bundler/lightningcss for details.

View File

@@ -0,0 +1,52 @@
#include "closure.h"
#include "Canvas.h"
#ifdef HAVE_JPEG
void JpegClosure::init_destination(j_compress_ptr cinfo) {
JpegClosure* closure = (JpegClosure*)cinfo->client_data;
closure->vec.resize(PAGE_SIZE);
closure->jpeg_dest_mgr->next_output_byte = &closure->vec[0];
closure->jpeg_dest_mgr->free_in_buffer = closure->vec.size();
}
boolean JpegClosure::empty_output_buffer(j_compress_ptr cinfo) {
JpegClosure* closure = (JpegClosure*)cinfo->client_data;
size_t currentSize = closure->vec.size();
closure->vec.resize(currentSize * 1.5);
closure->jpeg_dest_mgr->next_output_byte = &closure->vec[currentSize];
closure->jpeg_dest_mgr->free_in_buffer = closure->vec.size() - currentSize;
return true;
}
void JpegClosure::term_destination(j_compress_ptr cinfo) {
JpegClosure* closure = (JpegClosure*)cinfo->client_data;
size_t finalSize = closure->vec.size() - closure->jpeg_dest_mgr->free_in_buffer;
closure->vec.resize(finalSize);
}
#endif
void
EncodingWorker::Init(void (*work_fn)(Closure*), Closure* closure) {
this->work_fn = work_fn;
this->closure = closure;
}
void
EncodingWorker::Execute() {
this->work_fn(this->closure);
}
void
EncodingWorker::OnWorkComplete(Napi::Env env, napi_status status) {
Napi::HandleScope scope(env);
if (closure->status) {
closure->cb.Call({ closure->canvas->CairoError(closure->status).Value() });
} else {
Napi::Object buf = Napi::Buffer<uint8_t>::Copy(env, &closure->vec[0], closure->vec.size());
closure->cb.Call({ env.Null(), buf });
}
closure->canvas->Unref();
delete closure;
}

View File

@@ -0,0 +1,50 @@
import type { NavigateOptions, ToOptions } from './link'
import type { ParsedLocation } from './location'
import type { RoutePaths } from './routeInfo'
import type {
AnyRouter,
RegisteredRouter,
ViewTransitionOptions,
} from './router'
export interface MatchLocation {
to?: string | number | null
fuzzy?: boolean
caseSensitive?: boolean
from?: string
}
export interface CommitLocationOptions {
replace?: boolean
resetScroll?: boolean
hashScrollIntoView?: boolean | ScrollIntoViewOptions
viewTransition?: boolean | ViewTransitionOptions
/**
* @deprecated All navigations use React transitions under the hood now
**/
startTransition?: boolean
ignoreBlocker?: boolean
}
export type NavigateFn = <
TRouter extends RegisteredRouter,
TTo extends string | undefined,
TFrom extends RoutePaths<TRouter['routeTree']> | string = string,
TMaskFrom extends RoutePaths<TRouter['routeTree']> | string = TFrom,
TMaskTo extends string = '',
>(
opts: NavigateOptions<TRouter, TFrom, TTo, TMaskFrom, TMaskTo>,
) => Promise<void> | void
export type BuildLocationFn = <
TRouter extends AnyRouter,
TTo extends string | undefined,
TFrom extends RoutePaths<TRouter['routeTree']> | string = string,
TMaskFrom extends RoutePaths<TRouter['routeTree']> | string = TFrom,
TMaskTo extends string = '',
>(
opts: ToOptions<TRouter, TFrom, TTo, TMaskFrom, TMaskTo> & {
leaveParams?: boolean
_includeValidateSearch?: boolean
},
) => ParsedLocation

View File

@@ -0,0 +1 @@
module.exports={C:{"78":0.04015,"115":0.19182,"125":0.00446,"134":0.00446,"135":0.03123,"136":0.84313,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 126 127 128 129 130 131 132 133 137 138 139 140 3.5 3.6"},D:{"39":0.00446,"40":0.00446,"44":0.00446,"45":0.00446,"46":0.00446,"47":0.00446,"48":0.00446,"50":0.00446,"52":0.00446,"53":0.00446,"54":0.00446,"56":0.00446,"57":0.00446,"58":0.00446,"59":0.00446,"60":0.00446,"65":0.00446,"67":0.00446,"74":0.00892,"76":0.00892,"79":0.00892,"87":0.00446,"93":0.04015,"103":0.09814,"105":0.00446,"109":0.40149,"113":0.00892,"115":0.20075,"116":0.07584,"119":0.00446,"120":0.00892,"121":0.03123,"122":0.02231,"123":0.05799,"124":0.01784,"125":0.07138,"126":0.62454,"127":0.01784,"128":0.14721,"129":0.02231,"130":0.06245,"131":0.5264,"132":0.60224,"133":11.31756,"134":13.47668,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 41 42 43 49 51 55 61 62 63 64 66 68 69 70 71 72 73 75 77 78 80 81 83 84 85 86 88 89 90 91 92 94 95 96 97 98 99 100 101 102 104 106 107 108 110 111 112 114 117 118 135 136 137 138"},F:{"95":0.00446,"115":0.00892,"116":0.75391,"117":1.34722,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.01784,"109":0.00446,"128":0.02231,"131":0.00446,"132":0.49963,"133":2.33756,"134":5.48257,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 129 130"},E:{"15":0.00446,_:"0 4 5 6 7 8 9 10 11 12 13 14 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 17.0","13.1":0.03123,"14.1":0.06245,"15.4":0.01784,"15.5":0.16952,"15.6":0.06692,"16.0":0.01338,"16.1":0.01338,"16.2":0.04015,"16.3":0.01338,"16.4":0.01784,"16.5":0.02231,"16.6":0.25428,"17.1":0.06692,"17.2":0.02677,"17.3":0.00446,"17.4":0.01784,"17.5":0.04015,"17.6":0.17844,"18.0":0.00446,"18.1":0.0803,"18.2":0.03569,"18.3":1.1777,"18.4":0.01784},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00161,"5.0-5.1":0,"6.0-6.1":0.00482,"7.0-7.1":0.00321,"8.1-8.4":0,"9.0-9.2":0.00241,"9.3":0.01124,"10.0-10.2":0.0008,"10.3":0.01847,"11.0-11.2":0.08513,"11.3-11.4":0.00562,"12.0-12.1":0.00321,"12.2-12.5":0.07951,"13.0-13.1":0.00161,"13.2":0.00241,"13.3":0.00321,"13.4-13.7":0.01124,"14.0-14.4":0.02811,"14.5-14.8":0.03373,"15.0-15.1":0.01847,"15.2-15.3":0.01847,"15.4":0.02249,"15.5":0.0257,"15.6-15.8":0.31644,"16.0":0.04498,"16.1":0.09236,"16.2":0.04819,"16.3":0.08353,"16.4":0.01847,"16.5":0.03454,"16.6-16.7":0.37507,"17.0":0.02249,"17.1":0.04016,"17.2":0.03052,"17.3":0.04257,"17.4":0.08513,"17.5":0.18954,"17.6-17.7":0.55016,"18.0":0.15421,"18.1":0.50438,"18.2":0.22569,"18.3":4.71693,"18.4":0.06987},P:{"23":0.02072,"24":0.04144,"25":0.02072,"26":0.01036,"27":2.37234,_:"4 20 21 22 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 19.0","18.0":0.01036},I:{"0":0.00553,"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.00001},K:{"0":0.18279,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.28249},Q:{_:"14.9"},O:{"0":0.69791},H:{"0":0},L:{"0":44.68343}};

View File

@@ -0,0 +1,17 @@
// Standard YAML's Failsafe schema.
// http://www.yaml.org/spec/1.2/spec.html#id2802346
'use strict';
var Schema = require('../schema');
module.exports = new Schema({
explicit: [
require('../type/str'),
require('../type/seq'),
require('../type/map')
]
});

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"mC","8":"K D E","129":"F A B"},B:{"1":"0 9 O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I","129":"C L M G N"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J PB K D E F A B C L M G N O P QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R OC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC oC pC","8":"nC LC qC rC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 D E F A B C L M G N O P QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC","8":"J PB K"},E:{"1":"F A B C L M G wC TC FC GC xC yC zC UC VC HC 0C IC WC XC YC ZC aC 1C JC bC cC dC eC fC 2C KC gC hC iC jC 3C","8":"J PB sC SC","129":"K D E tC uC vC"},F:{"1":"0 1 2 3 4 5 6 7 8 C G N O P QB RB SB TB UB VB WB XB YB ZB 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 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R OC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 8C GC","2":"B 7C FC kC","8":"F 4C 5C 6C"},G:{"1":"ED FD GD HD ID JD KD LD MD ND OD PD QD RD SD UC VC HC TD IC WC XC YC ZC aC UD JC bC cC dC eC fC VD KC gC hC iC jC","8":"SC 9C lC","129":"E AD BD CD DD"},H:{"1":"WD"},I:{"1":"I bD cD","2":"XD YD ZD","129":"LC J aD lC"},J:{"1":"A","129":"D"},K:{"1":"C H GC","8":"A B FC kC"},L:{"1":"I"},M:{"1":"EC"},N:{"129":"A B"},O:{"1":"HC"},P:{"1":"1 2 3 4 5 6 7 8 J dD eD fD gD hD TC iD jD kD lD mD IC JC KC nD"},Q:{"1":"oD"},R:{"1":"pD"},S:{"1":"qD rD"}},B:1,C:"Inline SVG in HTML5",D:true};

View File

@@ -0,0 +1,140 @@
/**
* @license React
* scheduler-unstable_post_task.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var perf = window.performance,
setTimeout = window.setTimeout,
scheduler = global.scheduler,
getCurrentTime = perf.now.bind(perf),
deadline = 0,
currentPriorityLevel_DEPRECATED = 3;
function runTask(priorityLevel, postTaskPriority, node, callback) {
deadline = getCurrentTime() + 5;
try {
currentPriorityLevel_DEPRECATED = priorityLevel;
var result = callback(!1);
if ("function" === typeof result) {
var continuationOptions = { signal: node._controller.signal },
nextTask = runTask.bind(
null,
priorityLevel,
postTaskPriority,
node,
result
);
void 0 !== scheduler.yield
? scheduler
.yield(continuationOptions)
.then(nextTask)
.catch(handleAbortError)
: scheduler
.postTask(nextTask, continuationOptions)
.catch(handleAbortError);
}
} catch (error) {
setTimeout(function () {
throw error;
});
} finally {
currentPriorityLevel_DEPRECATED = 3;
}
}
function handleAbortError() {}
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_cancelCallback = function (node) {
node._controller.abort();
};
exports.unstable_forceFrameRate = function () {};
exports.unstable_getCurrentPriorityLevel = function () {
return currentPriorityLevel_DEPRECATED;
};
exports.unstable_next = function (callback) {
switch (currentPriorityLevel_DEPRECATED) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel_DEPRECATED;
}
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = priorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
exports.unstable_now = getCurrentTime;
exports.unstable_requestPaint = function () {};
exports.unstable_runWithPriority = function (priorityLevel, callback) {
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = priorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
switch (priorityLevel) {
case 1:
case 2:
var postTaskPriority = "user-blocking";
break;
case 4:
case 3:
postTaskPriority = "user-visible";
break;
case 5:
postTaskPriority = "background";
break;
default:
postTaskPriority = "user-visible";
}
var controller = new TaskController({ priority: postTaskPriority });
options = {
delay: "object" === typeof options && null !== options ? options.delay : 0,
signal: controller.signal
};
controller = { _controller: controller };
scheduler
.postTask(
runTask.bind(null, priorityLevel, postTaskPriority, controller, callback),
options
)
.catch(handleAbortError);
return controller;
};
exports.unstable_shouldYield = function () {
return getCurrentTime() >= deadline;
};
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel_DEPRECATED;
return function () {
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = parentPriorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
};

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B mC"},B:{"1":"0 9 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I","2":"C L M","260":"G N O P"},C:{"1":"0 9 dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC oC pC","2":"1 2 3 4 5 6 7 8 nC LC J PB K D E F A B C L M G N O P QB RB SB TB UB VB WB XB YB ZB aB bB qC rC","129":"cB","514":"6B 7B 8B 9B AC BC CC DC Q H R OC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x"},D:{"1":"0 9 jB kB lB mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC","2":"1 2 3 4 5 6 7 8 J PB K D E F A B C L M G N O P QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB"},E:{"1":"C L M G FC GC xC yC zC UC VC HC 0C IC WC XC YC ZC aC 1C JC bC cC dC eC fC 2C KC gC hC iC jC 3C","2":"J PB K D E F A B sC SC tC uC vC wC TC"},F:{"1":"0 WB XB YB ZB 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 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R OC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"1 2 3 4 5 6 7 8 F B C G N O P QB RB SB TB UB VB 4C 5C 6C 7C FC kC 8C GC"},G:{"1":"JD KD LD MD ND OD PD QD RD SD UC VC HC TD IC WC XC YC ZC aC UD JC bC cC dC eC fC VD KC gC hC iC jC","2":"E SC 9C lC AD BD CD DD ED FD GD HD ID"},H:{"2":"WD"},I:{"1":"I","2":"LC J XD YD ZD aD lC bD cD"},J:{"2":"D A"},K:{"1":"H","2":"A B C FC kC GC"},L:{"1":"I"},M:{"1":"EC"},N:{"2":"A B"},O:{"1":"HC"},P:{"1":"1 2 3 4 5 6 7 8 dD eD fD gD hD TC iD jD kD lD mD IC JC KC nD","2":"J"},Q:{"1":"oD"},R:{"1":"pD"},S:{"1":"qD rD"}},B:5,C:"Resource Hints: preconnect",D:true};

View File

@@ -0,0 +1 @@
function e(){for(var e,o=0,r="",t=arguments.length;o<t;o++)(e=arguments[o])&&"string"==typeof e&&(r+=(r&&" ")+e);return r}module.exports=e,module.exports.clsx=e;

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B mC"},B:{"1":"0 9 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I","2":"C L M G N O P"},C:{"1":"0 9 xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R OC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC oC pC","2":"1 2 3 4 5 6 7 8 nC LC J PB K D E F A B C L M G N O P QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB MC wB NC qC rC"},D:{"1":"0 9 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC","2":"1 2 3 4 5 6 7 8 J PB K D E F A B C L M G N O P QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B"},E:{"1":"C L M G GC xC yC zC UC VC HC 0C IC WC XC YC ZC aC 1C JC bC cC dC eC fC 2C KC gC hC iC jC 3C","2":"J PB K D E F A B sC SC tC uC vC wC TC FC"},F:{"1":"0 tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R OC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"1 2 3 4 5 6 7 8 F B C G N O P QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB 4C 5C 6C 7C FC kC 8C GC"},G:{"1":"KD LD MD ND OD PD QD RD SD UC VC HC TD IC WC XC YC ZC aC UD JC bC cC dC eC fC VD KC gC hC iC jC","2":"E SC 9C lC AD BD CD DD ED FD GD HD ID JD"},H:{"2":"WD"},I:{"1":"I","2":"LC J XD YD ZD aD lC bD cD"},J:{"2":"D A"},K:{"1":"H","2":"A B C FC kC GC"},L:{"1":"I"},M:{"1":"EC"},N:{"2":"A B"},O:{"1":"HC"},P:{"1":"1 2 3 4 5 6 7 8 TC iD jD kD lD mD IC JC KC nD","2":"J dD eD fD gD hD"},Q:{"1":"oD"},R:{"1":"pD"},S:{"1":"rD","2":"qD"}},B:6,C:"flat & flatMap array methods",D:true};

View File

@@ -0,0 +1 @@
{"version":3,"names":["_writeOnlyError","name","TypeError"],"sources":["../../src/helpers/writeOnlyError.ts"],"sourcesContent":["/* @minVersion 7.12.13 */\n\nexport default function _writeOnlyError(name: string) {\n throw new TypeError('\"' + name + '\" is write-only');\n}\n"],"mappings":";;;;;;AAEe,SAASA,eAAeA,CAACC,IAAY,EAAE;EACpD,MAAM,IAAIC,SAAS,CAAC,GAAG,GAAGD,IAAI,GAAG,iBAAiB,CAAC;AACrD","ignoreList":[]}

View File

@@ -0,0 +1,4 @@
module.exports.agents = require('./agents').agents
module.exports.feature = require('./feature')
module.exports.features = require('./features').features
module.exports.region = require('./region')

View File

@@ -0,0 +1,102 @@
var pSlice = Array.prototype.slice;
var Object_keys = typeof Object.keys === 'function'
? Object.keys
: function (obj) {
var keys = [];
for (var key in obj) keys.push(key);
return keys;
}
;
var deepEqual = module.exports = function (actual, expected) {
// enforce Object.is +0 !== -0
if (actual === 0 && expected === 0) {
return areZerosEqual(actual, expected);
// 7.1. All identical values are equivalent, as determined by ===.
} else if (actual === expected) {
return true;
} else if (actual instanceof Date && expected instanceof Date) {
return actual.getTime() === expected.getTime();
} else if (isNumberNaN(actual)) {
return isNumberNaN(expected);
// 7.3. Other pairs that do not both pass typeof value == 'object',
// equivalence is determined by ==.
} else if (typeof actual != 'object' && typeof expected != 'object') {
return actual == expected;
// 7.4. For all other Object pairs, including Array objects, equivalence is
// determined by having the same number of owned properties (as verified
// with Object.prototype.hasOwnProperty.call), the same set of keys
// (although not necessarily the same order), equivalent values for every
// corresponding key, and an identical 'prototype' property. Note: this
// accounts for both named and indexed properties on Arrays.
} else {
return objEquiv(actual, expected);
}
};
function isUndefinedOrNull(value) {
return value === null || value === undefined;
}
function isArguments(object) {
return Object.prototype.toString.call(object) == '[object Arguments]';
}
function isNumberNaN(value) {
// NaN === NaN -> false
return typeof value == 'number' && value !== value;
}
function areZerosEqual(zeroA, zeroB) {
// (1 / +0|0) -> Infinity, but (1 / -0) -> -Infinity and (Infinity !== -Infinity)
return (1 / zeroA) === (1 / zeroB);
}
function objEquiv(a, b) {
if (isUndefinedOrNull(a) || isUndefinedOrNull(b))
return false;
// an identical 'prototype' property.
if (a.prototype !== b.prototype) return false;
//~~~I've managed to break Object.keys through screwy arguments passing.
// Converting to array solves the problem.
if (isArguments(a)) {
if (!isArguments(b)) {
return false;
}
a = pSlice.call(a);
b = pSlice.call(b);
return deepEqual(a, b);
}
try {
var ka = Object_keys(a),
kb = Object_keys(b),
key, i;
} catch (e) {//happens when one is a string literal and the other isn't
return false;
}
// having the same number of owned properties (keys incorporates
// hasOwnProperty)
if (ka.length != kb.length)
return false;
//the same set of keys (although not necessarily the same order),
ka.sort();
kb.sort();
//~~~cheap key test
for (i = ka.length - 1; i >= 0; i--) {
if (ka[i] != kb[i])
return false;
}
//equivalent values for every corresponding key, and
//~~~possibly expensive deep test
for (i = ka.length - 1; i >= 0; i--) {
key = ka[i];
if (!deepEqual(a[key], b[key])) return false;
}
return true;
}