generalities
v2.1.1
Published
Common constants
Downloads
4
Maintainers
Readme
Generalities
Simple common constants, for Javascript and Typescript projects.
- Country codes (fr,es,...)
- Extensions (wav,doc,3gp,...)
- Http codes (404,499,...)
- Http methods (GET,POST,...)
- Language codes (fr,ty,...)
How to use
npm install generalities --save
or
yarn add generalities
Generalities
Country codes
import { UNITED_KINGDOM } from 'generalities/country-codes';
// print: gb
console.log(UNITED_KINGDOM);
Extensions
Print extensions without dot .
import { VIDEO_3GPP2 } from 'generalities/extensions';
// print: 3g2
console.log(VIDEO_3GPP2);
Http Methods
import { GET } from 'generalities/http-methods';
// print: GET
console.log(GET);
Http Codes
import { HTTP_CODE_NOT_FOUND } from 'generalities/http-codes';
// print: 404
console.log(HTTP_CODE_NOT_FOUND);
Language Codes
import { FRENCH, TAHITIAN } from 'generalities/language-codes';
// print: fr,ty
console.log(FRENCH, TAHITIAN);
MIME types
import { VIDEO_3GPP2 } from 'generalities/mime-types';
// print: video/3gpp2
console.log(VIDEO_3GPP2);
Development
npm install
Add your generalities
and then run npm run compile
Linting
npm run lint
Contributing
Please feel free to submit, comment anything on this repo :)
Todos
- [ ] Currency codes