Skip to content

Conversation

@semoro
Copy link

@semoro semoro commented Oct 5, 2015

When working with Sequelize i created model instance method item.url() and want to use it inside Jade code, also mixed with providing Promise to render method, so i could't use skipTraverse.
I had added two optional functions

app.use(require('express-promise')({
    disableJSONify: function (object) {
        return true; //You can add more logic here if you want to select which page would passed without toJSON call
    },
    objectFilter: function (object) {
        if (object && object.model) //Example for Sequelize, will skip object if it was ORM model
            return true;
        return false;
    }
}));

@semoro
Copy link
Author

semoro commented Oct 5, 2015

Also skipTraverse not working for ORM models....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant