structurae
Advanced tools
Comparing version 1.7.2 to 1.7.3
@@ -7,8 +7,12 @@ # Changelog | ||
## [1.7.3] - 2019-09-13 | ||
## Fixed | ||
- Handle non-string values in StringView.from | ||
## [1.7.2] - 2019-09-13 | ||
## Added | ||
- StringView.from uses TextEncoder#encodeInto | ||
- Add StringView.from that uses TextEncoder#encodeInto | ||
## Changed | ||
- ArrayView supports strings and replaces StringArrayView | ||
- Support strings in ArrayView replacing StringArrayView | ||
@@ -15,0 +19,0 @@ ## [1.7.1] - 2019-09-11 |
@@ -68,3 +68,3 @@ /** | ||
const view = this.get(i); | ||
array[i] = view ? view.toObject() : undefined; | ||
array[i] = view ? view.toJSON() : undefined; | ||
} | ||
@@ -71,0 +71,0 @@ return array; |
@@ -342,3 +342,3 @@ /** | ||
* @param {ArrayLike<number>|string} arrayLike | ||
* @param {Function|Uint8Array|StringView} [mapFn] | ||
* @param {Function|Uint8Array} [mapFn] | ||
* @param {Object} [thisArg] | ||
@@ -348,3 +348,3 @@ * @returns {Uint8Array|StringView} | ||
static from(arrayLike, mapFn, thisArg) { | ||
if (typeof arrayLike !== 'string') return super.from(arrayLike, mapFn, thisArg); | ||
if (arrayLike && typeof arrayLike !== 'string') return super.from(arrayLike, mapFn, thisArg); | ||
if (!mapFn) return new this(this.encoder.encode(arrayLike).buffer); | ||
@@ -351,0 +351,0 @@ mapFn.fill(0); |
{ | ||
"name": "structurae", | ||
"version": "1.7.2", | ||
"version": "1.7.3", | ||
"description": "Data structures for performance-sensitive modern JavaScript applications.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
196661