chance.date() error #32

Closed
sidwood opened this Issue Oct 29, 2013 · 2 comments

Projects

None yet

2 participants

@sidwood
sidwood commented Oct 29, 2013

I seem to be getting an error when using chance.date() under node.

var Chance = require('chance');
var chance = new Chance();
console.log(chance.date());
/Users/sidwood/code/nwo/node_modules/chance/chance.js:792
        var year = parseInt(chance.year(), 10),
                            ^
ReferenceError: chance is not defined
    at Chance.date (/Users/sidwood/code/nwo/node_modules/chance/chance.js:792:29)
    at Object.<anonymous> (/Users/sidwood/code/nwo/error.js:45:20)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3
@victorquinn victorquinn was assigned Oct 29, 2013
@victorquinn
Member

Fixed! Sorry about that!

Just pushed and published the latest to NPM, it's v0.5.1. Let me know if that doesn't fix it for you.

https://npmjs.org/package/chance

@sidwood
sidwood commented Oct 29, 2013

Works perfectly now. Thanks for such a great library!

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