UNPKG

401 BJavaScriptView Raw
1
2//
3// IperElement
4// ===========
5//
6
7var _ = require('underscore')
8
9// Constructor
10
11function IperElement(graph) {
12
13 // graph
14 function getGraph() { return graph }
15
16 Object.defineProperty(this, 'graph', {get: getGraph})
17
18 // id
19 var id = _.uniqueId()
20
21 function getId() { return id }
22
23 Object.defineProperty(this, 'id', {get: getId})
24}
25
26module.exports = IperElement
27