1.0.2 • Published 5 years ago

l-utility v1.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

l-utility

a utility for myself

INSTALL

npm i l-utility -S

Usage

Setup

const utils = require('l-utility');

md5

const md5 = utils.md5('content');

sha256

const sha256 = utils.sha256('content');

objectId

const objectId = utility.newObjectId();

objectIdToDate

transform objenctId to date

const date = utility.objectIdToDate(objectId);

getDomain

get domain from host

const domain = utility.getDomain(host);

downloadFile

download file from souce url

utility.downloadFile(souceUrl);

loadFile

load file from souce

const file = utility.loadFile(souceUrl);