5.8.113 • Published 11 months ago

@devtea2026/commodi-officia-quod-harum v5.8.113

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

@devtea2026/commodi-officia-quod-harum Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Given an object and a property, replaces a property descriptor (or deletes it), and returns a thunk to restore it.

Example

var mockProperty = require('@devtea2026/commodi-officia-quod-harum');
var assert = require('assert');

var i = 0;
var object = {
	a: 1,
	get b() {
		i += 1;
		return 'b ' + i;
	}
};

assert.equal(object.a, 1);
assert.equal(object.b, 'b 1');
assert.equal(object.b, 'b 2');

var restoreA = mockProperty(object, 'a', { 'delete': true });
assert.equal('a' in object, false);

var restoreB = mockProperty(object, 'b', { value: 42 });
assert.equal(object.b, 42);

restoreA();
assert.equal('a' in object, true);

restoreB();
assert.equal(object.b, 'b 3');

Tests

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

Security

Please email @ljharb or see https://tidelift.com/security if you have a potential security vulnerability to report.

wordwrapimmutableeslintpluginobjectjavascriptArray.prototype.flatpreprocessorjsonpathargsgenericssettings.envshimgradients csslesscallbindFunction.prototype.namedescriptorsinferencerandommerge__proto__encryptionsigintawaitsigtermyamlcjkprototypeCSSStyleDeclarationjsoncollection.es6importcodeseslint-pluginconcatMaphookformES2019matchworkflowoptimistsinatraoptimizerdebugString.prototype.trimnativepersistentdescriptorstringifierprocessdefinePropertystreamssafedependenciestraverseerror-handlingglacierStreamhttpArray.prototype.filterauthdirectorycontainsarktypemakedeterministictssetsuperstructbeanstalkStreamspostcss-pluginlockfileemojisharedlibphonenumberfunctionsRxruntimeObject.entriesvarsappfullstringifyclassnamesstatelesssetterwalkingprotocol-buffersjapanesequerystringirqtslibtypesopenECMAScript 2017fixed-widthmrugroupBybannertc39curlmiddlewarefastlesscssregular expressionsRxJSdropinvarianttypesafefindLastIndexes-shimsworkerjQuerytrimRightmulti-packagefast-deep-copybundlerprefixcompareweakmapwalkxtermAsyncIteratorArray.prototype.findLastcircularpackagesUnderscorefullwidthES2021widthsharedarraybuffermixinsiteratorvariablesloadbalancingUint32ArrayvpcfseventsYAMLtypedsymbolsownreal-timejsdiffstreameventswraploadingnpmgetglobalfile systembreakstylesratejwt@@toStringTagreadableTypedArrayclonees2015make dirinterruptsObject.fromEntriesMapspecpropertywatcheri18ndeep-cloneObject.valuesInt32ArraypasswordgetintrinsicschemepipesymbolIteratorfsgdpronceisbrowserECMAScript 2021ECMAScript 2020css lessdifftypedarraystesterclass-validatorqueuevalidshebangargumentes8styleequalmkdirstypeerrorarrayspluginchannelprivatereact-hook-formWeakMapconcurrencyajaxeventEmitterfast-copyes2017regexreact-testing-libraryzeroURLSearchParamsmochaxhrfastcopystatusidledeepcloneless mixinsgetOwnPropertyDescriptorarrayparsebyteparsernested csscolumnscommand-line
5.8.113

11 months ago

5.8.112

11 months ago

5.8.111

11 months ago

5.8.110

11 months ago

5.7.110

11 months ago

5.6.110

11 months ago

5.6.109

11 months ago

5.6.108

11 months ago

2.4.70

1 year ago

1.1.29

1 year ago

1.1.28

1 year ago

5.5.103

11 months ago

1.1.30

1 year ago

5.5.104

11 months ago

5.5.101

11 months ago

5.5.102

11 months ago

4.5.79

12 months ago

1.1.34

1 year ago

2.4.75

1 year ago

1.1.33

1 year ago

1.1.32

1 year ago

1.1.31

1 year ago

2.4.72

1 year ago

1.1.38

1 year ago

2.4.71

1 year ago

1.1.37

1 year ago

2.4.74

1 year ago

1.1.36

1 year ago

2.4.73

1 year ago

1.1.35

1 year ago

1.1.39

1 year ago

1.1.41

1 year ago

1.1.40

1 year ago

1.3.68

1 year ago

1.1.45

1 year ago

1.3.69

1 year ago

1.1.44

1 year ago

1.1.43

1 year ago

1.3.67

1 year ago

1.1.42

1 year ago

1.1.49

1 year ago

1.1.48

1 year ago

1.1.47

1 year ago

1.1.46

1 year ago

3.5.79

12 months ago

3.5.78

12 months ago

1.2.63

1 year ago

1.2.64

1 year ago

1.2.62

1 year ago

1.2.67

1 year ago

1.2.65

1 year ago

1.2.66

1 year ago

5.5.95

11 months ago

5.5.96

11 months ago

5.5.93

12 months ago

5.5.94

11 months ago

5.5.91

12 months ago

5.5.92

12 months ago

5.5.90

12 months ago

5.5.100

11 months ago

4.5.80

12 months ago

4.5.81

12 months ago

2.5.76

1 year ago

1.1.23

1 year ago

2.5.77

12 months ago

1.1.22

1 year ago

2.5.78

12 months ago

1.1.21

1 year ago

1.1.20

1 year ago

5.5.99

11 months ago

1.1.27

1 year ago

1.1.26

1 year ago

5.5.97

11 months ago

1.1.25

1 year ago

5.5.98

11 months ago

2.5.75

1 year ago

1.1.24

1 year ago

5.5.84

12 months ago

5.5.85

12 months ago

5.5.82

12 months ago

5.5.83

12 months ago

5.5.81

12 months ago

5.6.104

11 months ago

5.6.105

11 months ago

5.6.106

11 months ago

5.6.107

11 months ago

5.5.88

12 months ago

5.5.89

12 months ago

5.5.86

12 months ago

5.5.87

12 months ago

1.4.70

1 year ago

1.3.70

1 year ago

1.1.52

1 year ago

1.1.51

1 year ago

1.1.50

1 year ago

1.1.56

1 year ago

1.1.55

1 year ago

1.1.54

1 year ago

1.1.53

1 year ago

1.1.59

1 year ago

1.1.58

1 year ago

1.1.57

1 year ago

1.1.62

1 year ago

1.1.61

1 year ago

1.1.60

1 year ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.0.16

1 year ago

1.1.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