a Promise which should contain ['a','b','c']
Execute a file.
Think of this as a mix of child_process.execFile and child_process.spawn.
The program/script to execute.
Arguments to pass to file on execution.
A child_process instance, which is enhanced to also be a Promise for a result Object with stdout and stderr properties.
Same as execa() except both file and arguments are specified in a single command string. For example, execa('echo', ['unicorns']) is the same as execa.command('echo unicorns').
If the file or an argument contains spaces, they must be escaped with backslashes. This matters especially if command is not a constant but a variable, for example with __dirname or process.cwd(). Except for spaces, no escaping/quoting is needed.
The shell option must be used if the command uses shell-specific features, as opposed to being a simple file followed by its arguments.
The program/script to execute and its arguments.
A child_process instance, which is enhanced to also be a Promise for a result Object with stdout and stderr properties.
Same as execa.command() but synchronous.
The program/script to execute and its arguments.
A result Object with stdout and stderr properties.
Execute a Node.js script as a child process.
Same as execa('node', [scriptPath, ...arguments], options) except (like child_process#fork()):
Node.js script to execute.
Arguments to pass to scriptPath on execution.
A child_process instance, which is enhanced to also be a Promise for a result Object with stdout and stderr properties.
Execute a file synchronously.
This method throws an Error if the command fails.
The program/script to execute.
Arguments to pass to file on execution.
A result Object with stdout and stderr properties.
Multiplies a value by 2. (Also a full example of Typedoc's functionality.)
import { double } from 'typescript-starter'
console.log(double(4))
// => 8
var double = require('typescript-starter').double;
console.log(double(4))
// => 8
Comment describing the value parameter.
Comment describing the return type.
Returns the URL and branch to clone. We clone the branch (tag) at the current
release rather than master. This ensures we get the exact files expected by
this version of the CLI. (If we cloned master, changes merged to master, but
not yet released, may cause unexpected results.)
the current version of this CLI
Execute a file.
Think of this as a mix of child_process.execFile and child_process.spawn.
The program/script to execute.
Arguments to pass to file on execution.
A child_process instance, which is enhanced to also be a Promise for a result Object with stdout and stderr properties.
Same as execa() except both file and arguments are specified in a single command string. For example, execa('echo', ['unicorns']) is the same as execa.command('echo unicorns').
If the file or an argument contains spaces, they must be escaped with backslashes. This matters especially if command is not a constant but a variable, for example with __dirname or process.cwd(). Except for spaces, no escaping/quoting is needed.
The shell option must be used if the command uses shell-specific features, as opposed to being a simple file followed by its arguments.
The program/script to execute and its arguments.
A child_process instance, which is enhanced to also be a Promise for a result Object with stdout and stderr properties.
Same as execa.command() but synchronous.
The program/script to execute and its arguments.
A result Object with stdout and stderr properties.
Execute a Node.js script as a child process.
Same as execa('node', [scriptPath, ...arguments], options) except (like child_process#fork()):
Node.js script to execute.
Arguments to pass to scriptPath on execution.
A child_process instance, which is enhanced to also be a Promise for a result Object with stdout and stderr properties.
Execute a file synchronously.
This method throws an Error if the command fails.
The program/script to execute.
Arguments to pass to file on execution.
A result Object with stdout and stderr properties.
Execute a file.
Think of this as a mix of child_process.execFile and child_process.spawn.
The program/script to execute.
Arguments to pass to file on execution.
A child_process instance, which is enhanced to also be a Promise for a result Object with stdout and stderr properties.
Same as execa() except both file and arguments are specified in a single command string. For example, execa('echo', ['unicorns']) is the same as execa.command('echo unicorns').
If the file or an argument contains spaces, they must be escaped with backslashes. This matters especially if command is not a constant but a variable, for example with __dirname or process.cwd(). Except for spaces, no escaping/quoting is needed.
The shell option must be used if the command uses shell-specific features, as opposed to being a simple file followed by its arguments.
The program/script to execute and its arguments.
A child_process instance, which is enhanced to also be a Promise for a result Object with stdout and stderr properties.
Same as execa.command() but synchronous.
The program/script to execute and its arguments.
A result Object with stdout and stderr properties.
Execute a Node.js script as a child process.
Same as execa('node', [scriptPath, ...arguments], options) except (like child_process#fork()):
Node.js script to execute.
Arguments to pass to scriptPath on execution.
A child_process instance, which is enhanced to also be a Promise for a result Object with stdout and stderr properties.
Execute a file synchronously.
This method throws an Error if the command fails.
The program/script to execute.
Arguments to pass to file on execution.
A result Object with stdout and stderr properties.
Execute a file.
Think of this as a mix of child_process.execFile and child_process.spawn.
The program/script to execute.
Arguments to pass to file on execution.
A child_process instance, which is enhanced to also be a Promise for a result Object with stdout and stderr properties.
Same as execa() except both file and arguments are specified in a single command string. For example, execa('echo', ['unicorns']) is the same as execa.command('echo unicorns').
If the file or an argument contains spaces, they must be escaped with backslashes. This matters especially if command is not a constant but a variable, for example with __dirname or process.cwd(). Except for spaces, no escaping/quoting is needed.
The shell option must be used if the command uses shell-specific features, as opposed to being a simple file followed by its arguments.
The program/script to execute and its arguments.
A child_process instance, which is enhanced to also be a Promise for a result Object with stdout and stderr properties.
Same as execa.command() but synchronous.
The program/script to execute and its arguments.
A result Object with stdout and stderr properties.
Execute a Node.js script as a child process.
Same as execa('node', [scriptPath, ...arguments], options) except (like child_process#fork()):
Node.js script to execute.
Arguments to pass to scriptPath on execution.
A child_process instance, which is enhanced to also be a Promise for a result Object with stdout and stderr properties.
Execute a file synchronously.
This method throws an Error if the command fails.
The program/script to execute.
Arguments to pass to file on execution.
A result Object with stdout and stderr properties.
On Windows, normalize returns "\" as the path separator. This method normalizes with POSIX.
Raise the value of the first parameter to the power of the second using the es7 ** operator.
import { power } from 'typescript-starter'
console.log(power(2,3))
// => 8
var power = require('typescript-starter').power;
console.log(power(2,3))
// => 8
Calculate the sha256 digest of a string.
import { sha256 } from 'typescript-starter'
sha256('test')
// => '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08'
sha256 message digest
A faster implementation of sha256 which requires the native Node.js module. Browser consumers should use sha256, instead.
import { sha256Native as sha256 } from 'typescript-starter'
sha256('test')
// => '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08'
sha256 message digest
Generated using TypeDoc
A sample async function (to demo Typescript's es7 async/await downleveling).
Example (es imports)
import { asyncABC } from 'typescript-starter' console.log(await asyncABC()) // => ['a','b','c']Example (commonjs)
var double = require('typescript-starter').asyncABC; asyncABC().then(console.log); // => ['a','b','c']