Urara-Blog/node_modules/.pnpm-store/v3/files/61/e5ca91425cbcd4fdf76862c7ad5772667a8611f9b523cb2a542a34f60593841cb8a991ac1302f2d9e11df21c53c02a8f06223fa0ae99641deedb82f79e1723
2022-08-14 01:14:53 +08:00

16 lines
368 B
Text

'use strict';
module.exports = input => {
const LF = typeof input === 'string' ? '\n' : '\n'.charCodeAt();
const CR = typeof input === 'string' ? '\r' : '\r'.charCodeAt();
if (input[input.length - 1] === LF) {
input = input.slice(0, input.length - 1);
}
if (input[input.length - 1] === CR) {
input = input.slice(0, input.length - 1);
}
return input;
};