🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-native-oxford-dictionary

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-oxford-dictionary

React Native node module wrapper for Oxford Dictionary API

1.0.2
latest
Source
npm
Version published
Weekly downloads
1
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-oxford-dictionary

React Native node module wrapper for Oxford Dictionary API. Inspired by oxford-dictionary

Install:

    npm install react-native-oxford-dictionary

Setup:

  const Dictionary = require("react-native-oxford-dictionary");
  
  const config = {
    app_id : "YOUR_OXFORD_ACCOUNT_APP_ID",
    app_key : "YOUR_OXFORD_ACCOUNT_APP_KEY",
    source_lang : "en-us" // default: en-us
  };
  
  const dict = new Dictionary(config);

Usage:

  const define = dict.find("cool");

  define.then((res) => {
      // stringify JSON object to see full structure in console log
      console.log(JSON.stringify(res, null, 4));
  },
  (err) => {
      console.log(err);
  });

Methods:

Useful methods.

.find

.find retrieves available dictionary entries for a given word and language.

  const define = dict.find("cool");

.definitions

.definitions retrieves available dictionary entries for given word and language and returns the definitions.

  const define = dict.definitions("cool");

.inflections

.inflections retrieves available lemmas for a given inflected wordform.

  const define = dict.inflections("cool");

.pronunciations

.pronunciations retrieves available dictionary entries for given word and language and returns the pronunciation.

  const define = dict.pronunciations("cool");

.examples

.examples retrieves available dictionary entries for given word and language and returns only examples.

  const define = dict.examples("cool");

.synonyms

.synonyms retrieves available synonyms for a given word and language.

  const define = dict.synonyms("cool");

.antonyms

.antonyms retrieves available antonyms for a given word and language.

  const define = dict.antonyms("cool");

.sentences

.sentences retrieves list of sentences and list of senses (English language only).

  const define = dict.sentences("cool");

Keywords

react

FAQs

Package last updated on 27 Oct 2021

Did you know?

Socket

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