vknplayer
Version:
console audio player for listen music from vk.com and on-line radio
43 lines (30 loc) • 667 B
JavaScript
var events = require('events');
var HistoryManager = function() {
this._history = [];
};
goog.inherits(HistoryManager, events.EventEmitter);
/**
* @param {HistoryManager.Item} data
*/
HistoryManager.prototype.add = function(data) {
this._history.push(data);
};
/**
* @return {HistoryManager.Item}
*/
HistoryManager.prototype.back = function() {
return this._history.pop();
};
/**
* @type {Array.<HistoryManager.Item>}
*/
HistoryManager.prototype._history;
/**
* @typedef {{
* dataView: dataView.Abstract,
* children: Array.<dataView.Abstract>,
* selected: number
* }}
*/
HistoryManager.Item;
module.exports = HistoryManager;