You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

node-properties

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-properties

[![NPM](https://nodei.co/npm/node-properties.svg?downloads=true&downloadRank=true)](https://www.npmjs.com/package/node-properties)

0.2.3
latest
Source
npmnpm
Version published
Weekly downloads
1
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

node-properties

NPM

Extremely flexible, no-hassle configuration for nodejs applications.

Install

npm i node-properties

Usage

defaults.yaml

user:
  name: John

index.js

import {config} from 'node-properties';

const name = config.get('user.name');
console.log(`Hello ${name}!`);

// Output: Hello John!

Sources

By default, properties are retrieved in the following order:

  • Command line parameters
  • Environment variables
  • config/${NODE_ENV} (.yaml, .json, or .env)
  • config/defaults (.yaml, .json, or .env)

FAQs

Package last updated on 11 Jul 2019

Did you know?

Socket

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.

Install

Related posts