Last active
August 29, 2015 14:27
-
-
Save JesterXL/7b7c6d5baf14fcea3f81 to your computer and use it in GitHub Desktop.
Example browserify in node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// validators.js | |
var lodash = require('lodash'); | |
var XRegExpLib = require('xregexp').XRegExp; | |
var momentLib = require('moment'); | |
var predicate = require('./predicate'); | |
var arrayValidator = require('./native/array'); | |
var validators = { | |
predicate: predicate, | |
array: arrayValidator, | |
}; | |
// This prints out correct object in Node console | |
console.log("arrayValidator:", arrayValidator); | |
module.exports = validators; | |
// main.js | |
var validators = require('../some/path/validators'); | |
console.log("validators:", validators); // {} | |
// if I loop through the properties, there are none... it's an empty object!? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I took out the
module.exports = validators
and same thing...