Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Emoji Pictographs and Codes

Map emoji pictographs to codes.

Usage

var table = require( '@stdlib/datasets/emoji-picto-code' );

table()

Returns an object mapping emoji pictographs to codes.

var t = table();
// returns {...}

var p = t[ '😄' ];
// returns [ ':smile:' ]

p = t[ '🦄' ];
// returns [ ':unicorn:' ]

Notes

  • Some emoji pictographs may have multiple applicable codes.

Examples

var objectKeys = require( '@stdlib/utils/keys' );
var table = require( '@stdlib/datasets/emoji-picto-code' );

var picto;
var tbl;
var i;

// Get the data:
tbl = table();

// Get the emoji pictographs:
picto = objectKeys( tbl );

// Print out all the corresponding codes...
for ( i = 0; i < picto.length; i++ ) {
    console.log( picto[ i ] + ' => ' + tbl[ picto[ i ] ] );
}

CLI

Usage

Usage: emoji-picto-code [options]

Options:

  -h,    --help                Print this message.
  -V,    --version             Print the package version.

Notes

  • Data is written to stdout as comma-separated values (CSV), where the first line is a header line.

Examples

$ emoji-picto-code
emoji,code
...

License

The data files (databases) are licensed under an Open Data Commons Public Domain Dedication & License 1.0 and their contents are licensed under Creative Commons Zero v1.0 Universal. The software is licensed under Apache License, Version 2.0.


See Also