Installations
npm install dolmx
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
18.15.0
NPM Version
9.5.0
Score
71
Supply Chain
99.3
Quality
77.4
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (100%)
Developer
echosoar
Download Statistics
Total Downloads
2,549
Last Day
5
Last Week
31
Last Month
121
Last Year
641
GitHub Statistics
9 Stars
15 Commits
1 Forks
4 Watching
1 Branches
1 Contributors
Package Meta Information
Latest Version
1.1.2
Package Id
dolmx@1.1.2
Unpacked Size
12.90 kB
Size
4.01 kB
File Count
9
NPM Version
9.5.0
Node Version
18.15.0
Publised On
19 Sept 2024
Total Downloads
Cumulative downloads
Total Downloads
2,549
Last day
25%
5
Compared to previous day
Last week
6.9%
31
Compared to previous week
Last month
9%
121
Compared to previous month
Last year
32.7%
641
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dolmx is a 1kb [XML] parser.
It's designed to be as minimal as possible, no devDependencies, run in browser or node.
Features
- Fast: O(n)
- Tiny: It's 1kb.
- Robust: Written in Typescript, Passed a lot of unit tests.
- Simple: Pass a XML string, get back an javscript Object.
Usage
npm i dolmx --save
Dolmx exports a single function, which parses a string of XML and returns a javscript Object. Couldn't be simpler.
1import dolmx from 'dolmx'; 2 3let xml = ` 4<?xml version="1.0" encoding="UTF-8"?> 5<rss version="2.0"> 6 <channel> 7 <title><![CDATA[知乎热榜]]></title> 8 <link>https://www.zhihu.com/billboard</link> 9 <description><![CDATA[知乎热榜]]></description> 10 <generator>FeedIamGy</generator> 11 <webMaster>feed.iam.gy</webMaster> 12 <language>zh-cn</language> 13 <lastBuildDate>Thu Sep 13 2018 10:42:34 GMT+0800 (CST)</lastBuildDate> 14 <ttl>3000</ttl> 15 <item> 16 <title><![CDATA[苹果公司 2018 年 9 月 12 日举办的秋季发布会有哪些亮点和槽点?]]></title> 17 <description> 18 <![CDATA[在过去的 10 年里,iOS 一点点成长为了苹果最重要的现金牛]]></description> 19 <pubDate>Thu, 13 Sep 2018 02:42:32 GMT</pubDate> 20 <guid>https://www.zhihu.com/question/294345168</guid> 21 <link>https://www.zhihu.com/question/294345168</link> 22 </item> 23 </channel> 24</rss> 25`; 26 27let obj = Dolmx(data); 28console.log(JSON.stringify(obj, null, '\t')); 29/* 30{ 31 "xml": { 32 "_attr": { 33 "version": "1.0", 34 "encoding": "UTF-8" 35 } 36 }, 37 "rss": { 38 "channel": { 39 "title": { 40 "_value": "知乎热榜" 41 }, 42 "link": { 43 "_value": "https://www.zhihu.com/billboard" 44 }, 45 "description": { 46 "_value": "知乎热榜" 47 }, 48 "generator": { 49 "_value": "FeedIamGy" 50 }, 51 "webMaster": { 52 "_value": "feed.iam.gy" 53 }, 54 "language": { 55 "_value": "zh-cn" 56 }, 57 "lastBuildDate": { 58 "_value": "Thu Sep 13 2018 10:42:34 GMT+0800 (CST)" 59 }, 60 "ttl": { 61 "_value": "3000" 62 }, 63 "item": { 64 "title": { 65 "_value": "苹果公司 2018 年 9 月 12 日举办的秋季发布会有哪些亮点和槽点?" 66 }, 67 "description": { 68 "_value": "在过去的 10 年里,iOS 一点点成长为了苹果最重要的现金牛" 69 }, 70 "pubDate": { 71 "_value": "Thu, 13 Sep 2018 02:42:32 GMT" 72 }, 73 "guid": { 74 "_value": "https://www.zhihu.com/question/294345168" 75 }, 76 "link": { 77 "_value": "https://www.zhihu.com/question/294345168" 78 } 79 } 80 }, 81 "_attr": { 82 "version": "2.0" 83 } 84 } 85} 86*/ 87
License
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 0/9 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
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
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 9 are checked with a SAST tool
Score
2.6
/10
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More