@@ -78,8 +78,8 @@ const Utils = Object.assign({}, require('./base/_utils'), {
7878 total += variation
7979 ? variation . percentage_allocation
8080 : typeof v . default_percentage_allocation === 'number'
81- ? v . default_percentage_allocation
82- : ( v as any ) . percentage_allocation
81+ ? v . default_percentage_allocation
82+ : ( v as any ) . percentage_allocation
8383 return null
8484 } )
8585 return 100 - total
@@ -190,10 +190,10 @@ const Utils = Object.assign({}, require('./base/_utils'), {
190190 ) {
191191 const findAppended = `${ value } ` . includes ( ':' )
192192 ? ( conditions || [ ] ) . find ( ( v ) => {
193- const split = value . split ( ':' )
194- const targetKey = `:${ split [ split . length - 1 ] } `
195- return v . value === operator + targetKey
196- } )
193+ const split = value . split ( ':' )
194+ const targetKey = `:${ split [ split . length - 1 ] } `
195+ return v . value === operator + targetKey
196+ } )
197197 : false
198198 if ( findAppended ) return findAppended
199199
@@ -678,6 +678,12 @@ const Utils = Object.assign({}, require('./base/_utils'), {
678678 return true
679679 }
680680 } ,
681+
682+ toKebabCase : ( string : string ) => string
683+ . replace ( / ( [ a - z ] ) ( [ A - Z ] ) / g, "$1-$2" )
684+ . replace ( / [ \s _ ] + / g, '-' )
685+ . toLowerCase ( ) ,
686+
681687 validateRule ( rule : SegmentCondition ) {
682688 if ( ! rule ) return false
683689 if ( rule . delete ) {
0 commit comments