Skip to content

Instantly share code, notes, and snippets.

@twalker
Created May 13, 2016 02:37
Show Gist options
  • Save twalker/38f6b0d9c8dc513d6faace534eee9f75 to your computer and use it in GitHub Desktop.
Save twalker/38f6b0d9c8dc513d6faace534eee9f75 to your computer and use it in GitHub Desktop.
set-on-fire.js
#!/usr/bin/env node
'use strict';
if (process.argv.length <= 2) {
process.stdout.write(`Usage: node ./emojize.js <outputPath>\n`);
process.exit(-1);
}
const path = require('path');
const inPath = path.resolve(process.argv[2]);
const json = require(inPath);
// http://apps.timwhitlock.info/emoji/tables/unicode
Object.keys(json).forEach((key) => {
json[key] = json[key].replace(/\w/gi, '🔥');
})
console.log(JSON.stringify(json, null, 2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment