Check if a string is an AWS SNS Topic ARN
$ npm install --save is-sns-topic-arn
const isTopicArn = require('is-sns-topic-arn');
isTopicArn('foo');
//=> false
isTopicArn('arn:aws:sns:us-west-2:111122223333:app/GCM/MyTopic');
//=> false
isTopicArn('arn:aws:sns:us-west-2:111122223333:MyTopic');
//=> true
Type: string
Topic ARN to check.
MIT © Sam Verschueren