
Research
Node.js Fixes AsyncLocalStorage Crash Bug That Could Take Down Production Servers
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.
This can parse files in the Neuroimaging Informatics Technology Initiative format (version 1). Currently, data (as opposed to the header) can only be read from ".nii" files (files that include both the header and the data in one file), you can still read the header from a header-only file though.
Note that the output is compatible with what is output by nrrd-js. The main area where this breaks down (so far) is encoding orientation information. The NIfTI file format allows for two different transformations in one file (with various options for specifying the transformations). In contrast, the NRRD format only supports a very simple scheme whereby the "data axes" can be mapped to basis vectors in the physical space (in addition to another scheme more or less corresponding to "method 1" in the NIfTI format). Currently, nifti-js simply discards one type of transformation (the sform transformation).
Also note that for now quite a lot of what is read from the NIfTI file is discarded. The idea is that eventually most of what is now discarded should be mapped to NRRD attributes as much as possible, with the rest mapping to key/value pairs (for example).
To use with ndarray, proceed as follows:
var file = nifti.parse(...);
var array = ndarray(file.data, file.sizes.slice().reverse());
Install using npm:
npm install nifti-js
require("nifti-js").parse(buffer)Parses header and data from buffer, returning an object with NRRD-compatible properties. Expects an ArrayBuffer or Buffer object.
require("nifti-js").parseHeader(buffer)Parses just the header from buffer, returning an object with NRRD-compatible properties. Expects an ArrayBuffer or Buffer object.
require("nifti-js").parseNIfTIHeader(buffer)Parses just the header from buffer, returning an object with the raw NIfTI information. Expects an ArrayBuffer or Buffer object.
(c) 2015 Jasper van de Gronde. MIT License
FAQs
NIfTI support for Javascript
The npm package nifti-js receives a total of 778 weekly downloads. As such, nifti-js popularity was classified as not popular.
We found that nifti-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.