Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Increment or decrement values nested in an object
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
LICENSE-MIT
README.md
index.js
package.json

README.md

propup

Increment or decrement values nested in an object

example

var propup = require('propup')

var player = {
  position: {
    x: 0,
    y: 0,
    z: 0,
  },
  soemthing: 99,
}

var interval = setInterval(function() {

  // Every second, increase player.position.y by 2 until it reaches 100
  var done = propup({position:{y:100}}, player, 2)

  // Returns boolean whether all values have reached their destinations
  if (done) clearInterval(interval)

}, 1000)

install

With npm do:

npm install propup

Use browserify to require('propup').

release history

  • 0.1.0 - initial release

license

Copyright (c) 2013 Kyle Robinson Young
Licensed under the MIT license.

Something went wrong with that request. Please try again.