Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend standard library with ES6 methods #179

Open
9 of 43 tasks
sbstp opened this issue Mar 30, 2015 · 1 comment
Open
9 of 43 tasks

Extend standard library with ES6 methods #179

sbstp opened this issue Mar 30, 2015 · 1 comment

Comments

@sbstp
Copy link
Member

sbstp commented Mar 30, 2015

There's a couple of methods from the ES6 draft that I believe can be implemented without modifying the VM. This issue is a list of them. I'd like to try and tackle some of them. Most of the algorithms are described in the draft. MDN also has examples and polyfills that could be useful while trying to implement some of these functions. I've intentionally left out the methods that cannot be implemented at the moment.

Object

  • Object.assign
  • Object.is
  • Object.setPrototypeOf (__proto__ does not seem to be mutable)

String

  • String.fromCodePoint
  • String.prototype.codePointAt
  • String.prototype.normalize (unicode normalization)
  • String.prototype.repeat
  • String.prototype.startsWith
  • String.prototype.endsWith
  • String.prototype.includes

Array

  • Array.from
  • Array.of
  • Array.prototype.copyWithin
  • Array.prototype.find
  • Array.prototype.findIndex
  • Array.prototype.fill
  • Array.prototype.keys
  • Array.prototype.values
  • Array.prototype.entries

Number

  • Number.isFinite
  • Number.isInteger
  • Number.isSafeInteger (might need discussion)
  • Number.isNaN
  • Number.EPSILON
  • Number.MIN_SAFE_INTEGER (might need discussion)
  • Number.MAX_SAFE_INTEGER (might need discussion)

Math

  • Math.clz32
  • Math.imul
  • Math.sign
  • Math.log10
  • Math.log2
  • Math.log1p
  • Math.expm1
  • Math.cosh
  • Math.sinh
  • Math.tanh
  • Math.acosh
  • Math.asinh
  • Math.atanh
  • Math.trunc
  • Math.fround
  • Math.cbrt
  • Math.hypot
@maximecb
Copy link
Contributor

I approve of your proposal. It's a good idea.

pselle pushed a commit to pselle/Higgs that referenced this issue Jul 2, 2015
Referencing higgsjs#179, adds Array.of method
@bFraley bFraley mentioned this issue Mar 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants