is-repeated
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i is-repeated

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

3.81 kB

Total Files

5

Last publish

Collaborators

  • rocktimsaikia