code: function(spec, callback) { // eslint-disable-line camelcase
        spec = spec || {};
        if (!spec.ddoc) { throw new Error('index.del() must specify a "ddoc" value'); }
        if (!spec.name) { throw new Error('index.del() must specify a "name" value'); }
        var type = spec.type || 'json';
        var path = encodeURIComponent(db) + '/_index/' +
                   encodeURIComponent(spec.ddoc) + '/' +
                   encodeURIComponent(type) + '/' +
                   encodeURIComponent(spec.name);
        return nano.request({ path: path, method: 'delete' }, callback);
      }
docs: https://console.bluemix.net/docs/services/Cloudant/api/cloudant_query.html#deleting-an-index