Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
global.getEditorConfig = function (path, callback) {
var defaultConfig = ec.parseFromFiles(path.relative, [{
name: pathUtils.resolve('.editorconfig'),
contents: kango.storage.getItem('editorconfig') || ''
}]);
var repoConfig = ec.parse(pathUtils.join(path.root, path.relative), {
root: path.root
});
Promise.settle([defaultConfig, repoConfig])
.reduce(function (merged, current) {
if (current.isFulfilled()) {
current = current.value();
for (var name in current) {
merged[name] = current[name];
}
}