@sempervirens/tools

0.5.5 • Public • Published

Sempervirens Tools

A set of tools for various purposes

Tests badge Version badge

Installation

npm i @sempervirens/tools;

Tools

Server Tools

startServer

Starts a Node Express server while keeping a set of sockets in order to stop the server later. (Mainly for use in tests.)

stopServer

Stops a server by ID started with startServer. (Mainly for use in tests.)

stopAllServers

Stops all servers started with startServer. (Mainly for use in tests.)

timestamp

Uses Moment.js to return a default format [MM-DD-YY hh:mm:ssa] and formattable string.

duration

Calculates a duration between a start and end parameter, both of which may be a moment or Date object. If not given, end is the current moment.

Readme

Keywords

Package Sidebar

Install

npm i @sempervirens/tools

Weekly Downloads

12

Version

0.5.5

License

MIT

Unpacked Size

16.4 kB

Total Files

15

Last publish

Collaborators

  • sempervirens