File tree Expand file tree Collapse file tree 2 files changed +1
-32
lines changed
Expand file tree Collapse file tree 2 files changed +1
-32
lines changed Original file line number Diff line number Diff line change 4747 "moment-timezone" : " ^0.5.14" ,
4848 "object-hash" : " ^1.2.0" ,
4949 "pad" : " ^2.0.3" ,
50- "parse-function" : " ^5.0.23 " ,
50+ "parse-function" : " ^5.1.1 " ,
5151 "regex-parser" : " ^2.2.8" ,
5252 "secure-filters" : " ^1.1.0" ,
5353 "sha.js" : " ^2.4.9" ,
Original file line number Diff line number Diff line change @@ -12,37 +12,6 @@ class TwingReflectionMethod {
1212
1313 let parser = parseFunction ( ) ;
1414
15- // until https://github.com/tunnckoCore/parse-function/issues/110 is fixed, we have to use this plugin to support instrumentation
16- parser . use ( ( app : any ) => {
17- return ( node : any , result : any ) => {
18- if ( node . type === 'FunctionExpression' ) {
19- let params = node . params ;
20-
21- for ( let param of params ) {
22- if ( param . type === 'AssignmentPattern' ) {
23- let right = param . right ;
24-
25- if ( right . type === 'SequenceExpression' ) {
26- let value : any ;
27- let lastExpression = right . expressions . pop ( ) ;
28-
29- if ( lastExpression . type === 'NullLiteral' ) {
30- value = null ;
31- }
32- else {
33- value = lastExpression . value ;
34- }
35-
36- result . defaults [ param . left . name ] = value ;
37- }
38- }
39- }
40- }
41-
42- return result ;
43- }
44- } ) ;
45-
4615 if ( typeof callable === 'string' ) {
4716 callable = Reflect . get ( global , callable as string ) ;
4817 }
You can’t perform that action at this time.
0 commit comments