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

@aws-sdk/util-arn-parser

Package Overview
Dependencies
Maintainers
5
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/util-arn-parser - npm Package Compare versions

Comparing version 1.0.0-rc.3 to 1.0.0-rc.8

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [1.0.0-rc.8](https://github.com/aws/aws-sdk-js-v3/compare/v1.0.0-rc.7...v1.0.0-rc.8) (2020-12-05)
**Note:** Version bump only for package @aws-sdk/util-arn-parser
# [1.0.0-rc.3](https://github.com/aws/aws-sdk-js-v3/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2020-10-27)

@@ -8,0 +16,0 @@

11

dist/cjs/index.js

@@ -7,7 +7,8 @@ "use strict";

*/
exports.validate = (str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6;
const validate = (str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6;
exports.validate = validate;
/**
* Parse an ARN string into structure with partition, service, region, accountId and resource values
*/
exports.parse = (arn) => {
const parse = (arn) => {
const segments = arn.split(":");

@@ -27,6 +28,7 @@ if (segments.length < 6 || segments[0] !== "arn")

};
exports.parse = parse;
/**
* Build an ARN with service, partition, region, accountId, and resources strings
*/
exports.build = (arnObject) => {
const build = (arnObject) => {
const { partition = "aws", service, region, accountId, resource } = arnObject;

@@ -38,2 +40,3 @@ if ([service, region, accountId, resource].some((segment) => typeof segment !== "string")) {

};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBT0E7O0dBRUc7QUFDVSxRQUFBLFFBQVEsR0FBRyxDQUFDLEdBQVEs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JlZ2lvbiwgYWNjb3VudElkLCByZXNvdXJjZSB9ID0gYXJuT2JqZWN0O1xuICBpZiAoW3NlcnZpY2UsIHJlZ2lvbiwgYWNjb3VudElkLCByZXNvdXJjZV0uc29tZSgoc2VnbWVudCkgPT4gdHlwZW9mIHNlZ21lbnQgIT09IFwic3RyaW5nXCIpKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKFwiSW5wdXQgQVJOIG9iamVjdCBpcyBpbnZhbGlkXCIpO1xuICB9XG4gIHJldHVybiBgYXJuOiR7cGFydGl0aW9ufToke3NlcnZpY2V9OiR7cmVnaW9ufToke2FjY291bnRJZH06JHtyZXNvdXJjZX1gO1xufTtcbiJdfQ==
{
"name": "@aws-sdk/util-arn-parser",
"version": "1.0.0-rc.3",
"version": "1.0.0-rc.8",
"description": "A parser to Amazon Resource Names",

@@ -27,3 +27,3 @@ "main": "./dist/cjs/index.js",

"jest": "^26.1.0",
"typescript": "~4.0.2"
"typescript": "~4.1.2"
},

@@ -30,0 +30,0 @@ "types": "./dist/cjs/index.d.ts",

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