mirror of
https://github.com/10h30/odin-javascript-exercises.git
synced 2026-07-12 11:16:09 +09:00
Clean up the oopsie. Rebuild the blank exercises.
This commit is contained in:
+12
-4
@@ -51,20 +51,28 @@ var errorEx = function errorEx(name, properties) {
|
||||
}
|
||||
});
|
||||
|
||||
var overwrittenStack = null;
|
||||
|
||||
var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack');
|
||||
var stackGetter = stackDescriptor.get;
|
||||
var stackValue = stackDescriptor.value;
|
||||
delete stackDescriptor.value;
|
||||
delete stackDescriptor.writable;
|
||||
|
||||
stackDescriptor.set = function (newstack) {
|
||||
overwrittenStack = newstack;
|
||||
};
|
||||
|
||||
stackDescriptor.get = function () {
|
||||
var stack = (stackGetter)
|
||||
? stackGetter.call(this).split(/\r?\n+/g)
|
||||
: stackValue.split(/\r?\n+/g);
|
||||
var stack = (overwrittenStack || ((stackGetter)
|
||||
? stackGetter.call(this)
|
||||
: stackValue)).split(/\r?\n+/g);
|
||||
|
||||
// starting in Node 7, the stack builder caches the message.
|
||||
// just replace it.
|
||||
stack[0] = this.name + ': ' + this.message;
|
||||
if (!overwrittenStack) {
|
||||
stack[0] = this.name + ': ' + this.message;
|
||||
}
|
||||
|
||||
var lineCount = 1;
|
||||
for (var key in properties) {
|
||||
|
||||
+11
-11
@@ -1,27 +1,27 @@
|
||||
{
|
||||
"_from": "error-ex@^1.2.0",
|
||||
"_id": "error-ex@1.3.1",
|
||||
"_from": "error-ex@^1.3.1",
|
||||
"_id": "error-ex@1.3.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=",
|
||||
"_integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
|
||||
"_location": "/error-ex",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "error-ex@^1.2.0",
|
||||
"raw": "error-ex@^1.3.1",
|
||||
"name": "error-ex",
|
||||
"escapedName": "error-ex",
|
||||
"rawSpec": "^1.2.0",
|
||||
"rawSpec": "^1.3.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.2.0"
|
||||
"fetchSpec": "^1.3.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/parse-json"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
|
||||
"_shasum": "f855a86ce61adc4e8621c3cda21e7a7612c3a8dc",
|
||||
"_spec": "error-ex@^1.2.0",
|
||||
"_where": "/Users/cloyd/coderrr/odin/javascript-exercises/node_modules/parse-json",
|
||||
"_resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
|
||||
"_shasum": "b4ac40648107fdcdcfae242f428bea8a14d4f1bf",
|
||||
"_spec": "error-ex@^1.3.1",
|
||||
"_where": "/home/michael/projects/javascript-exercises/node_modules/parse-json",
|
||||
"bugs": {
|
||||
"url": "https://github.com/qix-/node-error-ex/issues"
|
||||
},
|
||||
@@ -75,7 +75,7 @@
|
||||
"pretest": "xo",
|
||||
"test": "mocha --compilers coffee:coffee-script/register"
|
||||
},
|
||||
"version": "1.3.1",
|
||||
"version": "1.3.2",
|
||||
"xo": {
|
||||
"rules": {
|
||||
"operator-linebreak": [
|
||||
|
||||
Reference in New Issue
Block a user