mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-26 04:19:49 +03:00
strings: zeroPad method
This commit is contained in:
parent
4daa910c44
commit
91a2635446
@ -47,6 +47,11 @@ export const getPresentationName = (user) => {
|
||||
return user.username;
|
||||
};
|
||||
|
||||
export const zeroPad = (num, places) => {
|
||||
var zero = places - num.toString().length + 1;
|
||||
return Array(+(zero > 0 && zero)).join("0") + num;
|
||||
};
|
||||
|
||||
export const getCIDGatewayURL = (cid) => {
|
||||
return `https://${cid}.${Constants.gateways.ipfs}`;
|
||||
};
|
||||
|
@ -27,5 +27,3 @@ export const LOCAL_PASSWORD_SECRET = `$2b$${LOCAL_PASSWORD_ROUNDS}$${
|
||||
export const TEXTILE_HUB_KEY = process.env.TEXTILE_HUB_KEY;
|
||||
export const TEXTILE_HUB_SECRET = process.env.TEXTILE_HUB_SECRET;
|
||||
export const TEXTILE_HUB_STAGING_HOST = process.env.TEXTILE_HUB_STAGING_HOST;
|
||||
|
||||
console.log(TEXTILE_HUB_STAGING_HOST);
|
||||
|
Loading…
Reference in New Issue
Block a user