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

Implement String.prototype.codePointAt #751

Closed
jasonwilliams opened this issue Oct 1, 2020 · 4 comments · Fixed by #935
Closed

Implement String.prototype.codePointAt #751

jasonwilliams opened this issue Oct 1, 2020 · 4 comments · Fixed by #935
Assignees
Labels
E-Medium Medium difficulty problem enhancement New feature or request good first issue Good for newcomers Hacktoberfest Hacktoberfest 2021 - https://hacktoberfest.digitalocean.com

Comments

@jasonwilliams
Copy link
Member

ECMASCript feature
Implement String.prototype.codePointAt

MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt
Spec: https://tc39.es/ecma262/#sec-string.prototype.codepointat

This code should now work and give the expected result:

onst icons = '☃★♲';

console.log(icons.codePointAt(1));
// expected output: "9733"

It will be similar to our implementation of charCodeAt

Contributing: https://github.com/boa-dev/boa/blob/master/CONTRIBUTING.md
Debugging: https://github.com/boa-dev/boa/blob/master/docs/debugging.md

@jasonwilliams jasonwilliams added enhancement New feature or request good first issue Good for newcomers Hacktoberfest Hacktoberfest 2021 - https://hacktoberfest.digitalocean.com E-Medium Medium difficulty problem labels Oct 1, 2020
@andylim0221
Copy link

I would like to take up this issue.

@Razican
Copy link
Member

Razican commented Oct 4, 2020

I would like to take up this issue.

Go ahead! :)

@croraf
Copy link
Contributor

croraf commented Oct 15, 2020

@andylim0221 Hi Andy. Any progress on this? Do you need some help?

@devinus
Copy link
Contributor

devinus commented Nov 18, 2020

Hope I'm not stepping on any toes, but I implemented this in #935 as a learning exercise.

devinus added a commit to devinus/boa that referenced this issue Nov 18, 2020
devinus added a commit to devinus/boa that referenced this issue Nov 18, 2020
devinus added a commit to devinus/boa that referenced this issue Nov 19, 2020
devinus added a commit to devinus/boa that referenced this issue Nov 19, 2020
devinus added a commit to devinus/boa that referenced this issue Nov 19, 2020
Razican pushed a commit that referenced this issue Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-Medium Medium difficulty problem enhancement New feature or request good first issue Good for newcomers Hacktoberfest Hacktoberfest 2021 - https://hacktoberfest.digitalocean.com
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants