Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
Moved to mongoose-jsondiffpatch
Browse files Browse the repository at this point in the history
  • Loading branch information
t4nz committed Jun 11, 2018
1 parent f4cc616 commit c6303d4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
mongoose-jsondiff
mongoose-jsondiffpatch
=============

Mongoose collections history using jsondiffpatch
## Installation
---------------
``` sh
yarn add mongoose-jsondiff
npm i mongoose-jsondiff
yarn add mongoose-jsondiffpatch
npm i mongoose-jsondiffpatch
```

## Operation
Expand Down Expand Up @@ -36,7 +36,7 @@ Use as you would any Mongoose plugin:

```js
import * as mongoose from 'mongoose';
import mongooseJsondiff from 'mongoose-jsondiff';
import mongooseJsondiff from 'mongoose-jsondiffpatch';

const schema = new mongoose.Schema({ ... });
schema.plugin(mongooseJsondiff, { mongoose });
Expand All @@ -48,7 +48,7 @@ keys from history. Follows dot syntax for deeply nested values.

```js
import * as mongoose from 'mongoose';
import mongooseJsondiff from 'mongoose-jsondiff';
import mongooseJsondiff from 'mongoose-jsondiffpatch';

const schema = new mongoose.Schema({
someField: String,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "mongoose-jsondiff",
"name": "mongoose-jsondiffpatch",
"version": "1.0.0",
"description": "Mongoose collections history using jsondiffpatch",
"main": "lib/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function getDiffs(this: Model<Document>, id: Types.ObjectId, queryOpts?: any) {
*/
export default function mongooseJsonDiff(schema: Schema, opts: any = {}) {
if (opts.mongoose === undefined) {
throw new Error('Please, pass mongoose while requiring mongoose-jsondiff');
throw new Error('Please, pass mongoose while requiring mongoose-jsondiffpatch');
}

const mongoose: Mongoose = opts.mongoose;
Expand Down

0 comments on commit c6303d4

Please sign in to comment.