Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
emailjs-stringencoding
Advanced tools
This is a polyfill for the Encoding Living Standard API for the Web, allowing encoding and decoding of textual data to and from Typed Array buffers for binary data in JavaScript
Basic examples and unit tests are included.
Scripts
<script src="emailjs-stringencoding.js"></script>
Basic Usage
var uint8array = TextEncoder(encoding).encode(string);
var string = TextDecoder(encoding).decode(uint8array);
Streaming Decode
var string = "", decoder = TextDecoder(encoding), buffer;
while (buffer = next_chunk()) {
string += decoder.decode(buffer, {stream:true});
}
string += decoder.decode(); // finish the stream
Start a web server in the project root
$ python -m SimpleHTTPServer 8000
Then run the tests here.
All encodings from the Encoding specification are supported:
utf-8 ibm864 ibm866 iso-8859-2 iso-8859-3 iso-8859-4 iso-8859-5 iso-8859-6 iso-8859-7 iso-8859-8 iso-8859-10 iso-8859-13 iso-8859-14 iso-8859-15 iso-8859-16 koi8-r koi8-u macintosh windows-874 windows-1250 windows-1251 windows-1252 windows-1253 windows-1254 windows-1255 windows-1256 windows-1257 windows-1258 x-mac-cyrillic gbk gb18030 hz-gb-2312 big5 euc-jp iso-2022-jp shift_jis euc-kr iso-2022-kr utf-16 utf-16be
(Some encodings may be supported under other names, e.g. ascii, iso-8859-1, etc. See Encoding for additional labels for each encoding.)
Encodings other than utf-8, utf-16 and utf-16be require an additional
encoding-indexes.js
file to be included. It is rather large
(539kB uncompressed, 182kB gzipped); portions may be deleted if
support for some encodings is not required.
FAQs
Brings utf8 de/encoding to all platforms.
The npm package emailjs-stringencoding receives a total of 477 weekly downloads. As such, emailjs-stringencoding popularity was classified as not popular.
We found that emailjs-stringencoding demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.