cssesc-source 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/lib/cssesc/source.rb +7 -0
- data/vendor/LICENSE-MIT.txt +20 -0
- data/vendor/README.md +207 -0
- data/vendor/bin/cssesc +122 -0
- data/vendor/cssesc.js +177 -0
- data/vendor/man/cssesc.1 +70 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/MIT-LICENSE.txt +21 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/README.md +43 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/bin/stripcolorcodes.js +18 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/index.js +3 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/package.json +42 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/test/fixture/with-colors +2 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/test/fixture/without-colors +2 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/test/stripcolorcodes-test.js +20 -0
- data/vendor/node_modules/grunt-shell/package.json +53 -0
- data/vendor/node_modules/grunt-shell/readme.md +221 -0
- data/vendor/node_modules/grunt-shell/tasks/shell.js +54 -0
- data/vendor/node_modules/grunt-template/LICENSE-MIT.txt +20 -0
- data/vendor/node_modules/grunt-template/README.md +123 -0
- data/vendor/node_modules/grunt-template/package.json +50 -0
- data/vendor/node_modules/grunt-template/tasks/template.js +44 -0
- data/vendor/node_modules/grunt/CONTRIBUTING.md +1 -0
- data/vendor/node_modules/grunt/LICENSE-MIT +22 -0
- data/vendor/node_modules/grunt/README.md +16 -0
- data/vendor/node_modules/grunt/internal-tasks/bump.js +151 -0
- data/vendor/node_modules/grunt/internal-tasks/subgrunt.js +34 -0
- data/vendor/node_modules/grunt/lib/grunt.js +156 -0
- data/vendor/node_modules/grunt/lib/grunt/cli.js +128 -0
- data/vendor/node_modules/grunt/lib/grunt/config.js +118 -0
- data/vendor/node_modules/grunt/lib/grunt/event.js +16 -0
- data/vendor/node_modules/grunt/lib/grunt/fail.js +84 -0
- data/vendor/node_modules/grunt/lib/grunt/file.js +440 -0
- data/vendor/node_modules/grunt/lib/grunt/help.js +129 -0
- data/vendor/node_modules/grunt/lib/grunt/log.js +352 -0
- data/vendor/node_modules/grunt/lib/grunt/option.js +42 -0
- data/vendor/node_modules/grunt/lib/grunt/task.js +451 -0
- data/vendor/node_modules/grunt/lib/grunt/template.js +95 -0
- data/vendor/node_modules/grunt/lib/grunt/util.js +188 -0
- data/vendor/node_modules/grunt/lib/util/task.js +323 -0
- data/vendor/node_modules/grunt/node_modules/async/LICENSE +19 -0
- data/vendor/node_modules/grunt/node_modules/async/Makefile +25 -0
- data/vendor/node_modules/grunt/node_modules/async/README.md +1021 -0
- data/vendor/node_modules/grunt/node_modules/async/index.js +3 -0
- data/vendor/node_modules/grunt/node_modules/async/lib/async.js +692 -0
- data/vendor/node_modules/grunt/node_modules/async/package.json +32 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/CNAME +1 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/LICENSE +22 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/README +51 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/Rakefile +78 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/bin/cake +7 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/bin/coffee +7 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/extras/jsl.conf +44 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/browser.js +92 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/cake.js +111 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/coffee-script.js +167 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/command.js +500 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/grammar.js +606 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/helpers.js +77 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/index.js +11 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/lexer.js +788 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/nodes.js +2986 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/optparse.js +138 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/parser.js +683 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/repl.js +261 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/rewriter.js +349 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/scope.js +146 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/package.json +47 -0
- data/vendor/node_modules/grunt/node_modules/colors/MIT-LICENSE.txt +22 -0
- data/vendor/node_modules/grunt/node_modules/colors/ReadMe.md +77 -0
- data/vendor/node_modules/grunt/node_modules/colors/colors.js +342 -0
- data/vendor/node_modules/grunt/node_modules/colors/example.html +76 -0
- data/vendor/node_modules/grunt/node_modules/colors/example.js +77 -0
- data/vendor/node_modules/grunt/node_modules/colors/package.json +29 -0
- data/vendor/node_modules/grunt/node_modules/colors/test.js +70 -0
- data/vendor/node_modules/grunt/node_modules/colors/themes/winston-dark.js +12 -0
- data/vendor/node_modules/grunt/node_modules/colors/themes/winston-light.js +12 -0
- data/vendor/node_modules/grunt/node_modules/dateformat/Readme.md +67 -0
- data/vendor/node_modules/grunt/node_modules/dateformat/lib/dateformat.js +165 -0
- data/vendor/node_modules/grunt/node_modules/dateformat/package.json +20 -0
- data/vendor/node_modules/grunt/node_modules/dateformat/test/test_weekofyear.js +4 -0
- data/vendor/node_modules/grunt/node_modules/dateformat/test/test_weekofyear.sh +27 -0
- data/vendor/node_modules/grunt/node_modules/eventemitter2/README.md +212 -0
- data/vendor/node_modules/grunt/node_modules/eventemitter2/index.js +1 -0
- data/vendor/node_modules/grunt/node_modules/eventemitter2/lib/eventemitter2.js +561 -0
- data/vendor/node_modules/grunt/node_modules/eventemitter2/package.json +62 -0
- data/vendor/node_modules/grunt/node_modules/exit/Gruntfile.js +48 -0
- data/vendor/node_modules/grunt/node_modules/exit/LICENSE-MIT +22 -0
- data/vendor/node_modules/grunt/node_modules/exit/README.md +75 -0
- data/vendor/node_modules/grunt/node_modules/exit/lib/exit.js +41 -0
- data/vendor/node_modules/grunt/node_modules/exit/package.json +51 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/exit_test.js +121 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/10-stderr.txt +10 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/10-stdout-stderr.txt +20 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/10-stdout.txt +10 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/100-stderr.txt +100 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/100-stdout-stderr.txt +200 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/100-stdout.txt +100 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/1000-stderr.txt +1000 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/1000-stdout-stderr.txt +2000 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/1000-stdout.txt +1000 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/create-files.sh +8 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/log-broken.js +23 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/log.js +25 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/Gruntfile.js +25 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/LICENSE-MIT +22 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/README.md +44 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/lib/findup-sync.js +46 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/README.md +164 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.compat.js +5152 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.compat.min.js +42 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.js +4983 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.min.js +40 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.underscore.js +4307 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.underscore.min.js +34 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/package.json +62 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/package.json +48 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/test/findup-sync_test.js +48 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/a.txt +0 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/a/b/bar.txt +0 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/a/foo.txt +0 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/aaa.txt +0 -0
- data/vendor/node_modules/grunt/node_modules/getobject/Gruntfile.js +48 -0
- data/vendor/node_modules/grunt/node_modules/getobject/LICENSE-MIT +22 -0
- data/vendor/node_modules/grunt/node_modules/getobject/README.md +20 -0
- data/vendor/node_modules/grunt/node_modules/getobject/lib/getobject.js +60 -0
- data/vendor/node_modules/grunt/node_modules/getobject/package.json +48 -0
- data/vendor/node_modules/grunt/node_modules/getobject/test/namespace_test.js +51 -0
- data/vendor/node_modules/grunt/node_modules/glob/LICENSE +27 -0
- data/vendor/node_modules/grunt/node_modules/glob/README.md +233 -0
- data/vendor/node_modules/grunt/node_modules/glob/examples/g.js +9 -0
- data/vendor/node_modules/grunt/node_modules/glob/examples/usr-local.js +9 -0
- data/vendor/node_modules/grunt/node_modules/glob/glob.js +643 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/LICENSE +27 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/README.md +33 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/graceful-fs.js +442 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/package.json +49 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/test/open.js +46 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/test/ulimit.js +158 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/inherits/README.md +51 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/inherits/inherits.js +29 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/inherits/package.json +30 -0
- data/vendor/node_modules/grunt/node_modules/glob/package.json +40 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/00-setup.js +176 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/bash-comparison.js +63 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/bash-results.json +348 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/cwd-test.js +55 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/mark.js +74 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/nocase-nomagic.js +113 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/pause-resume.js +73 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/root-nomount.js +39 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/root.js +46 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/zz-cleanup.js +11 -0
- data/vendor/node_modules/grunt/node_modules/hooker/LICENSE-MIT +22 -0
- data/vendor/node_modules/grunt/node_modules/hooker/README.md +186 -0
- data/vendor/node_modules/grunt/node_modules/hooker/child.js +101 -0
- data/vendor/node_modules/grunt/node_modules/hooker/dist/ba-hooker.js +169 -0
- data/vendor/node_modules/grunt/node_modules/hooker/dist/ba-hooker.min.js +4 -0
- data/vendor/node_modules/grunt/node_modules/hooker/grunt.js +47 -0
- data/vendor/node_modules/grunt/node_modules/hooker/lib/hooker.js +174 -0
- data/vendor/node_modules/grunt/node_modules/hooker/package.json +45 -0
- data/vendor/node_modules/grunt/node_modules/hooker/parent.js +17 -0
- data/vendor/node_modules/grunt/node_modules/hooker/test/hooker_test.js +435 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/LICENSE +21 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/README.md +72 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/README.md~ +54 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/big5.js +9 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/gbk.js +9 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/singlebyte.js +340 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/table/big5.js +1 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/table/gbk.js +1 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/generation/generate-big5-table.js +25 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/generation/generate-singlebyte.js +142 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/index.js +231 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/package.json +80 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/big5-test.js +36 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/big5File.txt +13 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/cyrillic-test.js +86 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/gbk-test.js +38 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/gbkFile.txt +14 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/greek-test.js +79 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/main-test.js +55 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/performance.js +67 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/turkish-test.js +90 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/HISTORY.md +155 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/LICENSE +21 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/README.md +249 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/bin/js-yaml.js +125 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/examples/custom_types.js +104 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/examples/custom_types.yaml +18 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/examples/dumper.js +31 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/examples/dumper.json +22 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/examples/sample_document.js +15 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/examples/sample_document.yaml +197 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/index.js +1 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml.js +33 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/common.js +60 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/dumper.js +437 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/exception.js +25 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/loader.js +1549 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/mark.js +78 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/require.js +23 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema.js +103 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/default.js +16 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/minimal.js +13 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/safe.js +25 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type.js +82 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/binary.js +118 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/bool.js +74 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/float.js +102 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/int.js +85 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/function.js +56 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +56 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +28 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/map.js +11 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/merge.js +18 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/null.js +36 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/omap.js +53 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/pairs.js +41 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/seq.js +11 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/set.js +31 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/str.js +11 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +91 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/HISTORY.md +109 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/LICENSE +21 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/README.md +239 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/arguments.js +36 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/choice.js +22 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/constants.js +59 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/help.js +13 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/nargs.js +33 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/parents.js +28 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/prefix_chars.js +23 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sub_commands.js +49 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sum.js +35 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/testformatters.js +270 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/index.js +1 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action.js +146 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append.js +55 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append/constant.js +47 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/count.js +40 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/help.js +48 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store.js +50 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/constant.js +43 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/false.js +27 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/true.js +26 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/subparsers.js +148 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/version.js +50 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action_container.js +481 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argparse.js +14 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/error.js +50 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/exclusive.js +54 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/group.js +75 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument_parser.js +1165 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/const.js +18 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/added_formatters.js +88 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/formatter.js +803 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/namespace.js +77 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile +4 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile.lock +17 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/README.markdown +814 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Rakefile +23 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/component.json +11 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/dist/underscore.string.min.js +1 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/lib/underscore.string.js +673 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/libpeerconnection.log +0 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json +73 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/run-qunit.js +45 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/speed.js +148 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings.js +685 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings_standalone.js +12 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test.html +31 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_standalone.html +18 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/arrays.js +200 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/chaining.js +59 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/collections.js +426 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/functions.js +259 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/index.html +45 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/objects.js +548 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/speed.js +75 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/utility.js +249 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/jquery.js +9404 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/jslitmus.js +670 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/qunit.css +235 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/qunit.js +1977 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/underscore.js +1201 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/CNAME +1 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/CONTRIBUTING.md +9 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/LICENSE +22 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/README.md +19 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/favicon.ico +0 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.html +2467 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.js +1 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/package.json +35 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore-min.js +1 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore.js +1226 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/package.json +50 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/README.md +73 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esparse.js +117 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esvalidate.js +177 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/esprima.js +3908 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/package.json +59 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/compat.js +239 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/reflect.js +422 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/run.js +66 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/runner.js +387 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/test.js +20238 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/package.json +60 -0
- data/vendor/node_modules/grunt/node_modules/lodash/README.md +140 -0
- data/vendor/node_modules/grunt/node_modules/lodash/lodash.js +4258 -0
- data/vendor/node_modules/grunt/node_modules/lodash/lodash.min.js +35 -0
- data/vendor/node_modules/grunt/node_modules/lodash/lodash.underscore.js +3688 -0
- data/vendor/node_modules/grunt/node_modules/lodash/lodash.underscore.min.js +28 -0
- data/vendor/node_modules/grunt/node_modules/lodash/package.json +62 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/README.md +218 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/minimatch.js +1055 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +14 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/README.md +97 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +252 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/package.json +33 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/basic.js +369 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +52 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +50 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/package.json +42 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/test/basic.js +24 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/package.json +40 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/test/basic.js +399 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/test/brace-expand.js +33 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/test/caching.js +14 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/test/defaults.js +274 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
- data/vendor/node_modules/grunt/node_modules/nopt/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/nopt/README.md +208 -0
- data/vendor/node_modules/grunt/node_modules/nopt/bin/nopt.js +44 -0
- data/vendor/node_modules/grunt/node_modules/nopt/examples/my-program.js +30 -0
- data/vendor/node_modules/grunt/node_modules/nopt/lib/nopt.js +552 -0
- data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/README.md +23 -0
- data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/lib/abbrev.js +111 -0
- data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/package.json +29 -0
- data/vendor/node_modules/grunt/node_modules/nopt/package.json +36 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/AUTHORS +6 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/README.md +21 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/README.md +5 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/graceful-fs.js +312 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/package.json +40 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/test/open.js +41 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/package.json +59 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/rimraf.js +161 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/test/run.sh +10 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/test/setup.sh +47 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/test/test-async.js +5 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/test/test-fiber.js +0 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/test/test-sync.js +3 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/Gemfile +5 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/Gemfile.lock +34 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/README.markdown +668 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/Rakefile +28 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/dist/underscore.string.min.js +1 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/lib/underscore.string.js +525 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/package.json +72 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/run-qunit.js +44 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/speed.js +138 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/strings.js +438 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/strings_standalone.js +12 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test.html +31 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_standalone.html +18 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/arrays.js +166 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/chaining.js +59 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/collections.js +270 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/functions.js +198 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/objects.js +535 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/speed.js +70 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp.js +27 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp_tests.html +19 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/test.html +43 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/utility.js +155 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/jquery.js +19 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/jslitmus.js +670 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/qunit.css +196 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/qunit.js +2360 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/underscore.js +999 -0
- data/vendor/node_modules/grunt/node_modules/which/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/which/README.md +5 -0
- data/vendor/node_modules/grunt/node_modules/which/bin/which +14 -0
- data/vendor/node_modules/grunt/node_modules/which/package.json +31 -0
- data/vendor/node_modules/grunt/node_modules/which/which.js +104 -0
- data/vendor/node_modules/grunt/package.json +82 -0
- data/vendor/node_modules/istanbul/CHANGELOG.md +57 -0
- data/vendor/node_modules/istanbul/LICENSE +24 -0
- data/vendor/node_modules/istanbul/README.md +205 -0
- data/vendor/node_modules/istanbul/index.js +115 -0
- data/vendor/node_modules/istanbul/lib/cli.js +74 -0
- data/vendor/node_modules/istanbul/lib/collector.js +121 -0
- data/vendor/node_modules/istanbul/lib/command/check-coverage.js +115 -0
- data/vendor/node_modules/istanbul/lib/command/common/run-with-cover.js +199 -0
- data/vendor/node_modules/istanbul/lib/command/cover.js +33 -0
- data/vendor/node_modules/istanbul/lib/command/help.js +58 -0
- data/vendor/node_modules/istanbul/lib/command/index.js +33 -0
- data/vendor/node_modules/istanbul/lib/command/instrument.js +244 -0
- data/vendor/node_modules/istanbul/lib/command/report.js +97 -0
- data/vendor/node_modules/istanbul/lib/command/test.js +31 -0
- data/vendor/node_modules/istanbul/lib/hook.js +187 -0
- data/vendor/node_modules/istanbul/lib/instrumenter.js +759 -0
- data/vendor/node_modules/istanbul/lib/object-utils.js +341 -0
- data/vendor/node_modules/istanbul/lib/register-plugins.js +15 -0
- data/vendor/node_modules/istanbul/lib/report/cobertura.js +207 -0
- data/vendor/node_modules/istanbul/lib/report/html.js +517 -0
- data/vendor/node_modules/istanbul/lib/report/index.js +60 -0
- data/vendor/node_modules/istanbul/lib/report/json.js +55 -0
- data/vendor/node_modules/istanbul/lib/report/lcov.js +49 -0
- data/vendor/node_modules/istanbul/lib/report/lcovonly.js +93 -0
- data/vendor/node_modules/istanbul/lib/report/none.js +20 -0
- data/vendor/node_modules/istanbul/lib/report/teamcity.js +82 -0
- data/vendor/node_modules/istanbul/lib/report/templates/foot.txt +102 -0
- data/vendor/node_modules/istanbul/lib/report/templates/head.txt +200 -0
- data/vendor/node_modules/istanbul/lib/report/text-summary.js +72 -0
- data/vendor/node_modules/istanbul/lib/report/text.js +210 -0
- data/vendor/node_modules/istanbul/lib/store/fslookup.js +60 -0
- data/vendor/node_modules/istanbul/lib/store/index.js +122 -0
- data/vendor/node_modules/istanbul/lib/store/memory.js +55 -0
- data/vendor/node_modules/istanbul/lib/store/tmp.js +80 -0
- data/vendor/node_modules/istanbul/lib/util/factory.js +88 -0
- data/vendor/node_modules/istanbul/lib/util/file-matcher.js +60 -0
- data/vendor/node_modules/istanbul/lib/util/file-writer.js +131 -0
- data/vendor/node_modules/istanbul/lib/util/flow-control.js +26 -0
- data/vendor/node_modules/istanbul/lib/util/help-formatter.js +24 -0
- data/vendor/node_modules/istanbul/lib/util/input-error.js +12 -0
- data/vendor/node_modules/istanbul/lib/util/insertion-text.js +109 -0
- data/vendor/node_modules/istanbul/lib/util/meta.js +13 -0
- data/vendor/node_modules/istanbul/lib/util/tree-summarizer.js +213 -0
- data/vendor/node_modules/istanbul/lib/util/writer.js +56 -0
- data/vendor/node_modules/istanbul/lib/util/yui-load-hook.js +49 -0
- data/vendor/node_modules/istanbul/lib/vendor/prettify.css +1 -0
- data/vendor/node_modules/istanbul/lib/vendor/prettify.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/abbrev/LICENSE +23 -0
- data/vendor/node_modules/istanbul/node_modules/abbrev/README.md +23 -0
- data/vendor/node_modules/istanbul/node_modules/abbrev/lib/abbrev.js +111 -0
- data/vendor/node_modules/istanbul/node_modules/abbrev/package.json +29 -0
- data/vendor/node_modules/istanbul/node_modules/async/LICENSE +19 -0
- data/vendor/node_modules/istanbul/node_modules/async/README.md +1414 -0
- data/vendor/node_modules/istanbul/node_modules/async/component.json +11 -0
- data/vendor/node_modules/istanbul/node_modules/async/lib/async.js +955 -0
- data/vendor/node_modules/istanbul/node_modules/async/package.json +43 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/LICENSE.BSD +19 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/LICENSE.source-map +27 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/README.md +99 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/bin/escodegen.js +45 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/bin/esgenerate.js +45 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/component.json +48 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/escodegen.browser.js +3072 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/escodegen.js +2275 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/LICENSE.BSD +19 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/README.md +29 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/estraverse.js +315 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/package.json +41 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/CHANGELOG.md +112 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/LICENSE +28 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/Makefile.dryice.js +166 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/README.md +434 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/assert-shim.js +56 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/mini-require.js +152 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/prefix-source-map.jsm +20 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/prefix-utils.jsm +18 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/suffix-browser.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/suffix-source-map.jsm +6 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/suffix-utils.jsm +21 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/test-prefix.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/test-suffix.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/array-set.js +97 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/base64.js +42 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/binary-search.js +81 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-consumer.js +477 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-generator.js +380 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/source-node.js +371 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/util.js +205 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/README.md +171 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/intercept.js +36 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/package.json +36 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/package.json +110 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/run-tests.js +71 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-api.js +26 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-array-set.js +104 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64.js +35 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-consumer.js +451 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-generator.js +417 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-node.js +365 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/util.js +161 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/package.json +58 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/README.md +73 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/bin/esparse.js +117 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/bin/esvalidate.js +177 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/esprima.js +3908 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/package.json +59 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/test/compat.js +239 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/test/reflect.js +422 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/test/run.js +66 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/test/runner.js +387 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/test/test.js +20238 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/LICENSE-MIT +22 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/README.md +87 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/lib/fileset.js +64 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/LICENSE +27 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/README.md +250 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/examples/g.js +9 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/examples/usr-local.js +9 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/glob.js +680 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/LICENSE +16 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/README.md +42 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/inherits.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/package.json +33 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/test.js +25 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/package.json +39 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/00-setup.js +176 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/bash-comparison.js +63 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/bash-results.json +350 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/cwd-test.js +55 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/globstar-match.js +19 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/mark.js +74 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/new-glob-optional-options.js +10 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/nocase-nomagic.js +113 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/pause-resume.js +73 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/root-nomount.js +39 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/root.js +46 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/stat.js +32 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/zz-cleanup.js +11 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/LICENSE +23 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/README.md +218 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/minimatch.js +1055 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +14 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/LICENSE +23 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/README.md +97 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +252 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/package.json +33 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/test/basic.js +369 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +52 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +50 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/package.json +42 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/test/basic.js +24 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/package.json +40 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/basic.js +399 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/brace-expand.js +33 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/caching.js +14 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/defaults.js +274 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/package.json +34 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/tests/fixtures/an (odd) filename.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/tests/helper.js +61 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/tests/test.js +133 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/LICENSE +19 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/README.markdown +391 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/bin/handlebars +213 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/bower.json +9 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.js +2278 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.min.js +2 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.runtime.js +362 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.runtime.min.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/global-test.js +18 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/global.js +4 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/handlebars-source.gemspec +21 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/handlebars.js.nuspec +17 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars.js +43 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/base.js +166 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/browser-prefix.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/browser-suffix.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/ast.js +138 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/base.js +21 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/compiler.js +1305 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/index.js +16 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/parser.js +483 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/printer.js +138 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/visitor.js +18 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/runtime.js +106 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/source.rb +11 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/utils.js +83 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/min.sh +11 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/LICENSE +21 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/bool.js +10 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/boolean_double.js +7 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/boolean_single.js +7 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/default_hash.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/default_singles.js +7 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/divide.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/line_count.js +20 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/line_count_options.js +29 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/line_count_wrap.js +29 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/nonopt.js +4 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/reflect.js +2 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/short.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/string.js +11 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/usage-options.js +19 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/xup.js +10 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/index.js +478 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/package.json +46 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/readme.markdown +487 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/_.js +71 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/_/argv.js +2 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/_/bin.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/parse.js +446 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/usage.js +292 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/LICENSE +29 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/README.md +588 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/bin/uglifyjs +402 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/ast.js +985 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/compress.js +2028 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/mozilla-ast.js +267 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/output.js +1229 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/parse.js +1410 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/scope.js +581 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/sourcemap.js +81 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/transform.js +217 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/utils.js +295 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/CHANGELOG.md +112 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/LICENSE +28 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/Makefile.dryice.js +166 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/README.md +434 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/assert-shim.js +56 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/mini-require.js +152 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/prefix-source-map.jsm +20 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/prefix-utils.jsm +18 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/suffix-browser.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/suffix-source-map.jsm +6 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/suffix-utils.jsm +21 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/test-prefix.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/test-suffix.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/array-set.js +97 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64.js +42 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/binary-search.js +81 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-consumer.js +477 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js +380 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-node.js +371 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js +205 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/README.md +171 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/intercept.js +36 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/package.json +37 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/package.json +110 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/run-tests.js +71 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-api.js +26 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-array-set.js +104 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64.js +35 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-consumer.js +451 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js +417 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-node.js +365 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/util.js +161 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/package.json +39 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/arrays.js +12 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/blocks.js +49 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/conditionals.js +143 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/dead-code.js +89 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/debugger.js +24 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/drop-unused.js +97 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-105.js +25 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-12.js +11 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js +48 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-22.js +17 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-44.js +31 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-59.js +30 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/labels.js +163 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/loops.js +123 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/properties.js +54 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/sequences.js +161 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/switch.js +260 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/typeof.js +25 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/run-tests.js +170 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/tools/node.js +165 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/package.json +42 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/release-notes.md +93 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/test.js +20 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/LICENSE +21 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/examples/pow.js +6 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/index.js +82 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/package.json +34 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/readme.markdown +63 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/chmod.js +38 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/clobber.js +37 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/mkdirp.js +28 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/perm.js +32 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/perm_sync.js +39 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/race.js +41 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/rel.js +32 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/return.js +25 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/return_sync.js +24 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/root.js +18 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/sync.js +32 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/umask.js +28 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/umask_sync.js +32 -0
- data/vendor/node_modules/istanbul/node_modules/nopt/LICENSE +23 -0
- data/vendor/node_modules/istanbul/node_modules/nopt/README.md +210 -0
- data/vendor/node_modules/istanbul/node_modules/nopt/bin/nopt.js +51 -0
- data/vendor/node_modules/istanbul/node_modules/nopt/examples/my-program.js +30 -0
- data/vendor/node_modules/istanbul/node_modules/nopt/lib/nopt.js +612 -0
- data/vendor/node_modules/istanbul/node_modules/nopt/package.json +36 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/LICENSE +18 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/example/async.js +5 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/example/sync.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/index.js +5 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/lib/async.js +125 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/lib/caller.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/lib/core.js +4 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/lib/core.json +38 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/lib/node-modules-paths.js +25 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/lib/sync.js +80 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/package.json +36 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/readme.markdown +144 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/core.js +12 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/filter.js +18 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/filter_sync.js +15 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/mock.js +142 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/mock_sync.js +68 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver.js +270 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/baz/doom.js +0 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/baz/package.json +3 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/baz/quux.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json +3 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/cup.coffee +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/foo.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/incorrect_main/index.js +2 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/incorrect_main/package.json +3 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/mug.coffee +0 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/mug.js +0 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/quux/foo/index.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/without_basedir/main.js +6 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver_sync.js +170 -0
- data/vendor/node_modules/istanbul/node_modules/which/LICENSE +23 -0
- data/vendor/node_modules/istanbul/node_modules/which/README.md +5 -0
- data/vendor/node_modules/istanbul/node_modules/which/bin/which +14 -0
- data/vendor/node_modules/istanbul/node_modules/which/package.json +32 -0
- data/vendor/node_modules/istanbul/node_modules/which/which.js +104 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/README.markdown +70 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/example/center.js +10 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/example/meat.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/index.js +76 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/package.json +45 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/test/break.js +30 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/test/idleness.txt +63 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/test/wrap.js +31 -0
- data/vendor/node_modules/istanbul/package.json +117 -0
- data/vendor/node_modules/istanbul/test/browser/support/index.html +153 -0
- data/vendor/node_modules/istanbul/test/browser/support/phantom-test.client.js +49 -0
- data/vendor/node_modules/istanbul/test/browser/support/server.js +154 -0
- data/vendor/node_modules/istanbul/test/browser/test-browser-instrumentation.js +94 -0
- data/vendor/node_modules/istanbul/test/cli-helper.js +219 -0
- data/vendor/node_modules/istanbul/test/cli/package.json +8 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/amd/ipsum.js +11 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/amd/lorem.js +7 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/lib/bar.js +13 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/lib/foo.js +12 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/lib/util/bad.js +1 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/lib/util/generate-names.js +5 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/node_modules/dependency/index.js +9 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/node_modules/post-require/hook.js +11 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/node_modules/post-require/package.json +5 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/test/amd-run.js +16 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/test/global-leak.js +30 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/test/run.js +25 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/vendor/dummy_vendor_lib.js +9 -0
- data/vendor/node_modules/istanbul/test/cli/test-base-cli.js +39 -0
- data/vendor/node_modules/istanbul/test/cli/test-check-coverage-command.js +97 -0
- data/vendor/node_modules/istanbul/test/cli/test-cobertura-report.js +54 -0
- data/vendor/node_modules/istanbul/test/cli/test-cover-command.js +170 -0
- data/vendor/node_modules/istanbul/test/cli/test-html-report.js +125 -0
- data/vendor/node_modules/istanbul/test/cli/test-instrument-command.js +167 -0
- data/vendor/node_modules/istanbul/test/cli/test-json-report.js +60 -0
- data/vendor/node_modules/istanbul/test/cli/test-lcov-report.js +58 -0
- data/vendor/node_modules/istanbul/test/cli/test-lcovonly-report.js +61 -0
- data/vendor/node_modules/istanbul/test/cli/test-lots-of-files.js +87 -0
- data/vendor/node_modules/istanbul/test/cli/test-none-report.js +17 -0
- data/vendor/node_modules/istanbul/test/cli/test-report-command.js +65 -0
- data/vendor/node_modules/istanbul/test/cli/test-teamcity-report.js +54 -0
- data/vendor/node_modules/istanbul/test/cli/test-test-command.js +43 -0
- data/vendor/node_modules/istanbul/test/common.js +19 -0
- data/vendor/node_modules/istanbul/test/helper.js +122 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-do.js +53 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-expressions.js +70 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-for.js +206 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-forin.js +50 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-functions.js +102 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-if.js +393 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-misc.js +35 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-statement.js +182 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-strict.js +121 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-switch.js +155 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-while.js +104 -0
- data/vendor/node_modules/istanbul/test/loader.js +38 -0
- data/vendor/node_modules/istanbul/test/other/data-complete-copy/baz.js +3 -0
- data/vendor/node_modules/istanbul/test/other/data-complete-copy/fixture.xml +1 -0
- data/vendor/node_modules/istanbul/test/other/data-complete-copy/foo.js +4 -0
- data/vendor/node_modules/istanbul/test/other/data-complete-copy/myfile1 +0 -0
- data/vendor/node_modules/istanbul/test/other/data-complete-copy/myfile2 +1 -0
- data/vendor/node_modules/istanbul/test/other/data-complete-copy/subdir/x.css +3 -0
- data/vendor/node_modules/istanbul/test/other/data/baz.js +3 -0
- data/vendor/node_modules/istanbul/test/other/data/foo.js +4 -0
- data/vendor/node_modules/istanbul/test/other/data/matcher/general/general.js +2 -0
- data/vendor/node_modules/istanbul/test/other/data/matcher/general/node_modules/mod-file.js +2 -0
- data/vendor/node_modules/istanbul/test/other/data/matcher/lib/lib-top.js +2 -0
- data/vendor/node_modules/istanbul/test/other/data/matcher/node_modules/dep/mod-file.js +2 -0
- data/vendor/node_modules/istanbul/test/other/data/matcher/node_modules/mod-file.js +2 -0
- data/vendor/node_modules/istanbul/test/other/data/matcher/top.js +2 -0
- data/vendor/node_modules/istanbul/test/other/test-collector.js +85 -0
- data/vendor/node_modules/istanbul/test/other/test-command-xface.js +35 -0
- data/vendor/node_modules/istanbul/test/other/test-file-writer.js +71 -0
- data/vendor/node_modules/istanbul/test/other/test-help-formatter.js +31 -0
- data/vendor/node_modules/istanbul/test/other/test-hook.js +87 -0
- data/vendor/node_modules/istanbul/test/other/test-index-xface.js +17 -0
- data/vendor/node_modules/istanbul/test/other/test-input-error.js +10 -0
- data/vendor/node_modules/istanbul/test/other/test-insertion-text.js +102 -0
- data/vendor/node_modules/istanbul/test/other/test-matcher.js +93 -0
- data/vendor/node_modules/istanbul/test/other/test-object-utils.js +201 -0
- data/vendor/node_modules/istanbul/test/other/test-store.js +129 -0
- data/vendor/node_modules/istanbul/test/other/test-summarizer.js +172 -0
- data/vendor/node_modules/istanbul/test/run-again.js +19 -0
- data/vendor/node_modules/istanbul/test/run.js +108 -0
- data/vendor/node_modules/istanbul/yui-coverage-comparison.md +85 -0
- data/vendor/node_modules/qunit-clib/LICENSE.txt +20 -0
- data/vendor/node_modules/qunit-clib/README.md +2 -0
- data/vendor/node_modules/qunit-clib/package.json +36 -0
- data/vendor/node_modules/qunit-clib/qunit-clib.js +570 -0
- data/vendor/node_modules/qunitjs/AUTHORS.txt +55 -0
- data/vendor/node_modules/qunitjs/History.md +496 -0
- data/vendor/node_modules/qunitjs/README.md +62 -0
- data/vendor/node_modules/qunitjs/addons/canvas/README.md +17 -0
- data/vendor/node_modules/qunitjs/addons/canvas/canvas-test.js +76 -0
- data/vendor/node_modules/qunitjs/addons/canvas/canvas.html +15 -0
- data/vendor/node_modules/qunitjs/addons/canvas/qunit-canvas.js +6 -0
- data/vendor/node_modules/qunitjs/addons/close-enough/README.md +18 -0
- data/vendor/node_modules/qunitjs/addons/close-enough/close-enough-test.js +35 -0
- data/vendor/node_modules/qunitjs/addons/close-enough/close-enough.html +14 -0
- data/vendor/node_modules/qunitjs/addons/close-enough/qunit-close-enough.js +32 -0
- data/vendor/node_modules/qunitjs/addons/composite/README.md +26 -0
- data/vendor/node_modules/qunitjs/addons/composite/composite-demo-test.html +24 -0
- data/vendor/node_modules/qunitjs/addons/composite/index.html +34 -0
- data/vendor/node_modules/qunitjs/addons/composite/qunit-composite.css +13 -0
- data/vendor/node_modules/qunitjs/addons/composite/qunit-composite.js +112 -0
- data/vendor/node_modules/qunitjs/addons/junitlogger/README.md +18 -0
- data/vendor/node_modules/qunitjs/addons/junitlogger/index.html +44 -0
- data/vendor/node_modules/qunitjs/addons/junitlogger/junitlogger.js +306 -0
- data/vendor/node_modules/qunitjs/addons/phantomjs/README.md +16 -0
- data/vendor/node_modules/qunitjs/addons/phantomjs/runner.js +127 -0
- data/vendor/node_modules/qunitjs/addons/step/README.md +20 -0
- data/vendor/node_modules/qunitjs/addons/step/qunit-step.js +26 -0
- data/vendor/node_modules/qunitjs/addons/step/step-test.js +15 -0
- data/vendor/node_modules/qunitjs/addons/step/step.html +14 -0
- data/vendor/node_modules/qunitjs/addons/themes/README.md +6 -0
- data/vendor/node_modules/qunitjs/addons/themes/gabe.css +371 -0
- data/vendor/node_modules/qunitjs/addons/themes/gabe.html +15 -0
- data/vendor/node_modules/qunitjs/addons/themes/ninja.css +196 -0
- data/vendor/node_modules/qunitjs/addons/themes/ninja.html +15 -0
- data/vendor/node_modules/qunitjs/addons/themes/nv.css +217 -0
- data/vendor/node_modules/qunitjs/addons/themes/nv.html +15 -0
- data/vendor/node_modules/qunitjs/grunt.js +101 -0
- data/vendor/node_modules/qunitjs/package.json +49 -0
- data/vendor/node_modules/qunitjs/qunit/qunit.css +244 -0
- data/vendor/node_modules/qunitjs/qunit/qunit.js +2152 -0
- data/vendor/node_modules/qunitjs/test/async.html +26 -0
- data/vendor/node_modules/qunitjs/test/async.js +6 -0
- data/vendor/node_modules/qunitjs/test/deepEqual.js +1438 -0
- data/vendor/node_modules/qunitjs/test/headless.html +28 -0
- data/vendor/node_modules/qunitjs/test/index.html +16 -0
- data/vendor/node_modules/qunitjs/test/logs.html +14 -0
- data/vendor/node_modules/qunitjs/test/logs.js +184 -0
- data/vendor/node_modules/qunitjs/test/narwhal-test.js +22 -0
- data/vendor/node_modules/qunitjs/test/node-test.js +22 -0
- data/vendor/node_modules/qunitjs/test/swarminject.js +10 -0
- data/vendor/node_modules/qunitjs/test/test.js +804 -0
- data/vendor/node_modules/regenerate/LICENSE-MIT.txt +20 -0
- data/vendor/node_modules/regenerate/README.md +467 -0
- data/vendor/node_modules/regenerate/package.json +50 -0
- data/vendor/node_modules/regenerate/regenerate.js +617 -0
- data/vendor/node_modules/requirejs/README.md +9 -0
- data/vendor/node_modules/requirejs/bin/r.js +26059 -0
- data/vendor/node_modules/requirejs/package.json +39 -0
- data/vendor/node_modules/requirejs/require.js +2054 -0
- data/vendor/package.json +56 -0
- metadata +949 -0
data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/functions.js
ADDED
@@ -0,0 +1,198 @@
|
|
1
|
+
$(document).ready(function() {
|
2
|
+
|
3
|
+
module("Functions");
|
4
|
+
|
5
|
+
test("functions: bind", function() {
|
6
|
+
var context = {name : 'moe'};
|
7
|
+
var func = function(arg) { return "name: " + (this.name || arg); };
|
8
|
+
var bound = _.bind(func, context);
|
9
|
+
equals(bound(), 'name: moe', 'can bind a function to a context');
|
10
|
+
|
11
|
+
bound = _(func).bind(context);
|
12
|
+
equals(bound(), 'name: moe', 'can do OO-style binding');
|
13
|
+
|
14
|
+
bound = _.bind(func, null, 'curly');
|
15
|
+
equals(bound(), 'name: curly', 'can bind without specifying a context');
|
16
|
+
|
17
|
+
func = function(salutation, name) { return salutation + ': ' + name; };
|
18
|
+
func = _.bind(func, this, 'hello');
|
19
|
+
equals(func('moe'), 'hello: moe', 'the function was partially applied in advance');
|
20
|
+
|
21
|
+
var func = _.bind(func, this, 'curly');
|
22
|
+
equals(func(), 'hello: curly', 'the function was completely applied in advance');
|
23
|
+
|
24
|
+
var func = function(salutation, firstname, lastname) { return salutation + ': ' + firstname + ' ' + lastname; };
|
25
|
+
func = _.bind(func, this, 'hello', 'moe', 'curly');
|
26
|
+
equals(func(), 'hello: moe curly', 'the function was partially applied in advance and can accept multiple arguments');
|
27
|
+
|
28
|
+
func = function(context, message) { equals(this, context, message); };
|
29
|
+
_.bind(func, 0, 0, 'can bind a function to `0`')();
|
30
|
+
_.bind(func, '', '', 'can bind a function to an empty string')();
|
31
|
+
_.bind(func, false, false, 'can bind a function to `false`')();
|
32
|
+
|
33
|
+
// These tests are only meaningful when using a browser without a native bind function
|
34
|
+
// To test this with a modern browser, set underscore's nativeBind to undefined
|
35
|
+
var F = function () { return this; };
|
36
|
+
var Boundf = _.bind(F, {hello: "moe curly"});
|
37
|
+
equal(new Boundf().hello, undefined, "function should not be bound to the context, to comply with ECMAScript 5");
|
38
|
+
equal(Boundf().hello, "moe curly", "When called without the new operator, it's OK to be bound to the context");
|
39
|
+
});
|
40
|
+
|
41
|
+
test("functions: bindAll", function() {
|
42
|
+
var curly = {name : 'curly'}, moe = {
|
43
|
+
name : 'moe',
|
44
|
+
getName : function() { return 'name: ' + this.name; },
|
45
|
+
sayHi : function() { return 'hi: ' + this.name; }
|
46
|
+
};
|
47
|
+
curly.getName = moe.getName;
|
48
|
+
_.bindAll(moe, 'getName', 'sayHi');
|
49
|
+
curly.sayHi = moe.sayHi;
|
50
|
+
equals(curly.getName(), 'name: curly', 'unbound function is bound to current object');
|
51
|
+
equals(curly.sayHi(), 'hi: moe', 'bound function is still bound to original object');
|
52
|
+
|
53
|
+
curly = {name : 'curly'};
|
54
|
+
moe = {
|
55
|
+
name : 'moe',
|
56
|
+
getName : function() { return 'name: ' + this.name; },
|
57
|
+
sayHi : function() { return 'hi: ' + this.name; }
|
58
|
+
};
|
59
|
+
_.bindAll(moe);
|
60
|
+
curly.sayHi = moe.sayHi;
|
61
|
+
equals(curly.sayHi(), 'hi: moe', 'calling bindAll with no arguments binds all functions to the object');
|
62
|
+
});
|
63
|
+
|
64
|
+
test("functions: memoize", function() {
|
65
|
+
var fib = function(n) {
|
66
|
+
return n < 2 ? n : fib(n - 1) + fib(n - 2);
|
67
|
+
};
|
68
|
+
var fastFib = _.memoize(fib);
|
69
|
+
equals(fib(10), 55, 'a memoized version of fibonacci produces identical results');
|
70
|
+
equals(fastFib(10), 55, 'a memoized version of fibonacci produces identical results');
|
71
|
+
|
72
|
+
var o = function(str) {
|
73
|
+
return str;
|
74
|
+
};
|
75
|
+
var fastO = _.memoize(o);
|
76
|
+
equals(o('toString'), 'toString', 'checks hasOwnProperty');
|
77
|
+
equals(fastO('toString'), 'toString', 'checks hasOwnProperty');
|
78
|
+
});
|
79
|
+
|
80
|
+
asyncTest("functions: delay", 2, function() {
|
81
|
+
var delayed = false;
|
82
|
+
_.delay(function(){ delayed = true; }, 100);
|
83
|
+
setTimeout(function(){ ok(!delayed, "didn't delay the function quite yet"); }, 50);
|
84
|
+
setTimeout(function(){ ok(delayed, 'delayed the function'); start(); }, 150);
|
85
|
+
});
|
86
|
+
|
87
|
+
asyncTest("functions: defer", 1, function() {
|
88
|
+
var deferred = false;
|
89
|
+
_.defer(function(bool){ deferred = bool; }, true);
|
90
|
+
_.delay(function(){ ok(deferred, "deferred the function"); start(); }, 50);
|
91
|
+
});
|
92
|
+
|
93
|
+
asyncTest("functions: throttle", 2, function() {
|
94
|
+
var counter = 0;
|
95
|
+
var incr = function(){ counter++; };
|
96
|
+
var throttledIncr = _.throttle(incr, 100);
|
97
|
+
throttledIncr(); throttledIncr(); throttledIncr();
|
98
|
+
setTimeout(throttledIncr, 70);
|
99
|
+
setTimeout(throttledIncr, 120);
|
100
|
+
setTimeout(throttledIncr, 140);
|
101
|
+
setTimeout(throttledIncr, 190);
|
102
|
+
setTimeout(throttledIncr, 220);
|
103
|
+
setTimeout(throttledIncr, 240);
|
104
|
+
_.delay(function(){ ok(counter == 1, "incr was called immediately"); }, 30);
|
105
|
+
_.delay(function(){ ok(counter == 4, "incr was throttled"); start(); }, 400);
|
106
|
+
});
|
107
|
+
|
108
|
+
asyncTest("functions: throttle arguments", 2, function() {
|
109
|
+
var value = 0;
|
110
|
+
var update = function(val){ value = val; };
|
111
|
+
var throttledUpdate = _.throttle(update, 100);
|
112
|
+
throttledUpdate(1); throttledUpdate(2); throttledUpdate(3);
|
113
|
+
setTimeout(function(){ throttledUpdate(4); }, 120);
|
114
|
+
setTimeout(function(){ throttledUpdate(5); }, 140);
|
115
|
+
setTimeout(function(){ throttledUpdate(6); }, 250);
|
116
|
+
_.delay(function(){ equals(value, 1, "updated to latest value"); }, 40);
|
117
|
+
_.delay(function(){ equals(value, 6, "updated to latest value"); start(); }, 400);
|
118
|
+
});
|
119
|
+
|
120
|
+
asyncTest("functions: throttle once", 1, function() {
|
121
|
+
var counter = 0;
|
122
|
+
var incr = function(){ counter++; };
|
123
|
+
var throttledIncr = _.throttle(incr, 100);
|
124
|
+
throttledIncr();
|
125
|
+
_.delay(function(){ ok(counter == 1, "incr was called once"); start(); }, 220);
|
126
|
+
});
|
127
|
+
|
128
|
+
asyncTest("functions: throttle twice", 1, function() {
|
129
|
+
var counter = 0;
|
130
|
+
var incr = function(){ counter++; };
|
131
|
+
var throttledIncr = _.throttle(incr, 100);
|
132
|
+
throttledIncr(); throttledIncr();
|
133
|
+
_.delay(function(){ ok(counter == 2, "incr was called twice"); start(); }, 220);
|
134
|
+
});
|
135
|
+
|
136
|
+
asyncTest("functions: debounce", 1, function() {
|
137
|
+
var counter = 0;
|
138
|
+
var incr = function(){ counter++; };
|
139
|
+
var debouncedIncr = _.debounce(incr, 50);
|
140
|
+
debouncedIncr(); debouncedIncr(); debouncedIncr();
|
141
|
+
setTimeout(debouncedIncr, 30);
|
142
|
+
setTimeout(debouncedIncr, 60);
|
143
|
+
setTimeout(debouncedIncr, 90);
|
144
|
+
setTimeout(debouncedIncr, 120);
|
145
|
+
setTimeout(debouncedIncr, 150);
|
146
|
+
_.delay(function(){ ok(counter == 1, "incr was debounced"); start(); }, 220);
|
147
|
+
});
|
148
|
+
|
149
|
+
test("functions: once", function() {
|
150
|
+
var num = 0;
|
151
|
+
var increment = _.once(function(){ num++; });
|
152
|
+
increment();
|
153
|
+
increment();
|
154
|
+
equals(num, 1);
|
155
|
+
});
|
156
|
+
|
157
|
+
test("functions: wrap", function() {
|
158
|
+
var greet = function(name){ return "hi: " + name; };
|
159
|
+
var backwards = _.wrap(greet, function(func, name){ return func(name) + ' ' + name.split('').reverse().join(''); });
|
160
|
+
equals(backwards('moe'), 'hi: moe eom', 'wrapped the saluation function');
|
161
|
+
|
162
|
+
var inner = function(){ return "Hello "; };
|
163
|
+
var obj = {name : "Moe"};
|
164
|
+
obj.hi = _.wrap(inner, function(fn){ return fn() + this.name; });
|
165
|
+
equals(obj.hi(), "Hello Moe");
|
166
|
+
|
167
|
+
var noop = function(){};
|
168
|
+
var wrapped = _.wrap(noop, function(fn){ return Array.prototype.slice.call(arguments, 0); });
|
169
|
+
var ret = wrapped(['whats', 'your'], 'vector', 'victor');
|
170
|
+
same(ret, [noop, ['whats', 'your'], 'vector', 'victor']);
|
171
|
+
});
|
172
|
+
|
173
|
+
test("functions: compose", function() {
|
174
|
+
var greet = function(name){ return "hi: " + name; };
|
175
|
+
var exclaim = function(sentence){ return sentence + '!'; };
|
176
|
+
var composed = _.compose(exclaim, greet);
|
177
|
+
equals(composed('moe'), 'hi: moe!', 'can compose a function that takes another');
|
178
|
+
|
179
|
+
composed = _.compose(greet, exclaim);
|
180
|
+
equals(composed('moe'), 'hi: moe!', 'in this case, the functions are also commutative');
|
181
|
+
});
|
182
|
+
|
183
|
+
test("functions: after", function() {
|
184
|
+
var testAfter = function(afterAmount, timesCalled) {
|
185
|
+
var afterCalled = 0;
|
186
|
+
var after = _.after(afterAmount, function() {
|
187
|
+
afterCalled++;
|
188
|
+
});
|
189
|
+
while (timesCalled--) after();
|
190
|
+
return afterCalled;
|
191
|
+
};
|
192
|
+
|
193
|
+
equals(testAfter(5, 5), 1, "after(N) should fire after being called N times");
|
194
|
+
equals(testAfter(5, 4), 0, "after(N) should not fire unless called N times");
|
195
|
+
equals(testAfter(0, 0), 1, "after(0) should fire immediately");
|
196
|
+
});
|
197
|
+
|
198
|
+
});
|
@@ -0,0 +1,535 @@
|
|
1
|
+
$(document).ready(function() {
|
2
|
+
|
3
|
+
module("Objects");
|
4
|
+
|
5
|
+
test("objects: keys", function() {
|
6
|
+
var exception = /object/;
|
7
|
+
equals(_.keys({one : 1, two : 2}).join(', '), 'one, two', 'can extract the keys from an object');
|
8
|
+
// the test above is not safe because it relies on for-in enumeration order
|
9
|
+
var a = []; a[1] = 0;
|
10
|
+
equals(_.keys(a).join(', '), '1', 'is not fooled by sparse arrays; see issue #95');
|
11
|
+
raises(function() { _.keys(null); }, exception, 'throws an error for `null` values');
|
12
|
+
raises(function() { _.keys(void 0); }, exception, 'throws an error for `undefined` values');
|
13
|
+
raises(function() { _.keys(1); }, exception, 'throws an error for number primitives');
|
14
|
+
raises(function() { _.keys('a'); }, exception, 'throws an error for string primitives');
|
15
|
+
raises(function() { _.keys(true); }, exception, 'throws an error for boolean primitives');
|
16
|
+
});
|
17
|
+
|
18
|
+
test("objects: values", function() {
|
19
|
+
equals(_.values({one : 1, two : 2}).join(', '), '1, 2', 'can extract the values from an object');
|
20
|
+
});
|
21
|
+
|
22
|
+
test("objects: functions", function() {
|
23
|
+
var obj = {a : 'dash', b : _.map, c : (/yo/), d : _.reduce};
|
24
|
+
ok(_.isEqual(['b', 'd'], _.functions(obj)), 'can grab the function names of any passed-in object');
|
25
|
+
|
26
|
+
var Animal = function(){};
|
27
|
+
Animal.prototype.run = function(){};
|
28
|
+
equals(_.functions(new Animal).join(''), 'run', 'also looks up functions on the prototype');
|
29
|
+
});
|
30
|
+
|
31
|
+
test("objects: extend", function() {
|
32
|
+
var result;
|
33
|
+
equals(_.extend({}, {a:'b'}).a, 'b', 'can extend an object with the attributes of another');
|
34
|
+
equals(_.extend({a:'x'}, {a:'b'}).a, 'b', 'properties in source override destination');
|
35
|
+
equals(_.extend({x:'x'}, {a:'b'}).x, 'x', 'properties not in source dont get overriden');
|
36
|
+
result = _.extend({x:'x'}, {a:'a'}, {b:'b'});
|
37
|
+
ok(_.isEqual(result, {x:'x', a:'a', b:'b'}), 'can extend from multiple source objects');
|
38
|
+
result = _.extend({x:'x'}, {a:'a', x:2}, {a:'b'});
|
39
|
+
ok(_.isEqual(result, {x:2, a:'b'}), 'extending from multiple source objects last property trumps');
|
40
|
+
result = _.extend({}, {a: void 0, b: null});
|
41
|
+
equals(_.keys(result).join(''), 'ab', 'extend does not copy undefined values');
|
42
|
+
});
|
43
|
+
|
44
|
+
test("objects: defaults", function() {
|
45
|
+
var result;
|
46
|
+
var options = {zero: 0, one: 1, empty: "", nan: NaN, string: "string"};
|
47
|
+
|
48
|
+
_.defaults(options, {zero: 1, one: 10, twenty: 20});
|
49
|
+
equals(options.zero, 0, 'value exists');
|
50
|
+
equals(options.one, 1, 'value exists');
|
51
|
+
equals(options.twenty, 20, 'default applied');
|
52
|
+
|
53
|
+
_.defaults(options, {empty: "full"}, {nan: "nan"}, {word: "word"}, {word: "dog"});
|
54
|
+
equals(options.empty, "", 'value exists');
|
55
|
+
ok(_.isNaN(options.nan), "NaN isn't overridden");
|
56
|
+
equals(options.word, "word", 'new value is added, first one wins');
|
57
|
+
});
|
58
|
+
|
59
|
+
test("objects: clone", function() {
|
60
|
+
var moe = {name : 'moe', lucky : [13, 27, 34]};
|
61
|
+
var clone = _.clone(moe);
|
62
|
+
equals(clone.name, 'moe', 'the clone as the attributes of the original');
|
63
|
+
|
64
|
+
clone.name = 'curly';
|
65
|
+
ok(clone.name == 'curly' && moe.name == 'moe', 'clones can change shallow attributes without affecting the original');
|
66
|
+
|
67
|
+
clone.lucky.push(101);
|
68
|
+
equals(_.last(moe.lucky), 101, 'changes to deep attributes are shared with the original');
|
69
|
+
|
70
|
+
equals(_.clone(undefined), void 0, 'non objects should not be changed by clone');
|
71
|
+
equals(_.clone(1), 1, 'non objects should not be changed by clone');
|
72
|
+
equals(_.clone(null), null, 'non objects should not be changed by clone');
|
73
|
+
});
|
74
|
+
|
75
|
+
test("objects: isEqual", function() {
|
76
|
+
function First() {
|
77
|
+
this.value = 1;
|
78
|
+
}
|
79
|
+
First.prototype.value = 1;
|
80
|
+
function Second() {
|
81
|
+
this.value = 1;
|
82
|
+
}
|
83
|
+
Second.prototype.value = 2;
|
84
|
+
|
85
|
+
// Basic equality and identity comparisons.
|
86
|
+
ok(_.isEqual(null, null), "`null` is equal to `null`");
|
87
|
+
ok(_.isEqual(), "`undefined` is equal to `undefined`");
|
88
|
+
|
89
|
+
ok(!_.isEqual(0, -0), "`0` is not equal to `-0`");
|
90
|
+
ok(!_.isEqual(-0, 0), "Commutative equality is implemented for `0` and `-0`");
|
91
|
+
ok(!_.isEqual(null, undefined), "`null` is not equal to `undefined`");
|
92
|
+
ok(!_.isEqual(undefined, null), "Commutative equality is implemented for `null` and `undefined`");
|
93
|
+
|
94
|
+
// String object and primitive comparisons.
|
95
|
+
ok(_.isEqual("Curly", "Curly"), "Identical string primitives are equal");
|
96
|
+
ok(_.isEqual(new String("Curly"), new String("Curly")), "String objects with identical primitive values are equal");
|
97
|
+
ok(_.isEqual(new String("Curly"), "Curly"), "String primitives and their corresponding object wrappers are equal");
|
98
|
+
ok(_.isEqual("Curly", new String("Curly")), "Commutative equality is implemented for string objects and primitives");
|
99
|
+
|
100
|
+
ok(!_.isEqual("Curly", "Larry"), "String primitives with different values are not equal");
|
101
|
+
ok(!_.isEqual(new String("Curly"), new String("Larry")), "String objects with different primitive values are not equal");
|
102
|
+
ok(!_.isEqual(new String("Curly"), {toString: function(){ return "Curly"; }}), "String objects and objects with a custom `toString` method are not equal");
|
103
|
+
|
104
|
+
// Number object and primitive comparisons.
|
105
|
+
ok(_.isEqual(75, 75), "Identical number primitives are equal");
|
106
|
+
ok(_.isEqual(new Number(75), new Number(75)), "Number objects with identical primitive values are equal");
|
107
|
+
ok(_.isEqual(75, new Number(75)), "Number primitives and their corresponding object wrappers are equal");
|
108
|
+
ok(_.isEqual(new Number(75), 75), "Commutative equality is implemented for number objects and primitives");
|
109
|
+
ok(!_.isEqual(new Number(0), -0), "`new Number(0)` and `-0` are not equal");
|
110
|
+
ok(!_.isEqual(0, new Number(-0)), "Commutative equality is implemented for `new Number(0)` and `-0`");
|
111
|
+
|
112
|
+
ok(!_.isEqual(new Number(75), new Number(63)), "Number objects with different primitive values are not equal");
|
113
|
+
ok(!_.isEqual(new Number(63), {valueOf: function(){ return 63; }}), "Number objects and objects with a `valueOf` method are not equal");
|
114
|
+
|
115
|
+
// Comparisons involving `NaN`.
|
116
|
+
ok(_.isEqual(NaN, NaN), "`NaN` is equal to `NaN`");
|
117
|
+
ok(!_.isEqual(61, NaN), "A number primitive is not equal to `NaN`");
|
118
|
+
ok(!_.isEqual(new Number(79), NaN), "A number object is not equal to `NaN`");
|
119
|
+
ok(!_.isEqual(Infinity, NaN), "`Infinity` is not equal to `NaN`");
|
120
|
+
|
121
|
+
// Boolean object and primitive comparisons.
|
122
|
+
ok(_.isEqual(true, true), "Identical boolean primitives are equal");
|
123
|
+
ok(_.isEqual(new Boolean, new Boolean), "Boolean objects with identical primitive values are equal");
|
124
|
+
ok(_.isEqual(true, new Boolean(true)), "Boolean primitives and their corresponding object wrappers are equal");
|
125
|
+
ok(_.isEqual(new Boolean(true), true), "Commutative equality is implemented for booleans");
|
126
|
+
ok(!_.isEqual(new Boolean(true), new Boolean), "Boolean objects with different primitive values are not equal");
|
127
|
+
|
128
|
+
// Common type coercions.
|
129
|
+
ok(!_.isEqual(true, new Boolean(false)), "Boolean objects are not equal to the boolean primitive `true`");
|
130
|
+
ok(!_.isEqual("75", 75), "String and number primitives with like values are not equal");
|
131
|
+
ok(!_.isEqual(new Number(63), new String(63)), "String and number objects with like values are not equal");
|
132
|
+
ok(!_.isEqual(75, "75"), "Commutative equality is implemented for like string and number values");
|
133
|
+
ok(!_.isEqual(0, ""), "Number and string primitives with like values are not equal");
|
134
|
+
ok(!_.isEqual(1, true), "Number and boolean primitives with like values are not equal");
|
135
|
+
ok(!_.isEqual(new Boolean(false), new Number(0)), "Boolean and number objects with like values are not equal");
|
136
|
+
ok(!_.isEqual(false, new String("")), "Boolean primitives and string objects with like values are not equal");
|
137
|
+
ok(!_.isEqual(12564504e5, new Date(2009, 9, 25)), "Dates and their corresponding numeric primitive values are not equal");
|
138
|
+
|
139
|
+
// Dates.
|
140
|
+
ok(_.isEqual(new Date(2009, 9, 25), new Date(2009, 9, 25)), "Date objects referencing identical times are equal");
|
141
|
+
ok(!_.isEqual(new Date(2009, 9, 25), new Date(2009, 11, 13)), "Date objects referencing different times are not equal");
|
142
|
+
ok(!_.isEqual(new Date(2009, 11, 13), {
|
143
|
+
getTime: function(){
|
144
|
+
return 12606876e5;
|
145
|
+
}
|
146
|
+
}), "Date objects and objects with a `getTime` method are not equal");
|
147
|
+
ok(!_.isEqual(new Date("Curly"), new Date("Curly")), "Invalid dates are not equal");
|
148
|
+
|
149
|
+
// Functions.
|
150
|
+
ok(!_.isEqual(First, Second), "Different functions with identical bodies and source code representations are not equal");
|
151
|
+
|
152
|
+
// RegExps.
|
153
|
+
ok(_.isEqual(/(?:)/gim, /(?:)/gim), "RegExps with equivalent patterns and flags are equal");
|
154
|
+
ok(!_.isEqual(/(?:)/g, /(?:)/gi), "RegExps with equivalent patterns and different flags are not equal");
|
155
|
+
ok(!_.isEqual(/Moe/gim, /Curly/gim), "RegExps with different patterns and equivalent flags are not equal");
|
156
|
+
ok(!_.isEqual(/(?:)/gi, /(?:)/g), "Commutative equality is implemented for RegExps");
|
157
|
+
ok(!_.isEqual(/Curly/g, {source: "Larry", global: true, ignoreCase: false, multiline: false}), "RegExps and RegExp-like objects are not equal");
|
158
|
+
|
159
|
+
// Empty arrays, array-like objects, and object literals.
|
160
|
+
ok(_.isEqual({}, {}), "Empty object literals are equal");
|
161
|
+
ok(_.isEqual([], []), "Empty array literals are equal");
|
162
|
+
ok(_.isEqual([{}], [{}]), "Empty nested arrays and objects are equal");
|
163
|
+
ok(!_.isEqual({length: 0}, []), "Array-like objects and arrays are not equal.");
|
164
|
+
ok(!_.isEqual([], {length: 0}), "Commutative equality is implemented for array-like objects");
|
165
|
+
|
166
|
+
ok(!_.isEqual({}, []), "Object literals and array literals are not equal");
|
167
|
+
ok(!_.isEqual([], {}), "Commutative equality is implemented for objects and arrays");
|
168
|
+
|
169
|
+
// Arrays with primitive and object values.
|
170
|
+
ok(_.isEqual([1, "Larry", true], [1, "Larry", true]), "Arrays containing identical primitives are equal");
|
171
|
+
ok(_.isEqual([/Moe/g, new Date(2009, 9, 25)], [/Moe/g, new Date(2009, 9, 25)]), "Arrays containing equivalent elements are equal");
|
172
|
+
|
173
|
+
// Multi-dimensional arrays.
|
174
|
+
var a = [new Number(47), false, "Larry", /Moe/, new Date(2009, 11, 13), ['running', 'biking', new String('programming')], {a: 47}];
|
175
|
+
var b = [new Number(47), false, "Larry", /Moe/, new Date(2009, 11, 13), ['running', 'biking', new String('programming')], {a: 47}];
|
176
|
+
ok(_.isEqual(a, b), "Arrays containing nested arrays and objects are recursively compared");
|
177
|
+
|
178
|
+
// Overwrite the methods defined in ES 5.1 section 15.4.4.
|
179
|
+
a.forEach = a.map = a.filter = a.every = a.indexOf = a.lastIndexOf = a.some = a.reduce = a.reduceRight = null;
|
180
|
+
b.join = b.pop = b.reverse = b.shift = b.slice = b.splice = b.concat = b.sort = b.unshift = null;
|
181
|
+
|
182
|
+
// Array elements and properties.
|
183
|
+
ok(_.isEqual(a, b), "Arrays containing equivalent elements and different non-numeric properties are equal");
|
184
|
+
a.push("White Rocks");
|
185
|
+
ok(!_.isEqual(a, b), "Arrays of different lengths are not equal");
|
186
|
+
a.push("East Boulder");
|
187
|
+
b.push("Gunbarrel Ranch", "Teller Farm");
|
188
|
+
ok(!_.isEqual(a, b), "Arrays of identical lengths containing different elements are not equal");
|
189
|
+
|
190
|
+
// Sparse arrays.
|
191
|
+
ok(_.isEqual(Array(3), Array(3)), "Sparse arrays of identical lengths are equal");
|
192
|
+
ok(!_.isEqual(Array(3), Array(6)), "Sparse arrays of different lengths are not equal when both are empty");
|
193
|
+
|
194
|
+
// According to the Microsoft deviations spec, section 2.1.26, JScript 5.x treats `undefined`
|
195
|
+
// elements in arrays as elisions. Thus, sparse arrays and dense arrays containing `undefined`
|
196
|
+
// values are equivalent.
|
197
|
+
if (0 in [undefined]) {
|
198
|
+
ok(!_.isEqual(Array(3), [undefined, undefined, undefined]), "Sparse and dense arrays are not equal");
|
199
|
+
ok(!_.isEqual([undefined, undefined, undefined], Array(3)), "Commutative equality is implemented for sparse and dense arrays");
|
200
|
+
}
|
201
|
+
|
202
|
+
// Simple objects.
|
203
|
+
ok(_.isEqual({a: "Curly", b: 1, c: true}, {a: "Curly", b: 1, c: true}), "Objects containing identical primitives are equal");
|
204
|
+
ok(_.isEqual({a: /Curly/g, b: new Date(2009, 11, 13)}, {a: /Curly/g, b: new Date(2009, 11, 13)}), "Objects containing equivalent members are equal");
|
205
|
+
ok(!_.isEqual({a: 63, b: 75}, {a: 61, b: 55}), "Objects of identical sizes with different values are not equal");
|
206
|
+
ok(!_.isEqual({a: 63, b: 75}, {a: 61, c: 55}), "Objects of identical sizes with different property names are not equal");
|
207
|
+
ok(!_.isEqual({a: 1, b: 2}, {a: 1}), "Objects of different sizes are not equal");
|
208
|
+
ok(!_.isEqual({a: 1}, {a: 1, b: 2}), "Commutative equality is implemented for objects");
|
209
|
+
ok(!_.isEqual({x: 1, y: undefined}, {x: 1, z: 2}), "Objects with identical keys and different values are not equivalent");
|
210
|
+
|
211
|
+
// `A` contains nested objects and arrays.
|
212
|
+
a = {
|
213
|
+
name: new String("Moe Howard"),
|
214
|
+
age: new Number(77),
|
215
|
+
stooge: true,
|
216
|
+
hobbies: ["acting"],
|
217
|
+
film: {
|
218
|
+
name: "Sing a Song of Six Pants",
|
219
|
+
release: new Date(1947, 9, 30),
|
220
|
+
stars: [new String("Larry Fine"), "Shemp Howard"],
|
221
|
+
minutes: new Number(16),
|
222
|
+
seconds: 54
|
223
|
+
}
|
224
|
+
};
|
225
|
+
|
226
|
+
// `B` contains equivalent nested objects and arrays.
|
227
|
+
b = {
|
228
|
+
name: new String("Moe Howard"),
|
229
|
+
age: new Number(77),
|
230
|
+
stooge: true,
|
231
|
+
hobbies: ["acting"],
|
232
|
+
film: {
|
233
|
+
name: "Sing a Song of Six Pants",
|
234
|
+
release: new Date(1947, 9, 30),
|
235
|
+
stars: [new String("Larry Fine"), "Shemp Howard"],
|
236
|
+
minutes: new Number(16),
|
237
|
+
seconds: 54
|
238
|
+
}
|
239
|
+
};
|
240
|
+
ok(_.isEqual(a, b), "Objects with nested equivalent members are recursively compared");
|
241
|
+
|
242
|
+
// Instances.
|
243
|
+
ok(_.isEqual(new First, new First), "Object instances are equal");
|
244
|
+
ok(!_.isEqual(new First, new Second), "Objects with different constructors and identical own properties are not equal");
|
245
|
+
ok(!_.isEqual({value: 1}, new First), "Object instances and objects sharing equivalent properties are not equal");
|
246
|
+
ok(!_.isEqual({value: 2}, new Second), "The prototype chain of objects should not be examined");
|
247
|
+
|
248
|
+
// Circular Arrays.
|
249
|
+
(a = []).push(a);
|
250
|
+
(b = []).push(b);
|
251
|
+
ok(_.isEqual(a, b), "Arrays containing circular references are equal");
|
252
|
+
a.push(new String("Larry"));
|
253
|
+
b.push(new String("Larry"));
|
254
|
+
ok(_.isEqual(a, b), "Arrays containing circular references and equivalent properties are equal");
|
255
|
+
a.push("Shemp");
|
256
|
+
b.push("Curly");
|
257
|
+
ok(!_.isEqual(a, b), "Arrays containing circular references and different properties are not equal");
|
258
|
+
|
259
|
+
// Circular Objects.
|
260
|
+
a = {abc: null};
|
261
|
+
b = {abc: null};
|
262
|
+
a.abc = a;
|
263
|
+
b.abc = b;
|
264
|
+
ok(_.isEqual(a, b), "Objects containing circular references are equal");
|
265
|
+
a.def = 75;
|
266
|
+
b.def = 75;
|
267
|
+
ok(_.isEqual(a, b), "Objects containing circular references and equivalent properties are equal");
|
268
|
+
a.def = new Number(75);
|
269
|
+
b.def = new Number(63);
|
270
|
+
ok(!_.isEqual(a, b), "Objects containing circular references and different properties are not equal");
|
271
|
+
|
272
|
+
// Cyclic Structures.
|
273
|
+
a = [{abc: null}];
|
274
|
+
b = [{abc: null}];
|
275
|
+
(a[0].abc = a).push(a);
|
276
|
+
(b[0].abc = b).push(b);
|
277
|
+
ok(_.isEqual(a, b), "Cyclic structures are equal");
|
278
|
+
a[0].def = "Larry";
|
279
|
+
b[0].def = "Larry";
|
280
|
+
ok(_.isEqual(a, b), "Cyclic structures containing equivalent properties are equal");
|
281
|
+
a[0].def = new String("Larry");
|
282
|
+
b[0].def = new String("Curly");
|
283
|
+
ok(!_.isEqual(a, b), "Cyclic structures containing different properties are not equal");
|
284
|
+
|
285
|
+
// Complex Circular References.
|
286
|
+
a = {foo: {b: {foo: {c: {foo: null}}}}};
|
287
|
+
b = {foo: {b: {foo: {c: {foo: null}}}}};
|
288
|
+
a.foo.b.foo.c.foo = a;
|
289
|
+
b.foo.b.foo.c.foo = b;
|
290
|
+
ok(_.isEqual(a, b), "Cyclic structures with nested and identically-named properties are equal");
|
291
|
+
|
292
|
+
// Chaining.
|
293
|
+
ok(!_.isEqual(_({x: 1, y: undefined}).chain(), _({x: 1, z: 2}).chain()), 'Chained objects containing different values are not equal');
|
294
|
+
equals(_({x: 1, y: 2}).chain().isEqual(_({x: 1, y: 2}).chain()).value(), true, '`isEqual` can be chained');
|
295
|
+
|
296
|
+
// Custom `isEqual` methods.
|
297
|
+
var isEqualObj = {isEqual: function (o) { return o.isEqual == this.isEqual; }, unique: {}};
|
298
|
+
var isEqualObjClone = {isEqual: isEqualObj.isEqual, unique: {}};
|
299
|
+
|
300
|
+
ok(_.isEqual(isEqualObj, isEqualObjClone), 'Both objects implement identical `isEqual` methods');
|
301
|
+
ok(_.isEqual(isEqualObjClone, isEqualObj), 'Commutative equality is implemented for objects with custom `isEqual` methods');
|
302
|
+
ok(!_.isEqual(isEqualObj, {}), 'Objects that do not implement equivalent `isEqual` methods are not equal');
|
303
|
+
ok(!_.isEqual({}, isEqualObj), 'Commutative equality is implemented for objects with different `isEqual` methods');
|
304
|
+
|
305
|
+
// Custom `isEqual` methods - comparing different types
|
306
|
+
LocalizedString = (function() {
|
307
|
+
function LocalizedString(id) { this.id = id; this.string = (this.id===10)? 'Bonjour': ''; }
|
308
|
+
LocalizedString.prototype.isEqual = function(that) {
|
309
|
+
if (_.isString(that)) return this.string == that;
|
310
|
+
else if (that instanceof LocalizedString) return this.id == that.id;
|
311
|
+
return false;
|
312
|
+
};
|
313
|
+
return LocalizedString;
|
314
|
+
})();
|
315
|
+
var localized_string1 = new LocalizedString(10), localized_string2 = new LocalizedString(10), localized_string3 = new LocalizedString(11);
|
316
|
+
ok(_.isEqual(localized_string1, localized_string2), 'comparing same typed instances with same ids');
|
317
|
+
ok(!_.isEqual(localized_string1, localized_string3), 'comparing same typed instances with different ids');
|
318
|
+
ok(_.isEqual(localized_string1, 'Bonjour'), 'comparing different typed instances with same values');
|
319
|
+
ok(_.isEqual('Bonjour', localized_string1), 'comparing different typed instances with same values');
|
320
|
+
ok(!_.isEqual('Bonjour', localized_string3), 'comparing two localized strings with different ids');
|
321
|
+
ok(!_.isEqual(localized_string1, 'Au revoir'), 'comparing different typed instances with different values');
|
322
|
+
ok(!_.isEqual('Au revoir', localized_string1), 'comparing different typed instances with different values');
|
323
|
+
|
324
|
+
// Custom `isEqual` methods - comparing with serialized data
|
325
|
+
Date.prototype.toJSON = function() {
|
326
|
+
return {
|
327
|
+
_type:'Date',
|
328
|
+
year:this.getUTCFullYear(),
|
329
|
+
month:this.getUTCMonth(),
|
330
|
+
day:this.getUTCDate(),
|
331
|
+
hours:this.getUTCHours(),
|
332
|
+
minutes:this.getUTCMinutes(),
|
333
|
+
seconds:this.getUTCSeconds()
|
334
|
+
};
|
335
|
+
};
|
336
|
+
Date.prototype.isEqual = function(that) {
|
337
|
+
var this_date_components = this.toJSON();
|
338
|
+
var that_date_components = (that instanceof Date) ? that.toJSON() : that;
|
339
|
+
delete this_date_components['_type']; delete that_date_components['_type']
|
340
|
+
return _.isEqual(this_date_components, that_date_components);
|
341
|
+
};
|
342
|
+
|
343
|
+
var date = new Date();
|
344
|
+
var date_json = {
|
345
|
+
_type:'Date',
|
346
|
+
year:date.getUTCFullYear(),
|
347
|
+
month:date.getUTCMonth(),
|
348
|
+
day:date.getUTCDate(),
|
349
|
+
hours:date.getUTCHours(),
|
350
|
+
minutes:date.getUTCMinutes(),
|
351
|
+
seconds:date.getUTCSeconds()
|
352
|
+
};
|
353
|
+
|
354
|
+
ok(_.isEqual(date_json, date), 'serialized date matches date');
|
355
|
+
ok(_.isEqual(date, date_json), 'date matches serialized date');
|
356
|
+
});
|
357
|
+
|
358
|
+
test("objects: isEmpty", function() {
|
359
|
+
ok(!_([1]).isEmpty(), '[1] is not empty');
|
360
|
+
ok(_.isEmpty([]), '[] is empty');
|
361
|
+
ok(!_.isEmpty({one : 1}), '{one : 1} is not empty');
|
362
|
+
ok(_.isEmpty({}), '{} is empty');
|
363
|
+
ok(_.isEmpty(new RegExp('')), 'objects with prototype properties are empty');
|
364
|
+
ok(_.isEmpty(null), 'null is empty');
|
365
|
+
ok(_.isEmpty(), 'undefined is empty');
|
366
|
+
ok(_.isEmpty(''), 'the empty string is empty');
|
367
|
+
ok(!_.isEmpty('moe'), 'but other strings are not');
|
368
|
+
|
369
|
+
var obj = {one : 1};
|
370
|
+
delete obj.one;
|
371
|
+
ok(_.isEmpty(obj), 'deleting all the keys from an object empties it');
|
372
|
+
});
|
373
|
+
|
374
|
+
// Setup remote variables for iFrame tests.
|
375
|
+
var iframe = document.createElement('iframe');
|
376
|
+
jQuery(iframe).appendTo(document.body);
|
377
|
+
var iDoc = iframe.contentDocument || iframe.contentWindow.document;
|
378
|
+
iDoc.write(
|
379
|
+
"<script>\
|
380
|
+
parent.iElement = document.createElement('div');\
|
381
|
+
parent.iArguments = (function(){ return arguments; })(1, 2, 3);\
|
382
|
+
parent.iArray = [1, 2, 3];\
|
383
|
+
parent.iString = new String('hello');\
|
384
|
+
parent.iNumber = new Number(100);\
|
385
|
+
parent.iFunction = (function(){});\
|
386
|
+
parent.iDate = new Date();\
|
387
|
+
parent.iRegExp = /hi/;\
|
388
|
+
parent.iNaN = NaN;\
|
389
|
+
parent.iNull = null;\
|
390
|
+
parent.iBoolean = new Boolean(false);\
|
391
|
+
parent.iUndefined = undefined;\
|
392
|
+
</script>"
|
393
|
+
);
|
394
|
+
iDoc.close();
|
395
|
+
|
396
|
+
test("objects: isElement", function() {
|
397
|
+
ok(!_.isElement('div'), 'strings are not dom elements');
|
398
|
+
ok(_.isElement($('html')[0]), 'the html tag is a DOM element');
|
399
|
+
ok(_.isElement(iElement), 'even from another frame');
|
400
|
+
});
|
401
|
+
|
402
|
+
test("objects: isArguments", function() {
|
403
|
+
var args = (function(){ return arguments; })(1, 2, 3);
|
404
|
+
ok(!_.isArguments('string'), 'a string is not an arguments object');
|
405
|
+
ok(!_.isArguments(_.isArguments), 'a function is not an arguments object');
|
406
|
+
ok(_.isArguments(args), 'but the arguments object is an arguments object');
|
407
|
+
ok(!_.isArguments(_.toArray(args)), 'but not when it\'s converted into an array');
|
408
|
+
ok(!_.isArguments([1,2,3]), 'and not vanilla arrays.');
|
409
|
+
ok(_.isArguments(iArguments), 'even from another frame');
|
410
|
+
});
|
411
|
+
|
412
|
+
test("objects: isObject", function() {
|
413
|
+
ok(_.isObject(arguments), 'the arguments object is object');
|
414
|
+
ok(_.isObject([1, 2, 3]), 'and arrays');
|
415
|
+
ok(_.isObject($('html')[0]), 'and DOM element');
|
416
|
+
ok(_.isObject(iElement), 'even from another frame');
|
417
|
+
ok(_.isObject(function () {}), 'and functions');
|
418
|
+
ok(_.isObject(iFunction), 'even from another frame');
|
419
|
+
ok(!_.isObject(null), 'but not null');
|
420
|
+
ok(!_.isObject(undefined), 'and not undefined');
|
421
|
+
ok(!_.isObject('string'), 'and not string');
|
422
|
+
ok(!_.isObject(12), 'and not number');
|
423
|
+
ok(!_.isObject(true), 'and not boolean');
|
424
|
+
ok(_.isObject(new String('string')), 'but new String()');
|
425
|
+
});
|
426
|
+
|
427
|
+
test("objects: isArray", function() {
|
428
|
+
ok(!_.isArray(arguments), 'the arguments object is not an array');
|
429
|
+
ok(_.isArray([1, 2, 3]), 'but arrays are');
|
430
|
+
ok(_.isArray(iArray), 'even from another frame');
|
431
|
+
});
|
432
|
+
|
433
|
+
test("objects: isString", function() {
|
434
|
+
ok(!_.isString(document.body), 'the document body is not a string');
|
435
|
+
ok(_.isString([1, 2, 3].join(', ')), 'but strings are');
|
436
|
+
ok(_.isString(iString), 'even from another frame');
|
437
|
+
});
|
438
|
+
|
439
|
+
test("objects: isNumber", function() {
|
440
|
+
ok(!_.isNumber('string'), 'a string is not a number');
|
441
|
+
ok(!_.isNumber(arguments), 'the arguments object is not a number');
|
442
|
+
ok(!_.isNumber(undefined), 'undefined is not a number');
|
443
|
+
ok(_.isNumber(3 * 4 - 7 / 10), 'but numbers are');
|
444
|
+
ok(_.isNumber(NaN), 'NaN *is* a number');
|
445
|
+
ok(_.isNumber(Infinity), 'Infinity is a number');
|
446
|
+
ok(_.isNumber(iNumber), 'even from another frame');
|
447
|
+
ok(!_.isNumber('1'), 'numeric strings are not numbers');
|
448
|
+
});
|
449
|
+
|
450
|
+
test("objects: isBoolean", function() {
|
451
|
+
ok(!_.isBoolean(2), 'a number is not a boolean');
|
452
|
+
ok(!_.isBoolean("string"), 'a string is not a boolean');
|
453
|
+
ok(!_.isBoolean("false"), 'the string "false" is not a boolean');
|
454
|
+
ok(!_.isBoolean("true"), 'the string "true" is not a boolean');
|
455
|
+
ok(!_.isBoolean(arguments), 'the arguments object is not a boolean');
|
456
|
+
ok(!_.isBoolean(undefined), 'undefined is not a boolean');
|
457
|
+
ok(!_.isBoolean(NaN), 'NaN is not a boolean');
|
458
|
+
ok(!_.isBoolean(null), 'null is not a boolean');
|
459
|
+
ok(_.isBoolean(true), 'but true is');
|
460
|
+
ok(_.isBoolean(false), 'and so is false');
|
461
|
+
ok(_.isBoolean(iBoolean), 'even from another frame');
|
462
|
+
});
|
463
|
+
|
464
|
+
test("objects: isFunction", function() {
|
465
|
+
ok(!_.isFunction([1, 2, 3]), 'arrays are not functions');
|
466
|
+
ok(!_.isFunction('moe'), 'strings are not functions');
|
467
|
+
ok(_.isFunction(_.isFunction), 'but functions are');
|
468
|
+
ok(_.isFunction(iFunction), 'even from another frame');
|
469
|
+
});
|
470
|
+
|
471
|
+
test("objects: isDate", function() {
|
472
|
+
ok(!_.isDate(100), 'numbers are not dates');
|
473
|
+
ok(!_.isDate({}), 'objects are not dates');
|
474
|
+
ok(_.isDate(new Date()), 'but dates are');
|
475
|
+
ok(_.isDate(iDate), 'even from another frame');
|
476
|
+
});
|
477
|
+
|
478
|
+
test("objects: isRegExp", function() {
|
479
|
+
ok(!_.isRegExp(_.identity), 'functions are not RegExps');
|
480
|
+
ok(_.isRegExp(/identity/), 'but RegExps are');
|
481
|
+
ok(_.isRegExp(iRegExp), 'even from another frame');
|
482
|
+
});
|
483
|
+
|
484
|
+
test("objects: isNaN", function() {
|
485
|
+
ok(!_.isNaN(undefined), 'undefined is not NaN');
|
486
|
+
ok(!_.isNaN(null), 'null is not NaN');
|
487
|
+
ok(!_.isNaN(0), '0 is not NaN');
|
488
|
+
ok(_.isNaN(NaN), 'but NaN is');
|
489
|
+
ok(_.isNaN(iNaN), 'even from another frame');
|
490
|
+
});
|
491
|
+
|
492
|
+
test("objects: isNull", function() {
|
493
|
+
ok(!_.isNull(undefined), 'undefined is not null');
|
494
|
+
ok(!_.isNull(NaN), 'NaN is not null');
|
495
|
+
ok(_.isNull(null), 'but null is');
|
496
|
+
ok(_.isNull(iNull), 'even from another frame');
|
497
|
+
});
|
498
|
+
|
499
|
+
test("objects: isUndefined", function() {
|
500
|
+
ok(!_.isUndefined(1), 'numbers are defined');
|
501
|
+
ok(!_.isUndefined(null), 'null is defined');
|
502
|
+
ok(!_.isUndefined(false), 'false is defined');
|
503
|
+
ok(!_.isUndefined(NaN), 'NaN is defined');
|
504
|
+
ok(_.isUndefined(), 'nothing is undefined');
|
505
|
+
ok(_.isUndefined(undefined), 'undefined is undefined');
|
506
|
+
ok(_.isUndefined(iUndefined), 'even from another frame');
|
507
|
+
});
|
508
|
+
|
509
|
+
if (window.ActiveXObject) {
|
510
|
+
test("objects: IE host objects", function() {
|
511
|
+
var xml = new ActiveXObject("Msxml2.DOMDocument.3.0");
|
512
|
+
ok(!_.isNumber(xml));
|
513
|
+
ok(!_.isBoolean(xml));
|
514
|
+
ok(!_.isNaN(xml));
|
515
|
+
ok(!_.isFunction(xml));
|
516
|
+
ok(!_.isNull(xml));
|
517
|
+
ok(!_.isUndefined(xml));
|
518
|
+
});
|
519
|
+
}
|
520
|
+
|
521
|
+
test("objects: tap", function() {
|
522
|
+
var intercepted = null;
|
523
|
+
var interceptor = function(obj) { intercepted = obj; };
|
524
|
+
var returned = _.tap(1, interceptor);
|
525
|
+
equals(intercepted, 1, "passes tapped object to interceptor");
|
526
|
+
equals(returned, 1, "returns tapped object");
|
527
|
+
|
528
|
+
returned = _([1,2,3]).chain().
|
529
|
+
map(function(n){ return n * 2; }).
|
530
|
+
max().
|
531
|
+
tap(interceptor).
|
532
|
+
value();
|
533
|
+
ok(returned == 6 && intercepted == 6, 'can use tapped objects in a chain');
|
534
|
+
});
|
535
|
+
});
|