commonly-used-utils
Advanced tools
Comparing version 1.0.0 to 1.0.1-beat3
{ | ||
"name": "commonly-used-utils", | ||
"version": "1.0.0", | ||
"version": "1.0.1-beat3", | ||
"description": "", | ||
"main": "src/index.ts", | ||
"scripts": {}, | ||
"main": "dist/index.js", | ||
"types": "type/index.d.ts", | ||
"scripts": { | ||
"serve": "webpack-dev-server --config webpack.dev.js", | ||
"build": "webpack --config webpack.config.js" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC" | ||
"license": "ISC", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"clean-webpack-plugin": "^4.0.0", | ||
"html-webpack-plugin": "^5.5.0", | ||
"ts-loader": "^9.4.2", | ||
"typescript": "^4.9.5", | ||
"webpack": "^5.75.0", | ||
"webpack-cli": "^5.0.1", | ||
"webpack-dev-server": "^4.11.1" | ||
} | ||
} |
@@ -1,13 +0,8 @@ | ||
export const oneDimensional = (array = [], children = 'children') => { | ||
if (!array || !array.length) { | ||
return [] | ||
} | ||
return array.reduce((total, item) => { | ||
return total.concat( | ||
item, | ||
item[children] && item[children].length | ||
? oneDimensional(item[children], children) | ||
: [] | ||
) | ||
}, []) | ||
} | ||
// 常用工具 | ||
export { isPlainObject, isNil, isArray, isFunction } from './utils/basics' | ||
// 递归 | ||
export { oneDimensional, treeFindParents, setTreeAttr } from './recursion' | ||
// 数组 | ||
export { findArrayAttr } from './array' |
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
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
10040
14
179
0
1
7
2
1