0.0.5 • Published 8 years ago

timelane v0.0.5

Weekly downloads
5
License
ISC
Repository
github
Last release
8 years ago

Use it to track time of asynchronous events using explicit start, finish and timeout markers.

Usage

import createTimeline from 'timelane';

const timelines = {
    sleep: createTimeline(),
    awake: createTimeline()
};

Promise.resolve()
    .then(() => timelines.sleep.start())
    .then(() => ...)
    .then(() => timelines.sleep.finish({ metadata: 'moon was full' }))
    .then(() => timelines.awake.start())
    ...
    .then(() => timelines.awake.finish());

Each timeline will contain startedAt, finishedAt, timeoutAt and auto-evaluated duration.

That's it :)

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago

0.0.0

8 years ago