aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRahiel Kasim <rahielkasim@gmail.com>2018-02-27 12:42:08 +0100
committerRahiel Kasim <rahielkasim@gmail.com>2018-02-27 12:42:08 +0100
commit39d5f761555950bb5ff347ca6f70e5d4e1dc379e (patch)
tree87f5e4cdbade513457c9a6056c0d227c8a28a711
parentc1b425fede913977ac9b2809674ba643f61c8adb (diff)
left-pad is obsolete with ES2017, update modules
-rw-r--r--package.json17
-rw-r--r--tsconfig.json2
-rw-r--r--utils.ts5
3 files changed, 10 insertions, 14 deletions
diff --git a/package.json b/package.json
index 76e9af1..2f22de4 100644
--- a/package.json
+++ b/package.json
@@ -9,17 +9,16 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
- "@types/node": "^8.0.28",
- "@types/pixi.js": "^4.5.3",
- "awesome-typescript-loader": "^3.2.3",
- "source-map-loader": "^0.2.1",
- "typescript": "^2.4.2",
- "webpack": "^3.5.6",
- "webpack-dev-server": "^2.7.1"
+ "@types/node": "^9.4.6",
+ "@types/pixi.js": "^4.7.1",
+ "awesome-typescript-loader": "^3.5.0",
+ "source-map-loader": "^0.2.3",
+ "typescript": "^2.7.2",
+ "webpack": "^3.11.0",
+ "webpack-dev-server": "^2.11.1"
},
"dependencies": {
- "left-pad": "^1.1.3",
- "pixi.js": "^4.5.5",
+ "pixi.js": "^4.7.0",
"tinycolor2": "^1.4.1"
}
}
diff --git a/tsconfig.json b/tsconfig.json
index 8ffd22f..a69ac5b 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -8,7 +8,7 @@
"jsx": "react",
"lib": [
"DOM",
- "ES6",
+ "ES2017",
"DOM.Iterable",
"ScriptHost",
"WebWorker"
diff --git a/utils.ts b/utils.ts
index a77a91b..ab8f30f 100644
--- a/utils.ts
+++ b/utils.ts
@@ -1,9 +1,6 @@
-let leftPad = require("left-pad");
-
-
// left fill with zero's
export function zfill(s: string, width: number) {
- return leftPad(s, width, '0');
+ return s.padStart(width, "0");
}
// string reversal