New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

itwcw-lib

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

itwcw-lib

Collection of useful functions for streamlined development.

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

ITWCWLib

A collection of Javascript utilities to streamline development.

Site | NPM Module | GitHub Repo

Installation

In a browser:

<script src="itwcw-lib.js"></script>

Using npm:

$ npm i itwcw-lib

Note: add --save if you are using npm < 5.0.0

In Node.js:

// Load the full build.
var itwcwlib = require('itwcw-lib');

Use

addPlural(word, n)

var numberOfCats = 1;
var numberOfDogs = 2;
console.log('I have ' + numberOfCats + itwcwlib.addPlural('cat', numberOfCats)) // I have 1 cat
console.log('I have ' + numberOfDogs + itwcwlib.addPlural('dog', numberOfDogs)) // I have 2 dogs

addArticle(word)

console.log('I have ' + itwcwlib.addArticle('dog')) // I have a dog
console.log('I have ' + itwcwlib.addArticle('animal')) // I have an animal

roundToNearest(n, roundTo)

console.log(itwcwlib.roundToNearest(10, 10)) // 10
console.log(itwcwlib.roundToNearest(11, 10)) // 10
console.log(itwcwlib.roundToNearest(15, 10)) // 20
console.log(itwcwlib.roundToNearest(19, 10)) // 20

objectLength(obj)

var jonSnow = {
  first_name: 'Jon',
  last_name: 'Snow',
}
console.log(itwcwlib.objectLength(jonSnow)) // 2

zeroFill(n, zeros)

var n1 = '9'
var n2 = '99'
var n3 = '999'
console.log(itwcwlib.zeroFill(n1, 3)) // 009
console.log(itwcwlib.zeroFill(n2, 3)) // 099
console.log(itwcwlib.zeroFill(n3, 3)) // 999

Why Use this Library?

itwcw-lib makes JavaScript easier by taking the hassle out of working with common issues such as finding days between dates, determining object length, and figuring out whether to add an 's' to something if it's plural.

Projects Using this Library

Somiibo: A Social Media Bot with an open-source module library.
JekyllUp: A website devoted to sharing the best Jekyll themes.
Slapform: A backend processor for your HTML forms on static sites.
SoundGrail Music App: A resource for producers, musicians, and DJs.
Hammock Report: An API for exploring and listing backyard products.

Leechii: A Telegram bot to manage your engagement groups.
Rankiir: A keyword tracker for search engines.
Keywordii: A keyword tracker for search engines.
Socialetto: A social media influencer search engine.

Keywords

library

FAQs

Package last updated on 01 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts