Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removing lodash dependency #36

Merged
merged 1 commit into from
Jun 2, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
removing lodash dependency
its better to remove the lodash, its an heavy module, better to use lodash modules individually or es6
  • Loading branch information
Esref Durna authored Jun 2, 2017
commit 0c2cc3e339f5bb75ccc4babade502a233578b4ed
6 changes: 2 additions & 4 deletions src/validateTableData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import _ from 'lodash';

/**
* @typedef {string} cell
*/
Expand All @@ -13,7 +11,7 @@ import _ from 'lodash';
* @returns {undefined}
*/
export default (rows) => {
if (!_.isArray(rows)) {
if (!Array.isArray(rows)) {
throw new Error('Table data must be an array.');
}

Expand All @@ -28,7 +26,7 @@ export default (rows) => {
const columnNumber = rows[0].length;

_.forEach(rows, (cells) => {
if (!_.isArray(cells)) {
if (!Array.isArray(cells)) {
throw new Error('Table row data must be an array.');
}

Expand Down