Namespace: CB_baseSymbols

CB_baseSymbols

Object that contains different properties and methods that can be used as the "baseSymbols" parameter for the CB_intToBase and CB_baseToInt functions. Each property is a numeric array of characters.

Source:

Members


<static> 10 :array

Numeric array of characters with 10 symbols (using 0 to 9), decimal system. These symbols will not be encoded neither by the escape function nor by the encodeURIComponent function (recommended for URI components for any client, JavaScript strings or HTML code). Includes all symbols from lower bases, respecting the same order (which is their value).

Type:
  • array
Default Value:
  • ["0","1","2","3","4","5","6","7","8","9"]
Source:

<static> 128 :array

Numeric array of characters with 128 symbols. These symbols (and also the ones from other bases with higher number) will be encoded by the escape function and also by the encodeURIComponent function and they will need to be encoded in HTML (not recommended for URI components or JavaScript strings or HTML code).

Type:
  • array
Default Value:
  • An array with each item being the result of calling the String.fromCharCode function from 0 to 127 as its unique parameter.
Source:

<static> 16 :array

Numeric array of characters with 16 symbols (using 0 to 9, A to F), hexadecimal system. These symbols will not be encoded neither by the escape function nor by the encodeURIComponent function (recommended for URI components for any client, JavaScript strings or HTML code). Includes all symbols from lower bases, respecting the same order (which is their value).

Type:
  • array
Default Value:
  • ["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"]
Source:

<static> 2 :array

Numeric array of characters with 2 symbols (using 0 and 1), binary system. These symbols will not be encoded neither by the escape function nor by the encodeURIComponent function (recommended for URI components for any client, JavaScript strings or HTML code).

Type:
  • array
Default Value:
  • ["0","1"]
Source:

<static> 64 :array

Numeric array of characters with 64 symbols (using 0 to 9, A to Z, a to z, "." and "*"). These symbols will not be encoded neither by the escape function nor by the encodeURIComponent function (recommended for URI components for any client, JavaScript strings or HTML code in the case that we do not want to use base 66 from the CB_baseSymbols.66 property). Includes all symbols from lower bases, respecting the same order (which is their value).

Type:
  • array
Default Value:
  • ["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z",".","*"]
Source:

<static> 66 :array

Numeric array of characters with 66 symbols. These symbols will not be encoded neither by the escape function nor by the encodeURIComponent function (recommended for URI components for any client, JavaScript strings or HTML code). Includes Includes all symbols from lower bases, respecting the same order (which is their value).

Type:
  • array
Default Value:
  • ["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z",".","*","-","_"]
Source:

<static> 71 :array

Numeric array of characters with 71 symbols. These symbols will be encoded by the escape function but not by the encodeURIComponent function (not recommended for URI components in old clients, but useful for URI components in new clients with encodeURIComponent function support, for JavaScript strings or HTML code). Includes all symbols from lower bases, respecting the same order (which is their value).

Type:
  • array
Default Value:
  • ["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z",".","*","-","_","~","!","'","(",")"]
Source:

<static> 8 :array

Numeric array of characters with 8 symbols (using 0 to 7), octal system. These symbols will not be encoded neither by the escape function nor by the encodeURIComponent function (recommended for URI components for any client, JavaScript strings or HTML code). Includes all symbols from lower bases, respecting the same order (which is their value).

Type:
  • array
Default Value:
  • ["0","1","2","3","4","5","6","7"]
Source:

<static> 87 :array

Numeric array of characters with 87 symbols. These symbols will be encoded by the escape function and also by the encodeURIComponent function but they will not need to be encoded neither in JavaScript strings nor in HTML (not recommended for URI components, but useful for JavaScript strings or HTML code). Includes all symbols from lower bases, respecting the same order (which is their value).

Type:
  • array
Default Value:
  • ["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z",".","*","-","_","~","!","'","(",")","@","/","|","[","]","{","}","$","%","=","?","^",":",";",",","+"]
Source:

<static> 88 :array

Numeric array of characters with 88 symbols. These symbols will be encoded by the escape function and also by the encodeURIComponent function, but they will not need to be encoded in HTML (not recommended for URI components or JavaScript strings, but useful for HTML code).

Type:
  • array
Default Value:
  • ["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z",".","~","!","'","(",")","*","-","_","@","\\","/","|","[","]","{","}","$","%","=","?","^",":",";",",","+"]
Source:

<static> _10

Alias for CB_baseSymbols.10.

Source:
See:

<static> _128

Alias for CB_baseSymbols.128.

Source:
See:

<static> _16

Alias for CB_baseSymbols.16.

Source:
See:

<static> _64

Alias for CB_baseSymbols.64.

Source:
See:

<static> _66

Alias for CB_baseSymbols.66.

Source:
See:

<static> _71

Alias for CB_baseSymbols.71.

Source:
See:

<static> _8

Alias for CB_baseSymbols.8.

Source:
See:

<static> _8

Alias for CB_baseSymbols.2.

Source:
See:

<static> _87

Alias for CB_baseSymbols.87.

Source:
See:

<static> _88

Alias for CB_baseSymbols.88.

Source:
See:

Methods


<static> get( [base]) → {array}

Function that will return a numeric array of characters containing as many items as the desired base. Uses a cache internally.

Parameters:
Name Type Argument Default Description
base integer <optional>
256

The desired base (number of items, each with a character, that the returning array will contain). Minimum value is 1. The maximum can differ one client to another but it is not recommended to exceed 4096 (or even lower, depending on the client, although some clients could support up to 63988 or even more). All arrays of bases lower than 87 use the symbols included also in base 87.

Source:
Returns:

Returns a numeric array of characters containing as many items as the desired base. All arrays of bases lower than 87 use the symbols included also in base 87. When the base is greater than 87 and it is not not created by default (88 and 128), each item of the returning array will be the result of calling the String.fromCharCode function from 0 to one number less than the desired base number.

Type
array