Guest User

Untitled

a guest
Jun 17th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. var NAMESPACE = function(){
  2. const one = {
  3. Car: class Car{
  4. constructor(){
  5. console.log('Namespace-One: Car has been assembled with diesel engine')
  6. }
  7. },
  8. logger: (param) => {
  9. window.localStorage.setItem(one.id, param)
  10. console.log(`Request has been logged in localStorage, with the id: ${one.id++}`)
  11. },
  12. id: 0
  13. }
  14. const two = {
  15. Car: class Car{
  16. constructor(){
  17. console.log('Namespace-Two: Car has been assembled with V8 engine')
  18. }
  19. },
  20. logger: (param) => {
  21. two.data.push(param)
  22. console.log('Request has been logged in data')
  23. },
  24. data: []
  25. }
  26. const three = {
  27. data: [],
  28. x: 1
  29. }
  30. return {
  31. one: one,
  32. two: two,
  33. three: three
  34. }
  35. }()
Add Comment
Please, Sign In to add comment