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 - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

lib/prototype/forget-all-backward.js

15

.verb.md

@@ -13,18 +13,11 @@ # object-history {%= badge("fury") %} {%= badge("travis") %} [![js-standard-style](https://raw.githubusercontent.com/feross/standard/master/badge.png)](https://github.com/feross/standard)

## Constructor
## API
{%= apidocs("lib/index.js") %}
#### Constructor options
`limit`
Optional. Provide a number of backwards history points to keep.
Older than this number will be forgotten and hopefully their allocated memory will be reclaimed.
## Methods
{%= apidocs("lib/prototype/\*") %}
## Copyright
## License
{%= copyright %}
{%= license() %}

@@ -13,7 +13,8 @@ 'use strict'

* var initial = {foo: 'bar', name: 'victoria'}
* var history = new History(initial)
* var history = new History(initial, {limit: 33})
* ```
*
* @name History
* @param {Object} `initial` The initial history point
* @param {Object} `options` Optional [options](#constructor-options)
* @param {Object} `options` `limit`: `{Number}` Remember this many backward points
* @constructor

@@ -23,3 +24,3 @@ * @api public

var History = function (initial, options) {
module.exports = function (initial, options) {
var self = this

@@ -42,10 +43,13 @@ self.options = xtend({

History.prototype.add = require('./prototype/add')
History.prototype.get = require('./prototype/get')
History.prototype.lengthBackward = require('./prototype/length-backward')
History.prototype.lengthForward = require('./prototype/length-forward')
History.prototype.backward = require('./prototype/backward')
History.prototype.forward = require('./prototype/forward')
History.prototype.move = require('./prototype/move')
var proto = module.exports.prototype
module.exports = History
proto.add = require('./prototype/add')
proto.get = require('./prototype/get')
proto.lengthBackward = require('./prototype/length-backward')
proto.lengthForward = require('./prototype/length-forward')
proto.backward = require('./prototype/backward')
proto.forward = require('./prototype/forward')
proto.move = require('./prototype/move')
proto.forgetAllInDirection = require('./prototype/forget-all-in-direction')
proto.forgetAllBackward = require('./prototype/forget-all-backward')
proto.forgetAllForward = require('./prototype/forget-all-forward')

@@ -16,2 +16,3 @@ 'use strict'

*
* @name add
* @param {Object} `obj` The history point

@@ -21,3 +22,3 @@ * @api public

var add = function (obj) {
module.exports = function (obj) {
var self = this

@@ -40,3 +41,1 @@

}
module.exports = add

@@ -6,6 +6,7 @@ 'use strict'

*
* @name backward
* @api public
*/
var backward = function () {
module.exports = function () {
var self = this

@@ -15,3 +16,1 @@

}
module.exports = backward

@@ -6,6 +6,7 @@ 'use strict'

*
* @name forward
* @api public
*/
var forward = function () {
module.exports = function () {
var self = this

@@ -15,3 +16,1 @@

}
module.exports = forward

@@ -6,4 +6,3 @@ 'use strict'

/**
* Get the "current" history point
*
* @name get
* @return {Object} "Current" history point

@@ -13,3 +12,3 @@ * @api public

var get = function () {
module.exports = function () {
var self = this

@@ -19,3 +18,1 @@

}
module.exports = get
'use strict'
/**
* @name lengthBackward
* @return {Number} Number of history points backwards

@@ -8,3 +9,3 @@ * @api public

var lengthBackward = function () {
module.exports = function () {
var self = this

@@ -14,3 +15,1 @@

}
module.exports = lengthBackward
'use strict'
/**
* @name lengthForward
* @return {Number} Number of history points forward

@@ -8,3 +9,3 @@ * @api public

var lengthForward = function () {
module.exports = function () {
var self = this

@@ -14,3 +15,1 @@

}
module.exports = lengthForward

@@ -20,3 +20,3 @@ var pkg = require('auto-package')

pkg.devDependencies = {
'verb-cli': '^0.4.5',
'verb-cli': '^0.6.2',
'call-n-times': '^1.1.0',

@@ -23,0 +23,0 @@ 'auto-package': '^1.0.0',

@@ -9,3 +9,3 @@ {

"devDependencies": {
"verb-cli": "^0.4.5",
"verb-cli": "^0.6.2",
"call-n-times": "^1.1.0",

@@ -28,3 +28,3 @@ "auto-package": "^1.0.0",

"name": "object-history",
"version": "3.0.0",
"version": "3.1.0",
"description": "Object History",

@@ -31,0 +31,0 @@ "main": "lib/index.js",

@@ -13,5 +13,5 @@ # object-history [![NPM version](https://badge.fury.io/js/object-history.svg)](http://badge.fury.io/js/object-history) [![Build Status](https://travis-ci.org/PolicyStat/object-history.svg)](https://travis-ci.org/PolicyStat/object-history) [![js-standard-style](https://raw.githubusercontent.com/feross/standard/master/badge.png)](https://github.com/feross/standard)

## Constructor
## API
### [History](./lib/index.js#L22)
### [History](lib/index.js#L23)

@@ -21,3 +21,3 @@ Gives birth to instances

* `initial` **{Object}**: The initial history point
* `options` **{Object}**: Optional [options](#constructor-options)
* `options` **{Object}**: `limit`: `{Number}` Remember this many backward points

@@ -27,16 +27,6 @@ ```js

var initial = {foo: 'bar', name: 'victoria'}
var history = new History(initial)
var history = new History(initial, {limit: 33})
```
### [.add](lib/prototype/add.js#L21)
#### Constructor options
`limit`
Optional. Provide a number of backwards history points to keep.
Older than this number will be forgotten and hopefully their allocated memory will be reclaimed.
## Methods
### [add](./lib/prototype/add.js#L20)
Add a history point object

@@ -53,26 +43,40 @@

### [backward](./lib/prototype/backward.js#L9)
### [.backward](lib/prototype/backward.js#L10)
Go back one history point](./lib/prototype/backward.js#L11)
Go back one history point
### [forward](./lib/prototype/forward.js#L9)
### [.forgetAllBackward](lib/prototype/forget-all-backward.js#L11)
Makes all backward history forgotten
### [.forgetAllForward](lib/prototype/forget-all-forward.js#L11)
Makes all forward history forgotten
### [.forward](lib/prototype/forward.js#L10)
Go forward one history point
### [get](./lib/prototype/get.js#L12)
### [.get](lib/prototype/get.js#L11)
* `returns` **{Object}**: "Current" history point
Get the "current" history point
### [.lengthBackward](lib/prototype/length-backward.js#L9)
### [lengthBackward](./lib/prototype/length-backward.js#L8)
* `returns` **{Number}**: Number of history points backwards
* `returns` **{Number}**: Number of history points backwards
### [.lengthForward](lib/prototype/length-forward.js#L9)
### [lengthForward](./lib/prototype/length-forward.js#L8)
* `returns` **{Number}**: Number of history points forward
## Copyright
## License
Copyright © 2015 PolicyStat LLC
Released under the BSD-3-Clause license.
<!-- reflinks generated by verb-reflinks plugin -->
[verb]: https://github.com/assemble/verb
[template]: https://github.com/jonschlinkert/template
[assemble]: http://assemble.io

@@ -9,3 +9,4 @@ require('./initialization')

require('./prototype/forward')
require('./prototype/forget')
require('./feature/limit')

Sorry, the diff of this file is not supported yet

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