ore-fol-helpers

1.0.1 • Public • Published

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.

Links

Readme

Keywords

Package Sidebar

Install

npm i ore-fol-helpers

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • okunishinishi