Add example to readme

This commit is contained in:
Endeavorance 2024-05-13 08:17:02 -04:00
parent da04862aad
commit 29ea947b41
2 changed files with 14 additions and 1 deletions

View file

@ -17,6 +17,19 @@ Features that have yet to be implemented but are planned:
- Improved file slug/id handling
- Plugin API
## Example Usage
```javascript
import { Vault } from "@foundry/hammerstone";
const vault = new Vault("./my-vault");
vault.process((document) => {
document.setFrontmatter({ "Last Processed": Date.now() });
});
vault.write();
```
## API
### `new Vault(vaultRootPath)`

View file

@ -1,6 +1,6 @@
{
"name": "@foundry/hammerstone",
"version": "0.2.0",
"version": "0.3.0",
"description": "Load and manipulate Obsidian vault data",
"type": "module",
"exports": "./bin/hammerstone.js",