InternalFunctionUtils class
内部でのみ使用されるユーティリティ関数
プロパティ
Millisecond |
ティックとミリ秒の間で変換する定数。 |
Unix |
unix タイムスタンプをティックに変換するための定数。 |
メソッド
プロパティの詳細
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)
オブジェクトの共通文字列化。
static function commonStringify(input: unknown): string
パラメーター
- input
-
unknown
入力オブジェクト。
戻り値
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)
ラムダ エバリュエーター。
static function lambdaEvaluator<T, U>(expression: Expression, state: MemoryInterface, options: Options, list: T[], callback: (currentItem: T, result: U, error: string) => boolean)
パラメーター
- 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 とエラー。
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
メモリからのパスの値。