4.0.0 • Published 4 years ago

fi-is v4.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

fi-is Build Status

A small general purpose check library with arithmetic, array, environments, object, presence, regexp, string, time and type check functions. Available for Node.js and the browser.

  • No dependencies
  • AMD, Node & browser ready

Originally meant as a drop-in replacement for and forked from is.js.

Usage

Node.js

Install with NPM:

npm install --save fi-is

Use in you application:

const is = require('fi-is');

is.nodejs(); // true
is.number(0); // true

Browser

Install with Bower:

bower install --save fi-is

Include the non-minified script for testing and development:

<script src="bower_components/fi-is/dist/fi-is.js"></script>

Or include the minified script for production:

<script src="bower_components/fi-is/dist/fi-is.min.js"></script>

Or, better yet, bundle it with the rest of the scripts.

Documentation

Contributing

Please keep you code tidy and readable and document appropriately using the following schema:

/**
 * Checks for awesomeness.
 *
 * @param {String} str It receives a string or whatever.
 *
 * @returns {Boolean} It must return a boolean.
 *
 * @example
 * is.awesome('fi-is'); // true
 * is.awesome(1); // false
 */
is.awesome = function (str) {
 return is.string(str) && str === 'fi-is';
};

If the method has more than one argument or it's unnecessary to include all of them, define the method's interfaces below it:

// ...

is.awesome.api['not'];

To build browser versions (dist):

gulp dist

To run tests:

npm test

To update the documentation files:

gulp docs

One-liner: gulp && npm test

4.0.0

4 years ago

3.1.0

4 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago