From 703e03aba33f234712206769f57717ba7d92d23d Mon Sep 17 00:00:00 2001 From: LinuxWizard42 Date: Wed, 12 Oct 2022 22:54:37 +0300 Subject: Added export_allowed file to make repository visible in cgit --- node_modules/read-pkg-up/index.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 node_modules/read-pkg-up/index.js (limited to 'node_modules/read-pkg-up/index.js') diff --git a/node_modules/read-pkg-up/index.js b/node_modules/read-pkg-up/index.js new file mode 100644 index 0000000..beb3d48 --- /dev/null +++ b/node_modules/read-pkg-up/index.js @@ -0,0 +1,31 @@ +'use strict'; +var findUp = require('find-up'); +var readPkg = require('read-pkg'); + +module.exports = function (opts) { + return findUp('package.json', opts).then(function (fp) { + if (!fp) { + return {}; + } + + return readPkg(fp, opts).then(function (pkg) { + return { + pkg: pkg, + path: fp + }; + }); + }); +}; + +module.exports.sync = function (opts) { + var fp = findUp.sync('package.json', opts); + + if (!fp) { + return {}; + } + + return { + pkg: readPkg.sync(fp, opts), + path: fp + }; +}; -- cgit v1.2.3-86-g962b