-
Notifications
You must be signed in to change notification settings - Fork 1
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
Refactor/bump node #19
Conversation
lib/index.js
Outdated
@@ -124,3 +124,4 @@ function getSchemaForeignKeys(schemaName, foreignKeys) { | |||
} | |||
|
|||
module.exports = schemagicInit(); | |||
module.exports.formats = require('./formats'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added export of formats that was used in other apps through require('schemagic/formats').currency;
const schemaCopy = clone(schema); | ||
const schemaTraverse = traverse(schemaCopy); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed variables
return callback(null, errors); | ||
}); | ||
} | ||
}; | ||
|
||
function getValuesToCheck(foreignKeys, document) { | ||
var memo = {}; | ||
let memo = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we actually redefine memo or just add properties?
memo.foo = 'foo';
does not mean we redefined memo and it can be const
in this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice restructure
Co-authored-by: Daniel Hillmann <hiller@live.dk>
This PR contains:
lib
directoryexportedSuch export breaks the idea of having only schemas exported.formats
as it seems that they are used by the apps requiring this package