File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
# TCStringParse
2
2
3
- Simple parser for transparency and consent strings compatible with TCF2 .0.
3
+ Simple JavaScript parser for transparency and consent strings compatible with TCF 2 .0.
4
4
5
5
## Installation
6
6
7
+ Parser is available as [ NPM package] ( https://www.npmjs.com/package/tc-string-parse ) :
8
+
7
9
` npm install tc-string-parse `
8
10
9
11
## Usage
@@ -14,16 +16,16 @@ Simple parser for transparency and consent strings compatible with TCF2.0.
14
16
const TCStringParse = require (' tc-string-parse' );
15
17
16
18
const consentString = ' ' ; // your consent string
17
- TCStringParse (consentString);
19
+ const consentModel = TCStringParse (consentString);
18
20
```
19
21
20
- ### Browser (IE 9+ with atob polyfill)
22
+ ### Browser (IE 9+ with [ atob polyfill] ( https://caniuse.com/#feat=atob-btoa ) )
21
23
22
24
``` html
23
25
<script src =" path/to/tc-string-parse.min.js" ></script >
24
26
25
27
<script >
26
- const consentString = ' ' ; // your consent string
27
- TCStringParse (consentString);
28
+ var consentString = ' ' ; // your consent string
29
+ var consentModel = TCStringParse (consentString);
28
30
</script >
29
31
```
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " tc-string-parse" ,
3
- "description" : " Simple parser for transparency and consent strings compatible with TCF2 .0." ,
3
+ "description" : " Simple JavaScript parser for transparency and consent strings compatible with TCF 2 .0." ,
4
4
"version" : " 1.1.1" ,
5
5
"repository" : {
6
6
"type" : " git" ,
You can’t perform that action at this time.
0 commit comments