Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ore-fol-helpers

Helper functions for ore-fol.com

ore-fol

readme

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

Signature Description
asDbHook(promise) -> Promise
extFromContentType() -> string Extension string from content type
hasValue(obj, value) -> Boolean Check having value
isAdmin(user) -> boolean Detect an user is admin or not
mergeQueryString(url, query) -> string Merge query string into url
pm2Call(cmd, cmdArgs, options, options.NODE_ENV) -> Promise Call pm2 command
prefixedStyle(prefix, style) -> Object
resolveLink(url, params) -> string Resolve link url
saveBase64Image() -> Promise Save base 64 image into file
uniqueEntities(entities) -> Array Create unique entities
viewPathname(stackName, viewName, params) -> string Pathname for a view

License

This software is released under the MIT License.