2.0.10 • Published 1 year ago

firestore-function-utils v2.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Firestore Function Utils

npm version

Overview

This zero dependency package includes some utility functions and types for writing Google Cloud Function triggers for Firestore.

Example

export function onUserChange(change: FirestoreChange<T>, event: FirestoreEvent) {
    const before = parseFirestoreChangeValue('userId', change, event);
    const after = parseFirestoreChangeValue('userId', change, event);
    console.log(before);
    /*
    {
      id: "0vdxYqEisf5vwJLhyLjA"
      createdAt: Date('2019-04-29T16:35:33.195Z'),
  	  updatedAt: Date('2019-04-29T16:35:33.195Z'),
  	  data: {
  	  	username: 'johndoe',
  	  	gender: 'male',
  	  	newsletter: true
  	  }
    }
     */

}
2.0.10

1 year ago

2.0.9

1 year ago

2.0.7

2 years ago

2.0.8

2 years ago

2.0.6

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.0

4 years ago