@rh-support/utils 2.4.2 → 2.4.3-beta.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../src/dateUtils.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,eAAO,MAAM,UAAU,wCAGX,IAAI,CAAC,qBAAqB,WASrC,CAAC;AAEF,eAAO,MAAM,cAAc,wCAGf,IAAI,CAAC,qBAAqB,WAerC,CAAC;AAEF,eAAO,MAAM,OAAO,SAAU,MAAM,KAAG,MAAmC,CAAC;AAE3E,eAAO,MAAM,2BAA2B,WAAY,MAAM,WAEzD,CAAC;AAEF,eAAO,MAAM,qBAAqB,aAAc,MAAM,KAAG,MAExD,CAAC;AAEF,eAAO,MAAM,+BAA+B,SAClC,MAAM,gBACC,MAAM,CAAC,UAAU,CAAC,OAAO,KACvC,OAEF,CAAC;AAEF,eAAO,MAAM,YAAY,SAAU,MAAM,gBAAe,MAAM,CAAC,UAAU,CAAC,OAAO,YAEhF,CAAC;AAEF,KAAK,SAAS,GAAG;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,aAAa,WAAY,SAAS,kBAG9C,CAAC;AAEF,eAAO,MAAM,WAAW,eAAgB,MAAM,YAI7C,CAAC;
|
|
1
|
+
{"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../src/dateUtils.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,eAAO,MAAM,UAAU,wCAGX,IAAI,CAAC,qBAAqB,WASrC,CAAC;AAEF,eAAO,MAAM,cAAc,wCAGf,IAAI,CAAC,qBAAqB,WAerC,CAAC;AAEF,eAAO,MAAM,OAAO,SAAU,MAAM,KAAG,MAAmC,CAAC;AAE3E,eAAO,MAAM,2BAA2B,WAAY,MAAM,WAEzD,CAAC;AAEF,eAAO,MAAM,qBAAqB,aAAc,MAAM,KAAG,MAExD,CAAC;AAEF,eAAO,MAAM,+BAA+B,SAClC,MAAM,gBACC,MAAM,CAAC,UAAU,CAAC,OAAO,KACvC,OAEF,CAAC;AAEF,eAAO,MAAM,YAAY,SAAU,MAAM,gBAAe,MAAM,CAAC,UAAU,CAAC,OAAO,YAEhF,CAAC;AAEF,KAAK,SAAS,GAAG;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,aAAa,WAAY,SAAS,kBAG9C,CAAC;AAEF,eAAO,MAAM,WAAW,eAAgB,MAAM,YAI7C,CAAC;AASF,eAAO,MAAM,YAAY,wBAAyB,MAAM,cAAc,MAAM,cAe3E,CAAC"}
|
package/lib/esm/dateUtils.js
CHANGED
|
@@ -49,7 +49,8 @@ export const isValidDate = (dateString) => {
|
|
|
49
49
|
// for example, if testVariationWeight is 2 and the current time in seconds modulo 10 is less than 2,
|
|
50
50
|
// redirect to test version (20% of the time), else redirect to control version (80% of the time)
|
|
51
51
|
// @wieght: a number between 0 and 10
|
|
52
|
-
// @dateString: date string
|
|
52
|
+
// @dateString: date string - to get consistent variant for a user during experiece, pass a fix date
|
|
53
|
+
// for example in case craetion, we can pass sessionItem.session.createdDate as dateString
|
|
53
54
|
export const trafficSplit = (testVariationWeight, dateString) => {
|
|
54
55
|
if (testVariationWeight === 10)
|
|
55
56
|
return 'A'; // test
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/utils",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.3-beta.1",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "Vikas Rathee <vrathee@redhat.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"prepublishOnly": "npm run build"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@cee-eng/hydrajs": "4.17.
|
|
44
|
+
"@cee-eng/hydrajs": "4.17.34",
|
|
45
45
|
"localforage": "^1.10.0",
|
|
46
46
|
"lodash": "^4.17.21",
|
|
47
47
|
"qs": "^6.7.0",
|
|
48
48
|
"solr-query-builder": "1.0.1"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@cee-eng/hydrajs": "4.17.
|
|
51
|
+
"@cee-eng/hydrajs": "4.17.34",
|
|
52
52
|
"@rh-support/types": "2.0.4",
|
|
53
53
|
"date-fns": "3.6.0",
|
|
54
54
|
"dompurify": "^2.2.6",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"defaults and supports es6-module",
|
|
76
76
|
"maintained node versions"
|
|
77
77
|
],
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "b4ff244fac3c90b5b89db59aa7a41f3b06a4bf5b"
|
|
79
79
|
}
|