Package Exports
- @tszone/ext
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@tszone/ext) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ext.ts
language extensions for typescript
IterableIterator
- skip
const v = ['a', 'b', 'c'];
const v1 = v.values().skip(2).toArray();
console.log(v1.length); // 1
console.log(v1[0]); // 'c'- skipWhile
const v = ['a', 'b', 'c'];
const v1 = v.values().skipWhile((s) => s === 'b').toArray();
console.log(v1.length); // 1
console.log(v1[0]); // 'c'Array
- sequenceEqual
import '@tszone/ext';
const a = [1, 2, 4];
const b = [1, 2, 5];
console.log(a.sequenceEqual(b)) // falsePromise
- yield
import '@tszone/ext';
async function abc(): Promise<void> {
// some work.
await Promise.yield();
// do your work.
await Promise.yield(20); // wait for 20ms.
// do your other work.
}Math
- randint
const a = Math.randint(3);
console.log(a); // [0, 3);
const b = Math.randint(3, 6);
console.log(b); // [3, 6);