项目作者: ardalanamini

项目描述 :
Some common Typescript prototypes
高级语言: TypeScript
项目地址: git://github.com/ardalanamini/prototyped.js.git
创建时间: 2018-01-13T17:58:06Z
项目社区:https://github.com/ardalanamini/prototyped.js

开源协议:MIT License

下载


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

  1. npm i -s prototyped.js

Usage

All documents are available at here

ECMAScript

Apply prototypes:

  1. import "prototyped.js/shim";
  2. // or more specificaly...
  3. import "prototyped.js/string/shim";
  4. // or even more specificaly!
  5. import "prototyped.js/string/words/shim";
  6. console.log("hello world!".words()); // ['hello', 'world']

Or just import the methods without causing any side effect:

  1. import words from "prototyped.js/string/words";
  2. console.log(words("hello world!")); // ['hello', 'world']
  3. import string from "prototyped.js/string";
  4. console.log(string.words("hello world!")); // ['hello', 'world']
  5. import pt from "prototyped.js";
  6. console.log(pt.string.words("hello world!")); // ['hello', 'world']

CommonJS

Apply prototypes:

  1. require("prototyped.js/shim");
  2. // or more specificaly...
  3. require("prototyped.js/string/shim");
  4. // or even more specificaly!
  5. require("prototyped.js/string/words/shim");
  6. console.log("hello world!".words()); // ['hello', 'world']

Or just import the methods without causing any side effect:

  1. const words = require("prototyped.js/string/words").default;
  2. console.log(words("hello world!")); // ['hello', 'world']
  3. const string = require("prototyped.js/string").default;
  4. console.log(string.words("hello world!")); // ['hello', 'world']
  5. const pt = require("prototyped.js").default;
  6. 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