utils-lodash.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /**
  2. * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* globals module */
  6. 'use strict';
  7. // This module returns the list of Lo-Dash methods that will be exported to the main "utils" module. It is coded in a
  8. // way that it can be used by the CKEditor core code in "utils" as well as from Node.js with the configurations for
  9. // `grunt lodash`.
  10. //
  11. // https://lodash.com/docs
  12. ( function() {
  13. // The list of Lo-Dash methods to include in "utils".
  14. // It is mandatory to execute `grunt lodash` after changes to this list.
  15. var lodashInclude = [
  16. /**
  17. * See Lo-Dash: https://lodash.com/docs#clone
  18. *
  19. * @member utils
  20. * @method clone
  21. */
  22. 'clone',
  23. /**
  24. * See Lo-Dash: https://lodash.com/docs#assign (alias)
  25. *
  26. * @member utils
  27. * @method extend
  28. */
  29. 'extend',
  30. /**
  31. * See Lo-Dash: https://lodash.com/docs#isObject
  32. *
  33. * @member utils
  34. * @method isObject
  35. */
  36. 'isObject'
  37. ];
  38. // Make this compatible with CommonJS as well so it can be used in Node (e.g. "grunt lodash").
  39. /* istanbul ignore next: we're not able to test the following in bender so ignore it */
  40. if ( typeof module == 'object' && module.exports ) {
  41. module.exports = lodashInclude;
  42. } else {
  43. CKEDITOR.define( function() {
  44. return lodashInclude;
  45. } );
  46. }
  47. } )();