nv-cli-ascii-extn-char

1.0.8 • Public • Published

nv-cli-ascii-extn-char

  • cli-tool
  • generate some one-line function FOR ascii extn-chars (128 - 255)
  • used for TEST nvlang DSL building tools
  • normally USESLESS

install

  • npm install nv-cli-ascii-extn-char -g

usage

        Usage: nv_cli_ascii_ctrl_char [options]
        Options:
            -o, --or                  or
            -b, --between             between from to
            -f, --is_func_name        is_func_name FOR or, DFLT is is_func
            -s, --slcted              slcted
            -c, --const               OUTPUT const ... = ...; FORMAT
            -?, --is_allike           ª À Á Â Ã Ä Å Æ à á â ã ä å æ
            -e, --is_elike            "È" "É" "Ê" "Ë" "è" "é" "ê" "ë"
            -O, --is_olike            "ö","õ","ô","ó","ò","Ö","Õ","Ô","Ó","Ò","ø","Ø","º","¤"
            -I, --is_ilike            "Ì","Í","Î","Ï","ì","í","î","ï"
            -u, --is_ulike            "ü","û","ú","ù","Ü","Û","Ú","Ù"
            -y, --is_ylike            "ÿ" ,"ý","Ý","¥"
            -B, --is_blk              « »
            -S, --is_sp               160(nbsp) AND 173(shy)
            -x, --is_slash_x          need to be stringify as \x??
            -n, --names               char names
            -M, --map                 MAPS
            -i, --is_api_names        is_api_names
            -h, --help                usage

example

alike

            nv-cli-ascii-extn-char# nv_cli_ascii_extn_char -a  -c

                    // 'ª' 'À' 'Á' 'Â' 'Ã' 'Ä' 'Å' 'Æ' 'à' 'á' 'â' 'ã' 'ä' 'å' 'æ'

                    const is_alike = (c)=>  (c===170) || (c>=192 && c<=198) || (c>=224 && c<=229) || (c===230);

elike

            nv-cli-ascii-extn-char# nv_cli_ascii_extn_char -e

            // "È" "É" "Ê" "Ë" "è" "é" "ê" "ë"

                module.exports = {
                    is_elike:(c)=>(c>=200 && c<=203) || (c>=232 && c<=235),
                }

ilike

        // "Ì","Í","Î","Ï","ì","í","î","ï"

            module.exports = {
                is_ilike:(c)=>(c>=204 && c<=207) || (c>=236 && c<=239),
            }

olike

            -O
            // "ö","õ","ô","ó","ò","Ö","Õ","Ô","Ó","Ò","ø","Ø","º","¤"

                module.exports = {
                    is_olike:(c)=>(c===164 || c===186 || c===216 || c===248) || (c>=210 && c<=214)  || (c>=242 && c<=246),
                }

ulike

            -u
            // "ü","û","ú","ù","Ü","Û","Ú","Ù"

                module.exports = {
                    is_ulike:(c)=>(c>=217 && c<=220) || (c>=249 && c<=252),
                }

