JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q37968F
  • License MIT

Simple in memory collection with Rx / Observable interface.

Package Exports

  • blow-collection

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (blow-collection) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

blow-collection

Codeship Status for mchmielarski/blow-collection

Simple in memory collection with Rx / Observable interface.

interface CollectionOptions {
    idKey?: string;
    idGenerator?: () => string | number;
}

class Collection<T> {
    constructor(options?: CollectionOptions);
    create(data: any): Observable<T>;
    update(where: QueryWhere, data: any): Observable<number>;
    updateOrCreate(data: any): Observable<T>;
    count(where: QueryWhere): Observable<number>;
    destroy(where: QueryWhere): Observable<number>;
    destroyById(id: any): Observable<boolean>;
    find(query?: QueryObject): Observable<T>;
    findOne(query: QueryObject): Observable<T>;
    findById(id: any): Observable<T>;
    findOrCreate(where: QueryWhere, data: any): Observable<T>;
    exists(id: any): Observable<boolean>;
}