1.0.1 • Published 1 year ago

@libgitname/esse-illo-architecto v1.0.1

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

@libgitname/esse-illo-architecto 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('@libgitname/esse-illo-architecto');
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

logdefinecss-in-jscachespecprivate datapostcssform-validationArray.prototype.flatinternal slotfunctionslookoptionUint8ArraymatchesharmonyprettyponyfillcoresuperagentjapaneseprocessassignfastflattenES2015resolveaccessorsafetypedES2020starterECMAScript 2020less csstc39transpiletslibrmwritableinternalclassescommandincludesjsonschemawalkingequalRegExp.prototype.flagstrimLeftpackagejson-schema-validatornested csswarningentriesemojitapeUint32ArrayshellshamcolumngetintrinsicutilitysharedfullairbnbpopmotiontypesES2021validatorcryptprotocol-buffersdataViewfunctionalredux-toolkitttyhashclientefficientfromconsumeviewpatchreusetrimRightObject.definePropertybindthrottlecharacterbreakvariableshigher-orderexecuninstalles5IteratorArray.prototype.flattenpyyamlperformanceparentsreact-testing-libraryslotgenericsavawatchingdescriptiondayjsfolderObject.isfindLastIndexjQueryshebangbuffersforEachlistenersextensionbyteLengthinvariantmiddlewaretexti18npackage managerhttpschaicensorartuser-streams_.extendstreams2structuredClonesortedObservablesspinnerframerfastcopywhichterminalmake dirstringifyfast-clonestabledirnodeinstallpropertyinstallertestingtddcss nestinges6descriptorseslintzerostreamoptimistfetchrateasyncsameValueZeroes2015inputrequirefindLasteventsruntimequeueMicrotaskpushES5datavestHyBiECMAScript 2018Streamapollodragserializesettingshandlersconnectserializersymlinkenderguidnamedotenvoffsetcjkmime-dbdomfunctionRxJSflatMapreact posemobilefixed-width.envtoSortedjoiquerystringpreprocessordom-testing-libraryjavascriptperformantnpmshrinkwrap[[Prototype]]PromisestyleguideFloat64ArrayTypeScriptreduxthroatlinkstylesapimruschemeMapECMAScript 6circulartypedarrayslruflagsfast-deep-copybrowserlisthooksInt32Arrayextendless compilercontainsqswalkpruneECMAScript 2017setterajvansiESnextlintfiltersigintformattingestreeargvargparsechineseframeworkjsonpathspringes2017zodWebSocketjson-schema-validationhelpersexit-codehttpdeepunicodetypedarraycliecmascriptArray.prototype.filterObservablegetoptmkdirpflatparentArraysuperstructmatchgradients css3typeoflanguageregular expressionsslicedeleteirqString.prototype.trimFloat32ArrayomitsequencecallboundRFC-6455persistentcss lessloggingyuparrayawesomesauceajaxpolyfillwhatwgECMAScript 2022ES6consoleArrayBuffercryptorobustxhrdatastructureECMAScript 5graphqltypeerroriterateautoprefixerpasswordelectronnodejsinspectgradients cssreal-timemixinseslintpluginStyleSheetmkdircloneplugin__proto__requestbrowsercall-boundES2018dependenciesconcurrencytyped arrayvisualjasmine0multi-packagesharedarraybufferregexpduplexchromiumvalidprototypesearches2018deepcopyparse3dlesscolourredactlinewrapUnderscoreSymbolwritephoneregularurlvalidationfind-upjsxbundlinglastES2022ReactiveXjsdommkdirsjsdiffworkererrorawaitcompile lessobjcss variablestatelessopenlimitedreact-hookses7Uint16Arrayfindupless.jslength@@toStringTagObject.fromEntriesclass-validatorcode pointssetImmediatetoolsargscollectionString.prototype.matchAllbatchwordwrapsignalsdataviewreducerYAMLeventDispatchercurlvariables in cssesObject.getPrototypeOfoutputnamesdefinePropertyfsgrouperror-handlingkeysInt8Arrayparserthreetsless mixinsargumentxtermes-shimsutilutil.inspectcreatearraybufferstringCSSSetexpressionbannerprefixtimepathvaluedependency managercodesjsonURLSearchParamsworkspace:*sidehookformArray.prototype.findLastIndexbrowserslistsyntaxerrorjesttapmimecorsmatchAllprotocopyECMAScript 2015arrayspnpm9weaksetes8watcherpositivetesterUint8ClampedArray-0objectshimArray.prototype.flatMapchromereducedeep-clonecallbackkarmaES2019negativeoncestyleconcatMapfast-deep-cloneclassnames
1.0.1

1 year ago

1.0.0

1 year ago