UNPKG

lenye_base

Version:

基础方法

13 lines (10 loc) 258 B
'use strict'; /** * Whether a string contains another string */ function containsWith(target, item) { // example 1: lenye_base.contains('Kevin', 'K') // returns 1: true return String(target).indexOf(item) !== -1; } module.exports = containsWith;