mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-27 02:14:36 -05:00
21 lines
311 B
JavaScript
21 lines
311 B
JavaScript
const hide = (token) => {
|
|
if (!token) {
|
|
return
|
|
}
|
|
|
|
if (typeof token !== 'string') {
|
|
// maybe somehow we passes key=true?
|
|
// https://github.com/cypress-io/cypress/issues/14571
|
|
return
|
|
}
|
|
|
|
return [
|
|
token.slice(0, 5),
|
|
token.slice(-5),
|
|
].join('...')
|
|
}
|
|
|
|
module.exports = {
|
|
hide,
|
|
}
|