@profiscience/knockout-contrib-utils-increment
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

utils.increment / utils.decrement

Version Dependency Status Peer Dependency Status Dev Dependency Status Downloads

This package is intended for consumption via the [@profiscience/knockout-contrib] metapackage.

Increments/decrements a numeric observable. Returns the new value.

Usage

import { increment, decrement } from '@profiscience/knockout-contrib'

const foo = ko.observable(0)

increment(foo) // 1
increment(foo, 3) // 4
decrement(foo) // 3
decrement(foo, 2) // 1

Readme

Keywords

none

Package Sidebar

Install

npm i @profiscience/knockout-contrib-utils-increment

Weekly Downloads

0

Version

2.0.1

License

WTFPL

Unpacked Size

9.17 kB

Total Files

12

Last publish

Collaborators

  • dorgeron
  • barsh