File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ case CoffeeScript needs to be listed in your devDependencies.
22
22
23
23
If you want to use rewire also on the client-side take a look at [ client-side bundlers] ( https://github.com/jhnns/rewire#client-side-bundlers )
24
24
25
- [ ![ npm status] ( https://nodei.co/npm/rewire.svg?downloads=true&stars=true )] ( https://npmjs.org/package/rewire )
25
+ [ ![ npm status] ( https://nodei.co/npm/rewire.svg?downloads=true&stars=true&downloadRank=true )] ( https://npmjs.org/package/rewire )
26
26
27
27
<br />
28
28
@@ -106,7 +106,7 @@ var revert = myModule.__set__("port", 3000);
106
106
107
107
// port is now 3000
108
108
revert ();
109
- // port is now the previous value
109
+ // port is now the previous value
110
110
```
111
111
112
112
For your convenience you can also use the ` __with__ ` method which reverts the given changes after it finished.
@@ -138,7 +138,7 @@ myModule.__with__({
138
138
** Difference to require()** <br >
139
139
Every call of rewire() executes the module again and returns a fresh instance.
140
140
141
- ``` javascript
141
+ ``` javascript
142
142
rewire (" ./myModule.js" ) === rewire (" ./myModule.js" ); // = false
143
143
```
144
144
170
170
171
171
### rewire(filename: String): rewiredModule
172
172
173
- Returns a rewired version of the module found at ` filename ` . Use ` rewire() ` exactly like ` require() ` .
173
+ Returns a rewired version of the module found at ` filename ` . Use ` rewire() ` exactly like ` require() ` .
174
174
175
175
### rewiredModule._ ;_ ; set_ ;_ ; (name: String, value: * ): Function
176
176
You can’t perform that action at this time.
0 commit comments