6.9.80 • Published 1 year ago

@taktikorg/numquam-quod-perspiciatis v6.9.80

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

@taktikorg/numquam-quod-perspiciatis Version Badge

github actions coverage License Downloads

npm badge

Define an accessor property on an object. In an engine without descriptors, in loose mode, when only a getter is provided, nonEnumerable is false, and nonConfigurable is false, wil fall back to assignment - otherwise, it will throw.

The two non* options can also be passed null, which will use the existing state if available.

The loose option will mean that if you attempt to set a nonconfigurable/nonwritable accessor property with set, in an environment without descriptor support, it will fall back to normal assignment (and eagerly evaluate the getter).

Usage

var defineAccessorProperty = require('@taktikorg/numquam-quod-perspiciatis');
var assert = require('assert');

var str = 'value';
var strThunk = function () { return str; };
var strSetter = function (v) { str = v; };
var random = function () { return Math.random(); };

var obj = {};
defineAccessorProperty(
	obj,
	'key',
	{
		get: strThunk,
		set: strSetter,
	}
);
defineAccessorProperty(
	obj,
	'key2',
	{
		get: random, // at least one of "get" or "set" must be provided
		nonConfigurable: true, // optional
		nonEnumerable: true, // optional
		loose: false, // optional
	}
);

assert.deepEqual(
	Object.getOwnPropertyDescriptors(obj),
	{
		key: {
			configurable: true,
			enumerable: true,
			get: strThunk,
			set: strSetter,
		},
		key2: {
			configurable: false,
			enumerable: false,
			get: random,
			set: undefined,
		},
	}
);
uninstalles-shimsreplayenumerablespawnconfigurableArray.prototype.flatMapless.jsjQueryeslintconfigelbcreatechaihotshellfastifygetOwnPropertyDescriptorefficientjsonschemashimArrayBuffer#slicecharacteruploadeventEmitterformgroupreact-testing-libraryframerformsbrowserlistcolumnerror-handlinggetoptes2015superagentArray3dHyBigroupBystyleguidenegative zeroObject.valuesObject.assignutilitiesnumberdeepcloneArray.prototype.flattenfsclass-validatorutilrfc9562performanceeventDispatchertypedfastcloneJSONincludesrequestexit-codees2017Uint8ClampedArrayform-validationArray.prototype.filterredactES2018Uint32ArrayArray.prototype.flatreduceECMAScript 2021mkdirpfindLastIndexassertslessnopehelperquerydeeppipeprotocol-bufferstelephoneslicepackage.jsonYAMLlockfileemrstringifyinferencezodrandommapvalidatenested csstoolkitvaluescallbackcomputed-typespropertiescheckdatetsmkdirpositiveinterruptsregular expressionpopmotionrulespackagesauthentication__proto__point-freechannelwgetownreducermacosECMAScript 2019byteLengthstyleshttpsReactiveExtensionstoolsmanagerpreserve-symlinksES2019settranspilerinvariantselfECMAScript 2022awsString.prototype.matchAlltakeESnextstringifierlinkasciiconsttypedarraypatchcallbounddragdeletemruFloat32ArrayshareddescriptorstypescripteslintplugintraverseflatMapqsFunction.prototype.namecachevaluefileshebangtoobjectdataviewES8postcssinsetterindicatorcompareRxJScss-in-jstestingInt32Arraymixinslistenerstypees5logpreprocessorURLSearchParamsphoneECMAScript 2020estreeRegExp.prototype.flagsfpsletyupgdprMaprgbiterationruntimeeast-asian-widthregexpvariables in cssECMAScript 3immerenvironmentkeypredictableECMAScript 2018authmobilecommandpluginsharedarraybufferjson-schemawafPushbcryptjsxchromiumencryptionnodejsbeanstalkbootstrap lesslazywalklintsignalstrimRightiamjshintflagsuuidsymbolsendpointsymlinkhardlinksconcatforkthreeparserregularinstallexpressionreact-hooksglobalObject.keysrfc4122simpledbvalidationcallbinddropbddclassnamea11ymoveStreamhas-ownpath.gitignorerobustES6hasinternalredux-toolkittyped arrayec2libphonenumberfast-deep-clonefunction.lengthbinariesformattingprivateamazonObjectisvestwidthcall-boundES2015toReversedes2018css nestingprotobufelmartreact-componentomitgradients cssreadES2022@@toStringTagtrimEndBigInt64ArraystatedayjspolyfilltypesargumentmetadatareversepinomodulevpcwindowsSymbol.toStringTagdeepcopybundlerparsefromtrimtacitjshasOwnmergeastprivate datafunctionalbufferprocessoptimiststreamsmkdirstoStringTagmake dirmatchesasyncstringtoSortedjoiargsgraphqldomboundFloat64ArrayglobalThisStyleSheettypeerrorgetprunecommandersigintsyntaxerrorgetintrinsicdynamodbmapreduceexecfileloadbalancinges-shim APIfastcopyArray.prototype.containsnegativecssserializerdiffflattenassertionjapanesecss lesses2016arraystostringtagecmascriptObject.isreact-hook-formcss variablereadableObject.definePropertydeterministicstoragegatewayfindcodesposeerrorcloudformationproxybrowserslistfullString.prototype.trimtrimStartcolumnsvalidatorsameValueZerospinnerjsdiffjwtcliserializationtouchnpmignoreSetrangeerrorpicomatchsortfetchsigtermcurriedreversedpersistentfunctionslotfast-clonecoerciblelinuxbabel-corecompilerassignECMAScript 5formatstatusCSSbindl10nresolveobjectsafedeep-clonetesterESprogressloggingzxpackage manageropenssltimestreamECMAScript 7findLasthandlers[[Prototype]]ES5figletdescriptionramdareact posecertificateses-abstractimmutableECMAScriptRegExp#flagsjson-schema-validatorflataccessibilitytypeofelasticacheeventsreact animationES7forEachstabledotenvidleES2016execstatelessroutecopybootstrap cssautoscalingArrayBuffer.prototype.sliceTypedArrayconsolematchAllcurlidentifiersi18nglobSystem.globaldataeslint-pluginInt16Arrayfantasy-landgradients css3viewtrimLeftUnderscorejestsettingsparsingnameequalscheme-validationhookformutilitysidebannerStreamsES2021urlstyled-componentsclienttermimport6to5WeakSetpostcss-pluginObject.fromEntriesObservableJSON-SchemaairbnbignoreapigetterjsonbusyargvshamtextbrowsersymbollocalarraybufferqueueexecutevariablesloggerMicrosoftObject.entriesescapesyntaxprettyArray.prototype.findLastcensorbabeleslintclassesmatchunicoderecursivepropbyteloadingReflect.getPrototypeOf-0fixed-widthemitguidconsumemonoreporegexhashflags3toArrayoffsetcryptoTypeScriptesoptiongitignoresignal0reactexpressWebSocketdatastructuredefineRxjsdomES2023ECMAScript 2017iteratortddECMAScript 2016ebswritextermdirdirectoryuser-streamscollectiontestacornkoreancolorswindowassertsignedUint16ArrayelectronES2020extrapromisereusetranspilesortedSymbolajvcontainsenvironmentsponyfillchildqueueMicrotaskawesomesaucepasswordWebSocketshasOwnPropertybyteOffsetregular-expressionstarterinputTypeBoxfnmatchpyyamlcommand-lineminimalbuffersspinnerses8effect-tsobjconfigprotonamesutil.inspectcryptajaxsqslastArray.prototype.includesanimationyamlansimulti-packagebinarysymlinksimportexportBigUint64Arrayirqio-tsReactiveXroute53_.extendpureglobalsexitAsyncIteratorinstallerpnpm9rapidspeces6everyURL$.extendieshrinkwrapworkflowautoprefixerextendECMAScript 2015real-timeoncecollection.es6less mixinsgesturesstructuredCloneterminalcloudwatchzeroless cssjson-schema-validationECMAScript 2023cloudfrontnodeCSSStyleDeclarationwritableswfcloudsearchsequencevisualweakmapglobal objectoperating-systemWeakMapwarningInt8Arraylive
6.9.80

