@jsenv/urls 2.1.0 → 2.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/urls",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
package/src/main.js CHANGED
@@ -1,5 +1,4 @@
1
1
  export { DATA_URL } from "./data_url.js";
2
- export { generateInlineContentUrl } from "./inline_content_url_generator.js";
3
2
  export {
4
3
  stringifyUrlTrace,
5
4
  stringifyUrlSite,
@@ -1,29 +0,0 @@
1
- import { urlToFilename } from "./url_to_filename.js";
2
-
3
- export const generateInlineContentUrl = ({
4
- url,
5
- extension,
6
- basename,
7
- line,
8
- column,
9
- lineEnd,
10
- columnEnd,
11
- }) => {
12
- let generatedName = "";
13
- if (basename !== undefined) {
14
- generatedName += basename;
15
- }
16
- if (line !== undefined && column !== undefined) {
17
- generatedName = `L${line}C${column}`;
18
- if (lineEnd !== undefined && columnEnd !== undefined) {
19
- generatedName += `-L${lineEnd}C${columnEnd}`;
20
- }
21
- }
22
-
23
- const filenameRaw = urlToFilename(url);
24
- const filename = `${filenameRaw}@${generatedName}${extension}`;
25
- // ideally we should keep query params from url
26
- // maybe we could use a custom scheme like "inline:"
27
- const inlineContentUrl = new URL(filename, url).href;
28
- return inlineContentUrl;
29
- };