├── .gitignore ├── .gitmodules ├── .travis.yml ├── LICENSE ├── README.md ├── TODO.md ├── cmdline.js ├── colorizer.js ├── jshint_config.json ├── jutil.js ├── package.json ├── processors.js ├── run-jshint ├── subcommands ├── cat.js ├── count.js ├── drop.js ├── first.js ├── format.js ├── props.js ├── script.js ├── select.js ├── sort.js ├── take.js ├── tweak.js └── where.js ├── tests ├── README.md ├── argparsing.tush.md ├── bin │ ├── jcat │ ├── jcount │ ├── jdrop │ ├── jfirst │ ├── jformat │ ├── jprops │ ├── jselect │ ├── jsort │ ├── jtake │ ├── jtweak │ ├── jutil │ └── jwhere ├── colorizing.tush.md ├── config-files.tush.md ├── core.tush.md ├── fixtures │ ├── array_1-3.json │ ├── array_1-5_shuffled.json │ ├── array_4-5.json │ ├── blank-config │ ├── broken-module.js │ ├── config-files │ │ ├── always-auto-unwrap-config │ │ ├── arity-mismatch │ │ ├── config-with-error │ │ ├── custom-unwrapper │ │ ├── custom-value │ │ ├── disable-with-clause-config │ │ ├── force-color-config │ │ ├── invalid-config │ │ ├── invalid-enum-value │ │ ├── module-dirs-config │ │ ├── pretty-print-indent-bad │ │ ├── pretty-print-indent-int │ │ ├── pretty-print-indent-str │ │ ├── sort_and_pretty_print_config │ │ ├── type-mismatch-bool │ │ ├── type-mismatch-enum │ │ ├── type-mismatch-fn │ │ ├── type-mismatch-str-array │ │ ├── type-mismatch-str-array-2 │ │ ├── unwrap-properties-config │ │ └── unwrap-with-dot-config │ ├── modules │ │ ├── md5.js │ │ ├── not-a-module │ │ └── not-underscore.js │ ├── pager-with-side-effects │ ├── person-1.json │ ├── person-2.json │ └── simple-script.js ├── jcat.tush.md ├── jcount.tush.md ├── jfirst.tush.md ├── jformat.tush.md ├── jprops.tush.md ├── jselect.tush.md ├── jsort.tush.md ├── jtake-and-jdrop.tush.md ├── jtweak.tush.md ├── jwhere.tush.md ├── run-tests └── smart-output.tush.md └── utils.js /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /coverage 3 | /.nyc_output 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/.travis.yml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/README.md -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/TODO.md -------------------------------------------------------------------------------- /cmdline.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/cmdline.js -------------------------------------------------------------------------------- /colorizer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/colorizer.js -------------------------------------------------------------------------------- /jshint_config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/jshint_config.json -------------------------------------------------------------------------------- /jutil.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/jutil.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/package.json -------------------------------------------------------------------------------- /processors.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/processors.js -------------------------------------------------------------------------------- /run-jshint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/run-jshint -------------------------------------------------------------------------------- /subcommands/cat.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/subcommands/cat.js -------------------------------------------------------------------------------- /subcommands/count.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/subcommands/count.js -------------------------------------------------------------------------------- /subcommands/drop.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/subcommands/drop.js -------------------------------------------------------------------------------- /subcommands/first.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/subcommands/first.js -------------------------------------------------------------------------------- /subcommands/format.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/subcommands/format.js -------------------------------------------------------------------------------- /subcommands/props.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/subcommands/props.js -------------------------------------------------------------------------------- /subcommands/script.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/subcommands/script.js -------------------------------------------------------------------------------- /subcommands/select.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/subcommands/select.js -------------------------------------------------------------------------------- /subcommands/sort.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/subcommands/sort.js -------------------------------------------------------------------------------- /subcommands/take.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/subcommands/take.js -------------------------------------------------------------------------------- /subcommands/tweak.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/subcommands/tweak.js -------------------------------------------------------------------------------- /subcommands/where.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/subcommands/where.js -------------------------------------------------------------------------------- /tests/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/README.md -------------------------------------------------------------------------------- /tests/argparsing.tush.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/argparsing.tush.md -------------------------------------------------------------------------------- /tests/bin/jcat: -------------------------------------------------------------------------------- 1 | ../../jutil.js -------------------------------------------------------------------------------- /tests/bin/jcount: -------------------------------------------------------------------------------- 1 | ../../jutil.js -------------------------------------------------------------------------------- /tests/bin/jdrop: -------------------------------------------------------------------------------- 1 | ../../jutil.js -------------------------------------------------------------------------------- /tests/bin/jfirst: -------------------------------------------------------------------------------- 1 | ../../jutil.js -------------------------------------------------------------------------------- /tests/bin/jformat: -------------------------------------------------------------------------------- 1 | ../../jutil.js -------------------------------------------------------------------------------- /tests/bin/jprops: -------------------------------------------------------------------------------- 1 | ../../jutil.js -------------------------------------------------------------------------------- /tests/bin/jselect: -------------------------------------------------------------------------------- 1 | ../../jutil.js -------------------------------------------------------------------------------- /tests/bin/jsort: -------------------------------------------------------------------------------- 1 | ../../jutil.js -------------------------------------------------------------------------------- /tests/bin/jtake: -------------------------------------------------------------------------------- 1 | ../../jutil.js -------------------------------------------------------------------------------- /tests/bin/jtweak: -------------------------------------------------------------------------------- 1 | ../../jutil.js -------------------------------------------------------------------------------- /tests/bin/jutil: -------------------------------------------------------------------------------- 1 | ../../jutil.js -------------------------------------------------------------------------------- /tests/bin/jwhere: -------------------------------------------------------------------------------- 1 | ../../jutil.js -------------------------------------------------------------------------------- /tests/colorizing.tush.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/colorizing.tush.md -------------------------------------------------------------------------------- /tests/config-files.tush.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/config-files.tush.md -------------------------------------------------------------------------------- /tests/core.tush.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/core.tush.md -------------------------------------------------------------------------------- /tests/fixtures/array_1-3.json: -------------------------------------------------------------------------------- 1 | [1, 2, 3] 2 | -------------------------------------------------------------------------------- /tests/fixtures/array_1-5_shuffled.json: -------------------------------------------------------------------------------- 1 | [3, 5, 1, 4, 2] 2 | -------------------------------------------------------------------------------- /tests/fixtures/array_4-5.json: -------------------------------------------------------------------------------- 1 | [4, 5] 2 | -------------------------------------------------------------------------------- /tests/fixtures/blank-config: -------------------------------------------------------------------------------- 1 | var config = {}; 2 | -------------------------------------------------------------------------------- /tests/fixtures/broken-module.js: -------------------------------------------------------------------------------- 1 | nope 2 | -------------------------------------------------------------------------------- /tests/fixtures/config-files/always-auto-unwrap-config: -------------------------------------------------------------------------------- 1 | var config = { 2 | alwaysAutoUnwrap: true 3 | }; 4 | -------------------------------------------------------------------------------- /tests/fixtures/config-files/arity-mismatch: -------------------------------------------------------------------------------- 1 | var config = { 2 | autoUnwrapper() { } 3 | }; 4 | -------------------------------------------------------------------------------- /tests/fixtures/config-files/config-with-error: -------------------------------------------------------------------------------- 1 | garbage 2 | -------------------------------------------------------------------------------- /tests/fixtures/config-files/custom-unwrapper: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/fixtures/config-files/custom-unwrapper -------------------------------------------------------------------------------- /tests/fixtures/config-files/custom-value: -------------------------------------------------------------------------------- 1 | var config = { 2 | myValue: 3.14159 3 | }; -------------------------------------------------------------------------------- /tests/fixtures/config-files/disable-with-clause-config: -------------------------------------------------------------------------------- 1 | var config = { 2 | disableWithClause: true 3 | }; -------------------------------------------------------------------------------- /tests/fixtures/config-files/force-color-config: -------------------------------------------------------------------------------- 1 | var config = { 2 | color: 'force' 3 | } -------------------------------------------------------------------------------- /tests/fixtures/config-files/invalid-config: -------------------------------------------------------------------------------- 1 | 'nonsense' 2 | -------------------------------------------------------------------------------- /tests/fixtures/config-files/invalid-enum-value: -------------------------------------------------------------------------------- 1 | var config = { 2 | color: 'no thanks' 3 | }; 4 | -------------------------------------------------------------------------------- /tests/fixtures/config-files/module-dirs-config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/fixtures/config-files/module-dirs-config -------------------------------------------------------------------------------- /tests/fixtures/config-files/pretty-print-indent-bad: -------------------------------------------------------------------------------- 1 | var config = { 2 | prettyPrintIndent: true 3 | }; 4 | -------------------------------------------------------------------------------- /tests/fixtures/config-files/pretty-print-indent-int: -------------------------------------------------------------------------------- 1 | var config = { 2 | prettyPrintIndent: 2 3 | }; 4 | -------------------------------------------------------------------------------- /tests/fixtures/config-files/pretty-print-indent-str: -------------------------------------------------------------------------------- 1 | var config = { 2 | prettyPrintIndent: '-' 3 | }; 4 | -------------------------------------------------------------------------------- /tests/fixtures/config-files/sort_and_pretty_print_config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/fixtures/config-files/sort_and_pretty_print_config -------------------------------------------------------------------------------- /tests/fixtures/config-files/type-mismatch-bool: -------------------------------------------------------------------------------- 1 | var config = { 2 | alwaysAutoUnwrap: 1 3 | }; 4 | -------------------------------------------------------------------------------- /tests/fixtures/config-files/type-mismatch-enum: -------------------------------------------------------------------------------- 1 | var config = { 2 | color: [1] 3 | }; 4 | -------------------------------------------------------------------------------- /tests/fixtures/config-files/type-mismatch-fn: -------------------------------------------------------------------------------- 1 | var config = { 2 | autoUnwrapper: true 3 | }; 4 | -------------------------------------------------------------------------------- /tests/fixtures/config-files/type-mismatch-str-array: -------------------------------------------------------------------------------- 1 | var config = { 2 | autoUnwrapProperties: [1] 3 | }; 4 | -------------------------------------------------------------------------------- /tests/fixtures/config-files/type-mismatch-str-array-2: -------------------------------------------------------------------------------- 1 | var config = { 2 | autoUnwrapProperties: true 3 | }; 4 | -------------------------------------------------------------------------------- /tests/fixtures/config-files/unwrap-properties-config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/fixtures/config-files/unwrap-properties-config -------------------------------------------------------------------------------- /tests/fixtures/config-files/unwrap-with-dot-config: -------------------------------------------------------------------------------- 1 | var config = { 2 | autoUnwrapProperties: [ "address.street" ] 3 | }; 4 | -------------------------------------------------------------------------------- /tests/fixtures/modules/md5.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/fixtures/modules/md5.js -------------------------------------------------------------------------------- /tests/fixtures/modules/not-a-module: -------------------------------------------------------------------------------- 1 | Modules must end in .js; this file will be ignored. -------------------------------------------------------------------------------- /tests/fixtures/modules/not-underscore.js: -------------------------------------------------------------------------------- 1 | function _(x) { 2 | return { 'under': x }; 3 | } 4 | -------------------------------------------------------------------------------- /tests/fixtures/pager-with-side-effects: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo '--PAGING--' 4 | cat -------------------------------------------------------------------------------- /tests/fixtures/person-1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/fixtures/person-1.json -------------------------------------------------------------------------------- /tests/fixtures/person-2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/fixtures/person-2.json -------------------------------------------------------------------------------- /tests/fixtures/simple-script.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/fixtures/simple-script.js -------------------------------------------------------------------------------- /tests/jcat.tush.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/jcat.tush.md -------------------------------------------------------------------------------- /tests/jcount.tush.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/jcount.tush.md -------------------------------------------------------------------------------- /tests/jfirst.tush.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/jfirst.tush.md -------------------------------------------------------------------------------- /tests/jformat.tush.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/jformat.tush.md -------------------------------------------------------------------------------- /tests/jprops.tush.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/jprops.tush.md -------------------------------------------------------------------------------- /tests/jselect.tush.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/jselect.tush.md -------------------------------------------------------------------------------- /tests/jsort.tush.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/jsort.tush.md -------------------------------------------------------------------------------- /tests/jtake-and-jdrop.tush.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/jtake-and-jdrop.tush.md -------------------------------------------------------------------------------- /tests/jtweak.tush.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/jtweak.tush.md -------------------------------------------------------------------------------- /tests/jwhere.tush.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/jwhere.tush.md -------------------------------------------------------------------------------- /tests/run-tests: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/run-tests -------------------------------------------------------------------------------- /tests/smart-output.tush.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/tests/smart-output.tush.md -------------------------------------------------------------------------------- /utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/misterfifths/jutil/HEAD/utils.js --------------------------------------------------------------------------------