Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed readme

  • Loading branch information...
commit b895ff2e51489d9cabb255f36f9bc9c6bdb25f0a 1 parent ec7b255
@anfurny authored
Showing with 21 additions and 2 deletions.
  1. +1 −2  README.md
  2. +20 −0 example.html
View
3  README.md
@@ -1,6 +1,5 @@
#Tip-Type
Copyright Alex Rohde 2012. Released under GPL v2
-Version 1.00
* * *
Tip-Type is a javascript library for allowing both type checking, and default parameters in javascript. The type checking is perfromed at runtime and calls a programmer-specified error condition when its assumptions are violated. The ultimate goal of type-checking is to assist in the debugging process.
@@ -37,7 +36,7 @@ After a while, I decided to make this library to cut out the redundancy.
COPYRIGHT
----------------------------------------------------------------
- * ALive Fields V.46
+ * Tip Type 1.00
* http://alexrohde.com/
*
* Copyright 2012, Alex Rohde
View
20 example.html
@@ -0,0 +1,20 @@
+<html>
+ <head>
+ <title>Example</title>
+ </head>
+ <body>
+ <script src="type.js"></script>
+ <script>
+ function multiply(a,b) {
+ var checks = [['x', TYPE.number, 3], ['y', TYPE.number, 13]];
+
+ if(( tmp = TYPE.run(checks)) !== false) return tmp;
+
+ return a*b;
+ }
+
+ console.log(multiply(3, null));
+ </script>
+
+ </body>
+</html>
Please sign in to comment.
Something went wrong with that request. Please try again.