mirror of
https://github.com/status-im/react-native.git
synced 2025-01-16 04:24:15 +00:00
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:
parent
f827a513a1
commit
6b3a6e5958
@ -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 {
|
function updateWarningMap(format, ...args): void {
|
||||||
const sprintf = require('sprintf');
|
|
||||||
const stringifySafe = require('stringifySafe');
|
const stringifySafe = require('stringifySafe');
|
||||||
|
|
||||||
format = String(format);
|
format = String(format);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user