mirror of
https://github.com/thangisme/notes.git
synced 2025-11-23 13:12:25 -05:00
Initial commit
This commit is contained in:
15
node_modules/cosmiconfig/lib/loadJs.js
generated
vendored
Normal file
15
node_modules/cosmiconfig/lib/loadJs.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
var requireFromString = require('require-from-string');
|
||||
var readFile = require('./readFile');
|
||||
|
||||
module.exports = function (filepath) {
|
||||
return readFile(filepath).then(function (content) {
|
||||
if (!content) return null;
|
||||
|
||||
return {
|
||||
config: requireFromString(content, filepath),
|
||||
filepath: filepath,
|
||||
};
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user