6.0.19 • Published 9 months ago

string-find-heads-tails v6.0.19

Weekly downloads
1,786
License
MIT
Repository
github
Last release
9 months ago

Install

This package is pure ESM. If you're not ready yet, install an older version of this program, 4.1.0 (npm i string-find-heads-tails@4.1.0).

npm i string-find-heads-tails

Quick Take

import { strict as assert } from "assert";

import { strFindHeadsTails } from "string-find-heads-tails";

// processing an arbitrary, custom templating markup:
assert.deepEqual(
  strFindHeadsTails(
    "some text %%_var1-%% more text %%_var2_%%",
    ["%%_", "%%-"], // two flavours of heads
    ["-%%", "_%%"], // two flavours of tails
  ),
  [
    {
      headsStartAt: 10,
      headsEndAt: 13,
      tailsStartAt: 17,
      tailsEndAt: 20,
    },
    {
      headsStartAt: 31,
      headsEndAt: 34,
      tailsStartAt: 38,
      tailsEndAt: 41,
    },
  ],
);

Documentation

Please visit codsen.com for a full description of the API.

Contributing

To report bugs or request features or assistance, raise an issue on GitHub.

Licence

MIT License.

Copyright © 2010-2024 Roy Revelt and other contributors.

6.0.19

9 months ago

6.0.18

11 months ago

6.0.17

12 months ago

6.0.16

1 year ago

6.0.15

1 year ago

6.0.14

1 year ago

6.0.13

2 years ago

6.0.12

2 years ago

6.0.11

2 years ago

6.0.10

2 years ago

6.0.7

2 years ago

6.0.9

2 years ago

6.0.8

2 years ago

5.1.7

2 years ago

5.1.6

2 years ago

5.1.5

2 years ago

5.1.4

2 years ago

5.1.3

2 years ago

6.0.6

2 years ago

6.0.1

2 years ago

6.0.0

2 years ago

6.0.3

2 years ago

6.0.2

2 years ago

6.0.5

2 years ago

6.0.4

2 years ago

5.1.2

2 years ago

5.0.18

2 years ago

5.1.1

2 years ago

5.1.0

2 years ago

5.0.17

3 years ago

5.0.13

3 years ago

5.0.14

3 years ago

5.0.15

3 years ago

5.0.16

3 years ago

5.0.10

3 years ago

5.0.11

3 years ago

5.0.12

3 years ago

5.0.7

3 years ago

5.0.6

3 years ago

5.0.5

3 years ago

5.0.4

3 years ago

5.0.3

3 years ago

5.0.2

3 years ago

5.0.1

3 years ago

5.0.0

3 years ago

4.1.0

4 years ago

4.0.16

4 years ago

4.0.15

4 years ago

4.0.14

4 years ago

4.0.13

4 years ago

4.0.12

4 years ago

4.0.11

4 years ago

4.0.10

4 years ago

4.0.9

4 years ago

4.0.8

4 years ago

4.0.7

4 years ago

4.0.6

4 years ago

4.0.5

4 years ago

4.0.4

4 years ago

4.0.3

4 years ago

4.0.2

4 years ago

4.0.1

4 years ago

4.0.0

4 years ago

3.17.0

4 years ago

3.16.17

4 years ago

3.16.16

4 years ago

3.16.15

4 years ago

3.16.14

4 years ago

3.16.13

4 years ago

3.16.12

4 years ago

3.16.11

4 years ago

3.16.10

5 years ago

3.16.9

5 years ago

3.16.8

5 years ago

3.16.7

5 years ago

3.16.6

5 years ago

3.16.5

5 years ago

3.16.4

5 years ago

3.16.3

5 years ago

3.16.2

5 years ago

3.16.1

5 years ago

3.16.0

5 years ago

3.15.9

5 years ago

3.15.8

5 years ago

3.15.7

5 years ago

3.15.6

5 years ago

3.15.5

5 years ago

3.15.4

5 years ago

3.15.3

5 years ago

3.15.2

5 years ago

3.15.1

5 years ago

3.15.0

5 years ago

3.14.44

5 years ago

3.14.43

5 years ago

3.14.42

5 years ago

3.14.41

5 years ago

3.14.40

5 years ago

3.14.39

5 years ago

3.14.38

5 years ago

3.14.37

5 years ago

3.14.36

5 years ago

3.14.35

5 years ago

3.14.33

5 years ago

3.14.32

5 years ago

3.14.30

5 years ago

3.14.29

5 years ago

3.14.28

5 years ago

3.14.27

6 years ago

3.14.26

6 years ago

3.14.25

6 years ago

3.14.24

6 years ago

3.14.23

6 years ago

3.14.22

6 years ago

3.14.21

6 years ago

3.14.20

6 years ago

3.14.19

6 years ago

3.14.18

6 years ago

3.14.17

6 years ago

3.14.16

6 years ago

3.14.15

6 years ago

3.14.14

6 years ago

3.14.13

6 years ago

3.14.12

6 years ago

3.14.9

6 years ago

3.14.8

6 years ago

3.14.7

6 years ago

3.14.6

6 years ago

3.14.5

6 years ago

3.14.4

6 years ago

3.14.3

6 years ago

3.14.2

6 years ago

3.14.0

6 years ago

3.13.3

6 years ago

3.13.2

6 years ago

3.13.1

6 years ago

3.13.0

6 years ago

3.10.7

6 years ago

3.10.6

6 years ago

3.10.5

6 years ago

3.10.4

6 years ago

3.10.3

6 years ago

3.10.2

6 years ago

3.10.1

6 years ago

3.10.0

6 years ago

3.9.0

6 years ago

3.8.3

7 years ago

3.8.2

7 years ago

3.8.1

7 years ago

3.8.0

7 years ago

3.7.0

7 years ago

3.6.0

7 years ago

3.5.7

7 years ago

3.5.6

7 years ago

3.5.5

7 years ago

3.5.4

7 years ago

3.5.3

7 years ago

3.5.2

7 years ago

3.5.1

7 years ago

3.5.0

7 years ago

3.4.2

7 years ago

3.4.1

7 years ago

3.4.0

7 years ago

3.3.0

7 years ago

3.2.0

7 years ago

3.1.0

7 years ago

3.0.0

7 years ago

2.0.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago