@shgysk8zer0/consts
v1.0.8
Published
A collection of constants for files, HTTP, dates, etc.
Downloads
612
Readme
@shgysk8zer0/consts
A collection of constants for files, HTTP, dates, etc.
This is nothing special. It's just a bunch of commonly used and useful constants. Why? Because I kept defining constants in different projects for the same things, so decided to just do it once and avoid repeating myself.
Installation
npm i @shgysk8zer0/consts
Usage
import * as HTTP_STATUS from '@shgysk8zer0/consts/status.js';
import * as TYPES from '@shgysk8zer0/consts/types.js';
import * as EXTS from '@shgysk8zer0/consts/exts.js';
import { DAY } from '@shgysk8zer0/consts/date.js';
Tip
You can use <importmap>
to make use in client-side code easier:
<script type="importmap">
{
"imports": {
"@shgysk8zer0/consts/": "https://unpkg.com/@shgysk8zer0/[email protected]/"
}
}
</script>
... If you don't want to take that route, you can always update the example code
with full URLs: https://unpkg.com/@shgysk8zer0/consts/*
.