Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

moddle-xml

Package Overview
Dependencies
Maintainers
3
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moddle-xml - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

test/fixtures/model/virtual.json

12

Gruntfile.js

@@ -56,12 +56,2 @@ 'use strict';

}
},
jsdoc: {
dist: {
src: [ '<%= config.sources %>/**/*.js' ],
options: {
destination: 'docs/api',
plugins: [ 'plugins/markdown' ]
}
}
}

@@ -75,3 +65,3 @@ });

grunt.registerTask('default', [ 'jshint', 'test', 'jsdoc' ]);
grunt.registerTask('default', [ 'jshint', 'test' ]);
};

@@ -48,2 +48,6 @@ 'use strict';

if (p.isVirtual) {
return false;
}
// do not serialize defaults

@@ -50,0 +54,0 @@ if (!element.hasOwnProperty(name)) {

{
"name": "moddle-xml",
"version": "0.9.0",
"version": "0.9.1",
"description": "XML import/export for documents described with moddle",

@@ -46,3 +46,2 @@ "directories": {

"grunt-contrib-watch": "~0.5.0",
"grunt-jsdoc": "~0.5.1",
"grunt-mocha-test": "^0.12.4",

@@ -49,0 +48,0 @@ "grunt-release": "^0.7.0",

@@ -20,8 +20,6 @@ 'use strict';

var model = createModel([ 'properties' ]);
var extendedModel = createModel([ 'properties', 'properties-extended' ]);
describe('base', function() {
var model = createModel([ 'properties' ]);
describe('base', function() {
it('should write xml preamble', function() {

@@ -209,2 +207,4 @@ // given

var model = createModel([ 'properties' ]);
it('with line breaks', function() {

@@ -231,2 +231,4 @@

var model = createModel([ 'properties' ]);
it('attribute', function() {

@@ -334,2 +336,6 @@

var model = createModel([ 'properties' ]);
var extendedModel = createModel([ 'properties', 'properties-extended' ]);
it('single', function() {

@@ -375,2 +381,3 @@

it('collection', function() {

@@ -446,4 +453,29 @@

describe('virtual properties', function() {
var model = createModel([ 'virtual' ]);
it('should not serialize virtual property', function() {
// given
var writer = createWriter(model);
var root = model.create('virt:Root', {
child: model.create('virt:Child')
});
// when
var xml = writer.toXML(root);
// then
expect(xml).to.eql(
'<virt:Root xmlns:virt="http://virtual" />');
});
});
describe('body text', function() {
var model = createModel([ 'properties' ]);
it('write body text property', function() {

@@ -514,2 +546,6 @@

var model = createModel([ 'properties' ]);
var noAliasModel = createModel(['noalias']);
it('lowerCase', function() {

@@ -533,4 +569,2 @@

// given
var noAliasModel = createModel(['noalias']);
var writer = createWriter(noAliasModel);

@@ -551,2 +585,5 @@

var model = createModel([ 'properties' ]);
var extendedModel = createModel([ 'properties', 'properties-extended' ]);
it('single package', function() {

@@ -667,2 +704,4 @@

var model = createModel([ 'properties' ]);
it('single', function() {

@@ -669,0 +708,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc