Module

Formatters

Methods

# static addThousandSeperator(number)

adds dots on the appropriate places for numbers.
Parameters:
Name Type Description
number * number to be converted
Author:

View Source formatters.js, line 44

# static stripHtml(text) → {string|false}

Remove HTML-tags from html-string
Parameters:
Name Type Description
text string String to be stripeed
Author:

View Source formatters.js, line 12

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.
Author:

View Source formatters.js, line 28