All files utils.js

100% Statements 9/9
50% Branches 1/2
100% Functions 1/1
100% Lines 9/9

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  230x 230x 230x   230x 247x 247x 247x       230x     4x  
function sliceInput(rawText) {
    let slicesResult = []
    let currentParameters = rawText
    let snippet = null
	
	while( ( snippet = /(?:,\s?)*(?<paramValue>[a-zA-Z1-9-]+\s*[a-zA-Z1-9-]*)/g.exec( currentParameters ) ) ) {
		Eif( snippet.groups.paramValue ) {
			slicesResult.push( snippet.groups.paramValue.trim() )
			currentParameters = currentParameters.replace( snippet.groups.paramValue, '' )
		}
	}
	
	return slicesResult
}
 
module.exports.sliceInput = sliceInput