Library of useful functions.
- Source:
Members
-
<static> iterator :*
-
Type:
- *
-
<static> oauth :*
-
Type:
- *
-
<static> request :module:jiveRequest
-
Useful request related utilities
Type:
- module:jiveRequest
Methods
-
<static> base64Decode(str) → {*|string}
-
Parameters:
Name Type Description strReturns:
- Type
- * | string
-
<static> base64Encode(object) → {*|string}
-
Parameters:
Name Type Description objectReturns:
- Type
- * | string
-
<static> basicAuthorizationHeaderValid(auth, clientId, clientSecret, authRequired) → {boolean}
-
Parameters:
Name Type Description authclientIdclientSecretauthRequiredReturns:
- Type
- boolean
-
<static> buildRequest(url, method, postBody, headers, requestOptions) → {Promise}
-
By default this will build a request of type 'application/json'. Set a Content-Type header explicitly if its supposed to be a different type.
Parameters:
Name Type Description urlString methodString postBodyObject leave null unless PUT or POST
headersObject leave null or empty [] if no additional headers
requestOptionsObject leave null or empty [] if no additional request optinos
- Source:
Returns:
Promise
- Type
- Promise
-
<static> fscopy(source, target) → {Promise}
-
Parameters:
Name Type Description sourcetargetReturns:
Promise
- Type
- Promise
-
<static> fsexists(path) → {Promise}
-
Parameters:
Name Type Description pathReturns:
Promise
- Type
- Promise
-
<static> fsGetSize(filename) → {Promise}
-
Gets the file size in bytes.
Parameters:
Name Type Description filenamethe path to the file.
Returns:
Promise
- Type
- Promise
-
<static> fsisdir(path) → {Promise}
-
Parameters:
Name Type Description pathReturns:
Promise
- Type
- Promise
-
<static> fsmkdir(path) → {Promise}
-
Parameters:
Name Type Description pathReturns:
Promise
- Type
- Promise
-
<static> fsread(path) → {Promise}
-
Parameters:
Name Type Description pathReturns:
Promise
- Type
- Promise
-
<static> fsreaddir(path) → {Promise}
-
Parameters:
Name Type Description pathReturns:
Promise
- Type
- Promise
-
<static> fsreadJson(path) → {Promise}
-
Parameters:
Name Type Description pathReturns:
Promise
- Type
- Promise
-
<static> fsrename(source, target, force) → {Promise}
-
Parameters:
Name Type Description sourcetargetforceReturns:
Promise
- Type
- Promise
-
<static> fsrmdir(path) → {Promise}
-
Parameters:
Name Type Description pathReturns:
Promise
- Type
- Promise
-
<static> fsTemplateCopy(source, target, substitutions) → {Promise}
-
Parameters:
Name Type Description sourcetargetsubstitutionsReturns:
Promise
- Type
- Promise
-
<static> fsTemplateRead(source, substitutions) → {Promise}
-
Parameters:
Name Type Description sourcesubstitutionsReturns:
Promise
- Type
- Promise
-
<static> fsTemplateWrite(data, target, substitutions) → {Promise}
-
Parameters:
Name Type Description datatargetsubstitutionsReturns:
Promise
- Type
- Promise
-
<static> fswrite(data, path) → {Promise}
-
Parameters:
Name Type Description datapathReturns:
Promise
- Type
- Promise
-
<static> guid() → {String}
-
Useful general utility functions.
- Source:
Returns:
guid
- Type
- String
-
<static> jiveAuthorizationHeaderValid(auth, clientId, clientSecret, authRequired) → {boolean}
-
Parameters:
Name Type Description authclientIdclientSecretauthRequiredReturns:
- Type
- boolean
-
<static> recursiveCopy(root, target, force, substitutions, file) → {Promise}
-
Parameters:
Name Type Description roottargetforcesubstitutionsfileReturns:
Promise
- Type
- Promise
-
<static> recursiveDirectoryProcessor(currentFsItem, root, targetRoot, force, processor) → {Promise}
-
Parameters:
Name Type Description currentFsItemroottargetRootforceprocessorReturns:
Promise
- Type
- Promise
-
<static> sortObject(o) → {Object}
-
Parameters:
Name Type Description oReturns:
- Type
- Object
-
<static> zipFolder(root, targetZip, flatten) → {Promise}
-
Parameters:
Name Type Description roottargetZipflattenReturns:
Promise
- Type
- Promise