New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

customizr

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

customizr - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

2

package.json
{
"name": "customizr",
"version": "1.0.0",
"version": "1.1.0",
"description": "Build out a lean, mean Modernizr machine.",

@@ -5,0 +5,0 @@ "main": "src",

@@ -15,2 +15,32 @@ # customizr

## Example
### CSS / SCSS / LESS
When going through css files, the crawler will not look for `display: flex` but rather if the code contains a css selector that is named like the Modernizr properties
```
.flexbox {
...
}
```
or
```
.no-flexbox {
...
}
```
### Javascript
When going through javascript files, the crawler will look for Modernizr calls like this one:
```
if (!Modernizr.flexbox) {
...
}
```
## Use with Grunt

@@ -62,3 +92,2 @@

"options" : [
"setClasses",
"addTest",

@@ -97,3 +126,6 @@ "html5printshiv",

// Have custom Modernizr tests? Add them here.
"customTests" : []
"customTests" : [],
// Add custom prefix to Modernizr CSS classes
"classPrefix" : ''
}

@@ -156,2 +188,7 @@ ```

###### **`classPrefix`** (String, optional)
Add custom prefix to Modernizr classes to avoid clashes with your preexisting class names.
This is an optional parameter.
## Caching

@@ -158,0 +195,0 @@

@@ -41,4 +41,4 @@ /* jshint node: true */

// JS files
if ((/\.js$/).test(basename)) {
// JavaScript/CoffeeScript/TypeScript files
if ((/\.(js|coffee|ts)$/).test(basename)) {
// Don't bother if we don't find a reference to Modernizr in the file...

@@ -51,3 +51,3 @@ if (!(/Modernizr/im).test(data)) {

}
// If it's not JS, assume it's CSS (or similar, e.g.: LESS, SCSS) files
// If it's not script, assume it's CSS (or similar, e.g.: LESS, SCSS) files
else {

@@ -189,3 +189,7 @@ prefix = settings.classPrefix || '';

var data = metadata.filter(function (data) {
return data.property === test;
if (Array.isArray(data.property)) {
return data.property.indexOf(test) !== -1;
} else {
return data.property === test;
}
});

@@ -192,0 +196,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