Socket
Socket
Sign inDemoInstall

sort-css-media-queries

Package Overview
Dependencies
0
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.1.9

.travis.yml

28

index.js

@@ -54,16 +54,16 @@ /**

switch (unit) {
case "ch":
case 'ch':
num = parseFloat(num) * 8.8984375;
break;
case "em":
case "rem":
case 'em':
case 'rem':
num = parseFloat(num) * 16;
break;
case "ex":
case 'ex':
num = parseFloat(num) * 8.296875;
break;
case "px":
case 'px':
num = parseFloat(num);

@@ -90,14 +90,12 @@ break;

*/
return function(query) {
if ( doubleTestTrue.test(query) ) {
return function (query) {
if (doubleTestTrue.test(query)) {
return true;
} else if ( doubleTestFalse.test(query) ) {
} else if (doubleTestFalse.test(query)) {
return false;
}
return singleTest.test(query);
}
};
}
// ----------------------------------------

@@ -117,6 +115,6 @@ // Exports

let maxA = isMaxWidth(a) || isMaxHeight(a);
let minB = isMinWidth(b) || isMinHeight(b);
let maxB = isMaxWidth(b) || isMaxHeight(b);
if (minA && maxB) {

@@ -128,6 +126,6 @@ return -1;

}
let lengthA = getQueryLength(a);
let lengthB = getQueryLength(b);
if (lengthA > lengthB) {

@@ -134,0 +132,0 @@ if (maxA) {

{
"name": "sort-css-media-queries",
"version": "1.1.1",
"version": "1.1.9",
"description": "The custom `sort` method for `css-mqpacker` or `pleeease` (which uses css-mqpacker) or, perhaps, something else ))",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "happiness --verbose | snazzy && node ./tests/index.js",
"fix": "happiness --verbose --fix | snazzy"
},

@@ -21,3 +22,3 @@ "repository": {

],
"author": "Oleg Dutchenko <dutchenko.o.wezom@gmail.com>",
"author": "Oleg Dutchenko <dutchenko.o.dev@gmail.com>",
"license": "MIT",

@@ -30,3 +31,7 @@ "bugs": {

},
"homepage": "https://github.com/dutchenkoOleg/sort-css-media-queries#readme"
"homepage": "https://github.com/dutchenkoOleg/sort-css-media-queries#readme",
"devDependencies": {
"happiness": "^7.1.2",
"snazzy": "^7.0.0"
}
}

@@ -5,5 +5,9 @@ # sort-css-media-queries

![es2015](https://img.shields.io/badge/ECMAScript-2015_(ES6)-blue.svg)
![license](https://img.shields.io/badge/License-MIT-orange.svg)
[![Build Status](https://travis-ci.org/dutchenkoOleg/sort-css-media-queries.svg?branch=master)](https://travis-ci.org/dutchenkoOleg/sort-css-media-queries)
The custom `sort` method for [`css-mqpacker`](https://www.npmjs.com/package/css-mqpacker) or [`pleeease`](https://www.npmjs.com/package/pleeease) (which uses css-mqpacker) or, perhaps, something else ))
> The custom `sort` method for [`css-mqpacker`](https://www.npmjs.com/package/css-mqpacker) or [`pleeease`](https://www.npmjs.com/package/pleeease) (which uses css-mqpacker) or, perhaps, something else ))
[![js happiness style](https://cdn.rawgit.com/JedWatson/happiness/master/badge.svg)](https://github.com/JedWatson/happiness)
## Installing

@@ -46,7 +50,12 @@

Sorry but here no tests yet.
1. `npm test` for testing js code style and test sorting method
1. `npm run fix` for automatically fix most of problems with **js code style**
## Changelog
Please read [CHANGELOG.md](https://github.com/dutchenkoOleg/sort-css-media-queries/blob/master/CHANGELOG.md)
## Contributing
you know what to do - [issues](https://github.com/dutchenkoOleg/sort-css-media-queries/issues) and [pulls](https://github.com/dutchenkoOleg/sort-css-media-queries/pulls)
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc