Skip to content

Commit 3128bf7

Browse files
committed
Update README
- Remove deprecated badges - Add CJS Compatibility which also links to ESM version - Set project URL to common-js branch
1 parent c7c32e5 commit 3128bf7

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
![Node.js CI](https://github.com/Borewit/token-types/workflows/Node.js%20CI/badge.svg)
1+
[![Node.js CI](https://github.com/Borewit/token-types/actions/workflows/nodejs-ci.yml/badge.svg)](https://github.com/Borewit/token-types/actions/workflows/nodejs-ci.yml)
22
[![NPM version](https://badge.fury.io/js/token-types.svg)](https://npmjs.org/package/token-types)
33
[![npm downloads](http://img.shields.io/npm/dm/token-types.svg)](https://npmcharts.com/compare/token-types,strtok3?start=1200&interval=30)
44
[![coveralls](https://coveralls.io/repos/github/Borewit/token-types/badge.svg?branch=master)](https://coveralls.io/github/Borewit/token-types?branch=master)
55
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/4723ce4613fc49cda8db5eed29f18834)](https://www.codacy.com/app/Borewit/token-types?utm_source=github.com&utm_medium=referral&utm_content=Borewit/token-types&utm_campaign=Badge_Grade)
6-
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/Borewit/token-types.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Borewit/token-types/context:javascript)
7-
[![Total alerts](https://img.shields.io/lgtm/alerts/g/Borewit/token-types.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Borewit/token-types/alerts/)
86
[![DeepScan grade](https://deepscan.io/api/teams/5165/projects/6940/branches/61852/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=5165&pid=6940&bid=61852)
97
[![Known Vulnerabilities](https://snyk.io/test/github/Borewit/token-types/badge.svg?targetFile=package.json)](https://snyk.io/test/github/Borewit/token-types?targetFile=package.json)
108

11-
# token-types
9+
# token-types CommonJS version
1210

1311
A primitive token library used to read and write from a node `Buffer`.
1412
Although it is possible to use this module directly, it is primary designed to be used with [strtok3 tokenizer](https://github.com/Borewit/strtok3).
1513

14+
## Compatibility
15+
16+
This is the deprecated [CommonJS](https://en.wikipedia.org/wiki/CommonJS) module version of token-types.
17+
Strongly recommended to use the [ESM version, version ≥ 5](https://github.com/Borewit/token-types) instead.
18+
1619
## Installation
1720

1821
```sh
@@ -36,7 +39,7 @@ npm install --save-dev @tokenizer/token
3639
```js
3740
const strtok3 = require('strtok3');
3841
const token = require('token-types');
39-
42+
4043
(async () => {
4144

4245
const tokenizer = await strtok3.fromFile("somefile.bin");
@@ -45,7 +48,7 @@ const token = require('token-types');
4548
console.log(`My number: ${myNumber}`);
4649
} finally {
4750
tokenizer.close(); // Close the file
48-
}
51+
}
4952
})();
5053
```
5154

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"repository": {
2929
"type": "git",
30-
"url": "https://github.com/Borewit/token-types"
30+
"url": "https://github.com/Borewit/token-types/tree/commonjs"
3131
},
3232
"files": [
3333
"lib/index.js",

0 commit comments

Comments
 (0)