2.0.2 • Published 4 years ago

get-urls-in-string v2.0.2

Weekly downloads
12
License
-
Repository
-
Last release
4 years ago

USE

UMD: getUrlsInString

import getUrlsInString from 'get-urls-in-string';

const matches = getUrlsInString(`this is text1 http://www.google.com/ctA3pgtzhttp://www.google.com #this is text2`);

console.log(matches);
/*
[
    { 
        type: "text", 
        content: "this is text1 " 
    },
    { 
        type: "url", 
        content: "http://www.google.com/ctA3pgtz" 
    },
    { 
        type: "text", 
        content: "" 
    },
    { 
        type: "url", 
        content: "http://www.google.com" 
    },
    { 
        type: "text", 
        content: " #this is text2" 
    }
]
*/

LICENSE

MIT

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago