1.0.0 • Published 1 year ago
cue-wasm v1.0.0
:notebook_with_decorative_cover: Table of Contents
:dart: Features
- Cue to json
cue.toJSON()
- Cue to js object
cue.parse()
- Highly optimized - 2.1MB gzipped bundle size when using "slim" variant, 4.2MB for "full"
:toolbox: Getting Started
:gear: Installation
Install cue-wasm with yarn
yarn add cue-wasm
:running: Build Locally
Clone the project
git clone https://github.com/dclareio/cue-wasm.git
Go to the project directory
cd cue-wasm
Install dependencies
yarn
Build the library (requires docker)
yarn build
:eyes: Usage
import CUE from 'cue-wasm'
const cue = await CUE.init();
// basic API
cue.parse('hello: "world"') // returns { hello: "world" }
// Tagged template literals
const mergeObj = { test: "test" }
const obj = cue`
key: "val"
test: string
${mergeObj}
`; // returns { test: "test", key: "val" }
// note that for strings you'll need to quote them manually if you
// don't want cue to interpret them literally. This allows dynamically
// writing cue e.g.
cue`test: ${"test"}` // evaluates `test: test` vs.
cue`test: "${"test"}"` // evaluates `test: "test"`
:compass: Roadmap
- CUE -> JSON/JS
- CUE -> OpenAPI
- CUE -> JSONSchema
- CUE -> AST
- CUE -> Typescripe Types
- CUE -> Protobufs
- JSON/JS -> CUE
- JSONSchema -> CUE
- Typescripe Types -> CUE
- Protobufs -> CUE
:warning: License
Distributed under the MIT License. See LICENSE for more information.
:handshake: Contact
@dclario - https://dclare.io - contact@dclare.io - We do consulting!!
Project Link: https://github.com/dclareio/cue-wasm
:gem: Acknowledgements
1.0.0
1 year ago
0.1.0
2 years ago
0.3.0
2 years ago
0.2.1
2 years ago
0.1.2
2 years ago
0.0.3
2 years ago
0.2.0
2 years ago
0.1.1
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.5.5
2 years ago
0.5.0
2 years ago
0.3.2
2 years ago
0.0.5
2 years ago
0.4.0
2 years ago
0.3.1
2 years ago
0.0.4
2 years ago
0.7.0
2 years ago
0.5.2
2 years ago
0.0.7
2 years ago
0.6.0
2 years ago
0.5.1
2 years ago
0.3.3
2 years ago
0.0.6
2 years ago
0.0.1
2 years ago