diff options
Diffstat (limited to 'lib/models/index.js')
-rw-r--r-- | lib/models/index.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/models/index.js b/lib/models/index.js index 6d0fd3c3..e83956e5 100644 --- a/lib/models/index.js +++ b/lib/models/index.js @@ -27,6 +27,12 @@ function stripNullByte(value) { } sequelize.stripNullByte = stripNullByte; +function processData(data, _default, process) { + if (data === undefined) return data; + else return data === null ? _default : (process ? process(data) : data); +} +sequelize.processData = processData; + var db = {}; fs |