birchroad / node-jspack

JavaScript library to pack primitives to octet arrays, packaged for NodeJS
http://code.google.com/p/jspack/
BSD 3-Clause "New" or "Revised" License
15 stars 12 forks source link

Make this library browser usable #6

Open belldandu opened 8 years ago

belldandu commented 8 years ago

Added some bits to isolate the code from the browser (that doesn't affect node at all) and put some checks in place to see if the file is being run in a browser or in node.

The way you use it in node is the same, however now you can also use it in a browser as its globaled as jspack AKA this.jspack.

Simply load jspack.js in a browser and type jspack in the developer console to test.

belldandu commented 8 years ago

@kmpm let me know if you have any concerns.

belldandu commented 8 years ago

@kmpm Just noticed that _DeString fails to loop through the entire array. What is even the point of <s if it will only return the first letter and nothing else.

kmpm commented 8 years ago

You are right about the issues you have found. Could you please create separate issues for them if they are not directly related to each other or this browser issue.

I'm on vacation this week and might not be able to do any coding but thanks for contributing. I haven't used this module for some time but that's not a reason to not improving it. Den 26 juni 2016 10:47 fm skrev "Belldandu" notifications@github.com:

@kmpm https://github.com/kmpm Just noticed that _DeString fails to loop through the entire array. What is even the point of <s if it will only return the first letter and nothing else.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/birchroad/node-jspack/pull/6#issuecomment-228590915, or mute the thread https://github.com/notifications/unsubscribe/AAF5ardv9APRBB8zPNm9Qh_xqpEuUsLLks5qPjyMgaJpZM4I-fLb .

belldandu commented 8 years ago

@kmpm #5 #7 #8

Still waiting for a response.

belldandu commented 8 years ago

Also i use this library in actual development and these 3 issues are the only things holding up development for one of my libraries @kmpm

belldandu commented 8 years ago

@kmpm >.>