1.0.0 • Published 4 years ago

is-repeated v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

is-repeated build license

Check if a string has consecutive characters

Install

$ npm install is-repeated

Usage

const isRepeated = require('is-repeated')

isRepeated('foo-bar---baz','-')
//=> true

isRepeated('-bar-', '-'));
//=> false

isRepeated('foo@#@#baz', '@#');
//=> true

isRepeated('baAr', 'a', {ignoreCase: true});
//=> true

API

isRepeated(input, target, options?)

input

Required Type: string

target

Required
Type: string

subtring to run the test against.

options

ignoreCase

Type: boolean Default: false

Related

Support