open-index/open-npm huggingface dataset:
npm package: @royalscome/format
Description: Time formatting tool and number formatting tool
Latest version: 2.0.7

<!--
 * @Description: 
 * @Autor: weiyang
 * @Date: 2021-08-31 15:05:56
 * @LastEditors: weiyang
 * @LastEditTime: 2021-09-01 09:41:23
-->
# @royalscome/format
<hr />

[![avatar](https://img.shields.io/badge/npm-v2.0.4-green)](https://github.com/royalscome/format)
Time formatting tool and number formatting tool

## Install
```
$ npm i @royalscome/format
```

## Usage
```js
import { DateFormat } from "@royalscome/format";


DateFormat.format(new Date(), "yyyy年MM月dd日") // 2021年08月31日

// 具体使用介绍看下表（See the table below for detailed usage）
```

### DateFormat
| 子类名 | 介绍 | 参数 | 示例 |
| - | - | - | - |
| format | 格式化日期 | (time=null,format="yyyy年MM月dd日"),time可传时间戳，标准时间格式，format为想获得的时间格式 | DateFormat.format(new Date(), "yyyy年MM月dd日") // 2021年08月31日 |
| formatDateWithZero | 将日期格式化到当天零时 | (time) | DateFormat.formatDateWithZero(new Date(), "yyyy年MM月dd日") // 2021年08月31日 00:00:00 |
| formatDateWithLast | 将日期格式化到当天结束 | (time) | DateFormat.formatDateWithLast(new Date(), "yyyy年MM月dd日") // 2021年08月31日 23：59：59 |
| getDate | 将非标准格式日期转换为标准时间格式 | (time) | DateFormat.getDate("2021.08.31") // 2021-08-31 |
| getDateWithDot | 将标准时间格式转换为.形式 | (time) | DateFormat.getDateWithDot("2021-08-31") // 2021.08.31 |
| getNowYearAndMonth | 获取当前年和月 | (time) | DateFormat.getNowYearAndMonth(new Date()) // 2021-8 |
| getWeekDate | 获取当前星期几 | 无 | DateFormat.getWeekDate() // 星期三 |
| getMonthWeek | 获取当前月份的第几周 | (time) | 无 |
| formatDateToRule | 格式化时间为今天显示具体时间，昨天显示昨天，昨天以前显示日期 | (time) | 具体看介绍 |
| getDateToNumber | 根据传入数字可正负,得到日期 | (time=null,n) | DateFormat.getDateToNumber(new Date(),-1) // 2021-08-30 |
| compareDate | 比较时间大小 | (startTime, endTime) | 具体使用看介绍 |
| getDiffDate | 计算时间差 | (startTime, endTime, fmt = "dd") | 具体使用看介绍 |
npm package: @royalsix/express-idempotency
Description: Express middleware to make requests idempotent
Author: Sterling Scott
Latest version: 1.0.3

# Express Idempotency

Express Middleware to allow requests to be made idempotent if client passes an idempotency key header.

## Code Example

```javascript
var idempotency = require('@royalsix/express-idempotency');
app.use(idempotency());

// if requests have the header "Idempotency-Key" header set, the middleware will check to see whether a cached response to this request has been stored

// if so, the cached response will be returned, setting the header "X-Cache": "HIT"

// if not, the request will pass to the next middleware, and the response will be stored in the cache, in order that subsequent responses with the same idempotency key can be returned from the cache.
```

## Motivation

Sometimes, it's important to ensure an HTTP request is idempotent, even if you're not using a naturally idempotent HTTP verb (like `PUT` or `DELETE`). For example, if your API charges somebody's credit card when a `POST /orders` request is made, it's important to ensure that the request is only processed once. However, gremlins like network faults etc. may cause the client to fail to receive a response. Using an Idempotency Key is one solution to this problem. [Stripe describe their solution in a blog post](https://stripe.com/blog/idempotency) which provided the inspiration for this package.

Also handling parallel or concurrent requests given the same idempotency key. If two requests happen at the same time then even before the server responds to the first, then the same result will be given for the second one as the first, and the second one will not get reprocessed.

## Installation

`npm install --save @royalsix/express-idempotency`

## Tests

`npm test`

## Contributors

Package developed by [Sterling Scott](http://royalsix.co.uk), principally by [Chris Jamieson](http://chrisjamieson.me)
Check out the fork @optimuspay/express-idempotency

## License

MIT License
npm package: @royalwind/react-npm
Description: react-typescript
Author: zgh
Latest version: 0.1.0

# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).