@valu/trees
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -0,1 +1,4 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.flatListToTrees = exports.notEmpty = void 0; | ||
/** | ||
@@ -6,9 +9,10 @@ * Type Guard function for filtering empty values out of arrays. | ||
*/ | ||
export function notEmpty(value) { | ||
function notEmpty(value) { | ||
return value !== null && value !== undefined; | ||
} | ||
exports.notEmpty = notEmpty; | ||
/** | ||
* Generate hierarchical tree data structure from flat node list with parent id | ||
*/ | ||
export function flatListToTrees(data, options) { | ||
function flatListToTrees(data, options) { | ||
if (!data) { | ||
@@ -42,2 +46,3 @@ return []; | ||
} | ||
exports.flatListToTrees = flatListToTrees; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@valu/trees", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Javascript/TypeScript utility to turn WordPress like flat list (child -> parent relation) of hierarchical items to a tree data structure", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
6406
62