Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@taktikorg/suscipit-modi-ratione
Advanced tools
>This repository is part of the [Pelias](https://github.com/pelias/pelias) >project. Pelias is an open-source, open-data geocoder originally sponsored by >[Mapzen](https://www.mapzen.com/). Our official user documentation is >[here](https://github.com/pel
This repository is part of the Pelias project. Pelias is an open-source, open-data geocoder originally sponsored by Mapzen. Our official user documentation is here.
This repository defines standard configuration for all parts of the Pelias geocoder. It contains tools for Pelias packages to read from configuration in a standardized way, and for Pelias users to set up their own configuration.
$ npm install @taktikorg/suscipit-modi-ratione
Create a new Pelias config:
var config = require('@taktikorg/suscipit-modi-ratione');
// use the default settings
var settings = config.defaults;
var config = require('@taktikorg/suscipit-modi-ratione');
// generate development specific settings
var settings = config.generate();
the easiest way to get a custom config is to create a file named ~/pelias.json
.
you can copy the example file from here: https://github.com/taktikorg/suscipit-modi-ratione/blob/master/config/local.json
this file will be checked for settings whenever you run imports and will override the defaults; it is particularly useful for specifying datasource paths during development.
sysadmin and ops engineers can override the default settings on the server by launching any code which requires this module by supplying an ENV var with the path to their custom json config.
$ PELIAS_CONFIG=/path/to/settings/file.json node app.js
Note: by default the merge is deep (it replaces the defaults with any properties that are present in the env config). The developer can disable deep merging to use only local configuration settings.
var config = require('@taktikorg/suscipit-modi-ratione');
// shallow merge config settings from a path supplied in the env var
var settings = config.generate( false );
// deep merge config settings from a path supplied in the env var
var settings = config.generate( true );
var settings = config.generate();
You can test the result of merging your env config with the following bash oneliner:
npm install @taktikorg/suscipit-modi-ratione; \
PELIAS_CONFIG=/path/config.json \
node -e "console.log( JSON.stringify(require('@taktikorg/suscipit-modi-ratione').generate(), null, 2) );";
Aside from deep
, the generate
function takes an additional parameter named schema
that uses Joi to validate that the configuration is useable. An error is thrown if the generated configuration does not validate against the schema.
The generated config will be a standard Javascript object:
var config = require('@taktikorg/suscipit-modi-ratione'),
settings = config.generate();
console.log(JSON.stringify(settings, null, 2));
// {
// "api": {
// ...
// },
// "imports": {
// ...
// }
// }
You can pretty print the generated config with any package you like or with JSON.stringify
.
Using the third parameter to JSON.stringify
for indentation may be helpful:
var config = require('@taktikorg/suscipit-modi-ratione'),
settings = config.generate();
console.log( JSON.stringify(settings, null, 2) );
The @taktikorg/suscipit-modi-ratione
npm module can be found here:
https://npmjs.org/package/@taktikorg/suscipit-modi-ratione
Please fork and pull request against upstream master on a feature branch.
Pretty please; provide unit tests and script fixtures in the test
directory.
$ npm test
CI tests every release against all supported Node.js versions.
FAQs
security holding package
The npm package @taktikorg/suscipit-modi-ratione receives a total of 3 weekly downloads. As such, @taktikorg/suscipit-modi-ratione popularity was classified as not popular.
We found that @taktikorg/suscipit-modi-ratione demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.