Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS.unescape ? #18

Open
kachkaev opened this issue May 29, 2024 · 0 comments
Open

CSS.unescape ? #18

kachkaev opened this issue May 29, 2024 · 0 comments

Comments

@kachkaev
Copy link

kachkaev commented May 29, 2024

👋 folks! I know it might be the wrong place to ask, but someone else might be searching this repo too in the future. What would be the reverse operation? I’m looking for something like this:

const original = 12345;

const unescape = () => { /* ?? */ };

expect(unescape(CSS.escape(original))).toEqual(original)

Relevant question on StackOverflow: https://stackoverflow.com/q/64273537/1818285

Package with exact name match: https://www.npmjs.com/package/css.unescape (suspiciously no weekly downloads).

My use case: take something like:

  • url(some-escaped-url)
  • url('some-escaped-url')
  • url("some-escaped-url")

and reliably extract URL value from such input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant