Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

phonedb

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phonedb - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

2

package.json
{
"name": "phonedb",
"version": "0.2.1",
"version": "0.3.0",
"description": "Contact list storage and management for Node",

@@ -5,0 +5,0 @@ "keywords": [

@@ -7,5 +7,2 @@ /**

const debug = require('debug')('phonedb');
const redis = require('redis');
const phoneUtil = require('google-libphonenumber').PhoneNumberUtil.getInstance();

@@ -17,7 +14,6 @@

/**
* Initializes a new PhoneDB object.
* Optionally takes in a Redis config (https://github.com/NodeRedis/node_redis#rediscreateclient).
* Initializes a new PhoneDB object with a Redis client (https://github.com/NodeRedis/node_redis).
*/
constructor(config = null) {
this.client = (config != null) ? redis.createClient(config) : redis.createClient();
constructor(redis) {
this.client = redis;
}

@@ -24,0 +20,0 @@

@@ -38,12 +38,7 @@ # PhoneDB

Initialize PhoneDB, connecting to a local Redis server running on the default port:
Initialize PhoneDB, connecting to a [Redis client](https://github.com/NodeRedis):
```js
const phoneDB = new PhoneDB();
const phoneDB = new PhoneDB(redisClient);
```
Optionally pass in a [Redis configuration](https://github.com/NodeRedis/node_redis#rediscreateclient) to connect to a remote server.
```js
const phoneDB = new PhoneDB(REDIS_CLOUD_URL);
```
Register a user's phone number with PhoneDB:

@@ -50,0 +45,0 @@ ```js

const assert = require('assert');
const redis = require('redis');

@@ -14,3 +13,3 @@

describe('PhoneDB', () => {
const phoneDB = new PhoneDB();
const phoneDB = new PhoneDB(client);

@@ -17,0 +16,0 @@ beforeEach(() => {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc