0.0.6 • Published 11 years ago

js-es2pi v0.0.6

Weekly downloads
1
License
-
Repository
github
Last release
11 years ago

build status

es2pi.js

ES6 + a little more on top of ES5

Description

In short, es2pi is a collection of ES6 polyfills + methods missing even in ES6.

Why reinvented the wheel?

Because:

  • shims/polyfills found to date are not quite optimal, especially Map and Set.
  • If you want just Map/Set, see https://github.com/dankogai/js-es6-map
  • ES6 is rather inconsistent in the choice of methods, like...
  • Adding String.prototype.repeat while Array.prototype.repeat is missing. You should be able to go like var a = [0].repeat(42);
  • Type.isType is available only for Array.
  • typeof null === null is welcome but shouldn't we add Object.typeOf, too?
  • and the .typeOf() methods like 'JavaScript'.typeOf() === 'string' ?

Thanks to ES5, it is now safe to extend Object.prototype via Object.defineProperty yet we are still too afraid. Underscore.js is a great hack but a hack nontheless. Isn't it time to stop wrapping JavaScript's bad parts and extend its good parts?

What is es2pi named after?

2π is a little bigger than 6, isn't it?

Table of Contents

See Also

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago