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

nuxt-viewport

Package Overview
Dependencies
Maintainers
0
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-viewport - npm Package Compare versions

Comparing version 2.1.6 to 2.2.0

4

dist/module.json

@@ -7,7 +7,7 @@ {

"name": "nuxt-viewport",
"version": "2.1.6",
"version": "2.2.0",
"builder": {
"@nuxt/module-builder": "0.8.3",
"@nuxt/module-builder": "0.8.4",
"unbuild": "2.0.0"
}
}

@@ -5,3 +5,3 @@ import { type Ref } from 'vue-demi';

export declare function createViewportManager(options: ViewportOptions, state: Ref<string>): {
breakpoint: import("vue").WritableComputedRef<string>;
breakpoint: import("vue").WritableComputedRef<string, string>;
breakpointValue: (searchBreakpoint: string) => number;

@@ -11,2 +11,3 @@ isGreaterThan: (searchBreakpoint: string) => boolean;

isLessThan: (searchBreakpoint: string) => boolean;
isLessOrEquals: (searchBreakpoint: string) => boolean;
match: (breakpointToMatch: string) => boolean;

@@ -13,0 +14,0 @@ matches: (...breakpointsToMatch: string[]) => boolean;

@@ -56,2 +56,3 @@ import cookie from "cookiejs";

isLessThan,
isLessOrEquals,
match,

@@ -84,2 +85,5 @@ matches,

}
function isLessOrEquals(searchBreakpoint) {
return isLessThan(searchBreakpoint) || match(searchBreakpoint);
}
function match(breakpointToMatch) {

@@ -86,0 +90,0 @@ return breakpoint.value === breakpointToMatch;

{
"name": "nuxt-viewport",
"version": "2.1.6",
"version": "2.2.0",
"description": "Define custom viewports for your Nuxt project",

@@ -5,0 +5,0 @@ "type": "module",

@@ -260,2 +260,12 @@ # nuxt-viewport

### `viewport.isLessOrEquals`
- Type: Boolean
```js
// Example: viewport.breakpoint is "tablet".
viewport.isLessOrEquals('tablet') // Result: true.
viewport.isLessOrEquals('mobile') // Result: false.
```
### `viewport.match`

@@ -262,0 +272,0 @@ - Type: Boolean

Sorry, the diff of this file is not supported yet

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