JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 28887
  • Score
    100M100P100Q136917F
  • License MIT

base-methods plugin that adds a `config` method for mapping declarative configuration values to other 'base' methods or custom functions.

Package Exports

  • base-config

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (base-config) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

base-config NPM version

base-methods plugin that adds a config method for mapping declarative configuration values to other 'base' methods or custom functions.

Install

Install with npm

$ npm i base-config --save

Usage

var config = require('base-config');
var base = require('base-methods');
var app = base();
app.use(config());

app.config({
  foo: 'bar'
});

// or
app.config.map('foo', 'bar');

API

create

Create a function for mapping app properties onto the given prop namespace.

Params

  • prop {String}: The namespace to use
  • argv {Object}
  • returns {Object}

Other plugins

  • base-cli: Plugin for base-methods that maps built-in methods to CLI args (also supports methods from a… more | homepage
  • base-data: adds a data method to base-methods. | homepage
  • base-methods: Starter for creating a node.js application with a handful of common methods, like set, get,… more | homepage
  • base-options: Adds a few options methods to base-methods, like option, enable and disable. See the readme… more | homepage
  • base-plugins: Upgrade's plugin support in base-methods to allow plugins to be called any time after init. | homepage
  • base-store: Plugin for getting and persisting config values with your base-methods application. Adds a 'store' object… more | homepage

Tests

Running tests

Install dev dependencies:

$ npm i -d && npm test

Coverage

Statements : 100% (15/15)
Branches   : 100% (2/2)
Functions  : 100% (2/2)
Lines      : 100% (15/15)

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on November 22, 2015.