Closed
Bug 1022396
Opened 10 years ago
Closed 10 years ago
remove Number.toInteger
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: Benjamin, Assigned: Benjamin)
Details
(Keywords: dev-doc-complete, Whiteboard: [DocArea=JS])
Attachments
(1 file)
2.59 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
When I implemented Number.toInteger in bug 761495, it was part of the ES6 draft spec. It has since been removed. No other engine implements it and according to DXR, its use in Gecko is limited to its own testsuite. Therefore, let's remove it.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8436538 -
Flags: review?(jorendorff)
Updated•10 years ago
|
Keywords: dev-doc-needed
Whiteboard: [DocArea=JS]
Comment 2•10 years ago
|
||
Comment on attachment 8436538 [details] [diff] [review] rm-nti.patch Review of attachment 8436538 [details] [diff] [review]: ----------------------------------------------------------------- Thank you!
Attachment #8436538 -
Flags: review?(jorendorff) → review+
Assignee | ||
Comment 3•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/fc1936b69cbf
Assignee: nobody → benjamin
Comment 4•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/fc1936b69cbf
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Comment 5•10 years ago
|
||
Reference page updated: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toInteger Added to Firefox 33 for developers: https://developer.mozilla.org/en-US/Firefox/Releases/33#JavaScript
Keywords: dev-doc-needed → dev-doc-complete
Comment 6•9 years ago
|
||
Since it is being removed, what is the recommended alternative?
Comment 7•9 years ago
|
||
Why not just write it out by hand? function ToInteger(v) { var n = +v; if (!n) return n; return n < 0 ? Math.ceil(n) : Math.floor(n); }
You need to log in
before you can comment on or make changes to this bug.
Description
•