dist/cytoscape.esm.js
function removeData(params) {
    var defaults$$1 = {
      field: 'data',
      event: 'data',
      triggerFnName: 'trigger',
      triggerEvent: false,
      immutableKeys: {} // key => true if immutable

    };
    params = extend({}, defaults$$1, params);
    return function removeDataImpl(names) {
      var p = params;
      var self = this;
      var selfIsArrayLike = self.length !== undefined;
      var all = selfIsArrayLike ? self : [self]; // put in array if not array-like
      // .removeData('foo bar')

      if (string(names)) {
        // then get the list of keys, and delete them
        var keys = names.split(/\s+/);
        var l = keys.length;

        for (var i = 0; i < l; i++) {
          // delete each non-empty key
          var key = keys[i];

          if (emptyString(key)) {
            continue;
          }

          var valid = !p.immutableKeys[key]; // not valid if immutable

          if (valid) {
            for (var i_a = 0, l_a = all.length; i_a < l_a; i_a++) {
              all[i_a]._private[p.field][key] = undefined;
            }
          }
        }

        if (p.triggerEvent) {
          self[p.triggerFnName](p.event);
        } // .removeData()

      } else if (names === undefined) {
        // then delete all keys
        for (var _i_a = 0, _l_a = all.length; _i_a < _l_a; _i_a++) {
          var _privateFields = all[_i_a]._private[p.field];

          var _keys = Object.keys(_privateFields);

          for (var _i2 = 0; _i2 < _keys.length; _i2++) {
            var _key = _keys[_i2];
            var validKeyToDelete = !p.immutableKeys[_key];

            if (validKeyToDelete) {
              _privateFields[_key] = undefined;
            }
          }
        }

        if (p.triggerEvent) {
          self[p.triggerFnName](p.event);
        }
      }

      return self; // maintain chaining
    }; // function
  }
function removeData(params) {
    var defaults$$1 = {
      field: 'data',
      event: 'data',
      triggerFnName: 'trigger',
      triggerEvent: false,
      immutableKeys: {} // key => true if immutable

    };
    params = extend({}, defaults$$1, params);
    return function removeDataImpl(names) {
      var p = params;
      var self = this;
      var selfIsArrayLike = self.length !== undefined;
      var all = selfIsArrayLike ? self : [self]; // put in array if not array-like
      // .removeData('foo bar')

      if (string(names)) {
        // then get the list of keys, and delete them
        var keys = names.split(/\s+/);
        var l = keys.length;

        for (var i = 0; i < l; i++) {
          // delete each non-empty key
          var key = keys[i];

          if (emptyString(key)) {
            continue;
          }

          var valid = !p.immutableKeys[key]; // not valid if immutable

          if (valid) {
            for (var i_a = 0, l_a = all.length; i_a < l_a; i_a++) {
              all[i_a]._private[p.field][key] = undefined;
            }
          }
        }

        if (p.triggerEvent) {
          self[p.triggerFnName](p.event);
        } // .removeData()

      } else if (names === undefined) {
        // then delete all keys
        for (var _i_a = 0, _l_a = all.length; _i_a < _l_a; _i_a++) {
          var _privateFields = all[_i_a]._private[p.field];

          var _keys = Object.keys(_privateFields);

          for (var _i2 = 0; _i2 < _keys.length; _i2++) {
            var _key = _keys[_i2];
            var validKeyToDelete = !p.immutableKeys[_key];

            if (validKeyToDelete) {
              _privateFields[_key] = undefined;
            }
          }
        }

        if (p.triggerEvent) {
          self[p.triggerFnName](p.event);
        }
      }

      return self; // maintain chaining
    }; // function
  }
function removeData ( params ) { var defaults$$1 = { field : 'data' , event : 'data' , triggerFnName : 'trigger' , triggerEvent : false , immutableKeys : { } // key => true if immutable } ; params = extend ( { } , defaults$$1 , params ) ; return function removeDataImpl ( names ) { var p = params ; var self = this ; var selfIsArrayLike = self . length !== undefined ; var all = selfIsArrayLike ? self : [ self ] ; // put in array if not array-like // .removeData('foo bar') if ( string ( names ) ) { // then get the list of keys, and delete them var keys = names . split ( / \s+ / ) ; var l = keys . length ; for ( var i = 0 ; i < l ; i ++ ) { // delete each non-empty key var key = keys [ i ] ; if ( emptyString ( key ) ) { continue ; } var valid = ! p . immutableKeys [ key ] ; // not valid if immutable if ( valid ) { for ( var i_a = 0 , l_a = all . length ; i_a < l_a ; i_a ++ ) { all [ i_a ] . _private [ p . field ] [ key ] = undefined ; } } } if ( p . triggerEvent ) { self [ p . triggerFnName ] ( p . event ) ; } // .removeData() } else if ( names === undefined ) { // then delete all keys for ( var _i_a = 0 , _l_a = all . length ; _i_a < _l_a ; _i_a ++ ) { var _privateFields = all [ _i_a ] . _private [ p . field ] ; var _keys = Object . keys ( _privateFields ) ; for ( var _i2 = 0 ; _i2 < _keys . length ; _i2 ++ ) { var _key = _keys [ _i2 ] ; var validKeyToDelete = ! p . immutableKeys [ _key ] ; if ( validKeyToDelete ) { _privateFields [ _key ] = undefined ; } } } if ( p . triggerEvent ) { self [ p . triggerFnName ] ( p . event ) ; } } return self ; // maintain chaining } ; // function }
data remove data field
data remove data field