tunnckoCore/starts-with

View on GitHub
benchmark/code/last-index-of.js

Summary

Maintainability
A
40 mins
Test Coverage
'use strict'

module.exports = function startsWithLastIndexOf (a, b) {
  a = String(a)
  b = String(b)
  var i = a.lastIndexOf(b)
  return i === 0
}