1.0.0 • Published 8 years ago

find-urls-in-object v1.0.0

Weekly downloads
6
License
ISC
Repository
github
Last release
8 years ago

find-urls-in-object

GratiPay Downloads Version

Finds all URLs in an object, recursively.

Installation

npm instal --save-dev find-urls-in-object

Usage

import findUrlsInObject from 'find-urls-in-object';

findUrlsInObject({
  text: 'Hello https://hello.com',
  prop: {
    array: [
      'http://foo.com',
      'with text http://bar.com',
      'double url http://foo.com',
    ],
  },
});
// returns deduplicated array
// [
//   'http://foo.com',
//   'http://bar.com',
//   'https://hello.com',
// ]

License

ISC