_convertBrowser.js 615 B

123456789101112131415161718
  1. var baseConvert = require('./_baseConvert');
  2. /**
  3. * Converts `lodash` to an immutable auto-curried iteratee-first data-last
  4. * version with conversion `options` applied.
  5. *
  6. * @param {Function} lodash The lodash function to convert.
  7. * @param {Object} [options] The options object. See `baseConvert` for more details.
  8. * @returns {Function} Returns the converted `lodash`.
  9. */
  10. function browserConvert(lodash, options) {
  11. return baseConvert(lodash, lodash, options);
  12. }
  13. if (typeof _ == 'function' && typeof _.runInContext == 'function') {
  14. _ = browserConvert(_.runInContext());
  15. }
  16. module.exports = browserConvert;