Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@valu/trees

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@valu/trees - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

9

dist/index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc