InternalFunctionUtils class

公用程式函式只使用內部

屬性

MillisecondToTickConstant

在刻度和毫秒之間轉換的常數。

UnixMilliSecondToTicksConstant

將 unix 時間戳記轉換成刻度數的常數。

方法

accessIndex(any, number)

查閱物件的字串或數位索引。

accessProperty(any, string)

查閱 Map 或 Object 中的屬性。

commonStringify(unknown)

常見的 Stringify 物件。

convertToList(unknown)

將物件轉換成陣列。 如果實例是陣列,則傳回本身。 如果實例是物件,則傳回 {key, value} 配對清單。 否則會傳回未定義。

foreach(Expression, MemoryInterface, Options)

foreach 和 select 函式的評估工具。

getTextDecoder(string)

TextDecoder 協助程式函式。

getTextEncoder()

TextEncoder 協助程式函式。

isLogicTrue(any)

在邏輯比較函式中查看 True 的測試結果。

lambdaEvaluator<T, U>(Expression, MemoryInterface, Options, T[], (currentItem: T, result: U, error: string) => boolean)

Lambda 評估工具。

parseStringOrUndefined(string | undefined)

將字串或未定義包裝成字串。 預設為空字串。

parseTimexProperty(any)

剖析 timex 運算。

parseUri(string)

將字串剖析為 URL 物件。

sortBy(boolean)

排序協助程式函式。

ticks(string)

將字串輸入轉換成刻度數位。

timeUnitTransformer(number, string)

將 C# 期間和單位轉換成 js 句點和單位。

ValidateLambdaExpression(Expression)

foreach、select 和 where 函式的驗證程式。

verifyISOTimestamp(any)

確認時間戳記字串是有效的 ISO 時間戳記格式。

verifyTimestamp(any)

確認時間戳記字串是有效的時間戳記格式。

wrapGetValue(MemoryInterface, string, Options)

從記憶體取得路徑的值。

屬性詳細資料

MillisecondToTickConstant

在刻度和毫秒之間轉換的常數。

static MillisecondToTickConstant: BigInteger = bigInt('10000')

屬性值

BigInteger

UnixMilliSecondToTicksConstant

將 unix 時間戳記轉換成刻度數的常數。

static UnixMilliSecondToTicksConstant: BigInteger = bigInt('621355968000000000')

屬性值

BigInteger

方法詳細資料

accessIndex(any, number)

查閱物件的字串或數位索引。

static function accessIndex(instance: any, index: number): ValueWithError

參數

instance

any

具有 屬性的實例。

index

number

要查閱的屬性。

傳回

如果有的話,值和錯誤資訊。

accessProperty(any, string)

查閱 Map 或 Object 中的屬性。

static function accessProperty(instance: any, property: string): ValueWithError

參數

instance

any

具有 屬性的實例。

property

string

要查閱的屬性。

傳回

如果有的話,值和錯誤資訊。

commonStringify(unknown)

常見的 Stringify 物件。

static function commonStringify(input: unknown): string

參數

input

unknown

input 物件。

傳回

string

字串化物件。

convertToList(unknown)

將物件轉換成陣列。 如果實例是陣列,則傳回本身。 如果實例是物件,則傳回 {key, value} 配對清單。 否則會傳回未定義。

static function convertToList(instance: unknown): unknown[] | undefined

參數

instance

unknown

輸入實例。

傳回

unknown[] | undefined

產生的清單。

foreach(Expression, MemoryInterface, Options)

foreach 和 select 函式的評估工具。

static function foreach(expression: Expression, state: MemoryInterface, options: Options): ValueWithError

參數

expression
Expression

運算式。

state
MemoryInterface

記憶體範圍。

options
Options

選項。

傳回

評估的清單。

getTextDecoder(string)

TextDecoder 協助程式函式。

static function getTextDecoder(code: string): TextDecoder

參數

code

string

編碼格式。

傳回

TextDecoder

文字解碼器。

getTextEncoder()

TextEncoder 協助程式函式。

static function getTextEncoder(): TextEncoder

傳回

TextEncoder

文字編碼器。

isLogicTrue(any)

在邏輯比較函式中查看 True 的測試結果。

static function isLogicTrue(instance: any): boolean

參數

instance

any

計算值。

傳回

boolean

如果布林值為 true 或非 Null,則為 True。

lambdaEvaluator<T, U>(Expression, MemoryInterface, Options, T[], (currentItem: T, result: U, error: string) => boolean)

Lambda 評估工具。

static function lambdaEvaluator<T, U>(expression: Expression, state: MemoryInterface, options: Options, list: T[], callback: (currentItem: T, result: U, error: string) => boolean)

參數

expression
Expression

expression:

state
MemoryInterface

記憶體狀態。

options
Options

選項。

list

T[]

專案清單。

callback

(currentItem: T, result: U, error: string) => boolean

回呼。 會傳回 應該中斷旗標。

parseStringOrUndefined(string | undefined)

將字串或未定義包裝成字串。 預設為空字串。

static function parseStringOrUndefined(input: string | undefined): string

參數

input

string | undefined

輸入字串

傳回

string

包裝的字串。

parseTimexProperty(any)

剖析 timex 運算。

static function parseTimexProperty(timexExpr: any): { error: string, timexProperty: TimexProperty }

參數

timexExpr

any

字串或 TimexProperty 輸入。

傳回

{ error: string, timexProperty: TimexProperty }

TimexProperty 和 error。

parseUri(string)

將字串剖析為 URL 物件。

static function parseUri(uri: string): ValueWithError

參數

uri

string

輸入字串 URI。

傳回

剖析的 URL 物件。

sortBy(boolean)

排序協助程式函式。

static function sortBy(isDescending: boolean): EvaluateExpressionDelegate

參數

isDescending

boolean

遞減旗標。

傳回

已排序的陣列。

ticks(string)

將字串輸入轉換成刻度數位。

static function ticks(timeStamp: string): ValueWithError

參數

timeStamp

string

字串時間戳記輸入。

傳回

以刻度轉換的字串。

timeUnitTransformer(number, string)

將 C# 期間和單位轉換成 js 句點和單位。

static function timeUnitTransformer(duration: number, cSharpStr: string): { duration: number, tsStr: OpUnitType }

參數

duration

number

C# 持續時間。

cSharpStr

string

C# 單位。

傳回

{ duration: number, tsStr: OpUnitType }

已轉換的 timeUnit。

ValidateLambdaExpression(Expression)

foreach、select 和 where 函式的驗證程式。

static function ValidateLambdaExpression(expression: Expression)

參數

expression
Expression

要驗證的運算式。

verifyISOTimestamp(any)

確認時間戳記字串是有效的 ISO 時間戳記格式。

static function verifyISOTimestamp(value: any): string | undefined

參數

value

any

要檢查的時間戳記字串。

傳回

string | undefined

如果無效,則為錯誤或未定義。

verifyTimestamp(any)

確認時間戳記字串是有效的時間戳記格式。

static function verifyTimestamp(value: any): string | undefined

參數

value

any

要檢查的時間戳記字串。

傳回

string | undefined

如果無效,則為錯誤或未定義。

wrapGetValue(MemoryInterface, string, Options)

從記憶體取得路徑的值。

static function wrapGetValue(state: MemoryInterface, path: string, options: Options): any

參數

state
MemoryInterface

記憶體。

path

string

路徑字串。

options
Options

選項。

傳回

any

記憶體路徑的值。