+11
-0
| 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; | ||
| } | ||
@@ -5,0 +16,0 @@ } |
+10
-10
| { | ||
| "name": "featched", | ||
| "version": "1.0.0", | ||
| "description": "", | ||
| "main": "index.js", | ||
| "scripts": { | ||
| "test": "echo \"Error: no test specified\" && exit 1" | ||
| }, | ||
| "author": "", | ||
| "license": "ISC" | ||
| } | ||
| "name": "featched", | ||
| "version": "1.0.1", | ||
| "description": "", | ||
| "main": "index.js", | ||
| "scripts": { | ||
| "test": "echo \"Error: no test specified\" && exit 1" | ||
| }, | ||
| "author": "", | ||
| "license": "ISC" | ||
| } |
+1
-1
@@ -1,1 +0,1 @@ | ||
| ## 测试文件 | ||
| $ npm install |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
838
153.94%4
33.33%16
220%0
-100%