MILES-Music
所属分类:MongoDB
开发工具:EJS
文件大小:6256KB
下载次数:0
上传日期:2022-11-19 21:26:39
上 传 者:
sh-1993
说明: 我的音乐网站的源代码,[www.milesmusic.me](http://www.milesusic.me)。使用HTML、CSS、Bootstrap、JS、JQuery、EJS、Node.JS、Express...
(The source code for my music website, [www.milesmusic.me](http://www.milesmusic.me). Uses HTML, CSS, Bootstrap, JS, JQuery, EJS, Node.js, Express.js, MongoDB and Mongoose, the Spotify API to generate tracklists, and the YouTube API for embedded audio.)
文件列表:
Procfile (17, 2022-11-20)
app.js (4997, 2022-11-20)
app.json (0, 2022-11-20)
node_modules (0, 2022-11-20)
node_modules\.bin (0, 2022-11-20)
node_modules\.bin\acorn (298, 2022-11-20)
node_modules\.bin\acorn.cmd (303, 2022-11-20)
node_modules\.bin\acorn.ps1 (785, 2022-11-20)
node_modules\.bin\ejs (296, 2022-11-20)
node_modules\.bin\ejs.cmd (302, 2022-11-20)
node_modules\.bin\ejs.ps1 (781, 2022-11-20)
node_modules\.bin\escodegen (320, 2022-11-20)
node_modules\.bin\escodegen.cmd (314, 2022-11-20)
node_modules\.bin\escodegen.ps1 (829, 2022-11-20)
node_modules\.bin\esgenerate (322, 2022-11-20)
node_modules\.bin\esgenerate.cmd (315, 2022-11-20)
node_modules\.bin\esgenerate.ps1 (833, 2022-11-20)
node_modules\.bin\esparse (312, 2022-11-20)
node_modules\.bin\esparse.cmd (310, 2022-11-20)
node_modules\.bin\esparse.ps1 (813, 2022-11-20)
node_modules\.bin\esvalidate (318, 2022-11-20)
node_modules\.bin\esvalidate.cmd (313, 2022-11-20)
node_modules\.bin\esvalidate.ps1 (825, 2022-11-20)
node_modules\.bin\jake (298, 2022-11-20)
node_modules\.bin\jake.cmd (303, 2022-11-20)
node_modules\.bin\jake.ps1 (785, 2022-11-20)
node_modules\.bin\mime (290, 2022-11-20)
node_modules\.bin\mime.cmd (299, 2022-11-20)
node_modules\.bin\mime.ps1 (769, 2022-11-20)
node_modules\.bin\nodemon (312, 2022-11-20)
node_modules\.bin\nodemon.cmd (310, 2022-11-20)
node_modules\.bin\nodemon.ps1 (813, 2022-11-20)
node_modules\.bin\nodetouch (312, 2022-11-20)
node_modules\.bin\nodetouch.cmd (310, 2022-11-20)
node_modules\.bin\nodetouch.ps1 (813, 2022-11-20)
node_modules\.bin\nopt (300, 2022-11-20)
node_modules\.bin\nopt.cmd (304, 2022-11-20)
node_modules\.bin\nopt.ps1 (789, 2022-11-20)
... ...
# 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`
近期下载者:
相关文件:
收藏者: