Urara-Blog/node_modules/.pnpm-store/v3/files/c1/95a0de56df5f8d51c57b04897d3f7195d337d2a94e544cd75114341e6c1d9e8bbff46294f389180819480c6222844c76d8611ca03489e7ee5b80d20b985459
2022-08-14 01:14:53 +08:00

59 lines
1,004 B
Text

# [postcss][postcss]-normalize-string
> Normalize strings with PostCSS.
## Install
With [npm](https://npmjs.org/package/postcss-normalize-string) do:
```
npm install postcss-normalize-string --save
```
## Example
### Input
```css
p:after{ content: '\\'string\\' is intact' }
```
### Output
```css
p:after{ content:"'string' is intact" }
```
## Usage
See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
examples for your environment.
## API
### normalize([options])
#### options
##### preferredQuote
Type: `string`
Default: `double`
Sets what type of quote to prefer. Possible values are `single` and `double`.
```js
var css = 'p:after{content:""}';
console.log(postcss(normalize({preferredQuote: 'single'})).process(css).css);
//=> p:after{content:''}
```
## Contributors
See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).
## License
MIT © [Ben Briggs](http://beneb.info)
[postcss]: https://github.com/postcss/postcss