{"_id":"is-answer","_rev":"112030","name":"is-answer","description":"Returns true if an answer to a prompt is not undefined, null, an empty object, empty array, or a string with zero length.","dist-tags":{"latest":"0.1.1"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:44:00.000Z","created":"2016-03-11T07:49:54.897Z","0.1.1":"2016-12-31T05:41:37.213Z","0.1.0":"2016-03-11T07:49:54.897Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/is-answer.git"},"versions":{"0.1.1":{"name":"is-answer","description":"Returns true if an answer to a prompt is not undefined, null, an empty object, empty array, or a string with zero length.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/is-answer","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/is-answer.git"},"bugs":{"url":"https://github.com/jonschlinkert/is-answer/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"has-values":"^0.1.4","is-primitive":"^2.0.0","omit-empty":"^0.4.1"},"devDependencies":{"gulp-format-md":"^0.1.11","mocha":"^3.2.0"},"keywords":["answer","is"],"verb":{"run":true,"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"reflinks":["verb"],"lint":{"reflinks":true}},"gitHead":"8c540e610754ee2455a161644a5c6be3ea4a7d6e","_id":"is-answer@0.1.1","_shasum":"cc1c2f186f85cf2650220bde359d862187d49cb6","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"cc1c2f186f85cf2650220bde359d862187d49cb6","size":2172,"noattachment":false,"key":"/is-answer/-/is-answer-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-answer/download/is-answer-0.1.1.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/is-answer-0.1.1.tgz_1483162895231_0.9700611615553498"},"directories":{},"publish_time":1483162897213,"_cnpm_publish_time":1483162897213,"_hasShrinkwrap":false},"0.1.0":{"name":"is-answer","description":"Returns true if an answer to a prompt is not undefined, null, an empty object, empty array, or a string with zero length.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/is-answer","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/is-answer.git"},"bugs":{"url":"https://github.com/jonschlinkert/is-answer/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"has-value":"^0.3.0","is-primitive":"^2.0.0","omit-empty":"^0.3.2"},"devDependencies":{"gulp-format-md":"^0.1.7","mocha":"*"},"verb":{"run":true,"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"reflinks":["verb"],"lint":{"reflinks":true}},"gitHead":"8c540e610754ee2455a161644a5c6be3ea4a7d6e","_id":"is-answer@0.1.0","_shasum":"649dccd3c930cee9649bb30fc64693ecd52e6fb3","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"649dccd3c930cee9649bb30fc64693ecd52e6fb3","size":2143,"noattachment":false,"key":"/is-answer/-/is-answer-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-answer/download/is-answer-0.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/is-answer-0.1.0.tgz_1457682592698_0.5471150318626314"},"directories":{},"publish_time":1457682594897,"_cnpm_publish_time":1457682594897,"_hasShrinkwrap":false}},"readme":"# is-answer [![NPM version](https://img.shields.io/npm/v/is-answer.svg)](https://www.npmjs.com/package/is-answer) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-answer.svg)](https://travis-ci.org/jonschlinkert/is-answer)\n\n> Returns true if an answer to a prompt is not undefined, null, an empty object, empty array, or a string with zero length.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install is-answer --save\n```\n\n## Usage\n\n```js\nvar isAnswer = require('is-answer');\n```\n\n## True\n\n**if the value is a boolean**\n\n```js\nisAnswer(true);\nisAnswer(false);\n//=> true\n```\n\n**if the value is a string**\n\n```js\nisAnswer('foo');\n//=> true\n```\n\n**if the value is a number**\n\n```js\nisAnswer(0);\nisAnswer(1);\n//=> true\n```\n\n**if the value is an object with values**\n\n```js\nisAnswer({a: 'b'});\nisAnswer({a: true});\nisAnswer({a: false});\nisAnswer({a: 0});\n//=> true\n```\n\n**if the value is an array with values**\n\n```js\nisAnswer(['foo']);\nisAnswer([true]);\nisAnswer([false]);\nisAnswer([0]);\n//=> true\n```\n\n## False\n\n**returns false if the value is an empty string**\n\n```js\nisAnswer('');\n//=> false\n```\n\n**returns false if the value is an empty object**\n\n```js\nisAnswer({});\nisAnswer({a: {}});\nisAnswer({a: undefined});\nisAnswer({a: ''});\nisAnswer({a: null});\nisAnswer({a: {b: {}}});\n//=> false\n```\n\n**returns false if the value is an empty array**\n\n```js\nisAnswer([]);\nisAnswer([null]);\nisAnswer([undefined]);\nisAnswer([{}]);\nisAnswer(['']);\n//=> false\n```\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-answer/issues/new).\n\n## Building docs\n\nGenerate readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install verb && npm run docs\n```\n\nOr, if [verb](https://github.com/verbose/verb) is installed globally:\n\n```sh\n$ verb\n```\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d && npm test\n```\n\n## Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert)\nReleased under the [MIT license](https://github.com/jonschlinkert/is-answer/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on March 11, 2016._","_attachments":{},"homepage":"https://github.com/jonschlinkert/is-answer","bugs":{"url":"https://github.com/jonschlinkert/is-answer/issues"},"license":"MIT"}