1.1.2 • Published 4 years ago

regex-word-boundary v1.1.2

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

regex-word-boundary

Last version Build Status Coverage Status Dependency status Dev Dependencies Status NPM Status

Helper for create a word boundary regex based in a collection

Install

$ npm install regex-word-boundary --save

Usage

const createWordBoundaryRegex = require('regex-word-boundary')

const regex = createWordBoundaryRegex([
  'hello',
  'world'
])

console.log(regex)
// => /\bhello\b|\bworld\b/i

API

createWordBoundaryRegex(collection, flags)

collection

Required Type: Array

Collection of String for create the regex.

flags

Type: String Default: i

Regex flags for create the regex.

License

MIT © Kiko Beats.

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.1

7 years ago