Skip to content

Commit

Permalink
lib: stabilize bundle API (#64)
Browse files Browse the repository at this point in the history
This was introduced experimentally in v6.0.0. Promote to stable!
  • Loading branch information
MylesBorins authored Aug 30, 2021
1 parent 18b2b03 commit 8c525b4
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 18 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ oscServer.on('message', function (msg) {

### Sending OSC bundles:

**WARNING**: Bundle support is Experimental and subject to change at any point.

```js
import { Bundle, Client } from 'node-osc';

Expand Down
2 changes: 0 additions & 2 deletions lib/Bundle.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Message from './Message.mjs';
import { bundleWarning } from './internal/warnings.mjs';

function sanitize(element) {
if (element instanceof Array) element = new Message(element[0], ...element.slice(1));
Expand All @@ -8,7 +7,6 @@ function sanitize(element) {

class Bundle {
constructor(timetag, ...elements) {
bundleWarning();
if (!(typeof timetag === 'number')) {
elements.unshift(timetag);
timetag = 0;
Expand Down
2 changes: 0 additions & 2 deletions lib/internal/decode.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { fromBuffer } from 'osc-min';
import { bundleWarning } from './warnings.mjs';

function sanitizeMessage(decoded) {
const message = [];
Expand All @@ -21,7 +20,6 @@ function sanitizeBundle(decoded) {
function decode(data) {
const decoded = fromBuffer(data);
if (decoded.oscType === 'bundle') {
bundleWarning();
return sanitizeBundle(decoded);
}
else if (decoded.oscType === 'message') {
Expand Down
12 changes: 0 additions & 12 deletions lib/internal/warnings.mjs

This file was deleted.

0 comments on commit 8c525b4

Please sign in to comment.