All files / src config.js

100% Statements 20/20
100% Branches 0/0
100% Functions 8/8
100% Lines 15/15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 311x   1x 1x   4x 4x 4x 4x 1x 1x 3x   1x 3x   1x 3x     1x                    
const Conf = require('conf')
 
const constants = require('./constants')
const config = new Conf()
 
const getAutoAdd = () => config.get(constants.AUTO_ADD)
const getEmojiFormat = () => config.get(constants.EMOJI_FORMAT)
const getIssueFormat = () => config.get(constants.ISSUE_FORMAT)
const getSignedCommit = () => config.get(constants.SIGNED_COMMIT)
const setAutoAdd = (autoAdd) => config.set(constants.AUTO_ADD, autoAdd)
const setEmojiFormat = (emojiFormat) => {
  config.set(constants.EMOJI_FORMAT, emojiFormat)
}
const setIssueFormat = (issueFormat) => {
  config.set(constants.ISSUE_FORMAT, issueFormat)
}
const setSignedCommit = (signedCommit) => {
  config.set(constants.SIGNED_COMMIT, signedCommit)
}
 
module.exports = {
  getAutoAdd,
  getEmojiFormat,
  getIssueFormat,
  getSignedCommit,
  setAutoAdd,
  setEmojiFormat,
  setIssueFormat,
  setSignedCommit
}