New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@typeheim/fire-legion

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typeheim/fire-legion

Fire Legion

  • 0.0.0-beta.17
  • npm
  • Socket score

Version published
Weekly downloads
9
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

Fire Legion

DDD framework to work with Firebase

Includes:

  • ORM On Fire - Firestore ORM
  • FireRx - RxJS extension that provides async capabilities

ORM On Fire

Delightful Firestore ORM

import { Aggregate, Entity, Collection, CollectionRef, ID, Field } from '@typeheim/orm-on-fire'

@Aggregate()
export class User {
    @ID() id: string

    @Field() firstName: string

    @Field() lastName: string

    @Field() status: string

    @CollectionRef(UserFile) files: Collection<UserFile>
}

@Entity({collection: 'user-files'})
export class UserFile {
    @ID() id: string

    @Field()
    name: string
}

const Users = Collection.of(User)

// with promise-like interface
let markus = await Users.one('markus').get()

// with Rx interface
Users.one('tom').get().subscribe((tom: User) => {
    tom.files.forEach((file: UserFile) => {
        // some cool stuff
    })
}) 

FireRx

Want Rx.JS to work as promises? Here you go:

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

Keywords

FAQs

Package last updated on 18 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc