openwhisk-fqn
v0.0.2
Published
Javascript library to convert an OpenWhisk entity name to a fully qualified name.
Downloads
16,584
Readme
openwhisk-fqn
Javascript library to convert an Apache OpenWhisk entity name to a fully qualified name.
Installation
npm install openwhisk-fqn
Usage
let fqn = require('openwhisk-fqn')
console.log(fqn('action')) // outputs '/_/action'
console.log(fqn('package/action')) // outputs '/_/package/action'
console.log(fqn('/namespace/action')) // outputs '/namespace/action'
console.log(fqn('/namespace/package/action')) // outputs '/namespace/package/action'
console.log(fqn(null)) // throws 'Name must be a string'
console.log(fqn('/a/b/c/d')) // throws 'Name is not valid'