{"_id":"codecheckjs","_rev":"27-df38217fa4d0ccf0ad6e786a3e1614a0","name":"codecheckjs","description":"Check JavaScript code structure against a set of goals in JavaScript","dist-tags":{"latest":"1.0.11"},"versions":{"1.0.0":{"name":"codecheckjs","version":"1.0.0","description":"Check JavaScript code structure against a set of goals in JavaScript","main":"codecheck.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"http://github.com/bbondy/codecheckjs"},"author":{"name":"Brian R. Bondy"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/bbondy/codecheckjs/issues"},"dependencies":{"mocha":"~1.15.1","underscore":"~1.5.2"},"readme":"codecheck.js\n============\n\ncodecheck.js allows you to check JavaScript code structure against a set of goals in JavaScript.\nIn general, it gives you the ability to check a list of whitelist code snippets and blacklist code snippets against\na sample of code.\n\ncodecheck.js can be used either client or server side.\nClient side supports all modern browser, and also IE8+.\n\n\nEach whitelist and blacklist item is generalized to an assertion.\nEach assertion is itself a mini JavaScript program to match the structure\nof the sample code against.\n\nThe API is very simple. It has 2 important methods:\n\n1. `addAssertion` which takes in a sample of code to match against. It also\n   takes in an extra object which can carry extra state.\n2. `parseSample` which parses the sample and performs a match against all\n   added assertions.  Its callback passes an error if one occurs.\n\nThe API has 2 important members which should be used after a parseSample call:\n\n1. `assertions` holds an array of assertions that were added. Each one has a `hit` property. This property does not take into consideration if the item is marked as a whitelist or blacklist item.\n2. `allSatisfied` will hold true if all whitelist items are matched, and all blacklist items are NOT matched.\n\nExample Usage of the API:\n-------------------------\n\n    var checker = new CodeChecker();\n    checker.addAssertion(\"x = 3;\");\n    checker.addAssertion(\"x++\", { blacklist: true, otherProps: \"hi\" });\n    checker.parseSample(\"if (x) { x = 3; }\", function(err) {\n      console.log('whitelist hit? ' + checker.assertions[0].hit); // true\n      console.log('blacklist hit? ' + checker.assertions[1].hit); // false\n      console.log('all satisfied? ' + checker.allSatisfied); // true\n    });\n\nDependencies:\n-------------\n\n- acorn.js\n- underscore\n\nDemo:\n-----\n\nhttp://codefirefox.com/exercise/intro-exercise\n\nTests:\n------\n\nClient side tests for the exercise module can also be run simply by\nloading ../test/clientside.html on the browser you want to test the exercise\nframework against.\n\nServer side tests are run by using:\n\n```npm test````\n\n\nAssertions:\n-----------\n\nEach assertion will match as long as it appears somewhere in the sample of\ncode.  Even an assertion like `while (x) break;`  will match even if there\nis an if statement before the break on the sample code.\n\nIdentifier names are ignored unless an `__` prefix is added in the assertion.\nIf an `__` prefix is found, the identifier name will be matched, but the `__` prefix will be dropped.\n\nAn extra property of skip can also be provided for advanced filtering.\nIt takes a list of abstract node types and properties to ignore and auto-match.\nSee the Mozilla Parser API for more information:\nhttps://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API\n\n    assertion.skip = [{\"type\" : \"ForInStaTement\", \"prop\": \"left\"},\n                      {\"type\" : \"ForInStatement\", \"prop\": \"right\"}];\n","readmeFilename":"README.md","_id":"codecheckjs@1.0.0","dist":{"shasum":"70859056decae6d26ba4b2c325202ae2dee138c2","tarball":"https://registry.npmjs.org/codecheckjs/-/codecheckjs-1.0.0.tgz","integrity":"sha512-g76th9LtVaub1WPfk/wuypE2R83SorcKCP66oT9S6+dp3OfOeqiorscHA0dtdF3yfgfiSTBiVevIa3v+Z2GUjQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEBKjfdFlGT4wJROaJ6nxspttAAOWZnyzCD4ePHc8D25AiEAhKTUHKV9UXRRHu4SGWlMlNmhgvxPBBaDFZhZXyqWIq8="}]},"_from":"./","_npmVersion":"1.3.11","_npmUser":{"name":"brianbondy","email":"netzen@gmail.com"},"maintainers":[{"name":"brianbondy","email":"netzen@gmail.com"}]},"1.0.1":{"name":"codecheckjs","version":"1.0.1","description":"Check JavaScript code structure against a set of goals in JavaScript","main":"codecheck.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"http://github.com/bbondy/codecheckjs"},"author":{"name":"Brian R. Bondy"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/bbondy/codecheckjs/issues"},"dependencies":{"mocha":"~1.15.1","underscore":"~1.5.2"},"directories":{"test":"test"},"devDependencies":{"mocha":"~1.15.1"},"readme":"codecheck.js\n============\n\ncodecheck.js allows you to check JavaScript code structure against a set of goals in JavaScript.\nIn general, it gives you the ability to check a list of whitelist code snippets and blacklist code snippets against\na sample of code.\n\ncodecheck.js can be used either client or server side.\nClient side supports all modern browser, and also IE8+.\n\n\nEach whitelist and blacklist item is generalized to an assertion.\nEach assertion is itself a mini JavaScript program to match the structure\nof the sample code against.\n\nThe API is very simple. It has 2 important methods:\n\n1. `addAssertion` which takes in a sample of code to match against. It also\n   takes in an extra object which can carry extra state.\n2. `parseSample` which parses the sample and performs a match against all\n   added assertions.  Its callback passes an error if one occurs.\n\nThe API has 2 important members which should be used after a parseSample call:\n\n1. `assertions` holds an array of assertions that were added. Each one has a `hit` property. This property does not take into consideration if the item is marked as a whitelist or blacklist item.\n2. `allSatisfied` will hold true if all whitelist items are matched, and all blacklist items are NOT matched.\n\nExample Usage of the API:\n-------------------------\n\n    var checker = new CodeChecker();\n    checker.addAssertion(\"x = 3;\");\n    checker.addAssertion(\"x++\", { blacklist: true, otherProps: \"hi\" });\n    checker.parseSample(\"if (x) { x = 3; }\", function(err) {\n      console.log('whitelist hit? ' + checker.assertions[0].hit); // true\n      console.log('blacklist hit? ' + checker.assertions[1].hit); // false\n      console.log('all satisfied? ' + checker.allSatisfied); // true\n    });\n\nDependencies:\n-------------\n\n- acorn.js\n- underscore\n\nDemo:\n-----\n\nhttp://codefirefox.com/exercise/intro-exercise\n\nTests:\n------\n\nClient side tests for the exercise module can also be run simply by\nloading ../test/clientside.html on the browser you want to test the exercise\nframework against.\n\nServer side tests are run by using:\n\n```npm test````\n\n\nAssertions:\n-----------\n\nEach assertion will match as long as it appears somewhere in the sample of\ncode.  Even an assertion like `while (x) break;`  will match even if there\nis an if statement before the break on the sample code.\n\nStrict Identifier names:\n------------------------\n\nIdentifier names are ignored unless an `__` prefix is added in the assertion.\nIf an `__` prefix is found, the identifier name will be matched, but the `__` prefix will be dropped.\n\nTracked / Captured Identifier tracking:\n---------------------------------------\n\nStrict identifier names are important if you want to make sure a person is typing things like `document.window` but it is not\nideal for tracking a variable throughout a program.\n\nTo do that you should use tracked / captured identifiers in your assertion.\n\nThe same idea applies as strict identifier names, but instead of using a `__` prefix, you use a `$` prefix.\n\nYou can use any number of tracked identifiers in a single assertion.\n\nThe following assertion: \n\n    var $v1 = 3;\n    var $v2 = 2;\n    $v2 = 3;\n    \nWould match this code:\n\n    var var1 = 3;\n    var var2 = 2;\n    var2 = 3;\n\nCapturing can happen on the first encounter of the $ anywhere to the code sample.\nEven if it is on the right hand side of an assignment, or within a block.\n\nAdvanced Skip usage:\n--------------------\n\nAn extra property of skip can also be provided for advanced filtering.\nIt takes a list of abstract node types and properties to ignore and auto-match.\nSee the Mozilla Parser API for more information:\nhttps://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API\n\n    assertion.skip = [{\"type\" : \"ForInStaTement\", \"prop\": \"left\"},\n                      {\"type\" : \"ForInStatement\", \"prop\": \"right\"}];\n","readmeFilename":"README.md","_id":"codecheckjs@1.0.1","dist":{"shasum":"7b22e9dd6d83ade3c245d8a15a11a9bc60ff19a0","tarball":"https://registry.npmjs.org/codecheckjs/-/codecheckjs-1.0.1.tgz","integrity":"sha512-w207JTbJHE9rlCoF18TXgDmN1Ra6YbTkMppy4OkF7HvCTkMpyUrPqRDefFWhNsZD/LeWsjGhcXXwWTE/G17o2Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHQFXxBhoeMY2QErHD853idbxd2L9KmBQ1embhJuiYCbAiEA3+5yWpyuVZ3GJxM9z1cbKjS04M1qC4VUyj0qlIFiTf8="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"brianbondy","email":"netzen@gmail.com"},"maintainers":[{"name":"brianbondy","email":"netzen@gmail.com"}]},"1.0.2":{"name":"codecheckjs","version":"1.0.2","description":"Check JavaScript code structure against a set of goals in JavaScript","main":"codecheck.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"http://github.com/bbondy/codecheckjs"},"author":{"name":"Brian R. Bondy"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/bbondy/codecheckjs/issues"},"dependencies":{"mocha":"~1.15.1","underscore":"~1.5.2"},"directories":{"test":"test"},"devDependencies":{"mocha":"~1.15.1"},"readme":"codecheck.js\n============\n\ncodecheck.js allows you to check JavaScript code structure against a set of goals in JavaScript.\nIn general, it gives you the ability to check a list of whitelist code snippets and blacklist code snippets against\na sample of code.\n\ncodecheck.js can be used either client or server side.\nClient side supports all modern browser, and also IE8+.\n\n\nEach whitelist and blacklist item is generalized to an assertion.\nEach assertion is itself a mini JavaScript program to match the structure\nof the sample code against.\n\nThe API is very simple. It has 2 important methods:\n\n1. `addAssertion` which takes in a sample of code to match against. It also\n   takes in an extra object which can carry extra state.\n2. `parseSample` which parses the sample and performs a match against all\n   added assertions.  Its callback passes an error if one occurs.\n\nThe API has 2 important members which should be used after a parseSample call:\n\n1. `assertions` holds an array of assertions that were added. Each one has a `hit` property. This property does not take into consideration if the item is marked as a whitelist or blacklist item.\n2. `allSatisfied` will hold true if all whitelist items are matched, and all blacklist items are NOT matched.\n\nExample Usage of the API:\n-------------------------\n\n    var checker = new CodeChecker();\n    checker.addAssertion(\"x = 3;\");\n    checker.addAssertion(\"x++\", { blacklist: true, otherProps: \"hi\" });\n    checker.parseSample(\"if (x) { x = 3; }\", function(err) {\n      console.log('whitelist hit? ' + checker.assertions[0].hit); // true\n      console.log('blacklist hit? ' + checker.assertions[1].hit); // false\n      console.log('all satisfied? ' + checker.allSatisfied); // true\n    });\n\nDependencies:\n-------------\n\n- acorn.js\n- underscore\n\nDemo:\n-----\n\nhttp://codefirefox.com/exercise/intro-exercise\n\nTests:\n------\n\nClient side tests for the exercise module can also be run simply by\nloading ../test/clientside.html on the browser you want to test the exercise\nframework against.\n\nServer side tests are run by using:\n\n```npm test```\n\n\nAssertions:\n-----------\n\nEach assertion will match as long as it appears somewhere in the sample of\ncode.  Even an assertion like `while (x) break;`  will match even if there\nis an if statement before the break on the sample code.\n\nStrict Identifier names:\n------------------------\n\nIdentifier names are ignored unless an `__` prefix is added in the assertion.\nIf an `__` prefix is found, the identifier name will be matched, but the `__` prefix will be dropped.\n\nTracked / Captured Identifier tracking:\n---------------------------------------\n\nStrict identifier names are important if you want to make sure a person is typing things like `document.window` but it is not\nideal for tracking a variable throughout a program.\n\nTo do that you should use tracked / captured identifiers in your assertion.\n\nThe same idea applies as strict identifier names, but instead of using a `__` prefix, you use a `$` prefix.\n\nYou can use any number of tracked identifiers in a single assertion.\n\nThe following assertion: \n\n    var $v1 = 3;\n    var $v2 = 2;\n    $v2 = 3;\n    \nWould match this code:\n\n    var var1 = 3;\n    var var2 = 2;\n    var2 = 3;\n\nCapturing can happen on the first encounter of the $ anywhere to the code sample.\nEven if it is on the right hand side of an assignment, or within a block.\n\nAdvanced Skip usage:\n--------------------\n\nAn extra property of skip can also be provided for advanced filtering.\nIt takes a list of abstract node types and properties to ignore and auto-match.\nSee the Mozilla Parser API for more information:\nhttps://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API\n\n    assertion.skip = [{\"type\" : \"ForInStaTement\", \"prop\": \"left\"},\n                      {\"type\" : \"ForInStatement\", \"prop\": \"right\"}];\n","readmeFilename":"README.md","_id":"codecheckjs@1.0.2","dist":{"shasum":"1c8bede04e006d8872a09087d8e126a5cc001df2","tarball":"https://registry.npmjs.org/codecheckjs/-/codecheckjs-1.0.2.tgz","integrity":"sha512-t85unlkT1Z0b21QoavE/7rTbrMZCjgmAAeL87lzzxS7aD9+ImBc21AodtRAuqvhpA+t7WEkhtZ+absnWKyZLWA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDczOYVuTHIAVWJpdPI3N+7u9SHW6IXBRwgzuwNMpbYsAIgY6wwaYwMKFhRFsPVp07w3E0LSY6KKR+1ftXoNMe7EqI="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"brianbondy","email":"netzen@gmail.com"},"maintainers":[{"name":"brianbondy","email":"netzen@gmail.com"}]},"1.0.3":{"name":"codecheckjs","version":"1.0.3","description":"Check JavaScript code structure against a set of goals in JavaScript","main":"codecheck.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"http://github.com/bbondy/codecheckjs"},"author":{"name":"Brian R. Bondy"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/bbondy/codecheckjs/issues"},"dependencies":{"mocha":"~1.15.1","underscore":"~1.5.2"},"directories":{"test":"test"},"devDependencies":{"mocha":"~1.15.1"},"readme":"codecheck.js\n============\n\ncodecheck.js allows you to check JavaScript code structure against a set of goals in JavaScript.\nIn general, it gives you the ability to check a list of whitelist code snippets and blacklist code snippets against\na sample of code.\n\ncodecheck.js can be used either client or server side.\nClient side supports all modern browser, and also IE8+.\n\n\nEach whitelist and blacklist item is generalized to an assertion.\nEach assertion is itself a mini JavaScript program to match the structure\nof the sample code against.\n\nThe API is very simple. It has 2 important methods:\n\n1. `addAssertion` which takes in a sample of code to match against. It also\n   takes in an extra object which can carry extra state.\n2. `parseSample` which parses the sample and performs a match against all\n   added assertions.  Its callback passes an error if one occurs.\n\nThe API has 2 important members which should be used after a parseSample call:\n\n1. `assertions` holds an array of assertions that were added. Each one has a `hit` property. This property does not take into consideration if the item is marked as a whitelist or blacklist item.\n2. `allSatisfied` will hold true if all whitelist items are matched, and all blacklist items are NOT matched.\n\nExample Usage of the API:\n-------------------------\n\n    var checker = new CodeChecker();\n    checker.addAssertion(\"x = 3;\");\n    checker.addAssertion(\"x++\", { blacklist: true, otherProps: \"hi\" });\n    checker.parseSample(\"if (x) { x = 3; }\", function(err) {\n      console.log('whitelist hit? ' + checker.assertions[0].hit); // true\n      console.log('blacklist hit? ' + checker.assertions[1].hit); // false\n      console.log('all satisfied? ' + checker.allSatisfied); // true\n    });\n\nDependencies:\n-------------\n\n- acorn.js\n- underscore\n\nDemo:\n-----\n\nhttp://codefirefox.com/exercise/intro-exercise\n\nTests:\n------\n\nClient side tests for the exercise module can also be run simply by\nloading ../test/clientside.html on the browser you want to test the exercise\nframework against.\n\nServer side tests are run by using:\n\n```npm test```\n\n\nAssertions:\n-----------\n\nEach assertion will match as long as it appears somewhere in the sample of\ncode.  Even an assertion like `while (x) break;`  will match even if there\nis an if statement before the break on the sample code.\n\nStrict Identifier names:\n------------------------\n\nIdentifier names are ignored unless an `__` prefix is added in the assertion.\nIf an `__` prefix is found, the identifier name will be matched, but the `__` prefix will be dropped.\n\nTracked / Captured Identifier tracking:\n---------------------------------------\n\nStrict identifier names are important if you want to make sure a person is typing things like `document.window` but it is not\nideal for tracking a variable throughout a program.\n\nTo do that you should use tracked / captured identifiers in your assertion.\n\nThe same idea applies as strict identifier names, but instead of using a `__` prefix, you use a `$` prefix.\n\nYou can use any number of tracked identifiers in a single assertion.\n\nThe following assertion: \n\n    var $v1 = 3;\n    var $v2 = 2;\n    $v2 = 3;\n    \nWould match this code:\n\n    var var1 = 3;\n    var var2 = 2;\n    var2 = 3;\n\nCapturing can happen on the first encounter of the $ anywhere to the code sample.\nEven if it is on the right hand side of an assignment, or within a block.\n\nAdvanced Skip usage:\n--------------------\n\nAn extra property of skip can also be provided for advanced filtering.\nIt takes a list of abstract node types and properties to ignore and auto-match.\nSee the Mozilla Parser API for more information:\nhttps://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API\n\n    assertion.skip = [{\"type\" : \"ForInStaTement\", \"prop\": \"left\"},\n                      {\"type\" : \"ForInStatement\", \"prop\": \"right\"}];\n","readmeFilename":"README.md","_id":"codecheckjs@1.0.3","dist":{"shasum":"763bb2e5aee470994b42e050c20320015e1b655b","tarball":"https://registry.npmjs.org/codecheckjs/-/codecheckjs-1.0.3.tgz","integrity":"sha512-TKh5DludrhQk8N9RnIg1JNsViLSTetELy71nZgMccfChb+CVJY+eWqSj85TqNbI3OnArkT9YuPYHuU9pSaRDBA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCv/dwWxwvxNBNjc/aJjeE+NXrVzsc5LvVeK4GMOizUhAIga/qCUHDRzhiKRdI9wItX/YkOJ98JrpFJlpdddiwmkuM="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"brianbondy","email":"netzen@gmail.com"},"maintainers":[{"name":"brianbondy","email":"netzen@gmail.com"}]},"1.0.4":{"name":"codecheckjs","version":"1.0.4","description":"Check JavaScript code structure against a set of goals in JavaScript","main":"codecheck.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"http://github.com/bbondy/codecheckjs"},"author":{"name":"Brian R. Bondy"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/bbondy/codecheckjs/issues"},"dependencies":{"mocha":"~1.15.1","underscore":"~1.5.2"},"directories":{"test":"test"},"devDependencies":{"mocha":"~1.15.1"},"readme":"codecheck.js\n============\n\ncodecheck.js allows you to check JavaScript code structure against a set of goals in JavaScript.\nIn general, it gives you the ability to check a list of whitelist code snippets and blacklist code snippets against\na sample of code.\n\ncodecheck.js can be used either client or server side.\nClient side supports all modern browser, and also IE8+.\n\n\nEach whitelist and blacklist item is generalized to an assertion.\nEach assertion is itself a mini JavaScript program to match the structure\nof the sample code against.\n\nThe API is very simple. It has 2 important methods:\n\n1. `addAssertion` which takes in a sample of code to match against. It also\n   takes in an extra object which can carry extra state.\n2. `parseSample` which parses the sample and performs a match against all\n   added assertions.  Its callback passes an error if one occurs.\n\nThe API has 2 important members which should be used after a parseSample call:\n\n1. `assertions` holds an array of assertions that were added. Each one has a `hit` property. This property does not take into consideration if the item is marked as a whitelist or blacklist item.\n2. `allSatisfied` will hold true if all whitelist items are matched, and all blacklist items are NOT matched.\n\nExample Usage of the API:\n-------------------------\n\n    var checker = new CodeChecker();\n    checker.addAssertion(\"x = 3;\");\n    checker.addAssertion(\"x++\", { blacklist: true, otherProps: \"hi\" });\n    checker.parseSample(\"if (x) { x = 3; }\", function(err) {\n      console.log('whitelist hit? ' + checker.assertions[0].hit); // true\n      console.log('blacklist hit? ' + checker.assertions[1].hit); // false\n      console.log('all satisfied? ' + checker.allSatisfied); // true\n    });\n\nDependencies:\n-------------\n\n- acorn.js\n- underscore\n\nDemo:\n-----\n\nhttp://codefirefox.com/exercise/intro-exercise\n\nTests:\n------\n\nClient side tests for the exercise module can also be run simply by\nloading ../test/clientside.html on the browser you want to test the exercise\nframework against.\n\nServer side tests are run by using:\n\n```npm test```\n\n\nAssertions:\n-----------\n\nEach assertion will match as long as it appears somewhere in the sample of\ncode.  Even an assertion like `while (x) break;`  will match even if there\nis an if statement before the break on the sample code.\n\nStrict Identifier names:\n------------------------\n\nIdentifier names are ignored unless an `__` prefix is added in the assertion.\nIf an `__` prefix is found, the identifier name will be matched, but the `__` prefix will be dropped.\n\nTracked / Captured Identifier tracking:\n---------------------------------------\n\nStrict identifier names are important if you want to make sure a person is typing things like `document.window` but it is not\nideal for tracking a variable throughout a program.\n\nTo do that you should use tracked / captured identifiers in your assertion.\n\nThe same idea applies as strict identifier names, but instead of using a `__` prefix, you use a `$` prefix.\n\nYou can use any number of tracked identifiers in a single assertion.\n\nThe following assertion: \n\n    var $v1 = 3;\n    var $v2 = 2;\n    $v2 = 3;\n    \nWould match this code:\n\n    var var1 = 3;\n    var var2 = 2;\n    var2 = 3;\n\nCapturing can happen on the first encounter of the $ anywhere to the code sample.\nEven if it is on the right hand side of an assignment, or within a block.\n\nContext sensitive expression skips:\n-----------------------------------\n\nLets say you want to skip only in one part of an expression, but not in another. You can do this with skips.\nThese skips use identifiers of `$$`. They indicate that any expression or literal can match.\n\nExample this assertion:\n\n    if($$) {\n      x = 3;\n    }\n\nWill match both this:\n\n    if(x) {\n      x = 3;\n    }\n\n\nand  this:\n    if(x && (y < 3)) {\n      x = 3;\n    }\n\n\nGlobal Skip usage:\n------------------\n\nAn extra property of skip can also be provided for advanced filtering.\nIt takes a list of abstract node types and properties to ignore and auto-match.\nSee the Mozilla Parser API for more information:\nhttps://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API\n\n    assertion.skip = [{\"type\" : \"ForInStaTement\", \"prop\": \"left\"},\n                      {\"type\" : \"ForInStatement\", \"prop\": \"right\"}];\n","readmeFilename":"README.md","_id":"codecheckjs@1.0.4","dist":{"shasum":"dada8855e7943b71348103d9c65988a9160521dd","tarball":"https://registry.npmjs.org/codecheckjs/-/codecheckjs-1.0.4.tgz","integrity":"sha512-/ng3MRQXyUM2DbVU4B0ZpgyTHAANYMlUA6QrgG/q7c8UfsgYNFO5D6E9ADEQZhVXCEnv+K9L/9QXOglLIIDssQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1fPFCTP7bAxiB3tvaXqGRskpgZqw17btspRdUtL2A9QIhALu6AbfDL3butEnLS+9HGQstIkeg7Iq6flMUb9cv1eOX"}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"brianbondy","email":"netzen@gmail.com"},"maintainers":[{"name":"brianbondy","email":"netzen@gmail.com"}]},"1.0.5":{"name":"codecheckjs","version":"1.0.5","description":"Check JavaScript code structure against a set of goals in JavaScript","main":"codecheck.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"http://github.com/bbondy/codecheckjs"},"author":{"name":"Brian R. Bondy"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/bbondy/codecheckjs/issues"},"dependencies":{"mocha":"~1.15.1","underscore":"~1.5.2"},"directories":{"test":"test"},"devDependencies":{"mocha":"~1.15.1"},"readme":"codecheck.js\n============\n\ncodecheck.js allows you to check JavaScript code structure against a set of goals in JavaScript.\nIn general, it gives you the ability to check a list of whitelist code snippets and blacklist code snippets against\na sample of code.\n\ncodecheck.js can be used either client or server side.\nClient side supports all modern browser, and also IE8+.\n\n\nEach whitelist and blacklist item is generalized to an assertion.\nEach assertion is itself a mini JavaScript program to match the structure\nof the sample code against.\n\nThe API is very simple. It has 2 important methods:\n\n1. `addAssertion` which takes in a sample of code to match against. It also\n   takes in an extra object which can carry extra state.\n2. `parseSample` which parses the sample and performs a match against all\n   added assertions.  Its callback passes an error if one occurs.\n\nThe API has 2 important members which should be used after a parseSample call:\n\n1. `assertions` holds an array of assertions that were added. Each one has a `hit` property. This property does not take into consideration if the item is marked as a whitelist or blacklist item.\n2. `allSatisfied` will hold true if all whitelist items are matched, and all blacklist items are NOT matched.\n\nExample Usage of the API:\n-------------------------\n\n    var checker = new CodeChecker();\n    checker.addAssertion(\"x = 3;\");\n    checker.addAssertion(\"x++\", { blacklist: true, otherProps: \"hi\" });\n    checker.parseSample(\"if (x) { x = 3; }\", function(err) {\n      console.log('whitelist hit? ' + checker.assertions[0].hit); // true\n      console.log('blacklist hit? ' + checker.assertions[1].hit); // false\n      console.log('all satisfied? ' + checker.allSatisfied); // true\n    });\n\nDependencies:\n-------------\n\n- acorn.js\n- underscore\n\nDemo:\n-----\n\nhttp://codefirefox.com/exercise/intro-exercise\n\nTests:\n------\n\nClient side tests for the exercise module can also be run simply by\nloading ../test/clientside.html on the browser you want to test the exercise\nframework against.\n\nServer side tests are run by using:\n\n```npm test```\n\n\nAssertions:\n-----------\n\nEach assertion will match as long as it appears somewhere in the sample of\ncode.  Even an assertion like `while (x) break;`  will match even if there\nis an if statement before the break on the sample code.\n\nStrict Identifier names:\n------------------------\n\nIdentifier names are ignored unless an `__` prefix is added in the assertion.\nIf an `__` prefix is found, the identifier name will be matched, but the `__` prefix will be dropped.\n\nTracked / Captured Identifiers:\n-------------------------------\n\nStrict identifier names are important if you want to make sure a person is typing things like `document.window` but it is not\nideal for tracking a variable throughout a program.\n\nTo do that you should use tracked / captured identifiers in your assertion.\n\nThe same idea applies as strict identifier names, but instead of using a `__` prefix, you use a `$` prefix.\n\nYou can use any number of tracked identifiers in a single assertion.\n\nThe following assertion: \n\n    var $v1 = 3;\n    var $v2 = 2;\n    $v2 = 3;\n    \nWould match this code:\n\n    var var1 = 3;\n    var var2 = 2;\n    var2 = 3;\n\nCapturing can happen on the first encounter of the $ anywhere to the code sample.\nEven if it is on the right hand side of an assignment, or within a block.\n\nContext sensitive expression skips:\n-----------------------------------\n\nLets say you want to skip only in one part of an expression, but not in another. You can do this with skips.\nThese skips use identifiers of `$$`. They indicate that any expression or literal can match.\n\nExample this assertion:\n\n    if($$) {\n      x = 3;\n    }\n\nWill match both this:\n\n    if(x) {\n      x = 3;\n    }\n\nand  this:\n\n    if(x && (y < 3)) {\n      x = 3;\n    }\n\n\nGlobal Skip usage:\n------------------\n\nAn extra property of skip can also be provided for advanced filtering.\nIt takes a list of abstract node types and properties to ignore and auto-match.\nSee the Mozilla Parser API for more information:\nhttps://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API\n\n    assertion.skip = [{\"type\" : \"ForInStaTement\", \"prop\": \"left\"},\n                      {\"type\" : \"ForInStatement\", \"prop\": \"right\"}];\n","readmeFilename":"README.md","_id":"codecheckjs@1.0.5","dist":{"shasum":"aef0620cc63af0ace88690e28d286c261aed63f1","tarball":"https://registry.npmjs.org/codecheckjs/-/codecheckjs-1.0.5.tgz","integrity":"sha512-7aw/30Uuix1O9oL3CTzlJGPmmBGpbGbyiPBPea06TsGSWsueVGwfl5Iqc2FXTPOGf093BbrsmImId/g4M+z57Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICfR5ouRXRaIupw+sJTcTgPrPF2LJcaepN6B68N5h8qHAiEA5zq75+i770lutdgZUY2P6+p2CYOH4uU/23ZQFd3vDiQ="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"brianbondy","email":"netzen@gmail.com"},"maintainers":[{"name":"brianbondy","email":"netzen@gmail.com"}]},"1.0.6":{"name":"codecheckjs","version":"1.0.6","description":"Check JavaScript code structure against a set of goals in JavaScript","main":"codecheck.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"http://github.com/bbondy/codecheckjs"},"author":{"name":"Brian R. Bondy"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/bbondy/codecheckjs/issues"},"dependencies":{"mocha":"~1.15.1","underscore":"~1.5.2"},"directories":{"test":"test"},"devDependencies":{"mocha":"~1.15.1"},"readme":"codecheck.js\n============\n\ncodecheck.js allows you to check JavaScript code structure against a set of goals in JavaScript.\nIn general, it gives you the ability to check a list of whitelist code snippets and blacklist code snippets against\na sample of code.\n\ncodecheck.js can be used either client or server side.\nClient side supports all modern browser, and also IE8+.\n\n\nEach whitelist and blacklist item is generalized to an assertion.\nEach assertion is itself a mini JavaScript program to match the structure\nof the sample code against.\n\nThe API is very simple. It has 2 important methods:\n\n1. `addAssertion` which takes in a sample of code to match against. It also\n   takes in an extra object which can carry extra state.\n2. `parseSample` which parses the sample and performs a match against all\n   added assertions.  Its callback passes an error if one occurs.\n\nThe API has 2 important members which should be used after a parseSample call:\n\n1. `assertions` holds an array of assertions that were added. Each one has a `hit` property. This property does not take into consideration if the item is marked as a whitelist or blacklist item.\n2. `allSatisfied` will hold true if all whitelist items are matched, and all blacklist items are NOT matched.\n\nExample Usage of the API:\n-------------------------\n\n    var checker = new CodeCheck();\n    checker.addAssertion(\"x = 3;\");\n    checker.addAssertion(\"x++\", { blacklist: true, otherProps: \"hi\" });\n    checker.parseSample(\"if (x) { x = 3; }\", function(err) {\n      console.log('whitelist hit? ' + checker.assertions[0].hit); // true\n      console.log('blacklist hit? ' + checker.assertions[1].hit); // false\n      console.log('all satisfied? ' + checker.allSatisfied); // true\n    });\n\nDependencies:\n-------------\n\n- acorn.js\n- underscore\n\nDemo:\n-----\n\nhttp://codefirefox.com/exercise/intro-exercise\n\nTests:\n------\n\nClient side tests for the exercise module can also be run simply by\nloading ../test/clientside.html on the browser you want to test the exercise\nframework against.\n\nServer side tests are run by using:\n\n```npm test```\n\n\nAssertions:\n-----------\n\nEach assertion will match as long as it appears somewhere in the sample of\ncode.  Even an assertion like `while (x) break;`  will match even if there\nis an if statement before the break on the sample code.\n\nStrict Identifier names:\n------------------------\n\nIdentifier names are ignored unless an `__` prefix is added in the assertion.\nIf an `__` prefix is found, the identifier name will be matched, but the `__` prefix will be dropped.\n\nTracked / Captured Identifiers:\n-------------------------------\n\nStrict identifier names are important if you want to make sure a person is typing things like `document.window` but it is not\nideal for tracking a variable throughout a program.\n\nTo do that you should use tracked / captured identifiers in your assertion.\n\nThe same idea applies as strict identifier names, but instead of using a `__` prefix, you use a `$` prefix.\n\nYou can use any number of tracked identifiers in a single assertion.\n\nThe following assertion: \n\n    var $v1 = 3;\n    var $v2 = 2;\n    $v2 = 3;\n    \nWould match this code:\n\n    var var1 = 3;\n    var var2 = 2;\n    var2 = 3;\n\nCapturing can happen on the first encounter of the $ anywhere to the code sample.\nEven if it is on the right hand side of an assignment, or within a block.\n\nContext sensitive expression skips:\n-----------------------------------\n\nLets say you want to skip only in one part of an expression, but not in another. You can do this with skips.\nThese skips use identifiers of `$$`. They indicate that any expression or literal can match.\n\nExample this assertion:\n\n    if($$) {\n      x = 3;\n    }\n\nWill match both this:\n\n    if(x) {\n      x = 3;\n    }\n\nand  this:\n\n    if(x && (y < 3)) {\n      x = 3;\n    }\n\n\nGlobal Skip usage:\n------------------\n\nAn extra property of skip can also be provided for advanced filtering.\nIt takes a list of abstract node types and properties to ignore and auto-match.\nSee the Mozilla Parser API for more information:\nhttps://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API\n\n    assertion.skip = [{\"type\" : \"ForInStaTement\", \"prop\": \"left\"},\n                      {\"type\" : \"ForInStatement\", \"prop\": \"right\"}];\n","readmeFilename":"README.md","homepage":"https://github.com/bbondy/codecheckjs","_id":"codecheckjs@1.0.6","dist":{"shasum":"0ab1033914c5d50553673bbda65491f738109fbe","tarball":"https://registry.npmjs.org/codecheckjs/-/codecheckjs-1.0.6.tgz","integrity":"sha512-z3D0K/0X/nxn7bDeykYzP8xW+S/rjhaL94HrpTXoLcO9bczd4xn6R+p6VEyoEj1bTU5P/lhCTn9WOu/Z3LAHLA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICJAO+A6JqlwMPATbIdipXoCfTsFQwDYaM+4L6sGkANrAiAdDhFhciynkqLCkZoODg4I6DGcdBSfslD4e+U66lUXkA=="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"brianbondy","email":"netzen@gmail.com"},"maintainers":[{"name":"brianbondy","email":"netzen@gmail.com"}]},"1.0.7":{"name":"codecheckjs","version":"1.0.7","description":"Check JavaScript code structure against a set of goals in JavaScript","main":"codecheck.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"http://github.com/bbondy/codecheckjs"},"author":{"name":"Brian R. Bondy"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/bbondy/codecheckjs/issues"},"dependencies":{"mocha":"~1.15.1","underscore":"~1.5.2"},"directories":{"test":"test"},"devDependencies":{"mocha":"~1.15.1"},"readme":"codecheck.js\n============\n\ncodecheck.js allows you to check JavaScript code structure against a set of goals in JavaScript.\nIn general, it gives you the ability to check a list of whitelist code snippets and blacklist code snippets against\na sample of code.\n\ncodecheck.js can be used either client or server side.\nClient side supports all modern browser, and also IE8+.\n\n\nEach whitelist and blacklist item is generalized to an assertion.\nEach assertion is itself a mini JavaScript program to match the structure\nof the sample code against.\n\nThe API is very simple. It has 2 important methods:\n\n1. `addAssertion` which takes in a sample of code to match against. It also\n   takes in an extra object which can carry extra state.\n2. `parseSample` which parses the sample and performs a match against all\n   added assertions.  Its callback passes an error if one occurs.\n\nThe API has 2 important members which should be used after a parseSample call:\n\n1. `assertions` holds an array of assertions that were added. Each one has a `hit` property. This property does not take into consideration if the item is marked as a whitelist or blacklist item.\n2. `allSatisfied` will hold true if all whitelist items are matched, and all blacklist items are NOT matched.\n\nExample Usage of the API:\n-------------------------\n\n    var checker = new CodeCheck();\n    checker.addAssertion(\"x = 3;\");\n    checker.addAssertion(\"x++\", { blacklist: true, otherProps: \"hi\" });\n    checker.parseSample(\"if (x) { x = 3; }\", function(err) {\n      console.log('whitelist hit? ' + checker.assertions[0].hit); // true\n      console.log('blacklist hit? ' + checker.assertions[1].hit); // false\n      console.log('all satisfied? ' + checker.allSatisfied); // true\n    });\n\nDependencies:\n-------------\n\n- acorn.js\n- underscore\n\nDemo:\n-----\n\nhttp://codefirefox.com/exercise/intro-exercise\n\nTests:\n------\n\nClient side tests for the exercise module can also be run simply by\nloading ../test/clientside.html on the browser you want to test the exercise\nframework against.\n\nServer side tests are run by using:\n\n```npm test```\n\n\nAssertions:\n-----------\n\nEach assertion will match as long as it appears somewhere in the sample of\ncode.  Even an assertion like `while (x) break;`  will match even if there\nis an if statement before the break on the sample code.\n\nStrict Identifier names:\n------------------------\n\nIdentifier names are ignored unless an `__` prefix is added in the assertion.\nIf an `__` prefix is found, the identifier name will be matched, but the `__` prefix will be dropped.\n\nTracked / Captured Identifiers:\n-------------------------------\n\nStrict identifier names are important if you want to make sure a person is typing things like `document.window` but it is not\nideal for tracking a variable throughout a program.\n\nTo do that you should use tracked / captured identifiers in your assertion.\n\nThe same idea applies as strict identifier names, but instead of using a `__` prefix, you use a `$` prefix.\n\nYou can use any number of tracked identifiers in a single assertion.\n\nThe following assertion: \n\n    var $v1 = 3;\n    var $v2 = 2;\n    $v2 = 3;\n    \nWould match this code:\n\n    var var1 = 3;\n    var var2 = 2;\n    var2 = 3;\n\nCapturing can happen on the first encounter of the $ anywhere to the code sample.\nEven if it is on the right hand side of an assignment, or within a block.\n\nContext sensitive expression skips:\n-----------------------------------\n\nLets say you want to skip only in one part of an expression, but not in another. You can do this with skips.\nThese skips use identifiers of `$$`. They indicate that any expression or literal can match.\n\nExample this assertion:\n\n    if($$) {\n      x = 3;\n    }\n\nWill match both this:\n\n    if(x) {\n      x = 3;\n    }\n\nand  this:\n\n    if(x && (y < 3)) {\n      x = 3;\n    }\n\n\nGlobal Skip usage:\n------------------\n\nAn extra property of skip can also be provided for advanced filtering.\nIt takes a list of abstract node types and properties to ignore and auto-match.\nSee the Mozilla Parser API for more information:\nhttps://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API\n\n    assertion.skip = [{\"type\" : \"ForInStaTement\", \"prop\": \"left\"},\n                      {\"type\" : \"ForInStatement\", \"prop\": \"right\"}];\n","readmeFilename":"README.md","_id":"codecheckjs@1.0.7","dist":{"shasum":"31198802ed78251e9314bc923a669ec49e2f8901","tarball":"https://registry.npmjs.org/codecheckjs/-/codecheckjs-1.0.7.tgz","integrity":"sha512-x0n1W2VERJnkSojHTU0dbQXIbtxSxyF7eCBC1r5nxny3QVTEjd91czxqRqcLJG8SmzFKnu6SJ3ytO//yASFplw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCo6jPuILBAAsoaOrPZiS1R+OrHfORj7geHVWqVLk5IkQIhAIUKxti5Y6mWcpviapfibCO6FYE/lxg9KDEJ+GLVlY86"}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"brianbondy","email":"netzen@gmail.com"},"maintainers":[{"name":"brianbondy","email":"netzen@gmail.com"}]},"1.0.8":{"name":"codecheckjs","version":"1.0.8","description":"Check JavaScript code structure against a set of goals in JavaScript","main":"codecheck.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"http://github.com/bbondy/codecheckjs"},"author":{"name":"Brian R. Bondy"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/bbondy/codecheckjs/issues"},"dependencies":{"mocha":"~1.15.1","underscore":"~1.5.2"},"directories":{"test":"test"},"devDependencies":{"mocha":"~1.15.1"},"readme":"codecheck.js\n============\n\ncodecheck.js allows you to check JavaScript code structure against a set of goals in JavaScript.\nIn general, it gives you the ability to check a list of whitelist code snippets and blacklist code snippets against\na sample of code.\n\ncodecheck.js can be used either client or server side.\nClient side supports all modern browser, and also IE8+.\n\n\nEach whitelist and blacklist item is generalized to an assertion.\nEach assertion is itself a mini JavaScript program to match the structure\nof the sample code against.\n\nThe API is very simple. It has 2 important methods:\n\n1. `addAssertion` which takes in a sample of code to match against. It also\n   takes in an extra object which can carry extra state.\n2. `parseSample` which parses the sample and performs a match against all\n   added assertions.  Its callback passes an error if one occurs.\n\nThe API has 2 important members which should be used after a parseSample call:\n\n1. `assertions` holds an array of assertions that were added. Each one has a `hit` property. This property does not take into consideration if the item is marked as a whitelist or blacklist item.\n2. `allSatisfied` will hold true if all whitelist items are matched, and all blacklist items are NOT matched.\n\nExample Usage of the API:\n-------------------------\n\n    var checker = new CodeCheck();\n    checker.addAssertion(\"x = 3;\");\n    checker.addAssertion(\"x++\", { blacklist: true, otherProps: \"hi\" });\n    checker.parseSample(\"if (x) { x = 3; }\", function(err) {\n      console.log('whitelist hit? ' + checker.assertions[0].hit); // true\n      console.log('blacklist hit? ' + checker.assertions[1].hit); // false\n      console.log('all satisfied? ' + checker.allSatisfied); // true\n    });\n\nDependencies:\n-------------\n\n- acorn.js\n- underscore\n\nDemo:\n-----\n\nhttp://codefirefox.com/exercise/intro-exercise\n\nTests:\n------\n\nClient side tests for the exercise module can also be run simply by\nloading ../test/clientside.html on the browser you want to test the exercise\nframework against.\n\nServer side tests are run by using:\n\n```npm test```\n\n\nAssertions:\n-----------\n\nEach assertion will match as long as it appears somewhere in the sample of\ncode.  Even an assertion like `while (x) break;`  will match even if there\nis an if statement before the break on the sample code.\n\nStrict Identifier names:\n------------------------\n\nIdentifier names are ignored unless an `__` prefix is added in the assertion.\nIf an `__` prefix is found, the identifier name will be matched, but the `__` prefix will be dropped.\n\nStrict literal matching:\n------------------------\n\nLiteral values are always matched strictly. If you'd like any match just use $$ instead.\n\nAn asseriton of:\n\n    var x = 3;\n\nWill not match:\n\n    var x = 4;\n\n\nBut an assertion fo:\n\n    var x = $$;\n\nWould match either 3 or 4.\n\n\nTracked / Captured Identifiers:\n-------------------------------\n\nStrict identifier names are important if you want to make sure a person is typing things like `document.window` but it is not\nideal for tracking a variable throughout a program.\n\nTo do that you should use tracked / captured identifiers in your assertion.\n\nThe same idea applies as strict identifier names, but instead of using a `__` prefix, you use a `$` prefix.\n\nYou can use any number of tracked identifiers in a single assertion.\n\nThe following assertion: \n\n    var $v1 = 3;\n    var $v2 = 2;\n    $v2 = 3;\n    \nWould match this code:\n\n    var var1 = 3;\n    var var2 = 2;\n    var2 = 3;\n\nCapturing can happen on the first encounter of the $ anywhere to the code sample.\nEven if it is on the right hand side of an assignment, or within a block.\n\nContext sensitive expression skips:\n-----------------------------------\n\nLets say you want to skip only in one part of an expression, but not in another. You can do this with skips.\nThese skips use identifiers of `$$`. They indicate that any expression or literal can match.\n\nExample this assertion:\n\n    if($$) {\n      x = 3;\n    }\n\nWill match both this:\n\n    if(x) {\n      x = 3;\n    }\n\nand  this:\n\n    if(x && (y < 3)) {\n      x = 3;\n    }\n\n\nGlobal Skip usage:\n------------------\n\nAn extra property of skip can also be provided for advanced filtering.\nIt takes a list of abstract node types and properties to ignore and auto-match.\nSee the Mozilla Parser API for more information:\nhttps://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API\n\n    assertion.skip = [{\"type\" : \"ForInStaTement\", \"prop\": \"left\"},\n                      {\"type\" : \"ForInStatement\", \"prop\": \"right\"}];\n","readmeFilename":"README.md","_id":"codecheckjs@1.0.8","dist":{"shasum":"51f3b624783df9d73999ad689e5ccf289fccbc14","tarball":"https://registry.npmjs.org/codecheckjs/-/codecheckjs-1.0.8.tgz","integrity":"sha512-bCNrSa8SYKCbTDWaWva6tAUMy3re38nAAggsr37hOp9DYDvaeWvceU33spLnxUaWJKPT7v81W1Bj7Sz1/V+yyw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDer+8/wcwwSpLLMqiWi44X49B3YjXaCSJBcrIUWPzt5AIhANU2mSn6EECeM5uAlLP8wEZG11mSVYxIWRHs+hV/o2+D"}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"brianbondy","email":"netzen@gmail.com"},"maintainers":[{"name":"brianbondy","email":"netzen@gmail.com"}]},"1.0.9":{"name":"codecheckjs","version":"1.0.9","description":"Check JavaScript code structure against a set of goals in JavaScript","main":"codecheck.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"http://github.com/bbondy/codecheckjs"},"author":{"name":"Brian R. Bondy"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/bbondy/codecheckjs/issues"},"dependencies":{"mocha":"~1.15.1","underscore":"~1.5.2"},"directories":{"test":"test"},"devDependencies":{"mocha":"~1.15.1"},"readme":"codecheck.js\n============\n\ncodecheck.js allows you to check JavaScript code structure against a set of goals in JavaScript.\nIn general, it gives you the ability to check a list of whitelist code snippets and blacklist code snippets against\na sample of code.\n\ncodecheck.js can be used either client or server side.\nClient side supports all modern browser, and also IE8+.\n\n\nEach whitelist and blacklist item is generalized to an assertion.\nEach assertion is itself a mini JavaScript program to match the structure\nof the sample code against.\n\nThe API is very simple. It has 2 important methods:\n\n1. `addAssertion` which takes in a sample of code to match against. It also\n   takes in an extra object which can carry extra state.\n2. `parseSample` which parses the sample and performs a match against all\n   added assertions.  Its callback passes an error if one occurs.\n\nThe API has 2 important members which should be used after a parseSample call:\n\n1. `assertions` holds an array of assertions that were added. Each one has a `hit` property. This property does not take into consideration if the item is marked as a whitelist or blacklist item.\n2. `allSatisfied` will hold true if all whitelist items are matched, and all blacklist items are NOT matched.\n\nExample Usage of the API:\n-------------------------\n\n    var checker = new CodeCheck();\n    checker.addAssertion(\"x = 3;\");\n    checker.addAssertion(\"x++\", { blacklist: true, otherProps: \"hi\" });\n    checker.parseSample(\"if (x) { x = 3; }\", function(err) {\n      console.log('whitelist hit? ' + checker.assertions[0].hit); // true\n      console.log('blacklist hit? ' + checker.assertions[1].hit); // false\n      console.log('all satisfied? ' + checker.allSatisfied); // true\n    });\n\nDependencies:\n-------------\n\n- acorn.js\n- underscore\n\nDemo:\n-----\n\nhttp://codefirefox.com/exercise/intro-exercise\n\nTests:\n------\n\nClient side tests for the exercise module can also be run simply by\nloading ../test/clientside.html on the browser you want to test the exercise\nframework against.\n\nServer side tests are run by using:\n\n```npm test```\n\n\nAssertions:\n-----------\n\nEach assertion will match as long as it appears somewhere in the sample of\ncode.  Even an assertion like `while (x) break;`  will match even if there\nis an if statement before the break on the sample code.\n\nStrict Identifier names:\n------------------------\n\nIdentifier names are ignored unless an `__` prefix is added in the assertion.\nIf an `__` prefix is found, the identifier name will be matched, but the `__` prefix will be dropped.\n\nStrict literal matching:\n------------------------\n\nLiteral values are always matched strictly. If you'd like any match just use $$ instead.\n\nAn asseriton of:\n\n    var x = 3;\n\nWill not match:\n\n    var x = 4;\n\n\nBut an assertion fo:\n\n    var x = $$;\n\nWould match either 3 or 4.\n\n\nTracked / Captured Identifiers:\n-------------------------------\n\nStrict identifier names are important if you want to make sure a person is typing things like `document.window` but it is not\nideal for tracking a variable throughout a program.\n\nTo do that you should use tracked / captured identifiers in your assertion.\n\nThe same idea applies as strict identifier names, but instead of using a `__` prefix, you use a `$` prefix.\n\nYou can use any number of tracked identifiers in a single assertion.\n\nThe following assertion: \n\n    var $v1 = 3;\n    var $v2 = 2;\n    $v2 = 3;\n    \nWould match this code:\n\n    var var1 = 3;\n    var var2 = 2;\n    var2 = 3;\n\nCapturing can happen on the first encounter of the $ anywhere to the code sample.\nEven if it is on the right hand side of an assignment, or within a block.\n\nContext sensitive expression skips:\n-----------------------------------\n\nLets say you want to skip only in one part of an expression, but not in another. You can do this with skips.\nThese skips use identifiers of `$$`. They indicate that any expression or literal can match.\n\nExample this assertion:\n\n    if($$) {\n      x = 3;\n    }\n\nWill match both this:\n\n    if(x) {\n      x = 3;\n    }\n\nand  this:\n\n    if(x && (y < 3)) {\n      x = 3;\n    }\n\n\nGlobal Skip usage:\n------------------\n\nAn extra property of skip can also be provided for advanced filtering.\nIt takes a list of abstract node types and properties to ignore and auto-match.\nSee the Mozilla Parser API for more information:\nhttps://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API\n\n    assertion.skip = [{\"type\" : \"ForInStaTement\", \"prop\": \"left\"},\n                      {\"type\" : \"ForInStatement\", \"prop\": \"right\"}];\n","readmeFilename":"README.md","_id":"codecheckjs@1.0.9","dist":{"shasum":"e073320e880b8e19ce7756777df5c628a93ed44e","tarball":"https://registry.npmjs.org/codecheckjs/-/codecheckjs-1.0.9.tgz","integrity":"sha512-Ubgd/q6iiHSk4fUzEYPNCa5Ys0T5DqcQQyr9o2Cl2AURFBh2nE+luNTK/vXs2W3NfTxyz5ysN+EOS3LKKoL+/w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFY3p29NfQBPzUa8PEg2dSpby+6ujTpu86vP4UJb60mPAiB2wyCTLKUr0Wjf9uZfge6rZgKLi6r47w9bbFAQ29LqGg=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"brianbondy","email":"netzen@gmail.com"},"maintainers":[{"name":"brianbondy","email":"netzen@gmail.com"}]},"1.0.10":{"name":"codecheckjs","version":"1.0.10","description":"Check JavaScript code structure against a set of goals in JavaScript","main":"codecheck.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"http://github.com/bbondy/codecheckjs"},"author":{"name":"Brian R. Bondy"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/bbondy/codecheckjs/issues"},"dependencies":{"mocha":"~1.15.1","underscore":"~1.5.2"},"directories":{"test":"test"},"devDependencies":{"mocha":"~1.15.1"},"readme":"codecheck.js\n============\n\ncodecheck.js allows you to check JavaScript code structure against a set of goals in JavaScript.\nIn general, it gives you the ability to check a list of whitelist code snippets and blacklist code snippets against\na sample of code.\n\ncodecheck.js can be used either client or server side.\nClient side supports all modern browser, and also IE8+.\n\n\nEach whitelist and blacklist item is generalized to an assertion.\nEach assertion is itself a mini JavaScript program to match the structure\nof the sample code against.\n\nThe API is very simple. It has 2 important methods:\n\n1. `addAssertion` which takes in a sample of code to match against. It also\n   takes in an extra object which can carry extra state.\n2. `parseSample` which parses the sample and performs a match against all\n   added assertions.  Its callback passes an error if one occurs.\n\nThe API has 2 important members which should be used after a parseSample call:\n\n1. `assertions` holds an array of assertions that were added. Each one has a `hit` property. This property does not take into consideration if the item is marked as a whitelist or blacklist item.\n2. `allSatisfied` will hold true if all whitelist items are matched, and all blacklist items are NOT matched.\n\nExample Usage of the API:\n-------------------------\n\n    var checker = new CodeCheck();\n    checker.addAssertion(\"x = 3;\");\n    checker.addAssertion(\"x++\", { blacklist: true, otherProps: \"hi\" });\n    checker.parseSample(\"if (x) { x = 3; }\", function(err) {\n      console.log('whitelist hit? ' + checker.assertions[0].hit); // true\n      console.log('blacklist hit? ' + checker.assertions[1].hit); // false\n      console.log('all satisfied? ' + checker.allSatisfied); // true\n    });\n\nDependencies:\n-------------\n\n- acorn.js\n- underscore\n\nDemo:\n-----\n\nhttp://codefirefox.com/exercise/intro-exercise\n\nTests:\n------\n\nClient side tests for the exercise module can also be run simply by\nloading ../test/clientside.html on the browser you want to test the exercise\nframework against.\n\nServer side tests are run by using:\n\n```npm test```\n\n\nAssertions:\n-----------\n\nEach assertion will match as long as it appears somewhere in the sample of\ncode.  Even an assertion like `while (x) break;`  will match even if there\nis an if statement before the break on the sample code.\n\nStrict Identifier names:\n------------------------\n\nIdentifier names are ignored unless an `__` prefix is added in the assertion.\nIf an `__` prefix is found, the identifier name will be matched, but the `__` prefix will be dropped.\n\nStrict literal matching:\n------------------------\n\nLiteral values are always matched strictly. If you'd like any match just use $$ instead.\n\nAn asseriton of:\n\n    var x = 3;\n\nWill not match:\n\n    var x = 4;\n\n\nBut an assertion fo:\n\n    var x = $$;\n\nWould match either 3 or 4.\n\n\nTracked / Captured Identifiers:\n-------------------------------\n\nStrict identifier names are important if you want to make sure a person is typing things like `document.window` but it is not\nideal for tracking a variable throughout a program.\n\nTo do that you should use tracked / captured identifiers in your assertion.\n\nThe same idea applies as strict identifier names, but instead of using a `__` prefix, you use a `$` prefix.\n\nYou can use any number of tracked identifiers in a single assertion.\n\nThe following assertion: \n\n    var $v1 = 3;\n    var $v2 = 2;\n    $v2 = 3;\n    \nWould match this code:\n\n    var var1 = 3;\n    var var2 = 2;\n    var2 = 3;\n\nCapturing can happen on the first encounter of the $ anywhere to the code sample.\nEven if it is on the right hand side of an assignment, or within a block.\n\nContext sensitive expression skips:\n-----------------------------------\n\nLets say you want to skip only in one part of an expression, but not in another. You can do this with skips.\nThese skips use identifiers of `$$`. They indicate that any expression or literal can match.\n\nExample this assertion:\n\n    if($$) {\n      x = 3;\n    }\n\nWill match both this:\n\n    if(x) {\n      x = 3;\n    }\n\nand  this:\n\n    if(x && (y < 3)) {\n      x = 3;\n    }\n\n\nGlobal Skip usage:\n------------------\n\nAn extra property of skip can also be provided for advanced filtering.\nIt takes a list of abstract node types and properties to ignore and auto-match.\nSee the Mozilla Parser API for more information:\nhttps://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API\n\n    assertion.skip = [{\"type\" : \"ForInStaTement\", \"prop\": \"left\"},\n                      {\"type\" : \"ForInStatement\", \"prop\": \"right\"}];\n","readmeFilename":"README.md","_id":"codecheckjs@1.0.10","dist":{"shasum":"1fcba894b22c63524978b86f49017927afcde534","tarball":"https://registry.npmjs.org/codecheckjs/-/codecheckjs-1.0.10.tgz","integrity":"sha512-9Un0+KZmnHyhMFKfIIw7R8GlcHuSR9IlMpc9E/MxOWZSH6Qc60QSOTfEMkFr89fCVbIogmwKhJNxI23LjKanqw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFilBMa7p50n8m6CgEkwohXGJdU87GHv1rI3K0d1xef/AiEAuPw7jF0J5ev3R9LkOfqdBHXHqoM+1L3hjBTYrq61K3k="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"brianbondy","email":"netzen@gmail.com"},"maintainers":[{"name":"brianbondy","email":"netzen@gmail.com"}]},"1.0.11":{"name":"codecheckjs","version":"1.0.11","description":"Check JavaScript code structure against a set of goals in JavaScript","main":"codecheck.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"http://github.com/bbondy/codecheckjs"},"author":{"name":"Brian R. Bondy"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/bbondy/codecheckjs/issues"},"dependencies":{"mocha":"~1.15.1","underscore":"~1.5.2"},"directories":{"test":"test"},"devDependencies":{"mocha":"~1.15.1"},"readme":"codecheck.js\n============\n\ncodecheck.js allows you to check JavaScript code structure against a set of goals in JavaScript.\nIn general, it gives you the ability to check a list of whitelist code snippets and blacklist code snippets against\na sample of code.\n\ncodecheck.js can be used either client or server side.\nClient side supports all modern browser, and also IE8+.\n\n\nEach whitelist and blacklist item is generalized to an assertion.\nEach assertion is itself a mini JavaScript program to match the structure\nof the sample code against.\n\nThe API is very simple. It has 2 important methods:\n\n1. `addAssertion` which takes in a sample of code to match against. It also\n   takes in an extra object which can carry extra state.\n2. `parseSample` which parses the sample and performs a match against all\n   added assertions.  Its callback passes an error if one occurs.\n\nThe API has 2 important members which should be used after a parseSample call:\n\n1. `assertions` holds an array of assertions that were added. Each one has a `hit` property. This property does not take into consideration if the item is marked as a whitelist or blacklist item.\n2. `allSatisfied` will hold true if all whitelist items are matched, and all blacklist items are NOT matched.\n\nExample Usage of the API:\n-------------------------\n\n    var checker = new CodeCheck();\n    checker.addAssertion(\"x = 3;\");\n    checker.addAssertion(\"x++\", { blacklist: true, otherProps: \"hi\" });\n    checker.parseSample(\"if (x) { x = 3; }\", function(err) {\n      console.log('whitelist hit? ' + checker.assertions[0].hit); // true\n      console.log('blacklist hit? ' + checker.assertions[1].hit); // false\n      console.log('all satisfied? ' + checker.allSatisfied); // true\n    });\n\nDependencies:\n-------------\n\n- acorn.js\n- underscore\n\nDemo:\n-----\n\nhttp://codefirefox.com/exercise/intro-exercise\n\nTests:\n------\n\nClient side tests for the exercise module can also be run simply by\nloading ../test/clientside.html on the browser you want to test the exercise\nframework against.\n\nServer side tests are run by using:\n\n```npm test```\n\n\nAssertions:\n-----------\n\nEach assertion will match as long as it appears somewhere in the sample of\ncode.  Even an assertion like `while (x) break;`  will match even if there\nis an if statement before the break on the sample code.\n\nStrict Identifier names:\n------------------------\n\nIdentifier names are ignored unless an `__` prefix is added in the assertion.\nIf an `__` prefix is found, the identifier name will be matched, but the `__` prefix will be dropped.\n\nStrict literal matching:\n------------------------\n\nLiteral values are always matched strictly. If you'd like any match just use $$ instead.\n\nAn asseriton of:\n\n    var x = 3;\n\nWill not match:\n\n    var x = 4;\n\n\nBut an assertion fo:\n\n    var x = $$;\n\nWould match either 3 or 4.\n\n\nTracked / Captured Identifiers:\n-------------------------------\n\nStrict identifier names are important if you want to make sure a person is typing things like `document.window` but it is not\nideal for tracking a variable throughout a program.\n\nTo do that you should use tracked / captured identifiers in your assertion.\n\nThe same idea applies as strict identifier names, but instead of using a `__` prefix, you use a `$` prefix.\n\nYou can use any number of tracked identifiers in a single assertion.\n\nThe following assertion: \n\n    var $v1 = 3;\n    var $v2 = 2;\n    $v2 = 3;\n    \nWould match this code:\n\n    var var1 = 3;\n    var var2 = 2;\n    var2 = 3;\n\nCapturing can happen on the first encounter of the $ anywhere to the code sample.\nEven if it is on the right hand side of an assignment, or within a block.\n\nContext sensitive expression skips:\n-----------------------------------\n\nLets say you want to skip only in one part of an expression, but not in another. You can do this with skips.\nThese skips use identifiers of `$$`. They indicate that any expression or literal can match.\n\nExample this assertion:\n\n    if($$) {\n      x = 3;\n    }\n\nWill match both this:\n\n    if(x) {\n      x = 3;\n    }\n\nand  this:\n\n    if(x && (y < 3)) {\n      x = 3;\n    }\n\n\nGlobal Skip usage:\n------------------\n\nAn extra property of skip can also be provided for advanced filtering.\nIt takes a list of abstract node types and properties to ignore and auto-match.\nSee the Mozilla Parser API for more information:\nhttps://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API\n\n    assertion.skip = [{\"type\" : \"ForInStaTement\", \"prop\": \"left\"},\n                      {\"type\" : \"ForInStatement\", \"prop\": \"right\"}];\n","readmeFilename":"README.md","_id":"codecheckjs@1.0.11","dist":{"shasum":"e7928aee985c23b2428e8f27e5231b3d8e881eed","tarball":"https://registry.npmjs.org/codecheckjs/-/codecheckjs-1.0.11.tgz","integrity":"sha512-Sls0LOwVtIG6eCwjjhg2EL6ZsbYS1RjTgLu1GPIrgFl6KrT5h811dIGaatZAZ75Intr0uLUnCaV44H/h+VR74A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG9UHp/TA3K1MJXBICkDO/YR9AzPO+rJg/2ZnupFE6OoAiBnZs2ixcLWk3gCm/JQFULAvWyOIiV3HEUyo79oHOOsQA=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"brianbondy","email":"netzen@gmail.com"},"maintainers":[{"name":"brianbondy","email":"netzen@gmail.com"}]}},"readme":"codecheck.js\n============\n\ncodecheck.js allows you to check JavaScript code structure against a set of goals in JavaScript.\nIn general, it gives you the ability to check a list of whitelist code snippets and blacklist code snippets against\na sample of code.\n\ncodecheck.js can be used either client or server side.\nClient side supports all modern browser, and also IE8+.\n\n\nEach whitelist and blacklist item is generalized to an assertion.\nEach assertion is itself a mini JavaScript program to match the structure\nof the sample code against.\n\nThe API is very simple. It has 2 important methods:\n\n1. `addAssertion` which takes in a sample of code to match against. It also\n   takes in an extra object which can carry extra state.\n2. `parseSample` which parses the sample and performs a match against all\n   added assertions.  Its callback passes an error if one occurs.\n\nThe API has 2 important members which should be used after a parseSample call:\n\n1. `assertions` holds an array of assertions that were added. Each one has a `hit` property. This property does not take into consideration if the item is marked as a whitelist or blacklist item.\n2. `allSatisfied` will hold true if all whitelist items are matched, and all blacklist items are NOT matched.\n\nExample Usage of the API:\n-------------------------\n\n    var checker = new CodeChecker();\n    checker.addAssertion(\"x = 3;\");\n    checker.addAssertion(\"x++\", { blacklist: true, otherProps: \"hi\" });\n    checker.parseSample(\"if (x) { x = 3; }\", function(err) {\n      console.log('whitelist hit? ' + checker.assertions[0].hit); // true\n      console.log('blacklist hit? ' + checker.assertions[1].hit); // false\n      console.log('all satisfied? ' + checker.allSatisfied); // true\n    });\n\nDependencies:\n-------------\n\n- acorn.js\n- underscore\n\nDemo:\n-----\n\nhttp://codefirefox.com/exercise/intro-exercise\n\nTests:\n------\n\nClient side tests for the exercise module can also be run simply by\nloading ../test/clientside.html on the browser you want to test the exercise\nframework against.\n\nServer side tests are run by using:\n\n```npm test````\n\n\nAssertions:\n-----------\n\nEach assertion will match as long as it appears somewhere in the sample of\ncode.  Even an assertion like `while (x) break;`  will match even if there\nis an if statement before the break on the sample code.\n\nIdentifier names are ignored unless an `__` prefix is added in the assertion.\nIf an `__` prefix is found, the identifier name will be matched, but the `__` prefix will be dropped.\n\nAn extra property of skip can also be provided for advanced filtering.\nIt takes a list of abstract node types and properties to ignore and auto-match.\nSee the Mozilla Parser API for more information:\nhttps://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API\n\n    assertion.skip = [{\"type\" : \"ForInStaTement\", \"prop\": \"left\"},\n                      {\"type\" : \"ForInStatement\", \"prop\": \"right\"}];\n","maintainers":[{"name":"brianbondy","email":"netzen@gmail.com"}],"time":{"modified":"2022-06-13T06:25:50.479Z","created":"2013-12-19T17:08:32.277Z","1.0.0":"2013-12-19T17:08:33.432Z","1.0.1":"2013-12-19T20:59:44.191Z","1.0.2":"2013-12-19T21:00:32.483Z","1.0.3":"2013-12-19T21:50:00.188Z","1.0.4":"2013-12-20T02:25:42.020Z","1.0.5":"2013-12-20T02:28:40.359Z","1.0.6":"2013-12-20T18:44:17.955Z","1.0.7":"2013-12-20T20:29:21.187Z","1.0.8":"2013-12-20T20:52:07.368Z","1.0.9":"2013-12-21T01:07:20.676Z","1.0.10":"2013-12-22T22:08:26.962Z","1.0.11":"2013-12-23T14:50:18.902Z"},"author":{"name":"Brian R. Bondy"},"repository":{"type":"git","url":"http://github.com/bbondy/codecheckjs"}}