You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GetSet is a JavaScript Micro-library for getting and setting things in HTML Elements. Basically, the idea behind this library is to allow the developer to perform a Get and Set operation in one go.
3
3
4
-
# Usage
4
+
##Usage
5
5
---
6
6
7
-
<pre>
8
-
<code>
9
-
OnYourMarks.GetSet("main-page-heading", "New Heading").Go();
10
-
</code>
11
-
</pre>
7
+
Use-case #1:
8
+
9
+
```js
10
+
OnYourMarks.GetSet("main-page-heading", "New Heading").Go();
11
+
```
12
+
13
+
Use-case #2:
14
+
15
+
```js
16
+
if(OnYourMarks.GetSet("main-page-heading", "New Heading").Go() >=0)
17
+
{
18
+
// Success: Do something.
19
+
}
20
+
else
21
+
{
22
+
// Failure: Do something else.
23
+
}
24
+
```
25
+
The `Go` function returns `0` if the operation was successful, otherwise, it returns `-1`.
0 commit comments