diff --git a/lib/index.js b/lib/index.js index a99b027..bfc4301 100644 --- a/lib/index.js +++ b/lib/index.js @@ -54,13 +54,9 @@ import {html, svg, find, hastToReact} from 'property-information' import {stringify as spaces} from 'space-separated-tokens' import {stringify as commas} from 'comma-separated-tokens' -// @ts-expect-error: typed incorrectly import styleToObject from 'style-to-object' import {webNamespaces} from 'web-namespaces' -/** @type {(value: string, replacer: ((key: string, value: string) => void)) => void} */ -const style = styleToObject - const own = {}.hasOwnProperty /** @@ -364,7 +360,7 @@ function parseStyle(value, tagName) { const result = {} try { - style(value, (name, value) => { + styleToObject(value, (name, value) => { if (name.slice(0, 4) === '-ms-') name = 'ms-' + name.slice(4) result[ diff --git a/package.json b/package.json index 93f6354..62225c2 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "comma-separated-tokens": "^2.0.0", "property-information": "^6.0.0", "space-separated-tokens": "^2.0.0", - "style-to-object": "^0.4.0", + "style-to-object": "^0.4.1", "web-namespaces": "^2.0.0" }, "devDependencies": {