# API
# parse
Parses a currency formatted string emitted by the v-currency directive to a number. This method is also exposed as Vue instance method $ci.parse when installed as Vue plugin.
# Arguments
| Name | Description |
|---|---|
formattedValue | The currency formatted string to be parsed, for example "$1,234.50". |
options | The configured options of the respective v-currency directive. When using $ci.parse this argument is optional and defaults to the globalOptions of the plugin options. |
# Returns
The parsed number (for example 1234.5) or null if the formatted string does not conform.
# Example
# getValue
Returns the current number value of an input. This method is also exposed as Vue instance method $ci.getValue when installed as Vue plugin.
# Arguments
| Name | Description |
|---|---|
ref | The HTML element or Vue component the v-currency directive is bound to. |
# Returns
The current number value or null if empty.
# Example
# setValue
Sets the value of an input programmatically. This method is also exposed as Vue instance method $ci.setValue when installed as Vue plugin.
# Arguments
| Name | Description |
|---|---|
ref | The HTML element or Vue component the v-currency directive is bound to. |
value | The number to be set or null to clear the input. |