@fmt-sdk/utils
TypeScript icon, indicating that this package has built-in type declarations

1.2.3 • Public • Published

@fmt-sdk/utils

z_fay@163.com

###install

npm install @2dan/utils

logger

const {logger} = require('@2dan/utils');

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

time

const {time} = require('@2dan/utils');

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

utils

const {util} = require('@2dan/utils');

util.uuid();
util.getLocalIP();
util.randomString();

crypto

const {crypto} = require('@2dan/utils');

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

events

const {events} = require('@2dan/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)

Readme

Keywords

Package Sidebar

Install

npm i @fmt-sdk/utils

Weekly Downloads

0

Version

1.2.3

License

ISC

Unpacked Size

188 kB

Total Files

40

Last publish

Collaborators

  • fmt-sdk