Skip to content

Commit

Permalink
Clarify noConflict documentation re #76
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanve committed Aug 8, 2019
1 parent c64db55 commit 6ed5086
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,28 @@ Response.sift(stack, fn?, scope|invert?) // like _.compact, [].filter, and jQuer
### `.noConflict()`
[Re: fetch](../../issues/76)
```js
// Unmodify window
Response.noConflict()
```
```js
// Unmodify window and save reference to our Response
let R = Response.noConflict()
```
```js
Response.noConflict() // remove the global `Response`
Response.noConflict(function(Response) {
// Remove the global and get safe reference to `Response` in here
// Unmodify window and get safe reference to our Response in here
})
```
### [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) usage
```js
define(['jquery'], Response.noConflict); // define module and destroy global
define(['jquery'], Response.noConflict); // define module and unmodify window
```
## Resources
Expand Down

0 comments on commit 6ed5086

Please sign in to comment.