Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chatgris/event_source_encoder
EventSourceEncoder is a Elixir library to encode data into EventSource compliant data.
https://github.com/chatgris/event_source_encoder
Last synced: 4 days ago
JSON representation
EventSourceEncoder is a Elixir library to encode data into EventSource compliant data.
- Host: GitHub
- URL: https://github.com/chatgris/event_source_encoder
- Owner: chatgris
- License: mit
- Created: 2014-07-05T16:39:15.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-22T08:18:48.000Z (over 9 years ago)
- Last Synced: 2024-10-11T02:08:58.035Z (25 days ago)
- Language: Elixir
- Homepage:
- Size: 158 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Encode data into EventSource compliant data. (Text and Numbers)
- fucking-awesome-elixir - event_source_encoder - Encode data into EventSource compliant data. (Text and Numbers)
- awesome-elixir - event_source_encoder - Encode data into EventSource compliant data. (Text and Numbers)
README
[![Build Status](https://travis-ci.org/chatgris/event_source_encoder.png?branch=master)](https://travis-ci.org/chatgris/event_source_encoder)
# EventSourceEncoderEventSourceEncoder is a Elixir library to encode data into EventSource
compliant data.## Examples
``` elixir
iex> EventSourceEncoder.encode(1, "This is data")
"id: 1\\ndata: This is data\\n\\n"iex> EventSourceEncoder.encode(1, "This is new data", :login)
"id: 1\\nevent: login\\ndata: This is new data\\n\\n"
```