New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

emoticon

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emoticon - npm Package Compare versions

Comparing version 0.1.0 to 1.0.0

history.md

2

data/emoticons.json

@@ -621,2 +621,2 @@ {

}
}
}

@@ -1,77 +0,71 @@

'use strict';
/**
* Cached methods.
* @author Titus Wormer
* @copyright 2015 Titus Wormer
* @license MIT
* @module emoticon
* @fileoverview Information regarding ASCII emoticons.
*/
var has;
'use strict';
has = Object.prototype.hasOwnProperty;
/* eslint-env commonjs */
/**
/*
* Data.
*/
var emoticons;
var data = require('./data/emoticons.json');
emoticons = require('./data/emoticons.json');
/**
* Create a dictionary to hold the emoticons by emoji.
/*
* Dictionaries.
*/
var emoji;
var emoji = {};
var text = {};
emoji = {};
var emoticons = {
'unicode': emoji,
'emoticon': text
}
/**
* Create a dictionary to hold the emoticons by text
* characters.
* Transform an emoji.
*
* @param {string} emoticon - Unicode emoji to extend.
*/
function enhanceEmoticon(emoticon) {
var information = data[emoticon];
var index;
var text;
/**
* Add information to `unicode` map.
*/
text = {};
emoji[information.emoji] = information;
/**
* Transform all emoji.
*/
/**
* Add information to `text` map.
*/
var emoticon,
information,
index;
index = information.emoticons.length;
for (emoticon in emoticons) {
/* istanbul ignore else */
if (has.call(emoticons, emoticon)) {
information = emoticons[emoticon];
/**
* Add information to `unicode` map.
*/
emoji[information.emoji] = information;
/**
* Add information to `text` map.
*/
index = information.emoticons.length;
while (index--) {
text[information.emoticons[index]] = information;
}
while (index--) {
text[information.emoticons[index]] = information;
}
}
/**
* Expose the `text` dictionary (`text`) as `emoticon`.
/*
* Transform all emoticons.
*/
exports.emoticon = text;
var emoticon;
/**
* Expose the `unicode` dictionary (`emoji`) as `unicode`.
for (emoticon in data) {
enhanceEmoticon(emoticon);
}
/*
* Expose.
*/
exports.unicode = emoji;
module.exports = emoticons;
{
"name": "emoticon",
"version": "0.1.0",
"version": "1.0.0",
"description": "Information regarding ASCII emoticons",

@@ -15,30 +15,42 @@ "license": "MIT",

],
"repository": {
"type": "git",
"url": "https://github.com/wooorm/emoticon.git"
},
"repository": "wooorm/emoticon",
"author": "Titus Wormer <tituswormer@gmail.com>",
"files": [
"index.js",
"data/emoticons.json"
],
"devDependencies": {
"eslint": "^0.10.0",
"gemoji": "^0.2.0",
"browserify": "^11.0.0",
"eslint": "^1.0.0",
"esmangle": "^1.0.0",
"gemoji": "^1.0.0",
"istanbul": "^0.3.0",
"jscs": "^1.0.0",
"markdown-table": "^0.2.0",
"mocha": "^2.0.0"
"jscs": "^2.0.0",
"jscs-jsdoc": "^1.0.0",
"markdown-table": "^0.4.0",
"mdast": "^1.0.0",
"mdast-comment-config": "^1.0.0",
"mdast-github": "^1.0.0",
"mdast-lint": "^1.0.0",
"mdast-slug": "^1.0.0",
"mdast-validate-links": "^1.0.0",
"mocha": "^2.0.0",
"string-width": "^1.0.1"
},
"scripts": {
"test": "node_modules/.bin/_mocha --reporter spec --check-leaks -u exports test.js",
"test-travis": "node_modules/.bin/istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --check-leaks -u exports test.js",
"coverage": "node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- -- test.js",
"lint-api": "node_modules/.bin/eslint index.js",
"lint-test": "node_modules/.bin/eslint test.js --env mocha",
"lint-script": "node_modules/.bin/eslint script/build-data.js script/build-support.js",
"lint-style": "node_modules/.bin/jscs index.js script/build-data.js script/build-support.js test.js --reporter=inline",
"lint": "npm run lint-api && npm run lint-test && npm run lint-style",
"make": "npm run lint && npm run coverage",
"test-api": "mocha --check-leaks test.js",
"test-coverage": "istanbul cover _mocha -- test.js",
"test-travis": "npm run test-coverage",
"test": "npm run test-api",
"lint-api": "eslint .",
"lint-style": "jscs --reporter inline .",
"lint": "npm run lint-api && npm run lint-style",
"make": "npm run lint && npm run test-coverage",
"build-data": "node script/build-data.js",
"build-support": "node script/build-support.js",
"build": "npm run build-data && npm run build-support",
"prepublish": "npm run build"
"postbuild-data": "node script/build-support.js",
"bundle": "browserify index.js --no-builtins -s emoticon > emoticon.js",
"postbundle": "esmangle emoticon.js > emoticon.min.js",
"build-md": "mdast . --quiet",
"build": "npm run build-data && npm run bundle && npm run build-md"
}
}

Sorry, the diff of this file is not supported yet

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