Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@emoji-gen/ecode

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emoji-gen/ecode

The emoji code utilities for JavaScript

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

ecode-js

Build Status Build status dependencies Status devDependencies Status codecov License

:musical_score: The emoji code utilities for JavaScript

Requirements

  • Node v10 or later
  • Modern browsers
    • Internet Explorer 11 is supported

Getting started

$ yarn add @emoji-gen/ecode           # for Yarn users
$ npm install @emoji-gen/ecode --save # for NPM users

Usage

EcodeEncoder

const { EcodeEncoder } = require('@emoji-gen/ecode')

const ecodeEncoder = new EcodeEncoder()
const ecode = ecodeDecoder.encode({
  locale: 'en',
  flags: {
    sizeFixed: true,
    stretch: true,
  },
  align: 'center',
  size: 'xhdpi',
  format: 'webp',
  fontId: 0xcf,
  foregroundColor: {
    value: 0x12345678,
  },
  backgroundColor: {
    value: 0x9abcdef0,
  },
  text: 'ab\nc',
})

console.log(ecode)
// => 'BA0hzxI0VniavN7wYWIKYw'

EcodeDecoder

const { EcodeDecoder } = require('@emoji-gen/ecode')

const ecodeDecoder = new EcodeDecoder()
const ecode = ecodeDecoder.decode('BA0hzxI0VniavN7wYWIKYw')

console.log(ecode)
// => {
//      version: 1,
//      locale: 'en',
//      flags: {
//         sizeFixed: false,
//         stretch: true
//      },
//      align: 'center',
//      size: 'xhdpi',
//      format: 'webp',
//      fontId: 207,
//      foregroundColor: {
//        value: 305419896,
//        hex: '12345678'
//      },
//      backgroundColor: {
//        value: 2596069104,
//        hex: '9abcdef0'
//      },
//      text: 'ab\nc'
//    }

Development

Test

$ yarn test

Build

$ yarn run build

License

MIT © Emoji Generator

FAQs

Package last updated on 27 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc