include-media-query-builder
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -11,6 +11,6 @@ "use strict"; | ||
} | ||
if (operator === '>=') { | ||
if (operator === '>=' || operator === '≥') { | ||
return `(min-width: ${value}px)`; | ||
} | ||
if (operator === '>') { | ||
if (operator === '>' || operator === '≤') { | ||
return `(min-width: ${value + 1}px)`; | ||
@@ -17,0 +17,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.OPERATORS = void 0; | ||
exports.OPERATORS = ['<', '<=', '>=', '>']; | ||
exports.OPERATORS = ['<', '<=', '>=', '>', '≤', '≥']; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const isSize = (breakpoints, value) => { | ||
return typeof value === 'string' && Object.keys(breakpoints).includes(value); | ||
return (typeof value === 'string' && | ||
Object.keys(breakpoints) | ||
.map((size) => size.toLowerCase()) | ||
.includes(value.toLowerCase())); | ||
}; | ||
exports.default = isSize; |
@@ -1,2 +0,2 @@ | ||
export type Operator = '<' | '<=' | '>=' | '>'; | ||
export type Operator = '<' | '<=' | '>=' | '>' | `≤` | `≥`; | ||
export interface ParsedQuery<Size extends string | number | symbol> { | ||
@@ -3,0 +3,0 @@ operator: Operator; |
{ | ||
"name": "include-media-query-builder", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Build include-media-like media queries in JavaScript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
9802
134