-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Description
var performantArrayToTree = require("performant-array-to-tree")
console.log(performantArrayToTree.arrayToTree([
{ num: "4", ref: "31", custom: "abc" },
{ num: "31", ref: "4", custom: "12" },
],
{ id: "num", parentId: "ref", childrenField: "nodes", throwIfOrphans: true }
));
// result = []
version: 1.9.1
Actually, I don't have a strong opinion on the expected result from this situation. But it seems strange that the lib silently cut an array. Probably it should be an error?
Metadata
Metadata
Assignees
Labels
No labels