1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 06:37:46 +00:00

ingest JavaScript map to nu to md

You can create JavaScript `Map`'s from arrays.
When encoded as JSON they can be shared to nu and easily converted to
markdown for documentation and the like.
This commit is contained in:
Eli Flanagan 2021-08-27 16:22:13 -04:00
parent 161bd55c99
commit 079bd207c5
No known key found for this signature in database
GPG key ID: 89A9465A259119BF
2 changed files with 8 additions and 0 deletions

View file

@ -0,0 +1,2 @@
# Ingest JavaScript Map JSON into nu then to markdown
open ../sample_data/js_map.json | each { echo [[Español English]; [ $it.0 $it.1]] } | to md

6
sample_data/js_map.json Normal file
View file

@ -0,0 +1,6 @@
[
["cero", "zero"],
["uno", "one"],
["dos", "two"],
["tres", "three"]
]