/FireCRUD

A CRUD framework for Firebase. Handles all the backend and automatic updating. Just create a simple java object and provide any necessary info regarding the users and a full CRUD list will be created.

Primary LanguageJavaScript

Classes

Creates an instance of FireCRUD

FireCRUD

## Functions
createUser(userId)

Adds a user to the firebase user branch

generateID(idLength)string

Generates a random user ID

## Events
"userChanges"

Main event listener that handles all major updates

"userDeleted"

Deletes the row when a user has been deleted

"userEdited"

Deletes original copy of a row when a child has been edited (The edited version will be appended in another event listener)

"deletingClients"

Handles deletion of a user in a row

"editingClients"

Handles editing of a user in a row

"createUser"

Handles user creation

"userDeletionEditing"

Confirm deletion or editing event

## Creates an instance of FireCRUD FireCRUD

Kind: global class

new Creates an instance of FireCRUD(firebaseUserURL, columns)

A CRUD interface for Firebase to manage clients/users

Param Type Description
firebaseUserURL String the link to the user branch in the Firebase.
columns Object the organization of each of the columns.

createUser(userId)

Adds a user to the firebase user branch

Kind: global function

Param Type Description
userId string Optional, the ID used to identify the user

generateID(idLength) ⇒ string

Generates a random user ID

Kind: global function
Returns: string - id - the ID that the user will be referenced by in Firebase

Param Type Description
idLength integer the length of the ID that is generated (The larger the length, the more secure the users' branch is)

"userChanges"

Main event listener that handles all major updates

Kind: event emitted

"userDeleted"

Deletes the row when a user has been deleted

Kind: event emitted

"userEdited"

Deletes original copy of a row when a child has been edited (The edited version will be appended in another event listener)

Kind: event emitted

"deletingClients"

Handles deletion of a user in a row

Kind: event emitted

"editingClients"

Handles editing of a user in a row

Kind: event emitted

"createUser"

Handles user creation

Kind: event emitted

"userDeletionEditing"

Confirm deletion or editing event

Kind: event emitted