futoase / Sequoia

Generate linear variable.
MIT License
0 stars 0 forks source link

Create Person #1

Open futoase opened 11 years ago

futoase commented 11 years ago

i'd like this...

sequoia.person({name: "akari":, age: 13})
sequoia.person({name: "mako", age: 17, call_to_times: 5})
> {name: "mako", age: 17}
> {name: "akari", age: 13}
> {name: "akari", age: 13}
> {name: "akari", age: 13}
> {name: "mako", age: 17}
> {name: "mako", age: 17}
> {name: "akari", age: 13}
> {name: "akari", age: 13}
> {name: "mako", age: 17}
> {name: "mako", age: 17}
> {name: "akari", age: 13}
> {name: "akari", age: 13}
> {name: "akari", age: 13}
> {name: "akari", age: 13}
var hoge = sequoia.person({name: "hoge", browser: sequoia.browser()})
var uge = sequoia.person({name: "uge",  browser:sequoia.browser()})

> hoge() 
> {name: "hoge", browser: "Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20100101 Firefox/6.0"}
> uge()
> {name: "uge", browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8) AppleWebKit/536.25 (KHTML, like Gecko) Version/6.0 Safari/536.25"}
futoase commented 11 years ago

I may be should use of chance.js. (mixin)

http://chancejs.com/#mixin