a Promise which should contain ['a','b','c']
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
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']