JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 35199
  • Score
    100M100P100Q146459F
  • License CC0-1.0

Read and parse a JSON file synchronously

Package Exports

  • read-json-sync

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (read-json-sync) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

read-json-sync

NPM version Build Status Build status Coverage Status

A Node.js module to read and parse a JSON file synchronously

const readJsonSync = require('read-json-sync');

readJsonSync('package.json'); //=> {name: 'read-json-sync', version: '1.0.0', ...}

Node.js built-in require can do almost the same thing, but this module doesn't cache results.

Installation

Use npm.

npm install read-json-sync

API

const readJsonSync = require('read-json-sync');

readJsonSync(filePath [, options])

filePath: String (path to a JSON file)
options: Object (fs.readFile options)
Return: Object (parsed JSON data)

License

Creative Commons Zero v1.0 Universal