Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

featched

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

featched - npm Package Compare versions

Comparing version
1.0.2
to
1.0.3
+18
lib/zoom.js
let size = 1.0;
const body = document.body
let zoom = {
setZooMax() {
size = size + 0.1;
this.set()
},
setZooMin() {
size = size - 0.1;
this.set()
},
set() {
body.style.zoom = size;
body.style.cssText += '; -moz-transform: scale(' + size + ');-moz-transform-origin: 0 0; ';
}
}
module.exports = zoom
+2
-4

@@ -1,7 +0,5 @@

import { time } from './lib/time'
import { copy } from './lib/copy'
import { zoom } from './lib/zoom'
let featched = {
getTime = time.getTime,
getCory = copy.copyToClipboard
zoom,
}

@@ -8,0 +6,0 @@

{
"name": "featched",
"version": "1.0.2",
"version": "1.0.3",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

/**
*
* @param {*} text 复制内容
*/
export function copyToClipboard(text) {
navigator.clipboard.writeText && navigator.clipboard.writeText(text)
}
const scrollToTop = (element) =>
element.scrollIntoView({ behavior: "smooth", block: "start" })
const scrollToBottom = (element) =>
element.scrollIntoView({ behavior: "smooth", block: "end" })
/**
*
* @param {*} time 时间戳
* @param {*} label 间隔字符
* @returns 时间戳为10位需*1000,时间戳为13位的话不需乘1000
*/
export function getTime(time, label) {
let date = new Date(time);
let Y = date.getFullYear() + label;
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + label;
let D = date.getDate() + ' ';
let h = date.getHours() + ':';
let m = date.getMinutes() + ':';
let s = date.getSeconds();
return Y + M + D + h + m + s;
}