beancount 0.0.1 → 0.0.2
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 +8 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ npm install beancount
|
|
|
19
19
|
## Quick Start
|
|
20
20
|
|
|
21
21
|
```typescript
|
|
22
|
-
import { parse } from 'beancount'
|
|
22
|
+
import { parse, ParseResult } from 'beancount'
|
|
23
23
|
|
|
24
24
|
const beancountContent = `
|
|
25
25
|
2024-01-01 open Assets:Checking USD
|
|
@@ -37,6 +37,13 @@ console.log(result.entries.length) // 2
|
|
|
37
37
|
// Convert back to string
|
|
38
38
|
console.log(result.toString())
|
|
39
39
|
|
|
40
|
+
// Convert to JSON
|
|
41
|
+
const resultJSON = JSON.stringify(result)
|
|
42
|
+
console.log(resultJSON)
|
|
43
|
+
|
|
44
|
+
// Convert back to parsed entries
|
|
45
|
+
console.log(ParseResult.fromJSON(result))
|
|
46
|
+
|
|
40
47
|
// Or with formatted output (aligned columns)
|
|
41
48
|
// only partially implemented at this point
|
|
42
49
|
console.log(result.toFormattedString())
|
|
@@ -46,12 +53,6 @@ console.log(result.toFormattedString())
|
|
|
46
53
|
|
|
47
54
|
Full API documentation is available at https://Boelensman1.github.io/node-beancount/
|
|
48
55
|
|
|
49
|
-
You can also generate documentation locally with:
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
command make docs
|
|
53
|
-
```
|
|
54
|
-
|
|
55
56
|
## Contributing
|
|
56
57
|
|
|
57
58
|
This project uses Make for task orchestration. Common commands:
|