devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
25 lines (24 loc) • 688 B
JavaScript
/**
* DevExtreme (viz/sankey/data_validator.js)
* Version: 18.2.18
* Build date: Tue Oct 18 2022
*
* Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
;
var graphModule = require("./graph");
var validator = {
validate: function(data, incidentOccurred) {
var result = null;
if (this._hasCycle(data)) {
result = "E2006";
incidentOccurred("E2006")
}
return result
},
_hasCycle: function(data) {
return graphModule.struct.hasCycle(data)
}
};
module.exports = validator;