Skip to content

Commit

Permalink
Updating chunk regex
Browse files Browse the repository at this point in the history
  • Loading branch information
mkdbns committed Aug 15, 2017
1 parent 9e6e2fd commit 3e95d9d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/modules/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@ const utils = {}
//
//
utils.chunk = function(body) {
//
// Max length
//
var max = 4000
//
// Use regex to create an array
// of strings of max length
//
return body.match(new RegExp('.{1,' + max + '}', 'g'))
return body.match(/[\s\S]{1,4000}/g)
}

//
Expand Down

0 comments on commit 3e95d9d

Please sign in to comment.