1 year ago

6.9.79

1 year ago

6.9.78

1 year ago

5.9.78

1 year ago

4.9.78

1 year ago

4.9.77

1 year ago

4.9.76

1 year ago

4.9.75

1 year ago

4.9.74

1 year ago

4.9.73

1 year ago

4.9.72

1 year ago

4.9.71

1 year ago

4.9.70

1 year ago

4.9.69

1 year ago

4.9.68

1 year ago

4.9.67

1 year ago

4.9.66

1 year ago

4.9.65

1 year ago

4.9.64

1 year ago

4.9.63

1 year ago

3.9.63

1 year ago

3.9.62

1 year ago

3.8.62

1 year ago

3.8.61

1 year ago

3.8.60

1 year ago

3.8.59

1 year ago

3.8.58

1 year ago

3.7.58

1 year ago

3.7.57

1 year ago

3.7.56

1 year ago

3.7.55

1 year ago

3.6.55

1 year ago

2.6.55

1 year ago

2.6.54

1 year ago

2.6.53

1 year ago

2.6.52

1 year ago

2.6.51

1 year ago

2.5.51

1 year ago

2.5.50

1 year ago

2.5.49

1 year ago

2.5.48

1 year ago

2.5.47

1 year ago

2.5.46

1 year ago

2.5.45

1 year ago

2.5.44

1 year ago

2.5.43

1 year ago

2.5.42

1 year ago

2.5.41

1 year ago

2.5.40

1 year ago

2.5.39

1 year ago

2.5.38

1 year ago

2.5.37

1 year ago

2.4.37

1 year ago

2.4.36

1 year ago

2.4.35

1 year ago

2.4.34

1 year ago

2.3.34

1 year ago

2.2.34

1 year ago

2.2.33

1 year ago

2.2.32

1 year ago

2.2.31

1 year ago

2.2.30

1 year ago

2.2.29

1 year ago

2.2.28

1 year ago

2.2.27

1 year ago

2.2.26

1 year ago

2.2.25

1 year ago

2.2.24

1 year ago

2.2.23

1 year ago

2.2.22

1 year ago

2.2.21

1 year ago

2.2.20

1 year ago

2.2.19

1 year ago

2.2.18

1 year ago

2.2.17

1 year ago

2.2.16

1 year ago

2.2.15

1 year ago

2.2.14

1 year ago

2.2.13

1 year ago

2.2.12

1 year ago

2.2.11

1 year ago

2.2.10

1 year ago

2.2.9

1 year ago

2.2.8

1 year ago

2.2.7

1 year ago

2.1.7

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago