class DatabaseArray - nsc-de/js-database GitHub Wiki

Overview

fields functions
#data #set()
#length #setDefault()
#get()
#getNormal()
#update()
#contains()
#push()

Fields

data

(get & set) The data of the DatabaseArray


length

(get) Returns the length of the array


Functions

set()

Sets a value from the DatabaseArray

parameters
key the path to apply the value to
value the value to apply to the given path

returns the DatabaseArray itself, so you can chain operations like that


setDefault()

Sets a default value from the DatabaseArray

parameters
key the path to apply the value to
value the value to apply to the given path

returns the DatabaseArray itself, so you can chain operations like that


get()

Gets a value from the DatabaseArray

parameters
key the path to apply the value to

returns the value of the key


getNormal()

Gets a value from the DatabaseArray normalizes it

parameters
key the path to apply the value to

returns the normalized value of the key


update()

Upates a value from the DatabaseArray

parameters
key the path to apply the value to
update the funciton to update the value

returns the DatabaseArray itself, so you can chain operations like that


contains()

Checks if the DatabaseArray contains a value

parameters
key the path to apply the value to

returns does the array contains the value


push()

Pushs a value into the DatabaseArray

parameters
...values the values to push into the array

returns the DatabaseArray itself, so you can chain operations like that

⚠️ **GitHub.com Fallback** ⚠️