prototyped.js

Common typescript ready prototypes available in both CommonJS and ECMAScript


Keywords
server-side, client-side, common, typescript, prototype, array, all, any, append, average, chunk, clone, compact, contains, count, countBy, crossJoin, deepFlatten, diff, distinct, distinctBy, empty, equals, everyNth, first, flatten, get, groupBy, implode, indexOfAll, initial, intersect, isEmpty, last, limit, max, median, merge, min, nest, orderBy, pad, partition, pluck, prepend, pull, range, repeat, sample, shuffle, skip, sortBy, sum, tail, toCSV, union, unwind, where, whereBetween, whereIn, whereLike, whereNotBetween, whereNotIn, whereNotLike, whereNotNull, whereNull, zip, zipObject, boolean, isBoolean, date, isDate, today, tomorrow, yesterday, func, cache, defer, isFunction, once, globals, isBrowser, math, degreesToRads, factorial, fibonacci, gcd, isDivisible, isEven, isPrime, lcm, primes, radsToDegrees, number, digitize, inRange, isNumber, object, assign, camelCaseKeys, defaults, dig, forEach, invert, isObject, isObjectLike, isPlainObject, kebabCaseKeys, keys, lowerCaseKeys, map, mapKeys, mapValues, omit, reduce, set, size, snakeCaseKeys, values, string, base64, base64Decode, camelCase, capitalize, chars, decapitalize, humanize, isString, kebabCase, lines, mask, parseInt, pluralize, reverse, snakeCase, swapCase, truncate, words, function, javascript, nodejs, npm, prototypes
License
MIT
Install
npm install prototyped.js@3.0.5

Documentation

Prototyped.js Tweet

Common Typescript ready helpers & prototypes available for both Server-Side and Client-Side applications.

Npm Version Build Status Coverage Status TypeScript Version Tested With Jest Npm Total Downloads Npm Monthly Downloads npm bundle size (minified) npm bundle size (minified + gzip) Open Issues License Github Stars Github Forks

More than 100 useful methods collected in one place

if you have a method you think needs to be a part of this package, feel free to contribute

Table of Content

Installation

npm i -s prototyped.js

Usage

All documents are available at here

ECMAScript

Apply prototypes:

import "prototyped.js/shim";
// or more specificaly...
import "prototyped.js/string/shim";
// or even more specificaly!
import "prototyped.js/string/words/shim";

console.log("hello world!".words()); // ['hello', 'world']

Or just import the methods without causing any side effect:

import words from "prototyped.js/string/words";

console.log(words("hello world!")); // ['hello', 'world']

import string from "prototyped.js/string";

console.log(string.words("hello world!")); // ['hello', 'world']

import pt from "prototyped.js";

console.log(pt.string.words("hello world!")); // ['hello', 'world']

CommonJS

Apply prototypes:

require("prototyped.js/shim");
// or more specificaly...
require("prototyped.js/string/shim");
// or even more specificaly!
require("prototyped.js/string/words/shim");

console.log("hello world!".words()); // ['hello', 'world']

Or just import the methods without causing any side effect:

const words = require("prototyped.js/string/words").default;

console.log(words("hello world!")); // ['hello', 'world']

const string = require("prototyped.js/string").default;

console.log(string.words("hello world!")); // ['hello', 'world']

const pt = require("prototyped.js").default;

console.log(pt.string.words("hello world!")); // ['hello', 'world']

Versioning

We use SemVer for versioning. For the versions available, see the releases on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details