Add a README entry for read_typed_js
- ID
5ab6b53- date
2025-05-03 08:02:24+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
f3435ff- message
Add a README entry for `read_typed_js`- changed files
1 file, 6 additions
Changed files
README.md (1766) → README.md (1984)
diff --git a/README.md b/README.md
index 032a0d9..113a02c 100644
--- a/README.md
+++ b/README.md
@@ -14,11 +14,17 @@ These data files are meant to be both human- and machine-readable.
## Usage
+If you install `javascript-data-files`:
+
* You can read a JavaScript file with `read_js(path, varname)`
* You can write a JavaScript file with `write_js(path, value, varname)`
* You can append an item to a JavaScript array with `append_to_js_array(path, value)`
* You can append a key-value pair to a JavaScript object with `append_to_js_object(path, key, value)`
+If you install `javascript-data-files[typed]`:
+
+* You can read a JavaScript file and validate it matches a particular Python type with `read_typed_js(path, varname, model)`.
+
## Installation
You have two options: