From 48a47c3b287e86989c6d24edd164aec39aec2358 Mon Sep 17 00:00:00 2001 From: Soatok Dreamseeker Date: Sat, 13 Feb 2021 01:38:51 -0500 Subject: [PATCH] Update README.md --- README.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e48e6a2..d179348 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Constant-time algorithms written in TypeScript. -[![Support me on Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dsoatok%26type%3Dpatrons&style=for-the-badge)](https://patreon.com/soatok) +[![Support me on Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dsoatok%26type%3Dpatrons&style=for-the-badge)](https://patreon.com/soatok) [![Linux Build Status](https://travis-ci.org/soatok/constant-time-js.svg?branch=master)](https://travis-ci.org/soatok/constant-time-js) [![npm version](https://img.shields.io/npm/v/constant-time-js.svg)](https://npm.im/constant-time-js) @@ -11,6 +11,30 @@ Do not use this in production, especially if you don't have the budget for a cry ![Mind Blowing, right?](https://soatok.files.wordpress.com/2020/08/soatoktelegrams2020-01.png) +## Installing and Usage + +Simply add `constant-time-js` to your dependencies section. One way to do this is with `npm`: + +```terminal +npm install --save constant-time-js +``` + +Next, you can import the modules you need. + +For JavaScript users: + +```js +const { compare, bignum } = require('constant-time-js'); +``` + +Tor TypeScript users: + +```typescript +import { compare, bignum } from 'constant-time-js'; +``` + +Please refer to the documentation below for what each function/class does. + ## Documentation This is just a quick outline of what each function does.