1-liners
Version:
Useful oneliners and shorthand functions
23 lines (20 loc) • 376 B
JavaScript
/**
* @module 1-liners/charCodeAt
*
* @description
*
* Same as `'STR'.charCodeAt(0)`.
*
* @example
*
* const charCodeAt = require('1-liners/charCodeAt');
*
* charCodeAt(0, 'super') // => 115
*
*/
;
exports.__esModule = true;
exports["default"] = function (index, str) {
return str.charCodeAt(index);
};
module.exports = exports["default"];