css.unescape
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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.

Package Sidebar

Install

npm i css.unescape

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

5.49 kB

Total Files

6

Last publish

Collaborators

  • icebreaker