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

nature

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nature

A library to help classify the things (models) in your world (app) and how they interact.

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
269
decreased by-37.44%
Maintainers
1
Weekly downloads
 
Created
Source

** under construction **

Nature

A library to help classify the things (models) in your world (app) and how they interact.

Synopsis

Enables you to write API methods like: (YoungMan and FlammableCar are derivitives of Thing)

exports.burnCar = function(arsonist){
    var youngMan = new YoungMan(arsonist);
    if (!youngMan.valid){
        throw new Error(youngMan.validationMessages.join("\n"));
        // throws:
        // The arsonist supplied must be a young man.
        // Invalid age 29: Must be between 11 and 19. 
        // Over 5 litres Gasoline required
        // Less compassion necessary.
    } else {
        var car = new FlammableCar(process.env);
        if (car.valid){
            // the Vauxhall Astra supplied in the environment is indeed flammable
            youngMan.igniteCar(car);
        }
    }
}

Client code for the above is straight forward, input taken directly from the command line

var outdoors = require("outdoor-activity");
outdoors.burnCar(process.argv);

Then a simple command executes the outdoor activity:

$ CAR_MAKE=Vauxhall CAR_MODEL=Astra node outdoors.js --name Alfie --age 11 --litres 13 --compassion unknown

See the Thing docs for more detail..

FAQs

Package last updated on 13 Mar 2013

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