开发者

Where can I find the complete properties / functions list of all internal object for Node.js?

开发者 https://www.devze.com 2023-02-27 01:43 出处:网络
I read their API, however, there is nothing about Date object, or h开发者_如何学编程ow to generate a simple random number (e.g. Math.random() ).Those internal objects are different from the client sid

I read their API, however, there is nothing about Date object, or h开发者_如何学编程ow to generate a simple random number (e.g. Math.random() ). Those internal objects are different from the client side javascript ones. so where can I find out ? Thank.s


Those internal objects are the same as the objects that run in google chrome. They're provided by the v8 engine.


The documentation for the current release of NodeJS (v0.4.6) can be found here: http://nodejs.org/docs/v0.4.6/api/all.html

On the whole, many of the internal objects within NodeJS should be same as your expect to see on the client-side.

Loading up the REPL from my terminal, I see the following:

> Math.random
[Function: random]
> Math.random();
0.8805044267792255
> Math.random();
0.3855400965549052
> new Date();
Mon, 18 Apr 2011 21:58:19 GMT
> new Date();
Mon, 18 Apr 2011 21:58:20 GMT
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号