33Object . defineProperty ( exports , "__esModule" , {
44 value : true
55} ) ;
6+ exports . PathSegment = exports . Path = exports . UnboundRelationship = exports . Relationship = exports . Node = undefined ;
67
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" ) ;
89
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 } ; }
1025
1126/**
1227 * Copyright (c) 2002-2016 "Neo Technology,"
@@ -38,34 +53,33 @@ var Node = function () {
3853 * @param {Object } properties - Map with node properties
3954 */
4055 function Node ( identity , labels , properties ) {
41- _classCallCheck ( this , Node ) ;
56+ ( 0 , _classCallCheck3 . default ) ( this , Node ) ;
4257
4358 this . identity = identity ;
4459 this . labels = labels ;
4560 this . properties = properties ;
4661 }
4762
48- _createClass ( Node , [ {
63+ ( 0 , _createClass3 . default ) ( Node , [ {
4964 key : "toString" ,
5065 value : function toString ( ) {
5166 var s = "(" + this . identity ;
5267 for ( var i = 0 ; i < this . labels . length ; i ++ ) {
5368 s += ":" + this . labels [ i ] ;
5469 }
55- var keys = Object . keys ( this . properties ) ;
70+ var keys = ( 0 , _keys2 . default ) ( this . properties ) ;
5671 if ( keys . length > 0 ) {
5772 s += " {" ;
5873 for ( var _i = 0 ; _i < keys . length ; _i ++ ) {
5974 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 ] ] ) ;
6176 }
6277 s += "}" ;
6378 }
6479 s += ")" ;
6580 return s ;
6681 }
6782 } ] ) ;
68-
6983 return Node ;
7084} ( ) ;
7185
@@ -84,7 +98,7 @@ var Relationship = function () {
8498 * @param {Object } properties - Map with relationship properties
8599 */
86100 function Relationship ( identity , start , end , type , properties ) {
87- _classCallCheck ( this , Relationship ) ;
101+ ( 0 , _classCallCheck3 . default ) ( this , Relationship ) ;
88102
89103 this . identity = identity ;
90104 this . start = start ;
@@ -93,24 +107,23 @@ var Relationship = function () {
93107 this . properties = properties ;
94108 }
95109
96- _createClass ( Relationship , [ {
110+ ( 0 , _createClass3 . default ) ( Relationship , [ {
97111 key : "toString" ,
98112 value : function toString ( ) {
99113 var s = "(" + this . start + ")-[:" + this . type ;
100- var keys = Object . keys ( this . properties ) ;
114+ var keys = ( 0 , _keys2 . default ) ( this . properties ) ;
101115 if ( keys . length > 0 ) {
102116 s += " {" ;
103117 for ( var i = 0 ; i < keys . length ; i ++ ) {
104118 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 ] ] ) ;
106120 }
107121 s += "}" ;
108122 }
109123 s += "]->(" + this . end + ")" ;
110124 return s ;
111125 }
112126 } ] ) ;
113-
114127 return Relationship ;
115128} ( ) ;
116129
@@ -128,7 +141,7 @@ var UnboundRelationship = function () {
128141 * @param {Object } properties - Map with relationship properties
129142 */
130143 function UnboundRelationship ( identity , type , properties ) {
131- _classCallCheck ( this , UnboundRelationship ) ;
144+ ( 0 , _classCallCheck3 . default ) ( this , UnboundRelationship ) ;
132145
133146 this . identity = identity ;
134147 this . type = type ;
@@ -143,7 +156,7 @@ var UnboundRelationship = function () {
143156 */
144157
145158
146- _createClass ( UnboundRelationship , [ {
159+ ( 0 , _createClass3 . default ) ( UnboundRelationship , [ {
147160 key : "bind" ,
148161 value : function bind ( start , end ) {
149162 return new Relationship ( this . identity , start , end , this . type , this . properties ) ;
@@ -152,20 +165,19 @@ var UnboundRelationship = function () {
152165 key : "toString" ,
153166 value : function toString ( ) {
154167 var s = "-[:" + this . type ;
155- var keys = Object . keys ( this . properties ) ;
168+ var keys = ( 0 , _keys2 . default ) ( this . properties ) ;
156169 if ( keys . length > 0 ) {
157170 s += " {" ;
158171 for ( var i = 0 ; i < keys . length ; i ++ ) {
159172 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 ] ] ) ;
161174 }
162175 s += "}" ;
163176 }
164177 s += "]->" ;
165178 return s ;
166179 }
167180 } ] ) ;
168-
169181 return UnboundRelationship ;
170182} ( ) ;
171183
@@ -182,7 +194,7 @@ var PathSegment =
182194 * @param {string } end - Identity of end Node
183195 */
184196function PathSegment ( start , rel , end ) {
185- _classCallCheck ( this , PathSegment ) ;
197+ ( 0 , _classCallCheck3 . default ) ( this , PathSegment ) ;
186198
187199 this . start = start ;
188200 this . relationship = rel ;
@@ -202,7 +214,7 @@ var Path =
202214 * @param {Array } segments - Array of Segments
203215 */
204216function Path ( start , end , segments ) {
205- _classCallCheck ( this , Path ) ;
217+ ( 0 , _classCallCheck3 . default ) ( this , Path ) ;
206218
207219 this . start = start ;
208220 this . end = end ;
0 commit comments