<commit_before>Client storage for Meteor
========

 - Bulletproof Client storage functions, `localStorage` with fall-back to `cookies`
 - Works in browser with disabled `localStorage` and `cookies`
 - __100%__ tests coverage

Install:
========
```shell
meteor add ostrio:cstorage
```

ES6 Import:
========
```jsx
import { ClientStorage } from 'meteor/ostrio:cstorage';
```


Usage:
========
#### Get
 - `ClientStorage.get(key)` - Read a record. If the key doesn't exist a null value will be returned.

#### Set
 - `ClientStorage.set('key', value)` - Create/overwrite a value in storage

#### Remove
 - `ClientStorage.remove(key)` - Remove a record

#### Has
 - `ClientStorage.has(key)` - Check whether a record exists, returns boolean value

#### Keys
 - `ClientStorage.keys()` - Returns an array of all storage keys

#### Empty
 - `ClientStorage.empty()` - Empty storage (remove all key/value pairs). __Use with caution! (*May remove cookies which was set not by you*)__

#### Use `cookies` only
To use `cookies` as a driver for `ClientStorage` create new instance of `clientStorage` (*camel-case, first letter __lower-case__*)
```js
var csCookies = new clientStorage('cookies');
```

#### Use `localStorage` only
To use `localStorage` as a driver for `ClientStorage` create new instance of `clientStorage` (*camel-case, first letter __lower-case__*):
```js
var csLocalStorage = new clientStorage('localStorage');
```
or in ES6:
```jsx
import { clientStorage } from 'meteor/ostrio:cstorage';
let csLocalStorage = new clientStorage('localStorage');
```

__Note:__ *All instances shares same cookies and localStorage records!*



Example:
=========
```javascript
ClientStorage.set('locale', 'en'); //true
ClientStorage.set('country', 'usa'); //true
ClientStorage.set('gender', 'male'); //true

ClientStorage.get('gender'); //male

ClientStorage.has('locale'); //true
ClientStorage.has('city'); //false

ClientStorage.keys(); //['locale', 'country', 'gender']

ClientStorage.remove('locale'); //true
ClientStorage.get('locale'); //null

ClientStorage.keys(); //['country', 'gender']

ClientStorage.empty(); //true
ClientStorage.keys(); //[]

ClientStorage.empty(); //false
```<commit_msg>Move to NPM<commit_after>Client storage for Meteor
========

 - Bulletproof Client storage functions, `localStorage` with fall-back to `cookies`
 - Works in browser with disabled `localStorage` and `cookies`
 - __100%__ tests coverage

Install:
========
```shell
meteor add ostrio:cstorage
```

ES6 Import:
========
```jsx
import { ClientStorage } from 'meteor/ostrio:cstorage';
```

# THIS REPOSITORY MOVED TO NPM, see [Client-Storage](https://github.com/VeliovGroup/Client-Storage)
{'fraction_non_alphanumeric': 0.1712251779692769, 'fraction_numerical': 0.0033720494567253652, 'mean_word_length': 5.223776223776224, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '6041463', 'n_tokens_mistral': 820, 'n_tokens_neox': 778, 'n_words': 254}