1.0.4 • Published 10 years ago

validate.io-object v1.0.4

Weekly downloads
6,313
License
MIT
Repository
github
Last release
10 years ago

Object

NPM version Build Status Coverage Dependencies

Validates if a value is a JavaScript object.

Installation

$ npm install validate.io-object

For use in the browser, use browserify.

Usage

var isObject = require( 'validate.io-object' );

isObject( value )

Validates if a value is a JavaScript object.

var value = {};

var bool = isObject( value );
// returns true

Note: in this implementation, arrays and null are not considered valid objects.

Examples

console.log( isObject( {} ) );
// returns true

console.log( isObject( null ) );
// returns false

console.log( isObject( [] ) );
// returns false

To run the example code from the top-level application directory,

$ node ./examples/index.js

Tests

Unit

Unit tests use the Mocha test framework with Chai assertions. To run the tests, execute the following command in the top-level application directory:

$ make test

All new feature development should have corresponding unit tests to validate correct functionality.

Test Coverage

This repository uses Istanbul as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:

$ make test-cov

Istanbul creates a ./reports/coverage directory. To access an HTML version of the report,

$ make view-cov

License

MIT license.

Copyright

Copyright © 2014-2015. Athan Reines.

@everything-registry/sub-chunk-3040wikipedia-anagramswandbox-apiwandbox-api-updatedsparqling-startext-minertex-equation-to-svgjestanissueutils-upsearchstargazedtravis-ci-access-tokentravis-ci-gettravis-ci-posttravis-ci-puttravis-ci-repo-infotravis-ci-synctopicalutils-deep-getutils-deep-pluckutils-deep-setutils-object-inverseutils-pad-stringutils-merge2utils-pluck1000-packages@abhijithvijayan/portfoliovalidate.io-object-arrayvalidate.iovalidate.io-propertiesvalidate.io-strict-properties@infinitebrahmanuniverse/nolb-valida@moyuyc/github-create-repo@kgryte/circleci-yml@kgryte/editorconfig@kgryte/examples-snippet@kgryte/gitattributes@kgryte/github-get@kgryte/github-repos@kgryte/gitignore@kgryte/http-server@kgryte/https-server@kgryte/jshintignore@kgryte/jshintrc@kgryte/license@kgryte/makefile@kgryte/node-module-snippet@kgryte/npmignore@kgryte/package-json@kgryte/readme@kgryte/server-cluster@kgryte/test-snippet@kgryte/todo@kgryte/travis-ymlmerinonpm-registry-package-infonpm-repo-urlobject-values-to-arrayrawgit-urlnpm-author-download-countsnpm-list-package-dependentsnpm-list-author-packagesnpm-package-download-countsshields-badge-url-codecovshields-badge-url-coverallsshields-badge-url-customshields-badge-url-davidshields-badge-url-github-issuesshields-badge-url-github-socialshields-badge-url-npm-downloadsshields-badge-url-npm-versionshields-badge-url-traviscigix-text-minergithub-starredgithub-subscriptionsgithub-star-repogithub-rank-followersgithub-rank-usersgithub-create-issuegithub-create-issue_modifiedgithub-create-repogithub-create-tokengithub-org-reposgithub-markdown-equation-elementgithub-followersgithub-followinggithub-user-detailsgithub-user-orgsgithub-user-rate-limitgithub-user-reposmake-latexmarkdown-to-restructuredtextabhijithvijayan-portfolioargv-to-objectapp-etcapp-etc-configapi-wandboxchunk-string-arraycompute-zeroscompute-zipconcept-net
1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

11 years ago

0.0.1

11 years ago

0.0.0

11 years ago