-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Added vjs.extend method #1909
Added vjs.extend method #1909
Conversation
…ess the type from the src extension
Just commenting on the status of this. We're working on a major refactor for 5.0. As part of that we're going to be reorganizing utils, and pulling in lodash to replace a lot of the custom functions. This may or may not be affected by that, but we need to wait to see how that plays out first. #1232 is where discussions around that will happen. |
@carpasse So I think we've landed on pulling in lodash for whatever utilities we can, so this is a pretty prime usage. I think step 1 is to make use of your extensive tests to ensure that it's a drop in replacement (should be), and if all is well have you start the process of importing / exporting lodash methods. @heff is currently working on splitting apart the lib stuff into different files, so you guys might want to coordinate on timing of this. |
Actually, for extend specifically, we should use var assign = Object.assign || require('object.assign'); I think this is the best course of action, if possible. lodash has a lot of useful stuff but if the language has it (or is getting it), we should try and use it instead. |
Ok, so as part of the 5.0 work we exported videojs.mergeOptions, and we'll be exporting |
@heff I thing it looks good. Thanks for the efforts |
Added
extend
method to be able to easily merge options when you create a plugin.