Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
A very simple library that converts a simple data structure into XML. Doesn't support namespaces or attributes, just very simple output. This allows you to write JSON and XML from the same structure without a middle-man.
It's written in Coffeescript but the JS is included.
$ npm install js2xml
var Js2Xml = require("js2xml").Js2Xml;
var person = {
name: "Phil Jackson",
mood: "Bored",
stuff: [ "love, "puppies", 2, 2.3, { one: { two: "three" } } ],
morestuff: { milkshake: "banana" }
};
var js2xml = new Js2Xml("person", person);
js2xml.toString();
Gives:
<?xml version="1.0" encoding="UTF-8"?>
<person>
<name>Phil Jackson</name>
<mood>Bored</mood>
<stuff>
<item>love</item>
<item>puppies</item>
<item>2</item>
<item>2.3</item>
<item>
<one>
<two>three</two>
</one>
</item>
</stuff>
<morestuff>
<milkshake>banana</milkshake>
</morestuff>
</person>
Here's how you might override the pluralisation function to deal with anonymous list items in Coffeescript:
class AppleXml extends Js2Xml
@map =
"apples": "apple"
pluralisation: ( name ) ->
return @constructor.map[ name ] or "item"
FAQs
Convert arbitary javascript to simple XML. Developed for ApiAxle.
The npm package js2xml receives a total of 52 weekly downloads. As such, js2xml popularity was classified as not popular.
We found that js2xml demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.