shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
currencySymbolToCode
Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.currency
This function return the currency code like “USD” from a symbol like ”$“
Params
- symbol*-String
The currency symbol to get the code from
Return
- -String
The currency code
Example
import { currencySymbolToCode } from '@blackbyte/sugar/currency';
currencySymbolToCode('$'); // => USDAuthor
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space