seanmonstar / insist Goto Github PK
View Code? Open in Web Editor NEWA drop-in replacement for `assert` with a better default message.
License: Mozilla Public License 2.0
A drop-in replacement for `assert` with a better default message.
License: Mozilla Public License 2.0
Testing insist with io.js 2.1.0 in the REPL:
# iojs
> let assert = require('insist');
undefined
> assert.equal(3, 4);
TypeError: Cannot read property 'toString' of undefined
at getMessage (/mnt/devdrive/NodeProjects/asserttests/node_modules/insist/insist.js:84:21)
at Function.insist (/mnt/devdrive/NodeProjects/asserttests/node_modules/insist/insist.js:96:22)
at repl:1:8
at REPLServer.defaultEval (repl.js:155:27)
at bound (domain.js:254:14)
at REPLServer.runBound [as eval] (domain.js:267:12)
at REPLServer.<anonymous> (repl.js:309:12)
at emitOne (events.js:82:20)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:208:10)
trace.fun
is undefined
at
Line 84 in 2f8d497
This module is awesome because its a drop in replacement!
However you just copy over all the assertion methods.
Are there any improvements we can to the others as well ?
Also you should make insist.ok = insist
since assert.ok === assert
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.