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

Commit

Permalink
Update style-to-object
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jan 17, 2023
1 parent 04ae322 commit a4b6e3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down Expand Up @@ -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[
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",

This comment has been minimized.

This comment has been minimized.

Copy link
@wooorm

wooorm Jan 17, 2023

Author Member

same

"web-namespaces": "^2.0.0"
},
"devDependencies": {
Expand Down

0 comments on commit a4b6e3f

Please sign in to comment.