Title

Global

Members

# constant firebaseDataBaseUrl

A link to database on firebase

View Source helpers/variables.js, line 10

Object

# constant rgxpImageUrl

RegExp patter to validate an img url

View Source components/Forms/validators.js, line 9

Object

# constant rgxpNumber

RegExp patter to validate a number

View Source components/Forms/validators.js, line 1

# constant userIdStorageKey

A key for user id set in localStorage

View Source helpers/variables.js, line 1

Methods

# generateUniqId() → {string}

Generates a uniq id

View Source helpers/functions.js, line 47

uniq id

string

# getCartSum(cart) → {number}

Gets the sum of cart items

Parameters:
Name Type Description
cart array

user's cart items

View Source helpers/functions.js, line 18

Sum of cart items

number

# getNumberOfCartItems(cart) → {number}

Gets the number of cart items

Parameters:
Name Type Description
cart userIdStorageKey

user's cart items

View Source helpers/functions.js, line 1

Number of cart items

number

# getPriceToFixed(price, limit) → {string}

Normalizes the product's price

Parameters:
Name Type Description
price number

product's price

limit number

limit of characters to shorten the price

View Source helpers/functions.js, line 33

updated product's price

string

# getUserId() → {string}

Gets the user by id

View Source helpers/functions.js, line 59

user's id

string

# validateImgUrl(url) → {boolean}

Validates value to be a url image

Parameters:
Name Type Description
url string

a url to check

View Source components/Forms/validators.js, line 33

boolean

# validateMinLength(value, number) → {boolean}

Validates value to be more than min length set

Parameters:
Name Type Description
value string

a value to check

number minLength

min length

View Source components/Forms/validators.js, line 59

boolean

# validateNotEmptyText(text) → {boolean}

Validates value to be not empty

Parameters:
Name Type Description
text string

a text to check

View Source components/Forms/validators.js, line 46

boolean

# validateNumber(number) → {boolean}

Validates value to be a number

Parameters:
Name Type Description
number number

a number to check

View Source components/Forms/validators.js, line 20

boolean