Skip to content

Commit

Permalink
Merge pull request #49 from vandres/master
Browse files Browse the repository at this point in the history
allow look up of convertible types also in nested maps
  • Loading branch information
Dale Nguyen authored May 26, 2020
2 parents dde7721 + 7f28278 commit 6c7ea9a
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 32 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,15 @@ firebase firestore:delete [options] <<path>>
#### For local JSON
Usually the date, location & reference is not converted correctly when you backup the Firestore database. In order to import correctly, you have to pass to parameters for the options:
Usually the date, location & reference are not converted correctly when you backup the Firestore database. In order to import correctly, you have to pass to parameters for the options:
```javascript
// Import options
const options = {
dates: ['date1', 'date1.date2', 'date1.date2.date3'],
geos: ['location', 'locations'],
refs: ['refKey'],
nested: true // look up the data keys also in nested maps
};
```
Expand Down
1 change: 1 addition & 0 deletions dist/import.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export interface IImportOptions {
dates?: string[];
geos?: string[];
refs?: string[];
nested?: boolean;
}
/**
* Restore data to firestore
Expand Down
25 changes: 17 additions & 8 deletions dist/import.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6c7ea9a

Please sign in to comment.