5.5.99 • Published 2 years ago

@diotoborg/repellendus-doloribus-itaque v5.5.99

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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

2 years ago

5.5.98

2 years ago

5.5.97

2 years ago

5.5.96

2 years ago

5.5.95

2 years ago

5.5.94

2 years ago

5.5.93

2 years ago

5.5.92

2 years ago

5.5.91

2 years ago

5.5.90

2 years ago

5.5.89

2 years ago

5.5.88

2 years ago

5.5.87

2 years ago

5.5.86

2 years ago

5.5.85

2 years ago

5.5.84

2 years ago

5.5.83

2 years ago

5.5.82

2 years ago

5.5.81

2 years ago

5.5.80

2 years ago

5.5.79

2 years ago

4.5.79

2 years ago

4.5.78

2 years ago

4.5.77

2 years ago

4.5.76

2 years ago

4.5.75

2 years ago

4.5.74

2 years ago

4.5.73

2 years ago

4.5.72

2 years ago

4.5.71

2 years ago

4.4.71

2 years ago

4.4.70

2 years ago

4.4.69

2 years ago

4.4.68

2 years ago

4.4.67

2 years ago

4.4.66

2 years ago

3.4.66

2 years ago

3.4.65

2 years ago

3.3.65

2 years ago

3.3.64

2 years ago

3.3.63

2 years ago

3.3.62

2 years ago

3.3.61

2 years ago

3.3.60

2 years ago

3.3.59

2 years ago

3.3.58

2 years ago

3.3.57

2 years ago

3.3.56

2 years ago

3.3.55

2 years ago

3.3.54

2 years ago

3.3.53

2 years ago

3.3.52

2 years ago

3.3.51

2 years ago

3.3.50

2 years ago

3.3.49

2 years ago

3.3.48

2 years ago

3.3.47

2 years ago

3.3.46

2 years ago

3.3.45

2 years ago

3.3.44

2 years ago

3.3.43

2 years ago

3.3.42

2 years ago

3.3.41

2 years ago

3.3.40

2 years ago

3.2.40

2 years ago

3.2.39

2 years ago

3.2.38

2 years ago

3.2.37

2 years ago

3.2.36

2 years ago

3.2.35

2 years ago

2.2.35

2 years ago

2.2.34

2 years ago

2.2.33

2 years ago

2.2.32

2 years ago

1.2.32

2 years ago

1.2.31

2 years ago

1.2.30

2 years ago

1.2.29

2 years ago

1.1.29

2 years ago

1.1.28

2 years ago

1.1.27

2 years ago

1.1.26

2 years ago

1.1.25

2 years ago

1.1.24

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago