1.0.1 • Published 7 years ago

ore-fol-helpers v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

ore-fol-helpers

Build Status npm Version JS Standard

Helper functions for ore-fol.com

Installation

$ npm install ore-fol-helpers --save

Usage

'use strict'

{
  const { isAdmin } = require('ore-fol-helpers')
  if (isAdmin({ /** ... */ })) {
    /** ... **/
  }
}

Functions

Available functions

SignatureDescription
asDbHook(promise) -> Promise
extFromContentType() -> stringExtension string from content type
hasValue(obj, value) -> BooleanCheck having value
isAdmin(user) -> booleanDetect an user is admin or not
mergeQueryString(url, query) -> stringMerge query string into url
pm2Call(cmd, cmdArgs, options, options.NODE_ENV) -> PromiseCall pm2 command
prefixedStyle(prefix, style) -> Object
resolveLink(url, params) -> stringResolve link url
saveBase64Image() -> PromiseSave base 64 image into file
uniqueEntities(entities) -> ArrayCreate unique entities
viewPathname(stackName, viewName, params) -> stringPathname for a view

License

This software is released under the MIT License.

Links