UNPKG

@cran/lib.vue.ref

Version:

Vue Reactivity Extensions

17 lines (16 loc) 395 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.watchOnce = void 0; const vue_1 = require("vue"); /** * @since 0.0.1 * @category Watch */ function watchOnce(source, cb, options) { const stop = (0, vue_1.watch)(source, function onChange(...args) { stop(); cb(...args); }, options); return stop; } exports.watchOnce = watchOnce;