1.0.1 • Published 11 months ago

css.unescape v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

css.unescape

Install

<npm|yarn|pnpm> add css.unescape

Usage

import { cssUnescape } from 'css.unescape'

cssUnescape('\\31 2345') // -> '12345'

cssUnescape('\\32 xlctext-base') // -> '2xlctext-base'

cssUnescape('a\0b') // -> 'a\uFFFDb'

cssUnescape('a\0b', {
  slashZero: false
}) // -> 'a\u0000b'

Options

export interface CssUnescapeOptions {
  // default true
  // if '\0' -> '\uFFFD'
  slashZero?: boolean
}

License

This polyfill is available under the MIT license.