Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including config-schema with all npm packages installed. Try it out:

var configSchema = require("config-schema")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

config-schema v0.0.3

A lightweight wrapper for configuration options using JSON schema

config-schema

Build Status

A lightweight wrapper for configuration options using JSON schema.

example

This is an example, lifted from ship:

@configSchema = new ConfigSchema()

@configSchema.schema.projectRoot =
  required: true
  default: './'
  type: 'string'
  description: 'The path to the root of the project to be shipped.'
@configSchema.schema.sourceDir =
  required: true
  default: './public'
  type: 'string'
  description: ''
@configSchema.schema.ignore =
  required: true
  default: ['ship*.opts']
  type: 'array'
  description: 'Minimatch-style strings for what files to ignore. This can be repeated to add multiple ignored patterns.'
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free