Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
PhoneDB is a database backed by Redis to store user contact lists. It allows you to easily find which of a user's contacts are also registered with your app. PhoneDB validates phone numbers before they are added.
npm install phonedb
Check out Redis quickstart to install for your platform, or use one of the many cloud providers.
A convenience script is provided for macOS default Homebrew Redis installs:
npm run redis-start
Require PhoneDB:
const PhoneDB = require('phonedb');
Initialize PhoneDB, connecting to a Redis client:
const phoneDB = new PhoneDB(redisClient);
Register a user's phone number with PhoneDB:
phoneDB.register('+14157775555');
Add a user's contacts:
const result = await phoneDB.addContacts(userId, ['+18473335555', '+12127775555']);
// 2
Get a user's contacts:
const contacts = await phoneDB.getContacts(userId);
Get a user's contacts who are also registered with PhoneDB (set registered = true
):
const registeredContacts = await phoneDB.getContacts(userId, true);
Get mutual contacts between two users:
const mutualContacts = await phoneDB.getMutualContacts(userId, otherUserId);
Get mutual contacts between two users who are registered:
const mutualRegisteredContacts = await phoneDB.getMutualContacts(userId, otherUserId, true);
Add DEBUG=phonedb
to the node start script in package.json
to see debug output. i.e:
DEBUG=phonedb node server.js
npm install
npm test
npm run coverage
FAQs
Contact list storage and management for Node
The npm package phonedb receives a total of 1 weekly downloads. As such, phonedb popularity was classified as not popular.
We found that phonedb 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.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.