Skip to content
This repository was archived by the owner on Aug 9, 2023. It is now read-only.

Commit a4b6e3f

Browse files
committed
Update style-to-object
1 parent 04ae322 commit a4b6e3f

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

lib/index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,9 @@
5454
import {html, svg, find, hastToReact} from 'property-information'
5555
import {stringify as spaces} from 'space-separated-tokens'
5656
import {stringify as commas} from 'comma-separated-tokens'
57-
// @ts-expect-error: typed incorrectly
5857
import styleToObject from 'style-to-object'
5958
import {webNamespaces} from 'web-namespaces'
6059

61-
/** @type {(value: string, replacer: ((key: string, value: string) => void)) => void} */
62-
const style = styleToObject
63-
6460
const own = {}.hasOwnProperty
6561

6662
/**
@@ -364,7 +360,7 @@ function parseStyle(value, tagName) {
364360
const result = {}
365361

366362
try {
367-
style(value, (name, value) => {
363+
styleToObject(value, (name, value) => {
368364
if (name.slice(0, 4) === '-ms-') name = 'ms-' + name.slice(4)
369365

370366
result[

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"comma-separated-tokens": "^2.0.0",
3232
"property-information": "^6.0.0",
3333
"space-separated-tokens": "^2.0.0",
34-
"style-to-object": "^0.4.0",
34+
"style-to-object": "^0.4.1",
3535
"web-namespaces": "^2.0.0"
3636
},
3737
"devDependencies": {

0 commit comments

Comments
 (0)