mirror of
https://github.com/cachix/install-nix-action.git
synced 2025-06-08 09:54:28 +00:00
v7
This commit is contained in:
parent
033d472283
commit
49df04613e
6774 changed files with 1602535 additions and 1 deletions
11
node_modules/load-json-file/index.js
generated
vendored
Normal file
11
node_modules/load-json-file/index.js
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
'use strict';
|
||||
const path = require('path');
|
||||
const fs = require('graceful-fs');
|
||||
const stripBom = require('strip-bom');
|
||||
const parseJson = require('parse-json');
|
||||
const pify = require('pify');
|
||||
|
||||
const parse = (data, fp) => parseJson(stripBom(data), path.relative('.', fp));
|
||||
|
||||
module.exports = fp => pify(fs.readFile)(fp, 'utf8').then(data => parse(data, fp));
|
||||
module.exports.sync = fp => parse(fs.readFileSync(fp, 'utf8'), fp);
|
Loading…
Add table
Add a link
Reference in a new issue