es5-fix

0.1.0 • Public • Published

es5-fix

Fixes for incomplete ECMAScript 5 implementations

Fix issues in early ECMAScript 5 implementations.

Usage

Fixed function can be implemented to override native one, for that use implement module, e.g.:

require('es5-fix/date/parse/implement');

Or you can use fixed version independently e.g.:

var parse = require('es5-fix/date/parse');

Implemented fixes:

Date.parse (es5-fix/date/parse)

There's probably no single implementation that provides perfectly compliant version of Date.parse, this version fixes that. Implementation is based on es5-shim version.

Object.defineProperty (es5-fix/object/define-property)

Addresses the issue where re-definition of non writable properly has no effect. Old versions of Webkit are vulnerable to that. See:

Additionally it fallbacks to direct assign if defineProperty crashes with defineProperty is not supported on DOM objects (happens in Safari 5.0)

Object.defineProperties (es5-fix/object/define-properties)

Makes sure that fix for defineProperty also applies to defineProperties

Installation

npm

$ npm install es5-fix
Browser

You can easily bundle es5-fix for browser with any CJS bundler (no favorite? Try: Browserify, Webmake or Webpack)

Tests Build Status

$ npm test

Package Sidebar

Install

npm i es5-fix

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • medikoo