Comparing version 0.1.15 to 0.1.16
22
index.js
@@ -1117,3 +1117,3 @@ const fs = require('fs') | ||
/* | ||
** private => object|array { | ||
** _private => object|array { | ||
** ownerIdentifier: string, | ||
@@ -1123,6 +1123,6 @@ ** data: buffer|string | ||
**/ | ||
NodeID3.prototype.createPrivateFrame = function(private) { | ||
if(private instanceof Array && private.length > 0) { | ||
NodeID3.prototype.createPrivateFrame = function(_private) { | ||
if(_private instanceof Array && _private.length > 0) { | ||
let frames = [] | ||
private.forEach(tag => { | ||
_private.forEach(tag => { | ||
let frame = this.createPrivateFrameHelper(tag) | ||
@@ -1135,8 +1135,8 @@ if(frame) { | ||
} else { | ||
return this.createPrivateFrameHelper(private) | ||
return this.createPrivateFrameHelper(_private) | ||
} | ||
} | ||
NodeID3.prototype.createPrivateFrameHelper = function(private) { | ||
if(!private || !private.ownerIdentifier || !private.data) { | ||
NodeID3.prototype.createPrivateFrameHelper = function(_private) { | ||
if(!_private || !_private.ownerIdentifier || !_private.data) { | ||
return null; | ||
@@ -1146,8 +1146,8 @@ } | ||
header.write("PRIV") | ||
let ownerIdentifier = Buffer.from(private.ownerIdentifier + "\0", "utf8") | ||
let ownerIdentifier = Buffer.from(_private.ownerIdentifier + "\0", "utf8") | ||
let data | ||
if(typeof(private.data) == "string") { | ||
data = Buffer.from(private.data, "utf8") | ||
if(typeof(_private.data) == "string") { | ||
data = Buffer.from(_private.data, "utf8") | ||
} else { | ||
data = private.data | ||
data = _private.data | ||
} | ||
@@ -1154,0 +1154,0 @@ |
{ | ||
"name": "node-id3", | ||
"version": "0.1.15", | ||
"version": "0.1.16", | ||
"description": "Pure JavaScript ID3 Tag writer/reader", | ||
@@ -5,0 +5,0 @@ "author": "Jan Metzger <jan.metzger@gmx.net>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67646