From 0b3dca607cb796921316b690ee109537bd42e4ed Mon Sep 17 00:00:00 2001 From: Ryan Van Etten Date: Thu, 8 Aug 2019 17:00:13 -0700 Subject: [PATCH] Clarify noConflict documentation re #76 (#79) --- README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index db6f384..fae56eb 100644 --- a/README.md +++ b/README.md @@ -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