Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/component/assert
assert()
https://github.com/component/assert
Last synced: 13 days ago
JSON representation
assert()
- Host: GitHub
- URL: https://github.com/component/assert
- Owner: component
- Created: 2012-08-20T21:30:10.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-07-07T09:46:04.000Z (over 8 years ago)
- Last Synced: 2024-04-14T02:20:30.723Z (9 months ago)
- Language: JavaScript
- Size: 66.4 KB
- Stars: 6
- Watchers: 3
- Forks: 11
- Open Issues: 6
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# assert
C-style assertion lib.
## Example
With custom assertion message:
```js
var assert = require('assert');
assert(expr, 'oh no it broke');
```Or auto-generated assertion message in
browsers that support `Error.captureStackTrace()`:```js
var assert = require('assert');
assert(user.name == 'Tobi');
```## License
MIT