2.0.0 • Published 12 months ago

@oss-playground/split v2.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

Splits

without this package:

const str = "opensource.is.awesome"

const arr = str.split('.') // 👉 typeof `arr` is `string[]` 🤔

after you install it:

import { split } from '@oss-playground/split'
const str = "opensource.is.awesome"

const arr = split<typeof str, '.'>(str, '.') // 👉 typeof `arr` is `["opensource", "is", "awesome"]`  🥳🎉
2.0.0

12 months ago