WIP: Porting Kotlin stdlib api to typescript
Porting the Kotlin standard library design rationale to typescript. Boost the productivity by using the wise API design.
(WIP: This project is under active development. You are welcome to contribute.)
Pick the not-yet-implemented API(below list) and try to create a GitHub issues with the feature template. There is a full check-list for you to contribute this project :). Here is the example.
This module designed to be used in Typescript environment for utilizing strict type-checking and IDE auto-complete experience that similar to Kotlin Development.
If your want to use it in javascript project, I highly recommend you to use a relatively new VSCode feature @ts-check Or Intellij-based IDE to enable type checking.
npm install kt.ts
# OR
yarn add kt.ts
// index.ts
import 'kt.ts'
// `flatMap` require { "lib": ["es2019"] } in tsconfig.json
const result = [1,2,[3,3]].flatMap(it => it).distinct()
console.log(result)
// index.js
require('kt.ts')
// node >= 11.0 support `flatMap`
const result = [1,2,[3,3]].flatMap(it => it).distinct()
console.log(result)