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

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

  •  11-10-2022
  •  | 
  •  

문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top