Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

skava / exotic   js

Repository URL to install this package:

Version: 2.0.8 

/ src / types / primitive / number / cast / fromStringToCharCodes.ts

import { charCodeAtZero } from '../../../../deps'
import { fromStringToArray } from '../../../array/cast/fromStringToArray'
import { toString } from '../../string/toString'

/**
 * @todo add enum for the number (charcode types?)
 * @param x string for charcodes
 */
function fromStringToCharCodes(x: string): number[] {
  return fromStringToArray(toString(x)).map(charCodeAtZero)
}

export { fromStringToCharCodes }
export default fromStringToCharCodes