Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

validate-robust-sequence

1.0.0 • Public • Published

validate-robust-sequence

Tests if an array is an increasing non-overlapping sequence

Example

var testSequence = require("validate-robust-sequence")
 
console.log(testSequence([1e-16, -1]),  [0.5, 1.5])

Output:

true false

Install

npm install validate-robust-sequence

API

require("validate-robust-sequence")(seq)

Tests if a sequence of numbers is an increasing non-overlapping sequence

  • seq is an array of floats

Returns true if the sequence is a robust sequence, false otherwise

Credits

(c) 2014 Mikola Lysenko. MIT License

Install

npm i validate-robust-sequence

DownloadsWeekly Downloads

10

Version

1.0.0

License

MIT

Last publish

Collaborators

  • avatar