https://github.com/zeecoder/z-lock
This CommonJS module can create a simple "lock" that can be checked, locked/unlocked.
https://github.com/zeecoder/z-lock
Last synced: 3 months ago
JSON representation
This CommonJS module can create a simple "lock" that can be checked, locked/unlocked.
- Host: GitHub
- URL: https://github.com/zeecoder/z-lock
- Owner: ZeeCoder
- License: mit
- Created: 2015-06-08T14:25:45.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-09T06:20:43.000Z (over 10 years ago)
- Last Synced: 2025-08-09T19:42:01.327Z (6 months ago)
- Language: JavaScript
- Size: 113 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# z-lock
[](https://travis-ci.org/ZeeCoder/z-lock)
[](http://badge.fury.io/js/z-lock)
Since it's a CommonJS module, it must be used alongside with [Browserify](http://browserify.org/), or
something similar, like [WebPacker](http://webpack.github.io/).
## Example, explanation
```js
var lock = require('z-lock');
var a_lock = new lock();
a_lock.isLocked(); // returns false
// Let the examples tell the story
a_lock.lock();
a_lock.isLocked(); // returns true
a_lock.unLock();
a_lock.isLocked(); // returns false
```
## License
[MIT](LICENSE)