1.0.0 • Published 25 days ago

@f1stnpm2/tenetur-provident-unde v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
25 days ago

@f1stnpm2/tenetur-provident-unde Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Is this value a JS Typed Array? This module works cross-realm/iframe, does not depend on instanceof or mutable properties, and despite ES6 Symbol.toStringTag.

Example

var isTypedArray = require('@f1stnpm2/tenetur-provident-unde');
var assert = require('assert');

assert.equal(false, isTypedArray(undefined));
assert.equal(false, isTypedArray(null));
assert.equal(false, isTypedArray(false));
assert.equal(false, isTypedArray(true));
assert.equal(false, isTypedArray([]));
assert.equal(false, isTypedArray({}));
assert.equal(false, isTypedArray(/a/g));
assert.equal(false, isTypedArray(new RegExp('a', 'g')));
assert.equal(false, isTypedArray(new Date()));
assert.equal(false, isTypedArray(42));
assert.equal(false, isTypedArray(NaN));
assert.equal(false, isTypedArray(Infinity));
assert.equal(false, isTypedArray(new Number(42)));
assert.equal(false, isTypedArray('foo'));
assert.equal(false, isTypedArray(Object('foo')));
assert.equal(false, isTypedArray(function () {}));
assert.equal(false, isTypedArray(function* () {}));
assert.equal(false, isTypedArray(x => x * x));
assert.equal(false, isTypedArray([]));

assert.ok(isTypedArray(new Int8Array()));
assert.ok(isTypedArray(new Uint8Array()));
assert.ok(isTypedArray(new Uint8ClampedArray()));
assert.ok(isTypedArray(new Int16Array()));
assert.ok(isTypedArray(new Uint16Array()));
assert.ok(isTypedArray(new Int32Array()));
assert.ok(isTypedArray(new Uint32Array()));
assert.ok(isTypedArray(new Float32Array()));
assert.ok(isTypedArray(new Float64Array()));
assert.ok(isTypedArray(new BigInt64Array()));
assert.ok(isTypedArray(new BigUint64Array()));

Tests

Simply clone the repo, npm install, and run npm test

TypedArrayvalue$.extendformatjasminecloneposewatchFilecssString.prototype.matchAllbusycss-in-jsanimationutilitiescachesetImmediateRFC-6455callbindflagsTypeScriptpuremimetypeschaiRegExp#flagsObject.definePropertyoperating-system0fileECMAScript 2016Array.prototype.filterHyBideep-copykoreanjsonpathcolumnsdescriptorpluginperformantstarterauthdescriptionprunetapviewiteratemime-dbforEachjsonschemaUint32Arraypnpm9popmotionfast-copypasswordserializebabel-coresharedeast-asian-widthfast-cloneassertextensionmixinsjsInt16ArraynativewatchingRxdependenciesmkdirAsyncIteratorpropkarmajwtwritableiterationUint16ArraysettercoresigtermRegExp.prototype.flagseslintconfigtouchestreecensorxhrESstylingfindwarninghelpersfindLastsequencejsxdateinputsanitizationobjises-shimssignalshandlersyamljavascriptwhichquerystringpackage.jsonreact poseIteratortrimLeftstreams2stableeventEmitterfunctionthroatxtermsanitizeMapquotetypanionES2016prettyairbnbimportxsspromisesstringifierawaitexpresseventDispatcherrandomintrinsiccore-jsbindECMAScript 2022YAMLharmonypackagecolumncliefficientsyntaxerrorastpropertydeepWeakMapperformancecoercibleomitformsjoiconsumeoutputtacitimmutablelockfileminimalwaapibrowsersymlinksArray.prototype.containsnamecompilerfastcopykeyreadableargvbrowserslistsuperagenteslintdescriptorsmatchECMAScript 2020Object.assignramdaqueueMicrotaskECMAScript 2015findupform-validationrfc4122es6widthtoobject6to5WeakSetprocessletarktypesymlinkpathECMAScript 7stylesdataString.prototype.trimless.jspreserve-symlinksArray.prototype.flattenframeworkcompareBigUint64ArraymovebyteLengtheventstesterbundlerpreprocessorgetOwnPropertyDescriptorassertionextramulti-packageArray.prototype.findLastbootstrap lesstypescriptreact-hook-formonceoptimizershamasciiwalkcolor_.extendtoArraysymbolawesomesauceponyfillECMAScript 5ES2020util.inspectprefixlruaccessorgesturesregular expressionfind-upspeedES6bundlingavafast-deep-clonecss variablerm -frregexptextes7lengthcodespostcss-plugindeep-cloneRxJSES3monorepolinkwriteweaksetnegativecallboundvestfastifyURLutilsfswindowsreal-timetrimRightreduxreadablestreamtrimnopeObservablejQueryCSSapolloprotobufarraysprototddprivate dataES5shebangconcurrencyObject.fromEntriesURLSearchParamses2017enderjsdiffpromiseES2018languagetc39listenersreact animationparentsjson-schemaerrorinternalnpmdirpolyfillcreateindicatorfetchsomestyled-componentsupjson-schema-validatorECMAScript 2021stringecmascriptmatchAllenvironmentiefseventswordbreakfilterwalkingerror-handlingbytefpa11yreactPush
1.0.0

25 days ago