UNPKG

easyresources

Version:

A library providing methods to easily generate json resource files from xlsx resource file

25 lines (19 loc) 569 B
var utils = function() { return { getStringValue: getStringValue, getLocaleName: getLocaleName }; function getStringValue(str) { var value = String(str).trim(); return (str == null || !value.length) ? null : value; } function getLocaleName(locale) { var localeName = locale; var index = localeName.indexOf("#"); if (index > 1) { localeName = localeName.substr(0, index); } return localeName.trim().toLowerCase(); } }; module.exports = utils();