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.4.7 to 3.4.8

lib/_arrayIterator.js

173

browser/float16.js

@@ -1,4 +0,4 @@

/*! @petamoriken/float16 v3.4.7 | MIT License - https://git.io/float16 */
/*! @petamoriken/float16 v3.4.8 | MIT License - https://git.io/float16 */
var float16 = (function (exports) {
const float16 = (function (exports) {
'use strict';

@@ -57,2 +57,3 @@

* round a number to a half float number bits.
*
* @param {number} num - double float

@@ -114,2 +115,3 @@ * @returns {number} half float number bits

* convert a half float number bits to a number.
*
* @param {number} float16bits - half float number bits

@@ -126,2 +128,3 @@ * @returns {number} double float

* returns the nearest half precision float representation of a number.
*
* @param {number} num

@@ -146,5 +149,3 @@ * @returns {number}

/**
* @returns {(self:object) => object}
*/
/** @returns {(self: object) => object} */
function createPrivateStorage() {

@@ -168,5 +169,3 @@ const wm = new WeakMap();

/**
* @see https://tc39.es/ecma262/#sec-%arrayiteratorprototype%-object
*/
/** @see https://tc39.es/ecma262/#sec-%arrayiteratorprototype%-object */
const ArrayIteratorPrototype = Object.create(IteratorPrototype, {

@@ -273,3 +272,3 @@ next: {

* @param {unknown} value
* @returns {value is Iterable}
* @returns {value is Iterable<any>}
*/

@@ -299,3 +298,3 @@ function isIterable(value) {

* @param {unknown} value
* @returns {value is any[]}
* @returns {value is Uint8Array|Uint8ClampedArray|Uint16Array|Uint32Array|Int8Array|Int16Array|Int32Array|Float32Array|Float64Array|BigUint64Array|BigInt64Array}
*/

@@ -415,2 +414,3 @@ function isOrdinaryTypedArray(value) {

* bigint comparisons are not supported
*
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort

@@ -461,2 +461,9 @@ * @param {number} x

const hasOwnProperty = Object.prototype.hasOwnProperty;
/** @type {(object: object, key: PropertyKey) => boolean} */
const hasOwn = Object.hasOwn || function hasOwn(object, key) {
return hasOwnProperty.call(object, key);
};
const brand = Symbol.for("__Float16Array__");

@@ -519,3 +526,3 @@

* @param {Float16Array} float16
* @return {ArrayLike<number>}
* @returns {ArrayLike<number>}
*/

@@ -536,3 +543,3 @@ function getFloat16BitsArrayFromFloat16Array(float16) {

* @param {ArrayLike<number>} float16bitsArray
* @return {number[]}
* @returns {number[]}
*/

@@ -571,8 +578,6 @@ function copyToArray(float16bitsArray) {

const hasOwnProperty = Object.prototype.hasOwnProperty;
/** @type {ProxyHandler<Float16Array>} */
const handler = Object.freeze({
get(target, key) {
if (isCanonicalIntegerIndexString(key) && hasOwnProperty.call(target, key)) {
if (isCanonicalIntegerIndexString(key) && hasOwn(target, key)) {
return convertToNumber(Reflect.get(target, key));

@@ -597,3 +602,3 @@ }

set(target, key, value) {
if (isCanonicalIntegerIndexString(key) && hasOwnProperty.call(target, key)) {
if (isCanonicalIntegerIndexString(key) && hasOwn(target, key)) {
return Reflect.set(target, key, roundToFloat16Bits(value));

@@ -606,10 +611,6 @@ }

/**
* limitation: see README.md for details
*/
/** limitation: see README.md for details */
class Float16Array extends Uint16Array {
/**
* @see https://tc39.es/ecma262/#sec-typedarray
*/
/** @see https://tc39.es/ecma262/#sec-typedarray */
constructor(input, byteOffset, length) {

@@ -704,2 +705,3 @@ // input Float16Array

* limitation: `Object.getOwnPropertyNames(Float16Array)` or `Reflect.ownKeys(Float16Array)` include this key
*
* @see https://tc39.es/ecma262/#sec-%typedarray%.from

@@ -775,2 +777,3 @@ */

* limitation: `Object.getOwnPropertyNames(Float16Array)` or `Reflect.ownKeys(Float16Array)` include this key
*
* @see https://tc39.es/ecma262/#sec-%typedarray%.of

@@ -808,5 +811,3 @@ */

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys */
keys() {

@@ -820,2 +821,3 @@ assertFloat16BitsArray(this);

* limitation: returns a object whose prototype is not `%ArrayIteratorPrototype%`
*
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.values

@@ -836,2 +838,3 @@ */

* limitation: returns a object whose prototype is not `%ArrayIteratorPrototype%`
*
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries

@@ -850,5 +853,3 @@ */

/**
* @see https://tc39.es/proposal-relative-indexing-method/#sec-%typedarray%.prototype.at
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.at */
at(index) {

@@ -868,5 +869,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.map
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.map */
map(callback, ...opts) {

@@ -904,5 +903,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter */
filter(callback, ...opts) {

@@ -927,5 +924,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce */
reduce(callback, ...opts) {

@@ -955,5 +950,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright */
reduceRight(callback, ...opts) {

@@ -983,5 +976,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach */
forEach(callback, ...opts) {

@@ -997,5 +988,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.find
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.find */
find(callback, ...opts) {

@@ -1014,5 +1003,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex */
findIndex(callback, ...opts) {

@@ -1033,5 +1020,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/proposal-array-find-from-last/index.html#sec-%typedarray%.prototype.findlast
*/
/** @see https://tc39.es/proposal-array-find-from-last/index.html#sec-%typedarray%.prototype.findlast */
findLast(callback, ...opts) {

@@ -1050,5 +1035,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/proposal-array-find-from-last/index.html#sec-%typedarray%.prototype.findlastindex
*/
/** @see https://tc39.es/proposal-array-find-from-last/index.html#sec-%typedarray%.prototype.findlastindex */
findLastIndex(callback, ...opts) {

@@ -1069,5 +1052,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.every
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.every */
every(callback, ...opts) {

@@ -1087,5 +1068,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.some
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.some */
some(callback, ...opts) {

@@ -1105,5 +1084,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.set */
set(input, ...opts) {

@@ -1139,5 +1116,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse */
reverse() {

@@ -1151,5 +1126,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill */
fill(value, ...opts) {

@@ -1163,5 +1136,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin */
copyWithin(target, start, ...opts) {

@@ -1175,5 +1146,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort */
sort(...opts) {

@@ -1188,5 +1157,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice */
slice(...opts) {

@@ -1243,5 +1210,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray */
subarray(...opts) {

@@ -1259,5 +1224,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof */
indexOf(element, ...opts) {

@@ -1281,3 +1244,3 @@ assertFloat16BitsArray(this);

for (let i = from, l = length; i < l; ++i) {
if (hasOwnProperty.call(this, i) && convertToNumber(this[i]) === element) {
if (hasOwn(this, i) && convertToNumber(this[i]) === element) {
return i;

@@ -1290,5 +1253,3 @@ }

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof */
lastIndexOf(element, ...opts) {

@@ -1311,3 +1272,3 @@ assertFloat16BitsArray(this);

for (let i = from; i >= 0; --i) {
if (hasOwnProperty.call(this, i) && convertToNumber(this[i]) === element) {
if (hasOwn(this, i) && convertToNumber(this[i]) === element) {
return i;

@@ -1320,5 +1281,3 @@ }

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes */
includes(element, ...opts) {

@@ -1357,5 +1316,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.join
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.join */
join(...opts) {

@@ -1369,5 +1326,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring */
toLocaleString(...opts) {

@@ -1381,5 +1336,3 @@ assertFloat16BitsArray(this);

/**
* @see https://tc39.es/ecma262/#sec-get-%typedarray%.prototype-@@tostringtag
*/
/** @see https://tc39.es/ecma262/#sec-get-%typedarray%.prototype-@@tostringtag */
get [Symbol.toStringTag]() {

@@ -1392,10 +1345,6 @@ if (isFloat16BitsArray(this)) {

/**
* @see https://tc39.es/ecma262/#sec-typedarray.bytes_per_element
*/
/** @see https://tc39.es/ecma262/#sec-typedarray.bytes_per_element */
Object.defineProperty(Float16Array, "BYTES_PER_ELEMENT", { value: Uint16Array.BYTES_PER_ELEMENT });
/**
* limitation: It is peaked by `Object.getOwnPropertySymbols(Float16Array)` and `Reflect.ownKeys(Float16Array)`
*/
/** limitation: It is peaked by `Object.getOwnPropertySymbols(Float16Array)` and `Reflect.ownKeys(Float16Array)` */
Object.defineProperty(Float16Array, brand, {});

@@ -1405,5 +1354,3 @@

/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator */
Object.defineProperty(Float16ArrayPrototype, Symbol.iterator, {

@@ -1430,2 +1377,3 @@ value: Float16ArrayPrototype.values,

* returns an unsigned 16-bit float at the specified byte offset from the start of the DataView.
*
* @param {DataView} dataView

@@ -1446,2 +1394,3 @@ * @param {number} byteOffset

* stores an unsigned 16-bit float value at the specified byte offset from the start of the DataView.
*
* @param {DataView} dataView

@@ -1470,2 +1419,2 @@ * @param {number} byteOffset

}({}));
})({});

@@ -9,8 +9,9 @@ "use strict";

var _converter = require("./helper/converter.js");
var _converter = require("./_converter.js");
var _is = require("./helper/is.js");
var _is = require("./_util/is.js");
/**
* returns an unsigned 16-bit float at the specified byte offset from the start of the DataView.
*
* @param {DataView} dataView

@@ -30,2 +31,3 @@ * @param {number} byteOffset

* stores an unsigned 16-bit float value at the specified byte offset from the start of the DataView.
*
* @param {DataView} dataView

@@ -32,0 +34,0 @@ * @param {number} byteOffset

@@ -8,12 +8,14 @@ "use strict";

var _arrayIterator = require("./helper/arrayIterator.js");
var _arrayIterator = require("./_arrayIterator.js");
var _converter = require("./helper/converter.js");
var _converter = require("./_converter.js");
var _is = require("./helper/is.js");
var _spec = require("./_spec.js");
var _private = require("./helper/private.js");
var _hasOwn = require("./_util/hasOwn.js");
var _spec = require("./helper/spec.js");
var _is = require("./_util/is.js");
var _private = require("./_util/private.js");
const brand = Symbol.for("__Float16Array__");

@@ -82,3 +84,3 @@

* @param {Float16Array} float16
* @return {ArrayLike<number>}
* @returns {ArrayLike<number>}
*/

@@ -100,3 +102,3 @@

* @param {ArrayLike<number>} float16bitsArray
* @return {number[]}
* @returns {number[]}
*/

@@ -139,3 +141,2 @@

});
const hasOwnProperty = Object.prototype.hasOwnProperty;
/** @type {ProxyHandler<Float16Array>} */

@@ -145,3 +146,3 @@

get(target, key) {
if ((0, _is.isCanonicalIntegerIndexString)(key) && hasOwnProperty.call(target, key)) {
if ((0, _is.isCanonicalIntegerIndexString)(key) && (0, _hasOwn.hasOwn)(target, key)) {
return (0, _converter.convertToNumber)(Reflect.get(target, key));

@@ -167,3 +168,3 @@ }

set(target, key, value) {
if ((0, _is.isCanonicalIntegerIndexString)(key) && hasOwnProperty.call(target, key)) {
if ((0, _is.isCanonicalIntegerIndexString)(key) && (0, _hasOwn.hasOwn)(target, key)) {
return Reflect.set(target, key, (0, _converter.roundToFloat16Bits)(value));

@@ -176,10 +177,6 @@ }

});
/**
* limitation: see README.md for details
*/
/** limitation: see README.md for details */
class Float16Array extends Uint16Array {
/**
* @see https://tc39.es/ecma262/#sec-typedarray
*/
/** @see https://tc39.es/ecma262/#sec-typedarray */
constructor(input, byteOffset, length) {

@@ -263,2 +260,3 @@ // input Float16Array

* limitation: `Object.getOwnPropertyNames(Float16Array)` or `Reflect.ownKeys(Float16Array)` include this key
*
* @see https://tc39.es/ecma262/#sec-%typedarray%.from

@@ -334,2 +332,3 @@ */

* limitation: `Object.getOwnPropertyNames(Float16Array)` or `Reflect.ownKeys(Float16Array)` include this key
*
* @see https://tc39.es/ecma262/#sec-%typedarray%.of

@@ -367,5 +366,3 @@ */

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys */

@@ -379,2 +376,3 @@

* limitation: returns a object whose prototype is not `%ArrayIteratorPrototype%`
*
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.values

@@ -395,2 +393,3 @@ */

* limitation: returns a object whose prototype is not `%ArrayIteratorPrototype%`
*
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries

@@ -409,5 +408,3 @@ */

}
/**
* @see https://tc39.es/proposal-relative-indexing-method/#sec-%typedarray%.prototype.at
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.at */

@@ -427,5 +424,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.map
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.map */

@@ -460,5 +455,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter */

@@ -483,5 +476,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce */

@@ -513,5 +504,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright */

@@ -543,5 +532,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach */

@@ -557,5 +544,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.find
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.find */

@@ -575,5 +560,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex */

@@ -595,5 +578,3 @@

}
/**
* @see https://tc39.es/proposal-array-find-from-last/index.html#sec-%typedarray%.prototype.findlast
*/
/** @see https://tc39.es/proposal-array-find-from-last/index.html#sec-%typedarray%.prototype.findlast */

@@ -613,5 +594,3 @@

}
/**
* @see https://tc39.es/proposal-array-find-from-last/index.html#sec-%typedarray%.prototype.findlastindex
*/
/** @see https://tc39.es/proposal-array-find-from-last/index.html#sec-%typedarray%.prototype.findlastindex */

@@ -633,5 +612,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.every
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.every */

@@ -651,5 +628,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.some
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.some */

@@ -669,5 +644,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.set */

@@ -703,5 +676,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse */

@@ -714,5 +685,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill */

@@ -725,5 +694,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin */

@@ -736,5 +703,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort */

@@ -750,5 +715,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice */

@@ -806,5 +769,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray */

@@ -820,5 +781,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof */

@@ -844,3 +803,3 @@

for (let i = from, l = length; i < l; ++i) {
if (hasOwnProperty.call(this, i) && (0, _converter.convertToNumber)(this[i]) === element) {
if ((0, _hasOwn.hasOwn)(this, i) && (0, _converter.convertToNumber)(this[i]) === element) {
return i;

@@ -852,5 +811,3 @@ }

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof */

@@ -874,3 +831,3 @@

for (let i = from; i >= 0; --i) {
if (hasOwnProperty.call(this, i) && (0, _converter.convertToNumber)(this[i]) === element) {
if ((0, _hasOwn.hasOwn)(this, i) && (0, _converter.convertToNumber)(this[i]) === element) {
return i;

@@ -882,5 +839,3 @@ }

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes */

@@ -921,5 +876,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.join
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.join */

@@ -932,5 +885,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring */

@@ -943,5 +894,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-get-%typedarray%.prototype-@@tostringtag
*/
/** @see https://tc39.es/ecma262/#sec-get-%typedarray%.prototype-@@tostringtag */

@@ -956,5 +905,3 @@

}
/**
* @see https://tc39.es/ecma262/#sec-typedarray.bytes_per_element
*/
/** @see https://tc39.es/ecma262/#sec-typedarray.bytes_per_element */

@@ -966,11 +913,7 @@

});
/**
* limitation: It is peaked by `Object.getOwnPropertySymbols(Float16Array)` and `Reflect.ownKeys(Float16Array)`
*/
/** limitation: It is peaked by `Object.getOwnPropertySymbols(Float16Array)` and `Reflect.ownKeys(Float16Array)` */
Object.defineProperty(Float16Array, brand, {});
const Float16ArrayPrototype = Float16Array.prototype;
/**
* @see https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator
*/
/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator */

@@ -977,0 +920,0 @@ Object.defineProperty(Float16ArrayPrototype, Symbol.iterator, {

@@ -8,6 +8,7 @@ "use strict";

var _converter = require("./helper/converter.js");
var _converter = require("./_converter.js");
/**
* returns the nearest half precision float representation of a number.
*
* @param {number} num

@@ -14,0 +15,0 @@ * @returns {number}

{
"name": "@petamoriken/float16",
"description": "half precision floating point for JavaScript",
"version": "3.4.7",
"version": "3.4.8",
"main": "./lib/index.js",

@@ -53,5 +53,6 @@ "module": "./src/index.mjs",

"lint": "eslint *.js src/**/*.mjs test/**/*.js test/**/*.mjs",
"test": "nyc --reporter=lcov mocha test/*.js",
"test": "mocha test/*.js",
"test-browser": "nightwatch -e chrome,chrome_old,firefox,firefox_old,firefox_esr,edge,edge_old,safari,safari_old",
"setup-test-browser": "http-server docs/test -p 8000 > /dev/null 2>&1 &",
"coverage": "nyc --reporter=lcov mocha test/*.js",
"clean": "rm -rf lib browser docs coverage .nyc_output",

@@ -63,9 +64,11 @@ "refresh": "yarn run clean && yarn run build && yarn run docs",

"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/cli": "^7.15.7",
"@babel/core": "^7.15.8",
"@babel/plugin-transform-modules-commonjs": "^7.15.4",
"@types/nightwatch": "^1.3.4",
"babel-plugin-replace-import-extension": "^1.1.1",
"browserslist": "^4.17.0",
"browserslist": "^4.17.3",
"eslint": "^7.4.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jsdoc": "^36.1.0",
"espower-cli": "^1.1.0",

@@ -75,10 +78,10 @@ "espower-loader": "^1.2.2",

"http-server": "^13.0.2",
"mocha": "^9.0.2",
"nightwatch": "^1.7.9",
"mocha": "^9.1.2",
"nightwatch": "^1.7.11",
"nightwatch-saucelabs-endsauce": "^1.0.5",
"nyc": "^15.1.0",
"power-assert": "^1.4.2",
"rollup": "^2.6.0",
"rollup": "^2.58.0",
"source-map-support": "^0.5.20"
}
}

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