
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
atom-writer
Advanced tools
ATOMWriter is small class, that provides methods to generate an ATOM feed. XML is still valid by using XMLWriter
With npm do:
$ npm install atom-writer
var XMLWriter = require('xml-writer')
var ATOMWriter = require('atom-writer')
xw = new XMLWriter(true)
aw = new ATOMWriter(xw)
aw
.startFeed('urn:xxx:yyy')
.writeStartIndex(1)
.writeItemsPerPage(10)
.writeTotalResults(100)
.writeTitle('Index of /')
.writeLink('http://exemple.com/feed.xml', 'application/atom+xml', 'self')
aw
.startEntry('urn:xxx:yyy-1')
.writeTitle('Data 1')
.writeLink('/1.xml', 'text/xml')
.writeLink('/1.txt', 'text/plain')
.writeContent('Un', 'text', 'fr')
.writeAuthor('Tata Toto', 'toto@exemple.com')
.writeCategory('term', 'http://exemple.com#scheme')
.endEntry()
aw
.startEntry('urn:xxx-yyy-2')
.writeTitle('Data 2')
.writeLink('2.txt', 'text/plain')
.writeContent('deux', 'text', 'fr')
.writeAuthorRAW('titi.toto@exemple.com')
.endEntry()
aw
.endFeed()
console.log(xw.toString())
Output:
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
<id>urn:xxx:yyy</id>
<updated>2012-07-02T15:22:40Z</updated>
<opensearch:startIndex>1</opensearch:startIndex>
<opensearch:itemsPerPage>10</opensearch:itemsPerPage>
<opensearch:totalResults>100</opensearch:totalResults>
<title type="text">Index of /</title>
<link type="application/atom+xml" href="http://exemple.com/feed.xml" rel="self"/>
<entry>
<id>urn:xxx:yyy-1</id>
<updated>2012-07-02T15:22:40Z</updated>
<published>2012-07-02T15:22:40Z</published>
<title type="text">Data 1</title>
<link type="text/xml" href="/1.xml"/>
<link type="text/plain" href="/1.txt"/>
<content type="text" xml:lang="fr">Un</content>
<author>
<name>Tata Toto</name>
<email>toto@exemple.com</email>
</author>
<category term="term" scheme="http://exemple.com#scheme"/>
</entry>
<entry>
<id>urn:xxx-yyy-2</id>
<updated>2012-07-02T15:22:40Z</updated>
<published>2012-07-02T15:22:40Z</published>
<title type="text">Data 2</title>
<link type="text/plain" href="2.txt"/>
<content type="text" xml:lang="fr">deux</content>
<author>
<name>titi.toto</name>
<email>titi.toto@exemple.com</email>
</author>
</entry>
</feed>
FAQs
To generate ATOM feeds quickly
The npm package atom-writer receives a total of 0 weekly downloads. As such, atom-writer popularity was classified as not popular.
We found that atom-writer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.