Skip to content
This repository has been archived by the owner on Apr 2, 2019. It is now read-only.

Commit

Permalink
var->let, formating
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuri Astrakhan committed Feb 8, 2017
1 parent 85552cd commit b75122a
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions lib/sources.js
@@ -1,27 +1,26 @@
'use strict';

var util = require('util');
var pathLib = require('path');
var _ = require('underscore');
var Promise = require('bluebird');
var yaml = require('js-yaml');
let util = require('util'),
pathLib = require('path'),
_ = require('underscore'),
Promise = require('bluebird'),
yaml = require('js-yaml'),
fs = require("fs"),
core = require('./core'),
Err = require('./Err');

var fs = require("fs");
Promise.promisifyAll(fs);

// constant
var sourceByRefProtocol = 'sourceref:';

var core = require('./core');
var Err = require('./Err');
let sourceByRefProtocol = 'sourceref:';

function Sources() {
this._variables = {};
this._sources = {};

// Set up a ref protocol resolver - this way its enough to specify the source
// by sourceref:///?ref=sourceID URL, instead of a full source URL.
var self = this;
let self = this;
core.tilelive.protocols[sourceByRefProtocol] = function (uri, callback) {
Promise.try(function () {
uri = core.normalizeUri(uri);
Expand Down Expand Up @@ -241,7 +240,6 @@ function updateInfo(info, override, source, sourceId) {
}

Sources.prototype._localOrExternalDataAsync = function(values, name) {
let self = this;
return Promise.try(function () {
if (values === undefined) {
core.log('info', name + ' is not set in the config file');
Expand Down

0 comments on commit b75122a

Please sign in to comment.