3
3
Object . defineProperty ( exports , "__esModule" , {
4
4
value : true
5
5
} ) ;
6
+ exports . PathSegment = exports . Path = exports . UnboundRelationship = exports . Relationship = exports . Node = undefined ;
6
7
7
- var _createClass = function ( ) { function defineProperties ( target , props ) { for ( var i = 0 ; i < props . length ; i ++ ) { var descriptor = props [ i ] ; descriptor . enumerable = descriptor . enumerable || false ; descriptor . configurable = true ; if ( "value" in descriptor ) descriptor . writable = true ; Object . defineProperty ( target , descriptor . key , descriptor ) ; } } return function ( Constructor , protoProps , staticProps ) { if ( protoProps ) defineProperties ( Constructor . prototype , protoProps ) ; if ( staticProps ) defineProperties ( Constructor , staticProps ) ; return Constructor ; } ; } ( ) ;
8
+ var _stringify = require ( "babel-runtime/core-js/json/stringify" ) ;
8
9
9
- function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( "Cannot call a class as a function" ) ; } }
10
+ var _stringify2 = _interopRequireDefault ( _stringify ) ;
11
+
12
+ var _keys = require ( "babel-runtime/core-js/object/keys" ) ;
13
+
14
+ var _keys2 = _interopRequireDefault ( _keys ) ;
15
+
16
+ var _classCallCheck2 = require ( "babel-runtime/helpers/classCallCheck" ) ;
17
+
18
+ var _classCallCheck3 = _interopRequireDefault ( _classCallCheck2 ) ;
19
+
20
+ var _createClass2 = require ( "babel-runtime/helpers/createClass" ) ;
21
+
22
+ var _createClass3 = _interopRequireDefault ( _createClass2 ) ;
23
+
24
+ function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
10
25
11
26
/**
12
27
* Copyright (c) 2002-2016 "Neo Technology,"
@@ -38,34 +53,33 @@ var Node = function () {
38
53
* @param {Object } properties - Map with node properties
39
54
*/
40
55
function Node ( identity , labels , properties ) {
41
- _classCallCheck ( this , Node ) ;
56
+ ( 0 , _classCallCheck3 . default ) ( this , Node ) ;
42
57
43
58
this . identity = identity ;
44
59
this . labels = labels ;
45
60
this . properties = properties ;
46
61
}
47
62
48
- _createClass ( Node , [ {
63
+ ( 0 , _createClass3 . default ) ( Node , [ {
49
64
key : "toString" ,
50
65
value : function toString ( ) {
51
66
var s = "(" + this . identity ;
52
67
for ( var i = 0 ; i < this . labels . length ; i ++ ) {
53
68
s += ":" + this . labels [ i ] ;
54
69
}
55
- var keys = Object . keys ( this . properties ) ;
70
+ var keys = ( 0 , _keys2 . default ) ( this . properties ) ;
56
71
if ( keys . length > 0 ) {
57
72
s += " {" ;
58
73
for ( var _i = 0 ; _i < keys . length ; _i ++ ) {
59
74
if ( _i > 0 ) s += "," ;
60
- s += keys [ _i ] + ":" + JSON . stringify ( this . properties [ keys [ _i ] ] ) ;
75
+ s += keys [ _i ] + ":" + ( 0 , _stringify2 . default ) ( this . properties [ keys [ _i ] ] ) ;
61
76
}
62
77
s += "}" ;
63
78
}
64
79
s += ")" ;
65
80
return s ;
66
81
}
67
82
} ] ) ;
68
-
69
83
return Node ;
70
84
} ( ) ;
71
85
@@ -84,7 +98,7 @@ var Relationship = function () {
84
98
* @param {Object } properties - Map with relationship properties
85
99
*/
86
100
function Relationship ( identity , start , end , type , properties ) {
87
- _classCallCheck ( this , Relationship ) ;
101
+ ( 0 , _classCallCheck3 . default ) ( this , Relationship ) ;
88
102
89
103
this . identity = identity ;
90
104
this . start = start ;
@@ -93,24 +107,23 @@ var Relationship = function () {
93
107
this . properties = properties ;
94
108
}
95
109
96
- _createClass ( Relationship , [ {
110
+ ( 0 , _createClass3 . default ) ( Relationship , [ {
97
111
key : "toString" ,
98
112
value : function toString ( ) {
99
113
var s = "(" + this . start + ")-[:" + this . type ;
100
- var keys = Object . keys ( this . properties ) ;
114
+ var keys = ( 0 , _keys2 . default ) ( this . properties ) ;
101
115
if ( keys . length > 0 ) {
102
116
s += " {" ;
103
117
for ( var i = 0 ; i < keys . length ; i ++ ) {
104
118
if ( i > 0 ) s += "," ;
105
- s += keys [ i ] + ":" + JSON . stringify ( this . properties [ keys [ i ] ] ) ;
119
+ s += keys [ i ] + ":" + ( 0 , _stringify2 . default ) ( this . properties [ keys [ i ] ] ) ;
106
120
}
107
121
s += "}" ;
108
122
}
109
123
s += "]->(" + this . end + ")" ;
110
124
return s ;
111
125
}
112
126
} ] ) ;
113
-
114
127
return Relationship ;
115
128
} ( ) ;
116
129
@@ -128,7 +141,7 @@ var UnboundRelationship = function () {
128
141
* @param {Object } properties - Map with relationship properties
129
142
*/
130
143
function UnboundRelationship ( identity , type , properties ) {
131
- _classCallCheck ( this , UnboundRelationship ) ;
144
+ ( 0 , _classCallCheck3 . default ) ( this , UnboundRelationship ) ;
132
145
133
146
this . identity = identity ;
134
147
this . type = type ;
@@ -143,7 +156,7 @@ var UnboundRelationship = function () {
143
156
*/
144
157
145
158
146
- _createClass ( UnboundRelationship , [ {
159
+ ( 0 , _createClass3 . default ) ( UnboundRelationship , [ {
147
160
key : "bind" ,
148
161
value : function bind ( start , end ) {
149
162
return new Relationship ( this . identity , start , end , this . type , this . properties ) ;
@@ -152,20 +165,19 @@ var UnboundRelationship = function () {
152
165
key : "toString" ,
153
166
value : function toString ( ) {
154
167
var s = "-[:" + this . type ;
155
- var keys = Object . keys ( this . properties ) ;
168
+ var keys = ( 0 , _keys2 . default ) ( this . properties ) ;
156
169
if ( keys . length > 0 ) {
157
170
s += " {" ;
158
171
for ( var i = 0 ; i < keys . length ; i ++ ) {
159
172
if ( i > 0 ) s += "," ;
160
- s += keys [ i ] + ":" + JSON . stringify ( this . properties [ keys [ i ] ] ) ;
173
+ s += keys [ i ] + ":" + ( 0 , _stringify2 . default ) ( this . properties [ keys [ i ] ] ) ;
161
174
}
162
175
s += "}" ;
163
176
}
164
177
s += "]->" ;
165
178
return s ;
166
179
}
167
180
} ] ) ;
168
-
169
181
return UnboundRelationship ;
170
182
} ( ) ;
171
183
@@ -182,7 +194,7 @@ var PathSegment =
182
194
* @param {string } end - Identity of end Node
183
195
*/
184
196
function PathSegment ( start , rel , end ) {
185
- _classCallCheck ( this , PathSegment ) ;
197
+ ( 0 , _classCallCheck3 . default ) ( this , PathSegment ) ;
186
198
187
199
this . start = start ;
188
200
this . relationship = rel ;
@@ -202,7 +214,7 @@ var Path =
202
214
* @param {Array } segments - Array of Segments
203
215
*/
204
216
function Path ( start , end , segments ) {
205
- _classCallCheck ( this , Path ) ;
217
+ ( 0 , _classCallCheck3 . default ) ( this , Path ) ;
206
218
207
219
this . start = start ;
208
220
this . end = end ;
0 commit comments