UNPKG

fms-admin-client

Version:

A client designed to provide a framework for interactions with FileMaker Server Admin Tools.

24 lines (19 loc) 499 B
'use strict'; const _ = require('lodash'); const sanitize = (object, parameters) => _.pick(object, parameters); const convertCommands = object => _.flatten( _.compact( _.values( _.mapValues(object, (value, key, object) => { if (value === true) { return [`-${key}`]; } else if (value !== false) { return [`-${key}`, value]; } return; }) ) ) ); module.exports = { convertCommands, sanitize };