art-config
Version:
A powerful yet simple tool for configuring all your libraries consistently.
34 lines (29 loc) • 753 B
text/coffeescript
{
defineModule
log
Promise
inspect
formattedInspect
merge
deepMerge
mergeInto
parseQuery
pushIfNotPresent
isPlainObject
isString
upperCamelCase
expandPathedProperties
clone
compactFlatten
} = require 'art-standard-lib'
{BaseObject} = require 'art-class-system'
defineModule module, class ConfigRegistry extends BaseObject
: []
: {}
: (name, config) =>
throw new Error "config must be a plain object" unless isPlainObject config
[name] = config
: (configurable) => pushIfNotPresent , configurable
: (args...) ->
console.error "DEPRICATED: use Art.Config.configure"
Neptune.Art.Config.configure args...