Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including datamuse with all npm packages installed. Try it out:

var datamuse = require("datamuse")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

datamuse v1.0.5

node module for the Datamuse API v1

Build Status

Install

Using npm:

npm install datamuse

The Datamuse API is a word-finding query engine for developers. The official website illustrates the kinds of queries you can make: Datamuse API. This module helps you to make queries and supports promises.

Usage

Straight forward approach by providing a query.

const datamuse = require('datamuse');

datamuse.request('words?ml=ringing in the ears')
.then((json) => {
  console.log(json);
  //do it!
});

Use words as shortcut.

datamuse.words({
  ml: 'ringing in the ears'
})
.then((json) => {
  console.log(json);
  //do it!
});

Use sug as shortcut.

datamuse.sug({
  s: 'rawand'
})
.then((json) => {
  console.log(json);
  //do it!
});

License

MIT © Andre Stehle

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free