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

@vueuse/core

Package Overview
Dependencies
Maintainers
1
Versions
358
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vueuse/core - npm Package Compare versions

Comparing version 2.0.0-alpha.12 to 2.0.0-alpha.13

dist/esm/useInterval/index.d.ts

3

dist/esm/index.d.ts

@@ -1,4 +0,5 @@

export { init } from './api';
export declare const version = "0.0.0-alpha.13";
export * from './useAsyncState';
export * from './useCounter';
export * from './useInterval';
export * from './useIntervalFn';

@@ -5,0 +6,0 @@ export * from './useMouse';

@@ -1,4 +0,5 @@

export { init } from './api';
export var version = '0.0.0-alpha.13';
export * from './useAsyncState';
export * from './useCounter';
export * from './useInterval';
export * from './useIntervalFn';

@@ -5,0 +6,0 @@ export * from './useMouse';

@@ -1,4 +0,5 @@

export { init } from './api';
export declare const version = "0.0.0-alpha.13";
export * from './useAsyncState';
export * from './useCounter';
export * from './useInterval';
export * from './useIntervalFn';

@@ -5,0 +6,0 @@ export * from './useMouse';

@@ -6,6 +6,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var api_1 = require("./api");
exports.init = api_1.init;
exports.version = '0.0.0-alpha.13';
__export(require("./useAsyncState"));
__export(require("./useCounter"));
__export(require("./useInterval"));
__export(require("./useIntervalFn"));

@@ -12,0 +12,0 @@ __export(require("./useMouse"));

@@ -10,6 +10,2 @@ (function (global, factory) {

function init() {
Vue.use(CompositionAPI__default);
}
function useTimeout(interval, startRightNow) {

@@ -92,2 +88,26 @@ if (interval === void 0) { interval = 1000; }

function useInterval(interval, startRightNow) {
if (interval === void 0) { interval = 1000; }
if (startRightNow === void 0) { startRightNow = true; }
var timer = null;
var counter = CompositionAPI.ref(0);
function stop() {
if (timer) {
clearInterval(timer);
timer = null;
}
}
function start() {
stop();
timer = setInterval(function () {
counter.value += 1;
}, interval);
}
if (startRightNow)
start();
if (CompositionAPI.getCurrentInstance())
CompositionAPI.onUnmounted(stop);
return { counter: counter, start: start, stop: stop };
}
function useIntervalFn(cb, interval, startRightNow) {

@@ -373,5 +393,7 @@ if (interval === void 0) { interval = 1000; }

exports.init = init;
var version = '0.0.0-alpha.13';
exports.useAsyncState = useAsyncState;
exports.useCounter = useCounter;
exports.useInterval = useInterval;
exports.useIntervalFn = useIntervalFn;

@@ -389,2 +411,3 @@ exports.useMouse = useMouse;

exports.useWindowSize = useWindowSize;
exports.version = version;

@@ -391,0 +414,0 @@ Object.defineProperty(exports, '__esModule', { value: true });

{
"name": "@vueuse/core",
"version": "2.0.0-alpha.12",
"version": "2.0.0-alpha.13",
"description": "Collection of essential Vue Composition API",

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

"scripts": {
"build": "node ./build/build.js",
"release": "node ./build/import.js && npm run lint && bump --commit --preid alpha && node ./build/publish.js all",
"build": "node ./build/build",
"release": "npm run lint && bump --commit --preid alpha && node ./build/publish.js all",
"switch": "node ./build/switch",
"import": "node ./build/import",
"test": "jest",

@@ -16,0 +17,0 @@ "lint": "eslint {src,.storybook,build}/**/*.{js,ts,tsx,vue,md}",

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