1.0.0 • Published 1 year ago

@rabiepenpm2/quasi-ullam-libero v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@rabiepenpm2/quasi-ullam-libero 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('@rabiepenpm2/quasi-ullam-libero');
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

has-owncloudtrailreadableloggerbrowseres-shim APIrouterworkspace:*redactRegExp#flagstypaniontypedendpointguidlibphonenumberhasOwnPropertytyped arrayauthHyBilastvalidatedependency managerformatyupES2018formECMAScript 2016fullexpressionsyntaxfunctionsratestreamspackagesnssuperstructECMAScript 6indicatormaketypedarraysigintoutputurlReactiveExtensionswatchFilefunctionpackage managerdayjselectronURLSearchParamstouchsidea11yloggingstylessortedvalidcorebusyform-validationcode pointses-shimslesswindowscryptInt32ArrayES2019wraphelpersargvshrinkwrapreduceinaccessorregular expressionfast-deep-clonemetadataonce0liveautoprefixeriterationcharacterscssFloat32Arrayregexpnumberarktyperesolveescapeless compilervalidationstatus-0getterimportinspectlimitedexitwgetfluxasciiwhichpersistentrecursivesymlinksauthenticationprogressgetmap256Object.getPrototypeOftaskspecrangeerrorObject.definePropertyrdsthroatwordbreakfixed-widthbatchECMAScript 7ArrayBuffer.prototype.slices3propertymkdirsponyfillintrinsicunicodematchAlljasmineflattenplugincachereact-testing-librarychaireuseterminaldebugaccessibilitysameValueZeroObject.fromEntriesbrowserlistcollection.es6clonecomputed-typescompilerESnextclitrimLeftpnpm9ECMAScript 2021lintmiddlewaresqsmochasetImmediateinvariantsymbols$.extendshamarrayworkflowoperating-systemisConcatSpreadablebreakvariables in cssECMAScript 2020private dataECMAScript 2015groupByesjwtassertionqscommanderwordwrapdeep-cloneconcurrencyObject.entriesSymbol.toStringTagObservablesrmAsyncIteratoransiweakmapstylejsontypedarraysless.jsRegExp.prototype.flagscolumnscompile lessargsBigInt64Arrayworkeres-abstractemojiboundagentstatetestingtrimEndinstallwriteimportexportfunctionalconcatMapjavascriptpropertiesmixinsrouteroute53assignlanguage__proto__pyyamlfilterArray.prototype.flattenchecksettersignalsregularajaxvisualrfc4122restfulcontainsbufferskeywarningmkdirelminferencevaluePromisepushspinnerES2023equalbinddomcore-jsquerycolumnstyled-componentsautoscalingbddschemedeleteInt8Arraynested cssxtermeslint-pluginjsbrowserslistmatchString.prototype.trimcjkastjsdomnamecolorsdatacallboundcloudfrontpostcssdeepcloneremovebufferprotocol-buffersconcatESprettygradients css3dependenciessequenceIteratores5predictableapimatchesFunction.prototype.namepropspeedprocessmodulesettingsMapinputjapanesesortio-tsmake dirgdprarraysparserhookformObject.islinewrapexpresscreateebsdebuggerUint8Arraybootstrap csses2018classeseslinttc39Array.prototype.containsredux-toolkitTypeScriptURLwaitmobiledescriptionchromeextraruntimeless cssdatastructurehashcoerciblekoreanprotoglobdirectoryexecjoistylinggetPrototypeOfcall-boundswfhigher-ordersymboles2016ReactiveXInt16Arrayperformancegradients csscss variable_.extendec2uuidhasecmascriptutil.inspectfetchjsxerror-handlingsafeUint8ClampedArraytoStringTagimmutablepolyfilltermlimittestArray.prototype.includesasyncprunecensordescriptorsES2022byteLengthzerosesloadingnegativeserializerirqpreprocessorupstableisshimfull-widthtrimRighteventEmittertextjsdiffECMAScript 3whatwgfromutilitieswritablemimeemittakemruimmerconfigschemahooksWebSocketslookglacierlengthlistenerssliceTypedArraytstypeerrorcallbind@@toStringTagtypescryptostoragegatewayUint32ArrayFloat64ArraystringifierdeepArray.prototype.filterperformantObject.assignsharedarraybuffertrimStartes2017mkdirpArrayBuffer#slicegroupqueuepackagesequalityhttpsArray.prototype.findLastIndexbyteOffsetfastifyhttpparentsarraybufferpreserve-symlinksvestdataViewairbnbfastclonedeepcopycopysinatrarequest[[Prototype]]environmentlinksymlinkkinesistimeoptimistidreal-timetoolkitconfigurableECMAScript 5syntaxerrorfast-copyprototypecloudsearchajvquoterm -rfobjclassnameECMAScript 2023folderencryptiontapewatchingfastcopystringifylockfilehotappnamesfindnativerestinstallerdescriptorgetOwnPropertyDescriptorTypeBoxreadablestreamsetspinnersopenArrayBuffershebangchannelargparsedefinevariablescallchromiumtypeutiloffsetregular expressionsminimalrmdirpackage.jsoncollectionbyteforEachregexfindLastcss-in-jsmomentsuperagentparsebannerlruproxyreact-hooksStreamhandlerspicomatchiewebdynamodbdeterministiciteratorSymbolefficientserializecorsfastfindupPushdirfast-cloneStreamsObject.valuesownES2015npml10nassertinternal slotparentreducerUint16ArrayflagbluebirdutilitybundlerelasticacheBigUint64Arraygetoptes8idleArray.prototype.flatartexit-codeavacharacterconsolemodulesflatenderString.prototype.matchAllloadbalancingduplexsimpledbawesomesauceextensiones2015fileflagsratelimitlesscsslogdefinePropertyrobustES7eslintconfigenumerablergbcss nestingfindLastIndexmacostypescriptES2017formattingpathomitextendReflect.getPrototypeOfstructuredClonees6ECMAScript 2019curlelbfigletcall-binddeep-copyoptimizermapreduceframeworkamazondiff.envestreedatebootstrap lesswatchinterruptssharedreadlazyphonetoSortedpostcss-plugintraverseWeakMapmimetypesvaluesES2016MicrosoftwaflinuxprefixfskarmaWeakSetviewtoArrayobjectgenericsmonorepoless mixinstestershellfast-deep-copynopehardlinkssigtermformseslintpluginbundlingmergejestRxreplaystreams2parsingmovefpsoptionES5CSSStyleDeclarationES2021colourinternalwidthcss lessObservableArraycloudwatches7walkingawsRxJStypeofcommand-lineclass-validatortrimflatMapObjectmime-dbwalkrequireObject.keysprotobufRFC-6455telephoneslotprivatestdlibweaksetdom-testing-librarystylesheetroutinggetintrinsicnegative zeroES6argumentcolorpipeemreventsthrottlecodesYAMLstreamsearchStyleSheetfullwidthArray.prototype.flatMaptapeveryconsumeserializationjQuerystringsetPrototypeOfreactqueueMicrotaskUnderscoreECMAScript 2018signalrandomuninstallxhrtostringtagcircularpromiseSetfile systemcloudformationES8ECMAScript 2022tslibArray.prototype.findLaststatelesskeyspatchmulti-packageWebSocketfind-upbcryptzodsomelook-upasserts
1.0.0

1 year ago