Skip to content

harshkanjariya/supplements

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Supplements For Javascript

how to use?

  • string functions
const supplements = require('supplements');

supplements.setupStringProto();

const s = 'hello, how are you?';
console.log(s.toCamelCase());
console.log(s.toPascalCase());
console.log(s.toKebabCase());

console.log(supplements.randomString(5, {
    upperCaseChars: true,
    lowerCaseChars: true,
}));
  • Number functions
const supplements = require('supplements');

supplements.setupNumberProto();

const n = 1234;
// calling toBinary from prototype
console.log(n.toBinary());
// calling toBinary from supplements
console.log(supplements.toBinary(1234));
  • other functions
const supplements = require('supplements');

async function promisedFun() {
    ...
    await supplements.delay(5000); // this line will wait for 5 sec
    ...
}
// print lineNumber of current line
console.log(supplements.lineNumber());

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published