node-json2module

Convert a JSON object to an ES6 module
  https://github.com/mbostock/json2module
  0
  no reviews



For example, given a package.json file and run this through json2module, you’ll get ES6 module as output.

This is particularly useful for exporting a version number defined in your package.json file when using Rollup. Unlike rollup-plugin-json, which enables Rollup to parse JSON directly, json2module creates standard ES6 modules that can be consumed by any client.

Node.js is an event-based server-side JavaScript engine.