openwhisk-fqn

Javascript library to convert an OpenWhisk entity name to a fully qualified name.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
openwhisk-fqn
0.0.24 years ago4 years agoMinified + gzip package size for openwhisk-fqn in KB

Readme

openwhisk-fqn
Travis License Join Slack
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'