Skip to content

Commit

Permalink
readme: require => import
Browse files Browse the repository at this point in the history
  • Loading branch information
puzrin committed Dec 1, 2023
1 parent 50092f6 commit 5826ab2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ Usage examples
##### Example 1

```js
var linkify = require('linkify-it')();
import linkifyit from 'linkify-it';
const linkify = linkifyit();

// Reload full tlds list & add unofficial `.onion` domain.
linkify
Expand All @@ -61,7 +62,7 @@ console.log(linkify.match('Site github.com!')); // [ {
```js
linkify.add('@', {
validate: function (text, pos, self) {
var tail = text.slice(pos);
const tail = text.slice(pos);

if (!self.re.twitter) {
self.re.twitter = new RegExp(
Expand Down

0 comments on commit 5826ab2

Please sign in to comment.