We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae32acf commit 2e689aeCopy full SHA for 2e689ae
lib/path.js
@@ -1,5 +1,7 @@
1
'use strict';
2
3
+const { removeLeadingZero } = require('./svgo/tools');
4
+
5
/**
6
* @typedef {import('./types').PathDataItem} PathDataItem
7
* @typedef {import('./types').PathDataCommand} PathDataCommand
@@ -249,7 +251,7 @@ const stringifyNumber = (number, precision) => {
249
251
number = Math.round(number * ratio) / ratio;
250
252
}
253
// remove zero whole from decimal number
- return number.toString().replace(/^0\./, '.').replace(/^-0\./, '-.');
254
+ return removeLeadingZero(number);
255
};
256
257
0 commit comments