@toruslabs/openlogin-utils
Advanced tools
Comparing version 2.13.0 to 3.0.0
@@ -70,29 +70,3 @@ /******/ (() => { // webpackBootstrap | ||
var randomId = function randomId() { | ||
return external_randombytes_default()(32).toString("hex"); | ||
}; | ||
;// CONCATENATED MODULE: external "@babel/runtime/helpers/classCallCheck" | ||
const classCallCheck_namespaceObject = require("@babel/runtime/helpers/classCallCheck"); | ||
var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck_namespaceObject); | ||
;// CONCATENATED MODULE: external "@babel/runtime/helpers/createClass" | ||
const createClass_namespaceObject = require("@babel/runtime/helpers/createClass"); | ||
var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass_namespaceObject); | ||
;// CONCATENATED MODULE: external "@babel/runtime/helpers/assertThisInitialized" | ||
const assertThisInitialized_namespaceObject = require("@babel/runtime/helpers/assertThisInitialized"); | ||
var assertThisInitialized_default = /*#__PURE__*/__webpack_require__.n(assertThisInitialized_namespaceObject); | ||
;// CONCATENATED MODULE: external "@babel/runtime/helpers/get" | ||
const get_namespaceObject = require("@babel/runtime/helpers/get"); | ||
var get_default = /*#__PURE__*/__webpack_require__.n(get_namespaceObject); | ||
;// CONCATENATED MODULE: external "@babel/runtime/helpers/inherits" | ||
const inherits_namespaceObject = require("@babel/runtime/helpers/inherits"); | ||
var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits_namespaceObject); | ||
;// CONCATENATED MODULE: external "@babel/runtime/helpers/possibleConstructorReturn" | ||
const possibleConstructorReturn_namespaceObject = require("@babel/runtime/helpers/possibleConstructorReturn"); | ||
var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn_namespaceObject); | ||
;// CONCATENATED MODULE: external "@babel/runtime/helpers/getPrototypeOf" | ||
const getPrototypeOf_namespaceObject = require("@babel/runtime/helpers/getPrototypeOf"); | ||
var getPrototypeOf_default = /*#__PURE__*/__webpack_require__.n(getPrototypeOf_namespaceObject); | ||
;// CONCATENATED MODULE: external "@babel/runtime/helpers/wrapNativeSuper" | ||
const wrapNativeSuper_namespaceObject = require("@babel/runtime/helpers/wrapNativeSuper"); | ||
var wrapNativeSuper_default = /*#__PURE__*/__webpack_require__.n(wrapNativeSuper_namespaceObject); | ||
const randomId = () => external_randombytes_default()(32).toString("hex"); | ||
;// CONCATENATED MODULE: external "@babel/runtime/helpers/defineProperty" | ||
@@ -103,34 +77,12 @@ const defineProperty_namespaceObject = require("@babel/runtime/helpers/defineProperty"); | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
var URLWithHashParams = /*#__PURE__*/function (_URL) { | ||
inherits_default()(URLWithHashParams, _URL); | ||
var _super = _createSuper(URLWithHashParams); | ||
function URLWithHashParams() { | ||
var _this; | ||
classCallCheck_default()(this, URLWithHashParams); | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
_this = _super.call.apply(_super, [this].concat(args)); | ||
defineProperty_default()(assertThisInitialized_default()(_this), "hashParams", new URLSearchParams()); | ||
return _this; | ||
class URLWithHashParams extends URL { | ||
constructor() { | ||
super(...arguments); | ||
defineProperty_default()(this, "hashParams", new URLSearchParams()); | ||
} | ||
createClass_default()(URLWithHashParams, [{ | ||
key: "toString", | ||
value: function toString() { | ||
this.hash = this.hashParams.toString(); | ||
return get_default()(getPrototypeOf_default()(URLWithHashParams.prototype), "toString", this).call(this); | ||
} | ||
}]); | ||
return URLWithHashParams; | ||
}( /*#__PURE__*/wrapNativeSuper_default()(URL)); | ||
toString() { | ||
this.hash = this.hashParams.toString(); | ||
return super.toString.call(this); | ||
} | ||
} | ||
;// CONCATENATED MODULE: external "base64url" | ||
@@ -145,3 +97,3 @@ const external_base64url_namespaceObject = require("base64url"); | ||
var base64url = (external_base64url_default()); | ||
const base64url = (external_base64url_default()); | ||
function safebtoa(str) { | ||
@@ -154,3 +106,3 @@ return base64url.encode(str); | ||
} | ||
var keccak = (external_keccak_default()); | ||
const keccak = (external_keccak_default()); | ||
function base64toJSON(b64str) { | ||
@@ -163,7 +115,7 @@ return JSON.parse(base64url.decode(b64str)); | ||
function keccak256(str) { | ||
var input = str; | ||
let input = str; | ||
if (typeof str === "string" && str.slice(0, 2) === "0x" && str.length === 66) { | ||
input = Buffer.from(str.slice(2), "hex"); | ||
} | ||
var data = "0x".concat(keccak("keccak256").update(input).digest("hex").padStart(64, "0")); | ||
const data = `0x${keccak("keccak256").update(input).digest("hex").padStart(64, "0")}`; | ||
return data; | ||
@@ -170,0 +122,0 @@ } |
import randombytes from 'randombytes'; | ||
import _classCallCheck from '@babel/runtime/helpers/classCallCheck'; | ||
import _createClass from '@babel/runtime/helpers/createClass'; | ||
import _assertThisInitialized from '@babel/runtime/helpers/assertThisInitialized'; | ||
import _get from '@babel/runtime/helpers/get'; | ||
import _inherits from '@babel/runtime/helpers/inherits'; | ||
import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn'; | ||
import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf'; | ||
import _wrapNativeSuper from '@babel/runtime/helpers/wrapNativeSuper'; | ||
import _defineProperty from '@babel/runtime/helpers/defineProperty'; | ||
@@ -14,32 +6,16 @@ import base64urlLib from 'base64url'; | ||
var randomId = function randomId() { | ||
return randombytes(32).toString("hex"); | ||
}; | ||
const randomId = () => randombytes(32).toString("hex"); | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
var URLWithHashParams = /*#__PURE__*/function (_URL) { | ||
_inherits(URLWithHashParams, _URL); | ||
var _super = _createSuper(URLWithHashParams); | ||
function URLWithHashParams() { | ||
var _this; | ||
_classCallCheck(this, URLWithHashParams); | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
_this = _super.call.apply(_super, [this].concat(args)); | ||
_defineProperty(_assertThisInitialized(_this), "hashParams", new URLSearchParams()); | ||
return _this; | ||
class URLWithHashParams extends URL { | ||
constructor() { | ||
super(...arguments); | ||
_defineProperty(this, "hashParams", new URLSearchParams()); | ||
} | ||
_createClass(URLWithHashParams, [{ | ||
key: "toString", | ||
value: function toString() { | ||
this.hash = this.hashParams.toString(); | ||
return _get(_getPrototypeOf(URLWithHashParams.prototype), "toString", this).call(this); | ||
} | ||
}]); | ||
return URLWithHashParams; | ||
}( /*#__PURE__*/_wrapNativeSuper(URL)); | ||
toString() { | ||
this.hash = this.hashParams.toString(); | ||
return super.toString.call(this); | ||
} | ||
} | ||
var base64url = base64urlLib; | ||
const base64url = base64urlLib; | ||
function safebtoa(str) { | ||
@@ -52,3 +28,3 @@ return base64url.encode(str); | ||
} | ||
var keccak = keccakLib; | ||
const keccak = keccakLib; | ||
function base64toJSON(b64str) { | ||
@@ -61,7 +37,7 @@ return JSON.parse(base64url.decode(b64str)); | ||
function keccak256(str) { | ||
var input = str; | ||
let input = str; | ||
if (typeof str === "string" && str.slice(0, 2) === "0x" && str.length === 66) { | ||
input = Buffer.from(str.slice(2), "hex"); | ||
} | ||
var data = "0x".concat(keccak("keccak256").update(input).digest("hex").padStart(64, "0")); | ||
const data = `0x${keccak("keccak256").update(input).digest("hex").padStart(64, "0")}`; | ||
return data; | ||
@@ -68,0 +44,0 @@ } |
{ | ||
"name": "@toruslabs/openlogin-utils", | ||
"version": "2.13.0", | ||
"version": "3.0.0", | ||
"homepage": "https://github.com/torusresearch/OpenLoginSdk#readme", | ||
@@ -55,3 +55,3 @@ "license": "ISC", | ||
}, | ||
"gitHead": "9b71d0d86fbb98734cd08e91c1b0491e055f91e4" | ||
"gitHead": "5eb6fc27780eda29720c6651efeeb1ca4936a4a7" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
472030
731