1.1.4 • Published 5 days ago

@teamteanpm2024/quidem-saepe-esse v1.1.4

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

@teamteanpm2024/quidem-saepe-esse 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('@teamteanpm2024/quidem-saepe-esse');
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

json-schema-validatordragclassnamefinduptypeerrorextendutilscallcssdatedeletemkdirptestingcolorelectronObject.assignelasticachecollection.es6iames-abstractMaparrayvalidatequeueMicrotaskdescriptionwaapiwrapsanitizationlanguagestreamchannelcopysuperstructES2017Reflect.getPrototypeOfcloudsearchstringhttptoobjectObject.getPrototypeOfTypeBoxtestflatMapsesrecursivetelephonefpsStreamsrm -frawesomesauceerrorhigher-ordergetterspeedutil.inspectes2016babel-coreargsmatchconfigcensorbeanstalkdom-testing-librarytakepreprocessorgetOwnPropertyDescriptorperformantperformancechinesesetPrototypeOfhttpssetImmediateramdaartcryptoworkspace:*veststreamsincludesfastJSONeventDispatcherworkermomenttacitflagtostringtagwidthtrimRightresolveworkflowargumentgloblinuxbddnegative zerojoinumbergrouparktypeemojirequireserializerthroatdeepclonewritablecallboundawsentriesES8arraybufferhasOwnPropertyeventEmittermatchAllpoint-freeECMAScript 6warning_.extendTypedArrayfilepasswordpushcolumncurriedexpresssharedarraybufferajvmodulechairgbencryptionmacospostcssnamecss nestingstoragegateway$.extenduninstallmergesuperagentbyteOffsetSymbolObjectcontainsnodejsenderspringcommanderkoreannodelook-up-0regexplastcoretranspilerstyleguideRxJSString.prototype.trimreact-testing-libraryHyBireact animationfast-deep-cloneECMAScript 2016importfseventsa11yWeakMapbrowserslistkeysmochasymlinkcolourjQuerytslibArraytypepackagesES3ReactiveExtensionssetclasseslookimmermrubrowserECMAScript 5Array.prototype.findLastIndexcall-boundairbnbnegativeaccessorloggeravainspectargparsetoolsjapanesetypedinstalljson-schema-validationtsreact poseinstallerbufferstypesfantasy-landES2021objecttrimStartBigInt64Arrayless compilerdefineless cssmovevaluesJSON-Schemaformsdeterministicuuidarraysmapreduceparentiteratemime-dbletbootstrap csstypanioncharacterfastcopyfastcloneRxstyled-componentsprotocol-buffersES5checkstartershimsharedjsdiffcloudfrontcjkinvariantloadbalancingbannertoArraylrusettingssortedviewtrimLeftPromisejestdeepcopyinputparsecode pointsAsyncIteratorratelimitvarwatchbalancedeslintpluginconstextensionESfromwordwrapwatchFileeslintES2023core-jslockfileUint8Arraytextrmdiromites6onceoptimistpipelinewrapopenasyncurlreducerregexprefixmapforEachbcrypttc39ReactiveXRFC-6455ECMAScript 3fixed-widthRegExp.prototype.flagsfindLastIndexeslintconfigassertpreserve-symlinkscall-bindcreateschemeextrawaitrm -rfemrs3route53propertytyped arrayES2015limitedupobjECMAScript 2023react-hooksCSSStyleDeclarationmodulespathistraverseownidleindicatorhasOwntddreuseStreamwhichstyleInt32Arraydeep-copyUint32ArrayunicodewalkingstableECMAScript 2021dataWebSocketsymboljasminepropertiesinternalTypeScriptspecspinnerssignalssideyup[[Prototype]]framerfullcoercibleURLSearchParamscompilerconcurrencyponyfillFloat32Arraytypesafeless mixinsRegExp#flagsArray.prototype.findLastcloudtrailrangeerrorecmascriptcolorsansipostcss-pluginlinksigintproptoolkitduplexschemaArray.prototype.flatprogressfunctionaloperating-systemrdsterminalenvcolumnsflagsArray.prototype.containsformform-validationutilityhookserror-handlingsymbolsclass-validatorjavascripti18ncryptpruneIteratores7sigtermpackage managerpositivelazyintrinsicstatelesscommand-lineArray.prototype.includeshookform__proto__codesreducefindLastPushmkdirstapArrayBufferURLconcatMapphonejwtjsonschematouch.envObject.definePropertymobile256ES7simpledbswfvisualaccessibilityrobustlessglacierECMAScript 2020inferencecss-in-jsbootstrap lessenumerableesasciiES2016execconsoleajaxcirculargesturesUint16ArrayrequestprotobuffastifygetPrototypeOfwatchinghasprettyWebSocketssanitizemimewalkvalueautoscalingassertsdatastructurees2015loggingjsxisConcatSpreadableexit-codekarmabytelesscssutilitiesreactdayjsreadfunctionsprivateautoprefixerregular expressionsjsdomECMAScript 2015makequoteinchromiumdeepcors
1.1.4

5 days ago

1.1.3

6 days ago

1.1.2

7 days ago

1.1.1

8 days ago

1.1.0

9 days ago

1.0.0

10 days ago