@typeheim/fire-legion
Advanced tools
Comparing version
{ | ||
"name": "@typeheim/fire-legion", | ||
"version": "0.0.0-beta.36", | ||
"version": "0.0.0-beta.37", | ||
"description": "Fire Legion", | ||
@@ -42,6 +42,5 @@ "keywords": [ | ||
"dependencies": { | ||
"@typeheim/fire-auth": "^0.0.0-beta.36", | ||
"@typeheim/orm-on-fire": "^0.0.0-beta.34" | ||
}, | ||
"gitHead": "1699ad280917aa2de38baf4f8bd8a20fba9fefc3" | ||
"@typeheim/fire-auth": "^0.0.0-beta.37", | ||
"@typeheim/orm-on-fire": "^0.0.0-beta.37" | ||
} | ||
} |
# Fire Legion | ||
DDD framework to work with Firebase | ||
Includes: | ||
* ORM On Fire - Firestore ORM | ||
@@ -13,3 +15,10 @@ * FireRx - RxJS extension that provides async capabilities | ||
```typescript | ||
import { Aggregate, Entity, Collection, CollectionRef, ID, Field } from '@typeheim/orm-on-fire' | ||
import { | ||
Aggregate, | ||
Entity, | ||
Collection, | ||
CollectionRef, | ||
ID, | ||
Field | ||
} from '@typeheim/orm-on-fire' | ||
@@ -29,3 +38,3 @@ @Aggregate() | ||
@Entity({collection: 'user-files'}) | ||
@Entity({ collection: 'user-files' }) | ||
export class UserFile { | ||
@@ -50,17 +59,1 @@ @ID() id: string | ||
``` | ||
## FireRx | ||
Want Rx.JS to work as promises? Here you go: | ||
```typescript | ||
import { FireReplaySubject } from '@typeheim/fire-rx' | ||
let subject = new FireReplaySubject<number>(1) | ||
subject.next(5) | ||
let value = await subject // 5 | ||
subject.next(6) | ||
let nextValue = await subject // 6 | ||
``` |
2244
-53.35%3
-57.14%13
-66.67%57
-10.94%