Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var config = require('../../config');
var csv = require('csv');
var getUri = require('get-uri');
var highlight = require('highlight-redux');
var jsonEditor = require('./jsoneditform');
// This import is just for extending json editor with custom editor
var resourceEditor = require('./resource-editor');
var jtsInfer = require('json-table-schema').infer;
var registry = require('./registry');
var request = require('superagent-bluebird-promise');
var _ = require('underscore');
var $ = require('jquery');
var Promise = require('bluebird');
var titleize = require('i')().titleize;
// Upload data file and populate .resource array with item
DataUploadView = backbone.BaseView.extend({
addRow: function(name) {
var descriptorEdit = window.APP.layout.descriptorEdit;
descriptorEdit.layout.form.getEditor('root.resources').add({name: name, path: name});
descriptorEdit.populateTitlesFromNames();
return this;
},
hideLoading: function() { window.APP.layout.splashScreen.activate(false); return this; },
events: {
/**
* Created by Ihor Borysyuk on 28.10.15.
*/
var _ = require('underscore');
var Promise = require('bluebird');
var csvParser = require('papaparse');
var jtsInfer = require('json-table-schema').infer;
var titleize = require('i')().titleize;
function createCSVResourse() {
function _extendResult(result) {
var mixMethods = {
headers: function () {
return (this.data.length) ? this.data[0] : [];
}
};
return _.extend(result, mixMethods);
};
function _parse(csvFile, options) {
return new Promise(
function (resolve, reject) {
var config = {