Code Monkey home page Code Monkey logo

emoji's Introduction

Latest Version on Packagist Software License Build Status

A simple PHP library for handling Emoji

An emoji encoder/parser for Laravel 5. This will encode and decode html to unified and vice versa. In order to handle emojies in database where you care about light weight things, performance and don't want to use blob data type.

Installation

PHP 5.5+

To get the latest version of rvish Emoji, simply require the project using Composer:

$ composer require rvish/emoji

Instead, you may of course manually update your require block and run composer update if you so choose:

{
    "require": {
        "rvish/emoji": "*"
    }
}

Once rvish Emoji is installed, you need to register the service provider. Open up config/app.php and

  1. add the Rvish\Emoji\EmojiServiceProvider::class to the providers
  2. add the 'Emoji' => Rvish\Emoji\Facades\Emoji::class to the aliases.

Usage

For encoding to Bytes (UTF-8)

Emoji::encode("Test1 Test2 ๐Ÿ’ก Test3"); // encoding to Bytes (UTF-8)

For decoding to Native

Emoji::decode("Test1 Test2 \xf0\x9f\x92\xa1 Test3"); // decoding to Native

Contributing

We welcome contributions! If you would like to hack on Emoji, please follow these steps:

  1. Fork this repository
  2. Make your changes
  3. Install the requirements
  4. Submit a pull request after running make check (ensure it does not error!)

Please give us adequate time to review your submission. Thanks!

License

Rvish Emoji is licensed under The MIT License (MIT).

emoji's People

Stargazers

Chun-Sheng, Li avatar Wei Chih Tsai avatar Ravi Sharma avatar

Watchers

James Cloos avatar Ravi Sharma avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.