ylike

            -y
            // "ÿ" ,"ý","Ý","¥"

                module.exports = {
                    is_ylike:(c)=>c===165 || c===221 || c===253 || c===255,
                }

           nv-cli-ascii-extn-char# nv_cli_ascii_extn_char -S

                    module.exports = {
                        is_nbsp : (c) => (c===160),
                        is_shy  : (c) => (c===173),
                        is_sp   : (c) => (c===160) || (c===173),
                    }

            nv-cli-ascii-extn-char# nv_cli_ascii_extn_char -B

                module.exports = {
                    is_laquo : (c) => (c===171),
                    is_raquo : (c) => (c===187),
                    is_quo   : (c) => is_laquo(c) || is_raquo(c),
                    /*--*/
                    get_quo_rb : (c) => is_laquo(c)?187:-1,
                    get_quo_lb : (c) => is_rqquo(c)?171:-1,
                }

        nv-cli-ascii-extn-char# nv_cli_ascii_extn_char -b -s 160 170  180 190 -c 
                const is_$nbsp_ordf$rtq_frac34 = (c) => (c>=160 && c<=170) || (c>=180 && c<=190);    

            nv-cli-ascii-extn-char----# nv_cli_ascii_extn_char -x -c
            //alias: is_$x80_x9f :
            const codify_to_slashx = (c) => '\\x' + c.toString(16);
            const is_slash_x = (c) => (c>=128 && c<=159);

            nv-cli-ascii-extn-char----# nv_cli_ascii_extn_char -x 
            //alias: is_$x80_x9f :
                codify_to_slashx : (c) => '\\x' + c.toString(16),
                is_slash_x : (c) => (c>=128 && c<=159),

       nv-cli-ascii-extn-char#nv_cli_ascii_extn_char  -o -s grave circ -c -f is_grave_or_circ

          const is_grave_or_circ = (c === 192) || (c === 200) || (c === 204) || (c === 210) || (c === 217) || (c === 224) || (c === 232) || (c === 236) || (c === 242) || (c === 249) || (c === 194) || (c === 202) || (c === 206) || (c === 212) || (c === 219) || (c === 226) || (c === 234) || (c === 238) || (c === 244) || (c === 251);

        nv-cli-ascii-extn-char# nv_cli_ascii_extn_char -s lower  

            module.exports = {
                is_lower_agrave : (c) => c===224 ,
                is_lower_aacute : (c) => c===225 ,
                is_lower_acirc  : (c) => c===226 ,
                is_lower_atilde : (c) => c===227 ,
                is_lower_auml   : (c) => c===228 ,
                is_lower_aring  : (c) => c===229 ,
                is_lower_aelig  : (c) => c===230 ,
                is_lower_ccedil : (c) => c===231 ,
                is_lower_egrave : (c) => c===232 ,
                is_lower_eacute : (c) => c===233 ,
                is_lower_ecirc  : (c) => c===234 ,
                is_lower_euml   : (c) => c===235 ,
                is_lower_igrave : (c) => c===236 ,
                is_lower_iacute : (c) => c===237 ,
                is_lower_icirc  : (c) => c===238 ,
                is_lower_iuml   : (c) => c===239 ,
                is_lower_eth    : (c) => c===240 ,
                is_lower_ntilde : (c) => c===241 ,
                is_lower_ograve : (c) => c===242 ,
                is_lower_oacute : (c) => c===243 ,
                is_lower_ocirc  : (c) => c===244 ,
                is_lower_otilde : (c) => c===245 ,
                is_lower_ouml   : (c) => c===246 ,
                is_lower_oslash : (c) => c===248 ,
                is_lower_ugrave : (c) => c===249 ,
                is_lower_uacute : (c) => c===250 ,
                is_lower_ucirc  : (c) => c===251 ,
                is_lower_uuml   : (c) => c===252 ,
                is_lower_yacute : (c) => c===253 ,
                is_lower_thorn  : (c) => c===254 ,
                is_lower_yuml   : (c) => c===255 ,
            }


        nv-cli-ascii-extn-char# nv_cli_ascii_extn_char -c -s lower 


            const is_lower_agrave = (c) => c===224 ;
            const is_lower_aacute = (c) => c===225 ;
            const is_lower_acirc  = (c) => c===226 ;
            const is_lower_atilde = (c) => c===227 ;
            const is_lower_auml   = (c) => c===228 ;
            const is_lower_aring  = (c) => c===229 ;
            const is_lower_aelig  = (c) => c===230 ;
            const is_lower_ccedil = (c) => c===231 ;
            const is_lower_egrave = (c) => c===232 ;
            const is_lower_eacute = (c) => c===233 ;
            const is_lower_ecirc  = (c) => c===234 ;
            const is_lower_euml   = (c) => c===235 ;
            const is_lower_igrave = (c) => c===236 ;
            const is_lower_iacute = (c) => c===237 ;
            const is_lower_icirc  = (c) => c===238 ;
            const is_lower_iuml   = (c) => c===239 ;
            const is_lower_eth    = (c) => c===240 ;
            const is_lower_ntilde = (c) => c===241 ;
            const is_lower_ograve = (c) => c===242 ;
            const is_lower_oacute = (c) => c===243 ;
            const is_lower_ocirc  = (c) => c===244 ;
            const is_lower_otilde = (c) => c===245 ;
            const is_lower_ouml   = (c) => c===246 ;
            const is_lower_oslash = (c) => c===248 ;
            const is_lower_ugrave = (c) => c===249 ;
            const is_lower_uacute = (c) => c===250 ;
            const is_lower_ucirc  = (c) => c===251 ;
            const is_lower_uuml   = (c) => c===252 ;
            const is_lower_yacute = (c) => c===253 ;
            const is_lower_thorn  = (c) => c===254 ;
            const is_lower_yuml   = (c) => c===255 ;

        nv-cli-ascii-extn-char# nv_cli_ascii_extn_char  -c

            const is_x80          = (c) => c===128 ;
            const is_x81          = (c) => c===129 ;
            const is_x82          = (c) => c===130 ;
            const is_x83          = (c) => c===131 ;
            const is_x84          = (c) => c===132 ;
            const is_x85          = (c) => c===133 ;
            const is_x86          = (c) => c===134 ;
            const is_x87          = (c) => c===135 ;
            const is_x88          = (c) => c===136 ;
            const is_x89          = (c) => c===137 ;
            const is_x8a          = (c) => c===138 ;
            const is_x8b          = (c) => c===139 ;
            const is_x8c          = (c) => c===140 ;
            const is_x8d          = (c) => c===141 ;
            const is_x8e          = (c) => c===142 ;
            const is_x8f          = (c) => c===143 ;
            const is_x90          = (c) => c===144 ;
            const is_x91          = (c) => c===145 ;
            const is_x92          = (c) => c===146 ;
            const is_x93          = (c) => c===147 ;
            const is_x94          = (c) => c===148 ;
            const is_x95          = (c) => c===149 ;
            const is_x96          = (c) => c===150 ;
            const is_x97          = (c) => c===151 ;
            const is_x98          = (c) => c===152 ;
            const is_x99          = (c) => c===153 ;
            const is_x9a          = (c) => c===154 ;
            const is_x9b          = (c) => c===155 ;
            const is_x9c          = (c) => c===156 ;
            const is_x9d          = (c) => c===157 ;
            const is_x9e          = (c) => c===158 ;
            const is_x9f          = (c) => c===159 ;
            const is_nbsp         = (c) => c===160 ;
            const is_iexcl        = (c) => c===161 ;
            const is_cent         = (c) => c===162 ;
            const is_pound        = (c) => c===163 ;
            const is_ufo          = (c) => c===164 ;
            const is_yuan         = (c) => c===165 ;
            const is_brvbar       = (c) => c===166 ;
            const is_sect         = (c) => c===167 ;
            const is_uml          = (c) => c===168 ;
            const is_upper_auml   = (c) => c===196 ;
            const is_upper_euml   = (c) => c===203 ;
            const is_upper_iuml   = (c) => c===207 ;
            const is_upper_ouml   = (c) => c===214 ;
            const is_upper_uuml   = (c) => c===220 ;
            const is_lower_auml   = (c) => c===228 ;
            const is_lower_euml   = (c) => c===235 ;
            const is_lower_iuml   = (c) => c===239 ;
            const is_lower_ouml   = (c) => c===246 ;
            const is_lower_uuml   = (c) => c===252 ;
            const is_lower_yuml   = (c) => c===255 ;
            const is_copy         = (c) => c===169 ;
            const is_ordf         = (c) => c===170 ;
            const is_laquo        = (c) => c===171 ;
            const is_not          = (c) => c===172 ;
            const is_shy          = (c) => c===173 ;
            const is_reg          = (c) => c===174 ;
            const is_macr         = (c) => c===175 ;
            const is_deg          = (c) => c===176 ;
            const is_plusmn       = (c) => c===177 ;
            const is_sup2         = (c) => c===178 ;
            const is_sup3         = (c) => c===179 ;
            const is_rtq          = (c) => c===180 ;
            const is_miu          = (c) => c===181 ;
            const is_para         = (c) => c===182 ;
            const is_dot          = (c) => c===183 ;
            const is_cedil        = (c) => c===184 ;
            const is_upper_ccedil = (c) => c===199 ;
            const is_lower_ccedil = (c) => c===231 ;
            const is_sup1         = (c) => c===185 ;
            const is_ordm         = (c) => c===186 ;
            const is_raquo        = (c) => c===187 ;
            const is_frac14       = (c) => c===188 ;
            const is_frac12       = (c) => c===189 ;
            const is_frac34       = (c) => c===190 ;
            const is_iquest       = (c) => c===191 ;
            const is_upper_agrave = (c) => c===192 ;
            const is_upper_aacute = (c) => c===193 ;
            const is_upper_acirc  = (c) => c===194 ;
            const is_upper_atilde = (c) => c===195 ;
            const is_upper_aring  = (c) => c===197 ;
            const is_upper_aelig  = (c) => c===198 ;
            const is_upper_egrave = (c) => c===200 ;
            const is_upper_eacute = (c) => c===201 ;
            const is_upper_ecirc  = (c) => c===202 ;
            const is_upper_igrave = (c) => c===204 ;
            const is_upper_acute  = (c) => c===205 ;
            const is_upper_icirc  = (c) => c===206 ;
            const is_upper_eth    = (c) => c===208 ;
            const is_upper_ntilde = (c) => c===209 ;
            const is_upper_ograve = (c) => c===210 ;
            const is_upper_oacute = (c) => c===211 ;
            const is_upper_ocirc  = (c) => c===212 ;
            const is_upper_otilde = (c) => c===213 ;
            const is_mul          = (c) => c===215 ;
            const is_upper_oslash = (c) => c===216 ;
            const is_upper_ugrave = (c) => c===217 ;
            const is_upper_uacute = (c) => c===218 ;
            const is_upper_ucirc  = (c) => c===219 ;
            const is_upper_yacute = (c) => c===221 ;
            const is_upper_thorn  = (c) => c===222 ;
            const is_szlig        = (c) => c===223 ;
            const is_lower_agrave = (c) => c===224 ;
            const is_lower_aacute = (c) => c===225 ;
            const is_lower_acirc  = (c) => c===226 ;
            const is_lower_atilde = (c) => c===227 ;
            const is_lower_aring  = (c) => c===229 ;
            const is_lower_aelig  = (c) => c===230 ;
            const is_lower_egrave = (c) => c===232 ;
            const is_lower_eacute = (c) => c===233 ;
            const is_lower_ecirc  = (c) => c===234 ;
            const is_lower_igrave = (c) => c===236 ;
            const is_lower_iacute = (c) => c===237 ;
            const is_lower_icirc  = (c) => c===238 ;
            const is_lower_eth    = (c) => c===240 ;
            const is_lower_ntilde = (c) => c===241 ;
            const is_lower_ograve = (c) => c===242 ;
            const is_lower_oacute = (c) => c===243 ;
            const is_lower_ocirc  = (c) => c===244 ;
            const is_lower_otilde = (c) => c===245 ;
            const is_div          = (c) => c===247 ;
            const is_lower_oslash = (c) => c===248 ;
            const is_lower_ugrave = (c) => c===249 ;
            const is_lower_uacute = (c) => c===250 ;
            const is_lower_ucirc  = (c) => c===251 ;
            const is_lower_yacute = (c) => c===253 ;
            const is_lower_thorn  = (c) => c===254 ;

LICENSE

  • ISC

Dependents (0)

Package Sidebar

Install

npm i nv-cli-ascii-extn-char

Weekly Downloads

0

Version

1.0.8

License

ISC

Unpacked Size

36.9 kB

Total Files

4

Last publish

Collaborators

  • ihgazni2