Test name | Executions per second |
---|---|
_.every | 3183077.0 Ops/sec |
elements.every | 10446395.0 Ops/sec |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.core.js"></script>
var elements = ["cat", "dog", "bat"]
_.every(elements, el => el.length == 3)
elements.every(el => el.length == 3)