Members
EventEmitter
This is a simple wrapper to unify EventEmitter implementations across platforms.
(constant) config
Based on https://github.com/react-native-async-storage/async-storage/blob/main/packages/default-storage-backend/src/types.ts
Methods
nestedSet(obj, key, value)
Allows setting properties/variables deep in an object. Converts a.b into { a: { b: value } } for dot notation on Objects Converts a.0.b into { a: [{ b: value }] } for dot notation on Arrays
Parameters:
Name | Type | Description |
---|---|---|
obj |
The object to assign the value to |
|
key |
The key to assign. If it's in a deeper path, then use dot notation ( |
|
value |
The value to assign. If it's an |
relativeTimeToDate(text, nowopt) → {RelativeTimeToDateResult}
Converts human readable relative date string, for example, 'in 10 days' to a date relative to now.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
text |
string
|
The text to convert. |
|
now |
Date
|
<optional> |
The date from which add or subtract. Default is now. |
Returns:
- Type:
-
RelativeTimeToDateResult
Type Definitions
RelativeTimeToDateResult
Properties:
Name | Type | Description |
---|---|---|
status |
string
|
The conversion status, |
info |
string
|
The error message if conversion failed, or the relative
time indication ( |
result |
Date
|
undefined
|
The converted date, or |