@vertexvis/stream-api 0.21.1-testing.13 → 0.21.1-testing.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1272,30 +1272,13 @@ function newError(name) {
1272
1272
  merge(this, properties);
1273
1273
  }
1274
1274
 
1275
- CustomError.prototype = Object.create(Error.prototype, {
1276
- constructor: {
1277
- value: CustomError,
1278
- writable: true,
1279
- enumerable: false,
1280
- configurable: true,
1281
- },
1282
- name: {
1283
- get: function get() { return name; },
1284
- set: undefined,
1285
- enumerable: false,
1286
- // configurable: false would accurately preserve the behavior of
1287
- // the original, but I'm guessing that was not intentional.
1288
- // For an actual error subclass, this property would
1289
- // be configurable.
1290
- configurable: true,
1291
- },
1292
- toString: {
1293
- value: function value() { return this.name + ": " + this.message; },
1294
- writable: true,
1295
- enumerable: false,
1296
- configurable: true,
1297
- },
1298
- });
1275
+ (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;
1276
+
1277
+ Object.defineProperty(CustomError.prototype, "name", { get: function() { return name; } });
1278
+
1279
+ CustomError.prototype.toString = function toString() {
1280
+ return this.name + ": " + this.message;
1281
+ };
1299
1282
 
1300
1283
  return CustomError;
1301
1284
  }