Methods
# static addThousandSeperator(number)
adds dots on the appropriate places for numbers.
Parameters:
| Name | Type | Description |
|---|---|---|
number |
*
|
number to be converted |
# static stripHtml(text) → {string|false}
Remove HTML-tags from html-string
Parameters:
| Name | Type | Description |
|---|---|---|
text |
string
|
String to be stripeed |
String without HTML-tags or false when input does not contain text
string
|
false
Example
import { stripHtml } from "nan-design-system/utils";
const text = stripHtml("<div> This is a <b>test</b> </div>"); //returns "This is a test"
# static toEuroFormat(price, text)
Converts number to euro price.
Parameters:
| Name | Type | Description |
|---|---|---|
price |
*
|
price to be converted |
text |
*
|
where or not euro should be a sign in front or text behind the price. |