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

@janiscommerce/active-client

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

@janiscommerce/active-client

[![Build Status](https://travis-ci.org/janis-commerce/active-client.svg?branch=master)](https://travis-ci.org/janis-commerce/active-client) [![Coverage Status](https://coveralls.io/repos/github/janis-commerce/active-client/badge.svg?branch=master)](https:

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

active-client

Build Status Coverage Status

ActiveClient is a simple module for getting a client from a field and a value. The module only has one method and a Model for the get.

Installation

npm install @janiscommerce/active-client

API

  • getByField(field, value) ASYNCHRONOUS, Search the client by a field and value given.
  • field: type String, the field name. eg. 'name'.
  • value: type String|Integer, the field value. eg. 'foo'.

Returns a Object with the client found or false if client not found for field with that value.

Usage


const ActiveClient = require('@janiscommerce/active-client');

const client = await ActiveClient.getByField('name', 'client-name');

/**
	Expected output:
	{
		id: 1,
		name: 'client-name',
		status: 5
	}
 */

FAQs

Package last updated on 26 Jun 2019

Did you know?

Socket

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.

Install

Related posts

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