Skip to content

Simple common constants, for Javascript and Typescript projects.

Notifications You must be signed in to change notification settings

remithomas/generalities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generalities Build Status npm version

Simple common constants, for Javascript and Typescript projects.

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

About

Simple common constants, for Javascript and Typescript projects.

Resources

Stars

Watchers

Forks

Packages

No packages published