UNPKG

my-prototypes

Version:

Add Array, Numbers, Object and String prototypes in your project.

74 lines (56 loc) 5.05 kB
[![NPM](https://nodei.co/npm/my-prototypes.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/my-prototypes/) [![](https://img.shields.io/badge/autor-Marco%20Somma-lightgrey.svg?style=flat)](https://www.npmjs.com/~marcosomma) [![](https://img.shields.io/badge/license-ISC-blue.svg?style=flat)](https://www.npmjs.com/package/my-prototypes) [![npm](https://img.shields.io/npm/dm/my-prototypes.svg)](https://www.npmjs.com/package/my-prototypes) [![npm version](https://badge.fury.io/js/my-prototypes.svg)](http://badge.fury.io/js/my-prototypes) [![](https://img.shields.io/badge/version-STABLE-brightgreen.svg)](https://www.npmjs.com/package/my-prototypes) [![Codacy Badge](https://api.codacy.com/project/badge/grade/a2ee79ed96884b899115ae44106537f8)](https://www.codacy.com/app/makso1979/my-prototypes) [![Code Climate](https://codeclimate.com/github/marcosomma/my-prototypes/badges/gpa.svg)](https://codeclimate.com/github/marcosomma/my-prototypes) [![Test Coverage](https://codeclimate.com/github/marcosomma/my-prototypes/badges/coverage.svg)](https://codeclimate.com/github/marcosomma/my-prototypes) [![CircleCI branch](https://img.shields.io/circleci/project/marcosomma/my-prototypes/master.svg)](https://circleci.com/gh/marcosomma/my-prototypes/tree/master) # my-prototypes Add Array, Numbers, Object and String prototypes in your project. **Install** ``` npm install my-prototypes ``` **Use** ``` require('my-prototypes').init() ``` Check the [documentation](https://github.com/marcosomma/my-prototypes/wiki) for the usage. [Version 0.7.4](https://github.com/marcosomma/my-prototypes/wiki#version-074) *** ## Array prototypes - [first](https://github.com/marcosomma/my-prototypes/wiki/Array#first) - [last](https://github.com/marcosomma/my-prototypes/wiki/Array#last) - [containElement](https://github.com/marcosomma/my-prototypes/wiki/Array#containelement) - [eliminateDuplicate](https://github.com/marcosomma/my-prototypes/wiki/Array#eliminateduplicate) - [remove](https://github.com/marcosomma/my-prototypes/wiki/Array#removeelementelements) - [generateScale](https://github.com/marcosomma/my-prototypes/wiki/Array#generatescaletypestylestartendinterval) - [even](https://github.com/marcosomma/my-prototypes/wiki/Array#even) - [evenIndex](https://github.com/marcosomma/my-prototypes/wiki/Array#evenindex) - [odd](https://github.com/marcosomma/my-prototypes/wiki/Array#odd) - [oddIndex](https://github.com/marcosomma/my-prototypes/wiki/Array#oddindex) *** ## Number prototypes - [formatMoney](https://github.com/marcosomma/my-prototypes/wiki/Numbers#formatmoneydecimals) - [getSecond](https://github.com/marcosomma/my-prototypes/wiki/Numbers#getsecondhoursminutesseconds) - [getMilliSecond](https://github.com/marcosomma/my-prototypes/wiki/Numbers#getmillisecondhoursminutesseconds) - [isEven](https://github.com/marcosomma/my-prototypes/wiki/Numbers#iseven) *** ## Object prototypes - [concatElements](https://github.com/marcosomma/my-prototypes/wiki/Object#concatelementskey1value1key2value2key3value3) - [generator](https://github.com/marcosomma/my-prototypes/wiki/Object#generatorkeyvaluekey2value2key3value3) - [lengthObject](https://github.com/marcosomma/my-prototypes/wiki/Object#lengthobject) - [splitElements](https://github.com/marcosomma/my-prototypes/wiki/Object#splitelements) - [toArray](https://github.com/marcosomma/my-prototypes/wiki/Object#toarray) - [getValues](https://github.com/marcosomma/my-prototypes/wiki/Object#getvalueskey1key2keyn) *** ## String prototypes - [capitalize](https://github.com/marcosomma/my-prototypes/wiki/Strings#capitalize) - [capitalizeAll](https://github.com/marcosomma/my-prototypes/wiki/Strings#capitalizeall) - [getDateEU](https://github.com/marcosomma/my-prototypes/wiki/Strings#getdateeu) - [getDateUS](https://github.com/marcosomma/my-prototypes/wiki/Strings#getdateus) - [getDbDate](https://github.com/marcosomma/my-prototypes/wiki/Strings#getdbdate) - [getDbDateTime](https://github.com/marcosomma/my-prototypes/wiki/Strings#getdbdatetime) - [htmlEscape](https://github.com/marcosomma/my-prototypes/wiki/Strings#htmlescape) (exclude ":", ";" and "#") - [htmlUnescape](https://github.com/marcosomma/my-prototypes/wiki/Strings#htmlunescape) (exclude ":", ";" and "#") - [repeat](https://github.com/marcosomma/my-prototypes/wiki/Strings#repeat) - [reverseWord](https://github.com/marcosomma/my-prototypes/wiki/Strings#reverseword) - [substringAfterTo](https://github.com/marcosomma/my-prototypes/wiki/Strings#substringafterto) - [substringBeforeTo](https://github.com/marcosomma/my-prototypes/wiki/Strings#substringbeforeto) - [validateContent](https://github.com/marcosomma/my-prototypes/wiki/Strings#validatecontent) (dateEU, dateUS, time, email, ip-address, alphanumeric and phone) *** ### License ISC *Copyright (c) 2015, Marco Somma.* Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.