@intelligo.ai/object-to-schema
Advanced tools
Comparing version 1.4.3 to 1.4.4
@@ -9,4 +9,3 @@ import { Transform, SomeObj, TreeLeaf } from './types'; | ||
export declare function sortTransformsByPriority(transforms: Transform[]): Transform[]; | ||
export declare function pruneObject(obj: SomeObj): SomeObj; | ||
export declare function pruneEmpty<T extends SomeObj>(obj: T): any; | ||
//# sourceMappingURL=transform.d.ts.map |
@@ -78,18 +78,2 @@ "use strict"; | ||
exports.sortTransformsByPriority = sortTransformsByPriority; | ||
function pruneObject(obj) { | ||
var entries = Object | ||
.entries(obj) | ||
.map(function (_a) { | ||
var key = _a[0], value = _a[1]; | ||
return ramda_1.default.isEmpty(value) | ||
? [key, undefined] | ||
: [key, pruneObject(value)]; | ||
}) | ||
.filter(function (_a) { | ||
var _ = _a[0], value = _a[1]; | ||
return !value; | ||
}); | ||
return Object.entries(entries); | ||
} | ||
exports.pruneObject = pruneObject; | ||
function pruneEmpty(obj) { | ||
@@ -96,0 +80,0 @@ return function prune(current) { |
{ | ||
"name": "@intelligo.ai/object-to-schema", | ||
"version": "1.4.3", | ||
"version": "1.4.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
320576
6243