node-mail-example
所属分类:Windows编程
开发工具:WINDOWS
文件大小:1697KB
下载次数:0
上传日期:2020-07-31 22:11:54
上 传 者:
sdfsdf65165
说明: ADEL locks software interface programs
文件列表:
node-mail-example\node_modules (0, 2020-05-05)
node-mail-example\node_modules\.bin (0, 2020-05-05)
node-mail-example\node_modules\.bin\is-ci (310, 2020-05-05)
node-mail-example\node_modules\.bin\is-ci.cmd (272, 2020-05-05)
node-mail-example\node_modules\.bin\is-ci.ps1 (480, 2020-05-05)
node-mail-example\node_modules\.bin\mime (308, 2020-05-05)
node-mail-example\node_modules\.bin\mime.cmd (271, 2020-05-05)
node-mail-example\node_modules\.bin\mime.ps1 (478, 2020-05-05)
node-mail-example\node_modules\.bin\nodemon (330, 2020-05-05)
node-mail-example\node_modules\.bin\nodemon.cmd (282, 2020-05-05)
node-mail-example\node_modules\.bin\nodemon.ps1 (500, 2020-05-05)
node-mail-example\node_modules\.bin\nodetouch (330, 2020-05-05)
node-mail-example\node_modules\.bin\nodetouch.cmd (282, 2020-05-05)
node-mail-example\node_modules\.bin\nodetouch.ps1 (500, 2020-05-05)
node-mail-example\node_modules\.bin\nopt (318, 2020-05-05)
node-mail-example\node_modules\.bin\nopt.cmd (276, 2020-05-05)
node-mail-example\node_modules\.bin\nopt.ps1 (488, 2020-05-05)
node-mail-example\node_modules\.bin\rc (304, 2020-05-05)
node-mail-example\node_modules\.bin\rc.cmd (269, 2020-05-05)
node-mail-example\node_modules\.bin\rc.ps1 (474, 2020-05-05)
node-mail-example\node_modules\.bin\semver (320, 2020-05-05)
node-mail-example\node_modules\.bin\semver.cmd (277, 2020-05-05)
node-mail-example\node_modules\.bin\semver.ps1 (490, 2020-05-05)
node-mail-example\node_modules\@sindresorhus (0, 2020-05-05)
node-mail-example\node_modules\@sindresorhus\is (0, 2020-05-05)
node-mail-example\node_modules\@sindresorhus\is\dist (0, 2020-05-05)
node-mail-example\node_modules\@sindresorhus\is\dist\index.d.ts (6063, 1985-10-26)
node-mail-example\node_modules\@sindresorhus\is\dist\index.js (10891, 1985-10-26)
node-mail-example\node_modules\@sindresorhus\is\dist\index.js.map (10526, 1985-10-26)
node-mail-example\node_modules\@sindresorhus\is\license (1109, 1985-10-26)
node-mail-example\node_modules\@sindresorhus\is\package.json (2477, 2020-05-05)
node-mail-example\node_modules\@szmarczak (0, 2020-05-05)
node-mail-example\node_modules\@szmarczak\http-timer (0, 2020-05-05)
node-mail-example\node_modules\@szmarczak\http-timer\LICENSE (1071, 1985-10-26)
node-mail-example\node_modules\@szmarczak\http-timer\package.json (1935, 2020-05-05)
node-mail-example\node_modules\@szmarczak\http-timer\source (0, 2020-05-05)
node-mail-example\node_modules\@szmarczak\http-timer\source\index.js (2095, 1985-10-26)
node-mail-example\node_modules\@types (0, 2020-05-05)
... ...
# ms
[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/)
Use this package to easily convert various time formats to milliseconds.
## Examples
```js
ms('2 days') // 172800000
ms('1d') // 8***00000
ms('10h') // 36000000
ms('2.5 hrs') // 9000000
ms('2h') // 7200000
ms('1m') // 60000
ms('5s') // 5000
ms('1y') // 31557600000
ms('100') // 100
```
### Convert from milliseconds
```js
ms(60000) // "1m"
ms(2 * 60000) // "2m"
ms(ms('10 hours')) // "10h"
```
### Time format written-out
```js
ms(60000, { long: true }) // "1 minute"
ms(2 * 60000, { long: true }) // "2 minutes"
ms(ms('10 hours'), { long: true }) // "10 hours"
```
## Features
- Works both in [node](https://nodejs.org) and in the browser.
- If a number is supplied to `ms`, a string with a unit is returned.
- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`).
- If you pass a string with a number and a valid unit, the number of equivalent ms is returned.
## Caught a bug?
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Link the package to the global module directory: `npm link`
3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!
As always, you can run the tests using: `npm test`
近期下载者:
相关文件:
收藏者: