Simple tabs module.
What you should do first is create new instance of tabify
with
var tabs = tabify();
Than you could just use API as it is.
Add new tab object which stores needed information about files in tabs list.
Remove tab from tabs list by name of file.
Get specific tab or all tabs in case of no argument. FileName should be string.
var tabify = require('tabify'),
tabs = tabify(),
name = 'README.md';
tabs.add({
name: name,
path: '/' + name,
data: 'hello world',
row: 1,
column: 5
});
tabs.get();
// returns
[{
name: "README.md",
path: "/README.md",
data: "hello world",
row: 1,
column: 5
}]
tabs.remove(name);
tabs.get();
//returns
[];
MIT