Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mzdata

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mzdata - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

13

lib/index.js

@@ -373,4 +373,15 @@ 'use strict';

function parseMZ(xml) {
const header = decoder.decode(xml.subarray(0, 200));
if (typeof xml === 'string') {
const encoder = new TextEncoder();
xml = encoder.encode(xml);
}
if (!ArrayBuffer.isView(xml)) {
xml = new Uint8Array(xml);
}
const header = xml.subarray
? decoder.decode(xml.subarray(0, 200))
: xml.substring(0, 200);
if (header.includes('mzData')) {

@@ -377,0 +388,0 @@ return parseMzData(xml);

4

package.json
{
"name": "mzdata",
"version": "2.2.0",
"version": "2.2.1",
"description": "Read and explore mzData v1.05 files",

@@ -16,2 +16,4 @@ "main": "lib/index.js",

"prepack": "rollup -c",
"prettier": "prettier --check src",
"prettier-write": "prettier --write src",
"test-travis": "npm run test",

@@ -18,0 +20,0 @@ "test": "npm run test-coverage && npm run eslint",

@@ -13,4 +13,15 @@ import { parseMzData } from './mzdata/parseMzData';

export function parseMZ(xml) {
const header = decoder.decode(xml.subarray(0, 200));
if (typeof xml === 'string') {
const encoder = new TextEncoder();
xml = encoder.encode(xml);
}
if (!ArrayBuffer.isView(xml)) {
xml = new Uint8Array(xml);
}
const header = xml.subarray
? decoder.decode(xml.subarray(0, 200))
: xml.substring(0, 200);
if (header.includes('mzData')) {

@@ -17,0 +28,0 @@ return parseMzData(xml);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc