NativeScript / NativeScript/ios-device-lib
_getMessage should be inlined and/or renamed
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 16
- Forks
- 8
- Avg merge
- 19h 29m
- Merged PRs (30d)
- 2
Description
I think _getMessage should be:
- Inlined as we are using it on only one place. I would assign the one line to a variable and pass it to this._iosDeviceLibStdioHandler.writeData
- Named something like _serializeNativeMethodCall... something that will ring the right bell when you read it.
https://github.com/telerik/ios-device-lib/blob/382c9c63dd1999ef247def16a3787b5987d63649/index.js#L126
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in index.js around line 126, where _getMessage is used to prepare data for this._iosDeviceLibStdioHandler.writeData. Confirm that this is its only use, then decide whether to inline the serialization or rename the helper to describe the native method call. Done means the single use remains clear and the obsolete or renamed helper is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- mobile-dev
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100