1.1.0 • Published 7 years ago

@emjimadhu/firebase-helpers v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

FIREBASE-HELPERS

A Tiny Helper utility to use Firebase.

Installation

npm install @emjimadhu/firebase-helpers

Usuage

  import Firebase from '@emjimadhu/firebase-helpers'

  // Intialize Firebase by passing Firebase Config Object
  Firebase.init(options)

  // Staet Using it
  const dataArr = Firebase.read('some-awesome-collection')

Table of Contents (APIs)

Firebase

Class Firebase Object.

init

initializes Firebase Instance.

Parameters

  • options object Firebase Config Options.

Returns void No Return.

read

Read Collect Datas

Parameters

  • collectionName string Name of the Firestore Collection to read

Returns array Array of Datas.

add

Add Data to Firestore Collection

Parameters

  • collectionName string Name of the Firestore Collection.
  • data object Data to stored.

Returns object Returns data reference

login

Login using Email And Password to Firebase

Parameters

  • options object Object contiaining Email And Password Keys.
    • options.email
    • options.password

Returns object Returns User Object

register

Register using Email And Password to Firebase

Parameters

  • options object Object contiaining Email And Password Keys.
    • options.email
    • options.password

Returns object Returns User Object

logout

Logsout from Firebase.

Returns void Returns undefined

socialLogin

Firebase Social Authentications

Parameters

  • socialName string Name of the Social Authtication to Connect (ex: google, facebook, twitter and github)

Returns object Returns User Object

currentUser

Get Currently Logged In User.

Returns object Returns User Object

sendEmailVerification

Send Email Verification

Returns object Returns Status Information

resetpassword

Reset Password

Parameters

  • email string An Email address to send Reset password link

Returns object Returns status

1.1.0

7 years ago