Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-normalize-charset

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-normalize-charset - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

CHANGELOG.md

12

index.js
var postcss = require('postcss');
module.exports = postcss.plugin('postcss-normalize-charset', function () {
module.exports = postcss.plugin('postcss-normalize-charset', function (opts) {
opts = opts || {};
return function (css) {

@@ -21,3 +23,3 @@ var charsetRule;

if (nonAsciiNode) {
if (!charsetRule) {
if (!charsetRule && opts.add !== false) {
charsetRule = postcss.atRule({

@@ -28,6 +30,8 @@ name: 'charset',

}
charsetRule.source = nonAsciiNode.source;
css.root().prepend(charsetRule);
if (charsetRule) {
charsetRule.source = nonAsciiNode.source;
css.root().prepend(charsetRule);
}
}
};
});
{
"name": "postcss-normalize-charset",
"version": "1.0.0",
"version": "1.1.0",
"description": "Add necessary or remove extra charset with PostCSS",

@@ -5,0 +5,0 @@ "keywords": [

@@ -18,2 +18,16 @@ # postcss-normalize-charset [![Build Status][ci-img]][ci]

## API
### normalizeCharset([options])
#### options
##### add
Type: `boolean`
Default: `true`
Pass `false` to stop the module from adding a `@charset` declaration if it was
missing from the file (and the file contained non-ascii characters).
## Usage

@@ -20,0 +34,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc