new Storage (); new Storage (options); new Storage (url); new Storage (url, options);
765785
function Storage () {
  var self = this;

  self.klass = self.klass || Storage;

  var args = fun(arguments);

  self.url = args.strings().pop() || self.klass.url || null;
  self.options = args.objects().pop() || self.klass.options || {};

  self.client = null;
  self.ready = false;
  self.authorized = false;
  self.connecting = false;
  self.queue = [];

  if (self.id) {
    self.url = self.url && self.url.replace(/^([^\:]+)\:/gmi, self.protocol || self.id);
  }

  var uri = url.parse(self.url || '');

  self.options.server = self.options.server || {};
  self.options.server.protocol = uri.protocol && uri.protocol.replace(':', '');
  self.options.server.username = uri.auth && uri.auth.split(':')[0];
  self.options.server.password = uri.auth && uri.auth.split(':')[1];
  self.options.server.hostname = uri.hostname;
  self.options.server.port = uri.port && parseInt(uri.port, 10);
  self.options.server.db = uri.pathname;

  self.options.client = self.options.client || {};

  self.options = Object.merge(self.klass.defaults.options, self.options, true, false);
  self.options = JSON.parse(JSON.stringify(self.options)); // BUG/FIXME: Sugar.js bug?

  self.events = new Storage.EventEmitter();

  // self.on('error', function() {});

  self.on('connect', function() {
    self.ready = false;
    self.authorized = false;
    self.connecting = true;
  });

  self.on('ready', function(err) {
    if (!err) {
      self.ready = true;
      self.authorized = true;
      self.connecting = false;

      self._commit();
    }
  });

  self.on('end', function() {
    self.ready = false;
    self.authorized = false;
    self.connecting = false;
  });

  self.on('command', function(type, args) {
    self.emit(type, args);

    if (!self.ready) {
      self._push(type, args);
    }
  });

  process.on('exit', function() {
    sync(function() {
      if (typeof self.end === 'function') {
        self.end.sync(self);
      }
    });
  });

  process.on('uncaughtException', function() {
    sync(function() {
      if (typeof self.end === 'function') {
        self.end.sync(self);
      }
    });
  });
}
753234
function (options, storage, throwIfMissing) {
        this.$AbstractStorage.constructor.call(this, options);

        /**
         * Type of html5 storage. E.g. localStorage, sessionStorage
         * @type String
         */
        this.type = storage;

        /**
         * Keep a reference to the global storage object
         * @type Object
         */
        this.storage = Aria.$window[storage];

        /**
         * Event Callback for storage event happening on different windows
         * @type aria.core.CfgBeans:Callback
         */
        this._browserEventCb = null;

        if (!this.storage && throwIfMissing !== false) {
            // This might have been created by AbstractStorage
            if (this._disposeSerializer && this.serializer) {
                this.serializer.$dispose();
            }

            this.$logError(this.UNAVAILABLE, [this.type]);
            throw new Error(this.type);
        }
    }
1276627
def add_source(self, url, *, note=''):
        
        new = {'url': url, 'note': note}
        self.sources.append(new)
781332
def _storage_init(self):
        
        if not self._storage.initialized:
            self._storage.init(self._module._py3_wrapper, self._is_python_2)
503817
def storage_list(storage_name=None):
    """"""
    _args = ['storage-list', '--format=json']
    if storage_name:
        _args.append(storage_name)
    try:
        return json.loads(subprocess.check_output(_args).decode('UTF-8'))
    except ValueError:
        return None
    except OSError as e:
        import errno
        if e.errno == errno.ENOENT:
            # storage-list does not exist
            return []
        raise
