11"use strict" ;
22Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
33var ExpressionUtils = ( function ( ) {
4- function ExpressionUtils ( _defaultColumnSeparator ) {
5- if ( _defaultColumnSeparator === void 0 ) { _defaultColumnSeparator = "_" ; }
6- this . _defaultColumnSeparator = _defaultColumnSeparator ;
4+ function ExpressionUtils ( _defaultSeparator ) {
5+ if ( _defaultSeparator === void 0 ) { _defaultSeparator = "_" ; }
6+ this . _defaultSeparator = _defaultSeparator ;
77 }
88 ExpressionUtils . prototype . getValueByExpression = function ( instance , expression ) {
99 return expression ( instance ) ;
@@ -22,11 +22,13 @@ var ExpressionUtils = (function () {
2222 }
2323 return void 0 ;
2424 } ;
25- ExpressionUtils . prototype . getColumnByExpression = function ( expression ) {
26- return this . getColumnByProperties ( this . getPropertiesByExpression ( expression ) ) ;
25+ ExpressionUtils . prototype . getColumnByExpression = function ( expression , separator ) {
26+ if ( separator === void 0 ) { separator = this . _defaultSeparator ; }
27+ return this . getColumnByProperties ( this . getPropertiesByExpression ( expression ) , separator ) ;
2728 } ;
28- ExpressionUtils . prototype . getColumnByProperties = function ( properties ) {
29- return properties . join ( this . _defaultColumnSeparator ) ;
29+ ExpressionUtils . prototype . getColumnByProperties = function ( properties , separator ) {
30+ if ( separator === void 0 ) { separator = this . _defaultSeparator ; }
31+ return properties . join ( separator ) ;
3032 } ;
3133 ExpressionUtils . prototype . getPropertiesByExpression = function ( expression ) {
3234 var strAfterReturn = expression . toString ( ) . split ( "return" ) [ 1 ] . trim ( ) ;
0 commit comments