1.0.8 • Published 6 years ago

@ctsy/powershell v1.0.8

Weekly downloads
9
License
MIT
Repository
github
Last release
6 years ago

powershell

use powershell in nodejs

example

import PowerShell from './index';
(async () => {
    let p = new PowerShell()
    try {
        console.log(await p.cmd(`echo 1`))
        console.log(await p.cmd(`echo 2`))
        console.log(await p.cmd(`echo $True`))
        console.log(await p.cmd(`echo $False`))
    } catch (error) {

    }
    p.process.kill()
    process.exit();
})()
function timeout(n: number) {
    return new Promise((s) => setTimeout(s, n))
}

the result

1                   test.ts:5
2                   test.ts:6
True                test.ts:7
False               test.ts:8
1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago