Closed Clayblockunova closed 1 month ago
just added "p" definition.
Currently, it's not trivial to add a new feature, I'll see if I can write some instructions. We need the features before we can add the new definitions.
when will the instructions be finished? how will it be delivered?
I should be able do it in the next days, I would like to include links to some example commits for reference. Maybe this should be a markdown page in the repo or a wiki page, what do you think?
I think wiki page is better. And, those existing Markdown pages for API and features can be also turned into wiki pages too.
sorry. I found that wiki was built days before but only have generic contribution guideline. when will you have specific instruction about creating new features?
I'm working on this.
I've added feature ITERATOR_HELPER
and created instructions to add a feature here: https://github.com/fasttime/JScrewIt/wiki/Contributing#adding-a-feature. Do you think that's clear enough?
mostly clear, but IDK how empty function can be used as simulation of Iterator
. can new object type be defined by simply defining its constructor function?
additionally, for JAPANESE_INFINITY
, idk can Infinity.toLocaleString("ja")
be simply rewritten. if not, how to simulate?
btw, I just added a new definition of "P" for Node.js 7.6-15, which relies on a new feature: ASYNC_FUNCTION
. this feature is syntax-related and idk how to simulate.
mostly clear, but IDK how empty function can be used as simulation of
Iterator
. can new object type be defined by simply defining its constructor function?
That's fine. The emulated objects are just for testing, they are not expected to conform to the specification. For ITERATOR_HELPER
, the only interesting property is the fact that iterator helper objects have a string representation like [object Iterator Helper]
. Feel free to update the wiki when it's not clear.
additionally, for
JAPANESE_INFINITY
, idk canInfinity.toLocaleString("ja")
be simply rewritten. if not, how to simulate?
You could have a look at how LOCALE_INFINITY
is emulated. The main difference would be that the function inside registerNumberToLocaleStringAdapter
will accept an argument locale
, and if locale
is 'ja'
and this
is Infinity
, then the function will return '+∞'
.
btw, I just added a new definition of "P" for Node.js 7.6-15, which relies on a new feature:
ASYNC_FUNCTION
. this feature is syntax-related and idk how to simulate.
It's necessary to overwrite the Function
constructor. I did something like that for feature ARROW
. I can have a look.
For simulation of ARROW
, you created a function for transforming arrow function to a normal one. should I do anything similar for simulation of ASYNC_FUNCTION
?
For simulation of
ARROW
, you created a function for transforming arrow function to a normal one. should I do anything similar for simulation ofASYNC_FUNCTION
?
Feel free 👍
sorry, but that's the best I can do.
Still anything to do? or can be merged now?
idk how hard adding new features by myself is, but I have some new definitions which rely on introducing new features (
ITERATOR
andJAPANESE_INFINITY
).ITERATOR
is for new browsers which have iterator methods, andJAPANESE_INFINITY
is for wider usage ofInfinity.toLocaleString()
in getting "∞" (IE11 on win7 Japanese Infinity string is "+∞").