cartodb-4.42/lib/assets/javascripts/new-dashboard/utils/count-chars-array.js

12 lines
254 B
JavaScript
Raw Normal View History

2024-04-06 13:25:13 +08:00
const countCharsArray = function countCharsArray (array, joinString = '') {
if (!array || array.length === 0) {
return 0;
}
if (!joinString) {
joinString = '';
}
return array.join(joinString).length;
};
export default countCharsArray;