New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

amazon-s3-uri

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amazon-s3-uri

A URI wrapper that can parse out information about an S3 URI

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
428
decreased by-98.79%
Maintainers
1
Weekly downloads
 
Created
Source

AmazonS3URI

Actions Status codecov

A URI wrapper that can parse out information about an S3 URI

Shamelessly adapted from https://github.com/aws/aws-sdk-java/blob/master/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3URI.java

with notable exceptions:

  • it doesn't parse version
  • There is no preprocessing on given url string (you have to encode and replace special characters yourself if needed)
  • For a valid S3 uri, region is never null but will default to us-east-1

example

const AmazonS3URI = require('amazon-s3-uri')

try {
  const uri = 'https://bucket.s3-aws-region.amazonaws.com/key'
  const { region, bucket, key } = AmazonS3URI(uri)
} catch (err) {
  console.warn(`${uri} is not a valid S3 uri`) // should not happen because `uri` is valid in that example
}

license

MIT

Keywords

FAQs

Package last updated on 06 Apr 2021

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