1.0.1 • Published 9 years ago

validate.io-string-primitive v1.0.1

Weekly downloads
104,449
License
MIT
Repository
github
Last release
9 years ago

String Primitive

NPM version Build Status Coverage Status Dependencies

Validates if a value is a string primitive.

Installation

$ npm install validate.io-string-primitive

For use in the browser, use browserify.

Usage

var isString = require( 'validate.io-string-primitive' );

isString( value )

Validates if a value is a string primitive.

var value = 'beep';

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

Examples

var isString = require( 'validate.io-string-primitive' );

console.log( isString( 'beep' ) );
// returns true

console.log( isString( new String( 'beep' ) ) );
// returns false

console.log( isString( 5 ) );
// 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 © 2015-2016. Athan Reines.

@everything-registry/sub-chunk-3040wandbox-apiwandbox-api-updatedshields-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-traviscitext-minertex-equation-to-svggithub-subscriptionsgithub-starredgithub-star-repogix-text-minerjestanissuegithub-org-reposgithub-rank-followersgithub-rank-usersgithub-create-issuegithub-create-issue_modifiedgithub-create-repogithub-create-tokengithub-user-reposgithub-user-detailsgithub-user-orgsgithub-user-rate-limitgithub-fetch-filegithub-followersgithub-followinggithub-markdown-equation-elementmarkdown-to-restructuredtextopentsdb-datumnpm-repo-urlnpm-list-author-packagesnpm-list-package-dependentsnpm-registry-package-infonpm-package-download-countsnpm-author-download-countsrawgit-urlutils-upsearchstargazedtravis-ci-access-tokentravis-ci-gettravis-ci-posttravis-ci-puttravis-ci-repo-infotravis-ci-syncutils-error-reviverutils-escape-regex-stringutils-extnameutils-configdirutils-deep-getutils-deep-pluckutils-deep-setutils-dirnameutils-left-pad-stringutils-fs-read-alceutils-fs-read-cjsonutils-fs-read-hjsonutils-fs-read-jsonutils-fs-read-json5utils-fs-read-propertiesutils-fs-read-tomlutils-fs-read-yamlutils-function-nameutils-fs-read-iniutils-pad-stringutils-toml-parseutils-regex-from-stringutils-repeat-stringutils-right-pad-stringvalidate.io-color-hexadecimalvalidate.io-email-addressvalidate.io-binary-stringvalidate.io@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/test-snippet@kgryte/todo
1.0.1

9 years ago

1.0.0

10 years ago

0.0.0

10 years ago