Skip to content

Commit

Permalink
Filter createdAt
Browse files Browse the repository at this point in the history
  • Loading branch information
instafluff committed Aug 12, 2020
1 parent 74ba3e1 commit 4c36d37
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ let comfyDB = {
throw new Error( "Invalid Argument Type" );
}
values = values.map( x => ({ ...x, updatedAt: new Date() } ) );
// filter createdAt field
values.forEach( x => {
delete x.createdAt;
} );

let bulkOp = set.initializeUnorderedBulkOp();
key.forEach( ( k, i ) => bulkOp.find( { key: k } ).upsert().updateOne( {
Expand Down

0 comments on commit 4c36d37

Please sign in to comment.