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

node-clips

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-clips

NodeJS package for using CLIPS, a tool for building expert systems.

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

Node CLIPS

NodeJS package for using CLIPS, a tool for building expert systems.

For more information about CLIPS checkout the official documentation.

##Install npm install node-clips

Usage

###Step 1: Create a CLIPS Environment

var clips = require('node-clips');
var env = new clips.Environment();

Step 2: Initialize and Run Environment

env.initialize( function { 
  
  // Load .clp file
  env.load(__dirname+'/animal.clp', function () {

    // Reset environment and run 
    env.reset(function(){
      env.run(function() {
        
        // Log fact list to console           
        console.log(env.facts());

        // Dispose of the CLIPS environment and free memory
        env.dispose(function(){
  
        });
      });
    });
  });
});

##Environment Methods

###load (filename, callback) Load the constructs from the specified file into the CLIPS environment.

###save (filename, callback) Save the constructs in the current environment to a file.

###bload (filename, callback) Load the constructs from the specified binary file into the CLIPS environment. This is considerably faster than a simple load due to the time saved on parsing the constructs.

###bsave (filename, callback) Save the constructs in the current environment to a binary file.

###eval (expression, callback) Evaluate the expression as if it was entered into the CLIPS command line. The eval function cannot be used to define constructs. To define constructs use the build function.

###build (expression, callback) Evaluates the expression as if it was entered into the CLIPS command line. Can be used to define any CLIPS constructs .

###reset (callback) Reset the CLIPS environment.

###run (callback) Allows rules to execute.

###clear (callback)

Clears the current CLIPS environment of all constructs.

###assert (fact, callback)

Assert a fact into CLIPS.

###facts (callback)

Get a list of facts.

##License The MIT License

Copyright(c) 2013-2014, Playlyfe Technologies, developers@playlyfe.com, http://dev.playlyfe.com/

Keywords

clips

FAQs

Package last updated on 22 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