Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

调整文件格式 #79

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/function/_meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "函数",
"describe": "函数等相关操作"
"name": "函数",
"describe": "函数等相关操作"
}
4 changes: 2 additions & 2 deletions lib/function/curry.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ const curry = (func) => {
if (args.length >= func.length) {
return func.apply(this, args);
} else {
return function(...args2) {
return function (...args2) {
return curried.apply(this, args.concat(args2));
};
}
};
};
export default curry
export default curry;
16 changes: 8 additions & 8 deletions lib/math/squareArea.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/**
* 正方形面积
* @author MothWillion <https://github.com/MothWillion>
* @category math
* @alias yd_math_squareArea
* @param {Number} l 正方形边长
* @returns {Number} 正方形面积
*/
* 正方形面积
* @author MothWillion <https://github.com/MothWillion>
* @category math
* @alias yd_math_squareArea
* @param {Number} l 正方形边长
* @returns {Number} 正方形面积
*/

export default (l) => {
if (Number(l) + '' === 'NaN') {
console.error('正方形的边长必须是数字');
return;
}
return l * l;
}
};