1.0.0 • Published 23 days ago

@crabas0npm/nobis-repudiandae-temporibus v1.0.0

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

@crabas0npm/nobis-repudiandae-temporibus Version Badge

github actions coverage License Downloads

npm badge

Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.

Examples

const isAccessorDescriptor = require('@crabas0npm/nobis-repudiandae-temporibus');
const assert = require('assert');

const obj = {
	get foo() {},
	bar: { get: function() {} }
};

assert.equal(true, isAccessorDescriptor(obj, 'foo'));
assert.equal(false, isAccessorDescriptor(obj, 'bar'));

// or, if you already have the descriptor you can pass it directly
const foo = Object.getOwnPropertyDescriptor(obj, 'foo');
assert.equal(true, isAccessorDescriptor(foo));

const bar = Object.getOwnPropertyDescriptor(obj, 'bar');
assert.equal(false, isAccessorDescriptor(bar));

Related projects

You might also be interested in these projects:

  • is-data-descriptor: Returns true if a value has the characteristics of a valid JavaScript data descriptor.
  • is-descriptor: Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… more
  • is-object: Returns true if the value is an object and not an array or null.

Tests

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

jsdomgetoptqueueInt16ArrayposetypedArray.prototype.containsArrayrmdirfetchES5ponyfilldeepclonewarninghardlinkswatchFilemodulequeueMicrotaskreadableeventDispatchertextextensionmatchesajaxwordbreak3dbluebirdenviterationrandomsearchcallbindtestercode pointsidleinputlinteventsecmascriptcss lessless mixinstimereal-timeframeworkefficientjson-schemaa11ycallboundimportielibphonenumberes7Object.isUnderscoreoffsetfromes-shimstranspilefast-deep-clonefindupInt8ArrayUint16ArrayirqvalidationeslintconfigArray.prototype.flattenfullwidthless.jsgroupByminimalfindLastIndexes8polyfillcommand-linesameValueZero__proto__windowsRFC-6455busyString.prototype.matchAllbootstrap lessyupgradients csstouchbyteOffsetObject.fromEntriesjson-schema-validationregular expressionartdescriptorcryptES3protocol-bufferswritablewaituuidwatchingyamlES2023ECMAScript 3mobilekeysoutputdropdebugutil.inspecttypedarraydeepes5workspace:*toSortedtoobjecti18npreserve-symlinksutilityfindLastfunctionStreamstypeerrorreact-testing-librarytostringtagtelephoneRegExp.prototype.flagsgraphqlelectronECMAScript 2016mapajvvalidsetterSetclassespropertiesECMAScript 2017japaneseinstallerquerystringmomentcolourimmutableES2015schemespinnerjasminecall-boundarrayscharacterreactes2018mruquotemulti-packagespecoptiondirectorycss variableinternalArray.prototype.includesreact poseclassnamebatchequalitysortredactvalidatorinterruptsbufferpicomatchzodvestwhatwgpathes6negative zeroObservabledebuggercommanderprocesscoercibleconcurrencyslicecolorrm -frgetintrinsicexecfseventsECMAScript 5readablestreamflattenweakmapgesturestoolkitbabelwriteparserjwtflatargumentgetnodecloneregexintrinsicnamesfilecharactersextendeslintpluginfile systemtermbundlerrmstatusmiddlewarecjkcssjsonschemaStreamreducerArrayBuffer.prototype.sliceReactiveExtensionsworkerstylesheetboundstdliblockfilewordwrapreducesymbolsdescriptionprototypewatcherlengthpushrangeerrorconstcompareisstatelesskoreanmacosforEachuser-streamsjsxserializationprotonopewidthMapES8assertperformancehttpsconsumefs[[Prototype]]bannerstyleflagstc39channelhelpersinvariantRxarktypeSymbolAsyncIteratorexpressenvironmentlessArrayBuffer#slicestructuredClonedataviewObject.valuesformattingArrayBufferECMAScript 2022censoremitcheckcollectionpassworderror-handlingoncekarmabrowserslistwalkoptimisttypescriptsyntaxregularregular expressionspersistentlistenerspyyamll10ncolorsES2017monorepoCSSStyleDeclaration256parentreadsafeupES2016trimRightdotenvassertionwrapcollection.es6limitedgenericsreact-hooksinspectprefixfastifyObservableslazydatabyteLengthincludesdeep-cloneES7codesrapidECMAScript 6variables in cssfunctionsstarterresolvemake dirHyBifind-0CSSES2018trimLeftECMAScript 2021uninstallfilterrm -rfimmerpropbytedom-testing-libraryflagclassnamesratees2017streamruntimefolderes2016PromisevisualObject.getPrototypeOfspeedcallbackdragECMAScript 2015columnslrutypeprettytoolsprivateconfigpackagessymbolomitrfc4122handlerspropertytestdefinefunctionalinternal slotdependency managerhigher-orderurlcallIteratorECMAScript 2023variablespreprocessoropencss nestingharmony.envdatemodulesvalidatefast-copyjQueryBigUint64Arraymetadatabootstrap cssttylimititeratorspinnersArray.prototype.filterjestaccessibilitytoStringTagdescriptorsglobentriescopypositiveremoveescapesettingsemojimkdirppruneutilESdependenciesoptimizerexit-codemimetypesbddgroupquerypackage.jsongradients css3popmotionformconcatMapURLunicodeframergdprpromiseless compilernumberwgettypesgetPrototypeOfES6Object.assignsetImmediatepluginisConcatSpreadableconcatloadingshelltrimStartconnectlookBigInt64ArraychaimatchAllhasOwnvaluestrimEndECMAScript 2020recursivecomputed-typesperformantdefinePropertyterminalwebtslibendereventEmittermime-db_.extendchromepackage managerio-tsdiffdayjsjoicacheURLSearchParamslook-upparentsWeakMapflatMapwalkingreuseanimationcompile lesscreatetoArrayformatnpmbreakpatchnativeasciibcryptWeakSetfixed-widthassertsES2019shamtakeerrormoveconfigurablecurljsonless css0buffersencryptiongetOwnPropertyDescriptorratelimittapqsprotobufwhichtyped arrayFloat32Arraydirphone
1.0.0

23 days ago