Extract-String
Extracts the given pattern variables from the given string. You can use it to extract url params and strings without using regex.
Installation
npm install extract-string --save
Then, in your app:
var extract = ;
Example 1
var test = ; /*returns:[{ hi : 'Hello', type : 'friends', where : 'the world'},{ hi : 'Hello', type : 'dear friends', where : 'this world'}]*/
Example 2
var test = ;/*returns:[{ userid : 12345, friendid : 6789}]*/