• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

adobe / reactor-turbine / 26779245642

01 Jun 2026 08:12PM UTC coverage: 95.857% (-0.06%) from 95.912%
26779245642

Pull #201

github

web-flow
Merge f7dc16374 into 4a42733a4
Pull Request #201: Platir 64071 update vulnerability chain

342 of 379 branches covered (90.24%)

Branch coverage included in aggregate %.

5 of 6 new or added lines in 1 file covered. (83.33%)

838 of 852 relevant lines covered (98.36%)

111.84 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.0
/coreModulePackages/cookie/index.js
1
/***************************************************************************************
2
 * (c) 2017 Adobe. All rights reserved.
3
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
 * you may not use this file except in compliance with the License. You may obtain a copy
5
 * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
 *
7
 * Unless required by applicable law or agreed to in writing, software distributed under
8
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
 * OF ANY KIND, either express or implied. See the License for the specific language
10
 * governing permissions and limitations under the License.
11
 ****************************************************************************************/
12
'use strict';
13

14
var cookie = require('js-cookie');
6✔
15

16
// js-cookie has other methods that we haven't exposed here. By limiting the exposed API,
17
// we have a little more flexibility to change the underlying implementation later. If clear
18
// use cases come up for needing the other methods js-cookie exposes, we can re-evaluate whether
19
// we want to expose them here.
20

21
// js-cookie 3.x removed auto-stringification of objects/arrays from set(). This logic is
22
// preserved from the 2.x source to maintain backward compatibility for extensions that pass
23
// objects or arrays to cookie.set() without manually stringifying.
24
// https://github.com/js-cookie/js-cookie/blob/v2.2.1/src/js.cookie.js
25
function set(name, value, attributes) {
26
  try {
24✔
27
    var result = JSON.stringify(value);
24✔
28
    if (/^[{[]/.test(result)) {
24✔
29
      value = result;
12✔
30
    }
31
  } catch (e) {
NEW
32
    console.error('error when testing string for setting cookie', e);
×
33
  }
34
  return cookie.set(name, value, attributes);
24✔
35
}
36

37
module.exports = {
6✔
38
  get: cookie.get,
39
  set: set,
40
  remove: cookie.remove
41
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc