Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26670] TiAPI: Create Node-compatible util module API

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2019-03-07T21:04:22.000+0000
Affected Version/sn/a
Fix Version/sRelease 8.1.0
ComponentsTiAPI
Labelsn/a
ReporterChristopher Williams
AssigneeChristopher Williams
Created2018-12-19T19:42:31.000+0000
Updated2019-06-13T14:03:27.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/util.html

Comments

  1. Christopher Williams 2019-02-21

    https://github.com/appcelerator/titanium_mobile/pull/10718
  2. Samir Mohammed 2019-06-13

    *Closing ticket*, featured verified in SDK version 8.2.0.v20190612155743 , 8.1.0.v20190612160220. Tested using examples from https://nodejs.org/api/util.html e.g.
       const util = require('util');
       
       async function fn() {
         return 'hello world';
       }
       const callbackFunction = util.callbackify(fn);
       
       callbackFunction((err, ret) => {
         if (err) throw err;
         console.log(ret);
       });
       
    Test and other information can be found at (Including unit tests): https://github.com/appcelerator/titanium_mobile/pull/10718

JSON Source