New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

koto-config

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koto-config

A basic starter template for building reusable modules

latest
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

Koto Config (WIP)

This is an optional decorator for KotoJS charts that allows chart authors to specify a validation schema (using JSON-SCHEMA). Attempting to set a property that is not valid will throw an Error.

Example Usage

// JSON SCHEMA
const schema = {
  type: 'object',
  properties: {
    height: {
      type: 'number',
      minimum: 500
    }
  }
};

@KotoConfig(schema)
class Chart extends Koto {
  constructor(selection) {
    super(selection);
    this.configs = {
      height: { value: 500 }
    };
  }
  preDraw() {
    console.log('predraw');
  }
}

const chart = new Chart(d3.select(document.body));
chart.config('height', 400); // => throws Error

Repo Usage

  • $ npm start to run webpack-dev-server
  • $ npm test to run unit tests
  • $ npm tdd to continuously run tests
  • $ npm run jshint to lint code
  • $ npm run build to build (and minify)
  • $ npm version (patch|minor|major) to create git release

FAQs

Package last updated on 25 Mar 2016

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