smartlog-destination-devtools/.cache/d4/58fa95b7f59978430a6e33ad1c428f.json

1 line
36 KiB
JSON
Raw Normal View History

2018-11-13 00:32:39 +00:00
{"id":"node_modules/chai/lib/chai/utils/expectTypes.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/chai/package.json","includedInParent":true,"mtime":1542058764034},{"name":"assertion-error","loc":{"line":21,"column":29},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/expectTypes.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/assertion-error/index.js"},{"name":"./flag","loc":{"line":22,"column":19},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/expectTypes.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/flag.js"},{"name":"type-detect","loc":{"line":23,"column":19},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/expectTypes.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/type-detect/type-detect.js"}],"generated":{"js":"/*!\n * Chai - expectTypes utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/**\n * ### .expectTypes(obj, types)\n *\n * Ensures that the object being tested against is of a valid type.\n *\n * utils.expectTypes(this, ['array', 'object', 'string']);\n *\n * @param {Mixed} obj constructed Assertion\n * @param {Array} type A list of allowed types for this assertion\n * @namespace Utils\n * @name expectTypes\n * @api public\n */\nvar AssertionError = require('assertion-error');\n\nvar flag = require('./flag');\n\nvar type = require('type-detect');\n\nmodule.exports = function expectTypes(obj, types) {\n var flagMsg = flag(obj, 'message');\n var ssfi = flag(obj, 'ssfi');\n flagMsg = flagMsg ? flagMsg + ': ' : '';\n obj = flag(obj, 'object');\n types = types.map(function (t) {\n return t.toLowerCase();\n });\n types.sort(); // Transforms ['lorem', 'ipsum'] into 'a lorem, or an ipsum'\n\n var str = types.map(function (t, index) {\n var art = ~['a', 'e', 'i', 'o', 'u'].indexOf(t.charAt(0)) ? 'an' : 'a';\n var or = types.length > 1 && index === types.length - 1 ? 'or ' : '';\n return or + art + ' ' + t;\n }).join(', ');\n var objType = type(obj).toLowerCase();\n\n if (!types.some(function (expected) {\n return objType === expected;\n })) {\n throw new AssertionError(flagMsg + 'object tested must be ' + str + ', but ' + objType + ' given', undefined, ssfi);\n }\n};","map":{"mappings":[{"generated":{"line":1,"column":0},"source":"node_modules/chai/lib/chai/utils/expectTypes.js","original":{"line":1,"column":0}},{"generated":{"line":7,"column":0},"source":"node_modules/chai/lib/chai/utils/expectTypes.js","original":{"line":7,"column":0}},{"generated":{"line":20,"column":0},"source":"node_modules/chai/lib/chai/utils/expectTypes.js","original":{"line":21,"column":0}},{"name":"AssertionError","generated":{"line":20,"column":4},"source":"node_modules/chai/lib/chai/utils/expectTypes.js","original":{"line":21,"column":4}},{"generated":{"line":20,"column":18},"source":"node_modules/chai/lib/chai/utils/expectTypes.js","original":{"line":21,"column":18}},{"name":"require","generated":{"line":20,"column":21},"source":"node_modules/chai/lib/chai/utils/expectTypes.js","original":{"line":21,"column":21}},{"generated":{"line":20,"column":28},"source":"node_modules/chai/lib/chai/utils/expectTypes.js","original":{"line":21,"column":28}},{"generated":{"line":20,"column":29},"source":"node_modules/chai/lib/chai/utils/expectTypes.js","original":{"line":21,"column":29}},{"generated":{"line":20,"column":46},"source":"node_modules/chai/lib/chai/utils/expectTypes.js","original":{"line":21,"column":28}},{"generated":{"line":20,"column":47},"source":"node_modules/chai/lib/chai/utils/expectTypes.js","original":{"