JSPM

logrange

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q36610F
  • License MIT

Logarithmic range between two numbers

Package Exports

  • logrange

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (logrange) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm

logrange

Build Status Dependency Status

Logarithmic range between two numbers.

Example

Ascending logarithmic range:

logrange(4, 1000, 2)
//=> [4, 8, 16, 32, 64, 128, 256, 512]

Descending logarithmic range:

logrange(4, 0.1, 0.5)
//=> [4, 2, 1, 0.5, 0.25, 0.125]

API

logrange([opts], first, last, ratio)

Returns array of multiples of first up to last:

[first, first*ratio, first*ratio*ratio, ...]
opts.inclusive

Type: Boolean
Default: false

If set, last is included if it is a part of the sequence.

Install

npm install logrange

License

MIT