Skip to content

Commit

Permalink
Merge pull request #42 from frank-dspeed/patch-1
Browse files Browse the repository at this point in the history
Update can-globals.md
  • Loading branch information
cherifGsoul authored Dec 20, 2018
2 parents 825aea2 + 5f34e61 commit 55f2778
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/can-globals.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ import globals from "can-globals";
const LOCATION = globals.getKeyValue( "location" );
```

New keys can be defined with the `define` method, overwritten with the `set` method, and reset to their original value with the `reset` method.
New keys can be defined with the `define` method, overwritten with the `setKeyValue` method, and reset to their original value with the `reset` method.
All of these methods are demonstrated in the following example

```js
import globals from "can-globals";

globals.define( "foo", "bar" ); // foo === 'bar'

globals.set( "foo", "baz" ); // foo === 'baz'
globals.setKeyValue( "foo", "baz" ); // foo === 'baz'

globals.reset( "foo" ); // foo === 'bar'
```

0 comments on commit 55f2778

Please sign in to comment.