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

moddle-xml

Package Overview
Dependencies
Maintainers
2
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 6.0.0 to 7.0.0

lib/read.js

6

CHANGELOG.md

@@ -9,2 +9,8 @@ # Changelog

## 7.0.0
### Breaking Changes
* `FEAT`: migrate to ES modules. Use `esm` or a ES module aware transpiler to consume this library.
## 6.0.0

@@ -11,0 +17,0 @@

11

index.js

@@ -1,4 +0,7 @@

module.exports = {
Reader: require('./lib/reader'),
Writer: require('./lib/writer')
};
export {
Reader
} from './lib/read';
export {
Writer
} from './lib/write';

@@ -1,15 +0,10 @@

'use strict';
function hasLowerCaseAlias(pkg) {
export function hasLowerCaseAlias(pkg) {
return pkg.xml && pkg.xml.tagAlias === 'lowerCase';
}
module.exports.hasLowerCaseAlias = hasLowerCaseAlias;
module.exports.DEFAULT_NS_MAP = {
export var DEFAULT_NS_MAP = {
'xsi': 'http://www.w3.org/2001/XMLSchema-instance'
};
var XSI_TYPE = module.exports.XSI_TYPE = 'xsi:type';
export var XSI_TYPE = 'xsi:type';

@@ -20,8 +15,8 @@ function serializeFormat(element) {

module.exports.serializeAsType = function(element) {
export function serializeAsType(element) {
return serializeFormat(element) === XSI_TYPE;
};
}
module.exports.serializeAsProperty = function(element) {
export function serializeAsProperty(element) {
return serializeFormat(element) === 'property';
};
}
{
"name": "moddle-xml",
"version": "6.0.0",
"version": "7.0.0",
"description": "XML import/export for documents described with moddle",
"directories": {
"lib": "lib"
},
"scripts": {

@@ -12,3 +9,3 @@ "all": "run-s lint test",

"dev": "npm test -- --watch",
"test": "mocha -r ./test/expect --reporter=spec test/**/*.js"
"test": "mocha -r esm --reporter=spec test/**/*.js"
},

@@ -39,2 +36,3 @@ "repository": {

"license": "MIT",
"sideEffects": false,
"devDependencies": {

@@ -44,2 +42,3 @@ "chai": "^4.1.2",

"eslint-plugin-bpmn-io": "^0.4.1",
"esm": "^3.0.15",
"mocha": "^4.0.1",

@@ -49,7 +48,7 @@ "npm-run-all": "^4.1.1"

"dependencies": {
"min-dash": "^2.0.1",
"moddle": "^3.0.0",
"min-dash": "^2.4.0",
"moddle": "^4.0.1",
"saxen": "^7.0.1",
"tiny-stack": "^0.1.0"
"tiny-stack": "^1.0.0"
}
}

@@ -22,4 +22,7 @@ # moddle-xml

```
var Moddle = require('moddle'),
ModdleXML = require('moddle-xml');
import Moddle from 'moddle';
import {
Reader,
Writer
} from 'moddle-xml';

@@ -88,3 +91,3 @@ var model = new Moddle([ myPackage ]);

var options = { format: false, preamble: false };
var writer = new ModdleXML.Writer(options);
var writer = new Writer(options);

@@ -96,5 +99,7 @@ var xml = writer.toXML(bar);

> __Note:__ As of version `7.0.0` this library exposes ES modules. Use [esm](https://github.com/standard-things/esm) or a ES module aware transpiler such as Webpack, Rollup or Browserify + babelify to consume it.
## License
MIT
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