8
0

utils-lodash.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. ( () => {
  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. const 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#isPlainObject
  32. *
  33. * @member utils
  34. * @method isPlainObject
  35. */
  36. 'isPlainObject',
  37. /**
  38. * See Lo-Dash: https://lodash.com/docs#isObject
  39. *
  40. * @member utils
  41. * @method isObject
  42. */
  43. 'isObject',
  44. /**
  45. * See Lo-Dash: https://lodash.com/docs#isArray
  46. *
  47. * @member utils
  48. * @method isArray
  49. */
  50. 'isArray',
  51. /**
  52. * See Lo-Dash: https://lodash.com/docs#last
  53. *
  54. * @member utils
  55. * @method last
  56. */
  57. 'last',
  58. /**
  59. * See Lo-Dash: https://lodash.com/docs#isEqual
  60. *
  61. * @member utils
  62. * @method isEqual
  63. */
  64. 'isEqual'
  65. ];
  66. // Make this compatible with CommonJS as well so it can be used in Node (e.g. "grunt lodash").
  67. /* istanbul ignore next: we're not able to test the following in bender so ignore it */
  68. if ( typeof module == 'object' && module.exports ) {
  69. module.exports = lodashInclude;
  70. } else {
  71. CKEDITOR.define( () => {
  72. return lodashInclude;
  73. } );
  74. }
  75. } )();