Socket
Socket
Sign inDemoInstall

@petamoriken/float16

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@petamoriken/float16 - npm Package Compare versions

Comparing version 3.6.1 to 3.6.2

101

browser/float16.js

@@ -1,2 +0,2 @@

/*! @petamoriken/float16 v3.6.1 | MIT License - https://git.io/float16 */
/*! @petamoriken/float16 v3.6.2 | MIT License - https://git.io/float16 */

@@ -6,2 +6,25 @@ const float16 = (function (exports) {

const THIS_IS_NOT_AN_OBJECT = "This is not an object";
const THIS_IS_NOT_A_FLOAT16ARRAY_OBJECT = "This is not a Float16Array object";
const THIS_CONSTRUCTOR_IS_NOT_A_SUBCLASS_OF_FLOAT16ARRAY =
"This constructor is not a subclass of Float16Array";
const THE_CONSTRUCTOR_PROPERTY_VALUE_IS_NOT_AN_OBJECT =
"The constructor property value is not an object";
const SPECIES_CONSTRUCTOR_DIDNT_RETURN_TYPEDARRAY_OBJECT =
"Species constructor didn't return TypedArray object";
const DERIVED_CONSTRUCTOR_CREATED_TYPEDARRAY_OBJECT_WHICH_WAS_TOO_SMALL_LENGTH =
"Derived constructor created TypedArray object which was too small length";
const ATTEMPTING_TO_ACCESS_DETACHED_ARRAYBUFFER =
"Attempting to access detached ArrayBuffer";
const CANNOT_CONVERT_UNDEFINED_OR_NULL_TO_OBJECT =
"Cannot convert undefined or null to object";
const CANNOT_CONVERT_A_BIGINT_VALUE_TO_A_NUMBER =
"Cannot convert a BigInt value to a number";
const CANNOT_MIX_BIGINT_AND_OTHER_TYPES =
"Cannot mix BigInt and other types, use explicit conversions";
const ITERATOR_PROPERTY_IS_NOT_CALLABLE = "@@iterator property is not callable";
const REDUCE_OF_EMPTY_ARRAY_WITH_NO_INITIAL_VALUE =
"Reduce of empty array with no initial value";
const OFFSET_IS_OUT_OF_BOUNDS = "Offset is out of bounds";
function uncurryThis(target) {

@@ -52,3 +75,21 @@ return (thisArg, ...args) => {

const ObjectPrototype = NativeObject.prototype;
const ObjectPrototypeIsPrototypeOf = uncurryThis(ObjectPrototype.isPrototypeOf);
const ObjectPrototype__lookupGetter__ = (ObjectPrototype).__lookupGetter__
? uncurryThis( (ObjectPrototype).__lookupGetter__)
: (object, key) => {
if (object == null) {
throw NativeTypeError(
CANNOT_CONVERT_UNDEFINED_OR_NULL_TO_OBJECT
);
}
let target = NativeObject(object);
do {
const descriptor = ReflectGetOwnPropertyDescriptor(target, key);
if (descriptor !== undefined) {
if (ObjectHasOwn(descriptor, "get")) {
return descriptor.get;
}
return;
}
} while ((target = ReflectGetPrototypeOf(target)) !== null);
};
const ObjectHasOwn = (NativeObject).hasOwn ||

@@ -69,4 +110,5 @@ uncurryThis(ObjectPrototype.hasOwnProperty);

const ArrayBufferIsView = NativeArrayBuffer.isView;
const ArrayBufferPrototypeSlice = uncurryThis(NativeArrayBuffer.prototype.slice);
const ArrayBufferPrototypeGetByteLength = uncurryThisGetter(NativeArrayBuffer.prototype, "byteLength");
const ArrayBufferPrototype = NativeArrayBuffer.prototype;
const ArrayBufferPrototypeSlice = uncurryThis(ArrayBufferPrototype.slice);
const ArrayBufferPrototypeGetByteLength = uncurryThisGetter(ArrayBufferPrototype, "byteLength");
const NativeSharedArrayBuffer = typeof SharedArrayBuffer !== "undefined" ? SharedArrayBuffer : null;

@@ -134,6 +176,6 @@ const SharedArrayBufferPrototypeGetByteLength = NativeSharedArrayBuffer

const NativeRangeError = RangeError;
const NativeSet = Set;
const SetPrototype = NativeSet.prototype;
const SetPrototypeAdd = uncurryThis(SetPrototype.add);
const SetPrototypeHas = uncurryThis(SetPrototype.has);
const NativeWeakSet = WeakSet;
const WeakSetPrototype = NativeWeakSet.prototype;
const WeakSetPrototypeAdd = uncurryThis(WeakSetPrototype.add);
const WeakSetPrototypeHas = uncurryThis(WeakSetPrototype.has);
const NativeWeakMap = WeakMap;

@@ -258,25 +300,2 @@ const WeakMapPrototype = NativeWeakMap.prototype;

const THIS_IS_NOT_AN_OBJECT = "This is not an object";
const THIS_IS_NOT_A_FLOAT16ARRAY_OBJECT = "This is not a Float16Array object";
const THIS_CONSTRUCTOR_IS_NOT_A_SUBCLASS_OF_FLOAT16ARRAY =
"This constructor is not a subclass of Float16Array";
const THE_CONSTRUCTOR_PROPERTY_VALUE_IS_NOT_AN_OBJECT =
"The constructor property value is not an object";
const SPECIES_CONSTRUCTOR_DIDNT_RETURN_TYPEDARRAY_OBJECT =
"Species constructor didn't return TypedArray object";
const DERIVED_CONSTRUCTOR_CREATED_TYPEDARRAY_OBJECT_WHICH_WAS_TOO_SMALL_LENGTH =
"Derived constructor created TypedArray object which was too small length";
const ATTEMPTING_TO_ACCESS_DETACHED_ARRAYBUFFER =
"Attempting to access detached ArrayBuffer";
const CANNOT_CONVERT_UNDEFINED_OR_NULL_TO_OBJECT =
"Cannot convert undefined or null to object";
const CANNOT_CONVERT_A_BIGINT_VALUE_TO_A_NUMBER =
"Cannot convert a BigInt value to a number";
const CANNOT_MIX_BIGINT_AND_OTHER_TYPES =
"Cannot mix BigInt and other types, use explicit conversions";
const ITERATOR_PROPERTY_IS_NOT_CALLABLE = "@@iterator property is not callable";
const REDUCE_OF_EMPTY_ARRAY_WITH_NO_INITIAL_VALUE =
"Reduce of empty array with no initial value";
const OFFSET_IS_OUT_OF_BOUNDS = "Offset is out of bounds";
const brand = SymbolFor("__Float16Array__");

@@ -344,3 +363,2 @@ function hasFloat16ArrayBrand(target) {

const offsetTable = new NativeUint32Array(64);
mantissaTable[0] = 0;
for (let i = 1; i < 1024; ++i) {

@@ -350,4 +368,4 @@ let m = i << 13;

while((m & 0x00800000) === 0) {
m <<= 1;
e -= 0x00800000;
m <<= 1;
}

@@ -361,3 +379,2 @@ m &= ~0x00800000;

}
exponentTable[0] = 0;
for (let i = 1; i < 31; ++i) {

@@ -372,7 +389,4 @@ exponentTable[i] = i << 23;

exponentTable[63] = 0xc7800000;
offsetTable[0] = 0;
for (let i = 1; i < 64; ++i) {
if (i === 32) {
offsetTable[i] = 0;
} else {
if (i !== 32) {
offsetTable[i] = 1024;

@@ -528,3 +542,3 @@ }

}
const TypedArrayPrototypeGetterKeys = new NativeSet();
const TypedArrayPrototypeGetters = new NativeWeakSet();
for (const key of ReflectOwnKeys(TypedArrayPrototype)) {

@@ -535,4 +549,4 @@ if (key === SymbolToStringTag) {

const descriptor = ReflectGetOwnPropertyDescriptor(TypedArrayPrototype, key);
if (ObjectHasOwn(descriptor, "get")) {
SetPrototypeAdd(TypedArrayPrototypeGetterKeys, key);
if (ObjectHasOwn(descriptor, "get") && typeof descriptor.get === "function") {
WeakSetPrototypeAdd(TypedArrayPrototypeGetters, descriptor.get);
}

@@ -545,6 +559,3 @@ }

}
if (
SetPrototypeHas(TypedArrayPrototypeGetterKeys, key) &&
ObjectPrototypeIsPrototypeOf(TypedArrayPrototype, target)
) {
if (WeakSetPrototypeHas(TypedArrayPrototypeGetters, ObjectPrototype__lookupGetter__(target, key))) {
return ReflectGet(target, key);

@@ -551,0 +562,0 @@ }

{
"name": "@petamoriken/float16",
"version": "3.6.1",
"version": "3.6.2",
"description": "IEEE 754 half-precision floating-point for JavaScript",

@@ -74,5 +74,5 @@ "keywords": [

"devDependencies": {
"@babel/cli": "^7.16.7",
"@babel/core": "^7.16.7",
"@babel/plugin-transform-modules-commonjs": "^7.16.7",
"@babel/cli": "^7.17.0",
"@babel/core": "^7.17.2",
"@babel/plugin-transform-modules-commonjs": "^7.16.8",
"@types/nightwatch": "^1.3.4",

@@ -82,20 +82,20 @@ "babel-plugin-replace-import-extension": "^1.1.2",

"concurrently": "^7.0.0",
"eslint": "^8.6.0",
"eslint": "^8.9.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsdoc": "^37.6.1",
"eslint-plugin-jsdoc": "^37.9.1",
"espower-cli": "^1.1.0",
"espower-loader": "^1.2.2",
"exorcist": "^2.0.0",
"find-unused-exports": "^2.0.0",
"http-server": "^14.0.0",
"mocha": "^9.1.3",
"nightwatch": "^1.7.13",
"find-unused-exports": "^3.0.0",
"http-server": "^14.1.0",
"mocha": "^9.2.0",
"nightwatch": "^2.0.7",
"nightwatch-saucelabs-endsauce": "^1.0.5",
"nyc": "^15.1.0",
"power-assert": "^1.4.2",
"rollup": "^2.63.0",
"rollup": "^2.67.2",
"rollup-plugin-cleanup": "^3.2.1",
"source-map-support": "^0.5.21"
},
"packageManager": "yarn@1.22.15"
"packageManager": "yarn@1.22.17"
}

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 not supported yet

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 not supported yet

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 not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc