1.0.2 • Published 3 years ago

@darkobits/dot-dot-dot v1.0.2

Weekly downloads
1
License
WTFPL
Repository
github
Last release
3 years ago

Get a random loading message.

Install

npm i @darkobits/dot-dot-dot

Use

This package's default export is a function that returns a random message each time it is called.

import getMessage from '@darkobits/dot-dot-dot';

getMessage() //=> 'Reticulating splines...'

getMessageEvery

This package additionally exports a function, getMessageEvery, which accepts an interval and returns a function that, when invoked, will return a random message that updates every interval milliseconds.

import {getMessageEvery} from '@darkobits/dot-dot-dot';

const getMessageEveryTenSeconds = getMessageEvery(10000);

// T = 0ms
getMessageEveryTenSeconds(); // => 'Reticulating splines...';

// T = 1000ms
getMessageEveryTenSeconds(); // => 'Reticulating splines...';

// T = 1100ms
getMessageEveryTenSeconds(); // => 'Gathering particle sources...';
1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago