Security News
RubyGems.org Adds New Maintainer Role
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.
@webassemblyjs/floating-point-hex-parser
Advanced tools
A function to parse floating point hexadecimal strings as defined by the WebAssembly specification
A JavaScript function to parse floating point hexadecimals as defined by the WebAssembly specification.
import parseHexFloat from '@webassemblyjs/floating-point-hex-parser'
parseHexFloat('0x1p-1') // 0.5
parseHexFloat('0x1.921fb54442d18p+2') // 6.283185307179586
This module is tested in two ways. The first one is through a small set of test cases that can be found in test/regular.test.js. The second one is non-deterministic (sometimes called fuzzing):
x
.y
in floating point hexadecimal format using the C standard library function printf
since C supports this format.parseHexFloat(y) === x
.By default one npm test
run tests 100 random samples. If you want to do more, you can set the environment variable FUZZ_AMOUNT
to whatever number of runs you'd like. Because it uses one child process for each sample, it is really slow though. For more details about the randomized tests see the source.
FAQs
A function to parse floating point hexadecimal strings as defined by the WebAssembly specification
The npm package @webassemblyjs/floating-point-hex-parser receives a total of 8,934,302 weekly downloads. As such, @webassemblyjs/floating-point-hex-parser popularity was classified as popular.
We found that @webassemblyjs/floating-point-hex-parser 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
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.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.