new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"isFunction.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isFunction.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAEvE"}
|
||||
@@ -0,0 +1,36 @@
|
||||
var fs = require('fs')
|
||||
var path = require('path')
|
||||
var mkdirp = require('mkdirp')
|
||||
var buble = require('buble')
|
||||
|
||||
var HEADER = '/* Generated by `npm run build`, do not edit! */\n\n'
|
||||
|
||||
function compile (name, output, fix) {
|
||||
console.log(name, '→', output)
|
||||
mkdirp.sync(path.dirname(path.join(__dirname, output)))
|
||||
var source = fs.readFileSync(require.resolve(name), 'utf8')
|
||||
if (fix) source = fix(source)
|
||||
var result = buble.transform(source, {
|
||||
transforms: {
|
||||
dangerousForOf: true
|
||||
}
|
||||
})
|
||||
fs.writeFileSync(path.join(__dirname, output), HEADER + result.code, 'utf8')
|
||||
}
|
||||
|
||||
function privateClassElements (str) {
|
||||
return str.replace('acorn-private-class-elements', '../private-class-elements')
|
||||
}
|
||||
|
||||
compile('acorn-bigint', './lib/bigint/index.js')
|
||||
compile('acorn-numeric-separator', './lib/numeric-separator/index.js')
|
||||
compile('acorn-dynamic-import', './lib/dynamic-import/index.js')
|
||||
compile('acorn-import-meta', './lib/import-meta/index.js')
|
||||
compile('acorn-export-ns-from', './lib/export-ns-from/index.js')
|
||||
compile('acorn-class-fields', './lib/class-fields/index.js', privateClassElements)
|
||||
compile('acorn-static-class-features', './lib/static-class-features/index.js', privateClassElements)
|
||||
compile('acorn-private-class-elements', './lib/private-class-elements/index.js', function (str) {
|
||||
return str.replace('class extends Parser', 'class Parser_ extends Parser')
|
||||
// it also works with v7
|
||||
.replace('if (acorn.version.indexOf("6.") != 0 || acorn.version.indexOf("6.0.") == 0) {', 'if (false) {')
|
||||
})
|
||||
@@ -0,0 +1,38 @@
|
||||
import { identity } from '../util/identity';
|
||||
import { isScheduler } from '../util/isScheduler';
|
||||
import { defer } from './defer';
|
||||
import { scheduleIterable } from '../scheduled/scheduleIterable';
|
||||
export function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) {
|
||||
let resultSelector;
|
||||
let initialState;
|
||||
if (arguments.length === 1) {
|
||||
({
|
||||
initialState,
|
||||
condition,
|
||||
iterate,
|
||||
resultSelector = identity,
|
||||
scheduler,
|
||||
} = initialStateOrOptions);
|
||||
}
|
||||
else {
|
||||
initialState = initialStateOrOptions;
|
||||
if (!resultSelectorOrScheduler || isScheduler(resultSelectorOrScheduler)) {
|
||||
resultSelector = identity;
|
||||
scheduler = resultSelectorOrScheduler;
|
||||
}
|
||||
else {
|
||||
resultSelector = resultSelectorOrScheduler;
|
||||
}
|
||||
}
|
||||
function* gen() {
|
||||
for (let state = initialState; !condition || condition(state); state = iterate(state)) {
|
||||
yield resultSelector(state);
|
||||
}
|
||||
}
|
||||
return defer((scheduler
|
||||
?
|
||||
() => scheduleIterable(gen(), scheduler)
|
||||
:
|
||||
gen));
|
||||
}
|
||||
//# sourceMappingURL=generate.js.map
|
||||
@@ -0,0 +1,34 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var CodePointAt = require('./CodePointAt');
|
||||
var IsInteger = require('./IsInteger');
|
||||
var Type = require('./Type');
|
||||
|
||||
var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
// https://262.ecma-international.org/11.0/#sec-advancestringindex
|
||||
|
||||
module.exports = function AdvanceStringIndex(S, index, unicode) {
|
||||
if (Type(S) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: `S` must be a String');
|
||||
}
|
||||
if (!IsInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {
|
||||
throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');
|
||||
}
|
||||
if (Type(unicode) !== 'Boolean') {
|
||||
throw new $TypeError('Assertion failed: `unicode` must be a Boolean');
|
||||
}
|
||||
if (!unicode) {
|
||||
return index + 1;
|
||||
}
|
||||
var length = S.length;
|
||||
if ((index + 1) >= length) {
|
||||
return index + 1;
|
||||
}
|
||||
var cp = CodePointAt(S, index);
|
||||
return index + cp['[[CodeUnitCount]]'];
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
let Selector = require('../selector')
|
||||
|
||||
class Fullscreen extends Selector {
|
||||
/**
|
||||
* Return different selectors depend on prefix
|
||||
*/
|
||||
prefixed(prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return ':-webkit-full-screen'
|
||||
}
|
||||
if (prefix === '-moz-') {
|
||||
return ':-moz-full-screen'
|
||||
}
|
||||
return `:${prefix}fullscreen`
|
||||
}
|
||||
}
|
||||
|
||||
Fullscreen.names = [':fullscreen']
|
||||
|
||||
module.exports = Fullscreen
|
||||
@@ -0,0 +1,8 @@
|
||||
exports["Dictionary"] = Dictionary;
|
||||
exports["is_statement"] = is_statement;
|
||||
exports["List"] = List;
|
||||
exports["minify"] = minify;
|
||||
exports["parse"] = parse;
|
||||
exports["push_uniq"] = push_uniq;
|
||||
exports["TreeTransformer"] = TreeTransformer;
|
||||
exports["TreeWalker"] = TreeWalker;
|
||||
@@ -0,0 +1,314 @@
|
||||
'use strict'
|
||||
|
||||
const fs = require('graceful-fs')
|
||||
const path = require('path')
|
||||
const assert = require('assert')
|
||||
|
||||
const isWindows = (process.platform === 'win32')
|
||||
|
||||
function defaults (options) {
|
||||
const methods = [
|
||||
'unlink',
|
||||
'chmod',
|
||||
'stat',
|
||||
'lstat',
|
||||
'rmdir',
|
||||
'readdir'
|
||||
]
|
||||
methods.forEach(m => {
|
||||
options[m] = options[m] || fs[m]
|
||||
m = m + 'Sync'
|
||||
options[m] = options[m] || fs[m]
|
||||
})
|
||||
|
||||
options.maxBusyTries = options.maxBusyTries || 3
|
||||
}
|
||||
|
||||
function rimraf (p, options, cb) {
|
||||
let busyTries = 0
|
||||
|
||||
if (typeof options === 'function') {
|
||||
cb = options
|
||||
options = {}
|
||||
}
|
||||
|
||||
assert(p, 'rimraf: missing path')
|
||||
assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
|
||||
assert.strictEqual(typeof cb, 'function', 'rimraf: callback function required')
|
||||
assert(options, 'rimraf: invalid options argument provided')
|
||||
assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
|
||||
|
||||
defaults(options)
|
||||
|
||||
rimraf_(p, options, function CB (er) {
|
||||
if (er) {
|
||||
if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') &&
|
||||
busyTries < options.maxBusyTries) {
|
||||
busyTries++
|
||||
const time = busyTries * 100
|
||||
// try again, with the same exact callback as this one.
|
||||
return setTimeout(() => rimraf_(p, options, CB), time)
|
||||
}
|
||||
|
||||
// already gone
|
||||
if (er.code === 'ENOENT') er = null
|
||||
}
|
||||
|
||||
cb(er)
|
||||
})
|
||||
}
|
||||
|
||||
// Two possible strategies.
|
||||
// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR
|
||||
// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR
|
||||
//
|
||||
// Both result in an extra syscall when you guess wrong. However, there
|
||||
// are likely far more normal files in the world than directories. This
|
||||
// is based on the assumption that a the average number of files per
|
||||
// directory is >= 1.
|
||||
//
|
||||
// If anyone ever complains about this, then I guess the strategy could
|
||||
// be made configurable somehow. But until then, YAGNI.
|
||||
function rimraf_ (p, options, cb) {
|
||||
assert(p)
|
||||
assert(options)
|
||||
assert(typeof cb === 'function')
|
||||
|
||||
// sunos lets the root user unlink directories, which is... weird.
|
||||
// so we have to lstat here and make sure it's not a dir.
|
||||
options.lstat(p, (er, st) => {
|
||||
if (er && er.code === 'ENOENT') {
|
||||
return cb(null)
|
||||
}
|
||||
|
||||
// Windows can EPERM on stat. Life is suffering.
|
||||
if (er && er.code === 'EPERM' && isWindows) {
|
||||
return fixWinEPERM(p, options, er, cb)
|
||||
}
|
||||
|
||||
if (st && st.isDirectory()) {
|
||||
return rmdir(p, options, er, cb)
|
||||
}
|
||||
|
||||
options.unlink(p, er => {
|
||||
if (er) {
|
||||
if (er.code === 'ENOENT') {
|
||||
return cb(null)
|
||||
}
|
||||
if (er.code === 'EPERM') {
|
||||
return (isWindows)
|
||||
? fixWinEPERM(p, options, er, cb)
|
||||
: rmdir(p, options, er, cb)
|
||||
}
|
||||
if (er.code === 'EISDIR') {
|
||||
return rmdir(p, options, er, cb)
|
||||
}
|
||||
}
|
||||
return cb(er)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function fixWinEPERM (p, options, er, cb) {
|
||||
assert(p)
|
||||
assert(options)
|
||||
assert(typeof cb === 'function')
|
||||
if (er) {
|
||||
assert(er instanceof Error)
|
||||
}
|
||||
|
||||
options.chmod(p, 0o666, er2 => {
|
||||
if (er2) {
|
||||
cb(er2.code === 'ENOENT' ? null : er)
|
||||
} else {
|
||||
options.stat(p, (er3, stats) => {
|
||||
if (er3) {
|
||||
cb(er3.code === 'ENOENT' ? null : er)
|
||||
} else if (stats.isDirectory()) {
|
||||
rmdir(p, options, er, cb)
|
||||
} else {
|
||||
options.unlink(p, cb)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function fixWinEPERMSync (p, options, er) {
|
||||
let stats
|
||||
|
||||
assert(p)
|
||||
assert(options)
|
||||
if (er) {
|
||||
assert(er instanceof Error)
|
||||
}
|
||||
|
||||
try {
|
||||
options.chmodSync(p, 0o666)
|
||||
} catch (er2) {
|
||||
if (er2.code === 'ENOENT') {
|
||||
return
|
||||
} else {
|
||||
throw er
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
stats = options.statSync(p)
|
||||
} catch (er3) {
|
||||
if (er3.code === 'ENOENT') {
|
||||
return
|
||||
} else {
|
||||
throw er
|
||||
}
|
||||
}
|
||||
|
||||
if (stats.isDirectory()) {
|
||||
rmdirSync(p, options, er)
|
||||
} else {
|
||||
options.unlinkSync(p)
|
||||
}
|
||||
}
|
||||
|
||||
function rmdir (p, options, originalEr, cb) {
|
||||
assert(p)
|
||||
assert(options)
|
||||
if (originalEr) {
|
||||
assert(originalEr instanceof Error)
|
||||
}
|
||||
assert(typeof cb === 'function')
|
||||
|
||||
// try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
|
||||
// if we guessed wrong, and it's not a directory, then
|
||||
// raise the original error.
|
||||
options.rmdir(p, er => {
|
||||
if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) {
|
||||
rmkids(p, options, cb)
|
||||
} else if (er && er.code === 'ENOTDIR') {
|
||||
cb(originalEr)
|
||||
} else {
|
||||
cb(er)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function rmkids (p, options, cb) {
|
||||
assert(p)
|
||||
assert(options)
|
||||
assert(typeof cb === 'function')
|
||||
|
||||
options.readdir(p, (er, files) => {
|
||||
if (er) return cb(er)
|
||||
|
||||
let n = files.length
|
||||
let errState
|
||||
|
||||
if (n === 0) return options.rmdir(p, cb)
|
||||
|
||||
files.forEach(f => {
|
||||
rimraf(path.join(p, f), options, er => {
|
||||
if (errState) {
|
||||
return
|
||||
}
|
||||
if (er) return cb(errState = er)
|
||||
if (--n === 0) {
|
||||
options.rmdir(p, cb)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// this looks simpler, and is strictly *faster*, but will
|
||||
// tie up the JavaScript thread and fail on excessively
|
||||
// deep directory trees.
|
||||
function rimrafSync (p, options) {
|
||||
let st
|
||||
|
||||
options = options || {}
|
||||
defaults(options)
|
||||
|
||||
assert(p, 'rimraf: missing path')
|
||||
assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
|
||||
assert(options, 'rimraf: missing options')
|
||||
assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
|
||||
|
||||
try {
|
||||
st = options.lstatSync(p)
|
||||
} catch (er) {
|
||||
if (er.code === 'ENOENT') {
|
||||
return
|
||||
}
|
||||
|
||||
// Windows can EPERM on stat. Life is suffering.
|
||||
if (er.code === 'EPERM' && isWindows) {
|
||||
fixWinEPERMSync(p, options, er)
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
// sunos lets the root user unlink directories, which is... weird.
|
||||
if (st && st.isDirectory()) {
|
||||
rmdirSync(p, options, null)
|
||||
} else {
|
||||
options.unlinkSync(p)
|
||||
}
|
||||
} catch (er) {
|
||||
if (er.code === 'ENOENT') {
|
||||
return
|
||||
} else if (er.code === 'EPERM') {
|
||||
return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
|
||||
} else if (er.code !== 'EISDIR') {
|
||||
throw er
|
||||
}
|
||||
rmdirSync(p, options, er)
|
||||
}
|
||||
}
|
||||
|
||||
function rmdirSync (p, options, originalEr) {
|
||||
assert(p)
|
||||
assert(options)
|
||||
if (originalEr) {
|
||||
assert(originalEr instanceof Error)
|
||||
}
|
||||
|
||||
try {
|
||||
options.rmdirSync(p)
|
||||
} catch (er) {
|
||||
if (er.code === 'ENOTDIR') {
|
||||
throw originalEr
|
||||
} else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') {
|
||||
rmkidsSync(p, options)
|
||||
} else if (er.code !== 'ENOENT') {
|
||||
throw er
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function rmkidsSync (p, options) {
|
||||
assert(p)
|
||||
assert(options)
|
||||
options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options))
|
||||
|
||||
if (isWindows) {
|
||||
// We only end up here once we got ENOTEMPTY at least once, and
|
||||
// at this point, we are guaranteed to have removed all the kids.
|
||||
// So, we know that it won't be ENOENT or ENOTDIR or anything else.
|
||||
// try really hard to delete stuff on windows, because it has a
|
||||
// PROFOUNDLY annoying habit of not closing handles promptly when
|
||||
// files are deleted, resulting in spurious ENOTEMPTY errors.
|
||||
const startTime = Date.now()
|
||||
do {
|
||||
try {
|
||||
const ret = options.rmdirSync(p, options)
|
||||
return ret
|
||||
} catch (er) { }
|
||||
} while (Date.now() - startTime < 500) // give up after 500ms
|
||||
} else {
|
||||
const ret = options.rmdirSync(p, options)
|
||||
return ret
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = rimraf
|
||||
rimraf.sync = rimrafSync
|
||||
@@ -0,0 +1,26 @@
|
||||
'use strict';
|
||||
|
||||
var supportsDescriptors = require('define-properties').supportsDescriptors;
|
||||
var getPolyfill = require('./polyfill');
|
||||
var gOPD = Object.getOwnPropertyDescriptor;
|
||||
var defineProperty = Object.defineProperty;
|
||||
var TypeErr = TypeError;
|
||||
var getProto = Object.getPrototypeOf;
|
||||
var regex = /a/;
|
||||
|
||||
module.exports = function shimFlags() {
|
||||
if (!supportsDescriptors || !getProto) {
|
||||
throw new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');
|
||||
}
|
||||
var polyfill = getPolyfill();
|
||||
var proto = getProto(regex);
|
||||
var descriptor = gOPD(proto, 'flags');
|
||||
if (!descriptor || descriptor.get !== polyfill) {
|
||||
defineProperty(proto, 'flags', {
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
get: polyfill
|
||||
});
|
||||
}
|
||||
return polyfill;
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"from.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/from.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI3E,wBAAgB,IAAI,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/F,8IAA8I;AAC9I,wBAAgB,IAAI,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,aAAa,GAAG,SAAS,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
||||
@@ -0,0 +1,17 @@
|
||||
var baseGetAllKeys = require('./_baseGetAllKeys'),
|
||||
getSymbolsIn = require('./_getSymbolsIn'),
|
||||
keysIn = require('./keysIn');
|
||||
|
||||
/**
|
||||
* Creates an array of own and inherited enumerable property names and
|
||||
* symbols of `object`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of property names and symbols.
|
||||
*/
|
||||
function getAllKeysIn(object) {
|
||||
return baseGetAllKeys(object, keysIn, getSymbolsIn);
|
||||
}
|
||||
|
||||
module.exports = getAllKeysIn;
|
||||
@@ -0,0 +1,3 @@
|
||||
const e = require('./index.js')
|
||||
|
||||
console.log(e.INDEX_SIZE_ERR)
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"eqeqeq": [2, "allow-null"],
|
||||
"func-name-matching": 0,
|
||||
"indent": [2, 4],
|
||||
"max-nested-callbacks": [2, 3],
|
||||
"max-params": [2, 3],
|
||||
"max-statements": [2, 14],
|
||||
"no-invalid-this": [1],
|
||||
"no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"],
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
declare function coerceToInteger(value: any): number | null;
|
||||
export default coerceToInteger;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ToRawPrecision.d.ts","sourceRoot":"","sources":["../../../../../../../packages/ecma402-abstract/NumberFormat/ToRawPrecision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,qBAAqB,EAAC,MAAM,iBAAiB,CAAA;AAGrD,wBAAgB,cAAc,CAC5B,CAAC,EAAE,MAAM,EACT,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GACnB,qBAAqB,CA8EvB"}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"shareReplay.js","sourceRoot":"","sources":["../../../../src/internal/operators/shareReplay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAwJhC,MAAM,UAAU,WAAW,CACzB,kBAA+C,EAC/C,UAAmB,EACnB,SAAyB;IAEzB,IAAI,UAAkB,CAAC;IACvB,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,kBAAkB,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE;QAChE,CAAC,EAAE,UAAU,GAAG,QAAQ,EAAE,UAAU,GAAG,QAAQ,EAAE,QAAQ,GAAG,KAAK,EAAE,SAAS,EAAE,GAAG,kBAAkB,CAAC,CAAC;KACtG;SAAM;QACL,UAAU,GAAG,CAAC,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,QAAQ,CAAW,CAAC;KACzD;IACD,OAAO,KAAK,CAAI;QACd,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC;QACrE,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,mBAAmB,EAAE,QAAQ;KAC9B,CAAC,CAAC;AACL,CAAC"}
|
||||
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./async').allLimit;
|
||||
@@ -0,0 +1,106 @@
|
||||
import { errorMonitor } from 'events';
|
||||
import { types } from 'util';
|
||||
import deferToConnect from 'defer-to-connect';
|
||||
const timer = (request) => {
|
||||
if (request.timings) {
|
||||
return request.timings;
|
||||
}
|
||||
const timings = {
|
||||
start: Date.now(),
|
||||
socket: undefined,
|
||||
lookup: undefined,
|
||||
connect: undefined,
|
||||
secureConnect: undefined,
|
||||
upload: undefined,
|
||||
response: undefined,
|
||||
end: undefined,
|
||||
error: undefined,
|
||||
abort: undefined,
|
||||
phases: {
|
||||
wait: undefined,
|
||||
dns: undefined,
|
||||
tcp: undefined,
|
||||
tls: undefined,
|
||||
request: undefined,
|
||||
firstByte: undefined,
|
||||
download: undefined,
|
||||
total: undefined,
|
||||
},
|
||||
};
|
||||
request.timings = timings;
|
||||
const handleError = (origin) => {
|
||||
origin.once(errorMonitor, () => {
|
||||
timings.error = Date.now();
|
||||
timings.phases.total = timings.error - timings.start;
|
||||
});
|
||||
};
|
||||
handleError(request);
|
||||
const onAbort = () => {
|
||||
timings.abort = Date.now();
|
||||
timings.phases.total = timings.abort - timings.start;
|
||||
};
|
||||
request.prependOnceListener('abort', onAbort);
|
||||
const onSocket = (socket) => {
|
||||
timings.socket = Date.now();
|
||||
timings.phases.wait = timings.socket - timings.start;
|
||||
if (types.isProxy(socket)) {
|
||||
return;
|
||||
}
|
||||
const lookupListener = () => {
|
||||
timings.lookup = Date.now();
|
||||
timings.phases.dns = timings.lookup - timings.socket;
|
||||
};
|
||||
socket.prependOnceListener('lookup', lookupListener);
|
||||
deferToConnect(socket, {
|
||||
connect: () => {
|
||||
timings.connect = Date.now();
|
||||
if (timings.lookup === undefined) {
|
||||
socket.removeListener('lookup', lookupListener);
|
||||
timings.lookup = timings.connect;
|
||||
timings.phases.dns = timings.lookup - timings.socket;
|
||||
}
|
||||
timings.phases.tcp = timings.connect - timings.lookup;
|
||||
},
|
||||
secureConnect: () => {
|
||||
timings.secureConnect = Date.now();
|
||||
timings.phases.tls = timings.secureConnect - timings.connect;
|
||||
},
|
||||
});
|
||||
};
|
||||
if (request.socket) {
|
||||
onSocket(request.socket);
|
||||
}
|
||||
else {
|
||||
request.prependOnceListener('socket', onSocket);
|
||||
}
|
||||
const onUpload = () => {
|
||||
timings.upload = Date.now();
|
||||
timings.phases.request = timings.upload - (timings.secureConnect ?? timings.connect);
|
||||
};
|
||||
if (request.writableFinished) {
|
||||
onUpload();
|
||||
}
|
||||
else {
|
||||
request.prependOnceListener('finish', onUpload);
|
||||
}
|
||||
request.prependOnceListener('response', (response) => {
|
||||
timings.response = Date.now();
|
||||
timings.phases.firstByte = timings.response - timings.upload;
|
||||
response.timings = timings;
|
||||
handleError(response);
|
||||
response.prependOnceListener('end', () => {
|
||||
request.off('abort', onAbort);
|
||||
response.off('aborted', onAbort);
|
||||
if (timings.phases.total) {
|
||||
// Aborted or errored
|
||||
return;
|
||||
}
|
||||
timings.end = Date.now();
|
||||
timings.phases.download = timings.end - timings.response;
|
||||
timings.phases.total = timings.end - timings.start;
|
||||
});
|
||||
response.prependOnceListener('aborted', onAbort);
|
||||
});
|
||||
return timings;
|
||||
};
|
||||
export default timer;
|
||||
@@ -0,0 +1,22 @@
|
||||
/// <reference types="bluebird" />
|
||||
/// <reference types="node" />
|
||||
import { Processor, ProcessLineResult } from "./Processor";
|
||||
import P from "bluebird";
|
||||
export declare class ProcessorLocal extends Processor {
|
||||
flush(): P<ProcessLineResult[]>;
|
||||
destroy(): P<void>;
|
||||
private rowSplit;
|
||||
private eolEmitted;
|
||||
private _needEmitEol?;
|
||||
private readonly needEmitEol;
|
||||
private headEmitted;
|
||||
private _needEmitHead?;
|
||||
private readonly needEmitHead;
|
||||
process(chunk: Buffer, finalChunk?: boolean): P<ProcessLineResult[]>;
|
||||
private processCSV(csv, finalChunk);
|
||||
private processDataWithHead(lines);
|
||||
private filterHeader();
|
||||
private processCSVBody(lines);
|
||||
private prependLeftBuf(buf);
|
||||
private runPreLineHook(lines);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"skip.js","sourceRoot":"","sources":["../../../../src/internal/operators/skip.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAmClC,MAAM,UAAU,IAAI,CAAI,KAAa;IACnC,OAAO,MAAM,CAAC,UAAC,CAAC,EAAE,KAAK,IAAK,OAAA,KAAK,IAAI,KAAK,EAAd,CAAc,CAAC,CAAC;AAC9C,CAAC"}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
module.exports = require('./omit');
|
||||
@@ -0,0 +1,5 @@
|
||||
export type RunnerCard = {
|
||||
id: number;
|
||||
runner?: any;
|
||||
enabled: boolean;
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
import {Except} from './except';
|
||||
|
||||
/**
|
||||
Create a type that requires at least one of the given keys. The remaining keys are kept as is.
|
||||
|
||||
@example
|
||||
```
|
||||
import {RequireAtLeastOne} from 'type-fest';
|
||||
|
||||
type Responder = {
|
||||
text?: () => string;
|
||||
json?: () => string;
|
||||
|
||||
secure?: boolean;
|
||||
};
|
||||
|
||||
const responder: RequireAtLeastOne<Responder, 'text' | 'json'> = {
|
||||
json: () => '{"message": "ok"}',
|
||||
secure: true
|
||||
};
|
||||
```
|
||||
|
||||
@category Utilities
|
||||
*/
|
||||
export type RequireAtLeastOne<
|
||||
ObjectType,
|
||||
KeysType extends keyof ObjectType = keyof ObjectType
|
||||
> = {
|
||||
// For each `Key` in `KeysType` make a mapped type:
|
||||
[Key in KeysType]-?: Required<Pick<ObjectType, Key>> & // 1. Make `Key`'s type required
|
||||
// 2. Make all other keys in `KeysType` optional
|
||||
Partial<Pick<ObjectType, Exclude<KeysType, Key>>>;
|
||||
}[KeysType] &
|
||||
// 3. Add the remaining keys not in `KeysType`
|
||||
Except<ObjectType, KeysType>;
|
||||
@@ -0,0 +1,4 @@
|
||||
require('fs').readdirSync(__dirname).forEach(function(f) {
|
||||
if (f.substr(0, 5) === 'test-')
|
||||
require('./' + f);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"argsArgArrayOrObject.js","sourceRoot":"","sources":["../../../../src/internal/util/argsArgArrayOrObject.ts"],"names":[],"mappings":"AAAA,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAC1B,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;AAQzE,MAAM,UAAU,oBAAoB,CAAiC,IAAuB;IAC1F,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE;YAClB,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SACpC;QACD,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE;YACjB,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;YAC5B,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACnC,IAAI;aACL,CAAC;SACH;KACF;IAED,OAAO,EAAE,IAAI,EAAE,IAAW,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC3C,CAAC;AAED,SAAS,MAAM,CAAC,GAAQ;IACtB,OAAO,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,cAAc,CAAC,GAAG,CAAC,KAAK,WAAW,CAAC;AAC/E,CAAC"}
|
||||
@@ -0,0 +1,2 @@
|
||||
declare function isConstructor(value: any): boolean;
|
||||
export default isConstructor;
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"strip-ansi","version":"6.0.1","files":{"license":{"checkedAt":1678883669272,"integrity":"sha512-nIst73auX/5NY2Fmv5Y116vWnNrEv4GaIUX3lpZG05rpXJY2S8EX+fpUS5hRjClCM0VdT2Za9DDHXXB5jdSrEw==","mode":420,"size":1109},"package.json":{"checkedAt":1678883669272,"integrity":"sha512-ckoeSYZxSUwiupKQYAWLVTms00uDnSY8kFigczPNpUPVx3Q1oKbxP3atsvMruT+iaD+AiSRdvEyIFb3hcWjrtw==","mode":420,"size":798},"readme.md":{"checkedAt":1678883669272,"integrity":"sha512-fOo3y0lg+mnFBEKQb4reHqQDNhcFRyqNIjsG6gXf2MT0zivVqcbcHGj+PMTWzKnnNeEwp2hUBMDocUiFRglSfA==","mode":420,"size":1599},"index.js":{"checkedAt":1678883669272,"integrity":"sha512-BoXtEIwgyEs8DUvxgTGL8/OtZgLeG1u3Hcao03dXXpdMQrzBT11yokTwYES86PgQBcV+wtJGpRO28ZZwClAQwg==","mode":420,"size":154},"index.d.ts":{"checkedAt":1678883669272,"integrity":"sha512-hDHCpXYbeoCHQexoRmx5sNk6gl6ncJfehBzlvQ87ZJSev3hh2MaEZTBEIr75/1GSROyNjzcc+VBZYdAaeu8P2w==","mode":420,"size":369}}}
|
||||
@@ -0,0 +1,189 @@
|
||||
var COLORS = {
|
||||
aliceblue: '#f0f8ff',
|
||||
antiquewhite: '#faebd7',
|
||||
aqua: '#0ff',
|
||||
aquamarine: '#7fffd4',
|
||||
azure: '#f0ffff',
|
||||
beige: '#f5f5dc',
|
||||
bisque: '#ffe4c4',
|
||||
black: '#000',
|
||||
blanchedalmond: '#ffebcd',
|
||||
blue: '#00f',
|
||||
blueviolet: '#8a2be2',
|
||||
brown: '#a52a2a',
|
||||
burlywood: '#deb887',
|
||||
cadetblue: '#5f9ea0',
|
||||
chartreuse: '#7fff00',
|
||||
chocolate: '#d2691e',
|
||||
coral: '#ff7f50',
|
||||
cornflowerblue: '#6495ed',
|
||||
cornsilk: '#fff8dc',
|
||||
crimson: '#dc143c',
|
||||
cyan: '#0ff',
|
||||
darkblue: '#00008b',
|
||||
darkcyan: '#008b8b',
|
||||
darkgoldenrod: '#b8860b',
|
||||
darkgray: '#a9a9a9',
|
||||
darkgreen: '#006400',
|
||||
darkgrey: '#a9a9a9',
|
||||
darkkhaki: '#bdb76b',
|
||||
darkmagenta: '#8b008b',
|
||||
darkolivegreen: '#556b2f',
|
||||
darkorange: '#ff8c00',
|
||||
darkorchid: '#9932cc',
|
||||
darkred: '#8b0000',
|
||||
darksalmon: '#e9967a',
|
||||
darkseagreen: '#8fbc8f',
|
||||
darkslateblue: '#483d8b',
|
||||
darkslategray: '#2f4f4f',
|
||||
darkslategrey: '#2f4f4f',
|
||||
darkturquoise: '#00ced1',
|
||||
darkviolet: '#9400d3',
|
||||
deeppink: '#ff1493',
|
||||
deepskyblue: '#00bfff',
|
||||
dimgray: '#696969',
|
||||
dimgrey: '#696969',
|
||||
dodgerblue: '#1e90ff',
|
||||
firebrick: '#b22222',
|
||||
floralwhite: '#fffaf0',
|
||||
forestgreen: '#228b22',
|
||||
fuchsia: '#f0f',
|
||||
gainsboro: '#dcdcdc',
|
||||
ghostwhite: '#f8f8ff',
|
||||
gold: '#ffd700',
|
||||
goldenrod: '#daa520',
|
||||
gray: '#808080',
|
||||
green: '#008000',
|
||||
greenyellow: '#adff2f',
|
||||
grey: '#808080',
|
||||
honeydew: '#f0fff0',
|
||||
hotpink: '#ff69b4',
|
||||
indianred: '#cd5c5c',
|
||||
indigo: '#4b0082',
|
||||
ivory: '#fffff0',
|
||||
khaki: '#f0e68c',
|
||||
lavender: '#e6e6fa',
|
||||
lavenderblush: '#fff0f5',
|
||||
lawngreen: '#7cfc00',
|
||||
lemonchiffon: '#fffacd',
|
||||
lightblue: '#add8e6',
|
||||
lightcoral: '#f08080',
|
||||
lightcyan: '#e0ffff',
|
||||
lightgoldenrodyellow: '#fafad2',
|
||||
lightgray: '#d3d3d3',
|
||||
lightgreen: '#90ee90',
|
||||
lightgrey: '#d3d3d3',
|
||||
lightpink: '#ffb6c1',
|
||||
lightsalmon: '#ffa07a',
|
||||
lightseagreen: '#20b2aa',
|
||||
lightskyblue: '#87cefa',
|
||||
lightslategray: '#778899',
|
||||
lightslategrey: '#778899',
|
||||
lightsteelblue: '#b0c4de',
|
||||
lightyellow: '#ffffe0',
|
||||
lime: '#0f0',
|
||||
limegreen: '#32cd32',
|
||||
linen: '#faf0e6',
|
||||
magenta: '#ff00ff',
|
||||
maroon: '#800000',
|
||||
mediumaquamarine: '#66cdaa',
|
||||
mediumblue: '#0000cd',
|
||||
mediumorchid: '#ba55d3',
|
||||
mediumpurple: '#9370db',
|
||||
mediumseagreen: '#3cb371',
|
||||
mediumslateblue: '#7b68ee',
|
||||
mediumspringgreen: '#00fa9a',
|
||||
mediumturquoise: '#48d1cc',
|
||||
mediumvioletred: '#c71585',
|
||||
midnightblue: '#191970',
|
||||
mintcream: '#f5fffa',
|
||||
mistyrose: '#ffe4e1',
|
||||
moccasin: '#ffe4b5',
|
||||
navajowhite: '#ffdead',
|
||||
navy: '#000080',
|
||||
oldlace: '#fdf5e6',
|
||||
olive: '#808000',
|
||||
olivedrab: '#6b8e23',
|
||||
orange: '#ffa500',
|
||||
orangered: '#ff4500',
|
||||
orchid: '#da70d6',
|
||||
palegoldenrod: '#eee8aa',
|
||||
palegreen: '#98fb98',
|
||||
paleturquoise: '#afeeee',
|
||||
palevioletred: '#db7093',
|
||||
papayawhip: '#ffefd5',
|
||||
peachpuff: '#ffdab9',
|
||||
peru: '#cd853f',
|
||||
pink: '#ffc0cb',
|
||||
plum: '#dda0dd',
|
||||
powderblue: '#b0e0e6',
|
||||
purple: '#800080',
|
||||
rebeccapurple: '#663399',
|
||||
red: '#f00',
|
||||
rosybrown: '#bc8f8f',
|
||||
royalblue: '#4169e1',
|
||||
saddlebrown: '#8b4513',
|
||||
salmon: '#fa8072',
|
||||
sandybrown: '#f4a460',
|
||||
seagreen: '#2e8b57',
|
||||
seashell: '#fff5ee',
|
||||
sienna: '#a0522d',
|
||||
silver: '#c0c0c0',
|
||||
skyblue: '#87ceeb',
|
||||
slateblue: '#6a5acd',
|
||||
slategray: '#708090',
|
||||
slategrey: '#708090',
|
||||
snow: '#fffafa',
|
||||
springgreen: '#00ff7f',
|
||||
steelblue: '#4682b4',
|
||||
tan: '#d2b48c',
|
||||
teal: '#008080',
|
||||
thistle: '#d8bfd8',
|
||||
tomato: '#ff6347',
|
||||
turquoise: '#40e0d0',
|
||||
violet: '#ee82ee',
|
||||
wheat: '#f5deb3',
|
||||
white: '#fff',
|
||||
whitesmoke: '#f5f5f5',
|
||||
yellow: '#ff0',
|
||||
yellowgreen: '#9acd32'
|
||||
};
|
||||
|
||||
var toHex = {};
|
||||
var toName = {};
|
||||
|
||||
for (var name in COLORS) {
|
||||
var hex = COLORS[name];
|
||||
|
||||
if (name.length < hex.length) {
|
||||
toName[hex] = name;
|
||||
} else {
|
||||
toHex[name] = hex;
|
||||
}
|
||||
}
|
||||
|
||||
var toHexPattern = new RegExp('(^| |,|\\))(' + Object.keys(toHex).join('|') + ')( |,|\\)|$)', 'ig');
|
||||
var toNamePattern = new RegExp('(' + Object.keys(toName).join('|') + ')([^a-f0-9]|$)', 'ig');
|
||||
|
||||
function hexConverter(match, prefix, colorValue, suffix) {
|
||||
return prefix + toHex[colorValue.toLowerCase()] + suffix;
|
||||
}
|
||||
|
||||
function nameConverter(match, colorValue, suffix) {
|
||||
return toName[colorValue.toLowerCase()] + suffix;
|
||||
}
|
||||
|
||||
function shortenHex(value) {
|
||||
var hasHex = value.indexOf('#') > -1;
|
||||
var shortened = value.replace(toHexPattern, hexConverter);
|
||||
|
||||
if (shortened != value) {
|
||||
shortened = shortened.replace(toHexPattern, hexConverter);
|
||||
}
|
||||
|
||||
return hasHex ?
|
||||
shortened.replace(toNamePattern, nameConverter) :
|
||||
shortened;
|
||||
}
|
||||
|
||||
module.exports = shortenHex;
|
||||
@@ -0,0 +1,110 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Code coverage report for csv2json/dist</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/dist
|
||||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>0/13762</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>0/11883</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>0/2950</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">0% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>0/8549</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="csvtojson.js"><a href="csvtojson.js.html">csvtojson.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="8755" class="abs low">0/8755</td>
|
||||
<td data-value="0" class="pct low">0%</td>
|
||||
<td data-value="6057" class="abs low">0/6057</td>
|
||||
<td data-value="0" class="pct low">0%</td>
|
||||
<td data-value="1477" class="abs low">0/1477</td>
|
||||
<td data-value="0" class="pct low">0%</td>
|
||||
<td data-value="8543" class="abs low">0/8543</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file low" data-value="csvtojson.min.js"><a href="csvtojson.min.js.html">csvtojson.min.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="5007" class="abs low">0/5007</td>
|
||||
<td data-value="0" class="pct low">0%</td>
|
||||
<td data-value="5826" class="abs low">0/5826</td>
|
||||
<td data-value="0" class="pct low">0%</td>
|
||||
<td data-value="1473" class="abs low">0/1473</td>
|
||||
<td data-value="0" class="pct low">0%</td>
|
||||
<td data-value="6" class="abs low">0/6</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,117 @@
|
||||
export declare function start_hydrating(): void;
|
||||
export declare function end_hydrating(): void;
|
||||
declare type NodeEx = Node & {
|
||||
claim_order?: number;
|
||||
hydrate_init?: true;
|
||||
actual_end_child?: NodeEx;
|
||||
childNodes: NodeListOf<NodeEx>;
|
||||
};
|
||||
export declare function append(target: Node, node: Node): void;
|
||||
export declare function append_styles(target: Node, style_sheet_id: string, styles: string): void;
|
||||
export declare function get_root_for_style(node: Node): ShadowRoot | Document;
|
||||
export declare function append_empty_stylesheet(node: Node): CSSStyleSheet;
|
||||
export declare function append_hydration(target: NodeEx, node: NodeEx): void;
|
||||
export declare function insert(target: Node, node: Node, anchor?: Node): void;
|
||||
export declare function insert_hydration(target: NodeEx, node: NodeEx, anchor?: NodeEx): void;
|
||||
export declare function detach(node: Node): void;
|
||||
export declare function destroy_each(iterations: any, detaching: any): void;
|
||||
export declare function element<K extends keyof HTMLElementTagNameMap>(name: K): HTMLElementTagNameMap[K];
|
||||
export declare function element_is<K extends keyof HTMLElementTagNameMap>(name: K, is: string): HTMLElementTagNameMap[K];
|
||||
export declare function object_without_properties<T, K extends keyof T>(obj: T, exclude: K[]): Pick<T, Exclude<keyof T, K>>;
|
||||
export declare function svg_element<K extends keyof SVGElementTagNameMap>(name: K): SVGElement;
|
||||
export declare function text(data: string): Text;
|
||||
export declare function space(): Text;
|
||||
export declare function empty(): Text;
|
||||
export declare function listen(node: EventTarget, event: string, handler: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | EventListenerOptions): () => void;
|
||||
export declare function prevent_default(fn: any): (event: any) => any;
|
||||
export declare function stop_propagation(fn: any): (event: any) => any;
|
||||
export declare function stop_immediate_propagation(fn: any): (event: any) => any;
|
||||
export declare function self(fn: any): (event: any) => void;
|
||||
export declare function trusted(fn: any): (event: any) => void;
|
||||
export declare function attr(node: Element, attribute: string, value?: string): void;
|
||||
export declare function set_attributes(node: Element & ElementCSSInlineStyle, attributes: {
|
||||
[x: string]: string;
|
||||
}): void;
|
||||
export declare function set_svg_attributes(node: Element & ElementCSSInlineStyle, attributes: {
|
||||
[x: string]: string;
|
||||
}): void;
|
||||
export declare function set_custom_element_data_map(node: any, data_map: Record<string, unknown>): void;
|
||||
export declare function set_custom_element_data(node: any, prop: any, value: any): void;
|
||||
export declare function set_dynamic_element_data(tag: string): typeof set_custom_element_data_map;
|
||||
export declare function xlink_attr(node: any, attribute: any, value: any): void;
|
||||
export declare function get_binding_group_value(group: any, __value: any, checked: any): unknown[];
|
||||
export declare function init_binding_group(group: any): {
|
||||
p(...inputs: HTMLInputElement[]): void;
|
||||
r(): void;
|
||||
};
|
||||
export declare function init_binding_group_dynamic(group: any, indexes: number[]): {
|
||||
u(new_indexes: number[]): void;
|
||||
p(...inputs: HTMLInputElement[]): void;
|
||||
r: () => void;
|
||||
};
|
||||
export declare function to_number(value: any): number;
|
||||
export declare function time_ranges_to_array(ranges: any): any[];
|
||||
declare type ChildNodeEx = ChildNode & NodeEx;
|
||||
declare type ChildNodeArray = ChildNodeEx[] & {
|
||||
claim_info?: {
|
||||
/**
|
||||
* The index of the last claimed element
|
||||
*/
|
||||
last_index: number;
|
||||
/**
|
||||
* The total number of elements claimed
|
||||
*/
|
||||
total_claimed: number;
|
||||
};
|
||||
};
|
||||
export declare function children(element: Element): ChildNode[];
|
||||
export declare function claim_element(nodes: ChildNodeArray, name: string, attributes: {
|
||||
[key: string]: boolean;
|
||||
}): Element | SVGElement;
|
||||
export declare function claim_svg_element(nodes: ChildNodeArray, name: string, attributes: {
|
||||
[key: string]: boolean;
|
||||
}): Element | SVGElement;
|
||||
export declare function claim_text(nodes: ChildNodeArray, data: any): Text;
|
||||
export declare function claim_space(nodes: any): Text;
|
||||
export declare function claim_html_tag(nodes: any, is_svg: boolean): HtmlTagHydration;
|
||||
export declare function set_data(text: any, data: any): void;
|
||||
export declare function set_input_value(input: any, value: any): void;
|
||||
export declare function set_input_type(input: any, type: any): void;
|
||||
export declare function set_style(node: any, key: any, value: any, important: any): void;
|
||||
export declare function select_option(select: any, value: any): void;
|
||||
export declare function select_options(select: any, value: any): void;
|
||||
export declare function select_value(select: any): any;
|
||||
export declare function select_multiple_value(select: any): any;
|
||||
export declare function is_crossorigin(): boolean;
|
||||
export declare function add_resize_listener(node: HTMLElement, fn: () => void): () => void;
|
||||
export declare function toggle_class(element: any, name: any, toggle: any): void;
|
||||
export declare function custom_event<T = any>(type: string, detail?: T, { bubbles, cancelable }?: {
|
||||
bubbles?: boolean;
|
||||
cancelable?: boolean;
|
||||
}): CustomEvent<T>;
|
||||
export declare function query_selector_all(selector: string, parent?: HTMLElement): ChildNodeArray;
|
||||
export declare function head_selector(nodeId: string, head: HTMLElement): any[];
|
||||
export declare class HtmlTag {
|
||||
private is_svg;
|
||||
e: HTMLElement | SVGElement;
|
||||
n: ChildNode[];
|
||||
t: HTMLElement | SVGElement | DocumentFragment;
|
||||
a: HTMLElement | SVGElement;
|
||||
constructor(is_svg?: boolean);
|
||||
c(html: string): void;
|
||||
m(html: string, target: HTMLElement | SVGElement, anchor?: HTMLElement | SVGElement): void;
|
||||
h(html: string): void;
|
||||
i(anchor: any): void;
|
||||
p(html: string): void;
|
||||
d(): void;
|
||||
}
|
||||
export declare class HtmlTagHydration extends HtmlTag {
|
||||
l: ChildNode[] | void;
|
||||
constructor(claimed_nodes?: ChildNode[], is_svg?: boolean);
|
||||
c(html: string): void;
|
||||
i(anchor: any): void;
|
||||
}
|
||||
export declare function attribute_to_object(attributes: NamedNodeMap): {};
|
||||
export declare function get_custom_elements_slots(element: HTMLElement): {};
|
||||
export declare function construct_svelte_component(component: any, props: any): any;
|
||||
export {};
|
||||
@@ -0,0 +1,10 @@
|
||||
export type ResponseGroupContact = {
|
||||
id: number;
|
||||
firstname: string;
|
||||
middlename: string;
|
||||
lastname: string;
|
||||
phone: string;
|
||||
email: string;
|
||||
groups: any;
|
||||
address: any;
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('isWeakSet', require('../isWeakSet'), require('./_falseOptions'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,166 @@
|
||||
const { defaults } = require('./defaults.js');
|
||||
const {
|
||||
cleanUrl,
|
||||
escape
|
||||
} = require('./helpers.js');
|
||||
|
||||
/**
|
||||
* Renderer
|
||||
*/
|
||||
module.exports = class Renderer {
|
||||
constructor(options) {
|
||||
this.options = options || defaults;
|
||||
}
|
||||
|
||||
code(code, infostring, escaped) {
|
||||
const lang = (infostring || '').match(/\S*/)[0];
|
||||
if (this.options.highlight) {
|
||||
const out = this.options.highlight(code, lang);
|
||||
if (out != null && out !== code) {
|
||||
escaped = true;
|
||||
code = out;
|
||||
}
|
||||
}
|
||||
|
||||
code = code.replace(/\n$/, '') + '\n';
|
||||
|
||||
if (!lang) {
|
||||
return '<pre><code>'
|
||||
+ (escaped ? code : escape(code, true))
|
||||
+ '</code></pre>\n';
|
||||
}
|
||||
|
||||
return '<pre><code class="'
|
||||
+ this.options.langPrefix
|
||||
+ escape(lang, true)
|
||||
+ '">'
|
||||
+ (escaped ? code : escape(code, true))
|
||||
+ '</code></pre>\n';
|
||||
}
|
||||
|
||||
blockquote(quote) {
|
||||
return '<blockquote>\n' + quote + '</blockquote>\n';
|
||||
}
|
||||
|
||||
html(html) {
|
||||
return html;
|
||||
}
|
||||
|
||||
heading(text, level, raw, slugger) {
|
||||
if (this.options.headerIds) {
|
||||
return '<h'
|
||||
+ level
|
||||
+ ' id="'
|
||||
+ this.options.headerPrefix
|
||||
+ slugger.slug(raw)
|
||||
+ '">'
|
||||
+ text
|
||||
+ '</h'
|
||||
+ level
|
||||
+ '>\n';
|
||||
}
|
||||
// ignore IDs
|
||||
return '<h' + level + '>' + text + '</h' + level + '>\n';
|
||||
}
|
||||
|
||||
hr() {
|
||||
return this.options.xhtml ? '<hr/>\n' : '<hr>\n';
|
||||
}
|
||||
|
||||
list(body, ordered, start) {
|
||||
const type = ordered ? 'ol' : 'ul',
|
||||
startatt = (ordered && start !== 1) ? (' start="' + start + '"') : '';
|
||||
return '<' + type + startatt + '>\n' + body + '</' + type + '>\n';
|
||||
}
|
||||
|
||||
listitem(text) {
|
||||
return '<li>' + text + '</li>\n';
|
||||
}
|
||||
|
||||
checkbox(checked) {
|
||||
return '<input '
|
||||
+ (checked ? 'checked="" ' : '')
|
||||
+ 'disabled="" type="checkbox"'
|
||||
+ (this.options.xhtml ? ' /' : '')
|
||||
+ '> ';
|
||||
}
|
||||
|
||||
paragraph(text) {
|
||||
return '<p>' + text + '</p>\n';
|
||||
}
|
||||
|
||||
table(header, body) {
|
||||
if (body) body = '<tbody>' + body + '</tbody>';
|
||||
|
||||
return '<table>\n'
|
||||
+ '<thead>\n'
|
||||
+ header
|
||||
+ '</thead>\n'
|
||||
+ body
|
||||
+ '</table>\n';
|
||||
}
|
||||
|
||||
tablerow(content) {
|
||||
return '<tr>\n' + content + '</tr>\n';
|
||||
}
|
||||
|
||||
tablecell(content, flags) {
|
||||
const type = flags.header ? 'th' : 'td';
|
||||
const tag = flags.align
|
||||
? '<' + type + ' align="' + flags.align + '">'
|
||||
: '<' + type + '>';
|
||||
return tag + content + '</' + type + '>\n';
|
||||
}
|
||||
|
||||
// span level renderer
|
||||
strong(text) {
|
||||
return '<strong>' + text + '</strong>';
|
||||
}
|
||||
|
||||
em(text) {
|
||||
return '<em>' + text + '</em>';
|
||||
}
|
||||
|
||||
codespan(text) {
|
||||
return '<code>' + text + '</code>';
|
||||
}
|
||||
|
||||
br() {
|
||||
return this.options.xhtml ? '<br/>' : '<br>';
|
||||
}
|
||||
|
||||
del(text) {
|
||||
return '<del>' + text + '</del>';
|
||||
}
|
||||
|
||||
link(href, title, text) {
|
||||
href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);
|
||||
if (href === null) {
|
||||
return text;
|
||||
}
|
||||
let out = '<a href="' + escape(href) + '"';
|
||||
if (title) {
|
||||
out += ' title="' + title + '"';
|
||||
}
|
||||
out += '>' + text + '</a>';
|
||||
return out;
|
||||
}
|
||||
|
||||
image(href, title, text) {
|
||||
href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);
|
||||
if (href === null) {
|
||||
return text;
|
||||
}
|
||||
|
||||
let out = '<img src="' + href + '" alt="' + text + '"';
|
||||
if (title) {
|
||||
out += ' title="' + title + '"';
|
||||
}
|
||||
out += this.options.xhtml ? '/>' : '>';
|
||||
return out;
|
||||
}
|
||||
|
||||
text(text) {
|
||||
return text;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('padEnd', require('../padEnd'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,115 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ScanService = void 0;
|
||||
const request_1 = require("../core/request");
|
||||
class ScanService {
|
||||
/**
|
||||
* Get all
|
||||
* Lists all scans (normal or track) from all runners. <br> This includes the scan's runner's distance ran.
|
||||
* @result any
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async scanControllerGetAll() {
|
||||
const result = await (0, request_1.request)({
|
||||
method: 'GET',
|
||||
path: `/api/scans`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Post
|
||||
* Create a new scan (not track scan - use /scans/trackscans instead). <br> Please rmemember to provide the scan's runner's id and distance.
|
||||
* @param requestBody CreateScan
|
||||
* @result ResponseScan
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async scanControllerPost(requestBody) {
|
||||
const result = await (0, request_1.request)({
|
||||
method: 'POST',
|
||||
path: `/api/scans`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Get one
|
||||
* Lists all information about the scan whose id got provided. This includes the scan's runner's distance ran.
|
||||
* @param id
|
||||
* @result any
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async scanControllerGetOne(id) {
|
||||
const result = await (0, request_1.request)({
|
||||
method: 'GET',
|
||||
path: `/api/scans/${id}`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Put
|
||||
* Update the scan (not track scan use /scans/trackscans/:id instead) whose id you provided. <br> Please remember that ids can't be changed and distances must be positive.
|
||||
* @param id
|
||||
* @param requestBody UpdateScan
|
||||
* @result ResponseScan
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async scanControllerPut(id, requestBody) {
|
||||
const result = await (0, request_1.request)({
|
||||
method: 'PUT',
|
||||
path: `/api/scans/${id}`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Remove
|
||||
* Delete the scan whose id you provided. <br> If no scan with this id exists it will just return 204(no content).
|
||||
* @param id
|
||||
* @param force
|
||||
* @result ResponseScan
|
||||
* @result ResponseEmpty
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async scanControllerRemove(id, force) {
|
||||
const result = await (0, request_1.request)({
|
||||
method: 'DELETE',
|
||||
path: `/api/scans/${id}`,
|
||||
query: {
|
||||
'force': force,
|
||||
},
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Post track scans
|
||||
* Create a new track scan (for "normal" scans use /scans instead). <br> Please remember that to provide the scan's card's station's id.
|
||||
* @param requestBody CreateTrackScan
|
||||
* @result ResponseTrackScan
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async scanControllerPostTrackScans(requestBody) {
|
||||
const result = await (0, request_1.request)({
|
||||
method: 'POST',
|
||||
path: `/api/scans/trackscans`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Put track scan
|
||||
* Update the track scan (not "normal" scan use /scans/trackscans/:id instead) whose id you provided. <br> Please remember that only the validity, runner and track can be changed.
|
||||
* @param id
|
||||
* @param requestBody UpdateTrackScan
|
||||
* @result ResponseTrackScan
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async scanControllerPutTrackScan(id, requestBody) {
|
||||
const result = await (0, request_1.request)({
|
||||
method: 'PUT',
|
||||
path: `/api/scans/trackscans/${id}`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
}
|
||||
exports.ScanService = ScanService;
|
||||
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const stream_1 = require("stream");
|
||||
const async_1 = require("../readers/async");
|
||||
class StreamProvider {
|
||||
constructor(_root, _settings) {
|
||||
this._root = _root;
|
||||
this._settings = _settings;
|
||||
this._reader = new async_1.default(this._root, this._settings);
|
||||
this._stream = new stream_1.Readable({
|
||||
objectMode: true,
|
||||
read: () => { },
|
||||
destroy: () => {
|
||||
if (!this._reader.isDestroyed) {
|
||||
this._reader.destroy();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
read() {
|
||||
this._reader.onError((error) => {
|
||||
this._stream.emit('error', error);
|
||||
});
|
||||
this._reader.onEntry((entry) => {
|
||||
this._stream.push(entry);
|
||||
});
|
||||
this._reader.onEnd(() => {
|
||||
this._stream.push(null);
|
||||
});
|
||||
this._reader.read();
|
||||
return this._stream;
|
||||
}
|
||||
}
|
||||
exports.default = StreamProvider;
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0.03851,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0.11938,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0.01155,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0.0154,"110":0.01926,"111":0,"112":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0.00385,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0.00385,"41":0,"42":0,"43":0.00385,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0.00385,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0.00385,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0.00385,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0.16559,"78":0,"79":0.00385,"80":0,"81":0.0154,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0.00385,"90":0,"91":0.0077,"92":0,"93":0.00385,"94":0,"95":0.00385,"96":0,"97":0.00385,"98":0,"99":0,"100":0.00385,"101":0,"102":0,"103":0.00385,"104":0.00385,"105":0,"106":0.0077,"107":0.01155,"108":0.01155,"109":7.95232,"110":2.06029,"111":0,"112":0,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0.0077,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0.00385,"95":0.04621,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0,"15":0,"16":0.00385,"17":0,"18":0.08472,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0.00385,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0.00385,"108":0.00385,"109":0.93964,"110":1.08598},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0,"13.1":0,"14.1":0,"15.1":0,"15.2-15.3":0,"15.4":0,"15.5":0,"15.6":0.04236,"16.0":0,"16.1":0,"16.2":0.00385,"16.3":0.00385,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.15522,"6.0-6.1":0,"7.0-7.1":3.17793,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.18402,"10.0-10.2":0.17602,"10.3":0,"11.0-11.2":0.37284,"11.3-11.4":0.0048,"12.0-12.1":0.55526,"12.2-12.5":0.84969,"13.0-13.1":0.31523,"13.2":0,"13.3":0.0176,"13.4-13.7":0.0256,"14.0-14.4":0.19202,"14.5-14.8":0.23202,"15.0-15.1":0.47525,"15.2-15.3":0.11681,"15.4":0.33764,"15.5":1.23213,"15.6":1.01611,"16.0":4.07722,"16.1":0.29603,"16.2":0.19522,"16.3":0.19202,"16.4":0},P:{"4":0.39417,"20":0.04043,"5.0-5.4":0.01011,"6.2-6.4":0.02021,"7.2-7.4":0.78834,"8.2":0,"9.2":0,"10.1":0,"11.1-11.2":0.10107,"12.0":0,"13.0":0,"14.0":0.01011,"15.0":0.11118,"16.0":0.03032,"17.0":0.01011,"18.0":0.03032,"19.0":0.21225},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0.00183,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.10519},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.00385,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0.47347,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.01845},H:{"0":0.75097},L:{"0":68.74355},R:{_:"0"},M:{"0":0.00615},Q:{"13.1":0}};
|
||||
@@ -0,0 +1,15 @@
|
||||
var arraySample = require('./_arraySample'),
|
||||
values = require('./values');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.sample`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array|Object} collection The collection to sample.
|
||||
* @returns {*} Returns the random element.
|
||||
*/
|
||||
function baseSample(collection) {
|
||||
return arraySample(values(collection));
|
||||
}
|
||||
|
||||
module.exports = baseSample;
|
||||
@@ -0,0 +1,69 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Code coverage report for csv2json/index.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</a> index.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/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>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >module.exports=require("./build");</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,60 @@
|
||||
/**
|
||||
Convert a union type to an intersection type using [distributive conditional types](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types).
|
||||
|
||||
Inspired by [this Stack Overflow answer](https://stackoverflow.com/a/50375286/2172153).
|
||||
|
||||
@example
|
||||
```
|
||||
import type {UnionToIntersection} from 'type-fest';
|
||||
|
||||
type Union = {the(): void} | {great(arg: string): void} | {escape: boolean};
|
||||
|
||||
type Intersection = UnionToIntersection<Union>;
|
||||
//=> {the(): void; great(arg: string): void; escape: boolean};
|
||||
```
|
||||
|
||||
A more applicable example which could make its way into your library code follows.
|
||||
|
||||
@example
|
||||
```
|
||||
import type {UnionToIntersection} from 'type-fest';
|
||||
|
||||
class CommandOne {
|
||||
commands: {
|
||||
a1: () => undefined,
|
||||
b1: () => undefined,
|
||||
}
|
||||
}
|
||||
|
||||
class CommandTwo {
|
||||
commands: {
|
||||
a2: (argA: string) => undefined,
|
||||
b2: (argB: string) => undefined,
|
||||
}
|
||||
}
|
||||
|
||||
const union = [new CommandOne(), new CommandTwo()].map(instance => instance.commands);
|
||||
type Union = typeof union;
|
||||
//=> {a1(): void; b1(): void} | {a2(argA: string): void; b2(argB: string): void}
|
||||
|
||||
type Intersection = UnionToIntersection<Union>;
|
||||
//=> {a1(): void; b1(): void; a2(argA: string): void; b2(argB: string): void}
|
||||
```
|
||||
|
||||
@category Type
|
||||
*/
|
||||
export type UnionToIntersection<Union> = (
|
||||
// `extends unknown` is always going to be the case and is used to convert the
|
||||
// `Union` into a [distributive conditional
|
||||
// type](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types).
|
||||
Union extends unknown
|
||||
// The union type is used as the only argument to a function since the union
|
||||
// of function arguments is an intersection.
|
||||
? (distributedUnion: Union) => void
|
||||
// This won't happen.
|
||||
: never
|
||||
// Infer the `Intersection` type since TypeScript represents the positional
|
||||
// arguments of unions of functions as an intersection of the union.
|
||||
) extends ((mergedIntersection: infer Intersection) => void)
|
||||
? Intersection
|
||||
: never;
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,30 @@
|
||||
var apply = require('./_apply'),
|
||||
baseRest = require('./_baseRest'),
|
||||
customDefaultsMerge = require('./_customDefaultsMerge'),
|
||||
mergeWith = require('./mergeWith');
|
||||
|
||||
/**
|
||||
* This method is like `_.defaults` except that it recursively assigns
|
||||
* default properties.
|
||||
*
|
||||
* **Note:** This method mutates `object`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 3.10.0
|
||||
* @category Object
|
||||
* @param {Object} object The destination object.
|
||||
* @param {...Object} [sources] The source objects.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @see _.defaults
|
||||
* @example
|
||||
*
|
||||
* _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
|
||||
* // => { 'a': { 'b': 2, 'c': 3 } }
|
||||
*/
|
||||
var defaultsDeep = baseRest(function(args) {
|
||||
args.push(undefined, customDefaultsMerge);
|
||||
return apply(mergeWith, undefined, args);
|
||||
});
|
||||
|
||||
module.exports = defaultsDeep;
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"J D CC","129":"E F A B"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB EC FC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"1":"I v J D E F A B C K L G IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"HC zB"},F:{"1":"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","2":"F B C PC QC RC SC qB AC TC rB"},G:{"1":"E 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","2":"zB"},H:{"2":"oC"},I:{"1":"tB I f pC qC rC sC BC tC uC"},J:{"1":"D A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"2":"H"},N:{"129":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"2":"AD BD"}},B:7,C:"CSS zoom"};
|
||||
@@ -0,0 +1,103 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var isTypedArray = require('../');
|
||||
var isCallable = require('is-callable');
|
||||
var hasToStringTag = require('has-tostringtag/shams')();
|
||||
var generators = require('make-generator-function')();
|
||||
var arrowFn = require('make-arrow-function')();
|
||||
var forEach = require('for-each');
|
||||
var inspect = require('object-inspect');
|
||||
|
||||
var typedArrayNames = [
|
||||
'Int8Array',
|
||||
'Uint8Array',
|
||||
'Uint8ClampedArray',
|
||||
'Int16Array',
|
||||
'Uint16Array',
|
||||
'Int32Array',
|
||||
'Uint32Array',
|
||||
'Float32Array',
|
||||
'Float64Array',
|
||||
'BigInt64Array',
|
||||
'BigUint64Array'
|
||||
];
|
||||
|
||||
test('not arrays', function (t) {
|
||||
t.test('non-number/string primitives', function (st) {
|
||||
st.notOk(isTypedArray(), 'undefined is not typed array');
|
||||
st.notOk(isTypedArray(null), 'null is not typed array');
|
||||
st.notOk(isTypedArray(false), 'false is not typed array');
|
||||
st.notOk(isTypedArray(true), 'true is not typed array');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.notOk(isTypedArray({}), 'object is not typed array');
|
||||
t.notOk(isTypedArray(/a/g), 'regex literal is not typed array');
|
||||
t.notOk(isTypedArray(new RegExp('a', 'g')), 'regex object is not typed array');
|
||||
t.notOk(isTypedArray(new Date()), 'new Date() is not typed array');
|
||||
|
||||
t.test('numbers', function (st) {
|
||||
st.notOk(isTypedArray(42), 'number is not typed array');
|
||||
st.notOk(isTypedArray(Object(42)), 'number object is not typed array');
|
||||
st.notOk(isTypedArray(NaN), 'NaN is not typed array');
|
||||
st.notOk(isTypedArray(Infinity), 'Infinity is not typed array');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('strings', function (st) {
|
||||
st.notOk(isTypedArray('foo'), 'string primitive is not typed array');
|
||||
st.notOk(isTypedArray(Object('foo')), 'string object is not typed array');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Functions', function (t) {
|
||||
t.notOk(isTypedArray(function () {}), 'function is not typed array');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Generators', { skip: generators.length === 0 }, function (t) {
|
||||
forEach(generators, function (genFn) {
|
||||
t.notOk(isTypedArray(genFn), 'generator function ' + inspect(genFn) + ' is not typed array');
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Arrow functions', { skip: !arrowFn }, function (t) {
|
||||
t.notOk(isTypedArray(arrowFn), 'arrow function is not typed array');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('@@toStringTag', { skip: !hasToStringTag }, function (t) {
|
||||
forEach(typedArrayNames, function (typedArray) {
|
||||
if (typeof global[typedArray] === 'function') {
|
||||
var fakeTypedArray = [];
|
||||
fakeTypedArray[Symbol.toStringTag] = typedArray;
|
||||
t.notOk(isTypedArray(fakeTypedArray), 'faked ' + typedArray + ' is not typed array');
|
||||
} else {
|
||||
t.comment('# SKIP ' + typedArray + ' is not supported');
|
||||
}
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('non-Typed Arrays', function (t) {
|
||||
t.notOk(isTypedArray([]), '[] is not typed array');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Typed Arrays', function (t) {
|
||||
forEach(typedArrayNames, function (typedArray) {
|
||||
var TypedArray = global[typedArray];
|
||||
if (isCallable(TypedArray)) {
|
||||
var arr = new TypedArray(10);
|
||||
t.ok(isTypedArray(arr), 'new ' + typedArray + '(10) is typed array');
|
||||
} else {
|
||||
t.comment('# SKIP ' + typedArray + ' is not supported');
|
||||
}
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1,5 @@
|
||||
import assertString from './util/assertString';
|
||||
export default function isLowercase(str) {
|
||||
assertString(str);
|
||||
return str === str.toLowerCase();
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"internal-slot","version":"1.0.5","files":{".editorconfig":{"checkedAt":1678883671533,"integrity":"sha512-gD3iQtgC7ZgFS97pyZqR0FPjMNyRAfat8dipbSL28iiJ6B1MP5dDeDYeEnP5sYMTz8whQIk3E5vltk2kcyJJEQ==","mode":420,"size":286},".eslintignore":{"checkedAt":1678883671537,"integrity":"sha512-VLhEcqup3IHXtZJPt07ZYoA9JNRjy1jhU/NU41Yw4E8mEyea/z+6bw5hL3lhCO09pji9E0BH2Q3aDXdc3i9zBg==","mode":420,"size":10},".nycrc":{"checkedAt":1678883669555,"integrity":"sha512-2vm1RFz8Ajl/OYrfoCWPJIm3Bpnf7Gyn5bha/lZx/cq+We3uMy9xj15XeP6x4wF3jf/pO7KMHAkU9mllm605xg==","mode":420,"size":139},"LICENSE":{"checkedAt":1678883671533,"integrity":"sha512-d2fjYr50p8QKjqC0qhH5nWv3sgAsKHHicw91kVzLPCZ54cpPIRw8zJk+nn45Y6q/yJ/T/xdxK77zBLuAvFgmVg==","mode":420,"size":1071},".eslintrc":{"checkedAt":1678883673405,"integrity":"sha512-gJl0mITb/CWBq/npzC0EmBktZYntD1JGIPgrKMKPNIyCgCzjLl+gsLv9wE+zE2Eo2lBX2QE+W5jcXGQfcZmqXw==","mode":420,"size":171},"test/index.js":{"checkedAt":1678883673405,"integrity":"sha512-DHUf/A/n30ttVNNs6WnllBpkQivA3DGfMNdFdDIG+oMKRiZAJSaHMGEhqn8rEmnYtg7GoXmkrHNDWIsuB8vK4Q==","mode":420,"size":3029},"index.js":{"checkedAt":1678883673405,"integrity":"sha512-QF2avk9hxe1UF3mDWNEmJoOc7m0YLu0OIa3Myajp7ztfiRWhxy7n1mXQ8RJT1a8LU9pRZuOIEBXiQ6MUpzrNBA==","mode":420,"size":1601},"package.json":{"checkedAt":1678883673405,"integrity":"sha512-1tApHuwcXnJoD7guDaDZhnFzByAvJ7xiA/XPxv3OM9Dh4b7h9cDPoqZS34BF8wrwgZLrWtAZjoO4lyh+e9crqw==","mode":420,"size":1750},"README.md":{"checkedAt":1678883673405,"integrity":"sha512-iouQD79fc1Zrw76XbNxiC5jaqQQAkQc667lDlUo5VN5MyIoqgHF9VCUvOrci+PDEeHFKIvxzsDR19Ni188tC4A==","mode":420,"size":2343},"CHANGELOG.md":{"checkedAt":1678883673405,"integrity":"sha512-YB2oqvgqGPOJAgecqZi9d8CghcdOX7+jutzhCWw8D1TKdk5Ku+kNB+9+RRmImS6S8rZrweOYf9r2WjUprHSkvQ==","mode":420,"size":8494},".github/FUNDING.yml":{"checkedAt":1678883673405,"integrity":"sha512-RC/bhZeerhgwAf5RcJ2uiAymBfcfb5qFSnDaOXfTmv1j48pfwOgTx8psXngpnLMgQrS2pw4+qhxIx156AD8q1Q==","mode":420,"size":559}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"endWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/endWith.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAErG,8JAA8J;AAC9J,wBAAgB,OAAO,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAClF,8JAA8J;AAC9J,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,EAAE,GAAG,CAAC,EAAE,EAClD,GAAG,kBAAkB,EAAE,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,GAC3C,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9C,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
||||
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var runTests = require('./tests');
|
||||
|
||||
test('with uglify', function (t) {
|
||||
/* eslint global-require: 0 */
|
||||
require('uglify-register/api').register({
|
||||
exclude: [/\/node_modules\//, /\/test\//],
|
||||
uglify: { mangle: true }
|
||||
});
|
||||
|
||||
var getName = require('../');
|
||||
runTests(getName, t);
|
||||
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1,43 @@
|
||||
"use strict";
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
||||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
||||
to[j] = from[i];
|
||||
return to;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.timeoutProvider = void 0;
|
||||
exports.timeoutProvider = {
|
||||
setTimeout: function (handler, timeout) {
|
||||
var args = [];
|
||||
for (var _i = 2; _i < arguments.length; _i++) {
|
||||
args[_i - 2] = arguments[_i];
|
||||
}
|
||||
var delegate = exports.timeoutProvider.delegate;
|
||||
if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {
|
||||
return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args)));
|
||||
}
|
||||
return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));
|
||||
},
|
||||
clearTimeout: function (handle) {
|
||||
var delegate = exports.timeoutProvider.delegate;
|
||||
return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);
|
||||
},
|
||||
delegate: undefined,
|
||||
};
|
||||
//# sourceMappingURL=timeoutProvider.js.map
|
||||
@@ -0,0 +1,76 @@
|
||||
#object-keys <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
||||
|
||||
[![Build Status][travis-svg]][travis-url]
|
||||
[![dependency status][deps-svg]][deps-url]
|
||||
[![dev dependency status][dev-deps-svg]][dev-deps-url]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][npm-badge-png]][package-url]
|
||||
|
||||
[![browser support][testling-svg]][testling-url]
|
||||
|
||||
An Object.keys shim. Invoke its "shim" method to shim Object.keys if it is unavailable.
|
||||
|
||||
Most common usage:
|
||||
```js
|
||||
var keys = Object.keys || require('object-keys');
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var keys = require('object-keys');
|
||||
var assert = require('assert');
|
||||
var obj = {
|
||||
a: true,
|
||||
b: true,
|
||||
c: true
|
||||
};
|
||||
|
||||
assert.deepEqual(keys(obj), ['a', 'b', 'c']);
|
||||
```
|
||||
|
||||
```js
|
||||
var keys = require('object-keys');
|
||||
var assert = require('assert');
|
||||
/* when Object.keys is not present */
|
||||
delete Object.keys;
|
||||
var shimmedKeys = keys.shim();
|
||||
assert.equal(shimmedKeys, keys);
|
||||
assert.deepEqual(Object.keys(obj), keys(obj));
|
||||
```
|
||||
|
||||
```js
|
||||
var keys = require('object-keys');
|
||||
var assert = require('assert');
|
||||
/* when Object.keys is present */
|
||||
var shimmedKeys = keys.shim();
|
||||
assert.equal(shimmedKeys, Object.keys);
|
||||
assert.deepEqual(Object.keys(obj), keys(obj));
|
||||
```
|
||||
|
||||
## Source
|
||||
Implementation taken directly from [es5-shim][es5-shim-url], with modifications, including from [lodash][lodash-url].
|
||||
|
||||
## Tests
|
||||
Simply clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
[package-url]: https://npmjs.org/package/object-keys
|
||||
[npm-version-svg]: http://versionbadg.es/ljharb/object-keys.svg
|
||||
[travis-svg]: https://travis-ci.org/ljharb/object-keys.svg
|
||||
[travis-url]: https://travis-ci.org/ljharb/object-keys
|
||||
[deps-svg]: https://david-dm.org/ljharb/object-keys.svg
|
||||
[deps-url]: https://david-dm.org/ljharb/object-keys
|
||||
[dev-deps-svg]: https://david-dm.org/ljharb/object-keys/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/ljharb/object-keys#info=devDependencies
|
||||
[testling-svg]: https://ci.testling.com/ljharb/object-keys.png
|
||||
[testling-url]: https://ci.testling.com/ljharb/object-keys
|
||||
[es5-shim-url]: https://github.com/es-shims/es5-shim/blob/master/es5-shim.js#L542-589
|
||||
[lodash-url]: https://github.com/lodash/lodash
|
||||
[npm-badge-png]: https://nodei.co/npm/object-keys.png?downloads=true&stars=true
|
||||
[license-image]: http://img.shields.io/npm/l/object-keys.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: http://img.shields.io/npm/dm/object-keys.svg
|
||||
[downloads-url]: http://npm-stat.com/charts.html?package=object-keys
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
Copyright (c) 2012, 2013 Thorsten Lorenz <thlorenz@gmx.de>
|
||||
Copyright (c) 2012 James Halliday <mail@substack.net>
|
||||
Copyright (c) 2009 Thomas Robinson <280north.com>
|
||||
|
||||
This software is released under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
Reference in New Issue
Block a user