# API Reference Overview

# Type aliases

# CellDependency

Ƭ CellDependency: SimpleCellAddress | AbsoluteCellRange | NamedExpressionDependency

Defined in src/CellDependency.ts:10 (opens new window)


# CellValue

Ƭ CellValue: NoErrorCellValue | DetailedCellError

Defined in src/CellValue.ts:9 (opens new window)


# CellValueDetailedType

Ƭ CellValueDetailedType: CellValueNoNumber | NumberType

Defined in src/Cell.ts:94 (opens new window)


# CellValueType

Ƭ CellValueType: CellValueNoNumber | CellValueJustNumber

Defined in src/Cell.ts:91 (opens new window)


# ChangeList

Ƭ ChangeList: CellValueChange[]

Defined in src/ContentChanges.ts:20 (opens new window)


# ClipboardCell

Ƭ ClipboardCell: ClipboardCellValue | ClipboardCellFormula | ClipboardCellEmpty | ClipboardCellParsingError

Defined in src/ClipboardOperations.ts:16 (opens new window)


# ColumnMap

Ƭ ColumnMap: Map‹RawInterpreterValue, ValueIndex

Defined in src/Lookup/ColumnIndex.ts:30 (opens new window)


# ColumnRowIndex

Ƭ ColumnRowIndex: [number, number]

Defined in src/CrudOperations.ts:65 (opens new window)


# ConfigParamsList

Ƭ ConfigParamsList: keyof ConfigParams

Defined in src/ConfigParams.ts:450 (opens new window)


# ConsoleMessages

Ƭ ConsoleMessages: object

Defined in src/helpers/licenseKeyValidator.ts:25 (opens new window)

# Type declaration:


# DateTime

Ƭ DateTime: SimpleTime | SimpleDate | SimpleDateTime

Defined in src/DateTimeHelper.ts:31 (opens new window)


# Dependencies

Ƭ Dependencies: Map‹Vertex, CellDependency[]›

Defined in src/GraphBuilder.ts:25 (opens new window)


# EngineState

Ƭ EngineState: object

Defined in src/BuildEngineFactory.ts:35 (opens new window)

# Type declaration:


# ExportedChange

Ƭ ExportedChange: ExportedCellChange | ExportedNamedExpressionChange

Defined in src/Exporter.ts:18 (opens new window)


# LicenseKeyFormat

Ƭ LicenseKeyFormat: "entitlement" | "legacy" | "non-commercial-and-evaluation" | "gpl-v3" | "unknown"

Defined in src/license/vendor/detectFormat.ts:14 (opens new window)

The name of each license key format detectLicenseKeyFormat can answer with.


# LicenseKeyInvalidState

Ƭ LicenseKeyInvalidState: Exclude‹LicenseKeyValidityState, VALID

Defined in src/helpers/licenseKeyValidator.ts:19 (opens new window)


# Maybe

Ƭ Maybe: T | undefined

Defined in src/Maybe.ts:6 (opens new window)

license Copyright (c) 2025 Handsoncode. All rights reserved.


# MessageDescriptor

Ƭ MessageDescriptor: object

Defined in src/helpers/licenseKeyValidator.ts:29 (opens new window)

# Type declaration:


# NamedExpressionOptions

Ƭ NamedExpressionOptions: Record‹string, string | number | boolean›

Defined in src/NamedExpressions.ts:22 (opens new window)


# NoErrorCellValue

Ƭ NoErrorCellValue: number | string | boolean | null

Defined in src/CellValue.ts:8 (opens new window)


# RawCellContent

Ƭ RawCellContent: Date | string | number | boolean | null | undefined

Defined in src/CellContentParser.ts:25 (opens new window)


# Sheet

Ƭ Sheet: RawCellContent[][]

Defined in src/Sheet.ts:12 (opens new window)

Two-dimenstional array representation of sheet


# SheetDimensions

Ƭ SheetDimensions: object

Defined in src/Sheet.ts:19 (opens new window)

Represents size of a sheet

# Type declaration:

  • height: number

  • width: number


# SheetIndex

Ƭ SheetIndex: ColumnMap[]

Defined in src/Lookup/ColumnIndex.ts:37 (opens new window)


# Sheets

Ƭ Sheets: Record‹string, Sheet

Defined in src/Sheet.ts:14 (opens new window)


# SimpleDateTime

Ƭ SimpleDateTime: SimpleDate & SimpleTime

Defined in src/DateTimeHelper.ts:29 (opens new window)


# Span

Ƭ Span: RowsSpan | ColumnsSpan

Defined in src/Span.ts:6 (opens new window)

license Copyright (c) 2025 Handsoncode. All rights reserved.


# TranslatableErrorType

Ƭ TranslatableErrorType: Exclude‹ErrorType, LIC

Defined in src/Cell.ts:51 (opens new window)

# Variables

# ALL_FEATURE_TOKENS Const

ALL_FEATURE_TOKENS: string[] = [ CRUD_FEATURE_TOKEN, UNDO_REDO_FEATURE_TOKEN, CLIPBOARD_FEATURE_TOKEN, NAMED_EXPRESSIONS_FEATURE_TOKEN, BATCHING_FEATURE_TOKEN, ]

Defined in src/license/capabilities.ts:34 (opens new window)

Every feature token, in one list, for the opt-in rule in licenseTermsOf: a key naming no feat:* token at all is granted all of these, because no key vocabulary in circulation can express "no features" — see that function for the reasoning.


# BASE64_ALPHABET Const

BASE64_ALPHABET: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"

Defined in src/license/vendor/utils.ts:17 (opens new window)

The base64 alphabet.


# BATCHING_FEATURE_TOKEN Const

BATCHING_FEATURE_TOKEN: "feat:batching" = "feat:batching"

Defined in src/license/capabilities.ts:27 (opens new window)

Grants FeatureId.Batching.


# CALCULATED_FIELDS_FUNCTIONS Const

CALCULATED_FIELDS_FUNCTIONS: string[] = gatableMembersOfGroups(CALCULATED_FIELDS_GROUPS)

Defined in src/license/capabilities.ts:216 (opens new window)

Added by the calculated-fields package, on top of MATH_ENGINE_FUNCTIONS.


# CALCULATED_FIELDS_GROUPS Const

CALCULATED_FIELDS_GROUPS: string[] = ['fun:time.b', 'fun:text.b', 'fun:logic.b', 'fun:math.b', 'fun:stat.b']

Defined in src/license/capabilities.ts:181 (opens new window)


# CAPABILITY_TABLE Const

CAPABILITY_TABLE: ReadonlyMap‹string, CapabilityGrant = new Map([ [CORE_TOKEN, coreGrant], [FUNCTIONS_1_TOKEN, functions1Grant], [FUNCTIONS_2_TOKEN, functions2Grant], [FUNCTIONS_3_TOKEN, functions3Grant], [FUNCTIONS_4_TOKEN, functions4Grant], [CRUD_FEATURE_TOKEN, {functions: [], features: [FeatureId.Crud]}], [UNDO_REDO_FEATURE_TOKEN, {functions: [], features: [FeatureId.UndoRedo]}], [CLIPBOARD_FEATURE_TOKEN, {functions: [], features: [FeatureId.Clipboard]}], [NAMED_EXPRESSIONS_FEATURE_TOKEN, {functions: [], features: [FeatureId.NamedExpressions]}], [BATCHING_FEATURE_TOKEN, {functions: [], features: [FeatureId.Batching]}], [SPREADSHEET_ADDON_TOKEN, { functions: [], features: [FeatureId.Crud, FeatureId.UndoRedo, FeatureId.Clipboard, FeatureId.Batching], }], [IMPORT_EXPORT_ADDON_TOKEN, {functions: [], features: [FeatureId.ImportExport]}], [FUN_ALL_TOKEN, {functions: [...functions4Grant.functions], features: []}], ...groupEntries, ...singleFunctionEntries, ])

Defined in src/license/capabilities.ts:351 (opens new window)

The production capability table, keyed by NORMALIZED token spelling — look up through normalizeCapabilityToken, never with a raw key string.

The engine understands BOTH token dialects in circulation, resolved from the one group registry above so they cannot drift apart:

  • the key spec's package slices (functions_1..4) plus the two add-on tokens — the vocabulary the upstream generator's own schema mints today;
  • the packaging doc's group vocabulary (fun:all, fun:<family>.<A|B|C>, fun:<CANONICAL_FUNCTION_NAME>) — §6 of the 12.08 packaging doc.

