Skip to content

CSS.unescape ? #18

@kachkaev

Description

@kachkaev

👋 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions