Skip to content

tarzak/tabify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tabify License Dependency Status Build Status

Simple tabs module.

API

What you should do first is create new instance of tabify with

var tabs = tabify();

Than you could just use API as it is.

tabs.add(tabObject)

Add new tab object which stores needed information about files in tabs list.

tabs.remove(fileName)

Remove tab from tabs list by name of file.

tabs.get([fileName])

Get specific tab or all tabs in case of no argument. FileName should be string.

How to use?

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
[];

License

MIT

About

Simple tabs module.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published