wedgES is a very lightweight attempt to bridge the gap between older JavaScript engines and modern ones based on kangax's es5 compatability table.
Since wedgES is a shim, it will not overwrite any functionality implemented natively.
To keep the wedgES as lightweight as possible, not all new ES5 methods have an associated polyfill, but only those deemed useful for development for older JavaScript engines.
This is an, as yet, untested framework, use at your own risk!
The source – ./src
– files contain comments giving credit to any code that was either used as inspiration, adapted and/ or lifted.
However, special mentions to:
- Kris Kowal's es5-shim: the main source for all the uber smarts in
./src/Object.js
; - Jed Schmidt's Gist: The Date.prototype.toISOString shim was lifted straight from here; and
- Mozilla Developer Network's JavaScript Reference: a plethora of knowledge, code examples and shims – for older JavaScript engines.
Links to documentation – at Mozilla Developer Network's JavaScript Reference – for all shimmed methods, are provided below.
- Object.create
- Object.defineProperty
- Object.defineProperties
- Object.getOwnPropertyDescriptor
- Object.getOwnPropertyNames
- Object.getPrototypeOf
- Object.keys
wedgES.js | 2.2kb | deflate |
wedgES.min.js | 1.7kb | uglified + deflate |
(The MIT License)
Copyright © 2012 christos "constantology" constandinou http://muigui.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.