Skip to content

Commit

Permalink
Remove String#toArray and Object#isObject as per update.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Jun 17, 2012
1 parent b0f41c1 commit eef8324
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,6 @@
# es6-shim 0.5.2 (June 17, 2012)
* Removed `String#toArray` and `Object.isObject` as per spec updates.

# es6-shim 0.5.1 (June 14, 2012) # es6-shim 0.5.1 (June 14, 2012)
* Made Map and Set follow Spidermonkey implementation instead of V8. * Made Map and Set follow Spidermonkey implementation instead of V8.
`var m = Map(); m.set('key', void 0); m.has('key');` now gives true. `var m = Map(); m.set('key', void 0); m.has('key');` now gives true.
Expand Down
6 changes: 2 additions & 4 deletions README.md
Expand Up @@ -15,12 +15,12 @@ Or just include es6-shim before your scripts if you want to use it in browser.
## Safe shims ## Safe shims
* Maps & Sets * Maps & Sets
* String.prototype.repeat, String.prototype.startsWith, * String.prototype.repeat, String.prototype.startsWith,
String.prototype.endsWith, String.prototype.contains, String.prototype.toArray String.prototype.endsWith, String.prototype.contains
* Array.from, Array.of * Array.from, Array.of
* Number.MAX_INTEGER, Number.EPSILON, Number.parseInt, Number.parseFloat, * Number.MAX_INTEGER, Number.EPSILON, Number.parseInt, Number.parseFloat,
Number.isNaN, Number.toInteger, Number.isInteger, Number.isFinite Number.isNaN, Number.toInteger, Number.isInteger, Number.isFinite
* Object.getOwnPropertyDescriptors, Object.getPropertyDescriptor, * Object.getOwnPropertyDescriptors, Object.getPropertyDescriptor,
Object.getPropertyNames, Object.is, Object.isnt, Object.isObject Object.getPropertyNames, Object.is, Object.isnt
* Math.sign, Math.log10, Math.log2, Math.log1p, Math.expm1, Math.cosh, * Math.sign, Math.log10, Math.log2, Math.log1p, Math.expm1, Math.cosh,
Math.sinh, Math.tanh, Math.acosh, Math.asinh, Math.atanh, Math.hypot, Math.sinh, Math.tanh, Math.acosh, Math.asinh, Math.atanh, Math.hypot,
Math.trunc (accuracy is 1e-11). Math.trunc (accuracy is 1e-11).
Expand All @@ -46,9 +46,7 @@ possible to implement them properly:
'abc'.startsWith('a') // true 'abc'.startsWith('a') // true
'abc'.endsWith('a') // false 'abc'.endsWith('a') // false
Object.is(NaN, NaN) // Fixes ===. 0 isnt -0, NaN is NaN Object.is(NaN, NaN) // Fixes ===. 0 isnt -0, NaN is NaN
Object.isObject(null) // false. Fixes null.
'123'.repeat(2) // '123123' '123'.repeat(2) // '123123'
'123'.toArray() // ['1', '2', '3']
'john alice'.contains('john') // true 'john alice'.contains('john') // true
Number.isNaN('123') // false. isNaN('123') will give true. Number.isNaN('123') // false. isNaN('123') will give true.
Number.toInteger(2.4) // 2. converts values to IEEE754 double precision integers Number.toInteger(2.4) // 2. converts values to IEEE754 double precision integers
Expand Down
8 changes: 0 additions & 8 deletions es6-shim.js
Expand Up @@ -47,10 +47,6 @@


contains: function(substring) { contains: function(substring) {
return this.indexOf(substring) !== -1; return this.indexOf(substring) !== -1;
},

toArray: function() {
return this.split('');
} }
}); });


Expand Down Expand Up @@ -166,10 +162,6 @@


isnt: function(x, y) { isnt: function(x, y) {
return !Object.is(x, y); return !Object.is(x, y);
},

isObject: function(value) {
return typeof value === 'object' && value !== null;
} }
}); });


Expand Down

0 comments on commit eef8324

Please sign in to comment.