Skip to content

API reference

cy.removeScratch — Core > Data and scratch. Cytoscape.js signatures, parameters and return contract.

cy.removeScratch — Core › Data and scratch

Preview · Core › Data and scratch

Read in the complete API reference · All API members

#cy.removeScratch()

// Remove all keys
cy.removeScratch(): this

Delete graph-level scratch keys.

Returns this

this core, for chaining

Example

cy.scratch('temporary', 1);
cy.removeScratch();
console.log(cy.scratch('temporary')); // undefined

Example graph and handle setup

#cy.removeScratch(names)

// Remove the specified keys
cy.removeScratch(names: string): this

Delete graph-level scratch keys.

Parameters
NameDescription
names: string

space-separated key names; omit to clear everything

Returns this

this core, for chaining

Example

cy.scratch('temporary', 1);
cy.removeScratch('temporary');
console.log(cy.scratch('temporary')); // undefined

Example graph and handle setup