You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ndpane

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ndpane

represents a splitpane

0.2.2
latest
Source
npmnpm
Version published
Weekly downloads
71
10.94%
Maintainers
3
Weekly downloads
 
Created
Source

ndpane

represents a splitpane.

example

var ndpane = require('ndpane');
var unpack = require('ndarray-unpack');

var pane = ndpane(4); // 16 panes
pane.split(); // split horizontally
pane.leafs[1].split(true); // split bottom half vertically

console.log(unpack(pane.data));
// [
//  [1, 1,  1,  1],
//  [1, 1,  1,  1],
//  [9, 9, 11, 11],
//  [9, 9, 11, 11]
// ]

api

ndpane(size, [arr])

.split(vertical)

.merge()

.flip()

.north(offset)

.south(offset)

.west(offset)

.east(offset)

.serialize()

Returns an array representation of a tree that you can use to create a copy.

var tree = ndpane(4);
tree.split().leafs[0].split(true);
var copy = ndpane(4, tree.serialize());

license

MIT

Keywords

pane

FAQs

Package last updated on 07 May 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