UNPKG

1-liners

Version:

Useful oneliners and shorthand functions

16 lines (15 loc) 239 B
/** * @module 1-liners/charAt * * @description * * Same as `'STR'.charAt(0)`. * * @example * * const charAt = require('1-liners/charAt'); * * charAt(0, 'super') // => s * */ export default (index, str) => str.charAt(index);