@k4a_l/dirtreeist 0.1.5 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -32,8 +32,6 @@ type DirTree = DirNode[]
32
32
  ### TypeScript Module
33
33
 
34
34
  ```ts
35
- import { parse, convert, OptionType } from 'dirTreeist'
36
-
37
35
  const markdown = `
38
36
  - /components
39
37
  - App.tsx
@@ -43,10 +41,25 @@ const markdown = `
43
41
  - converter.ts
44
42
  - parser.ts
45
43
  `
44
+ ```
45
+
46
+ ```tsx
47
+ import dirtreest, { Options } from '@k4a_l/dirtreeist'
48
+
49
+ const options: Options = {}
50
+ const outputs = dirtreest(markdown, options) // DirTree[] => output[]
51
+
52
+ console.log(outputs)
53
+ ```
54
+
55
+ or
56
+
57
+ ```tsx
58
+ import { parse, convert, Options } from '@k4a_l/dirtreeist'
46
59
 
47
60
  const dirTrees = parse(markdown) // markdown => DirTree[]
48
61
 
49
- const options: OptionType = {}
62
+ const options: Options = {}
50
63
  const outputs = dirTrees.map((dirTree) => convert(dirTree, options)) // DirTree[] => output[]
51
64
 
52
65
  console.log(outputs)