/
opt
/
canhelp
/
node_modules
/
kysely
/
dist
/
cjs
/
util
/
/opt/canhelp/node_modules/kysely/dist/cjs/util
mkdir
upload
Name
Size
Mode
Actions
assert.d.ts
173
0644
edit
dl
rm
assert.js
478
0644
edit
dl
rm
column-type.d.ts
6973
0644
edit
dl
rm
column-type.js
77
0644
edit
dl
rm
compilable.d.ts
227
0644
edit
dl
rm
compilable.js
306
0644
edit
dl
rm
deferred.d.ts
187
0644
edit
dl
rm
deferred.js
631
0644
edit
dl
rm
explainable.d.ts
1185
0644
edit
dl
rm
explainable.js
77
0644
edit
dl
rm
infer-result.d.ts
1670
0644
edit
dl
rm
infer-result.js
77
0644
edit
dl
rm
json-object-args.d.ts
246
0644
edit
dl
rm
json-object-args.js
1766
0644
edit
dl
rm
log-once.d.ts
183
0644
edit
dl
rm
log-once.js
418
0644
edit
dl
rm
log.d.ts
1070
0644
edit
dl
rm
log.js
1877
0644
edit
dl
rm
object-utils.d.ts
1494
0644
edit
dl
rm
object-utils.js
4157
0644
edit
dl
rm
performance-now.d.ts
50
0644
edit
dl
rm
performance-now.js
388
0644
edit
dl
rm
provide-controlled-connection.d.ts
397
0644
edit
dl
rm
provide-controlled-connection.js
1171
0644
edit
dl
rm
query-id.d.ts
109
0644
edit
dl
rm
query-id.js
447
0644
edit
dl
rm
random-string.d.ts
62
0644
edit
dl
rm
random-string.js
917
0644
edit
dl
rm
require-all-props.d.ts
1755
0644
edit
dl
rm
require-all-props.js
1654
0644
edit
dl
rm
stack-trace-utils.d.ts
84
0644
edit
dl
rm
stack-trace-utils.js
626
0644
edit
dl
rm
streamable.d.ts
880
0644
edit
dl
rm
streamable.js
77
0644
edit
dl
rm
type-error.d.ts
92
0644
edit
dl
rm
type-error.js
77
0644
edit
dl
rm
type-utils.d.ts
6095
0644
edit
dl
rm
type-utils.js
77
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/kysely/dist/cjs/util/object-utils.js
(4157B)
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isEmpty = isEmpty; exports.isUndefined = isUndefined; exports.isString = isString; exports.isNumber = isNumber; exports.isBoolean = isBoolean; exports.isNull = isNull; exports.isDate = isDate; exports.isBigInt = isBigInt; exports.isBuffer = isBuffer; exports.isFunction = isFunction; exports.isObject = isObject; exports.isArrayBufferOrView = isArrayBufferOrView; exports.isPlainObject = isPlainObject; exports.getLast = getLast; exports.freeze = freeze; exports.asArray = asArray; exports.asReadonlyArray = asReadonlyArray; exports.isReadonlyArray = isReadonlyArray; exports.noop = noop; exports.compare = compare; function isEmpty(obj) { if (Array.isArray(obj) || isString(obj) || isBuffer(obj)) { return obj.length === 0; } else if (obj) { return Object.keys(obj).length === 0; } return false; } function isUndefined(obj) { return typeof obj === 'undefined' || obj === undefined; } function isString(obj) { return typeof obj === 'string'; } function isNumber(obj) { return typeof obj === 'number'; } function isBoolean(obj) { return typeof obj === 'boolean'; } function isNull(obj) { return obj === null; } function isDate(obj) { return obj instanceof Date; } function isBigInt(obj) { return typeof obj === 'bigint'; } // Don't change the returnd type to `obj is Buffer` to not create a // hard dependency to node. function isBuffer(obj) { return typeof Buffer !== 'undefined' && Buffer.isBuffer(obj); } function isFunction(obj) { return typeof obj === 'function'; } function isObject(obj) { return typeof obj === 'object' && obj !== null; } function isArrayBufferOrView(obj) { return obj instanceof ArrayBuffer || ArrayBuffer.isView(obj); } function isPlainObject(obj) { if (!isObject(obj) || getTag(obj) !== '[object Object]') { return false; } if (Object.getPrototypeOf(obj) === null) { return true; } let proto = obj; while (Object.getPrototypeOf(proto) !== null) { proto = Object.getPrototypeOf(proto); } return Object.getPrototypeOf(obj) === proto; } function getLast(arr) { return arr[arr.length - 1]; } function freeze(obj) { return Object.freeze(obj); } function asArray(arg) { if (isReadonlyArray(arg)) { return arg; } else { return [arg]; } } function asReadonlyArray(arg) { if (isReadonlyArray(arg)) { return arg; } else { return freeze([arg]); } } function isReadonlyArray(arg) { return Array.isArray(arg); } function noop(obj) { return obj; } function compare(obj1, obj2) { if (isReadonlyArray(obj1) && isReadonlyArray(obj2)) { return compareArrays(obj1, obj2); } else if (isObject(obj1) && isObject(obj2)) { return compareObjects(obj1, obj2); } return obj1 === obj2; } function compareArrays(arr1, arr2) { if (arr1.length !== arr2.length) { return false; } for (let i = 0; i < arr1.length; ++i) { if (!compare(arr1[i], arr2[i])) { return false; } } return true; } function compareObjects(obj1, obj2) { if (isBuffer(obj1) && isBuffer(obj2)) { return compareBuffers(obj1, obj2); } else if (isDate(obj1) && isDate(obj2)) { return compareDates(obj1, obj2); } return compareGenericObjects(obj1, obj2); } function compareBuffers(buf1, buf2) { return Buffer.compare(buf1, buf2) === 0; } function compareDates(date1, date2) { return date1.getTime() === date2.getTime(); } function compareGenericObjects(obj1, obj2) { const keys1 = Object.keys(obj1); const keys2 = Object.keys(obj2); if (keys1.length !== keys2.length) { return false; } for (const key of keys1) { if (!compare(obj1[key], obj2[key])) { return false; } } return true; } const toString = Object.prototype.toString; function getTag(value) { if (value == null) { return value === undefined ? '[object Undefined]' : '[object Null]'; } return toString.call(value); }
Save
cmd:
run