Skip to content
/ axis Public

Simple JavaScript type checking module. Returns a Boolean for each type check.

License

Notifications You must be signed in to change notification settings

toddmotto/axis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

axis.js Build Status

A super-simple <1KB type checking module for JavaScript that returns a Boolean for each type check.

axis.isArray([]); // true
axis.isObject({}); // true
axis.isString(''); // true
axis.isDate(new Date()); // true
axis.isRegExp(/test/i); // true
axis.isFunction(function () {}); // true
axis.isBoolean(true); // true
axis.isNumber(1); // true
axis.isNull(null); // true
axis.isUndefined(); // true

Installing with npm

npm install axis.js

Installing with Bower

Use the repository hook:

bower install https://github.com/toddmotto/axis.git

Manual installation

Ensure you're using the files from the dist directory (contains compiled production-ready code). Ensure you place the script before the closing </body> tag.

<body>
  <!-- html above -->
  <script src="dist/axis.js"></script>
  <script>
  // axis module available
  </script>
</body>

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Gulp.

Release history

  • 1.2.1
    • Add main in package.json
  • 1.2.0
    • Small refactoring
  • 1.1.0
  • 1.0.0
    • Initial release

About

Simple JavaScript type checking module. Returns a Boolean for each type check.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •