@string-searching/brute-force

1.0.0 • Public • Published

💪 @string-searching/brute-force

Brute-force string searching for JavaScript. See docs.

⚠️ Depending on your environment, the code may require regeneratorRuntime to be defined, for instance by importing regenerator-runtime/runtime.

import {findAll} from '@string-searching/brute-force';

const string = 'aaabaaa';
const pattern = 'aa';

for (const i of findAll(string, 0, string.length, pattern, 0, pattern.length)) {
	// yields 0 1 4 5
}

import {startsWith} from '@string-searching/brute-force';

startsWith(pattern, 0, 2, string, 3); // false
startsWith(pattern, 0, 2, string, 4); // true

License Version Tests Dependencies Dev dependencies GitHub issues Downloads

Code issues Code maintainability Code coverage (cov) Code technical debt Documentation Package size

Package Sidebar

Install

npm i @string-searching/brute-force

Weekly Downloads

3

Version

1.0.0

License

AGPL-3.0

Unpacked Size

472 kB

Total Files

14

Last publish

Collaborators

  • raskat
  • aureooms