Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aidc/utils

Package Overview
Dependencies
Maintainers
4
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aidc/utils - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

1

dist/debug/index.d.ts

@@ -6,2 +6,1 @@ import _debug from 'debug';

export declare const debug: _debug.Debugger;
//# sourceMappingURL=index.d.ts.map

@@ -5,2 +5,1 @@ import { ReactElement } from 'react';

export declare function injectStyle(url: string): void;
//# sourceMappingURL=index.d.ts.map

@@ -9,2 +9,1 @@ export declare const isWindow: boolean;

export declare const isChromeBackground: boolean;
//# sourceMappingURL=index.d.ts.map

5

dist/general/index.d.ts
export declare function getClassName(object: any): any;
//# sourceMappingURL=index.d.ts.map
export declare function openWindow(url: string, size?: {
width: number;
height: number;
}): void;

@@ -0,1 +1,3 @@

import { debug } from "../debug";
// 获取一个 JS 实例或类的 “类的名称”

@@ -10,2 +12,17 @@ export function getClassName(object) {

return 'Unknown';
}
// 打开一个新的浏览器窗口
export function openWindow(url, size) {
debug('[debug] openWindow url:', url);
if (size) {
// 如果设置了尺寸,就使其屏幕居中显示
var left = (window.screen.width - size.width) / 2;
var top = (window.screen.height - size.height) / 2;
var features = "width=".concat(size.width, ",height=").concat(size.height, ",left=").concat(left, ",top=").concat(top);
window.open(url, '_blank', features);
debug('[debug] openWindow features:', features);
} else {
window.open(url, '_blank');
}
}
export declare function checkWebp(): boolean;
//# sourceMappingURL=check-webp.d.ts.map

@@ -15,2 +15,1 @@ interface CompressInfoProps {

export {};
//# sourceMappingURL=compress-image.d.ts.map

@@ -19,2 +19,1 @@ export * from './check-webp';

export declare function onlyWebp(imgUrl: string): string;
//# sourceMappingURL=index.d.ts.map

@@ -9,2 +9,1 @@ export * from './debug';

export * from './time';
//# sourceMappingURL=index.d.ts.map

@@ -1,3 +0,2 @@

export declare function pingAlibabaAvatarImage(): Promise<unknown>;
export declare function pingAlibabaAvatarImage(): Promise<void>;
export declare function pingAlibabaNetwork(): Promise<boolean>;
//# sourceMappingURL=index.d.ts.map

@@ -7,4 +7,7 @@ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";

img.onload = function () {
// @ts-ignore
if (this.width === 200 && this.height === 200) resolve();else reject();
if (img.width === 200 && img.height === 200) {
resolve();
} else {
reject();
}
};

@@ -11,0 +14,0 @@ img.onerror = reject;

@@ -23,2 +23,1 @@ export interface RequestOptions {

export declare function request<T extends RequestResponse>(url: string, options?: RequestOptions): Promise<T["data"]>;
//# sourceMappingURL=index.d.ts.map
export declare function delay(ms: number): Promise<unknown>;
//# sourceMappingURL=index.d.ts.map
{
"name": "@aidc/utils",
"version": "0.1.0",
"version": "0.2.0",
"repository": "git@gitlab.alibaba-inc.com:aidc-innovation/aidc-fe.git",

@@ -5,0 +5,0 @@ "module": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc