npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pexxmoji

v2.0.0

Published

A lightweight and straight forward emoji library in JavaScript. NPM accessible.

Downloads

6

Readme

Render uniform emoji views across all OS platforms.

Demo Shot Samples

Emoji Input & Tray

Rendering Variants

Demo (A test run)

Follow the steps below to successully run the demo build.

Step 1. Clone this repo to your local computer. Step 2. Open your npm terminal and navigate to the 'demo' folder path within the cloned folder. Step 3. Still on your terminal, run the command below to stage the demo build.

npm start

Step 4. Access the staged build from your browser via ( http://localhost:3000/ ).

Getting Started [ installation ]

1. By Source Reference

<head>
<link rel="stylesheet" type="text/css" href="path-to-css/pexxmoji.min.css">
// Load all emoji images
<link rel="stylesheet" type="text/css" href="path-to-css/pexxmoji.emo_set.a.css">
<link rel="stylesheet" type="text/css" href="path-to-css/pexxmoji.emo_set.b.css">
<link rel="stylesheet" type="text/css" href="path-to-css/pexxmoji.emo_set.c.css">
<link rel="stylesheet" type="text/css" href="path-to-css/pexxmoji.emo_set.d.css">
<link rel="stylesheet" type="text/css" href="path-to-css/pexxmoji.emo_set.e.css">
<link rel="stylesheet" type="text/css" href="path-to-css/pexxmoji.emo_set.f.css">
<link rel="stylesheet" type="text/css" href="path-to-css/pexxmoji.emo_set.g.css">
<link rel="stylesheet" type="text/css" href="path-to-css/pexxmoji.emo_set.h.css">
<link rel="stylesheet" type="text/css" href="path-to-css/pexxmoji.emo_set.i.css">
// .....................
<script type="text/javascript" src="path-to-js/jquery.js"></script>
<script type="text/javascript" src="path-to-js/pexxmoji.umd.min.js"></script>
</head>

2. Via NPM

Step 1. Install both pexxmoji and jquery via Node CLI.

npm i pexxmoji jquery

Step 2. Import.

import 'pexxmoji/dist/pexxmoji.min.css';

import 'pexxmoji/dist/pexxmoji.emo_set.a.css';
import 'pexxmoji/dist/pexxmoji.emo_set.b.css';
import 'pexxmoji/dist/pexxmoji.emo_set.c.css';
import 'pexxmoji/dist/pexxmoji.emo_set.d.css';
import 'pexxmoji/dist/pexxmoji.emo_set.e.css';
import 'pexxmoji/dist/pexxmoji.emo_set.f.css';
import 'pexxmoji/dist/pexxmoji.emo_set.g.css';
import 'pexxmoji/dist/pexxmoji.emo_set.h.css';
import 'pexxmoji/dist/pexxmoji.emo_set.i.css';

import $ from 'jquery';
import pexxmoji from 'pexxmoji';

Step 3. Usage. (React App Example).

// window == browser window object.

var emoji = false;

function show_moji(event){
   emoji = new pexxmoji['pexxmoji']( $, window, $('.pexx_input:eq(0)'), $('.pexx_e_tray:eq(0)') );
}

function sub_extrc(event){
   // converting input text to an html rendered node
   $('.ren_str').html( pexxmoji['mojiparser']( $, emoji.utils_getv(), 'to_html' ) );

   // extracting raw texts from the rendered html node
   $('.raw_str').text( pexxmoji['mojiparser']( $, $('.ren_str'), 'to_text' ) );
}

function App(){
   return (
      <div className="App">
         <p className="raw_str"/>
         <p className="ren_str"/>
         <button onClick={ show_moji }>Tap Me</button>
         <button onClick={ sub_extrc }>Extract String</button>
         <div className="pexx_input" contentEditable />
         <div className="pexx_e_tray"/>
      </div>
   );
}

export default App;

Usage

Object Declaration

NOTE: The instantiation below is to be made once and should be done when document is ready. NOTE: $ == jquery init function. window == browser window object.

const emoji = new pexxmoji['pexxmoji']( $, window, $('#input_element'), $('#emoji_tray_div'), [ tab_icons_array ], { event options } );

mojiparser

NOTE: mojiparser is a standalone function as part of the library to handle in-app rendering of pexxmoji strings. NOTE: $ == jquery init function.

// For converting UTF-8 strings
/*
* This function will return an HTML string that will
* render the pexxmoji view when placed within the document.
*/
let emoji = pexxmoji['mojiparser']( $, 'utf-8 string', 'to_html' );
...

// For converting rendered HTML to text
/*
* This function will return the raw utf-8 string from
* the already rendered pexxmoji HTML within the document.
*/
let text = pexxmoji['mojiparser']( $, $('#element that holds the rendered pexxmoji'), 'to_text' );

Event Options

| Option | Type | Default | Purpose | | --- | --- | --- | --- | | input | function | function | A callback function triggered oninput. Function returns an event as a 1st parameter. | | blur | function | function | A callback function triggered onblur. Function returns an event as a 1st parameter. | | focus | function | function | A callback function triggered onfocus. Function returns an event as a 1st parameter. | | cursor | object | { 'selection': false, 'range': false, 'parent_node': false, 'text_fill': false } | Options to bind preset input cursor states on pexxmoji setup. |

Release History

  • Initial [ v1.0.1 ]
  • 11/28/2022 [ v2.0.0 ]

License

MIT