Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including mediaquery-text with all npm packages installed. Try it out:

var mediaqueryText = require("mediaquery-text")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

mediaquery-text v1.0.7

Returns Media Query text for a CSS source.

mediaquery-text Build Status Coverage Status

NPM

Returns Media Query text for a CSS source.

Install

Install with npm

npm install --save mediaquery-text

Usage

var mediaQueryText = require('mediaquery-text');

var mediaQueries = mediaQueryText(css);

console.log(mediaQueries);  // @media only screen and (min-width: 35em) {}

Credit

The code for this module was originally taken from the Juice library.

License

MIT

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free