pax_global_header00006660000000000000000000000064126522102240014506gustar00rootroot0000000000000052 comment=a06bafe36ee5cdcc668fb3569c668df9a50fae28 node-assert-plus-1.0.0/000077500000000000000000000000001265221022400147115ustar00rootroot00000000000000node-assert-plus-1.0.0/.gitignore000066400000000000000000000000151265221022400166750ustar00rootroot00000000000000node_modules node-assert-plus-1.0.0/.gitmodules000066400000000000000000000003211265221022400170620ustar00rootroot00000000000000[submodule "deps/jsstyle"] path = deps/jsstyle url = https://github.com/davepacheco/jsstyle [submodule "deps/javascriptlint"] path = deps/javascriptlint url = https://github.com/davepacheco/javascriptlint node-assert-plus-1.0.0/.npmignore000066400000000000000000000000611265221022400167050ustar00rootroot00000000000000Makefile deps tools tests .gitmodules .npmignore node-assert-plus-1.0.0/AUTHORS000066400000000000000000000003311265221022400157560ustar00rootroot00000000000000Dave Eddy Fred Kuo Lars-Magnus Skog Mark Cavage Patrick Mooney Rob Gulewich node-assert-plus-1.0.0/CHANGES.md000066400000000000000000000006541265221022400163100ustar00rootroot00000000000000# assert-plus Changelog ## 1.0.0 - *BREAKING* assert.number (and derivatives) now accept Infinity as valid input - Add assert.finite check. Previous assert.number callers should use this if they expect Infinity inputs to throw. ## 0.2.0 - Fix `assert.object(null)` so it throws - Fix optional/arrayOf exports for non-type-of asserts - Add optiona/arrayOf exports for Stream/Date/Regex/uuid - Add basic unit test coverage node-assert-plus-1.0.0/Makefile000066400000000000000000000020051265221022400163460ustar00rootroot00000000000000# # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # # Copyright 2015, Joyent, Inc. # NPM = npm JS_FILES := $(shell find assert.js tests/ -name '*.js') JSL_CONF = tools/jsl.node.conf JSSTYLE_FLAGS = -f tools/jsstyle.conf JSL_EXEC ?= deps/javascriptlint/build/install/jsl JSSTYLE_EXEC ?= deps/jsstyle/jsstyle JSL ?= $(JSL_EXEC) JSSTYLE ?= $(JSSTYLE_EXEC) .PHONY: install install: $(NPM) install .PHONY: clean clean: rm -rf node_modules coverage .PHONY: test test: install npm test .PHONY: check check: $(JSL_EXEC) $(JSSTYLE_EXEC) $(JSL) --conf $(JSL_CONF) $(JS_FILES) $(JSSTYLE) $(JSSTYLE_FLAGS) $(JS_FILES) .PHONY: prepush prepush: check test $(JSL_EXEC): | deps/javascriptlint/.git cd deps/javascriptlint && make install $(JSSTYLE_EXEC): | deps/jsstyle/.git .SECONDARY: $($(wildcard deps/*):%=%/.git) deps/%/.git: git submodule update --init deps/$* node-assert-plus-1.0.0/README.md000066400000000000000000000112671265221022400161770ustar00rootroot00000000000000# assert-plus This library is a super small wrapper over node's assert module that has two things: (1) the ability to disable assertions with the environment variable NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like `assert.string(myArg, 'myArg')`. As a simple example, most of my code looks like this: ```javascript var assert = require('assert-plus'); function fooAccount(options, callback) { assert.object(options, 'options'); assert.number(options.id, 'options.id'); assert.bool(options.isManager, 'options.isManager'); assert.string(options.name, 'options.name'); assert.arrayOfString(options.email, 'options.email'); assert.func(callback, 'callback'); // Do stuff callback(null, {}); } ``` # API All methods that *aren't* part of node's core assert API are simply assumed to take an argument, and then a string 'name' that's not a message; `AssertionError` will be thrown if the assertion fails with a message like: AssertionError: foo (string) is required at test (/home/mark/work/foo/foo.js:3:9) at Object. (/home/mark/work/foo/foo.js:15:1) at Module._compile (module.js:446:26) at Object..js (module.js:464:10) at Module.load (module.js:353:31) at Function._load (module.js:311:12) at Array.0 (module.js:484:10) at EventEmitter._tickCallback (node.js:190:38) from: ```javascript function test(foo) { assert.string(foo, 'foo'); } ``` There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`: ```javascript function test(foo) { assert.arrayOfString(foo, 'foo'); } ``` You can assert IFF an argument is not `undefined` (i.e., an optional arg): ```javascript assert.optionalString(foo, 'foo'); ``` Lastly, you can opt-out of assertion checking altogether by setting the environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have lots of assertions, and don't want to pay `typeof ()` taxes to v8 in production. Be advised: The standard functions re-exported from `assert` are also disabled in assert-plus if NDEBUG is specified. Using them directly from the `assert` module avoids this behavior. The complete list of APIs is: * assert.array * assert.bool * assert.buffer * assert.func * assert.number * assert.finite * assert.object * assert.string * assert.stream * assert.date * assert.regexp * assert.uuid * assert.arrayOfArray * assert.arrayOfBool * assert.arrayOfBuffer * assert.arrayOfFunc * assert.arrayOfNumber * assert.arrayOfFinite * assert.arrayOfObject * assert.arrayOfString * assert.arrayOfStream * assert.arrayOfDate * assert.arrayOfRegexp * assert.arrayOfUuid * assert.optionalArray * assert.optionalBool * assert.optionalBuffer * assert.optionalFunc * assert.optionalNumber * assert.optionalFinite * assert.optionalObject * assert.optionalString * assert.optionalStream * assert.optionalDate * assert.optionalRegexp * assert.optionalUuid * assert.optionalArrayOfArray * assert.optionalArrayOfBool * assert.optionalArrayOfBuffer * assert.optionalArrayOfFunc * assert.optionalArrayOfNumber * assert.optionalArrayOfFinite * assert.optionalArrayOfObject * assert.optionalArrayOfString * assert.optionalArrayOfStream * assert.optionalArrayOfDate * assert.optionalArrayOfRegexp * assert.optionalArrayOfUuid * assert.AssertionError * assert.fail * assert.ok * assert.equal * assert.notEqual * assert.deepEqual * assert.notDeepEqual * assert.strictEqual * assert.notStrictEqual * assert.throws * assert.doesNotThrow * assert.ifError # Installation npm install assert-plus ## License The MIT License (MIT) Copyright (c) 2012 Mark Cavage Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## Bugs See . node-assert-plus-1.0.0/assert.js000066400000000000000000000125161265221022400165550ustar00rootroot00000000000000// Copyright (c) 2012, Mark Cavage. All rights reserved. // Copyright 2015 Joyent, Inc. var assert = require('assert'); var Stream = require('stream').Stream; var util = require('util'); ///--- Globals /* JSSTYLED */ var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/; ///--- Internal function _capitalize(str) { return (str.charAt(0).toUpperCase() + str.slice(1)); } function _toss(name, expected, oper, arg, actual) { throw new assert.AssertionError({ message: util.format('%s (%s) is required', name, expected), actual: (actual === undefined) ? typeof (arg) : actual(arg), expected: expected, operator: oper || '===', stackStartFunction: _toss.caller }); } function _getClass(arg) { return (Object.prototype.toString.call(arg).slice(8, -1)); } function noop() { // Why even bother with asserts? } ///--- Exports var types = { bool: { check: function (arg) { return typeof (arg) === 'boolean'; } }, func: { check: function (arg) { return typeof (arg) === 'function'; } }, string: { check: function (arg) { return typeof (arg) === 'string'; } }, object: { check: function (arg) { return typeof (arg) === 'object' && arg !== null; } }, number: { check: function (arg) { return typeof (arg) === 'number' && !isNaN(arg); } }, finite: { check: function (arg) { return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg); } }, buffer: { check: function (arg) { return Buffer.isBuffer(arg); }, operator: 'Buffer.isBuffer' }, array: { check: function (arg) { return Array.isArray(arg); }, operator: 'Array.isArray' }, stream: { check: function (arg) { return arg instanceof Stream; }, operator: 'instanceof', actual: _getClass }, date: { check: function (arg) { return arg instanceof Date; }, operator: 'instanceof', actual: _getClass }, regexp: { check: function (arg) { return arg instanceof RegExp; }, operator: 'instanceof', actual: _getClass }, uuid: { check: function (arg) { return typeof (arg) === 'string' && UUID_REGEXP.test(arg); }, operator: 'isUUID' } }; function _setExports(ndebug) { var keys = Object.keys(types); var out; /* re-export standard assert */ if (process.env.NODE_NDEBUG) { out = noop; } else { out = function (arg, msg) { if (!arg) { _toss(msg, 'true', arg); } }; } /* standard checks */ keys.forEach(function (k) { if (ndebug) { out[k] = noop; return; } var type = types[k]; out[k] = function (arg, msg) { if (!type.check(arg)) { _toss(msg, k, type.operator, arg, type.actual); } }; }); /* optional checks */ keys.forEach(function (k) { var name = 'optional' + _capitalize(k); if (ndebug) { out[name] = noop; return; } var type = types[k]; out[name] = function (arg, msg) { if (arg === undefined || arg === null) { return; } if (!type.check(arg)) { _toss(msg, k, type.operator, arg, type.actual); } }; }); /* arrayOf checks */ keys.forEach(function (k) { var name = 'arrayOf' + _capitalize(k); if (ndebug) { out[name] = noop; return; } var type = types[k]; var expected = '[' + k + ']'; out[name] = function (arg, msg) { if (!Array.isArray(arg)) { _toss(msg, expected, type.operator, arg, type.actual); } var i; for (i = 0; i < arg.length; i++) { if (!type.check(arg[i])) { _toss(msg, expected, type.operator, arg, type.actual); } } }; }); /* optionalArrayOf checks */ keys.forEach(function (k) { var name = 'optionalArrayOf' + _capitalize(k); if (ndebug) { out[name] = noop; return; } var type = types[k]; var expected = '[' + k + ']'; out[name] = function (arg, msg) { if (arg === undefined || arg === null) { return; } if (!Array.isArray(arg)) { _toss(msg, expected, type.operator, arg, type.actual); } var i; for (i = 0; i < arg.length; i++) { if (!type.check(arg[i])) { _toss(msg, expected, type.operator, arg, type.actual); } } }; }); /* re-export built-in assertions */ Object.keys(assert).forEach(function (k) { if (k === 'AssertionError') { out[k] = assert[k]; return; } if (ndebug) { out[k] = noop; return; } out[k] = assert[k]; }); /* export ourselves (for unit tests _only_) */ out._setExports = _setExports; return out; } module.exports = _setExports(process.env.NODE_NDEBUG); node-assert-plus-1.0.0/deps/000077500000000000000000000000001265221022400156445ustar00rootroot00000000000000node-assert-plus-1.0.0/deps/javascriptlint/000077500000000000000000000000001265221022400207015ustar00rootroot00000000000000node-assert-plus-1.0.0/deps/jsstyle/000077500000000000000000000000001265221022400173415ustar00rootroot00000000000000node-assert-plus-1.0.0/package.json000066400000000000000000000010511265221022400171740ustar00rootroot00000000000000{ "author": "Mark Cavage ", "name": "assert-plus", "description": "Extra assertions on top of node's assert module", "version": "1.0.0", "license": "MIT", "main": "./assert.js", "devDependencies": { "tape": "4.2.2", "faucet": "0.0.1" }, "optionalDependencies": {}, "scripts": { "test": "./node_modules/.bin/tape tests/*.js | ./node_modules/.bin/faucet" }, "repository": { "type": "git", "url": "https://github.com/mcavage/node-assert-plus.git" }, "engines": { "node": ">=0.8" } } node-assert-plus-1.0.0/tests/000077500000000000000000000000001265221022400160535ustar00rootroot00000000000000node-assert-plus-1.0.0/tests/all.test.js000066400000000000000000000210111265221022400201320ustar00rootroot00000000000000// Copyright 2015 Joyent, Inc. var f = require('util').format; var stream = require('stream'); var test = require('tape'); ///--- Globals var assertPlus; ///--- Helpers function capitalize(s) { return s[0].toUpperCase() + s.substr(1); } ///--- Tests /* * Example JavaScript objects and primitives to test. The keys of this object * will match the methods exported by the assert-plus module. * * The idea is to check all "valid" examples against their respective methods * and ensure hey do NOT throw, and also check all "invalid" examples * against the same method and ensure that they DO throw. */ var examples = { array: { valid: [ [], ['asdf'] ], invalid: [ false, true -1, 0, Infinity, NaN, 'foo', '00000000-0000-0000-0000-000000000000', /regex/, {}, new Date(), new Buffer(0), new stream(), function () {} ] }, bool: { valid: [ false, true ], invalid: [ -1, 0, Infinity, NaN, 'foo', '00000000-0000-0000-0000-000000000000', /regex/, [], {}, new Date(), new Buffer(0), new stream(), function () {} ] }, buffer: { valid: [ new Buffer(0), new Buffer('foo') ], invalid: [ false, true, -1, 0, Infinity, NaN, 'foo', '00000000-0000-0000-0000-000000000000', /regex/, [], {}, new Date(), new stream(), function () {} ] }, date: { valid: [ new Date(), new Date(0) ], invalid: [ false, true, -1, 0, Infinity, NaN, 'foo', '00000000-0000-0000-0000-000000000000', /regex/, [], {}, new Buffer(0), new stream(), function () {} ] }, func: { valid: [ function () {}, console.log ], invalid: [ false, true, -1, 0, Infinity, NaN, 'foo', '00000000-0000-0000-0000-000000000000', /regex/, [], {}, new Date(), new Buffer(0), new stream() ] }, number: { valid: [ -1, 0, 1, 0.5, Math.PI, Infinity ], invalid: [ false, true, NaN, 'foo', '00000000-0000-0000-0000-000000000000', /regex/, [], {}, new Date(), new Buffer(0), new stream(), function () {} ] }, finite: { valid: [ -1, 0, 1, 0.5, Math.PI ], invalid: [ false, true, Infinity, NaN, 'foo', '00000000-0000-0000-0000-000000000000', /regex/, [], {}, new Date(), new Buffer(0), new stream(), function () {} ] }, object: { valid: [ {}, console, /regex/ ], invalid: [ false, true, -1, 0, Infinity, NaN, 'foo', '00000000-0000-0000-0000-000000000000', null ] }, regexp: { valid: [ /foo/, new RegExp('foo') ], invalid: [ false, true, -1, 0, Infinity, NaN, 'foo', '00000000-0000-0000-0000-000000000000', [], {}, new Date(), new Buffer(0), new stream(), function () {} ] }, stream: { valid: [ new stream(), process.stdout ], invalid: [ false, true, -1, 0, Infinity, NaN, 'foo', '00000000-0000-0000-0000-000000000000', /regex/, [], {}, new Date(), new Buffer(0), function () {} ] }, string: { valid: [ 'foo', 'bar', 'baz' ], invalid: [ false, true, -1, 0, Infinity, NaN, /regex/, [], {}, new Date(), new Buffer(0), new stream(), function () {} ] }, uuid: { valid: [ 'B3A4A7B5-11C3-449B-B46F-86C57AA99022', '76d26c04-d351-42b7-bba9-c130169cc162' ], invalid: [ false, true, -1, 0, Infinity, NaN, 'foo', /regex/, [], {}, new Date(), new Buffer(0), new stream(), function () {} ] } }; test('test setup', function (t) { t.ifError(process.env.NODE_NDEBUG, 'run with NDEBUG off'); assertPlus = require('../'); t.ok(assertPlus); t.end(); }); Object.keys(examples).forEach(function (type) { var capType = capitalize(type); /* test normal */ test(f('assert.%s', type), function (t) { var name = type; examples[type].valid.forEach(function (val) { t.doesNotThrow(function () { assertPlus[name](val); }, f('%s(%s) should succeed', name, val)); }); examples[type].invalid.forEach(function (val) { t.throws(function () { assertPlus[name](val); }, f('%s(%s) should throw', name, val)); }); t.end(); }); /* test optional */ test(f('assert.%s (optional)', type), function (t) { var name = 'optional' + capType; examples[type].valid.forEach(function (val) { t.doesNotThrow(function () { assertPlus[name](val); }, f('%s(%s) should succeed', name, val)); }); t.doesNotThrow(function () { assertPlus[name](null); }, f('%s(%s) should succeed', name, null)); t.doesNotThrow(function () { assertPlus[name](undefined); }, f('%s(%s) should succeed', name, undefined)); examples[type].invalid.forEach(function (val) { /* null is valid for optional tests */ if (val === null) { return; } t.throws(function () { assertPlus[name](val); }, f('%s(%s) should throw', name, val)); }); t.end(); }); /* test arrayOf */ test(f('assert.%s (arrayOf)', type), function (t) { var name = 'arrayOf' + capType; var val = examples[type].valid; t.doesNotThrow(function () { assertPlus[name](val); }, f('%s(%s) should succeed', name, val)); val = examples[type].invalid; t.throws(function () { assertPlus[name](val); }, f('%s(%s) should throw', type, val)); t.end(); }); /* test optionalArrayOf */ test(f('assert.%s (optionalArrayOf)', type), function (t) { var name = 'optionalArrayOf' + capType; var val = examples[type].valid; t.doesNotThrow(function () { assertPlus[name](val); }, f('%s(%s) should succeed', name, val)); t.doesNotThrow(function () { assertPlus[name](null); }, f('%s(%s) should succeed', name, null)); t.doesNotThrow(function () { assertPlus[name](undefined); }, f('%s(%s) should succeed', name, undefined)); val = examples[type].invalid; t.throws(function () { assertPlus[name](val); }, f('%s(%s) should throw', type, val)); t.end(); }); }); node-assert-plus-1.0.0/tests/exports.test.js000066400000000000000000000012251265221022400210730ustar00rootroot00000000000000// Copyright 2015 Joyent, Inc. var assert = require('assert'); var test = require('tape'); var assertPlus = require('../'); test('standard asserts are exported', function (t) { t.equal(typeof (assertPlus), 'function'); t.doesNotThrow(function () { assertPlus(true); }, 'assertPlus(true)'); t.throws(function () { assertPlus(false); }, 'assertPlus(false)'); // ensure all exports on "assert" exist on "assert-plus" Object.keys(assert).forEach(function (key) { t.ok(assertPlus[key], 'missing exported property ' + key); }); t.end(); }); node-assert-plus-1.0.0/tests/ndebug.test.js000066400000000000000000000012211265221022400206270ustar00rootroot00000000000000// Copyright 2015 Joyent, Inc. var assert = require('assert'); var test = require('tape'); ///--- Globals var regularExport; var ndebugExport; ///--- Tests test('simulated import', function (t) { t.ifError(process.env.NODE_NDEBUG, 'run with NDEBUG off'); regularExport = require('../'); t.ok(regularExport); /* fake setting NODE_NDEBUG */ ndebugExport = regularExport._setExports(true); t.end(); }); test('assertions suppressed via ndebug', function (t) { t.throws(function () { regularExport.fail('fail!'); }); t.doesNotThrow(function () { ndebugExport.fail('fail!'); }); t.end(); }); node-assert-plus-1.0.0/tools/000077500000000000000000000000001265221022400160515ustar00rootroot00000000000000node-assert-plus-1.0.0/tools/jsl.node.conf000066400000000000000000000156021265221022400204400ustar00rootroot00000000000000# # Configuration File for JavaScript Lint # # This configuration file can be used to lint a collection of scripts, or to enable # or disable warnings for scripts that are linted via the command line. # ### Warnings # Enable or disable warnings based on requirements. # Use "+WarningName" to display or "-WarningName" to suppress. # +ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent +ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity +ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement +anon_no_return_value # anonymous function does not always return value +assign_to_function_call # assignment to a function call -block_without_braces # block statement without curly braces +comma_separated_stmts # multiple statements separated by commas (use semicolons?) +comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==) +default_not_at_end # the default case is not at the end of the switch statement +dup_option_explicit # duplicate "option explicit" control comment +duplicate_case_in_switch # duplicate case in switch statement +duplicate_formal # duplicate formal argument {name} +empty_statement # empty statement or extra semicolon +identifier_hides_another # identifer {name} hides an identifier in a parent scope -inc_dec_within_stmt # increment (++) and decrement (--) operators used as part of greater statement +incorrect_version # Expected /*jsl:content-type*/ control comment. The script was parsed with the wrong version. +invalid_fallthru # unexpected "fallthru" control comment +invalid_pass # unexpected "pass" control comment +jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax +leading_decimal_point # leading decimal point may indicate a number or an object member +legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax +meaningless_block # meaningless block; curly braces have no impact +mismatch_ctrl_comments # mismatched control comment; "ignore" and "end" control comments must have a one-to-one correspondence -misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma +missing_break # missing break statement +missing_break_for_last_case # missing break statement for last case in switch +missing_default_case # missing default case in switch statement +missing_option_explicit # the "option explicit" control comment is missing +missing_semicolon # missing semicolon +missing_semicolon_for_lambda # missing semicolon for lambda assignment +multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs +nested_comment # nested comment +no_return_value # function {name} does not always return a value +octal_number # leading zeros make an octal number +parseint_missing_radix # parseInt missing radix parameter +partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag +redeclared_var # redeclaration of {name} +trailing_comma_in_array # extra comma is not recommended in array initializers +trailing_decimal_point # trailing decimal point may indicate a number or an object member +undeclared_identifier # undeclared identifier: {name} +unreachable_code # unreachable code -unreferenced_argument # argument declared but never referenced: {name} -unreferenced_function # function is declared but never referenced: {name} +unreferenced_variable # variable is declared but never referenced: {name} +unsupported_version # JavaScript {version} is not supported +use_of_label # use of label +useless_assign # useless assignment +useless_comparison # useless comparison; comparing identical expressions -useless_quotes # the quotation marks are unnecessary +useless_void # use of the void type may be unnecessary (void is always undefined) +var_hides_arg # variable {name} hides argument +want_assign_or_call # expected an assignment or function call +with_statement # with statement hides undeclared variables; use temporary variable instead -identifier_hides_another ### Output format # Customize the format of the error message. # __FILE__ indicates current file path # __FILENAME__ indicates current file name # __LINE__ indicates current line # __COL__ indicates current column # __ERROR__ indicates error message (__ERROR_PREFIX__: __ERROR_MSG__) # __ERROR_NAME__ indicates error name (used in configuration file) # __ERROR_PREFIX__ indicates error prefix # __ERROR_MSG__ indicates error message # # For machine-friendly output, the output format can be prefixed with # "encode:". If specified, all items will be encoded with C-slashes. # # Visual Studio syntax (default): +output-format __FILE__(__LINE__): __ERROR__ # Alternative syntax: #+output-format __FILE__:__LINE__: __ERROR__ ### Context # Show the in-line position of the error. # Use "+context" to display or "-context" to suppress. # +context ### Control Comments # Both JavaScript Lint and the JScript interpreter confuse each other with the syntax for # the /*@keyword@*/ control comments and JScript conditional comments. (The latter is # enabled in JScript with @cc_on@). The /*jsl:keyword*/ syntax is preferred for this reason, # although legacy control comments are enabled by default for backward compatibility. # -legacy_control_comments ### Defining identifiers # By default, "option explicit" is enabled on a per-file basis. # To enable this for all files, use "+always_use_option_explicit" -always_use_option_explicit # Define certain identifiers of which the lint is not aware. # (Use this in conjunction with the "undeclared identifier" warning.) # # Common uses for webpages might be: +define __dirname +define clearInterval +define clearTimeout +define console +define exports +define global +define module +define process +define require +define setInterval +define setImmediate +define setTimeout +define Buffer +define JSON +define Math ### JavaScript Version # To change the default JavaScript version: #+default-type text/javascript;version=1.5 #+default-type text/javascript;e4x=1 ### Files # Specify which files to lint # Use "+recurse" to enable recursion (disabled by default). # To add a set of files, use "+process FileName", "+process Folder\Path\*.js", # or "+process Folder\Path\*.htm". # node-assert-plus-1.0.0/tools/jsstyle.conf000066400000000000000000000001061265221022400204120ustar00rootroot00000000000000indent=4 doxygen unparenthesized-return=0 blank-after-start-comment=0