- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
15 lines
412 B
JavaScript
15 lines
412 B
JavaScript
'use strict';
|
|
|
|
var callBound = require('call-bound');
|
|
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
|