1 line
40 KiB
JSON
1 line
40 KiB
JSON
{"id":"node_modules/chai/lib/chai/utils/overwriteProperty.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":"../../chai","loc":{"line":7,"column":19},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/overwriteProperty.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai.js"},{"name":"./flag","loc":{"line":8,"column":19},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/overwriteProperty.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/flag.js"},{"name":"./isProxyEnabled","loc":{"line":9,"column":29},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/overwriteProperty.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/isProxyEnabled.js"},{"name":"./transferFlags","loc":{"line":10,"column":28},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/overwriteProperty.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/transferFlags.js"}],"generated":{"js":"/*!\n * Chai - overwriteProperty utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\nvar chai = require('../../chai');\n\nvar flag = require('./flag');\n\nvar isProxyEnabled = require('./isProxyEnabled');\n\nvar transferFlags = require('./transferFlags');\n/**\n * ### .overwriteProperty(ctx, name, fn)\n *\n * Overwrites an already existing property getter and provides\n * access to previous value. Must return function to use as getter.\n *\n * utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) {\n * return function () {\n * var obj = utils.flag(this, 'object');\n * if (obj instanceof Foo) {\n * new chai.Assertion(obj.name).to.equal('bar');\n * } else {\n * _super.call(this);\n * }\n * }\n * });\n *\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.overwriteProperty('foo', fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(myFoo).to.be.ok;\n *\n * @param {Object} ctx object whose property is to be overwritten\n * @param {String} name of property to overwrite\n * @param {Function} getter function that returns a getter function to be used for name\n * @namespace Utils\n * @name overwriteProperty\n * @api public\n */\n\n\nmodule.exports = function overwriteProperty(ctx, name, getter) {\n var _get = Object.getOwnPropertyDescriptor(ctx, name),\n _super = function () {};\n\n if (_get && 'function' === typeof _get.get) _super = _get.get;\n Object.defineProperty(ctx, name, {\n get: function overwritingPropertyGetter() {\n // Setting the `ssfi` flag to `overwritingPropertyGetter` causes this\n // function to be the starting point for removing implementation frames\n // from the stack trace of a failed assertion.\n //\n // However, we only want to use this function as the starting point if\n // the `lockSsfi` flag isn't set and proxy protection is disabled.\n //\n // If the `lockSsfi` flag is set, then either this assertion has been\n // overwritten by another assertion, or this assertion is being invoked\n // from inside of another assertion. In the first case, the `ssfi` flag\n // has already been set by the overwriting assertion. In the second\n // case, the `ssfi` flag has already been set by the outer assertion.\n //\n // If proxy protection is enabled, then the `ssfi` flag has already been\n // set by the proxy getter.\n if (!isProxyEnabled() && !flag(this, 'lockSsfi')) {\n flag(this, 'ssfi', overwritingPropertyGetter);\n } // Setting the `lockSsfi` flag to `true` prevents the overwritten\n // assertion from changing the `ssfi` flag. By this point, the `ssfi`\n // flag is already set to the correct starting point for this assertion.\n\n\n var origLockSsfi = flag(this, 'lockSsfi');\n flag(this, 'lockSsfi', true);\n var result = getter(_super).call(this);\n flag(this, 'lockSsfi', origLockSsfi);\n\n if (result !== undefined) {\n return result;\n }\n\n var newAssertion = new chai.Assertion();\n transferFlags(this, newAssertion);\n return newAssertion;\n },\n configurable: true\n });\n};","map":{"mappings":[{"generated":{"line":1,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":1,"column":0}},{"generated":{"line":6,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":7,"column":0}},{"name":"chai","generated":{"line":6,"column":4},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":7,"column":4}},{"generated":{"line":6,"column":8},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":7,"column":8}},{"name":"require","generated":{"line":6,"column":11},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":7,"column":11}},{"generated":{"line":6,"column":18},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":7,"column":18}},{"generated":{"line":6,"column":19},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":7,"column":19}},{"generated":{"line":6,"column":31},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":7,"column":18}},{"generated":{"line":6,"column":32},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":7,"column":0}},{"generated":{"line":8,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":8,"column":0}},{"name":"flag","generated":{"line":8,"column":4},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":8,"column":4}},{"generated":{"line":8,"column":8},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":8,"column":8}},{"name":"require","generated":{"line":8,"column":11},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":8,"column":11}},{"generated":{"line":8,"column":18},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":8,"column":18}},{"generated":{"line":8,"column":19},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":8,"column":19}},{"generated":{"line":8,"column":27},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":8,"column":18}},{"generated":{"line":8,"column":28},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":8,"column":0}},{"generated":{"line":10,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":9,"column":0}},{"name":"isProxyEnabled","generated":{"line":10,"column":4},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":9,"column":4}},{"generated":{"line":10,"column":18},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":9,"column":18}},{"name":"require","generated":{"line":10,"column":21},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":9,"column":21}},{"generated":{"line":10,"column":28},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":9,"column":28}},{"generated":{"line":10,"column":29},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":9,"column":29}},{"generated":{"line":10,"column":47},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":9,"column":28}},{"generated":{"line":10,"column":48},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":9,"column":0}},{"generated":{"line":12,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":10,"column":0}},{"name":"transferFlags","generated":{"line":12,"column":4},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":10,"column":4}},{"generated":{"line":12,"column":17},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":10,"column":17}},{"name":"require","generated":{"line":12,"column":20},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":10,"column":20}},{"generated":{"line":12,"column":27},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":10,"column":27}},{"generated":{"line":12,"column":28},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":10,"column":28}},{"generated":{"line":12,"column":45},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":10,"column":27}},{"generated":{"line":12,"column":46},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":10,"column":0}},{"generated":{"line":13,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":12,"column":0}},{"name":"module","generated":{"line":48,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":46,"column":0}},{"generated":{"line":48,"column":6},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":46,"column":6}},{"name":"exports","generated":{"line":48,"column":7},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":46,"column":7}},{"generated":{"line":48,"column":14},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":46,"column":0}},{"generated":{"line":48,"column":17},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":46,"column":17}},{"name":"overwriteProperty","generated":{"line":48,"column":26},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":46,"column":26}},{"generated":{"line":48,"column":43},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":46,"column":17}},{"name":"ctx","generated":{"line":48,"column":44},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":46,"column":44}},{"generated":{"line":48,"column":47},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":46,"column":17}},{"name":"name","generated":{"line":48,"column":49},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":46,"column":49}},{"generated":{"line":48,"column":53},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":46,"column":17}},{"name":"getter","generated":{"line":48,"column":55},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":46,"column":55}},{"generated":{"line":48,"column":61},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":46,"column":17}},{"generated":{"line":48,"column":63},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":46,"column":63}},{"generated":{"line":49,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":47,"column":2}},{"name":"_get","generated":{"line":49,"column":6},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":47,"column":6}},{"generated":{"line":49,"column":10},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":47,"column":10}},{"name":"Object","generated":{"line":49,"column":13},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":47,"column":13}},{"generated":{"line":49,"column":19},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":47,"column":19}},{"name":"getOwnPropertyDescriptor","generated":{"line":49,"column":20},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":47,"column":20}},{"generated":{"line":49,"column":44},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":47,"column":13}},{"name":"ctx","generated":{"line":49,"column":45},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":47,"column":45}},{"generated":{"line":49,"column":48},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":47,"column":13}},{"name":"name","generated":{"line":49,"column":50},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":47,"column":50}},{"generated":{"line":49,"column":54},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":47,"column":13}},{"generated":{"line":49,"column":55},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":47,"column":2}},{"generated":{"line":50,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":47,"column":2}},{"name":"_super","generated":{"line":50,"column":6},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":48,"column":6}},{"generated":{"line":50,"column":12},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":48,"column":12}},{"generated":{"line":50,"column":15},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":48,"column":15}},{"generated":{"line":50,"column":27},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":48,"column":27}},{"generated":{"line":50,"column":28},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":48,"column":29}},{"generated":{"line":50,"column":29},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":47,"column":2}},{"generated":{"line":52,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":50,"column":2}},{"name":"_get","generated":{"line":52,"column":6},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":50,"column":6}},{"generated":{"line":52,"column":10},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":50,"column":10}},{"generated":{"line":52,"column":14},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":50,"column":14}},{"generated":{"line":52,"column":29},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":50,"column":29}},{"name":"_get","generated":{"line":52,"column":36},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":50,"column":36}},{"generated":{"line":52,"column":40},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":50,"column":40}},{"name":"get","generated":{"line":52,"column":41},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":50,"column":41}},{"generated":{"line":52,"column":44},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":50,"column":2}},{"name":"_super","generated":{"line":52,"column":46},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":51,"column":4}},{"generated":{"line":52,"column":52},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":51,"column":10}},{"name":"_get","generated":{"line":52,"column":55},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":51,"column":13}},{"generated":{"line":52,"column":59},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":51,"column":17}},{"name":"get","generated":{"line":52,"column":60},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":51,"column":18}},{"generated":{"line":52,"column":63},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":51,"column":4}},{"name":"Object","generated":{"line":53,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":53,"column":2}},{"name":"Object","generated":{"line":53,"column":2},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":53,"column":2}},{"generated":{"line":53,"column":8},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":53,"column":8}},{"name":"defineProperty","generated":{"line":53,"column":9},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":53,"column":9}},{"generated":{"line":53,"column":23},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":53,"column":2}},{"name":"ctx","generated":{"line":53,"column":24},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":53,"column":24}},{"generated":{"line":53,"column":27},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":53,"column":2}},{"name":"name","generated":{"line":53,"column":29},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":53,"column":29}},{"generated":{"line":53,"column":33},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":53,"column":2}},{"generated":{"line":53,"column":35},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":54,"column":4}},{"name":"get","generated":{"line":54,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":54,"column":6}},{"name":"get","generated":{"line":54,"column":4},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":54,"column":6}},{"generated":{"line":54,"column":7},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":54,"column":9}},{"generated":{"line":54,"column":9},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":54,"column":11}},{"name":"overwritingPropertyGetter","generated":{"line":54,"column":18},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":54,"column":20}},{"generated":{"line":54,"column":43},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":54,"column":11}},{"generated":{"line":54,"column":46},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":54,"column":48}},{"generated":{"line":55,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":55,"column":8}},{"generated":{"line":56,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":56,"column":8}},{"generated":{"line":57,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":57,"column":8}},{"generated":{"line":58,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":58,"column":8}},{"generated":{"line":59,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":59,"column":8}},{"generated":{"line":60,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":60,"column":8}},{"generated":{"line":61,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":61,"column":8}},{"generated":{"line":62,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":62,"column":8}},{"generated":{"line":63,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":63,"column":8}},{"generated":{"line":64,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":64,"column":8}},{"generated":{"line":65,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":65,"column":8}},{"generated":{"line":66,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":66,"column":8}},{"generated":{"line":67,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":67,"column":8}},{"generated":{"line":68,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":68,"column":8}},{"generated":{"line":69,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":69,"column":8}},{"generated":{"line":70,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":70,"column":8}},{"generated":{"line":70,"column":10},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":70,"column":12}},{"name":"isProxyEnabled","generated":{"line":70,"column":11},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":70,"column":13}},{"generated":{"line":70,"column":25},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":70,"column":27}},{"generated":{"line":70,"column":27},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":70,"column":12}},{"generated":{"line":70,"column":31},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":70,"column":33}},{"name":"flag","generated":{"line":70,"column":32},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":70,"column":34}},{"generated":{"line":70,"column":36},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":70,"column":38}},{"generated":{"line":70,"column":37},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":70,"column":39}},{"generated":{"line":70,"column":41},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":70,"column":38}},{"generated":{"line":70,"column":43},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":70,"column":45}},{"generated":{"line":70,"column":53},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":70,"column":38}},{"generated":{"line":70,"column":54},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":70,"column":8}},{"generated":{"line":70,"column":56},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":70,"column":58}},{"name":"flag","generated":{"line":71,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":71,"column":10}},{"name":"flag","generated":{"line":71,"column":8},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":71,"column":10}},{"generated":{"line":71,"column":12},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":71,"column":14}},{"generated":{"line":71,"column":13},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":71,"column":15}},{"generated":{"line":71,"column":17},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":71,"column":14}},{"generated":{"line":71,"column":19},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":71,"column":21}},{"generated":{"line":71,"column":25},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":71,"column":14}},{"name":"overwritingPropertyGetter","generated":{"line":71,"column":27},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":71,"column":29}},{"generated":{"line":71,"column":52},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":71,"column":14}},{"generated":{"line":71,"column":53},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":71,"column":10}},{"generated":{"line":72,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":72,"column":9}},{"generated":{"line":72,"column":7},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":54,"column":48}},{"generated":{"line":72,"column":8},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":74,"column":8}},{"generated":{"line":73,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":75,"column":8}},{"generated":{"line":74,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":76,"column":8}},{"generated":{"line":77,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":77,"column":8}},{"name":"origLockSsfi","generated":{"line":77,"column":10},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":77,"column":12}},{"generated":{"line":77,"column":22},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":77,"column":24}},{"name":"flag","generated":{"line":77,"column":25},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":77,"column":27}},{"generated":{"line":77,"column":29},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":77,"column":31}},{"generated":{"line":77,"column":30},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":77,"column":32}},{"generated":{"line":77,"column":34},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":77,"column":31}},{"generated":{"line":77,"column":36},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":77,"column":38}},{"generated":{"line":77,"column":46},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":77,"column":31}},{"generated":{"line":77,"column":47},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":77,"column":8}},{"name":"flag","generated":{"line":78,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":78,"column":8}},{"name":"flag","generated":{"line":78,"column":6},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":78,"column":8}},{"generated":{"line":78,"column":10},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":78,"column":12}},{"generated":{"line":78,"column":11},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":78,"column":13}},{"generated":{"line":78,"column":15},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":78,"column":12}},{"generated":{"line":78,"column":17},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":78,"column":19}},{"generated":{"line":78,"column":27},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":78,"column":12}},{"generated":{"line":78,"column":29},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":78,"column":31}},{"generated":{"line":78,"column":33},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":78,"column":12}},{"generated":{"line":78,"column":34},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":78,"column":8}},{"generated":{"line":79,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":79,"column":8}},{"name":"result","generated":{"line":79,"column":10},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":79,"column":12}},{"generated":{"line":79,"column":16},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":79,"column":18}},{"name":"getter","generated":{"line":79,"column":19},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":79,"column":21}},{"generated":{"line":79,"column":25},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":79,"column":27}},{"name":"_super","generated":{"line":79,"column":26},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":79,"column":28}},{"generated":{"line":79,"column":32},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":79,"column":27}},{"generated":{"line":79,"column":33},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":79,"column":21}},{"name":"call","generated":{"line":79,"column":34},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":79,"column":36}},{"generated":{"line":79,"column":38},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":79,"column":21}},{"generated":{"line":79,"column":39},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":79,"column":41}},{"generated":{"line":79,"column":43},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":79,"column":21}},{"generated":{"line":79,"column":44},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":79,"column":8}},{"name":"flag","generated":{"line":80,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":80,"column":8}},{"name":"flag","generated":{"line":80,"column":6},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":80,"column":8}},{"generated":{"line":80,"column":10},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":80,"column":12}},{"generated":{"line":80,"column":11},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":80,"column":13}},{"generated":{"line":80,"column":15},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":80,"column":12}},{"generated":{"line":80,"column":17},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":80,"column":19}},{"generated":{"line":80,"column":27},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":80,"column":12}},{"name":"origLockSsfi","generated":{"line":80,"column":29},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":80,"column":31}},{"generated":{"line":80,"column":41},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":80,"column":12}},{"generated":{"line":80,"column":42},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":80,"column":8}},{"generated":{"line":82,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":82,"column":8}},{"name":"result","generated":{"line":82,"column":10},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":82,"column":12}},{"generated":{"line":82,"column":16},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":82,"column":18}},{"name":"undefined","generated":{"line":82,"column":21},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":82,"column":23}},{"generated":{"line":82,"column":30},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":82,"column":8}},{"generated":{"line":82,"column":32},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":82,"column":34}},{"generated":{"line":83,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":83,"column":10}},{"name":"result","generated":{"line":83,"column":15},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":83,"column":17}},{"generated":{"line":83,"column":21},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":83,"column":10}},{"generated":{"line":84,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":84,"column":9}},{"generated":{"line":86,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":86,"column":8}},{"name":"newAssertion","generated":{"line":86,"column":10},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":86,"column":12}},{"generated":{"line":86,"column":22},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":86,"column":24}},{"generated":{"line":86,"column":25},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":86,"column":27}},{"name":"chai","generated":{"line":86,"column":29},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":86,"column":31}},{"generated":{"line":86,"column":33},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":86,"column":35}},{"name":"Assertion","generated":{"line":86,"column":34},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":86,"column":36}},{"generated":{"line":86,"column":43},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":86,"column":27}},{"generated":{"line":86,"column":45},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":86,"column":8}},{"name":"transferFlags","generated":{"line":87,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":87,"column":8}},{"name":"transferFlags","generated":{"line":87,"column":6},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":87,"column":8}},{"generated":{"line":87,"column":19},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":87,"column":21}},{"generated":{"line":87,"column":20},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":87,"column":22}},{"generated":{"line":87,"column":24},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":87,"column":21}},{"name":"newAssertion","generated":{"line":87,"column":26},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":87,"column":28}},{"generated":{"line":87,"column":38},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":87,"column":21}},{"generated":{"line":87,"column":39},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":87,"column":8}},{"generated":{"line":88,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":88,"column":8}},{"name":"newAssertion","generated":{"line":88,"column":13},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":88,"column":15}},{"generated":{"line":88,"column":25},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":88,"column":8}},{"generated":{"line":89,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":89,"column":7}},{"generated":{"line":89,"column":5},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":54,"column":4}},{"name":"configurable","generated":{"line":90,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":90,"column":6}},{"name":"configurable","generated":{"line":90,"column":4},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":90,"column":6}},{"generated":{"line":90,"column":16},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":90,"column":18}},{"generated":{"line":90,"column":18},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":90,"column":20}},{"generated":{"line":91,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":54,"column":4}},{"generated":{"line":91,"column":3},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":53,"column":2}},{"generated":{"line":92,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":92,"column":1}},{"generated":{"line":92,"column":1},"source":"node_modules/chai/lib/chai/utils/overwriteProperty.js","original":{"line":46,"column":0}}],"sources":{"node_modules/chai/lib/chai/utils/overwriteProperty.js":"/*!\n * Chai - overwriteProperty utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\nvar chai = require('../../chai');\nvar flag = require('./flag');\nvar isProxyEnabled = require('./isProxyEnabled');\nvar transferFlags = require('./transferFlags');\n\n/**\n * ### .overwriteProperty(ctx, name, fn)\n *\n * Overwrites an already existing property getter and provides\n * access to previous value. Must return function to use as getter.\n *\n * utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) {\n * return function () {\n * var obj = utils.flag(this, 'object');\n * if (obj instanceof Foo) {\n * new chai.Assertion(obj.name).to.equal('bar');\n * } else {\n * _super.call(this);\n * }\n * }\n * });\n *\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.overwriteProperty('foo', fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(myFoo).to.be.ok;\n *\n * @param {Object} ctx object whose property is to be overwritten\n * @param {String} name of property to overwrite\n * @param {Function} getter function that returns a getter function to be used for name\n * @namespace Utils\n * @name overwriteProperty\n * @api public\n */\n\nmodule.exports = function overwriteProperty(ctx, name, getter) {\n var _get = Object.getOwnPropertyDescriptor(ctx, name)\n , _super = function () {};\n\n if (_get && 'function' === typeof _get.get)\n _super = _get.get\n\n Object.defineProperty(ctx, name,\n { get: function overwritingPropertyGetter() {\n // Setting the `ssfi` flag to `overwritingPropertyGetter` causes this\n // function to be the starting point for removing implementation frames\n // from the stack trace of a failed assertion.\n //\n // However, we only want to use this function as the starting point if\n // the `lockSsfi` flag isn't set and proxy protection is disabled.\n //\n // If the `lockSsfi` flag is set, then either this assertion has been\n // overwritten by another assertion, or this assertion is being invoked\n // from inside of another assertion. In the first case, the `ssfi` flag\n // has already been set by the overwriting assertion. In the second\n // case, the `ssfi` flag has already been set by the outer assertion.\n //\n // If proxy protection is enabled, then the `ssfi` flag has already been\n // set by the proxy getter.\n if (!isProxyEnabled() && !flag(this, 'lockSsfi')) {\n flag(this, 'ssfi', overwritingPropertyGetter);\n }\n\n // Setting the `lockSsfi` flag to `true` prevents the overwritten\n // assertion from changing the `ssfi` flag. By this point, the `ssfi`\n // flag is already set to the correct starting point for this assertion.\n var origLockSsfi = flag(this, 'lockSsfi');\n flag(this, 'lockSsfi', true);\n var result = getter(_super).call(this);\n flag(this, 'lockSsfi', origLockSsfi);\n\n if (result !== undefined) {\n return result;\n }\n\n var newAssertion = new chai.Assertion();\n transferFlags(this, newAssertion);\n return newAssertion;\n }\n , configurable: true\n });\n};\n"},"lineCount":null}},"hash":"8961bded7b55dd420214bf6566e2a893","cacheData":{"env":{}}} |