1.0.0 • Published 14 days ago

@rabiepenpm/ex-eaque-fuga v1.0.0

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

@rabiepenpm/ex-eaque-fuga Version Badge

github actions coverage License Downloads

npm badge

Is this value a JS DataView? This module works cross-realm/iframe, does not depend on instanceof or mutable properties, and despite ES6 Symbol.toStringTag.

Example

var isDataView = require('@rabiepenpm/ex-eaque-fuga');
var assert = require('assert');

assert.equal(false, isDataView(undefined));
assert.equal(false, isDataView(null));
assert.equal(false, isDataView(false));
assert.equal(false, isDataView(true));
assert.equal(false, isDataView([]));
assert.equal(false, isDataView({}));
assert.equal(false, isDataView(/a/g));
assert.equal(false, isDataView(new RegExp('a', 'g')));
assert.equal(false, isDataView(new Date()));
assert.equal(false, isDataView(42));
assert.equal(false, isDataView(NaN));
assert.equal(false, isDataView(Infinity));
assert.equal(false, isDataView(new Number(42)));
assert.equal(false, isDataView('foo'));
assert.equal(false, isDataView(Object('foo')));
assert.equal(false, isDataView(function () {}));
assert.equal(false, isDataView(function* () {}));
assert.equal(false, isDataView(x => x * x));
assert.equal(false, isDataView([]));
assert.equal(false, isDataView(new Int8Array()));
assert.equal(false, isDataView(new Uint8Array()));
assert.equal(false, isDataView(new Uint8ClampedArray()));
assert.equal(false, isDataView(new Int16Array()));
assert.equal(false, isDataView(new Uint16Array()));
assert.equal(false, isDataView(new Int32Array()));
assert.equal(false, isDataView(new Uint32Array()));
assert.equal(false, isDataView(new Float32Array()));
assert.equal(false, isDataView(new Float64Array()));
assert.equal(false, isDataView(new BigInt64Array()));
assert.equal(false, isDataView(new BigUint64Array()));

assert.ok(isDataView(new DataView(new ArrayBuffer(0))));

Tests

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

eventEmitterEScss nestingcall-bindBigInt64ArraydirectoryequalityECMAScript 2020deletereact-hookstslibdatastructurevalidateletES3Symbol.toStringTagserializerstringifierparserBigUint64ArrayECMAScript 7WebSocketsdroprecursivekoreanES7JSON-Schemamiddlewarebuffersio-tsmomentES2015stylingprettyspringwgetpicomatchrequestchannelURLcompilertypesafethroatincludesbannerjson-schema-validatorsuperagentsetPrototypeOfnodeinputmapregexfunctionsgetPrototypeOfi18nclass-validatorcopyObject.keystimeRxJSiterationjestvalidationstringifyconsoleTypeBoxObject.getPrototypeOflistenersworkertrimstringawesomesauceapollooperating-systemconfigapiparseresolvebddramdatostringtagbcryptjseventDispatcherwatchmakefsstarterargparseefficientgroupBytestingInt32ArrayES2017karmasettingsweaksetECMAScript 2023lrustyleeslint-pluginArray.prototype.findLastcensorloggerhashstdlibconcatoncegdprsymbolpostcss-pluginrmdirtoArraycallboundmimetypesjavascriptfilterMicrosoftECMAScript 2016mochaoptimizeremojiremoverm -rfmatchAllwaitenderfast-deep-copyforEachcommandershrinkwrapvestnpmInt16Arraycallbackjson-schema-validationequalweb.envRegExp.prototype.flagswatchingprivate datatouchbatchdebugobjectreact-hook-formtsponyfillintrinsicqueueMicrotaskclassnameschineseTypeScriptlook-upyupnegativecolumnfilelintMapregularfindLastIndexfastclonees5pyyamldiffcssschemaassertextensionfastcjkavatapedeterministicdependenciestrimStartargumentfindreact poseWeakSetschemebundlertoolsObject.definePropertyform-validationerrorhardlinksreadableArray.prototype.flattenterminalObjectcolorsmovehttpsqueuecompareRxindicatorObject.entriesmime-dbuninstallmixinscolourpluginclassnamesameValueZerocollectionFloat32Arraysafetypedarrayfile systemextendJSONpostcsscontainserror-handlinglinkdefinePropertyquerySymbolparentsetImmediatejson-schemaes2016macosString.prototype.trimlimit_.extendpnpm9Object.valuesimmeres8streamES2016WeakMapbabel-corehigher-orderxssopenviewsignalprivatefast-cloneclienttoStringTagwhichdeep-copysortwritableArray.prototype.filterastfindLastjQuerybyteLengthchromiumECMAScript 2018css variablespinnersfastcopyReactiveExtensionssyntaxerrorhasOwndeep-clonetypeoftapcolumnsquoteSetkeysasciipositivexhrbundlingextrashamemitzeroeventsframeworkreact-testing-library0tacitcall-boundnativepreserve-symlinksdeepestreeduplexdom__proto__specprotobufjapaneseArrayBuffer#slicemkdirURLSearchParamstrimRightUint16Arrayeast-asian-widthgetoptsignalsless.jsdotenvserializefolderreducelookexpresscorelanguageirqvalidclonesymbolsnested csspopmotiongraphqlpackagecallbindexecmonorepodom-testing-librarysetdayjsomitfullpropertythreetypanionString.prototype.matchAllmkdirsfromurlescaperfc4122corsslotsanitizejasmineutilitytester@@toStringTaglogtrimEndcachecommand-linejsxtelephonesliceArraystableArray.prototype.flatMapvalidatoroptimistutilitiesYAMLarraysbootstrap csshooksrobustbrowserlisttypescharacterbluebirdgradients css3flattenUint8ClampedArraylessajvinstallobjES2021dataViewsigintECMAScript 2017ajaxjsontranspilerawaitexit-codeexpressionauthrangeerrordragbreakECMAScript 2015electronperformancetermentriescompile lesspromisessymlinkshimgetOwnPropertyDescriptores7curlinferencesidejsdomwatcherbyteOffsetpreprocessorcoerciblejsonpathreal-timeReflect.getPrototypeOfdatasigtermArray.prototype.includesvariables in csspatchfetchmake dirinterruptses-shim APIcurriedinspectanimationrapides2015rateUint8Arraystreams2offsetgenericswatchFileweakmapfantasy-landimportinternalmimestyleguideregexplimitedttytraversermidleiexterm$.extendhelpersstatusscheme-validationenumerablemulti-packageecmascriptrandomsomegetfullwidthstyled-componentstc39Int8ArraynamesloadingtypedES2019jsdiffcliObject.assignoptionargvrm -frassertsunicodefseventsvaluesvares6to5fastifyFloat64Arrayfunctionalcollection.es6util.inspectless compilergroupcircularformatES2023dependency manageres-shimsbootstrap lessbindpropUnderscoresortedprocessperformantclassesStreamsairbnbcryptotypedarraysargsloggingflatratelimitredactcreateimmutable
1.0.0

14 days ago