rusty-object-notation
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

rusty-object-notation

This is a library for Rusty Object Notation (RON) in Javascript.

Rusty Object Notation

Numbers: 42, 3.14, 0xFF, 0b0110
Strings: "Hello", "with\\escapes\n", r#"raw string, great for regex\."#
Booleans: true, false
Chars: 'e', '\n'
Optionals: Some("string"), Some(Some(1.34)), None
Tuples: ("abc", 1.23, true), ()
Lists: ["abc", "def"]
Structs: ( foo: 1.0, bar: ( baz: "I'm nested" ) )
Maps: { "arbitrary": "keys", "are": "allowed" }

Usage

import { parse } from 'rusty-object-notation'

const ron = '( foo: 1.0, bar: ( baz: "I\'m nested" ) )'
const obj = parse(ron)
console.log(obj) // { foo: 1.0, bar: { baz: "I'm nested" } }

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.21latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.21
1.0.10
1.0.00
0.0.20
0.0.10

Package Sidebar

Install

npm i rusty-object-notation

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

62.4 kB

Total Files

21

Last publish

Collaborators

  • andrewbeletskiy