{"id":20414460,"url":"https://github.com/x-extends/xe-utils","last_synced_at":"2026-01-22T08:19:29.066Z","repository":{"id":37958288,"uuid":"115435738","full_name":"x-extends/xe-utils","owner":"x-extends","description":"javascript 函数库、工具类","archived":false,"fork":false,"pushed_at":"2025-12-26T07:03:18.000Z","size":3730,"stargazers_count":665,"open_issues_count":19,"forks_count":129,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-12-27T15:31:40.691Z","etag":null,"topics":["xe-utils"],"latest_commit_sha":null,"homepage":"https://vxeui.com/xe-utils/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/x-extends.png","metadata":{"files":{"readme":"README.en.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-12-26T15:57:43.000Z","updated_at":"2025-12-26T07:00:14.000Z","dependencies_parsed_at":"2022-08-08T22:31:07.928Z","dependency_job_id":"9914011a-2515-4e19-bc76-c781b5ca74a0","html_url":"https://github.com/x-extends/xe-utils","commit_stats":{"total_commits":707,"total_committers":8,"mean_commits":88.375,"dds":0.08628005657708626,"last_synced_commit":"491bd044f90a12bacf06ba2175516e397462a067"},"previous_names":["xuliangzhan/xe-utils"],"tags_count":266,"template":false,"template_full_name":null,"purl":"pkg:github/x-extends/xe-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-extends%2Fxe-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-extends%2Fxe-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-extends%2Fxe-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-extends%2Fxe-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/x-extends","download_url":"https://codeload.github.com/x-extends/xe-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-extends%2Fxe-utils/sbom","scorecard":{"id":1240323,"data":{"date":"2025-12-01","repo":{"name":"github.com/x-extends/xe-utils","commit":"e8b36a6e1801cb1b92549b9f6ec75bfb4b551fbf"},"scorecard":{"version":"v5.4.1-0.20251125161513-488797dbe611","commit":"488797dbe611ab7e16f12d88185cde5e8dc28aca"},"score":3.9,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":5,"reason":"6 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/webpack.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/webpack.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/x-extends/xe-utils/webpack.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/webpack.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/x-extends/xe-utils/webpack.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/webpack.yml:27","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#cii-best-practices"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/488797dbe611ab7e16f12d88185cde5e8dc28aca/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-12-09T13:50:42.954Z","repository_id":37958288,"created_at":"2025-12-09T13:50:42.960Z","updated_at":"2025-12-09T13:50:42.960Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28659513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["xe-utils"],"created_at":"2024-11-15T06:10:09.839Z","updated_at":"2026-01-22T08:19:29.052Z","avatar_url":"https://github.com/x-extends.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# xe-utils\n\n[简体中文](README.md) | English  \n\n[![github star](https://img.shields.io/github/stars/x-extends/xe-utils.svg)](https://github.com/x-extends/xe-utils/stargazers)\n[![gitee star](https://gitee.com/x-extends/xe-utils/badge/star.svg?theme=dark)](https://gitee.com/x-extends/xe-utils/stargazers)\n[![gitcode star](https://gitcode.com/x-extends/xe-utils/star/badge.svg)](https://gitcode.com/x-extends/xe-utils/stargazers)\n[![npm version](https://img.shields.io/npm/v/xe-utils.svg?style=flat-square)](https://www.npmjs.com/package/xe-utils)\n[![NodeJS with Webpack](https://github.com/x-extends/xe-utils/actions/workflows/webpack.yml/badge.svg)](https://github.com/x-extends/xe-utils/actions/workflows/webpack.yml)\n[![gzip size: JS](http://img.badgesize.io/https://unpkg.com/xe-utils/dist/dist/xe-utils.umd.min.js?compression=gzip\u0026label=gzip%20size:%20JS)](https://unpkg.com/xe-utils/dist/dist/xe-utils.umd.min.js)\n[![npm downloads](https://img.shields.io/npm/dm/xe-utils.svg?style=flat-square)](http://npm-stat.com/charts.html?package=xe-utils)\n[![npm license](https://img.shields.io/github/license/mashape/apistatus.svg)](LICENSE)\n\nJavaScript libraries, utility\n\n## Browser Support\n\n![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_7-8/internet-explorer_7-8_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png)\n--- | --- | --- | --- | --- | --- |\n7+ ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 6+ ✔ |\n\n## Docs\n\n[To view the document](https://vxeui.com/xe-utils/)\n\n## Installing\n\n```shell\nnpm install xe-utils\n```\n\nUsing nodejs\n\n```javascript\nconst XEUtils = require('xe-utils')\n```\n\nGet on [unpkg](https://unpkg.com/xe-utils/) and [cdnjs](https://cdn.jsdelivr.net/npm/xe-utils/)\n\n```HTML\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/xe-utils\"\u003e\u003c/script\u003e\n```\n\n### Import all methods\n\n```javascript\nimport XEUtils from 'xe-utils'\n\nXEUtils.toDateString(Date.now())\n// 2018-01-01 10:30:28\nXEUtils.toStringDate('2018-01-01 10:30:00')\n// Mon Jan 01 2018 10:30:00 GMT+0800\n```\n\n## Import on demand\n\nIn this way, the volume can be minimized by introducing methods as needed.  \nImport a single package, the size of the package gzip \u003e≈ 60B+, import on demand.  \n\n```javascript\nimport each from 'xe-utils/each'\nimport toDateString from 'xe-utils/toDateString'\n\neach({ a: 11, b: 22, c: 33 }, function (item, key){\n  console.log(item)\n})\n// 11\n// 22\n// 33\ntoDateString(Date.now(), 'yyyy-MM-dd HH:mm:ss')\n// 2018-01-01 10:30:28\n```\n\n```javascript\nimport XEUtils from 'xe-utils/ctor'\nimport each from 'xe-utils/each'\nimport toDateString from 'xe-utils/toDateString'\nimport toFixedNumber from 'xe-utils/toFixedNumber'\n\nXEUtils.mixin({\n  each,\n  toDateString,\n  toFixedNumber\n})\nXEUtils.toDateString(Date.now(), 'yyyy-MM-dd HH:mm:ss')\n// 2018-01-01 10:30:28\n```\n\nImport all methods by function.\n\n```javascript\nimport XEUtils from 'xe-utils/ctor'\nimport objectMethods from 'xe-utils/object'\nimport arrayMethods from 'xe-utils/array'\nimport baseMethods from 'xe-utils/base'\nimport numberMethods from 'xe-utils/number'\nimport dateMethods from 'xe-utils/date'\nimport stringMethods from 'xe-utils/string'\nimport functionMethods from 'xe-utils/function'\nimport urlMethods from 'xe-utils/url'\nimport webMethods from 'xe-utils/web'\n\nXEUtils.mixin(\n  // Object\n  objectMethods,\n  // Array\n  arrayMethods,\n  // Base\n  baseMethods,\n  // Number\n  numberMethods,\n  // Date\n  dateMethods,\n  // String\n  stringMethods,\n  // Function\n  functionMethods,\n  // URL\n  urlMethods,\n  // Web\n  webMethods\n)\n```\n\n## Contributors\n\nThank you to everyone who contributed to this project.\n\n[![xe-utils](https://contrib.rocks/image?repo=x-extends/xe-utils)](https://github.com/x-extends/xe-utils/graphs/contributors)\n\n## License\n\n[MIT](LICENSE) © 2017-present, Xu Liangzhan\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-extends%2Fxe-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fx-extends%2Fxe-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-extends%2Fxe-utils/lists"}