Skip to content
Snippets Groups Projects
Select Git revision
  • 649e5cb8740e6b9bcc15c7747c99923cf7fa8f7f
  • master default protected
  • v5
3 results

clipboard.js

Blame
  • Andrej Ramašeuski's avatar
    Andrej Ramašeuski authored
    649e5cb8
    History
    clipboard.js 391 B
    /*global MAPJS*/
    MAPJS.MemoryClipboard = function () {
      'use strict';
      var self = this,
          clone = function (something) {
            if (!something) {
              return undefined;
            }
            return JSON.parse(JSON.stringify(something));
          },
          contents;
      self.get = function () {
        return clone(contents);
      };
      self.put = function (c) {
        contents = clone(c);
      };
    };