Project-number-01-estudo-js-node
所属分类:Node.js
开发工具:EJS
文件大小:3871KB
下载次数:0
上传日期:2023-04-04 20:30:17
上 传 者:
sh-1993
说明: 6月,在Udemy lado客户服务中心的形式上,实现了目标
(Desenvolvimento de atividades sendo realizadas junto a curso de forma o na Udemy-lado cliente servidor)
文件列表:
app.js (109, 2023-04-05)
app (0, 2023-04-05)
app\controllers (0, 2023-04-05)
app\controllers\admin.js (1335, 2023-04-05)
app\controllers\home.js (496, 2023-04-05)
app\controllers\noticias.js (710, 2023-04-05)
app\models (0, 2023-04-05)
app\models\noticiasModel.js (747, 2023-04-05)
app\public (0, 2023-04-05)
app\public\css (0, 2023-04-05)
app\public\css\style.css (5538, 2023-04-05)
app\public\images (0, 2023-04-05)
app\public\images\4230567.png (20190, 2023-04-05)
app\public\images\favicon.ico (1150, 2023-04-05)
app\public\images\logo.png (28569, 2023-04-05)
app\public\images\logo.svg (62218, 2023-04-05)
app\public\js (0, 2023-04-05)
app\public\js\jquery-2.2.1.js (258549, 2023-04-05)
app\routes (0, 2023-04-05)
app\routes\admin.js (380, 2023-04-05)
app\routes\home.js (172, 2023-04-05)
app\routes\login.js (136, 2023-04-05)
app\routes\noticias.js (331, 2023-04-05)
app\views (0, 2023-04-05)
app\views\admin (0, 2023-04-05)
app\views\admin\form_add_noticia.ejs (3119, 2023-04-05)
app\views\home (0, 2023-04-05)
app\views\home\index.ejs (2231, 2023-04-05)
app\views\home\login.ejs (1677, 2023-04-05)
app\views\noticias (0, 2023-04-05)
app\views\noticias\noticia.ejs (1981, 2023-04-05)
app\views\noticias\noticias.ejs (2112, 2023-04-05)
caminhoMYSQL.txt (43, 2023-04-05)
config (0, 2023-04-05)
config\dbConnection.js (223, 2023-04-05)
config\server.js (509, 2023-04-05)
modulo_teste.js (72, 2023-04-05)
node_modules (0, 2023-04-05)
node_modules\.bin (0, 2023-04-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`
近期下载者:
相关文件:
收藏者: