Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27286] TiAPI: Create Node-compatible String Decoder module API

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2019-09-17T13:54:02.000+0000
Affected Version/sn/a
Fix Version/sRelease 8.3.0
ComponentsTiAPI
Labelsn/a
ReporterChristopher Williams
AssigneeChristopher Williams
Created2019-07-29T14:28:37.000+0000
Updated2019-10-09T11:04:19.000+0000

Description

It'd be useful to create equivalents of some of the core Node modules in Titanium so that users could port/re-use node codebases on mobile devices. Some of the more common modules could map relatively easily to devices, and would be worth investigating. https://nodejs.org/api/string_decoder.html Once Node's Buffer module is implemented it is a relatively small effort to implement the String Decoder module.

Attachments

FileDateSize
Screenshot 2019-10-09 at 11.55.49.png2019-10-09T10:56:28.000+000029825

Comments

  1. Christopher Williams 2019-07-31

    https://github.com/appcelerator/titanium_mobile/pull/11095
  2. Sohail Saddique 2019-10-09

    *Tested on latest build. Ticket closed.* *Test Environment* Studio Ver: 5.1.4.201909061933 SDK Ver: 8.3.0.v20191008081818 Mac OS Ver: 10.14.6 Xcode Ver: Xcode 11.1 Appc NPM: 4.2.15 Appc CLI: 7.1.1 Node Ver: 10.16.3 NPM Ver: 6.11.3 Simulators: iPhone 11 Pro (13.1), Pixel 3 (Android 10/API 29) *Test*
       import { StringDecoder } from "string_decoder";
       
       const decoder = new StringDecoder('utf8');
       
       var decode = decoder.write(Buffer.from([ 0xE2, 0x82 ]));
       var decode2 = decoder.end(Buffer.from([ 0xAC]));
       
    *Output* !Screenshot 2019-10-09 at 11.55.49.png|thumbnail!

JSON Source