2.1.20 • Published 1 year ago

@devtea2027/nesciunt-esse-facilis-aspernatur v2.1.20

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

@devtea2027/nesciunt-esse-facilis-aspernatur 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('@devtea2027/nesciunt-esse-facilis-aspernatur');
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

Object.isflagsescapebreakrandomES8classnamequeueMicrotaskURLSearchParamstelephonelogargsES2019logginges-abstractECMAScript 3parsesetReflect.getPrototypeOfSymbol.toStringTagassignargumentpipeassertsaccessibilityomitgetoptdom-testing-libraryregular expressionsutilitycontainschinesecolorstypeofinternal slotautoprefixerflatgetintrinsicgenericsprettyArray.prototype.findLastIndexchaivariables in cssObservablefunctionalkarmajsdomimportsharedarraybuffervalidamazondiffmake dircloudformationawesomesaucewatchFileopenpackage.json@@toStringTagbeanstalkhandlerscryptdescriptorsserializertestingECMAScript 5iamvestexpressprivate dataswftapeagentshellratestatelessredactES6tostringtagqsarraybufferECMAScript 2021Object.keysgetkeysbootstrap cssES5postcssslotlasteslintpluginglobalasciivalidateWeakMapBigUint64ArrayStreamcolumnsprototypeoffsetidentifierskeyURLeslint-pluginWebSocketsES2021searchcommand-linetsliblookwordbreakflagtypesisConcatSpreadablerequestmakepolyfilljstoSortedpackage managerdeep-clonesequencejsonpathsettingsfindup_.extenddeepUint32Arrayes-shim APIflattenassertionhelpersspinnersbatchtoobjectexpressionaccessorwalkingregular expressionregularmkdircss variableenumerablefolderdeep-copyUint8ClampedArrayec2avautil.inspectObjectchromiumES2016throttlehotownclassesappconsumeECMAScript 2017HyBies2017resolvebrowserslisteslintcompilermiddlewarel10nbindbyteOffsetlesscsses7installerhashlintfiledatastructurefast-deep-copydynamodbstringes8globalsintrinsicjwtString.prototype.matchAlllimithttpenvironmentsequalsesreplaypackagesdataPromisematchesspecoutputsafeArray.prototype.findLastemrsyntaxerrorInt32Arrays3fetchreact-hookscollection.es6IteratorwritablejsxArray.prototype.filterfullwidthfromcall-bindrecursivereact-testing-libraryprefixTypedArraydefinePropertypicomatchdropeslintconfigchildtraversepnpm9private__proto__form-validationlinewrapObject.assignestreedataviewimmutablestateYAMLwebsitethroatschemasqsObservableselectronschemejapaneselaunchlrusortterminalbufferwalkObject.getPrototypeOffast-copyes-shimshookformextrabusyWebSocketString.prototype.trimrestfuldeletecurlconfigduplexwgetcloudfrontcmdes5callbindoncetrimStartprogressRegExp#flagsdeepcopyECMAScript 7findLastIndexuuidRxJSio-tspreprocessorcomparestarterArrayquerystringreadprotobufnodejspromisesES2022mixinsutilerrorelmdefinequotechannelsymbolstypedupreact-hook-formFloat32Arrayes2015256libphonenumberidArray.prototype.flattennodermECMAScript 2018awaitpostcss-pluginloadingconsolestylescss lesslessremovesetImmediatesuperstructfigletargparseconcatbluebird[[Prototype]]queryruntimefast-clonecreateArrayBuffer.prototype.sliceconnectcopytestajaxassertmkdirserror-handlingtrimFloat64Arraypreserve-symlinksbrowserrequiredebuggerMicrosoftargumentslanguagetsrfc4122iteratoriterationfastfixed-widthreadablestreaminspectplugintyped arrayvaluestyleArrayBuffer#slicelivei18nwatchdependenciesstylesheetstyleguidegradients cssvisualArray.prototype.includespatchproxyxdg-openinvariantconcatMapArray.prototype.containsWeakSettypeerrorclass-validatorclassnamesdeterministic$.extendgetterformatreadable.envparentparserECMAScript 2020elasticachelinkbootstrap lessopenseventEmittermimepyyamlpruneserializationoptimistrgbslicelazyformscompile lessfind-upwafbannermkdirpuninstalles6editorfilterUnderscoretddiedescriptionsameValueZeroeast-asian-widthcachehasOwnPropertytoolshardlinksqueuedefaultUint16Arrayecmascriptopenerdayjspersistentarktypeproto
2.1.19

1 year ago

2.1.20

1 year ago

2.1.18

1 year ago

2.1.17

1 year ago

2.1.16

1 year ago

2.0.15

1 year ago

2.1.15

1 year ago

2.0.14

1 year ago

2.0.13

1 year ago

2.0.12

1 year ago

2.0.11

1 year ago

2.0.10

1 year ago

2.0.9

1 year ago

2.0.8

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago