2017 © Pedro Peláez
 

package math-interval-js

A simple math interval matcher for javascript.

image

vluzrmos/math-interval-js

A simple math interval matcher for javascript.

  • Saturday, July 11, 2015
  • by vluzrmos
  • Repository
  • 2 Watchers
  • 5 Stars
  • 1 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Math Interval JS

Join the chat at https://gitter.im/vluzrmos/interval-js, (*1)

npm version Build Status, (*2)

Check if a given number match with a math interval., (*3)

Install

You just download the source zip., (*4)

Or if you want:, (*5)

NPM:, (*6)

npm install math-interval-js., (*7)

Bower:, (*8)

bower install math-interval-js., (*9)

Composer:, (*10)

composer require vluzrmos/math-interval-js., (*11)

Usage

Simple:, (*12)

Interval.test(1, "[1,2]");
// true

Interval.test(3, "[1,2]");
// false

Set of numbers:, (*13)

Interval.test(2, "{1,3,5,7}");
// false

Interval.test(3, "{1,3,5,7}");
// true

Infinity:, (*14)

Interval.test(-2, "[1, Inf)");
// false

Interval.test(400, "[1, Inf)");
// true
Interval.test(-2, "(-Inf, Inf)");
// true

Interval.test(1000, "(-Inf, Inf)");
// true

Simple excluded:, (*15)

Interval.test(-2, "(-2, 2)");
// false

Interval.test(2, "(-2, 2)");
// false

Interval.test(0, "(-2, 2)");
// true

Interval.test(1, "(-2, 2)");
// true

Importing

NodeJS:, (*16)

var Interval = require('math-interval-js');

Html:, (*17)

<script src="/path/to/that/package/src/interval.js"></script>

The Versions

11/07 2015

dev-master

9999999-dev

A simple math interval matcher for javascript.

  Sources   Download

MIT

math interval nodejs

11/07 2015

v0.0.7

0.0.7.0

A simple math interval matcher for javascript.

  Sources   Download

MIT

math interval nodejs