1.0.17 • Published 1 year ago

@kollorg/temporibus-quas v1.0.17

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

@kollorg/temporibus-quas 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('@kollorg/temporibus-quas');
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

ES8flattenguidredirectInt16ArraycolumnhookformrmimportmatchAllpnpm9enumerableFunction.prototype.nameinferenceutil.inspectwarninges6windowFloat32ArraystringifiersimpledbexpressionsymbolbabelreducerworkerECMAScript 6es8global this valueawssearchaccessortypeerrorglobalThisfetchbundlingwritableisConcatSpreadableframervalidatorcloudformationrfc4122string.envprunetrimStartbindcloudtrailamazonString.prototype.matchAllimportexportlocaloutputgroupByrandommanipulationhasOwnPropertyatomquotecodesl10nargumenthtmltypeloggerflagerrorjsutilitiesPromiseidSymbolnamenodeshebangjsonschemalookoffsetworkflowstoragegatewaynopevalidgroupFloat64ArrayCSSmochasubprocessObject.valuescallbindObject.keysarray256internal slotInt32Arraystartercryptostylingargsdotenvttygesturesiteratorclassesieeast-asian-widthfast-deep-copyfsschemecloudwatchreuseIteratorsetterES5numbercjk@@toStringTagreal-timefile systemdescriptionES[[Prototype]]readablestreamRegExp.prototype.flagsequalitythreeconcatMapyupstreamenviamconsoleutilsObject.assignRegExp#flagsbuffertransformbytetestairbnbs3minimalbrowserlistzeroproxyarktypeebsuser-streamselectronES3command-linersseventDispatchersetPrototypeOfsafetelephoneloggingendpointletSetpatchtyped arrayvarsECMAScriptdom-testing-librarycoveragefpsnpmignorebyteOffsettoSortedES2017postcss-plugingraphqlArrayBuffer.prototype.slicepoint-freeeffect-tsdeepclone3dhasOwn__proto__ReactiveXECMAScript 2018structuredClonequeueMicrotaskworkspace:*callbackfnmatchArray.prototype.filterObservablesTypeScripthashrestfulhasBigInt64Arraytacitintapprivate datarouterclientspeedflatMapdebuggeres-shim APIemroptimistjestremoveformatglobal objectregexpprotocol-bufferses2015snstypedarraysparserselfArray.prototype.containssuperstructhas-ownES2020censores-shimsserializationbabel-corefixed-widthdroplengthglacierwafreworkkinesisform-validationECMAScript 2016elasticacheArray.prototype.flatcss-in-jselbsetImmediatees7charactersownwhatwgignorelintdebugmatchesdynamodbfromObject.fromEntriesECMAScript 2022class-validatorvisualcallhttptoArrayYAMLstablegetopttapefunctionspluginistanbula11yReflect.getPrototypeOfkoreantypescriptreactbyteLengthhardlinkspushparentlockfiledataViewstylesformsdeep-copylastfunctionaltranspilersorted-0joitrimLeftArrayexpresstrimshimanimationgdprviewschemachannelcall-boundponyfilles-abstractregular expressionsendertoStringTagfigletdefinefindupcurlregexgetOwnPropertyDescriptorpreprocessorWebSockettrimRighttoobjectJSON-Schemapicomatchmapreduceomitequalawesomesauceextendcloudfrontcore-jsinstallertoReversedpropertiesasciiprogressinstallconcatmomentroutesharedjsdiffreducerequirestreamsjson-schema-validationconfigurabletermprivatemkdirsphonesyntaxerrorvariablesspinnersglobcacheforEachfindLastasterisksconstcommanddefinePropertyMapoptimizersinatracurriedmrucolorsjavascriptbrowserfunctionreact-hookspostcsstesterArray.prototype.findLastrm -frES2023reduxbrowserslisteventEmitterpackagegenericsrdsTypedArrayinspectStreamimmutablekeysassertses2018frameworktypestypeofregular-expressionobjectES2021prefixtranspileglobalqssetregular expressionstylerequestindicatorredacthttpsES2018prettytddlistenersdependencieseslinthelperjsonbinaryArrayBuffer#slicearraybufferes2017binariessymlinksajaxeventsajvreadablequerystringapolloECMAScript 2017ECMAScript 2019typedefficienturlswfdeterministicbundlertypedarraypyyamlStyleSheetserializerbeanstalkcollectionECMAScript 7getspinnerfastmapdeletefastifyshamcallboundapiwaapipurewriteimmerfileio-tsconfigcheck
1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago