Skip to content

Commit c045e40

Browse files
committed
docs: document methods
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent b11a2c9 commit c045e40

File tree

5 files changed

+49
-3
lines changed

5 files changed

+49
-3
lines changed

lib/node_modules/@stdlib/plot/table/unicode/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,25 @@ The following modes are supported:
799799

800800
### Methods
801801

802+
<a name="method-get"></a>
803+
804+
#### UnicodeTable.prototype.get( i, j )
805+
806+
Retrieves the data for a specified table cell.
807+
808+
```javascript
809+
var ndarray2array = require( '@stdlib/ndarray/to-array' );
810+
811+
var table = new UnicodeTable( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] );
812+
813+
// Retrieve individual cell data:
814+
var v = table.get( 0, 0 );
815+
// returns 1
816+
817+
v = table.get( 1, 2 );
818+
// returns 6
819+
```
820+
802821
<a name="method-push"></a>
803822

804823
#### UnicodeTable.prototype.push( data )
@@ -840,6 +859,27 @@ var str = table.render();
840859
// returns '...'
841860
```
842861

862+
<a name="method-set"></a>
863+
864+
#### UnicodeTable.prototype.set( i, j, value )
865+
866+
Sets the data for a specified table cell to a provided value.
867+
868+
```javascript
869+
var ndarray2array = require( '@stdlib/ndarray/to-array' );
870+
871+
var table = new UnicodeTable( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] );
872+
873+
// Retrieve individual cell data:
874+
var v = table.get( 1, 1 );
875+
// returns 5
876+
877+
table.set( 1, 1, 7 );
878+
879+
v = table.get( 1, 1 );
880+
// returns 7
881+
```
882+
843883
* * *
844884

845885
### Events

lib/node_modules/@stdlib/plot/table/unicode/docs/repl.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@
201201
table.data
202202
Table data.
203203

204+
table.get( i, j )
205+
Retrieves the data for a specified table cell.
206+
204207
table.headers
205208
Table headers.
206209

@@ -270,6 +273,9 @@
270273
table.rowSeparator
271274
Row separator character(s).
272275

276+
table.set( i, j, value )
277+
Sets the data for a specified table cell to a provided value.
278+
273279
table.verticalSeparatorMode
274280
Vertical line separator mode.
275281

lib/node_modules/@stdlib/plot/table/unicode/lib/get.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var format = require( '@stdlib/string/format' );
3030
// MAIN //
3131

3232
/**
33-
* Retrieves a single data element from a table.
33+
* Retrieves the data for a specified table cell.
3434
*
3535
* @private
3636
* @param {NonNegativeInteger} i - index for the first dimension (i.e., zero-based row number)

lib/node_modules/@stdlib/plot/table/unicode/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ setReadWriteAccessor( UnicodeTable.prototype, 'rowSeparator', getRowSeparator, s
10441044
setReadWriteAccessor( UnicodeTable.prototype, 'verticalSeparatorMode', getVerticalSeparatorMode, setVerticalSeparatorMode );
10451045

10461046
/**
1047-
* Retrieves a single data element from a table.
1047+
* Retrieves the data for a specified table cell.
10481048
*
10491049
* @name get
10501050
* @memberof UnicodeTable.prototype

lib/node_modules/@stdlib/plot/table/unicode/lib/set.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var normalizeData = require( './normalize.js' );
3131
// MAIN //
3232

3333
/**
34-
* Sets a single data element in a table to a specified value.
34+
* Sets the data for a specified table cell to a provided value.
3535
*
3636
* @private
3737
* @param {NonNegativeInteger} i - index for the first dimension (i.e., zero-based row number)

0 commit comments

Comments
 (0)