Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

easy-implements

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easy-implements

Dead simple interface / data verification

  • 1.0.3
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Dead simple interface / data verification

Alpha version, subject to random change without cause or warning.

First define your interface in seperate module:

interface/Person.js

var PersonInterface = { name: 'Person', required: { first_name: 'string', last_name: 'age', } optional: { age: 'number', } }

var PersonInterface = require('./interface/Person.js');

var Implements = require('easy-implements');

Implements(Personinterface, myObj); //Throws error if no bueno

FAQs

Package last updated on 16 Sep 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc