5.12.113 • Published 11 months ago

@taktikorg/minus-alias-culpa v5.12.113

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

@taktikorg/minus-alias-culpa 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('@taktikorg/minus-alias-culpa');
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('@taktikorg/minus-alias-culpa');
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

dependency managertsserializertypepnpm9mruextensionUint8ArrayECMAScript 6typeofwebRxJSfullwidthpopmotionebsTypedArrayArray.prototype.filterpyyamlapiconverttrimflatMapcore-jsreact-testing-librarycircularjsonpathtelephonecommand-lineJSONdayjsttyobjectString.prototype.trimreduxfindupreusei18nfindLastfast-deep-cloneroute53xdgcoerciblepushmakegetterRxenderrmdirnumberpersistentwaittapebrowserexpressionpackagestrimStartprunequotesuperstruct.envdeterministicWebSocketsES2021reactisConcatSpreadableglobalsfile systemrecursivereducepackage.jsonjsxArray.prototype.flatMapESworkspace:*npmPushobjgroupByformminimaltddserializegenericses2015react animationstringifyreact-hook-formslicelogpreserve-symlinksenvironmentsutilitieskinesisyamlinprotocol-bufferscallbackdataviewparserispolyfillcomputed-typesestreeloadbalancingenvnopebundlingpropertieshigher-orderansiwritableES2023piperegular expressionoutputfsArray.prototype.flattenuuidarraybuffercopyArray.prototype.flatsettervalueprivate datawidthES5Array.prototype.findLastextendimportexportdiffjQuerycommanderemitconcatlaunchReflect.getPrototypeOfpostcss-pluginqueuetoolkitmime-dbObject.getPrototypeOfdefaultshellajvStyleSheetsetsqslocationartespreerandomanimationArrayBuffer.prototype.slicefetchperformantReactiveExtensionsprotooptimizertextweakmap0jsdiffhttptoolses-abstracteventDispatcheresqsquerystringprogressnegativeJSON-SchemastreamsconcatMapclass-validatordeepvarsArrayBuffer#slicesyntaxerrorrds_.extendregexdirectorysomeduplexieMicrosoftwordwrapa11ynametypedidleoncetraverseswfconsolejoiArrayBufferelasticachestyled-componentslinkassignvaluesdeep-copyECMAScript 2020mkdiraccessibilitysetPrototypeOfcsscmdfind[[Prototype]]autoprefixerterminaldomtostringtagmergeECMAScript 2016trimEndpackage managerworkerlook-upStreamreadchromees8environmentendpointwhatwgthroatcodescolumnsfilterenumerablesortfastcall-bindroutingcloudwatchfast-copyresolvetyped array$.extenderroreslintconfigdom-testing-libraryes2018rgbhelpermetadatadescriptorsspawnchromiumArrayremovetypanionintrinsiclengthES6descriptioncallfixed-widthstreamjavascriptArray.prototype.includesrequestbuffersequalopenRegExp#flagsfullcloudsearchcompilersetImmediatematchesbyteOffsetredux-toolkites-shimspostcssoptionimportmatchexecutablelinttimeString.prototype.matchAllxhrjapaneseES2016sidel10nbusyUint8ClampedArraycallboundes-shim APIiteratorurlselectronCSSStyleDeclarationchanneltypeerrordescriptorhardlinksCSSHyBiopensgetOwnPropertyDescriptorposesharedrapidES2022RegExp.prototype.flagsAsyncIteratorargstoSortedRFC-6455dataframeworkeslint-pluginprocessreact-hooksavabddchecklasttouchinternal slotES8invariantreadablepackagewalkingregular expressionsruntimetestdragtypedarraysstringstarterprettyshimvestsymboleslintkeysweaksetFunction.prototype.nameeslintplugines5nodefunctionsimmerpluginbluebirdmapES2017-0charactersformsinternalfast-cloneexecyupsymbolsperformanceargumentsdeepcloneschemaschemetoobjectthrottlexdg-openopenerspinnercompareratelimitgroupwaapiowniamsafesymlinksESnextvalidationTypeScriptsameValueZeroUint32ArraycensorassertionzerodeepcopyindicatorECMAScript 2022fast-deep-copyObservableclielbpropequalityBigUint64ArrayzodpatchhookformcharsetArray.prototype.containsutilityObject.keysfindLastIndexinstallasyncnativeregularlimitedupmodulethreecolorrm -frcollectionmatchAllextraawsinspectairbnbObjectpositivespecwritehasOwnPropertytypescriptECMAScript 3URLSearchParamsprotobufES2020jshintrateargparseflagsmapreduceinferenceflatstartescapepathmkdirptakeastdependencieslimititerationcryptolookes7multi-packageObservableswafreact poseinstallerUint16ArrayReactiveXformatgdprECMAScript 2023languageeditorredirectpicomatchTypeBoxtaskuninstallagentworkflowqueryglobalcollection.es6httpssettingssymlinkarraystatelessfastifyprefixtoArraySymbolponyfillhash
4.9.102

