You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportfunctionassertUint8ArrayOrArrayBuffer(value: unknown): asserts value is Uint8Array|ArrayBuffer;
65
+
51
66
/**
52
67
Convert a value to a `Uint8Array` without copying its data.
53
68
54
-
This can be useful for converting a `Buffer` to a pure `Uint8Array`. `Buffer` is already an `Uint8Array` subclass, but [`Buffer` alters some behavior](https://sindresorhus.com/blog/goodbye-nodejs-buffer), so it can be useful to cast it to a pure `Uint8Array` before returning it.
69
+
This can be useful for converting a `Buffer` to a pure `Uint8Array`. `Buffer` is already a `Uint8Array` subclass, but [`Buffer` alters some behavior](https://sindresorhus.com/blog/goodbye-nodejs-buffer), so it can be useful to cast it to a pure `Uint8Array` before returning it.
55
70
56
71
Tip: If you want a copy, just call `.slice()` on the return value.
Convert a value to a `Uint8Array` without copying its data.
71
84
72
-
This can be useful for converting a `Buffer` to a pure `Uint8Array`. `Buffer` is already an`Uint8Array` subclass, but [`Buffer` alters some behavior](https://sindresorhus.com/blog/goodbye-nodejs-buffer), so it can be useful to cast it to a pure `Uint8Array` before returning it.
85
+
This can be useful for converting a `Buffer` to a pure `Uint8Array`. `Buffer` is already a`Uint8Array` subclass, but [`Buffer` alters some behavior](https://sindresorhus.com/blog/goodbye-nodejs-buffer), so it can be useful to cast it to a pure `Uint8Array` before returning it.
73
86
74
87
Tip: If you want a copy, just call `.slice()` on the return value.
0 commit comments