Skip to content

Commit

Permalink
refactor: Use utils in print method.
Browse files Browse the repository at this point in the history
  • Loading branch information
jheer committed Jun 15, 2021
1 parent 2ff99ac commit 6497d56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/table/table.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Transformable from './transformable';
import error from '../util/error';
import isNumber from '../util/is-number';
import repeat from '../util/repeat';

/**
Expand Down Expand Up @@ -275,7 +276,7 @@ export default class Table extends Transformable {
* number-valued, specifies the row limit.
*/
print(options = {}) {
if (typeof options === 'number') {
if (isNumber(options)) {
options = { limit: options };
} else if (options.limit == null) {
options.limit = 10;
Expand Down

0 comments on commit 6497d56

Please sign in to comment.