1.0.0 • Published 17 days ago

@rabiepenpm/amet-quos-sint v1.0.0

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

@rabiepenpm/amet-quos-sint 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/amet-quos-sint');
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

functionaldragshamstylecharacterssomeformspropJSONArray.prototype.includesconfigurablegetoptprivatenumberrgblibphonenumberframeworkprotocol-buffersasyncstringifyconcurrencyassertionutilautoprefixerloggerjson-schema-validatorworkercss nestingnested cssstyleguidetesteslintpluginlockfileCSSisConcatSpreadablepositivescheme-validationRFC-6455jsterminalpostcss-pluginmoveonceHyBiparserArray.prototype.findLastformattingECMAScript 2022Array.prototype.flattenRxJSECMAScript 7statelessfixed-widthharmonypushlesscssfindLasttoolsframerECMAScript 2017ObjectcjkObject.getPrototypeOfcall-bindpathansitype__proto__dataviewviewasciibrowser256deepcopyrfc4122functionscommanderlookmimetypestrimEndObject.assignfetchefficientpyyamldescriptorthroatserializerlintsearchrm -rfreact-hooksobjjestbindtermsharedarraybuffersigtermmulti-packageString.prototype.trimURLSearchParamsrandomspinnersinterruptssignalscontainssymbolsPushjapanesecompileremojicurlfiltercode pointsvalidawaitloadingfullsetsortcssequalmixinslimitinternal slotdefinearrayshimclireducebundlingpatchECMAScript 2019dependenciesfull-widthbufferES8ArraytimevisualstarterlinewrapreadablestreamcorsbytecircularposejQuerydefinePropertyoptionclass-validatorconsolecommand-lineInt32Arraybluebird@@toStringTagutil.inspectArrayBufferserializationjsdomtakeBigInt64ArrayexecfastifymobilefigletreducereveryprototypeextendjsdiffhookformthrottledeepObject.keysindicatorWeakSet[[Prototype]]sequencees2017error-handlingkarmasetPrototypeOfredactoffsetvaluesmatchesreduxnamescss lesswatchFileargvhttpclassnamesmergemacoscodesprivate dataescapewordwrapmomentgetOwnPropertyDescriptorsettingsi18nECMAScript 6variablesglobcheckcommandbabel-coregenericschromebcryptexitless mixinsjsonwritablecharacterrequirehardlinksArray.prototype.containsObject.entriesmimeflagspropertiesES7removees8zodtc39writecryptoinputcollection.es6Float32ArrayArray.prototype.filter
1.0.0

17 days ago