Socket
Socket
Sign inDemoInstall

emojideas

Package Overview
Dependencies
2
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

test.js

8

package.json
{
"name": "emojideas",
"version": "1.0.0",
"version": "1.0.1",
"description": "Suggest Emoji based on name or keyword.",

@@ -10,5 +10,7 @@ "main": "index.js",

},
"devDependencies": {},
"devDependencies": {
"mocha": "^5.2.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "mocha"
},

@@ -15,0 +17,0 @@ "repository": {

# Emojideas
Text-to-emoji suggestion library with a [Lunr](https://github.com/olivernn/lunr.js) and [emojilib](https://github.com/muan/emojilib) backend.
Text-to-emoji suggestion library with a [Lunr](https://github.com/olivernn/lunr.js) and [emojilib](https://github.com/muan/emojilib) backend. Suggestions are based on emoji name and keywords.

@@ -39,6 +39,6 @@ ## Usage

require('emojilib').lib.aerial_tramway;
// => { keywords: [ 'transportation', 'vehicle', 'ski' ],
// char: '🚡',
// fitzpatrick_scale: false,
// category: 'travel_and_places' }
// => { keywords: [ 'transportation', 'vehicle', 'ski' ],
// char: '🚡',
// fitzpatrick_scale: false,
// category: 'travel_and_places' }

@@ -58,2 +58,3 @@ let e = new Emojideas({ excludeCategories: ['travel_and_places'] });

let h = new Emojideas({ formatOutput: el => [el.ref, el.score] });
h.suggest('aerial tramway');
// => [ [ '🚡', 25.417660356531634 ] ]

@@ -65,1 +66,23 @@ ```

All queries are passed directly to the Lunr backend, and can therefore use the [Lunr syntax](https://lunrjs.com/guides/searching.html), except when the `fuzzy` option has been set.
```javascript
require('emojilib').lib.tram;
// => { keywords: [ 'transportation', 'vehicle' ],
// char: '🚊',
// fitzpatrick_scale: false,
// category: 'travel_and_places' }
let e = new Emojideas();
e.suggest('tram');
// => [ '🚊' ]
e.suggest('tram*');
// => [ '🚊', '🚡' ]
e.suggest('aerial tram*');
// => [ '🚡', '🚊' ]
e.suggest('tram* -tram');
// => [ '🚡' ]
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc