Comparing version 1.3.4 to 1.3.5
@@ -56,6 +56,11 @@ /*! | ||
/** | ||
* Converts BufferSource to ArrayBufferView specified view | ||
* @param data Buffer source | ||
* @param type Type of ArrayBufferView | ||
* @returns Specified ArrayBufferView | ||
* Converts a given `BufferSource` to the specified `ArrayBufferView` type. | ||
* @param data The `BufferSource` to convert. | ||
* @param type The `ArrayBufferView` constructor to use for the conversion. | ||
* @returns The converted `ArrayBufferView`. | ||
* @throws {TypeError} If the provided value is not of type `(ArrayBuffer or ArrayBufferView)`. | ||
* @remarks If incoming data is ArrayBufferView and it's type is equal to specified type | ||
* then it returns it without copying, otherwise it copies data into new ArrayBufferView | ||
* because incoming data can be ArrayBufferView with offset and length which is not equal | ||
* to buffer length | ||
*/ | ||
@@ -62,0 +67,0 @@ static toView<T extends ArrayBufferView>(data: BufferSource, type: ArrayBufferViewConstructor<T>): T; |
@@ -49,3 +49,3 @@ /*! | ||
static toView(data, type) { | ||
if (data instanceof type) { | ||
if (data.constructor === type) { | ||
return data; | ||
@@ -52,0 +52,0 @@ } |
@@ -51,3 +51,3 @@ /*! | ||
static toView(data, type) { | ||
if (data instanceof type) { | ||
if (data.constructor === type) { | ||
return data; | ||
@@ -54,0 +54,0 @@ } |
{ | ||
"name": "pvtsutils", | ||
"version": "1.3.4", | ||
"version": "1.3.5", | ||
"description": "pvtsutils is a set of common utility functions used in various Peculiar Ventures TypeScript based projects.", | ||
@@ -5,0 +5,0 @@ "main": "build/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
40789
987