@@ -26,7 +26,7 @@ module.exports = class Notation {
2626 return this . config . conjunction ;
2727 }
2828 get ( query ) {
29- let q = Number ( query ) . toString ( ) , t = 0 ;
29+ let q = Math . floor ( Number ( query . replace ( / , \s ? / g , "" ) ) ) . toString ( ) , t = 0 ;
3030 if ( isNaN ( q ) ) {
3131 q = this . getUni ( query ) , t = 1 ;
3232 if ( q < 1 || isNaN ( q ) ) return false ;
@@ -35,12 +35,12 @@ module.exports = class Notation {
3535 }
3636 getUni ( query ) {
3737 let n = query . toString ( ) . split ( '' ) . map ( k => {
38- if ( this . config . digit . indexOf ( k ) >= 0 ) return this . config . digit . indexOf ( k ) ;
38+ return ( this . config . digit . indexOf ( k ) >= 0 ) ? this . config . digit . indexOf ( k ) : k ;
3939 } ) . filter ( function ( e ) { return e == 0 || e } ) . join ( '' ) ;
40- return Number ( n ) . toString ( ) ;
40+ return Math . floor ( Number ( n . replace ( / , \s ? / g , "" ) ) ) . toString ( ) ;
4141 }
4242 getResult ( q , t ) {
43- let n = this . requestFormat ( q ) ; // m = this.requestDigit(n);
43+ let n = this . requestFormat ( q ) ;
4444 return {
4545 Numeric :( t ) ?n :this . requestDigit ( n ) ,
4646 Notation :this . config . task . map ( k => {
@@ -54,7 +54,7 @@ module.exports = class Notation {
5454 this . config . task = [ ] ;
5555 return {
5656 // "sense":this.requestCreakyTone(q)
57- "sense" :this . requestNormalTone ( q )
57+ "sense" :this . requestWrittenTone ( q )
5858 }
5959 }
6060 return false ;
@@ -82,7 +82,7 @@ module.exports = class Notation {
8282 // prime, base, baseName, rest, restName, tail, tailName
8383 rawSense . push ( this . requestPrime ( rulePrime , s ) + this . requestCreakyTone ( q , 0 , ruleExtract ) ) ;
8484 rawSense . push ( this . requestCreakyTone ( q , rulePrime , s + 1 ) ) ;
85- rawSense . push ( this . requestNormalTone ( q , s + 1 , q . length ) ) ;
85+ rawSense . push ( this . requestWrittenTone ( q , s + 1 , q . length ) ) ;
8686 examNotation = {
8787 1 :21
8888 } ;
@@ -96,11 +96,8 @@ module.exports = class Notation {
9696 rawSense . push ( this . requestPrime ( rulePrime , s , true ) + this . requestCreakyTone ( q , 0 , ruleExtract ) ) ;
9797 rawSense . push ( this . requestCreakyTone ( q , ruleExtract , q . length ) ) ;
9898
99- examNotation = {
100- 1 :22
101- } ;
99+ examNotation = { 1 :22 } ;
102100 }
103-
104101 } else {
105102 if ( s == rawEndCount ) {
106103 ruleExtract = rawCount ;
@@ -111,10 +108,7 @@ module.exports = class Notation {
111108
112109 rawSense . push ( this . requestPrime ( rulePrime , s ) + this . requestCreakyTone ( q , 0 , ruleExtract ) + rawOver ) ;
113110
114- examNotation = {
115- test :'??' ,
116- 1 :31
117- } ;
111+ examNotation = { 1 :31 } ;
118112 } else {
119113 let abc = false ;
120114 ruleExtract = rawCount - 1 + rawEndCount ;
@@ -169,7 +163,7 @@ module.exports = class Notation {
169163 return k . name + k . tone ;
170164 } ) . join ( '' )
171165 }
172- requestNormalTone ( num , from , to ) {
166+ requestWrittenTone ( num , from , to ) {
173167 let str = this . strIntersect ( num , from , to ) ;
174168 return this . requestObject ( str , ( position , next , tone ) => {
175169 return tone ;
@@ -217,7 +211,6 @@ module.exports = class Notation {
217211 return e ;
218212 }
219213 strIntersect ( str , from , to ) {
220- // str.toString()
221214 if ( to ) {
222215 return str . substring ( from , to ) . split ( '' ) ;
223216 } else {
0 commit comments