1 line
30 KiB
JSON
1 line
30 KiB
JSON
{"id":"node_modules/check-error/index.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/package.json","includedInParent":true,"mtime":1542067438335},{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/check-error/package.json","includedInParent":true,"mtime":1542058764034}],"generated":{"js":"'use strict';\n\n/* !\n * Chai - checkError utility\n * Copyright(c) 2012-2016 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/**\n * ### .checkError\n *\n * Checks that an error conforms to a given set of criteria and/or retrieves information about it.\n *\n * @api public\n */\n\n/**\n * ### .compatibleInstance(thrown, errorLike)\n *\n * Checks if two instances are compatible (strict equal).\n * Returns false if errorLike is not an instance of Error, because instances\n * can only be compatible if they're both error instances.\n *\n * @name compatibleInstance\n * @param {Error} thrown error\n * @param {Error|ErrorConstructor} errorLike object to compare against\n * @namespace Utils\n * @api public\n */\n\nfunction compatibleInstance(thrown, errorLike) {\n return errorLike instanceof Error && thrown === errorLike;\n}\n\n/**\n * ### .compatibleConstructor(thrown, errorLike)\n *\n * Checks if two constructors are compatible.\n * This function can receive either an error constructor or\n * an error instance as the `errorLike` argument.\n * Constructors are compatible if they're the same or if one is\n * an instance of another.\n *\n * @name compatibleConstructor\n * @param {Error} thrown error\n * @param {Error|ErrorConstructor} errorLike object to compare against\n * @namespace Utils\n * @api public\n */\n\nfunction compatibleConstructor(thrown, errorLike) {\n if (errorLike instanceof Error) {\n // If `errorLike` is an instance of any error we compare their constructors\n return thrown.constructor === errorLike.constructor || thrown instanceof errorLike.constructor;\n } else if (errorLike.prototype instanceof Error || errorLike === Error) {\n // If `errorLike` is a constructor that inherits from Error, we compare `thrown` to `errorLike` directly\n return thrown.constructor === errorLike || thrown instanceof errorLike;\n }\n\n return false;\n}\n\n/**\n * ### .compatibleMessage(thrown, errMatcher)\n *\n * Checks if an error's message is compatible with a matcher (String or RegExp).\n * If the message contains the String or passes the RegExp test,\n * it is considered compatible.\n *\n * @name compatibleMessage\n * @param {Error} thrown error\n * @param {String|RegExp} errMatcher to look for into the message\n * @namespace Utils\n * @api public\n */\n\nfunction compatibleMessage(thrown, errMatcher) {\n var comparisonString = typeof thrown === 'string' ? thrown : thrown.message;\n if (errMatcher instanceof RegExp) {\n return errMatcher.test(comparisonString);\n } else if (typeof errMatcher === 'string') {\n return comparisonString.indexOf(errMatcher) !== -1; // eslint-disable-line no-magic-numbers\n }\n\n return false;\n}\n\n/**\n * ### .getFunctionName(constructorFn)\n *\n * Returns the name of a function.\n * This also includes a polyfill function if `constructorFn.name` is not defined.\n *\n * @name getFunctionName\n * @param {Function} constructorFn\n * @namespace Utils\n * @api private\n */\n\nvar functionNameMatch = /\\s*function(?:\\s|\\s*\\/\\*[^(?:*\\/)]+\\*\\/\\s*)*([^\\(\\/]+)/;\nfunction getFunctionName(constructorFn) {\n var name = '';\n if (typeof constructorFn.name === 'undefined') {\n // Here we run a polyfill if constructorFn.name is not defined\n var match = String(constructorFn).match(functionNameMatch);\n if (match) {\n name = match[1];\n }\n } else {\n name = constructorFn.name;\n }\n\n return name;\n}\n\n/**\n * ### .getConstructorName(errorLike)\n *\n * Gets the constructor name for an Error instance or constructor itself.\n *\n * @name getConstructorName\n * @param {Error|ErrorConstructor} errorLike\n * @namespace Utils\n * @api public\n */\n\nfunction getConstructorName(errorLike) {\n var constructorName = errorLike;\n if (errorLike instanceof Error) {\n constructorName = getFunctionName(errorLike.constructor);\n } else if (typeof errorLike === 'function') {\n // If `err` is not an instance of Error it is an error constructor itself or another function.\n // If we've got a common function we get its name, otherwise we may need to create a new instance\n // of the error just in case it's a poorly-constructed error. Please see chaijs/chai/issues/45 to know more.\n constructorName = getFunctionName(errorLike).trim() ||\n getFunctionName(new errorLike()); // eslint-disable-line new-cap\n }\n\n return constructorName;\n}\n\n/**\n * ### .getMessage(errorLike)\n *\n * Gets the error message from an error.\n * If `err` is a String itself, we return it.\n * If the error has no message, we return an empty string.\n *\n * @name getMessage\n * @param {Error|String} errorLike\n * @namespace Utils\n * @api public\n */\n\nfunction getMessage(errorLike) {\n var msg = '';\n if (errorLike && errorLike.message) {\n msg = errorLike.message;\n } else if (typeof errorLike === 'string') {\n msg = errorLike;\n }\n\n return msg;\n}\n\nmodule.exports = {\n compatibleInstance: compatibleInstance,\n compatibleConstructor: compatibleConstructor,\n compatibleMessage: compatibleMessage,\n getMessage: getMessage,\n getConstructorName: getConstructorName,\n};\n","map":{"mappings":[{"source":"node_modules/check-error/index.js","original":{"line":1,"column":0},"generated":{"line":1,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":2,"column":0},"generated":{"line":2,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":3,"column":0},"generated":{"line":3,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":4,"column":0},"generated":{"line":4,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":5,"column":0},"generated":{"line":5,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":6,"column":0},"generated":{"line":6,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":7,"column":0},"generated":{"line":7,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":8,"column":0},"generated":{"line":8,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":9,"column":0},"generated":{"line":9,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":10,"column":0},"generated":{"line":10,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":11,"column":0},"generated":{"line":11,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":12,"column":0},"generated":{"line":12,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":13,"column":0},"generated":{"line":13,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":14,"column":0},"generated":{"line":14,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":15,"column":0},"generated":{"line":15,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":16,"column":0},"generated":{"line":16,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":17,"column":0},"generated":{"line":17,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":18,"column":0},"generated":{"line":18,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":19,"column":0},"generated":{"line":19,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":20,"column":0},"generated":{"line":20,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":21,"column":0},"generated":{"line":21,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":22,"column":0},"generated":{"line":22,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":23,"column":0},"generated":{"line":23,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":24,"column":0},"generated":{"line":24,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":25,"column":0},"generated":{"line":25,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":26,"column":0},"generated":{"line":26,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":27,"column":0},"generated":{"line":27,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":28,"column":0},"generated":{"line":28,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":29,"column":0},"generated":{"line":29,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":30,"column":0},"generated":{"line":30,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":31,"column":0},"generated":{"line":31,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":32,"column":0},"generated":{"line":32,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":33,"column":0},"generated":{"line":33,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":34,"column":0},"generated":{"line":34,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":35,"column":0},"generated":{"line":35,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":36,"column":0},"generated":{"line":36,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":37,"column":0},"generated":{"line":37,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":38,"column":0},"generated":{"line":38,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":39,"column":0},"generated":{"line":39,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":40,"column":0},"generated":{"line":40,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":41,"column":0},"generated":{"line":41,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":42,"column":0},"generated":{"line":42,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":43,"column":0},"generated":{"line":43,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":44,"column":0},"generated":{"line":44,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":45,"column":0},"generated":{"line":45,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":46,"column":0},"generated":{"line":46,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":47,"column":0},"generated":{"line":47,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":48,"column":0},"generated":{"line":48,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":49,"column":0},"generated":{"line":49,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":50,"column":0},"generated":{"line":50,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":51,"column":0},"generated":{"line":51,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":52,"column":0},"generated":{"line":52,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":53,"column":0},"generated":{"line":53,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":54,"column":0},"generated":{"line":54,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":55,"column":0},"generated":{"line":55,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":56,"column":0},"generated":{"line":56,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":57,"column":0},"generated":{"line":57,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":58,"column":0},"generated":{"line":58,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":59,"column":0},"generated":{"line":59,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":60,"column":0},"generated":{"line":60,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":61,"column":0},"generated":{"line":61,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":62,"column":0},"generated":{"line":62,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":63,"column":0},"generated":{"line":63,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":64,"column":0},"generated":{"line":64,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":65,"column":0},"generated":{"line":65,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":66,"column":0},"generated":{"line":66,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":67,"column":0},"generated":{"line":67,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":68,"column":0},"generated":{"line":68,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":69,"column":0},"generated":{"line":69,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":70,"column":0},"generated":{"line":70,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":71,"column":0},"generated":{"line":71,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":72,"column":0},"generated":{"line":72,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":73,"column":0},"generated":{"line":73,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":74,"column":0},"generated":{"line":74,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":75,"column":0},"generated":{"line":75,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":76,"column":0},"generated":{"line":76,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":77,"column":0},"generated":{"line":77,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":78,"column":0},"generated":{"line":78,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":79,"column":0},"generated":{"line":79,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":80,"column":0},"generated":{"line":80,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":81,"column":0},"generated":{"line":81,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":82,"column":0},"generated":{"line":82,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":83,"column":0},"generated":{"line":83,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":84,"column":0},"generated":{"line":84,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":85,"column":0},"generated":{"line":85,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":86,"column":0},"generated":{"line":86,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":87,"column":0},"generated":{"line":87,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":88,"column":0},"generated":{"line":88,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":89,"column":0},"generated":{"line":89,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":90,"column":0},"generated":{"line":90,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":91,"column":0},"generated":{"line":91,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":92,"column":0},"generated":{"line":92,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":93,"column":0},"generated":{"line":93,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":94,"column":0},"generated":{"line":94,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":95,"column":0},"generated":{"line":95,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":96,"column":0},"generated":{"line":96,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":97,"column":0},"generated":{"line":97,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":98,"column":0},"generated":{"line":98,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":99,"column":0},"generated":{"line":99,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":100,"column":0},"generated":{"line":100,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":101,"column":0},"generated":{"line":101,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":102,"column":0},"generated":{"line":102,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":103,"column":0},"generated":{"line":103,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":104,"column":0},"generated":{"line":104,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":105,"column":0},"generated":{"line":105,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":106,"column":0},"generated":{"line":106,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":107,"column":0},"generated":{"line":107,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":108,"column":0},"generated":{"line":108,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":109,"column":0},"generated":{"line":109,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":110,"column":0},"generated":{"line":110,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":111,"column":0},"generated":{"line":111,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":112,"column":0},"generated":{"line":112,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":113,"column":0},"generated":{"line":113,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":114,"column":0},"generated":{"line":114,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":115,"column":0},"generated":{"line":115,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":116,"column":0},"generated":{"line":116,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":117,"column":0},"generated":{"line":117,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":118,"column":0},"generated":{"line":118,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":119,"column":0},"generated":{"line":119,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":120,"column":0},"generated":{"line":120,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":121,"column":0},"generated":{"line":121,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":122,"column":0},"generated":{"line":122,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":123,"column":0},"generated":{"line":123,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":124,"column":0},"generated":{"line":124,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":125,"column":0},"generated":{"line":125,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":126,"column":0},"generated":{"line":126,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":127,"column":0},"generated":{"line":127,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":128,"column":0},"generated":{"line":128,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":129,"column":0},"generated":{"line":129,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":130,"column":0},"generated":{"line":130,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":131,"column":0},"generated":{"line":131,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":132,"column":0},"generated":{"line":132,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":133,"column":0},"generated":{"line":133,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":134,"column":0},"generated":{"line":134,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":135,"column":0},"generated":{"line":135,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":136,"column":0},"generated":{"line":136,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":137,"column":0},"generated":{"line":137,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":138,"column":0},"generated":{"line":138,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":139,"column":0},"generated":{"line":139,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":140,"column":0},"generated":{"line":140,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":141,"column":0},"generated":{"line":141,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":142,"column":0},"generated":{"line":142,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":143,"column":0},"generated":{"line":143,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":144,"column":0},"generated":{"line":144,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":145,"column":0},"generated":{"line":145,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":146,"column":0},"generated":{"line":146,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":147,"column":0},"generated":{"line":147,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":148,"column":0},"generated":{"line":148,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":149,"column":0},"generated":{"line":149,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":150,"column":0},"generated":{"line":150,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":151,"column":0},"generated":{"line":151,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":152,"column":0},"generated":{"line":152,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":153,"column":0},"generated":{"line":153,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":154,"column":0},"generated":{"line":154,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":155,"column":0},"generated":{"line":155,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":156,"column":0},"generated":{"line":156,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":157,"column":0},"generated":{"line":157,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":158,"column":0},"generated":{"line":158,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":159,"column":0},"generated":{"line":159,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":160,"column":0},"generated":{"line":160,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":161,"column":0},"generated":{"line":161,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":162,"column":0},"generated":{"line":162,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":163,"column":0},"generated":{"line":163,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":164,"column":0},"generated":{"line":164,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":165,"column":0},"generated":{"line":165,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":166,"column":0},"generated":{"line":166,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":167,"column":0},"generated":{"line":167,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":168,"column":0},"generated":{"line":168,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":169,"column":0},"generated":{"line":169,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":170,"column":0},"generated":{"line":170,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":171,"column":0},"generated":{"line":171,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":172,"column":0},"generated":{"line":172,"column":0}},{"source":"node_modules/check-error/index.js","original":{"line":173,"column":0},"generated":{"line":173,"column":0}}],"sources":{"node_modules/check-error/index.js":"'use strict';\n\n/* !\n * Chai - checkError utility\n * Copyright(c) 2012-2016 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/**\n * ### .checkError\n *\n * Checks that an error conforms to a given set of criteria and/or retrieves information about it.\n *\n * @api public\n */\n\n/**\n * ### .compatibleInstance(thrown, errorLike)\n *\n * Checks if two instances are compatible (strict equal).\n * Returns false if errorLike is not an instance of Error, because instances\n * can only be compatible if they're both error instances.\n *\n * @name compatibleInstance\n * @param {Error} thrown error\n * @param {Error|ErrorConstructor} errorLike object to compare against\n * @namespace Utils\n * @api public\n */\n\nfunction compatibleInstance(thrown, errorLike) {\n return errorLike instanceof Error && thrown === errorLike;\n}\n\n/**\n * ### .compatibleConstructor(thrown, errorLike)\n *\n * Checks if two constructors are compatible.\n * This function can receive either an error constructor or\n * an error instance as the `errorLike` argument.\n * Constructors are compatible if they're the same or if one is\n * an instance of another.\n *\n * @name compatibleConstructor\n * @param {Error} thrown error\n * @param {Error|ErrorConstructor} errorLike object to compare against\n * @namespace Utils\n * @api public\n */\n\nfunction compatibleConstructor(thrown, errorLike) {\n if (errorLike instanceof Error) {\n // If `errorLike` is an instance of any error we compare their constructors\n return thrown.constructor === errorLike.constructor || thrown instanceof errorLike.constructor;\n } else if (errorLike.prototype instanceof Error || errorLike === Error) {\n // If `errorLike` is a constructor that inherits from Error, we compare `thrown` to `errorLike` directly\n return thrown.constructor === errorLike || thrown instanceof errorLike;\n }\n\n return false;\n}\n\n/**\n * ### .compatibleMessage(thrown, errMatcher)\n *\n * Checks if an error's message is compatible with a matcher (String or RegExp).\n * If the message contains the String or passes the RegExp test,\n * it is considered compatible.\n *\n * @name compatibleMessage\n * @param {Error} thrown error\n * @param {String|RegExp} errMatcher to look for into the message\n * @namespace Utils\n * @api public\n */\n\nfunction compatibleMessage(thrown, errMatcher) {\n var comparisonString = typeof thrown === 'string' ? thrown : thrown.message;\n if (errMatcher instanceof RegExp) {\n return errMatcher.test(comparisonString);\n } else if (typeof errMatcher === 'string') {\n return comparisonString.indexOf(errMatcher) !== -1; // eslint-disable-line no-magic-numbers\n }\n\n return false;\n}\n\n/**\n * ### .getFunctionName(constructorFn)\n *\n * Returns the name of a function.\n * This also includes a polyfill function if `constructorFn.name` is not defined.\n *\n * @name getFunctionName\n * @param {Function} constructorFn\n * @namespace Utils\n * @api private\n */\n\nvar functionNameMatch = /\\s*function(?:\\s|\\s*\\/\\*[^(?:*\\/)]+\\*\\/\\s*)*([^\\(\\/]+)/;\nfunction getFunctionName(constructorFn) {\n var name = '';\n if (typeof constructorFn.name === 'undefined') {\n // Here we run a polyfill if constructorFn.name is not defined\n var match = String(constructorFn).match(functionNameMatch);\n if (match) {\n name = match[1];\n }\n } else {\n name = constructorFn.name;\n }\n\n return name;\n}\n\n/**\n * ### .getConstructorName(errorLike)\n *\n * Gets the constructor name for an Error instance or constructor itself.\n *\n * @name getConstructorName\n * @param {Error|ErrorConstructor} errorLike\n * @namespace Utils\n * @api public\n */\n\nfunction getConstructorName(errorLike) {\n var constructorName = errorLike;\n if (errorLike instanceof Error) {\n constructorName = getFunctionName(errorLike.constructor);\n } else if (typeof errorLike === 'function') {\n // If `err` is not an instance of Error it is an error constructor itself or another function.\n // If we've got a common function we get its name, otherwise we may need to create a new instance\n // of the error just in case it's a poorly-constructed error. Please see chaijs/chai/issues/45 to know more.\n constructorName = getFunctionName(errorLike).trim() ||\n getFunctionName(new errorLike()); // eslint-disable-line new-cap\n }\n\n return constructorName;\n}\n\n/**\n * ### .getMessage(errorLike)\n *\n * Gets the error message from an error.\n * If `err` is a String itself, we return it.\n * If the error has no message, we return an empty string.\n *\n * @name getMessage\n * @param {Error|String} errorLike\n * @namespace Utils\n * @api public\n */\n\nfunction getMessage(errorLike) {\n var msg = '';\n if (errorLike && errorLike.message) {\n msg = errorLike.message;\n } else if (typeof errorLike === 'string') {\n msg = errorLike;\n }\n\n return msg;\n}\n\nmodule.exports = {\n compatibleInstance: compatibleInstance,\n compatibleConstructor: compatibleConstructor,\n compatibleMessage: compatibleMessage,\n getMessage: getMessage,\n getConstructorName: getConstructorName,\n};\n"},"lineCount":173}},"hash":"9fd6d813c9cf8d0cd529ab031ea995b0","cacheData":{"env":{}}} |