perod
TypeScript icon, indicating that this package has built-in type declarations

1.4.1 • Public • Published

perod

Period management utility working with numbers and dates

import { findFreeRanges, mergeRanges } from 'perod'

const ranges = [
  { start: 1, end: 8 },
  { start: 4, end: 12 },
  { start: 12, end: 19 },
  { start: 21, end: 28 },
]

findFreeRanges(ranges) // [{ start: 19, end: 21 }]
mergeRanges(ranges) // [{ start: 1, end: 19 }, { start: 21, end: 28 }]

Readme

Keywords

none

Package Sidebar

Install

npm i perod

Weekly Downloads

0

Version

1.4.1

License

ISC

Unpacked Size

42.4 kB

Total Files

14

Last publish

Collaborators

  • peuf