Skip to content

Commit c4d956e

Browse files
committed
added examples for all languages
1 parent 3d11c3a commit c4d956e

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

README.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,34 @@
1-
# JS in JSON Session
1+
# [JS in JSON](https://github.com/WebReflection/js-in-json#readme) Session
22

3+
4+
### JS
35
```js
46
import Session from 'js-in-json-session';
57

6-
const session = new Session(js_in_json_bundle);
8+
const session = new Session(jsonBundle);
79

810
session.add('Module');
9-
session.flush();
11+
const output = session.flush();
12+
```
13+
14+
15+
### PHP
16+
[session.php](./php/session.php)
17+
```php
18+
include(__DIR__.'/session.php');
19+
20+
$session = new JSinJSON\Session($jsonBundle);
21+
$session->add('Module');
22+
$output = $session->flush();
23+
```
24+
25+
26+
### Python
27+
[session.py](./python/session.py)
28+
```python
29+
from session import Session
30+
31+
session = Session(jsonBundle)
32+
session.add('Module')
33+
output = session.flush()
1034
```

0 commit comments

Comments
 (0)