Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax doubt #41

Open
asd123ea opened this issue Jan 18, 2021 · 0 comments
Open

Syntax doubt #41

asd123ea opened this issue Jan 18, 2021 · 0 comments

Comments

@asd123ea
Copy link

I'm reading the 10 chapter, Building Microservice systems.
And I came accross to this syntax below at page 506 (Standardizing service boilerplate)

function createClient (ns, opts) {
  return createClient[ns] || (createClient[ns] = nos(net.connect(opts)))
}

Didn't quite understand the createClient[ns] = nos(net.connect(opts)) part, What it means? Why should I use it?

Is this syntax documented anywhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant