Skip to content

Commit 86f65e5

Browse files
Zsolt Borbélyyichoi
authored andcommitted
Fix different typos and style issues (#1007)
IoT.js-DCO-1.0-Signed-off-by: Zsolt Borbély [email protected]
1 parent 1d6e715 commit 86f65e5

File tree

9 files changed

+34
-35
lines changed

9 files changed

+34
-35
lines changed

cmake/jerry.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
8383
list(APPEND DEPS_LIB_JERRY_ARGS -DFEATURE_ERROR_MESSAGES=ON)
8484
endif()
8585

86-
# Nuttx is not using the default port implementation of JerryScript
86+
# NuttX is not using the default port implementation of JerryScript
8787
if("${TARGET_OS}" MATCHES "NUTTX")
8888
list(APPEND DEPS_LIB_JERRY_ARGS -DJERRY_PORT_DEFAULT=OFF)
8989
else()

docs/api/IoT.js-API-ADC.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Returns a new ADC object which can open an ADC pin.
2828

2929
### adc.open(configuration[, callback])
3030
* `configuration` {Object}
31-
* `device` {string} mandatory configuration on Linux
32-
* `pin` {int} mandatory configuration on NuttX
31+
* `device` {string} Mandatory configuration on Linux.
32+
* `pin` {int} Mandatory configuration on NuttX.
3333
* `callback` {Function}
3434
* `err`: {Error|null}
3535
* Returns: `AdcPin` {adc.AdcPin}
@@ -73,7 +73,7 @@ adc0.read(function(err, value) {
7373

7474

7575
### adcpin.readSync()
76-
* Returns: `{int}` analog value
76+
* Returns: `{int}` Analog value.
7777

7878
Reads the analog value from the pin synchronously.
7979

docs/api/IoT.js-API-BLE.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### Platform Support
22

3-
The following shows ble module APIs available for each platform.
3+
The following shows BLE module APIs available for each platform.
44

55
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | NuttX<br/>(STM32F4-Discovery) |
66
| :---: | :---: | :---: | :---: |
@@ -56,12 +56,12 @@ ble.on('stateChange', function(state){
5656
```
5757

5858
### ble.startAdvertising(name, serviceUuids[, callback])
59-
* `name` {string} - maximum 26 bytes
59+
* `name` {string} Maximum 26 bytes.
6060
* `serviceUuids` {Array[String]}
6161
* 1 128-bit service UUID
6262
* 1 128-bit service UUID + 2 16-bit service UUIDs
6363
* 7 16-bit service UUID
64-
* `callback` {Function} error handler
64+
* `callback` {Function} Error handler.
6565
* `error` {Error}
6666

6767
Starts advertising.
@@ -80,15 +80,15 @@ ble.startAdvertising(name, serviceUuids[, callback(error)]);
8080

8181

8282
### ble.stopAdvertising(callback)
83-
* `callback` {Function} error handler
83+
* `callback` {Function} Error handler.
8484
* `error` {Error}
8585

8686
Stops advertising.
8787

8888

8989
### ble.setServices(services[, callback])
9090
* `services` {Array[PrimaryService]}
91-
* `callback` {Function} error handler
91+
* `callback` {Function} Error handler.
9292
* `error` {Error}
9393

9494
Sets the primary services available on the peripheral.
@@ -124,23 +124,23 @@ Characteristics are defined attribute types that contain a single logical value.
124124
* `secure` {Array[string]} Enables security for properties, can be a combination of 'read', 'write', 'writeWithoutResponse', 'notify' and 'indicate'.
125125
* `value` {Buffer}
126126
* `descriptors` {Array[Descriptor]}
127-
* `onReadRequest` {Function} ead request handler (optional)
127+
* `onReadRequest` {Function} Read request handler. (optional)
128128
* `offset` {number} (0x0000 - 0xffff)
129129
* `callback` {Function}
130130
* `result` {Characteristic.RESULT_*}
131131
* `data` {Buffer}
132-
* `onWriteRequest` {Function} write request handler (optional)
132+
* `onWriteRequest` {Function} Write request handler. (optional)
133133
* `data` {Buffer}
134134
* `offset` {number} (0x0000 - 0xffff)
135135
* `withoutResponse` {boolean}
136136
* `callback` {Function}
137137
* `result` {Characteristic.RESULT_*}
138-
* `onSubscribe` {Function} notify/indicate subscribe handler (optional)
139-
* `maxValueSize` {number} maximum data size
138+
* `onSubscribe` {Function} Notify/indicate subscribe handler. (optional)
139+
* `maxValueSize` {number} Maximum data size.
140140
* `updateValueCallback` {Function}
141-
* `onUnsubscribe` {Function} notify/indicate unsubscribe handler (optional)
142-
* `onNotify` {Function} notify sent handler (optional)
143-
* `onIndicate` {Function} indicate confirmation received handler (optional)
141+
* `onUnsubscribe` {Function} Notify/indicate unsubscribe handler. (optional)
142+
* `onNotify` {Function} Notify sent handler. (optional)
143+
* `onIndicate` {Function} Indicate confirmation received handler. (optional)
144144
Returns: {Characteristic}
145145

146146
**Example**

docs/api/IoT.js-API-Buffer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ console.log(buffer);
423423

424424
### buf.writeUInt8(value, offset[, noAssert])
425425
* `value` {integer} Number to be written into the buffer.
426-
* `offset' {integer} Start position of the writing.
426+
* `offset` {integer} Start position of the writing.
427427
* `noAssert` {boolean} Skip argument validation. **Default:** `false`
428428
* Returns: {number} Offset plus the number of bytes written.
429429

docs/api/IoT.js-API-Events.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ The following shows Event module APIs available for each platform.
88
| emitter.on | O | O | O |
99
| emitter.emit | O | O | O |
1010
| emitter.once | O | O | O |
11-
| emitter.addListener | O | O | O |
1211
| emitter.removeListener | O | O | O |
13-
| emitter.removeAllListener | O | O | O |
12+
| emitter.removeAllListeners | O | O | O |
1413

1514

1615
# Events
@@ -19,7 +18,7 @@ IoT.js is based on event-driven programming where objects (called "emitters") pe
1918

2019
# Class: EventEmitter
2120

22-
The `events.EventEmitter` plays a role as base class for "emmitters".
21+
The `events.EventEmitter` plays a role as base class for "emitters".
2322
User application would not directly creates an instance of `EventEmitter` since `EventEmitter` is an abstract trait which defines its behavior and grants to sub-classes.
2423

2524
### new EventEmitter()
@@ -162,7 +161,7 @@ assert.equal(onceCnt, 1);
162161
* `args` {any}.
163162
* Returns `emitter` {events.EventEmitter}.
164163

165-
Removes listener from the list of event listeners.
164+
Removes `listener` from the list of event listeners.
166165

167166
If you add the same `listener` multiple times, this removes only one instance of them.
168167

@@ -182,7 +181,7 @@ emitter.removeListener('event', listener);
182181

183182
```
184183

185-
### emitter.removeAllListener([event])
184+
### emitter.removeAllListeners([event])
186185
* `event` {string} The name of the event.
187186
* Returns `emitter` {events.EventEmitter}.
188187

docs/api/IoT.js-API-Process.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ As a global, it is always available to IoT.js applications without using `requir
1919
### process.arch
2020
* {string}
2121

22-
The `arch` proeprty returns the processor architercture identifier that the IoT.js process is currently running on.
22+
The `arch` property returns the processor architecture identifier that the IoT.js process is currently running on.
2323
For instance `'arm'`, `'ia32'`, `'x64'`, or `'unknown'`.
2424

2525
### process.argv
@@ -89,7 +89,7 @@ is currently running on. For instance `'linux'`, `'darwin'`, `'nuttx'`, `'tizenr
8989
* `path` {string} The path to change working directory to.
9090

9191
The `chdir` method changes the current working directory of the IoT.js process or
92-
throes an exception if the operaion fails (for instance the `path` specified does not exist).
92+
throws an exception if the operation fails (for instance the `path` specified does not exist).
9393

9494
**Example**
9595

@@ -202,13 +202,13 @@ The `'uncaughtException'` event is emitted when an uncaught JavaScript exception
202202
way back to the event loop. By default, IoT.js handles such exceptions by printing it to `stderr` and exiting.
203203
Adding a handler for the `'uncaughtException'` event overrides the default behavior.
204204

205-
The listener function is called with the `Error` obect passed as the only argument.
205+
The listener function is called with the `Error` object passed as the only argument.
206206

207207
**Warning: Using the `'uncaughtException'` event correctly**
208208

209209
This event is a crude mechanism for exception handling intended to be used only as a last resort.
210210
The event should not be used as an eqivalent to 'On Error Resume Next'. Unhandled exceptions inherently mean
211-
that a program is in an unknown state. Thus attempting to resume the application code withtout properly
211+
that a program is in an unknown state. Thus attempting to resume the application code without properly
212212
recovering from the exception can cause unforeseen/unpredictable issues.
213213

214214
Only one exception thrown within the event handler will be caught and will immediately terminate the application.

docs/build/Build-for-NuttX.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ $ brew install gcc-arm-none-eabi libusb minicom
5050

5151
To generate headers which are required to build IoT.js, for the first time, you need to build NuttX at least once. This time NuttX build will be failed. But don't worry at this time. After one execution, you don't need this sequence any more.
5252

53-
#### Supported Nuttx version
53+
#### Supported NuttX version
5454
|Repository|Tag Name|
5555
|----------|:------:|
5656
| nuttx | nuttx-7.19 |

docs/help/API-document-sample.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
The following shows `{Your_module_name}` module APIs available for each platform.
1313

14-
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | Nuttx<br/>(STM32F4-Discovery) |
14+
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | NuttX<br/>(STM32F4-Discovery) |
1515
| :---: | :---: | :---: | :---: |
1616
| {functionName1} | O | O | O |
1717
| {functionName2} | O | O | O |

tools/build.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -206,15 +206,15 @@ def init_options():
206206

207207

208208
def adjust_options(options):
209-
# First fix some option inconsistencies
209+
# First fix some option inconsistencies.
210210
if options.target_os in ['nuttx', 'tizenrt']:
211211
options.buildlib = True
212212
if not options.sysroot:
213213
ex.fail('--sysroot needed for nuttx target')
214214

215215
options.sysroot = fs.abspath(options.sysroot)
216216
if not fs.exists(options.sysroot):
217-
ex.fail('Nuttx sysroot %s does not exist' % options.sysroot)
217+
ex.fail('NuttX sysroot %s does not exist' % options.sysroot)
218218

219219
if options.target_arch == 'x86':
220220
options.target_arch = 'i686'
@@ -232,7 +232,7 @@ def adjust_options(options):
232232
if options.iotjs_minimal_profile:
233233
options.no_check_test = True
234234

235-
# Then add calculated options
235+
# Then add calculated options.
236236
options.host_tuple = '%s-%s' % (platform.arch(), platform.os())
237237
options.target_tuple = '%s-%s' % (options.target_arch, options.target_os)
238238

@@ -254,7 +254,7 @@ def adjust_options(options):
254254
options.cmake_toolchain_file = cmake_path % options.target_tuple
255255
options.host_cmake_toolchain_file = cmake_path % options.host_tuple
256256

257-
# Specify the file of JerryScript profile
257+
# Specify the file of JerryScript profile.
258258
options.jerry_profile = fs.join(path.JERRY_PROFILE_ROOT,
259259
options.jerry_profile + '.profile')
260260

@@ -340,7 +340,7 @@ def get_on_off(boolean_value):
340340
def build_iotjs(options):
341341
print_progress('Build IoT.js')
342342

343-
# Set JerryScript cmake options.
343+
# Set IoT.js cmake options.
344344
cmake_opt = [
345345
'-B%s' % options.build_root,
346346
'-H%s' % path.PROJECT_ROOT,
@@ -434,7 +434,7 @@ def run_checktest(options):
434434
if os.getenv('TRAVIS') == "true":
435435
checktest_quiet = 'no'
436436

437-
# iot.js executable
437+
# IoT.js executable
438438
iotjs = fs.join(options.build_root, 'bin', 'iotjs')
439439
build_args = ['quiet=' + checktest_quiet]
440440
if options.iotjs_exclude_module:
@@ -481,7 +481,7 @@ def run_checktest(options):
481481

482482
build_iotjs(options)
483483

484-
# Run tests
484+
# Run tests.
485485
if not options.no_check_test:
486486
print_progress('Run tests')
487487
if options.buildlib:

0 commit comments

Comments
 (0)