3.7.100 • Published 9 months ago

@swenkerorg/et-laudantium v3.7.100

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

@swenkerorg/et-laudantium 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('@swenkerorg/et-laudantium');
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.

hardlinksinstallerbrowserpathchromiumjshintnpmramdadom-testing-libraryappsinatraregular expressionfile systemconfigECMAScriptsource mapguidhookformtraverseequalpluginstylesexecObject.getPrototypeOfPromiseunicodewidthdebugURLflatES2019spinnersgdprvalidcensorapollokarmahttpsrapidreact-hooksassertionequalityshelloncestringifierpackage managerschemeassignTypedArray6to5Int8ArraycolumnstypedarrayscachecommanderaccessibilitydeepcopyfileawstacitmkdirplookchildWeakMapworkspace:*transformURLSearchParamsenvRegExp.prototype.flagsfast-cloneeveryfolderhttpbindformutilsvpcString.prototype.matchAllatomdiffpositivenameemojiObject.entriesdragFloat64ArraygetOwnPropertyDescriptoranimationeventEmitterprogressvargroupBypureYAMLspringdomcssamazonmodulerm -frWebSocketebsinternalwalkingconcatMapgetterES2018simpledbspawncall-bindES2016recursiveECMAScript 2020numberprototypeairbnbyuptoStringTagfastArray.prototype.findLastIndexArrayBuffer#slicestyleguidesortedcallrm -rfletboundelasticacheECMAScript 2019bundlertslibhigher-ordertrimStartvalidatorjsdiffmoveregular-expressionfunctionalajvfindLastIndexcharactersetImmediateelectronES2023reusefindtypeschaimanagercreatesuperagentfind-upshimrangeerrorstylingawesomesauceconstframeworkremovegetrmeventDispatcherWeakSetserializationUint16ArraymrucontainsenderES3babelsetclassnamesinputtoolsprocessECMAScript 3keyskinesiscircularownreact-testing-librarywafESString.prototype.trimsyntaxloggerkeyasteriskscoloreslintpluginzodECMAScript 5Streamsutil.inspectmapbuffersSystem.globalECMAScript 2023getintrinsica11yInt16ArrayES6channelisConcatSpreadableObject.keysroutertoArraytapECMAScript 7lruvestSetObservablemobile[[Prototype]]restfulsetterESnextlook-upavafullwidthcloudtrailharmonywgetassertomitlockfiletc39prefixmakeECMAScript 2018i18nfastifydatevisualreduceObject.definePropertyECMAScript 2017scheme-validationtrimLeftworkflowprivateglobal objectacorninferencefastcopyECMAScript 6lastsuperstructRegExp#flagsmatchAllflagssharedfast-copyclientesstoragegatewayarrayjsonparentswarningtakefastcloneidimmutablebyteLengthSymbol.toStringTagsnsUint8ClampedArraydirspinnerglobal this values3reversedisrmdirvarsarktypejapaneseobjectmanipulation
3.7.100

9 months ago

3.7.99

9 months ago

3.7.98

9 months ago

3.7.97

9 months ago

3.7.96

9 months ago

3.7.95

9 months ago

3.7.94

9 months ago

3.7.93

9 months ago

3.7.92

9 months ago

3.7.91

9 months ago

3.6.91

9 months ago

3.6.90

9 months ago

3.6.89

9 months ago

3.6.88

9 months ago

3.6.87

9 months ago

3.6.86

9 months ago

3.6.85

9 months ago

3.5.85

9 months ago

3.5.84

9 months ago

3.5.83

10 months ago

3.5.82

10 months ago

3.5.81

10 months ago

3.5.80

10 months ago

3.5.79

10 months ago

3.5.78

10 months ago

3.5.77

10 months ago

3.5.76

10 months ago

3.5.75

10 months ago

3.5.74

10 months ago

3.5.73

10 months ago

2.5.73

10 months ago

2.5.72

10 months ago

2.5.71

10 months ago

2.4.71

10 months ago

2.3.71

10 months ago

2.3.70

10 months ago

2.3.69

10 months ago

2.3.68

10 months ago

2.3.67

10 months ago

2.3.66

10 months ago

2.3.65

10 months ago

2.3.64

10 months ago

2.3.63

10 months ago

2.3.62

10 months ago

2.3.61

10 months ago

2.3.60

10 months ago

2.3.59

10 months ago

2.3.58

10 months ago

2.3.57

10 months ago

2.3.56

11 months ago

2.3.55

11 months ago

2.3.54

11 months ago

2.3.53

11 months ago

2.3.52

11 months ago

2.3.51

11 months ago

2.3.50

11 months ago

2.3.49

11 months ago

2.3.48

11 months ago

2.3.47

11 months ago

2.3.46

11 months ago

2.3.45

11 months ago

2.3.44

11 months ago

2.3.43

11 months ago

2.3.42

11 months ago

2.3.41

11 months ago

2.3.40

11 months ago

2.3.39

11 months ago

2.3.38

11 months ago

2.3.37

11 months ago

2.3.36

11 months ago

2.3.35

11 months ago

1.3.35

11 months ago

1.3.34

11 months ago

1.3.33

11 months ago

1.3.32

11 months ago

1.3.31

11 months ago

1.3.30

11 months ago

1.3.29

11 months ago

1.3.28

11 months ago

1.3.27

12 months ago

1.3.26

12 months ago

1.3.25

12 months ago

1.3.24

12 months ago

1.2.24

12 months ago

1.2.23

12 months ago

1.2.22

12 months ago

1.2.21

12 months ago

1.2.20

12 months ago

1.1.20

12 months ago

1.1.19

12 months ago

1.1.18

12 months ago

1.1.17

12 months ago

1.1.16

12 months ago

1.1.15

12 months ago

1.1.14

12 months ago

1.1.13

12 months ago

1.1.12

12 months ago

1.1.11

12 months ago

1.1.10

12 months ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago