{"_id":"var-validator","_rev":"8-7dd0fcbde9a8e481964a061d5a36e6ea","name":"var-validator","description":"Validate JS variable names","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"var-validator","version":"0.0.1","description":"Validate JS variable names","author":{"name":"Yanick Rochon","email":"yanick.rochon@gmail.com"},"main":"index.js","keywords":["javascript","variable","validation","namespace"],"scripts":{"test":"mocha"},"homepage":"https://github.com/yanickrochon/var-validator","repository":{"type":"git","url":"https://github.com/yanickrochon/var-validator.git"},"bugs":{"url":"https://github.com/yanickrochon/var-validator/issues"},"devDependencies":{"mocha":"^1.20.1","semicov":"^0.1.1-2","should":"^4.0.4"},"license":"MIT","gitHead":"3a458f7db72943bc20f963e5ded411e8464f8ddb","_id":"var-validator@0.0.1","_shasum":"830b536e34998b8c2ca6cf8fac9991ecb2c5eb94","_from":".","_npmVersion":"1.4.16","_npmUser":{"name":"yanickrochon","email":"yanick.rochon@gmail.com"},"maintainers":[{"name":"yanickrochon","email":"yanick.rochon@gmail.com"}],"dist":{"shasum":"830b536e34998b8c2ca6cf8fac9991ecb2c5eb94","tarball":"https://registry.npmjs.org/var-validator/-/var-validator-0.0.1.tgz","integrity":"sha512-La6HqiUJwXJ025QphqjRPaUS29azTfXQaFGXO6uhzgBN0oM3xxjP27JxqmtSjXrTJjYzZFdfPZvboXDq//HGCg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqeJ7qFngHUGT7Ftgj+Qofc1bzVhDL8RyFYi109mRZ5gIgenryYgdohoD5QvM8Uj4J1hsY1LE4PmmOOt9MV2KaULE="}]}},"0.0.2":{"name":"var-validator","version":"0.0.2","description":"Validate JS variable names","author":{"name":"Yanick Rochon","email":"yanick.rochon@gmail.com"},"main":"index.js","keywords":["javascript","variable","validation","namespace"],"scripts":{"test":"mocha"},"homepage":"https://github.com/yanickrochon/var-validator","repository":{"type":"git","url":"https://github.com/yanickrochon/var-validator.git"},"bugs":{"url":"https://github.com/yanickrochon/var-validator/issues"},"devDependencies":{"mocha":"^1.20.1","semicov":"^0.1.1-2","should":"^4.0.4"},"license":"MIT","gitHead":"844701eef54dd9068fbf90c612a4d9eff28b9ae8","_id":"var-validator@0.0.2","_shasum":"c446ead1fb78f7460448bca434673fe4947bb580","_from":".","_npmVersion":"1.4.16","_npmUser":{"name":"yanickrochon","email":"yanick.rochon@gmail.com"},"maintainers":[{"name":"yanickrochon","email":"yanick.rochon@gmail.com"}],"dist":{"shasum":"c446ead1fb78f7460448bca434673fe4947bb580","tarball":"https://registry.npmjs.org/var-validator/-/var-validator-0.0.2.tgz","integrity":"sha512-dTfDKa6bST1B/VlHy0KmqNAxQ5bAzOnrtCxLWV645PS9H6VgKemDXjXCUpWHQ6Tv5q5vXOlTsEen7BX6csjQAA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAtDrhK2glsFJcE8sdsiiYRy0nNP2vQcukT0MAGzsF7FAiB5wP2XoBz5uaXjX2OuRH6B/Jx+lm4d5933Cm2xLtCD6g=="}]}},"0.0.3":{"name":"var-validator","version":"0.0.3","description":"Validate JS variable names","author":{"name":"Yanick Rochon","email":"yanick.rochon@gmail.com"},"main":"index.js","keywords":["javascript","variable","validation","namespace"],"scripts":{"test":"mocha"},"homepage":"https://github.com/yanickrochon/var-validator","repository":{"type":"git","url":"https://github.com/yanickrochon/var-validator.git"},"bugs":{"url":"https://github.com/yanickrochon/var-validator/issues"},"devDependencies":{"mocha":"^1.20.1","semicov":"^0.1.1-2","should":"^4.0.4"},"license":"MIT","gitHead":"d78da3dd6d307100785b6ceda404856f4d12e01f","_id":"var-validator@0.0.3","_shasum":"8c20155a350373233a542d3e5aed046c90891d70","_from":".","_npmVersion":"1.4.24","_npmUser":{"name":"yanickrochon","email":"yanick.rochon@gmail.com"},"maintainers":[{"name":"yanickrochon","email":"yanick.rochon@gmail.com"}],"dist":{"shasum":"8c20155a350373233a542d3e5aed046c90891d70","tarball":"https://registry.npmjs.org/var-validator/-/var-validator-0.0.3.tgz","integrity":"sha512-3eOeI6zmvGiz94Uk2ydn4KUAzbyl9v8ifXnZUV1Y2Jp2Wj94O31veqkZYSd2JQtAMUjnWMO+WJnErTAo5J8b7A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHvjrGQof206Lo/A0Q+OD+UcfSAFfsL7PrUnxtGVgKpMAiEA3ruiJu/Mb8uTe6xA9tzyWuqgr5p1IOBSYCqI1h/iJIs="}]}}},"readme":"# Var-Validator\n\n[![NPM](https://nodei.co/npm/var-validator.png?compact=true)](https://nodei.co/npm/var-validator/)\n\nValidate JS variable names\n\n\n## Install\n\n```\nnpm install var-validator\n```\n\n\n## Features\n\n* Validate if variable names can safely be used in generated scripts\n* Validate if variable is not a reserved keyword\n* Support dot-separated variable scope (i.e. object properties). Ex: `foo.bar`\n* Handle bracket accessors. Ex: `foo[\"bar\"].buz` or `foo['bar'].buz` or `foo[bar].buz`.\n* 100% coverage and use case testing\n\n\n## Usage\n\n* **isValid** *(String[, Object])* : *{boolean}* - validate that the given string is\na valid variable name. The second argument are options overrides. See\n[enable / disable](#enable--disable-features) features for more information.\n\n\n### Simple Usage\n\n```javascript\nvar varVal = require('var-validator');\n\nvar varName = 'foo.bar[\"buz\"]';\n\nconsole.log(varVal.isValid(varName));\n// true\n\nconsole.log(varVal.isValid(varName + ' = 123;'));\n// false\n```\n\n\n### Enable / Disable features\n\n* **enableScope** : *{Boolean}* - set to `true` to enable handling dot-separated\nvariable names. (Default `true`)\n* **enableBrackets** : *{Boolean}* - set to `true` to enable handling brackets in\nvariable names. If set to false, will reject any variable with bracket. (Default `false`)\n* **allowUpperCase** : *{Boolean}* - set to `true` to allow uppercase characters.\n(Default `true`)\n* **allowLowerCase** : *{Boolean}* - set to `true` to allow lowercase characters.\n(Default `true`)\n\n\n**Note**: if `allowUpperCase` and `allowLowerCase` are both `false`, then `isValid`\nwill *always* return false.\n\n\n```javascript\nvar varVal = require('var-validator');\n\nvarVal.enableScope = false;\nvarVal.enableBrackets = false;\n\nvarVal.isValid('foo.bar');\n// false\n\nvarVal.isValid('foo.bar', { enableScope: true });\n// true\n```\n\n\n## Contribution\n\nAll contributions welcome! Every PR **must** be accompanied by their associated\nunit tests!\n\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Mind2Soft <yanick.rochon@mind2soft.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","maintainers":[{"name":"yanickrochon","email":"yanick.rochon@gmail.com"}],"time":{"modified":"2022-06-28T09:05:31.321Z","created":"2014-07-16T01:13:37.473Z","0.0.1":"2014-07-16T01:13:37.473Z","0.0.2":"2014-07-16T01:16:03.397Z","0.0.3":"2014-10-07T20:14:43.403Z"},"homepage":"https://github.com/yanickrochon/var-validator","keywords":["javascript","variable","validation","namespace"],"repository":{"type":"git","url":"https://github.com/yanickrochon/var-validator.git"},"author":{"name":"Yanick Rochon","email":"yanick.rochon@gmail.com"},"bugs":{"url":"https://github.com/yanickrochon/var-validator/issues"},"license":"MIT","readmeFilename":"README.md"}