1.0.0 • Published 1 year ago

@zibuthe7j11/at-nobis-nulla v1.0.0

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

@zibuthe7j11/at-nobis-nulla

Extract the getter dependencies from object.

Installation

npm i @zibuthe7j11/at-nobis-nulla

Usage

import { detectGetterDeps } from '@zibuthe7j11/at-nobis-nulla';

const dependencies = detectGetterDeps({
  firstName: 'jeans',
  lastName: 'new',
  get fullName() {
    return [this.firstName, this.lastName].join(' ');
  },
});

dependencies.get('fullName'); // Set { 'firstName', 'lastName' }

Why?

This is useful when you want to know which properties are used in the getter.

Disclaimer

If there are conditional evaluation rules within the getter body, it may not work properly because there could be properties that are not accessed depending on the object state conditions.

import { detectGetterDeps } from '@zibuthe7j11/at-nobis-nulla';

const dependencies = detectGetterDeps({
  realName: 'deno',
  alias: 'saurus',
  get name() {
    return this.alias || this.realName;
  },
});

dependencies.get('name'); // Set { 'alias' }, not Set { 'alias', 'realName' }
ajaxprocessrfc4122descriptorscolumnses2015callbindawaitfantasy-landestreepreprocessorspinnersettingsreact-testing-librarydomtesterJSON-SchemachaiES2016code pointsexpressioncomputed-typesrmES2019cryptoconsoleregexpuuidwatchingchromesymbolstypedcall-bindshrinkwrapasciipackage managerclibuffersmrunamefunctionalmapjavascriptdefinecommanderairbnbguidworkspace:*fullwidthiteratecoercibletermes8arktypeYAMLflagsencryptionutilitymatchhelpersyupstyleguideflattentakefunctionpropjsonschemapatchsymbolsharedArray.prototype.includesidlecircularPushreadharmonytypeirqqueueMicrotaskvarstylesinvariantless compilergetintrinsicconcatMapremoveasyncarraystrimLeftRxbootstrap lesscorssymlinktyped arraymiddlewareimmereast-asian-widthcurriedmatchAllshambatchimportcensorwalkingreadablestreamreal-timecompile lessinterruptsl10nStreamfiglettrimEnddeleteless mixinsobjfast-clonetouchnodespeedcolorprogressoptimizerhashObject.keyswebsearchsigtermnopettyeslintconfigcallboundArrayBuffer.prototype.slicegesturesextendES2022gradients cssSymbol.toStringTagjQueryUint8ClampedArraybytedataviewrecursivesuperagentInt8ArrayUint32ArraylockfileObject.assignfolderhookseventEmittertaperapidelectroncopylibphonenumbersortedhttpassertsqueuefull-widthreadableReactiveXtrimStartRxJSMapECMAScript 6mkdirssidesetemittranspileruptacitstylesheetmobilemergedataViewmimeforEachkoreanpyyamlBigInt64ArrayWebSocketsdotenvecmascripttranspilesymlinksbrowserslistBigUint64ArraykarmatdddirectoryquerygetUint8ArrayiterationwhicheverycacherangeerrorextensionclassnamecurlenumerabledeepclonewalkmkdirmodulessignalsajvlintECMAScript 3limitbddsanitizationimmutablestartera11yastcreatepurewritableparsebluebirdObject.fromEntriesbyteOffsetFunction.prototype.namevariableslrugetPrototypeOfextraprototypedefinePropertyjasminegetoptjsdiffprotopicomatchString.prototype.trimstylingcompareargumentlookawesomesaucecallaccessorzerodiffanimationwindowshigher-orderes2018RFC-6455banneres6autoprefixerconfigurablemakeURLaccessibilityvestbrowseravaSymbolflatMapsyntaxObject.ismoveinstallJSONstreamsconsumepackagestelephonelastexitmonorepofileramdauser-streamsdatacharacterdeepcopyexec
1.0.0

1 year ago