Closed pfraces closed 10 years ago
CommonJS is better than RequireJS syntax because modifications are done in one place.
This can be fixed here passing just the options object:
clide({
user: 'User name',
pass: {
description: 'Password',
hidden: true
}
}, function (options) {
console.log(options.pass); // Ooops!
});
The first syntax has a bug: the object passed is not an array so its properties are not ordered.
That makes impossible to assure the correct order in the function arguments.
This can be fixed with what the previous comment propossed
73aaf61