phylotree 2.1.3 → 2.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phylotree",
3
- "version": "2.1.3",
3
+ "version": "2.1.5",
4
4
  "main": "dist/phylotree.js",
5
5
  "unpkg": "dist/phylotree.js",
6
6
  "jsdelivr": "dist/phylotree.js",
@@ -36,6 +36,8 @@
36
36
  "xml2js": "^0.6.2"
37
37
  },
38
38
  "devDependencies": {
39
+ "@rollup/plugin-commonjs": "^28.0.6",
40
+ "@rollup/plugin-node-resolve": "^16.0.1",
39
41
  "concurrently": "^6.2.0",
40
42
  "eslint": "^7.32.0",
41
43
  "http-server": "^14.1.1",
@@ -44,6 +46,7 @@
44
46
  "rollup": "^2.50.6",
45
47
  "rollup-plugin-copy": "^3.3.0",
46
48
  "rollup-plugin-execute": "^1.1.1",
49
+ "rollup-plugin-polyfill-node": "^0.13.0",
47
50
  "rollup-plugin-terser": "^7.0.2",
48
51
  "rollup-watch": "^3.2.2",
49
52
  "tape": "5.2.2",
@@ -1,9 +1,9 @@
1
1
  import * as _ from "underscore";
2
- import { parseString } from "xml2js";
2
+ import * as xml2js from "xml2js";
3
3
 
4
4
  var nexml_parser = function(xml_string, options) {
5
5
  var trees;
6
- parseString(xml_string, function(error, xml) {
6
+ xml2js.parseString(xml_string, function(error, xml) {
7
7
  trees = xml["nex:nexml"].trees[0].tree.map(function(nexml_tree) {
8
8
  var node_list = nexml_tree.node.map(d => d.$),
9
9
  node_hash = node_list.reduce(function(a, b) {