Skip to content

Commit

Permalink
Unbreak open source release due to import of internal module
Browse files Browse the repository at this point in the history
Reviewed By: majak

Differential Revision: D2685592

fb-gh-sync-id: eb5e9baf15d08ff1ec2c29e0ca1fe94df079d79e
  • Loading branch information
davidaurelio authored and facebook-github-bot-7 committed Nov 23, 2015
1 parent f827a51 commit 6b3a6e5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Libraries/ReactIOS/YellowBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6b3a6e5

Please sign in to comment.