|
|
@ -43,6 +43,7 @@ The `get()` method returns an array of urls in a string |
|
|
|
const text = 'Check out these sites: site1.com,site2.com,site3.com'; |
|
|
|
|
|
|
|
Urls(text).get(); // Returns: |
|
|
|
|
|
|
|
['site1.com', 'site2.com', 'site3.com'] |
|
|
|
``` |
|
|
|
|
|
|
@ -53,5 +54,6 @@ The `filter()` method runs a filter on each url in a string |
|
|
|
const text = 'My GitHub profile: https://github.com/lukechilds'; |
|
|
|
|
|
|
|
Urls(text).filter(url => `<a href="${url}">${url}</a>`); // Returns: |
|
|
|
|
|
|
|
'My GitHub profile: <a href="https://github.com/lukechilds">https://github.com/lukechilds</a>' |
|
|
|
``` |
|
|
|