Welcome to the Linux Foundation Forum!

Lesson 12 Stream Types

In lesson 12 in the Stream Types lesson there is a Stream function. It references EE, does anyone know what is that?
And the function is not used anywhere in the code typed into the CLI nor the descriptions.

  1. function Stream(opts) {
  2. EE.call(this, opts);
  3. }

Is it something that is not supposed to be there? Thanks for any help in advance.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Comments

  • Hey @seetdev thanks for reporting this, I'm not seeing it in my original source material. Is this in code files or in the material?

  • Posts: 1
    edited January 2023

    Hi, interesting question, did not notice.
    @davidmarkclements it's when you write: > node -p "stream + ''" in the prompt
    Thanks in advance for your answer.

    KR,
    Clément

  • Posts: 160

    ohhhh

    yeah that's showing you node internals

    the stream module is actually a constructor function that "subclasses" (remember, not really a real thing in JS, JS class broadly functionally the same as JS constructor) EE - which will be the reference uses in Node internals for the EventEmitter

    It's just a way to show, demonstrably, that streams inherit from event emitter

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training