performant-array-to-tree

v1.11.0
Converts an array of items with ids and parent ids to a nested tree in a performant `O(n)` way. Runs in browsers and node.
array to tree list to tree unflatten array-helper array-manipulations data-structures datastructures algorithms tree-structure and 15 more...

preversion

yarn && npm run format && npm run lint-fix && npm run build && npm run test

version

git add .

postversion

git push && git push --tags

build

rm -rf build && tsc && npm run uglify

format

yarn prettier --write .

lint

tslint --project tsconfig.json './src/**/*.ts'

lint-fix

tslint --project tsconfig.json './src/**/*.ts' --fix

test

ts-mocha src/**/*.spec.ts --timeout 10000

test-coverage

nyc npm test && codecov

uglify

uglifyjs build/arrayToTree.js --compress --mangle --output build/arrayToTree.min.js
npm i performant-array-to-tree

Metadata

  • MIT
  • Whatever
  • Philip Stanislaus
  • released 2/17/2022

Downloads

Maintainers