Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

horizontal

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

horizontal

A package that analyze and gives information about browser width such as screen type (XS, SM, MD, LG)

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19
increased by35.71%
Maintainers
1
Weekly downloads
 
Created
Source

horizontal

Build Status npm package NPM Downloads Average time to resolve an issue Follow on Twitter

A package that analyze and gives information about browser width such as screen type (XS, SM, MD, LG)

Installation

To install horizontal with npm:

npm install horizontal --save

To install horizontal with yarn:

yarn add horizontal

Usage

import { Horizontal, ScreenType } from 'horizontal'

// Set defaults
// Horizontal.setDefaults(600, 900, 1100); xs < 600, sm < 900, md < 1100

if(Horizontal.getType() == ScreenType.MD) {
  // screen is medium size
}

const data = Horizontal.getData();
console.log(data.width); // Available width of window


Contributing

We'd love to have your helping hand on horizontal! See CONTRIBUTING.md for more information on what we're looking for and how to get started.

License

This project is licensed under the terms of the MIT license.

Keywords

FAQs

Package last updated on 03 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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