[TIMOB-26573] TiAPI: Make Ti.Buffer Node-compatible with Node's Buffer type
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-08-06T15:10:12.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 8.2.0 |
Components | TiAPI |
Labels | n/a |
Reporter | Christopher Williams |
Assignee | Christopher Williams |
Created | 2018-11-16T16:29:50.000+0000 |
Updated | 2019-09-03T18:14:51.000+0000 |
Description
We have our own Ti.Buffer type. To play nice with Node, we should see if we can't have it add/use a similar API so that can be used interchangeably.
I'm working on a creating a Node compatible Buffer module that wraps our Ti.Buffer. Each type represents a byte array (specifically an unsigned 8-bit array) so the core idea is the same - but Node has a much more extensive API. Notable, also, is that both types were created before JS engines supported typed arrays. Now the JS engine has it's own Uint8Array that serves the same purpose. I think it'd be good for us to support accepting that type where we currently accept Ti.Buffer.
https://github.com/appcelerator/titanium_mobile/pull/11084
PR was squash merged manually
[~cwilliams] anything QE should check/validate before closing?
Closing as resolved.