'use strict'; module.exports = function rtrim(str, charlist) { // discuss at: http://locutus.io/php/rtrim/ // original by: Kevin van Zonneveld (http://kvz.io) // input by: Erkekjetter // input by: rem // improved by: Kevin van Zonneveld (http://kvz.io) // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman) // bugfixed by: Brett Zamir (http://brett-zamir.me) // example 1: rtrim(' Kevin van Zonneveld ') // returns 1: ' Kevin van Zonneveld' charlist = !charlist ? ' \\s\xA0' : (charlist + '').replace(/([[\]().?/*{}+$^:])/g, '\\$1'); var re = new RegExp('[' + charlist + ']+$', 'g'); return (str + '').replace(re, ''); }; //# sourceMappingURL=rtrim.js.map