Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@wearemothership/dicom-character-set
Advanced tools
Converts bytes of encoded DICOM text to Javascript DOMString
Converts DICOM text (as bytes) to a JavaScript string. Handles multiple character sets (single-byte and multi-byte, with and without extensions) within a single block of text according to the DICOM standard. All encodings specified in the standard are currently supported. For a complete list of all encodings, see here.
Install via NPM:
npm install dicom-character-set
Or get a packaged source file:
Firefox/Chrome/Safari/Opera:
import { convertBytes } from 'dicom-character-set';
const str = convertBytes('ISO 2022 IR 149\\ISO 2022 IR 13', uint8ArrayBytes, {vr: 'LT'});
Backward compatibility (browsers that don't support TextDecoder, e.g. Internet Explorer and Edge) :
import { convertBytesPromise } from 'dicom-character-set';
convertBytesPromise('ISO 2022 IR 6\\ISO 2022 IR 13', uint8ArrayBytes, {vr: 'LT'}).then(str => {
console.log(str);
});
Note: Make sure you're passing the text as a Uint8Array, not as a string. Also, only pass the bytes of the value you want converted, not the bytes for the entire DICOM file.
Both convertBytes and convertBytesPromise take the same arguments. They are, in order:
string
or undefined
)This library can be used as-is on Node.js versions 11 and up. You may need to use an ICU-enabled build of Node.js or else add the full-icu package to your app.
In the name of robustness, the behavior varies from the standard DICOM in the following ways:
FAQs
Converts bytes of encoded DICOM text to Javascript DOMString
The npm package @wearemothership/dicom-character-set receives a total of 613 weekly downloads. As such, @wearemothership/dicom-character-set popularity was classified as not popular.
We found that @wearemothership/dicom-character-set demonstrated a not healthy version release cadence and project activity because the last version was released 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.