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

@mapbox/cloudfriend

Package Overview
Dependencies
Maintainers
113
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mapbox/cloudfriend - npm Package Compare versions

Comparing version 1.7.0 to 1.8.0

LICENSE.txt

16

lib/intrinsic.js

@@ -192,1 +192,17 @@ var intrinsic = module.exports = {};

};
/**
* [The intrinsic function Fn::Split](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-split.html)
* returns the value of an attribute from a resource in the template.
*
* @static
* @memberof cloudfriend
* @name split
* @param {string} delimiter - The delimiter you would like to split the string on
* @param {string} string - The string you would like to split
* @returns The attribute value.
*/
intrinsic.split = (delimiter, string) => {
return { 'Fn::Split': [delimiter, string.toString()] };
};

2

package.json
{
"name": "@mapbox/cloudfriend",
"version": "1.7.0",
"version": "1.8.0",
"description": "Helper functions for assembling CloudFormation templates in JavaScript",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -18,2 +18,3 @@ # cloudfriend

join(delimiter, pieces) | [Fn::Join](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-join.html)
split(delimiter, string) | [Fn::Split](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-split.html)
select(index, list) | [Fn::Select](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-select.html)

@@ -60,3 +61,3 @@ ref(name) | [Ref](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html)

# ... or ...
$ npm install -g cloudfriend
$ npm install -g @mapbox/cloudfriend
```

@@ -63,0 +64,0 @@

@@ -18,2 +18,3 @@ var test = require('tape');

assert.deepEqual(cloudfriend.ref('something'), { Ref: 'something' }, 'ref');
assert.deepEqual(cloudfriend.split(',', 'a,b,c,d'), { 'Fn::Split': [',', 'a,b,c,d'] }, 'split');
assert.deepEqual(cloudfriend.userData(['#!/usr/bin/env bash', 'set -e']), { 'Fn::Base64': { 'Fn::Join': ['\n', ['#!/usr/bin/env bash', 'set -e']] } }, 'userData');

@@ -20,0 +21,0 @@ assert.deepEqual(cloudfriend.sub('my ${thing}'), { 'Fn::Sub': 'my ${thing}' }, 'sub without variables');

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