Skip to content

Commit c4f7bc4

Browse files
author
tunnckoCore
committed
run docks(1), fix typo, nah..
1 parent d980fa5 commit c4f7bc4

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010
/**
1111
* Compatible twitter mentions regex, not only of course!
1212
*
13+
* @name mentionsRegex
1314
* @param {Boolean} `dot` if `true` it will allow to match dots
1415
* @return {RegExp}
1516
* @api public
1617
*/
17-
module.exports = function metntionsRegex(dot) {
18+
module.exports = function mentionsRegex(dot) {
1819
if (dot) {
1920
// e.g. @google.com will match `google.com`
2021
return /(?:^|[^a-zA-Z0-9_!@#$%&*])(?:(?:@|)(?!\/))([a-zA-Z0-9/_.]{1,15})(?:\b(?!@|)|$)/;

readme.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ npm test
99
```
1010

1111

12-
## [metntionsRegex](index.js#L17)
12+
## [mentionsRegex](index.js#L18)
1313
> Compatible twitter mentions regex, not only of course!
1414
1515
* `[dot]` **{Boolean}** if `true` it will allow to match dots
@@ -20,24 +20,24 @@ npm test
2020
> For more use-cases see [tests](./test.js)
2121
2222
```js
23-
var metntionsRegex = require('metntions-regex');
23+
var mentionsRegex = require('mentions-regex');
2424

25-
metntionsRegex().test('foo @bar baz');
25+
mentionsRegex().test('foo @bar baz');
2626
//=> true
2727

28-
metntionsRegex().exec('foo @bar baz')[1];
28+
mentionsRegex().exec('foo @bar baz')[1];
2929
//=> 'bar'
3030

31-
metntionsRegex().test('foo [email protected] baz');
31+
mentionsRegex().test('foo [email protected] baz');
3232
//=> false
3333

34-
metntionsRegex(true).test('foo [email protected] baz');
34+
mentionsRegex(true).test('foo [email protected] baz');
3535
//=> false
3636

37-
metntionsRegex(true).test('foo @bar.com baz');
37+
mentionsRegex(true).test('foo @bar.com baz');
3838
//=> true
3939

40-
metntionsRegex(true).exec('foo @bar.com baz')[1];
40+
mentionsRegex(true).exec('foo @bar.com baz')[1];
4141
//=> 'bar.com'
4242
```
4343

0 commit comments

Comments
 (0)