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

emoji-print

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emoji-print

Simple utility for logging with emojis, also with static props to return the string value to do your own strings with any emoji.

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-25%
Maintainers
1
Weekly downloads
 
Created
Source

Emoji-Print

:heart_eyes: :wink: :sunglasses: :poop: :facepunch: :turtle: :cake: :pizza:

A simple utility to console log with emojis.

npm npm PayPal Donate

Not all emojis are going to log correctly.

Screenshot

Sample TypeScript with IntellisenseSample Logs
EmojiPrintEmojiLogs

CodePen Demo

CodePen Demo - open the console and tap the buttons to see the emoji in the console logs.

Installation

npm install emoji-print --save

Usage (Several Options)

TypeScript
import { Emoji, EmojiSuccess } from 'emoji-print';

public someEvent() {
    console.log(Emoji.Food.eggplant);
}

public anotherEvent() {
  // EmojiSuccess is a utility to console.log with leading/trailing check marks.
  EmojiSuccess("something great happened");
}
Using modules with javascript
const EmojiPrint = require("emoji-print");

function something() {
  console.log(EmojiPrint.Emoji.Smiley.hugging_face);
}

function anyEvent() {
  // EmojiWarn is a utility to console.log with leading/trailing exclamations.
  EmojiPrint.EmojiWarn("some error happened, abort mission");
}

function anotherEvent() {
  // EmojiSuccess is a utility to console.log with leading/trailing check marks.
  EmojiPrint.EmojiSuccess("something great happened");
}
Loading Emoji-Print as a library with a script tag

This will expose a variable emojiPrint for the library, made possible through bundling with webpack.

<button onclick="doSomething()"></button>

<script src="https://unpkg.com/emoji-print@0.2.0/dist/emoji-print.js"></script>
<script>
  function doSomething() {
    console.log(emojiPrint.Emoji.Food.tomato);
    // or call the utility log functions for emoji-print
    emojiPrint.EmojiWarn('Oh No, this is really bad.');
  }
</script>

Keywords

FAQs

Package last updated on 03 Apr 2018

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