b407613083b1dd5b82d1b619d81803aec13b18554f414eac8777bdf935c0d9ea37874ccb323a02be71e1d662f7f414b8b4c42e49be0377d16bf67465906b02 315 B

123456789101112131415
  1. 'use strict';
  2. module.exports = function (x) {
  3. var lf = typeof x === 'string' ? '\n' : '\n'.charCodeAt();
  4. var cr = typeof x === 'string' ? '\r' : '\r'.charCodeAt();
  5. if (x[x.length - 1] === lf) {
  6. x = x.slice(0, x.length - 1);
  7. }
  8. if (x[x.length - 1] === cr) {
  9. x = x.slice(0, x.length - 1);
  10. }
  11. return x;
  12. };