From fb2cba41f5508c10d53aad3b624bd7c00aa03fcb Mon Sep 17 00:00:00 2001 From: nabby27 Date: Mon, 21 Dec 2020 15:46:44 +0100 Subject: [PATCH] update readme --- README.md | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 41dfc24..c25d11e 100755 --- a/README.md +++ b/README.md @@ -1,17 +1,33 @@ # main-fns -[![MIT License](https://img.shields.io/apm/l/atomic-design-ui.svg?)](https://github.com/tterb/atomic-design-ui/blob/master/LICENSEs) - [![Version](https://img.shields.io/npm/v/main-fns.svg?style=flat&label=version)](https://www.npmjs.com/package/main-fns) [![Build Status](https://img.shields.io/github/workflow/status/nabby27/main-fns/Test%20lint%20and%20deploy/main?label=test)](https://github.com/nabby27/main-fns/workflows/test/badge.svg) [![PayPal](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=M57SG9J5RQ6DJ¤cy_code=EUR&source=url) - +[![Version](https://img.shields.io/npm/v/main-fns.svg?style=flat&label=version)](https://www.npmjs.com/package/main-fns) +[![Build Status](https://img.shields.io/github/workflow/status/nabby27/main-fns/Test%20lint%20and%20deploy/main?label=test)](https://github.com/nabby27/main-fns/actions?query=workflow%3A%22Test+lint+and+deploy%22) +[![MIT License](https://img.shields.io/apm/l/atomic-design-ui.svg?)](https://github.com/nabby27/main-fns/blob/main/LICENSE) +[![PayPal](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=M57SG9J5RQ6DJ¤cy_code=EUR&source=url) Javascript utility library created with TypeScript Documentation on [https://nabby27.github.io/main-fns/](https://nabby27.github.io/main-fns/) -## Install +## Why main-fns? +It is quite tedious to be aware of all the dependencies and keep their changes, the idea of main-fns is that you only worry about this library. Main-fns will have all the main functions that are used in a common way such as the handling of dates, texts, arrays, numbers... Internally main-fns will use the most current libraries of the moment and will be up to date for you. + +## Installation -Install with npm: +Using npm: ```sh npm i main-fns -``` \ No newline at end of file +``` + +## Some examples + +```ts +import { addDays, dateToString } from 'main-fns' + +addDays(1, new Date(2014, 1, 11)) // '2014-02-12' + +dateToString(new Date(2014, 1, 11), 'yyyy-MM-dd') // '2014-02-11' +``` + +Feel free to investigate the [main-fns API](https://nabby27.github.io/main-fns/), it is structured by modules and created using JSDoc.