Permalink
Browse files

added MongooseArray#splice support

  • Loading branch information...
1 parent be77994 commit 3e5a428fc1946b1ea4f4548910009a91e9aa5011 @aheckmann aheckmann committed May 19, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 lib/mongoose/types/array.js
@@ -270,6 +270,16 @@ MongooseArray.prototype.$pullAll = function (values) {
};
/**
+ * Splices the array.
+ */
+
+MongooseArray.prototype.splice = function () {
+ Array.prototype.splice.apply(this, arguments);
+ this._markModified();
+ return this;
+};
+
+/**
* Returns an Array
*
* @return {Array}

0 comments on commit 3e5a428

Please sign in to comment.