Validate errorInfo.fixInfo object/properties in extension calls to onError.

This commit is contained in:
David Anson 2019-09-14 13:39:27 -07:00
parent 5895ea62cb
commit 65f6d38978
3 changed files with 95 additions and 22 deletions

View file

@ -44,6 +44,11 @@ module.exports.isEmptyString = function isEmptyString(str) {
return str.length === 0;
};
// Returns true iff the input is an object
module.exports.isObject = function isObject(obj) {
return (obj !== null) && (typeof obj === "object") && !Array.isArray(obj);
};
// Returns true iff the input line is blank (no content)
// Example: Contains nothing, whitespace, or comments
const blankLineRe = />|(?:<!--.*?-->)/g;