Skip to content

Commit 3f43bff

Browse files
committed
Added sendJSON function that will automatically stringify the json object for you
1 parent 4d5c9e3 commit 3f43bff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,9 @@ export default function (url, opts) {
3333
}, ms);
3434
};
3535

36+
$.sendJSON = s => {
37+
return this.send(JSON.stringify(s));
38+
}
39+
3640
return $.open();
3741
}

0 commit comments

Comments
 (0)