@@ -4,39 +4,39 @@ Object.defineProperty(exports, "__esModule", {
44 value : ! 0
55} ) ;
66
7- var e = require ( "@lazy-cjk/fullhalf-char-code" ) , t = require ( "uni-string" ) , o = require ( "deepmerge" ) , r = require ( "@lazy-cjk/fullhalf-data" ) ;
7+ var e = require ( "@lazy-cjk/fullhalf-char-code" ) , t = require ( "uni-string" ) , o = require ( "deepmerge" ) , l = require ( "@lazy-cjk/fullhalf-data" ) ;
88
9- let l = {
9+ let r = {
1010 only : {
1111 number : ! 0
1212 }
1313} ;
1414
15- const n = factory ( e . toFullWidthCharCode , 1 , l ) , f = factory ( e . toHalfWidthCharCode , 0 , l ) ;
15+ const n = factory ( e . toFullWidthCharCode , 1 , r ) , f = factory ( e . toHalfWidthCharCode , 0 , r ) ;
1616
17- l = {
17+ r = {
1818 only : {
1919 eng : ! 0
2020 }
2121} ;
2222
23- const a = factory ( e . toFullWidthCharCode , 1 , l ) , i = factory ( e . toHalfWidthCharCode , 0 , l ) ;
23+ const a = factory ( e . toFullWidthCharCode , 1 , r ) , i = factory ( e . toHalfWidthCharCode , 0 , r ) ;
2424
25- l = {
25+ r = {
2626 only : {
2727 default : ! 0
2828 }
2929} ;
3030
31- const p = factory ( e . toFullWidthCharCode , 1 , l ) , u = factory ( e . toHalfWidthCharCode , 0 , l ) ;
31+ const u = factory ( e . toFullWidthCharCode , 1 , r ) , p = factory ( e . toHalfWidthCharCode , 0 , r ) ;
3232
3333function _optionsType ( e ) {
3434 if ( e ) if ( "boolean" == typeof e . exists ) {
35- for ( let t in r . tableFullHalf [ 0 ] ) 0 != t . indexOf ( "default" ) && ! 1 !== e [ t ] && ( e [ t ] = e . exists ) ;
35+ for ( let t in l . tableFullHalf [ 0 ] ) 0 != t . indexOf ( "default" ) && ! 1 !== e [ t ] && ( e [ t ] = e . exists ) ;
3636 delete e . exists ;
3737 } else {
3838 if ( "boolean" == typeof e . default ) {
39- for ( let t of r . tableFullHalfDefaultInclude ) ! 1 !== e [ t ] && ( e [ t ] = e . default ) ;
39+ for ( let t of l . tableFullHalfDefaultInclude ) ! 1 !== e [ t ] && ( e [ t ] = e . default ) ;
4040 delete e . default ;
4141 }
4242 "boolean" == typeof e . not_default2 && ( e . both = e . space = e . not_default2 , delete e . not_default2 ) ,
@@ -52,47 +52,57 @@ function _chkType(e, t) {
5252}
5353
5454function chkType ( e , t , o ) {
55- let l = r . tableFullHalf [ o ] [ t ] ;
56- if ( Array . isArray ( l . not ) && l . not . length ) for ( let t of l . not ) if ( _chkType ( e , t ) ) return ! 1 ;
57- if ( _chkType ( e , l ) ) return ! 0 ;
55+ let r = l . tableFullHalf [ o ] [ t ] ;
56+ if ( Array . isArray ( r . not ) && r . not . length ) for ( let t of r . not ) if ( _chkType ( e , t ) ) return ! 1 ;
57+ if ( _chkType ( e , r ) ) return ! 0 ;
5858}
5959
60- function process ( e , o , r ) {
61- let l = [ ] ;
62- r . skip = _optionsType ( r . skip ) , r . only = _optionsType ( r . only ) ;
60+ function process ( e , o , l ) {
61+ let r = [ ] ;
62+ l . skip = _optionsType ( l . skip ) , l . only = _optionsType ( l . only ) ;
6363 let n = Array . isArray ( e ) ? e : new t ( e ) ;
6464 for ( let e of n ) {
6565 let t , n = "number" == typeof e ? e : e . codePointAt ( ) ;
66- if ( r . only ) {
66+ if ( l . only ) {
6767 t = ! 0 ;
68- for ( let e in r . only ) if ( r . only [ e ] && chkType ( n , e , r . type ) ) {
68+ for ( let e in l . only ) if ( l . only [ e ] && chkType ( n , e , l . type ) ) {
6969 t = ! 1 ;
7070 break ;
7171 }
7272 }
73- if ( ! t && r . skip ) for ( let e in r . skip ) if ( r . skip [ e ] && chkType ( n , e , r . type ) ) {
73+ if ( ! t && l . skip ) for ( let e in l . skip ) if ( l . skip [ e ] && chkType ( n , e , l . type ) ) {
7474 t = ! 0 ;
7575 break ;
7676 }
77- l . push ( t ? n : o ( n ) ) ;
77+ r . push ( t ? n : o ( n ) ) ;
7878 }
79- return r . returnType ? l : String . fromCodePoint . apply ( String , l ) ;
79+ return l . returnType ? r : String . fromCodePoint . apply ( String , r ) ;
8080}
8181
82- function factory ( e , t , r ) {
83- return ( l , n ) => ( n = o . all ( [ { } , n || { } , r || { } , {
82+ function factory ( e , t , l ) {
83+ return ( r , n ) => ( n = o . all ( [ { } , n || { } , l || { } , {
8484 type : t
85- } ] ) , process ( l , e , n ) ) ;
85+ } ] ) , process ( r , e , n ) ) ;
8686}
8787
88+ var s = {
89+ toFullNumber : n ,
90+ toHalfNumber : f ,
91+ toFullEnglish : a ,
92+ toHalfEnglish : i ,
93+ toFullWidth : u ,
94+ toHalfWidth : p
95+ } ;
96+
8897exports . _chkType = _chkType , exports . _filterTable = function _filterTable ( e ) {
8998 let t = [ ] ;
9099 if ( e . from && e . to ) for ( let o = e . from ; o <= e . to ; o ++ ) t . push ( o ) ;
91100 return e . values && ( t = t . concat ( e . values ) ) , Array . isArray ( e . not ) && e . not . length && ( t = t . filter ( ( function ( t ) {
92101 for ( let o of e . not ) if ( _chkType ( t , o ) ) return ! 1 ;
93102 return ! 0 ;
94103 } ) ) ) , t ;
95- } , exports . _optionsType = _optionsType , exports . chkType = chkType , exports . factory = factory ,
96- exports . process = process , exports . toFullEnglish = a , exports . toFullNumber = n ,
97- exports . toFullWidth = p , exports . toHalfEnglish = i , exports . toHalfNumber = f , exports . toHalfWidth = u ;
104+ } , exports . _optionsType = _optionsType , exports . chkType = chkType , exports . default = s ,
105+ exports . factory = factory , exports . process = process , exports . toFullEnglish = a ,
106+ exports . toFullNumber = n , exports . toFullWidth = u , exports . toHalfEnglish = i , exports . toHalfNumber = f ,
107+ exports . toHalfWidth = p ;
98108//# sourceMappingURL=index.cjs.production.min.cjs.map
0 commit comments