plexis-js / plexis

Lo-fi, powerful, community-driven string manipulation library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: `toChars/ chars`

vorillaz opened this issue · comments

Splits input text into an array of characters.

  toChars(); // => []
  toChars(''); // => []
  toChars(null); // => []
  toChars('Hello world'); // => [ "H", "e", "l", "l", "o", " ", "w", "o", "r", "l", "d" ]
  toChars(1) // => ['1']
  toChars(2e5) // =>  ["2", "0", "0", "0", "0", "0"]

Aliases

import toChars from '@plexis/to-chars';
import {toChars, chars} from 'plexis';

I'll pr later today :)