:arrow_up: Bump lodash from 4.17.15 to 4.17.19 (#4)

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 file changed
tree: 3d67dab07e570be4bef501fe81ab615ce31d9f5c
  1. examples/
  2. src/
  3. test/
  4. .gitignore
  5. .prettierrc
  6. .travis.yml
  7. jest.config.js
  8. LICENSE
  9. package.json
  10. README.md
  11. tsconfig.json
  12. tslint.json
  13. yarn.lock
README.md

redis-watcher

Redis watcher for node-casbin

Installation

# NPM
npm install --save redis-watcher

# Yarn
yarn add redis-watcher

Simple Example

import { RedisWatcher } from 'redis-watcher';
import { newEnforcer } from 'casbin';

// Initialize the watcher.
const watcher = await RedisWatcher.newWatcher('redis://localhost:6379/5');

// Initialize the enforcer.
const enforcer = await newEnforcer('examples/authz_model.conf', 'examples/authz_policy.csv');

enforcer.setWatcher(watcher);

// By default, the watcher's callback is automatically set to the
// enforcer's loadPolicy() in the setWatcher() call.
// We can change it by explicitly setting a callback.
watcher.setUpdateCallback(() => console.log('Casbin need update'));