Git Product home page Git Product logo

node-thesaurus-com's Introduction

Build Status npm

Description

Use thesaurus.com to look up synonyms and, if available, antonyms.

Moreover, it comes with an executable called tcom, which can be used to start a search from the shell. The output is either plain-text (by default) or JSON.

Installation

$ npm install -g thesaurus-com

Or install it into the current directory, so you can play around with it:

$ npm install --save thesaurus-com

(The executable can then be found at ./node_modules/.bin/tcom.)

Usage

var tcom = require('thesaurus-com');

console.log(tcom.search('never'));

// { synonyms:
//   [ 'at no time',
//     'don\'t hold your breath',
//     'forget it',
//     'nevermore',
//     'no way',
//     'not at all',
//     'not ever',
//     'not in any way',
//     'not in the least',
//     'not on your life',
//     'not under any condition' ],
//  antonyms: [ 'always', 'forever' ] }
$ tcom always
Synonyms: consistently, constantly, eternally, ever, everlastingly, evermore, for keeps, forevermore, in perpetuum, invariably, perpetually, regularly, repeatedly, till blue in the face, till cows come home, till hell freezes over, unceasingly, without exception
Antonyms: at no time, never
$ tcom -j always
{"synonyms":["consistently","constantly","eternally","ever","everlastingly","evermore","for keeps","forevermore","in perpetuum","invariably","perpetually","regularly","repeatedly","till blue in the face","till cows come home","till hell freezes over","unceasingly","without exception"],"antonyms":["at no time","never"]}

node-thesaurus-com's People

Contributors

jackrr avatar mhinz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

node-thesaurus-com's Issues

Add --help

Would be nice to have command line help.

Still working?

Is this still working or do I need to configure something to get results?
Currently not getting matches for anything. $tcom test --> No match found.

Update code pls :3

Right now site uses h2 instead p, so need to be in code h2:contains instead p:contains
image

Error: getaddrinfo ENOTFOUND www.www.thesaurus.com www.www.thesaurus.com:443

hey, my node version is v11.4.0, and I am getting the following error for "tcom never".

/usr/local/lib/node_modules/thesaurus-com/node_modules/sync-request/index.js:37
throw new Error(response.error.message || response.error || response);
^

Error: getaddrinfo ENOTFOUND www.www.thesaurus.com www.www.thesaurus.com:443
at doRequest (/usr/local/lib/node_modules/thesaurus-com/node_modules/sync-request/index.js:37:11)
at Object.search (/usr/local/lib/node_modules/thesaurus-com/index.js:6:17)
at Object. (/usr/local/lib/node_modules/thesaurus-com/tcom.js:37:20)
at Module._compile (internal/modules/cjs/loader.js:723:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:734:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:776:12)
at executeUserCode (internal/bootstrap/node.js:342:17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.