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

validate-table-rules

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

validate-table-rules

Module that will allow you to pass in a rule as a string and convert to expression

latest
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

This package allows you to convert string expressions into actual expressions.

  • Christopher Bradley | declarationcb@gmail.com for questions.

I am actively working on building this to handle a mass range of possible expressions.

Installation

npm install validate-table-rules

Require the module.

'use strict';
const ruleSet = require('validate-table-rules');

You must attach the module to the object prototype.

Object.prototype.rule = ruleSet.rules;

Sample use case

console.log(object.rule('[Age] < [Required]'))

To list the set of available expressions

console.log(object.rule('--help'))

Quickstart

'use strict';

//  Required module
const ruleSet = require('validate-table-rules');

// Attach module to Object prototype
Object.prototype.rule = ruleSet.rules;

// Declare and object
const object = [
    {Age: 18, Required: 21}
];

// Sample case -> pass in names you
// want to check for in attached object
console.log(object.rule('[Age] < [Required]'))

Keywords

engine

FAQs

Package last updated on 18 May 2019

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