UNPKG

el-beeswarm

Version:

<div style="display: flex; padding: 1rem; flex-direction: column; align-items: center; justify-content: center; height: 100vh; text-align: center; display: flex;

11 lines (8 loc) 191 B
'use strict'; module.exports = string => { const match = string.match(/^[ \t]*(?=\S)/gm); if (!match) { return 0; } return match.reduce((r, a) => Math.min(r, a.length), Infinity); };