constamp
v1.0.2
Published
Context stamping.
Downloads
3
Readme
— constamp
—
Documentation
Context stamping.
Instead of just time stamping a process or event, context stamp it to reveal the:
- T: Epoch time and high-resolution process time,
- W: Who is doing all of this JavaScript, including the user and computing architecture,
- D: Directories where all of this JavaScript is being done.
Installation
Run npm install constamp
Usage
This module exports a class Constamp
. The class creates an immutable object.
Stamping
import { Constamp } from 'constamp'
const c = Constamp()
Partially cloning a stamp:
const cCopy = Constamp({
json: c.toJson()
})
Using a dayjs format string:
const cFormat = Constamp({
format: 'DD/MM/YYYY'
})
Command-line
constamp -h
Usage
$ constamp <command> [options]
Available Commands
show Display local context stamp (raw) info.
save Save the local context stamp (hash) to a file.
load Load a saved context stamp file for comparison
For more info, run any command with the `--help` flag
$ constamp show --help
$ constamp save --help
Options
-v, --version Displays current version
-h, --help Displays this message
Testing
npm test