Socket
Socket
Sign inDemoInstall

relevant-urban

Package Overview
Dependencies
1
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    relevant-urban

Urban Dictionary API wrapper made for everyone with useful methods using promises and snekfetch


Version published
Weekly downloads
138
decreased by-38.12%
Maintainers
1
Install size
136 kB
Created
Weekly downloads
 

Readme

Source

Relevant urban NPM Build Status Greenkeeper badge

Urban Dictionary API wrapper logo

This module was meant to replace shitty urban module as it uses callbacks and does useless stuff.

const urban = require('relevant-urban');
Methodsreturnsdescription
urban('string')=> Promise<Definition>Gets first definition from urban matching provided query
urban.random()=> Promise<Definition>Gets random definition from urban
urban.all('string')=> Promise<Array<Definition>>Gets all definitions from page 1 matching provided query
urban.random('string')=> Promise<Definition>Gets random definition from urban matching provided query
urban.search('string'[, page])=> Promise<api response>Gets raw response from api without any formating

Example output

NOTE: urban.random() method doesn't have tags and sounds

  Definition {
  id: 69266,
  word: 'hello',
  definition: 'what you say when your talking casually with friends and your mom walks in the room',
  example: 'What the hell(mom enters)-o mom.',
  urbanURL: 'http://hello.urbanup.com/69266',
  author: 'mad at the world',
  thumbsUp: 3297,
  thumbsDown: 936,
  tags: [ 'hi', 'hey', 'greeting', 'yo', 'goodbye' ],
  sounds: [ 'http://media.urbandictionary.com/sound/hello-7503.mp3',
  'http://media.urbandictionary.com/sound/hello-9778.mp3',
  'http://media.urbandictionary.com/sound/hello-9897.mp3',
  'http://media.urbandictionary.com/sound/hello-10454.mp3',
  ...]
  }

Keywords

FAQs

Last updated on 19 Apr 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc