Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/fetch-event-source

Package Overview
Dependencies
Maintainers
5
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/fetch-event-source - npm Package Versions

2.0.1

Diff

Changelog

Source

2.0.1

This release adds support for esmodule imports (see #4).

vishwam
published 2.0.0 •

Changelog

Source

2.0.0

This release improves the performance of parsing the response stream and fixes some corner cases to better match the spec.

Changed

  • The id, event, and data fields are now initialized to empty strings, per the spec (they were previously undefined)

  • The onmessage callback is now called for all messages (it was previously triggered only for messages with a data field)

  • If a message contains multiple data fields, they will be concatenated together into a single string. For example, the following message:

    data: Foo
    data:Bar
    data
    data: Baz
    

    will result in { data: 'Foo\nBar\n\nBaz' }

  • If the server sends an id field with an empty value, the last-event-id header will no longer be sent on the next reconnect.

Removed

  • The internal parseStream function has been removed. The parse implementation was previously based on async generators, which required a lot of supporting code in both the typescript-generated polyfill as well as the javascript engine. The new implementation is based on simple callbacks, which should be much faster.
vishwam
published 2.0.0-alpha.2 •

vishwam
published 2.0.0-alpha.1 •

vishwam
published 1.0.2 •

Changelog

Source

1.0.2

Changed

  • Updated examples in readme to fix typos, added more comments.
  • Changed if statements in parse.ts to test for specific values instead of truthy/falsy values.
vishwam
published 1.0.1 •

Changelog

Source

1.0.1

Changed

  • Changed the default onOpen validator to allow charset and boundary directives in the content-type
microsoft
published 1.0.0 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc