+2
-6
@@ -6,9 +6,5 @@ (function() { | ||
| Consumed.prototype._updateString = function(replacement) { | ||
| this.str = this.str.replace(replacement, ''); | ||
| }; | ||
| Consumed.prototype.consumeTill = function(c, inclusive) { | ||
| var str = this.str.substring(0, this.str.indexOf(c) + (inclusive ? 1 : 0)); | ||
| this._updateString(str); | ||
| this.str = this.str.substring(str.length); | ||
| return str; | ||
@@ -20,3 +16,3 @@ }; | ||
| if (match) { | ||
| this._updateString(pattern); | ||
| this.str = this.str.replace(pattern, ''); | ||
| return match[0]; | ||
@@ -23,0 +19,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| !function(){var a=function(a){this.str=a};a.prototype._updateString=function(a){this.str=this.str.replace(a,"")},a.prototype.consumeTill=function(a,b){var c=this.str.substring(0,this.str.indexOf(a)+(b?1:0));return this._updateString(c),c},a.prototype.consume=function(a){var b=this.str.match(a);if(b)return this._updateString(a),b[0]},"object"==typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&(window.Consumed=a)}(); | ||
| !function(){var a=function(a){this.str=a};a.prototype.consumeTill=function(a,b){var c=this.str.substring(0,this.str.indexOf(a)+(b?1:0));return this.str=this.str.substring(c.length),c},a.prototype.consume=function(a){var b=this.str.match(a);if(b)return this.str=this.str.replace(a,""),b[0]},"object"==typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&(window.Consumed=a)}(); |
+2
-6
@@ -6,9 +6,5 @@ (function() { | ||
| Consumed.prototype._updateString = function(replacement) { | ||
| this.str = this.str.replace(replacement, ''); | ||
| }; | ||
| Consumed.prototype.consumeTill = function(c, inclusive) { | ||
| var str = this.str.substring(0, this.str.indexOf(c) + (inclusive ? 1 : 0)); | ||
| this._updateString(str); | ||
| this.str = this.str.substring(str.length); | ||
| return str; | ||
@@ -20,3 +16,3 @@ }; | ||
| if (match) { | ||
| this._updateString(pattern); | ||
| this.str = this.str.replace(pattern, ''); | ||
| return match[0]; | ||
@@ -23,0 +19,0 @@ } |
+3
-4
| { | ||
| "name": "consumed", | ||
| "version": "1.0.5", | ||
| "version": "1.0.7", | ||
| "description": "Easy string consumption", | ||
@@ -41,3 +41,3 @@ "main": "lib/consumed.js", | ||
| "grunt-contrib-copy": "~1.0.0", | ||
| "grunt-contrib-uglify": "~2.0.0", | ||
| "grunt-contrib-uglify": "~2.2.0", | ||
| "grunt-contrib-watch": "~1.0.0", | ||
@@ -54,5 +54,4 @@ "grunt-eslint": "^19.0.0", | ||
| "mocha-given": "~0.1.3", | ||
| "mocha-lcov-reporter": "1.2.0", | ||
| "proxyquire": "~1.7.10", | ||
| "sinon": "~1.17.6", | ||
| "sinon": "~2.1.0", | ||
| "task-master": "~2.3.0" | ||
@@ -59,0 +58,0 @@ }, |
+1
-1
@@ -1,2 +0,2 @@ | ||
| [](https://travis-ci.org/tandrewnichols/consumed) [](https://npmjs.org/package/consumed) [](https://npmjs.org/package/consumed) [](https://codeclimate.com/github/tandrewnichols/consumed) [](https://codeclimate.com/github/tandrewnichols/consumed) [](https://david-dm.org/tandrewnichols/consumed)  | ||
| [](https://travis-ci.org/tandrewnichols/consumed) [](https://npmjs.org/package/consumed) [](https://npmjs.org/package/consumed) [](https://codeclimate.com/github/tandrewnichols/consumed) [](https://codeclimate.com/github/tandrewnichols/consumed) [](https://david-dm.org/tandrewnichols/consumed)  | ||
@@ -3,0 +3,0 @@ # consumed |
+1
-1
| module.exports = { | ||
| coverage: { | ||
| path: 'coverage/coverage.html' | ||
| path: 'coverage/lcov-report/index.html' | ||
| } | ||
| }; |
23
-4.17%17564
-1.38%268
-2.19%