From 4915bd316395ff41230e4dfb40bca79f72d16e20 Mon Sep 17 00:00:00 2001 From: zhuxp Date: Thu, 8 Jul 2021 07:20:30 -0400 Subject: [PATCH] add files in package.json --- package.json | 10 ++++++++-- src/parseInts.js | 7 ++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index ec876ca..c1dfa53 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nucleome/nb-tools", - "version": "0.0.3", + "version": "0.0.5", "description": "nucleome browser tools", "keywords": [ "nucleome", @@ -18,12 +18,18 @@ "url": "git+https://github.com/nucleome/nb-tools.git" }, "dependencies": { - "d3-format": "^1.4.3" + "d3-format": "^1.4.3", + "d3-scale": "^3.2.1", + "d3-selection": "^1.4.1" }, "scripts": { "pretest": "rollup -c", "prepublishOnly": "rm -rf ./dist && rollup -c" }, + "files": [ + "dist/@nucleome/nb-tools.js", + "dist/@nucleome/nb-tools.min.js" + ], "devDependencies": { "eslint": "5", "rollup": "^0.64.1", diff --git a/src/parseInts.js b/src/parseInts.js index c57bae3..a42ec79 100644 --- a/src/parseInts.js +++ b/src/parseInts.js @@ -1,7 +1,4 @@ export default function(s) { - var a = [] - s.split(",").forEach(function (d) { - a.push(parseInt(d)) - }) - return a; + var v = s.replace(/,$/,"") + return v.split(",").map( (d) => (parseInt(d))) }