We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbb1e06 commit 762f220Copy full SHA for 762f220
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "hyperportal",
3
- "version": "1.0.4",
+ "version": "1.0.5",
4
"description": "A pleasant CLI for rapid development with Mongoose.",
5
"main": "src/index.js",
6
"repository":{
src/index.js
@@ -25,13 +25,12 @@ console.log(Object.keys(models).join('\n'))
25
26
const objectify = m => x => {
27
// just always use toJSON for sequelize.
28
- m = isSequelize(x) ? 'toJSON' : m
+ const invoke = o => (o[m] || o['toJSON']).bind(o)()
29
30
- if (x[m]) {
31
- return x[m]()
32
- }
33
if (L.isArray(x)) {
34
- return L.map(x, _ => _[m]())
+ return L.map(x, invoke)
+ } else {
+ return invoke(x)
35
}
36
return x
37
0 commit comments