Socket
Book a DemoInstallSign in
Socket

aws-has-region

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-has-region

Check wether or not the aws-sdk has a configured region, without loading any clients into memory.

latest
Source
npmnpm
Version
3.0.0
Version published
Weekly downloads
17
54.55%
Maintainers
0
Weekly downloads
 
Created
Source

AWS has region

Check wether or not the aws-sdk has a configured region, without loading any clients into memory.

Installation

npm install --save aws-has-region

Usage

import awsHasRegion, { errorText } from 'aws-has-region'

if (!(await awsHasRegion())) {
  console.error(errorText)
  process.exit(1)
}

// ...

API

awsHasRegion()

  • returns Promise<boolean>

Returns true if the AWS SDK region config is set, otherwise false.

errorText

  • type: string

A error message that can be printed if the region is not set.

FAQs

Package last updated on 25 Feb 2025

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