5.5.99 • Published 10 months ago

@diotoborg/repellendus-doloribus-itaque v5.5.99

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@diotoborg/repellendus-doloribus-itaque Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Define multiple non-enumerable properties at once. Uses Object.defineProperty when available; falls back to standard assignment in older engines. Existing properties are not overridden. Accepts a map of property names to a predicate that, when true, force-overrides.

Example

var define = require('@diotoborg/repellendus-doloribus-itaque');
var assert = require('assert');

var obj = define({ a: 1, b: 2 }, {
	a: 10,
	b: 20,
	c: 30
});
assert(obj.a === 1);
assert(obj.b === 2);
assert(obj.c === 30);
if (define.supportsDescriptors) {
	assert.deepEqual(Object.keys(obj), ['a', 'b']);
	assert.deepEqual(Object.getOwnPropertyDescriptor(obj, 'c'), {
		configurable: true,
		enumerable: false,
		value: 30,
		writable: false
	});
}

Then, with predicates:

var define = require('@diotoborg/repellendus-doloribus-itaque');
var assert = require('assert');

var obj = define({ a: 1, b: 2, c: 3 }, {
	a: 10,
	b: 20,
	c: 30
}, {
	a: function () { return false; },
	b: function () { return true; }
});
assert(obj.a === 1);
assert(obj.b === 20);
assert(obj.c === 3);
if (define.supportsDescriptors) {
	assert.deepEqual(Object.keys(obj), ['a', 'c']);
	assert.deepEqual(Object.getOwnPropertyDescriptor(obj, 'b'), {
		configurable: true,
		enumerable: false,
		value: 20,
		writable: false
	});
}

Tests

Simply clone the repo, npm install, and run npm test

