inline-object-array.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. prevState = prevState || {
  2. catalogs: [],
  3. loadState: LOADED,
  4. opened: false,
  5. searchQuery: '',
  6. selectedCatalog: null,
  7. };
  8. prevState = prevState ||
  9. defaultState || {
  10. catalogs: [],
  11. loadState: LOADED,
  12. opened: false,
  13. searchQuery: '',
  14. selectedCatalog: null,
  15. };
  16. prevState = prevState ||
  17. defaultState && {
  18. catalogs: [],
  19. loadState: LOADED,
  20. opened: false,
  21. searchQuery: '',
  22. selectedCatalog: null,
  23. };
  24. prevState = prevState || useDefault && defaultState || {
  25. catalogs: [],
  26. loadState: LOADED,
  27. opened: false,
  28. searchQuery: '',
  29. selectedCatalog: null,
  30. };
  31. this.steps = steps || [
  32. {
  33. name: 'mock-module',
  34. path: '/nux/mock-module',
  35. },
  36. ];
  37. this.steps = steps || checkStep && [
  38. {
  39. name: 'mock-module',
  40. path: '/nux/mock-module',
  41. },
  42. ];
  43. this.steps = steps && checkStep || [
  44. {
  45. name: 'mock-module',
  46. path: '/nux/mock-module',
  47. },
  48. ];
  49. const create = () => {
  50. const result = doSomething();
  51. return (
  52. shouldReturn &&
  53. result.ok && {
  54. status: "ok",
  55. createdAt: result.createdAt,
  56. updatedAt: result.updatedAt
  57. }
  58. );
  59. }
  60. const create = () => {
  61. const result = doSomething();
  62. return (
  63. shouldReturn && result.ok && result || {
  64. status: "ok",
  65. createdAt: result.createdAt,
  66. updatedAt: result.updatedAt
  67. }
  68. );
  69. }
  70. const obj = {
  71. state: shouldHaveState &&
  72. stateIsOK && {
  73. loadState: LOADED,
  74. opened: false
  75. },
  76. loadNext: stateIsOK && hasNext || {
  77. skipNext: true
  78. },
  79. loaded: true
  80. }