dd-utils
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

dd-utils

###install

npm install dd-utils

logger

const {logger} = require('dd-utils');

logger.info('test');
logger.warn('test');
logger.error('test');

time

const {time} = require('dd-utils');

time.getunixTime();
time.getdateTime();
time.getTime0h0m0s_unix();

utils

const {utils} = require('dd-utils');

utils.uuid();
utils.getLocalIP();
utils.randomString();

crypto

const {crypto} = require('dd-utils');

crypto.md5('123');
crypto.sha1('123');
crypto.getRandomSalt();

events

const {events} = require('dd-utils');

let id = events.loop_create(10,()=>{
    console.log('loop 10s')
});
events.loop_kill(id)

events.task_create(23,59,()=>{
    console.log('23:59:00')
})

events.sleep(()=>{
    console.log('sleep 10s')
},10)

Package Sidebar

Install

npm i dd-utils

Weekly Downloads

0

Version

1.0.6

License

ISC

Unpacked Size

33.4 kB

Total Files

20

Last publish

Collaborators

  • fei.z