2.0.0 • Published 2 years ago

@shelf/aws-sns-message-attributes v2.0.0

Weekly downloads
1,495
License
MIT
Repository
github
Last release
2 years ago

aws-sns-message-attributes CircleCI npm.io npm (scoped)

Transform JSON into AWS SNS message attributes format. See 1, 2

Install

$ yarn add @shelf/aws-sns-message-attributes

Usage

const {transformMessageAttributes} = require('@shelf/aws-sns-message-attributes');

transformMessageAttributes({
  string: 'hello',
  array: ['hello', 'world'],
  number: 1,
  bool: true,
});

/*
{
  string: {DataType: 'String', StringValue: 'hello'},
  array: {DataType: 'String.Array', StringValue: '["hello","world"]'},
  number: {DataType: 'Number', StringValue: 1},
  bool: {DataType: 'String', StringValue: 'true'},
}
 */

Note: This library does not support binary values

Publish

$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master --tags

License

MIT © Shelf

2.0.0

2 years ago

1.1.0

2 years ago

1.0.4

2 years ago

1.0.3

3 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago