🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@rg-dev/stdlib

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rg-dev/stdlib - npm Package Compare versions

Comparing version
1.0.66
to
1.0.67
+9
-0
lib/browser-env.cjs

@@ -25,2 +25,3 @@ "use strict";

copyToClipboard: () => copyToClipboard,
getBaseHref: () => getBaseHref,
parseFileInput: () => parseFileInput,

@@ -35,2 +36,10 @@ parseFormData: () => parseFormData

// src/browser-env.ts
function getBaseHref() {
var _a;
const base = ((_a = document.querySelector("base")) == null ? void 0 : _a.getAttribute("href")) || "";
if (!base) {
console.warn(`no base address, please add <base> to the html`);
}
return base;
}
function parseFileInput(e) {

@@ -37,0 +46,0 @@ if (e instanceof HTMLInputElement) {

+2
-1
export { VERSION } from './index.cjs';
declare function getBaseHref(): string;
declare function parseFileInput(e: Event | HTMLInputElement): File[];

@@ -9,2 +10,2 @@ declare function parseFormData<T = Record<string, string>>(e: Event | FormData | HTMLFormElement): T;

export { copyToClipboard, parseFileInput, parseFormData };
export { copyToClipboard, getBaseHref, parseFileInput, parseFormData };
export { VERSION } from './index.js';
declare function getBaseHref(): string;
declare function parseFileInput(e: Event | HTMLInputElement): File[];

@@ -9,2 +10,2 @@ declare function parseFormData<T = Record<string, string>>(e: Event | FormData | HTMLFormElement): T;

export { copyToClipboard, parseFileInput, parseFormData };
export { copyToClipboard, getBaseHref, parseFileInput, parseFormData };

@@ -5,2 +5,10 @@ // src/index.ts

// src/browser-env.ts
function getBaseHref() {
var _a;
const base = ((_a = document.querySelector("base")) == null ? void 0 : _a.getAttribute("href")) || "";
if (!base) {
console.warn(`no base address, please add <base> to the html`);
}
return base;
}
function parseFileInput(e) {

@@ -91,4 +99,5 @@ if (e instanceof HTMLInputElement) {

copyToClipboard,
getBaseHref,
parseFileInput,
parseFormData
};
{
"name": "@rg-dev/stdlib",
"version": "1.0.66",
"version": "1.0.67",
"description": "",

@@ -5,0 +5,0 @@ "scripts": {