Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
collins
Advanced tools
Readme
Collins English Dictionary asynchronous API for node.js
npm install collins
var Collins = require('collins');
var serverName = 'api.collinsdictionary.com';
var accessKey = 'your access key';
var d = new Collins(serverName, accessKey);
/**
* Get list of available dictionaries
*/
d.dictionaries(function(err, data) {
console.log(data);
});
/**
* Get a dictionary
*/
d.dictionary('english', function(err, data) {
console.log(data);
});
/**
* Search
*/
d.search('english', 'grape', function(err, data) {
console.log(data);
});
/**
* Get Did You Mean entries
*/
d.didYouMean('english', 'trape', function(err, data) {
console.log(data);
});
/**
* Get the first/best matching entry
*/
d.first('english', 'grape', 'xml', function(err, data) {
console.log(data);
});
/**
* Get an entry
*/
d.entry('english', 'the-grape_1', 'xml', function(err, data) {
console.log(data);
});
/**
* Get pronunciations
*/
d.pronunciation('english', 'grape_1', function(err, data) {
console.log(body);
});
/**
* Get nearby entries
*/
d.nearby('english', 'grape_1', function(err, data) {
console.log(body);
});
c.dictionaries(callback)
c.dictionary(dictionaryCode, callback)
c.search(dictionaryCode, searchWord, pageSize, pageIndex, callback)
c.didYouMean(dictionaryCode, searchWord, entryNumber, callback)
c.first(dictionaryCode, searchWord, format, callback) format = html, xml
c.entry(dictionaryCode, entryId, format, callback)
c.pronunciation(dictionaryCode, entryId, lang, callback)
c.nearby(dictionaryCode, entryId, entryNumber, callback)
To run tests specify an access key and a base url in _config.js
like so:
module.exports = {
SERVER_NAME: 'api.collinsdictionary.com',
ACCESS_KEY: 'your access key'
};
inside test
directory, then run:
mocha
MIT
FAQs
Collins English Dictionary asynchronous API for Node.js
The npm package collins receives a total of 15 weekly downloads. As such, collins popularity was classified as not popular.
We found that collins demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.