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.1
to
1.0.2
+8
lib/copy.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" })
+7
-16

@@ -1,19 +0,10 @@

let data = {
getStr() {
console.log('我是一个注册包')
},
// 时间戳为10位需*1000,时间戳为13位的话不需乘1000
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;
}
import { time } from './lib/time'
import { copy } from './lib/copy'
let featched = {
getTime = time.getTime,
getCory = copy.copyToClipboard
}
module.exports = data
module.exports = featched
{
"name": "featched",
"version": "1.0.1",
"version": "1.0.2",
"description": "",

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

@@ -0,1 +1,10 @@

## 时间戳转换
getTime(时间戳,间隔字符) 时间戳为10位需*1000,时间戳为13位的话不需乘1000
## 复制到剪贴板
getCory(文本内容)
$ npm install