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

microsoft / botbuilder-js / 6394042052

03 Oct 2023 02:00PM CUT coverage: 84.869%. Remained the same
6394042052

push

github

web-flow
chore(deps): bump get-func-name from 2.0.0 to 2.0.2 (#4540)

Bumps [get-func-name](https://github.com/chaijs/get-func-name) from 2.0.0 to 2.0.2.
- [Release notes](https://github.com/chaijs/get-func-name/releases)
- [Commits](https://github.com/chaijs/get-func-name/commits/v2.0.2)

---
updated-dependencies:
- dependency-name: get-func-name
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

9920 of 12935 branches covered (0.0%)

Branch coverage included in aggregate %.

20177 of 22528 relevant lines covered (89.56%)

7197.22 hits per line

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

4.76
/libraries/botbuilder-azure-blobs/src/sanitizeBlobKey.ts
1
// Copyright (c) Microsoft Corporation.
2
// Licensed under the MIT License.
3

4
import { BlobsTranscriptStoreOptions } from './blobsTranscriptStore';
5

6
/**
7
 * Ensures that `key` is a properly sanitized Azure Blob Storage key. It should be URI encoded,
8
 * no longer than 1024 characters, and contain no more than 254 slash ("/") chars.
9
 *
10
 * @param {string} key string blob key to sanitize
11
 * @param {BlobsTranscriptStoreOptions} options Optional settings for BlobsTranscriptStore
12
 * @returns {string} sanitized blob key
13
 */
14
export function sanitizeBlobKey(key: string, options?: BlobsTranscriptStoreOptions): string {
2✔
15
    if (!key || !key.length) {
×
16
        throw new Error('Please provide a non-empty key');
×
17
    }
18

19
    const sanitized = key.split('/').reduce((acc, part, idx) => (part ? [acc, part].join(idx < 255 ? '/' : '') : acc));
×
20

21
    // Options settings to decode key in order to support previous Blob
22
    if (options?.decodeTranscriptKey) {
×
23
        return decodeURIComponent(sanitized).substr(0, 1024);
×
24
    }
25
    return encodeURIComponent(sanitized).substr(0, 1024);
×
26
}
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

© 2025 Coveralls, Inc