- 新增 renameObjectKeys 函数,用于根据字段映射表重新命名对象的属性 - 函数接受过滤后的行数据数组和字段映射表作为参数 - 返回一个新的数组,其中对象的属性根据字段映射表进行了重命名 - 如果字段不在映射表中,则直接跳过,不加入新对象
# 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
General usage.
import { Name } from 'ddmt-tool';
Name();
Refers specifically to the usage of animateStart.
import { animateStart } from 'ddmt-tool';
/**
* animateStart
* @param {HTMLElement} HTMLElement Animation needs to be played in HTMLElement
* @param {string} classname The corresponding CSS for the animation
* @param {boolean} forceExecute Whether to force execute the animation or not
* @returns {void}
*/
animateStart(event, className, forceExecute=false);
Here's an example of how to use CSS
.box-item {
position: absolute;
background-color: rgb(255, 223, 181);
border-radius: 10px;
width: 60px;
height: 60px;
line-height: 60px;
margin: 2px;
text-align: center;
cursor: default;
}
.box-item.animate {
animation-name: boxbing;
animation-duration: 0.7s;
animation-iteration-count: 1;
/* 设置动画只播放一次 */
animation-fill-mode: forwards;
/* 保持动画结束时的状态 */
}
@keyframes boxbing {
0% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(1);
}
}
Features
- String manipulation
- Array operations
- Custom utilities
For more features and usage instructions, please refer to the documentation.
Description
Languages
JavaScript
100%