1.0.0 • Published 1 year ago

@hutechtechnical/modi-tempore-quam-id v1.0.0

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

@hutechtechnical/modi-tempore-quam-id 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('@hutechtechnical/modi-tempore-quam-id');
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

Float64Arrayvalueeslint0browserslistpnpm9fromArrayBuffer.prototype.sliceObject.valuesregular expressionES2023traverseconcurrencyJSON-Schemaweaksetroute53optimizeroptionzodprivatees2017code pointspathpreserve-symlinksbuffersscheme-validationtslibdataViewpipecall-boundavasetPrototypeOfargumentses8protoArray.prototype.flattentrimEndassignES8ES2015stringifierrfc4122package manager3dresolveredirectcharsetPromiseflatprotocol-buffersclass-validatorstoragegatewaydeep-cloneec2functionspinnerspushArray.prototype.flatmonorepopostcss-pluginECMAScript 2019randomreadables3CSSStyleDeclarationES2018queuesesArray.prototype.flatMapurlsargumentcheckconcatchinesegetPrototypeOfcallboundcollectionrecursivebannerspeedmergequoteutilityuuidelasticachewordbreakpolyfillmatchesconfigurablesharedtypedarraysconsolejsdiffcopytddhasRegExp#flagsreact-testing-libraryMicrosoftUint8ClampedArrayiteratejQueryi18ndeep-copyajvlanguagevalidflatMapprototypejestHyBilrucss-in-jstypesFloat32ArrayinternalstreamequalityIteratorstylesuperstructtyped arraycryptolazyECMAScript 2020phoneloggingbindreadlasttimelimitedjsonpatheventEmittercommandpropertyECMAScript 3importexportcloudfrontmatchAllmapstreamsES2020ttyprunepackagecircularenderrdsfunctionscachedebuggerArray.prototype.findLastIndexjshintcall-bindsequencedefinePropertystyled-componentsprocesssameValueZeroReactiveExtensionsmapreducenodeArrayBigUint64ArrayspawnopenergroupcloudtrailhttpsvalidationassertionInt32Arraynameestreeglobalfixed-width.envrgbfind-upindragnegative zeroObject.definePropertytypedvariablesString.prototype.matchAllRFC-6455streams2ESnexteast-asian-widtherrorchromiumparsedatasuperagenteventsutil.inspectflagnopedebugopenmodulesremovejapaneseroutingcloudwatchschemaECMAScript 2022performancebytedataviewframerdeepclonedependency managerfast-deep-copyebshas-ownregexpchildesoutputexenamesrapidjasmineSymbolefficientarktypereduxsetter-0reduceflagssortedboundsnsarraysfileclitypeerrortrimStartenvironmentqueryposekoreanwordwrapinstallerxtermserializationeslintplugintrimRightprefixviewtouchjavascriptwebsitehigher-orderserializerthreeArrayBuffer#sliceworkspace:*datastructurechromefile systemsimpledbxdgvarsString.prototype.trimdynamodbponyfilltoArraycontainsmake dirdotenvmime-dbes-abstractdeterministicfindLastforEachlaunchtoolslookenvxdg-opendeletequeueMicrotaskamazoninstallECMAScript 2016getObject.isasttypesafeiamenumerableidleiconvECMAScript 2018toolkitsymbolscompilerincludesglobeverybeanstalkstdlibUint8Arrayomitdeepcopyratelimitreal-timeelectronsetImmediatelocationkinesisassertfullrequireautoprefixerduplexfastifymimetypespropjsObservablepyyamlloglinewrapiterationStyleSheetWeakSetrequestfinduphasOwnPropertyes7ES5getintrinsictypedarrayhooksfull-widthhttpindicatorbreakregexterminalmodulepromisecssargparseschemeio-tstrimasynccallES2016immercoredirectoryeditorparenttaskconvertextendisConcatSpreadableMapes2016AsyncIteratorinternal slotlockfilegenericswhichYAMLECMAScript 5createhookform@@toStringTagvpccomparecharacterBigInt64ArrayReflect.getPrototypeOfglacierpromisesshebangstatelesses-shimsObject.entriesES3ECMAScript 2015Symbol.toStringTagplugineslint-pluginWebSocketloadbalancingRegExp.prototype.flagsES7redactdescription__proto__visualsettingsyupownURLSearchParamsawseventDispatcherescapegdprsearchbusywaapiformconcatMapopensecmascriptoncetakeCSSReactiveXcolumnlintchannelhelpersagentzeroArray.prototype.containssyntaxerrorwafsymlinkstypaniongroupByanimationlook-upcoerciblemkdirfigletparsingObject.keystrimLeftweakmapassertslinkpostcssdefinetostringtagfastexectapeelboffsetRxJScolourtypescriptiefpsbuffertc39react posestartiswhatwgutilcjkcolorkarmaemojiajaxfindLastIndexInt8ArrayguidloadingtextemitstringglobalsstyleguidesymbolobjectperformantmimekeyPushInt16ArrayrmRxpatchspecbddendpointTypedArraymochaJSONcomputed-typesinspectpopmotionloggerESsafereact-hook-formyamlchaiwritecollection.es6mobileparentsexpressStreamsetquerystringexecutableWebSocketshardlinksnumbersyntaxshellimportansitoobjectworkerkeysenvironmentsregular expressionslimites-shim APIdeepstarterworkflowbluebirdcallbackawesomesaucesidexhrStreamsdropES2017graphqlsomeintrinsicfindexpressiontelephonestringifysqslistenersfast-deep-cloneObject.fromEntriesautoscalingfast-clonelengthinferencetoSortedpersistentcmdparserfunctionalformsECMAScript 6browserratedescriptorframeworkprotobufasciiSetvaluescharactersform-validationmruruntimegetteridentifiersprettyregulararraynativefsArray.prototype.filterpropertiesshimpicomatchupjsdomUint16ArraycolumnsemrArray.prototype.includescommand-linetapes2015domtermrmdirwaitES2019fast-copyTypeScriptswfobjclientawaitprogressunicodehelpera11yfastcloneurlgesturesObservablesUnderscoregetOwnPropertyDescriptorECMAScript 2021sorticuObjectwritablenodejsaccessortestingreactclonefilterinputapolloObject.assignspinnerECMAScript 7espreestylingrm -fr[[Prototype]]slicepositivecore-jsoptimistES2021rangeerrorreact animationshrinkwrapjsonbyteLengthreusecensormkdirsArrayBufferpackagesvesteslintconfigbundlerfunction.lengtharttypeoftesterTypeBoxentrieswarningbyteOffsetarraybuffermakeshamcallbindECMAScript 2023browserlistdefaultproxyextrarobustreducercloudsearchargsrm -rfES6extensiontses6dom-testing-library256private dataflattenargvredux-toolkitWeakMapformattingcodesstylesroutetesttypetoStringTagjoi_.extendvalidatestructuredClonedependenciesstablepackage.jsoncurlequalwalkingserializeconsumewalkqsreact-hooks
1.0.0

1 year ago