Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
1.3 KiB

  1. Deep Extend
  2. ===========
  3. Recursive object extending.
  4. [![Build Status](https://api.travis-ci.org/unclechu/node-deep-extend.svg?branch=master)](https://travis-ci.org/unclechu/node-deep-extend)
  5. [![NPM](https://nodei.co/npm/deep-extend.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/deep-extend/)
  6. Install
  7. -------
  8. ```bash
  9. $ npm install deep-extend
  10. ```
  11. Usage
  12. -----
  13. ```javascript
  14. var deepExtend = require('deep-extend');
  15. var obj1 = {
  16. a: 1,
  17. b: 2,
  18. d: {
  19. a: 1,
  20. b: [],
  21. c: { test1: 123, test2: 321 }
  22. },
  23. f: 5,
  24. g: 123,
  25. i: 321,
  26. j: [1, 2]
  27. };
  28. var obj2 = {
  29. b: 3,
  30. c: 5,
  31. d: {
  32. b: { first: 'one', second: 'two' },
  33. c: { test2: 222 }
  34. },
  35. e: { one: 1, two: 2 },
  36. f: [],
  37. g: (void 0),
  38. h: /abc/g,
  39. i: null,
  40. j: [3, 4]
  41. };
  42. deepExtend(obj1, obj2);
  43. console.log(obj1);
  44. /*
  45. { a: 1,
  46. b: 3,
  47. d:
  48. { a: 1,
  49. b: { first: 'one', second: 'two' },
  50. c: { test1: 123, test2: 222 } },
  51. f: [],
  52. g: undefined,
  53. c: 5,
  54. e: { one: 1, two: 2 },
  55. h: /abc/g,
  56. i: null,
  57. j: [3, 4] }
  58. */
  59. ```
  60. Unit testing
  61. ------------
  62. ```bash
  63. $ npm test
  64. ```
  65. Changelog
  66. ---------
  67. [CHANGELOG.md](./CHANGELOG.md)
  68. Any issues?
  69. -----------
  70. Please, report about issues
  71. [here](https://github.com/unclechu/node-deep-extend/issues).
  72. License
  73. -------
  74. [MIT](./LICENSE)