1.0.5
This commit is contained in:
parent
3a8a4aada3
commit
c53528079b
31
README.md
31
README.md
@ -0,0 +1,31 @@
|
|||||||
|
Here’s a suggestion for your npm package description in English:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# ddmt-tool
|
||||||
|
|
||||||
|
A utility library that provides commonly used functions to simplify everyday development tasks. Whether it's string manipulation, array operations, or other frequent functionalities, `ddmt-tool` helps you work more efficiently.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm install ddmt-tool
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage Example
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
import { Name } from 'ddmt-tool';
|
||||||
|
|
||||||
|
Name();
|
||||||
|
```
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- String manipulation
|
||||||
|
- Array operations
|
||||||
|
- Custom utilities
|
||||||
|
|
||||||
|
For more features and usage instructions, please refer to the documentation.
|
||||||
|
```
|
||||||
|
|
||||||
|
This should give users a clear understanding of your package's purpose and how to use it.
|
@ -1,11 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* @Author: ddmt
|
||||||
|
* @Date: 2024-9-29 20:50:12
|
||||||
|
* @LastEditTime: 2024-9-29 20:50:12
|
||||||
|
* @LastEditors: ddmt
|
||||||
|
* @Description: ddmt-index file
|
||||||
|
* @FilePath: /Tool/animate.js
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 动画函数
|
* 动画函数
|
||||||
* @param {HTMLElement} event
|
* @param {HTMLElement} event
|
||||||
* @param {string} classname
|
* @param {string} classname
|
||||||
*/
|
*/
|
||||||
export function animate(event, classname) {
|
export function animateStart(event, className, forceExecute) {
|
||||||
event.classList.add(classname);
|
if (forceExecute) event.target.classList.remove(className); // 清洗动画
|
||||||
|
event.classList.add(className);
|
||||||
event.addEventListener('animationend', (event) => {
|
event.addEventListener('animationend', (event) => {
|
||||||
event.target.classList.remove(classname); // 清洗动画
|
event.target.classList.remove(className); // 清洗动画
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
/*
|
||||||
|
* @Author: ddmt
|
||||||
|
* @Date: 2024-9-29 20:50:12
|
||||||
|
* @LastEditTime: 2024-9-29 20:50:12
|
||||||
|
* @LastEditors: ddmt
|
||||||
|
* @Description: ddmt-index file
|
||||||
|
* @FilePath: /Tool/number.js
|
||||||
|
*/
|
||||||
|
|
||||||
//生成从minNum到maxNum的随机数
|
//生成从minNum到maxNum的随机数
|
||||||
export function randomNum (minNum, maxNum) {
|
export function randomNum (minNum, maxNum) {
|
||||||
switch (arguments.length) {
|
switch (arguments.length) {
|
||||||
|
13
index.js
13
index.js
@ -1,2 +1,13 @@
|
|||||||
export { animate } from './Tool/animate.js';
|
/*
|
||||||
|
* @Author: ddmt
|
||||||
|
* @version: 1.0.5
|
||||||
|
* @Date: 2024-9-29 20:50:12
|
||||||
|
* @LastEditTime: 2024-9-29 20:50:12
|
||||||
|
* @LastEditors: ddmt
|
||||||
|
* @Description: ddmt-index file
|
||||||
|
* @FilePath: /index.js
|
||||||
|
*/
|
||||||
|
export { animateStart } from './Tool/animate.js';
|
||||||
export { randomNum, nextArray } from './Tool/number.js';
|
export { randomNum, nextArray } from './Tool/number.js';
|
||||||
|
|
||||||
|
console.log('ddmt-tool Loading successfully!! 😺');
|
13
package-lock.json
generated
13
package-lock.json
generated
@ -1,13 +1,20 @@
|
|||||||
{
|
{
|
||||||
"name": "ddmt-tool",
|
"name": "ddmt-tool",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ddmt-tool",
|
"name": "ddmt-tool",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"license": "ISC"
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"ddmt-tool": "file:"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/ddmt-tool": {
|
||||||
|
"resolved": "",
|
||||||
|
"link": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "ddmt-tool",
|
"name": "ddmt-tool",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"description": "ddmt-tool",
|
"description": "A utility library that provides commonly used functions to simplify everyday development tasks. Whether it's string manipulation, array operations, or other frequent functionalities, `ddmt-tool` helps you work more efficiently.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -12,5 +12,8 @@
|
|||||||
"tool"
|
"tool"
|
||||||
],
|
],
|
||||||
"author": "ddmt",
|
"author": "ddmt",
|
||||||
"license": "ISC"
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"ddmt-tool": "file:"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user