@uiw/utils
Advanced tools
Comparing version 4.3.0 to 4.3.1
@@ -0,1 +1,4 @@ | ||
/** | ||
* Returns a random text | ||
*/ | ||
export declare function randomid(): string; |
@@ -8,2 +8,5 @@ "use strict"; | ||
/** | ||
* Returns a random text | ||
*/ | ||
function randomid() { | ||
@@ -10,0 +13,0 @@ return parseInt(String(Math.random() * 1e15), 10).toString(36); |
@@ -0,1 +1,4 @@ | ||
/** | ||
* Returns a random text | ||
*/ | ||
export declare function randomid(): string; |
@@ -0,1 +1,4 @@ | ||
/** | ||
* Returns a random text | ||
*/ | ||
export function randomid() { | ||
@@ -2,0 +5,0 @@ return parseInt(String(Math.random() * 1e15), 10).toString(36); |
{ | ||
"name": "@uiw/utils", | ||
"version": "4.3.0", | ||
"version": "4.3.1", | ||
"description": "utils tools", | ||
@@ -52,3 +52,3 @@ "author": "Kenny Wong <wowohoo@qq.com>", | ||
}, | ||
"gitHead": "5e61a59c0674fdbeacedd1b8a69d585f8f1ba0b8" | ||
"gitHead": "f469dd7fc4c211873d65efcc065e2d0de2c64fed" | ||
} |
@@ -1,9 +0,41 @@ | ||
# `@uiw/utils` | ||
`@uiw/utils` | ||
=== | ||
> TODO: description | ||
## Install | ||
```bash | ||
npm i @uiw/utils | ||
``` | ||
## Usage | ||
```js | ||
import {} from '@uiw/utils' | ||
import { isLeapYear, solarMonthDays } from '@uiw/utils'; | ||
``` | ||
### isLeapYear | ||
Determine whether it is a leap year | ||
### getFirstDayOfWeek | ||
The first day of the month is the day of the week. | ||
### solarMonthDays | ||
Get the sun moon, commonly known as the solar calendar month By calculating the second month of the leap year, maybe `29` days | ||
### isSameDate | ||
Check if a date is the same as another date. Use `Date.prototype.toISOString()` and strict equality checking (`===`) to check if the first date is the same as the second one. | ||
### getScroll | ||
Gets the scroll value of the given element in the given side (top and left) | ||
### randomid | ||
```js | ||
randomid() | ||
// "5fan4z7qsa" | ||
``` |
@@ -0,3 +1,6 @@ | ||
/** | ||
* Returns a random text | ||
*/ | ||
export function randomid(): string { | ||
return parseInt(String(Math.random() * 1e15), 10).toString(36); | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28042
483
41