Skip to content

Commit

Permalink
Merge pull request #140 from CoboVault/cfx
Browse files Browse the repository at this point in the history
modify isFunction
  • Loading branch information
soralit authored Sep 23, 2020
2 parents c72b945 + 3d97dd5 commit 8d3b7ba
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crypto-coin-kit",
"version": "0.2.34",
"version": "0.2.35",
"description": "crypto coin kit for common coins",
"main": "./dist/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/TCFX/lib/lib/callable.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const lodash = require('lodash');

function callable(object, func) {
if (!lodash.isFunction(func)) {
if (typeof func !== 'function') {
throw new Error('except to be function');
}

Expand Down
2 changes: 1 addition & 1 deletion src/TCFX/lib/lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class Parser {
} else if (lodash.isPlainObject(arg)) {
const keyToParser = lodash.mapValues(arg, v => new this.constructor(v));
arg = objectParser(keyToParser);
} else if (!lodash.isFunction(arg)) {
} else if (typeof arg !== 'function') {
arg = valueParser(arg);
}
return callable(this, arg);
Expand Down

0 comments on commit 8d3b7ba

Please sign in to comment.