From 0758699a03b2e6366af20548bce2de05aa19b695 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Sat, 14 May 2016 21:12:34 -0400 Subject: [PATCH] Add basic usage info --- README.md | 17 +++++++++++++++++ test/spec.js | 6 +++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 777d74b..b0a2402 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,19 @@ # redux-persist-transform-encrypt Encrypt your Redux store. + +## Usage + +```js +import createEncryptor from 'redux-persist-transform-encrypt'; + +const encryptor = createEncryptor({ + secretKey: 'my-super-secret-key' +}); + +persistStore(store, { + transforms: [ + encryptor + ] +}); + +``` diff --git a/test/spec.js b/test/spec.js index e42c075..9463fd0 100644 --- a/test/spec.js +++ b/test/spec.js @@ -1,9 +1,9 @@ import { expect } from 'chai'; -const createTransform = require('../'); +const createEncryptor = require('../'); describe('redux-persist-transform-encrypt', () => { it('can encrypt incoming state', () => { - const encryptTransform = createTransform({ + const encryptTransform = createEncryptor({ secretKey: 'redux-is-awesome' }); @@ -19,7 +19,7 @@ describe('redux-persist-transform-encrypt', () => { }); it('can decrypt outgoing state', () => { - const encryptTransform = createTransform({ + const encryptTransform = createEncryptor({ secretKey: 'redux-is-awesome' });