utils in another file

This commit is contained in:
Klemek
2019-07-15 10:19:44 +02:00
parent 18cd4e8855
commit 9dbf33f64a
7 changed files with 174 additions and 91 deletions
+5 -2
View File
@@ -1,4 +1,5 @@
const convert = require('xml-js');
const utils = require('./utils');
let list = {};
try {
@@ -39,9 +40,11 @@ const DEFAULT_OPTIONS = {
const DEFAULT_SCALE = 0.4;
const LINK_MARGIN = (1 - DEFAULT_SCALE) / 2;
module.exports = (options = DEFAULT_OPTIONS) => {
module.exports = (options) => {
options = utils.merge(DEFAULT_OPTIONS, options);
const self = {
defaultOptions: DEFAULT_OPTIONS,
/**
* Find icon data from given name