<script>
import { formula } from 'svelte-formula';
import {passwordScore} from '../libs/password'
const { form, enrichment } = formula({
enrich: {
password: {
passwordStrength: (value) => passwordScore(value)
}
}
})
</script>
<label for='password'>Password</label>
<input type='password' id='password' name='password' />
<meter value={$enrichment?.password?.passwordStrength || 0} min='0' max='100' low='33' high='66' optimum='80' />