Skip to content

Commit c332ffa

Browse files
Fixes missing export of typescript types, adjusts README
1 parent fa7cc5a commit c332ffa

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ tree === [
8888
This project includes types, just import the module as usual:
8989

9090
```ts
91-
import * as arrayToTree from 'performant-array-to-tree'
91+
import { arrayToTree } from 'performant-array-to-tree'
9292

9393
const tree = arrayToTree(array)
9494
```

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"description": "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.",
55
"main": "build/arrayToTree.min.js",
6+
"types": "build/arrayToTree.d.ts",
67
"author": "Philip Stanislaus <[email protected]>",
78
"license": "MIT",
89
"dependencies": {},

0 commit comments

Comments
 (0)