ts-enum-util
Advanced tools
Comparing version 3.0.6 to 3.1.0
@@ -70,2 +70,9 @@ "use strict"; | ||
}; | ||
Object.defineProperty(EnumWrapper.prototype, Symbol.toStringTag, { | ||
get: function () { | ||
return "EnumWrapper"; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
@@ -75,2 +82,6 @@ * @return "[object EnumWrapper]" | ||
EnumWrapper.prototype.toString = function () { | ||
// NOTE: overriding toString in addition to Symbol.toStringTag | ||
// for maximum compatibility with older runtime environments | ||
// that do not implement Object.prototype.toString in terms | ||
// of Symbol.toStringTag | ||
return "[object EnumWrapper]"; | ||
@@ -77,0 +88,0 @@ }; |
@@ -68,2 +68,9 @@ /** | ||
}; | ||
Object.defineProperty(EnumWrapper.prototype, Symbol.toStringTag, { | ||
get: function () { | ||
return "EnumWrapper"; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
@@ -73,2 +80,6 @@ * @return "[object EnumWrapper]" | ||
EnumWrapper.prototype.toString = function () { | ||
// NOTE: overriding toString in addition to Symbol.toStringTag | ||
// for maximum compatibility with older runtime environments | ||
// that do not implement Object.prototype.toString in terms | ||
// of Symbol.toStringTag | ||
return "[object EnumWrapper]"; | ||
@@ -75,0 +86,0 @@ }; |
@@ -112,2 +112,3 @@ /** | ||
private constructor(); | ||
readonly [Symbol.toStringTag]: string; | ||
/** | ||
@@ -114,0 +115,0 @@ * @return "[object EnumWrapper]" |
{ | ||
"name": "ts-enum-util", | ||
"version": "3.0.6", | ||
"version": "3.1.0", | ||
"description": "TypeScript Enum Utilities", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -374,2 +374,3 @@ [![npm version](https://img.shields.io/npm/v/ts-enum-util.svg)](https://www.npmjs.com/package/ts-enum-util) | ||
- `Symbol.iterator` | ||
- `Symbol.toStringTag` | ||
@@ -376,0 +377,0 @@ ## Limitations |
@@ -184,2 +184,6 @@ /** | ||
public get [Symbol.toStringTag](): string { | ||
return "EnumWrapper"; | ||
} | ||
/** | ||
@@ -189,2 +193,6 @@ * @return "[object EnumWrapper]" | ||
public toString(): string { | ||
// NOTE: overriding toString in addition to Symbol.toStringTag | ||
// for maximum compatibility with older runtime environments | ||
// that do not implement Object.prototype.toString in terms | ||
// of Symbol.toStringTag | ||
return "[object EnumWrapper]"; | ||
@@ -191,0 +199,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
157952
2193
819