Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 547 Bytes

README.md

File metadata and controls

37 lines (25 loc) · 547 Bytes

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.