Accepting the superset is deliberate and spec-clean: an unrecognized token is defined as "a grant this version does not implement" (strict-shape/lenient-vocabulary, T7), so implementing more tokens than the generator currently mints breaks nothing — and it makes the engine robust to the still-open business decision about which dialect keys will finally be worded in (owner's call, 20.08). A key's function set is the UNION of everything recognized.

The grants are stored FULLY EXPANDED rather than chained through implies: the packaging design states the enforcement layer must not assume a hierarchy between tokens, and that the commercial nesting is expressed by a bigger licence simply listing more functions. The cumulative spreads above keep the source DRY without putting that hierarchy into the runtime.

Every grant is STATIC. Nothing here is derived from the function registry at run time, so a function registered by a user through HyperFormula.registerFunctionPlugin can never appear in a package and can never be gated — see EXCEL_SIMULATOR_FUNCTIONS. The cost is that a newly implemented built-in is ungated until it is added here, which the completeness invariant in unit/license/capability-registry.spec.ts fails on.

The five feat:* tokens carry the gated API areas, one feature each, spelled after the draft vocabulary in the task. A key may state them explicitly; a key naming none is granted all five (the opt-in rule in licenseTermsOf); legacy keys resolve to the unrestricted entitlement and never consult this table.

The two add-on tokens, wired per the 2026-08-12 packages meeting: spreadsheet backs the 'Spreadsheet Bundle' add-on and grants FeatureId.Crud, FeatureId.UndoRedo, FeatureId.Clipboard and FeatureId.Batching (Kuba: batching too, 12.08). import_export backs the import-export add-on and grants FeatureId.ImportExport — a RESERVED grant, since nothing in the public API is gated on it yet: HF-107 hasn't shipped the feature it would gate. Both tokens stay recognized either way, so an issued key carrying one is never reported as unrecognized.

Entry ORDER is load-bearing at one spot: CapabilityRegistry's reverse index maps each function id to the FIRST token that lists it, so the package slices stay ahead of the group and single-function tokens, keeping capabilityOf's answers what they were before the second dialect existed.


# CHECKSUM Const

CHECKSUM: RegExp‹› = /[1]+$/

Defined in src/license/vendor/extractKeyData.ts:25 (opens new window)


# CLIPBOARD_FEATURE_TOKEN Const

CLIPBOARD_FEATURE_TOKEN: "feat:clipboard" = "feat:clipboard"

Defined in src/license/capabilities.ts:23 (opens new window)

Grants FeatureId.Clipboard.


# CORE_TOKEN Const

CORE_TOKEN: "core" = "core"

Defined in src/license/capabilities.ts:16 (opens new window)

The always-granted token. Every entitlement built from a license key includes it.

It grants the calculation operators — and nothing else. In particular it grants NO features: per Kuba's decision (task comment, 12.08) feature gating is real, and the gated API areas come from the feat:* tokens below. The always-on functionality the packaging design assigns to core (reads, serialization, teardown) is not behind ensureCapability at all.


# CRUD_FEATURE_TOKEN Const

CRUD_FEATURE_TOKEN: "feat:crud" = "feat:crud"

Defined in src/license/capabilities.ts:19 (opens new window)

Grants FeatureId.Crud — the mutating CRUD surface of the public API.


# DATE_FIELDS Const

DATE_FIELDS: readonly string[] = ['usage_until', 'release_until']

Defined in src/license/vendor/constants.ts:28 (opens new window)

The two mutually exclusive date fields of a product entry. Exactly one of them has to be present:

  • usage_until — the last licensed day (inclusive, compared in UTC),
  • release_until — builds released on or before that day may be used forever (compared against the build release date as text, no clock involved).

The pair replaces the contract type — nothing in the payload says "subscription" or "perpetual".


# DATE_SEPARATOR_REGEXP Const

DATE_SEPARATOR_REGEXP: RegExp‹› = new RegExp('[ /.-]')

Defined in src/DateTimeDefault.ts:13 (opens new window)


# ENCODED_PAYLOAD Const

ENCODED_PAYLOAD: RegExp‹› = /[2]+$/

Defined in src/license/vendor/extractKeyData.ts:24 (opens new window)

The alphabet of the encoded payload — URL-safe base64 without padding. The checksum (lowercase hex) is a subset of it, which is what lets the two be split by a fixed length from the right.


# ENTITLEMENT_KEY_CHECKSUM_LENGTH Const

ENTITLEMENT_KEY_CHECKSUM_LENGTH: 128 = 128

Defined in src/license/vendor/constants.ts:15 (opens new window)

The length of the checksum (SHA-512 as hex) which postfixes the payload inside the machine-readable block of every entitlement license key.


# EXCEL_SIMULATOR_FUNCTIONS Const

EXCEL_SIMULATOR_FUNCTIONS: string[] = [ 'ACOSH', 'ACOT', 'ACOTH', 'ARABIC', 'ASINH', 'ATANH', 'AVEDEV', 'BASE', 'BESSELI', 'BESSELJ', 'BESSELK', 'BESSELY', 'BETA.DIST', 'BETA.INV', 'BIN2DEC', 'BIN2HEX', 'BIN2OCT', 'BINOM.DIST', 'BINOM.INV', 'BITAND', 'BITLSHIFT', 'BITOR', 'BITRSHIFT', 'BITXOR', 'CEILING.MATH', 'CEILING.PRECISE', 'CHISQ.DIST', 'CHISQ.DIST.RT', 'CHISQ.INV', 'CHISQ.INV.RT', 'CHISQ.TEST', 'COMBIN', 'COMBINA', 'COMPLEX', 'CONFIDENCE.NORM', 'CONFIDENCE.T', 'CORREL', 'COSH', 'COT', 'COTH', 'COUNTUNIQUE', 'COVARIANCE.P', 'COVARIANCE.S', 'CSC', 'CSCH', 'CUMIPMT', 'CUMPRINC', 'DAVERAGE', 'DB', 'DCOUNT', 'DCOUNTA', 'DDB', 'DEC2BIN', 'DEC2OCT', 'DECIMAL', 'DEGREES', 'DELTA', 'DEVSQ', 'DGET', 'DMAX', 'DMIN', 'DOLLARDE', 'DOLLARFR', 'DPRODUCT', 'DSTDEV', 'DSTDEVP', 'DSUM', 'DVAR', 'DVARP', 'EFFECT', 'ERF', 'ERFC', 'EXPON.DIST', 'F.DIST', 'F.DIST.RT', 'F.INV', 'F.INV.RT', 'F.TEST', 'FACT', 'FACTDOUBLE', 'FISHER', 'FISHERINV', 'FLOOR.MATH', 'FLOOR.PRECISE', 'FORMULATEXT', 'FVSCHEDULE', 'GAMMA', 'GAMMA.DIST', 'GAMMA.INV', 'GAMMALN', 'GAUSS', 'GCD', 'GEOMEAN', 'HARMEAN', 'HEX2BIN', 'HEX2OCT', 'HYPGEOM.DIST', 'IMABS', 'IMAGINARY', 'IMARGUMENT', 'IMCONJUGATE', 'IMCOS', 'IMCOSH', 'IMCOT', 'IMCSC', 'IMCSCH', 'IMDIV', 'IMEXP', 'IMLN', 'IMLOG10', 'IMLOG2', 'IMPOWER', 'IMPRODUCT', 'IMREAL', 'IMSEC', 'IMSECH', 'IMSIN', 'IMSINH', 'IMSQRT', 'IMSUB', 'IMSUM', 'IMTAN', 'INTERVAL', 'ISBINARY', 'ISFORMULA', 'ISNONTEXT', 'ISPMT', 'ISREF', 'LCM', 'LOG10', 'LOGNORM.DIST', 'LOGNORM.INV', 'MAXA', 'MAXPOOL', 'MEDIANPOOL', 'MINA', 'MIRR', 'MMULT', 'MULTINOMIAL', 'NEGBINOM.DIST', 'NETWORKDAYS.INTL', 'NOMINAL', 'NORM.DIST', 'NORM.INV', 'NORM.S.DIST', 'NORM.S.INV', 'NPER', 'OCT2BIN', 'OCT2DEC', 'OCT2HEX', 'PDURATION', 'PERCENTILE.EXC', 'PHI', 'POISSON.DIST', 'QUARTILE.EXC', 'QUARTILE.INC', 'RADIANS', 'ROMAN', 'RRI', 'RSQ', 'SEC', 'SECH', 'SERIESSUM', 'SHEET', 'SHEETS', 'SINH', 'SKEW', 'SKEW.P', 'SLOPE', 'SPLIT', 'SQRTPI', 'STANDARDIZE', 'STEYX', 'SUMX2MY2', 'SUMX2PY2', 'SYD', 'T.DIST', 'T.DIST.2T', 'T.DIST.RT', 'T.INV', 'T.INV.2T', 'T.TEST', 'TANH', 'TBILLEQ', 'TBILLPRICE', 'TBILLYIELD', 'TDIST', 'TIMEVALUE', 'UNICODE', 'VARA', 'VARPA', 'WEIBULL.DIST', 'WORKDAY.INTL', 'Z.TEST', ]

Defined in src/license/capabilities.ts:235 (opens new window)

Added by the excel-simulator package, on top of SPREADSHEET_FUNCTIONS — the rest of the implemented catalog.

Kuba's doc does not itemize this remainder into groups the way it does for the first three packages: the excel-simulator package is stated as fun:all — the whole catalog, granted as a single token rather than assembled from named groups. This list is that remainder, enumerated rather than taken from the function registry at run time, even though "all functions" would be the shorter way to say it. Reading the registry would sweep in functions registered through HyperFormula.registerFunctionPlugin, putting a user's OWN custom function into a paid package and returning #LIC! for it on a smaller licence — the opposite of HF-307 decision D1, which drops custom-function gating entirely. A function this table does not list is not gated at all, which is exactly the treatment a custom function should get.


# FEATURE_TOKEN_PREFIX Const

FEATURE_TOKEN_PREFIX: "feat:" = "feat:"

Defined in src/license/licenseResolution.ts:35 (opens new window)

The prefix marking a capability token as granting a public-API feature area.

Used to tell "this key names its feature grants" from "this key's vocabulary cannot express one" — see the opt-in rule in licenseTermsOf.


# FUNCTIONS_1_TOKEN Const

FUNCTIONS_1_TOKEN: "functions_1" = "functions_1"

Defined in src/license/capabilities.ts:40 (opens new window)

Math engine package — the free tier's function set.


# FUNCTIONS_2_TOKEN Const

FUNCTIONS_2_TOKEN: "functions_2" = "functions_2"

Defined in src/license/capabilities.ts:42 (opens new window)

Calculated fields package. Cumulative: includes FUNCTIONS_1_TOKEN's functions.


# FUNCTIONS_3_TOKEN Const

FUNCTIONS_3_TOKEN: "functions_3" = "functions_3"

Defined in src/license/capabilities.ts:44 (opens new window)

Spreadsheet package. Cumulative: includes FUNCTIONS_2_TOKEN's functions.


# FUNCTIONS_4_TOKEN Const

FUNCTIONS_4_TOKEN: "functions_4" = "functions_4"

Defined in src/license/capabilities.ts:46 (opens new window)

Excel simulator package — the entire implemented catalog.


# FUNCTION_GROUPS Const

FUNCTION_GROUPS: ReadonlyMap‹string, readonly string[]› = new Map([ ['fun:math.a', ['ABS', 'LOG', 'MOD', 'POWER', 'PRODUCT', 'ROUND', 'ROUNDDOWN', 'ROUNDUP', 'SQRT', 'SUM']], ['fun:stat.a', ['AVERAGE', 'COUNT', 'MAX', 'MIN']], ['fun:logic.a', ['IF']], ['fun:operator.a', [...OPERATOR_FUNCTIONS]], ['fun:info.a', ['VERSION']], ['fun:lookup.a', ['OFFSET']], ['fun:time.b', [ 'DATE', 'DATEDIF', 'DATEVALUE', 'DAY', 'DAYS', 'EOMONTH', 'HOUR', 'ISOWEEKNUM', 'MINUTE', 'MONTH', 'NETWORKDAYS', 'SECOND', 'TODAY', 'WEEKDAY', 'WEEKNUM', 'WORKDAY', 'YEAR', ]], ['fun:text.b', [ 'CONCATENATE', 'EXACT', 'LEFT', 'LEN', 'LOWER', 'MID', 'REPLACE', 'REPT', 'RIGHT', 'SEARCH', 'SUBSTITUTE', 'TEXT', 'TRIM', 'UPPER', 'VALUE', ]], ['fun:logic.b', ['AND', 'FALSE', 'IFS', 'NOT', 'OR', 'SWITCH', 'TRUE', 'XOR']], ['fun:math.b', ['RAND', 'RANDBETWEEN', 'SUMIF', 'SUMIFS']], ['fun:stat.b', ['AVERAGEIF', 'COUNTIF', 'STDEV.S']], ['fun:lookup.c', [ 'ADDRESS', 'CHOOSE', 'COLUMN', 'COLUMNS', 'FILTER', 'HLOOKUP', 'HSTACK', 'HYPERLINK', 'INDEX', 'MATCH', 'ROW', 'ROWS', 'SORT', 'TRANSPOSE', 'UNIQUE', 'VLOOKUP', 'VSTACK', 'XLOOKUP', ]], ['fun:math.c', [ 'ACOS', 'ASIN', 'ATAN', 'ATAN2', 'CEILING', 'COS', 'EVEN', 'EXP', 'FLOOR', 'INT', 'LN', 'MROUND', 'ODD', 'PI', 'QUOTIENT', 'SEQUENCE', 'SIGN', 'SIN', 'SUBTOTAL', 'SUMPRODUCT', 'SUMSQ', 'SUMXMY2', 'TAN', ]], ['fun:stat.c', [ 'AVERAGEA', 'COUNTA', 'COUNTBLANK', 'COUNTIFS', 'LARGE', 'MAXIFS', 'MEDIAN', 'MINIFS', 'PERCENTILE.INC', 'SMALL', 'STDEV.P', 'STDEVA', 'STDEVPA', 'VAR.P', 'VAR.S', ]], ['fun:time.c', ['DAYS360', 'EDATE', 'NOW', 'TIME', 'YEARFRAC']], ['fun:text.c', ['CHAR', 'CLEAN', 'CODE', 'FIND', 'PROPER', 'T', 'TEXTJOIN', 'UNICHAR']], ['fun:info.c', [ 'ISBLANK', 'ISERR', 'ISERROR', 'ISEVEN', 'ISLOGICAL', 'ISNA', 'ISNUMBER', 'ISODD', 'ISTEXT', 'N', 'NA', ]], ['fun:logic.c', ['IFERROR', 'IFNA']], ['fun:finance.c', ['FV', 'IPMT', 'IRR', 'NPV', 'PMT', 'PPMT', 'PV', 'RATE', 'SLN', 'XIRR', 'XNPV']], ['fun:engineer.c', ['DEC2HEX', 'HEX2DEC']], ['fun:array.c', ['ARRAYFORMULA', 'ARRAY_CONSTRAIN']], ])

Defined in src/license/capabilities.ts:138 (opens new window)

The 21 function groups of the packaging doc, keyed by their group tokens in normalized (lowercase) spelling — the doc writes them fun:<family>.<A|B|C> and declares all token names case-insensitive.

Transcribed 1:1 from §6 of Kuba's 12.08 packaging doc (CU doc 8cnjcyf-33175, page 8cnjcyf-47835, "HF function groups and packages"), INCLUDING the members that resolve to no grant here: the operators (granted by CORE_TOKEN instead) and the protected built-ins (outside the token system, see PROTECTED_BUILT_INS). Keeping the doc's own membership verbatim is what makes this map the SINGLE SOURCE OF TRUTH both token dialects read from — the package slices below are DERIVED from these groups, so moving a function between groups moves it in both dialects at once, and capability-table.spec.ts pins each group's size against the doc's published counts so a re-transcription is a reviewable diff.

The doc freezes group names as API surface: once shipped inside license keys, a rename is a breaking change.


# FUN_ALL_TOKEN Const

FUN_ALL_TOKEN: "fun:all" = "fun:all"

Defined in src/license/capabilities.ts:51 (opens new window)

The packaging doc's whole-catalog token — the excel-simulator package as that doc's own vocabulary spells it. Grants exactly what FUNCTIONS_4_TOKEN grants.


# HOURS_PER_DAY Const

HOURS_PER_DAY: 24 = 24

Defined in src/DateTimeHelper.ts:15 (opens new window)


# HYPERFORMULA_PRODUCT_NAME Const

HYPERFORMULA_PRODUCT_NAME: "hyperformula" = "hyperformula"

Defined in src/license/licenseResolution.ts:27 (opens new window)

The name of HyperFormula's own product entry in an entitlement key payload. Every product entry carries its own capabilities, dates and windows, so this is the only entry this library reads — a key granting other products alongside (or instead of) HyperFormula is a valid key whose other entries are simply not for us.


# IMPORT_EXPORT_ADDON_TOKEN Const

IMPORT_EXPORT_ADDON_TOKEN: "import_export" = "import_export"

Defined in src/license/capabilities.ts:63 (opens new window)

Import/export add-on (2026-08-12 packages meeting). Grants FeatureId.ImportExport, a RESERVED grant: nothing in the public API is gated on it yet, because HF-107 hasn't shipped the import/export feature it would gate.


# K Const

K: number[] = [ 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817, ]

Defined in src/license/vendor/sha512.ts:15 (opens new window)

The SHA-512 round constants. Each 64-bit constant is stored as a pair of 32-bit integers (high word first, low word second).


# LCID_CURRENCY_TAG Const

LCID_CURRENCY_TAG: RegExp‹› = /[$[^-]]+-/

Defined in src/format/format.ts:26 (opens new window)

Detects Excel LCID-tagged currency tags ([$SYMBOL-LCID] with a non-empty SYMBOL portion). Shared by defaultStringifyDateTime and defaultStringifyDuration so a format string carrying such a tag short- circuits both date and duration dispatch and falls through to the number formatter (or the user-supplied stringifyCurrency callback).

The pattern is intentionally unanchored: any occurrence of [$SYMBOL- in the format string triggers the guard. Excel does not mix date/time tokens with a currency tag in the same format string, so a mid-string match cannot misclassify a legitimate composite — every observed format string with a currency tag is currency-only.


# LEGACY_KEY Const

LEGACY_KEY: RegExp‹› = /[3]{25}$/

Defined in src/license/vendor/detectFormat.ts:32 (opens new window)

The classic 25-character key, once its dashes are stripped.


# LITERAL_KEYS Const

LITERAL_KEYS: ReadonlyMap‹string, LicenseKeyFormat = new Map([ ['non-commercial-and-evaluation', 'non-commercial-and-evaluation'], ['gpl-v3', 'gpl-v3'], ])

Defined in src/license/vendor/detectFormat.ts:24 (opens new window)

The literal keys that stand for a licence rather than encode one.


# MATH_ENGINE_FUNCTIONS Const

MATH_ENGINE_FUNCTIONS: string[] = gatableMembersOfGroups(MATH_ENGINE_GROUPS)

Defined in src/license/capabilities.ts:213 (opens new window)

Package membership, DERIVED from FUNCTION_GROUPS as the cumulative group unions the packaging doc's §4 table states: Math engine = the .A groups, Calculated fields = .A + .B, Spreadsheet = .A + .B + .C. Reproducing that union gives 17 / 64 / 161 cumulative functions before the two protected built-ins are removed; capability-table.spec.ts pins the resulting full memberships by name so a re-derivation is a reviewable diff.


# MATH_ENGINE_GROUPS Const

MATH_ENGINE_GROUPS: string[] = ['fun:math.a', 'fun:stat.a', 'fun:logic.a', 'fun:operator.a', 'fun:info.a', 'fun:lookup.a']

Defined in src/license/capabilities.ts:180 (opens new window)

The group tokens each package adds, exactly as the packaging doc's §4 table states them.


# MILLISECONDS_PER_DAY Const

MILLISECONDS_PER_DAY: 86400000 = 86400000

Defined in src/license/licenseResolution.ts:19 (opens new window)

Milliseconds in a day, used to turn a grace period in days into a deadline.


# MINUTES_PER_HOUR Const

MINUTES_PER_HOUR: 60 = 60

Defined in src/DateTimeHelper.ts:14 (opens new window)


# NAMED_EXPRESSIONS_FEATURE_TOKEN Const

NAMED_EXPRESSIONS_FEATURE_TOKEN: "feat:named_expressions" = "feat:named_expressions"

Defined in src/license/capabilities.ts:25 (opens new window)

Grants FeatureId.NamedExpressions.


# NOT_FOUND Const

NOT_FOUND: -1 = -1

Defined in src/Lookup/AdvancedFind.ts:19 (opens new window)


# OPERATOR_FUNCTIONS Const

OPERATOR_FUNCTIONS: string[] = [ 'HF.ADD', 'HF.CONCAT', 'HF.DIVIDE', 'HF.EQ', 'HF.GT', 'HF.GTE', 'HF.LT', 'HF.LTE', 'HF.MINUS', 'HF.MULTIPLY', 'HF.NE', 'HF.POW', 'HF.UMINUS', 'HF.UNARY_PERCENT', 'HF.UPLUS', ]

Defined in src/license/capabilities.ts:101 (opens new window)

The calculation operators and their HF.* callable forms. Always available in every package — the packaging design counts them as engine baseline and advertises them separately from the function totals, so they are granted by CORE_TOKEN rather than by any package.


# PROTECTED_BUILT_INS Const

PROTECTED_BUILT_INS: string[] = ['OFFSET', 'VERSION']

Defined in src/license/capabilities.ts:113 (opens new window)

The two protected built-ins. Both are named by the packaging doc (fun:lookup.A, fun:info.A) but sit OUTSIDE the token system today — the interpreter never gate-checks a protected function, so granting them would be dead weight that implies a restriction that does not exist. The doc calls this a "technical limitation" on both; their tokens below are recognized but grant nothing.


# QUICK_CHECK_REGEXP Const

QUICK_CHECK_REGEXP: RegExp‹› = new RegExp('[4]+[ap]?m?$')

Defined in src/DateTimeDefault.ts:11 (opens new window)


# SECONDS_PER_MINUTE Const

SECONDS_PER_MINUTE: 60 = 60

Defined in src/DateTimeHelper.ts:13 (opens new window)


# SECONDS_PRECISION Const

SECONDS_PRECISION: 1000 = 1000

Defined in src/DateTimeDefault.ts:15 (opens new window)


# SILENT_CONSOLE_FLAGS Const

SILENT_CONSOLE_FLAGS: string[] = ['silent', 'silent-console', 'no-console-warns']

Defined in src/license/licenseResolution.ts:46 (opens new window)

Flag spellings that suppress console output.

Three, because the key spec is not self-consistent: its normative flags table and its example payload (rev 6 §2.3 and §2) say no-console-warns, while the runtime-behaviour sections of the same revision (§4.3, §5.2) say silent-console, and earlier revisions said plain silent. A key minted against any of those readings must be honoured — a SaaS deployment that asked for silence and got console warnings is the failure this list exists to prevent.


# SPREADSHEET_ADDON_TOKEN Const

SPREADSHEET_ADDON_TOKEN: "spreadsheet" = "spreadsheet"

Defined in src/license/capabilities.ts:57 (opens new window)

Spreadsheet Bundle add-on (2026-08-12 packages meeting). Grants FeatureId.Crud, FeatureId.UndoRedo, FeatureId.Clipboard and FeatureId.Batching — see CAPABILITY_TABLE.


# SPREADSHEET_FUNCTIONS Const

SPREADSHEET_FUNCTIONS: string[] = gatableMembersOfGroups(SPREADSHEET_GROUPS)

Defined in src/license/capabilities.ts:219 (opens new window)

Added by the spreadsheet package, on top of CALCULATED_FIELDS_FUNCTIONS.


# SPREADSHEET_GROUPS Const

SPREADSHEET_GROUPS: string[] = [ 'fun:lookup.c', 'fun:math.c', 'fun:stat.c', 'fun:time.c', 'fun:text.c', 'fun:info.c', 'fun:logic.c', 'fun:finance.c', 'fun:engineer.c', 'fun:array.c', ]

Defined in src/license/capabilities.ts:182 (opens new window)


# TIME_FORMAT_SECONDS_ITEM_REGEXP Const

TIME_FORMAT_SECONDS_ITEM_REGEXP: RegExp‹› = new RegExp('^ss(\.(s+|0+))?$')

Defined in src/DateTimeDefault.ts:9 (opens new window)


# TIME_SEPARATOR Const

TIME_SEPARATOR: ":" = ":"

Defined in src/DateTimeDefault.ts:14 (opens new window)


# UNDO_REDO_FEATURE_TOKEN Const

UNDO_REDO_FEATURE_TOKEN: "feat:undo_redo" = "feat:undo_redo"

Defined in src/license/capabilities.ts:21 (opens new window)

Grants FeatureId.UndoRedo.


# WHITESPACE_REGEXP Const

WHITESPACE_REGEXP: RegExp‹› = new RegExp('\s+')

Defined in src/DateTimeDefault.ts:12 (opens new window)


# WRONG_RANGE_SIZE Const

WRONG_RANGE_SIZE: "AbsoluteCellRange: Wrong range size" = "AbsoluteCellRange: Wrong range size"

Defined in src/AbsoluteCellRange.ts:22 (opens new window)


# _noticedKeys Const

_noticedKeys: Set‹string› = new Set()

Defined in src/helpers/licenseKeyValidator.ts:57 (opens new window)

Identities (see noticeIdentityOf) of license keys that have already printed their expiry-approaching notice.

Deliberately keyed per key rather than a single boolean like _notified above: that flag reports one of a handful of states that mean the same thing regardless of which key triggered them ("a key is invalid", "a key is missing"), so once-per-page-load is the right behaviour for it. Two different keys approaching their OWN expiry are two different events, and a page that swaps keys (or a test suite that builds one engine per key) must still warn for the second one even though the first already consumed a shared flag.


# _notified Let

_notified: boolean = false

Defined in src/helpers/licenseKeyValidator.ts:44 (opens new window)


# _rl Const

_rl: "length" = "length"

Defined in src/helpers/licenseKeyHelper.ts:9 (opens new window)

license Copyright (c) 2025 Handsoncode. All rights reserved.


# dateFormatRegex Const

dateFormatRegex: RegExp‹› = /(\.|dd|DD|d|D|mm|MM|m|M|YYYY|YY|yyyy|yy|HH|hh|H|h|ss(.(0+|s+))?|s|AM/PM|am/pm|A/P|a/p|[mm]|[MM]|[hh]|[HH])/g

Defined in src/format/parser.ts:8 (opens new window)


# defaultLanguage Const

defaultLanguage: string = Config.defaultConfig.language

Defined in src/index.ts:110 (opens new window)


# groupEntries Const

groupEntries: [string, CapabilityGrant][] = Array.from(FUNCTION_GROUPS.keys()).map((groupToken) => [ groupToken, {functions: gatableMembersOfGroups([groupToken]), features: []}, ])

Defined in src/license/capabilities.ts:284 (opens new window)

One table entry per group token: the group's gatable members, so a key may assemble a package from groups instead of naming a functions_N slice. fun:info.a and fun:lookup.a resolve to EMPTY grants on purpose — their members are the protected built-ins, which are always available and must never become table-covered (a covered function is gated for every key not granting it). The tokens stay recognized either way, so a key carrying them is never reported as unrecognized: they are the doc's bookkeeping identifiers for functionality every key gets.


# memoizedParseDateFormat Const

memoizedParseDateFormat: (Anonymous function) = memoize(parseDateFormat)

Defined in src/DateTimeDefault.ts:17 (opens new window)


# memoizedParseTimeFormat Const

memoizedParseTimeFormat: (Anonymous function) = memoize(parseTimeFormat)

Defined in src/DateTimeDefault.ts:16 (opens new window)


# numDays Const

numDays: number[] = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

Defined in src/DateTimeHelper.ts:10 (opens new window)


# numberFormatRegex Const

numberFormatRegex: RegExp‹› = /(\.|[#0]+(.[#0]*)?)/g

Defined in src/format/parser.ts:9 (opens new window)


# prefSumDays Const

prefSumDays: number[] = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]

Defined in src/DateTimeHelper.ts:11 (opens new window)


# privatePool Const

privatePool: WeakMap‹Config, LicensePrivateState = new WeakMap()

Defined in src/Config.ts:40 (opens new window)


# singleFunctionEntries Const

singleFunctionEntries: [string, CapabilityGrant][] = functions4Grant.functions .concat(OPERATOR_FUNCTIONS, PROTECTED_BUILT_INS) .map((name) => [ fun:${normalizeCapabilityToken(name)}, {functions: PROTECTED_BUILT_INS.indexOf(name) === -1 ? [name] : [], features: []}, ])

Defined in src/license/capabilities.ts:297 (opens new window)

One table entry per canonical function name: the packaging doc's single-function tokens (fun:<CANONICAL_FUNCTION_NAME>), "for surgical grants: custom deals, previews, per-function exceptions". One exists for EVERY canonical name — including the operators (harmless: core grants them anyway) and the protected built-ins (empty grants, as above). Alias names get no token of their own: tokens reference canonical names, and an alias travels with its canonical function because the gates canonicalize before consulting the table.

# Functions

# CellValueTypeOrd Const

CellValueTypeOrd(arg: CellValueType): number

Defined in src/Cell.ts:97 (opens new window)

Parameters:

Name Type
arg CellValueType

Returns: number


# _cp Const

_cp(v: any): number

Defined in src/helpers/licenseKeyHelper.ts:14 (opens new window)

Parameters:

Name Type
v any

Returns: number


# _hd Const

_hd(v: any): number

Defined in src/helpers/licenseKeyHelper.ts:10 (opens new window)

Parameters:

Name Type
v any

Returns: number


# _nm Const

_nm(v: any): string

Defined in src/helpers/licenseKeyHelper.ts:12 (opens new window)

Parameters:

Name Type
v any

Returns: string


# _pi Const

_pi(v: any): number

Defined in src/helpers/licenseKeyHelper.ts:11 (opens new window)

Parameters:

Name Type
v any

Returns: number


# _ss Const

_ss(v: any, s: any, l: any): any

Defined in src/helpers/licenseKeyHelper.ts:13 (opens new window)

Parameters:

Name Type
v any
s any
l any

Returns: any


# absoluteSheetReference Const

absoluteSheetReference(address: AddressWithSheet, baseAddress: SimpleCellAddress): number

Defined in src/Cell.ts:222 (opens new window)

Parameters:

Name Type
address AddressWithSheet
baseAddress SimpleCellAddress

Returns: number


# absolutizeDependencies Const

absolutizeDependencies(deps: RelativeDependency[], baseAddress: SimpleCellAddress): CellDependency[]

Defined in src/absolutizeDependencies.ts:17 (opens new window)

Converts dependencies from maybe relative addressing to absolute addressing.

Parameters:

Name Type Description
deps RelativeDependency[] list of addresses in R0C0 format
baseAddress SimpleCellAddress base address with regard to which make a convertion

Returns: CellDependency[]


# addressKey Const

addressKey(address: SimpleCellAddress): string

Defined in src/Cell.ts:209 (opens new window)

Parameters:

Name Type
address SimpleCellAddress

Returns: string


# allowsFeature

allowsFeature(resolved: ResolvedCapabilities, feature: FeatureId): boolean

Defined in src/license/CapabilityRegistry.ts:129 (opens new window)

Whether a resolved entitlement allows using the given feature area of the public API.

Parameters:

Name Type
resolved ResolvedCapabilities
feature FeatureId

Returns: boolean


# allowsFunction

allowsFunction(resolved: ResolvedCapabilities, functionId: string): boolean

Defined in src/license/CapabilityRegistry.ts:122 (opens new window)

Whether a resolved entitlement allows calling the given function.

Parameters:

Name Type
resolved ResolvedCapabilities
functionId string

Returns: boolean


# arraySizeForBinaryOp

arraySizeForBinaryOp(leftArraySize: ArraySize, rightArraySize: ArraySize): ArraySize

Defined in src/ArraySize.ts:34 (opens new window)

Parameters:

Name Type
leftArraySize ArraySize
rightArraySize ArraySize

Returns: ArraySize


# arraySizeForUnaryOp

arraySizeForUnaryOp(arraySize: ArraySize): ArraySize

Defined in src/ArraySize.ts:38 (opens new window)

Parameters:

Name Type
arraySize ArraySize

Returns: ArraySize


# base64ToBytes

base64ToBytes(base64: string): number[] | null

Defined in src/license/vendor/utils.ts:177 (opens new window)

Decodes a base64 string (standard or URL-safe alphabet, padding optional) back into bytes. Returns null when the string is not valid base64.

Parameters:

Name Type Description
base64 string the base64 string to decode

Returns: number[] | null


# base64ToString

base64ToString(base64: string): string | null

Defined in src/license/vendor/utils.ts:214 (opens new window)

Decodes a base64 (standard or URL-safe) string back into a string. Returns null when the input is not valid base64.

Parameters:

Name Type Description
base64 string the base64 string to decode

Returns: string | null


# buildColumnSearchStrategy

buildColumnSearchStrategy(dependencyGraph: DependencyGraph, config: Config, statistics: Statistics): ColumnSearchStrategy

Defined in src/Lookup/SearchStrategy.ts:63 (opens new window)

Parameters:

Name Type
dependencyGraph DependencyGraph
config Config
statistics Statistics

Returns: ColumnSearchStrategy


# checkKeySchema

checkKeySchema(v: any): boolean

Defined in src/helpers/licenseKeyHelper.ts:20 (opens new window)

Parameters:

Name Type
v any

Returns: boolean


# checkLicenseKeyValidity

checkLicenseKeyValidity(licenseKey: string): LicenseKeyValidityState

Defined in src/helpers/licenseKeyValidator.ts:152 (opens new window)

Checks if the provided license key is grammatically valid or not expired.

Parameters:

Name Type Description
licenseKey string The license key to check.

Returns: LicenseKeyValidityState

Returns the checking state.


# collatorFromConfig

collatorFromConfig(config: Config): Collator

Defined in src/StringHelper.ts:8 (opens new window)

Parameters:

Name Type
config Config

Returns: Collator


# configCheckIfParametersNotInConflict

configCheckIfParametersNotInConflict(...params: object[]): void

Defined in src/ArgumentSanitization.ts:57 (opens new window)

Parameters:

Name Type
...params object[]

Returns: void


# configValueFromParam

configValueFromParam(inputValue: any, expectedType: string | string[], paramName: ConfigParamsList): any

Defined in src/ArgumentSanitization.ts:16 (opens new window)

Parameters:

Name Type
inputValue any
expectedType string | string[]
paramName ConfigParamsList

Returns: any


# configValueFromParamCheck

configValueFromParamCheck(inputValue: any, typeCheck: function, expectedType: string, paramName: ConfigParamsList): any

Defined in src/ArgumentSanitization.ts:47 (opens new window)

Parameters:

inputValue: any

typeCheck: function

▸ (object: any): boolean

Parameters:

Name Type
object any

expectedType: string

paramName: ConfigParamsList

Returns: any


# countChars

countChars(text: string, char: string): number

Defined in src/format/format.ts:74 (opens new window)

Parameters:

Name Type
text string
char string

Returns: number


# createTokens

createTokens(regexTokens: RegExpExecArray[], str: string): FormatToken[]

Defined in src/format/parser.ts:66 (opens new window)

Parameters:

Name Type
regexTokens RegExpExecArray[]
str string

Returns: FormatToken[]


# dayToMonth

dayToMonth(dayOfYear: number): number

Defined in src/DateTimeHelper.ts:270 (opens new window)

Parameters:

Name Type
dayOfYear number

Returns: number


# deepFreeze

deepFreezeT›(value: T): T

Defined in src/license/vendor/utils.ts:25 (opens new window)

Recursively freezes the value (and every nested object). Used to make a verified schema immutable so it cannot drift from what was validated.

Type parameters:

T

Parameters:

Name Type Description
value T the value to freeze

Returns: T


# defaultParseToDate

defaultParseToDate(dateItems: string[], dateFormat: Maybe‹string›): MaybeSimpleDate

Defined in src/DateTimeDefault.ts:137 (opens new window)

Parses a date value from a string if the string matches the given date format.

Parameters:

Name Type
dateItems string[]
dateFormat Maybe‹string›

Returns: MaybeSimpleDate


# defaultParseToDateTime

defaultParseToDateTime(text: string, dateFormat: Maybe‹string›, timeFormat: Maybe‹string›): MaybeDateTime

Defined in src/DateTimeDefault.ts:30 (opens new window)

Parses a DateTime value from a string if the string matches the given date format and time format.

Idea for more readable implementation:

  • divide string into parts by a regexp [date_regexp]? [time_regexp]? [ampm_regexp]?
  • start by finding the time part, because it is unambiguous '([0-9]+:[0-9:.]+ ?[ap]?m?)$', before it is the date part
  • OR split by spaces - last segment is ampm token, second to last is time (with or without ampm), rest is date If applied:
  • date parsing might work differently after these changes but still according to the docs
  • make sure to test edge cases like timeFormats: ['hh', 'ss.ss'] etc, string: '01-01-2019 AM', 'PM'

Parameters:

Name Type
text string
dateFormat Maybe‹string›
timeFormat Maybe‹string›

Returns: MaybeDateTime


# defaultParseToTime

defaultParseToTime(timeItems: string[], timeFormat: Maybe‹string›): MaybeSimpleTime

Defined in src/DateTimeDefault.ts:82 (opens new window)

Parses a time value from a string if the string matches the given time format.

Parameters:

Name Type
timeItems string[]
timeFormat Maybe‹string›

Returns: MaybeSimpleTime


# defaultStringifyCurrency

defaultStringifyCurrency(_value: number, _formatArg: string): Maybe‹string›

Defined in src/format/format.ts:328 (opens new window)

Default implementation of the stringifyCurrency config option.

Returning undefined instructs the formatter to fall through to the built-in number formatter, preserving HyperFormula's zero-dependency default behavior. Replace this default by setting the stringifyCurrency config option.

Parameters:

Name Type Description
_value number the numeric value to format (unused in default).
_formatArg string the format string passed to TEXT (unused in default).

Returns: Maybe‹string›

undefined — caller should fall through to the built-in formatter.


# defaultStringifyDateTime

defaultStringifyDateTime(dateTime: SimpleDateTime, formatArg: string): Maybe‹string›

Defined in src/format/format.ts:224 (opens new window)

Default stringifyDateTime callback — formats a date/time value against an Excel-style format string (e.g. YYYY-MM-DD HH:mm:ss).

Returns undefined for format strings that are not date/time formats so the dispatcher in format() can fall through to parseForNumberFormat (or to a user-supplied stringifyCurrency callback for currency-tagged formats).

LCID currency-tag guard — explicitly returns undefined for Excel currency tags [$SYMBOL-LCID] (non-empty SYMBOL portion). Without the guard, parseForDateTimeFormat greedily consumes letters like D/M/S/Y/H inside the currency code (e.g. D in USD, H in CHF, M+D in AMD), mangling the output of an [$USD-409] #,##0.00 format into [$US9-409] #,##0.00 because D is read as a day token. The pre-HF-24 behaviour was to mis-format; the guarded return is the deliberate correction, not a regression. Bit-for-bit compatibility is preserved for every non-currency format (dates, durations, $#,##0.00, etc.).

The guard pattern (/\[\$[^\-\]]+-/) requires ≥1 character between [$ and - so it distinguishes currency tags ([$USD-409], [$€-2]) from Excel's locale-only modifier ([$-409], [$-F800]), which is valid on date/time formats and must continue to flow through this function.

Parameters:

Name Type Description
dateTime SimpleDateTime parsed date/time value to render
formatArg string Excel-style format string

Returns: Maybe‹string›

formatted string, or undefined to defer to the next dispatch step


# defaultStringifyDuration

defaultStringifyDuration(time: SimpleTime, formatArg: string): Maybe‹string›

Defined in src/format/format.ts:132 (opens new window)

Default stringifyDuration callback — formats a duration value against an Excel-style time format string (e.g. [hh]:mm:ss).

Returns undefined for format strings that are not duration formats so the dispatcher in format() can fall through to other handlers.

LCID currency-tag guard — sibling to the same guard in defaultStringifyDateTime; explicitly returns undefined for Excel currency tags [$SYMBOL-LCID] because the SYMBOL portion contains duration-token letters (H in CHF/HUF, m in AMD/HMD) that parseForDateTimeFormat would otherwise interpret as time tokens and mangle the output. See defaultStringifyDateTime for the full symbol-vs-locale-modifier rationale and the historical pre-HF-24 behaviour the guard corrects.

Parameters:

Name Type Description
time SimpleTime parsed duration value to render
formatArg string Excel-style format string

Returns: Maybe‹string›

formatted string, or undefined to defer to the next dispatch step


# defineOwn

defineOwn(target: object, key: string, value: unknown): void

Defined in src/license/vendor/extractKeyData.ts:116 (opens new window)

Adds an own, ordinary property.

Both the product names and the field names of a product entry come from JSON, so __proto__ is a name an attacker can put in a key. A plain assignment would go through the Object.prototype setter: the value would vanish from Object.keys while still resolving through the chain.

Parameters:

Name Type Description
target object the object to add the property to
key string the property name
value unknown the property value

Returns: void


# detectLicenseKeyFormat

detectLicenseKeyFormat(licenseKey: unknown): LicenseKeyFormat

Defined in src/license/vendor/detectFormat.ts:46 (opens new window)

Tells which license key format a string is in, without validating it.

The entitlement key format removed the leading type tag, so a key no longer announces itself in its first characters — it now ends with the bracketed machine-readable block instead. Products that accept several formats need one place that makes the distinction, and this is it.

The answer is about SHAPE only. A returned 'entitlement' means "route this to the entitlement validator", not "this key is valid".

Parameters:

Name Type Description
licenseKey unknown the license key to inspect

Returns: LicenseKeyFormat


# doesContainRelativeReferences Const

doesContainRelativeReferences(ast: Ast): boolean

Defined in src/NamedExpressions.ts:299 (opens new window)

Parameters:

Name Type
ast Ast

Returns: boolean


# doesItLookLikeADateTimeQuickCheck

doesItLookLikeADateTimeQuickCheck(text: string): boolean

Defined in src/DateTimeDefault.ts:222 (opens new window)

If this function returns false, the string is not parsable as a date time. Otherwise, it might be. This is a quick check that is used to avoid running the more expensive parsing operations.

Parameters:

Name Type
text string

Returns: boolean


# empty

emptyT›(): IterableIterator‹T›

Defined in src/generatorUtils.ts:8 (opens new window)

Type parameters:

T

Returns: IterableIterator‹T›


# entitlementOf

entitlementOf(terms: LicenseTerms): LicenseEntitlement

Defined in src/license/licenseResolution.ts:303 (opens new window)

Turns the terms of an intact, unexpired entitlement key into the entitlement it grants.

Per HF-307 decision D3 this is fail-closed and silent: a token this version does not recognize is recorded in unrecognizedCapabilities and grants nothing, without a warning, a message, or anything public to read it back from. "Silent" there means the grant is silent — whether the key's console messages are suppressed is decided solely by its flags (terms.silent), never by the presence of an unrecognized token; coupling the two suppressed expiry notices as a side effect of a vocabulary mismatch, and was confirmed an implementation error (Kuba, 12.08).

Parameters:

Name Type Description
terms LicenseTerms the terms of the key

Returns: LicenseEntitlement


# equalSimpleCellAddress Const

equalSimpleCellAddress(left: SimpleCellAddress, right: SimpleCellAddress): boolean

Defined in src/Cell.ts:226 (opens new window)

Parameters:

Name Type
left SimpleCellAddress
right SimpleCellAddress

Returns: boolean


# expiryWithinNoticeWindow

expiryWithinNoticeWindow(terms: LicenseTerms): Date | null

Defined in src/license/licenseResolution.ts:277 (opens new window)

The day a VALID key's usage-until expiry falls on, if the current UTC instant is within its notice window — null otherwise, which covers "no notice window configured" (noticeDays is 0, which is also what a key with no HyperFormula entry resolves to) just as much as "not close enough yet" or "already past its usage-until day".

Deliberately blind to graceDays: notice is about the usage_until axis itself, not about the grace extension past it. Key spec rev 6 §4.1 sequences notice, then a soft-stop window, then the hard-stop this build already enforces; only the hard stop and this notice are built for 3.5.0 (Kuba's decision D5-A), so the window checked here ends exactly where the soft-stop phase would begin, rather than reaching into grace and printing a notice for a key already past its expiry.

release_until-axis keys never reach here with a non-null result — kind is 'usage' only when the date came from usage_until (see licenseTermsOf) — matching the spec's rule that notice and grace have no effect on that axis. The converse holds too now: the tagged format let an entry with no date of its own fall through to the key envelope's exp, so 'usage' did not imply usage_until; an entitlement key has no envelope date to fall back to.

Parameters:

Name Type Description
terms LicenseTerms the terms of the key

Returns: Date | null


# extractEntitlementKeyData

extractEntitlementKeyData(licenseKey: string): EntitlementKeyData | null

Defined in src/license/vendor/extractKeyData.ts:199 (opens new window)

Extracts the machine-readable data from an entitlement license key.

The checksum is verified first, so the returned data is guaranteed to belong to an intact block. For a malformed or tampered key null is returned — reporting an invalid key is the caller's job, not this function's.

Only the bracketed block matters. The prose in front of it is neither parsed nor covered by the checksum, so the caller may pass the whole artifact or just the [...] block, and rewrapped or re-pasted text still validates.

No schema is needed. Unknown products, capabilities and flags are all tolerated, so nothing about reading a key depends on the vocabulary — which is what lets a product vendor this parser on its own.

Parameters:

Name Type Description
licenseKey string the license key to extract the data from

Returns: EntitlementKeyData | null


# extractTime

extractTime(v: any): number

Defined in src/helpers/licenseKeyHelper.ts:16 (opens new window)

Parameters:

Name Type
v any

Returns: number


# filterDependenciesOutOfScope Const

filterDependenciesOutOfScope(deps: CellDependency[]): CellDependency[]

Defined in src/absolutizeDependencies.ts:21 (opens new window)

Parameters:

Name Type
deps CellDependency[]

Returns: CellDependency[]


# findBoundaries

findBoundaries(sheet: Sheet): SheetBoundaries

Defined in src/Sheet.ts:49 (opens new window)

Returns actual width, height and fill ratio of a sheet

Parameters:

Name Type Description
sheet Sheet two-dimmensional array sheet representation

Returns: SheetBoundaries


# findInOrderedArray

findInOrderedArray(key: number, values: number[], handlingMisses: "lowerBound" | "upperBound"): number

Defined in src/Lookup/ColumnIndex.ts:339 (opens new window)

Parameters:

Name Type Default
key number -
values number[] -
handlingMisses "lowerBound" | "upperBound" "upperBound"

Returns: number


# first

firstT›(iterable: IterableIterator‹T›): Maybe‹T›

Defined in src/generatorUtils.ts:22 (opens new window)

Type parameters:

T

Parameters:

Name Type
iterable IterableIterator‹T›

Returns: Maybe‹T›


# format

format(value: number, formatArg: string, config: Config, dateHelper: DateTimeHelper): RawScalarValue

Defined in src/format/format.ts:28 (opens new window)

Parameters:

Name Type
value number
formatArg string
config Config
dateHelper DateTimeHelper

Returns: RawScalarValue


# formatDate

formatDate(date: Date): string

Defined in src/helpers/licenseKeyValidator.ts:193 (opens new window)

Formats a Date instance to hard-coded format MMMM DD, YYYY.

Read in UTC, not local time. Every date reaching this function is built at UTC midnight — the legacy path from a whole number of days since the epoch, the entitlement-key path from a calendar date in the payload — so local getters shifted the day backwards for anyone west of UTC and printed an expiry one day earlier than the one the key actually carries.

Parameters:

Name Type Description
date Date The date to format, at UTC midnight.

Returns: string

The date as MMMM DD, YYYY.


# formatToken

formatToken(type: TokenType, value: string): FormatToken

Defined in src/format/parser.ts:21 (opens new window)

Parameters:

Name Type
type TokenType
value string

Returns: FormatToken


# gatableMembersOfGroups

gatableMembersOfGroups(groupTokens: string[]): string[]

Defined in src/license/capabilities.ts:200 (opens new window)

The members a group contributes to a package GRANT: the group verbatim, minus the operators (granted by CORE_TOKEN in every package) and the protected built-ins (outside the token system entirely).

Parameters:

Name Type
groupTokens string[]

Returns: string[]


# getCellType Const

getCellType(vertex: Maybe‹CellVertex›, address: SimpleCellAddress): CellType

Defined in src/Cell.ts:61 (opens new window)

Parameters:

Name Type
vertex Maybe‹CellVertex›
address SimpleCellAddress

Returns: CellType


# getCellValueDetailedType Const

getCellValueDetailedType(cellValue: InterpreterValue): CellValueDetailedType

Defined in src/Cell.ts:133 (opens new window)

Parameters:

Name Type
cellValue InterpreterValue

Returns: CellValueDetailedType


# getCellValueFormat Const

getCellValueFormat(cellValue: InterpreterValue): string | undefined

Defined in src/Cell.ts:141 (opens new window)

Parameters:

Name Type
cellValue InterpreterValue

Returns: string | undefined


# getCellValueType Const

getCellValueType(cellValue: InterpreterValue): CellValueType

Defined in src/Cell.ts:113 (opens new window)

Parameters:

Name Type
cellValue InterpreterValue

Returns: CellValueType


# getDefaultConfig

getDefaultConfig(): ConfigParams

Defined in src/Config.ts:407 (opens new window)

Returns: ConfigParams


# getFullConfigFromPartial

getFullConfigFromPartial(partialConfig: Partial‹ConfigParams›): ConfigParams

Defined in src/Config.ts:393 (opens new window)

Parameters:

Name Type
partialConfig Partial‹ConfigParams

Returns: ConfigParams


# instanceOfSimpleDate

instanceOfSimpleDate(obj: any): obj is SimpleDate

Defined in src/DateTimeHelper.ts:34 (opens new window)

Parameters:

Name Type
obj any

Returns: obj is SimpleDate


# instanceOfSimpleTime

instanceOfSimpleTime(obj: any): obj is SimpleTime

Defined in src/DateTimeHelper.ts:43 (opens new window)

Parameters:

Name Type
obj any

Returns: obj is SimpleTime


# invalidSimpleColumnAddress Const

invalidSimpleColumnAddress(address: SimpleColumnAddress): boolean

Defined in src/Cell.ts:190 (opens new window)

Parameters:

Name Type
address SimpleColumnAddress

Returns: boolean


# invalidSimpleRowAddress Const

invalidSimpleRowAddress(address: SimpleRowAddress): boolean

Defined in src/Cell.ts:181 (opens new window)

Parameters:

Name Type
address SimpleRowAddress

Returns: boolean


# isBoolean

isBoolean(text: string): boolean

Defined in src/CellContentParser.ts:81 (opens new window)

Parameters:

Name Type
text string

Returns: boolean


# isColOrRowInvalid Const

isColOrRowInvalid(address: SimpleCellAddress): boolean

Defined in src/Cell.ts:203 (opens new window)

Checks if the column or row id is negative.

Parameters:

Name Type
address SimpleCellAddress

Returns: boolean


# isError

isError(text: string, errorMapping: Record‹string, ErrorType›): boolean

Defined in src/CellContentParser.ts:86 (opens new window)

Parameters:

Name Type
text string
errorMapping Record‹string, ErrorType

Returns: boolean


# isEscapeToken

isEscapeToken(token: RegExpExecArray): boolean

Defined in src/format/parser.ts:131 (opens new window)

Parameters:

Name Type
token RegExpExecArray

Returns: boolean


# isFormula

isFormula(text: string): boolean

Defined in src/CellContentParser.ts:77 (opens new window)

Checks whether string looks like formula or not.

Parameters:

Name Type Description
text string formula

Returns: boolean


# isIsoDate

isIsoDate(value: unknown): boolean

Defined in src/license/vendor/extractKeyData.ts:91 (opens new window)

Returns true when the value is a real calendar date in the YYYY-MM-DD format. A time component, an offset, a numeric timestamp and a date that does not exist are all rejected — the format is the whole contract, and a validator that accepted two spellings would hide a timezone bug at generation instead of surfacing it.

Parameters:

Name Type Description
value unknown the value to check

Returns: boolean


# isNonNegativeInteger

isNonNegativeInteger(value: unknown): value is number

Defined in src/license/vendor/extractKeyData.ts:70 (opens new window)

Returns true when the value is a non-negative integer.

Parameters:

Name Type Description
value unknown the value to check

Returns: value is number


# isNonnegativeInteger

isNonnegativeInteger(x: number): boolean

Defined in src/CrudOperations.ts:668 (opens new window)

Parameters:

Name Type
x number

Returns: boolean


# isPlainObject

isPlainObject(value: unknown): value is Record‹string, unknown›

Defined in src/license/vendor/extractKeyData.ts:61 (opens new window)

Returns true when the value is a plain object.

Parameters:

Name Type Description
value unknown the value to check

Returns: value is Record‹string, unknown›


# isPositiveInteger

isPositiveInteger(x: number): boolean

Defined in src/CrudOperations.ts:664 (opens new window)

Parameters:

Name Type
x number

Returns: boolean


# isRowOrColumnRange

isRowOrColumnRange(leftCorner: SimpleCellAddress, width: number, height: number): boolean

Defined in src/Operations.ts:1100 (opens new window)

Parameters:

Name Type
leftCorner SimpleCellAddress
width number
height number

Returns: boolean


# isSimpleCellAddress

isSimpleCellAddress(obj: unknown): obj is SimpleCellAddress

Defined in src/Cell.ts:214 (opens new window)

Checks if the object is a simple cell address.

Parameters:

Name Type
obj unknown

Returns: obj is SimpleCellAddress


# isSimpleCellRange

isSimpleCellRange(val: unknown): val is SimpleCellRange

Defined in src/AbsoluteCellRange.ts:34 (opens new window)

Type guard that checks if an object is a valid SimpleCellRange.

Parameters:

Name Type Description
val unknown Value to check

Returns: val is SimpleCellRange

True if and only if the object is a valid SimpleCellRange


# isStringArray

isStringArray(value: unknown): value is string[]

Defined in src/license/vendor/extractKeyData.ts:79 (opens new window)

Returns true when the value is an array of strings.

Parameters:

Name Type Description
value unknown the value to check

Returns: value is string[]


# licenseAllowsFunction

licenseAllowsFunction(registry: CapabilityRegistry, resolved: ResolvedCapabilities, canonicalFunctionId: string): boolean

Defined in src/license/CapabilityRegistry.ts:155 (opens new window)

Whether the license lets an instance evaluate — and therefore describe — the given function.

The rule both gate-B function call sites share: a function the capability table does not cover at all is allowed. CapabilityRegistry.capabilityOf returns undefined only for an id no token lists, which the completeness invariant in unit/license/capability-registry.spec.ts guarantees is not an unlisted built-in but a custom, instance-registered function — exempt from gate B by decision D1. Everything the table does cover has to be granted by the entitlement.

Extracted so the interpreter and the function metadata API cannot drift apart. The metadata API exists to describe the functions an instance can actually evaluate, so a second spelling of this rule would eventually let it advertise a function that then returns #LIC! — the exact failure removing the static metadata methods (HF-349) was meant to prevent.

Note this is gate B only: it says nothing about LicenseKeyValidityState. Callers that also need gate A check it separately, because the two gates have different answers for the same key — see the comment on resolveLicense.

Parameters:

Name Type Description
registry CapabilityRegistry the registry the capabilities were resolved against
resolved ResolvedCapabilities the instance's resolved capabilities
canonicalFunctionId string the function id, already resolved through the alias map

Returns: boolean


# licenseTermsOf

licenseTermsOf(data: EntitlementKeyData): LicenseTerms

Defined in src/license/licenseResolution.ts:132 (opens new window)

Reads HyperFormula's terms out of an intact entitlement key payload.

Total on purpose: the vendored reader has already rejected every malformed shape, so every field read here is exactly what EntitlementProductGrant promises. A payload without a hyperformula entry — including products: {} — is a VALID key that grants this library nothing and never expires for it; per HF-307 decision D6-A that cliff is silent. Note this differs from the typed-key format this replaces, where a key licensed to another product carried the expiry HyperFormula was checked against: an entitlement key's product entries each carry their own terms, so another product's dates are not ours to read.

Parameters:

Name Type Description
data EntitlementKeyData the extracted key data

Returns: LicenseTerms


# matchDateFormat

matchDateFormat(str: string): RegExpExecArray[]

Defined in src/format/parser.ts:39 (opens new window)

Parameters:

Name Type
str string

Returns: RegExpExecArray[]


# matchNumberFormat

matchNumberFormat(str: string): RegExpExecArray[]

Defined in src/format/parser.ts:55 (opens new window)

Parameters:

Name Type
str string

Returns: RegExpExecArray[]


# membersOfGroups

membersOfGroups(groupTokens: string[]): string[]

Defined in src/license/capabilities.ts:188 (opens new window)

The members of the given groups, concatenated. The groups are disjoint, so this is a union.

Parameters:

Name Type
groupTokens string[]

Returns: string[]


# memoize

memoizeT›(fn: function): (Anonymous function)

Defined in src/DateTimeDefault.ts:229 (opens new window)

Function memoization for improved performance.

Type parameters:

T

Parameters:

fn: function

▸ (arg: string): T

Parameters:

Name Type
arg string

Returns: (Anonymous function)


# movedSimpleCellAddress Const

movedSimpleCellAddress(address: SimpleCellAddress, toSheet: number, toRight: number, toBottom: number): SimpleCellAddress

Defined in src/Cell.ts:205 (opens new window)

Parameters:

Name Type
address SimpleCellAddress
toSheet number
toRight number
toBottom number

Returns: SimpleCellAddress


# normalizeAddedIndexes

normalizeAddedIndexes(indexes: ColumnRowIndex[]): ColumnRowIndex[]

Defined in src/Operations.ts:1068 (opens new window)

Parameters:

Name Type
indexes ColumnRowIndex[]

Returns: ColumnRowIndex[]


# normalizeCapabilityToken

normalizeCapabilityToken(token: string): string

Defined in src/license/capabilities.ts:81 (opens new window)

The canonical spelling of a capability token for table lookups.

Token names are case-insensitive — the packaging doc states it outright for its fun:* vocabulary, and tolerating case on the other tokens costs nothing since none of them collide under lowercasing. Surrounding whitespace is trimmed for a sharper reason than tidiness: every rule that reads a token has to read the SAME token, and a padded one used to be read two different ways at once — ' feat:crud' failed the feat: prefix test that decides whether a key speaks the feature vocabulary, so the key was granted all five feature areas instead of the one it named, while 'feat:crud ' passed that test and then missed the table, granting none.

Normalization happens at LOOKUP, never at storage: an entitlement carries the key's own spellings (they are diagnostics), and CAPABILITY_TABLE is keyed by the normalized form.

Parameters:

Name Type Description
token string a capability token as the key spells it

Returns: string


# normalizeProductEntry

normalizeProductEntry(entry: unknown): EntitlementProductGrant | null

Defined in src/license/vendor/extractKeyData.ts:137 (opens new window)

Verifies and normalizes one product entry.

Strict about SHAPE: exactly one of the two dates, a real date, and the two window sizes. A key that gets this wrong is malformed, not merely unknown, and reading it would mean guessing what was licensed.

Lenient about VOCABULARY: an unrecognised capability token, an unrecognised flag and an unrecognised extra field are all kept and ignored. Without that leniency every token added on the issuing side would break every library version already deployed in the field.

Returns null when the entry is malformed.

Parameters:

Name Type Description
entry unknown the product entry of the payload

Returns: EntitlementProductGrant | null


# normalizeRemovedIndexes

normalizeRemovedIndexes(indexes: ColumnRowIndex[]): ColumnRowIndex[]

Defined in src/Operations.ts:1037 (opens new window)

Parameters:

Name Type
indexes ColumnRowIndex[]

Returns: ColumnRowIndex[]


# noticeIdentityOf

noticeIdentityOf(licenseKey: string): string

Defined in src/helpers/licenseKeyValidator.ts:142 (opens new window)

The warn-once identity of a key: its trailing 129 characters, after trimming — for an intact entitlement key, the sha512 checksum plus the closing bracket that ends the machine-readable block, unique per distinct key content.

Trimmed because the reader ignores trailing whitespace (it looks for the block, not for the end of the string), so 'KEY' and 'KEY\n' are one license and must be one identity here too. Reading from the END rather than the start also makes the whole artifact and its bare [...] block — which the format says are equally valid spellings of the same license — one identity.

Truncated because the set retains its entries for the life of the process: a multi-tenant server building one engine per customer-supplied key would otherwise accumulate every full key string it has ever warned about; 129 characters per entry bounds that to the checksum alone.

Parameters:

Name Type
licenseKey string

Returns: string


# notifyLicenseKeyNotice

notifyLicenseKeyNotice(licenseKey: string, expiryDate: Date): void

Defined in src/helpers/licenseKeyValidator.ts:117 (opens new window)

Prints a one-time notice that a VALID entitlement key's usage-until expiry is approaching, at most once per distinct license key.

Called from src/license/licenseResolution.ts's resolveLicense, alongside notifyLicenseKeyState — see that function's doc for why the two share this module instead of each keeping a message table and a flag of their own.

The wording is rev 5 §3.2's own subscription clause ("valid until {date} (UTC)"), naming the key's LAST covered day. It deliberately does not say "expires on": the pre-existing expired message reports the first day NOT covered (validityOf's convention, +1 day), and two messages for the same key must not name two different days for the same boundary. "Valid until Aug 25" followed later by "expired on Aug 26" is consistent; "expires on Aug 25" followed by "expired on Aug 26" is a support ticket.

Parameters:

Name Type Description
licenseKey string the raw key string; only its identity is retained, see below
expiryDate Date the last covered day of the key's usage-until axis, at UTC midnight

Returns: void


# notifyLicenseKeyState

notifyLicenseKeyState(state: LicenseKeyValidityState, keyValidityDate?: Date): void

Defined in src/helpers/licenseKeyValidator.ts:88 (opens new window)

Prints the console message for a non-valid license key state, at most once per page load.

Extracted so the entitlement-key path in src/license/licenseResolution.ts reports the same states with the same wording and the same once-only behaviour, without duplicating the message table or getting a second _notified flag of its own — two flags would let a page print two warnings for one key.

Parameters:

Name Type Description
state LicenseKeyValidityState the state to report; VALID prints nothing
keyValidityDate? Date -

Returns: void


# numberFormat

numberFormat(tokens: FormatToken[], value: number): RawScalarValue

Defined in src/format/format.ts:78 (opens new window)

Parameters:

Name Type
tokens FormatToken[]
value number

Returns: RawScalarValue


# numberToSimpleTime

numberToSimpleTime(arg: number): SimpleTime

Defined in src/DateTimeHelper.ts:304 (opens new window)

Parameters:

Name Type
arg number

Returns: SimpleTime


# objectDestroy

objectDestroy(object: any): void

Defined in src/Destroy.ts:6 (opens new window)

license Copyright (c) 2025 Handsoncode. All rights reserved.

Parameters:

Name Type
object any

Returns: void


# offsetMonth

offsetMonth(date: SimpleDate, offset: number): SimpleDate

Defined in src/DateTimeHelper.ts:286 (opens new window)

Parameters:

Name Type
date SimpleDate
offset number

Returns: SimpleDate


# padLeft

padLeft(number: number | string, size: number): string

Defined in src/format/format.ts:58 (opens new window)

Parameters:

Name Type
number number | string
size number

Returns: string


# padRight

padRight(number: number | string, size: number): string

Defined in src/format/format.ts:66 (opens new window)

Parameters:

Name Type
number number | string
size number

Returns: string


# parse

parse(str: string): FormatExpression

Defined in src/format/parser.ts:121 (opens new window)

Parameters:

Name Type
str string

Returns: FormatExpression


# parseDateFormat

parseDateFormat(dateFormat: string): object

Defined in src/DateTimeDefault.ts:206 (opens new window)

Parses a date format string into a format object.

Parameters:

Name Type
dateFormat string

Returns: object

  • dayItem: number

  • itemsCount: number

  • longYearItem: number

  • monthItem: number

  • shortYearItem: number


# parseForDateTimeFormat

parseForDateTimeFormat(str: string): MaybeFormatExpression

Defined in src/format/parser.ts:96 (opens new window)

Parameters:

Name Type
str string

Returns: MaybeFormatExpression


# parseForNumberFormat

parseForNumberFormat(str: string): MaybeFormatExpression

Defined in src/format/parser.ts:109 (opens new window)

Parameters:

Name Type
str string

Returns: MaybeFormatExpression


# parseIsoDate

parseIsoDate(isoDate: string, dateLabel: string): ParsedIsoDate

Defined in src/license/vendor/utils.ts:54 (opens new window)

Parses the date in the YYYY-MM-DD format into its numeric parts and the epoch milliseconds of its UTC midnight. Throws when the date is malformed or does not exist in the calendar.

Parameters:

Name Type Description
isoDate string the date to parse
dateLabel string the date name used in the error message

Returns: ParsedIsoDate


# parseTimeFormat

parseTimeFormat(timeFormat: string): object

Defined in src/DateTimeDefault.ts:186 (opens new window)

Parses a time format string into a format object.

Parameters:

Name Type
timeFormat string

Returns: object

  • hourItem: number

  • itemsCount: number

  • minuteItem: number

  • secondItem: number


# postMortem

postMortem(method: any): (Anonymous function)

Defined in src/Destroy.ts:16 (opens new window)

Parameters:

Name Type
method any

Returns: (Anonymous function)


# releaseDateTimestamp

releaseDateTimestamp(): number | null

Defined in src/license/licenseResolution.ts:112 (opens new window)

The build's release date as epoch milliseconds (UTC midnight), or null when it is unknown or malformed.

Read from the same HT_RELEASE_DATE (DD/MM/YYYY) the legacy validator uses, but parsed differently on purpose, and the difference is observable — so do not "simplify" either one to match the other without reading this.

This function uses Date.UTC. The legacy validator builds the same value with new Date(month/day/year), which is parsed in the host's LOCAL zone. East of UTC the two land on different day numbers for one and the same release date:

HT_RELEASE_DATE=10/08/2026        legacy (local)   this function (UTC)
  TZ=UTC, TZ=America/Los_Angeles      20675              20675     agree
  TZ=Asia/Tokyo                       20674              20675     differ by a day
  TZ=Pacific/Kiritimati               20674              20675     differ by a day

UTC is the required reading for an entitlement key: key spec rev 6 §1.2 makes offline/online parity a hard rule — the offline check and a future online check must return the same verdict for the same key at the same instant — and any rule reading a local clock breaks it. The legacy path keeps its local parse because legacy behaviour is frozen for this release; switching it would move the expiry verdict of already-issued legacy keys by a day for every customer east of UTC.

The consequence, flagged rather than hidden: two customers east of UTC, one on a legacy key and one on an equivalent entitlement key, can disagree by a day about whether this build is covered. Reconciling them is a product decision, not a refactor.

Returns: number | null


# replacer

replacer(key: string, val: any): any

Defined in src/errors.ts:135 (opens new window)

Parameters:

Name Type
key string
val any

Returns: any


# resolveLicense

resolveLicense(licenseKey: string, notifyConsole: boolean): ResolvedLicense

Defined in src/license/licenseResolution.ts:351 (opens new window)

Resolves a license key into both gates' inputs.

Routing follows the vendored detectLicenseKeyFormat, whose test order is normative (key spec addendum, T12): the literals, then the trailing bracketed block that marks an entitlement key, then the legacy 25-character shape. Everything that is not an entitlement key — gpl-v3, a legacy key, an empty string — falls through to checkLicenseKeyValidity completely unchanged, which is what keeps this from touching existing behaviour. A string that carries a bracketed block routes here even when the block is garbage: such a key is INVALID, not a legacy key that happens to contain brackets.

The invariant this function exists to protect. Only a VALID entitlement key resolves to a restricted entitlement. Every other outcome — missing, invalid, or expired, for an entitlement key as much as for a legacy one — resolves to unrestrictedEntitlement. That asymmetry is deliberate and load-bearing: gate A already stops formula evaluation on its own (a bad key yields #LIC! in cells), while gate B additionally makes PR 2's ensureCapability throw from the CRUD API. Letting a bad key restrict the entitlement would turn today's "formulas fail, the API still works" into "the API throws", which is a silent breaking change for every existing user whose key lapsed. D3's fail-closed rule governs unrecognized tokens INSIDE an otherwise valid key; it is not a rule about invalid keys, and conflating the two is exactly the mistake this comment is here to prevent.

A checksum-valid key whose payload shape cannot be read is INVALID, not a crash and not a free pass: every payload field is untrusted, so nothing here may assume a shape the vendored reader has not verified.

Parameters:

Name Type Default Description
licenseKey string - the raw licenseKey config value
notifyConsole boolean true pass false for a resolution whose result exists only to be thrown away (e.g. the transient serialization-only Config that rebuildWithConfig builds from the OUTGOING config) — such a resolution must not print notices for a key the caller is in the middle of replacing. Legacy keys notify inside checkLicenseKeyValidity behind a once-per-page-load flag, so they cannot double-print regardless of this parameter.

Returns: ResolvedLicense


# roundToEpsilon

roundToEpsilon(arg: number, epsilon: number): number

Defined in src/DateTimeHelper.ts:299 (opens new window)

Parameters:

Name Type Default
arg number -
epsilon number 1

Returns: number


# roundToNearestSecond

roundToNearestSecond(arg: number): number

Defined in src/DateTimeHelper.ts:295 (opens new window)

Parameters:

Name Type
arg number

Returns: number


# sha512

sha512(bytes: number[] | Uint8Array): string

Defined in src/license/vendor/sha512.ts:78 (opens new window)

Calculates the SHA-512 checksum of the passed bytes. The implementation is a plain (pure JS) one on purpose. It does not depend on the Web Crypto API (crypto.subtle), which browsers expose only on secure origins (https). Thanks to that, the checksum can be verified on plain http:// pages, for example, intranets of big companies.

A second reason applies on HyperFormula's side: crypto.subtle.digest is asynchronous, and the license key is read from Config's constructor, which is not.

Parameters:

Name Type Description
bytes number[] | Uint8Array the bytes to calculate the checksum from

Returns: string


# simpleCellAddress Const

simpleCellAddress(sheet: number, col: number, row: number): SimpleCellAddress

Defined in src/Cell.ts:198 (opens new window)

Parameters:

Name Type
sheet number
col number
row number

Returns: SimpleCellAddress


# simpleCellRange Const

simpleCellRange(start: SimpleCellAddress, end: SimpleCellAddress): object

Defined in src/AbsoluteCellRange.ts:43 (opens new window)

Parameters:

Name Type
start SimpleCellAddress
end SimpleCellAddress

Returns: object


# simpleColumnAddress Const

simpleColumnAddress(sheet: number, col: number): SimpleColumnAddress

Defined in src/Cell.ts:188 (opens new window)

Parameters:

Name Type
sheet number
col number

Returns: SimpleColumnAddress


# simpleRowAddress Const

simpleRowAddress(sheet: number, row: number): SimpleRowAddress

Defined in src/Cell.ts:179 (opens new window)

Parameters:

Name Type
sheet number
row number

Returns: SimpleRowAddress


# split

splitT›(iterable: IterableIterator‹T›): object

Defined in src/generatorUtils.ts:11 (opens new window)

Type parameters:

T

Parameters:

Name Type
iterable IterableIterator‹T›

Returns: object

  • rest: IterableIterator‹T›

  • value? : T


# stringToUtf8Bytes

stringToUtf8Bytes(text: string): number[]

Defined in src/license/vendor/utils.ts:92 (opens new window)

Encodes the string as UTF-8 bytes. The plain implementation is used on purpose. It does not depend on TextEncoder or Buffer, so the same code works in Node.js and in every browser, including plain http:// pages.

Parameters:

Name Type Description
text string the string to encode

Returns: number[]


# timeToNumber

timeToNumber(time: SimpleTime): number

Defined in src/DateTimeHelper.ts:315 (opens new window)

Parameters:

Name Type
time SimpleTime

Returns: number


# toBasisEU

toBasisEU(date: SimpleDate): SimpleDate

Defined in src/DateTimeHelper.ts:319 (opens new window)

Parameters:

Name Type
date SimpleDate

Returns: SimpleDate


# toHex32

toHex32(value: number): string

Defined in src/license/vendor/sha512.ts:63 (opens new window)

Converts a 32-bit integer to a zero-padded 8-character hex string.

Parameters:

Name Type Description
value number the 32-bit integer value

Returns: string


# truncateDayInMonth

truncateDayInMonth(date: SimpleDate): SimpleDate

Defined in src/DateTimeHelper.ts:291 (opens new window)

Parameters:

Name Type
date SimpleDate

Returns: SimpleDate


# unrestrictedEntitlement

unrestrictedEntitlement(): LicenseEntitlement

Defined in src/license/LicenseEntitlement.ts:92 (opens new window)

The unrestricted entitlement: legacy keys and gpl-v3 resolve to this today.

HF-307 decision D3 (fail-closed, silent) means an entitlement key whose tokens this library version does not recognize at all no longer maps here — it resolves to an entitlement with an empty, silent capability set instead of falling back to unrestricted access. Do not reuse this function for that case.

Returns: LicenseEntitlement


# utf8BytesToString

utf8BytesToString(bytes: number[]): string

Defined in src/license/vendor/utils.ts:136 (opens new window)

Decodes UTF-8 bytes back into a string.

Parameters:

Name Type Description
bytes number[] the bytes to decode

Returns: string


# validateArgToType

validateArgToType(inputValue: any, expectedType: string, paramName: string): void

Defined in src/ArgumentSanitization.ts:81 (opens new window)

Parameters:

Name Type
inputValue any
expectedType string
paramName string

Returns: void


# validateAsSheet

validateAsSheet(sheet: Sheet): void

Defined in src/Sheet.ts:33 (opens new window)

Parameters:

Name Type
sheet Sheet

Returns: void


# validateNumberToBeAtLeast

validateNumberToBeAtLeast(value: number, paramName: string, minimum: number): void

Defined in src/ArgumentSanitization.ts:34 (opens new window)

Parameters:

Name Type
value number
paramName string
minimum number

Returns: void


# validateNumberToBeAtMost

validateNumberToBeAtMost(value: number, paramName: string, maximum: number): void

Defined in src/ArgumentSanitization.ts:40 (opens new window)

Parameters:

Name Type
value number
paramName string
maximum number

Returns: void


# validityOf

validityOf(terms: LicenseTerms): object

Defined in src/license/licenseResolution.ts:237 (opens new window)

Whether an intact entitlement key is still valid, and if not, the day it stopped being valid.

A key with no expiry never expires. Otherwise the expiration date is INCLUSIVE of its last valid day, and a grace period extends it further. A date compared against the build's release date involves no clock at all, which is what keeps an air-gapped install with a wrong system clock working.

An unknown release date resolves to "not expired", matching what the legacy validator already does when HT_RELEASE_DATE is missing: a build that cannot tell its own age must not start rejecting keys that customers paid for.

Parameters:

Name Type Description
terms LicenseTerms the terms of the key

Returns: object

# Object literals

# CellValueDetailedType Const

#CellValueDetailedType: object

Defined in src/Cell.ts:95 (opens new window)


# CellValueType Const

#CellValueType: object

Defined in src/Cell.ts:92 (opens new window)


# consoleMessages Const

#consoleMessages: object

Defined in src/helpers/licenseKeyValidator.ts:37 (opens new window)

List of all not valid messages which may occur.

# expired

expired(__namedParameters: object): string

Defined in src/helpers/licenseKeyValidator.ts:39 (opens new window)

Parameters:

__namedParameters: object

Name Type
keyValidityDate string

Returns: string

# invalid

invalid(): string

Defined in src/helpers/licenseKeyValidator.ts:38 (opens new window)

Returns: string

# missing

missing(): string

Defined in src/helpers/licenseKeyValidator.ts:41 (opens new window)

Returns: string


# coreGrant Const

#coreGrant: object

Defined in src/license/capabilities.ts:260 (opens new window)

# features

features: never[] = []

Defined in src/license/capabilities.ts:260 (opens new window)

# functions

functions: string[] = [...OPERATOR_FUNCTIONS]

Defined in src/license/capabilities.ts:260 (opens new window)


# functions1Grant Const

#functions1Grant: object

Defined in src/license/capabilities.ts:261 (opens new window)

# features

features: never[] = []

Defined in src/license/capabilities.ts:261 (opens new window)

# functions

functions: string[] = [...MATH_ENGINE_FUNCTIONS]

Defined in src/license/capabilities.ts:261 (opens new window)


# functions2Grant Const

#functions2Grant: object

Defined in src/license/capabilities.ts:262 (opens new window)

# features

features: never[] = []

Defined in src/license/capabilities.ts:263 (opens new window)

# functions

functions: string[] = [...MATH_ENGINE_FUNCTIONS, ...CALCULATED_FIELDS_FUNCTIONS]

Defined in src/license/capabilities.ts:263 (opens new window)


# functions3Grant Const

#functions3Grant: object

Defined in src/license/capabilities.ts:265 (opens new window)

# features

features: never[] = []

Defined in src/license/capabilities.ts:266 (opens new window)

# functions

functions: string[] = [...MATH_ENGINE_FUNCTIONS, ...CALCULATED_FIELDS_FUNCTIONS, ...SPREADSHEET_FUNCTIONS]

Defined in src/license/capabilities.ts:266 (opens new window)


# functions4Grant Const

#functions4Grant: object

Defined in src/license/capabilities.ts:268 (opens new window)

# features

features: never[] = []

Defined in src/license/capabilities.ts:273 (opens new window)

# functions

functions: string[] = [ ...MATH_ENGINE_FUNCTIONS, ...CALCULATED_FIELDS_FUNCTIONS, ...SPREADSHEET_FUNCTIONS, ...EXCEL_SIMULATOR_FUNCTIONS, ]

Defined in src/license/capabilities.ts:269 (opens new window)


# maxDate Const

#maxDate: object

Defined in src/DateTimeHelper.ts:51 (opens new window)

# day

day: number = 31

Defined in src/DateTimeHelper.ts:51 (opens new window)

# month

month: number = 12

Defined in src/DateTimeHelper.ts:51 (opens new window)

# year

year: number = 9999

Defined in src/DateTimeHelper.ts:51 (opens new window)


  1. 0-9a-f ↩︎

  2. A-Za-z0-9-_ ↩︎

  3. 0-9a-fA-F ↩︎

  4. 0-9/.\-: ↩︎