Unbreak open source release due to import of internal module

Reviewed By: majak

Differential Revision: D2685592

fb-gh-sync-id: eb5e9baf15d08ff1ec2c29e0ca1fe94df079d79e
This commit is contained in:
David Aurelio 2015-11-23 06:35:18 -08:00 committed by facebook-github-bot-7
parent f827a513a1
commit 6b3a6e5958

View File

@ -59,8 +59,21 @@ if (__DEV__) {
};
}
/**
* Simple function for formatting strings.
*
* Replaces placeholders with values passed as extra arguments
*
* @param {string} format the base string
* @param ...args the values to insert
* @return {string} the replaced string
*/
function sprintf(format, ...args) {
var index = 0;
return format.replace(/%s/g, match => args[index++]);
}
function updateWarningMap(format, ...args): void {
const sprintf = require('sprintf');
const stringifySafe = require('stringifySafe');
format = String(format);