Namespaces
Utils
Summary
References
Functions
- clearInterval
- clearTimeout
- convertString
- copyToClipboard
- dataDeserialize
- dataSerialize
- debounce
- dismissKeyboard
- dismissSoftInput
- dispatchToMainThread
- dispatchToUIThread
- eliminateDuplicates
- escapeRegexSymbols
- executeOnMainThread
- executeOnUIThread
- GC
- getBaseClasses
- getClass
- getClassInfo
- getDurationWithDampingFromSpring
- getFileExtension
- getModuleName
- hasDuplicates
- isBoolean
- isDataURI
- isDefined
- isEmoji
- isFileOrResourcePath
- isFontIconURI
- isFunction
- isMainThread
- isNullOrUndefined
- isNumber
- isObject
- isRealDevice
- isString
- isUndefined
- mainThreadify
- merge
- mergeSort
- numberHasDecimals
- numberIs64Bit
- openFile
- openUrl
- queueGC
- queueMacrotask
- releaseNativeObject
- sanitizeModuleName
- setInterval
- setTimeout
- throttle
- toUIString
- verifyCallback
References
Variables
CORE_ANIMATION_DEFAULTS
defined in @nativescript/core/utils/common.d.ts:37:21
Default animation values used throughout core
FILE_PREFIX
defined in @nativescript/core/utils/index.d.ts:12:13
RESOURCE_PREFIX
defined in @nativescript/core/utils/index.d.ts:11:13
SDK_VERSION
defined in @nativescript/core/utils/constants.d.ts:1:13
debug
defined in @nativescript/core/utils/debug.d.ts:4:11
A runtime option indicating whether the build has debugging enabled.
Functions
GC
defined in @nativescript/core/utils/index.d.ts:27
An utility function that invokes garbage collection on the JavaScript side.
Returns any
clearInterval
defined in @nativescript/core/timer/index.d.ts:27
Clears repeated function which was set up by calling setInterval().
Returns void
clearTimeout
defined in @nativescript/core/timer/index.d.ts:13
Clears the delay set by a call to the setTimeout function.
Returns void
convertString
defined in @nativescript/core/utils/index.d.ts:132
Converts string value to number or boolean.
Returns any
copyToClipboard
dataDeserialize
Data deserialization from Native > JS
Returns any
dataSerialize
Data serialization from JS > Native
Returns any
debounce
dismissKeyboard
defined in @nativescript/core/utils/index.d.ts:172
Dismiss any keyboard visible on the screen.
Returns void
dismissSoftInput
defined in @nativescript/core/utils/index.d.ts:167
Hides the soft input method, usually a soft keyboard.
Returns void
dispatchToMainThread
Dispatches the passed function for execution on the main thread
Returns any
dispatchToUIThread
Dispatches the passed function for execution on the UI thread
Returns any
eliminateDuplicates
defined in @nativescript/core/utils/index.d.ts:157
Removes duplicate elements from array.
Returns any[]
escapeRegexSymbols
defined in @nativescript/core/utils/index.d.ts:126
Escapes special regex symbols (., *, ^, $ and so on) in string in order to create a valid regex from it.
Returns string
executeOnMainThread
defined in @nativescript/core/utils/index.d.ts:67
Checks if the current thread is the main thread. Directly calls the passed function
if it is, or dispatches it to the main thread otherwise.
Returns any
executeOnUIThread
defined in @nativescript/core/utils/index.d.ts:73
Runs the passed function on the UI Thread.
Returns any
getBaseClasses
defined in @nativescript/core/utils/types.d.ts:88
A function that gets the entire class hierarchy of an object.
Returns string[]
getClass
defined in @nativescript/core/utils/types.d.ts:81
A function that gets the class name of an object.
Returns string
getClassInfo
getClassInfo(object: Object): ClassInfo
defined in @nativescript/core/utils/types.d.ts:95
A function that gets the ClassInfo for an object.
Returns ClassInfo
getDurationWithDampingFromSpring
getDurationWithDampingFromSpring(springSettings?: {
friction?: number
mass?: number
tension?: number
}): {
damping: number
}
defined in @nativescript/core/utils/common.d.ts:52
Get a duration with damping value from various spring related settings.
Helpful when needing to convert spring settings to isolated duration value.
Returns {
damping: number
}
getFileExtension
getModuleName
hasDuplicates
defined in @nativescript/core/utils/index.d.ts:151
Checks if array has any duplicate elements.
Returns boolean
isBoolean
defined in @nativescript/core/utils/types.d.ts:20
A function that checks if something is a valid boolean.
Returns boolean
isDataURI
defined in @nativescript/core/utils/index.d.ts:107
Returns true if the specified URI is data URI (http://en.wikipedia.org/wiki/Data_URI_scheme).
Returns boolean
isDefined
defined in @nativescript/core/utils/types.d.ts:48
A function that checks if something is defined (not undefined).
Returns boolean
isEmoji
isFileOrResourcePath
defined in @nativescript/core/utils/index.d.ts:94
Returns true if the specified path points to a resource or local file.
Returns boolean
isFontIconURI
defined in @nativescript/core/utils/index.d.ts:88
Returns true if the specified URI is a font icon URI like "fontIcon://".
Returns boolean
isFunction
defined in @nativescript/core/utils/types.d.ts:27
A function that checks if something is a function.
Returns boolean
isMainThread
Returns boolean
isNullOrUndefined
defined in @nativescript/core/utils/types.d.ts:55
A function that checks if something is not defined (null or undefined).
Returns boolean
isNumber
defined in @nativescript/core/utils/types.d.ts:13
A function that checks if something is a valid number.
Returns boolean
isObject
defined in @nativescript/core/utils/types.d.ts:34
A function that checks if something is an object.
Returns boolean
isRealDevice
defined in @nativescript/core/utils/index.d.ts:162
Checks whether the application is running on real device and not on simulator/emulator.
Returns boolean
isString
defined in @nativescript/core/utils/types.d.ts:6
A function that checks if something is a valid string.
Returns boolean
isUndefined
defined in @nativescript/core/utils/types.d.ts:41
A function that checks if something is "undefined".
Returns boolean
mainThreadify
defined in @nativescript/core/utils/index.d.ts:82
Returns a function wrapper which executes the supplied function on the main thread.
The wrapper behaves like the original function and passes all of its arguments BUT
discards its return value.
Returns (...args: any[]) => void
merge
mergeSort
defined in @nativescript/core/utils/index.d.ts:145
Sorts an array by using merge sort algorithm (which ensures stable sort since the built-in Array.sort() does not promise a stable sort).
Returns any[]
numberHasDecimals
numberIs64Bit
openFile
openUrl
queueGC
defined in @nativescript/core/utils/index.d.ts:34
An utility function that queues a garbage collection, multiple calls in quick succession are debounced by default and only one gc will be executed after 900ms.
Returns any
queueMacrotask
defined in @nativescript/core/utils/index.d.ts:60
Queues the passed function to be ran in a macroTask
Returns void
releaseNativeObject
defined in @nativescript/core/utils/index.d.ts:54
Releases the reference to the wrapped native object
Returns any
sanitizeModuleName
defined in @nativescript/core/utils/common.d.ts:13
Helps sanitize a module name if it is prefixed with '~/', '~' or '/'
Returns string
setInterval
defined in @nativescript/core/timer/index.d.ts:21
Calls a function repeatedly with a delay between each call.
Returns number
setTimeout
defined in @nativescript/core/timer/index.d.ts:7
Calls a function after a specified delay.
Returns number
throttle
toUIString
defined in @nativescript/core/utils/types.d.ts:116
Returns a string representation of an object to be shown in UI.
Returns string
verifyCallback
defined in @nativescript/core/utils/types.d.ts:62
A function that checks if something is a valid function.
Returns void
- Previous
- Trace
- Next
- capitalizationType