gplink
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

GpLinkify

Overview

Angular pipe to convert url, email and mobile number from text to clickable or linkable. This library uses linkifyjs under the hood. All the thing which linkifyjs do all that functionality beed provided in this library with addition to mobile number clickable with custom format of mobile number.

Installation

npm install gplink --save

Example

Here pipe 'gplink' will convert all the email, urls and mobile number to clickable format from the text provided in title.

If you want to convert any specific formatted mobile number or phone numbers to clickable you need to provide it's regular expression as another argument.

Note:

Please keep in mind that when you provide regular expression that contain backward slash(), then do it twice to parse it properly. If you regular expression is like this, +?\d[\d -]{8,12}\d, then convert it like this, \+?\d[\d -]{8,12}\d. If you not provide any reg-ex then it will not convert any mobile numbers to clickable except indian mobile number format.

Package Sidebar

Install

npm i gplink

Weekly Downloads

7

Version

1.0.1

License

MIT

Unpacked Size

72.2 kB

Total Files

23

Last publish

Collaborators

  • govindsinh