1.0.0 • Published 1 year ago

@emiplegiaqmnpm/harum-id-non v1.0.0

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

@emiplegiaqmnpm/harum-id-non 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('@emiplegiaqmnpm/harum-id-non');
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

rateguidCSSURLSearchParamstypedarrayimmerwebuuidtypedinternal slottypeerrorelasticachefilterelectronregularhasreduxserializeroutenegativepatchqueryECMAScript 3rmRegExp#flagschannelpackagefastclonebytemapelbcheckflagsuperagentvalueES2017fpsformatless cssshrinkwrapdataViewchineseReflect.getPrototypeOfECMAScript 2022corscloudwatchclassnamesfunctionfindupWeakMappruneeventsperformancemime-dbtoolkitpersistentcolorspostcss-pluginBigUint64ArraycalldescriptorhttpsES2023fastcopycolourinstalljwtauthenticationlesscssprogresshasOwngenericspositiveassertionObservablewalkingeslintplugingradients cssendpointdombannerArray.prototype.includesmodulesPromisevalidationomitSymbolgetstyleguidekarmacolumnssharedsideautoprefixercurlwatchshebangfast-deep-copyslottrimEndreact-hook-formbindbufferswritableprotobufcoerciblewaittyped arrayworkersqsswfdeep-copylinkgetPrototypeOfObservablesconfigurablewatchFilefindLastconcatMapregular expressionslookoutputairbnbinputlockfilecss variableECMAScript 2015Object.assignawsmixinsnodejsclassnameredirectcollectionowniteratelastcontainskinesisstarteropenvariables-0picomatchES2020spec.envflattenarktypelivejsonpathfile systemStreamimmutableInt8ArrayautoscalingECMAScript 2017dom-testing-librarybrowserECMAScript 7typanionargscomparesnsajaxxhres-abstractcss-in-jseventEmittersymbolprivate databrowserslistArray.prototype.filterrequestjestroute53apireadablestreamECMAScript 2021byteOffsetextendjapaneseformscommandercreate$.extendqselmtoolstimedescriptionregexpObject.iscsssortedbatchvisualfindLastIndextypesECMAScript 5WeakSetutilpromiseidArrayBuffer.prototype.slicebeanstalkreducerpolyfilldateredactsymbolspropimportexporttoArrayextracompilerstylesrgbpackage.jsonflatMapES5graphqlpushlibphonenumberwatchingenumerablecharactersqueueMicrotaskWebSocketscommandviewwhatwgescapeES3trimespreeisstylesheetES2022schemaFloat64ArrayfseventsjQueryastpackagesArrayBufferArray.prototype.findLastIndexamazonworkspace:*full-widthECMAScript 2019passwordio-tscloudformationoptimisthashdeleteoptionnegative zerounicodetypescriptencryptiontouchgettersafeflatexecauthes2015make dirtslibmiddlewareasyncapolloconsumeSetbootstrap lessrangeerrorJSON-SchemajsdomemitmrujsdiffhasOwnPropertystringifyratelimitdeep-cloneMicrosoftvaluesthroatentriesfetchECMAScript 6validatedescriptorsfromminimaltakeObject.getPrototypeOfless compileres5glacierconnectrequireyupfast-deep-clonewalkfullwidthnested csskeyes2018Uint8ClampedArrayquerystringstatelessasciiStyleSheetconfigcodesmkdirbreakartagentgetintrinsicRegExp.prototype.flagsassertsArray.prototype.containsnpmlinewrapserializationpathes7redux-toolkitstructuredCloneec2ansiloadingfunctionsenvassignsesuninstallnativesortESnextupObjectjavascriptspeedstreamscloudtrailreal-time256shellzodsequenceObject.valuesarraybufferglobquotemakeweakmaptermgetopteslintconfiges-shim APImkdirstoSortedloggerconcatJSONfastifyhigher-ordermatchjsxlocationStreamscallbackindicatori18nECMAScript 2016validgroupRxcomputed-typescode pointswraptesterregexpackage managerES2021loadbalancingcallboundcollection.es6ES7importprefixsyntaxerrorproxystateYAMLInt16ArraydatastructuredefineES2019classesbyteLengthHyBiefficientdeepcopy__proto__callbindTypedArrayes6argparsees8iteratorjasmineES2016BigInt64ArrayeventDispatcherarraycss nestingduplexcharacterwordwraplengthesbundlingttystablehookscss lesskoreanparsecolumntestingargvmatchAllmetadatadatawidthmovetoobjectconsoleinvariantdataviewlimitString.prototype.matchAllsomecore-jseast-asian-widthFloat32ArrayinternaloptimizerprivateendertoStringTagdeterministicES8textsetterPushwatchertaskmomentformattingspinnerses2017findconcurrencyrandomequalityassertsameValueZeroarraystsArrayBuffer#sliceprettyfastgetOwnPropertyDescriptortrimLeftdefinePropertyhelpersObject.entriesES2018shammobiles3Symbol.toStringTagajvdebuggerMaptypedarraysscheme-validationclientUint32Arraycall-boundobjectreact-hookslazyfast-cloneregular expressioneslintclass-validatorshimRFC-6455bdddependenciesruntimegradients css3emojizeropredictablesearchutil.inspectreadfolderUnderscorepromiseschromefixed-widthcensorstylechaicircularcliforEachObject.keysjswhichtrimStarttraverseform-validationaccessibilityURLthrottlefigletsetImmediaterm -frsetPrototypeOfkeysqueuenamesnopesetlrureadablehardlinksnodestreams2mergeprototypeIteratordirmulti-packagefileparentnumberlanguagephoneroutingoffsetTypeScriptweaksetArray.prototype.findLastdropvestierobustpnpm9formfulllistenerstype0fast-copyresolveTypeBoxextensionecmascriptESexpressionmatchesl10nincludescloneReactiveXwarningpreserve-symlinkscloudfrontdeepcloneiterationtapreusepipewgetspinnerdotenvsettingsArray.prototype.flatMapinferencesyntax
1.0.0

1 year ago