317772
function LocalfsStorageAttachments(options) {
  if(options.removePrefix) {
    this.prefix = options.removePrefix;
  }
  attachments.StorageProvider.call(this, options);
}
541980
def _store(self):
        """"""

        name = self.stored_file_name
        # check if current file data is different than stored file list
        # if so, move file list to previous file list, store current to file
        # if not, do nothing
        stored_files = self._load()
        if len(stored_files) != len(self.files):
            # # of items is different, things are new
            new_flag = True
        elif len(stored_files) == len(self.files):
            # # of items equal, check specifically for equality
            if stored_files.eq(self.files).all():
                new_flag = False
            else:
                # not equal, there are new files
                new_flag = True

        if new_flag:
            
            if self.write_to_disk:
                stored_files.to_csv(os.path.join(self.home_path,
                                                 'previous_'+name),
                                    date_format='%Y-%m-%d %H:%M:%S.%f')
                self.files.to_csv(os.path.join(self.home_path, name),
                                date_format='%Y-%m-%d %H:%M:%S.%f')
            else:
                self._previous_file_list = stored_files
                self._current_file_list = self.files.copy()
        return
794707
function _initStorage(options) {
        var self = this;
        var dbInfo = {};
        if (options) {
            for (var i in options) {
                dbInfo[i] = options[i];
            }
        }

        dbInfo.keyPrefix = dbInfo.name + '/';

        self._dbInfo = dbInfo;
        return Promise.resolve();
    }
219540
function URI(options) {
  if (!(this instanceof URI))
    return new URI(options);

  this.address = new Address();
  this.amount = -1;
  this.label = null;
  this.message = null;
  this.request = null;

  if (options)
    this.fromOptions(options);
}
41984
function setupBrowserStorage(){
    if(browser || storageMock){
      if(storageMock){
        store = storageMock;
        storageKey = 'cache-module-storage-mock';
      }
      else{
        var storageType = (config.storage === 'local' || config.storage === 'session') ? config.storage : null;
        store = (storageType && typeof Storage !== void(0)) ? window[storageType + 'Storage'] : false;
        storageKey = (storageType) ? self.type + '-' + storageType + '-storage' : null;
      }
      if(store){
        var db = store.getItem(storageKey);
        try {
          cache = JSON.parse(db) || cache;
        } catch (err) { /* Do nothing */ }
      }
      // If storageType is set but store is not, the desired storage mechanism was not available
      else if(storageType){
        log(true, 'Browser storage is not supported by this browser. Defaulting to an in-memory cache.');
      }
    }
  }
937858
def storage(self):
        
        annotation = get_portal_annotation()
        if annotation.get(NUMBER_STORAGE) is None:
            annotation[NUMBER_STORAGE]  = OIBTree()
        return annotation[NUMBER_STORAGE]
598345
function Provider(storage) {
  Object.defineProperties(this, {

    /**
     * The provider storage.
     *
     * @property storage
     * @type Storage
     * @final
     */
    storage: {value: storage}

  });

  if (!(this.storage instanceof Storage))
    throw new TypeError('storage must be of type Storage');
}
1304000
function(options){
      var url = options.apiUrl + (options.url ? options.url : '');

      if(options.params) {
        url += (url.indexOf('?') === -1 ? '?' : '&') + this.buildParams(options.params);
      }

      return url;
    }
1000278
def storage(self):
        
        annotation = self.get_annotation()
        if annotation.get(ATTACHMENTS_STORAGE) is None:
            annotation[ATTACHMENTS_STORAGE] = OOBTree()
        return annotation[ATTACHMENTS_STORAGE]
12085
function(api, id, key, data) {
  // get storage object
  var obj = _getStorageObject(api, id);
  if(obj === null) {
    // create a new storage object
    obj = {};
  }
  // update key
  obj[key] = data;

  // set storage object
  _setStorageObject(api, id, obj);
}
903945
function NEWLDR( buffer, start, end ) {

  if( !(this instanceof NEWLDR) )
    return new NEWLDR( buffer, start, end )

  /** @type {MBR.NEWLDR.Record} NEWLDR record */
  this.newldr = new NEWLDR.Record()
  /** @type {MBR.AAP.Record} AAP partition entry #0 with special semantics */
  this.aap = new MBR.AAP.Record()

  MBR.call( this, buffer, start, end )

}
284357
function Filecache(options) {
  options = options || {};

  this.directory = options.directory || path.join(__dirname, '/.cache');
  this.fresh = +options.fresh || 500000;
}