How to use the ilib/lib/IString function in ilib

To help you get started, we’ve selected a few ilib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github enactjs / enact / packages / i18n / src / resBundle.js View on Github external
function getIStringFromBundle (str, rb) {
	const isObject = typeof str === 'object';
	if (rb) {
		return isObject ? rb.getString(str.value, str.key) : rb.getString(str);
	}

	return new IString(isObject ? str.value : str);
}