README
dpape-node-utils
nodejs common tool library
Install
npm i dpape-node-utils -S
Quick Start
// Delete the directory and all subfiles
const { removeDir } = require('dpape-node-utils')
const path = require('path');
removeDir(path.join(__dirname,'./test'),()=>{
console.log('Successful');
})
Config Api
Name | Describe | Returned |
---|---|---|
md5 | MD5 Encrypt the string | string |
removeDir | Delete the directory and all subfiles | void |
zipFolder | Folder compression | Promise<void> |
getAvailablePort | Get the currently available port (non-occupied) | Promise<number> |
encryption | AES_128_CBC encryption | string |
decryption | AES_128_CBC decryption | string |
openBrowserURL | Open the url to browser | string |
dataDeepCopy | Object data deep replication | {} |
getIpAddress | Get current device IP address | string |
beautifyConsole | Beautify console type output | void |