New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@isomp4/parser

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@isomp4/parser - npm Package Compare versions

Comparing version
0.1.4
to
0.2.0
+18
-8
cjs/parser.js

@@ -22,13 +22,23 @@ "use strict";

/**
*
* @param encodings
* Registers the given box encoding for the parser.
* @param encoding The encoding to register.
* @param children Whether to also register all child boxes of the given encoding. Default: false
*/
registerBox(...encodings) {
for (const encoding of encodings) {
if (this.boxes.has(encoding.type)) {
throw new Error("Box type is already registered: " + encoding.type);
}
this.boxes.set(encoding.type, encoding);
registerBox(encoding, children) {
// Register encoding and all parent encodings
let parent = encoding;
do {
this.boxes.set(parent.type, parent);
} while ((parent = parent.parent) != null);
// Register child encodings
if (children) {
this.registerBoxChildren(encoding);
}
}
registerBoxChildren(encoding) {
encoding.forEachChild(c => {
this.boxes.set(c.type, c);
this.registerBoxChildren(c);
});
}
/**

@@ -35,0 +45,0 @@ *

@@ -35,6 +35,8 @@ import { Buffer } from "buffer";

/**
*
* @param encodings
* Registers the given box encoding for the parser.
* @param encoding The encoding to register.
* @param children Whether to also register all child boxes of the given encoding. Default: false
*/
registerBox(...encodings: BoxEncoding[]): void;
registerBox(encoding: BoxEncoding, children?: boolean): void;
private registerBoxChildren;
/**

@@ -41,0 +43,0 @@ *

@@ -19,13 +19,23 @@ import { Buffer } from "buffer";

/**
*
* @param encodings
* Registers the given box encoding for the parser.
* @param encoding The encoding to register.
* @param children Whether to also register all child boxes of the given encoding. Default: false
*/
registerBox(...encodings) {
for (const encoding of encodings) {
if (this.boxes.has(encoding.type)) {
throw new Error("Box type is already registered: " + encoding.type);
}
this.boxes.set(encoding.type, encoding);
registerBox(encoding, children) {
// Register encoding and all parent encodings
let parent = encoding;
do {
this.boxes.set(parent.type, parent);
} while ((parent = parent.parent) != null);
// Register child encodings
if (children) {
this.registerBoxChildren(encoding);
}
}
registerBoxChildren(encoding) {
encoding.forEachChild(c => {
this.boxes.set(c.type, c);
this.registerBoxChildren(c);
});
}
/**

@@ -32,0 +42,0 @@ *

{
"name": "@isomp4/parser",
"version": "0.1.4",
"version": "0.2.0",
"description": "",

@@ -44,6 +44,6 @@ "keywords": [

"dependencies": {
"@isomp4/core": "^0.1.4"
"@isomp4/core": "^0.2.0"
},
"devDependencies": {
"@isomp4/box-moov": "^0.1.4"
"@isomp4/box-moov": "^0.2.0"
},

@@ -57,3 +57,3 @@ "scripts": {

},
"gitHead": "622a45165f4730d4012e528f98b0b01127a595a5"
"gitHead": "b0ee75bb8669766d529bc6b505ea39d703a84c6a"
}