json2mq

WebJar for json2mq

License

License

MIT
Categories

Categories

JSON Data
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

json2mq
Last Version

Last Version

0.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

json2mq
WebJar for json2mq
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/akiran/json2mq

Download json2mq

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/json2mq/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>json2mq</artifactId>
    <version>0.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/json2mq/
implementation 'org.webjars.npm:json2mq:0.2.0'
// https://jarcasting.com/artifacts/org.webjars.npm/json2mq/
implementation ("org.webjars.npm:json2mq:0.2.0")
'org.webjars.npm:json2mq:jar:0.2.0'
<dependency org="org.webjars.npm" name="json2mq" rev="0.2.0">
  <artifact name="json2mq" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='json2mq', version='0.2.0')
)
libraryDependencies += "org.webjars.npm" % "json2mq" % "0.2.0"
[org.webjars.npm/json2mq "0.2.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : string-convert jar [0.2.0,0.3)

Project Modules

There are no modules declared in this project.

json2mq

json2mq is used to generate media query string from JSON or javascript object.

Install

npm install json2mq

Usage

var json2mq = require('json2mq');
json2mq({minWidth: 100, maxWidth: 200});
// -> '(min-width: 100px) and (max-width: 200px)'
  • Media type
json2mq({screen: true});  // -> 'screen'
  • Media type with negation
json2mq({handheld: false});  // -> 'not handheld'
  • Media features can be specified in camel case
json2mq({minWidth: 100, maxWidth: 200});
// -> '(min-width: 100px) and (max-width: 200px)'
  • px is added to numeric dimension values
json2mq({minWidth: 100, maxWidth: '20em'});
// -> '(min-width: 100px) and (max-width: 20em)'
  • Multiple media queries can be passed as an array
json2mq([{screen: true, minWidth: 100}, {handheld: true, orientation: 'landscape'}]); 
// -> 'screen and (min-width: 100px), handheld and (orientation: landscape)'

Contributors

Versions

Version
0.2.0