Code Monkey home page Code Monkey logo

prototyped.js's Introduction

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

prototyped.js's People

Contributors

ardalanamini avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

prototyped.js's Issues

Object.prototypes

Expected behavior

every method to work

Actual behavior

got not a function error instead

Steps to reproduce the problem

addPrototype(proto) => addProtoype("name", proto)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.