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

@scalecube/utils

Package Overview
Dependencies
Maintainers
6
Versions
188
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@scalecube/utils

[![Join the chat at https://gitter.im/scalecube-js/Lobby](https://badges.gitter.im/scalecube-js/Lobby.svg)](https://gitter.im/scalecube-js/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

  • 0.0.2-alpha.0
  • npm
  • Socket score

Version published
Weekly downloads
16
decreased by-46.67%
Maintainers
6
Weekly downloads
 
Created
Source

Join the chat at https://gitter.im/scalecube-js/Lobby

NOTICE versions 0.0.x are experimental without LTS or the API and behavior might change from patch to patch

Scalecube utils

reusable utils library

address

getFullAddress
Given valid address: Address
When  calling getFullAddress(address)
Then  fullAddress will be added to the address object
validateAddress
Given address: any
And   isOptional: boolean
# isOptional = true
When  calling validateAddress(address, isOptional) 
Then  valid address can be undefined or type Address
# isOptional = false
When  calling validateAddress(address, isOptional) 
Then  valid address must be of type Address

constants

NOT_VALID_PROTOCOL
NOT_VALID_ADDRESS 
NOT_VALID_HOST 
NOT_VALID_PATH
NOT_VALID_PORT

##check

assert
isDefined
isString
assertNonEmptyString
isArray
isNonEmptyArray
assertArray
isObject
assertObject
assertNonEmptyObject
isOneOf
assertOneOf
isFunction
assertFunction
assertNumber

FAQs

Package last updated on 16 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