new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: [],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
# `Object.clear` _(ext/object/clear)_
|
||||
|
||||
Deletes all own, enumerable, non-symbol properties in the object
|
||||
|
||||
```javascript
|
||||
const clear = require("ext/object/clear");
|
||||
|
||||
const obj = { foo: "bar" };
|
||||
|
||||
clear(obj);
|
||||
Object.keys(obj); // []
|
||||
```
|
||||
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
global: require("./global"),
|
||||
optionalChaining: require("./optional-chaining"),
|
||||
safeToString: require("./safe-to-string"),
|
||||
toShortStringRepresentation: require("./to-short-string-representation"),
|
||||
|
||||
array: require("./array"),
|
||||
boolean: require("./boolean"),
|
||||
date: require("./date"),
|
||||
error: require("./error"),
|
||||
function: require("./function"),
|
||||
iterable: require("./iterable"),
|
||||
json: require("./json"),
|
||||
math: require("./math"),
|
||||
number: require("./number"),
|
||||
object: require("./object"),
|
||||
promise: require("./promise"),
|
||||
regExp: require("./reg-exp"),
|
||||
string: require("./string")
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Turns ReadableStream into async iterable when the `Symbol.asyncIterable` is not implemented on given stream.
|
||||
*
|
||||
* @param source A ReadableStream to create async iterator for
|
||||
*/
|
||||
export declare const getStreamIterator: (source: ReadableStream<Uint8Array> | AsyncIterable<Uint8Array>) => AsyncIterable<Uint8Array>;
|
||||
@@ -0,0 +1,5 @@
|
||||
export type CreateTrack = {
|
||||
name: string;
|
||||
distance: number;
|
||||
minimumLapTime?: number;
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"file.js","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,kDAAgC;AAChC,2BAA6C;AAC7C,uCAAuC;AACvC,wEAAwC;AAExC,0DAAuC;AACvC,gEAA6C;AAE7C,MAAM,KAAK,GAAG,eAAW,CAAC,cAAc,CAAC,CAAC;AAgB1C;;GAEG;AAEH,SAA8B,GAAG,CAChC,EAAE,IAAI,EAAE,GAAG,EAAsB,EACjC,IAAiB;;QAEjB,MAAM,EACL,KAAK,EACL,KAAK,GAAG,GAAG,EACX,IAAI,GAAG,GAAG,CAAC,QAAQ;UACnB,GAAG,IAAI,CAAC;QAET,IAAI;YACH,qBAAqB;YACrB,MAAM,QAAQ,GAAG,0BAAQ,CAAC,GAAG,CAAC,CAAC;YAC/B,KAAK,CAAC,yBAAyB,EAAE,QAAQ,CAAC,CAAC;YAE3C,mEAAmE;YACnE,UAAU;YACV,MAAM,EAAE,GAAG,MAAM,eAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;YAE7C,mEAAmE;YACnE,aAAa;YACb,MAAM,IAAI,GAAG,MAAM,gBAAK,CAAC,EAAE,CAAC,CAAC;YAE7B,qEAAqE;YACrE,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,IAAI,IAAI,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE;gBACnE,MAAM,IAAI,qBAAgB,EAAE,CAAC;aAC7B;YAED,4DAA4D;YAC5D,6BAA6B;YAC7B,kEAAkE;YAClE,MAAM,EAAE,GAAG,qBAAgB,CAAC,IAAI,gCAC/B,SAAS,EAAE,IAAI,IACZ,IAAI,KACP,EAAE,IACe,CAAC;YACnB,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC;YACf,OAAO,EAAE,CAAC;SACV;QAAC,OAAO,GAAG,EAAE;YACb,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;gBAC1B,MAAM,IAAI,kBAAa,EAAE,CAAC;aAC1B;YACD,MAAM,GAAG,CAAC;SACV;IACF,CAAC;CAAA;AA5CD,sBA4CC;AAED,gEAAgE;AAChE,SAAS,aAAa,CAAC,IAAW,EAAE,IAAW;IAC9C,OAAO,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AACpC,CAAC"}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"2":"C K L G M N O","33":"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 9 DC tB I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB EC FC"},D:{"2":"I v J D","33":"0 1 2 3 4 5 6 7 8 9 K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","36":"E F A B C"},E:{"2":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"2":"F B C PC QC RC SC qB AC TC rB","33":"0 1 2 3 4 5 6 7 8 9 G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB 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:{"2":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"2":"tB I f pC qC rC sC BC tC uC"},J:{"2":"D","33":"A"},K:{"2":"A B C qB AC rB","33":"h"},L:{"33":"H"},M:{"2":"H"},N:{"2":"A B"},O:{"33":"vC"},P:{"2":"I","33":"g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"2":"1B"},R:{"33":"9C"},S:{"2":"AD BD"}},B:7,C:"Filesystem & FileWriter API"};
|
||||
@@ -0,0 +1,28 @@
|
||||
import Wrapper from '../shared/Wrapper';
|
||||
import Renderer from '../../Renderer';
|
||||
import Block from '../../Block';
|
||||
import InlineComponent from '../../../nodes/InlineComponent';
|
||||
import FragmentWrapper from '../Fragment';
|
||||
import TemplateScope from '../../../nodes/shared/TemplateScope';
|
||||
import { Node, Identifier } from 'estree';
|
||||
declare type SlotDefinition = {
|
||||
block: Block;
|
||||
scope: TemplateScope;
|
||||
get_context?: Node;
|
||||
get_changes?: Node;
|
||||
};
|
||||
export default class InlineComponentWrapper extends Wrapper {
|
||||
var: Identifier;
|
||||
slots: Map<string, SlotDefinition>;
|
||||
node: InlineComponent;
|
||||
fragment: FragmentWrapper;
|
||||
children: Array<Wrapper | FragmentWrapper>;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: InlineComponent, strip_whitespace: boolean, next_sibling: Wrapper);
|
||||
set_slot(name: string, slot_definition: SlotDefinition): void;
|
||||
warn_if_reactive(): void;
|
||||
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
private create_css_custom_properties_wrapper_mount_chunk;
|
||||
private create_css_custom_properties_wrapper_claim_chunk;
|
||||
private set_css_custom_properties;
|
||||
}
|
||||
export {};
|
||||
@@ -0,0 +1,23 @@
|
||||
var test = require('tape');
|
||||
var equal = require('../');
|
||||
|
||||
test('equal', function (t) {
|
||||
t.ok(equal(
|
||||
{ a : [ 2, 3 ], b : [ 4 ] },
|
||||
{ a : [ 2, 3 ], b : [ 4 ] }
|
||||
));
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('not equal', function (t) {
|
||||
t.notOk(equal(
|
||||
{ x : 5, y : [6] },
|
||||
{ x : 5, y : 6 }
|
||||
));
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('nested nulls', function (t) {
|
||||
t.ok(equal([ null, null, null ], [ null, null, null ]));
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"exhaustMap.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/exhaustMap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAO9E,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GACtC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,0JAA0J;AAC1J,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,cAAc,EAAE,SAAS,GACxB,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,0JAA0J;AAC1J,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAChC,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,eAAe,CAAC,CAAC,CAAC,EACxD,cAAc,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC,GAC1F,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"}
|
||||
@@ -0,0 +1,109 @@
|
||||
'use strict'
|
||||
// This is adapted from https://github.com/normalize/mz
|
||||
// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
|
||||
const u = require('universalify').fromCallback
|
||||
const fs = require('graceful-fs')
|
||||
|
||||
const api = [
|
||||
'access',
|
||||
'appendFile',
|
||||
'chmod',
|
||||
'chown',
|
||||
'close',
|
||||
'copyFile',
|
||||
'fchmod',
|
||||
'fchown',
|
||||
'fdatasync',
|
||||
'fstat',
|
||||
'fsync',
|
||||
'ftruncate',
|
||||
'futimes',
|
||||
'lchown',
|
||||
'lchmod',
|
||||
'link',
|
||||
'lstat',
|
||||
'mkdir',
|
||||
'mkdtemp',
|
||||
'open',
|
||||
'readFile',
|
||||
'readdir',
|
||||
'readlink',
|
||||
'realpath',
|
||||
'rename',
|
||||
'rmdir',
|
||||
'stat',
|
||||
'symlink',
|
||||
'truncate',
|
||||
'unlink',
|
||||
'utimes',
|
||||
'writeFile'
|
||||
].filter(key => {
|
||||
// Some commands are not available on some systems. Ex:
|
||||
// fs.copyFile was added in Node.js v8.5.0
|
||||
// fs.mkdtemp was added in Node.js v5.10.0
|
||||
// fs.lchown is not available on at least some Linux
|
||||
return typeof fs[key] === 'function'
|
||||
})
|
||||
|
||||
// Export all keys:
|
||||
Object.keys(fs).forEach(key => {
|
||||
if (key === 'promises') {
|
||||
// fs.promises is a getter property that triggers ExperimentalWarning
|
||||
// Don't re-export it here, the getter is defined in "lib/index.js"
|
||||
return
|
||||
}
|
||||
exports[key] = fs[key]
|
||||
})
|
||||
|
||||
// Universalify async methods:
|
||||
api.forEach(method => {
|
||||
exports[method] = u(fs[method])
|
||||
})
|
||||
|
||||
// We differ from mz/fs in that we still ship the old, broken, fs.exists()
|
||||
// since we are a drop-in replacement for the native module
|
||||
exports.exists = function (filename, callback) {
|
||||
if (typeof callback === 'function') {
|
||||
return fs.exists(filename, callback)
|
||||
}
|
||||
return new Promise(resolve => {
|
||||
return fs.exists(filename, resolve)
|
||||
})
|
||||
}
|
||||
|
||||
// fs.read() & fs.write need special treatment due to multiple callback args
|
||||
|
||||
exports.read = function (fd, buffer, offset, length, position, callback) {
|
||||
if (typeof callback === 'function') {
|
||||
return fs.read(fd, buffer, offset, length, position, callback)
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
|
||||
if (err) return reject(err)
|
||||
resolve({ bytesRead, buffer })
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// Function signature can be
|
||||
// fs.write(fd, buffer[, offset[, length[, position]]], callback)
|
||||
// OR
|
||||
// fs.write(fd, string[, position[, encoding]], callback)
|
||||
// We need to handle both cases, so we use ...args
|
||||
exports.write = function (fd, buffer, ...args) {
|
||||
if (typeof args[args.length - 1] === 'function') {
|
||||
return fs.write(fd, buffer, ...args)
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {
|
||||
if (err) return reject(err)
|
||||
resolve({ bytesWritten, buffer })
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// fs.realpath.native only available in Node v9.2+
|
||||
if (typeof fs.realpath.native === 'function') {
|
||||
exports.realpath.native = u(fs.realpath.native)
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"zip.js","sourceRoot":"","sources":["../../../../src/internal/operators/zip.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAqD;AAErD,qCAAuC;AAmBvC,SAAgB,GAAG;IAAO,iBAAwE;SAAxE,UAAwE,EAAxE,qBAAwE,EAAxE,IAAwE;QAAxE,4BAAwE;;IAChG,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,SAAS,8BAAC,MAA8B,UAAM,OAAuC,IAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/G,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,kBAIC"}
|
||||
@@ -0,0 +1,76 @@
|
||||
import{constants}from"node:os";
|
||||
|
||||
import{SIGRTMAX}from"./realtime.js";
|
||||
import{getSignals}from"./signals.js";
|
||||
|
||||
|
||||
|
||||
const getSignalsByName=function(){
|
||||
const signals=getSignals();
|
||||
return Object.fromEntries(signals.map(getSignalByName));
|
||||
};
|
||||
|
||||
const getSignalByName=function({
|
||||
name,
|
||||
number,
|
||||
description,
|
||||
supported,
|
||||
action,
|
||||
forced,
|
||||
standard})
|
||||
{
|
||||
return[
|
||||
name,
|
||||
{name,number,description,supported,action,forced,standard}];
|
||||
|
||||
};
|
||||
|
||||
export const signalsByName=getSignalsByName();
|
||||
|
||||
|
||||
|
||||
|
||||
const getSignalsByNumber=function(){
|
||||
const signals=getSignals();
|
||||
const length=SIGRTMAX+1;
|
||||
const signalsA=Array.from({length},(value,number)=>
|
||||
getSignalByNumber(number,signals));
|
||||
|
||||
return Object.assign({},...signalsA);
|
||||
};
|
||||
|
||||
const getSignalByNumber=function(number,signals){
|
||||
const signal=findSignalByNumber(number,signals);
|
||||
|
||||
if(signal===undefined){
|
||||
return{};
|
||||
}
|
||||
|
||||
const{name,description,supported,action,forced,standard}=signal;
|
||||
return{
|
||||
[number]:{
|
||||
name,
|
||||
number,
|
||||
description,
|
||||
supported,
|
||||
action,
|
||||
forced,
|
||||
standard}};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
const findSignalByNumber=function(number,signals){
|
||||
const signal=signals.find(({name})=>constants.signals[name]===number);
|
||||
|
||||
if(signal!==undefined){
|
||||
return signal;
|
||||
}
|
||||
|
||||
return signals.find((signalA)=>signalA.number===number);
|
||||
};
|
||||
|
||||
export const signalsByNumber=getSignalsByNumber();
|
||||
//# sourceMappingURL=main.js.map
|
||||
@@ -0,0 +1,14 @@
|
||||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = tab
|
||||
|
||||
[{*.json,*.yml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
|
||||
var isPrototype = require("../prototype/is");
|
||||
|
||||
// In theory we could rely on Symbol.toStringTag directly,
|
||||
// still early native implementation (e.g. in FF) predated symbols
|
||||
var objectToString = Object.prototype.toString
|
||||
, objectTaggedString = objectToString.call(Promise.resolve());
|
||||
|
||||
module.exports = function (value) {
|
||||
if (!value) return false;
|
||||
|
||||
// Sanity check (reject objects which do not expose common Promise interface)
|
||||
try {
|
||||
if (typeof value.then !== "function") return false;
|
||||
if (typeof value["catch"] !== "function") return false;
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ensure its native Promise object (has [[PromiseState]] slot)
|
||||
// Note: it's not 100% precise as string tag may be overriden
|
||||
// and other objects could be hacked to expose it
|
||||
if (objectToString.call(value) !== objectTaggedString) return false;
|
||||
|
||||
return !isPrototype(value);
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./async').forEachLimit;
|
||||
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright (C) 2014-present SheetJS LLC
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,135 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Code coverage report for csv2json/libs/core/getDelimiter.js</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../../base.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1>
|
||||
<a href="../../../index.html">All files</a> / <a href="index.html">csv2json/libs/core</a> getDelimiter.js
|
||||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>0/15</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>0/6</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>0/2</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>0/15</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line low'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a>
|
||||
<a name='L9'></a><a href='#L9'>9</a>
|
||||
<a name='L10'></a><a href='#L10'>10</a>
|
||||
<a name='L11'></a><a href='#L11'>11</a>
|
||||
<a name='L12'></a><a href='#L12'>12</a>
|
||||
<a name='L13'></a><a href='#L13'>13</a>
|
||||
<a name='L14'></a><a href='#L14'>14</a>
|
||||
<a name='L15'></a><a href='#L15'>15</a>
|
||||
<a name='L16'></a><a href='#L16'>16</a>
|
||||
<a name='L17'></a><a href='#L17'>17</a>
|
||||
<a name='L18'></a><a href='#L18'>18</a>
|
||||
<a name='L19'></a><a href='#L19'>19</a>
|
||||
<a name='L20'></a><a href='#L20'>20</a>
|
||||
<a name='L21'></a><a href='#L21'>21</a>
|
||||
<a name='L22'></a><a href='#L22'>22</a>
|
||||
<a name='L23'></a><a href='#L23'>23</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >module.exports = getDelimiter;</span>
|
||||
var defaulDelimiters = <span class="cstat-no" title="statement not covered" >[",", "|", "\t", ";", ":"];</span>
|
||||
function <span class="fstat-no" title="function not covered" >getDelimiter(</span>rowStr,param) {
|
||||
var checker;
|
||||
<span class="cstat-no" title="statement not covered" > if (param.delimiter === "auto"){</span>
|
||||
<span class="cstat-no" title="statement not covered" > checker = defaulDelimiters;</span>
|
||||
} else <span class="cstat-no" title="statement not covered" >if (param.delimiter instanceof Array) {</span>
|
||||
<span class="cstat-no" title="statement not covered" > checker = param.delimiter;</span>
|
||||
} else {
|
||||
<span class="cstat-no" title="statement not covered" > return param.delimiter;</span>
|
||||
}
|
||||
var count = <span class="cstat-no" title="statement not covered" >0;</span>
|
||||
var rtn = <span class="cstat-no" title="statement not covered" >",";</span>
|
||||
<span class="cstat-no" title="statement not covered" > checker.forEach(<span class="fstat-no" title="function not covered" >fu</span>nction(delim) {</span>
|
||||
var delimCount = <span class="cstat-no" title="statement not covered" >rowStr.split(delim).length;</span>
|
||||
<span class="cstat-no" title="statement not covered" > if (delimCount > count) {</span>
|
||||
<span class="cstat-no" title="statement not covered" > rtn = delim;</span>
|
||||
<span class="cstat-no" title="statement not covered" > count = delimCount;</span>
|
||||
}
|
||||
});
|
||||
<span class="cstat-no" title="statement not covered" > return rtn;</span>
|
||||
}
|
||||
</pre></td></tr>
|
||||
</table></pre>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Fri May 11 2018 21:20:20 GMT+0100 (IST)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
if (typeof prettyPrint === 'function') {
|
||||
prettyPrint();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script src="../../../sorter.js"></script>
|
||||
<script src="../../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,33 @@
|
||||
# wcwidth
|
||||
|
||||
Determine columns needed for a fixed-size wide-character string
|
||||
|
||||
----
|
||||
|
||||
wcwidth is a simple JavaScript port of [wcwidth](http://man7.org/linux/man-pages/man3/wcswidth.3.html) implemented in C by Markus Kuhn.
|
||||
|
||||
JavaScript port [originally](https://github.com/mycoboco/wcwidth.js) written by Woong Jun <woong.jun@gmail.com> (http://code.woong.org/)
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
'한'.length // => 1
|
||||
wcwidth('한'); // => 2
|
||||
|
||||
'한글'.length // => 2
|
||||
wcwidth('한글'); // => 4
|
||||
```
|
||||
|
||||
`wcwidth()` and its string version, `wcswidth()` are defined by IEEE Std
|
||||
1002.1-2001, a.k.a. POSIX.1-2001, and return the number of columns used
|
||||
to represent the given wide character and string.
|
||||
|
||||
Markus's implementation assumes the wide character given to those
|
||||
functions to be encoded in ISO 10646, which is almost true for
|
||||
JavaScript's characters.
|
||||
|
||||
[Further explaination here](docs)
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
@@ -0,0 +1,29 @@
|
||||
const calculateRetryDelay = ({ attemptCount, retryOptions, error, retryAfter, computedValue, }) => {
|
||||
if (error.name === 'RetryError') {
|
||||
return 1;
|
||||
}
|
||||
if (attemptCount > retryOptions.limit) {
|
||||
return 0;
|
||||
}
|
||||
const hasMethod = retryOptions.methods.includes(error.options.method);
|
||||
const hasErrorCode = retryOptions.errorCodes.includes(error.code);
|
||||
const hasStatusCode = error.response && retryOptions.statusCodes.includes(error.response.statusCode);
|
||||
if (!hasMethod || (!hasErrorCode && !hasStatusCode)) {
|
||||
return 0;
|
||||
}
|
||||
if (error.response) {
|
||||
if (retryAfter) {
|
||||
// In this case `computedValue` is `options.request.timeout`
|
||||
if (retryAfter > computedValue) {
|
||||
return 0;
|
||||
}
|
||||
return retryAfter;
|
||||
}
|
||||
if (error.response.statusCode === 413) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
const noise = Math.random() * retryOptions.noise;
|
||||
return Math.min(((2 ** (attemptCount - 1)) * 1000), retryOptions.backoffLimit) + noise;
|
||||
};
|
||||
export default calculateRetryDelay;
|
||||
@@ -0,0 +1,79 @@
|
||||
'use strict'
|
||||
|
||||
const fs = require('graceful-fs')
|
||||
const os = require('os')
|
||||
const path = require('path')
|
||||
|
||||
// HFS, ext{2,3}, FAT do not, Node.js v0.10 does not
|
||||
function hasMillisResSync () {
|
||||
let tmpfile = path.join('millis-test-sync' + Date.now().toString() + Math.random().toString().slice(2))
|
||||
tmpfile = path.join(os.tmpdir(), tmpfile)
|
||||
|
||||
// 550 millis past UNIX epoch
|
||||
const d = new Date(1435410243862)
|
||||
fs.writeFileSync(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141')
|
||||
const fd = fs.openSync(tmpfile, 'r+')
|
||||
fs.futimesSync(fd, d, d)
|
||||
fs.closeSync(fd)
|
||||
return fs.statSync(tmpfile).mtime > 1435410243000
|
||||
}
|
||||
|
||||
function hasMillisRes (callback) {
|
||||
let tmpfile = path.join('millis-test' + Date.now().toString() + Math.random().toString().slice(2))
|
||||
tmpfile = path.join(os.tmpdir(), tmpfile)
|
||||
|
||||
// 550 millis past UNIX epoch
|
||||
const d = new Date(1435410243862)
|
||||
fs.writeFile(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141', err => {
|
||||
if (err) return callback(err)
|
||||
fs.open(tmpfile, 'r+', (err, fd) => {
|
||||
if (err) return callback(err)
|
||||
fs.futimes(fd, d, d, err => {
|
||||
if (err) return callback(err)
|
||||
fs.close(fd, err => {
|
||||
if (err) return callback(err)
|
||||
fs.stat(tmpfile, (err, stats) => {
|
||||
if (err) return callback(err)
|
||||
callback(null, stats.mtime > 1435410243000)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function timeRemoveMillis (timestamp) {
|
||||
if (typeof timestamp === 'number') {
|
||||
return Math.floor(timestamp / 1000) * 1000
|
||||
} else if (timestamp instanceof Date) {
|
||||
return new Date(Math.floor(timestamp.getTime() / 1000) * 1000)
|
||||
} else {
|
||||
throw new Error('fs-extra: timeRemoveMillis() unknown parameter type')
|
||||
}
|
||||
}
|
||||
|
||||
function utimesMillis (path, atime, mtime, callback) {
|
||||
// if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)
|
||||
fs.open(path, 'r+', (err, fd) => {
|
||||
if (err) return callback(err)
|
||||
fs.futimes(fd, atime, mtime, futimesErr => {
|
||||
fs.close(fd, closeErr => {
|
||||
if (callback) callback(futimesErr || closeErr)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function utimesMillisSync (path, atime, mtime) {
|
||||
const fd = fs.openSync(path, 'r+')
|
||||
fs.futimesSync(fd, atime, mtime)
|
||||
return fs.closeSync(fd)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
hasMillisRes,
|
||||
hasMillisResSync,
|
||||
timeRemoveMillis,
|
||||
utimesMillis,
|
||||
utimesMillisSync
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = isJWT;
|
||||
|
||||
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
||||
|
||||
var _isBase = _interopRequireDefault(require("./isBase64"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function isJWT(str) {
|
||||
(0, _assertString.default)(str);
|
||||
var dotSplit = str.split('.');
|
||||
var len = dotSplit.length;
|
||||
|
||||
if (len > 3 || len < 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return dotSplit.reduce(function (acc, currElem) {
|
||||
return acc && (0, _isBase.default)(currElem, {
|
||||
urlSafe: true
|
||||
});
|
||||
}, true);
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
module.exports.default = exports.default;
|
||||
@@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
|
||||
var systemGlobal = require('../');
|
||||
var test = require('tape');
|
||||
var runTests = require('./tests');
|
||||
|
||||
test('as a function', function (t) {
|
||||
runTests(systemGlobal(), t);
|
||||
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
import { HasOwnProperty } from '../262';
|
||||
/**
|
||||
* https://tc39.es/ecma402/#sec-currencydigits
|
||||
*/
|
||||
export function CurrencyDigits(c, _a) {
|
||||
var currencyDigitsData = _a.currencyDigitsData;
|
||||
return HasOwnProperty(currencyDigitsData, c)
|
||||
? currencyDigitsData[c]
|
||||
: 2;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"isAsyncIterable.js","sourceRoot":"","sources":["../../../../src/internal/util/isAsyncIterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,UAAU,eAAe,CAAI,GAAQ;IACzC,OAAO,MAAM,CAAC,aAAa,IAAI,UAAU,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;AACzE,CAAC"}
|
||||
@@ -0,0 +1,28 @@
|
||||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||
|
||||
import assertString from './util/assertString';
|
||||
import toString from './util/toString';
|
||||
export default function isIn(str, options) {
|
||||
assertString(str);
|
||||
var i;
|
||||
|
||||
if (Object.prototype.toString.call(options) === '[object Array]') {
|
||||
var array = [];
|
||||
|
||||
for (i in options) {
|
||||
// https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes
|
||||
// istanbul ignore else
|
||||
if ({}.hasOwnProperty.call(options, i)) {
|
||||
array[i] = toString(options[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return array.indexOf(str) >= 0;
|
||||
} else if (_typeof(options) === 'object') {
|
||||
return options.hasOwnProperty(str);
|
||||
} else if (options && typeof options.indexOf === 'function') {
|
||||
return options.indexOf(str) >= 0;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
## 8.2.0 (2021-09-06)
|
||||
|
||||
### New features
|
||||
|
||||
Add support for walking ES2022 class static blocks.
|
||||
|
||||
## 8.1.1 (2021-06-29)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Include `base` in the type declarations.
|
||||
|
||||
## 8.1.0 (2021-04-24)
|
||||
|
||||
### New features
|
||||
|
||||
Support node types for class fields and private methods.
|
||||
|
||||
## 8.0.2 (2021-01-25)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Adjust package.json to work with Node 12.16.0 and 13.0-13.6.
|
||||
|
||||
## 8.0.0 (2021-01-05)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix a bug where `full` and `fullAncestor` would skip nodes with overridden types.
|
||||
|
||||
## 8.0.0 (2020-08-12)
|
||||
|
||||
### New features
|
||||
|
||||
The package can now be loaded directly as an ECMAScript module in node 13+.
|
||||
|
||||
## 7.2.0 (2020-06-17)
|
||||
|
||||
### New features
|
||||
|
||||
Support optional chaining and nullish coalescing.
|
||||
|
||||
Support `import.meta`.
|
||||
|
||||
Add support for `export * as ns from "source"`.
|
||||
|
||||
## 7.1.1 (2020-02-13)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Clean up the type definitions to actually work well with the main parser.
|
||||
|
||||
## 7.1.0 (2020-02-11)
|
||||
|
||||
### New features
|
||||
|
||||
Add a TypeScript definition file for the library.
|
||||
|
||||
## 7.0.0 (2017-08-12)
|
||||
|
||||
### New features
|
||||
|
||||
Support walking `ImportExpression` nodes.
|
||||
|
||||
## 6.2.0 (2017-07-04)
|
||||
|
||||
### New features
|
||||
|
||||
Add support for `Import` nodes.
|
||||
|
||||
## 6.1.0 (2018-09-28)
|
||||
|
||||
### New features
|
||||
|
||||
The walker now walks `TemplateElement` nodes.
|
||||
|
||||
## 6.0.1 (2018-09-14)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix bad "main" field in package.json.
|
||||
|
||||
## 6.0.0 (2018-09-14)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
This is now a separate package, `acorn-walk`, rather than part of the main `acorn` package.
|
||||
|
||||
The `ScopeBody` and `ScopeExpression` meta-node-types are no longer supported.
|
||||
|
||||
## 5.7.1 (2018-06-15)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Make sure the walker and bin files are rebuilt on release (the previous release didn't get the up-to-date versions).
|
||||
|
||||
## 5.7.0 (2018-06-15)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix crash in walker when walking a binding-less catch node.
|
||||
|
||||
## 5.6.2 (2018-06-05)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
In the walker, go back to allowing the `baseVisitor` argument to be null to default to the default base everywhere.
|
||||
|
||||
## 5.6.1 (2018-06-01)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix regression when passing `null` as fourth argument to `walk.recursive`.
|
||||
|
||||
## 5.6.0 (2018-05-31)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix a bug in the walker that caused a crash when walking an object pattern spread.
|
||||
|
||||
## 5.5.1 (2018-03-06)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Fix regression in walker causing property values in object patterns to be walked as expressions.
|
||||
|
||||
## 5.5.0 (2018-02-27)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Support object spread in the AST walker.
|
||||
|
||||
## 5.4.1 (2018-02-02)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
5.4.0 somehow accidentally included an old version of walk.js.
|
||||
|
||||
## 5.2.0 (2017-10-30)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
The `full` and `fullAncestor` walkers no longer visit nodes multiple times.
|
||||
|
||||
## 5.1.0 (2017-07-05)
|
||||
|
||||
### New features
|
||||
|
||||
New walker functions `full` and `fullAncestor`.
|
||||
|
||||
## 3.2.0 (2016-06-07)
|
||||
|
||||
### New features
|
||||
|
||||
Make it possible to use `visit.ancestor` with a walk state.
|
||||
|
||||
## 3.1.0 (2016-04-18)
|
||||
|
||||
### New features
|
||||
|
||||
The walker now allows defining handlers for `CatchClause` nodes.
|
||||
|
||||
## 2.5.2 (2015-10-27)
|
||||
|
||||
### Fixes
|
||||
|
||||
Fix bug where the walker walked an exported `let` statement as an expression.
|
||||
@@ -0,0 +1,20 @@
|
||||
/*!
|
||||
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
||||
*
|
||||
* Copyright (c) 2014-2016, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
module.exports = function isExtglob(str) {
|
||||
if (typeof str !== 'string' || str === '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
var match;
|
||||
while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) {
|
||||
if (match[2]) return true;
|
||||
str = str.slice(match.index + match[0].length);
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"iterate-value","version":"1.0.2","files":{"LICENSE":{"checkedAt":1678883671533,"integrity":"sha512-d2fjYr50p8QKjqC0qhH5nWv3sgAsKHHicw91kVzLPCZ54cpPIRw8zJk+nn45Y6q/yJ/T/xdxK77zBLuAvFgmVg==","mode":420,"size":1071},"index.js":{"checkedAt":1678883671909,"integrity":"sha512-1D3Lwp4/3ij/nUN9ZaDU0zGPyt6WVsR6yJg1+8UKmMn6n6JT369my6VwNiabNzsHfce1r1FzvEMwm5qH9rMYhw==","mode":420,"size":403},"test/index.js":{"checkedAt":1678883671909,"integrity":"sha512-+U+4fUmk0eBrUIgJtS+9zmSjVtmb604qzZvj+48aF7A75sptXBo173DpFi/BH75M4yRFbS4AqdPo2VpwkYdhXg==","mode":420,"size":3184},".eslintrc":{"checkedAt":1678883671909,"integrity":"sha512-zEyjZloCyOmJjo3279yeNDKKgA/bBnCw8+mev0maDonuT/UYDrp9xG0DwZ6pReY/A2aESgxHlO8tz42mvYIPPg==","mode":420,"size":255},"package.json":{"checkedAt":1678883671909,"integrity":"sha512-cCVJ/GDmR8bBLMLje3Pzb+I8cm+6g5DhLd5Aztr80A6DXbwCSTDvkhTP5X7gW3/QkvbPyPabFCiZBn46K0UGMg==","mode":420,"size":1802},"CHANGELOG.md":{"checkedAt":1678883671909,"integrity":"sha512-1+xJsOG99McoO5kzDqbrbpBLNIOUIdxk8VKNfZTZznNni8vYFh9zrEti3tB/9KwE/wMk6n1bT5Fvo6v4ZI+LGg==","mode":420,"size":2989},"README.md":{"checkedAt":1678883671913,"integrity":"sha512-1Egt7X0hOSRuL+UC+bHFVoTcjxq8tyYLpTaO7P8SFgAJSRc3EGkygaCI030WT0qQmdpgTfSfKZFlXb9S7GcKEw==","mode":420,"size":3510},".travis.yml":{"checkedAt":1678883671913,"integrity":"sha512-D69RJiLgN1L3A/pJrtygW15/I11U5rzjGKF3w+t06hzkcAAzC2f3tZHVcgnkCRSnlB4jJoLGkLE2JdZ+dqFxpQ==","mode":420,"size":163},".github/workflows/rebase.yml":{"checkedAt":1678883671913,"integrity":"sha512-XBMePyHgqOSM7qO5HZZ7IbwHMPY4yjagkk5FdaDDfJRZVQt7lJ+KtlPpVVtTfb8VbN1I1sdCVo5V3AK3aE8q3Q==","mode":420,"size":250},".github/FUNDING.yml":{"checkedAt":1678883671913,"integrity":"sha512-eKDmxFQhhcevto/fIB1Pjquo16lvfhogNDLDMo6v1E5UiiuDcr35DcUUIqC4se9bvYuoMfERWQofcPwvDQC9og==","mode":420,"size":584}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"dlv.umd.js","sources":["../index.js"],"sourcesContent":["export default function dlv(obj, key, def, p, undef) {\n\tkey = key.split ? key.split('.') : key;\n\tfor (p = 0; p < key.length; p++) {\n\t\tobj = obj ? obj[key[p]] : undef;\n\t}\n\treturn obj === undef ? def : obj;\n}\n"],"names":["obj","key","def","p","undef","split","length"],"mappings":"mFAAe,SAAaA,EAAKC,EAAKC,EAAKC,EAAGC,OAC7CH,EAAMA,EAAII,MAAQJ,EAAII,MAAM,KAAOJ,EAC9BE,EAAI,EAAGA,EAAIF,EAAIK,OAAQH,IAC3BH,EAAMA,EAAMA,EAAIC,EAAIE,IAAMC,SAEpBJ,IAAQI,EAAQF,EAAMF,kEALf,SAAaA,EAAKC,EAAKC,EAAKC,EAAGC,OAC7CH,EAAMA,EAAII,MAAQJ,EAAII,MAAM,KAAOJ,EAC9BE,EAAI,EAAGA,EAAIF,EAAIK,OAAQH,IAC3BH,EAAMA,EAAMA,EAAIC,EAAIE,IAAMC,SAEpBJ,IAAQI,EAAQF,EAAMF,WALf,SAAaA,EAAKC,EAAKC,EAAKC,EAAGC,OAC7CH,EAAMA,EAAII,MAAQJ,EAAII,MAAM,KAAOJ,EAC9BE,EAAI,EAAGA,EAAIF,EAAIK,OAAQH,IAC3BH,EAAMA,EAAMA,EAAIC,EAAIE,IAAMC,SAEpBJ,IAAQI,EAAQF,EAAMF"}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { CHash, Input } from './utils.js';
|
||||
export declare type Pbkdf2Opt = {
|
||||
c: number;
|
||||
dkLen?: number;
|
||||
asyncTick?: number;
|
||||
};
|
||||
/**
|
||||
* PBKDF2-HMAC: RFC 2898 key derivation function
|
||||
* @param hash - hash function that would be used e.g. sha256
|
||||
* @param password - password from which a derived key is generated
|
||||
* @param salt - cryptographic salt
|
||||
* @param opts - {c, dkLen} where c is work factor and dkLen is output message size
|
||||
*/
|
||||
export declare function pbkdf2(hash: CHash, password: Input, salt: Input, opts: Pbkdf2Opt): Uint8Array;
|
||||
export declare function pbkdf2Async(hash: CHash, password: Input, salt: Input, opts: Pbkdf2Opt): Promise<Uint8Array>;
|
||||
@@ -0,0 +1,14 @@
|
||||
import { Immediate } from '../util/Immediate';
|
||||
const { setImmediate, clearImmediate } = Immediate;
|
||||
export const immediateProvider = {
|
||||
setImmediate(...args) {
|
||||
const { delegate } = immediateProvider;
|
||||
return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate)(...args);
|
||||
},
|
||||
clearImmediate(handle) {
|
||||
const { delegate } = immediateProvider;
|
||||
return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle);
|
||||
},
|
||||
delegate: undefined,
|
||||
};
|
||||
//# sourceMappingURL=immediateProvider.js.map
|
||||
@@ -0,0 +1,37 @@
|
||||
var baseGetTag = require('./_baseGetTag'),
|
||||
isObject = require('./isObject');
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var asyncTag = '[object AsyncFunction]',
|
||||
funcTag = '[object Function]',
|
||||
genTag = '[object GeneratorFunction]',
|
||||
proxyTag = '[object Proxy]';
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Function` object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isFunction(_);
|
||||
* // => true
|
||||
*
|
||||
* _.isFunction(/abc/);
|
||||
* // => false
|
||||
*/
|
||||
function isFunction(value) {
|
||||
if (!isObject(value)) {
|
||||
return false;
|
||||
}
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
||||
var tag = baseGetTag(value);
|
||||
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
||||
}
|
||||
|
||||
module.exports = isFunction;
|
||||
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Handles dealing with errors for super-gross mode. Creates a context, in which
|
||||
* any synchronously thrown errors will be passed to {@link captureError}. Which
|
||||
* will record the error such that it will be rethrown after the call back is complete.
|
||||
* TODO: Remove in v8
|
||||
* @param cb An immediately executed function.
|
||||
*/
|
||||
export declare function errorContext(cb: () => void): void;
|
||||
/**
|
||||
* Captures errors only in super-gross mode.
|
||||
* @param err the error to capture
|
||||
*/
|
||||
export declare function captureError(err: any): void;
|
||||
//# sourceMappingURL=errorContext.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"concatMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatMapTo.ts"],"names":[],"mappings":";;;AAAA,yCAAwC;AAExC,iDAAgD;AAuEhD,SAAgB,WAAW,CACzB,eAAkB,EAClB,cAA6G;IAE7G,OAAO,uBAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,qBAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,qBAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,CAAC,CAAC;AAC1H,CAAC;AALD,kCAKC"}
|
||||
@@ -0,0 +1,97 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Code coverage report for csv2json/libs/interfaces</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../../base.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1>
|
||||
<a href="../../../index.html">All files</a> csv2json/libs/interfaces
|
||||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>0/1</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>0/0</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>0/0</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>0/1</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line low'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file low" data-value="index.js"><a href="index.js.html">index.js</a></td>
|
||||
<td data-value="0" class="pic low"><div class="chart"><div class="cover-fill" style="width: 0%;"></div><div class="cover-empty" style="width:100%;"></div></div></td>
|
||||
<td data-value="0" class="pct low">0%</td>
|
||||
<td data-value="1" class="abs low">0/1</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="0" class="abs high">0/0</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="0" class="abs high">0/0</td>
|
||||
<td data-value="0" class="pct low">0%</td>
|
||||
<td data-value="1" class="abs low">0/1</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div><div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Fri May 11 2018 21:36:07 GMT+0100 (IST)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
if (typeof prettyPrint === 'function') {
|
||||
prettyPrint();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script src="../../../sorter.js"></script>
|
||||
<script src="../../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,14 @@
|
||||
function executeCallback(promise, callback) {
|
||||
if (callback) {
|
||||
promise.then(
|
||||
function(result) {
|
||||
callback(null, result);
|
||||
},
|
||||
function(error) {
|
||||
callback(error);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default executeCallback;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"firstValueFrom.js","sourceRoot":"","sources":["../../../src/internal/firstValueFrom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAqD9C,MAAM,UAAU,cAAc,CAAO,MAAqB,EAAE,MAAgC;IAC1F,IAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC;IAC7C,OAAO,IAAI,OAAO,CAAQ,UAAC,OAAO,EAAE,MAAM;QACxC,IAAM,UAAU,GAAG,IAAI,cAAc,CAAI;YACvC,IAAI,EAAE,UAAC,KAAK;gBACV,OAAO,CAAC,KAAK,CAAC,CAAC;gBACf,UAAU,CAAC,WAAW,EAAE,CAAC;YAC3B,CAAC;YACD,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE;gBACR,IAAI,SAAS,EAAE;oBACb,OAAO,CAAC,MAAO,CAAC,YAAY,CAAC,CAAC;iBAC/B;qBAAM;oBACL,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC;iBAC1B;YACH,CAAC;SACF,CAAC,CAAC;QACH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* http://ecma-international.org/ecma-402/7.0/index.html#sec-canonicalizelocalelist
|
||||
* @param locales
|
||||
*/
|
||||
export function CanonicalizeLocaleList(locales) {
|
||||
// TODO
|
||||
return Intl.getCanonicalLocales(locales);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { createErrorClass } from './createErrorClass';
|
||||
export var UnsubscriptionError = createErrorClass(function (_super) {
|
||||
return function UnsubscriptionErrorImpl(errors) {
|
||||
_super(this);
|
||||
this.message = errors
|
||||
? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ')
|
||||
: '';
|
||||
this.name = 'UnsubscriptionError';
|
||||
this.errors = errors;
|
||||
};
|
||||
});
|
||||
//# sourceMappingURL=UnsubscriptionError.js.map
|
||||
@@ -0,0 +1,39 @@
|
||||
"use strict";
|
||||
|
||||
var assert = require("chai").assert
|
||||
, handleException = require("../../lib/resolve-exception");
|
||||
|
||||
describe("lib/handle-exception", function () {
|
||||
it("Should throw TypeError", function () {
|
||||
try {
|
||||
handleException(12, "Invalid value");
|
||||
throw new Error("Unexpected");
|
||||
} catch (error) {
|
||||
assert.equal(error.name, "TypeError");
|
||||
assert.equal(error.message, "Invalid value");
|
||||
}
|
||||
});
|
||||
it("Should resolve value in default message", function () {
|
||||
try {
|
||||
handleException(12, "%v is invalid", {});
|
||||
throw new Error("Unexpected");
|
||||
} catch (error) {
|
||||
assert.equal(error.message, "12 is invalid");
|
||||
}
|
||||
});
|
||||
it("Should support optional values via inputOptions.isOptional", function () {
|
||||
assert.equal(handleException(null, "%v is invalid", { isOptional: true }, null));
|
||||
});
|
||||
it("Should support optional values via inputOptions.default", function () {
|
||||
// prettier-ignore
|
||||
assert.equal(handleException(null, "%v is invalid", { "default": "bar" }), "bar");
|
||||
});
|
||||
it("Should support custome error message via inputOptions.errorMessage", function () {
|
||||
try {
|
||||
handleException(null, "%v is invalid", { errorMessage: "%v is not supported age" });
|
||||
throw new Error("Unexpected");
|
||||
} catch (error) {
|
||||
assert.equal(error.message, "null is not supported age");
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "node-domexception",
|
||||
"version": "1.0.0",
|
||||
"description": "An implementation of the DOMException class from NodeJS",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jimmywarting/node-domexception.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.5.0"
|
||||
},
|
||||
"author": "Jimmy Wärting",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jimmywarting/node-domexception/issues"
|
||||
},
|
||||
"homepage": "https://github.com/jimmywarting/node-domexception#readme",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/jimmywarting"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://paypal.me/jimmywarting"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('invokeArgs', require('../invoke'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,3 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "node"
|
||||
@@ -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.00222,"34":0.00222,"35":0.00222,"36":0,"37":0.00444,"38":0,"39":0,"40":0.00222,"41":0,"42":0.01555,"43":0,"44":0,"45":0.00222,"46":0.00222,"47":0.00222,"48":0.00222,"49":0.00222,"50":0.00889,"51":0,"52":0.01778,"53":0,"54":0.02889,"55":0,"56":0.00222,"57":0.00889,"58":0.00222,"59":0.00444,"60":0.00222,"61":0.00222,"62":0.00444,"63":0.00222,"64":0.00444,"65":0.00444,"66":0.00222,"67":0.00444,"68":0.01111,"69":0.00444,"70":0.00222,"71":0.00444,"72":0.01778,"73":0.00222,"74":0,"75":0.00222,"76":0,"77":0.00222,"78":0.00444,"79":0,"80":0.00222,"81":0.00444,"82":0.00444,"83":0.00444,"84":0.00667,"85":0.00444,"86":0.00222,"87":0.00222,"88":0.00667,"89":0.00889,"90":0.00444,"91":0.01778,"92":0.00444,"93":0.00667,"94":0.01333,"95":0.01111,"96":0.01333,"97":0.01778,"98":0.01333,"99":0.02666,"100":0.02222,"101":0.01778,"102":0.05555,"103":0.01333,"104":0.03555,"105":0.01333,"106":0.02666,"107":0.04666,"108":0.08888,"109":0.83547,"110":0.47329,"111":0.00889,"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.00222,"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.00222,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0.00222,"50":0,"51":0.01111,"52":0,"53":0,"54":0.00222,"55":0,"56":0,"57":0,"58":0.00222,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0.00444,"68":0,"69":0.01555,"70":0.00222,"71":0.00444,"72":0.00222,"73":0,"74":0.03777,"75":0.00444,"76":0.02,"77":0.00444,"78":0,"79":0.00444,"80":0.00444,"81":0.00667,"83":0.00222,"84":0,"85":0.00222,"86":0.00444,"87":0.00444,"88":0.02889,"89":0.00667,"90":0.01778,"91":0.00444,"92":0.00222,"93":0,"94":0.00222,"95":0.00667,"96":0.00444,"97":0.00667,"98":0.00222,"99":0.00222,"100":0.00889,"101":0.00444,"102":0.01111,"103":0.01111,"104":0.00667,"105":0.01111,"106":0.01333,"107":0.02,"108":0.05777,"109":0.62438,"110":0.32663,"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.00222,"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.00222,"56":0,"57":0,"58":0,"60":0.00222,"62":0,"63":0.00222,"64":0.00222,"65":0,"66":0,"67":0.01111,"68":0,"69":0.00222,"70":0,"71":0,"72":0,"73":0.00444,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.00444,"80":0,"81":0,"82":0.00222,"83":0,"84":0,"85":0,"86":0.00222,"87":0,"88":0,"89":0,"90":0.00222,"91":0.00222,"92":0.00222,"93":0.00444,"94":0.06666,"95":0.08888,"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.00222,"13":0.00222,"14":0.00222,"15":0.00222,"16":0.00222,"17":0.00222,"18":0.01333,"79":0,"80":0,"81":0.00222,"83":0,"84":0.00444,"85":0.00222,"86":0,"87":0,"88":0,"89":0.00222,"90":0.00889,"91":0,"92":0.01555,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0.00667,"101":0,"102":0,"103":0.00222,"104":0,"105":0.00222,"106":0.00444,"107":0.00889,"108":0.01778,"109":0.13332,"110":0.10221},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0.00222,"14":0.00222,"15":0,_:"0","3.1":0,"3.2":0,"5.1":0.00444,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0,"13.1":0.00222,"14.1":0.00222,"15.1":0,"15.2-15.3":0,"15.4":0.02444,"15.5":0.03555,"15.6":0.02,"16.0":0,"16.1":0.00889,"16.2":0.01333,"16.3":0.02222,"16.4":0},G:{"8":0.00265,"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.06443,"8.1-8.4":0.04148,"9.0-9.2":0,"9.3":0.03354,"10.0-10.2":0.0053,"10.3":0.09003,"11.0-11.2":0.01765,"11.3-11.4":0.00177,"12.0-12.1":0.01324,"12.2-12.5":1.32218,"13.0-13.1":0.03795,"13.2":0.03089,"13.3":0.09621,"13.4-13.7":0.173,"14.0-14.4":0.63373,"14.5-14.8":0.71669,"15.0-15.1":0.31157,"15.2-15.3":0.37247,"15.4":0.18623,"15.5":0.34599,"15.6":0.55606,"16.0":0.42454,"16.1":0.85703,"16.2":0.97089,"16.3":0.83408,"16.4":0.00265},P:{"4":0.28472,"20":0.15253,"5.0-5.4":0.02034,"6.2-6.4":0.02034,"7.2-7.4":0.24404,"8.2":0,"9.2":0.03051,"10.1":0,"11.1-11.2":0.08135,"12.0":0.01017,"13.0":0.06101,"14.0":0.10168,"15.0":0.05084,"16.0":0.1627,"17.0":0.18303,"18.0":0.08135,"19.0":0.73213},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0.00424,"4.2-4.3":0.02968,"4.4":0,"4.4.3-4.4.4":0.1894},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.00667,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.10111},H:{"0":0.69955},L:{"0":83.02923},R:{_:"0"},M:{"0":0.70002},Q:{"13.1":0.00778}};
|
||||
@@ -0,0 +1,16 @@
|
||||
import fs from 'graceful-fs'
|
||||
|
||||
export function readCAFileSync (filePath: string): string[] | undefined {
|
||||
try {
|
||||
const contents = fs.readFileSync(filePath, 'utf8')
|
||||
const delim = '-----END CERTIFICATE-----'
|
||||
const output = contents
|
||||
.split(delim)
|
||||
.filter((ca) => Boolean(ca.trim()))
|
||||
.map((ca) => `${ca.trimLeft()}${delim}`)
|
||||
return output
|
||||
} catch (err) {
|
||||
if (err.code === 'ENOENT') return undefined
|
||||
throw err
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user