-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Function Bind Syntax-friendly library API #65
Comments
Now it's missing. Before, I wanted to add it for abstract references proposal and added it for |
ES7 function bind has been implemented in Babel -- babel/babel#1518 and babel/babel@724bf52 Any chance to have bind-operator-friendly methods soon? I'll be giving a talk to ~300 people this Saturday and it would be nice to demonstrate core-js + bind operator. 😃 If you give me the directions on how this should be approached, I can help implementing it too. |
@UltCombo I can add it as you proposed - |
Yes, I believe it can be improved, but I can't think of a better solution at the moment. import { String as String_ } from 'core-js';
const { repeat, startsWith /*...*/ } = String_.prototype;
'*'::repeat(10); |
Should be available in 0.9.9. Problem with single entry points for methods - currently only for static versions. I'll think about it later. If someone have better ideas about this API - awaiting proposals. |
Awesome, thanks! |
In 2.0 in |
Nice. 👍 |
Would it be possible to expose a library API that works with the Function Bind Syntax?
I mean, an API similar to the current library API, but which uses the
this
binding instead of the first argument for instance methods. For instance, instead of:Do something like:
Needless to say, this would be an excellent way to avoid polluting the built-in prototypes while maintaining composability.
The text was updated successfully, but these errors were encountered: