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 - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

dist/window-data.d.ts

8

dist/horizontal.d.ts

@@ -1,9 +0,9 @@

import { ScreenType } from "./screen-type";
import { ScreenData } from "./screen-data";
import { WindowWidthType } from "./window-width-type";
import { WindowData } from "./window-data";
export declare class Horizontal {
private static defaults;
static getData(): ScreenData;
static getType(width?: number): ScreenType;
static getData(): WindowData;
static getType(width?: number): WindowWidthType;
static setDefaults(xs: number, sm: number, md: number): void;
static getWidth(): any;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var screen_type_1 = require("./screen-type");
var window_width_type_1 = require("./window-width-type");
var Horizontal = /** @class */ (function () {

@@ -11,3 +11,3 @@ function Horizontal() {

width: width,
screenType: this.getType(width)
widthType: this.getType(width)
};

@@ -21,13 +21,13 @@ };

if (width < this.defaults.screenType.xs) {
return screen_type_1.ScreenType.XS;
return window_width_type_1.WindowWidthType.XS;
}
// @ts-ignore
else if (width < this.defaults.screenType.sm) {
return screen_type_1.ScreenType.SM;
return window_width_type_1.WindowWidthType.SM;
}
// @ts-ignore
else if (width < this.defaults.screenType.md) {
return screen_type_1.ScreenType.MD;
return window_width_type_1.WindowWidthType.MD;
}
return screen_type_1.ScreenType.LG;
return window_width_type_1.WindowWidthType.LG;
};

@@ -34,0 +34,0 @@ Horizontal.setDefaults = function (xs, sm, md) {

export { Horizontal } from './horizontal';
export { ScreenData } from './screen-data';
export { ScreenType } from './screen-type';
export { WindowData } from './window-data';
export { WindowWidthType } from './window-width-type';

@@ -5,3 +5,3 @@ "use strict";

exports.Horizontal = horizontal_1.Horizontal;
var screen_type_1 = require("./screen-type");
exports.ScreenType = screen_type_1.ScreenType;
var window_width_type_1 = require("./window-width-type");
exports.WindowWidthType = window_width_type_1.WindowWidthType;
{
"name": "horizontal",
"version": "0.2.0",
"version": "0.2.1",
"description": "A package that analyze and gives information about browser width such as screen type (XS, SM, MD, LG)",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

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