1
0
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:
Jon Dufresne
2024-01-03 08:17:37 -08:00
committed by GitHub
parent 252b28c4bf
commit 2442f74239
103 changed files with 1147 additions and 1058 deletions

View File

@ -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,