1.0.1 • Published 1 year ago

jpli v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

JPL - JSON Processing Language - JavaScript implementation

Code example

import jpl from 'jpli';

(async () => {
  const inputs = [null];

  const results = await jpl.run('"Hello, 🌎!"', inputs);

  console.log(...results);
})();

REPL

The package provides a CLI REPL, which can be used as a language playground.

> jpl # or `npm start`

Welcome to JPL v1.0.0.
Type ":h" for more information.

> "Hello, \('🌎', 'JPL')!"
"Hello, 🌎!", "Hello, JPL!"
>

For debugging purposes or to be able to dive into how a code snippet is interpreted, the REPL provides a :i directive.

> :i "Hello, 🌎!"
[
  {
    "op": "\"\"",
    "params": {
      "value": "Hello, 🌎!"
    }
  }
]
>

Extending JPL

TODO: inform about the runtime API, functions, JPLTypes and different error types

1.0.1

1 year ago

1.0.0

1 year ago