<commit_before>
synchroscope ($YNC)
===================

For interactive web applications that are to be run on multiple devices at the same time,
__synchroscope__ makes it very easy to share scope variables.

Client
------

synchroscope uses `Function.prototype.bind` which is unavailable in some older browsers (such as iOS5 Safari).
Please use [__es5-shim__](https://github.com/kriskowal/es5-shim) if you want to target those.

Symlink or copy `client/sync.js` to your Angular project, and include it like this.

```html
<script src="path/to/es5-shim.js"></script>
<script src="path/to/sync.js"></script>
```

Then, declare a dependency on `synchroscope` module,
ask for the `$ync` service, and just call it:

```javascript
angular.module('myApp', ['synchroscope'])
  .controller('MyController', function($scope, $ync) {

    $scope.hello = 'initial data'
    $scope.world = 'for synchroscope demo'
    $scope.foo = 'TRY IT!'

    var keys = ['hello', 'world']  // keys that you want to share
    var room = 'test'              // room name
    var sync = $ync($scope, keys, room)
    
  })
```

As soon as you call `$ync`, the keys `hello` and `world` will be
synchronized across all browser clients.


Server
------

Let's assume that `io` is a Socket.IO server object obtained by something like this:
`var io = require('socket.io').listen(server)`. Just add this line to your server:

```javascript
require('synchroscope').listen(io.of('/synchroscope'))
```
<commit_msg>yay travis!!<commit_after>
synchroscope ($YNC) [![(Build Status)](https://travis-ci.org/dtinth/synchroscope.png?branch=master)](https://travis-ci.org/dtinth/synchroscope)
===================

For interactive web applications that are to be run on multiple devices at the same time,
__synchroscope__ makes it very easy to share scope variables.

Client
------

synchroscope uses `Function.prototype.bind` which is unavailable in some older browsers (such as iOS5 Safari).
Please use [__es5-shim__](https://github.com/kriskowal/es5-shim) if you want to target those.

Symlink or copy `client/sync.js` to your Angular project, and include it like this.

```html
<script src="path/to/es5-shim.js"></script>
<script src="path/to/sync.js"></script>
```

Then, declare a dependency on `synchroscope` module,
ask for the `$ync` service, and just call it:

```javascript
angular.module('myApp', ['synchroscope'])
  .controller('MyController', function($scope, $ync) {

    $scope.hello = 'initial data'
    $scope.world = 'for synchroscope demo'
    $scope.foo = 'TRY IT!'

    var keys = ['hello', 'world']  // keys that you want to share
    var room = 'test'              // room name
    var sync = $ync($scope, keys, room)
    
  })
```

As soon as you call `$ync`, the keys `hello` and `world` will be
synchronized across all browser clients.


Server
------

Let's assume that `io` is a Socket.IO server object obtained by something like this:
`var io = require('socket.io').listen(server)`. Just add this line to your server:

```javascript
require('synchroscope').listen(io.of('/synchroscope'))
```

{'fraction_non_alphanumeric': 0.15024390243902438, 'fraction_numerical': 0.0026016260162601626, 'mean_word_length': 4.0179445350734095, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3327020', 'n_tokens_mistral': 983, 'n_tokens_neox': 951, 'n_words': 337}