How to use lodash without exposing "_." in a UI Framework? Like jQuery.noConflict()

StackOverflow https://stackoverflow.com/questions/21761529

  •  11-10-2022
  •  | 
  •  

Pregunta

Does lodash have a feature like jQuery.noConflict()?

I'm creating a UI Framework (in AngularJS) that allows teams to build plugins that work within the framework. Within the framework, I'd like to use lodash, but I don't want to force on all plugin users that the _. is lodash. I want them to be able to use _. for underscore or whatever. Is there a way to do this in lodash?

¿Fue útil?

Solución

Lo-dash has its own noConflict: _.noConflict()

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top