Skip to content

Commit

Permalink
Merge branch 'vkarpov15/gh-13081' of github.com:Automattic/mongoose i…
Browse files Browse the repository at this point in the history
…nto vkarpov15/gh-13081
  • Loading branch information
vkarpov15 committed Apr 25, 2023
2 parents ff3dcdf + bead47b commit 1d26254
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/schema/bigint.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ SchemaBigInt.set = SchemaType.set;
* #### Example:
*
* // Make Mongoose cast empty string '' to false.
* const original = mongoose.Schema.Boolean.cast();
* mongoose.Schema.Boolean.cast(v => {
* const original = mongoose.Schema.BigInt.cast();
* mongoose.Schema.BigInt.cast(v => {
* if (v === '') {
* return false;
* }
* return original(v);
* });
*
* // Or disable casting entirely
* mongoose.Schema.Boolean.cast(false);
* mongoose.Schema.BigInt.cast(false);
*
* @param {Function} caster
* @return {Function}
Expand Down

0 comments on commit 1d26254

Please sign in to comment.