1 line
28 KiB
JSON
1 line
28 KiB
JSON
|
{"id":"node_modules/chai/lib/chai/utils/getMessage.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":"./flag","loc":{"line":11,"column":19},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/getMessage.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/flag.js"},{"name":"./getActual","loc":{"line":12,"column":24},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/getMessage.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/getActual.js"},{"name":"./objDisplay","loc":{"line":13,"column":25},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/getMessage.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/objDisplay.js"}],"generated":{"js":"/*!\n * Chai - message composition utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\nvar flag = require('./flag'),\n getActual = require('./getActual'),\n objDisplay = require('./objDisplay');\n/**\n * ### .getMessage(object, message, negateMessage)\n *\n * Construct the error message based on flags\n * and template tags. Template tags will return\n * a stringified inspection of the object referenced.\n *\n * Message template tags:\n * - `#{this}` current asserted object\n * - `#{act}` actual value\n * - `#{exp}` expected value\n *\n * @param {Object} object (constructed Assertion)\n * @param {Arguments} chai.Assertion.prototype.assert arguments\n * @namespace Utils\n * @name getMessage\n * @api public\n */\n\n\nmodule.exports = function getMessage(obj, args) {\n var negate = flag(obj, 'negate'),\n val = flag(obj, 'object'),\n expected = args[3],\n actual = getActual(obj, args),\n msg = negate ? args[2] : args[1],\n flagMsg = flag(obj, 'message');\n if (typeof msg === \"function\") msg = msg();\n msg = msg || '';\n msg = msg.replace(/#\\{this\\}/g, function () {\n return objDisplay(val);\n }).replace(/#\\{act\\}/g, function () {\n return objDisplay(actual);\n }).replace(/#\\{exp\\}/g, function () {\n return objDisplay(expected);\n });\n return flagMsg ? flagMsg + ': ' + msg : msg;\n};","map":{"mappings":[{"generated":{"line":1,"column":0},"source":"node_modules/chai/lib/chai/utils/getMessage.js","original":{"line":1,"column":0}},{"generated":{"line":7,"column":0},"source":"node_modules/chai/lib/chai/utils/getMessage.js","original":{"line":7,"column":0}},{"generated":{"line":10,"column":0},"source":"node_modules/chai/lib/chai/utils/getMessage.js","original":{"line":11,"column":0}},{"name":"flag","generated":{"line":10,"column":4},"source":"node_modules/chai/lib/chai/utils/getMessage.js","original":{"line":11,"column":4}},{"generated":{"line":10,"column":8},"source":"node_modules/chai/lib/chai/utils/getMessage.js","original":{"line":11,"column":8}},{"name":"require","generated":{"line":10,"column":11},"source":"node_modules/chai/lib/chai/utils/getMessage.js","original":{"line":11,"column":11}},{"generated":{"line":10,"column":18},"source":"node_modules/chai/lib/chai/utils/getMessage.js","original":{"line":11,"column":18}},{"generated":{"line":10,"column":19},"source":"node_modules/chai/lib/chai/utils/getMessage.js","original":{"line":11,"column":19}},{"generated":{"line":10,"column":27},"source":"node_modules/chai/lib/chai/utils/getMessage.js","original":{"line":11,"column":18}},{"generated":{"line":10,"column":28},"source":"node_modules/chai/lib/chai/utils/getMessage.js","original":{"line":11,"column":0}},{"generated":{"line
|