mirror of
https://github.com/nodejs/node.git
synced 2025-05-18 17:26:24 +00:00

PR-URL: https://github.com/nodejs/io.js/pull/2286 Reviewed-By: Roman Reiss <me@silverwind.io>
12 lines
300 B
JavaScript
Executable File
12 lines
300 B
JavaScript
Executable File
/*!
|
|
* read-json-sync | MIT (c) Shinnosuke Watanabe
|
|
* https://github.com/shinnn/read-json-sync
|
|
*/
|
|
'use strict';
|
|
|
|
var fs = require('graceful-fs');
|
|
|
|
module.exports = function readJsonSync(filePath, options) {
|
|
return JSON.parse(String(fs.readFileSync(filePath, options)).replace(/^\ufeff/g, ''));
|
|
};
|