node module
writeFile module
the node module is new in neo-jquery for special using this avalible in node and electron
// node and electron
const { $writeFile } = require('neo-jquery/node')
// node with esm
import { $writeFile } from 'neo-jquery/node'
// example
const obj = { x: 22, y: 'ss' }
$writeFile('txt/7.txt', JSON.stringify(obj))
$writeFile('txt/0.txt', 'hello world')
danger
not using this values:
- 0
- ''/""/``
- null
- undefined
- false
- and boolean value true
caution
this function using writeFile function in fs/promises module.
recommend if using type not string first convert to string .toString() of json stringify
types
desc | type |
---|---|
filename | string |
data | any | any[] |
return | Promise<void> |
osInfo module
this module inspired the module systeminformation & hardware information tool of stack-analyze
// node and electron
const { $osInfo } = require('neo-jquery/node')
// node with esm
import { $osInfo } from 'neo-jquery/node'
// example
console.table($osInfo)
types
type |
---|
Readonly<Props> |
interface Props
Property | type |
---|---|
[s: string] | any |