Spaces:
Sleeping
Sleeping
Download node_modules/array-buffer-byte-length/index.js from k-l-lambda/lotus: direct link, hf CLI and curl.
- Browser
- Download file 421 Bytes
-
https://huggingface.co/spaces/k-l-lambda/lotus/resolve/main/node_modules/array-buffer-byte-length/index.js
- Command line
-
hf download hf://spaces/k-l-lambda/lotus/node_modules/array-buffer-byte-length/index.js
-
curl -L -o index.js https://huggingface.co/spaces/k-l-lambda/lotus/resolve/main/node_modules/array-buffer-byte-length/index.js
421 Bytes
| ; | |
| var callBound = require('call-bind/callBound'); | |
| var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true); | |
| var isArrayBuffer = require('is-array-buffer'); | |
| /** @type {import('.')} */ | |
| module.exports = function byteLength(ab) { | |
| if (!isArrayBuffer(ab)) { | |
| return NaN; | |
| } | |
| return $byteLength ? $byteLength(ab) : ab.byteLength; | |
| }; // in node < 0.11, byteLength is an own nonconfigurable property | |