@petamoriken/float16
Advanced tools
Comparing version
@@ -1,2 +0,2 @@ | ||
/*! @petamoriken/float16 v3.4.2 | MIT License - https://git.io/float16 */ | ||
/*! @petamoriken/float16 v3.4.3 | MIT License - https://git.io/float16 */ | ||
@@ -3,0 +3,0 @@ var float16 = (function (exports) { |
@@ -270,6 +270,3 @@ /** | ||
* a negative value if first argument is less than second argument, zero if they're equal and a positive | ||
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. | ||
* ```ts | ||
* [11,2,22,1].sort((a, b) => a - b) | ||
* ``` | ||
* value otherwise. If omitted, the elements are sorted in ascending. | ||
*/ | ||
@@ -276,0 +273,0 @@ sort(compareFn?: (a: number, b: number) => number): this; |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports.isFloat16Array = isFloat16Array; | ||
exports.Float16Array = void 0; | ||
@@ -10,0 +9,0 @@ var _arrayIterator = require("./helper/arrayIterator.js"); |
{ | ||
"name": "@petamoriken/float16", | ||
"description": "half precision floating point for JavaScript", | ||
"version": "3.4.2", | ||
"main": "./index.js", | ||
"module": "./index.mjs", | ||
"version": "3.4.3", | ||
"main": "./lib/index.js", | ||
"module": "./src/index.mjs", | ||
"exports": { | ||
"require": "./index.js", | ||
"import": "./index.mjs" | ||
"require": "./lib/index.js", | ||
"import": "./src/index.mjs" | ||
}, | ||
@@ -27,4 +27,2 @@ "types": "index.d.ts", | ||
"browser", | ||
"index.mjs", | ||
"index.js", | ||
"index.d.ts" | ||
@@ -31,0 +29,0 @@ ], |
@@ -38,7 +38,7 @@ # <a href="https://git.io/float16">@petamoriken/float16</a> | ||
```console | ||
yarn add @petamoriken/float16 | ||
npm install @petamoriken/float16 | ||
``` | ||
```console | ||
npm install @petamoriken/float16 | ||
yarn add @petamoriken/float16 | ||
``` | ||
@@ -60,5 +60,13 @@ | ||
### Deno | ||
You can get modules from [deno.land/x](https://deno.land/x/float16) hosting service. | ||
```ts | ||
import { Float16Array, isFloat16Array, getFloat16, setFloat16, hfround } from "https://deno.land/x/float16/mod.ts"; | ||
``` | ||
### Browser | ||
Deliver a `browser/float16.mjs` or `browser/float16.js` file from your Web server with the JavaScript `Content-Type` HTTP header. | ||
Deliver a `browser/float16.mjs` or `browser/float16.js` file in the npm package from your Web server with the JavaScript `Content-Type` HTTP header. | ||
@@ -106,16 +114,12 @@ ```html | ||
### Deno | ||
## Support | ||
You can get modules from [deno.land/x](https://deno.land/x/float16) hosting service. | ||
**This package only uses up to the ES2015 features**, so you should be able to use it without any problems. | ||
```ts | ||
import { Float16Array, isFloat16Array, getFloat16, setFloat16, hfround } from "https://deno.land/x/float16/index.mjs"; | ||
``` | ||
`Float16Array` implemented by the `Proxy` object, so IE11 is never supported. | ||
## Support | ||
### Pre-transpiled JavaScript files (CommonJS) | ||
This package's `Float16Array` uses `Proxy` object, so IE11 is never supported. | ||
`lib/` and `browser/` directories in the npm package have JavaScript files already transpiled, whose target are | ||
`lib/` and `browser/` directories in the npm package have JavaScript files already built, whose target are | ||
* Firefox: last 2 versions and ESR | ||
@@ -126,6 +130,4 @@ * Chrome: last 2 versions | ||
However, **this package only uses up to the ES2015 features**, so you should be able to use it without any problems. | ||
If you want to build it yourself using bundler to support older browsers, transpile the JavaScript files in the `src/` directory. | ||
If you build it yourself using bundler to support older browsers, transpile the JavaScript files in the `src/` directory. | ||
## API | ||
@@ -322,1 +324,7 @@ | ||
You can access current [test page](https://petamoriken.github.io/float16/test) ([power-assert version](https://petamoriken.github.io/float16/test/power)) in `master` branch. | ||
## License | ||
MIT License | ||
This software contains productions that are distributed under [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0). Specifically, `index.d.ts` is modified from the original [TypeScript lib files](https://github.com/microsoft/TypeScript/tree/main/src/lib). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
326
2.52%158673
-0.15%4581
-0.63%