Naivete Precedes Misrepresentation

    mutent-mongodb
    TypeScript icon, indicating that this package has built-in type declarations

    0.10.2 • Public • Published

    mutent-mongodb

    Mutent adapter for MongoDB collections.

    import { Store } from 'mutent'
    import { MongoAdapter } from 'mutent-mongodb'
    
    // TODO: Get a MongoDB collection somehow..
    
    const adapter = new MongoAdapter(collection, {
      /**
       * Do not throw an error when a write action (insertOne, updateOne, deleteOne) does not match any document.
       * @default false
       */
      relax: false,
      /**
       * Always replace the whole document (replaceOne) instead of just update changed fields (updateOne).
       * @default false
       */
      replace: false
    })
    
    const store = new Store({
      name: 'MyCollectionStore',
      adapter
    })

    Install

    npm i mutent-mongodb

    DownloadsWeekly Downloads

    0

    Version

    0.10.2

    License

    MIT

    Unpacked Size

    9.37 kB

    Total Files

    4

    Last publish

    Collaborators

    • greguz