1.0.4 • Published 6 years ago

obj-emojify v1.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

ObjEmojify Build Status

Emojify object keys and values into a new emojify object.

Install

$ npm i obj-emojify

Usage

const { ObjEmojify } = require('obj-emojify');
const obj = {
    "coffee": "I :heart: coffee value",
    "100": {
        "name": "100",
        "contents": {
            "name": "funny",
            "contents": [1, 2]
        }
    },
    "santa": ":santa: value"
};
const objEmojify = new ObjEmojify();
const firstEmojify = objEmojify.emojify(obj, (result) => { /* TODO: result.value */ });
const secondEmojify = objEmojify.emojify(obj); // output: secondEmojify.value

Configuration

To enable global configuration define the options.The following illustrates all the available options with their respective default values.

{
    "enableOnKey": true,
    "enableOnValue": true,
}

API

emojify(data, cb)

data

Type: Object

Data object for emojify.

cb

Type: Callback

Return emojify object in callback.

License

MIT © Joydip Roy (rjoydip)

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago