@webassemblyjs/helper-numbers
Advanced tools
Comparing version 1.11.1 to 1.11.4
@@ -61,15 +61,16 @@ import Long from "@xtuc/long"; | ||
export function parse64I(sourceString) { | ||
var long; | ||
// $FlowIgnore | ||
var _long; | ||
if (isHexLiteral(sourceString)) { | ||
long = Long.fromString(sourceString, false, 16); | ||
_long = Long.fromString(sourceString, false, 16); | ||
} else if (isDecimalExponentLiteral(sourceString)) { | ||
throw new Error("This number literal format is yet to be implemented."); | ||
} else { | ||
long = Long.fromString(sourceString); | ||
_long = Long.fromString(sourceString); | ||
} | ||
return { | ||
high: long.high, | ||
low: long.low | ||
high: _long.high, | ||
low: _long.low | ||
}; | ||
@@ -76,0 +77,0 @@ } |
@@ -14,3 +14,3 @@ "use strict"; | ||
var _long = _interopRequireDefault(require("@xtuc/long")); | ||
var _long2 = _interopRequireDefault(require("@xtuc/long")); | ||
@@ -21,7 +21,7 @@ var _floatingPointHexParser = _interopRequireDefault(require("@webassemblyjs/floating-point-hex-parser")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function parse32F(sourceString) { | ||
if (isHexLiteral(sourceString)) { | ||
return (0, _floatingPointHexParser.default)(sourceString); | ||
return (0, _floatingPointHexParser["default"])(sourceString); | ||
} | ||
@@ -42,3 +42,3 @@ | ||
if (isHexLiteral(sourceString)) { | ||
return (0, _floatingPointHexParser.default)(sourceString); | ||
return (0, _floatingPointHexParser["default"])(sourceString); | ||
} | ||
@@ -55,3 +55,3 @@ | ||
if (isHexLiteral(sourceString)) { | ||
return (0, _floatingPointHexParser.default)(sourceString); | ||
return (0, _floatingPointHexParser["default"])(sourceString); | ||
} | ||
@@ -87,15 +87,16 @@ | ||
function parse64I(sourceString) { | ||
var long; | ||
// $FlowIgnore | ||
var _long; | ||
if (isHexLiteral(sourceString)) { | ||
long = _long.default.fromString(sourceString, false, 16); | ||
_long = _long2["default"].fromString(sourceString, false, 16); | ||
} else if (isDecimalExponentLiteral(sourceString)) { | ||
throw new Error("This number literal format is yet to be implemented."); | ||
} else { | ||
long = _long.default.fromString(sourceString); | ||
_long = _long2["default"].fromString(sourceString); | ||
} | ||
return { | ||
high: long.high, | ||
low: long.low | ||
high: _long.high, | ||
low: _long.low | ||
}; | ||
@@ -102,0 +103,0 @@ } |
{ | ||
"name": "@webassemblyjs/helper-numbers", | ||
"version": "1.11.1", | ||
"version": "1.11.4", | ||
"description": "Number parsing utility", | ||
@@ -18,4 +18,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@webassemblyjs/floating-point-hex-parser": "1.11.1", | ||
"@webassemblyjs/helper-api-error": "1.11.1", | ||
"@webassemblyjs/floating-point-hex-parser": "1.11.4", | ||
"@webassemblyjs/helper-api-error": "1.11.4", | ||
"@xtuc/long": "4.2.2" | ||
@@ -25,3 +25,3 @@ }, | ||
"license": "MIT", | ||
"gitHead": "3f07e2db2031afe0ce686630418c542938c1674b" | ||
"gitHead": "5fd2425602b752576bbe8089c343d5d70ebc861c" | ||
} |
@@ -68,2 +68,3 @@ // @flow | ||
export function parse64I(sourceString: string): LongNumber { | ||
// $FlowIgnore | ||
let long: Long; | ||
@@ -80,3 +81,3 @@ if (isHexLiteral(sourceString)) { | ||
high: long.high, | ||
low: long.low | ||
low: long.low, | ||
}; | ||
@@ -83,0 +84,0 @@ } |
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
10464
257
+ Added@webassemblyjs/floating-point-hex-parser@1.11.4(transitive)
+ Added@webassemblyjs/helper-api-error@1.11.4(transitive)
- Removed@webassemblyjs/floating-point-hex-parser@1.11.1(transitive)
- Removed@webassemblyjs/helper-api-error@1.11.1(transitive)