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

rulify

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

rulify

Converts .rule files into .fst files for consumption by NLU parser.

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Rulify

Convert .rule files into .fst files.

Node Usage

Rulify takes two arguments, the first is the path to the RULE file, the second is the callback when complete.

const rulify = require('rulify');
rulify('main.rule', function(err, output) {
  // output is the path to the output file
});

Specify Output

An optional second argument can be the output path for the FST file.

rulify('src/main.rule', 'rules/main.fst', function(err, output) {
  // file is saved
});

Sync

There's an option to run rulify synchronously.

rulify.sync('src/main.rule', 'rules/main.fst');

Commandline

Installing rulify globally (npm install -g rulify) will allow you to batch convert rule files to fst files.

Convert to FST

Convert a single file. Must specify the output directory (either -o or --output).

rulify -o rules src/main.rule 

Multiple files

Use the -o or --output argument to specify an output directory.

rulify --output rules src/*.rule
rulify -o rules src/*.rule

Convert Directory

Use the -i or --input argument to specify an input directory of files.

rulify --output rules --input src
rulify -o rules -i src

FAQs

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