Skip to content

ksxnodeapps/require-to-json

Repository files navigation

require-to-json

Require a JavaScript file and print JSON result to stdout

Installation

npm install --global require-to-json

Command-line usage

require-to-json file.js
require-to-json < file.js
cat file.js | require-to-json
echo 'module.exports = 123 + 456' | require-to-json