Comparing version 1.0.5 to 1.0.7
@@ -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)}(); |
@@ -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 @@ } |
{ | ||
"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,2 +0,2 @@ | ||
[![Build Status](https://travis-ci.org/tandrewnichols/consumed.png)](https://travis-ci.org/tandrewnichols/consumed) [![downloads](http://img.shields.io/npm/dm/consumed.svg)](https://npmjs.org/package/consumed) [![npm](http://img.shields.io/npm/v/consumed.svg)](https://npmjs.org/package/consumed) [![Code Climate](https://codeclimate.com/github/tandrewnichols/consumed/badges/gpa.svg)](https://codeclimate.com/github/tandrewnichols/consumed) [![Test Coverage](https://codeclimate.com/github/tandrewnichols/consumed/badges/coverage.svg)](https://codeclimate.com/github/tandrewnichols/consumed) [![dependencies](https://david-dm.org/tandrewnichols/consumed.png)](https://david-dm.org/tandrewnichols/consumed) ![Size](https://img.shields.io/badge/size-446b-brightgreen.svg) | ||
[![Build Status](https://travis-ci.org/tandrewnichols/consumed.png)](https://travis-ci.org/tandrewnichols/consumed) [![downloads](http://img.shields.io/npm/dm/consumed.svg)](https://npmjs.org/package/consumed) [![npm](http://img.shields.io/npm/v/consumed.svg)](https://npmjs.org/package/consumed) [![Code Climate](https://codeclimate.com/github/tandrewnichols/consumed/badges/gpa.svg)](https://codeclimate.com/github/tandrewnichols/consumed) [![Test Coverage](https://codeclimate.com/github/tandrewnichols/consumed/badges/coverage.svg)](https://codeclimate.com/github/tandrewnichols/consumed) [![dependencies](https://david-dm.org/tandrewnichols/consumed.png)](https://david-dm.org/tandrewnichols/consumed) ![Size](https://img.shields.io/badge/size-401b-brightgreen.svg) | ||
@@ -3,0 +3,0 @@ # consumed |
module.exports = { | ||
coverage: { | ||
path: 'coverage/coverage.html' | ||
path: 'coverage/lcov-report/index.html' | ||
} | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23
17564
268