node中的js-核心模块
生活随笔
收集整理的這篇文章主要介紹了
node中的js-核心模块
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
// 用來獲取機器信息的 ==== 操作系統信息模塊 var os = require('os')
// 用來操作路徑的 ==== 路徑處理模塊 var path = require('path')
// 獲取當前機器的 CPU 信息 console.log(os.cpus())
// memory 內存 console.log(os.totalmem())
// 獲取一個路徑中的擴展名部分 // extname extension name console.log(path.extname('c:/a/b/c/d/hello.txt'))
// 用來操作路徑的 ==== 路徑處理模塊 var path = require('path')
// 獲取當前機器的 CPU 信息 console.log(os.cpus())
// memory 內存 console.log(os.totalmem())
// 獲取一個路徑中的擴展名部分 // extname extension name console.log(path.extname('c:/a/b/c/d/hello.txt'))
轉載于:https://www.cnblogs.com/lujieting/p/10296044.html
總結
以上是生活随笔為你收集整理的node中的js-核心模块的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: MapServer Tutorial——
- 下一篇: 解决SVN:E210007无法协商认证机