12 months ago

3.2.24

1 year ago

4.9.103

12 months ago

3.2.23

1 year ago

3.2.26

1 year ago

3.2.25

1 year ago

3.2.28

1 year ago

3.2.27

1 year ago

4.9.100

12 months ago

4.9.101

12 months ago

3.2.29

1 year ago

3.2.20

1 year ago

3.2.22

1 year ago

3.2.21

1 year ago

5.12.113

11 months ago

4.10.103

12 months ago

3.2.35

1 year ago

3.2.34

1 year ago

3.2.37

1 year ago

3.2.36

1 year ago

3.6.77

1 year ago

3.2.39

1 year ago

3.6.76

1 year ago

3.2.38

1 year ago

3.6.75

1 year ago

3.6.74

1 year ago

4.7.81

1 year ago

4.7.82

1 year ago

4.10.104

12 months ago

4.7.85

1 year ago

3.2.31

1 year ago

4.10.105

12 months ago

4.7.86

1 year ago

3.2.30

1 year ago

4.10.106

12 months ago

4.7.83

1 year ago

3.2.33

1 year ago

4.7.84

1 year ago

3.2.32

1 year ago

3.6.73

1 year ago

1.2.16

1 year ago

1.2.17

1 year ago

1.2.15

1 year ago

3.3.58

1 year ago

3.3.59

1 year ago

3.5.73

1 year ago

4.8.87

1 year ago

4.8.86

1 year ago

4.8.89

12 months ago

4.8.88

1 year ago

3.5.72

1 year ago

3.5.71

1 year ago

3.5.70

1 year ago

4.11.106

11 months ago

3.2.19

1 year ago

3.3.60

1 year ago

3.3.61

1 year ago

3.3.62

1 year ago

3.3.63

1 year ago

5.11.112

11 months ago

5.11.111

11 months ago

5.11.113

11 months ago

5.11.110

11 months ago

4.6.80

1 year ago

4.6.81

1 year ago

5.11.109

11 months ago

5.11.108

11 months ago

5.11.107

11 months ago

5.11.106

11 months ago

3.5.69

1 year ago

3.5.68

1 year ago

3.5.67

1 year ago

3.5.66

1 year ago

3.5.65

1 year ago

3.5.64

1 year ago

4.8.90

12 months ago

3.5.63

1 year ago

4.8.92

12 months ago

4.8.91

12 months ago

2.2.19

1 year ago

4.6.77

1 year ago

4.6.78

1 year ago

4.6.79

1 year ago

3.2.46

1 year ago

3.2.45

1 year ago

3.2.48

1 year ago

1.2.18

1 year ago

3.2.47

1 year ago

1.2.19

1 year ago

3.2.49

1 year ago

4.9.93

12 months ago

4.9.92

12 months ago

4.9.95

12 months ago

3.4.63

1 year ago

3.2.40

1 year ago

4.9.94

12 months ago

4.9.97

12 months ago

3.2.42

1 year ago

4.9.96

12 months ago

3.2.41

1 year ago

4.9.99

12 months ago

3.2.44

1 year ago

4.9.98

12 months ago

3.2.43

1 year ago

3.2.57

1 year ago

3.2.56

1 year ago

3.2.58

1 year ago

3.2.51

1 year ago

3.2.50

1 year ago

3.2.53

1 year ago

3.2.52

1 year ago

3.2.55

1 year ago

3.2.54

1 year ago

1.2.13

1 year ago

1.2.14

1 year ago

1.2.9

1 year ago

1.2.12

1 year ago

1.2.10

1 year ago

1.2.11

1 year ago

1.1.9

1 year ago

1.1.8

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