New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@eternalheart/utils

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eternalheart/utils - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

lib/chunk-5XGN7UAV.js

2

lib/features/random-id/index.js

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

class c{static create(a=16){return Array.from({length:a},(n,r,e=Math.floor(Math.random()*3),t="0Aa"[e].charCodeAt(0),o="9Zz"[e].charCodeAt(0))=>String.fromCharCode(t+Math.floor(Math.random()*(o-t+1)))).join("")}static v1(a=16){return Array.from({length:a},()=>"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*62)]).join("")}static v2(a=16){const n=()=>{try{return"09AZaz".split("").map(r=>r.charCodeAt(0)).reduce((r,e,t,o)=>{if(t%2!==0)return r;const h=o[t+1]-o[t]+1;if(r<h)throw o[t]+r;return r-h},Math.floor(Math.random()*62))}catch(r){return String.fromCharCode(r)}};return Array.from({length:a},()=>n()).join("")}}export{c as RandomId};
import"../../chunk-5XGN7UAV.js";class c{static create(a=16){return Array.from({length:a},(n,r,e=Math.floor(Math.random()*3),t="0Aa"[e].charCodeAt(0),o="9Zz"[e].charCodeAt(0))=>String.fromCharCode(t+Math.floor(Math.random()*(o-t+1)))).join("")}static v1(a=16){return Array.from({length:a},()=>"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*62)]).join("")}static v2(a=16){const n=()=>{try{return"09AZaz".split("").map(r=>r.charCodeAt(0)).reduce((r,e,t,o)=>{if(t%2!==0)return r;const h=o[t+1]-o[t]+1;if(r<h)throw o[t]+r;return r-h},Math.floor(Math.random()*62))}catch(r){return String.fromCharCode(r)}};return Array.from({length:a},()=>n()).join("")}}export{c as RandomId};
//# sourceMappingURL=index.js.map

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

const a=36e5,c=6e4,l={timer:null,start:function(n="18:00"){console.log("\u5F00\u542F\u4E0B\u73ED\u5012\u8BA1\u65F6~(\u505C\u6B62\u6307\u4EE4:stop)"),this.timer=setInterval(()=>{const o=n.split(":").map(Number),r=new Date;r.setHours(o[0],o[1],0,0);const t=r.valueOf()-Date.now(),e=Math.abs(Math.floor(t/36e5)).toString().padStart(2,"0"),s=Math.abs(Math.floor(t%36e5/6e4)).toString().padStart(2,"0"),i=Math.abs(Math.floor(t%6e4/1e3)).toString().padStart(2,"0");console.log(`${t>0?"\u8DDD\u79BB\u4E0B\u73ED\u8FD8\u6709":"\u5DF2\u7ECF\u4E0B\u73ED"}: ${e}:${s}:${i}!`)},1e3)},stop:function(){console.log("\u505C\u6B62\u4E0B\u73ED\u5012\u8BA1\u65F6~"),clearInterval(this.timer)}};export{l as TimerForGettingOffWork};
import"../../chunk-5XGN7UAV.js";const a=36e5,c=6e4,l={timer:null,start:function(n="18:00"){console.log("\u5F00\u542F\u4E0B\u73ED\u5012\u8BA1\u65F6~(\u505C\u6B62\u6307\u4EE4:stop)"),this.timer=setInterval(()=>{const o=n.split(":").map(Number),r=new Date;r.setHours(o[0],o[1],0,0);const t=r.valueOf()-Date.now(),e=Math.abs(Math.floor(t/36e5)).toString().padStart(2,"0"),s=Math.abs(Math.floor(t%36e5/6e4)).toString().padStart(2,"0"),i=Math.abs(Math.floor(t%6e4/1e3)).toString().padStart(2,"0");console.log(`${t>0?"\u8DDD\u79BB\u4E0B\u73ED\u8FD8\u6709":"\u5DF2\u7ECF\u4E0B\u73ED"}: ${e}:${s}:${i}!`)},1e3)},stop:function(){console.log("\u505C\u6B62\u4E0B\u73ED\u5012\u8BA1\u65F6~"),clearInterval(this.timer)}};export{l as TimerForGettingOffWork};
//# sourceMappingURL=index.js.map

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

var p=(o=>(o[o.add=0]="add",o[o.replace=1]="replace",o))(p||{});function u(f,y,o=1){let l=o===1?{}:{...f};const c=(a,r,n)=>{const t=r.split(".");let e=a;for(let s=0;s<t.length-1;s++){const i=t[s];i in e||(e[i]={}),e=e[i]}e[t[t.length-1]]=n},d=(a,r)=>r.split(".").reduce((n,t)=>n&&n[t],a);for(const[a,r]of Object.entries(y)){let n,t=a;const e=d(f,a);r.isArray&&Array.isArray(e)?n=e.map(s=>typeof r.transform=="object"&&!Array.isArray(r.transform)?u(s,r.transform,0):typeof r.transform=="function"?r.transform(s):s):typeof r.transform=="function"?n=r.transform(e):n=e,r.newField&&(t=r.newField),c(l,t,n)}return l}export{p as TransformMode,u as transformData};
import"../../chunk-5XGN7UAV.js";var p=(o=>(o[o.add=0]="add",o[o.replace=1]="replace",o))(p||{});function u(f,y,o=1){let l=o===1?{}:{...f};const c=(a,r,n)=>{const t=r.split(".");let e=a;for(let s=0;s<t.length-1;s++){const i=t[s];i in e||(e[i]={}),e=e[i]}e[t[t.length-1]]=n},d=(a,r)=>r.split(".").reduce((n,t)=>n&&n[t],a);for(const[a,r]of Object.entries(y)){let n,t=a;const e=d(f,a);r.isArray&&Array.isArray(e)?n=e.map(s=>typeof r.transform=="object"&&!Array.isArray(r.transform)?u(s,r.transform,0):typeof r.transform=="function"?r.transform(s):s):typeof r.transform=="function"?n=r.transform(e):n=e,r.newField&&(t=r.newField),c(l,t,n)}return l}export{p as TransformMode,u as transformData};
//# sourceMappingURL=index.js.map

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

const e=(n,r)=>{let t=Array.isArray(r)?r:r.split(".");try{return t.length==1?n[t.shift()]:e(n[t.shift()],t)}catch{return}};export{e as value};
import"../../chunk-5XGN7UAV.js";const e=(n,r)=>{let t=Array.isArray(r)?r:r.split(".");try{return t.length==1?n[t.shift()]:e(n[t.shift()],t)}catch{return}};export{e as value};
//# sourceMappingURL=index.js.map

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

export*from"./features/value";export*from"./features/timer-for-getting-off-work";export*from"./features/transform-data";export*from"./features/random-id";
export*from"./features/value";export*from"./features/timer-for-getting-off-work";export*from"./features/transform-data";export*from"./features/random-id";export*from"./features/logger";
//# sourceMappingURL=main.js.map

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

{"name":"@eternalheart/utils","version":"1.0.2","description":"A js function utils library by EternalHeart.","author":"EternalHeart","license":"ISC","repository":{"type":"git","url":"https://github.com/wh131462/utils"},"publishConfig":{"access":"public"},"type":"module","readme":"README.md","keywords":["js","eternalheart","utils"],"main":"lib/main.js","types":"types/main.d.ts"}
{"name":"@eternalheart/utils","version":"1.0.3","description":"A js function utils library by EternalHeart.","author":"EternalHeart","license":"ISC","repository":{"type":"git","url":"https://github.com/wh131462/utils"},"publishConfig":{"access":"public"},"type":"module","readme":"README.md","keywords":["js","eternalheart","utils"],"main":"lib/main.js","types":"types/main.d.ts"}

@@ -5,2 +5,3 @@ export * from "./features/value";

export * from './features/random-id';
export * from './features/logger';
//# sourceMappingURL=main.d.ts.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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