1.0.0 • Published 22 days ago

@rabiepenpm/itaque-ipsam-at v1.0.0

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

@rabiepenpm/itaque-ipsam-at 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('@rabiepenpm/itaque-ipsam-at');
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

stringstyled-componentses8prefixbluebirdtapmkdiriteratetimenopesyntaxerrorpositivewordbreakec2ECMAScript 2017cryptvalidationjapaneseesviewyuptouchendpointkoreanframeworkutilityURLSearchParamsclass-validatorSetes2017deep-copyarraybufferSymbol.toStringTaglogginggraphqlbcrypteslint-pluginautoscalinggetPrototypeOfECMAScript 2016xhrES2021IteratorsetImmediateutil.inspectJSONcharacterssymbolsAsyncIteratorreadgetOwnPropertyDescriptorBigUint64Arrayhigher-orderdependenciesArray.prototype.flatwatcherflatTypeScriptstringifyeveryimportexportwidthamazonconcurrencyfilefindinstallerArray.prototype.findLasttyped arraysameValueZeronested cssformlessES7mochagenericscss-in-jsArray.prototype.flattenWeakMapfromTypedArraysequencebatchlogcurlmetadatadayjshookformES2015sigintdomInt32Arraynumbercomputed-typeshasOwncloudformationreducerECMAScript 2021Uint8ArrayArrayBufferslotagentObject.assignreducegdpres-abstractnpmES8livelanguagedataViewiteratorwindowsSymbolpromisesObservablecligradients css3swffast-deep-copypredictable$.extenddiffincludesECMAScript 2019ES2018bufferextendcsstypeofpackageglobbootstrap cssequalitysymlinkcompilerdataflagUint32ArraywritableserializationECMAScript 7bootstrap lessnodetoSortedphonehandlerscircularreplaybufferssettingsWebSocketurllook-upprototypeshampnpm9modulesRFC-6455has-ownworkerReactiveExtensionsweakmaptoobjectcreatedeterministicprotocol-buffersfindupget-0vestUnderscoreimportonceasyncpipenativetypesafeString.prototype.trimobjectcolumnsrandommonoreposnses2015sharedarraybuffereventDispatcherMicrosoftfluxvisualdeepequalset256dataviewbyteLengthES2023configECMAScript 2015duplexpromisenameschinesecolorsbrowserassertwafstylingform-validationmatchAlldeep-clonepruneESnextuuidcontainsMapenvironmentclassesES2022superagentoffsetWebSocketsdeletejoiECMAScript 3mimetypesstructuredCloneworkspace:*fastifyquoteprivate datajwtoptimistES2016preserve-symlinkswritejsdomsearchdebugpackage.jsonirqmake dirextrasinatrachaimergeenumerableqstoArrayvaluerobustInt8ArrayupspecURLmodulerestdescriptorecmascriptwalkfunctionsdotenvArray.prototype.filterbeanstalkhttpssignales-shimsschemetypedarraysproxyStyleSheetfullfunctionalstylewgetformatshellfseventsloggerestreematchArraywatchinghotECMAScript 2018typescriptbusyformstoStringTagsqsfindLastnegative zeroObservablesECMAScript 2020argvartutilitiesObject.islimitroute53middlewaresimpledbUint16ArrayjscallbindpackagespropertieschromeparsingboundhasOwnPropertytrimStartreact-testing-libraryvpcidutilmatchesECMAScript 6breaktoolsstdlibpostcssbrowserslistpathreact-hook-formminimalsymbolmapreducecloudtrailwalkinglimitedbindgroupByextensionerrormobile_.extendrmdirshimcompile lessFloat64ArrayESsignalsJSON-SchematypedarrayparentStreamprogresspicomatchreadablestreamfastcopyqueueMicrotask.envyamlerror-handlingjsdiffECMAScript 5linksyntaxconcatdom-testing-libraryfilterhashcss nestingcoercibleBigInt64ArrayworkflowavastatelessemrRxJSes7PushbyteOffsetshebangwarningsharedomitencryptionwhichES3requesteslintconfigstateconfigurablesesremoveparsefast-copyspinnersdefinePropertyexit-codeescapeObject.definePropertyconsolefindLastIndexlinewrapoutputCSSStyleDeclarationflattenoptimizertddapiregular expressionappprocessfigletcopyquerystringstylesstreams2passwordjsonpathcomparemimelockfileargparsewordwraplengthprettybundlerstylesheetArrayBuffer.prototype.slicefind-uproutercacheless compilerschemaES2017deepcopyairbnbloadingeventEmittergetoptsidea11yjestvaluesimmutabletestercallisdependency managerrdsttyawesomesauceansireadabletermelectrones2018RegExp#flagscolores-shim APIlinuxsetPrototypeOfbrowserlistrestfulenvastopenperformanceObject.keysruntimeregexpwebpreprocessorsetterpostcss-pluginkarmaargumentRxnodejscall-bindreactmapdeepclonetrimLeftarrayapollocodescallboundECMAScript 2023css variableforEachcss lesstaskYAMLstreamswatchFilequeryES5classnamesredux-toolkitelmdirectorydebuggertypedes6functionauthenticationmulti-packagebyterangeerrorcloudfrontiemomenttrimEndrgbes5StreamseslintpluginArray.prototype.flatMapinstringifierwaitindicator__proto__uninstalltostringtagauthtakewhatwgi18n[[Prototype]]bundlingweaksetregularlistenersinputzodjasminetestingPromiseobjxtermObject.entriessafestoragegatewaysortcorssymlinksmime-dbcommanderInt16Arrayqueuefile systemfastcloneReactiveXparentsprotoWeakSetthroattypeerrorconcatMapdefineinternal slotperformantarrayszeronameHyBiflagsformattingcoloureventscore-jsrateFloat32Arrayproperty@@toStringTagpackage managerconnectcjkinterruptsl10nawaitglacierratelimitcode pointstypeprotobuftraverseslicecolumnexecregular expressionsReflect.getPrototypeOfstableArray.prototype.includesinspectexpressstatusinstallreact-hookstoolkitArray.prototype.containsimmerio-tsregexvalidateasciitriminvariantUint8ClampedArrayObject.fromEntriesawsaccessibilitystarterajaxcommand-linefull-widthflatMapclientstreamscheme-validationthrottlecharacterautoprefixerwatchlruiterationpushES2020mrujsonexitidleemojikinesislesscssoptioneast-asian-widthshrinkwraphooksvalidclonevariables in cssbannerrapidrfc4122expressionresolvekeysgetterlastmkdirsrmnegativerecursivemacosponyfillmkdirpclassnamevariablesguidObject.getPrototypeOfArray.prototype.findLastIndexdirpyyamlfolderserializerhasmaketc39sigterminferenceentriesdynamodbrm -rfhelpersObjectcommandterminalassertionsome
1.0.0

22 days ago