Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Apr 15, 2019
1 parent a60f645 commit bf02760
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ hasEmoji('Cat');
//=> false
```
*/
declare function hasEmoji(text: string): boolean;
declare function hasEmoji(string: string): boolean;

export = hasEmoji;
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
const emojiRegex = require('emoji-regex/es2015');

module.exports = text => emojiRegex().test(text);
module.exports = string => emojiRegex().test(string);
12 changes: 6 additions & 6 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import test from 'ava';
import m from '.';
import hasEmoji from '.';

test('main', t => {
t.true(m('Unicorn 🦄'));
t.true(m('🌈'));
t.true(m('❤️ Heart'));
t.false(m('Ø'));
t.false(m('Cat'));
t.true(hasEmoji('Unicorn 🦄'));
t.true(hasEmoji('🌈'));
t.true(hasEmoji('❤️ Heart'));
t.false(hasEmoji('Ø'));
t.false(hasEmoji('Cat'));
});

0 comments on commit bf02760

Please sign in to comment.