adlnet / xAPIWrapper

Wrapper to simplify communication to an LRS
https://adlnet.gov/projects/xapi/
Apache License 2.0
219 stars 114 forks source link

Removed text-encoding for smaller implementation #136

Closed oliverfoster closed 5 years ago

oliverfoster commented 5 years ago

127

To test TextDecoder and TextEncoder in isolation in IE/Edge (or any browser), you can use the API like this:

var str = "this is a string";
console.log("original:", str);
var uintarray = new TextEncoder("utf8").encode(str)
console.log("Uint8Array:", uintarray );
var newStr = new TextDecoder("utf8").decode(uintarray);
console.log("processed:", newStr);

To run the attachments test in the browser, just load the test file test/testAttachments.html. The test is located in test/tests/test.attachments.js.

Readme updated.

This is dependent on the answer to #135

oliverfoster commented 5 years ago

thanks for testing @brian-learningpool

vbhayden commented 5 years ago

Will look at this today for a merge.

oliverfoster commented 5 years ago

@FlorianTolk this PR is still valid and good to merge into master.