Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
company-api
Advanced tools
A library to lookup NUM records recursively to produce an aggregated result.
An API for aggregating NUM Contacts Module and Images Module Records into a single object using the NUM Protocol.
git clone git@github.com:NUMtechnology/company-api.git
cd company-api
npm install
test/index.html
in your browser.npm install -s company-api
const companyApi = require('company-api');
// Create an API instance
const api = companyApi.createCompanyApi();
// Use it to look up a domain
api.lookupDomain('numexample.com').then((result) => {
console.log(JSON.stringify(result));
}, (err)=>{
console.error('ERROR: ', JSON.stringify(err));
});
import { createCompanyApi } from 'company-api';
// Create an API instance
const api = createCompanyApi();
// Use it to look up a domain
api.lookupDomain('numexample.com').then((result) => {
console.log(JSON.stringify(result));
}, (err)=>{
console.error('ERROR: ', JSON.stringify(err));
});
import { createCompanyApi, CompanyApiOptions } from 'company-api';
// Create an API instance
const api = createCompanyApi();
const versionMap = new Map<number, string>();
// Module 1 (Contacts) is currently at version 2, the others will default to version 1.
// An empty map can be supplied which sets the default version for each NUM module ('2' for Contacts, '1' for everything else).
versionMap.set(1,'2');
versionMap.set(3,'1.5'); // E.g. use v1.5 of the Images module (if such a version exists)
const options = new CompanyApiOptions(
2, // The number of levels for Contacts records. 0 returns no contacts data.
1, // The number of levels for Images records. 0 returns no images data.
versionMap
);
// Use it to look up a domain
api.lookupDomain('numexample.com', options).then((result) => {
console.log(JSON.stringify(result));
}, (err)=>{
console.error('ERROR: ', JSON.stringify(err));
});
If you already have a NUMClient object you can re-use it.
import { createClient } from 'num-client';
import { createCompanyApi } from 'company-api';
// (from another part of your application)
const existingClient = createClient();
// Inject the existing client when creating the API instance
const api = createCompanyApi(existingClient);
// Use it to look up a domain
api.lookupDomain('numexample.com').then((result) => {
console.log(JSON.stringify(result));
}, (err)=>{
console.error('ERROR: ', JSON.stringify(err));
});
FAQs
A library to lookup NUM records recursively to produce an aggregated result.
The npm package company-api receives a total of 9 weekly downloads. As such, company-api popularity was classified as not popular.
We found that company-api 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.