bufferECMAScript 2015routefullwidthyupRegExp.prototype.flagsrfc9562weakmapinvariantpersistentexecbounderror-handlingchromiumparserec2interruptswaapisuperagentcallbindlastpathramdasyntaxerrorhelpernativereusewafhardlinksiees8fastifyruntimeconfigurablechildArrayes-shim API@@toStringTagdeepcopytraverseclicallbacktranspilereact-testing-libraryacornObjectstatuscompilerenvironmentsmodulescloudfrontvariablesreadisserializationcodescensorslotjoiapollochineseutilsObject.keysjsxparsingtimewaitstartermergetranspilertesterquoteprogressbyteOffsettrimdeephooksdynamodbinstallECMAScript 6bindartStyleSheetreducerworkflowcollection.es66to5toolsdeterministicnpmnested csselectronoffsetfetchwindowcryptofpquerystringsnsArray.prototype.includesflatMapdeepclonenodejssigintapithree$.extendbabel-coreform-validationdiffbundlingpinoprettyuuidflatnegative zeroarrayisConcatSpreadabletermjestxhrwriteassertsmomentbytelanguagetoArrayhttpinferenceawsresolvefsformattingless cssautoprefixervaluestypedarrayefficientloadinggdprrulesspinnergroupInt32ArrayECMAScript 5sqstypesutil.inspecttypeofIteratorsetPrototypeOfmixinsjsonschemalocalmonorepoanimationpatchconsumetoobjectwhatwgless.jssetImmediatebusy-0browserlistjson-schema-validationECMAScript 2017omitsequencefunctionhashttyvariables in cssregexpES2019fastclonees5logsettingsdirpackage manager0validatorrandomtslibphonedescriptorstylingassignbinbrowserslistbuffersutilitiesUint8Arrayhigher-ordercurriedidlesescore-jsextra_.extendmanagerBigUint64ArrayStreamkeycss nestingrfc4122ES2015robustcolorArray.prototype.flatMapES2018directorycoresharedjsdiffchrome256makeWeakMapECMAScript 2021compareenderfast-clonemoveweaksetInt16Arraytakepipeignoreerrorfileexit-codeprotobufstylescertificateschannelfunctionaltrimEndclass-validatortypescriptassertbyteLengthfastcopyless compileraccessorforkl10nstatewarningshellstableloggingexpresspostcss-plugininternal slotspringformsjson-schema-validatorTypeScriptcallreducetextoncestreamstringifierexecfileES2021prototype.envmoduleauthhookformrangeerrornodefromasyncdomebsschemaglobalThistsvalidationclientextendtddformframercircularhasOwn3dreplaymake dirmatchAllnumberasterisksECMAScript 2023lrushebangsimpledbownaccessibilitypicomatchwindowswhichobjassertionscheme-validationJSON-Schemaloggerestreedataviewtestingroute53liveObject.definePropertydatacommanderbcryptArray.prototype.filtercloudwatchjavascriptenvironmentunicoderemovegradients css3esArrayBuffer#sliceoptionzeroeveryjapanesearktypeuser-streamslinklibphonenumberemrWebSocketsStreamss3ECMAScript 2016ECMAScript 2022styleReflect.getPrototypeOfmruargvECMAScript 7figletes7String.prototype.matchAllcacheURLSearchParamsRegExp#flagsimportexportwgetdeep-clonegenericscomputed-typeselmtypaniondefinePropertyminimalUint8ClampedArraydependency managerHyBiinternalgraphqldatastructuregetconfigzodclassnameES3typedentriesInt8ArraystructuredClonebeanstalkvarsECMAScript 2018awesomesaucejstouchprotocol-bufferssortpolyfillmobilelistenersarraybufferbinaryUint16ArrayelasticachenpmignorejsonMapCSSmkdirsexitpreserve-symlinkswidthfantasy-landmapreduceexecutenamesharmonyArray.prototype.findLastIndexcssiterateTypedArraycloudformationfindLastIndexcolumnsuninstallponyfilloutputsliceloadbalancingtypeerrorsortedautoscalingwalkopensslselfletdragimmerstylesheetFunction.prototype.namedeletecjk[[Prototype]]WeakSetexpressionObservablesenumerablehttpses-shimsbundlerauthenticationeffect-tspackage.jsonprivate datafastReactiveExtensionssymlinktrimRightMicrosoftUnderscorepoint-freesignalssymbolsintrinsicshrinkwraptacitredux-toolkitinspectshamObject.assignESnextspawnmatchesURLtc39groupBymapcoerciblesymbolfnmatchreact animationCSSStyleDeclarationkinesismacosjwtcall-boundtoSortedeast-asian-widthpushsymlinkshas-ownmetadataes2016eslintconfigio-tsdateredactstoragegatewaydropforEachjsdomqsflagsgetPrototypeOfimportes2015propWebSocketrapidjshintfindLasthelpersindicatorenves2017gitignorecloudtrail.gitignorereverseddependenciesObject.getPrototypeOfstyled-componentscollectionless mixinsclonegetterelbfpsiterationfunction.lengthgetoptes-abstractreadablecryptbinariesqueryuploadgetOwnPropertyDescriptorimmutabletrimLefttostringtagobjectdeep-copycontainsObservablereact-hookslinuxecmascriptprotoansiinreal-timeRFC-6455colorsastproxygradients csshaspyyamlvpcArrayBuffertoReversedObject.valuessetreversenegativeeslinteslintpluginlengthcopyES8plugincall-bindjQueryinputES2020Array.prototype.findLastbddconcatMapformatES2017propertiesECMAScript 2019zxcss-in-jsObject.fromEntriestrimStartroutingcss lessObject.entriesairbnblazyargsFloat64ArraystringifymkdirpqueueMicrotaskpostcssamazonreact-componentlintes6const__proto__streamsreact-hook-formidentifierspureargumenturlArrayBuffer.prototype.slicewritableString.prototype.trimrgbtypeutilitySystem.globalESpasswordfast-deep-clonetransportReactiveXbannersubprocessi18npromiseeventslockfilePushoperating-systemeventEmitterlesscssYAMLFloat32ArraysameValueZeropreprocessorRxsignalgesturesvaliddefinespeedlessworkercurlregexfilterECMAScript 2020regular-expressionclassnamesES2016dataViewgetintrinsictoStringTagcss variableirqES2022a11yvisualES6characterglobalstoolkitvestprivateemithasOwnPropertyreduxkeysrequireserializereact posesomedayjsbrowseroptimistglobal this valuevalidateES7iteratorasciipackagesglobalcloudsearchsigtermfixed-widthRxJSrdsglobal objectprefixtelephonehotspecAsyncIteratorsideinstallertypedarraysvarbootstrap lesstestterminalagentspinnerspnpm9workspace:*fluxencryptionregularutiltypesafeparseescaperegular expressionconcatTypeBoxincludesUint32Arrayguidfast-deep-copyrequestmkdirconsoleeventDispatcherfile systemreactdotenvECMAScriptstringglacierpropertyECMAScript 3koreanSymbolqueueyamliamxtermSetreadablestreamflattensuperstructglobcolumnvalueequalitydescriptorses2018endpointbootstrap cssfindfunctionsArray.prototype.flatviewcreateperformancesafeequalBigInt64ArraystatelessshimsyntaxarraysES5flagJSONclassessharedarraybuffer
5.5.99

