New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

object-history

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-history

Object History

  • 3.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
275
decreased by-31.59%
Maintainers
1
Weekly downloads
 
Created
Source

object-history NPM version Build Status js-standard-style

JavaScript Object history

Behind the scenes

For cloning, UltraDeepClone. For diff/apply, changeset.

Old browsers

Works in IE8 with es5-shim. Perhaps IE7, as well.

API

History

Gives birth to instances

  • initial {Object}: The initial history point
  • options {Object}: limit: {Number} Remember this many backward points
var History = require('object-history')
var initial = {foo: 'bar', name: 'victoria'}
var history = new History(initial, {limit: 33})

.add

Add a history point object

  • obj {Object}: The history point
history.add({
  foo: 'bar',
  bar: 'foo'
})

.backward

Go back one history point

.forgetAllBackward

Makes all backward history forgotten

.forgetAllForward

Makes all forward history forgotten

.forward

Go forward one history point

.get

  • returns {Object}: "Current" history point

.lengthBackward

  • returns {Number}: Number of history points backwards

.lengthForward

  • returns {Number}: Number of history points forward

License

Copyright © 2015 PolicyStat LLC

Released under the BSD-3-Clause license.

Keywords

FAQs

Package last updated on 25 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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