cc.fovea.cordova.purchase
Version:
Cordova Purchase plugin for iOS, Android, Windows (AppStore, Play, UWP)
24 lines (22 loc) • 873 B
JavaScript
// Add a polyfill for Object.assign in case it isn't supported (which is the case
// on Android < 4.4), see https://github.com/auth0/auth0-cordova/issues/46 for reference
if (typeof Object.assign != 'function') {
Object.assign = function (target, varArgs) {
'use strict';
if (target == null) {
throw new TypeError('Cannot convert undefined or null to object');
}
var to = Object(target);
for (var index = 1; index < arguments.length; index++) {
var nextSource = arguments[index];
if (nextSource != null) {
for (var nextKey in nextSource) {
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
to[nextKey] = nextSource[nextKey];
}
}
}
}
return to;
};
}