Comparing version 0.4.7 to 0.4.8
@@ -1,2 +0,2 @@ | ||
var myProductName = "opmltojs"; myVersion = "0.4.7"; | ||
var myProductName = "opmltojs"; myVersion = "0.4.8"; | ||
@@ -27,2 +27,3 @@ /* The MIT License (MIT) | ||
exports.opmlify = opmlify; //8/6/17 by DW | ||
exports.visitSubs = visitSubs; //8/12/17 by DW | ||
@@ -38,2 +39,18 @@ const xml2js = require ("xml2js"); | ||
} | ||
function visitSubs (subs, visit) { //8/12/17 by DW | ||
if (subs !== undefined) { | ||
for (var i = 0; i < subs.length; i++) { | ||
let sub = subs [i]; | ||
if (!visit (sub)) { | ||
return (false); | ||
} | ||
if (sub.subs !== undefined) { | ||
if (!visitSubs (sub.subs, visit)) { | ||
return (false); | ||
} | ||
} | ||
} | ||
} | ||
return (true); //keep going | ||
} | ||
@@ -40,0 +57,0 @@ function parse (opmltext, callback) { |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "0.4.7", | ||
"version": "0.4.8", | ||
"main": "opmltojs.js", | ||
@@ -9,0 +9,0 @@ "repository": { |
@@ -19,4 +19,10 @@ ## opmlToJs package | ||
A blog post <a href="http://scripting.com/2017/08/07.html#a093801">announcing</a> opmlToJs. | ||
### Updates | ||
##### v0.4.8 -- 8/12/6 by DW | ||
Added new exported function <i>visitSubs.</i> I had to write this for an app I'm working on, but it seemed it should be part of this package. | ||
##### v0.4.5 -- 8/4/6 by DW | ||
@@ -23,0 +29,0 @@ |
Sorry, the diff of this file is not supported yet
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
8949
150
37