🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

time-ranges

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

time-ranges

Standalone implementation of the HTML5 Media TimeRanges interface.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

time-ranges

npm Dependencies Build Status Coverage Status JavaScript Standard Style

Standalone implementation of the HTML5 Media TimeRanges interface. Always normalized.

Installation

npm i --save time-ranges

Usage

import TimeRanges from 'time-ranges'

const timeRanges = new TimeRanges()

timeRanges.add(1, 2)
timeRanges.add(3, 4)

for (let i = 0; i < timeRanges.length; ++i) {
  const start = timeRanges.start(i)
  const end = timeRanges.end(i)
  console.log(`Range ${i}: ${start} → ${end}`)
}

// Output:
// Range 0: 1 → 2
// Range 1: 3 → 4

Maintainer

Tim De Pauw

License

MIT

FAQs

Package last updated on 30 Jun 2016

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