mirror of
https://github.com/svg/svgo.git
synced 2025-07-29 20:21:14 +03:00
chore: convert project to us ECMAScript modules (preserving CJS compatibility) (#1905)
This commit is contained in:
@ -1,9 +1,7 @@
|
||||
'use strict';
|
||||
import { removeLeadingZero } from '../lib/svgo/tools.js';
|
||||
|
||||
const { removeLeadingZero } = require('../lib/svgo/tools');
|
||||
|
||||
exports.name = 'cleanupNumericValues';
|
||||
exports.description =
|
||||
export const name = 'cleanupNumericValues';
|
||||
export const description =
|
||||
'rounds numeric values to the fixed precision, removes default ‘px’ units';
|
||||
|
||||
const regNumericValues =
|
||||
@ -25,9 +23,9 @@ const absoluteLengths = {
|
||||
*
|
||||
* @author Kir Belevich
|
||||
*
|
||||
* @type {import('./plugins-types').Plugin<'cleanupNumericValues'>}
|
||||
* @type {import('./plugins-types.js').Plugin<'cleanupNumericValues'>}
|
||||
*/
|
||||
exports.fn = (_root, params) => {
|
||||
export const fn = (_root, params) => {
|
||||
const {
|
||||
floatPrecision = 3,
|
||||
leadingZero = true,
|
||||
|
Reference in New Issue
Block a user