Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Node library for querying the Clearbit business intelligence APIs. Currently supports:
$ npm install clearbit
var clearbit = require('clearbit')('api_key');
// or
var Client = require('clearbit').Client;
var clearbit = new Client({key: 'api_key'});
Person.find(options)
-> Promise
email
String: The email address to look up (required)webhook_id
String: Custom identifier for the webhook requestsubscribe
Boolean: Set to true
to subscribe to the changesstream
Boolean: Set to true
to use the streaming API instead of webhooksvar Person = clearbit.Person;
Person.find({email: 'email@domain.com'})
.then(function (person) {
console.log('Name: ', person.name.fullName);
})
.catch(Person.QueuedError, function (err) {
console.log(err); // Person is queued
})
.catch(Person.NotFoundError, function (err) {
console.log(err); // Person could not be found
})
.catch(function (err) {
console.log('Bad/invalid request, unauthorized, Clearbit error, or failed request');
});
Company.find(options)
-> Promise
domain
String: The company domain to look up (required)webhook_id
String: Custom identifier for the webhook requeststream
Boolean: Set to true
to use the streaming API instead of webhooksvar Company = clearbit.Company;
Company.find({domain: 'www.uber.com'})
.then(function (company) {
console.log('Name: ', company.name);
})
.catch(Company.QueuedError, function (err) {
console.log(err); // Company is queued
})
.catch(Company.NotFoundError, function (err) {
console.log(err); // Company could not be found
})
.catch(function (err) {
console.log('Bad/invalid request, unauthorized, Clearbit error, or failed request');
});
Lookups return Bluebird promises. Any status code >=400 will trigger an error, including lookups than do not return a result. You can easily filter out unknown records from true errors using Bluebird's error class matching:
Person.find({email: 'notfound@example.com'})
.catch(Person.NotFoundError, function () {
// handle an unknown record
})
.catch(function () {
// handle other errors
});
If you really want to use node-style callbacks, use Bluebird's nodeify method:
Person.find({email: 'email@domain.com'}).nodeify(function (err, person) {
if (err) {
// handle
}
else {
// person
}
});
FAQs
Client for Clearbit.co business intelligence APIs
The npm package clearbit receives a total of 38,302 weekly downloads. As such, clearbit popularity was classified as popular.
We found that clearbit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.