mirror of
https://github.com/pysunday/sdenv.git
synced 2025-04-12 03:37:16 +08:00
10 lines
190 B
JavaScript
10 lines
190 B
JavaScript
const paths = require('./paths');
|
|
|
|
module.exports = (filename, def = {}) => {
|
|
try {
|
|
return require(paths.configResolve(`${filename}.json`));
|
|
} catch(e) {
|
|
return def || {};
|
|
}
|
|
}
|