mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-21 13:34:46 +00:00
.
This commit is contained in:
parent
beb1329f9f
commit
2b95e76931
7736 changed files with 1874747 additions and 51184 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