Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var NAMESPACE = function(){
- const one = {
- Car: class Car{
- constructor(){
- console.log('Namespace-One: Car has been assembled with diesel engine')
- }
- },
- logger: (param) => {
- window.localStorage.setItem(one.id, param)
- console.log(`Request has been logged in localStorage, with the id: ${one.id++}`)
- },
- id: 0
- }
- const two = {
- Car: class Car{
- constructor(){
- console.log('Namespace-Two: Car has been assembled with V8 engine')
- }
- },
- logger: (param) => {
- two.data.push(param)
- console.log('Request has been logged in data')
- },
- data: []
- }
- const three = {
- data: [],
- x: 1
- }
- return {
- one: one,
- two: two,
- three: three
- }
- }()
Add Comment
Please, Sign In to add comment