Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

skava / exotic   js

Repository URL to install this package:

Version: 2.0.8 

/ src / types / NATIVE / CONSTANTS / NATIVE_SIZES.ts

export const freeze = Object.freeze

/**
 * @desc Used as the size to enable large array optimizations.
 * @name LARGE_ARRAY_SIZE
 * @since 5.0.0-beta.6
 * @type {number}
 * @see array/preAllocate
 */
export const LARGE_ARRAY_SIZE = 200

/**
 * @desc 2^32
 * @name MAX_32_BIT
 * @type {number}
 * @example `Math.pow(2, 32)`
 * @NOTE this is -1
 */
export const MAX_32_BIT = 4294967295

/**
 * @desc Used as references for the maximum length and index of an array.
 * @name MAX_ARRAY_LENGTH
 * @type {number}
 */
export const MAX_ARRAY_LENGTH = 4294967295

/**
 * @desc Used as references for the maximum length and index of an array.
 * @type {number}
 * @name MAX_ARRAY_INDEX
 * @see native/MAX_ARRAY_LENGTH
 */
export const MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1

/**
 * @desc Used as references for the maximum length and index of an array.
 * @type {number}
 * @name MAX_INTEGER
 * @see cast/toFinite
 */
export const MAX_INTEGER = 1.7976931348623157e308

/**
 * @name MAX_SAFE_INTEGER
 * @desc Used as references for various `Number` constants.
 * @type {number}
 *
 * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER mozilla-numbermaxsafeinteger}
 * @see {@link mozilla-numbermaxsafeinteger}
 * @see cast/toNumber
 *
 * @example `Math.pow(2, 53) + 1`
 */
export const MAX_SAFE_INTEGER = 9007199254740991

/**
 * @name MAX_SPLICE_SIZE
 * {@link https://github.com/mobxjs/mobx/blob/master/src/types/observablearray.ts#L10 mobx-max-splice-size}
 * @see {@link mobx-max-splice-size}
 */
export const MAX_SPLICE_SIZE = 10000

/**
 * @see http://www.ecma-international.org/ecma-262/5.1/
 * @type {Object}
 */
export const ECMA_SIZES = freeze({
  _STRING: 2,
  _BOOLEAN: 4,
  _NUMBER: 8,
  _NULL: 4,
  _UNDEFINED: 9,
  _FUNCTION: 1,
  _DATE: 1, // string
})

// -------- charcodes ---------

/**
 * 1114111
 * @type {Number}
 */
export const MAX_UTF16_CHARCODE = 0x10ffff
export const MAX_UPPERCASE_CHARCODE = 90
export const MIN_UPPERCASE_CHARCODE = 65
export const MAX_LOWERCASE_CHARCODE = 122
export const MIN_LOWERCASE_CHARCODE = 97

/**
 * @example 97-122
 * @type {String}
 */
export const LOWERCASE_LETTERS = 'abcdefghijklmnopqrstuvwxyz'

/**
 * @example65-90
 * @type {String}
 */
export const UPPERCASE_LETTERS = LOWERCASE_LETTERS.toUpperCase()

/**
 * Used as references for various `Number` constants.
 * @name INFINITY
 * @type {number}
 */
export const INFINITY = 1 / 0