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

coap

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coap - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "coap",
"version": "0.1.0",
"version": "0.1.1",
"description": "A CoAP library for node modelled after 'http'",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -77,2 +77,4 @@ node-coap

* <a href="#outgoing"><code>OutgoingMessage</b></code></a>
* <a href="#registerOption"><code>coap.registerOption()</b></code></a>
* <a href="#registerFormat"><code>coap.registerFormat()</b></code></a>

@@ -218,3 +220,3 @@ <a name="request"></a>

`'Content-Format'`, `'Accept'` and `'ETag'`.
See <a href='#registerOption'> to know how to register more.
See <a href='#registerOption'><code>registerOption()</code></a> to know how to register more.

@@ -251,2 +253,18 @@ See the

<a name="registerOption"></a>
### coap.registerOption(name, toBinary, toString)
Register a new option to be converted to string and added to the
`message.headers`.
`toBinary` is a function that accept a string and returns a `Buffer`.
`toString` is a function that accept a `Buffer` and returns a `String`.
<a name="registerFormat"></a>
### coap.registerFormat(name, value)
Register a new format to be interpreted and sent in CoAP
`Content-Format` option.
Each format is identified by a number, see the [Content-Format
registry](http://tools.ietf.org/html/draft-ietf-core-coap-18#section-12.3).
<a name="contributing"></a>

@@ -261,2 +279,12 @@ ## Contributing

These are the defaults formats:
```js
registerFormat('text/plain', 0)
registerFormat('application/link-format', 40)
registerFormat('application/xml', 41)
registerFormat('application/octet-stream', 42)
registerFormat('application/exi', 47)
registerFormat('application/json', 50)
```
## Limitations

@@ -263,0 +291,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