https://github.com/discoveryjs/jora-sandbox
A Web interface to play with Jora (a JSON query language) syntax or transform some JSON with zero setup
https://github.com/discoveryjs/jora-sandbox
Last synced: about 1 year ago
JSON representation
A Web interface to play with Jora (a JSON query language) syntax or transform some JSON with zero setup
- Host: GitHub
- URL: https://github.com/discoveryjs/jora-sandbox
- Owner: discoveryjs
- License: mit
- Created: 2019-07-07T09:13:43.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T16:20:37.000Z (over 3 years ago)
- Last Synced: 2024-10-25T04:28:06.573Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://discoveryjs.github.io/jora-sandbox/
- Size: 1.23 MB
- Stars: 3
- Watchers: 5
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Jora sandbox
A Web interface to play with jora syntax or transform some JSON with zero setup
[Try it online](https://discoveryjs.github.io/jora-sandbox/)
## Run locally
```
git clone https://github.com/discoveryjs/jora-sandbox.git
cd jora-sandbox
npm install
npm start
```
To build a static version:
```
npm run build
```
And open `docs/index.html` in your browser.
## Using as a package
[](https://www.npmjs.com/package/jora-sandbox)
Install
```
npm i jora-sandbox
```
Generate a sandbox HTML file content
```js
const createSandboxFileContent = require('jora-sandbox');
createSandboxFileContent(
{
data: { hello: 'world' },
name: 'Source of data', // not using currently
createdAt: new Date() // not using currently
},
'hello' // query by default
);
// returns a content of html with injected data and
```
See example of usage in `--sandbox` option implementation of [`jora-cli`](https://github.com/discoveryjs/jora-cli).
## License
MIT