While it takes you so long to repeatedly split your string into smaller chunks for lots of reasons, chunky-str-js package is here to handle any difficulty. This is the first, and the only package i will publish here. Throughout i am a professional developer, i still need to spend time on my other projects. Below is usage and tutorials. Hope it helpful!
chunky-str-util is a lightweight Node.JS module that provides a simple way to split strings. It offers various functionalities depending on your specific needs.
Syntax: chunky(str<String>, mode<String>, size<Number> | 16)
This mode split your string into chunks with any customizable size (16 for default). Chunks are basically Array.
Example:
const { chunky } = require('chunky-str-util')
const splitted = chunky('this-package-shall-be-the-best', 'normal', 16) // ['this-package-sha','ll-be-the-best']
console.log(splitted.toString())
// this-package-sha,ll-be-the-best
Discord token is splitted by dots (.
)
This mode split Discord token into smaller pieces by splittng .
Example:
const { chunky } = require('chunky-str-util')
const splitted = chunky('OhmZ.Anxie2854.-y184-1234._exeSovietUnion', 'dsctoken') // ['OhmZ','Anxie2854','-y184-1234','_exeSovietUnion']
console.log(splitted.toString())
// OhmZ,Anxie2854,-y184-1234,_exeSovietUnion
This mode split your provided a command line into components by splitting spaces
Example:
const { chunky } = require('chunky-str-util')
const splitted = chunky('node.js test.js --arg1 --ProcessRunSecure', 'args') // ['node.js', 'test.js' '--arg1', '--ProcessRunSecure']
console.log(splitted.toString())
// node.js test.js --arg1 --ProcessRunSecure
chunky-str-util
is the most complex package i ever made. Anyway, it is better if you have chosen for yourself a better method. Thanks for using - Henry133
All credits belong to Henry133. This is my workalone project. Have a good time using my package. Thanks for using!
Henry133#2436: https://discord.com/users/927563409409581066