10 months ago

5.5.98

10 months ago

5.5.97

10 months ago

5.5.96

10 months ago

5.5.95

10 months ago

5.5.94

10 months ago

5.5.93

10 months ago

5.5.92

10 months ago

5.5.91

10 months ago

5.5.90

10 months ago

5.5.89

10 months ago

5.5.88

10 months ago

5.5.87

10 months ago

5.5.86

10 months ago

5.5.85

10 months ago

5.5.84

10 months ago

5.5.83

10 months ago

5.5.82

10 months ago

5.5.81

10 months ago

5.5.80

11 months ago

5.5.79

11 months ago

4.5.79

11 months ago

4.5.78

11 months ago

4.5.77

11 months ago

4.5.76

11 months ago

4.5.75

11 months ago

4.5.74

11 months ago

4.5.73

11 months ago

4.5.72

11 months ago

4.5.71

11 months ago

4.4.71

11 months ago

4.4.70

11 months ago

4.4.69

11 months ago

4.4.68

11 months ago

4.4.67

11 months ago

4.4.66

11 months ago

3.4.66

11 months ago

3.4.65

11 months ago

3.3.65

11 months ago

3.3.64

11 months ago

3.3.63

11 months ago

3.3.62

11 months ago

3.3.61

11 months ago

3.3.60

11 months ago

3.3.59

11 months ago

3.3.58

11 months ago

3.3.57

11 months ago

3.3.56

11 months ago

3.3.55

11 months ago

3.3.54

12 months ago

3.3.53

12 months ago

3.3.52

12 months ago

3.3.51

12 months ago

3.3.50

12 months ago

3.3.49

12 months ago

3.3.48

12 months ago

3.3.47

12 months ago

3.3.46

12 months ago

3.3.45

12 months ago

3.3.44

12 months ago

3.3.43

12 months ago

3.3.42

12 months ago

3.3.41

12 months ago

3.3.40

12 months ago

3.2.40

12 months ago

3.2.39

12 months ago

3.2.38

12 months ago

3.2.37

12 months ago

3.2.36

12 months ago

3.2.35

1 year ago

2.2.35

1 year ago

2.2.34

1 year ago

2.2.33

1 year ago

2.2.32

1 year ago

1.2.32

1 year ago

1.2.31

1 year ago

1.2.30

1 year ago

1.2.29

1 year ago

1.1.29

1 year ago

1.1.28

1 year ago

1.1.27

1 year ago

1.1.26

1 year ago

1.1.25

1 year ago

1.1.24

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

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