first commit
This commit is contained in:
21
app_vue/node_modules/@webassemblyjs/ieee754/LICENSE
generated
vendored
Normal file
21
app_vue/node_modules/@webassemblyjs/ieee754/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Sven Sauleau <sven@sauleau.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
33
app_vue/node_modules/@webassemblyjs/ieee754/esm/index.js
generated
vendored
Normal file
33
app_vue/node_modules/@webassemblyjs/ieee754/esm/index.js
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
import { write, read } from "@xtuc/ieee754";
|
||||
/**
|
||||
* According to https://webassembly.github.io/spec/binary/values.html#binary-float
|
||||
* n = 32/8
|
||||
*/
|
||||
|
||||
export var NUMBER_OF_BYTE_F32 = 4;
|
||||
/**
|
||||
* According to https://webassembly.github.io/spec/binary/values.html#binary-float
|
||||
* n = 64/8
|
||||
*/
|
||||
|
||||
export var NUMBER_OF_BYTE_F64 = 8;
|
||||
export var SINGLE_PRECISION_MANTISSA = 23;
|
||||
export var DOUBLE_PRECISION_MANTISSA = 52;
|
||||
export function encodeF32(v) {
|
||||
var buffer = [];
|
||||
write(buffer, v, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32);
|
||||
return buffer;
|
||||
}
|
||||
export function encodeF64(v) {
|
||||
var buffer = [];
|
||||
write(buffer, v, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64);
|
||||
return buffer;
|
||||
}
|
||||
export function decodeF32(bytes) {
|
||||
var buffer = new Uint8Array(bytes);
|
||||
return read(buffer, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32);
|
||||
}
|
||||
export function decodeF64(bytes) {
|
||||
var buffer = new Uint8Array(bytes);
|
||||
return read(buffer, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64);
|
||||
}
|
52
app_vue/node_modules/@webassemblyjs/ieee754/lib/index.js
generated
vendored
Normal file
52
app_vue/node_modules/@webassemblyjs/ieee754/lib/index.js
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.encodeF32 = encodeF32;
|
||||
exports.encodeF64 = encodeF64;
|
||||
exports.decodeF32 = decodeF32;
|
||||
exports.decodeF64 = decodeF64;
|
||||
exports.DOUBLE_PRECISION_MANTISSA = exports.SINGLE_PRECISION_MANTISSA = exports.NUMBER_OF_BYTE_F64 = exports.NUMBER_OF_BYTE_F32 = void 0;
|
||||
|
||||
var _ieee = require("@xtuc/ieee754");
|
||||
|
||||
/**
|
||||
* According to https://webassembly.github.io/spec/binary/values.html#binary-float
|
||||
* n = 32/8
|
||||
*/
|
||||
var NUMBER_OF_BYTE_F32 = 4;
|
||||
/**
|
||||
* According to https://webassembly.github.io/spec/binary/values.html#binary-float
|
||||
* n = 64/8
|
||||
*/
|
||||
|
||||
exports.NUMBER_OF_BYTE_F32 = NUMBER_OF_BYTE_F32;
|
||||
var NUMBER_OF_BYTE_F64 = 8;
|
||||
exports.NUMBER_OF_BYTE_F64 = NUMBER_OF_BYTE_F64;
|
||||
var SINGLE_PRECISION_MANTISSA = 23;
|
||||
exports.SINGLE_PRECISION_MANTISSA = SINGLE_PRECISION_MANTISSA;
|
||||
var DOUBLE_PRECISION_MANTISSA = 52;
|
||||
exports.DOUBLE_PRECISION_MANTISSA = DOUBLE_PRECISION_MANTISSA;
|
||||
|
||||
function encodeF32(v) {
|
||||
var buffer = [];
|
||||
(0, _ieee.write)(buffer, v, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function encodeF64(v) {
|
||||
var buffer = [];
|
||||
(0, _ieee.write)(buffer, v, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function decodeF32(bytes) {
|
||||
var buffer = new Uint8Array(bytes);
|
||||
return (0, _ieee.read)(buffer, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32);
|
||||
}
|
||||
|
||||
function decodeF64(bytes) {
|
||||
var buffer = new Uint8Array(bytes);
|
||||
return (0, _ieee.read)(buffer, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64);
|
||||
}
|
23
app_vue/node_modules/@webassemblyjs/ieee754/package.json
generated
vendored
Normal file
23
app_vue/node_modules/@webassemblyjs/ieee754/package.json
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "@webassemblyjs/ieee754",
|
||||
"version": "1.13.2",
|
||||
"description": "IEEE754 decoder and encoder",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"module": "esm/index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/xtuc/webassemblyjs.git",
|
||||
"directory": "packages/ieee754"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@xtuc/ieee754": "^1.2.0"
|
||||
},
|
||||
"gitHead": "897aeb784f042a46a00626f1d1cca96159aa5db3"
|
||||
}
|
47
app_vue/node_modules/@webassemblyjs/ieee754/src/index.js
generated
vendored
Normal file
47
app_vue/node_modules/@webassemblyjs/ieee754/src/index.js
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
// @flow
|
||||
|
||||
import { write, read } from "@xtuc/ieee754";
|
||||
|
||||
/**
|
||||
* According to https://webassembly.github.io/spec/binary/values.html#binary-float
|
||||
* n = 32/8
|
||||
*/
|
||||
export const NUMBER_OF_BYTE_F32 = 4;
|
||||
|
||||
/**
|
||||
* According to https://webassembly.github.io/spec/binary/values.html#binary-float
|
||||
* n = 64/8
|
||||
*/
|
||||
export const NUMBER_OF_BYTE_F64 = 8;
|
||||
|
||||
export const SINGLE_PRECISION_MANTISSA = 23;
|
||||
|
||||
export const DOUBLE_PRECISION_MANTISSA = 52;
|
||||
|
||||
export function encodeF32(v: number): Array<number> {
|
||||
const buffer = [];
|
||||
|
||||
write(buffer, v, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
export function encodeF64(v: number): Array<number> {
|
||||
const buffer = [];
|
||||
|
||||
write(buffer, v, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
export function decodeF32(bytes: Array<Byte>): number {
|
||||
const buffer = new Uint8Array(bytes);
|
||||
|
||||
return read(buffer, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32);
|
||||
}
|
||||
|
||||
export function decodeF64(bytes: Array<Byte>): number {
|
||||
const buffer = new Uint8Array(bytes);
|
||||
|
||||
return read(buffer, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64);
|
||||
}
|
Reference in New Issue
Block a user