1.0.0 • Published 1 year ago

@zibuthe7j11/facilis-quaerat-accusamus v1.0.0

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

@zibuthe7j11/facilis-quaerat-accusamus Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Which kind of Typed Array is this JavaScript value? Works cross-realm, without instanceof, and despite Symbol.toStringTag.

Example

var whichTypedArray = require('@zibuthe7j11/facilis-quaerat-accusamus');
var assert = require('assert');

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

assert.equal('Int8Array', whichTypedArray(new Int8Array()));
assert.equal('Uint8Array', whichTypedArray(new Uint8Array()));
assert.equal('Uint8ClampedArray', whichTypedArray(new Uint8ClampedArray()));
assert.equal('Int16Array', whichTypedArray(new Int16Array()));
assert.equal('Uint16Array', whichTypedArray(new Uint16Array()));
assert.equal('Int32Array', whichTypedArray(new Int32Array()));
assert.equal('Uint32Array', whichTypedArray(new Uint32Array()));
assert.equal('Float32Array', whichTypedArray(new Float32Array()));
assert.equal('Float64Array', whichTypedArray(new Float64Array()));
assert.equal('BigInt64Array', whichTypedArray(new BigInt64Array()));
assert.equal('BigUint64Array', whichTypedArray(new BigUint64Array()));

Tests

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

bluebirda11yCSSStyleDeclarationtesterisConcatSpreadablecss-in-jsduplexoncerecursivees-shim APIformwalking__proto__ECMAScript 2022mimetypesopenerextrafind-uphookformidlefastes5gesturesconcurrencystatelessqueueMicrotaskmacoscorsdombufferrmdircollectionbabeltostringtagcall-bindmonorepoES8variablessuperagentgenericssideArray.prototype.findLastcolourjwtjapaneseecmascriptsymbolsortedtypesafeyamlprotocol-bufferslimitedloggerpnpm9compile lessenumerablesettingsweaksethasjsxxdgxhrconnectdeterministicreduxratetimeECMAScript 2019inspectES3Mapfoldercssless.jsfastclonesharedtypescriptponyfill$.extendlinewraptyped arraywidthmkdireslintpluginfindvalidationomitprotoInt32ArrayasciiWebSocketsrandomgdprwriteframeworkpureglobtrimRighttddYAMLinvariantcommanderObject.definePropertymatchwordbreaktypedarrayJSONtypedcreateinternal slotstringObject.valuesdom-testing-libraryregexslotparsertrimEndopenscore-jstypanionmkdirstslibpackagetestmoduletraversefull-widthstreamsFloat32Arrayes2015pushstyled-componentsbootstrap cssstyleoptionArrayBuffer#slicemime-dbwhichpackagesentriesshellwarningsetterfantasy-landmrugraphqlbreakURLcryptzerosignalECMAScript 2020Array.prototype.findLastIndexpromiseswhatwgoperating-systemmime.envlaunchjson-schema-validatorjestcolumnBigUint64ArrayinternalflatMapprogressArray.prototype.filterECMAScript 2023directorylook-uplruparentrapidawaitsigintbundlerspinnersapiconfigdataviewttymatchAlltrimStartdescriptorswebsiteshrinkwrapUint32ArraywaapiefficientObject.assignconcatMapeventEmitterajaxthrottlequerywritablesearchdotenvtapeupeventDispatcherdatalintfastifyartObjectes7CSSsequencewgetajvObject.entriesenderPromiselesscssserializeObject.is6to5argumentstypedarrayscopyformatinputObject.fromEntriesloadingmatchestranspilernodejsMicrosoftgetterstatuslinkReflect.getPrototypeOfdefaultlessquotenamesclonehashmochatoSortedprivatemiddlewareobjectdateutilitiesratelimitthroatlettypeofassignTypedArrayless compileruser-streamsoptimistcurriedstableframerbindECMAScript 5Iteratorcode pointsbatchparsetypelibphonenumberInt8ArrayschemaArrayBufferwaitrequireimportfullwidthshimforEachPushbyteless mixinsBigInt64Arraymomentfast-clonefetches8equalgradients cssincludesTypeScriptjsonRxpathES2016ES2017sliceequalitytoStringTagsigtermparentsgetPrototypeOfenvimmutableterminalspeedflaginferencejson-schema-validationfseventsstructuredClonelinuxlookclientECMAScript 2017tsreact-testing-librarybddObject.keystranspilejQuerypackage manageroptimizerregexpnested cssmergeresolveECMAScript 2018karmaintrinsicdefinePropertyprototypesymlinkES2022sharedarraybuffertoolkittouchlanguageflattenoutputloggingjsthreecss variablestreams2syntaxerrorpassworddatastructureeditorcss nestingappArray.prototype.flat256classespackage.jsonfile systemkeyses2016shamES7ObservablesstyleguidesafesameValueZeroxtermfiletoArrayjasminetermfindupfast-copyhasOwnnumberinstallie
1.0.0

1 year ago