-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #285 from auth0/polyfill-functions
Polyfill functions for IE
- Loading branch information
Showing
13 changed files
with
124 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
function get() { | ||
if (!Object.assign) { | ||
return objectAssignPolyfill; | ||
} | ||
|
||
return Object.assign; | ||
} | ||
|
||
function objectAssignPolyfill(target) { | ||
'use strict'; | ||
if (target === undefined || target === null) { | ||
throw new TypeError('Cannot convert first argument to object'); | ||
} | ||
|
||
var to = Object(target); | ||
for (var i = 1; i < arguments.length; i++) { | ||
var nextSource = arguments[i]; | ||
if (nextSource === undefined || nextSource === null) { | ||
continue; | ||
} | ||
|
||
var keysArray = Object.keys(Object(nextSource)); | ||
for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) { | ||
var nextKey = keysArray[nextIndex]; | ||
var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); | ||
if (desc !== undefined && desc.enumerable) { | ||
to[nextKey] = nextSource[nextKey]; | ||
} | ||
} | ||
} | ||
return to; | ||
} | ||
|
||
module.exports = { | ||
get: get, | ||
objectAssignPolyfill: objectAssignPolyfill | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,9 +94,7 @@ describe('auth0.WebAuth.redirect', function () { | |
response_type: 'id_token', | ||
scope: 'openid', | ||
tenant: 'me', | ||
username: '[email protected]', | ||
state: 'ABCDEFGHIJ', | ||
nonce: 'ABCDEFGHIJ' | ||
username: '[email protected]' | ||
}, | ||
headers: { | ||
'Content-Type': 'application/json', | ||
|
@@ -176,7 +174,6 @@ describe('auth0.WebAuth.redirect', function () { | |
response_type: 'token', | ||
scope: 'openid', | ||
tenant: 'me', | ||
state: 'ABCDEFGHIJ', | ||
username: '[email protected]' | ||
}, | ||
headers: { | ||
|
@@ -261,7 +258,6 @@ describe('auth0.WebAuth.redirect', function () { | |
client_id: '...', | ||
connection: 'the_connection', | ||
password: '123456', | ||
state: 'ABCDEFGHIJ', | ||
redirect_uri: 'http://page.com/callback', | ||
response_type: 'token', | ||
scope: 'openid', | ||
|