@jiltq/urban.js
v1.0.12
Published
Urban Dictionary API wrapper
Downloads
2
Readme
urban.js
urban.js is a lightweight Node.js module that allows you to easily interact with the Urban Dictionary API.
features
- term definitions
example usage
to define "javascript":
const urban = require('urban.js');
(async () => {
const [answer] = await urban.define('javascript');
console.log(answer);
})();
to get a random definition:
const { randomArray } = require('urban.js');
(async () => {
const randomAnswer = randomArray(await urban.define('javascript'));
console.log(randomAnswer);
})();
example output
{
definition: 'A computer [programming language], provides a [source] of [endless suffering] for many poor middle-schoolers throughout the world (including myself).',
permalink: 'http://javascript.urbanup.com/13778263',
thumbs_up: 50,
sound_urls: [],
author: "stanley yelnats :')",
word: 'javascript',
defid: 13778263,
current_vote: '',
written_on: '2019-04-05T02:52:22.489Z',
example: '"You have an [assignment] on javascript for [summer break]"',
thumbs_down: 13
}