@newlogic-digital/cookieconsent-js 0.2.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +2 -2
  2. package/package.json +7 -5
package/index.js CHANGED
@@ -19,7 +19,7 @@ export const initCookieConsent = (element = document, type = localStorage.getIte
19
19
  }
20
20
 
21
21
  export const unsetCookieConsent = () => {
22
- document.cookie.split(';').forEach(c => {
22
+ document.cookie.split(';').forEach((c) => {
23
23
  document.cookie = c.replace(/^ +/, '').replace(/=.*/, '=;expires=' + new Date().toUTCString() + ';path=/')
24
24
  })
25
25
  }
@@ -33,7 +33,7 @@ export const setCookieConsent = (type, options) => {
33
33
  ...options
34
34
  }
35
35
 
36
- return new Promise(resolve => {
36
+ return new Promise((resolve) => {
37
37
  options.setItem(options.name, JSON.stringify(type))
38
38
  options.setItem(`${options.name}-expire`, (Date.now() + options.expire).toString())
39
39
 
package/package.json CHANGED
@@ -1,19 +1,21 @@
1
1
  {
2
2
  "name": "@newlogic-digital/cookieconsent-js",
3
- "version": "0.2.2",
3
+ "version": "1.0.0",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "author": "New Logic Studio s.r.o.",
7
7
  "license": "MIT",
8
8
  "scripts": {
9
9
  "eslint": "eslint '**/*.js'",
10
- "eslint-fix": "eslint '**/*.js' --fix"
10
+ "eslint-fix": "eslint '**/*.js' --fix",
11
+ "publish-next": "npm publish --tag next"
11
12
  },
12
13
  "dependencies": {
13
- "@newlogic-digital/utils-js": "^0.1.0"
14
+ "@newlogic-digital/utils-js": "^1"
14
15
  },
15
16
  "devDependencies": {
16
- "eslint-config-standard": "^17.1.0"
17
+ "eslint": "^9.13.0",
18
+ "neostandard": "^0.11.6"
17
19
  },
18
20
  "files": [
19
21
  "index.js"
@@ -22,7 +24,7 @@
22
24
  ".": "./index.js"
23
25
  },
24
26
  "engines": {
25
- "node": "^18.0.0 || >=20.0.0"
27
+ "node": ">=20.0.0"
26
28
  },
27
29
  "repository": {
28
30
  "type": "git",