pathinator
Advanced tools
+12
-12
| { | ||
| "name": "pathinator", | ||
| "version": "0.4.2", | ||
| "version": "0.4.3", | ||
| "description": "SVG path builder and minifier", | ||
@@ -67,5 +67,5 @@ "type": "module", | ||
| "scripts": { | ||
| "test": "karma start --single-run", | ||
| "test-watch": "karma start", | ||
| "bench": "karma start karma.bench.conf.js", | ||
| "test": "karma start karma.conf.cjs --single-run", | ||
| "test-watch": "karma start karma.conf.cjs", | ||
| "bench": "karma start karma.bench.conf.cjs", | ||
| "preversion": "npm test && npm run docs && git add --all && git diff HEAD --quiet || git commit -m \"Updating docs\"", | ||
@@ -84,15 +84,15 @@ "postversion": "npm publish", | ||
| "dependencies": { | ||
| "async-agent": "^0.5.5", | ||
| "hord": "^0.7.7", | ||
| "type-enforcer": "^1.2.1", | ||
| "type-enforcer-math": "^1.3.1" | ||
| "async-agent": "^0.5.6", | ||
| "hord": "^0.7.8", | ||
| "type-enforcer": "^1.2.2", | ||
| "type-enforcer-math": "^1.3.2" | ||
| }, | ||
| "devDependencies": { | ||
| "display-value": "^1.7.4", | ||
| "dmd-readable": "^1.2.2", | ||
| "display-value": "^1.8.5", | ||
| "dmd-readable": "^1.2.4", | ||
| "exec-each": "0.0.3", | ||
| "jsdoc-to-markdown": "^6.0.1", | ||
| "karma-webpack-bundle": "0.5.3", | ||
| "jsdoc-to-markdown": "^7.0.1", | ||
| "karma-webpack-bundle": "1.2.0", | ||
| "npm-run-all": "^4.1.5" | ||
| } | ||
| } |
+0
-0
@@ -0,0 +0,0 @@ # Pathinator |
@@ -22,9 +22,9 @@ import { Point, round } from 'type-enforcer-math'; | ||
| for (let i = size; i <= args.length; i += size) { | ||
| for (let index = size; index <= args.length; index += size) { | ||
| output.push([ | ||
| new Point(args[i - 7], args[i - 6]), | ||
| parseFloat(args[i - 5]), | ||
| parseInt(args[i - 4], 10), | ||
| parseInt(args[i - 3], 10), | ||
| new Point(args[i - 2], args[i - 1]) | ||
| new Point(args[index - 7], args[index - 6]), | ||
| parseFloat(args[index - 5]), | ||
| parseInt(args[index - 4], 10), | ||
| parseInt(args[index - 3], 10), | ||
| new Point(args[index - 2], args[index - 1]) | ||
| ]); | ||
@@ -31,0 +31,0 @@ } |
+12
-12
@@ -21,4 +21,4 @@ import { isArray, Point, Vector } from 'type-enforcer-math'; | ||
| for (let i = size; i <= args.length; i += size) { | ||
| output.push(args.slice(i - size, i)); | ||
| for (let index = size; index <= args.length; index += size) { | ||
| output.push(args.slice(index - size, index)); | ||
| } | ||
@@ -56,22 +56,22 @@ | ||
| let start = 0; | ||
| let i = 0; | ||
| let index = 0; | ||
| let hasDecimal = false; | ||
| while (i < string.length) { | ||
| if (!isWhiteSpace(string[i]) || string[i] === '-') { | ||
| while (index < string.length) { | ||
| if (!isWhiteSpace(string[index]) || string[index] === '-') { | ||
| const position = output.length % length; | ||
| hasDecimal = string[i] === '.'; | ||
| start = i++; | ||
| hasDecimal = string[index] === '.'; | ||
| start = index++; | ||
| if (!singleValues || !singleValues.includes(position)) { | ||
| while (!isWhiteSpace(string[i]) && (!hasDecimal || string[i] !== '.')) { | ||
| hasDecimal = hasDecimal || string[i] === '.'; | ||
| i++; | ||
| while (!isWhiteSpace(string[index]) && (!hasDecimal || string[index] !== '.')) { | ||
| hasDecimal = hasDecimal || string[index] === '.'; | ||
| index++; | ||
| } | ||
| } | ||
| hasDecimal = false; | ||
| output.push(string.slice(start, i)); | ||
| output.push(string.slice(start, index)); | ||
| } | ||
| else { | ||
| i++; | ||
| index++; | ||
| } | ||
@@ -78,0 +78,0 @@ } |
48818
0.28%Updated
Updated
Updated
Updated