made with requirebin
Created
April 23, 2014 15:38
-
-
Save bengourley/11220370 to your computer and use it in GitHub Desktop.
requirebin sketch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var thesaurus = require('thesaurus') | |
var words = 'Short tutorial on how to write like Russell Brand:\n\n1. Write an article\n2. Replace every word with a synonym from thesaurus.com'.split(' ') | |
console.log(words.map(function (word) { | |
var synonyms = thesaurus(word) | |
if (!synonyms.length) return word | |
return synonyms[0] | |
}).join(' ')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var thesaurus=require("thesaurus"),words="Short tutorial on how to write like Russell Brand:\n\n1. Write an article\n2. Replace every word with a synonym from thesaurus.com".split(" ");console.log(words.map(function(r){var e=thesaurus(r);return e.length?e[0]:r}).join(" ")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "requirebin-sketch", | |
"version": "1.0.0", | |
"dependencies": { | |
"thesaurus": "0.0.0" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type='text/css'>html, body { margin: 0; padding: 0; border: 0; } | |
body, html { height: 100%; width: 100%; }</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment