fastestsmallesttextencoderdecoder
Advanced tools
Comparing version 1.0.7 to 1.0.8
{ | ||
"name": "fastestsmallesttextencoderdecoder", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "The fastest smallest Javascript polyfill for the encode of TextEncoder and decode of TextDecoder for UTF-8 only. Made by AnonyCo with ❤️ from 🐕s.", | ||
@@ -48,2 +48,3 @@ "keywords": [ | ||
"es2015": "NodeJS/EncoderAndDecoderNodeJS.min.module.js", | ||
"browser": "EncoderDecoderTogether.min.js", | ||
"repository": { | ||
@@ -54,2 +55,4 @@ "type": "git", | ||
"files": [ | ||
"EncoderDecoderTogether.min.js", | ||
"EncoderDecoderTogether.src.js", | ||
"NodeJS/EncoderAndDecoderNodeJS.min.js", | ||
@@ -59,4 +62,3 @@ "NodeJS/EncoderAndDecoderNodeJS.min.js.map", | ||
"NodeJS/EncoderAndDecoderNodeJS.min.module.js.map" | ||
], | ||
"node_modules": {} | ||
] | ||
} |
@@ -46,3 +46,3 @@ | ||
| Full Polyfill | [7.0](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#Browser_compatibility) | [4.0](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#Browser_compatibility) | [11.6](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#Browser_compatibility) | [12.0\*\*](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#Browser_compatibility) | [10](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#Browser_compatibility) | [5.1](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#Browser_compatibility) (Desktop) / [4.2](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#Browser_compatibility) (iOS) | [4.0](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#Browser_compatibility) | [1.0](https://gist.github.com/poshaughnessy/5718717a04db20a02e9fdb3fc16e2258) | [3.0](https://nodejs.org/docs/latest-v4.x/api/buffer.html#buffer_buffers_and_typedarray) | | ||
| Partial Polyfill\* | [1.0](https://robertnyman.com/javascript/index.html) | [0.6](https://en.wikipedia.org/wiki/Comparison_of_JavaScript_engines) | [7.0](https://en.wikipedia.org/wiki/Presto_\(browser_engine\)) (Desktop) / [9.5\*\*](https://en.wikipedia.org/wiki/Presto_\(browser_engine\)) (Mobile) | [12.0\*\*](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#Browser_compatibility) | [4.0](https://en.wikipedia.org/wiki/Comparison_of_JavaScript_engines) | [2.0](https://en.wikipedia.org/wiki/Comparison_of_JavaScript_engines) | 1.0 | [1.0](https://gist.github.com/poshaughnessy/5718717a04db20a02e9fdb3fc16e2258) | [0.10](https://nodejs.org/docs/latest-v0.10.x/api/index.html) | | ||
| Partial Polyfill\* | [1.0\*\*](https://robertnyman.com/javascript/index.html) | [0.6](https://en.wikipedia.org/wiki/Comparison_of_JavaScript_engines) | [7.0](https://en.wikipedia.org/wiki/Presto_\(browser_engine\)) (Desktop) / [9.5\*\*](https://en.wikipedia.org/wiki/Presto_\(browser_engine\)) (Mobile) | [12.0\*\*](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#Browser_compatibility) | [4.0](https://en.wikipedia.org/wiki/Comparison_of_JavaScript_engines) | [2.0](https://en.wikipedia.org/wiki/Comparison_of_JavaScript_engines) | 1.0\*\* | [1.0\*\*](https://gist.github.com/poshaughnessy/5718717a04db20a02e9fdb3fc16e2258) | [0.10](https://nodejs.org/docs/latest-v0.10.x/api/index.html) | | ||
@@ -66,3 +66,3 @@ Also note that while this polyfill may work in these old browsers, it is very likely that the rest of your website will not (unless if you make a concious effort about it which I would not reccomend because noone uses or should use these old browsers). | ||
TextEncoder: function TextEncoder(){/*...*/}, | ||
TextDecoder: function TextEncoder(){/*...*/}, | ||
TextDecoder: function TextDecoder(){/*...*/}, | ||
encode: TextEncoder.prototype.encode, | ||
@@ -88,3 +88,3 @@ decode: TextDecoder.prototype.decode | ||
```Javascript | ||
// Variation 3 | ||
// Variation 3 (a rewording of Variation 2) | ||
const encodeAndDecodeModule = require("fastestsmallesttextencoderdecoder"); | ||
@@ -95,2 +95,24 @@ const encode = encodeAndDecodeModule.encode; | ||
Or, you can use the new and shiny [ES6 module importation](https://developer.mozilla.org/en-US/docs/web/javascript/reference/statements/import) statements. | ||
```Javascript | ||
// Variation 1 | ||
import {TextEncoder, TextDecoder} from "fastestsmallesttextencoderdecoder"; | ||
const encode = (new TextEncoder).encode; | ||
const decode = (new TextDecoder).decode; | ||
``` | ||
```Javascript | ||
// Variation 2 | ||
import {encode, decode} from "fastestsmallesttextencoderdecoder"; | ||
``` | ||
```Javascript | ||
// Variation 3 (a rewording of Variation 2) | ||
import * as encodeAndDecodeModule from "fastestsmallesttextencoderdecoder"; | ||
const encode = encodeAndDecodeModule.encode; | ||
const decode = encodeAndDecodeModule.decode; | ||
``` | ||
Note that *fastestsmallesttextencoderdecoder* must be installed via the following snippet in the terminal in order for the `require("fastestsmallesttextencoderdecoder")` to work. | ||
@@ -106,4 +128,21 @@ | ||
## NPM Project | ||
## npm Project | ||
You can find this project on [npm here at this link](https://npmjs.org/package/fastestsmallesttextencoderdecoder). | ||
# Development | ||
On linux, you can develop the project on your own by cloning it with the following command line. | ||
```Bash | ||
git clone https://github.com/anonyco/FastestSmallestTextEncoderDecoder.git; cd FastestSmallestTextEncoderDecoder; npm run install-dev | ||
``` | ||
Emphasize the `npm run install-dev` which downloads `closure-compiler.jar` into the repository for minifying the files. | ||
Now that the repository is cloned, edit the files as you see fit. Now that the files have been edited, run the following in the terminal in the root folder of the repository in order to minify the NodeJS JavaScript files. | ||
```Bash | ||
npm run build | ||
``` | ||
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
35489
9
113
144