@cgdangelo/talent-jsonify-demo
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

@cgdangelo/talent-jsonify-demo

Parse a demo and print the result to console.

⚠️ Disk usage warning. Demo JSON output can be very large! ⚠️

Usage

As a command-line tool

npm install -g @cgdangelo/talent-jsonify-demo
talent-jsonify-demo <path to demo.dem> > demo.json
npx @cgdangelo/talent-jsonify-demo <path to demo.dem> > demo.json

As a library in your application

  • Add as a dependency.

    npm install @cgdangelo/talent-jsonify-demo
    
  • Import and use your desired API.

    • TaskEither instance for fp-ts users:

      import { pipe } from 'fp-ts/lib/function';
      import * as TE from 'fp-ts/lib/TaskEither';
      import { jsonifyDemoTaskEither } from '@cgdangelo/talent-jsonify-demo';
      
      const main = pipe(
        jsonifyDemoTaskEither('<path to demo.dem>'),
        TE.map((demoString) => {
          /* ... */
        })
      );
    • Promise instance:

      import { jsonifyDemo } from '@cgdangelo/talent-jsonify-demo';
      
      async function main() {
        const demoString = await jsonifyDemo('<path to demo.dem>');
      
        /* ... */
      }

Readme

Keywords

none

Package Sidebar

Install

npm i @cgdangelo/talent-jsonify-demo

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

9.78 kB

Total Files

7

Last publish

Collaborators

  • cgdangelo