1.1.0 • Published 1 year ago

protizer v1.1.0

Weekly downloads
-
License
ISC
Repository
bitbucket
Last release
1 year ago

What is this?

A utility library for sanity checks of user inputs in your defined functions and timestamp functions to check the execution time of your function.

Installation

npm i protizer --save

Then for .js files..

const {convertMsToTime} = require("protizer");

let startTime = moment().valueOf();

// Your query or function here

console.log("+++END time+++", convertMsToTime(moment().valueOf() - startTime));

for .ts files..

Solution for typescript files:-

Create a folder called types
Create a file in that folder called index.d.ts
Declare the module(s) like this:
declare module 'protizer';

Lastly, you also need to add the path to your index.d.ts in the tsconfig.json file under the typeRoots element, like this:

   "typeRoots": [

      "./src/api/@types"

    ], /* List of folders to include type definitions from. */

then 

import { convertMsToTime } from "protizer";
1.1.0

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago