Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@webassemblyjs/ieee754
Advanced tools
The @webassemblyjs/ieee754 package is designed for encoding and decoding floating-point numbers according to the IEEE 754 standard. This is particularly useful when working with WebAssembly, as it allows for precise handling of floating-point numbers in a format that's compatible with WebAssembly's binary representation.
Encoding floating-point numbers
This feature allows you to encode JavaScript floating-point numbers into a format that's compatible with WebAssembly's binary representation. The example shows how to encode the number 1.5 as a 64-bit floating-point number.
const { encode } = require('@webassemblyjs/ieee754');
const buffer = new ArrayBuffer(8);
const view = new DataView(buffer);
encode(view, 0, 1.5, 64);
Decoding floating-point numbers
This feature allows you to decode floating-point numbers from a binary format into JavaScript numbers. The example demonstrates decoding a 64-bit floating-point number from a DataView into a JavaScript number.
const { decode } = require('@webassemblyjs/ieee754');
const buffer = new ArrayBuffer(8);
const view = new DataView(buffer);
view.setFloat64(0, 1.5, true);
const number = decode(view, 0, 64);
The ieee754 package provides similar functionality for encoding and decoding IEEE 754 floating-point numbers. It is widely used for operations that require direct manipulation of binary data in this format. Compared to @webassemblyjs/ieee754, it serves a broader audience beyond just the WebAssembly community, offering a more general-purpose approach to handling IEEE 754 floating-point numbers.
FAQs
IEEE754 decoder and encoder
The npm package @webassemblyjs/ieee754 receives a total of 13,111,322 weekly downloads. As such, @webassemblyjs/ieee754 popularity was classified as popular.
We found that @webassemblyjs/ieee754 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.