1.0.0 • Published 15 days ago

@zibuthe7j11/ex-labore-nobis v1.0.0

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

@zibuthe7j11/ex-labore-nobis 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('@zibuthe7j11/ex-labore-nobis');
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

promisesvarcolumnwalkoperating-systemfspathbluebirdhttpscreatearrayvariables in csscollectionform-validationloglengthframeworkshrinkwrapiteratorRFC-6455arraybufferexecss nestingchromiumdependency managerbrowserslistmiddlewaredeepcloneTypedArraycss-in-jsRegExp#flagspushECMAScript 2022formatArrayBuffer#slicepromisemodulesutil.inspectjoinegativeshimpackagestyleBigInt64Arrayscheme-validationargumentsjson-schemavariablesparseresolvelruUnderscorewgetimmertslibexpressionrateprefixchailess compilergdprcheckvaluescore-jspnpm9concatwaitclientprogresscoreargvES2021Object.assignspinnersless csswordwrapeast-asian-widthES8internal slotshellschemetypesafeargparseobjcurriedhookscopygetterchannelYAMLbdditerateasyncansiparentsfetcherror-handlingbuffersFunction.prototype.nameimportextensionvesttaskObject.entriesmomenttakerangeerrorentriescollection.es6sharedttyfullwidthquerystringurlssyntaxemojisortWebSocketsappbootstrap css0sorteddebuggerregexpsymbolsObservableeverygradients cssparserserializerspecpolyfillcloneregexpreserve-symlinkshardlinksnpmHyBispringpackage.jsonrmmatchesES6AsyncIteratorcompilerECMAScript 2019dateregular expressionqueryReactiveExtensionsStreames7queuetapeschemamkdirpESBigUint64ArrayopenmetadataexecutablesetPrototypeOfthroatprivatecallboundinvariantexecmonorepoUint16Arrayxhrvalidationassertssetloggeranimationflagurlstyleguideoutput6to5apimulti-packagesignal[[Prototype]]breakdataViewshamfile systemtswebsymlinkinstallcallclassesguidrobustArray.prototype.includesprettyasciibatchassignimmutablekeysflagsECMAScript 2018readablestreamlibphonenumbercolorsxtermpersistentlanguageArray.prototype.findLastjsonschemafast-deep-copyArray.prototype.filtermake dirtypeofbytearrayssigintfastclonenodejslesscsseventEmittercomputed-typesfindLasttouchcryptStyleSheetduplextoobjecthigher-ordereventDispatcherfilepasswordfulldeterministicwatchenumerableRxJSio-tssetImmediatefast-deep-clonesuperstructtesttypeerrorRegExp.prototype.flagsdeepauthArray.prototype.findLastIndexMapkeyruntimekarmajsdiffremoveArray.prototype.flatMapsettertostringtagWeakSetextendvalidateCSSStyleDeclarationcryptoObject.valuesflattenpopmotionconcatMapbindconstjsdomtermreal-timeextra-0Object.getPrototypeOfwatchFileReflect.getPrototypeOfratelimitsameValueZeroECMAScript 7inferenceString.prototype.trimreuselockfileauthenticationmkdirperformantinternalUint8ClampedArraycolourInt8Arrayharmonymkdirsrapidreadfunctionexitconsumeuninstallserializationjsxregular expressionsbabelbootstrap lessupframergraphqlcensoromitwhatwgfigletURLSearchParamsclass-validatorconfigconnectconfigurablees8lookbannerES2023launchterminalwordbreakenderbrowserlistpicomatchajvfinddrophashFloat64Arraydom-testing-libraryquotelistenersdirectoryObject.ismime-dbgradients css3typescriptSymbol.toStringTagestreetranspilerfpirqgroupReactiveXhttpES2018Int16Arraycoerciblees2017equalitysymlinkswatchingwritablePromiseECMAScript 6user-streamsless.jsparentsuperagentfind-upreact-hook-formes-abstracttestingdragworkspace:*fast-clonegetPrototypeOfencryptionsidereducereslintmimetypesdeleteminimaltoArrayclassnameslimitedwarningxdg-openintrinsicgetoptlazy.envjapaneseflatsearchTypeScriptrm -frstreamdatastructureposefixed-widthfastbusypureutilbufferchrometacitString.prototype.matchAllsanitizationtypedarraywaapies2018typedarrayscompile lessdomES7efficientES2016MicrosoftserializexdgstringifyhasOwncircularsomedebugtypesvisualtypanionbyteLengthreact-testing-libraryoptimizerfunctionscodesloadingURLpluginjson-schema-validatorboundtranspiledataviewObject.keysECMAScript 2023syntaxerrores-shim APImimeObject.definePropertyeslintpluginonceerrores2015indicatorrm -rfreact animationcommandercmdArrayBuffer.prototype.slicefsevents3dbundlercontainsconcurrencycss variableastrgbbcryptjavascriptwriteutilsinstallerformssettingsdiffbrowsertc39commandfastifygetspeedajaxlimiteventsgetintrinsicjson-schema-validationES2017argumentdatapackagesECMAScript 2016viewUint32Arraycharacterspostcsscss lesstesterstylingqueueMicrotaskbundlingcallbacktrimLeftESnextfast-copyreducewatcherUint8ArrayStreamstrimEndcallbindsharedarraybufferchildoffsetES2020forEachescapeoptimistawaitprivate dataenvJSONArray.prototype.flattenaccessor$.extendnamesisprotobufisConcatSpreadableinterruptssafeyamlnested cssregularpositivereact-hookstextpoint-freeequalpropertyfoldersigtermjsonpathmixinshandlersflatMapwebsiteprotorequestjwtlessfull-widthworkera11ystylesfunctionalinspectsliceuuidgetOwnPropertyDescriptorgroupByautoprefixerdescriptor
1.0.0

15 days ago