@bjmrq/utils
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -35,3 +35,2 @@ "use strict"; | ||
try { | ||
// eslint-disable-next-line @typescript-eslint/return-await | ||
return await _function(_object); | ||
@@ -38,0 +37,0 @@ } |
@@ -7,1 +7,2 @@ export * from "./date"; | ||
export * from "./browser"; | ||
export * from "./promise"; |
@@ -23,2 +23,3 @@ "use strict"; | ||
__exportStar(require("./browser"), exports); | ||
__exportStar(require("./promise"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -5,1 +5,2 @@ export declare const nameOf: <U, V>(obj: U) => V; | ||
export declare const readOnly: <M = Record<string, unknown>>(object: M) => Readonly<M>; | ||
export declare const isEqualObject: <T extends Record<string, any>>(objectOne: T, objectTwo: T) => boolean; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.readOnly = exports.sanitizeObject = exports.idOf = exports.nameOf = void 0; | ||
exports.isEqualObject = exports.readOnly = exports.sanitizeObject = exports.idOf = exports.nameOf = void 0; | ||
const ramda_1 = require("ramda"); | ||
@@ -18,2 +18,14 @@ exports.nameOf = (0, ramda_1.propOr)("No name", "name"); | ||
exports.readOnly = readOnly; | ||
const isEqualObject = (objectOne, objectTwo) => Object.entries(objectOne).reduce((equalityResult, [currentObjectOneKey, keyValueOfObjectOne]) => { | ||
if (!equalityResult) { | ||
return false; | ||
} | ||
const keyValueOfObjectTwo = objectTwo[currentObjectOneKey]; | ||
if (keyValueOfObjectOne instanceof Object && | ||
keyValueOfObjectTwo instanceof Object) { | ||
return (0, exports.isEqualObject)(keyValueOfObjectOne, keyValueOfObjectTwo); | ||
} | ||
return keyValueOfObjectOne === keyValueOfObjectTwo; | ||
}, true); | ||
exports.isEqualObject = isEqualObject; | ||
//# sourceMappingURL=object.js.map |
{ | ||
"name": "@bjmrq/utils", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A toolkit of little utilities", | ||
@@ -5,0 +5,0 @@ "author": "Benjamin Marquis", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
15772
26
197
0