7.0.25 • Published 6 months ago

codsen-tokenizer v7.0.25

Weekly downloads
92
License
MIT
Repository
github
Last release
6 months ago

Install

This package is pure ESM. If you're not ready yet, install an older version of this program, 5.6.0 (npm i codsen-tokenizer@5.6.0).

npm i codsen-tokenizer

Quick Take

import { strict as assert } from "assert";

import { tokenizer } from "codsen-tokenizer";

const gathered = [];

// it operates from a callback, like Array.prototype.forEach()
tokenizer("<td nowrap>", {
  tagCb: (obj) => {
    gathered.push(obj);
  },
});

assert.deepEqual(gathered, [
  {
    type: "tag",
    start: 0,
    end: 11,
    value: "<td nowrap>",
    tagNameStartsAt: 1,
    tagNameEndsAt: 3,
    tagName: "td",
    recognised: true,
    closing: false,
    void: false,
    pureHTML: true,
    kind: null,
    attribs: [
      {
        attribName: "nowrap",
        attribNameRecognised: true,
        attribNameStartsAt: 4,
        attribNameEndsAt: 10,
        attribOpeningQuoteAt: null,
        attribClosingQuoteAt: null,
        attribValueRaw: null,
        attribValue: [],
        attribValueStartsAt: null,
        attribValueEndsAt: null,
        attribStarts: 4,
        attribEnds: 10,
        attribLeft: 2,
      },
    ],
  },
]);

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.

7.0.25

6 months ago

7.0.24

8 months ago

7.0.23

10 months ago

7.0.22

11 months ago

7.0.21

11 months ago

7.0.18

1 year ago

7.0.19

1 year ago

7.0.16

1 year ago

7.0.17

1 year ago

7.0.20

1 year ago

7.0.13

2 years ago

7.0.14

2 years ago

7.0.15

1 year ago

7.0.12

2 years ago

7.0.10

2 years ago

7.0.11

2 years ago

7.0.9

2 years ago

7.0.8

2 years ago

7.0.7

2 years ago

7.0.6

2 years ago

7.0.5

2 years ago

7.0.4

2 years ago

7.0.3

2 years ago

7.0.2

2 years ago

7.0.1

2 years ago

7.0.0

2 years ago

6.1.17

2 years ago

6.1.16

2 years ago

6.1.15

2 years ago

6.1.14

2 years ago

6.1.18

2 years ago

6.1.13

2 years ago

6.1.12

2 years ago

6.1.11

2 years ago

6.1.10

2 years ago

6.1.8

2 years ago

6.1.7

2 years ago

6.1.9

2 years ago

6.1.4

2 years ago

6.1.6

2 years ago

6.1.5

2 years ago

6.1.0

2 years ago

6.1.2

2 years ago

6.1.1

2 years ago

6.1.3

2 years ago

6.0.23

2 years ago

6.0.22

2 years ago

6.0.21

2 years ago

6.0.20

3 years ago

6.0.16

3 years ago

6.0.19

3 years ago

6.0.18

3 years ago

6.0.17

3 years ago

6.0.15

3 years ago

6.0.14

3 years ago

6.0.13

3 years ago

6.0.7

3 years ago

6.0.12

3 years ago

6.0.11

3 years ago

6.0.10

3 years ago

6.0.6

3 years ago

6.0.3

3 years ago

6.0.5

3 years ago

6.0.4

3 years ago

6.0.2

3 years ago

6.0.1

3 years ago

6.0.0

3 years ago

5.6.0

4 years ago

5.5.7

4 years ago

5.5.6

4 years ago

5.5.5

4 years ago

5.5.4

4 years ago

5.5.3

4 years ago

5.5.2

4 years ago

5.5.1

4 years ago

5.5.0

4 years ago

5.4.0

4 years ago

5.3.0

4 years ago

5.2.0

4 years ago

5.1.2

4 years ago

5.1.1

4 years ago

5.1.0

4 years ago

5.0.2

4 years ago

5.0.1

4 years ago

5.0.0

4 years ago

4.5.1

4 years ago

4.5.0

4 years ago

4.4.0

4 years ago

4.3.0

4 years ago

4.2.0

4 years ago

4.1.0

4 years ago

4.0.0

4 years ago

3.2.1

4 years ago

3.2.0

4 years ago

3.1.0

4 years ago

3.0.0

4 years ago

2.17.7

4 years ago

2.17.6

4 years ago

2.17.5

4 years ago

2.17.4

4 years ago

2.17.3

4 years ago

2.17.2

4 years ago

2.17.1

4 years ago

2.17.0

5 years ago

2.16.0

5 years ago

2.15.0

5 years ago

2.14.3

5 years ago

2.14.2

5 years ago

2.14.1

5 years ago

2.14.0

5 years ago

2.13.0

5 years ago

2.12.1

5 years ago

2.12.0

5 years ago

2.11.0

5 years ago

2.10.0

5 years ago

2.9.0

5 years ago

2.8.0

5 years ago

2.7.0

5 years ago

2.6.0

5 years ago

2.5.4

5 years ago

2.5.2

5 years ago

2.5.3

5 years ago

2.5.1

5 years ago

2.5.0

5 years ago

2.4.0

5 years ago

2.3.1

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago