From 621092a274eb25db1da4b04e8bd5d25eaf692dcc Mon Sep 17 00:00:00 2001 From: Pete Nykanen Date: Tue, 29 Nov 2016 00:10:36 +0200 Subject: [PATCH] Update deps to 1.10.0 Signed-off-by: Pete Nykanen --- README.md | 4 + node_modules/.bin/eslint | 15 - node_modules/.bin/eslint.cmd | 7 - node_modules/.bin/esparse | 15 - node_modules/.bin/esparse.cmd | 7 - node_modules/.bin/esvalidate | 15 - node_modules/.bin/esvalidate.cmd | 7 - node_modules/.bin/js-yaml | 15 - node_modules/.bin/js-yaml.cmd | 7 - node_modules/.bin/mkdirp | 15 - node_modules/.bin/mkdirp.cmd | 7 - node_modules/.bin/rimraf | 15 - node_modules/.bin/rimraf.cmd | 7 - node_modules/.bin/sass-lint | 2 +- node_modules/.bin/shjs | 15 - node_modules/.bin/shjs.cmd | 7 - node_modules/.bin/strip-json-comments | 15 - node_modules/.bin/strip-json-comments.cmd | 7 - node_modules/.yarn-integrity | 1 + .../{ => acorn-jsx/node_modules}/.bin/acorn | 2 +- .../node_modules}/.bin/acorn.cmd | 0 .../node_modules/acorn/.editorconfig | 7 + .../node_modules/acorn/.gitattributes | 1 + .../acorn-jsx/node_modules/acorn/.npmignore | 3 + .../node_modules/acorn/.tern-project | 6 + .../acorn-jsx/node_modules/acorn/.travis.yml | 7 + .../acorn-jsx/node_modules/acorn/AUTHORS | 59 + .../acorn-jsx/node_modules/acorn/CHANGELOG.md | 159 + .../node_modules/acorn}/LICENSE | 4 +- .../acorn-jsx/node_modules/acorn/README.md | 407 + .../acorn-jsx/node_modules/acorn/bin/acorn | 65 + .../acorn/bin/generate-identifier-regex.js | 55 + .../node_modules/acorn/bin/update_authors.sh | 6 + .../node_modules/acorn/dist/.keep} | 0 .../node_modules/acorn/dist/acorn.es.js | 3112 ++++ .../node_modules/acorn/dist/acorn.js | 3142 ++++ .../node_modules/acorn/dist/acorn_loose.es.js | 1261 ++ .../node_modules/acorn/dist/acorn_loose.js | 1273 ++ .../node_modules/acorn/dist/walk.es.js | 342 + .../acorn-jsx/node_modules/acorn/dist/walk.js | 360 + .../acorn-jsx/node_modules/acorn/package.json | 46 + .../node_modules/acorn/rollup/config.bin.js | 15 + .../node_modules/acorn/rollup/config.loose.js | 20 + .../node_modules/acorn/rollup/config.main.js | 11 + .../node_modules/acorn/rollup/config.walk.js | 11 + .../node_modules/acorn/src/bin/acorn.js | 58 + .../node_modules/acorn/src/expression.js | 701 + .../node_modules/acorn/src/identifier.js | 82 + .../acorn-jsx/node_modules/acorn/src/index.js | 67 + .../node_modules/acorn/src/location.js | 26 + .../node_modules/acorn/src/locutil.js | 42 + .../acorn/src/loose/expression.js | 514 + .../node_modules/acorn/src/loose/index.js | 50 + .../node_modules/acorn/src/loose/parseutil.js | 1 + .../node_modules/acorn/src/loose/state.js | 160 + .../node_modules/acorn/src/loose/statement.js | 425 + .../node_modules/acorn/src/loose/tokenize.js | 108 + .../acorn-jsx/node_modules/acorn/src/lval.js | 216 + .../acorn-jsx/node_modules/acorn/src/node.js | 50 + .../node_modules/acorn/src/options.js | 121 + .../node_modules/acorn/src/parseutil.js | 109 + .../acorn-jsx/node_modules/acorn/src/state.js | 104 + .../node_modules/acorn/src/statement.js | 654 + .../node_modules/acorn/src/tokencontext.js | 110 + .../node_modules/acorn/src/tokenize.js | 696 + .../node_modules/acorn/src/tokentype.js | 147 + .../acorn-jsx/node_modules/acorn/src/util.js | 9 + .../node_modules/acorn/src/walk/index.js | 342 + .../node_modules/acorn/src/whitespace.js | 13 + node_modules/acorn-jsx/package.json | 76 +- node_modules/acorn/.travis.yml | 3 +- node_modules/acorn/AUTHORS | 6 +- node_modules/acorn/CHANGELOG.md | 87 +- node_modules/acorn/README.md | 23 +- node_modules/acorn/bin/acorn | 96 +- node_modules/acorn/bin/build-acorn.js | 82 - .../acorn/bin/generate-identifier-regex.js | 12 +- node_modules/acorn/bin/update_authors.sh | 2 +- node_modules/acorn/dist/acorn.es.js | 3332 +++++ node_modules/acorn/dist/acorn.js | 6313 ++++---- node_modules/acorn/dist/acorn_loose.es.js | 1329 ++ node_modules/acorn/dist/acorn_loose.js | 2367 +-- node_modules/acorn/dist/walk.es.js | 342 + node_modules/acorn/dist/walk.js | 685 +- node_modules/acorn/package.json | 263 +- node_modules/acorn/rollup/config.bin.js | 15 + node_modules/acorn/rollup/config.loose.js | 22 + node_modules/acorn/rollup/config.main.js | 11 + node_modules/acorn/rollup/config.walk.js | 11 + node_modules/acorn/src/bin/acorn.js | 18 +- node_modules/acorn/src/expression.js | 249 +- node_modules/acorn/src/identifier.js | 9 +- node_modules/acorn/src/index.js | 12 +- node_modules/acorn/src/loose/expression.js | 70 +- node_modules/acorn/src/loose/index.js | 8 +- node_modules/acorn/src/loose/state.js | 5 +- node_modules/acorn/src/loose/statement.js | 39 +- node_modules/acorn/src/loose/tokenize.js | 2 +- node_modules/acorn/src/lval.js | 13 +- node_modules/acorn/src/options.js | 17 +- node_modules/acorn/src/parseutil.js | 25 +- node_modules/acorn/src/state.js | 16 +- node_modules/acorn/src/statement.js | 141 +- node_modules/acorn/src/tokencontext.js | 2 +- node_modules/acorn/src/tokenize.js | 44 +- node_modules/acorn/src/tokentype.js | 93 +- node_modules/acorn/src/walk/index.js | 28 +- node_modules/acorn/src/whitespace.js | 2 +- node_modules/ajv-keywords/.eslintrc.yml | 32 + node_modules/ajv-keywords/.npmignore | 33 + node_modules/ajv-keywords/.travis.yml | 5 + .../{lodash.tostring => ajv-keywords}/LICENSE | 4 +- node_modules/ajv-keywords/README.md | 173 + node_modules/ajv-keywords/index.js | 33 + node_modules/ajv-keywords/keywords/index.js | 9 + .../ajv-keywords/keywords/instanceof.js | 55 + .../ajv-keywords/keywords/propertyNames.js | 48 + node_modules/ajv-keywords/keywords/range.js | 40 + node_modules/ajv-keywords/keywords/regexp.js | 33 + node_modules/ajv-keywords/keywords/typeof.js | 33 + node_modules/ajv-keywords/package.json | 40 + .../ajv-keywords/spec/define_keywords.spec.js | 28 + .../ajv-keywords/spec/instanceof.spec.js | 82 + .../ajv-keywords/spec/propertyNames.spec.js | 101 + node_modules/ajv-keywords/spec/range.spec.js | 55 + node_modules/ajv-keywords/spec/regexp.spec.js | 61 + node_modules/ajv-keywords/spec/typeof.spec.js | 53 + node_modules/ajv/.tonic_example.js | 20 + .../lodash.deburr => ajv}/LICENSE | 5 +- node_modules/ajv/README.md | 1169 ++ node_modules/ajv/dist/ajv.bundle.js | 7960 +++++++++++ node_modules/ajv/dist/ajv.min.js | 6 + node_modules/ajv/dist/ajv.min.js.map | 1 + node_modules/ajv/dist/nodent.min.js | 8 + node_modules/ajv/dist/nodent.min.js.map | 1 + node_modules/ajv/dist/regenerator.min.js | 12 + node_modules/ajv/lib/ajv.d.ts | 263 + node_modules/ajv/lib/ajv.js | 416 + node_modules/ajv/lib/async.js | 214 + node_modules/ajv/lib/cache.js | 26 + node_modules/ajv/lib/compile/_rules.js | 28 + node_modules/ajv/lib/compile/equal.js | 45 + node_modules/ajv/lib/compile/formats.js | 164 + node_modules/ajv/lib/compile/index.js | 389 + node_modules/ajv/lib/compile/resolve.js | 267 + node_modules/ajv/lib/compile/rules.js | 40 + node_modules/ajv/lib/compile/schema_obj.js | 9 + node_modules/ajv/lib/compile/ucs2length.js | 20 + node_modules/ajv/lib/compile/util.js | 257 + .../ajv/lib/compile/validation_error.js | 14 + node_modules/ajv/lib/dot/_limit.jst | 49 + node_modules/ajv/lib/dot/_limitItems.jst | 10 + node_modules/ajv/lib/dot/_limitLength.jst | 10 + node_modules/ajv/lib/dot/_limitProperties.jst | 10 + node_modules/ajv/lib/dot/allOf.jst | 26 + node_modules/ajv/lib/dot/anyOf.jst | 48 + node_modules/ajv/lib/dot/coerce.def | 67 + node_modules/ajv/lib/dot/custom.jst | 182 + node_modules/ajv/lib/dot/defaults.def | 32 + node_modules/ajv/lib/dot/definitions.def | 179 + node_modules/ajv/lib/dot/dependencies.jst | 69 + node_modules/ajv/lib/dot/enum.jst | 26 + node_modules/ajv/lib/dot/errors.def | 185 + node_modules/ajv/lib/dot/format.jst | 100 + node_modules/ajv/lib/dot/items.jst | 100 + node_modules/ajv/lib/dot/missing.def | 34 + node_modules/ajv/lib/dot/multipleOf.jst | 20 + node_modules/ajv/lib/dot/not.jst | 43 + node_modules/ajv/lib/dot/oneOf.jst | 44 + node_modules/ajv/lib/dot/pattern.jst | 14 + node_modules/ajv/lib/dot/properties.jst | 319 + node_modules/ajv/lib/dot/ref.jst | 86 + node_modules/ajv/lib/dot/required.jst | 95 + node_modules/ajv/lib/dot/uniqueItems.jst | 38 + node_modules/ajv/lib/dot/v5/_formatLimit.jst | 116 + node_modules/ajv/lib/dot/v5/constant.jst | 10 + .../ajv/lib/dot/v5/patternRequired.jst | 28 + node_modules/ajv/lib/dot/v5/switch.jst | 73 + node_modules/ajv/lib/dot/validate.jst | 210 + node_modules/ajv/lib/dotjs/README.md | 3 + node_modules/ajv/lib/dotjs/_formatLimit.js | 176 + node_modules/ajv/lib/dotjs/_limit.js | 124 + node_modules/ajv/lib/dotjs/_limitItems.js | 76 + node_modules/ajv/lib/dotjs/_limitLength.js | 81 + .../ajv/lib/dotjs/_limitProperties.js | 76 + node_modules/ajv/lib/dotjs/allOf.js | 36 + node_modules/ajv/lib/dotjs/anyOf.js | 65 + node_modules/ajv/lib/dotjs/constant.js | 53 + node_modules/ajv/lib/dotjs/custom.js | 210 + node_modules/ajv/lib/dotjs/dependencies.js | 147 + node_modules/ajv/lib/dotjs/enum.js | 65 + node_modules/ajv/lib/dotjs/format.js | 139 + node_modules/ajv/lib/dotjs/items.js | 143 + node_modules/ajv/lib/dotjs/multipleOf.js | 77 + node_modules/ajv/lib/dotjs/not.js | 83 + node_modules/ajv/lib/dotjs/oneOf.js | 76 + node_modules/ajv/lib/dotjs/pattern.js | 75 + node_modules/ajv/lib/dotjs/patternRequired.js | 52 + node_modules/ajv/lib/dotjs/properties.js | 445 + node_modules/ajv/lib/dotjs/ref.js | 122 + node_modules/ajv/lib/dotjs/required.js | 249 + node_modules/ajv/lib/dotjs/switch.js | 128 + node_modules/ajv/lib/dotjs/uniqueItems.js | 72 + node_modules/ajv/lib/dotjs/validate.js | 377 + node_modules/ajv/lib/keyword.js | 82 + .../ajv/lib/refs/json-schema-draft-04.json | 150 + node_modules/ajv/lib/refs/json-schema-v5.json | 328 + node_modules/ajv/lib/v5.js | 52 + node_modules/ajv/package.json | 98 + node_modules/ansi-escapes/package.json | 114 +- node_modules/ansi-regex/package.json | 124 +- node_modules/ansi-styles/package.json | 112 +- node_modules/argparse/CHANGELOG.md | 12 + node_modules/argparse/lib/action_container.js | 4 +- node_modules/argparse/lib/argument_parser.js | 82 +- .../argparse/lib/help/added_formatters.js | 4 +- node_modules/argparse/lib/help/formatter.js | 56 +- node_modules/argparse/package.json | 105 +- node_modules/array-union/license | 21 + node_modules/array-union/package.json | 98 +- node_modules/array-union/readme.md | 6 +- node_modules/array-uniq/index.js | 2 + node_modules/array-uniq/license | 21 + node_modules/array-uniq/package.json | 97 +- node_modules/array-uniq/readme.md | 6 +- node_modules/arrify/package.json | 86 +- node_modules/balanced-match/README.md | 4 +- node_modules/balanced-match/index.js | 2 +- node_modules/balanced-match/package.json | 113 +- node_modules/bluebird/README.md | 51 - node_modules/bluebird/changelog.md | 1 - .../bluebird/js/browser/bluebird.core.js | 3647 ----- .../bluebird/js/browser/bluebird.core.min.js | 31 - node_modules/bluebird/js/browser/bluebird.js | 5455 ------- .../bluebird/js/browser/bluebird.min.js | 31 - node_modules/bluebird/js/release/any.js | 21 - node_modules/bluebird/js/release/assert.js | 55 - node_modules/bluebird/js/release/async.js | 166 - node_modules/bluebird/js/release/bind.js | 67 - node_modules/bluebird/js/release/bluebird.js | 11 - node_modules/bluebird/js/release/call_get.js | 123 - node_modules/bluebird/js/release/cancel.js | 125 - .../bluebird/js/release/catch_filter.js | 42 - node_modules/bluebird/js/release/context.js | 69 - .../bluebird/js/release/debuggability.js | 855 -- .../bluebird/js/release/direct_resolve.js | 46 - node_modules/bluebird/js/release/each.js | 29 - node_modules/bluebird/js/release/errors.js | 116 - node_modules/bluebird/js/release/es5.js | 80 - node_modules/bluebird/js/release/filter.js | 12 - node_modules/bluebird/js/release/finally.js | 111 - .../bluebird/js/release/generators.js | 219 - node_modules/bluebird/js/release/join.js | 149 - node_modules/bluebird/js/release/map.js | 151 - node_modules/bluebird/js/release/method.js | 55 - node_modules/bluebird/js/release/nodeback.js | 51 - node_modules/bluebird/js/release/nodeify.js | 58 - node_modules/bluebird/js/release/promise.js | 764 - .../bluebird/js/release/promise_array.js | 184 - node_modules/bluebird/js/release/promisify.js | 314 - node_modules/bluebird/js/release/props.js | 118 - node_modules/bluebird/js/release/queue.js | 90 - node_modules/bluebird/js/release/race.js | 49 - node_modules/bluebird/js/release/reduce.js | 162 - node_modules/bluebird/js/release/schedule.js | 60 - node_modules/bluebird/js/release/settle.js | 43 - node_modules/bluebird/js/release/some.js | 148 - .../js/release/synchronous_inspection.js | 96 - node_modules/bluebird/js/release/thenables.js | 82 - node_modules/bluebird/js/release/timers.js | 92 - node_modules/bluebird/js/release/using.js | 225 - node_modules/bluebird/js/release/util.js | 370 - node_modules/bluebird/package.json | 128 - node_modules/brace-expansion/.npmignore | 3 - node_modules/brace-expansion/example.js | 8 - node_modules/brace-expansion/index.js | 10 + node_modules/brace-expansion/package.json | 113 +- node_modules/caller-path/package.json | 95 +- node_modules/callsites/package.json | 92 +- node_modules/chalk/package.json | 150 +- node_modules/circular-json/.npmignore | 7 + node_modules/circular-json/.travis.yml | 12 + .../LICENSE => circular-json/LICENSE.txt} | 6 +- node_modules/circular-json/README.md | 135 + .../circular-json/build/circular-json.js | 2 + .../circular-json/build/circular-json.max.js | 189 + .../circular-json/build/circular-json.node.js | 185 + node_modules/circular-json/package.json | 24 + .../circular-json/template/license.after | 2 + .../circular-json/template/license.before | 1 + node_modules/cli-cursor/package.json | 99 +- node_modules/cli-width/package.json | 94 +- node_modules/co/History.md | 172 + node_modules/co/LICENSE | 22 + node_modules/co/Readme.md | 212 + node_modules/co/index.js | 237 + node_modules/co/package.json | 34 + node_modules/code-point-at/index.js | 7 +- node_modules/code-point-at/package.json | 96 +- node_modules/code-point-at/readme.md | 6 +- node_modules/commander/package.json | 99 +- node_modules/concat-map/package.json | 146 +- node_modules/concat-stream/index.js | 19 +- node_modules/concat-stream/package.json | 116 +- node_modules/concat-stream/readme.md | 2 + node_modules/core-util-is/package.json | 88 +- node_modules/d/package.json | 95 +- node_modules/debug/.npmignore | 1 + .../debug/{History.md => CHANGELOG.md} | 40 + node_modules/debug/LICENSE | 19 + node_modules/debug/Makefile | 5 +- node_modules/debug/Readme.md | 35 +- node_modules/debug/bower.json | 5 +- node_modules/debug/browser.js | 17 +- node_modules/debug/component.json | 2 +- node_modules/debug/debug.js | 15 +- node_modules/debug/index.js | 10 + node_modules/debug/node.js | 12 +- node_modules/debug/package.json | 107 +- node_modules/deep-is/package.json | 119 +- node_modules/del/index.js | 1 + node_modules/del/node_modules/.bin/rimraf | 15 + node_modules/del/node_modules/.bin/rimraf.cmd | 7 + node_modules/del/package.json | 136 +- node_modules/del/readme.md | 10 +- node_modules/doctrine/CHANGELOG.md | 24 + node_modules/doctrine/LICENSE.BSD | 3 + node_modules/doctrine/lib/doctrine.js | 87 +- node_modules/doctrine/lib/typed.js | 78 +- node_modules/doctrine/lib/utility.js | 25 +- .../doctrine/node_modules/esutils/LICENSE.BSD | 19 - .../doctrine/node_modules/esutils/README.md | 169 - .../doctrine/node_modules/esutils/lib/ast.js | 144 - .../doctrine/node_modules/esutils/lib/code.js | 101 - .../node_modules/esutils/lib/keyword.js | 137 - .../node_modules/esutils/lib/utils.js | 33 - .../node_modules/esutils/package.json | 92 - node_modules/doctrine/package.json | 122 +- node_modules/es5-ext/.travis.yml | 1 + node_modules/es5-ext/CHANGES | 5 + node_modules/es5-ext/array/#/flatten.js | 9 +- node_modules/es5-ext/date/valid-date.js | 2 +- node_modules/es5-ext/object/mixin.js | 14 +- node_modules/es5-ext/package.json | 96 +- .../es5-ext/test/string/#/camel-to-hyphen.js | 2 + .../es5-ext/test/string/#/hyphen-to-camel.js | 2 + node_modules/es6-iterator/package.json | 89 +- node_modules/es6-map/CHANGES | 3 + node_modules/es6-map/package.json | 96 +- node_modules/es6-set/package.json | 86 +- node_modules/es6-symbol/.travis.yml | 1 + node_modules/es6-symbol/CHANGES | 6 + node_modules/es6-symbol/is-implemented.js | 13 +- .../es6-symbol/is-native-implemented.js | 2 +- node_modules/es6-symbol/is-symbol.js | 6 +- node_modules/es6-symbol/package.json | 96 +- node_modules/es6-symbol/polyfill.js | 21 +- node_modules/es6-symbol/test/polyfill.js | 6 +- node_modules/es6-weak-map/package.json | 92 +- .../escape-string-regexp/package.json | 104 +- node_modules/escope/package.json | 96 +- node_modules/eslint/CHANGELOG.md | 173 + node_modules/eslint/README.md | 34 +- node_modules/eslint/conf/cli-options.js | 5 +- node_modules/eslint/conf/eslint-all.js | 29 + node_modules/eslint/conf/eslint.json | 20 +- node_modules/eslint/lib/ast-utils.js | 101 +- node_modules/eslint/lib/cli-engine.js | 62 +- node_modules/eslint/lib/cli.js | 7 +- node_modules/eslint/lib/config.js | 16 +- node_modules/eslint/lib/config/config-file.js | 13 +- node_modules/eslint/lib/config/config-ops.js | 29 +- node_modules/eslint/lib/eslint.js | 59 +- node_modules/eslint/lib/file-finder.js | 62 +- node_modules/eslint/lib/ignored-paths.js | 51 +- node_modules/eslint/lib/options.js | 3 +- node_modules/eslint/lib/rule-context.js | 12 +- .../eslint/lib/rules/accessor-pairs.js | 2 +- .../eslint/lib/rules/array-bracket-spacing.js | 14 +- .../eslint/lib/rules/arrow-body-style.js | 72 +- node_modules/eslint/lib/rules/arrow-parens.js | 6 +- .../eslint/lib/rules/arrow-spacing.js | 8 +- .../eslint/lib/rules/block-spacing.js | 8 +- .../eslint/lib/rules/callback-return.js | 28 +- node_modules/eslint/lib/rules/comma-dangle.js | 14 +- .../eslint/lib/rules/comma-spacing.js | 6 +- node_modules/eslint/lib/rules/comma-style.js | 26 +- .../lib/rules/computed-property-spacing.js | 8 +- .../eslint/lib/rules/consistent-return.js | 29 +- node_modules/eslint/lib/rules/curly.js | 11 +- node_modules/eslint/lib/rules/default-case.js | 6 +- node_modules/eslint/lib/rules/dot-location.js | 9 +- node_modules/eslint/lib/rules/eol-last.js | 4 +- node_modules/eslint/lib/rules/eqeqeq.js | 5 +- node_modules/eslint/lib/rules/func-names.js | 19 +- .../lib/rules/generator-star-spacing.js | 30 +- node_modules/eslint/lib/rules/indent.js | 18 +- node_modules/eslint/lib/rules/key-spacing.js | 66 +- .../eslint/lib/rules/linebreak-style.js | 6 +- .../eslint/lib/rules/lines-around-comment.js | 75 +- node_modules/eslint/lib/rules/max-len.js | 11 +- node_modules/eslint/lib/rules/max-lines.js | 148 + .../lib/rules/max-statements-per-line.js | 153 +- node_modules/eslint/lib/rules/new-cap.js | 4 +- node_modules/eslint/lib/rules/new-parens.js | 3 +- .../eslint/lib/rules/newline-after-var.js | 2 +- .../eslint/lib/rules/newline-before-return.js | 25 +- .../lib/rules/newline-per-chained-call.js | 19 +- .../eslint/lib/rules/no-cond-assign.js | 10 +- .../eslint/lib/rules/no-confusing-arrow.js | 3 +- .../eslint/lib/rules/no-constant-condition.js | 33 +- node_modules/eslint/lib/rules/no-div-regex.js | 3 +- .../eslint/lib/rules/no-duplicate-case.js | 3 +- .../lib/rules/no-empty-character-class.js | 3 +- .../eslint/lib/rules/no-empty-function.js | 4 +- node_modules/eslint/lib/rules/no-empty.js | 4 +- .../eslint/lib/rules/no-extra-parens.js | 188 +- .../eslint/lib/rules/no-extra-semi.js | 18 +- .../eslint/lib/rules/no-implicit-coercion.js | 14 +- .../eslint/lib/rules/no-inline-comments.js | 5 +- .../lib/rules/no-irregular-whitespace.js | 88 +- node_modules/eslint/lib/rules/no-loop-func.js | 2 +- .../eslint/lib/rules/no-mixed-operators.js | 212 + .../lib/rules/no-mixed-spaces-and-tabs.js | 5 +- .../eslint/lib/rules/no-multi-spaces.js | 11 +- .../lib/rules/no-multiple-empty-lines.js | 58 +- .../eslint/lib/rules/no-prototype-builtins.js | 52 + .../eslint/lib/rules/no-regex-spaces.js | 3 +- .../eslint/lib/rules/no-return-assign.js | 64 +- .../eslint/lib/rules/no-script-url.js | 2 +- node_modules/eslint/lib/rules/no-sequences.js | 14 +- .../lib/rules/no-unexpected-multiline.js | 6 +- .../eslint/lib/rules/no-unsafe-finally.js | 31 +- .../eslint/lib/rules/no-useless-call.js | 18 +- .../lib/rules/no-useless-computed-key.js | 4 +- .../eslint/lib/rules/no-useless-concat.js | 6 +- .../eslint/lib/rules/no-useless-rename.js | 150 + .../eslint/lib/rules/object-curly-newline.js | 209 + .../lib/rules/object-property-newline.js | 73 + .../eslint/lib/rules/object-shorthand.js | 120 +- node_modules/eslint/lib/rules/one-var.js | 3 + .../eslint/lib/rules/operator-linebreak.js | 10 +- .../eslint/lib/rules/padded-blocks.js | 20 +- node_modules/eslint/lib/rules/prefer-const.js | 128 +- .../eslint/lib/rules/prefer-spread.js | 12 +- .../eslint/lib/rules/rest-spread-spacing.js | 107 + node_modules/eslint/lib/rules/semi-spacing.js | 20 +- node_modules/eslint/lib/rules/semi.js | 6 +- .../eslint/lib/rules/space-before-blocks.js | 6 +- .../lib/rules/space-before-function-paren.js | 2 +- .../eslint/lib/rules/space-infix-ops.js | 10 +- .../eslint/lib/rules/space-unary-ops.js | 6 +- node_modules/eslint/lib/rules/unicode-bom.js | 66 + node_modules/eslint/lib/rules/valid-jsdoc.js | 8 +- node_modules/eslint/lib/rules/vars-on-top.js | 21 +- node_modules/eslint/lib/rules/wrap-iife.js | 6 +- node_modules/eslint/lib/rules/wrap-regex.js | 5 +- node_modules/eslint/lib/rules/yoda.js | 6 +- .../eslint/lib/testers/rule-tester.js | 27 +- node_modules/eslint/lib/util/glob-util.js | 19 +- node_modules/eslint/lib/util/npm-util.js | 12 +- .../eslint/lib/util/source-code-fixer.js | 6 +- node_modules/eslint/node_modules/.bin/js-yaml | 15 + .../eslint/node_modules/.bin/js-yaml.cmd | 7 + node_modules/eslint/node_modules/.bin/mkdirp | 15 + .../eslint/node_modules/.bin/mkdirp.cmd | 7 + node_modules/eslint/node_modules/.bin/shjs | 15 + .../eslint/node_modules/.bin/shjs.cmd | 7 + .../node_modules/.bin/strip-json-comments | 15 + .../node_modules/.bin/strip-json-comments.cmd | 7 + node_modules/eslint/package.json | 152 +- node_modules/espree/CHANGELOG.md | 32 + node_modules/espree/README.md | 11 +- node_modules/espree/espree.js | 28 +- node_modules/espree/lib/token-translator.js | 11 +- node_modules/espree/node_modules/.bin/acorn | 15 + .../espree/node_modules/.bin/acorn.cmd | 7 + node_modules/espree/package.json | 104 +- node_modules/esprima/ChangeLog | 4 + node_modules/esprima/esprima.js | 5 +- node_modules/esprima/package.json | 144 +- .../node_modules/estraverse/package.json | 89 +- node_modules/esrecurse/package.json | 94 +- node_modules/estraverse/package.json | 94 +- node_modules/esutils/package.json | 102 +- node_modules/event-emitter/package.json | 91 +- node_modules/exit-hook/package.json | 92 +- node_modules/fast-levenshtein/README.md | 36 +- node_modules/fast-levenshtein/levenshtein.js | 175 +- node_modules/fast-levenshtein/package.json | 91 +- node_modules/figures/index.js | 62 +- node_modules/figures/package.json | 103 +- node_modules/figures/readme.md | 85 +- node_modules/file-entry-cache/README.md | 39 +- node_modules/file-entry-cache/cache.js | 10 +- node_modules/file-entry-cache/changelog.md | 10 + node_modules/file-entry-cache/package.json | 156 +- node_modules/flat-cache/README.md | 3 + node_modules/flat-cache/cache.js | 11 +- node_modules/flat-cache/changelog.md | 41 + node_modules/flat-cache/package.json | 164 +- node_modules/flat-cache/utils.js | 29 + .../{tryit => front-matter}/.npmignore | 2 +- node_modules/front-matter/.travis.yml | 32 + node_modules/front-matter/.zuul.yml | 18 + node_modules/front-matter/LICENSE | 9 + node_modules/front-matter/Makefile | 70 + node_modules/front-matter/README.md | 140 + node_modules/front-matter/examples/bom.md | 3 + .../front-matter/examples/complex-yaml.md | 22 + .../front-matter/examples/dashes-seperator.md | 14 + .../front-matter/examples/dots-ending.md | 6 + .../front-matter/examples/missing-body.md | 8 + .../front-matter/examples/no-front-matter.md | 11 + .../front-matter/examples/wrapped-text.md | 21 + .../front-matter/examples/yaml-seperator.md | 6 + node_modules/front-matter/index.js | 50 + .../front-matter/node_modules/.bin/js-yaml | 15 + .../node_modules/.bin/js-yaml.cmd | 7 + node_modules/front-matter/notes.md | 53 + node_modules/front-matter/package.json | 42 + node_modules/front-matter/test/index.js | 227 + node_modules/fs-extra/CHANGELOG.md | 109 +- node_modules/fs-extra/README.md | 27 +- .../fs-extra/lib/copy-sync/copy-file-sync.js | 7 +- .../fs-extra/lib/copy-sync/copy-sync.js | 12 +- node_modules/fs-extra/lib/copy/copy.js | 6 + node_modules/fs-extra/lib/copy/ncp.js | 41 +- .../fs-extra/lib/ensure/symlink-paths.js | 1 + node_modules/fs-extra/lib/index.js | 1 + node_modules/fs-extra/lib/move/index.js | 10 +- node_modules/fs-extra/lib/remove/index.js | 7 +- node_modules/fs-extra/lib/remove/rimraf.js | 301 + node_modules/fs-extra/lib/util/utimes.js | 7 +- node_modules/fs-extra/lib/walk-sync/index.js | 20 + node_modules/fs-extra/package.json | 137 +- node_modules/fs.realpath/LICENSE | 43 + node_modules/fs.realpath/README.md | 33 + node_modules/fs.realpath/index.js | 66 + node_modules/fs.realpath/old.js | 303 + node_modules/fs.realpath/package.json | 26 + node_modules/generate-function/package.json | 84 +- .../generate-object-property/package.json | 79 +- node_modules/glob/README.md | 3 + node_modules/glob/common.js | 7 +- node_modules/glob/glob.js | 40 +- node_modules/glob/package.json | 105 +- node_modules/glob/sync.js | 43 +- node_modules/globals/globals.json | 24 +- node_modules/globals/package.json | 110 +- node_modules/globby/index.js | 77 +- node_modules/globby/node_modules/glob/LICENSE | 15 - .../globby/node_modules/glob/README.md | 359 - .../globby/node_modules/glob/common.js | 226 - node_modules/globby/node_modules/glob/glob.js | 765 - .../globby/node_modules/glob/package.json | 98 - node_modules/globby/node_modules/glob/sync.js | 460 - node_modules/globby/package.json | 111 +- node_modules/globby/readme.md | 21 +- node_modules/globule/LICENSE | 22 + node_modules/globule/README.md | 129 + node_modules/globule/lib/globule.js | 192 + .../node_modules/lodash}/LICENSE | 2 +- .../globule/node_modules/lodash/README.md | 39 + .../node_modules/lodash}/_DataView.js | 0 .../globule/node_modules/lodash/_Hash.js | 32 + .../node_modules/lodash}/_LazyWrapper.js | 0 .../globule/node_modules/lodash/_ListCache.js | 32 + .../node_modules/lodash}/_LodashWrapper.js | 0 .../node_modules/lodash}/_Map.js | 0 .../globule/node_modules/lodash/_MapCache.js | 32 + .../node_modules/lodash}/_Promise.js | 0 .../node_modules/lodash}/_Set.js | 0 .../globule/node_modules/lodash/_SetCache.js | 27 + .../node_modules/lodash}/_Stack.js | 17 +- .../node_modules/lodash}/_Symbol.js | 0 .../node_modules/lodash}/_Uint8Array.js | 0 .../node_modules/lodash}/_WeakMap.js | 0 .../node_modules/lodash}/_addMapEntry.js | 2 +- .../node_modules/lodash}/_addSetEntry.js | 1 + .../node_modules/lodash}/_apply.js | 3 +- .../node_modules/lodash}/_arrayAggregator.js | 4 +- .../node_modules/lodash}/_arrayEach.js | 4 +- .../node_modules/lodash}/_arrayEachRight.js | 4 +- .../node_modules/lodash}/_arrayEvery.js | 4 +- .../node_modules/lodash}/_arrayFilter.js | 4 +- .../node_modules/lodash}/_arrayIncludes.js | 5 +- .../lodash}/_arrayIncludesWith.js | 4 +- .../node_modules/lodash/_arrayLikeKeys.js | 49 + .../node_modules/lodash}/_arrayMap.js | 4 +- .../node_modules/lodash}/_arrayPush.js | 0 .../node_modules/lodash}/_arrayReduce.js | 4 +- .../node_modules/lodash}/_arrayReduceRight.js | 4 +- .../node_modules/lodash/_arraySample.js | 15 + .../node_modules/lodash/_arraySampleSize.js | 17 + .../node_modules/lodash/_arrayShuffle.js | 15 + .../node_modules/lodash}/_arraySome.js | 4 +- .../globule/node_modules/lodash/_asciiSize.js | 12 + .../node_modules/lodash/_asciiToArray.js | 12 + .../node_modules/lodash/_asciiWords.js | 15 + .../node_modules/lodash}/_assignInDefaults.js | 0 .../node_modules/lodash}/_assignMergeValue.js | 7 +- .../node_modules/lodash}/_assignValue.js | 7 +- .../node_modules/lodash}/_assocIndexOf.js | 2 +- .../node_modules/lodash}/_baseAggregator.js | 0 .../node_modules/lodash}/_baseAssign.js | 0 .../node_modules/lodash/_baseAssignValue.js | 25 + .../node_modules/lodash}/_baseAt.js | 8 +- .../node_modules/lodash}/_baseClamp.js | 2 +- .../node_modules/lodash}/_baseClone.js | 10 +- .../node_modules/lodash/_baseConforms.js | 18 + .../node_modules/lodash/_baseConformsTo.js | 27 + .../node_modules/lodash/_baseCreate.js | 30 + .../node_modules/lodash}/_baseDelay.js | 10 +- .../node_modules/lodash}/_baseDifference.js | 2 +- .../node_modules/lodash}/_baseEach.js | 0 .../node_modules/lodash}/_baseEachRight.js | 0 .../node_modules/lodash}/_baseEvery.js | 0 .../node_modules/lodash}/_baseExtremum.js | 0 .../node_modules/lodash}/_baseFill.js | 0 .../node_modules/lodash}/_baseFilter.js | 0 .../node_modules/lodash}/_baseFindIndex.js | 7 +- .../node_modules/lodash/_baseFindKey.js | 23 + .../node_modules/lodash}/_baseFlatten.js | 0 .../node_modules/lodash}/_baseFor.js | 0 .../node_modules/lodash}/_baseForOwn.js | 0 .../node_modules/lodash}/_baseForOwnRight.js | 0 .../node_modules/lodash}/_baseForRight.js | 0 .../node_modules/lodash}/_baseFunctions.js | 2 +- .../node_modules/lodash}/_baseGet.js | 0 .../node_modules/lodash}/_baseGetAllKeys.js | 4 +- .../node_modules/lodash/_baseGetTag.js | 29 + .../node_modules/lodash}/_baseGt.js | 2 +- .../node_modules/lodash}/_baseHas.js | 10 +- .../node_modules/lodash}/_baseHasIn.js | 4 +- .../node_modules/lodash}/_baseInRange.js | 2 +- .../node_modules/lodash/_baseIndexOf.js | 20 + .../node_modules/lodash}/_baseIndexOfWith.js | 2 +- .../node_modules/lodash}/_baseIntersection.js | 0 .../node_modules/lodash}/_baseInverter.js | 0 .../node_modules/lodash}/_baseInvoke.js | 0 .../node_modules/lodash/_baseIsArguments.js | 18 + .../node_modules/lodash/_baseIsArrayBuffer.js | 17 + .../node_modules/lodash/_baseIsDate.js | 18 + .../node_modules/lodash}/_baseIsEqual.js | 0 .../node_modules/lodash}/_baseIsEqualDeep.js | 13 +- .../globule/node_modules/lodash/_baseIsMap.js | 18 + .../node_modules/lodash}/_baseIsMatch.js | 0 .../globule/node_modules/lodash/_baseIsNaN.js | 12 + .../node_modules/lodash/_baseIsNative.js} | 31 +- .../node_modules/lodash/_baseIsRegExp.js | 18 + .../globule/node_modules/lodash/_baseIsSet.js | 18 + .../node_modules/lodash/_baseIsTypedArray.js} | 36 +- .../node_modules/lodash}/_baseIteratee.js | 0 .../globule/node_modules/lodash/_baseKeys.js | 30 + .../node_modules/lodash/_baseKeysIn.js | 33 + .../node_modules/lodash}/_baseLodash.js | 0 .../node_modules/lodash}/_baseLt.js | 2 +- .../node_modules/lodash}/_baseMap.js | 0 .../node_modules/lodash}/_baseMatches.js | 2 +- .../lodash}/_baseMatchesProperty.js | 2 +- .../node_modules/lodash}/_baseMean.js | 2 +- .../node_modules/lodash}/_baseMerge.js | 15 +- .../node_modules/lodash}/_baseMergeDeep.js | 34 +- .../node_modules/lodash}/_baseNth.js | 2 +- .../node_modules/lodash}/_baseOrderBy.js | 0 .../node_modules/lodash}/_basePick.js | 11 +- .../node_modules/lodash}/_basePickBy.js | 8 +- .../node_modules/lodash}/_baseProperty.js | 2 +- .../node_modules/lodash}/_basePropertyDeep.js | 2 +- .../node_modules/lodash/_basePropertyOf.js | 14 + .../node_modules/lodash}/_basePullAll.js | 6 +- .../node_modules/lodash}/_basePullAt.js | 0 .../node_modules/lodash}/_baseRandom.js | 0 .../node_modules/lodash}/_baseRange.js | 4 +- .../node_modules/lodash}/_baseReduce.js | 0 .../node_modules/lodash}/_baseRepeat.js | 0 .../globule/node_modules/lodash/_baseRest.js | 17 + .../node_modules/lodash/_baseSample.js | 15 + .../node_modules/lodash/_baseSampleSize.js | 18 + .../node_modules/lodash}/_baseSet.js | 28 +- .../node_modules/lodash}/_baseSetData.js | 2 +- .../node_modules/lodash/_baseSetToString.js | 22 + .../node_modules/lodash/_baseShuffle.js | 15 + .../node_modules/lodash}/_baseSlice.js | 0 .../node_modules/lodash}/_baseSome.js | 0 .../node_modules/lodash}/_baseSortBy.js | 0 .../node_modules/lodash}/_baseSortedIndex.js | 2 +- .../lodash}/_baseSortedIndexBy.js | 2 +- .../node_modules/lodash}/_baseSortedUniq.js | 0 .../node_modules/lodash}/_baseSum.js | 0 .../node_modules/lodash}/_baseTimes.js | 0 .../node_modules/lodash}/_baseToNumber.js | 0 .../node_modules/lodash}/_baseToPairs.js | 2 +- .../node_modules/lodash}/_baseToString.js | 6 + .../node_modules/lodash}/_baseUnary.js | 4 +- .../node_modules/lodash}/_baseUniq.js | 0 .../node_modules/lodash}/_baseUnset.js | 11 +- .../node_modules/lodash}/_baseUpdate.js | 2 +- .../node_modules/lodash}/_baseValues.js | 0 .../node_modules/lodash}/_baseWhile.js | 0 .../node_modules/lodash}/_baseWrapperValue.js | 0 .../node_modules/lodash}/_baseXor.js | 26 +- .../node_modules/lodash}/_baseZipObject.js | 0 .../globule/node_modules/lodash/_cacheHas.js | 13 + .../lodash}/_castArrayLikeObject.js | 0 .../node_modules/lodash}/_castFunction.js | 0 .../node_modules/lodash}/_castPath.js | 0 .../globule/node_modules/lodash/_castRest.js | 14 + .../node_modules/lodash}/_castSlice.js | 0 .../node_modules/lodash}/_charsEndIndex.js | 0 .../node_modules/lodash}/_charsStartIndex.js | 0 .../node_modules/lodash}/_cloneArrayBuffer.js | 0 .../node_modules/lodash/_cloneBuffer.js | 35 + .../node_modules/lodash}/_cloneDataView.js | 0 .../node_modules/lodash}/_cloneMap.js | 0 .../node_modules/lodash}/_cloneRegExp.js | 0 .../node_modules/lodash}/_cloneSet.js | 0 .../node_modules/lodash}/_cloneSymbol.js | 0 .../node_modules/lodash}/_cloneTypedArray.js | 0 .../node_modules/lodash}/_compareAscending.js | 0 .../node_modules/lodash}/_compareMultiple.js | 0 .../node_modules/lodash}/_composeArgs.js | 2 +- .../node_modules/lodash}/_composeArgsRight.js | 2 +- .../node_modules/lodash}/_copyArray.js | 0 .../node_modules/lodash}/_copyObject.js | 15 +- .../node_modules/lodash}/_copySymbols.js | 0 .../node_modules/lodash/_coreJsData.js | 6 + .../node_modules/lodash}/_countHolders.js | 2 +- .../node_modules/lodash}/_createAggregator.js | 2 +- .../node_modules/lodash}/_createAssigner.js | 8 +- .../node_modules/lodash}/_createBaseEach.js | 0 .../node_modules/lodash}/_createBaseFor.js | 0 .../node_modules/lodash/_createBind.js} | 13 +- .../node_modules/lodash}/_createCaseFirst.js | 6 +- .../node_modules/lodash}/_createCompounder.js | 0 .../node_modules/lodash/_createCtor.js} | 6 +- .../node_modules/lodash/_createCurry.js} | 23 +- .../node_modules/lodash/_createFind.js | 25 + .../node_modules/lodash}/_createFlow.js | 13 +- .../node_modules/lodash/_createHybrid.js} | 29 +- .../node_modules/lodash}/_createInverter.js | 0 .../lodash}/_createMathOperation.js | 5 +- .../node_modules/lodash/_createOver.js | 27 + .../node_modules/lodash}/_createPadding.js | 4 +- .../node_modules/lodash/_createPartial.js} | 13 +- .../node_modules/lodash}/_createRange.js | 9 +- .../node_modules/lodash/_createRecurry.js} | 14 +- .../lodash}/_createRelationalOperation.js | 0 .../node_modules/lodash}/_createRound.js | 5 +- .../node_modules/lodash}/_createSet.js | 2 +- .../node_modules/lodash/_createToPairs.js | 30 + .../node_modules/lodash/_createWrap.js} | 30 +- .../node_modules/lodash/_deburrLetter.js | 71 + .../node_modules/lodash/_defineProperty.js | 11 + .../node_modules/lodash}/_equalArrays.js | 27 +- .../node_modules/lodash}/_equalByTag.js | 21 +- .../node_modules/lodash}/_equalObjects.js | 15 +- .../node_modules/lodash}/_escapeHtmlChar.js | 9 +- .../node_modules/lodash}/_escapeStringChar.js | 0 .../globule/node_modules/lodash/_flatRest.js | 16 + .../node_modules/lodash/_freeGlobal.js | 4 + .../node_modules/lodash}/_getAllKeys.js | 0 .../node_modules/lodash}/_getAllKeysIn.js | 0 .../node_modules/lodash}/_getData.js | 0 .../node_modules/lodash}/_getFuncName.js | 0 .../node_modules/lodash/_getHolder.js} | 4 +- .../node_modules/lodash/_getMapData.js | 18 + .../node_modules/lodash}/_getMatchData.js | 9 +- .../node_modules/lodash}/_getNative.js | 7 +- .../node_modules/lodash/_getPrototype.js | 6 + .../globule/node_modules/lodash/_getRawTag.js | 46 + .../node_modules/lodash/_getSymbols.js | 16 + .../node_modules/lodash}/_getSymbolsIn.js | 9 +- .../node_modules/lodash}/_getTag.js | 22 +- .../globule/node_modules/lodash/_getValue.js | 13 + .../node_modules/lodash}/_getView.js | 0 .../node_modules/lodash/_getWrapDetails.js | 17 + .../node_modules/lodash}/_hasPath.js | 13 +- .../node_modules/lodash/_hasUnicode.js} | 15 +- .../node_modules/lodash/_hasUnicodeWord.js | 15 + .../globule/node_modules/lodash/_hashClear.js | 15 + .../node_modules/lodash}/_hashDelete.js | 10 +- .../node_modules/lodash}/_hashGet.js | 10 +- .../node_modules/lodash}/_hashHas.js | 8 +- .../node_modules/lodash}/_hashSet.js | 11 +- .../node_modules/lodash}/_initCloneArray.js | 0 .../node_modules/lodash}/_initCloneByTag.js | 0 .../node_modules/lodash}/_initCloneObject.js | 0 .../node_modules/lodash/_insertWrapDetails.js | 23 + .../node_modules/lodash/_isFlattenable.js | 20 + .../node_modules/lodash}/_isIndex.js | 0 .../node_modules/lodash}/_isIterateeCall.js | 0 .../node_modules/lodash}/_isKey.js | 0 .../node_modules/lodash}/_isKeyable.js | 0 .../node_modules/lodash}/_isLaziable.js | 0 .../node_modules/lodash/_isMaskable.js | 14 + .../globule/node_modules/lodash/_isMasked.js | 20 + .../node_modules/lodash}/_isPrototype.js | 0 .../lodash}/_isStrictComparable.js | 0 .../node_modules/lodash}/_iteratorToArray.js | 0 .../node_modules/lodash}/_lazyClone.js | 0 .../node_modules/lodash}/_lazyReverse.js | 0 .../node_modules/lodash}/_lazyValue.js | 0 .../node_modules/lodash/_listCacheClear.js | 13 + .../node_modules/lodash/_listCacheDelete.js} | 20 +- .../node_modules/lodash/_listCacheGet.js | 19 + .../node_modules/lodash/_listCacheHas.js} | 11 +- .../node_modules/lodash/_listCacheSet.js | 26 + .../node_modules/lodash/_mapCacheClear.js} | 8 +- .../node_modules/lodash/_mapCacheDelete.js | 18 + .../node_modules/lodash/_mapCacheGet.js | 16 + .../node_modules/lodash/_mapCacheHas.js | 16 + .../node_modules/lodash/_mapCacheSet.js | 22 + .../node_modules/lodash}/_mapToArray.js | 4 +- .../lodash}/_matchesStrictComparable.js | 2 +- .../node_modules/lodash/_memoizeCapped.js | 26 + .../node_modules/lodash}/_mergeData.js | 2 +- .../node_modules/lodash}/_mergeDefaults.js | 5 +- .../node_modules/lodash}/_metaMap.js | 0 .../node_modules/lodash}/_nativeCreate.js | 0 .../node_modules/lodash/_nativeKeys.js | 6 + .../node_modules/lodash/_nativeKeysIn.js | 20 + .../globule/node_modules/lodash/_nodeUtil.js | 22 + .../node_modules/lodash/_objectToString.js | 22 + .../globule/node_modules/lodash/_overArg.js | 15 + .../globule/node_modules/lodash/_overRest.js | 36 + .../node_modules/lodash}/_parent.js | 0 .../node_modules/lodash}/_reEscape.js | 0 .../node_modules/lodash}/_reEvaluate.js | 0 .../node_modules/lodash}/_reInterpolate.js | 0 .../node_modules/lodash}/_realNames.js | 0 .../node_modules/lodash}/_reorder.js | 0 .../node_modules/lodash}/_replaceHolders.js | 0 .../globule/node_modules/lodash/_root.js | 9 + .../node_modules/lodash/_setCacheAdd.js | 19 + .../node_modules/lodash/_setCacheHas.js | 14 + .../node_modules/lodash}/_setData.js | 26 +- .../node_modules/lodash}/_setToArray.js | 4 +- .../node_modules/lodash/_setToPairs.js | 18 + .../node_modules/lodash/_setToString.js | 14 + .../node_modules/lodash/_setWrapToString.js | 21 + .../globule/node_modules/lodash/_shortOut.js | 37 + .../node_modules/lodash/_shuffleSelf.js | 28 + .../node_modules/lodash}/_stackClear.js | 5 +- .../node_modules/lodash}/_stackDelete.js | 7 +- .../node_modules/lodash}/_stackGet.js | 7 +- .../node_modules/lodash}/_stackHas.js | 7 +- .../globule/node_modules/lodash/_stackSet.js | 34 + .../node_modules/lodash/_strictIndexOf.js} | 14 +- .../node_modules/lodash/_strictLastIndexOf.js | 21 + .../node_modules/lodash/_stringSize.js | 18 + .../node_modules/lodash/_stringToArray.js | 18 + .../node_modules/lodash}/_stringToPath.js | 14 +- .../node_modules/lodash}/_toKey.js | 0 .../node_modules/lodash}/_toSource.js | 7 +- .../node_modules/lodash}/_unescapeHtmlChar.js | 9 +- .../node_modules/lodash/_unicodeSize.js} | 21 +- .../node_modules/lodash/_unicodeToArray.js} | 10 +- .../node_modules/lodash/_unicodeWords.js} | 60 +- .../node_modules/lodash/_updateWrapDetails.js | 46 + .../node_modules/lodash}/_wrapperClone.js | 0 .../node_modules/lodash}/add.js | 2 +- .../node_modules/lodash}/after.js | 2 +- .../node_modules/lodash}/array.js | 1 + .../node_modules/lodash}/ary.js | 8 +- .../node_modules/lodash}/assign.js | 20 +- .../globule/node_modules/lodash/assignIn.js | 40 + .../node_modules/lodash}/assignInWith.js | 0 .../node_modules/lodash}/assignWith.js | 0 .../node_modules/lodash}/at.js | 12 +- .../node_modules/lodash}/attempt.js | 6 +- .../node_modules/lodash}/before.js | 4 +- .../node_modules/lodash}/bind.js | 22 +- .../node_modules/lodash}/bindAll.js | 16 +- .../node_modules/lodash}/bindKey.js | 16 +- .../node_modules/lodash}/camelCase.js | 0 .../node_modules/lodash}/capitalize.js | 0 .../node_modules/lodash}/castArray.js | 0 .../node_modules/lodash}/ceil.js | 0 .../node_modules/lodash}/chain.js | 0 .../node_modules/lodash}/chunk.js | 4 +- .../node_modules/lodash}/clamp.js | 0 .../node_modules/lodash}/clone.js | 0 .../node_modules/lodash}/cloneDeep.js | 0 .../node_modules/lodash}/cloneDeepWith.js | 1 + .../node_modules/lodash}/cloneWith.js | 1 + .../node_modules/lodash}/collection.js | 1 - .../node_modules/lodash}/commit.js | 0 .../node_modules/lodash}/compact.js | 2 +- .../node_modules/lodash}/concat.js | 25 +- .../node_modules/lodash}/cond.js | 12 +- .../node_modules/lodash}/conforms.js | 15 +- .../globule/node_modules/lodash/conformsTo.js | 32 + .../node_modules/lodash}/constant.js | 10 +- .../node_modules/lodash}/core.js | 1155 +- .../globule/node_modules/lodash/core.min.js | 29 + .../node_modules/lodash}/countBy.js | 13 +- .../node_modules/lodash}/create.js | 2 +- .../node_modules/lodash}/curry.js | 6 +- .../node_modules/lodash}/curryRight.js | 6 +- .../node_modules/lodash}/date.js | 0 .../node_modules/lodash}/debounce.js | 30 +- .../node_modules/lodash}/deburr.js | 11 +- .../globule/node_modules/lodash/defaultTo.js | 25 + .../node_modules/lodash}/defaults.js | 8 +- .../node_modules/lodash}/defaultsDeep.js | 11 +- .../node_modules/lodash}/defer.js | 6 +- .../node_modules/lodash}/delay.js | 4 +- .../globule/node_modules/lodash/difference.js | 33 + .../node_modules/lodash}/differenceBy.js | 22 +- .../node_modules/lodash}/differenceWith.js | 14 +- .../node_modules/lodash}/divide.js | 2 +- .../node_modules/lodash}/drop.js | 2 +- .../node_modules/lodash}/dropRight.js | 2 +- .../node_modules/lodash}/dropRightWhile.js | 3 +- .../node_modules/lodash}/dropWhile.js | 3 +- .../node_modules/lodash}/each.js | 0 .../node_modules/lodash}/eachRight.js | 0 .../node_modules/lodash}/endsWith.js | 7 +- .../node_modules/lodash}/entries.js | 0 .../node_modules/lodash}/entriesIn.js | 0 .../node_modules/lodash}/eq.js | 6 +- .../node_modules/lodash}/escape.js | 12 +- .../node_modules/lodash}/escapeRegExp.js | 2 +- .../node_modules/lodash}/every.js | 8 +- .../node_modules/lodash}/extend.js | 0 .../node_modules/lodash}/extendWith.js | 0 .../node_modules/lodash}/fill.js | 2 +- .../node_modules/lodash}/filter.js | 5 +- .../node_modules/lodash}/find.js | 22 +- .../node_modules/lodash}/findIndex.js | 26 +- .../node_modules/lodash}/findKey.js | 9 +- .../globule/node_modules/lodash/findLast.js | 25 + .../node_modules/lodash}/findLastIndex.js | 30 +- .../node_modules/lodash}/findLastKey.js | 9 +- .../node_modules/lodash}/first.js | 0 .../node_modules/lodash}/flatMap.js | 3 +- .../node_modules/lodash}/flatMapDeep.js | 3 +- .../node_modules/lodash}/flatMapDepth.js | 3 +- .../node_modules/lodash}/flatten.js | 2 +- .../node_modules/lodash}/flattenDeep.js | 2 +- .../node_modules/lodash}/flattenDepth.js | 2 +- .../node_modules/lodash}/flip.js | 8 +- .../node_modules/lodash}/floor.js | 0 .../node_modules/lodash}/flow.js | 6 +- .../node_modules/lodash}/flowRight.js | 6 +- .../node_modules/lodash}/forEach.js | 9 +- .../node_modules/lodash}/forEachRight.js | 7 +- .../node_modules/lodash}/forIn.js | 4 +- .../node_modules/lodash}/forInRight.js | 4 +- .../node_modules/lodash}/forOwn.js | 4 +- .../node_modules/lodash}/forOwnRight.js | 4 +- .../node_modules/lodash}/fp.js | 0 .../globule/node_modules/lodash/fp/F.js | 1 + .../globule/node_modules/lodash/fp/T.js | 1 + .../node_modules/lodash}/fp/__.js | 0 .../node_modules/lodash}/fp/_baseConvert.js | 183 +- .../lodash}/fp/_convertBrowser.js | 2 +- .../node_modules/lodash}/fp/_falseOptions.js | 0 .../node_modules/lodash}/fp/_mapping.js | 143 +- .../node_modules/lodash}/fp/_util.js | 1 + .../node_modules/lodash}/fp/add.js | 0 .../node_modules/lodash}/fp/after.js | 0 .../node_modules/lodash}/fp/all.js | 0 .../node_modules/lodash}/fp/allPass.js | 0 .../node_modules/lodash}/fp/always.js | 0 .../node_modules/lodash}/fp/any.js | 0 .../node_modules/lodash}/fp/anyPass.js | 0 .../node_modules/lodash}/fp/apply.js | 0 .../node_modules/lodash}/fp/array.js | 0 .../node_modules/lodash}/fp/ary.js | 0 .../node_modules/lodash}/fp/assign.js | 0 .../node_modules/lodash/fp/assignAll.js} | 2 +- .../node_modules/lodash/fp/assignAllWith.js | 5 + .../node_modules/lodash}/fp/assignIn.js | 0 .../node_modules/lodash/fp/assignInAll.js | 5 + .../node_modules/lodash/fp/assignInAllWith.js | 5 + .../node_modules/lodash}/fp/assignInWith.js | 0 .../node_modules/lodash}/fp/assignWith.js | 0 .../node_modules/lodash}/fp/assoc.js | 0 .../node_modules/lodash}/fp/assocPath.js | 0 .../node_modules/lodash}/fp/at.js | 0 .../node_modules/lodash}/fp/attempt.js | 0 .../node_modules/lodash}/fp/before.js | 0 .../node_modules/lodash}/fp/bind.js | 0 .../node_modules/lodash}/fp/bindAll.js | 0 .../node_modules/lodash}/fp/bindKey.js | 0 .../node_modules/lodash}/fp/camelCase.js | 0 .../node_modules/lodash}/fp/capitalize.js | 0 .../node_modules/lodash}/fp/castArray.js | 0 .../node_modules/lodash}/fp/ceil.js | 0 .../node_modules/lodash}/fp/chain.js | 0 .../node_modules/lodash}/fp/chunk.js | 0 .../node_modules/lodash}/fp/clamp.js | 0 .../node_modules/lodash}/fp/clone.js | 0 .../node_modules/lodash}/fp/cloneDeep.js | 0 .../node_modules/lodash}/fp/cloneDeepWith.js | 0 .../node_modules/lodash}/fp/cloneWith.js | 0 .../node_modules/lodash}/fp/collection.js | 0 .../node_modules/lodash}/fp/commit.js | 0 .../node_modules/lodash}/fp/compact.js | 0 .../node_modules/lodash}/fp/complement.js | 0 .../node_modules/lodash}/fp/compose.js | 0 .../node_modules/lodash}/fp/concat.js | 0 .../node_modules/lodash}/fp/cond.js | 0 .../node_modules/lodash/fp/conforms.js | 1 + .../node_modules/lodash/fp/conformsTo.js | 5 + .../node_modules/lodash}/fp/constant.js | 0 .../node_modules/lodash}/fp/contains.js | 0 .../node_modules/lodash}/fp/convert.js | 0 .../node_modules/lodash}/fp/countBy.js | 0 .../node_modules/lodash}/fp/create.js | 0 .../node_modules/lodash}/fp/curry.js | 0 .../node_modules/lodash}/fp/curryN.js | 0 .../node_modules/lodash}/fp/curryRight.js | 0 .../node_modules/lodash}/fp/curryRightN.js | 0 .../node_modules/lodash}/fp/date.js | 0 .../node_modules/lodash}/fp/debounce.js | 0 .../node_modules/lodash}/fp/deburr.js | 0 .../node_modules/lodash/fp/defaultTo.js | 5 + .../node_modules/lodash}/fp/defaults.js | 0 .../node_modules/lodash/fp/defaultsAll.js | 5 + .../node_modules/lodash}/fp/defaultsDeep.js | 0 .../node_modules/lodash/fp/defaultsDeepAll.js | 5 + .../node_modules/lodash}/fp/defer.js | 0 .../node_modules/lodash}/fp/delay.js | 0 .../node_modules/lodash}/fp/difference.js | 0 .../node_modules/lodash}/fp/differenceBy.js | 0 .../node_modules/lodash}/fp/differenceWith.js | 0 .../node_modules/lodash}/fp/dissoc.js | 0 .../node_modules/lodash}/fp/dissocPath.js | 0 .../node_modules/lodash}/fp/divide.js | 0 .../node_modules/lodash}/fp/drop.js | 0 .../node_modules/lodash/fp/dropLast.js | 1 + .../node_modules/lodash/fp/dropLastWhile.js | 1 + .../node_modules/lodash}/fp/dropRight.js | 0 .../node_modules/lodash}/fp/dropRightWhile.js | 0 .../node_modules/lodash}/fp/dropWhile.js | 0 .../node_modules/lodash}/fp/each.js | 0 .../node_modules/lodash}/fp/eachRight.js | 0 .../node_modules/lodash}/fp/endsWith.js | 0 .../node_modules/lodash}/fp/entries.js | 0 .../node_modules/lodash}/fp/entriesIn.js | 0 .../node_modules/lodash}/fp/eq.js | 0 .../node_modules/lodash}/fp/equals.js | 0 .../node_modules/lodash}/fp/escape.js | 0 .../node_modules/lodash}/fp/escapeRegExp.js | 0 .../node_modules/lodash}/fp/every.js | 0 .../node_modules/lodash}/fp/extend.js | 0 .../node_modules/lodash/fp/extendAll.js | 1 + .../node_modules/lodash/fp/extendAllWith.js | 1 + .../node_modules/lodash}/fp/extendWith.js | 0 .../node_modules/lodash}/fp/fill.js | 0 .../node_modules/lodash}/fp/filter.js | 0 .../node_modules/lodash}/fp/find.js | 0 .../node_modules/lodash/fp/findFrom.js | 5 + .../node_modules/lodash}/fp/findIndex.js | 0 .../node_modules/lodash/fp/findIndexFrom.js | 5 + .../node_modules/lodash}/fp/findKey.js | 0 .../node_modules/lodash}/fp/findLast.js | 0 .../node_modules/lodash/fp/findLastFrom.js | 5 + .../node_modules/lodash}/fp/findLastIndex.js | 0 .../lodash/fp/findLastIndexFrom.js | 5 + .../node_modules/lodash}/fp/findLastKey.js | 0 .../globule/node_modules/lodash/fp/first.js | 1 + .../node_modules/lodash}/fp/flatMap.js | 0 .../node_modules/lodash}/fp/flatMapDeep.js | 0 .../node_modules/lodash}/fp/flatMapDepth.js | 0 .../node_modules/lodash}/fp/flatten.js | 0 .../node_modules/lodash}/fp/flattenDeep.js | 0 .../node_modules/lodash}/fp/flattenDepth.js | 0 .../node_modules/lodash}/fp/flip.js | 0 .../node_modules/lodash}/fp/floor.js | 0 .../node_modules/lodash}/fp/flow.js | 0 .../node_modules/lodash}/fp/flowRight.js | 0 .../node_modules/lodash}/fp/forEach.js | 0 .../node_modules/lodash}/fp/forEachRight.js | 0 .../node_modules/lodash}/fp/forIn.js | 0 .../node_modules/lodash}/fp/forInRight.js | 0 .../node_modules/lodash}/fp/forOwn.js | 0 .../node_modules/lodash}/fp/forOwnRight.js | 0 .../node_modules/lodash}/fp/fromPairs.js | 0 .../node_modules/lodash}/fp/function.js | 0 .../node_modules/lodash}/fp/functions.js | 0 .../node_modules/lodash}/fp/functionsIn.js | 0 .../node_modules/lodash}/fp/get.js | 0 .../node_modules/lodash}/fp/getOr.js | 0 .../node_modules/lodash}/fp/groupBy.js | 0 .../node_modules/lodash}/fp/gt.js | 0 .../node_modules/lodash}/fp/gte.js | 0 .../node_modules/lodash}/fp/has.js | 0 .../node_modules/lodash}/fp/hasIn.js | 0 .../node_modules/lodash}/fp/head.js | 0 .../node_modules/lodash}/fp/identical.js | 0 .../node_modules/lodash}/fp/identity.js | 0 .../node_modules/lodash}/fp/inRange.js | 0 .../node_modules/lodash}/fp/includes.js | 0 .../node_modules/lodash/fp/includesFrom.js | 5 + .../globule/node_modules/lodash/fp/indexBy.js | 1 + .../node_modules/lodash}/fp/indexOf.js | 0 .../node_modules/lodash/fp/indexOfFrom.js | 5 + .../node_modules/lodash}/fp/init.js | 0 .../node_modules/lodash}/fp/initial.js | 0 .../node_modules/lodash}/fp/intersection.js | 0 .../node_modules/lodash}/fp/intersectionBy.js | 0 .../lodash}/fp/intersectionWith.js | 0 .../node_modules/lodash}/fp/invert.js | 0 .../node_modules/lodash}/fp/invertBy.js | 0 .../node_modules/lodash}/fp/invertObj.js | 0 .../node_modules/lodash}/fp/invoke.js | 0 .../node_modules/lodash}/fp/invokeArgs.js | 0 .../node_modules/lodash}/fp/invokeArgsMap.js | 0 .../node_modules/lodash}/fp/invokeMap.js | 0 .../node_modules/lodash}/fp/isArguments.js | 0 .../node_modules/lodash}/fp/isArray.js | 0 .../node_modules/lodash}/fp/isArrayBuffer.js | 0 .../node_modules/lodash}/fp/isArrayLike.js | 0 .../lodash}/fp/isArrayLikeObject.js | 0 .../node_modules/lodash}/fp/isBoolean.js | 0 .../node_modules/lodash}/fp/isBuffer.js | 0 .../node_modules/lodash}/fp/isDate.js | 0 .../node_modules/lodash}/fp/isElement.js | 0 .../node_modules/lodash}/fp/isEmpty.js | 0 .../node_modules/lodash}/fp/isEqual.js | 0 .../node_modules/lodash}/fp/isEqualWith.js | 0 .../node_modules/lodash}/fp/isError.js | 0 .../node_modules/lodash}/fp/isFinite.js | 0 .../node_modules/lodash}/fp/isFunction.js | 0 .../node_modules/lodash}/fp/isInteger.js | 0 .../node_modules/lodash}/fp/isLength.js | 0 .../node_modules/lodash}/fp/isMap.js | 0 .../node_modules/lodash}/fp/isMatch.js | 0 .../node_modules/lodash}/fp/isMatchWith.js | 0 .../node_modules/lodash}/fp/isNaN.js | 0 .../node_modules/lodash}/fp/isNative.js | 0 .../node_modules/lodash}/fp/isNil.js | 0 .../node_modules/lodash}/fp/isNull.js | 0 .../node_modules/lodash}/fp/isNumber.js | 0 .../node_modules/lodash}/fp/isObject.js | 0 .../node_modules/lodash}/fp/isObjectLike.js | 0 .../node_modules/lodash}/fp/isPlainObject.js | 0 .../node_modules/lodash}/fp/isRegExp.js | 0 .../node_modules/lodash}/fp/isSafeInteger.js | 0 .../node_modules/lodash}/fp/isSet.js | 0 .../node_modules/lodash}/fp/isString.js | 0 .../node_modules/lodash}/fp/isSymbol.js | 0 .../node_modules/lodash}/fp/isTypedArray.js | 0 .../node_modules/lodash}/fp/isUndefined.js | 0 .../node_modules/lodash}/fp/isWeakMap.js | 0 .../node_modules/lodash}/fp/isWeakSet.js | 0 .../node_modules/lodash}/fp/iteratee.js | 0 .../node_modules/lodash}/fp/join.js | 0 .../node_modules/lodash}/fp/juxt.js | 0 .../node_modules/lodash}/fp/kebabCase.js | 0 .../node_modules/lodash}/fp/keyBy.js | 0 .../node_modules/lodash}/fp/keys.js | 0 .../node_modules/lodash}/fp/keysIn.js | 0 .../node_modules/lodash}/fp/lang.js | 0 .../node_modules/lodash}/fp/last.js | 0 .../node_modules/lodash}/fp/lastIndexOf.js | 0 .../node_modules/lodash/fp/lastIndexOfFrom.js | 5 + .../node_modules/lodash}/fp/lowerCase.js | 0 .../node_modules/lodash}/fp/lowerFirst.js | 0 .../node_modules/lodash}/fp/lt.js | 0 .../node_modules/lodash}/fp/lte.js | 0 .../node_modules/lodash}/fp/map.js | 0 .../node_modules/lodash}/fp/mapKeys.js | 0 .../node_modules/lodash}/fp/mapValues.js | 0 .../globule/node_modules/lodash/fp/matches.js | 1 + .../lodash}/fp/matchesProperty.js | 0 .../node_modules/lodash}/fp/math.js | 0 .../node_modules/lodash}/fp/max.js | 0 .../node_modules/lodash}/fp/maxBy.js | 0 .../node_modules/lodash}/fp/mean.js | 0 .../node_modules/lodash}/fp/meanBy.js | 0 .../node_modules/lodash}/fp/memoize.js | 0 .../node_modules/lodash}/fp/merge.js | 0 .../node_modules/lodash/fp/mergeAll.js | 5 + .../node_modules/lodash/fp/mergeAllWith.js | 5 + .../node_modules/lodash}/fp/mergeWith.js | 0 .../node_modules/lodash}/fp/method.js | 0 .../node_modules/lodash}/fp/methodOf.js | 0 .../node_modules/lodash}/fp/min.js | 0 .../node_modules/lodash}/fp/minBy.js | 0 .../node_modules/lodash}/fp/mixin.js | 0 .../node_modules/lodash}/fp/multiply.js | 0 .../node_modules/lodash}/fp/nAry.js | 0 .../node_modules/lodash}/fp/negate.js | 0 .../node_modules/lodash}/fp/next.js | 0 .../node_modules/lodash}/fp/noop.js | 0 .../node_modules/lodash}/fp/now.js | 0 .../node_modules/lodash}/fp/nth.js | 0 .../node_modules/lodash}/fp/nthArg.js | 2 +- .../node_modules/lodash}/fp/number.js | 0 .../node_modules/lodash}/fp/object.js | 0 .../node_modules/lodash}/fp/omit.js | 0 .../node_modules/lodash}/fp/omitAll.js | 0 .../node_modules/lodash}/fp/omitBy.js | 0 .../node_modules/lodash}/fp/once.js | 0 .../node_modules/lodash}/fp/orderBy.js | 0 .../node_modules/lodash}/fp/over.js | 0 .../node_modules/lodash}/fp/overArgs.js | 0 .../node_modules/lodash}/fp/overEvery.js | 0 .../node_modules/lodash}/fp/overSome.js | 0 .../node_modules/lodash}/fp/pad.js | 0 .../node_modules/lodash}/fp/padChars.js | 0 .../node_modules/lodash}/fp/padCharsEnd.js | 0 .../node_modules/lodash}/fp/padCharsStart.js | 0 .../node_modules/lodash}/fp/padEnd.js | 0 .../node_modules/lodash}/fp/padStart.js | 0 .../node_modules/lodash}/fp/parseInt.js | 0 .../node_modules/lodash}/fp/partial.js | 0 .../node_modules/lodash}/fp/partialRight.js | 0 .../node_modules/lodash}/fp/partition.js | 0 .../node_modules/lodash}/fp/path.js | 0 .../node_modules/lodash}/fp/pathEq.js | 0 .../node_modules/lodash}/fp/pathOr.js | 0 .../node_modules/lodash}/fp/paths.js | 0 .../node_modules/lodash}/fp/pick.js | 0 .../node_modules/lodash}/fp/pickAll.js | 0 .../node_modules/lodash}/fp/pickBy.js | 0 .../node_modules/lodash}/fp/pipe.js | 0 .../node_modules/lodash}/fp/placeholder.js | 0 .../node_modules/lodash}/fp/plant.js | 0 .../node_modules/lodash}/fp/pluck.js | 0 .../node_modules/lodash}/fp/prop.js | 0 .../node_modules/lodash}/fp/propEq.js | 0 .../node_modules/lodash}/fp/propOr.js | 0 .../node_modules/lodash/fp/property.js | 1 + .../node_modules/lodash/fp/propertyOf.js | 5 + .../node_modules/lodash}/fp/props.js | 0 .../node_modules/lodash}/fp/pull.js | 0 .../node_modules/lodash}/fp/pullAll.js | 0 .../node_modules/lodash}/fp/pullAllBy.js | 0 .../node_modules/lodash}/fp/pullAllWith.js | 0 .../node_modules/lodash}/fp/pullAt.js | 0 .../node_modules/lodash}/fp/random.js | 0 .../node_modules/lodash}/fp/range.js | 0 .../node_modules/lodash}/fp/rangeRight.js | 0 .../node_modules/lodash/fp/rangeStep.js | 5 + .../node_modules/lodash/fp/rangeStepRight.js | 5 + .../node_modules/lodash}/fp/rearg.js | 0 .../node_modules/lodash}/fp/reduce.js | 0 .../node_modules/lodash}/fp/reduceRight.js | 0 .../node_modules/lodash}/fp/reject.js | 0 .../node_modules/lodash}/fp/remove.js | 0 .../node_modules/lodash}/fp/repeat.js | 0 .../node_modules/lodash}/fp/replace.js | 0 .../node_modules/lodash}/fp/rest.js | 0 .../node_modules/lodash}/fp/restFrom.js | 0 .../node_modules/lodash}/fp/result.js | 0 .../node_modules/lodash}/fp/reverse.js | 0 .../node_modules/lodash}/fp/round.js | 0 .../node_modules/lodash}/fp/sample.js | 0 .../node_modules/lodash}/fp/sampleSize.js | 0 .../node_modules/lodash}/fp/seq.js | 0 .../node_modules/lodash}/fp/set.js | 0 .../node_modules/lodash}/fp/setWith.js | 0 .../node_modules/lodash}/fp/shuffle.js | 0 .../node_modules/lodash}/fp/size.js | 0 .../node_modules/lodash}/fp/slice.js | 0 .../node_modules/lodash}/fp/snakeCase.js | 0 .../node_modules/lodash}/fp/some.js | 0 .../node_modules/lodash}/fp/sortBy.js | 0 .../node_modules/lodash}/fp/sortedIndex.js | 0 .../node_modules/lodash}/fp/sortedIndexBy.js | 0 .../node_modules/lodash}/fp/sortedIndexOf.js | 0 .../lodash}/fp/sortedLastIndex.js | 0 .../lodash}/fp/sortedLastIndexBy.js | 0 .../lodash}/fp/sortedLastIndexOf.js | 0 .../node_modules/lodash}/fp/sortedUniq.js | 0 .../node_modules/lodash}/fp/sortedUniqBy.js | 0 .../node_modules/lodash}/fp/split.js | 0 .../node_modules/lodash}/fp/spread.js | 0 .../node_modules/lodash}/fp/spreadFrom.js | 0 .../node_modules/lodash}/fp/startCase.js | 0 .../node_modules/lodash}/fp/startsWith.js | 0 .../node_modules/lodash}/fp/string.js | 0 .../node_modules/lodash/fp/stubArray.js | 5 + .../node_modules/lodash/fp/stubFalse.js | 5 + .../node_modules/lodash/fp/stubObject.js} | 2 +- .../node_modules/lodash/fp/stubString.js | 5 + .../node_modules/lodash/fp/stubTrue.js} | 2 +- .../node_modules/lodash}/fp/subtract.js | 0 .../node_modules/lodash}/fp/sum.js | 0 .../node_modules/lodash}/fp/sumBy.js | 0 .../lodash/fp/symmetricDifference.js | 1 + .../lodash/fp/symmetricDifferenceBy.js | 1 + .../lodash/fp/symmetricDifferenceWith.js | 1 + .../node_modules/lodash}/fp/tail.js | 0 .../node_modules/lodash}/fp/take.js | 0 .../node_modules/lodash/fp/takeLast.js | 1 + .../node_modules/lodash/fp/takeLastWhile.js | 1 + .../node_modules/lodash}/fp/takeRight.js | 0 .../node_modules/lodash}/fp/takeRightWhile.js | 0 .../node_modules/lodash}/fp/takeWhile.js | 0 .../node_modules/lodash}/fp/tap.js | 0 .../node_modules/lodash}/fp/template.js | 0 .../lodash}/fp/templateSettings.js | 0 .../node_modules/lodash}/fp/throttle.js | 0 .../node_modules/lodash}/fp/thru.js | 0 .../node_modules/lodash}/fp/times.js | 0 .../node_modules/lodash}/fp/toArray.js | 0 .../node_modules/lodash/fp/toFinite.js} | 2 +- .../node_modules/lodash}/fp/toInteger.js | 0 .../node_modules/lodash}/fp/toIterator.js | 0 .../node_modules/lodash}/fp/toJSON.js | 0 .../node_modules/lodash}/fp/toLength.js | 0 .../node_modules/lodash}/fp/toLower.js | 0 .../node_modules/lodash}/fp/toNumber.js | 0 .../node_modules/lodash}/fp/toPairs.js | 0 .../node_modules/lodash}/fp/toPairsIn.js | 0 .../node_modules/lodash}/fp/toPath.js | 0 .../node_modules/lodash}/fp/toPlainObject.js | 0 .../node_modules/lodash}/fp/toSafeInteger.js | 0 .../node_modules/lodash}/fp/toString.js | 0 .../node_modules/lodash}/fp/toUpper.js | 0 .../node_modules/lodash}/fp/transform.js | 0 .../node_modules/lodash}/fp/trim.js | 0 .../node_modules/lodash}/fp/trimChars.js | 0 .../node_modules/lodash}/fp/trimCharsEnd.js | 0 .../node_modules/lodash}/fp/trimCharsStart.js | 0 .../node_modules/lodash}/fp/trimEnd.js | 0 .../node_modules/lodash}/fp/trimStart.js | 0 .../node_modules/lodash}/fp/truncate.js | 0 .../node_modules/lodash}/fp/unapply.js | 0 .../node_modules/lodash}/fp/unary.js | 0 .../node_modules/lodash}/fp/unescape.js | 0 .../node_modules/lodash}/fp/union.js | 0 .../node_modules/lodash}/fp/unionBy.js | 0 .../node_modules/lodash}/fp/unionWith.js | 0 .../node_modules/lodash}/fp/uniq.js | 0 .../node_modules/lodash}/fp/uniqBy.js | 0 .../node_modules/lodash}/fp/uniqWith.js | 0 .../node_modules/lodash}/fp/uniqueId.js | 0 .../node_modules/lodash}/fp/unnest.js | 0 .../node_modules/lodash}/fp/unset.js | 0 .../node_modules/lodash}/fp/unzip.js | 0 .../node_modules/lodash}/fp/unzipWith.js | 0 .../node_modules/lodash}/fp/update.js | 0 .../node_modules/lodash}/fp/updateWith.js | 0 .../node_modules/lodash}/fp/upperCase.js | 0 .../node_modules/lodash}/fp/upperFirst.js | 0 .../node_modules/lodash}/fp/useWith.js | 0 .../node_modules/lodash}/fp/util.js | 0 .../node_modules/lodash}/fp/value.js | 0 .../node_modules/lodash}/fp/valueOf.js | 0 .../node_modules/lodash}/fp/values.js | 0 .../node_modules/lodash}/fp/valuesIn.js | 0 .../globule/node_modules/lodash/fp/where.js | 1 + .../globule/node_modules/lodash/fp/whereEq.js | 1 + .../node_modules/lodash}/fp/without.js | 0 .../node_modules/lodash}/fp/words.js | 0 .../node_modules/lodash}/fp/wrap.js | 0 .../node_modules/lodash}/fp/wrapperAt.js | 0 .../node_modules/lodash}/fp/wrapperChain.js | 0 .../node_modules/lodash}/fp/wrapperLodash.js | 0 .../node_modules/lodash}/fp/wrapperReverse.js | 0 .../node_modules/lodash}/fp/wrapperValue.js | 0 .../node_modules/lodash}/fp/xor.js | 0 .../node_modules/lodash}/fp/xorBy.js | 0 .../node_modules/lodash}/fp/xorWith.js | 0 .../node_modules/lodash}/fp/zip.js | 0 .../globule/node_modules/lodash/fp/zipAll.js | 5 + .../node_modules/lodash}/fp/zipObj.js | 0 .../node_modules/lodash}/fp/zipObject.js | 0 .../node_modules/lodash}/fp/zipObjectDeep.js | 0 .../node_modules/lodash}/fp/zipWith.js | 0 .../node_modules/lodash}/fromPairs.js | 6 +- .../node_modules/lodash}/function.js | 0 .../node_modules/lodash}/functions.js | 2 +- .../node_modules/lodash}/functionsIn.js | 2 +- .../node_modules/lodash}/get.js | 2 +- .../node_modules/lodash}/groupBy.js | 8 +- .../node_modules/lodash}/gt.js | 0 .../node_modules/lodash}/gte.js | 0 .../node_modules/lodash}/has.js | 0 .../node_modules/lodash}/hasIn.js | 0 .../node_modules/lodash}/head.js | 0 .../node_modules/lodash}/identity.js | 6 +- .../node_modules/lodash}/inRange.js | 5 +- .../node_modules/lodash}/includes.js | 8 +- .../node_modules/lodash}/index.js | 0 .../node_modules/lodash}/indexOf.js | 14 +- .../node_modules/lodash}/initial.js | 5 +- .../node_modules/lodash}/intersection.js | 14 +- .../node_modules/lodash}/intersectionBy.js | 18 +- .../node_modules/lodash}/intersectionWith.js | 17 +- .../node_modules/lodash}/invert.js | 0 .../node_modules/lodash}/invertBy.js | 3 +- .../node_modules/lodash}/invoke.js | 4 +- .../node_modules/lodash}/invokeMap.js | 10 +- .../node_modules/lodash/isArguments.js | 36 + .../node_modules/lodash}/isArray.js | 4 +- .../node_modules/lodash/isArrayBuffer.js | 27 + .../node_modules/lodash}/isArrayLike.js | 5 +- .../node_modules/lodash}/isArrayLikeObject.js | 0 .../globule/node_modules/lodash/isBoolean.js | 29 + .../globule/node_modules/lodash/isBuffer.js | 38 + .../globule/node_modules/lodash/isDate.js | 27 + .../node_modules/lodash}/isElement.js | 5 +- .../node_modules/lodash}/isEmpty.js | 35 +- .../node_modules/lodash}/isEqual.js | 7 +- .../node_modules/lodash}/isEqualWith.js | 3 +- .../node_modules/lodash}/isError.js | 25 +- .../node_modules/lodash}/isFinite.js | 11 +- .../globule/node_modules/lodash/isFunction.js | 37 + .../node_modules/lodash}/isInteger.js | 0 .../node_modules/lodash}/isLength.js | 7 +- .../globule/node_modules/lodash/isMap.js | 27 + .../node_modules/lodash}/isMatch.js | 16 +- .../node_modules/lodash}/isMatchWith.js | 0 .../node_modules/lodash}/isNaN.js | 0 .../globule/node_modules/lodash/isNative.js | 40 + .../node_modules/lodash}/isNil.js | 0 .../node_modules/lodash}/isNull.js | 0 .../node_modules/lodash}/isNumber.js | 18 +- .../node_modules/lodash}/isObject.js | 4 +- .../node_modules/lodash}/isObjectLike.js | 2 +- .../node_modules/lodash}/isPlainObject.js | 26 +- .../globule/node_modules/lodash/isRegExp.js | 27 + .../node_modules/lodash}/isSafeInteger.js | 3 +- .../globule/node_modules/lodash/isSet.js | 27 + .../node_modules/lodash}/isString.js | 18 +- .../globule/node_modules/lodash/isSymbol.js | 29 + .../node_modules/lodash/isTypedArray.js | 27 + .../node_modules/lodash}/isUndefined.js | 0 .../node_modules/lodash}/isWeakMap.js | 3 +- .../globule/node_modules/lodash/isWeakSet.js | 28 + .../node_modules/lodash}/iteratee.js | 0 .../node_modules/lodash}/join.js | 2 +- .../node_modules/lodash}/kebabCase.js | 0 .../node_modules/lodash}/keyBy.js | 8 +- .../globule/node_modules/lodash/keys.js | 37 + .../globule/node_modules/lodash/keysIn.js | 32 + .../node_modules/lodash}/lang.js | 2 + .../node_modules/lodash}/last.js | 2 +- .../node_modules/lodash}/lastIndexOf.js | 26 +- .../node_modules/lodash}/lodash.js | 4245 +++--- .../globule/node_modules/lodash/lodash.min.js | 135 + .../node_modules/lodash}/lowerCase.js | 0 .../node_modules/lodash}/lowerFirst.js | 0 .../node_modules/lodash}/lt.js | 0 .../node_modules/lodash}/lte.js | 0 .../node_modules/lodash}/map.js | 3 +- .../node_modules/lodash}/mapKeys.js | 8 +- .../node_modules/lodash}/mapValues.js | 8 +- .../globule/node_modules/lodash/matches.js | 36 + .../node_modules/lodash}/matchesProperty.js | 16 +- .../node_modules/lodash}/math.js | 0 .../node_modules/lodash}/max.js | 0 .../node_modules/lodash}/maxBy.js | 5 +- .../node_modules/lodash}/mean.js | 0 .../node_modules/lodash}/meanBy.js | 5 +- .../node_modules/lodash}/memoize.js | 14 +- .../node_modules/lodash}/merge.js | 14 +- .../node_modules/lodash}/mergeWith.js | 15 +- .../node_modules/lodash}/method.js | 6 +- .../node_modules/lodash}/methodOf.js | 6 +- .../node_modules/lodash}/min.js | 0 .../node_modules/lodash}/minBy.js | 5 +- .../node_modules/lodash}/mixin.js | 0 .../node_modules/lodash}/multiply.js | 2 +- .../node_modules/lodash}/negate.js | 13 +- .../node_modules/lodash}/next.js | 0 .../globule/node_modules/lodash/noop.js | 17 + .../node_modules/lodash}/now.js | 9 +- .../node_modules/lodash}/nth.js | 4 +- .../node_modules/lodash}/nthArg.js | 8 +- .../node_modules/lodash}/number.js | 0 .../node_modules/lodash}/object.js | 1 + .../node_modules/lodash}/omit.js | 7 +- .../node_modules/lodash}/omitBy.js | 11 +- .../node_modules/lodash}/once.js | 2 +- .../node_modules/lodash}/orderBy.js | 0 .../node_modules/lodash}/over.js | 6 +- .../node_modules/lodash}/overArgs.js | 21 +- .../node_modules/lodash}/overEvery.js | 6 +- .../node_modules/lodash}/overSome.js | 6 +- .../node_modules/lodash}/package.json | 2 +- .../node_modules/lodash}/pad.js | 0 .../node_modules/lodash}/padEnd.js | 0 .../node_modules/lodash}/padStart.js | 0 .../node_modules/lodash}/parseInt.js | 10 +- .../node_modules/lodash}/partial.js | 20 +- .../node_modules/lodash}/partialRight.js | 20 +- .../node_modules/lodash}/partition.js | 3 +- .../node_modules/lodash}/pick.js | 7 +- .../node_modules/lodash}/pickBy.js | 8 +- .../node_modules/lodash}/plant.js | 0 .../node_modules/lodash}/property.js | 2 +- .../node_modules/lodash}/propertyOf.js | 2 +- .../node_modules/lodash}/pull.js | 14 +- .../node_modules/lodash}/pullAll.js | 6 +- .../node_modules/lodash}/pullAllBy.js | 5 +- .../node_modules/lodash}/pullAllWith.js | 0 .../node_modules/lodash}/pullAt.js | 21 +- .../node_modules/lodash}/random.js | 6 +- .../node_modules/lodash}/range.js | 2 +- .../node_modules/lodash}/rangeRight.js | 2 +- .../node_modules/lodash}/rearg.js | 13 +- .../node_modules/lodash}/reduce.js | 0 .../node_modules/lodash}/reduceRight.js | 0 .../node_modules/lodash}/reject.js | 11 +- .../node_modules/lodash}/remove.js | 3 +- .../node_modules/lodash}/repeat.js | 0 .../node_modules/lodash}/replace.js | 8 +- .../node_modules/lodash}/rest.js | 32 +- .../node_modules/lodash}/result.js | 0 .../node_modules/lodash}/reverse.js | 2 +- .../node_modules/lodash}/round.js | 0 .../node_modules/lodash}/sample.js | 12 +- .../node_modules/lodash}/sampleSize.js | 24 +- .../node_modules/lodash}/seq.js | 0 .../node_modules/lodash}/set.js | 0 .../node_modules/lodash}/setWith.js | 0 .../node_modules/lodash}/shuffle.js | 10 +- .../node_modules/lodash}/size.js | 20 +- .../node_modules/lodash}/slice.js | 2 +- .../node_modules/lodash}/snakeCase.js | 0 .../node_modules/lodash}/some.js | 3 +- .../node_modules/lodash}/sortBy.js | 25 +- .../node_modules/lodash}/sortedIndex.js | 3 - .../node_modules/lodash}/sortedIndexBy.js | 13 +- .../node_modules/lodash}/sortedIndexOf.js | 8 +- .../node_modules/lodash}/sortedLastIndex.js | 4 +- .../node_modules/lodash}/sortedLastIndexBy.js | 12 +- .../node_modules/lodash}/sortedLastIndexOf.js | 6 +- .../node_modules/lodash}/sortedUniq.js | 0 .../node_modules/lodash}/sortedUniqBy.js | 2 +- .../node_modules/lodash}/split.js | 14 +- .../node_modules/lodash}/spread.js | 8 +- .../node_modules/lodash}/startCase.js | 0 .../node_modules/lodash}/startsWith.js | 5 +- .../node_modules/lodash}/string.js | 0 .../globule/node_modules/lodash/stubArray.js | 23 + .../globule/node_modules/lodash/stubFalse.js | 18 + .../globule/node_modules/lodash/stubObject.js | 23 + .../globule/node_modules/lodash/stubString.js | 18 + .../globule/node_modules/lodash/stubTrue.js | 18 + .../node_modules/lodash}/subtract.js | 2 +- .../node_modules/lodash}/sum.js | 0 .../node_modules/lodash}/sumBy.js | 5 +- .../node_modules/lodash}/tail.js | 5 +- .../node_modules/lodash}/take.js | 0 .../node_modules/lodash}/takeRight.js | 2 +- .../node_modules/lodash}/takeRightWhile.js | 3 +- .../node_modules/lodash}/takeWhile.js | 3 +- .../node_modules/lodash}/tap.js | 0 .../node_modules/lodash}/template.js | 19 +- .../node_modules/lodash}/templateSettings.js | 0 .../node_modules/lodash}/throttle.js | 9 +- .../node_modules/lodash}/thru.js | 0 .../node_modules/lodash}/times.js | 10 +- .../node_modules/lodash}/toArray.js | 6 +- .../node_modules/lodash/toFinite.js} | 30 +- .../globule/node_modules/lodash/toInteger.js | 36 + .../node_modules/lodash}/toIterator.js | 0 .../node_modules/lodash}/toJSON.js | 0 .../node_modules/lodash}/toLength.js | 6 +- .../node_modules/lodash}/toLower.js | 0 .../node_modules/lodash}/toNumber.js | 13 +- .../node_modules/lodash}/toPairs.js | 11 +- .../node_modules/lodash}/toPairsIn.js | 13 +- .../node_modules/lodash}/toPath.js | 9 - .../node_modules/lodash}/toPlainObject.js | 0 .../node_modules/lodash}/toSafeInteger.js | 4 +- .../node_modules/lodash}/toString.js | 4 +- .../node_modules/lodash}/toUpper.js | 0 .../node_modules/lodash}/transform.js | 33 +- .../node_modules/lodash}/trim.js | 0 .../node_modules/lodash}/trimEnd.js | 0 .../node_modules/lodash}/trimStart.js | 0 .../node_modules/lodash}/truncate.js | 4 +- .../node_modules/lodash}/unary.js | 2 +- .../node_modules/lodash}/unescape.js | 4 +- .../node_modules/lodash}/union.js | 12 +- .../node_modules/lodash}/unionBy.js | 18 +- .../node_modules/lodash}/unionWith.js | 13 +- .../node_modules/lodash}/uniq.js | 11 +- .../node_modules/lodash}/uniqBy.js | 11 +- .../node_modules/lodash}/uniqWith.js | 12 +- .../node_modules/lodash}/uniqueId.js | 0 .../node_modules/lodash}/unset.js | 0 .../node_modules/lodash}/unzip.js | 6 +- .../node_modules/lodash}/unzipWith.js | 0 .../node_modules/lodash}/update.js | 0 .../node_modules/lodash}/updateWith.js | 0 .../node_modules/lodash}/upperCase.js | 0 .../node_modules/lodash}/upperFirst.js | 0 .../node_modules/lodash}/util.js | 6 + .../node_modules/lodash}/value.js | 0 .../node_modules/lodash}/valueOf.js | 0 .../node_modules/lodash}/values.js | 2 +- .../node_modules/lodash}/valuesIn.js | 0 .../node_modules/lodash}/without.js | 14 +- .../globule/node_modules/lodash/words.js | 35 + .../node_modules/lodash}/wrap.js | 13 +- .../node_modules/lodash}/wrapperAt.js | 9 +- .../node_modules/lodash}/wrapperChain.js | 0 .../node_modules/lodash}/wrapperLodash.js | 46 +- .../node_modules/lodash}/wrapperReverse.js | 0 .../node_modules/lodash}/wrapperValue.js | 0 .../node_modules/lodash}/xor.js | 12 +- .../node_modules/lodash}/xorBy.js | 22 +- .../node_modules/lodash}/xorWith.js | 17 +- .../node_modules/lodash}/zip.js | 8 +- .../node_modules/lodash}/zipObject.js | 0 .../node_modules/lodash}/zipObjectDeep.js | 0 .../node_modules/lodash}/zipWith.js | 7 +- node_modules/globule/package.json | 50 + .../.editorconfig | 0 node_modules/gonzales-pe/.eslintrc.yaml | 63 + .../.gitmessage.txt | 0 .../gonzales-pe-sl => gonzales-pe}/.jscs.json | 2 +- .../gonzales-pe-sl => gonzales-pe}/.jshintrc | 0 .../gonzales-pe-sl => gonzales-pe}/.npmignore | 0 node_modules/gonzales-pe/.travis.yml | 14 + .../CHANGELOG.md | 151 +- .../MIT-LICENSE.txt | 0 .../gonzales-pe-sl => gonzales-pe}/README.md | 9 +- node_modules/gonzales-pe/appveyor.yml | 21 + node_modules/gonzales-pe/bin/gonzales.js | 116 + node_modules/gonzales-pe/lib/gonzales.js | 11873 ++++++++++++++++ node_modules/gonzales-pe/package.json | 49 + node_modules/gonzales-pe/tags | 19 + node_modules/gonzales-pe/webpack.config.js | 24 + node_modules/graceful-fs/README.md | 2 +- node_modules/graceful-fs/graceful-fs.js | 37 +- node_modules/graceful-fs/package.json | 120 +- node_modules/graceful-fs/polyfills.js | 120 +- node_modules/graceful-readlink/package.json | 71 +- node_modules/has-ansi/package.json | 119 +- node_modules/ignore/README.md | 16 +- node_modules/ignore/ignore.js | 124 +- node_modules/ignore/package.json | 113 +- node_modules/imurmurhash/package.json | 97 +- node_modules/inflight/.eslintrc | 17 - node_modules/inflight/inflight.js | 34 +- node_modules/inflight/package.json | 88 +- node_modules/inflight/test.js | 97 - node_modules/inherits/package.json | 81 +- node_modules/inquirer/package.json | 102 +- .../is-fullwidth-code-point/package.json | 109 +- node_modules/is-my-json-valid/index.js | 10 + node_modules/is-my-json-valid/package.json | 100 +- node_modules/is-my-json-valid/test/misc.js | 24 + node_modules/is-path-cwd/package.json | 89 +- node_modules/is-path-in-cwd/package.json | 92 +- node_modules/is-path-inside/package.json | 90 +- node_modules/is-property/package.json | 92 +- node_modules/is-resolvable/package.json | 104 +- node_modules/isarray/package.json | 106 +- node_modules/js-yaml/CHANGELOG.md | 13 + node_modules/js-yaml/bin/js-yaml.js | 2 - node_modules/js-yaml/dist/js-yaml.js | 24 +- node_modules/js-yaml/dist/js-yaml.min.js | 6 +- node_modules/js-yaml/lib/js-yaml/dumper.js | 3 +- node_modules/js-yaml/lib/js-yaml/loader.js | 7 +- node_modules/js-yaml/lib/js-yaml/schema.js | 12 +- .../js-yaml/node_modules/.bin/esparse | 15 + .../js-yaml/node_modules/.bin/esparse.cmd | 7 + .../js-yaml/node_modules/.bin/esvalidate | 15 + .../js-yaml/node_modules/.bin/esvalidate.cmd | 7 + node_modules/js-yaml/package.json | 120 +- .../json-stable-stringify/package.json | 113 +- node_modules/jsonfile/CHANGELOG.md | 10 + node_modules/jsonfile/appveyor.yml | 1 + node_modules/jsonfile/index.js | 17 +- node_modules/jsonfile/package.json | 94 +- node_modules/jsonify/package.json | 108 +- node_modules/jsonpointer/.travis.yml | 7 +- node_modules/jsonpointer/LICENSE.md | 21 + node_modules/jsonpointer/README.md | 27 +- node_modules/jsonpointer/benchmark.js | 56 + node_modules/jsonpointer/jsonpointer.js | 129 +- node_modules/jsonpointer/package.json | 99 +- node_modules/jsonpointer/test.js | 175 +- node_modules/klaw/CHANGELOG.md | 13 + node_modules/klaw/README.md | 19 +- node_modules/klaw/package.json | 102 +- node_modules/klaw/src/index.js | 10 +- node_modules/levn/package.json | 109 +- node_modules/lodash._baseslice/LICENSE | 22 - node_modules/lodash._baseslice/README.md | 18 - node_modules/lodash._baseslice/index.js | 40 - node_modules/lodash._baseslice/package.json | 97 - node_modules/lodash._basetostring/LICENSE | 22 - node_modules/lodash._basetostring/README.md | 20 - node_modules/lodash._basetostring/index.js | 22 - .../lodash._basetostring/package.json | 116 - .../lodash._isiterateecall/LICENSE.txt | 22 - node_modules/lodash._isiterateecall/README.md | 20 - node_modules/lodash._isiterateecall/index.js | 132 - .../lodash._isiterateecall/package.json | 115 - node_modules/lodash.capitalize/LICENSE | 64 +- node_modules/lodash.capitalize/README.md | 4 +- node_modules/lodash.capitalize/index.js | 304 +- node_modules/lodash.capitalize/package.json | 111 +- node_modules/lodash.deburr/LICENSE.txt | 22 - node_modules/lodash.deburr/README.md | 20 - node_modules/lodash.deburr/index.js | 68 - node_modules/lodash.deburr/package.json | 123 - node_modules/lodash.kebabcase/README.md | 4 +- node_modules/lodash.kebabcase/index.js | 366 +- .../node_modules/lodash.deburr/README.md | 18 - .../node_modules/lodash.deburr/index.js | 78 - .../node_modules/lodash.deburr/package.json | 107 - .../node_modules/lodash.words/LICENSE | 47 - .../node_modules/lodash.words/README.md | 18 - .../node_modules/lodash.words/index.js | 97 - .../node_modules/lodash.words/package.json | 107 - node_modules/lodash.kebabcase/package.json | 113 +- node_modules/lodash.tostring/README.md | 18 - node_modules/lodash.tostring/index.js | 164 - node_modules/lodash.tostring/package.json | 108 - node_modules/lodash.upperfirst/LICENSE | 47 - node_modules/lodash.upperfirst/README.md | 18 - node_modules/lodash.upperfirst/index.js | 113 - node_modules/lodash.upperfirst/package.json | 108 - node_modules/lodash.words/LICENSE | 22 - node_modules/lodash.words/README.md | 20 - node_modules/lodash.words/index.js | 46 - node_modules/lodash.words/package.json | 124 - node_modules/lodash/LICENSE | 2 +- node_modules/lodash/README.md | 39 + node_modules/lodash/_Hash.js | 30 +- node_modules/lodash/_ListCache.js | 32 + node_modules/lodash/_MapCache.js | 28 +- node_modules/lodash/_Reflect.js | 6 - node_modules/lodash/_SetCache.js | 12 +- node_modules/lodash/_Stack.js | 17 +- node_modules/lodash/_addMapEntry.js | 2 +- node_modules/lodash/_addSetEntry.js | 1 + node_modules/lodash/_apply.js | 3 +- node_modules/lodash/_arrayAggregator.js | 4 +- node_modules/lodash/_arrayConcat.js | 25 - node_modules/lodash/_arrayEach.js | 4 +- node_modules/lodash/_arrayEachRight.js | 4 +- node_modules/lodash/_arrayEvery.js | 4 +- node_modules/lodash/_arrayFilter.js | 4 +- node_modules/lodash/_arrayIncludes.js | 5 +- node_modules/lodash/_arrayIncludesWith.js | 4 +- node_modules/lodash/_arrayLikeKeys.js | 49 + node_modules/lodash/_arrayMap.js | 4 +- node_modules/lodash/_arrayReduce.js | 4 +- node_modules/lodash/_arrayReduceRight.js | 4 +- node_modules/lodash/_arraySample.js | 15 + node_modules/lodash/_arraySampleSize.js | 17 + node_modules/lodash/_arrayShuffle.js | 15 + node_modules/lodash/_arraySome.js | 4 +- node_modules/lodash/_asciiSize.js | 12 + node_modules/lodash/_asciiToArray.js | 12 + node_modules/lodash/_asciiWords.js | 15 + node_modules/lodash/_assignMergeValue.js | 7 +- node_modules/lodash/_assignValue.js | 7 +- node_modules/lodash/_assocGet.js | 16 - node_modules/lodash/_assocIndexOf.js | 2 +- node_modules/lodash/_assocSet.js | 20 - node_modules/lodash/_baseAssignIn.js | 17 + node_modules/lodash/_baseAssignValue.js | 25 + node_modules/lodash/_baseAt.js | 10 +- node_modules/lodash/_baseClamp.js | 2 +- node_modules/lodash/_baseClone.js | 44 +- node_modules/lodash/_baseConforms.js | 25 +- node_modules/lodash/_baseConformsTo.js | 27 + node_modules/lodash/_baseCreate.js | 20 +- node_modules/lodash/_baseDelay.js | 10 +- node_modules/lodash/_baseDifference.js | 2 +- node_modules/lodash/_baseFind.js | 25 - node_modules/lodash/_baseFindIndex.js | 7 +- node_modules/lodash/_baseFindKey.js | 23 + node_modules/lodash/_baseFunctions.js | 2 +- node_modules/lodash/_baseGet.js | 3 +- node_modules/lodash/_baseGetAllKeys.js | 4 +- node_modules/lodash/_baseGetTag.js | 29 + node_modules/lodash/_baseGt.js | 2 +- node_modules/lodash/_baseHas.js | 10 +- node_modules/lodash/_baseHasIn.js | 4 +- node_modules/lodash/_baseInRange.js | 2 +- node_modules/lodash/_baseIndexOf.js | 21 +- node_modules/lodash/_baseIndexOfWith.js | 2 +- node_modules/lodash/_baseInvoke.js | 10 +- node_modules/lodash/_baseIsArguments.js | 18 + node_modules/lodash/_baseIsArrayBuffer.js | 17 + node_modules/lodash/_baseIsDate.js | 18 + node_modules/lodash/_baseIsEqual.js | 11 +- node_modules/lodash/_baseIsEqualDeep.js | 34 +- node_modules/lodash/_baseIsMap.js | 18 + node_modules/lodash/_baseIsMatch.js | 8 +- node_modules/lodash/_baseIsNaN.js | 12 + node_modules/lodash/_baseIsNative.js | 47 + node_modules/lodash/_baseIsRegExp.js | 18 + node_modules/lodash/_baseIsSet.js | 18 + node_modules/lodash/_baseIsTypedArray.js | 60 + node_modules/lodash/_baseKeys.js | 24 +- node_modules/lodash/_baseKeysIn.js | 31 +- node_modules/lodash/_baseLt.js | 2 +- node_modules/lodash/_baseMatches.js | 2 +- node_modules/lodash/_baseMatchesProperty.js | 10 +- node_modules/lodash/_baseMean.js | 2 +- node_modules/lodash/_baseMerge.js | 15 +- node_modules/lodash/_baseMergeDeep.js | 34 +- node_modules/lodash/_baseNth.js | 2 +- node_modules/lodash/_basePick.js | 16 +- node_modules/lodash/_basePickBy.js | 18 +- node_modules/lodash/_baseProperty.js | 2 +- node_modules/lodash/_basePropertyDeep.js | 2 +- node_modules/lodash/_basePropertyOf.js | 14 + node_modules/lodash/_basePullAll.js | 6 +- node_modules/lodash/_basePullAt.js | 21 +- node_modules/lodash/_baseRange.js | 4 +- node_modules/lodash/_baseRest.js | 17 + node_modules/lodash/_baseSample.js | 15 + node_modules/lodash/_baseSampleSize.js | 18 + node_modules/lodash/_baseSet.js | 31 +- node_modules/lodash/_baseSetData.js | 2 +- node_modules/lodash/_baseSetToString.js | 22 + node_modules/lodash/_baseShuffle.js | 15 + node_modules/lodash/_baseSortedIndex.js | 2 +- node_modules/lodash/_baseSortedIndexBy.js | 2 +- node_modules/lodash/_baseToPairs.js | 2 +- node_modules/lodash/_baseToString.js | 6 + node_modules/lodash/_baseUnary.js | 4 +- node_modules/lodash/_baseUnset.js | 12 +- node_modules/lodash/_baseUpdate.js | 2 +- node_modules/lodash/_baseXor.js | 26 +- node_modules/lodash/_cacheHas.js | 24 +- node_modules/lodash/_cachePush.js | 27 - node_modules/lodash/_castPath.js | 12 +- node_modules/lodash/_castRest.js | 14 + node_modules/lodash/_checkGlobal.js | 12 - node_modules/lodash/_cloneBuffer.js | 19 +- node_modules/lodash/_cloneMap.js | 5 +- node_modules/lodash/_cloneSet.js | 5 +- node_modules/lodash/_composeArgs.js | 2 +- node_modules/lodash/_composeArgsRight.js | 2 +- node_modules/lodash/_copyObject.js | 15 +- node_modules/lodash/_copySymbols.js | 2 +- node_modules/lodash/_copySymbolsIn.js | 16 + node_modules/lodash/_coreJsData.js | 6 + node_modules/lodash/_countHolders.js | 2 +- node_modules/lodash/_createAggregator.js | 2 +- node_modules/lodash/_createAssigner.js | 8 +- .../_createBaseWrapper.js => _createBind.js} | 17 +- node_modules/lodash/_createCaseFirst.js | 6 +- .../{_createCtorWrapper.js => _createCtor.js} | 6 +- ..._createCurryWrapper.js => _createCurry.js} | 23 +- node_modules/lodash/_createFind.js | 25 + node_modules/lodash/_createFlow.js | 23 +- ...reateHybridWrapper.js => _createHybrid.js} | 51 +- node_modules/lodash/_createMathOperation.js | 5 +- node_modules/lodash/_createOver.js | 17 +- node_modules/lodash/_createPadding.js | 4 +- ...atePartialWrapper.js => _createPartial.js} | 17 +- node_modules/lodash/_createRange.js | 9 +- ...ateRecurryWrapper.js => _createRecurry.js} | 36 +- node_modules/lodash/_createRound.js | 5 +- node_modules/lodash/_createSet.js | 2 +- node_modules/lodash/_createToPairs.js | 30 + .../_createWrapper.js => _createWrap.js} | 77 +- node_modules/lodash/_deburrLetter.js | 54 +- node_modules/lodash/_defineProperty.js | 11 + node_modules/lodash/_equalArrays.js | 42 +- node_modules/lodash/_equalByTag.js | 38 +- node_modules/lodash/_equalObjects.js | 30 +- node_modules/lodash/_escapeHtmlChar.js | 9 +- node_modules/lodash/_flatRest.js | 16 + node_modules/lodash/_freeGlobal.js | 4 + .../_getPlaceholder.js => _getHolder.js} | 4 +- node_modules/lodash/_getLength.js | 16 - node_modules/lodash/_getMapData.js | 18 + node_modules/lodash/_getMatchData.js | 9 +- node_modules/lodash/_getNative.js | 7 +- node_modules/lodash/_getPrototype.js | 15 +- node_modules/lodash/_getRawTag.js | 46 + node_modules/lodash/_getSymbols.js | 22 +- node_modules/lodash/_getSymbolsIn.js | 12 +- node_modules/lodash/_getTag.js | 22 +- node_modules/lodash/_getValue.js | 13 + node_modules/lodash/_getWrapDetails.js | 17 + node_modules/lodash/_hasPath.js | 16 +- node_modules/lodash/_hasUnicode.js | 26 + node_modules/lodash/_hasUnicodeWord.js | 15 + node_modules/lodash/_hashClear.js | 15 + node_modules/lodash/_hashDelete.js | 10 +- node_modules/lodash/_hashGet.js | 10 +- node_modules/lodash/_hashHas.js | 8 +- node_modules/lodash/_hashSet.js | 11 +- node_modules/lodash/_indexKeys.js | 24 - node_modules/lodash/_indexOfNaN.js | 23 - node_modules/lodash/_insertWrapDetails.js | 23 + node_modules/lodash/_isFlattenable.js | 12 +- node_modules/lodash/_isFlattenableIteratee.js | 16 - node_modules/lodash/_isHostObject.js | 20 - node_modules/lodash/_isMaskable.js | 14 + node_modules/lodash/_isMasked.js | 20 + node_modules/lodash/_listCacheClear.js | 13 + .../{_assocDelete.js => _listCacheDelete.js} | 20 +- node_modules/lodash/_listCacheGet.js | 19 + .../lodash/{_assocHas.js => _listCacheHas.js} | 11 +- node_modules/lodash/_listCacheSet.js | 26 + .../_mapClear.js => _mapCacheClear.js} | 8 +- node_modules/lodash/_mapCacheDelete.js | 18 + node_modules/lodash/_mapCacheGet.js | 16 + node_modules/lodash/_mapCacheHas.js | 16 + node_modules/lodash/_mapCacheSet.js | 22 + node_modules/lodash/_mapDelete.js | 23 - node_modules/lodash/_mapGet.js | 23 - node_modules/lodash/_mapHas.js | 23 - node_modules/lodash/_mapSet.js | 28 - node_modules/lodash/_mapToArray.js | 4 +- .../lodash/_matchesStrictComparable.js | 2 +- node_modules/lodash/_memoizeCapped.js | 26 + node_modules/lodash/_mergeData.js | 28 +- node_modules/lodash/_mergeDefaults.js | 5 +- node_modules/lodash/_nativeKeys.js | 6 + node_modules/lodash/_nativeKeysIn.js | 20 + node_modules/lodash/_nodeUtil.js | 22 + node_modules/lodash/_objectToString.js | 22 + node_modules/lodash/_overArg.js | 15 + node_modules/lodash/_overRest.js | 36 + node_modules/lodash/_parent.js | 2 +- node_modules/lodash/_reHasComplexSymbol.js | 13 - node_modules/lodash/_root.js | 40 +- node_modules/lodash/_setCacheAdd.js | 19 + node_modules/lodash/_setCacheHas.js | 14 + node_modules/lodash/_setData.js | 26 +- node_modules/lodash/_setToArray.js | 4 +- node_modules/lodash/_setToPairs.js | 18 + node_modules/lodash/_setToString.js | 14 + node_modules/lodash/_setWrapToString.js | 21 + node_modules/lodash/_shortOut.js | 37 + node_modules/lodash/_shuffleSelf.js | 28 + node_modules/lodash/_stackClear.js | 5 +- node_modules/lodash/_stackDelete.js | 7 +- node_modules/lodash/_stackGet.js | 7 +- node_modules/lodash/_stackHas.js | 7 +- node_modules/lodash/_stackSet.js | 28 +- node_modules/lodash/_strictIndexOf.js | 23 + node_modules/lodash/_strictLastIndexOf.js | 21 + node_modules/lodash/_stringSize.js | 41 +- node_modules/lodash/_stringToArray.js | 32 +- node_modules/lodash/_stringToPath.js | 13 +- node_modules/lodash/_toSource.js | 7 +- node_modules/lodash/_unescapeHtmlChar.js | 9 +- node_modules/lodash/_unicodeSize.js | 44 + node_modules/lodash/_unicodeToArray.js | 40 + node_modules/lodash/_unicodeWords.js | 69 + node_modules/lodash/_updateWrapDetails.js | 46 + node_modules/lodash/add.js | 2 +- node_modules/lodash/after.js | 2 +- node_modules/lodash/array.js | 1 + node_modules/lodash/ary.js | 10 +- node_modules/lodash/assign.js | 20 +- node_modules/lodash/assignIn.js | 34 +- node_modules/lodash/at.js | 14 +- node_modules/lodash/attempt.js | 6 +- node_modules/lodash/before.js | 4 +- node_modules/lodash/bind.js | 30 +- node_modules/lodash/bindAll.js | 16 +- node_modules/lodash/bindKey.js | 26 +- node_modules/lodash/chunk.js | 4 +- node_modules/lodash/clone.js | 5 +- node_modules/lodash/cloneDeep.js | 6 +- node_modules/lodash/cloneDeepWith.js | 7 +- node_modules/lodash/cloneWith.js | 6 +- node_modules/lodash/collection.js | 1 - node_modules/lodash/compact.js | 2 +- node_modules/lodash/concat.js | 25 +- node_modules/lodash/cond.js | 12 +- node_modules/lodash/conforms.js | 20 +- node_modules/lodash/conformsTo.js | 32 + node_modules/lodash/constant.js | 10 +- node_modules/lodash/core.js | 1229 +- node_modules/lodash/core.min.js | 51 +- node_modules/lodash/countBy.js | 13 +- node_modules/lodash/create.js | 2 +- node_modules/lodash/curry.js | 8 +- node_modules/lodash/curryRight.js | 8 +- node_modules/lodash/debounce.js | 30 +- node_modules/lodash/deburr.js | 19 +- node_modules/lodash/defaultTo.js | 25 + node_modules/lodash/defaults.js | 8 +- node_modules/lodash/defaultsDeep.js | 11 +- node_modules/lodash/defer.js | 6 +- node_modules/lodash/delay.js | 4 +- node_modules/lodash/difference.js | 20 +- node_modules/lodash/differenceBy.js | 22 +- node_modules/lodash/differenceWith.js | 14 +- node_modules/lodash/divide.js | 2 +- node_modules/lodash/drop.js | 2 +- node_modules/lodash/dropRight.js | 2 +- node_modules/lodash/dropRightWhile.js | 3 +- node_modules/lodash/dropWhile.js | 3 +- node_modules/lodash/endsWith.js | 7 +- node_modules/lodash/eq.js | 6 +- node_modules/lodash/escape.js | 12 +- node_modules/lodash/escapeRegExp.js | 2 +- node_modules/lodash/every.js | 8 +- node_modules/lodash/fill.js | 2 +- node_modules/lodash/filter.js | 5 +- node_modules/lodash/find.js | 22 +- node_modules/lodash/findIndex.js | 26 +- node_modules/lodash/findKey.js | 9 +- node_modules/lodash/findLast.js | 22 +- node_modules/lodash/findLastIndex.js | 30 +- node_modules/lodash/findLastKey.js | 9 +- node_modules/lodash/first.js | 1 + node_modules/lodash/flatMap.js | 3 +- node_modules/lodash/flatMapDeep.js | 3 +- node_modules/lodash/flatMapDepth.js | 3 +- node_modules/lodash/flatten.js | 2 +- node_modules/lodash/flattenDeep.js | 2 +- node_modules/lodash/flattenDepth.js | 2 +- node_modules/lodash/flip.js | 10 +- node_modules/lodash/flow.js | 6 +- node_modules/lodash/flowRight.js | 6 +- node_modules/lodash/forEach.js | 9 +- node_modules/lodash/forEachRight.js | 7 +- node_modules/lodash/forIn.js | 4 +- node_modules/lodash/forInRight.js | 4 +- node_modules/lodash/forOwn.js | 4 +- node_modules/lodash/forOwnRight.js | 4 +- node_modules/lodash/fp/F.js | 1 + node_modules/lodash/fp/T.js | 1 + node_modules/lodash/fp/_baseConvert.js | 218 +- node_modules/lodash/fp/_convertBrowser.js | 2 +- node_modules/lodash/fp/_mapping.js | 143 +- node_modules/lodash/fp/_util.js | 2 +- node_modules/lodash/fp/assignAll.js | 5 + node_modules/lodash/fp/assignAllWith.js | 5 + node_modules/lodash/fp/assignInAll.js | 5 + node_modules/lodash/fp/assignInAllWith.js | 5 + node_modules/lodash/fp/conforms.js | 6 +- node_modules/lodash/fp/conformsTo.js | 5 + node_modules/lodash/fp/defaultTo.js | 5 + node_modules/lodash/fp/defaultsAll.js | 5 + node_modules/lodash/fp/defaultsDeepAll.js | 5 + node_modules/lodash/fp/dropLast.js | 1 + node_modules/lodash/fp/dropLastWhile.js | 1 + node_modules/lodash/fp/extendAll.js | 1 + node_modules/lodash/fp/extendAllWith.js | 1 + node_modules/lodash/fp/findFrom.js | 5 + node_modules/lodash/fp/findIndexFrom.js | 5 + node_modules/lodash/fp/findLastFrom.js | 5 + node_modules/lodash/fp/findLastIndexFrom.js | 5 + node_modules/lodash/fp/includesFrom.js | 5 + node_modules/lodash/fp/indexBy.js | 1 + node_modules/lodash/fp/indexOfFrom.js | 5 + node_modules/lodash/fp/lastIndexOfFrom.js | 5 + node_modules/lodash/fp/matches.js | 6 +- node_modules/lodash/fp/mergeAll.js | 5 + node_modules/lodash/fp/mergeAllWith.js | 5 + node_modules/lodash/fp/nthArg.js | 2 +- node_modules/lodash/fp/property.js | 6 +- node_modules/lodash/fp/propertyOf.js | 2 +- node_modules/lodash/fp/rangeStep.js | 5 + node_modules/lodash/fp/rangeStepRight.js | 5 + node_modules/lodash/fp/stubArray.js | 5 + node_modules/lodash/fp/stubFalse.js | 5 + node_modules/lodash/fp/stubObject.js | 5 + node_modules/lodash/fp/stubString.js | 5 + node_modules/lodash/fp/stubTrue.js | 5 + node_modules/lodash/fp/symmetricDifference.js | 1 + .../lodash/fp/symmetricDifferenceBy.js | 1 + .../lodash/fp/symmetricDifferenceWith.js | 1 + node_modules/lodash/fp/takeLast.js | 1 + node_modules/lodash/fp/takeLastWhile.js | 1 + node_modules/lodash/fp/toFinite.js | 5 + node_modules/lodash/fp/where.js | 1 + node_modules/lodash/fp/whereEq.js | 2 +- node_modules/lodash/fp/zipAll.js | 5 + node_modules/lodash/fromPairs.js | 6 +- node_modules/lodash/functions.js | 2 +- node_modules/lodash/functionsIn.js | 2 +- node_modules/lodash/get.js | 2 +- node_modules/lodash/groupBy.js | 8 +- node_modules/lodash/identity.js | 6 +- node_modules/lodash/inRange.js | 5 +- node_modules/lodash/includes.js | 8 +- node_modules/lodash/indexOf.js | 14 +- node_modules/lodash/initial.js | 5 +- node_modules/lodash/intersection.js | 14 +- node_modules/lodash/intersectionBy.js | 18 +- node_modules/lodash/intersectionWith.js | 17 +- node_modules/lodash/invertBy.js | 3 +- node_modules/lodash/invoke.js | 4 +- node_modules/lodash/invokeMap.js | 15 +- node_modules/lodash/isArguments.js | 24 +- node_modules/lodash/isArray.js | 4 +- node_modules/lodash/isArrayBuffer.js | 24 +- node_modules/lodash/isArrayLike.js | 5 +- node_modules/lodash/isBoolean.js | 18 +- node_modules/lodash/isBuffer.js | 29 +- node_modules/lodash/isDate.js | 25 +- node_modules/lodash/isElement.js | 5 +- node_modules/lodash/isEmpty.js | 35 +- node_modules/lodash/isEqual.js | 7 +- node_modules/lodash/isEqualWith.js | 5 +- node_modules/lodash/isError.js | 25 +- node_modules/lodash/isFinite.js | 11 +- node_modules/lodash/isFunction.js | 32 +- node_modules/lodash/isLength.js | 7 +- node_modules/lodash/isMap.js | 16 +- node_modules/lodash/isMatch.js | 16 +- node_modules/lodash/isNative.js | 48 +- node_modules/lodash/isNumber.js | 18 +- node_modules/lodash/isObject.js | 4 +- node_modules/lodash/isObjectLike.js | 2 +- node_modules/lodash/isPlainObject.js | 26 +- node_modules/lodash/isRegExp.js | 25 +- node_modules/lodash/isSafeInteger.js | 3 +- node_modules/lodash/isSet.js | 16 +- node_modules/lodash/isString.js | 18 +- node_modules/lodash/isSymbol.js | 18 +- node_modules/lodash/isTypedArray.js | 67 +- node_modules/lodash/isWeakMap.js | 3 +- node_modules/lodash/isWeakSet.js | 18 +- node_modules/lodash/iteratee.js | 5 +- node_modules/lodash/join.js | 2 +- node_modules/lodash/keyBy.js | 8 +- node_modules/lodash/keys.js | 27 +- node_modules/lodash/keysIn.js | 31 +- node_modules/lodash/lang.js | 2 + node_modules/lodash/last.js | 2 +- node_modules/lodash/lastIndexOf.js | 26 +- node_modules/lodash/lodash-4.11.2.tgz | Bin 291917 -> 0 bytes node_modules/lodash/lodash.js | 4636 +++--- node_modules/lodash/lodash.min.js | 256 +- node_modules/lodash/map.js | 3 +- node_modules/lodash/mapKeys.js | 8 +- node_modules/lodash/mapValues.js | 8 +- node_modules/lodash/matches.js | 27 +- node_modules/lodash/matchesProperty.js | 21 +- node_modules/lodash/maxBy.js | 5 +- node_modules/lodash/meanBy.js | 5 +- node_modules/lodash/memoize.js | 14 +- node_modules/lodash/merge.js | 14 +- node_modules/lodash/mergeWith.js | 15 +- node_modules/lodash/method.js | 6 +- node_modules/lodash/methodOf.js | 6 +- node_modules/lodash/minBy.js | 5 +- node_modules/lodash/multiply.js | 2 +- node_modules/lodash/negate.js | 13 +- node_modules/lodash/noop.js | 9 +- node_modules/lodash/now.js | 9 +- node_modules/lodash/nth.js | 4 +- node_modules/lodash/nthArg.js | 8 +- node_modules/lodash/object.js | 1 + node_modules/lodash/omit.js | 46 +- node_modules/lodash/omitBy.js | 11 +- node_modules/lodash/once.js | 2 +- node_modules/lodash/over.js | 6 +- node_modules/lodash/overArgs.js | 21 +- node_modules/lodash/overEvery.js | 6 +- node_modules/lodash/overSome.js | 6 +- node_modules/lodash/package.json | 111 +- node_modules/lodash/package/_Hash.js | 18 - node_modules/lodash/package/_MapCache.js | 32 - node_modules/lodash/package/_Reflect.js | 6 - node_modules/lodash/package/_SetCache.js | 25 - node_modules/lodash/package/_arrayConcat.js | 25 - node_modules/lodash/package/_assocGet.js | 16 - node_modules/lodash/package/_assocSet.js | 20 - node_modules/lodash/package/_baseConforms.js | 33 - node_modules/lodash/package/_baseCreate.js | 18 - node_modules/lodash/package/_baseFind.js | 25 - node_modules/lodash/package/_baseKeys.js | 16 - node_modules/lodash/package/_baseKeysIn.js | 36 - node_modules/lodash/package/_cacheHas.js | 25 - node_modules/lodash/package/_cachePush.js | 27 - node_modules/lodash/package/_checkGlobal.js | 12 - node_modules/lodash/package/_cloneBuffer.js | 18 - node_modules/lodash/package/_createOver.js | 32 - node_modules/lodash/package/_deburrLetter.js | 33 - node_modules/lodash/package/_getLength.js | 16 - node_modules/lodash/package/_getPrototype.js | 15 - node_modules/lodash/package/_getSymbols.js | 24 - node_modules/lodash/package/_indexKeys.js | 24 - node_modules/lodash/package/_indexOfNaN.js | 23 - node_modules/lodash/package/_isFlattenable.js | 16 - .../lodash/package/_isFlattenableIteratee.js | 16 - node_modules/lodash/package/_isHostObject.js | 20 - node_modules/lodash/package/_mapDelete.js | 23 - node_modules/lodash/package/_mapGet.js | 23 - node_modules/lodash/package/_mapHas.js | 23 - node_modules/lodash/package/_mapSet.js | 28 - node_modules/lodash/package/_root.js | 41 - node_modules/lodash/package/_stackSet.js | 36 - node_modules/lodash/package/assignIn.js | 58 - node_modules/lodash/package/core.min.js | 30 - node_modules/lodash/package/difference.js | 31 - node_modules/lodash/package/findLast.js | 35 - node_modules/lodash/package/fp/whereEq.js | 1 - node_modules/lodash/package/isArguments.js | 46 - node_modules/lodash/package/isArrayBuffer.js | 37 - node_modules/lodash/package/isBoolean.js | 39 - node_modules/lodash/package/isBuffer.js | 49 - node_modules/lodash/package/isDate.js | 38 - node_modules/lodash/package/isFunction.js | 43 - node_modules/lodash/package/isMap.js | 29 - node_modules/lodash/package/isRegExp.js | 38 - node_modules/lodash/package/isSet.js | 29 - node_modules/lodash/package/isSymbol.js | 39 - node_modules/lodash/package/isWeakSet.js | 38 - node_modules/lodash/package/keys.js | 56 - node_modules/lodash/package/keysIn.js | 55 - node_modules/lodash/package/lodash.min.js | 126 - node_modules/lodash/package/matches.js | 32 - node_modules/lodash/package/noop.js | 20 - node_modules/lodash/parseInt.js | 10 +- node_modules/lodash/partial.js | 22 +- node_modules/lodash/partialRight.js | 22 +- node_modules/lodash/partition.js | 3 +- node_modules/lodash/pick.js | 13 +- node_modules/lodash/pickBy.js | 20 +- node_modules/lodash/property.js | 2 +- node_modules/lodash/propertyOf.js | 2 +- node_modules/lodash/pull.js | 14 +- node_modules/lodash/pullAll.js | 6 +- node_modules/lodash/pullAllBy.js | 5 +- node_modules/lodash/pullAt.js | 21 +- node_modules/lodash/random.js | 6 +- node_modules/lodash/range.js | 2 +- node_modules/lodash/rangeRight.js | 2 +- node_modules/lodash/rearg.js | 15 +- node_modules/lodash/reject.js | 11 +- node_modules/lodash/remove.js | 3 +- node_modules/lodash/replace.js | 8 +- node_modules/lodash/rest.js | 32 +- node_modules/lodash/result.js | 5 +- node_modules/lodash/reverse.js | 2 +- node_modules/lodash/sample.js | 12 +- node_modules/lodash/sampleSize.js | 24 +- node_modules/lodash/shuffle.js | 10 +- node_modules/lodash/size.js | 20 +- node_modules/lodash/slice.js | 2 +- node_modules/lodash/some.js | 3 +- node_modules/lodash/sortBy.js | 25 +- node_modules/lodash/sortedIndex.js | 3 - node_modules/lodash/sortedIndexBy.js | 13 +- node_modules/lodash/sortedIndexOf.js | 8 +- node_modules/lodash/sortedLastIndex.js | 4 +- node_modules/lodash/sortedLastIndexBy.js | 12 +- node_modules/lodash/sortedLastIndexOf.js | 6 +- node_modules/lodash/sortedUniqBy.js | 2 +- node_modules/lodash/split.js | 14 +- node_modules/lodash/spread.js | 8 +- node_modules/lodash/startsWith.js | 5 +- node_modules/lodash/stubArray.js | 23 + node_modules/lodash/stubFalse.js | 18 + node_modules/lodash/stubObject.js | 23 + node_modules/lodash/stubString.js | 18 + node_modules/lodash/stubTrue.js | 18 + node_modules/lodash/subtract.js | 2 +- node_modules/lodash/sumBy.js | 5 +- node_modules/lodash/tail.js | 5 +- node_modules/lodash/takeRight.js | 2 +- node_modules/lodash/takeRightWhile.js | 3 +- node_modules/lodash/takeWhile.js | 3 +- node_modules/lodash/template.js | 19 +- node_modules/lodash/throttle.js | 9 +- node_modules/lodash/times.js | 10 +- node_modules/lodash/toArray.js | 6 +- node_modules/lodash/toFinite.js | 42 + node_modules/lodash/toInteger.js | 28 +- node_modules/lodash/toLength.js | 6 +- node_modules/lodash/toNumber.js | 13 +- node_modules/lodash/toPairs.js | 11 +- node_modules/lodash/toPairsIn.js | 13 +- node_modules/lodash/toPath.js | 14 +- node_modules/lodash/toSafeInteger.js | 4 +- node_modules/lodash/toString.js | 4 +- node_modules/lodash/transform.js | 33 +- node_modules/lodash/truncate.js | 4 +- node_modules/lodash/unary.js | 2 +- node_modules/lodash/unescape.js | 4 +- node_modules/lodash/union.js | 12 +- node_modules/lodash/unionBy.js | 18 +- node_modules/lodash/unionWith.js | 13 +- node_modules/lodash/uniq.js | 11 +- node_modules/lodash/uniqBy.js | 11 +- node_modules/lodash/uniqWith.js | 12 +- node_modules/lodash/unzip.js | 6 +- node_modules/lodash/util.js | 6 + node_modules/lodash/values.js | 2 +- node_modules/lodash/without.js | 14 +- node_modules/lodash/words.js | 64 +- node_modules/lodash/wrap.js | 13 +- node_modules/lodash/wrapperAt.js | 11 +- node_modules/lodash/wrapperLodash.js | 46 +- node_modules/lodash/xor.js | 12 +- node_modules/lodash/xorBy.js | 22 +- node_modules/lodash/xorWith.js | 17 +- node_modules/lodash/zip.js | 8 +- node_modules/lodash/zipWith.js | 7 +- node_modules/merge/package.json | 85 +- node_modules/minimatch/README.md | 11 +- node_modules/minimatch/minimatch.js | 57 +- node_modules/minimatch/package.json | 90 +- node_modules/minimist/.travis.yml | 4 + node_modules/minimist/index.js | 149 +- node_modules/minimist/package.json | 111 +- node_modules/minimist/readme.markdown | 20 +- .../minimist/test/all_bool.js | 0 .../node_modules => }/minimist/test/bool.js | 0 node_modules/minimist/test/dash.js | 7 + node_modules/minimist/test/default_bool.js | 15 + node_modules/minimist/test/dotted.js | 6 + .../node_modules => }/minimist/test/num.js | 0 node_modules/minimist/test/parse.js | 167 +- node_modules/minimist/test/parse_modified.js | 2 +- .../minimist/test/stop_early.js | 0 .../minimist/test/unknown.js | 0 .../mkdirp/node_modules/minimist/.travis.yml | 4 + .../node_modules/minimist/LICENSE | 0 .../node_modules/minimist/example/parse.js | 0 .../node_modules/minimist/index.js | 149 +- .../mkdirp/node_modules/minimist/package.json | 40 + .../node_modules/minimist/readme.markdown | 20 +- .../node_modules/minimist/test/dash.js | 7 - .../minimist/test/default_bool.js | 15 - .../node_modules/minimist/test/dotted.js | 6 - .../node_modules/minimist/test/long.js | 0 .../node_modules/minimist/test/parse.js | 167 +- .../minimist/test/parse_modified.js | 2 +- .../node_modules/minimist/test/short.js | 0 .../node_modules/minimist/test/whitespace.js | 0 node_modules/mkdirp/package.json | 91 +- node_modules/ms/.npmignore | 5 - node_modules/ms/History.md | 66 - node_modules/ms/LICENSE | 20 - node_modules/ms/LICENSE.md | 21 + node_modules/ms/README.md | 33 +- node_modules/ms/index.js | 102 +- node_modules/ms/package.json | 88 +- node_modules/mute-stream/package.json | 84 +- node_modules/number-is-nan/package.json | 95 +- node_modules/number-is-nan/readme.md | 4 +- node_modules/object-assign/package.json | 113 +- node_modules/once/README.md | 28 + node_modules/once/once.js | 21 + node_modules/once/package.json | 90 +- node_modules/onetime/package.json | 90 +- node_modules/optionator/CHANGELOG.md | 4 + node_modules/optionator/README.md | 2 +- node_modules/optionator/lib/coerce.js | 367 - node_modules/optionator/lib/help.js | 2 +- node_modules/optionator/lib/index.js | 20 +- node_modules/optionator/lib/parse-type.js | 143 - node_modules/optionator/lib/util.js | 4 +- node_modules/optionator/package.json | 109 +- node_modules/os-homedir/package.json | 101 +- node_modules/os-homedir/readme.md | 10 +- node_modules/path-is-absolute/index.js | 10 +- node_modules/path-is-absolute/package.json | 105 +- node_modules/path-is-absolute/readme.md | 30 +- node_modules/path-is-inside/LICENSE.txt | 30 +- node_modules/path-is-inside/README.md | 35 - node_modules/path-is-inside/package.json | 96 +- node_modules/pify/package.json | 111 +- node_modules/pinkie-promise/package.json | 94 +- node_modules/pinkie/package.json | 98 +- node_modules/pluralize/package.json | 101 +- node_modules/prelude-ls/package.json | 114 +- .../process-nextick-args/package.json | 77 +- node_modules/progress/package.json | 110 +- node_modules/read-json-sync/LICENSE | 20 - node_modules/read-json-sync/README.md | 44 - node_modules/read-json-sync/index.js | 11 - node_modules/read-json-sync/package.json | 95 - node_modules/readable-stream/package.json | 102 +- node_modules/readline2/package.json | 94 +- node_modules/require-uncached/index.js | 19 +- node_modules/require-uncached/license | 21 + node_modules/require-uncached/package.json | 101 +- node_modules/require-uncached/readme.md | 19 +- node_modules/resolve-from/package.json | 92 +- node_modules/restore-cursor/package.json | 103 +- node_modules/rimraf/package.json | 96 +- node_modules/rimraf/rimraf.js | 16 +- node_modules/run-async/package.json | 83 +- node_modules/rx-lite/package.json | 92 +- node_modules/sass-lint/.eslintrc | 8 +- .../sass-lint/.github/ISSUE_TEMPLATE.md | 21 + .../.github/PULL_REQUEST_TEMPLATE.md | 24 + node_modules/sass-lint/.travis.yml | 3 - node_modules/sass-lint/CHANGELOG.md | 182 + node_modules/sass-lint/README.md | 160 +- node_modules/sass-lint/appveyor.yml | 7 +- node_modules/sass-lint/bin/sass-lint.js | 57 +- node_modules/sass-lint/data/properties.yml | 1 + node_modules/sass-lint/data/pseudoClasses.yml | 36 + .../sass-lint/data/pseudoElements.yml | 6 + node_modules/sass-lint/docs/cli/readme.md | 4 +- .../sass-lint/docs/options/config-file.md | 70 +- .../sass-lint/docs/options/max-warnings.md | 30 + .../sass-lint/docs/rules/attribute-quotes.md | 61 + .../sass-lint/docs/rules/border-zero.md | 16 + .../sass-lint/docs/rules/class-name-format.md | 39 +- .../docs/rules/declarations-before-nesting.md | 29 + .../docs/rules/function-name-format.md | 40 +- .../sass-lint/docs/rules/id-name-format.md | 21 +- .../sass-lint/docs/rules/indentation.md | 6 +- .../docs/rules/max-file-line-count.md | 27 + .../sass-lint/docs/rules/max-line-length.md | 24 + .../sass-lint/docs/rules/mixin-name-format.md | 40 +- .../docs/rules/no-attribute-selectors.md | 37 + .../sass-lint/docs/rules/no-color-hex.md | 33 + .../sass-lint/docs/rules/no-combinators.md | 25 + .../docs/rules/no-disallowed-properties.md | 30 + .../docs/rules/no-mergeable-selectors.md | 4 + .../docs/rules/no-universal-selectors.md | 30 + .../sass-lint/docs/rules/no-url-domains.md | 37 + .../sass-lint/docs/rules/no-url-protocols.md | 44 +- .../docs/rules/no-vendor-prefixes.md | 45 +- .../docs/rules/placeholder-name-format.md | 40 +- .../sass-lint/docs/rules/property-units.md | 3 +- .../sass-lint/docs/rules/pseudo-element.md | 32 + .../docs/rules/variable-for-property.md | 20 + .../docs/rules/variable-name-format.md | 33 +- node_modules/sass-lint/docs/sass-lint.yml | 2 + .../sass-lint/docs/toggle-rules-in-src.md | 71 + node_modules/sass-lint/index.js | 112 +- node_modules/sass-lint/lib/config-helpers.js | 107 + node_modules/sass-lint/lib/config.js | 50 +- .../property-sort-orders/concentric.yml | 19 + .../config/property-sort-orders/recess.yml | 15 + .../sass-lint/lib/config/sass-lint.yml | 11 + node_modules/sass-lint/lib/exceptions.js | 19 + node_modules/sass-lint/lib/groot.js | 11 +- node_modules/sass-lint/lib/helpers.js | 91 +- node_modules/sass-lint/lib/ruleToggler.js | 249 + node_modules/sass-lint/lib/rules.js | 5 +- .../sass-lint/lib/rules/attribute-quotes.js | 36 + node_modules/sass-lint/lib/rules/bem-depth.js | 26 +- .../sass-lint/lib/rules/border-zero.js | 20 +- .../sass-lint/lib/rules/class-name-format.js | 5 + .../lib/rules/declarations-before-nesting.js | 55 + .../lib/rules/function-name-format.js | 9 +- .../sass-lint/lib/rules/id-name-format.js | 5 + .../sass-lint/lib/rules/indentation.js | 189 +- .../lib/rules/max-file-line-count.js | 25 + .../sass-lint/lib/rules/max-line-length.js | 32 + .../sass-lint/lib/rules/mixin-name-format.js | 9 +- .../lib/rules/no-attribute-selectors.js | 23 + .../sass-lint/lib/rules/no-color-hex.js | 22 + .../sass-lint/lib/rules/no-color-keywords.js | 25 +- .../sass-lint/lib/rules/no-combinators.js | 57 + .../lib/rules/no-disallowed-properties.js | 28 + .../lib/rules/no-duplicate-properties.js | 14 +- .../lib/rules/no-mergeable-selectors.js | 111 +- .../lib/rules/no-misspelled-properties.js | 23 +- .../lib/rules/no-universal-selectors.js | 27 + .../sass-lint/lib/rules/no-url-domains.js | 33 + .../sass-lint/lib/rules/no-url-protocols.js | 22 +- .../sass-lint/lib/rules/no-vendor-prefixes.js | 53 +- .../lib/rules/placeholder-name-format.js | 9 +- .../sass-lint/lib/rules/pseudo-element.js | 77 + .../sass-lint/lib/rules/shorthand-values.js | 178 +- .../lib/rules/single-line-per-selector.js | 47 +- .../lib/rules/space-around-operator.js | 43 +- .../sass-lint/lib/rules/space-before-colon.js | 2 +- .../sass-lint/lib/rules/url-quotes.js | 4 +- .../lib/rules/variable-for-property.js | 18 +- .../lib/rules/variable-name-format.js | 10 +- node_modules/sass-lint/lib/rules/zero-unit.js | 18 +- .../sass-lint/lib/selector-helpers.js | 142 + .../sass-lint/node_modules/.bin/eslint | 15 + .../sass-lint/node_modules/.bin/eslint.cmd | 7 + .../sass-lint/node_modules/.bin/gonzales | 6 +- .../sass-lint/node_modules/.bin/gonzales.cmd | 4 +- .../sass-lint/node_modules/.bin/js-yaml | 15 + .../sass-lint/node_modules/.bin/js-yaml.cmd | 7 + .../node_modules/gonzales-pe-sl/.travis.yml | 30 - .../gonzales-pe-sl/bin/gonzales.js | 115 - .../gonzales-pe-sl/lib/css/mark.js | 31 - .../gonzales-pe-sl/lib/css/parse.js | 459 - .../gonzales-pe-sl/lib/css/stringify.js | 3 - .../gonzales-pe-sl/lib/css/tokenizer.js | 71 - .../gonzales-pe-sl/lib/gonzales.js | 1 - .../gonzales-pe-sl/lib/less/mark.js | 27 - .../gonzales-pe-sl/lib/less/parse.js | 565 - .../gonzales-pe-sl/lib/less/stringify.js | 3 - .../gonzales-pe-sl/lib/less/tokenizer.js | 73 - .../gonzales-pe-sl/lib/node/basic-node.js | 40 - .../gonzales-pe-sl/lib/node/empty-node.js | 1 - .../gonzales-pe-sl/lib/node/node-types.js | 1 - .../node_modules/gonzales-pe-sl/lib/parse.js | 5 - .../gonzales-pe-sl/lib/parsing-error.js | 21 - .../gonzales-pe-sl/lib/sass/mark.js | 34 - .../gonzales-pe-sl/lib/sass/parse.js | 696 - .../gonzales-pe-sl/lib/sass/stringify.js | 3 - .../gonzales-pe-sl/lib/sass/tokenizer.js | 95 - .../gonzales-pe-sl/lib/scss/mark.js | 27 - .../gonzales-pe-sl/lib/scss/parse.js | 638 - .../gonzales-pe-sl/lib/scss/stringify.js | 3 - .../gonzales-pe-sl/lib/scss/tokenizer.js | 91 - .../gonzales-pe-sl/lib/token-types.js | 35 - .../node_modules/gonzales-pe-sl/package.json | 97 - .../node_modules/minimist/.travis.yml | 8 - .../node_modules/minimist/package.json | 97 - node_modules/sass-lint/package.json | 117 +- .../bom-utf8/starts-with-mixin-utf8-bom.scss | 5 + .../tests/bom-utf8/var-utf8-bom.scss | 5 + node_modules/sass-lint/tests/cli.js | 192 +- .../sass-lint/tests/config-helpers.js | 121 + node_modules/sass-lint/tests/config.js | 50 +- .../tests/dir-test/dir.scss/test.scss | 3 + node_modules/sass-lint/tests/failures.js | 90 + node_modules/sass-lint/tests/helpers.js | 1253 -- .../sass-lint/tests/helpers/addUnique.js | 75 + .../tests/helpers/attemptTraversal.js | 78 + .../tests/helpers/collectSuffixExtensions.js | 123 + .../sass-lint/tests/helpers/hasEOL.js | 27 + .../sass-lint/tests/helpers/helpers.js | 18 + .../sass-lint/tests/helpers/isCamelCase.js | 51 + .../sass-lint/tests/helpers/isEmptyLine.js | 43 + .../sass-lint/tests/helpers/isEqual.js | 113 + .../tests/helpers/isHyphenatedBEM.js | 91 + .../tests/helpers/isHyphenatedLowerCase.js | 75 + .../sass-lint/tests/helpers/isLowerCase.js | 43 + .../sass-lint/tests/helpers/isNestable.js | 35 + .../sass-lint/tests/helpers/isNewLine.js | 119 + .../sass-lint/tests/helpers/isNumber.js | 44 + .../tests/helpers/isPartialStringMatch.js | 59 + .../sass-lint/tests/helpers/isPascalCase.js | 51 + .../sass-lint/tests/helpers/isSnakeCase.js | 59 + .../sass-lint/tests/helpers/isSpace.js | 87 + .../sass-lint/tests/helpers/isStrictBEM.js | 115 + .../sass-lint/tests/helpers/isUnique.js | 74 + .../sass-lint/tests/helpers/isUpperCase.js | 44 + .../sass-lint/tests/helpers/isValidHex.js | 115 + .../sass-lint/tests/helpers/loadConfigFile.js | 20 + .../sass-lint/tests/helpers/propertySearch.js | 51 + .../sass-lint/tests/helpers/sortDetects.js | 66 + .../sass-lint/tests/helpers/stripBom.js | 28 + .../sass-lint/tests/helpers/stripLastSpace.js | 43 + .../sass-lint/tests/helpers/stripPrefix.js | 51 + .../sass-lint/tests/helpers/stripQuotes.js | 27 + node_modules/sass-lint/tests/main.js | 322 +- node_modules/sass-lint/tests/ruleToggler.js | 326 + .../sass-lint/tests/rules/attribute-quotes.js | 63 + .../sass-lint/tests/rules/border-zero.js | 58 + .../tests/rules/class-name-format.js | 60 +- .../rules/declarations-before-nesting.js | 35 + .../tests/rules/function-name-format.js | 32 +- .../sass-lint/tests/rules/id-name-format.js | 28 + .../sass-lint/tests/rules/indentation.js | 62 +- .../tests/rules/max-file-line-count.js | 63 + .../sass-lint/tests/rules/max-line-length.js | 63 + .../tests/rules/mixin-name-format.js | 32 +- .../tests/rules/no-attribute-selectors.js | 35 + .../sass-lint/tests/rules/no-color-hex.js | 35 + .../sass-lint/tests/rules/no-combinators.js | 35 + .../tests/rules/no-disallowed-properties.js | 83 + .../tests/rules/no-duplicate-properties.js | 12 +- .../tests/rules/no-empty-rulesets.js | 2 +- .../tests/rules/no-mergeable-selectors.js | 8 +- .../tests/rules/no-misspelled-properties.js | 12 +- .../sass-lint/tests/rules/no-trailing-zero.js | 4 +- .../tests/rules/no-universal-selectors.js | 35 + .../sass-lint/tests/rules/no-url-domains.js | 35 + .../sass-lint/tests/rules/no-url-protocols.js | 29 + .../tests/rules/no-vendor-prefixes.js | 78 +- .../tests/rules/placeholder-name-format.js | 40 +- .../sass-lint/tests/rules/pseudo-element.js | 73 + .../sass-lint/tests/rules/shorthand-values.js | 32 +- .../tests/rules/space-around-operator.js | 4 +- .../tests/rules/variable-for-property.js | 32 + .../tests/rules/variable-name-format.js | 52 +- .../tests/sass/attribute-quotes.sass | 62 + .../tests/sass/attribute-quotes.scss | 75 + .../sass-lint/tests/sass/border-zero.scss | 6 + .../tests/sass/class-name-format.sass | 18 + .../tests/sass/class-name-format.scss | 25 + .../sass/declarations-before-nesting.sass | 34 + .../sass/declarations-before-nesting.scss | 44 + .../sass-lint/tests/sass/empty-file.sass | 0 .../tests/sass/front-matter/front-matter.scss | 7 + .../sass/indentation/indentation-spaces.sass | 107 + .../indentation-spaces.scss} | 58 + .../sass/indentation/indentation-tabs.sass | 107 + .../sass/indentation/indentation-tabs.scss | 175 + .../tests/sass/max-file-line-count.sass | 301 + .../tests/sass/max-file-line-count.scss | 301 + .../sass-lint/tests/sass/max-line-length.sass | 20 + .../sass-lint/tests/sass/max-line-length.scss | 22 + .../tests/sass/no-attribute-selectors.sass | 77 + .../tests/sass/no-attribute-selectors.scss | 98 + .../sass-lint/tests/sass/no-color-hex.sass | 25 + .../sass-lint/tests/sass/no-color-hex.scss | 26 + .../tests/sass/no-color-keywords.sass | 3 + .../tests/sass/no-color-keywords.scss | 7 + .../sass-lint/tests/sass/no-combinators.sass | 115 + .../sass-lint/tests/sass/no-combinators.scss | 155 + .../tests/sass/no-disallowed-properties.sass | 25 + .../tests/sass/no-disallowed-properties.scss | 36 + .../tests/sass/no-duplicate-properties.sass | 15 + .../tests/sass/no-duplicate-properties.scss | 17 + .../tests/sass/no-mergeable-selectors.sass | 16 + .../tests/sass/no-mergeable-selectors.scss | 80 +- .../tests/sass/no-misspelled-properties.sass | 26 + .../tests/sass/no-misspelled-properties.scss | 37 + .../tests/sass/no-universal-selectors.sass | 15 + .../tests/sass/no-universal-selectors.scss | 20 + .../sass-lint/tests/sass/no-url-domains.sass | 25 + .../sass-lint/tests/sass/no-url-domains.scss | 27 + .../tests/sass/no-vendor-prefixes.sass | 15 + .../tests/sass/no-vendor-prefixes.scss | 18 + .../sass-lint/tests/sass/pseudo-element.sass | 236 + .../sass-lint/tests/sass/pseudo-element.scss | 238 + .../sass/ruleToggler-disable-a-block.sass | 2 + .../sass/ruleToggler-disable-a-block.scss | 3 + .../sass/ruleToggler-disable-a-line.sass | 2 + .../sass/ruleToggler-disable-a-line.scss | 3 + .../sass/ruleToggler-disable-a-rule.sass | 1 + .../sass/ruleToggler-disable-a-rule.scss | 1 + ...ruleToggler-disable-all-then-reenable.sass | 3 + ...ruleToggler-disable-all-then-reenable.scss | 3 + .../tests/sass/ruleToggler-disable-all.sass | 1 + .../tests/sass/ruleToggler-disable-all.scss | 1 + .../ruleToggler-disable-multiple-rules.sass | 1 + .../ruleToggler-disable-multiple-rules.scss | 1 + .../sass/ruleToggler-disable-then-enable.sass | 5 + .../sass/ruleToggler-disable-then-enable.scss | 6 + .../tests/sass/ruleToggler-empty-comment.sass | 2 + .../tests/sass/ruleToggler-empty-comment.scss | 3 + .../sass/ruleToggler-guarantee-order.sass | 17 + .../sass/ruleToggler-guarantee-order.scss | 17 + .../sass/ruleToggler-ignore-unknown.sass | 2 + .../sass/ruleToggler-ignore-unknown.scss | 3 + .../selector-helpers/selector-helpers.scss | 68 + .../tests/sass/shorthand-values.sass | 109 + .../tests/sass/shorthand-values.scss | 143 +- .../tests/sass/single-line-per-selector.sass | 9 + .../tests/sass/single-line-per-selector.scss | 10 + .../tests/sass/space-around-operator.sass | 32 +- .../tests/sass/space-around-operator.scss | 40 +- .../sass-lint/tests/sass/success.scss | 3 + .../tests/sass/variable-for-property.sass | 7 + .../tests/sass/variable-for-property.scss | 9 + .../tests/sass/variable-name-format.sass | 4 + .../tests/sass/variable-name-format.scss | 5 + .../tests/selector-helpers/selectorHelpers.js | 137 + node_modules/sass-lint/tests/yml/.blank.yml | 0 .../sass-lint/tests/yml/.extend-a1.yml | 4 + .../sass-lint/tests/yml/.extend-a2.yml | 4 + .../sass-lint/tests/yml/.ignore-file.yml | 9 + .../tests/yml/.indentation-error.yml | 2 + .../sass-lint/tests/yml/.indentation-warn.yml | 2 + .../sass-lint/tests/yml/.max-0-warnings.yml | 2 + .../sass-lint/tests/yml/.max-10-warnings.yml | 2 + .../sass-lint/tests/yml/.max-100-warnings.yml | 2 + .../tests/yml/.multiple-ignore-strings.yml | 60 + .../sass-lint/tests/yml/.multiple-ignores.yml | 64 + .../sass-lint/tests/yml/.multiple-inputs.yml | 61 + .../yml/.single-input-include-string.yml | 59 + .../sass-lint/tests/yml/extend/.extend-b.yml | 5 + .../sass-lint/tests/yml/extend/.extend-c.yml | 3 + .../yml/extend/find-file-test/.npmignore | 0 node_modules/shelljs/.idea/.name | 1 - node_modules/shelljs/.idea/encodings.xml | 6 - .../inspectionProfiles/Project_Default.xml | 7 - .../inspectionProfiles/profiles_settings.xml | 7 - .../shelljs/.idea/jsLibraryMappings.xml | 6 - .../.idea/libraries/shelljs_node_modules.xml | 14 - node_modules/shelljs/.idea/misc.xml | 28 - node_modules/shelljs/.idea/modules.xml | 8 - node_modules/shelljs/.idea/shelljs.iml | 9 - node_modules/shelljs/.idea/vcs.xml | 6 - node_modules/shelljs/.idea/workspace.xml | 764 - node_modules/shelljs/build/output.js | 2411 ---- node_modules/shelljs/package.json | 122 +- node_modules/slice-ansi/package.json | 121 +- node_modules/sprintf-js/package.json | 92 +- node_modules/string-width/index.js | 5 + node_modules/string-width/package.json | 123 +- node_modules/string-width/readme.md | 7 +- node_modules/string_decoder/package.json | 82 +- node_modules/strip-ansi/package.json | 129 +- node_modules/strip-json-comments/package.json | 120 +- node_modules/supports-color/package.json | 112 +- node_modules/table/dist/alignString.js | 115 +- node_modules/table/dist/alignString.js.map | 1 - node_modules/table/dist/alignTableData.js | 44 +- node_modules/table/dist/alignTableData.js.map | 1 - .../table/dist/calculateCellHeight.js | 46 +- .../table/dist/calculateCellHeight.js.map | 1 - .../table/dist/calculateCellWidthIndex.js | 20 +- .../table/dist/calculateCellWidthIndex.js.map | 1 - .../dist/calculateMaximumColumnWidthIndex.js | 46 +- .../calculateMaximumColumnWidthIndex.js.map | 1 - .../table/dist/calculateRowHeightIndex.js | 67 +- .../table/dist/calculateRowHeightIndex.js.map | 1 - node_modules/table/dist/createStream.js | 170 +- node_modules/table/dist/createStream.js.map | 1 - node_modules/table/dist/drawBorder.js | 80 +- node_modules/table/dist/drawBorder.js.map | 1 - node_modules/table/dist/drawRow.js | 9 +- node_modules/table/dist/drawRow.js.map | 1 - node_modules/table/dist/drawTable.js | 59 +- node_modules/table/dist/drawTable.js.map | 1 - .../table/dist/getBorderCharacters.js | 197 +- .../table/dist/getBorderCharacters.js.map | 1 - node_modules/table/dist/index.js | 3 +- node_modules/table/dist/index.js.map | 1 - node_modules/table/dist/makeConfig.js | 106 +- node_modules/table/dist/makeConfig.js.map | 1 - node_modules/table/dist/makeStreamConfig.js | 99 +- .../table/dist/makeStreamConfig.js.map | 1 - .../table/dist/mapDataUsingRowHeightIndex.js | 83 +- .../dist/mapDataUsingRowHeightIndex.js.map | 1 - node_modules/table/dist/padTableData.js | 30 +- node_modules/table/dist/padTableData.js.map | 1 - node_modules/table/dist/schemas/config.json | 4 +- .../table/dist/schemas/streamConfig.json | 2 + node_modules/table/dist/stringifyTableData.js | 20 +- .../table/dist/stringifyTableData.js.map | 1 - node_modules/table/dist/table.js | 21 +- node_modules/table/dist/table.js.map | 1 - node_modules/table/dist/truncateTableData.js | 30 +- .../table/dist/truncateTableData.js.map | 1 - node_modules/table/dist/validateConfig.js | 803 +- node_modules/table/dist/validateConfig.js.map | 1 - .../table/dist/validateStreamConfig.js | 789 +- .../table/dist/validateStreamConfig.js.map | 1 - node_modules/table/dist/validateTableData.js | 64 +- .../table/dist/validateTableData.js.map | 1 - node_modules/table/dist/wrapString.js | 29 +- node_modules/table/dist/wrapString.js.map | 1 - node_modules/table/dist/wrapWord.js | 53 +- node_modules/table/dist/wrapWord.js.map | 1 - .../is-fullwidth-code-point/index.js | 46 + .../is-fullwidth-code-point/license | 21 + .../is-fullwidth-code-point/package.json | 45 + .../is-fullwidth-code-point/readme.md | 39 + .../table/node_modules/string-width/index.js | 35 + .../table/node_modules/string-width/license | 21 + .../node_modules/string-width/package.json | 58 + .../table/node_modules/string-width/readme.md | 42 + node_modules/table/package.json | 110 +- node_modules/table/test/README/usage/basic.js | 25 + .../README/usage/cell_content_alignment.js | 45 + .../table/test/README/usage/column_width.js | 33 + .../table/test/README/usage/custom_border.js | 50 + .../test/README/usage/draw_horizontal_line.js | 41 + .../table/test/README/usage/expectTable.js | 13 + .../table/test/README/usage/moon_mission.js | 67 + .../test/README/usage/padding_cell_content.js | 39 + .../usage/predefined_border_templates.js | 91 + .../table/test/README/usage/streaming.js | 56 + .../test/README/usage/text_truncating.js | 32 + .../table/test/README/usage/text_wrapping.js | 67 + node_modules/table/test/alignString.js | 102 + .../table/test/calculateCellHeight.js | 44 + .../table/test/calculateCellWidthIndex.js | 20 + .../test/calculateMaximumColumnWidthIndex.js | 59 + .../table/test/calculateRowHeightIndex.js | 78 + node_modules/table/test/config.js | 43 + node_modules/table/test/configSamples.js | 153 + node_modules/table/test/createStream.js | 41 + node_modules/table/test/drawBorder.js | 71 + node_modules/table/test/makeConfig.js | 75 + .../table/test/mapDataUsingRowHeightIndex.js | 119 + node_modules/table/test/streamConfig.js | 43 + .../table/test/streamConfigSamples.js | 151 + node_modules/table/test/validateTableData.js | 65 + node_modules/table/test/wrapString.js | 45 + node_modules/table/test/wrapWord.js | 32 + node_modules/text-table/package.json | 132 +- node_modules/through/package.json | 88 +- node_modules/tryit/package.json | 73 +- node_modules/tryit/test/test.js | 37 - node_modules/tv4/LICENSE.txt | 8 - node_modules/tv4/README.md | 468 - node_modules/tv4/lang/de.js | 47 - node_modules/tv4/lang/fr.js | 55 - node_modules/tv4/lang/nb.js | 56 - node_modules/tv4/lang/pl-PL.js | 55 - node_modules/tv4/lang/pt-PT.js | 55 - node_modules/tv4/lang/sv-SE.js | 55 - node_modules/tv4/lang/zh-CN.js | 55 - node_modules/tv4/package.json | 114 - node_modules/tv4/tv4.async-jquery.js | 34 - node_modules/tv4/tv4.js | 1677 --- node_modules/type-check/package.json | 102 +- node_modules/typedarray/package.json | 108 +- node_modules/user-home/package.json | 101 +- node_modules/util-deprecate/package.json | 88 +- node_modules/util/package.json | 79 +- node_modules/wordwrap/package.json | 98 +- node_modules/wrappy/package.json | 83 +- node_modules/wrappy/test/basic.js | 51 - node_modules/write/node_modules/.bin/mkdirp | 15 + .../write/node_modules/.bin/mkdirp.cmd | 7 + node_modules/write/package.json | 88 +- node_modules/xregexp/README.md | 243 - node_modules/xregexp/package.json | 85 - node_modules/xregexp/src/addons/build.js | 189 - .../xregexp/src/addons/matchrecursive.js | 191 - .../xregexp/src/addons/unicode-base.js | 236 - .../xregexp/src/addons/unicode-blocks.js | 1074 -- .../xregexp/src/addons/unicode-categories.js | 235 - .../xregexp/src/addons/unicode-properties.js | 105 - .../xregexp/src/addons/unicode-scripts.js | 559 - node_modules/xregexp/src/index.js | 11 - node_modules/xregexp/src/xregexp.js | 1871 --- node_modules/xtend/package.json | 120 +- package.json | 4 +- yarn.lock | 851 ++ 2813 files changed, 99622 insertions(+), 66425 deletions(-) delete mode 100644 node_modules/.bin/eslint delete mode 100644 node_modules/.bin/eslint.cmd delete mode 100644 node_modules/.bin/esparse delete mode 100644 node_modules/.bin/esparse.cmd delete mode 100644 node_modules/.bin/esvalidate delete mode 100644 node_modules/.bin/esvalidate.cmd delete mode 100644 node_modules/.bin/js-yaml delete mode 100644 node_modules/.bin/js-yaml.cmd delete mode 100644 node_modules/.bin/mkdirp delete mode 100644 node_modules/.bin/mkdirp.cmd delete mode 100644 node_modules/.bin/rimraf delete mode 100644 node_modules/.bin/rimraf.cmd delete mode 100644 node_modules/.bin/shjs delete mode 100644 node_modules/.bin/shjs.cmd delete mode 100644 node_modules/.bin/strip-json-comments delete mode 100644 node_modules/.bin/strip-json-comments.cmd create mode 100644 node_modules/.yarn-integrity rename node_modules/{ => acorn-jsx/node_modules}/.bin/acorn (82%) rename node_modules/{ => acorn-jsx/node_modules}/.bin/acorn.cmd (100%) create mode 100644 node_modules/acorn-jsx/node_modules/acorn/.editorconfig create mode 100644 node_modules/acorn-jsx/node_modules/acorn/.gitattributes create mode 100644 node_modules/acorn-jsx/node_modules/acorn/.npmignore create mode 100644 node_modules/acorn-jsx/node_modules/acorn/.tern-project create mode 100644 node_modules/acorn-jsx/node_modules/acorn/.travis.yml create mode 100644 node_modules/acorn-jsx/node_modules/acorn/AUTHORS create mode 100644 node_modules/acorn-jsx/node_modules/acorn/CHANGELOG.md rename node_modules/{xregexp => acorn-jsx/node_modules/acorn}/LICENSE (92%) create mode 100644 node_modules/acorn-jsx/node_modules/acorn/README.md create mode 100644 node_modules/acorn-jsx/node_modules/acorn/bin/acorn create mode 100644 node_modules/acorn-jsx/node_modules/acorn/bin/generate-identifier-regex.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/bin/update_authors.sh rename node_modules/{acorn/src/loose/acorn_loose.js => acorn-jsx/node_modules/acorn/dist/.keep} (100%) create mode 100644 node_modules/acorn-jsx/node_modules/acorn/dist/acorn.es.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/dist/acorn.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.es.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/dist/walk.es.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/dist/walk.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/package.json create mode 100644 node_modules/acorn-jsx/node_modules/acorn/rollup/config.bin.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/rollup/config.loose.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/rollup/config.main.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/rollup/config.walk.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/bin/acorn.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/expression.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/identifier.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/index.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/location.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/locutil.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/loose/expression.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/loose/index.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/loose/parseutil.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/loose/state.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/loose/statement.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/loose/tokenize.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/lval.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/node.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/options.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/parseutil.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/state.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/statement.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/tokencontext.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/tokenize.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/tokentype.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/util.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/walk/index.js create mode 100644 node_modules/acorn-jsx/node_modules/acorn/src/whitespace.js delete mode 100644 node_modules/acorn/bin/build-acorn.js create mode 100644 node_modules/acorn/dist/acorn.es.js create mode 100644 node_modules/acorn/dist/acorn_loose.es.js create mode 100644 node_modules/acorn/dist/walk.es.js create mode 100644 node_modules/acorn/rollup/config.bin.js create mode 100644 node_modules/acorn/rollup/config.loose.js create mode 100644 node_modules/acorn/rollup/config.main.js create mode 100644 node_modules/acorn/rollup/config.walk.js create mode 100644 node_modules/ajv-keywords/.eslintrc.yml create mode 100644 node_modules/ajv-keywords/.npmignore create mode 100644 node_modules/ajv-keywords/.travis.yml rename node_modules/{lodash.tostring => ajv-keywords}/LICENSE (83%) create mode 100644 node_modules/ajv-keywords/README.md create mode 100644 node_modules/ajv-keywords/index.js create mode 100644 node_modules/ajv-keywords/keywords/index.js create mode 100644 node_modules/ajv-keywords/keywords/instanceof.js create mode 100644 node_modules/ajv-keywords/keywords/propertyNames.js create mode 100644 node_modules/ajv-keywords/keywords/range.js create mode 100644 node_modules/ajv-keywords/keywords/regexp.js create mode 100644 node_modules/ajv-keywords/keywords/typeof.js create mode 100644 node_modules/ajv-keywords/package.json create mode 100644 node_modules/ajv-keywords/spec/define_keywords.spec.js create mode 100644 node_modules/ajv-keywords/spec/instanceof.spec.js create mode 100644 node_modules/ajv-keywords/spec/propertyNames.spec.js create mode 100644 node_modules/ajv-keywords/spec/range.spec.js create mode 100644 node_modules/ajv-keywords/spec/regexp.spec.js create mode 100644 node_modules/ajv-keywords/spec/typeof.spec.js create mode 100644 node_modules/ajv/.tonic_example.js rename node_modules/{lodash.kebabcase/node_modules/lodash.deburr => ajv}/LICENSE (83%) create mode 100644 node_modules/ajv/README.md create mode 100644 node_modules/ajv/dist/ajv.bundle.js create mode 100644 node_modules/ajv/dist/ajv.min.js create mode 100644 node_modules/ajv/dist/ajv.min.js.map create mode 100644 node_modules/ajv/dist/nodent.min.js create mode 100644 node_modules/ajv/dist/nodent.min.js.map create mode 100644 node_modules/ajv/dist/regenerator.min.js create mode 100644 node_modules/ajv/lib/ajv.d.ts create mode 100644 node_modules/ajv/lib/ajv.js create mode 100644 node_modules/ajv/lib/async.js create mode 100644 node_modules/ajv/lib/cache.js create mode 100644 node_modules/ajv/lib/compile/_rules.js create mode 100644 node_modules/ajv/lib/compile/equal.js create mode 100644 node_modules/ajv/lib/compile/formats.js create mode 100644 node_modules/ajv/lib/compile/index.js create mode 100644 node_modules/ajv/lib/compile/resolve.js create mode 100644 node_modules/ajv/lib/compile/rules.js create mode 100644 node_modules/ajv/lib/compile/schema_obj.js create mode 100644 node_modules/ajv/lib/compile/ucs2length.js create mode 100644 node_modules/ajv/lib/compile/util.js create mode 100644 node_modules/ajv/lib/compile/validation_error.js create mode 100644 node_modules/ajv/lib/dot/_limit.jst create mode 100644 node_modules/ajv/lib/dot/_limitItems.jst create mode 100644 node_modules/ajv/lib/dot/_limitLength.jst create mode 100644 node_modules/ajv/lib/dot/_limitProperties.jst create mode 100644 node_modules/ajv/lib/dot/allOf.jst create mode 100644 node_modules/ajv/lib/dot/anyOf.jst create mode 100644 node_modules/ajv/lib/dot/coerce.def create mode 100644 node_modules/ajv/lib/dot/custom.jst create mode 100644 node_modules/ajv/lib/dot/defaults.def create mode 100644 node_modules/ajv/lib/dot/definitions.def create mode 100644 node_modules/ajv/lib/dot/dependencies.jst create mode 100644 node_modules/ajv/lib/dot/enum.jst create mode 100644 node_modules/ajv/lib/dot/errors.def create mode 100644 node_modules/ajv/lib/dot/format.jst create mode 100644 node_modules/ajv/lib/dot/items.jst create mode 100644 node_modules/ajv/lib/dot/missing.def create mode 100644 node_modules/ajv/lib/dot/multipleOf.jst create mode 100644 node_modules/ajv/lib/dot/not.jst create mode 100644 node_modules/ajv/lib/dot/oneOf.jst create mode 100644 node_modules/ajv/lib/dot/pattern.jst create mode 100644 node_modules/ajv/lib/dot/properties.jst create mode 100644 node_modules/ajv/lib/dot/ref.jst create mode 100644 node_modules/ajv/lib/dot/required.jst create mode 100644 node_modules/ajv/lib/dot/uniqueItems.jst create mode 100644 node_modules/ajv/lib/dot/v5/_formatLimit.jst create mode 100644 node_modules/ajv/lib/dot/v5/constant.jst create mode 100644 node_modules/ajv/lib/dot/v5/patternRequired.jst create mode 100644 node_modules/ajv/lib/dot/v5/switch.jst create mode 100644 node_modules/ajv/lib/dot/validate.jst create mode 100644 node_modules/ajv/lib/dotjs/README.md create mode 100644 node_modules/ajv/lib/dotjs/_formatLimit.js create mode 100644 node_modules/ajv/lib/dotjs/_limit.js create mode 100644 node_modules/ajv/lib/dotjs/_limitItems.js create mode 100644 node_modules/ajv/lib/dotjs/_limitLength.js create mode 100644 node_modules/ajv/lib/dotjs/_limitProperties.js create mode 100644 node_modules/ajv/lib/dotjs/allOf.js create mode 100644 node_modules/ajv/lib/dotjs/anyOf.js create mode 100644 node_modules/ajv/lib/dotjs/constant.js create mode 100644 node_modules/ajv/lib/dotjs/custom.js create mode 100644 node_modules/ajv/lib/dotjs/dependencies.js create mode 100644 node_modules/ajv/lib/dotjs/enum.js create mode 100644 node_modules/ajv/lib/dotjs/format.js create mode 100644 node_modules/ajv/lib/dotjs/items.js create mode 100644 node_modules/ajv/lib/dotjs/multipleOf.js create mode 100644 node_modules/ajv/lib/dotjs/not.js create mode 100644 node_modules/ajv/lib/dotjs/oneOf.js create mode 100644 node_modules/ajv/lib/dotjs/pattern.js create mode 100644 node_modules/ajv/lib/dotjs/patternRequired.js create mode 100644 node_modules/ajv/lib/dotjs/properties.js create mode 100644 node_modules/ajv/lib/dotjs/ref.js create mode 100644 node_modules/ajv/lib/dotjs/required.js create mode 100644 node_modules/ajv/lib/dotjs/switch.js create mode 100644 node_modules/ajv/lib/dotjs/uniqueItems.js create mode 100644 node_modules/ajv/lib/dotjs/validate.js create mode 100644 node_modules/ajv/lib/keyword.js create mode 100644 node_modules/ajv/lib/refs/json-schema-draft-04.json create mode 100644 node_modules/ajv/lib/refs/json-schema-v5.json create mode 100644 node_modules/ajv/lib/v5.js create mode 100644 node_modules/ajv/package.json create mode 100644 node_modules/array-union/license create mode 100644 node_modules/array-uniq/license delete mode 100644 node_modules/bluebird/README.md delete mode 100644 node_modules/bluebird/changelog.md delete mode 100644 node_modules/bluebird/js/browser/bluebird.core.js delete mode 100644 node_modules/bluebird/js/browser/bluebird.core.min.js delete mode 100644 node_modules/bluebird/js/browser/bluebird.js delete mode 100644 node_modules/bluebird/js/browser/bluebird.min.js delete mode 100644 node_modules/bluebird/js/release/any.js delete mode 100644 node_modules/bluebird/js/release/assert.js delete mode 100644 node_modules/bluebird/js/release/async.js delete mode 100644 node_modules/bluebird/js/release/bind.js delete mode 100644 node_modules/bluebird/js/release/bluebird.js delete mode 100644 node_modules/bluebird/js/release/call_get.js delete mode 100644 node_modules/bluebird/js/release/cancel.js delete mode 100644 node_modules/bluebird/js/release/catch_filter.js delete mode 100644 node_modules/bluebird/js/release/context.js delete mode 100644 node_modules/bluebird/js/release/debuggability.js delete mode 100644 node_modules/bluebird/js/release/direct_resolve.js delete mode 100644 node_modules/bluebird/js/release/each.js delete mode 100644 node_modules/bluebird/js/release/errors.js delete mode 100644 node_modules/bluebird/js/release/es5.js delete mode 100644 node_modules/bluebird/js/release/filter.js delete mode 100644 node_modules/bluebird/js/release/finally.js delete mode 100644 node_modules/bluebird/js/release/generators.js delete mode 100644 node_modules/bluebird/js/release/join.js delete mode 100644 node_modules/bluebird/js/release/map.js delete mode 100644 node_modules/bluebird/js/release/method.js delete mode 100644 node_modules/bluebird/js/release/nodeback.js delete mode 100644 node_modules/bluebird/js/release/nodeify.js delete mode 100644 node_modules/bluebird/js/release/promise.js delete mode 100644 node_modules/bluebird/js/release/promise_array.js delete mode 100644 node_modules/bluebird/js/release/promisify.js delete mode 100644 node_modules/bluebird/js/release/props.js delete mode 100644 node_modules/bluebird/js/release/queue.js delete mode 100644 node_modules/bluebird/js/release/race.js delete mode 100644 node_modules/bluebird/js/release/reduce.js delete mode 100644 node_modules/bluebird/js/release/schedule.js delete mode 100644 node_modules/bluebird/js/release/settle.js delete mode 100644 node_modules/bluebird/js/release/some.js delete mode 100644 node_modules/bluebird/js/release/synchronous_inspection.js delete mode 100644 node_modules/bluebird/js/release/thenables.js delete mode 100644 node_modules/bluebird/js/release/timers.js delete mode 100644 node_modules/bluebird/js/release/using.js delete mode 100644 node_modules/bluebird/js/release/util.js delete mode 100644 node_modules/bluebird/package.json delete mode 100644 node_modules/brace-expansion/.npmignore delete mode 100644 node_modules/brace-expansion/example.js create mode 100644 node_modules/circular-json/.npmignore create mode 100644 node_modules/circular-json/.travis.yml rename node_modules/{bluebird/LICENSE => circular-json/LICENSE.txt} (87%) create mode 100644 node_modules/circular-json/README.md create mode 100644 node_modules/circular-json/build/circular-json.js create mode 100644 node_modules/circular-json/build/circular-json.max.js create mode 100644 node_modules/circular-json/build/circular-json.node.js create mode 100644 node_modules/circular-json/package.json create mode 100644 node_modules/circular-json/template/license.after create mode 100644 node_modules/circular-json/template/license.before create mode 100644 node_modules/co/History.md create mode 100644 node_modules/co/LICENSE create mode 100644 node_modules/co/Readme.md create mode 100644 node_modules/co/index.js create mode 100644 node_modules/co/package.json rename node_modules/debug/{History.md => CHANGELOG.md} (74%) create mode 100644 node_modules/debug/LICENSE create mode 100644 node_modules/debug/index.js create mode 100644 node_modules/del/node_modules/.bin/rimraf create mode 100644 node_modules/del/node_modules/.bin/rimraf.cmd delete mode 100644 node_modules/doctrine/node_modules/esutils/LICENSE.BSD delete mode 100644 node_modules/doctrine/node_modules/esutils/README.md delete mode 100644 node_modules/doctrine/node_modules/esutils/lib/ast.js delete mode 100644 node_modules/doctrine/node_modules/esutils/lib/code.js delete mode 100644 node_modules/doctrine/node_modules/esutils/lib/keyword.js delete mode 100644 node_modules/doctrine/node_modules/esutils/lib/utils.js delete mode 100644 node_modules/doctrine/node_modules/esutils/package.json create mode 100644 node_modules/eslint/conf/eslint-all.js create mode 100644 node_modules/eslint/lib/rules/max-lines.js create mode 100644 node_modules/eslint/lib/rules/no-mixed-operators.js create mode 100644 node_modules/eslint/lib/rules/no-prototype-builtins.js create mode 100644 node_modules/eslint/lib/rules/no-useless-rename.js create mode 100644 node_modules/eslint/lib/rules/object-curly-newline.js create mode 100644 node_modules/eslint/lib/rules/object-property-newline.js create mode 100644 node_modules/eslint/lib/rules/rest-spread-spacing.js create mode 100644 node_modules/eslint/lib/rules/unicode-bom.js create mode 100644 node_modules/eslint/node_modules/.bin/js-yaml create mode 100644 node_modules/eslint/node_modules/.bin/js-yaml.cmd create mode 100644 node_modules/eslint/node_modules/.bin/mkdirp create mode 100644 node_modules/eslint/node_modules/.bin/mkdirp.cmd create mode 100644 node_modules/eslint/node_modules/.bin/shjs create mode 100644 node_modules/eslint/node_modules/.bin/shjs.cmd create mode 100644 node_modules/eslint/node_modules/.bin/strip-json-comments create mode 100644 node_modules/eslint/node_modules/.bin/strip-json-comments.cmd create mode 100644 node_modules/espree/node_modules/.bin/acorn create mode 100644 node_modules/espree/node_modules/.bin/acorn.cmd create mode 100644 node_modules/flat-cache/utils.js rename node_modules/{tryit => front-matter}/.npmignore (56%) create mode 100644 node_modules/front-matter/.travis.yml create mode 100644 node_modules/front-matter/.zuul.yml create mode 100644 node_modules/front-matter/LICENSE create mode 100644 node_modules/front-matter/Makefile create mode 100644 node_modules/front-matter/README.md create mode 100644 node_modules/front-matter/examples/bom.md create mode 100644 node_modules/front-matter/examples/complex-yaml.md create mode 100644 node_modules/front-matter/examples/dashes-seperator.md create mode 100644 node_modules/front-matter/examples/dots-ending.md create mode 100644 node_modules/front-matter/examples/missing-body.md create mode 100644 node_modules/front-matter/examples/no-front-matter.md create mode 100644 node_modules/front-matter/examples/wrapped-text.md create mode 100644 node_modules/front-matter/examples/yaml-seperator.md create mode 100644 node_modules/front-matter/index.js create mode 100644 node_modules/front-matter/node_modules/.bin/js-yaml create mode 100644 node_modules/front-matter/node_modules/.bin/js-yaml.cmd create mode 100644 node_modules/front-matter/notes.md create mode 100644 node_modules/front-matter/package.json create mode 100644 node_modules/front-matter/test/index.js create mode 100644 node_modules/fs-extra/lib/remove/rimraf.js create mode 100644 node_modules/fs-extra/lib/walk-sync/index.js create mode 100644 node_modules/fs.realpath/LICENSE create mode 100644 node_modules/fs.realpath/README.md create mode 100644 node_modules/fs.realpath/index.js create mode 100644 node_modules/fs.realpath/old.js create mode 100644 node_modules/fs.realpath/package.json delete mode 100644 node_modules/globby/node_modules/glob/LICENSE delete mode 100644 node_modules/globby/node_modules/glob/README.md delete mode 100644 node_modules/globby/node_modules/glob/common.js delete mode 100644 node_modules/globby/node_modules/glob/glob.js delete mode 100644 node_modules/globby/node_modules/glob/package.json delete mode 100644 node_modules/globby/node_modules/glob/sync.js create mode 100644 node_modules/globule/LICENSE create mode 100644 node_modules/globule/README.md create mode 100644 node_modules/globule/lib/globule.js rename node_modules/{lodash/package => globule/node_modules/lodash}/LICENSE (96%) create mode 100644 node_modules/globule/node_modules/lodash/README.md rename node_modules/{lodash/package => globule/node_modules/lodash}/_DataView.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_Hash.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_LazyWrapper.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_ListCache.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_LodashWrapper.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_Map.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_MapCache.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_Promise.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_Set.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_SetCache.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_Stack.js (62%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_Symbol.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_Uint8Array.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_WeakMap.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_addMapEntry.js (78%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_addSetEntry.js (80%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_apply.js (93%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_arrayAggregator.js (85%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_arrayEach.js (81%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_arrayEachRight.js (80%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_arrayEvery.js (82%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_arrayFilter.js (83%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_arrayIncludes.js (70%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_arrayIncludesWith.js (84%) create mode 100644 node_modules/globule/node_modules/lodash/_arrayLikeKeys.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_arrayMap.js (81%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_arrayPush.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_arrayReduce.js (87%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_arrayReduceRight.js (86%) create mode 100644 node_modules/globule/node_modules/lodash/_arraySample.js create mode 100644 node_modules/globule/node_modules/lodash/_arraySampleSize.js create mode 100644 node_modules/globule/node_modules/lodash/_arrayShuffle.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_arraySome.js (82%) create mode 100644 node_modules/globule/node_modules/lodash/_asciiSize.js create mode 100644 node_modules/globule/node_modules/lodash/_asciiToArray.js create mode 100644 node_modules/globule/node_modules/lodash/_asciiWords.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_assignInDefaults.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_assignMergeValue.js (70%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_assignValue.js (83%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_assocIndexOf.js (90%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseAggregator.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseAssign.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_baseAssignValue.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseAt.js (68%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseClamp.js (96%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseClone.js (94%) create mode 100644 node_modules/globule/node_modules/lodash/_baseConforms.js create mode 100644 node_modules/globule/node_modules/lodash/_baseConformsTo.js create mode 100644 node_modules/globule/node_modules/lodash/_baseCreate.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseDelay.js (70%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseDifference.js (96%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseEach.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseEachRight.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseEvery.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseExtremum.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseFill.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseFilter.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseFindIndex.js (72%) create mode 100644 node_modules/globule/node_modules/lodash/_baseFindKey.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseFlatten.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseFor.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseForOwn.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseForOwnRight.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseForRight.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseFunctions.js (87%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseGet.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseGetAllKeys.js (88%) create mode 100644 node_modules/globule/node_modules/lodash/_baseGetTag.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseGt.js (95%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseHas.js (52%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseHasIn.js (73%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseInRange.js (96%) create mode 100644 node_modules/globule/node_modules/lodash/_baseIndexOf.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseIndexOfWith.js (93%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseIntersection.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseInverter.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseInvoke.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_baseIsArguments.js create mode 100644 node_modules/globule/node_modules/lodash/_baseIsArrayBuffer.js create mode 100644 node_modules/globule/node_modules/lodash/_baseIsDate.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseIsEqual.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseIsEqualDeep.js (91%) create mode 100644 node_modules/globule/node_modules/lodash/_baseIsMap.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseIsMatch.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_baseIsNaN.js rename node_modules/{lodash/package/isNative.js => globule/node_modules/lodash/_baseIsNative.js} (62%) create mode 100644 node_modules/globule/node_modules/lodash/_baseIsRegExp.js create mode 100644 node_modules/globule/node_modules/lodash/_baseIsSet.js rename node_modules/{lodash/package/isTypedArray.js => globule/node_modules/lodash/_baseIsTypedArray.js} (71%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseIteratee.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_baseKeys.js create mode 100644 node_modules/globule/node_modules/lodash/_baseKeysIn.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseLodash.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseLt.js (95%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseMap.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseMatches.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseMatchesProperty.js (95%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseMean.js (91%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseMerge.js (77%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseMergeDeep.js (77%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseNth.js (84%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseOrderBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_basePick.js (65%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_basePickBy.js (70%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseProperty.js (83%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_basePropertyDeep.js (85%) create mode 100644 node_modules/globule/node_modules/lodash/_basePropertyOf.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_basePullAll.js (90%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_basePullAt.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseRandom.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseRange.js (90%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseReduce.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseRepeat.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_baseRest.js create mode 100644 node_modules/globule/node_modules/lodash/_baseSample.js create mode 100644 node_modules/globule/node_modules/lodash/_baseSampleSize.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseSet.js (63%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseSetData.js (96%) create mode 100644 node_modules/globule/node_modules/lodash/_baseSetToString.js create mode 100644 node_modules/globule/node_modules/lodash/_baseShuffle.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseSlice.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseSome.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseSortBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseSortedIndex.js (96%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseSortedIndexBy.js (97%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseSortedUniq.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseSum.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseTimes.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseToNumber.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseToPairs.js (88%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseToString.js (80%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseUnary.js (78%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseUniq.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseUnset.js (65%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseUpdate.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseValues.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseWhile.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseWrapperValue.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseXor.js (51%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_baseZipObject.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_cacheHas.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_castArrayLikeObject.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_castFunction.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_castPath.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_castRest.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_castSlice.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_charsEndIndex.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_charsStartIndex.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_cloneArrayBuffer.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_cloneBuffer.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_cloneDataView.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_cloneMap.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_cloneRegExp.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_cloneSet.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_cloneSymbol.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_cloneTypedArray.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_compareAscending.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_compareMultiple.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_composeArgs.js (95%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_composeArgsRight.js (96%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_copyArray.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_copyObject.js (68%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_copySymbols.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_coreJsData.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_countHolders.js (96%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_createAggregator.js (90%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_createAssigner.js (79%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_createBaseEach.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_createBaseFor.js (100%) rename node_modules/{lodash/_createBaseWrapper.js => globule/node_modules/lodash/_createBind.js} (62%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_createCaseFirst.js (80%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_createCompounder.js (100%) rename node_modules/{lodash/package/_createCtorWrapper.js => globule/node_modules/lodash/_createCtor.js} (90%) rename node_modules/{lodash/_createCurryWrapper.js => globule/node_modules/lodash/_createCurry.js} (60%) create mode 100644 node_modules/globule/node_modules/lodash/_createFind.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_createFlow.js (87%) rename node_modules/{lodash/package/_createHybridWrapper.js => globule/node_modules/lodash/_createHybrid.js} (75%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_createInverter.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_createMathOperation.js (85%) create mode 100644 node_modules/globule/node_modules/lodash/_createOver.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_createPadding.js (91%) rename node_modules/{lodash/package/_createPartialWrapper.js => globule/node_modules/lodash/_createPartial.js} (75%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_createRange.js (76%) rename node_modules/{lodash/_createRecurryWrapper.js => globule/node_modules/lodash/_createRecurry.js} (79%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_createRelationalOperation.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_createRound.js (84%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_createSet.js (92%) create mode 100644 node_modules/globule/node_modules/lodash/_createToPairs.js rename node_modules/{lodash/_createWrapper.js => globule/node_modules/lodash/_createWrap.js} (78%) create mode 100644 node_modules/globule/node_modules/lodash/_deburrLetter.js create mode 100644 node_modules/globule/node_modules/lodash/_defineProperty.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_equalArrays.js (75%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_equalByTag.js (88%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_equalObjects.js (87%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_escapeHtmlChar.js (75%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_escapeStringChar.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_flatRest.js create mode 100644 node_modules/globule/node_modules/lodash/_freeGlobal.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_getAllKeys.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_getAllKeysIn.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_getData.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_getFuncName.js (100%) rename node_modules/{lodash/_getPlaceholder.js => globule/node_modules/lodash/_getHolder.js} (77%) create mode 100644 node_modules/globule/node_modules/lodash/_getMapData.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_getMatchData.js (68%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_getNative.js (64%) create mode 100644 node_modules/globule/node_modules/lodash/_getPrototype.js create mode 100644 node_modules/globule/node_modules/lodash/_getRawTag.js create mode 100644 node_modules/globule/node_modules/lodash/_getSymbols.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_getSymbolsIn.js (61%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_getTag.js (74%) create mode 100644 node_modules/globule/node_modules/lodash/_getValue.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_getView.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_getWrapDetails.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_hasPath.js (80%) rename node_modules/{lodash/package/_reHasComplexSymbol.js => globule/node_modules/lodash/_hasUnicode.js} (52%) create mode 100644 node_modules/globule/node_modules/lodash/_hasUnicodeWord.js create mode 100644 node_modules/globule/node_modules/lodash/_hashClear.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_hashDelete.js (62%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_hashGet.js (77%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_hashHas.js (73%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_hashSet.js (57%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_initCloneArray.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_initCloneByTag.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_initCloneObject.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_insertWrapDetails.js create mode 100644 node_modules/globule/node_modules/lodash/_isFlattenable.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_isIndex.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_isIterateeCall.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_isKey.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_isKeyable.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_isLaziable.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_isMaskable.js create mode 100644 node_modules/globule/node_modules/lodash/_isMasked.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_isPrototype.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_isStrictComparable.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_iteratorToArray.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_lazyClone.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_lazyReverse.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_lazyValue.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_listCacheClear.js rename node_modules/{lodash/package/_assocDelete.js => globule/node_modules/lodash/_listCacheDelete.js} (58%) create mode 100644 node_modules/globule/node_modules/lodash/_listCacheGet.js rename node_modules/{lodash/package/_assocHas.js => globule/node_modules/lodash/_listCacheHas.js} (50%) create mode 100644 node_modules/globule/node_modules/lodash/_listCacheSet.js rename node_modules/{lodash/_mapClear.js => globule/node_modules/lodash/_mapCacheClear.js} (61%) create mode 100644 node_modules/globule/node_modules/lodash/_mapCacheDelete.js create mode 100644 node_modules/globule/node_modules/lodash/_mapCacheGet.js create mode 100644 node_modules/globule/node_modules/lodash/_mapCacheHas.js create mode 100644 node_modules/globule/node_modules/lodash/_mapCacheSet.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_mapToArray.js (74%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_matchesStrictComparable.js (90%) create mode 100644 node_modules/globule/node_modules/lodash/_memoizeCapped.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_mergeData.js (98%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_mergeDefaults.js (84%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_metaMap.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_nativeCreate.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_nativeKeys.js create mode 100644 node_modules/globule/node_modules/lodash/_nativeKeysIn.js create mode 100644 node_modules/globule/node_modules/lodash/_nodeUtil.js create mode 100644 node_modules/globule/node_modules/lodash/_objectToString.js create mode 100644 node_modules/globule/node_modules/lodash/_overArg.js create mode 100644 node_modules/globule/node_modules/lodash/_overRest.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_parent.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_reEscape.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_reEvaluate.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_reInterpolate.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_realNames.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_reorder.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_replaceHolders.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/_root.js create mode 100644 node_modules/globule/node_modules/lodash/_setCacheAdd.js create mode 100644 node_modules/globule/node_modules/lodash/_setCacheHas.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_setData.js (51%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_setToArray.js (75%) create mode 100644 node_modules/globule/node_modules/lodash/_setToPairs.js create mode 100644 node_modules/globule/node_modules/lodash/_setToString.js create mode 100644 node_modules/globule/node_modules/lodash/_setWrapToString.js create mode 100644 node_modules/globule/node_modules/lodash/_shortOut.js create mode 100644 node_modules/globule/node_modules/lodash/_shuffleSelf.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_stackClear.js (63%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_stackDelete.js (70%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_stackGet.js (60%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_stackHas.js (65%) create mode 100644 node_modules/globule/node_modules/lodash/_stackSet.js rename node_modules/{lodash/package/_baseIndexOf.js => globule/node_modules/lodash/_strictIndexOf.js} (53%) create mode 100644 node_modules/globule/node_modules/lodash/_strictLastIndexOf.js create mode 100644 node_modules/globule/node_modules/lodash/_stringSize.js create mode 100644 node_modules/globule/node_modules/lodash/_stringToArray.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_stringToPath.js (55%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_toKey.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_toSource.js (69%) rename node_modules/{lodash/package => globule/node_modules/lodash}/_unescapeHtmlChar.js (75%) rename node_modules/{lodash/package/_stringSize.js => globule/node_modules/lodash/_unicodeSize.js} (71%) rename node_modules/{lodash/package/_stringToArray.js => globule/node_modules/lodash/_unicodeToArray.js} (84%) rename node_modules/{lodash/package/words.js => globule/node_modules/lodash/_unicodeWords.js} (55%) create mode 100644 node_modules/globule/node_modules/lodash/_updateWrapDetails.js rename node_modules/{lodash/package => globule/node_modules/lodash}/_wrapperClone.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/add.js (98%) rename node_modules/{lodash/package => globule/node_modules/lodash}/after.js (94%) rename node_modules/{lodash/package => globule/node_modules/lodash}/array.js (98%) rename node_modules/{lodash/package => globule/node_modules/lodash}/ary.js (71%) rename node_modules/{lodash/package => globule/node_modules/lodash}/assign.js (74%) create mode 100644 node_modules/globule/node_modules/lodash/assignIn.js rename node_modules/{lodash/package => globule/node_modules/lodash}/assignInWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/assignWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/at.js (61%) rename node_modules/{lodash/package => globule/node_modules/lodash}/attempt.js (87%) rename node_modules/{lodash/package => globule/node_modules/lodash}/before.js (89%) rename node_modules/{lodash/package => globule/node_modules/lodash}/bind.js (67%) rename node_modules/{lodash/package => globule/node_modules/lodash}/bindAll.js (68%) rename node_modules/{lodash/package => globule/node_modules/lodash}/bindKey.js (79%) rename node_modules/{lodash/package => globule/node_modules/lodash}/camelCase.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/capitalize.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/castArray.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/ceil.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/chain.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/chunk.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/clamp.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/clone.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/cloneDeep.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/cloneDeepWith.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/cloneWith.js (93%) rename node_modules/{lodash/package => globule/node_modules/lodash}/collection.js (97%) rename node_modules/{lodash/package => globule/node_modules/lodash}/commit.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/compact.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/concat.js (59%) rename node_modules/{lodash/package => globule/node_modules/lodash}/cond.js (82%) rename node_modules/{lodash/package => globule/node_modules/lodash}/conforms.js (63%) create mode 100644 node_modules/globule/node_modules/lodash/conformsTo.js rename node_modules/{lodash/package => globule/node_modules/lodash}/constant.js (59%) rename node_modules/{lodash/package => globule/node_modules/lodash}/core.js (81%) create mode 100644 node_modules/globule/node_modules/lodash/core.min.js rename node_modules/{lodash/package => globule/node_modules/lodash}/countBy.js (73%) rename node_modules/{lodash/package => globule/node_modules/lodash}/create.js (93%) rename node_modules/{lodash/package => globule/node_modules/lodash}/curry.js (87%) rename node_modules/{lodash/package => globule/node_modules/lodash}/curryRight.js (85%) rename node_modules/{lodash/package => globule/node_modules/lodash}/date.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/debounce.js (87%) rename node_modules/{lodash/package => globule/node_modules/lodash}/deburr.js (70%) create mode 100644 node_modules/globule/node_modules/lodash/defaultTo.js rename node_modules/{lodash/package => globule/node_modules/lodash}/defaults.js (82%) rename node_modules/{lodash/package => globule/node_modules/lodash}/defaultsDeep.js (69%) rename node_modules/{lodash/package => globule/node_modules/lodash}/defer.js (81%) rename node_modules/{lodash/package => globule/node_modules/lodash}/delay.js (88%) create mode 100644 node_modules/globule/node_modules/lodash/difference.js rename node_modules/{lodash/package => globule/node_modules/lodash}/differenceBy.js (64%) rename node_modules/{lodash/package => globule/node_modules/lodash}/differenceWith.js (75%) rename node_modules/{lodash/package => globule/node_modules/lodash}/divide.js (98%) rename node_modules/{lodash/package => globule/node_modules/lodash}/drop.js (94%) rename node_modules/{lodash/package => globule/node_modules/lodash}/dropRight.js (94%) rename node_modules/{lodash/package => globule/node_modules/lodash}/dropRightWhile.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/dropWhile.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/each.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/eachRight.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/endsWith.js (86%) rename node_modules/{lodash/package => globule/node_modules/lodash}/entries.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/entriesIn.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/eq.js (83%) rename node_modules/{lodash/package => globule/node_modules/lodash}/escape.js (72%) rename node_modules/{lodash/package => globule/node_modules/lodash}/escapeRegExp.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/every.js (83%) rename node_modules/{lodash/package => globule/node_modules/lodash}/extend.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/extendWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fill.js (95%) rename node_modules/{lodash/package => globule/node_modules/lodash}/filter.js (90%) rename node_modules/{lodash/package => globule/node_modules/lodash}/find.js (60%) rename node_modules/{lodash/package => globule/node_modules/lodash}/findIndex.js (56%) rename node_modules/{lodash/package => globule/node_modules/lodash}/findKey.js (80%) create mode 100644 node_modules/globule/node_modules/lodash/findLast.js rename node_modules/{lodash/package => globule/node_modules/lodash}/findLastIndex.js (52%) rename node_modules/{lodash/package => globule/node_modules/lodash}/findLastKey.js (80%) rename node_modules/{lodash/package/fp => globule/node_modules/lodash}/first.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/flatMap.js (87%) rename node_modules/{lodash/package => globule/node_modules/lodash}/flatMapDeep.js (87%) rename node_modules/{lodash/package => globule/node_modules/lodash}/flatMapDepth.js (88%) rename node_modules/{lodash/package => globule/node_modules/lodash}/flatten.js (89%) rename node_modules/{lodash/package => globule/node_modules/lodash}/flattenDeep.js (91%) rename node_modules/{lodash/package => globule/node_modules/lodash}/flattenDepth.js (93%) rename node_modules/{lodash/package => globule/node_modules/lodash}/flip.js (69%) rename node_modules/{lodash/package => globule/node_modules/lodash}/floor.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/flow.js (74%) rename node_modules/{lodash/package => globule/node_modules/lodash}/flowRight.js (69%) rename node_modules/{lodash/package => globule/node_modules/lodash}/forEach.js (82%) rename node_modules/{lodash/package => globule/node_modules/lodash}/forEachRight.js (78%) rename node_modules/{lodash/package => globule/node_modules/lodash}/forIn.js (90%) rename node_modules/{lodash/package => globule/node_modules/lodash}/forInRight.js (88%) rename node_modules/{lodash/package => globule/node_modules/lodash}/forOwn.js (88%) rename node_modules/{lodash/package => globule/node_modules/lodash}/forOwnRight.js (87%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/F.js create mode 100644 node_modules/globule/node_modules/lodash/fp/T.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/__.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/_baseConvert.js (72%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/_convertBrowser.js (88%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/_falseOptions.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/_mapping.js (56%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/_util.js (91%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/add.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/after.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/all.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/allPass.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/always.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/any.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/anyPass.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/apply.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/array.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/ary.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/assign.js (100%) rename node_modules/{lodash/package/fp/matches.js => globule/node_modules/lodash/fp/assignAll.js} (56%) create mode 100644 node_modules/globule/node_modules/lodash/fp/assignAllWith.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/assignIn.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/assignInAll.js create mode 100644 node_modules/globule/node_modules/lodash/fp/assignInAllWith.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/assignInWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/assignWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/assoc.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/assocPath.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/at.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/attempt.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/before.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/bind.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/bindAll.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/bindKey.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/camelCase.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/capitalize.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/castArray.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/ceil.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/chain.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/chunk.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/clamp.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/clone.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/cloneDeep.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/cloneDeepWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/cloneWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/collection.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/commit.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/compact.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/complement.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/compose.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/concat.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/cond.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/conforms.js create mode 100644 node_modules/globule/node_modules/lodash/fp/conformsTo.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/constant.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/contains.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/convert.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/countBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/create.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/curry.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/curryN.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/curryRight.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/curryRightN.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/date.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/debounce.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/deburr.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/defaultTo.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/defaults.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/defaultsAll.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/defaultsDeep.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/defaultsDeepAll.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/defer.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/delay.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/difference.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/differenceBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/differenceWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/dissoc.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/dissocPath.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/divide.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/drop.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/dropLast.js create mode 100644 node_modules/globule/node_modules/lodash/fp/dropLastWhile.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/dropRight.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/dropRightWhile.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/dropWhile.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/each.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/eachRight.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/endsWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/entries.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/entriesIn.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/eq.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/equals.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/escape.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/escapeRegExp.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/every.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/extend.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/extendAll.js create mode 100644 node_modules/globule/node_modules/lodash/fp/extendAllWith.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/extendWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/fill.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/filter.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/find.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/findFrom.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/findIndex.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/findIndexFrom.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/findKey.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/findLast.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/findLastFrom.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/findLastIndex.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/findLastIndexFrom.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/findLastKey.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/first.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/flatMap.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/flatMapDeep.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/flatMapDepth.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/flatten.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/flattenDeep.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/flattenDepth.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/flip.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/floor.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/flow.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/flowRight.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/forEach.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/forEachRight.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/forIn.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/forInRight.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/forOwn.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/forOwnRight.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/fromPairs.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/function.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/functions.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/functionsIn.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/get.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/getOr.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/groupBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/gt.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/gte.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/has.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/hasIn.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/head.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/identical.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/identity.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/inRange.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/includes.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/includesFrom.js create mode 100644 node_modules/globule/node_modules/lodash/fp/indexBy.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/indexOf.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/indexOfFrom.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/init.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/initial.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/intersection.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/intersectionBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/intersectionWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/invert.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/invertBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/invertObj.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/invoke.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/invokeArgs.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/invokeArgsMap.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/invokeMap.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isArguments.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isArray.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isArrayBuffer.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isArrayLike.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isArrayLikeObject.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isBoolean.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isBuffer.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isDate.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isElement.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isEmpty.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isEqual.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isEqualWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isError.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isFinite.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isFunction.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isInteger.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isLength.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isMap.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isMatch.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isMatchWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isNaN.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isNative.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isNil.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isNull.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isNumber.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isObject.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isObjectLike.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isPlainObject.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isRegExp.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isSafeInteger.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isSet.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isString.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isSymbol.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isTypedArray.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isUndefined.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isWeakMap.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/isWeakSet.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/iteratee.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/join.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/juxt.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/kebabCase.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/keyBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/keys.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/keysIn.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/lang.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/last.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/lastIndexOf.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/lastIndexOfFrom.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/lowerCase.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/lowerFirst.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/lt.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/lte.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/map.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/mapKeys.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/mapValues.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/matches.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/matchesProperty.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/math.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/max.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/maxBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/mean.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/meanBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/memoize.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/merge.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/mergeAll.js create mode 100644 node_modules/globule/node_modules/lodash/fp/mergeAllWith.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/mergeWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/method.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/methodOf.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/min.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/minBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/mixin.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/multiply.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/nAry.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/negate.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/next.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/noop.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/now.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/nth.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/nthArg.js (56%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/number.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/object.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/omit.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/omitAll.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/omitBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/once.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/orderBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/over.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/overArgs.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/overEvery.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/overSome.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/pad.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/padChars.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/padCharsEnd.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/padCharsStart.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/padEnd.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/padStart.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/parseInt.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/partial.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/partialRight.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/partition.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/path.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/pathEq.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/pathOr.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/paths.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/pick.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/pickAll.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/pickBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/pipe.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/placeholder.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/plant.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/pluck.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/prop.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/propEq.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/propOr.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/property.js create mode 100644 node_modules/globule/node_modules/lodash/fp/propertyOf.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/props.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/pull.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/pullAll.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/pullAllBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/pullAllWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/pullAt.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/random.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/range.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/rangeRight.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/rangeStep.js create mode 100644 node_modules/globule/node_modules/lodash/fp/rangeStepRight.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/rearg.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/reduce.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/reduceRight.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/reject.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/remove.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/repeat.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/replace.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/rest.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/restFrom.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/result.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/reverse.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/round.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/sample.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/sampleSize.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/seq.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/set.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/setWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/shuffle.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/size.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/slice.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/snakeCase.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/some.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/sortBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/sortedIndex.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/sortedIndexBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/sortedIndexOf.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/sortedLastIndex.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/sortedLastIndexBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/sortedLastIndexOf.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/sortedUniq.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/sortedUniqBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/split.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/spread.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/spreadFrom.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/startCase.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/startsWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/string.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/stubArray.js create mode 100644 node_modules/globule/node_modules/lodash/fp/stubFalse.js rename node_modules/{lodash/package/fp/propertyOf.js => globule/node_modules/lodash/fp/stubObject.js} (66%) create mode 100644 node_modules/globule/node_modules/lodash/fp/stubString.js rename node_modules/{lodash/package/fp/property.js => globule/node_modules/lodash/fp/stubTrue.js} (66%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/subtract.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/sum.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/sumBy.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/symmetricDifference.js create mode 100644 node_modules/globule/node_modules/lodash/fp/symmetricDifferenceBy.js create mode 100644 node_modules/globule/node_modules/lodash/fp/symmetricDifferenceWith.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/tail.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/take.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/takeLast.js create mode 100644 node_modules/globule/node_modules/lodash/fp/takeLastWhile.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/takeRight.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/takeRightWhile.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/takeWhile.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/tap.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/template.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/templateSettings.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/throttle.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/thru.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/times.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/toArray.js (100%) rename node_modules/{lodash/package/fp/conforms.js => globule/node_modules/lodash/fp/toFinite.js} (66%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/toInteger.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/toIterator.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/toJSON.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/toLength.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/toLower.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/toNumber.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/toPairs.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/toPairsIn.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/toPath.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/toPlainObject.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/toSafeInteger.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/toString.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/toUpper.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/transform.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/trim.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/trimChars.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/trimCharsEnd.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/trimCharsStart.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/trimEnd.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/trimStart.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/truncate.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/unapply.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/unary.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/unescape.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/union.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/unionBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/unionWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/uniq.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/uniqBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/uniqWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/uniqueId.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/unnest.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/unset.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/unzip.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/unzipWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/update.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/updateWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/upperCase.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/upperFirst.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/useWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/util.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/value.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/valueOf.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/values.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/valuesIn.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/where.js create mode 100644 node_modules/globule/node_modules/lodash/fp/whereEq.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/without.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/words.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/wrap.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/wrapperAt.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/wrapperChain.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/wrapperLodash.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/wrapperReverse.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/wrapperValue.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/xor.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/xorBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/xorWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/zip.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/fp/zipAll.js rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/zipObj.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/zipObject.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/zipObjectDeep.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fp/zipWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/fromPairs.js (79%) rename node_modules/{lodash/package => globule/node_modules/lodash}/function.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/functions.js (91%) rename node_modules/{lodash/package => globule/node_modules/lodash}/functionsIn.js (91%) rename node_modules/{lodash/package => globule/node_modules/lodash}/get.js (93%) rename node_modules/{lodash/package => globule/node_modules/lodash}/groupBy.js (83%) rename node_modules/{lodash/package => globule/node_modules/lodash}/gt.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/gte.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/has.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/hasIn.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/head.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/identity.js (64%) rename node_modules/{lodash/package => globule/node_modules/lodash}/inRange.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/includes.js (87%) rename node_modules/{lodash/package => globule/node_modules/lodash}/index.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/indexOf.js (77%) rename node_modules/{lodash/package => globule/node_modules/lodash}/initial.js (70%) rename node_modules/{lodash/package => globule/node_modules/lodash}/intersection.js (66%) rename node_modules/{lodash/package => globule/node_modules/lodash}/intersectionBy.js (67%) rename node_modules/{lodash/package => globule/node_modules/lodash}/intersectionWith.js (70%) rename node_modules/{lodash/package => globule/node_modules/lodash}/invert.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/invertBy.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/invoke.js (88%) rename node_modules/{lodash/package => globule/node_modules/lodash}/invokeMap.js (83%) create mode 100644 node_modules/globule/node_modules/lodash/isArguments.js rename node_modules/{lodash/package => globule/node_modules/lodash}/isArray.js (78%) create mode 100644 node_modules/globule/node_modules/lodash/isArrayBuffer.js rename node_modules/{lodash/package => globule/node_modules/lodash}/isArrayLike.js (81%) rename node_modules/{lodash/package => globule/node_modules/lodash}/isArrayLikeObject.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/isBoolean.js create mode 100644 node_modules/globule/node_modules/lodash/isBuffer.js create mode 100644 node_modules/globule/node_modules/lodash/isDate.js rename node_modules/{lodash/package => globule/node_modules/lodash}/isElement.js (81%) rename node_modules/{lodash/package => globule/node_modules/lodash}/isEmpty.js (65%) rename node_modules/{lodash/package => globule/node_modules/lodash}/isEqual.js (90%) rename node_modules/{lodash/package => globule/node_modules/lodash}/isEqualWith.js (98%) rename node_modules/{lodash/package => globule/node_modules/lodash}/isError.js (59%) rename node_modules/{lodash/package => globule/node_modules/lodash}/isFinite.js (88%) create mode 100644 node_modules/globule/node_modules/lodash/isFunction.js rename node_modules/{lodash/package => globule/node_modules/lodash}/isInteger.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/isLength.js (83%) create mode 100644 node_modules/globule/node_modules/lodash/isMap.js rename node_modules/{lodash/package => globule/node_modules/lodash}/isMatch.js (57%) rename node_modules/{lodash/package => globule/node_modules/lodash}/isMatchWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/isNaN.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/isNative.js rename node_modules/{lodash/package => globule/node_modules/lodash}/isNil.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/isNull.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/isNumber.js (58%) rename node_modules/{lodash/package => globule/node_modules/lodash}/isObject.js (81%) rename node_modules/{lodash/package => globule/node_modules/lodash}/isObjectLike.js (91%) rename node_modules/{lodash/package => globule/node_modules/lodash}/isPlainObject.js (67%) create mode 100644 node_modules/globule/node_modules/lodash/isRegExp.js rename node_modules/{lodash/package => globule/node_modules/lodash}/isSafeInteger.js (97%) create mode 100644 node_modules/globule/node_modules/lodash/isSet.js rename node_modules/{lodash/package => globule/node_modules/lodash}/isString.js (50%) create mode 100644 node_modules/globule/node_modules/lodash/isSymbol.js create mode 100644 node_modules/globule/node_modules/lodash/isTypedArray.js rename node_modules/{lodash/package => globule/node_modules/lodash}/isUndefined.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/isWeakMap.js (85%) create mode 100644 node_modules/globule/node_modules/lodash/isWeakSet.js rename node_modules/{lodash/package => globule/node_modules/lodash}/iteratee.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/join.js (90%) rename node_modules/{lodash/package => globule/node_modules/lodash}/kebabCase.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/keyBy.js (81%) create mode 100644 node_modules/globule/node_modules/lodash/keys.js create mode 100644 node_modules/globule/node_modules/lodash/keysIn.js rename node_modules/{lodash/package => globule/node_modules/lodash}/lang.js (96%) rename node_modules/{lodash/package => globule/node_modules/lodash}/last.js (87%) rename node_modules/{lodash/package => globule/node_modules/lodash}/lastIndexOf.js (66%) rename node_modules/{lodash/package => globule/node_modules/lodash}/lodash.js (82%) create mode 100644 node_modules/globule/node_modules/lodash/lodash.min.js rename node_modules/{lodash/package => globule/node_modules/lodash}/lowerCase.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/lowerFirst.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/lt.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/lte.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/map.js (93%) rename node_modules/{lodash/package => globule/node_modules/lodash}/mapKeys.js (78%) rename node_modules/{lodash/package => globule/node_modules/lodash}/mapValues.js (82%) create mode 100644 node_modules/globule/node_modules/lodash/matches.js rename node_modules/{lodash/package => globule/node_modules/lodash}/matchesProperty.js (60%) rename node_modules/{lodash/package => globule/node_modules/lodash}/math.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/max.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/maxBy.js (84%) rename node_modules/{lodash/package => globule/node_modules/lodash}/mean.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/meanBy.js (83%) rename node_modules/{lodash/package => globule/node_modules/lodash}/memoize.js (81%) rename node_modules/{lodash/package => globule/node_modules/lodash}/merge.js (75%) rename node_modules/{lodash/package => globule/node_modules/lodash}/mergeWith.js (77%) rename node_modules/{lodash/package => globule/node_modules/lodash}/method.js (83%) rename node_modules/{lodash/package => globule/node_modules/lodash}/methodOf.js (84%) rename node_modules/{lodash/package => globule/node_modules/lodash}/min.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/minBy.js (84%) rename node_modules/{lodash/package => globule/node_modules/lodash}/mixin.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/multiply.js (98%) rename node_modules/{lodash/package => globule/node_modules/lodash}/negate.js (61%) rename node_modules/{lodash/package => globule/node_modules/lodash}/next.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/noop.js rename node_modules/{lodash/package => globule/node_modules/lodash}/now.js (81%) rename node_modules/{lodash/package => globule/node_modules/lodash}/nth.js (83%) rename node_modules/{lodash/package => globule/node_modules/lodash}/nthArg.js (70%) rename node_modules/{lodash/package => globule/node_modules/lodash}/number.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/object.js (98%) rename node_modules/{lodash/package => globule/node_modules/lodash}/omit.js (83%) rename node_modules/{lodash/package => globule/node_modules/lodash}/omitBy.js (70%) rename node_modules/{lodash/package => globule/node_modules/lodash}/once.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/orderBy.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/over.js (70%) rename node_modules/{lodash/package => globule/node_modules/lodash}/overArgs.js (66%) rename node_modules/{lodash/package => globule/node_modules/lodash}/overEvery.js (73%) rename node_modules/{lodash/package => globule/node_modules/lodash}/overSome.js (73%) rename node_modules/{lodash/package => globule/node_modules/lodash}/package.json (96%) rename node_modules/{lodash/package => globule/node_modules/lodash}/pad.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/padEnd.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/padStart.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/parseInt.js (75%) rename node_modules/{lodash/package => globule/node_modules/lodash}/partial.js (70%) rename node_modules/{lodash/package => globule/node_modules/lodash}/partialRight.js (68%) rename node_modules/{lodash/package => globule/node_modules/lodash}/partition.js (93%) rename node_modules/{lodash/package => globule/node_modules/lodash}/pick.js (73%) rename node_modules/{lodash/package => globule/node_modules/lodash}/pickBy.js (67%) rename node_modules/{lodash/package => globule/node_modules/lodash}/plant.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/property.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/propertyOf.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/pull.js (65%) rename node_modules/{lodash/package => globule/node_modules/lodash}/pullAll.js (85%) rename node_modules/{lodash/package => globule/node_modules/lodash}/pullAllBy.js (85%) rename node_modules/{lodash/package => globule/node_modules/lodash}/pullAllWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/pullAt.js (70%) rename node_modules/{lodash/package => globule/node_modules/lodash}/random.js (95%) rename node_modules/{lodash/package => globule/node_modules/lodash}/range.js (95%) rename node_modules/{lodash/package => globule/node_modules/lodash}/rangeRight.js (93%) rename node_modules/{lodash/package => globule/node_modules/lodash}/rearg.js (68%) rename node_modules/{lodash/package => globule/node_modules/lodash}/reduce.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/reduceRight.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/reject.js (80%) rename node_modules/{lodash/package => globule/node_modules/lodash}/remove.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/repeat.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/replace.js (69%) rename node_modules/{lodash/package => globule/node_modules/lodash}/rest.js (52%) rename node_modules/{lodash/package => globule/node_modules/lodash}/result.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/reverse.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/round.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/sample.js (53%) rename node_modules/{lodash/package => globule/node_modules/lodash}/sampleSize.js (62%) rename node_modules/{lodash/package => globule/node_modules/lodash}/seq.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/set.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/setWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/shuffle.js (67%) rename node_modules/{lodash/package => globule/node_modules/lodash}/size.js (62%) rename node_modules/{lodash/package => globule/node_modules/lodash}/slice.js (95%) rename node_modules/{lodash/package => globule/node_modules/lodash}/snakeCase.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/some.js (93%) rename node_modules/{lodash/package => globule/node_modules/lodash}/sortBy.js (62%) rename node_modules/{lodash/package => globule/node_modules/lodash}/sortedIndex.js (93%) rename node_modules/{lodash/package => globule/node_modules/lodash}/sortedIndexBy.js (66%) rename node_modules/{lodash/package => globule/node_modules/lodash}/sortedIndexOf.js (80%) rename node_modules/{lodash/package => globule/node_modules/lodash}/sortedLastIndex.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/sortedLastIndexBy.js (69%) rename node_modules/{lodash/package => globule/node_modules/lodash}/sortedLastIndexOf.js (81%) rename node_modules/{lodash/package => globule/node_modules/lodash}/sortedUniq.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/sortedUniqBy.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/split.js (75%) rename node_modules/{lodash/package => globule/node_modules/lodash}/spread.js (90%) rename node_modules/{lodash/package => globule/node_modules/lodash}/startCase.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/startsWith.js (84%) rename node_modules/{lodash/package => globule/node_modules/lodash}/string.js (100%) create mode 100644 node_modules/globule/node_modules/lodash/stubArray.js create mode 100644 node_modules/globule/node_modules/lodash/stubFalse.js create mode 100644 node_modules/globule/node_modules/lodash/stubObject.js create mode 100644 node_modules/globule/node_modules/lodash/stubString.js create mode 100644 node_modules/globule/node_modules/lodash/stubTrue.js rename node_modules/{lodash/package => globule/node_modules/lodash}/subtract.js (98%) rename node_modules/{lodash/package => globule/node_modules/lodash}/sum.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/sumBy.js (84%) rename node_modules/{lodash/package => globule/node_modules/lodash}/tail.js (68%) rename node_modules/{lodash/package => globule/node_modules/lodash}/take.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/takeRight.js (94%) rename node_modules/{lodash/package => globule/node_modules/lodash}/takeRightWhile.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/takeWhile.js (92%) rename node_modules/{lodash/package => globule/node_modules/lodash}/tap.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/template.js (97%) rename node_modules/{lodash/package => globule/node_modules/lodash}/templateSettings.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/throttle.js (87%) rename node_modules/{lodash/package => globule/node_modules/lodash}/thru.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/times.js (86%) rename node_modules/{lodash/package => globule/node_modules/lodash}/toArray.js (85%) rename node_modules/{lodash/package/toInteger.js => globule/node_modules/lodash/toFinite.js} (50%) create mode 100644 node_modules/globule/node_modules/lodash/toInteger.js rename node_modules/{lodash/package => globule/node_modules/lodash}/toIterator.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/toJSON.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/toLength.js (87%) rename node_modules/{lodash/package => globule/node_modules/lodash}/toLower.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/toNumber.js (86%) rename node_modules/{lodash/package => globule/node_modules/lodash}/toPairs.js (66%) rename node_modules/{lodash/package => globule/node_modules/lodash}/toPairsIn.js (57%) rename node_modules/{lodash/package => globule/node_modules/lodash}/toPath.js (81%) rename node_modules/{lodash/package => globule/node_modules/lodash}/toPlainObject.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/toSafeInteger.js (93%) rename node_modules/{lodash/package => globule/node_modules/lodash}/toString.js (83%) rename node_modules/{lodash/package => globule/node_modules/lodash}/toUpper.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/transform.js (63%) rename node_modules/{lodash/package => globule/node_modules/lodash}/trim.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/trimEnd.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/trimStart.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/truncate.js (97%) rename node_modules/{lodash/package => globule/node_modules/lodash}/unary.js (88%) rename node_modules/{lodash/package => globule/node_modules/lodash}/unescape.js (88%) rename node_modules/{lodash/package => globule/node_modules/lodash}/union.js (67%) rename node_modules/{lodash/package => globule/node_modules/lodash}/unionBy.js (66%) rename node_modules/{lodash/package => globule/node_modules/lodash}/unionWith.js (73%) rename node_modules/{lodash/package => globule/node_modules/lodash}/uniq.js (66%) rename node_modules/{lodash/package => globule/node_modules/lodash}/uniqBy.js (67%) rename node_modules/{lodash/package => globule/node_modules/lodash}/uniqWith.js (55%) rename node_modules/{lodash/package => globule/node_modules/lodash}/uniqueId.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/unset.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/unzip.js (86%) rename node_modules/{lodash/package => globule/node_modules/lodash}/unzipWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/update.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/updateWith.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/upperCase.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/upperFirst.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/util.js (79%) rename node_modules/{lodash/package => globule/node_modules/lodash}/value.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/valueOf.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/values.js (91%) rename node_modules/{lodash/package => globule/node_modules/lodash}/valuesIn.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/without.js (58%) create mode 100644 node_modules/globule/node_modules/lodash/words.js rename node_modules/{lodash/package => globule/node_modules/lodash}/wrap.js (56%) rename node_modules/{lodash/package => globule/node_modules/lodash}/wrapperAt.js (85%) rename node_modules/{lodash/package => globule/node_modules/lodash}/wrapperChain.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/wrapperLodash.js (74%) rename node_modules/{lodash/package => globule/node_modules/lodash}/wrapperReverse.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/wrapperValue.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/xor.js (70%) rename node_modules/{lodash/package => globule/node_modules/lodash}/xorBy.js (60%) rename node_modules/{lodash/package => globule/node_modules/lodash}/xorWith.js (63%) rename node_modules/{lodash/package => globule/node_modules/lodash}/zip.js (73%) rename node_modules/{lodash/package => globule/node_modules/lodash}/zipObject.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/zipObjectDeep.js (100%) rename node_modules/{lodash/package => globule/node_modules/lodash}/zipWith.js (89%) create mode 100644 node_modules/globule/package.json rename node_modules/{sass-lint/node_modules/gonzales-pe-sl => gonzales-pe}/.editorconfig (100%) create mode 100644 node_modules/gonzales-pe/.eslintrc.yaml rename node_modules/{sass-lint/node_modules/gonzales-pe-sl => gonzales-pe}/.gitmessage.txt (100%) rename node_modules/{sass-lint/node_modules/gonzales-pe-sl => gonzales-pe}/.jscs.json (97%) rename node_modules/{sass-lint/node_modules/gonzales-pe-sl => gonzales-pe}/.jshintrc (100%) rename node_modules/{sass-lint/node_modules/gonzales-pe-sl => gonzales-pe}/.npmignore (100%) create mode 100644 node_modules/gonzales-pe/.travis.yml rename node_modules/{sass-lint/node_modules/gonzales-pe-sl => gonzales-pe}/CHANGELOG.md (66%) rename node_modules/{sass-lint/node_modules/gonzales-pe-sl => gonzales-pe}/MIT-LICENSE.txt (100%) rename node_modules/{sass-lint/node_modules/gonzales-pe-sl => gonzales-pe}/README.md (97%) create mode 100644 node_modules/gonzales-pe/appveyor.yml create mode 100644 node_modules/gonzales-pe/bin/gonzales.js create mode 100644 node_modules/gonzales-pe/lib/gonzales.js create mode 100644 node_modules/gonzales-pe/package.json create mode 100644 node_modules/gonzales-pe/tags create mode 100644 node_modules/gonzales-pe/webpack.config.js delete mode 100644 node_modules/inflight/.eslintrc delete mode 100644 node_modules/inflight/test.js create mode 100644 node_modules/js-yaml/node_modules/.bin/esparse create mode 100644 node_modules/js-yaml/node_modules/.bin/esparse.cmd create mode 100644 node_modules/js-yaml/node_modules/.bin/esvalidate create mode 100644 node_modules/js-yaml/node_modules/.bin/esvalidate.cmd create mode 100644 node_modules/jsonpointer/LICENSE.md create mode 100644 node_modules/jsonpointer/benchmark.js delete mode 100644 node_modules/lodash._baseslice/LICENSE delete mode 100644 node_modules/lodash._baseslice/README.md delete mode 100644 node_modules/lodash._baseslice/index.js delete mode 100644 node_modules/lodash._baseslice/package.json delete mode 100644 node_modules/lodash._basetostring/LICENSE delete mode 100644 node_modules/lodash._basetostring/README.md delete mode 100644 node_modules/lodash._basetostring/index.js delete mode 100644 node_modules/lodash._basetostring/package.json delete mode 100644 node_modules/lodash._isiterateecall/LICENSE.txt delete mode 100644 node_modules/lodash._isiterateecall/README.md delete mode 100644 node_modules/lodash._isiterateecall/index.js delete mode 100644 node_modules/lodash._isiterateecall/package.json delete mode 100644 node_modules/lodash.deburr/LICENSE.txt delete mode 100644 node_modules/lodash.deburr/README.md delete mode 100644 node_modules/lodash.deburr/index.js delete mode 100644 node_modules/lodash.deburr/package.json delete mode 100644 node_modules/lodash.kebabcase/node_modules/lodash.deburr/README.md delete mode 100644 node_modules/lodash.kebabcase/node_modules/lodash.deburr/index.js delete mode 100644 node_modules/lodash.kebabcase/node_modules/lodash.deburr/package.json delete mode 100644 node_modules/lodash.kebabcase/node_modules/lodash.words/LICENSE delete mode 100644 node_modules/lodash.kebabcase/node_modules/lodash.words/README.md delete mode 100644 node_modules/lodash.kebabcase/node_modules/lodash.words/index.js delete mode 100644 node_modules/lodash.kebabcase/node_modules/lodash.words/package.json delete mode 100644 node_modules/lodash.tostring/README.md delete mode 100644 node_modules/lodash.tostring/index.js delete mode 100644 node_modules/lodash.tostring/package.json delete mode 100644 node_modules/lodash.upperfirst/LICENSE delete mode 100644 node_modules/lodash.upperfirst/README.md delete mode 100644 node_modules/lodash.upperfirst/index.js delete mode 100644 node_modules/lodash.upperfirst/package.json delete mode 100644 node_modules/lodash.words/LICENSE delete mode 100644 node_modules/lodash.words/README.md delete mode 100644 node_modules/lodash.words/index.js delete mode 100644 node_modules/lodash.words/package.json create mode 100644 node_modules/lodash/README.md create mode 100644 node_modules/lodash/_ListCache.js delete mode 100644 node_modules/lodash/_Reflect.js delete mode 100644 node_modules/lodash/_arrayConcat.js create mode 100644 node_modules/lodash/_arrayLikeKeys.js create mode 100644 node_modules/lodash/_arraySample.js create mode 100644 node_modules/lodash/_arraySampleSize.js create mode 100644 node_modules/lodash/_arrayShuffle.js create mode 100644 node_modules/lodash/_asciiSize.js create mode 100644 node_modules/lodash/_asciiToArray.js create mode 100644 node_modules/lodash/_asciiWords.js delete mode 100644 node_modules/lodash/_assocGet.js delete mode 100644 node_modules/lodash/_assocSet.js create mode 100644 node_modules/lodash/_baseAssignIn.js create mode 100644 node_modules/lodash/_baseAssignValue.js create mode 100644 node_modules/lodash/_baseConformsTo.js delete mode 100644 node_modules/lodash/_baseFind.js create mode 100644 node_modules/lodash/_baseFindKey.js create mode 100644 node_modules/lodash/_baseGetTag.js create mode 100644 node_modules/lodash/_baseIsArguments.js create mode 100644 node_modules/lodash/_baseIsArrayBuffer.js create mode 100644 node_modules/lodash/_baseIsDate.js create mode 100644 node_modules/lodash/_baseIsMap.js create mode 100644 node_modules/lodash/_baseIsNaN.js create mode 100644 node_modules/lodash/_baseIsNative.js create mode 100644 node_modules/lodash/_baseIsRegExp.js create mode 100644 node_modules/lodash/_baseIsSet.js create mode 100644 node_modules/lodash/_baseIsTypedArray.js create mode 100644 node_modules/lodash/_basePropertyOf.js create mode 100644 node_modules/lodash/_baseRest.js create mode 100644 node_modules/lodash/_baseSample.js create mode 100644 node_modules/lodash/_baseSampleSize.js create mode 100644 node_modules/lodash/_baseSetToString.js create mode 100644 node_modules/lodash/_baseShuffle.js delete mode 100644 node_modules/lodash/_cachePush.js create mode 100644 node_modules/lodash/_castRest.js delete mode 100644 node_modules/lodash/_checkGlobal.js create mode 100644 node_modules/lodash/_copySymbolsIn.js create mode 100644 node_modules/lodash/_coreJsData.js rename node_modules/lodash/{package/_createBaseWrapper.js => _createBind.js} (56%) rename node_modules/lodash/{_createCtorWrapper.js => _createCtor.js} (90%) rename node_modules/lodash/{package/_createCurryWrapper.js => _createCurry.js} (60%) create mode 100644 node_modules/lodash/_createFind.js rename node_modules/lodash/{_createHybridWrapper.js => _createHybrid.js} (65%) rename node_modules/lodash/{_createPartialWrapper.js => _createPartial.js} (71%) rename node_modules/lodash/{package/_createRecurryWrapper.js => _createRecurry.js} (58%) create mode 100644 node_modules/lodash/_createToPairs.js rename node_modules/lodash/{package/_createWrapper.js => _createWrap.js} (53%) create mode 100644 node_modules/lodash/_defineProperty.js create mode 100644 node_modules/lodash/_flatRest.js create mode 100644 node_modules/lodash/_freeGlobal.js rename node_modules/lodash/{package/_getPlaceholder.js => _getHolder.js} (77%) delete mode 100644 node_modules/lodash/_getLength.js create mode 100644 node_modules/lodash/_getMapData.js create mode 100644 node_modules/lodash/_getRawTag.js create mode 100644 node_modules/lodash/_getValue.js create mode 100644 node_modules/lodash/_getWrapDetails.js create mode 100644 node_modules/lodash/_hasUnicode.js create mode 100644 node_modules/lodash/_hasUnicodeWord.js create mode 100644 node_modules/lodash/_hashClear.js delete mode 100644 node_modules/lodash/_indexKeys.js delete mode 100644 node_modules/lodash/_indexOfNaN.js create mode 100644 node_modules/lodash/_insertWrapDetails.js delete mode 100644 node_modules/lodash/_isFlattenableIteratee.js delete mode 100644 node_modules/lodash/_isHostObject.js create mode 100644 node_modules/lodash/_isMaskable.js create mode 100644 node_modules/lodash/_isMasked.js create mode 100644 node_modules/lodash/_listCacheClear.js rename node_modules/lodash/{_assocDelete.js => _listCacheDelete.js} (58%) create mode 100644 node_modules/lodash/_listCacheGet.js rename node_modules/lodash/{_assocHas.js => _listCacheHas.js} (50%) create mode 100644 node_modules/lodash/_listCacheSet.js rename node_modules/lodash/{package/_mapClear.js => _mapCacheClear.js} (61%) create mode 100644 node_modules/lodash/_mapCacheDelete.js create mode 100644 node_modules/lodash/_mapCacheGet.js create mode 100644 node_modules/lodash/_mapCacheHas.js create mode 100644 node_modules/lodash/_mapCacheSet.js delete mode 100644 node_modules/lodash/_mapDelete.js delete mode 100644 node_modules/lodash/_mapGet.js delete mode 100644 node_modules/lodash/_mapHas.js delete mode 100644 node_modules/lodash/_mapSet.js create mode 100644 node_modules/lodash/_memoizeCapped.js create mode 100644 node_modules/lodash/_nativeKeys.js create mode 100644 node_modules/lodash/_nativeKeysIn.js create mode 100644 node_modules/lodash/_nodeUtil.js create mode 100644 node_modules/lodash/_objectToString.js create mode 100644 node_modules/lodash/_overArg.js create mode 100644 node_modules/lodash/_overRest.js delete mode 100644 node_modules/lodash/_reHasComplexSymbol.js create mode 100644 node_modules/lodash/_setCacheAdd.js create mode 100644 node_modules/lodash/_setCacheHas.js create mode 100644 node_modules/lodash/_setToPairs.js create mode 100644 node_modules/lodash/_setToString.js create mode 100644 node_modules/lodash/_setWrapToString.js create mode 100644 node_modules/lodash/_shortOut.js create mode 100644 node_modules/lodash/_shuffleSelf.js create mode 100644 node_modules/lodash/_strictIndexOf.js create mode 100644 node_modules/lodash/_strictLastIndexOf.js create mode 100644 node_modules/lodash/_unicodeSize.js create mode 100644 node_modules/lodash/_unicodeToArray.js create mode 100644 node_modules/lodash/_unicodeWords.js create mode 100644 node_modules/lodash/_updateWrapDetails.js create mode 100644 node_modules/lodash/conformsTo.js create mode 100644 node_modules/lodash/defaultTo.js create mode 100644 node_modules/lodash/first.js create mode 100644 node_modules/lodash/fp/F.js create mode 100644 node_modules/lodash/fp/T.js create mode 100644 node_modules/lodash/fp/assignAll.js create mode 100644 node_modules/lodash/fp/assignAllWith.js create mode 100644 node_modules/lodash/fp/assignInAll.js create mode 100644 node_modules/lodash/fp/assignInAllWith.js create mode 100644 node_modules/lodash/fp/conformsTo.js create mode 100644 node_modules/lodash/fp/defaultTo.js create mode 100644 node_modules/lodash/fp/defaultsAll.js create mode 100644 node_modules/lodash/fp/defaultsDeepAll.js create mode 100644 node_modules/lodash/fp/dropLast.js create mode 100644 node_modules/lodash/fp/dropLastWhile.js create mode 100644 node_modules/lodash/fp/extendAll.js create mode 100644 node_modules/lodash/fp/extendAllWith.js create mode 100644 node_modules/lodash/fp/findFrom.js create mode 100644 node_modules/lodash/fp/findIndexFrom.js create mode 100644 node_modules/lodash/fp/findLastFrom.js create mode 100644 node_modules/lodash/fp/findLastIndexFrom.js create mode 100644 node_modules/lodash/fp/includesFrom.js create mode 100644 node_modules/lodash/fp/indexBy.js create mode 100644 node_modules/lodash/fp/indexOfFrom.js create mode 100644 node_modules/lodash/fp/lastIndexOfFrom.js create mode 100644 node_modules/lodash/fp/mergeAll.js create mode 100644 node_modules/lodash/fp/mergeAllWith.js create mode 100644 node_modules/lodash/fp/rangeStep.js create mode 100644 node_modules/lodash/fp/rangeStepRight.js create mode 100644 node_modules/lodash/fp/stubArray.js create mode 100644 node_modules/lodash/fp/stubFalse.js create mode 100644 node_modules/lodash/fp/stubObject.js create mode 100644 node_modules/lodash/fp/stubString.js create mode 100644 node_modules/lodash/fp/stubTrue.js create mode 100644 node_modules/lodash/fp/symmetricDifference.js create mode 100644 node_modules/lodash/fp/symmetricDifferenceBy.js create mode 100644 node_modules/lodash/fp/symmetricDifferenceWith.js create mode 100644 node_modules/lodash/fp/takeLast.js create mode 100644 node_modules/lodash/fp/takeLastWhile.js create mode 100644 node_modules/lodash/fp/toFinite.js create mode 100644 node_modules/lodash/fp/where.js create mode 100644 node_modules/lodash/fp/zipAll.js delete mode 100644 node_modules/lodash/lodash-4.11.2.tgz delete mode 100644 node_modules/lodash/package/_Hash.js delete mode 100644 node_modules/lodash/package/_MapCache.js delete mode 100644 node_modules/lodash/package/_Reflect.js delete mode 100644 node_modules/lodash/package/_SetCache.js delete mode 100644 node_modules/lodash/package/_arrayConcat.js delete mode 100644 node_modules/lodash/package/_assocGet.js delete mode 100644 node_modules/lodash/package/_assocSet.js delete mode 100644 node_modules/lodash/package/_baseConforms.js delete mode 100644 node_modules/lodash/package/_baseCreate.js delete mode 100644 node_modules/lodash/package/_baseFind.js delete mode 100644 node_modules/lodash/package/_baseKeys.js delete mode 100644 node_modules/lodash/package/_baseKeysIn.js delete mode 100644 node_modules/lodash/package/_cacheHas.js delete mode 100644 node_modules/lodash/package/_cachePush.js delete mode 100644 node_modules/lodash/package/_checkGlobal.js delete mode 100644 node_modules/lodash/package/_cloneBuffer.js delete mode 100644 node_modules/lodash/package/_createOver.js delete mode 100644 node_modules/lodash/package/_deburrLetter.js delete mode 100644 node_modules/lodash/package/_getLength.js delete mode 100644 node_modules/lodash/package/_getPrototype.js delete mode 100644 node_modules/lodash/package/_getSymbols.js delete mode 100644 node_modules/lodash/package/_indexKeys.js delete mode 100644 node_modules/lodash/package/_indexOfNaN.js delete mode 100644 node_modules/lodash/package/_isFlattenable.js delete mode 100644 node_modules/lodash/package/_isFlattenableIteratee.js delete mode 100644 node_modules/lodash/package/_isHostObject.js delete mode 100644 node_modules/lodash/package/_mapDelete.js delete mode 100644 node_modules/lodash/package/_mapGet.js delete mode 100644 node_modules/lodash/package/_mapHas.js delete mode 100644 node_modules/lodash/package/_mapSet.js delete mode 100644 node_modules/lodash/package/_root.js delete mode 100644 node_modules/lodash/package/_stackSet.js delete mode 100644 node_modules/lodash/package/assignIn.js delete mode 100644 node_modules/lodash/package/core.min.js delete mode 100644 node_modules/lodash/package/difference.js delete mode 100644 node_modules/lodash/package/findLast.js delete mode 100644 node_modules/lodash/package/fp/whereEq.js delete mode 100644 node_modules/lodash/package/isArguments.js delete mode 100644 node_modules/lodash/package/isArrayBuffer.js delete mode 100644 node_modules/lodash/package/isBoolean.js delete mode 100644 node_modules/lodash/package/isBuffer.js delete mode 100644 node_modules/lodash/package/isDate.js delete mode 100644 node_modules/lodash/package/isFunction.js delete mode 100644 node_modules/lodash/package/isMap.js delete mode 100644 node_modules/lodash/package/isRegExp.js delete mode 100644 node_modules/lodash/package/isSet.js delete mode 100644 node_modules/lodash/package/isSymbol.js delete mode 100644 node_modules/lodash/package/isWeakSet.js delete mode 100644 node_modules/lodash/package/keys.js delete mode 100644 node_modules/lodash/package/keysIn.js delete mode 100644 node_modules/lodash/package/lodash.min.js delete mode 100644 node_modules/lodash/package/matches.js delete mode 100644 node_modules/lodash/package/noop.js create mode 100644 node_modules/lodash/stubArray.js create mode 100644 node_modules/lodash/stubFalse.js create mode 100644 node_modules/lodash/stubObject.js create mode 100644 node_modules/lodash/stubString.js create mode 100644 node_modules/lodash/stubTrue.js create mode 100644 node_modules/lodash/toFinite.js rename node_modules/{sass-lint/node_modules => }/minimist/test/all_bool.js (100%) rename node_modules/{sass-lint/node_modules => }/minimist/test/bool.js (100%) rename node_modules/{sass-lint/node_modules => }/minimist/test/num.js (100%) rename node_modules/{sass-lint/node_modules => }/minimist/test/stop_early.js (100%) rename node_modules/{sass-lint/node_modules => }/minimist/test/unknown.js (100%) create mode 100644 node_modules/mkdirp/node_modules/minimist/.travis.yml rename node_modules/{sass-lint => mkdirp}/node_modules/minimist/LICENSE (100%) rename node_modules/{sass-lint => mkdirp}/node_modules/minimist/example/parse.js (100%) rename node_modules/{sass-lint => mkdirp}/node_modules/minimist/index.js (57%) create mode 100644 node_modules/mkdirp/node_modules/minimist/package.json rename node_modules/{sass-lint => mkdirp}/node_modules/minimist/readme.markdown (63%) rename node_modules/{sass-lint => mkdirp}/node_modules/minimist/test/dash.js (74%) rename node_modules/{sass-lint => mkdirp}/node_modules/minimist/test/default_bool.js (58%) rename node_modules/{sass-lint => mkdirp}/node_modules/minimist/test/dotted.js (75%) rename node_modules/{sass-lint => mkdirp}/node_modules/minimist/test/long.js (100%) rename node_modules/{sass-lint => mkdirp}/node_modules/minimist/test/parse.js (54%) rename node_modules/{sass-lint => mkdirp}/node_modules/minimist/test/parse_modified.js (80%) rename node_modules/{sass-lint => mkdirp}/node_modules/minimist/test/short.js (100%) rename node_modules/{sass-lint => mkdirp}/node_modules/minimist/test/whitespace.js (100%) delete mode 100644 node_modules/ms/.npmignore delete mode 100644 node_modules/ms/History.md delete mode 100644 node_modules/ms/LICENSE create mode 100644 node_modules/ms/LICENSE.md delete mode 100644 node_modules/optionator/lib/coerce.js delete mode 100644 node_modules/optionator/lib/parse-type.js delete mode 100644 node_modules/path-is-inside/README.md delete mode 100644 node_modules/read-json-sync/LICENSE delete mode 100644 node_modules/read-json-sync/README.md delete mode 100644 node_modules/read-json-sync/index.js delete mode 100644 node_modules/read-json-sync/package.json create mode 100644 node_modules/require-uncached/license create mode 100644 node_modules/sass-lint/.github/ISSUE_TEMPLATE.md create mode 100644 node_modules/sass-lint/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 node_modules/sass-lint/data/pseudoClasses.yml create mode 100644 node_modules/sass-lint/data/pseudoElements.yml create mode 100644 node_modules/sass-lint/docs/options/max-warnings.md create mode 100644 node_modules/sass-lint/docs/rules/attribute-quotes.md create mode 100644 node_modules/sass-lint/docs/rules/declarations-before-nesting.md create mode 100644 node_modules/sass-lint/docs/rules/max-file-line-count.md create mode 100644 node_modules/sass-lint/docs/rules/max-line-length.md create mode 100644 node_modules/sass-lint/docs/rules/no-attribute-selectors.md create mode 100644 node_modules/sass-lint/docs/rules/no-color-hex.md create mode 100644 node_modules/sass-lint/docs/rules/no-combinators.md create mode 100644 node_modules/sass-lint/docs/rules/no-disallowed-properties.md create mode 100644 node_modules/sass-lint/docs/rules/no-universal-selectors.md create mode 100644 node_modules/sass-lint/docs/rules/no-url-domains.md create mode 100644 node_modules/sass-lint/docs/rules/pseudo-element.md create mode 100644 node_modules/sass-lint/docs/toggle-rules-in-src.md create mode 100644 node_modules/sass-lint/lib/config-helpers.js create mode 100644 node_modules/sass-lint/lib/exceptions.js create mode 100644 node_modules/sass-lint/lib/ruleToggler.js create mode 100644 node_modules/sass-lint/lib/rules/attribute-quotes.js create mode 100644 node_modules/sass-lint/lib/rules/declarations-before-nesting.js create mode 100644 node_modules/sass-lint/lib/rules/max-file-line-count.js create mode 100644 node_modules/sass-lint/lib/rules/max-line-length.js create mode 100644 node_modules/sass-lint/lib/rules/no-attribute-selectors.js create mode 100644 node_modules/sass-lint/lib/rules/no-color-hex.js create mode 100644 node_modules/sass-lint/lib/rules/no-combinators.js create mode 100644 node_modules/sass-lint/lib/rules/no-disallowed-properties.js create mode 100644 node_modules/sass-lint/lib/rules/no-universal-selectors.js create mode 100644 node_modules/sass-lint/lib/rules/no-url-domains.js create mode 100644 node_modules/sass-lint/lib/rules/pseudo-element.js create mode 100644 node_modules/sass-lint/lib/selector-helpers.js create mode 100644 node_modules/sass-lint/node_modules/.bin/eslint create mode 100644 node_modules/sass-lint/node_modules/.bin/eslint.cmd create mode 100644 node_modules/sass-lint/node_modules/.bin/js-yaml create mode 100644 node_modules/sass-lint/node_modules/.bin/js-yaml.cmd delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/.travis.yml delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/bin/gonzales.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/css/mark.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/css/parse.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/css/stringify.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/css/tokenizer.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/gonzales.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/less/mark.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/less/parse.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/less/stringify.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/less/tokenizer.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/node/basic-node.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/node/empty-node.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/node/node-types.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/parse.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/parsing-error.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/sass/mark.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/sass/parse.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/sass/stringify.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/sass/tokenizer.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/scss/mark.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/scss/parse.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/scss/stringify.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/scss/tokenizer.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/token-types.js delete mode 100644 node_modules/sass-lint/node_modules/gonzales-pe-sl/package.json delete mode 100644 node_modules/sass-lint/node_modules/minimist/.travis.yml delete mode 100644 node_modules/sass-lint/node_modules/minimist/package.json create mode 100644 node_modules/sass-lint/tests/bom-utf8/starts-with-mixin-utf8-bom.scss create mode 100644 node_modules/sass-lint/tests/bom-utf8/var-utf8-bom.scss create mode 100644 node_modules/sass-lint/tests/config-helpers.js create mode 100644 node_modules/sass-lint/tests/dir-test/dir.scss/test.scss create mode 100644 node_modules/sass-lint/tests/failures.js delete mode 100644 node_modules/sass-lint/tests/helpers.js create mode 100644 node_modules/sass-lint/tests/helpers/addUnique.js create mode 100644 node_modules/sass-lint/tests/helpers/attemptTraversal.js create mode 100644 node_modules/sass-lint/tests/helpers/collectSuffixExtensions.js create mode 100644 node_modules/sass-lint/tests/helpers/hasEOL.js create mode 100644 node_modules/sass-lint/tests/helpers/helpers.js create mode 100644 node_modules/sass-lint/tests/helpers/isCamelCase.js create mode 100644 node_modules/sass-lint/tests/helpers/isEmptyLine.js create mode 100644 node_modules/sass-lint/tests/helpers/isEqual.js create mode 100644 node_modules/sass-lint/tests/helpers/isHyphenatedBEM.js create mode 100644 node_modules/sass-lint/tests/helpers/isHyphenatedLowerCase.js create mode 100644 node_modules/sass-lint/tests/helpers/isLowerCase.js create mode 100644 node_modules/sass-lint/tests/helpers/isNestable.js create mode 100644 node_modules/sass-lint/tests/helpers/isNewLine.js create mode 100644 node_modules/sass-lint/tests/helpers/isNumber.js create mode 100644 node_modules/sass-lint/tests/helpers/isPartialStringMatch.js create mode 100644 node_modules/sass-lint/tests/helpers/isPascalCase.js create mode 100644 node_modules/sass-lint/tests/helpers/isSnakeCase.js create mode 100644 node_modules/sass-lint/tests/helpers/isSpace.js create mode 100644 node_modules/sass-lint/tests/helpers/isStrictBEM.js create mode 100644 node_modules/sass-lint/tests/helpers/isUnique.js create mode 100644 node_modules/sass-lint/tests/helpers/isUpperCase.js create mode 100644 node_modules/sass-lint/tests/helpers/isValidHex.js create mode 100644 node_modules/sass-lint/tests/helpers/loadConfigFile.js create mode 100644 node_modules/sass-lint/tests/helpers/propertySearch.js create mode 100644 node_modules/sass-lint/tests/helpers/sortDetects.js create mode 100644 node_modules/sass-lint/tests/helpers/stripBom.js create mode 100644 node_modules/sass-lint/tests/helpers/stripLastSpace.js create mode 100644 node_modules/sass-lint/tests/helpers/stripPrefix.js create mode 100644 node_modules/sass-lint/tests/helpers/stripQuotes.js create mode 100644 node_modules/sass-lint/tests/ruleToggler.js create mode 100644 node_modules/sass-lint/tests/rules/attribute-quotes.js create mode 100644 node_modules/sass-lint/tests/rules/declarations-before-nesting.js create mode 100644 node_modules/sass-lint/tests/rules/max-file-line-count.js create mode 100644 node_modules/sass-lint/tests/rules/max-line-length.js create mode 100644 node_modules/sass-lint/tests/rules/no-attribute-selectors.js create mode 100644 node_modules/sass-lint/tests/rules/no-color-hex.js create mode 100644 node_modules/sass-lint/tests/rules/no-combinators.js create mode 100644 node_modules/sass-lint/tests/rules/no-disallowed-properties.js create mode 100644 node_modules/sass-lint/tests/rules/no-universal-selectors.js create mode 100644 node_modules/sass-lint/tests/rules/no-url-domains.js create mode 100644 node_modules/sass-lint/tests/rules/pseudo-element.js create mode 100644 node_modules/sass-lint/tests/sass/attribute-quotes.sass create mode 100644 node_modules/sass-lint/tests/sass/attribute-quotes.scss create mode 100644 node_modules/sass-lint/tests/sass/declarations-before-nesting.sass create mode 100644 node_modules/sass-lint/tests/sass/declarations-before-nesting.scss create mode 100644 node_modules/sass-lint/tests/sass/empty-file.sass create mode 100644 node_modules/sass-lint/tests/sass/front-matter/front-matter.scss create mode 100644 node_modules/sass-lint/tests/sass/indentation/indentation-spaces.sass rename node_modules/sass-lint/tests/sass/{indentation.scss => indentation/indentation-spaces.scss} (55%) create mode 100644 node_modules/sass-lint/tests/sass/indentation/indentation-tabs.sass create mode 100644 node_modules/sass-lint/tests/sass/indentation/indentation-tabs.scss create mode 100644 node_modules/sass-lint/tests/sass/max-file-line-count.sass create mode 100644 node_modules/sass-lint/tests/sass/max-file-line-count.scss create mode 100644 node_modules/sass-lint/tests/sass/max-line-length.sass create mode 100644 node_modules/sass-lint/tests/sass/max-line-length.scss create mode 100644 node_modules/sass-lint/tests/sass/no-attribute-selectors.sass create mode 100644 node_modules/sass-lint/tests/sass/no-attribute-selectors.scss create mode 100644 node_modules/sass-lint/tests/sass/no-color-hex.sass create mode 100644 node_modules/sass-lint/tests/sass/no-color-hex.scss create mode 100644 node_modules/sass-lint/tests/sass/no-combinators.sass create mode 100644 node_modules/sass-lint/tests/sass/no-combinators.scss create mode 100644 node_modules/sass-lint/tests/sass/no-disallowed-properties.sass create mode 100644 node_modules/sass-lint/tests/sass/no-disallowed-properties.scss create mode 100644 node_modules/sass-lint/tests/sass/no-universal-selectors.sass create mode 100644 node_modules/sass-lint/tests/sass/no-universal-selectors.scss create mode 100644 node_modules/sass-lint/tests/sass/no-url-domains.sass create mode 100644 node_modules/sass-lint/tests/sass/no-url-domains.scss create mode 100644 node_modules/sass-lint/tests/sass/pseudo-element.sass create mode 100644 node_modules/sass-lint/tests/sass/pseudo-element.scss create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-disable-a-block.sass create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-disable-a-block.scss create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-disable-a-line.sass create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-disable-a-line.scss create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-disable-a-rule.sass create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-disable-a-rule.scss create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-disable-all-then-reenable.sass create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-disable-all-then-reenable.scss create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-disable-all.sass create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-disable-all.scss create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-disable-multiple-rules.sass create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-disable-multiple-rules.scss create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-disable-then-enable.sass create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-disable-then-enable.scss create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-empty-comment.sass create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-empty-comment.scss create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-guarantee-order.sass create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-guarantee-order.scss create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-ignore-unknown.sass create mode 100644 node_modules/sass-lint/tests/sass/ruleToggler-ignore-unknown.scss create mode 100644 node_modules/sass-lint/tests/sass/selector-helpers/selector-helpers.scss create mode 100644 node_modules/sass-lint/tests/sass/success.scss create mode 100644 node_modules/sass-lint/tests/selector-helpers/selectorHelpers.js create mode 100644 node_modules/sass-lint/tests/yml/.blank.yml create mode 100644 node_modules/sass-lint/tests/yml/.extend-a1.yml create mode 100644 node_modules/sass-lint/tests/yml/.extend-a2.yml create mode 100644 node_modules/sass-lint/tests/yml/.ignore-file.yml create mode 100644 node_modules/sass-lint/tests/yml/.indentation-error.yml create mode 100644 node_modules/sass-lint/tests/yml/.indentation-warn.yml create mode 100644 node_modules/sass-lint/tests/yml/.max-0-warnings.yml create mode 100644 node_modules/sass-lint/tests/yml/.max-10-warnings.yml create mode 100644 node_modules/sass-lint/tests/yml/.max-100-warnings.yml create mode 100644 node_modules/sass-lint/tests/yml/.multiple-ignore-strings.yml create mode 100644 node_modules/sass-lint/tests/yml/.multiple-ignores.yml create mode 100644 node_modules/sass-lint/tests/yml/.multiple-inputs.yml create mode 100644 node_modules/sass-lint/tests/yml/.single-input-include-string.yml create mode 100644 node_modules/sass-lint/tests/yml/extend/.extend-b.yml create mode 100644 node_modules/sass-lint/tests/yml/extend/.extend-c.yml create mode 100644 node_modules/sass-lint/tests/yml/extend/find-file-test/.npmignore delete mode 100644 node_modules/shelljs/.idea/.name delete mode 100644 node_modules/shelljs/.idea/encodings.xml delete mode 100644 node_modules/shelljs/.idea/inspectionProfiles/Project_Default.xml delete mode 100644 node_modules/shelljs/.idea/inspectionProfiles/profiles_settings.xml delete mode 100644 node_modules/shelljs/.idea/jsLibraryMappings.xml delete mode 100644 node_modules/shelljs/.idea/libraries/shelljs_node_modules.xml delete mode 100644 node_modules/shelljs/.idea/misc.xml delete mode 100644 node_modules/shelljs/.idea/modules.xml delete mode 100644 node_modules/shelljs/.idea/shelljs.iml delete mode 100644 node_modules/shelljs/.idea/vcs.xml delete mode 100644 node_modules/shelljs/.idea/workspace.xml delete mode 100644 node_modules/shelljs/build/output.js delete mode 100644 node_modules/table/dist/alignString.js.map delete mode 100644 node_modules/table/dist/alignTableData.js.map delete mode 100644 node_modules/table/dist/calculateCellHeight.js.map delete mode 100644 node_modules/table/dist/calculateCellWidthIndex.js.map delete mode 100644 node_modules/table/dist/calculateMaximumColumnWidthIndex.js.map delete mode 100644 node_modules/table/dist/calculateRowHeightIndex.js.map delete mode 100644 node_modules/table/dist/createStream.js.map delete mode 100644 node_modules/table/dist/drawBorder.js.map delete mode 100644 node_modules/table/dist/drawRow.js.map delete mode 100644 node_modules/table/dist/drawTable.js.map delete mode 100644 node_modules/table/dist/getBorderCharacters.js.map delete mode 100644 node_modules/table/dist/index.js.map delete mode 100644 node_modules/table/dist/makeConfig.js.map delete mode 100644 node_modules/table/dist/makeStreamConfig.js.map delete mode 100644 node_modules/table/dist/mapDataUsingRowHeightIndex.js.map delete mode 100644 node_modules/table/dist/padTableData.js.map delete mode 100644 node_modules/table/dist/stringifyTableData.js.map delete mode 100644 node_modules/table/dist/table.js.map delete mode 100644 node_modules/table/dist/truncateTableData.js.map delete mode 100644 node_modules/table/dist/validateConfig.js.map delete mode 100644 node_modules/table/dist/validateStreamConfig.js.map delete mode 100644 node_modules/table/dist/validateTableData.js.map delete mode 100644 node_modules/table/dist/wrapString.js.map delete mode 100644 node_modules/table/dist/wrapWord.js.map create mode 100644 node_modules/table/node_modules/is-fullwidth-code-point/index.js create mode 100644 node_modules/table/node_modules/is-fullwidth-code-point/license create mode 100644 node_modules/table/node_modules/is-fullwidth-code-point/package.json create mode 100644 node_modules/table/node_modules/is-fullwidth-code-point/readme.md create mode 100644 node_modules/table/node_modules/string-width/index.js create mode 100644 node_modules/table/node_modules/string-width/license create mode 100644 node_modules/table/node_modules/string-width/package.json create mode 100644 node_modules/table/node_modules/string-width/readme.md create mode 100644 node_modules/table/test/README/usage/basic.js create mode 100644 node_modules/table/test/README/usage/cell_content_alignment.js create mode 100644 node_modules/table/test/README/usage/column_width.js create mode 100644 node_modules/table/test/README/usage/custom_border.js create mode 100644 node_modules/table/test/README/usage/draw_horizontal_line.js create mode 100644 node_modules/table/test/README/usage/expectTable.js create mode 100644 node_modules/table/test/README/usage/moon_mission.js create mode 100644 node_modules/table/test/README/usage/padding_cell_content.js create mode 100644 node_modules/table/test/README/usage/predefined_border_templates.js create mode 100644 node_modules/table/test/README/usage/streaming.js create mode 100644 node_modules/table/test/README/usage/text_truncating.js create mode 100644 node_modules/table/test/README/usage/text_wrapping.js create mode 100644 node_modules/table/test/alignString.js create mode 100644 node_modules/table/test/calculateCellHeight.js create mode 100644 node_modules/table/test/calculateCellWidthIndex.js create mode 100644 node_modules/table/test/calculateMaximumColumnWidthIndex.js create mode 100644 node_modules/table/test/calculateRowHeightIndex.js create mode 100644 node_modules/table/test/config.js create mode 100644 node_modules/table/test/configSamples.js create mode 100644 node_modules/table/test/createStream.js create mode 100644 node_modules/table/test/drawBorder.js create mode 100644 node_modules/table/test/makeConfig.js create mode 100644 node_modules/table/test/mapDataUsingRowHeightIndex.js create mode 100644 node_modules/table/test/streamConfig.js create mode 100644 node_modules/table/test/streamConfigSamples.js create mode 100644 node_modules/table/test/validateTableData.js create mode 100644 node_modules/table/test/wrapString.js create mode 100644 node_modules/table/test/wrapWord.js delete mode 100644 node_modules/tryit/test/test.js delete mode 100644 node_modules/tv4/LICENSE.txt delete mode 100644 node_modules/tv4/README.md delete mode 100644 node_modules/tv4/lang/de.js delete mode 100644 node_modules/tv4/lang/fr.js delete mode 100644 node_modules/tv4/lang/nb.js delete mode 100644 node_modules/tv4/lang/pl-PL.js delete mode 100644 node_modules/tv4/lang/pt-PT.js delete mode 100644 node_modules/tv4/lang/sv-SE.js delete mode 100644 node_modules/tv4/lang/zh-CN.js delete mode 100644 node_modules/tv4/package.json delete mode 100644 node_modules/tv4/tv4.async-jquery.js delete mode 100644 node_modules/tv4/tv4.js delete mode 100644 node_modules/wrappy/test/basic.js create mode 100644 node_modules/write/node_modules/.bin/mkdirp create mode 100644 node_modules/write/node_modules/.bin/mkdirp.cmd delete mode 100644 node_modules/xregexp/README.md delete mode 100644 node_modules/xregexp/package.json delete mode 100644 node_modules/xregexp/src/addons/build.js delete mode 100644 node_modules/xregexp/src/addons/matchrecursive.js delete mode 100644 node_modules/xregexp/src/addons/unicode-base.js delete mode 100644 node_modules/xregexp/src/addons/unicode-blocks.js delete mode 100644 node_modules/xregexp/src/addons/unicode-categories.js delete mode 100644 node_modules/xregexp/src/addons/unicode-properties.js delete mode 100644 node_modules/xregexp/src/addons/unicode-scripts.js delete mode 100644 node_modules/xregexp/src/index.js delete mode 100644 node_modules/xregexp/src/xregexp.js create mode 100644 yarn.lock diff --git a/README.md b/README.md index beff295..868ff18 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,10 @@ To override these defaults, create file called `.sass-lint.yml` on your project ## Versions +- 1.0.0 + - Version bump + - Updated `sass-lint` to 1.10.0 + - 1.0.0 - Version bump - Update `sass-lint` to 1.7.0 diff --git a/node_modules/.bin/eslint b/node_modules/.bin/eslint deleted file mode 100644 index 65ad5a6..0000000 --- a/node_modules/.bin/eslint +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=`dirname "$0"` - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../eslint/bin/eslint.js" "$@" - ret=$? -else - node "$basedir/../eslint/bin/eslint.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/eslint.cmd b/node_modules/.bin/eslint.cmd deleted file mode 100644 index 009a9ae..0000000 --- a/node_modules/.bin/eslint.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\eslint\bin\eslint.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\eslint\bin\eslint.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/esparse b/node_modules/.bin/esparse deleted file mode 100644 index 2b5398f..0000000 --- a/node_modules/.bin/esparse +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=`dirname "$0"` - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../esprima/bin/esparse.js" "$@" - ret=$? -else - node "$basedir/../esprima/bin/esparse.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/esparse.cmd b/node_modules/.bin/esparse.cmd deleted file mode 100644 index 064f58e..0000000 --- a/node_modules/.bin/esparse.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\esprima\bin\esparse.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\esprima\bin\esparse.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/esvalidate b/node_modules/.bin/esvalidate deleted file mode 100644 index 6d6df8a..0000000 --- a/node_modules/.bin/esvalidate +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=`dirname "$0"` - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../esprima/bin/esvalidate.js" "$@" - ret=$? -else - node "$basedir/../esprima/bin/esvalidate.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/esvalidate.cmd b/node_modules/.bin/esvalidate.cmd deleted file mode 100644 index 8dfaec0..0000000 --- a/node_modules/.bin/esvalidate.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\esprima\bin\esvalidate.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\esprima\bin\esvalidate.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/js-yaml b/node_modules/.bin/js-yaml deleted file mode 100644 index 2dd4d29..0000000 --- a/node_modules/.bin/js-yaml +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=`dirname "$0"` - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../js-yaml/bin/js-yaml.js" "$@" - ret=$? -else - node "$basedir/../js-yaml/bin/js-yaml.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/js-yaml.cmd b/node_modules/.bin/js-yaml.cmd deleted file mode 100644 index ae8e7bc..0000000 --- a/node_modules/.bin/js-yaml.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\js-yaml\bin\js-yaml.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\js-yaml\bin\js-yaml.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp deleted file mode 100644 index 958ff64..0000000 --- a/node_modules/.bin/mkdirp +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=`dirname "$0"` - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@" - ret=$? -else - node "$basedir/../mkdirp/bin/cmd.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/mkdirp.cmd b/node_modules/.bin/mkdirp.cmd deleted file mode 100644 index 0d2cdd7..0000000 --- a/node_modules/.bin/mkdirp.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\mkdirp\bin\cmd.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\mkdirp\bin\cmd.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/rimraf b/node_modules/.bin/rimraf deleted file mode 100644 index 71c3553..0000000 --- a/node_modules/.bin/rimraf +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=`dirname "$0"` - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../rimraf/bin.js" "$@" - ret=$? -else - node "$basedir/../rimraf/bin.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/rimraf.cmd b/node_modules/.bin/rimraf.cmd deleted file mode 100644 index 9333ec6..0000000 --- a/node_modules/.bin/rimraf.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\rimraf\bin.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\rimraf\bin.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/sass-lint b/node_modules/.bin/sass-lint index 9006c5e..61abc85 100644 --- a/node_modules/.bin/sass-lint +++ b/node_modules/.bin/sass-lint @@ -1,5 +1,5 @@ #!/bin/sh -basedir=`dirname "$0"` +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") case `uname` in *CYGWIN*) basedir=`cygpath -w "$basedir"`;; diff --git a/node_modules/.bin/shjs b/node_modules/.bin/shjs deleted file mode 100644 index 9908675..0000000 --- a/node_modules/.bin/shjs +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=`dirname "$0"` - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../shelljs/bin/shjs" "$@" - ret=$? -else - node "$basedir/../shelljs/bin/shjs" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/shjs.cmd b/node_modules/.bin/shjs.cmd deleted file mode 100644 index 3d98b0b..0000000 --- a/node_modules/.bin/shjs.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\shelljs\bin\shjs" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\shelljs\bin\shjs" %* -) \ No newline at end of file diff --git a/node_modules/.bin/strip-json-comments b/node_modules/.bin/strip-json-comments deleted file mode 100644 index a17c29e..0000000 --- a/node_modules/.bin/strip-json-comments +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=`dirname "$0"` - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../strip-json-comments/cli.js" "$@" - ret=$? -else - node "$basedir/../strip-json-comments/cli.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/strip-json-comments.cmd b/node_modules/.bin/strip-json-comments.cmd deleted file mode 100644 index 16825d1..0000000 --- a/node_modules/.bin/strip-json-comments.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\strip-json-comments\cli.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\strip-json-comments\cli.js" %* -) \ No newline at end of file diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity new file mode 100644 index 0000000..0b88280 --- /dev/null +++ b/node_modules/.yarn-integrity @@ -0,0 +1 @@ +c15063e2d51117c8d5088765bb8f4c79d72cccdc23c531d7ae205cc3b163acd3 \ No newline at end of file diff --git a/node_modules/.bin/acorn b/node_modules/acorn-jsx/node_modules/.bin/acorn similarity index 82% rename from node_modules/.bin/acorn rename to node_modules/acorn-jsx/node_modules/.bin/acorn index 261da85..558ebb9 100644 --- a/node_modules/.bin/acorn +++ b/node_modules/acorn-jsx/node_modules/.bin/acorn @@ -1,5 +1,5 @@ #!/bin/sh -basedir=`dirname "$0"` +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") case `uname` in *CYGWIN*) basedir=`cygpath -w "$basedir"`;; diff --git a/node_modules/.bin/acorn.cmd b/node_modules/acorn-jsx/node_modules/.bin/acorn.cmd similarity index 100% rename from node_modules/.bin/acorn.cmd rename to node_modules/acorn-jsx/node_modules/.bin/acorn.cmd diff --git a/node_modules/acorn-jsx/node_modules/acorn/.editorconfig b/node_modules/acorn-jsx/node_modules/acorn/.editorconfig new file mode 100644 index 0000000..c14d5c6 --- /dev/null +++ b/node_modules/acorn-jsx/node_modules/acorn/.editorconfig @@ -0,0 +1,7 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true diff --git a/node_modules/acorn-jsx/node_modules/acorn/.gitattributes b/node_modules/acorn-jsx/node_modules/acorn/.gitattributes new file mode 100644 index 0000000..fcadb2c --- /dev/null +++ b/node_modules/acorn-jsx/node_modules/acorn/.gitattributes @@ -0,0 +1 @@ +* text eol=lf diff --git a/node_modules/acorn-jsx/node_modules/acorn/.npmignore b/node_modules/acorn-jsx/node_modules/acorn/.npmignore new file mode 100644 index 0000000..ecba291 --- /dev/null +++ b/node_modules/acorn-jsx/node_modules/acorn/.npmignore @@ -0,0 +1,3 @@ +/.tern-port +/test +/local diff --git a/node_modules/acorn-jsx/node_modules/acorn/.tern-project b/node_modules/acorn-jsx/node_modules/acorn/.tern-project new file mode 100644 index 0000000..6718ce0 --- /dev/null +++ b/node_modules/acorn-jsx/node_modules/acorn/.tern-project @@ -0,0 +1,6 @@ +{ + "plugins": { + "node": true, + "es_modules": true + } +} \ No newline at end of file diff --git a/node_modules/acorn-jsx/node_modules/acorn/.travis.yml b/node_modules/acorn-jsx/node_modules/acorn/.travis.yml new file mode 100644 index 0000000..d9ee88b --- /dev/null +++ b/node_modules/acorn-jsx/node_modules/acorn/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +sudo: false +node_js: + - '0.12' + - '4' + - '5' + - '6' diff --git a/node_modules/acorn-jsx/node_modules/acorn/AUTHORS b/node_modules/acorn-jsx/node_modules/acorn/AUTHORS new file mode 100644 index 0000000..1b2061c --- /dev/null +++ b/node_modules/acorn-jsx/node_modules/acorn/AUTHORS @@ -0,0 +1,59 @@ +List of Acorn contributors. Updated before every release. + +Adrian Rakovsky +Alistair Braidwood +Amila Welihinda +Andres Suarez +Angelo +Aparajita Fishman +Arian Stolwijk +Artem Govorov +Brandon Mills +Charles Hughes +Conrad Irwin +Daniel Tschinder +David Bonnet +Domenico Matteo +ForbesLindesay +Forbes Lindesay +Gilad Peleg +impinball +Ingvar Stepanyan +Jackson Ray Hamilton +Jesse McCarthy +Jiaxing Wang +Joel Kemp +Johannes Herr +Jordan Klassen +Jürg Lehni +keeyipchan +Keheliya Gallaba +Kevin Irish +Kevin Kwok +krator +Marijn Haverbeke +Martin Carlberg +Mathias Bynens +Mathieu 'p01' Henri +Matthew Bastien +Max Schaefer +Max Zerzouri +Mihai Bazon +Mike Rennie +Nicholas C. Zakas +Nick Fitzgerald +Olivier Thomann +Oskar Schöldström +Paul Harper +Peter Rust +PlNG +Prayag Verma +ReadmeCritic +r-e-d +Richard Gibson +Rich Harris +Rich-Harris +Sebastian McKenzie +Timothy Gu +Toru Nagashima +zsjforcn diff --git a/node_modules/acorn-jsx/node_modules/acorn/CHANGELOG.md b/node_modules/acorn-jsx/node_modules/acorn/CHANGELOG.md new file mode 100644 index 0000000..16b8212 --- /dev/null +++ b/node_modules/acorn-jsx/node_modules/acorn/CHANGELOG.md @@ -0,0 +1,159 @@ +## 3.3.0 (2016-07-25) + +### Bug fixes + +Fix bug in tokenizing of regexp operator after a function declaration. + +Fix parser crash when parsing an array pattern with a hole. + +### New features + +Implement check against complex argument lists in functions that +enable strict mode in ES7. + +## 3.2.0 (2016-06-07) + +### Bug fixes + +Improve handling of lack of unicode regexp support in host +environment. + +Properly reject shorthand properties whose name is a keyword. + +Don't crash when the loose parser is called without options object. + +### New features + +Visitors created with `visit.make` now have their base as _prototype_, +rather than copying properties into a fresh object. + +Make it possible to use `visit.ancestor` with a walk state. + +## 3.1.0 (2016-04-18) + +### Bug fixes + +Fix issue where the loose parser created invalid TemplateElement nodes +for unclosed template literals. + +Properly tokenize the division operator directly after a function +expression. + +Allow trailing comma in destructuring arrays. + +### New features + +The walker now allows defining handlers for `CatchClause` nodes. + +## 3.0.4 (2016-02-25) + +### Fixes + +Allow update expressions as left-hand-side of the ES7 exponential +operator. + +## 3.0.2 (2016-02-10) + +### Fixes + +Fix bug that accidentally made `undefined` a reserved word when +parsing ES7. + +## 3.0.0 (2016-02-10) + +### Breaking changes + +The default value of the `ecmaVersion` option is now 6 (used to be 5). + +Support for comprehension syntax (which was dropped from the draft +spec) has been removed. + +### Fixes + +`let` and `yield` are now “contextual keywords”, meaning you can +mostly use them as identifiers in ES5 non-strict code. + +A parenthesized class or function expression after `export default` is +now parsed correctly. + +### New features + +When `ecmaVersion` is set to 7, Acorn will parse the exponentiation +operator (`**`). + +The identifier character ranges are now based on Unicode 8.0.0. + +Plugins can now override the `raiseRecoverable` method to override the +way non-critical errors are handled. + +## 2.7.0 (2016-01-04) + +### Fixes + +Stop allowing rest parameters in setters. + +Make sure the loose parser always attaches a `local` property to +`ImportNamespaceSpecifier` nodes. + +Disallow `y` rexexp flag in ES5. + +Disallow `\00` and `\000` escapes in strict mode. + +Raise an error when an import name is a reserved word. + +## 2.6.4 (2015-11-12) + +### Fixes + +Fix crash in loose parser when parsing invalid object pattern. + +### New features + +Support plugins in the loose parser. + +## 2.6.2 (2015-11-10) + +### Fixes + +Don't crash when no options object is passed. + +## 2.6.0 (2015-11-09) + +### Fixes + +Add `await` as a reserved word in module sources. + +Disallow `yield` in a parameter default value for a generator. + +Forbid using a comma after a rest pattern in an array destructuring. + +### New features + +Support parsing stdin in command-line tool. + +## 2.5.2 (2015-10-27) + +### Fixes + +Fix bug where the walker walked an exported `let` statement as an +expression. + +## 2.5.0 (2015-10-27) + +### Fixes + +Fix tokenizer support in the command-line tool. + +In the loose parser, don't allow non-string-literals as import +sources. + +Stop allowing `new.target` outside of functions. + +Remove legacy `guard` and `guardedHandler` properties from try nodes. + +Stop allowing multiple `__proto__` properties on an object literal in +strict mode. + +Don't allow rest parameters to be non-identifier patterns. + +Check for duplicate paramter names in arrow functions. diff --git a/node_modules/xregexp/LICENSE b/node_modules/acorn-jsx/node_modules/acorn/LICENSE similarity index 92% rename from node_modules/xregexp/LICENSE rename to node_modules/acorn-jsx/node_modules/acorn/LICENSE index 5561edc..a35ebf4 100644 --- a/node_modules/xregexp/LICENSE +++ b/node_modules/acorn-jsx/node_modules/acorn/LICENSE @@ -1,6 +1,4 @@ -The MIT License - -Copyright (c) 2007-2016 Steven Levithan +Copyright (C) 2012-2016 by various contributors (see AUTHORS) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/acorn-jsx/node_modules/acorn/README.md b/node_modules/acorn-jsx/node_modules/acorn/README.md new file mode 100644 index 0000000..0c514d5 --- /dev/null +++ b/node_modules/acorn-jsx/node_modules/acorn/README.md @@ -0,0 +1,407 @@ +# Acorn + +[![Build Status](https://travis-ci.org/ternjs/acorn.svg?branch=master)](https://travis-ci.org/ternjs/acorn) +[![NPM version](https://img.shields.io/npm/v/acorn.svg)](https://www.npmjs.com/package/acorn) +[Author funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png?force)](https://marijnhaverbeke.nl/fund/) + +A tiny, fast JavaScript parser, written completely in JavaScript. + +## Community + +Acorn is open source software released under an +[MIT license](https://github.com/ternjs/acorn/blob/master/LICENSE). + +You are welcome to +[report bugs](https://github.com/ternjs/acorn/issues) or create pull +requests on [github](https://github.com/ternjs/acorn). For questions +and discussion, please use the +[Tern discussion forum](https://discuss.ternjs.net). + +## Installation + +The easiest way to install acorn is with [`npm`][npm]. + +[npm]: https://www.npmjs.com/ + +```sh +npm install acorn +``` + +Alternately, download the source. + +```sh +git clone https://github.com/ternjs/acorn.git +``` + +## Components + +When run in a CommonJS (node.js) or AMD environment, exported values +appear in the interfaces exposed by the individual files, as usual. +When loaded in the browser (Acorn works in any JS-enabled browser more +recent than IE5) without any kind of module management, a single +global object `acorn` will be defined, and all the exported properties +will be added to that. + +### Main parser + +This is implemented in `dist/acorn.js`, and is what you get when you +`require("acorn")` in node.js. + +**parse**`(input, options)` is used to parse a JavaScript program. +The `input` parameter is a string, `options` can be undefined or an +object setting some of the options listed below. The return value will +be an abstract syntax tree object as specified by the +[ESTree spec][estree]. + +When encountering a syntax error, the parser will raise a +`SyntaxError` object with a meaningful message. The error object will +have a `pos` property that indicates the character offset at which the +error occurred, and a `loc` object that contains a `{line, column}` +object referring to that same position. + +[estree]: https://github.com/estree/estree + +- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be + either 3, 5, 6, or 7. This influences support for strict mode, the set + of reserved words, and support for new syntax features. Default is 6. + + **NOTE**: Only 'stage 4' (finalized) ECMAScript 7 features are being + implemented by Acorn. That means that most of the draft standard is + not yet being parsed. + +- **sourceType**: Indicate the mode the code should be parsed in. Can be + either `"script"` or `"module"`. + +- **onInsertedSemicolon**: If given a callback, that callback will be + called whenever a missing semicolon is inserted by the parser. The + callback will be given the character offset of the point where the + semicolon is inserted as argument, and if `locations` is on, also a + `{line, column}` object representing this position. + +- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing + commas. + +- **allowReserved**: If `false`, using a reserved word will generate + an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher + versions. When given the value `"never"`, reserved words and + keywords can also not be used as property names (as in Internet + Explorer's old parser). + +- **allowReturnOutsideFunction**: By default, a return statement at + the top level raises an error. Set this to `true` to accept such + code. + +- **allowImportExportEverywhere**: By default, `import` and `export` + declarations can only appear at a program's top level. Setting this + option to `true` allows them anywhere where a statement is allowed. + +- **allowHashBang**: When this is enabled (off by default), if the + code starts with the characters `#!` (as in a shellscript), the + first line will be treated as a comment. + +- **locations**: When `true`, each node has a `loc` object attached + with `start` and `end` subobjects, each of which contains the + one-based line and zero-based column numbers in `{line, column}` + form. Default is `false`. + +- **onToken**: If a function is passed for this option, each found + token will be passed in same format as tokens returned from + `tokenizer().getToken()`. + + If array is passed, each found token is pushed to it. + + Note that you are not allowed to call the parser from the + callback—that will corrupt its internal state. + +- **onComment**: If a function is passed for this option, whenever a + comment is encountered the function will be called with the + following parameters: + + - `block`: `true` if the comment is a block comment, false if it + is a line comment. + - `text`: The content of the comment. + - `start`: Character offset of the start of the comment. + - `end`: Character offset of the end of the comment. + + When the `locations` options is on, the `{line, column}` locations + of the comment’s start and end are passed as two additional + parameters. + + If array is passed for this option, each found comment is pushed + to it as object in Esprima format: + + ```javascript + { + "type": "Line" | "Block", + "value": "comment text", + "start": Number, + "end": Number, + // If `locations` option is on: + "loc": { + "start": {line: Number, column: Number} + "end": {line: Number, column: Number} + }, + // If `ranges` option is on: + "range": [Number, Number] + } + ``` + + Note that you are not allowed to call the parser from the + callback—that will corrupt its internal state. + +- **ranges**: Nodes have their start and end characters offsets + recorded in `start` and `end` properties (directly on the node, + rather than the `loc` object, which holds line/column data. To also + add a [semi-standardized][range] `range` property holding a + `[start, end]` array with the same numbers, set the `ranges` option + to `true`. + +- **program**: It is possible to parse multiple files into a single + AST by passing the tree produced by parsing the first file as the + `program` option in subsequent parses. This will add the toplevel + forms of the parsed file to the "Program" (top) node of an existing + parse tree. + +- **sourceFile**: When the `locations` option is `true`, you can pass + this option to add a `source` attribute in every node’s `loc` + object. Note that the contents of this option are not examined or + processed in any way; you are free to use whatever format you + choose. + +- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property + will be added (regardless of the `location` option) directly to the + nodes, rather than the `loc` object. + +- **preserveParens**: If this option is `true`, parenthesized expressions + are represented by (non-standard) `ParenthesizedExpression` nodes + that have a single `expression` property containing the expression + inside parentheses. + +[range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + +**parseExpressionAt**`(input, offset, options)` will parse a single +expression in a string, and return its AST. It will not complain if +there is more of the string left after the expression. + +**getLineInfo**`(input, offset)` can be used to get a `{line, +column}` object for a given program string and character offset. + +**tokenizer**`(input, options)` returns an object with a `getToken` +method that can be called repeatedly to get the next token, a `{start, +end, type, value}` object (with added `loc` property when the +`locations` option is enabled and `range` property when the `ranges` +option is enabled). When the token's type is `tokTypes.eof`, you +should stop calling the method, since it will keep returning that same +token forever. + +In ES6 environment, returned result can be used as any other +protocol-compliant iterable: + +```javascript +for (let token of acorn.tokenizer(str)) { + // iterate over the tokens +} + +// transform code to array of tokens: +var tokens = [...acorn.tokenizer(str)]; +``` + +**tokTypes** holds an object mapping names to the token type objects +that end up in the `type` properties of tokens. + +#### Note on using with [Escodegen][escodegen] + +Escodegen supports generating comments from AST, attached in +Esprima-specific format. In order to simulate same format in +Acorn, consider following example: + +```javascript +var comments = [], tokens = []; + +var ast = acorn.parse('var x = 42; // answer', { + // collect ranges for each node + ranges: true, + // collect comments in Esprima's format + onComment: comments, + // collect token ranges + onToken: tokens +}); + +// attach comments using collected information +escodegen.attachComments(ast, comments, tokens); + +// generate code +console.log(escodegen.generate(ast, {comment: true})); +// > 'var x = 42; // answer' +``` + +[escodegen]: https://github.com/estools/escodegen + +### dist/acorn_loose.js ### + +This file implements an error-tolerant parser. It exposes a single +function. The loose parser is accessible in node.js via `require("acorn/dist/acorn_loose")`. + +**parse_dammit**`(input, options)` takes the same arguments and +returns the same syntax tree as the `parse` function in `acorn.js`, +but never raises an error, and will do its best to parse syntactically +invalid code in as meaningful a way as it can. It'll insert identifier +nodes with name `"✖"` as placeholders in places where it can't make +sense of the input. Depends on `acorn.js`, because it uses the same +tokenizer. + +### dist/walk.js ### + +Implements an abstract syntax tree walker. Will store its interface in +`acorn.walk` when loaded without a module system. + +**simple**`(node, visitors, base, state)` does a 'simple' walk over +a tree. `node` should be the AST node to walk, and `visitors` an +object with properties whose names correspond to node types in the +[ESTree spec][estree]. The properties should contain functions +that will be called with the node object and, if applicable the state +at that point. The last two arguments are optional. `base` is a walker +algorithm, and `state` is a start state. The default walker will +simply visit all statements and expressions and not produce a +meaningful state. (An example of a use of state is to track scope at +each point in the tree.) + +**ancestor**`(node, visitors, base, state)` does a 'simple' walk over +a tree, building up an array of ancestor nodes (including the current node) +and passing the array to the callbacks as a third parameter. + +**recursive**`(node, state, functions, base)` does a 'recursive' +walk, where the walker functions are responsible for continuing the +walk on the child nodes of their target node. `state` is the start +state, and `functions` should contain an object that maps node types +to walker functions. Such functions are called with `(node, state, c)` +arguments, and can cause the walk to continue on a sub-node by calling +the `c` argument on it with `(node, state)` arguments. The optional +`base` argument provides the fallback walker functions for node types +that aren't handled in the `functions` object. If not given, the +default walkers will be used. + +**make**`(functions, base)` builds a new walker object by using the +walker functions in `functions` and filling in the missing ones by +taking defaults from `base`. + +**findNodeAt**`(node, start, end, test, base, state)` tries to +locate a node in a tree at the given start and/or end offsets, which +satisfies the predicate `test`. `start` and `end` can be either `null` +(as wildcard) or a number. `test` may be a string (indicating a node +type) or a function that takes `(nodeType, node)` arguments and +returns a boolean indicating whether this node is interesting. `base` +and `state` are optional, and can be used to specify a custom walker. +Nodes are tested from inner to outer, so if two nodes match the +boundaries, the inner one will be preferred. + +**findNodeAround**`(node, pos, test, base, state)` is a lot like +`findNodeAt`, but will match any node that exists 'around' (spanning) +the given position. + +**findNodeAfter**`(node, pos, test, base, state)` is similar to +`findNodeAround`, but will match all nodes *after* the given position +(testing outer nodes before inner nodes). + +## Command line interface + +The `bin/acorn` utility can be used to parse a file from the command +line. It accepts as arguments its input file and the following +options: + +- `--ecma3|--ecma5|--ecma6|--ecma7`: Sets the ECMAScript version to parse. Default is + version 5. + +- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise. + +- `--locations`: Attaches a "loc" object to each node with "start" and + "end" subobjects, each of which contains the one-based line and + zero-based column numbers in `{line, column}` form. + +- `--allow-hash-bang`: If the code starts with the characters #! (as in a shellscript), the first line will be treated as a comment. + +- `--compact`: No whitespace is used in the AST output. + +- `--silent`: Do not output the AST, just return the exit status. + +- `--help`: Print the usage information and quit. + +The utility spits out the syntax tree as JSON data. + +## Build system + +Acorn is written in ECMAScript 6, as a set of small modules, in the +project's `src` directory, and compiled down to bigger ECMAScript 3 +files in `dist` using [Browserify](http://browserify.org) and +[Babel](http://babeljs.io/). If you are already using Babel, you can +consider including the modules directly. + +The command-line test runner (`npm test`) uses the ES6 modules. The +browser-based test page (`test/index.html`) uses the compiled modules. +The `bin/build-acorn.js` script builds the latter from the former. + +If you are working on Acorn, you'll probably want to try the code out +directly, without an intermediate build step. In your scripts, you can +register the Babel require shim like this: + + require("babel-core/register") + +That will allow you to directly `require` the ES6 modules. + +## Plugins + +Acorn is designed support allow plugins which, within reasonable +bounds, redefine the way the parser works. Plugins can add new token +types and new tokenizer contexts (if necessary), and extend methods in +the parser object. This is not a clean, elegant API—using it requires +an understanding of Acorn's internals, and plugins are likely to break +whenever those internals are significantly changed. But still, it is +_possible_, in this way, to create parsers for JavaScript dialects +without forking all of Acorn. And in principle it is even possible to +combine such plugins, so that if you have, for example, a plugin for +parsing types and a plugin for parsing JSX-style XML literals, you +could load them both and parse code with both JSX tags and types. + +A plugin should register itself by adding a property to +`acorn.plugins`, which holds a function. Calling `acorn.parse`, a +`plugins` option can be passed, holding an object mapping plugin names +to configuration values (or just `true` for plugins that don't take +options). After the parser object has been created, the initialization +functions for the chosen plugins are called with `(parser, +configValue)` arguments. They are expected to use the `parser.extend` +method to extend parser methods. For example, the `readToken` method +could be extended like this: + +```javascript +parser.extend("readToken", function(nextMethod) { + return function(code) { + console.log("Reading a token!") + return nextMethod.call(this, code) + } +}) +``` + +The `nextMethod` argument passed to `extend`'s second argument is the +previous value of this method, and should usually be called through to +whenever the extended method does not handle the call itself. + +Similarly, the loose parser allows plugins to register themselves via +`acorn.pluginsLoose`. The extension mechanism is the same as for the +normal parser: + +```javascript +looseParser.extend("readToken", function(nextMethod) { + return function() { + console.log("Reading a token in the loose parser!") + return nextMethod.call(this) + } +}) +``` + +### Existing plugins + + - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx) + - [`acorn-es7-plugin`](https://github.com/MatAtBread/acorn-es7-plugin/): Parse [async/await syntax proposal](https://github.com/tc39/ecmascript-asyncawait) + - [`acorn-object-spread`](https://github.com/UXtemple/acorn-object-spread): Parse [object spread syntax proposal](https://github.com/sebmarkbage/ecmascript-rest-spread) + - [`acorn-es7`](https://www.npmjs.com/package/acorn-es7): Parse [decorator syntax proposal](https://github.com/wycats/javascript-decorators) + - [`acorn-objj`](https://www.npmjs.com/package/acorn-objj): [Objective-J](http://www.cappuccino-project.org/learn/objective-j.html) language parser built as Acorn plugin diff --git a/node_modules/acorn-jsx/node_modules/acorn/bin/acorn b/node_modules/acorn-jsx/node_modules/acorn/bin/acorn new file mode 100644 index 0000000..cf4acd5 --- /dev/null +++ b/node_modules/acorn-jsx/node_modules/acorn/bin/acorn @@ -0,0 +1,65 @@ +#!/usr/bin/env node +'use strict'; + +var path = require('path'); +var fs = require('fs'); +var acorn = require('../dist/acorn.js'); + +var infile; +var forceFile; +var silent = false; +var compact = false; +var tokenize = false; +var options = {} + +function help(status) { + var print = (status == 0) ? console.log : console.error + print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7]") + print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]") + process.exit(status) +} + +for (var i = 2; i < process.argv.length; ++i) { + var arg = process.argv[i] + if ((arg == "-" || arg[0] != "-") && !infile) infile = arg + else if (arg == "--" && !infile && i + 2 == process.argv.length) forceFile = infile = process.argv[++i] + else if (arg == "--ecma3") options.ecmaVersion = 3 + else if (arg == "--ecma5") options.ecmaVersion = 5 + else if (arg == "--ecma6") options.ecmaVersion = 6 + else if (arg == "--ecma7") options.ecmaVersion = 7 + else if (arg == "--locations") options.locations = true + else if (arg == "--allow-hash-bang") options.allowHashBang = true + else if (arg == "--silent") silent = true + else if (arg == "--compact") compact = true + else if (arg == "--help") help(0) + else if (arg == "--tokenize") tokenize = true + else if (arg == "--module") options.sourceType = 'module' + else help(1) +} + +function run(code) { + var result + if (!tokenize) { + try { result = acorn.parse(code, options) } + catch(e) { console.error(e.message); process.exit(1) } + } else { + result = [] + var tokenizer = acorn.tokenizer(code, options), token + while (true) { + try { token = tokenizer.getToken() } + catch(e) { console.error(e.message); process.exit(1) } + result.push(token) + if (token.type == acorn.tokTypes.eof) break + } + } + if (!silent) console.log(JSON.stringify(result, null, compact ? null : 2)) +} + +if (forceFile || infile && infile != "-") { + run(fs.readFileSync(infile, "utf8")) +} else { + var code = "" + process.stdin.resume() + process.stdin.on("data", function (chunk) { return code += chunk; }) + process.stdin.on("end", function () { return run(code); }) +} \ No newline at end of file diff --git a/node_modules/acorn-jsx/node_modules/acorn/bin/generate-identifier-regex.js b/node_modules/acorn-jsx/node_modules/acorn/bin/generate-identifier-regex.js new file mode 100644 index 0000000..100e8cf --- /dev/null +++ b/node_modules/acorn-jsx/node_modules/acorn/bin/generate-identifier-regex.js @@ -0,0 +1,55 @@ +'use strict'; + +// Which Unicode version should be used? +var version = '9.0.0'; + +var start = require('unicode-' + version + '/Binary_Property/ID_Start/code-points.js') + .filter(function(ch) { return ch > 0x7f; }); +var last = -1; +var cont = [0x200c, 0x200d].concat(require('unicode-' + version + '/Binary_Property/ID_Continue/code-points.js') + .filter(function(ch) { return ch > 0x7f && search(start, ch, last + 1) == -1; })); + +function search(arr, ch, starting) { + for (var i = starting; arr[i] <= ch && i < arr.length; last = i++) + if (arr[i] === ch) + return i; + return -1; +} + +function pad(str, width) { + while (str.length < width) str = "0" + str; + return str; +} + +function esc(code) { + var hex = code.toString(16); + if (hex.length <= 2) return "\\x" + pad(hex, 2); + else return "\\u" + pad(hex, 4); +} + +function generate(chars) { + var astral = [], re = ""; + for (var i = 0, at = 0x10000; i < chars.length; i++) { + var from = chars[i], to = from; + while (i < chars.length - 1 && chars[i + 1] == to + 1) { + i++; + to++; + } + if (to <= 0xffff) { + if (from == to) re += esc(from); + else if (from + 1 == to) re += esc(from) + esc(to); + else re += esc(from) + "-" + esc(to); + } else { + astral.push(from - at, to - from); + at = to; + } + } + return {nonASCII: re, astral: astral}; +} + +var startData = generate(start), contData = generate(cont); + +console.log("let nonASCIIidentifierStartChars = \"" + startData.nonASCII + "\""); +console.log("let nonASCIIidentifierChars = \"" + contData.nonASCII + "\""); +console.log("const astralIdentifierStartCodes = " + JSON.stringify(startData.astral)); +console.log("const astralIdentifierCodes = " + JSON.stringify(contData.astral)); diff --git a/node_modules/acorn-jsx/node_modules/acorn/bin/update_authors.sh b/node_modules/acorn-jsx/node_modules/acorn/bin/update_authors.sh new file mode 100644 index 0000000..466c8db --- /dev/null +++ b/node_modules/acorn-jsx/node_modules/acorn/bin/update_authors.sh @@ -0,0 +1,6 @@ +# Combine existing list of authors with everyone known in git, sort, add header. +tail --lines=+3 AUTHORS > AUTHORS.tmp +git log --format='%aN' | grep -v abraidwood >> AUTHORS.tmp +echo -e "List of Acorn contributors. Updated before every release.\n" > AUTHORS +sort -u AUTHORS.tmp >> AUTHORS +rm -f AUTHORS.tmp diff --git a/node_modules/acorn/src/loose/acorn_loose.js b/node_modules/acorn-jsx/node_modules/acorn/dist/.keep similarity index 100% rename from node_modules/acorn/src/loose/acorn_loose.js rename to node_modules/acorn-jsx/node_modules/acorn/dist/.keep diff --git a/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.es.js b/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.es.js new file mode 100644 index 0000000..4460957 --- /dev/null +++ b/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.es.js @@ -0,0 +1,3112 @@ +// Reserved word lists for various dialects of the language + +var reservedWords = { + 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", + 5: "class enum extends super const export import", + 6: "enum", + 7: "enum", + strict: "implements interface let package private protected public static yield", + strictBind: "eval arguments" +} + +// And the keywords + +var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this" + +var keywords = { + 5: ecma5AndLessKeywords, + 6: ecma5AndLessKeywords + " const class extends export import super" +} + +// ## Character categories + +// Big ugly regular expressions that match characters in the +// whitespace, identifier, and identifier-start categories. These +// are only applied when a character is found to actually have a +// code point above 128. +// Generated by `bin/generate-identifier-regex.js`. + +var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc" +var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d4-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f" + +var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]") +var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]") + +nonASCIIidentifierStartChars = nonASCIIidentifierChars = null + +// These are a run-length and offset encoded representation of the +// >0xffff code points that are a valid part of identifiers. The +// offset starts at 0x10000, and each pair of numbers represents an +// offset to the next range, and then a size of the range. They were +// generated by bin/generate-identifier-regex.js +var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541] +var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239] + +// This has a complexity linear to the value of the code. The +// assumption is that looking up astral identifier characters is +// rare. +function isInAstralSet(code, set) { + var pos = 0x10000 + for (var i = 0; i < set.length; i += 2) { + pos += set[i] + if (pos > code) return false + pos += set[i + 1] + if (pos >= code) return true + } +} + +// Test whether a given character code starts an identifier. + +function isIdentifierStart(code, astral) { + if (code < 65) return code === 36 + if (code < 91) return true + if (code < 97) return code === 95 + if (code < 123) return true + if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) + if (astral === false) return false + return isInAstralSet(code, astralIdentifierStartCodes) +} + +// Test whether a given character is part of an identifier. + +function isIdentifierChar(code, astral) { + if (code < 48) return code === 36 + if (code < 58) return true + if (code < 65) return false + if (code < 91) return true + if (code < 97) return code === 95 + if (code < 123) return true + if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) + if (astral === false) return false + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) +} + +// ## Token types + +// The assignment of fine-grained, information-carrying type objects +// allows the tokenizer to store the information it has about a +// token in a way that is very cheap for the parser to look up. + +// All token type variables start with an underscore, to make them +// easy to recognize. + +// The `beforeExpr` property is used to disambiguate between regular +// expressions and divisions. It is set on all token types that can +// be followed by an expression (thus, a slash after them would be a +// regular expression). +// +// The `startsExpr` property is used to check if the token ends a +// `yield` expression. It is set on all token types that either can +// directly start an expression (like a quotation mark) or can +// continue an expression (like the body of a string). +// +// `isLoop` marks a keyword as starting a loop, which is important +// to know when parsing a label, in order to allow or disallow +// continue jumps to that label. + +var TokenType = function TokenType(label, conf) { + if ( conf === void 0 ) conf = {}; + + this.label = label + this.keyword = conf.keyword + this.beforeExpr = !!conf.beforeExpr + this.startsExpr = !!conf.startsExpr + this.isLoop = !!conf.isLoop + this.isAssign = !!conf.isAssign + this.prefix = !!conf.prefix + this.postfix = !!conf.postfix + this.binop = conf.binop || null + this.updateContext = null +}; + +function binop(name, prec) { + return new TokenType(name, {beforeExpr: true, binop: prec}) +} +var beforeExpr = {beforeExpr: true}; +var startsExpr = {startsExpr: true}; +// Map keyword names to token types. + +var keywordTypes = {} + +// Succinct definitions of keyword token types +function kw(name, options) { + if ( options === void 0 ) options = {}; + + options.keyword = name + return keywordTypes[name] = new TokenType(name, options) +} + +var tt = { + num: new TokenType("num", startsExpr), + regexp: new TokenType("regexp", startsExpr), + string: new TokenType("string", startsExpr), + name: new TokenType("name", startsExpr), + eof: new TokenType("eof"), + + // Punctuation token types. + bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), + bracketR: new TokenType("]"), + braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), + braceR: new TokenType("}"), + parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), + parenR: new TokenType(")"), + comma: new TokenType(",", beforeExpr), + semi: new TokenType(";", beforeExpr), + colon: new TokenType(":", beforeExpr), + dot: new TokenType("."), + question: new TokenType("?", beforeExpr), + arrow: new TokenType("=>", beforeExpr), + template: new TokenType("template"), + ellipsis: new TokenType("...", beforeExpr), + backQuote: new TokenType("`", startsExpr), + dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), + + // Operators. These carry several kinds of properties to help the + // parser use them properly (the presence of these properties is + // what categorizes them as operators). + // + // `binop`, when present, specifies that this operator is a binary + // operator, and will refer to its precedence. + // + // `prefix` and `postfix` mark the operator as a prefix or postfix + // unary operator. + // + // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as + // binary operators with a very low precedence, that should result + // in AssignmentExpression nodes. + + eq: new TokenType("=", {beforeExpr: true, isAssign: true}), + assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), + incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), + prefix: new TokenType("prefix", {beforeExpr: true, prefix: true, startsExpr: true}), + logicalOR: binop("||", 1), + logicalAND: binop("&&", 2), + bitwiseOR: binop("|", 3), + bitwiseXOR: binop("^", 4), + bitwiseAND: binop("&", 5), + equality: binop("==/!=", 6), + relational: binop("", 7), + bitShift: binop("<>", 8), + plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), + modulo: binop("%", 10), + star: binop("*", 10), + slash: binop("/", 10), + starstar: new TokenType("**", {beforeExpr: true}), + + // Keyword token types. + _break: kw("break"), + _case: kw("case", beforeExpr), + _catch: kw("catch"), + _continue: kw("continue"), + _debugger: kw("debugger"), + _default: kw("default", beforeExpr), + _do: kw("do", {isLoop: true, beforeExpr: true}), + _else: kw("else", beforeExpr), + _finally: kw("finally"), + _for: kw("for", {isLoop: true}), + _function: kw("function", startsExpr), + _if: kw("if"), + _return: kw("return", beforeExpr), + _switch: kw("switch"), + _throw: kw("throw", beforeExpr), + _try: kw("try"), + _var: kw("var"), + _const: kw("const"), + _while: kw("while", {isLoop: true}), + _with: kw("with"), + _new: kw("new", {beforeExpr: true, startsExpr: true}), + _this: kw("this", startsExpr), + _super: kw("super", startsExpr), + _class: kw("class"), + _extends: kw("extends", beforeExpr), + _export: kw("export"), + _import: kw("import"), + _null: kw("null", startsExpr), + _true: kw("true", startsExpr), + _false: kw("false", startsExpr), + _in: kw("in", {beforeExpr: true, binop: 7}), + _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), + _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), + _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), + _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) +} + +// Matches a whole line break (where CRLF is considered a single +// line break). Used to count lines. + +var lineBreak = /\r\n?|\n|\u2028|\u2029/ +var lineBreakG = new RegExp(lineBreak.source, "g") + +function isNewLine(code) { + return code === 10 || code === 13 || code === 0x2028 || code == 0x2029 +} + +var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/ + +var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g + +function isArray(obj) { + return Object.prototype.toString.call(obj) === "[object Array]" +} + +// Checks if an object has a property. + +function has(obj, propName) { + return Object.prototype.hasOwnProperty.call(obj, propName) +} + +// These are used when `options.locations` is on, for the +// `startLoc` and `endLoc` properties. + +var Position = function Position(line, col) { + this.line = line + this.column = col +}; + +Position.prototype.offset = function offset (n) { + return new Position(this.line, this.column + n) +}; + +var SourceLocation = function SourceLocation(p, start, end) { + this.start = start + this.end = end + if (p.sourceFile !== null) this.source = p.sourceFile +}; + +// The `getLineInfo` function is mostly useful when the +// `locations` option is off (for performance reasons) and you +// want to find the line/column position for a given character +// offset. `input` should be the code string that the offset refers +// into. + +function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + lineBreakG.lastIndex = cur + var match = lineBreakG.exec(input) + if (match && match.index < offset) { + ++line + cur = match.index + match[0].length + } else { + return new Position(line, offset - cur) + } + } +} + +// A second optional argument can be given to further configure +// the parser process. These options are recognized: + +var defaultOptions = { + // `ecmaVersion` indicates the ECMAScript version to parse. Must + // be either 3, or 5, or 6. This influences support for strict + // mode, the set of reserved words, support for getters and + // setters and other features. The default is 6. + ecmaVersion: 6, + // Source type ("script" or "module") for different semantics + sourceType: "script", + // `onInsertedSemicolon` can be a callback that will be called + // when a semicolon is automatically inserted. It will be passed + // th position of the comma as an offset, and if `locations` is + // enabled, it is given the location as a `{line, column}` object + // as second argument. + onInsertedSemicolon: null, + // `onTrailingComma` is similar to `onInsertedSemicolon`, but for + // trailing commas. + onTrailingComma: null, + // By default, reserved words are only enforced if ecmaVersion >= 5. + // Set `allowReserved` to a boolean value to explicitly turn this on + // an off. When this option has the value "never", reserved words + // and keywords can also not be used as property names. + allowReserved: null, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program. + allowImportExportEverywhere: false, + // When enabled, hashbang directive in the beginning of file + // is allowed and treated as a line comment. + allowHashBang: false, + // When `locations` is on, `loc` properties holding objects with + // `start` and `end` properties in `{line, column}` form (with + // line being 1-based and column 0-based) will be attached to the + // nodes. + locations: false, + // A function can be passed as `onToken` option, which will + // cause Acorn to call that function with object in the same + // format as tokens returned from `tokenizer().getToken()`. Note + // that you are not allowed to call the parser from the + // callback—that will corrupt its internal state. + onToken: null, + // A function can be passed as `onComment` option, which will + // cause Acorn to call that function with `(block, text, start, + // end)` parameters whenever a comment is skipped. `block` is a + // boolean indicating whether this is a block (`/* */`) comment, + // `text` is the content of the comment, and `start` and `end` are + // character offsets that denote the start and end of the comment. + // When the `locations` option is on, two more parameters are + // passed, the full `{line, column}` locations of the start and + // end of the comments. Note that you are not allowed to call the + // parser from the callback—that will corrupt its internal state. + onComment: null, + // Nodes have their start and end characters offsets recorded in + // `start` and `end` properties (directly on the node, rather than + // the `loc` object, which holds line/column data. To also add a + // [semi-standardized][range] `range` property holding a `[start, + // end]` array with the same numbers, set the `ranges` option to + // `true`. + // + // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + ranges: false, + // It is possible to parse multiple files into a single AST by + // passing the tree produced by parsing the first file as + // `program` option in subsequent parses. This will add the + // toplevel forms of the parsed file to the `Program` (top) node + // of an existing parse tree. + program: null, + // When `locations` is on, you can pass this to record the source + // file in every node's `loc` object. + sourceFile: null, + // This value, if given, is stored in every node, whether + // `locations` is on or off. + directSourceFile: null, + // When enabled, parenthesized expressions are represented by + // (non-standard) ParenthesizedExpression nodes + preserveParens: false, + plugins: {} +} + +// Interpret and default an options object + +function getOptions(opts) { + var options = {} + for (var opt in defaultOptions) + options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt] + if (options.allowReserved == null) + options.allowReserved = options.ecmaVersion < 5 + + if (isArray(options.onToken)) { + var tokens = options.onToken + options.onToken = function (token) { return tokens.push(token); } + } + if (isArray(options.onComment)) + options.onComment = pushComment(options, options.onComment) + + return options +} + +function pushComment(options, array) { + return function (block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? 'Block' : 'Line', + value: text, + start: start, + end: end + } + if (options.locations) + comment.loc = new SourceLocation(this, startLoc, endLoc) + if (options.ranges) + comment.range = [start, end] + array.push(comment) + } +} + +// Registered plugins +var plugins = {} + +function keywordRegexp(words) { + return new RegExp("^(" + words.replace(/ /g, "|") + ")$") +} + +var Parser = function Parser(options, input, startPos) { + this.options = options = getOptions(options) + this.sourceFile = options.sourceFile + this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]) + var reserved = options.allowReserved ? "" : + reservedWords[options.ecmaVersion] + (options.sourceType == "module" ? " await" : "") + this.reservedWords = keywordRegexp(reserved) + var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict + this.reservedWordsStrict = keywordRegexp(reservedStrict) + this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + reservedWords.strictBind) + this.input = String(input) + + // Used to signal to callers of `readWord1` whether the word + // contained any escape sequences. This is needed because words with + // escape sequences must not be interpreted as keywords. + this.containsEsc = false + + // Load plugins + this.loadPlugins(options.plugins) + + // Set up token state + + // The current position of the tokenizer in the input. + if (startPos) { + this.pos = startPos + this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos)) + this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length + } else { + this.pos = this.lineStart = 0 + this.curLine = 1 + } + + // Properties of the current token: + // Its type + this.type = tt.eof + // For tokens that include more information than their type, the value + this.value = null + // Its start and end offset + this.start = this.end = this.pos + // And, if locations are used, the {line, column} object + // corresponding to those offsets + this.startLoc = this.endLoc = this.curPosition() + + // Position information for the previous token + this.lastTokEndLoc = this.lastTokStartLoc = null + this.lastTokStart = this.lastTokEnd = this.pos + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + this.context = this.initialContext() + this.exprAllowed = true + + // Figure out if it's a module code. + this.strict = this.inModule = options.sourceType === "module" + + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1 + + // Flags to track whether we are in a function, a generator. + this.inFunction = this.inGenerator = false + // Labels in scope. + this.labels = [] + + // If enabled, skip leading hashbang line. + if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === '#!') + this.skipLineComment(2) +}; + +// DEPRECATED Kept for backwards compatibility until 3.0 in case a plugin uses them +Parser.prototype.isKeyword = function isKeyword (word) { return this.keywords.test(word) }; +Parser.prototype.isReservedWord = function isReservedWord (word) { return this.reservedWords.test(word) }; + +Parser.prototype.extend = function extend (name, f) { + this[name] = f(this[name]) +}; + +Parser.prototype.loadPlugins = function loadPlugins (pluginConfigs) { + var this$1 = this; + + for (var name in pluginConfigs) { + var plugin = plugins[name] + if (!plugin) throw new Error("Plugin '" + name + "' not found") + plugin(this$1, pluginConfigs[name]) + } +}; + +Parser.prototype.parse = function parse () { + var node = this.options.program || this.startNode() + this.nextToken() + return this.parseTopLevel(node) +}; + +var pp = Parser.prototype + +// ## Parser utilities + +// Test whether a statement node is the string literal `"use strict"`. + +pp.isUseStrict = function(stmt) { + return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && + stmt.expression.type === "Literal" && + stmt.expression.raw.slice(1, -1) === "use strict" +} + +// Predicate that tests whether the next token is of the given +// type, and if yes, consumes it as a side effect. + +pp.eat = function(type) { + if (this.type === type) { + this.next() + return true + } else { + return false + } +} + +// Tests whether parsed token is a contextual keyword. + +pp.isContextual = function(name) { + return this.type === tt.name && this.value === name +} + +// Consumes contextual keyword if possible. + +pp.eatContextual = function(name) { + return this.value === name && this.eat(tt.name) +} + +// Asserts that following token is given contextual keyword. + +pp.expectContextual = function(name) { + if (!this.eatContextual(name)) this.unexpected() +} + +// Test whether a semicolon can be inserted at the current position. + +pp.canInsertSemicolon = function() { + return this.type === tt.eof || + this.type === tt.braceR || + lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) +} + +pp.insertSemicolon = function() { + if (this.canInsertSemicolon()) { + if (this.options.onInsertedSemicolon) + this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc) + return true + } +} + +// Consume a semicolon, or, failing that, see if we are allowed to +// pretend that there is a semicolon at this position. + +pp.semicolon = function() { + if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected() +} + +pp.afterTrailingComma = function(tokType) { + if (this.type == tokType) { + if (this.options.onTrailingComma) + this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc) + this.next() + return true + } +} + +// Expect a token of a given type. If found, consume it, otherwise, +// raise an unexpected token error. + +pp.expect = function(type) { + this.eat(type) || this.unexpected() +} + +// Raise an unexpected token error. + +pp.unexpected = function(pos) { + this.raise(pos != null ? pos : this.start, "Unexpected token") +} + +var DestructuringErrors = function DestructuringErrors() { + this.shorthandAssign = 0 + this.trailingComma = 0 +}; + +pp.checkPatternErrors = function(refDestructuringErrors, andThrow) { + var trailing = refDestructuringErrors && refDestructuringErrors.trailingComma + if (!andThrow) return !!trailing + if (trailing) this.raise(trailing, "Comma is not permitted after the rest element") +} + +pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { + var pos = refDestructuringErrors && refDestructuringErrors.shorthandAssign + if (!andThrow) return !!pos + if (pos) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns") +} + +var pp$1 = Parser.prototype + +// ### Statement parsing + +// Parse a program. Initializes the parser, reads any number of +// statements, and wraps them in a Program node. Optionally takes a +// `program` argument. If present, the statements will be appended +// to its body instead of creating a new node. + +pp$1.parseTopLevel = function(node) { + var this$1 = this; + + var first = true + if (!node.body) node.body = [] + while (this.type !== tt.eof) { + var stmt = this$1.parseStatement(true, true) + node.body.push(stmt) + if (first) { + if (this$1.isUseStrict(stmt)) this$1.setStrict(true) + first = false + } + } + this.next() + if (this.options.ecmaVersion >= 6) { + node.sourceType = this.options.sourceType + } + return this.finishNode(node, "Program") +} + +var loopLabel = {kind: "loop"}; +var switchLabel = {kind: "switch"}; +pp$1.isLet = function() { + if (this.type !== tt.name || this.options.ecmaVersion < 6 || this.value != "let") return false + skipWhiteSpace.lastIndex = this.pos + var skip = skipWhiteSpace.exec(this.input) + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next) + if (nextCh === 91 || nextCh == 123) return true // '{' and '[' + if (isIdentifierStart(nextCh, true)) { + for (var pos = next + 1; isIdentifierChar(this.input.charCodeAt(pos), true); ++pos) {} + var ident = this.input.slice(next, pos) + if (!this.isKeyword(ident)) return true + } + return false +} + +// Parse a single statement. +// +// If expecting a statement and finding a slash operator, parse a +// regular expression literal. This is to handle cases like +// `if (foo) /blah/.exec(foo)`, where looking at the previous token +// does not help. + +pp$1.parseStatement = function(declaration, topLevel) { + var starttype = this.type, node = this.startNode(), kind + + if (this.isLet()) { + starttype = tt._var + kind = "let" + } + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case tt._break: case tt._continue: return this.parseBreakContinueStatement(node, starttype.keyword) + case tt._debugger: return this.parseDebuggerStatement(node) + case tt._do: return this.parseDoStatement(node) + case tt._for: return this.parseForStatement(node) + case tt._function: + if (!declaration && this.options.ecmaVersion >= 6) this.unexpected() + return this.parseFunctionStatement(node) + case tt._class: + if (!declaration) this.unexpected() + return this.parseClass(node, true) + case tt._if: return this.parseIfStatement(node) + case tt._return: return this.parseReturnStatement(node) + case tt._switch: return this.parseSwitchStatement(node) + case tt._throw: return this.parseThrowStatement(node) + case tt._try: return this.parseTryStatement(node) + case tt._const: case tt._var: + kind = kind || this.value + if (!declaration && kind != "var") this.unexpected() + return this.parseVarStatement(node, kind) + case tt._while: return this.parseWhileStatement(node) + case tt._with: return this.parseWithStatement(node) + case tt.braceL: return this.parseBlock() + case tt.semi: return this.parseEmptyStatement(node) + case tt._export: + case tt._import: + if (!this.options.allowImportExportEverywhere) { + if (!topLevel) + this.raise(this.start, "'import' and 'export' may only appear at the top level") + if (!this.inModule) + this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'") + } + return starttype === tt._import ? this.parseImport(node) : this.parseExport(node) + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + default: + var maybeName = this.value, expr = this.parseExpression() + if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) + return this.parseLabeledStatement(node, maybeName, expr) + else return this.parseExpressionStatement(node, expr) + } +} + +pp$1.parseBreakContinueStatement = function(node, keyword) { + var this$1 = this; + + var isBreak = keyword == "break" + this.next() + if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null + else if (this.type !== tt.name) this.unexpected() + else { + node.label = this.parseIdent() + this.semicolon() + } + + // Verify that there is an actual destination to break or + // continue to. + for (var i = 0; i < this.labels.length; ++i) { + var lab = this$1.labels[i] + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) break + if (node.label && isBreak) break + } + } + if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword) + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") +} + +pp$1.parseDebuggerStatement = function(node) { + this.next() + this.semicolon() + return this.finishNode(node, "DebuggerStatement") +} + +pp$1.parseDoStatement = function(node) { + this.next() + this.labels.push(loopLabel) + node.body = this.parseStatement(false) + this.labels.pop() + this.expect(tt._while) + node.test = this.parseParenExpression() + if (this.options.ecmaVersion >= 6) + this.eat(tt.semi) + else + this.semicolon() + return this.finishNode(node, "DoWhileStatement") +} + +// Disambiguating between a `for` and a `for`/`in` or `for`/`of` +// loop is non-trivial. Basically, we have to parse the init `var` +// statement or expression, disallowing the `in` operator (see +// the second parameter to `parseExpression`), and then check +// whether the next token is `in` or `of`. When there is no init +// part (semicolon immediately after the opening parenthesis), it +// is a regular `for` loop. + +pp$1.parseForStatement = function(node) { + this.next() + this.labels.push(loopLabel) + this.expect(tt.parenL) + if (this.type === tt.semi) return this.parseFor(node, null) + var isLet = this.isLet() + if (this.type === tt._var || this.type === tt._const || isLet) { + var init$1 = this.startNode(), kind = isLet ? "let" : this.value + this.next() + this.parseVar(init$1, true, kind) + this.finishNode(init$1, "VariableDeclaration") + if ((this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1 && + !(kind !== "var" && init$1.declarations[0].init)) + return this.parseForIn(node, init$1) + return this.parseFor(node, init$1) + } + var refDestructuringErrors = new DestructuringErrors + var init = this.parseExpression(true, refDestructuringErrors) + if (this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + this.checkPatternErrors(refDestructuringErrors, true) + this.toAssignable(init) + this.checkLVal(init) + return this.parseForIn(node, init) + } else { + this.checkExpressionErrors(refDestructuringErrors, true) + } + return this.parseFor(node, init) +} + +pp$1.parseFunctionStatement = function(node) { + this.next() + return this.parseFunction(node, true) +} + +pp$1.parseIfStatement = function(node) { + this.next() + node.test = this.parseParenExpression() + node.consequent = this.parseStatement(false) + node.alternate = this.eat(tt._else) ? this.parseStatement(false) : null + return this.finishNode(node, "IfStatement") +} + +pp$1.parseReturnStatement = function(node) { + if (!this.inFunction && !this.options.allowReturnOutsideFunction) + this.raise(this.start, "'return' outside of function") + this.next() + + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. + + if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null + else { node.argument = this.parseExpression(); this.semicolon() } + return this.finishNode(node, "ReturnStatement") +} + +pp$1.parseSwitchStatement = function(node) { + var this$1 = this; + + this.next() + node.discriminant = this.parseParenExpression() + node.cases = [] + this.expect(tt.braceL) + this.labels.push(switchLabel) + + // Statements under must be grouped (by label) in SwitchCase + // nodes. `cur` is used to keep the node that we are currently + // adding statements to. + + for (var cur, sawDefault = false; this.type != tt.braceR;) { + if (this$1.type === tt._case || this$1.type === tt._default) { + var isCase = this$1.type === tt._case + if (cur) this$1.finishNode(cur, "SwitchCase") + node.cases.push(cur = this$1.startNode()) + cur.consequent = [] + this$1.next() + if (isCase) { + cur.test = this$1.parseExpression() + } else { + if (sawDefault) this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses") + sawDefault = true + cur.test = null + } + this$1.expect(tt.colon) + } else { + if (!cur) this$1.unexpected() + cur.consequent.push(this$1.parseStatement(true)) + } + } + if (cur) this.finishNode(cur, "SwitchCase") + this.next() // Closing brace + this.labels.pop() + return this.finishNode(node, "SwitchStatement") +} + +pp$1.parseThrowStatement = function(node) { + this.next() + if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) + this.raise(this.lastTokEnd, "Illegal newline after throw") + node.argument = this.parseExpression() + this.semicolon() + return this.finishNode(node, "ThrowStatement") +} + +// Reused empty array added for node fields that are always empty. + +var empty = [] + +pp$1.parseTryStatement = function(node) { + this.next() + node.block = this.parseBlock() + node.handler = null + if (this.type === tt._catch) { + var clause = this.startNode() + this.next() + this.expect(tt.parenL) + clause.param = this.parseBindingAtom() + this.checkLVal(clause.param, true) + this.expect(tt.parenR) + clause.body = this.parseBlock() + node.handler = this.finishNode(clause, "CatchClause") + } + node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null + if (!node.handler && !node.finalizer) + this.raise(node.start, "Missing catch or finally clause") + return this.finishNode(node, "TryStatement") +} + +pp$1.parseVarStatement = function(node, kind) { + this.next() + this.parseVar(node, false, kind) + this.semicolon() + return this.finishNode(node, "VariableDeclaration") +} + +pp$1.parseWhileStatement = function(node) { + this.next() + node.test = this.parseParenExpression() + this.labels.push(loopLabel) + node.body = this.parseStatement(false) + this.labels.pop() + return this.finishNode(node, "WhileStatement") +} + +pp$1.parseWithStatement = function(node) { + if (this.strict) this.raise(this.start, "'with' in strict mode") + this.next() + node.object = this.parseParenExpression() + node.body = this.parseStatement(false) + return this.finishNode(node, "WithStatement") +} + +pp$1.parseEmptyStatement = function(node) { + this.next() + return this.finishNode(node, "EmptyStatement") +} + +pp$1.parseLabeledStatement = function(node, maybeName, expr) { + var this$1 = this; + + for (var i = 0; i < this.labels.length; ++i) + if (this$1.labels[i].name === maybeName) this$1.raise(expr.start, "Label '" + maybeName + "' is already declared") + var kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null + for (var i$1 = this.labels.length - 1; i$1 >= 0; i$1--) { + var label = this$1.labels[i$1] + if (label.statementStart == node.start) { + label.statementStart = this$1.start + label.kind = kind + } else break + } + this.labels.push({name: maybeName, kind: kind, statementStart: this.start}) + node.body = this.parseStatement(true) + this.labels.pop() + node.label = expr + return this.finishNode(node, "LabeledStatement") +} + +pp$1.parseExpressionStatement = function(node, expr) { + node.expression = expr + this.semicolon() + return this.finishNode(node, "ExpressionStatement") +} + +// Parse a semicolon-enclosed block of statements, handling `"use +// strict"` declarations when `allowStrict` is true (used for +// function bodies). + +pp$1.parseBlock = function(allowStrict) { + var this$1 = this; + + var node = this.startNode(), first = true, oldStrict + node.body = [] + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + var stmt = this$1.parseStatement(true) + node.body.push(stmt) + if (first && allowStrict && this$1.isUseStrict(stmt)) { + oldStrict = this$1.strict + this$1.setStrict(this$1.strict = true) + } + first = false + } + if (oldStrict === false) this.setStrict(false) + return this.finishNode(node, "BlockStatement") +} + +// Parse a regular `for` loop. The disambiguation code in +// `parseStatement` will already have parsed the init statement or +// expression. + +pp$1.parseFor = function(node, init) { + node.init = init + this.expect(tt.semi) + node.test = this.type === tt.semi ? null : this.parseExpression() + this.expect(tt.semi) + node.update = this.type === tt.parenR ? null : this.parseExpression() + this.expect(tt.parenR) + node.body = this.parseStatement(false) + this.labels.pop() + return this.finishNode(node, "ForStatement") +} + +// Parse a `for`/`in` and `for`/`of` loop, which are almost +// same from parser's perspective. + +pp$1.parseForIn = function(node, init) { + var type = this.type === tt._in ? "ForInStatement" : "ForOfStatement" + this.next() + node.left = init + node.right = this.parseExpression() + this.expect(tt.parenR) + node.body = this.parseStatement(false) + this.labels.pop() + return this.finishNode(node, type) +} + +// Parse a list of variable declarations. + +pp$1.parseVar = function(node, isFor, kind) { + var this$1 = this; + + node.declarations = [] + node.kind = kind + for (;;) { + var decl = this$1.startNode() + this$1.parseVarId(decl) + if (this$1.eat(tt.eq)) { + decl.init = this$1.parseMaybeAssign(isFor) + } else if (kind === "const" && !(this$1.type === tt._in || (this$1.options.ecmaVersion >= 6 && this$1.isContextual("of")))) { + this$1.unexpected() + } else if (decl.id.type != "Identifier" && !(isFor && (this$1.type === tt._in || this$1.isContextual("of")))) { + this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value") + } else { + decl.init = null + } + node.declarations.push(this$1.finishNode(decl, "VariableDeclarator")) + if (!this$1.eat(tt.comma)) break + } + return node +} + +pp$1.parseVarId = function(decl) { + decl.id = this.parseBindingAtom() + this.checkLVal(decl.id, true) +} + +// Parse a function declaration or literal (depending on the +// `isStatement` parameter). + +pp$1.parseFunction = function(node, isStatement, allowExpressionBody) { + this.initFunction(node) + if (this.options.ecmaVersion >= 6) + node.generator = this.eat(tt.star) + var oldInGen = this.inGenerator + this.inGenerator = node.generator + if (isStatement || this.type === tt.name) + node.id = this.parseIdent() + this.parseFunctionParams(node) + this.parseFunctionBody(node, allowExpressionBody) + this.inGenerator = oldInGen + return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression") +} + +pp$1.parseFunctionParams = function(node) { + this.expect(tt.parenL) + node.params = this.parseBindingList(tt.parenR, false, false, true) +} + +// Parse a class declaration or literal (depending on the +// `isStatement` parameter). + +pp$1.parseClass = function(node, isStatement) { + var this$1 = this; + + this.next() + this.parseClassId(node, isStatement) + this.parseClassSuper(node) + var classBody = this.startNode() + var hadConstructor = false + classBody.body = [] + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + if (this$1.eat(tt.semi)) continue + var method = this$1.startNode() + var isGenerator = this$1.eat(tt.star) + var isMaybeStatic = this$1.type === tt.name && this$1.value === "static" + this$1.parsePropertyName(method) + method.static = isMaybeStatic && this$1.type !== tt.parenL + if (method.static) { + if (isGenerator) this$1.unexpected() + isGenerator = this$1.eat(tt.star) + this$1.parsePropertyName(method) + } + method.kind = "method" + var isGetSet = false + if (!method.computed) { + var key = method.key; + if (!isGenerator && key.type === "Identifier" && this$1.type !== tt.parenL && (key.name === "get" || key.name === "set")) { + isGetSet = true + method.kind = key.name + key = this$1.parsePropertyName(method) + } + if (!method.static && (key.type === "Identifier" && key.name === "constructor" || + key.type === "Literal" && key.value === "constructor")) { + if (hadConstructor) this$1.raise(key.start, "Duplicate constructor in the same class") + if (isGetSet) this$1.raise(key.start, "Constructor can't have get/set modifier") + if (isGenerator) this$1.raise(key.start, "Constructor can't be a generator") + method.kind = "constructor" + hadConstructor = true + } + } + this$1.parseClassMethod(classBody, method, isGenerator) + if (isGetSet) { + var paramCount = method.kind === "get" ? 0 : 1 + if (method.value.params.length !== paramCount) { + var start = method.value.start + if (method.kind === "get") + this$1.raiseRecoverable(start, "getter should have no params") + else + this$1.raiseRecoverable(start, "setter should have exactly one param") + } + if (method.kind === "set" && method.value.params[0].type === "RestElement") + this$1.raise(method.value.params[0].start, "Setter cannot use rest params") + } + } + node.body = this.finishNode(classBody, "ClassBody") + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") +} + +pp$1.parseClassMethod = function(classBody, method, isGenerator) { + method.value = this.parseMethod(isGenerator) + classBody.body.push(this.finishNode(method, "MethodDefinition")) +} + +pp$1.parseClassId = function(node, isStatement) { + node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null +} + +pp$1.parseClassSuper = function(node) { + node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null +} + +// Parses module export declaration. + +pp$1.parseExport = function(node) { + var this$1 = this; + + this.next() + // export * from '...' + if (this.eat(tt.star)) { + this.expectContextual("from") + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected() + this.semicolon() + return this.finishNode(node, "ExportAllDeclaration") + } + if (this.eat(tt._default)) { // export default ... + var parens = this.type == tt.parenL + var expr = this.parseMaybeAssign() + var needsSemi = true + if (!parens && (expr.type == "FunctionExpression" || + expr.type == "ClassExpression")) { + needsSemi = false + if (expr.id) { + expr.type = expr.type == "FunctionExpression" + ? "FunctionDeclaration" + : "ClassDeclaration" + } + } + node.declaration = expr + if (needsSemi) this.semicolon() + return this.finishNode(node, "ExportDefaultDeclaration") + } + // export var|const|let|function|class ... + if (this.shouldParseExportStatement()) { + node.declaration = this.parseStatement(true) + node.specifiers = [] + node.source = null + } else { // export { x, y as z } [from '...'] + node.declaration = null + node.specifiers = this.parseExportSpecifiers() + if (this.eatContextual("from")) { + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected() + } else { + // check for keywords used as local names + for (var i = 0; i < node.specifiers.length; i++) { + if (this$1.keywords.test(node.specifiers[i].local.name) || this$1.reservedWords.test(node.specifiers[i].local.name)) { + this$1.unexpected(node.specifiers[i].local.start) + } + } + + node.source = null + } + this.semicolon() + } + return this.finishNode(node, "ExportNamedDeclaration") +} + +pp$1.shouldParseExportStatement = function() { + return this.type.keyword || this.isLet() +} + +// Parses a comma-separated list of module exports. + +pp$1.parseExportSpecifiers = function() { + var this$1 = this; + + var nodes = [], first = true + // export { x, y as z } [from '...'] + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + if (!first) { + this$1.expect(tt.comma) + if (this$1.afterTrailingComma(tt.braceR)) break + } else first = false + + var node = this$1.startNode() + node.local = this$1.parseIdent(this$1.type === tt._default) + node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local + nodes.push(this$1.finishNode(node, "ExportSpecifier")) + } + return nodes +} + +// Parses import declaration. + +pp$1.parseImport = function(node) { + this.next() + // import '...' + if (this.type === tt.string) { + node.specifiers = empty + node.source = this.parseExprAtom() + } else { + node.specifiers = this.parseImportSpecifiers() + this.expectContextual("from") + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected() + } + this.semicolon() + return this.finishNode(node, "ImportDeclaration") +} + +// Parses a comma-separated list of module imports. + +pp$1.parseImportSpecifiers = function() { + var this$1 = this; + + var nodes = [], first = true + if (this.type === tt.name) { + // import defaultObj, { x, y as z } from '...' + var node = this.startNode() + node.local = this.parseIdent() + this.checkLVal(node.local, true) + nodes.push(this.finishNode(node, "ImportDefaultSpecifier")) + if (!this.eat(tt.comma)) return nodes + } + if (this.type === tt.star) { + var node$1 = this.startNode() + this.next() + this.expectContextual("as") + node$1.local = this.parseIdent() + this.checkLVal(node$1.local, true) + nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")) + return nodes + } + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + if (!first) { + this$1.expect(tt.comma) + if (this$1.afterTrailingComma(tt.braceR)) break + } else first = false + + var node$2 = this$1.startNode() + node$2.imported = this$1.parseIdent(true) + if (this$1.eatContextual("as")) { + node$2.local = this$1.parseIdent() + } else { + node$2.local = node$2.imported + if (this$1.isKeyword(node$2.local.name)) this$1.unexpected(node$2.local.start) + if (this$1.reservedWordsStrict.test(node$2.local.name)) this$1.raise(node$2.local.start, "The keyword '" + node$2.local.name + "' is reserved") + } + this$1.checkLVal(node$2.local, true) + nodes.push(this$1.finishNode(node$2, "ImportSpecifier")) + } + return nodes +} + +var pp$2 = Parser.prototype + +// Convert existing expression atom to assignable pattern +// if possible. + +pp$2.toAssignable = function(node, isBinding) { + var this$1 = this; + + if (this.options.ecmaVersion >= 6 && node) { + switch (node.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + break + + case "ObjectExpression": + node.type = "ObjectPattern" + for (var i = 0; i < node.properties.length; i++) { + var prop = node.properties[i] + if (prop.kind !== "init") this$1.raise(prop.key.start, "Object pattern can't contain getter or setter") + this$1.toAssignable(prop.value, isBinding) + } + break + + case "ArrayExpression": + node.type = "ArrayPattern" + this.toAssignableList(node.elements, isBinding) + break + + case "AssignmentExpression": + if (node.operator === "=") { + node.type = "AssignmentPattern" + delete node.operator + // falls through to AssignmentPattern + } else { + this.raise(node.left.end, "Only '=' operator can be used for specifying default value.") + break + } + + case "AssignmentPattern": + if (node.right.type === "YieldExpression") + this.raise(node.right.start, "Yield expression cannot be a default value") + break + + case "ParenthesizedExpression": + node.expression = this.toAssignable(node.expression, isBinding) + break + + case "MemberExpression": + if (!isBinding) break + + default: + this.raise(node.start, "Assigning to rvalue") + } + } + return node +} + +// Convert list of expression atoms to binding list. + +pp$2.toAssignableList = function(exprList, isBinding) { + var this$1 = this; + + var end = exprList.length + if (end) { + var last = exprList[end - 1] + if (last && last.type == "RestElement") { + --end + } else if (last && last.type == "SpreadElement") { + last.type = "RestElement" + var arg = last.argument + this.toAssignable(arg, isBinding) + if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") + this.unexpected(arg.start) + --end + } + + if (isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") + this.unexpected(last.argument.start) + } + for (var i = 0; i < end; i++) { + var elt = exprList[i] + if (elt) this$1.toAssignable(elt, isBinding) + } + return exprList +} + +// Parses spread element. + +pp$2.parseSpread = function(refDestructuringErrors) { + var node = this.startNode() + this.next() + node.argument = this.parseMaybeAssign(false, refDestructuringErrors) + return this.finishNode(node, "SpreadElement") +} + +pp$2.parseRest = function(allowNonIdent) { + var node = this.startNode() + this.next() + + // RestElement inside of a function parameter must be an identifier + if (allowNonIdent) node.argument = this.type === tt.name ? this.parseIdent() : this.unexpected() + else node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected() + + return this.finishNode(node, "RestElement") +} + +// Parses lvalue (assignable) atom. + +pp$2.parseBindingAtom = function() { + if (this.options.ecmaVersion < 6) return this.parseIdent() + switch (this.type) { + case tt.name: + return this.parseIdent() + + case tt.bracketL: + var node = this.startNode() + this.next() + node.elements = this.parseBindingList(tt.bracketR, true, true) + return this.finishNode(node, "ArrayPattern") + + case tt.braceL: + return this.parseObj(true) + + default: + this.unexpected() + } +} + +pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowNonIdent) { + var this$1 = this; + + var elts = [], first = true + while (!this.eat(close)) { + if (first) first = false + else this$1.expect(tt.comma) + if (allowEmpty && this$1.type === tt.comma) { + elts.push(null) + } else if (allowTrailingComma && this$1.afterTrailingComma(close)) { + break + } else if (this$1.type === tt.ellipsis) { + var rest = this$1.parseRest(allowNonIdent) + this$1.parseBindingListItem(rest) + elts.push(rest) + if (this$1.type === tt.comma) this$1.raise(this$1.start, "Comma is not permitted after the rest element") + this$1.expect(close) + break + } else { + var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc) + this$1.parseBindingListItem(elem) + elts.push(elem) + } + } + return elts +} + +pp$2.parseBindingListItem = function(param) { + return param +} + +// Parses assignment pattern around given atom if possible. + +pp$2.parseMaybeDefault = function(startPos, startLoc, left) { + left = left || this.parseBindingAtom() + if (this.options.ecmaVersion < 6 || !this.eat(tt.eq)) return left + var node = this.startNodeAt(startPos, startLoc) + node.left = left + node.right = this.parseMaybeAssign() + return this.finishNode(node, "AssignmentPattern") +} + +// Verify that a node is an lval — something that can be assigned +// to. + +pp$2.checkLVal = function(expr, isBinding, checkClashes) { + var this$1 = this; + + switch (expr.type) { + case "Identifier": + if (this.strict && this.reservedWordsStrictBind.test(expr.name)) + this.raiseRecoverable(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode") + if (checkClashes) { + if (has(checkClashes, expr.name)) + this.raiseRecoverable(expr.start, "Argument name clash") + checkClashes[expr.name] = true + } + break + + case "MemberExpression": + if (isBinding) this.raiseRecoverable(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression") + break + + case "ObjectPattern": + for (var i = 0; i < expr.properties.length; i++) + this$1.checkLVal(expr.properties[i].value, isBinding, checkClashes) + break + + case "ArrayPattern": + for (var i$1 = 0; i$1 < expr.elements.length; i$1++) { + var elem = expr.elements[i$1] + if (elem) this$1.checkLVal(elem, isBinding, checkClashes) + } + break + + case "AssignmentPattern": + this.checkLVal(expr.left, isBinding, checkClashes) + break + + case "RestElement": + this.checkLVal(expr.argument, isBinding, checkClashes) + break + + case "ParenthesizedExpression": + this.checkLVal(expr.expression, isBinding, checkClashes) + break + + default: + this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue") + } +} + +var pp$3 = Parser.prototype + +// Check if property name clashes with already added. +// Object/class getters and setters are not allowed to clash — +// either with each other or with an init property — and in +// strict mode, init properties are also not allowed to be repeated. + +pp$3.checkPropClash = function(prop, propHash) { + if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) + return + var key = prop.key; + var name + switch (key.type) { + case "Identifier": name = key.name; break + case "Literal": name = String(key.value); break + default: return + } + var kind = prop.kind; + if (this.options.ecmaVersion >= 6) { + if (name === "__proto__" && kind === "init") { + if (propHash.proto) this.raiseRecoverable(key.start, "Redefinition of __proto__ property") + propHash.proto = true + } + return + } + name = "$" + name + var other = propHash[name] + if (other) { + var isGetSet = kind !== "init" + if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) + this.raiseRecoverable(key.start, "Redefinition of property") + } else { + other = propHash[name] = { + init: false, + get: false, + set: false + } + } + other[kind] = true +} + +// ### Expression parsing + +// These nest, from the most general expression type at the top to +// 'atomic', nondivisible expression types at the bottom. Most of +// the functions will simply let the function(s) below them parse, +// and, *if* the syntactic construct they handle is present, wrap +// the AST node that the inner parser gave them in another node. + +// Parse a full expression. The optional arguments are used to +// forbid the `in` operator (in for loops initalization expressions) +// and provide reference for storing '=' operator inside shorthand +// property assignment in contexts where both object expression +// and object pattern might appear (so it's possible to raise +// delayed syntax error at correct position). + +pp$3.parseExpression = function(noIn, refDestructuringErrors) { + var this$1 = this; + + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseMaybeAssign(noIn, refDestructuringErrors) + if (this.type === tt.comma) { + var node = this.startNodeAt(startPos, startLoc) + node.expressions = [expr] + while (this.eat(tt.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors)) + return this.finishNode(node, "SequenceExpression") + } + return expr +} + +// Parse an assignment expression. This includes applications of +// operators like `+=`. + +pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { + if (this.inGenerator && this.isContextual("yield")) return this.parseYield() + + var ownDestructuringErrors = false + if (!refDestructuringErrors) { + refDestructuringErrors = new DestructuringErrors + ownDestructuringErrors = true + } + var startPos = this.start, startLoc = this.startLoc + if (this.type == tt.parenL || this.type == tt.name) + this.potentialArrowAt = this.start + var left = this.parseMaybeConditional(noIn, refDestructuringErrors) + if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc) + if (this.type.isAssign) { + this.checkPatternErrors(refDestructuringErrors, true) + if (!ownDestructuringErrors) DestructuringErrors.call(refDestructuringErrors) + var node = this.startNodeAt(startPos, startLoc) + node.operator = this.value + node.left = this.type === tt.eq ? this.toAssignable(left) : left + refDestructuringErrors.shorthandAssign = 0 // reset because shorthand default was used correctly + this.checkLVal(left) + this.next() + node.right = this.parseMaybeAssign(noIn) + return this.finishNode(node, "AssignmentExpression") + } else { + if (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true) + } + return left +} + +// Parse a ternary conditional (`?:`) operator. + +pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseExprOps(noIn, refDestructuringErrors) + if (this.checkExpressionErrors(refDestructuringErrors)) return expr + if (this.eat(tt.question)) { + var node = this.startNodeAt(startPos, startLoc) + node.test = expr + node.consequent = this.parseMaybeAssign() + this.expect(tt.colon) + node.alternate = this.parseMaybeAssign(noIn) + return this.finishNode(node, "ConditionalExpression") + } + return expr +} + +// Start the precedence parser. + +pp$3.parseExprOps = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseMaybeUnary(refDestructuringErrors, false) + if (this.checkExpressionErrors(refDestructuringErrors)) return expr + return this.parseExprOp(expr, startPos, startLoc, -1, noIn) +} + +// Parse binary operators with the operator precedence parsing +// algorithm. `left` is the left-hand side of the operator. +// `minPrec` provides context that allows the function to stop and +// defer further parser to one of its callers when it encounters an +// operator that has a lower precedence than the set it is parsing. + +pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { + var prec = this.type.binop + if (prec != null && (!noIn || this.type !== tt._in)) { + if (prec > minPrec) { + var logical = this.type === tt.logicalOR || this.type === tt.logicalAND + var op = this.value + this.next() + var startPos = this.start, startLoc = this.startLoc + var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn) + var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical) + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) + } + } + return left +} + +pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) { + var node = this.startNodeAt(startPos, startLoc) + node.left = left + node.operator = op + node.right = right + return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") +} + +// Parse unary operators, both prefix and postfix. + +pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { + var this$1 = this; + + var startPos = this.start, startLoc = this.startLoc, expr + if (this.type.prefix) { + var node = this.startNode(), update = this.type === tt.incDec + node.operator = this.value + node.prefix = true + this.next() + node.argument = this.parseMaybeUnary(null, true) + this.checkExpressionErrors(refDestructuringErrors, true) + if (update) this.checkLVal(node.argument) + else if (this.strict && node.operator === "delete" && + node.argument.type === "Identifier") + this.raiseRecoverable(node.start, "Deleting local variable in strict mode") + else sawUnary = true + expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression") + } else { + expr = this.parseExprSubscripts(refDestructuringErrors) + if (this.checkExpressionErrors(refDestructuringErrors)) return expr + while (this.type.postfix && !this.canInsertSemicolon()) { + var node$1 = this$1.startNodeAt(startPos, startLoc) + node$1.operator = this$1.value + node$1.prefix = false + node$1.argument = expr + this$1.checkLVal(expr) + this$1.next() + expr = this$1.finishNode(node$1, "UpdateExpression") + } + } + + if (!sawUnary && this.eat(tt.starstar)) + return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) + else + return expr +} + +// Parse call, dot, and `[]`-subscript expressions. + +pp$3.parseExprSubscripts = function(refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseExprAtom(refDestructuringErrors) + var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")" + if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) return expr + return this.parseSubscripts(expr, startPos, startLoc) +} + +pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { + var this$1 = this; + + for (;;) { + if (this$1.eat(tt.dot)) { + var node = this$1.startNodeAt(startPos, startLoc) + node.object = base + node.property = this$1.parseIdent(true) + node.computed = false + base = this$1.finishNode(node, "MemberExpression") + } else if (this$1.eat(tt.bracketL)) { + var node$1 = this$1.startNodeAt(startPos, startLoc) + node$1.object = base + node$1.property = this$1.parseExpression() + node$1.computed = true + this$1.expect(tt.bracketR) + base = this$1.finishNode(node$1, "MemberExpression") + } else if (!noCalls && this$1.eat(tt.parenL)) { + var node$2 = this$1.startNodeAt(startPos, startLoc) + node$2.callee = base + node$2.arguments = this$1.parseExprList(tt.parenR, false) + base = this$1.finishNode(node$2, "CallExpression") + } else if (this$1.type === tt.backQuote) { + var node$3 = this$1.startNodeAt(startPos, startLoc) + node$3.tag = base + node$3.quasi = this$1.parseTemplate() + base = this$1.finishNode(node$3, "TaggedTemplateExpression") + } else { + return base + } + } +} + +// Parse an atomic expression — either a single token that is an +// expression, an expression started by a keyword like `function` or +// `new`, or an expression wrapped in punctuation like `()`, `[]`, +// or `{}`. + +pp$3.parseExprAtom = function(refDestructuringErrors) { + var node, canBeArrow = this.potentialArrowAt == this.start + switch (this.type) { + case tt._super: + if (!this.inFunction) + this.raise(this.start, "'super' outside of function or class") + + case tt._this: + var type = this.type === tt._this ? "ThisExpression" : "Super" + node = this.startNode() + this.next() + return this.finishNode(node, type) + + case tt.name: + var startPos = this.start, startLoc = this.startLoc + var id = this.parseIdent(this.type !== tt.name) + if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id]) + return id + + case tt.regexp: + var value = this.value + node = this.parseLiteral(value.value) + node.regex = {pattern: value.pattern, flags: value.flags} + return node + + case tt.num: case tt.string: + return this.parseLiteral(this.value) + + case tt._null: case tt._true: case tt._false: + node = this.startNode() + node.value = this.type === tt._null ? null : this.type === tt._true + node.raw = this.type.keyword + this.next() + return this.finishNode(node, "Literal") + + case tt.parenL: + return this.parseParenAndDistinguishExpression(canBeArrow) + + case tt.bracketL: + node = this.startNode() + this.next() + node.elements = this.parseExprList(tt.bracketR, true, true, refDestructuringErrors) + return this.finishNode(node, "ArrayExpression") + + case tt.braceL: + return this.parseObj(false, refDestructuringErrors) + + case tt._function: + node = this.startNode() + this.next() + return this.parseFunction(node, false) + + case tt._class: + return this.parseClass(this.startNode(), false) + + case tt._new: + return this.parseNew() + + case tt.backQuote: + return this.parseTemplate() + + default: + this.unexpected() + } +} + +pp$3.parseLiteral = function(value) { + var node = this.startNode() + node.value = value + node.raw = this.input.slice(this.start, this.end) + this.next() + return this.finishNode(node, "Literal") +} + +pp$3.parseParenExpression = function() { + this.expect(tt.parenL) + var val = this.parseExpression() + this.expect(tt.parenR) + return val +} + +pp$3.parseParenAndDistinguishExpression = function(canBeArrow) { + var this$1 = this; + + var startPos = this.start, startLoc = this.startLoc, val + if (this.options.ecmaVersion >= 6) { + this.next() + + var innerStartPos = this.start, innerStartLoc = this.startLoc + var exprList = [], first = true + var refDestructuringErrors = new DestructuringErrors, spreadStart, innerParenStart + while (this.type !== tt.parenR) { + first ? first = false : this$1.expect(tt.comma) + if (this$1.type === tt.ellipsis) { + spreadStart = this$1.start + exprList.push(this$1.parseParenItem(this$1.parseRest())) + break + } else { + if (this$1.type === tt.parenL && !innerParenStart) { + innerParenStart = this$1.start + } + exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem)) + } + } + var innerEndPos = this.start, innerEndLoc = this.startLoc + this.expect(tt.parenR) + + if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) { + this.checkPatternErrors(refDestructuringErrors, true) + if (innerParenStart) this.unexpected(innerParenStart) + return this.parseParenArrowList(startPos, startLoc, exprList) + } + + if (!exprList.length) this.unexpected(this.lastTokStart) + if (spreadStart) this.unexpected(spreadStart) + this.checkExpressionErrors(refDestructuringErrors, true) + + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc) + val.expressions = exprList + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc) + } else { + val = exprList[0] + } + } else { + val = this.parseParenExpression() + } + + if (this.options.preserveParens) { + var par = this.startNodeAt(startPos, startLoc) + par.expression = val + return this.finishNode(par, "ParenthesizedExpression") + } else { + return val + } +} + +pp$3.parseParenItem = function(item) { + return item +} + +pp$3.parseParenArrowList = function(startPos, startLoc, exprList) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) +} + +// New's precedence is slightly tricky. It must allow its argument to +// be a `[]` or dot subscript expression, but not a call — at least, +// not without wrapping it in parentheses. Thus, it uses the noCalls +// argument to parseSubscripts to prevent it from consuming the +// argument list. + +var empty$1 = [] + +pp$3.parseNew = function() { + var node = this.startNode() + var meta = this.parseIdent(true) + if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) { + node.meta = meta + node.property = this.parseIdent(true) + if (node.property.name !== "target") + this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target") + if (!this.inFunction) + this.raiseRecoverable(node.start, "new.target can only be used in functions") + return this.finishNode(node, "MetaProperty") + } + var startPos = this.start, startLoc = this.startLoc + node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true) + if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false) + else node.arguments = empty$1 + return this.finishNode(node, "NewExpression") +} + +// Parse template expression. + +pp$3.parseTemplateElement = function() { + var elem = this.startNode() + elem.value = { + raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'), + cooked: this.value + } + this.next() + elem.tail = this.type === tt.backQuote + return this.finishNode(elem, "TemplateElement") +} + +pp$3.parseTemplate = function() { + var this$1 = this; + + var node = this.startNode() + this.next() + node.expressions = [] + var curElt = this.parseTemplateElement() + node.quasis = [curElt] + while (!curElt.tail) { + this$1.expect(tt.dollarBraceL) + node.expressions.push(this$1.parseExpression()) + this$1.expect(tt.braceR) + node.quasis.push(curElt = this$1.parseTemplateElement()) + } + this.next() + return this.finishNode(node, "TemplateLiteral") +} + +// Parse an object literal or binding pattern. + +pp$3.parseObj = function(isPattern, refDestructuringErrors) { + var this$1 = this; + + var node = this.startNode(), first = true, propHash = {} + node.properties = [] + this.next() + while (!this.eat(tt.braceR)) { + if (!first) { + this$1.expect(tt.comma) + if (this$1.afterTrailingComma(tt.braceR)) break + } else first = false + + var prop = this$1.startNode(), isGenerator, startPos, startLoc + if (this$1.options.ecmaVersion >= 6) { + prop.method = false + prop.shorthand = false + if (isPattern || refDestructuringErrors) { + startPos = this$1.start + startLoc = this$1.startLoc + } + if (!isPattern) + isGenerator = this$1.eat(tt.star) + } + this$1.parsePropertyName(prop) + this$1.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) + this$1.checkPropClash(prop, propHash) + node.properties.push(this$1.finishNode(prop, "Property")) + } + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") +} + +pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) { + if (this.eat(tt.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors) + prop.kind = "init" + } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) { + if (isPattern) this.unexpected() + prop.kind = "init" + prop.method = true + prop.value = this.parseMethod(isGenerator) + } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && + (prop.key.name === "get" || prop.key.name === "set") && + (this.type != tt.comma && this.type != tt.braceR)) { + if (isGenerator || isPattern) this.unexpected() + prop.kind = prop.key.name + this.parsePropertyName(prop) + prop.value = this.parseMethod(false) + var paramCount = prop.kind === "get" ? 0 : 1 + if (prop.value.params.length !== paramCount) { + var start = prop.value.start + if (prop.kind === "get") + this.raiseRecoverable(start, "getter should have no params") + else + this.raiseRecoverable(start, "setter should have exactly one param") + } + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") + this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params") + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + if (this.keywords.test(prop.key.name) || + (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(prop.key.name) || + (this.inGenerator && prop.key.name == "yield")) + this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property") + prop.kind = "init" + if (isPattern) { + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key) + } else if (this.type === tt.eq && refDestructuringErrors) { + if (!refDestructuringErrors.shorthandAssign) + refDestructuringErrors.shorthandAssign = this.start + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key) + } else { + prop.value = prop.key + } + prop.shorthand = true + } else this.unexpected() +} + +pp$3.parsePropertyName = function(prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(tt.bracketL)) { + prop.computed = true + prop.key = this.parseMaybeAssign() + this.expect(tt.bracketR) + return prop.key + } else { + prop.computed = false + } + } + return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true) +} + +// Initialize empty function node. + +pp$3.initFunction = function(node) { + node.id = null + if (this.options.ecmaVersion >= 6) { + node.generator = false + node.expression = false + } +} + +// Parse object or class method. + +pp$3.parseMethod = function(isGenerator) { + var node = this.startNode(), oldInGen = this.inGenerator + this.inGenerator = isGenerator + this.initFunction(node) + this.expect(tt.parenL) + node.params = this.parseBindingList(tt.parenR, false, false) + if (this.options.ecmaVersion >= 6) + node.generator = isGenerator + this.parseFunctionBody(node, false) + this.inGenerator = oldInGen + return this.finishNode(node, "FunctionExpression") +} + +// Parse arrow function expression with given parameters. + +pp$3.parseArrowExpression = function(node, params) { + var oldInGen = this.inGenerator + this.inGenerator = false + this.initFunction(node) + node.params = this.toAssignableList(params, true) + this.parseFunctionBody(node, true) + this.inGenerator = oldInGen + return this.finishNode(node, "ArrowFunctionExpression") +} + +// Parse function body and check parameters. + +pp$3.parseFunctionBody = function(node, isArrowFunction) { + var isExpression = isArrowFunction && this.type !== tt.braceL + + if (isExpression) { + node.body = this.parseMaybeAssign() + node.expression = true + } else { + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldInFunc = this.inFunction, oldLabels = this.labels + this.inFunction = true; this.labels = [] + node.body = this.parseBlock(true) + node.expression = false + this.inFunction = oldInFunc; this.labels = oldLabels + } + + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + var useStrict = (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) ? node.body.body[0] : null; + if (this.strict || useStrict) { + var oldStrict = this.strict + this.strict = true + if (node.id) + this.checkLVal(node.id, true) + this.checkParams(node, useStrict) + this.strict = oldStrict + } else if (isArrowFunction) { + this.checkParams(node, useStrict) + } +} + +// Checks function params for various disallowed patterns such as using "eval" +// or "arguments" and duplicate parameters. + +pp$3.checkParams = function(node, useStrict) { + var this$1 = this; + + var nameHash = {} + for (var i = 0; i < node.params.length; i++) { + if (useStrict && this$1.options.ecmaVersion >= 7 && node.params[i].type !== "Identifier") + this$1.raiseRecoverable(useStrict.start, "Illegal 'use strict' directive in function with non-simple parameter list"); + this$1.checkLVal(node.params[i], true, nameHash) + } +} + +// Parses a comma-separated list of expressions, and returns them as +// an array. `close` is the token type that ends the list, and +// `allowEmpty` can be turned on to allow subsequent commas with +// nothing in between them to be parsed as `null` (which is needed +// for array literals). + +pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { + var this$1 = this; + + var elts = [], first = true + while (!this.eat(close)) { + if (!first) { + this$1.expect(tt.comma) + if (allowTrailingComma && this$1.afterTrailingComma(close)) break + } else first = false + + var elt + if (allowEmpty && this$1.type === tt.comma) + elt = null + else if (this$1.type === tt.ellipsis) { + elt = this$1.parseSpread(refDestructuringErrors) + if (this$1.type === tt.comma && refDestructuringErrors && !refDestructuringErrors.trailingComma) { + refDestructuringErrors.trailingComma = this$1.lastTokStart + } + } else + elt = this$1.parseMaybeAssign(false, refDestructuringErrors) + elts.push(elt) + } + return elts +} + +// Parse the next token as an identifier. If `liberal` is true (used +// when parsing properties), it will also convert keywords into +// identifiers. + +pp$3.parseIdent = function(liberal) { + var node = this.startNode() + if (liberal && this.options.allowReserved == "never") liberal = false + if (this.type === tt.name) { + if (!liberal && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(this.value) && + (this.options.ecmaVersion >= 6 || + this.input.slice(this.start, this.end).indexOf("\\") == -1)) + this.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved") + if (!liberal && this.inGenerator && this.value === "yield") + this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator") + node.name = this.value + } else if (liberal && this.type.keyword) { + node.name = this.type.keyword + } else { + this.unexpected() + } + this.next() + return this.finishNode(node, "Identifier") +} + +// Parses yield expression inside generator. + +pp$3.parseYield = function() { + var node = this.startNode() + this.next() + if (this.type == tt.semi || this.canInsertSemicolon() || (this.type != tt.star && !this.type.startsExpr)) { + node.delegate = false + node.argument = null + } else { + node.delegate = this.eat(tt.star) + node.argument = this.parseMaybeAssign() + } + return this.finishNode(node, "YieldExpression") +} + +var pp$4 = Parser.prototype + +// This function is used to raise exceptions on parse errors. It +// takes an offset integer (into the current `input`) to indicate +// the location of the error, attaches the position to the end +// of the error message, and then raises a `SyntaxError` with that +// message. + +pp$4.raise = function(pos, message) { + var loc = getLineInfo(this.input, pos) + message += " (" + loc.line + ":" + loc.column + ")" + var err = new SyntaxError(message) + err.pos = pos; err.loc = loc; err.raisedAt = this.pos + throw err +} + +pp$4.raiseRecoverable = pp$4.raise + +pp$4.curPosition = function() { + if (this.options.locations) { + return new Position(this.curLine, this.pos - this.lineStart) + } +} + +var Node = function Node(parser, pos, loc) { + this.type = "" + this.start = pos + this.end = 0 + if (parser.options.locations) + this.loc = new SourceLocation(parser, loc) + if (parser.options.directSourceFile) + this.sourceFile = parser.options.directSourceFile + if (parser.options.ranges) + this.range = [pos, 0] +}; + +// Start an AST node, attaching a start offset. + +var pp$5 = Parser.prototype + +pp$5.startNode = function() { + return new Node(this, this.start, this.startLoc) +} + +pp$5.startNodeAt = function(pos, loc) { + return new Node(this, pos, loc) +} + +// Finish an AST node, adding `type` and `end` properties. + +function finishNodeAt(node, type, pos, loc) { + node.type = type + node.end = pos + if (this.options.locations) + node.loc.end = loc + if (this.options.ranges) + node.range[1] = pos + return node +} + +pp$5.finishNode = function(node, type) { + return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) +} + +// Finish node at given position + +pp$5.finishNodeAt = function(node, type, pos, loc) { + return finishNodeAt.call(this, node, type, pos, loc) +} + +var TokContext = function TokContext(token, isExpr, preserveSpace, override) { + this.token = token + this.isExpr = !!isExpr + this.preserveSpace = !!preserveSpace + this.override = override +}; + +var types = { + b_stat: new TokContext("{", false), + b_expr: new TokContext("{", true), + b_tmpl: new TokContext("${", true), + p_stat: new TokContext("(", false), + p_expr: new TokContext("(", true), + q_tmpl: new TokContext("`", true, true, function (p) { return p.readTmplToken(); }), + f_expr: new TokContext("function", true) +} + +var pp$6 = Parser.prototype + +pp$6.initialContext = function() { + return [types.b_stat] +} + +pp$6.braceIsBlock = function(prevType) { + if (prevType === tt.colon) { + var parent = this.curContext() + if (parent === types.b_stat || parent === types.b_expr) + return !parent.isExpr + } + if (prevType === tt._return) + return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof || prevType === tt.parenR) + return true + if (prevType == tt.braceL) + return this.curContext() === types.b_stat + return !this.exprAllowed +} + +pp$6.updateContext = function(prevType) { + var update, type = this.type + if (type.keyword && prevType == tt.dot) + this.exprAllowed = false + else if (update = type.updateContext) + update.call(this, prevType) + else + this.exprAllowed = type.beforeExpr +} + +// Token-specific context update code + +tt.parenR.updateContext = tt.braceR.updateContext = function() { + if (this.context.length == 1) { + this.exprAllowed = true + return + } + var out = this.context.pop() + if (out === types.b_stat && this.curContext() === types.f_expr) { + this.context.pop() + this.exprAllowed = false + } else if (out === types.b_tmpl) { + this.exprAllowed = true + } else { + this.exprAllowed = !out.isExpr + } +} + +tt.braceL.updateContext = function(prevType) { + this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr) + this.exprAllowed = true +} + +tt.dollarBraceL.updateContext = function() { + this.context.push(types.b_tmpl) + this.exprAllowed = true +} + +tt.parenL.updateContext = function(prevType) { + var statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while + this.context.push(statementParens ? types.p_stat : types.p_expr) + this.exprAllowed = true +} + +tt.incDec.updateContext = function() { + // tokExprAllowed stays unchanged +} + +tt._function.updateContext = function(prevType) { + if (prevType.beforeExpr && prevType !== tt.semi && prevType !== tt._else && + !((prevType === tt.colon || prevType === tt.braceL) && this.curContext() === types.b_stat)) + this.context.push(types.f_expr) + this.exprAllowed = false +} + +tt.backQuote.updateContext = function() { + if (this.curContext() === types.q_tmpl) + this.context.pop() + else + this.context.push(types.q_tmpl) + this.exprAllowed = false +} + +// Object type used to represent tokens. Note that normally, tokens +// simply exist as properties on the parser object. This is only +// used for the onToken callback and the external tokenizer. + +var Token = function Token(p) { + this.type = p.type + this.value = p.value + this.start = p.start + this.end = p.end + if (p.options.locations) + this.loc = new SourceLocation(p, p.startLoc, p.endLoc) + if (p.options.ranges) + this.range = [p.start, p.end] +}; + +// ## Tokenizer + +var pp$7 = Parser.prototype + +// Are we running under Rhino? +var isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]" + +// Move to the next token + +pp$7.next = function() { + if (this.options.onToken) + this.options.onToken(new Token(this)) + + this.lastTokEnd = this.end + this.lastTokStart = this.start + this.lastTokEndLoc = this.endLoc + this.lastTokStartLoc = this.startLoc + this.nextToken() +} + +pp$7.getToken = function() { + this.next() + return new Token(this) +} + +// If we're in an ES6 environment, make parsers iterable +if (typeof Symbol !== "undefined") + pp$7[Symbol.iterator] = function () { + var self = this + return {next: function () { + var token = self.getToken() + return { + done: token.type === tt.eof, + value: token + } + }} + } + +// Toggle strict mode. Re-reads the next number or string to please +// pedantic tests (`"use strict"; 010;` should fail). + +pp$7.setStrict = function(strict) { + var this$1 = this; + + this.strict = strict + if (this.type !== tt.num && this.type !== tt.string) return + this.pos = this.start + if (this.options.locations) { + while (this.pos < this.lineStart) { + this$1.lineStart = this$1.input.lastIndexOf("\n", this$1.lineStart - 2) + 1 + --this$1.curLine + } + } + this.nextToken() +} + +pp$7.curContext = function() { + return this.context[this.context.length - 1] +} + +// Read a single token, updating the parser object's token-related +// properties. + +pp$7.nextToken = function() { + var curContext = this.curContext() + if (!curContext || !curContext.preserveSpace) this.skipSpace() + + this.start = this.pos + if (this.options.locations) this.startLoc = this.curPosition() + if (this.pos >= this.input.length) return this.finishToken(tt.eof) + + if (curContext.override) return curContext.override(this) + else this.readToken(this.fullCharCodeAtPos()) +} + +pp$7.readToken = function(code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) + return this.readWord() + + return this.getTokenFromCode(code) +} + +pp$7.fullCharCodeAtPos = function() { + var code = this.input.charCodeAt(this.pos) + if (code <= 0xd7ff || code >= 0xe000) return code + var next = this.input.charCodeAt(this.pos + 1) + return (code << 10) + next - 0x35fdc00 +} + +pp$7.skipBlockComment = function() { + var this$1 = this; + + var startLoc = this.options.onComment && this.curPosition() + var start = this.pos, end = this.input.indexOf("*/", this.pos += 2) + if (end === -1) this.raise(this.pos - 2, "Unterminated comment") + this.pos = end + 2 + if (this.options.locations) { + lineBreakG.lastIndex = start + var match + while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { + ++this$1.curLine + this$1.lineStart = match.index + match[0].length + } + } + if (this.options.onComment) + this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, + startLoc, this.curPosition()) +} + +pp$7.skipLineComment = function(startSkip) { + var this$1 = this; + + var start = this.pos + var startLoc = this.options.onComment && this.curPosition() + var ch = this.input.charCodeAt(this.pos+=startSkip) + while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { + ++this$1.pos + ch = this$1.input.charCodeAt(this$1.pos) + } + if (this.options.onComment) + this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, + startLoc, this.curPosition()) +} + +// Called at the start of the parse and after every token. Skips +// whitespace and comments, and. + +pp$7.skipSpace = function() { + var this$1 = this; + + loop: while (this.pos < this.input.length) { + var ch = this$1.input.charCodeAt(this$1.pos) + switch (ch) { + case 32: case 160: // ' ' + ++this$1.pos + break + case 13: + if (this$1.input.charCodeAt(this$1.pos + 1) === 10) { + ++this$1.pos + } + case 10: case 8232: case 8233: + ++this$1.pos + if (this$1.options.locations) { + ++this$1.curLine + this$1.lineStart = this$1.pos + } + break + case 47: // '/' + switch (this$1.input.charCodeAt(this$1.pos + 1)) { + case 42: // '*' + this$1.skipBlockComment() + break + case 47: + this$1.skipLineComment(2) + break + default: + break loop + } + break + default: + if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this$1.pos + } else { + break loop + } + } + } +} + +// Called at the end of every token. Sets `end`, `val`, and +// maintains `context` and `exprAllowed`, and skips the space after +// the token, so that the next one's `start` will point at the +// right position. + +pp$7.finishToken = function(type, val) { + this.end = this.pos + if (this.options.locations) this.endLoc = this.curPosition() + var prevType = this.type + this.type = type + this.value = val + + this.updateContext(prevType) +} + +// ### Token reading + +// This is the function that is called to fetch the next token. It +// is somewhat obscure, because it works in character codes rather +// than characters, and because operator parsing has been inlined +// into it. +// +// All in the name of speed. +// +pp$7.readToken_dot = function() { + var next = this.input.charCodeAt(this.pos + 1) + if (next >= 48 && next <= 57) return this.readNumber(true) + var next2 = this.input.charCodeAt(this.pos + 2) + if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' + this.pos += 3 + return this.finishToken(tt.ellipsis) + } else { + ++this.pos + return this.finishToken(tt.dot) + } +} + +pp$7.readToken_slash = function() { // '/' + var next = this.input.charCodeAt(this.pos + 1) + if (this.exprAllowed) {++this.pos; return this.readRegexp()} + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.slash, 1) +} + +pp$7.readToken_mult_modulo_exp = function(code) { // '%*' + var next = this.input.charCodeAt(this.pos + 1) + var size = 1 + var tokentype = code === 42 ? tt.star : tt.modulo + + // exponentiation operator ** and **= + if (this.options.ecmaVersion >= 7 && next === 42) { + ++size + tokentype = tt.starstar + next = this.input.charCodeAt(this.pos + 2) + } + + if (next === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tokentype, size) +} + +pp$7.readToken_pipe_amp = function(code) { // '|&' + var next = this.input.charCodeAt(this.pos + 1) + if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2) + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1) +} + +pp$7.readToken_caret = function() { // '^' + var next = this.input.charCodeAt(this.pos + 1) + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.bitwiseXOR, 1) +} + +pp$7.readToken_plus_min = function(code) { // '+-' + var next = this.input.charCodeAt(this.pos + 1) + if (next === code) { + if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && + lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) { + // A `-->` line comment + this.skipLineComment(3) + this.skipSpace() + return this.nextToken() + } + return this.finishOp(tt.incDec, 2) + } + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.plusMin, 1) +} + +pp$7.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1) + var size = 1 + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tt.bitShift, size) + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && + this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) this.unexpected() + // `` line comment + this.skipLineComment(3) + this.skipSpace() + return this.nextToken() + } + return this.finishOp(tt.incDec, 2) + } + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.plusMin, 1) + } + + pp$7.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1) + var size = 1 + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tt.bitShift, size) + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && + this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) this.unexpected() + // `` line comment + this.skipLineComment(3) + this.skipSpace() + return this.nextToken() + } + return this.finishOp(tt.incDec, 2) + } + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.plusMin, 1) +} + +pp.readToken_lt_gt = function(code) { // '<>' + let next = this.input.charCodeAt(this.pos + 1) + let size = 1 + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tt.bitShift, size) + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && + this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) this.unexpected() + // `` line comment + this.skipLineComment(3) + this.skipSpace() + return this.nextToken() + } + return this.finishOp(tt.incDec, 2) + } + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.plusMin, 1) +} + +pp$7.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1) + var size = 1 + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tt.bitShift, size) + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && + this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) this.unexpected() + // `` line comment + this.skipLineComment(3) + this.skipSpace() + return this.nextToken() + } + return this.finishOp(tt.incDec, 2) } + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.plusMin, 1) + } - // Properties of the current token: - // Its type - this.type = _tokentype.types.eof; - // For tokens that include more information than their type, the value - this.value = null; - // Its start and end offset - this.start = this.end = this.pos; - // And, if locations are used, the {line, column} object - // corresponding to those offsets - this.startLoc = this.endLoc = this.curPosition(); + pp$7.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1) + var size = 1 + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tt.bitShift, size) + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && + this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) this.unexpected() + // `` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken(); - } - return this.finishOp(_tokentype.types.incDec, 2); - } - if (next === 61) return this.finishOp(_tokentype.types.assign, 2); - return this.finishOp(_tokentype.types.plusMin, 1); -}; - -pp.readToken_lt_gt = function (code) { - // '<>' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(_tokentype.types.assign, size + 1); - return this.finishOp(_tokentype.types.bitShift, size); - } - if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) { - if (this.inModule) this.unexpected(); - // ` {"no-alert": "2 no-console: 2"} + // Should ignore that case as well. + if (ConfigOps.isEverySeverityValid(items)) { + return items; + } + } catch (ex) { + + // ignore to parse the string by a fallback. + } + + // Optionator cannot parse commaless notations. + // But we are supporting that. So this is a fallback for that. + items = {}; string = string.replace(/([a-zA-Z0-9\-\/]+):/g, "\"$1\":").replace(/(\]|[0-9])\s+(?=")/, "$1,"); try { items = JSON.parse("{" + string + "}"); @@ -962,8 +981,14 @@ module.exports = (function() { source: sourceCode.lines[location.line - 1] || "" }; - // ensure there's range and text properties as well as metadata switch, otherwise it's not a valid fix - if (fix && Array.isArray(fix.range) && (typeof fix.text === "string") && (!meta || meta.fixable)) { + // ensure there's range and text properties, otherwise it's not a valid fix + if (fix && Array.isArray(fix.range) && (typeof fix.text === "string")) { + + // If rule uses fix, has metadata, but has no metadata.fixable, we should throw + if (meta && !meta.fixable) { + throw new Error("Fixable rules should export a `meta.fixable` property."); + } + problem.fix = fix; } diff --git a/node_modules/eslint/lib/file-finder.js b/node_modules/eslint/lib/file-finder.js index 4dbb754..4559405 100644 --- a/node_modules/eslint/lib/file-finder.js +++ b/node_modules/eslint/lib/file-finder.js @@ -69,64 +69,6 @@ function normalizeDirectoryEntries(entries, directory, supportedConfigs) { return fileHash; } -/** - * Find one instance of a specified file name in directory or in a parent directory. - * Cache the results. - * Does not check if a matching directory entry is a file, and intentionally - * only searches for the first file name in this.fileNames. - * Is currently used by lib/ignored_paths.js to find an .eslintignore file. - * @param {string} directory The directory to start the search from. - * @returns {string} Path of the file found, or an empty string if not found. - */ -FileFinder.prototype.findInDirectoryOrParents = function(directory) { - var cache = this.cache, - child, - dirs, - filePath, - i, - names, - searched; - - if (!directory) { - directory = this.cwd; - } - - if (cache.hasOwnProperty(directory)) { - return cache[directory]; - } - - dirs = []; - searched = 0; - names = this.fileNames; - - (function() { - while (directory !== child) { - dirs[searched++] = directory; - var filesMap = normalizeDirectoryEntries(getDirectoryEntries(directory), directory, names); - - if (Object.keys(filesMap).length) { - for (var k = 0; k < names.length; k++) { - if (filesMap[names[k]]) { - filePath = filesMap[names[k]]; - return; - } - } - } - - child = directory; - - // Assign parent directory to directory. - directory = path.dirname(directory); - } - }()); - - for (i = 0; i < searched; i++) { - cache[dirs[i]] = filePath; - } - - return filePath || String(); -}; - /** * Find all instances of files with the specified file names, in directory and * parent directories. Cache the results. @@ -146,7 +88,9 @@ FileFinder.prototype.findAllInDirectoryAndParents = function(directory) { j, searched; - if (!directory) { + if (directory) { + directory = path.resolve(this.cwd, directory); + } else { directory = this.cwd; } diff --git a/node_modules/eslint/lib/ignored-paths.js b/node_modules/eslint/lib/ignored-paths.js index c6a710a..9a7739e 100644 --- a/node_modules/eslint/lib/ignored-paths.js +++ b/node_modules/eslint/lib/ignored-paths.js @@ -24,9 +24,9 @@ debug = debug("eslint:ignored-paths"); //------------------------------------------------------------------------------ var ESLINT_IGNORE_FILENAME = ".eslintignore"; -var DEFAULT_IGNORE_PATTERNS = [ - "/node_modules/*", - "/bower_components/*" +var DEFAULT_IGNORE_DIRS = [ + "node_modules/", + "bower_components/" ]; var DEFAULT_OPTIONS = { dotfiles: false, @@ -97,7 +97,9 @@ function IgnoredPaths(options) { return ig.add(fs.readFileSync(filepath, "utf8")); } - this.defaultPatterns = DEFAULT_IGNORE_PATTERNS.concat(options.patterns || []); + this.defaultPatterns = DEFAULT_IGNORE_DIRS.map(function(dir) { + return "/" + dir + "*"; + }).concat(options.patterns || []); this.baseDir = options.cwd; this.ig = { @@ -124,11 +126,6 @@ function IgnoredPaths(options) { if (options.ignore !== false) { var ignorePath; - if (options.ignorePattern) { - addPattern(this.ig.custom, options.ignorePattern); - addPattern(this.ig.default, options.ignorePattern); - } - if (options.ignorePath) { debug("Using specific ignore file"); @@ -159,6 +156,10 @@ function IgnoredPaths(options) { addIgnoreFile(this.ig.default, ignorePath); } + if (options.ignorePattern) { + addPattern(this.ig.custom, options.ignorePattern); + addPattern(this.ig.default, options.ignorePattern); + } } this.options = options; @@ -189,4 +190,36 @@ IgnoredPaths.prototype.contains = function(filepath, category) { }; +/** + * Returns a list of dir patterns for glob to ignore + * @returns {string[]} list of glob ignore patterns + */ +IgnoredPaths.prototype.getIgnoredFoldersGlobPatterns = function() { + var dirs = DEFAULT_IGNORE_DIRS; + + if (this.options.ignore) { + + /* eslint-disable no-underscore-dangle */ + + var patterns = this.ig.custom._rules.filter(function(rule) { + return rule.negative; + }).map(function(rule) { + return rule.origin; + }); + + /* eslint-enable no-underscore-dangle */ + + dirs = dirs.filter(function(dir) { + return patterns.every(function(p) { + return (p.indexOf("!" + dir) !== 0 && p.indexOf("!/" + dir) !== 0); + }); + }); + } + + + return dirs.map(function(dir) { + return dir + "**"; + }); +}; + module.exports = IgnoredPaths; diff --git a/node_modules/eslint/lib/options.js b/node_modules/eslint/lib/options.js index 7d61458..eb58a62 100644 --- a/node_modules/eslint/lib/options.js +++ b/node_modules/eslint/lib/options.js @@ -57,7 +57,6 @@ module.exports = optionator({ { option: "parser", type: "String", - default: "espree", description: "Specify the parser to be used" }, { @@ -115,7 +114,7 @@ module.exports = optionator({ option: "ignore", type: "Boolean", default: "true", - description: "Disable use of .eslintignore" + description: "Disable use of ignore files and patterns" }, { option: "ignore-pattern", diff --git a/node_modules/eslint/lib/rule-context.js b/node_modules/eslint/lib/rule-context.js index 88e68ab..49b4dfc 100644 --- a/node_modules/eslint/lib/rule-context.js +++ b/node_modules/eslint/lib/rule-context.js @@ -15,18 +15,21 @@ var RuleFixer = require("./util/rule-fixer"); //------------------------------------------------------------------------------ var PASSTHROUGHS = [ - "getAllComments", "getAncestors", - "getComments", "getDeclaredVariables", "getFilename", + "getScope", + "markVariableAsUsed", + + // DEPRECATED + "getAllComments", + "getComments", "getFirstToken", "getFirstTokens", "getJSDocComment", "getLastToken", "getLastTokens", "getNodeByRangeIndex", - "getScope", "getSource", "getSourceLines", "getTokenAfter", @@ -35,8 +38,7 @@ var PASSTHROUGHS = [ "getTokens", "getTokensAfter", "getTokensBefore", - "getTokensBetween", - "markVariableAsUsed" + "getTokensBetween" ]; //------------------------------------------------------------------------------ diff --git a/node_modules/eslint/lib/rules/accessor-pairs.js b/node_modules/eslint/lib/rules/accessor-pairs.js index 1b91ef2..3ed9f0d 100644 --- a/node_modules/eslint/lib/rules/accessor-pairs.js +++ b/node_modules/eslint/lib/rules/accessor-pairs.js @@ -73,7 +73,7 @@ function isPropertyDescriptor(node) { module.exports = { meta: { docs: { - description: "Enforces getter/setter pairs in objects", + description: "enforce getter and setter pairs in objects", category: "Best Practices", recommended: false }, diff --git a/node_modules/eslint/lib/rules/array-bracket-spacing.js b/node_modules/eslint/lib/rules/array-bracket-spacing.js index 379ed0f..0959803 100644 --- a/node_modules/eslint/lib/rules/array-bracket-spacing.js +++ b/node_modules/eslint/lib/rules/array-bracket-spacing.js @@ -13,7 +13,7 @@ var astUtils = require("../ast-utils"); module.exports = { meta: { docs: { - description: "Enforce spacing inside array brackets", + description: "enforce consistent spacing inside array brackets", category: "Stylistic Issues", recommended: false }, @@ -77,7 +77,7 @@ module.exports = { loc: token.loc.start, message: "There should be no space after '" + token.value + "'", fix: function(fixer) { - var nextToken = context.getSourceCode().getTokenAfter(token); + var nextToken = sourceCode.getTokenAfter(token); return fixer.removeRange([token.range[1], nextToken.range[0]]); } @@ -96,7 +96,7 @@ module.exports = { loc: token.loc.start, message: "There should be no space before '" + token.value + "'", fix: function(fixer) { - var previousToken = context.getSourceCode().getTokenBefore(token); + var previousToken = sourceCode.getTokenBefore(token); return fixer.removeRange([previousToken.range[1], token.range[0]]); } @@ -165,10 +165,10 @@ module.exports = { return; } - var first = context.getFirstToken(node), - second = context.getFirstToken(node, 1), - penultimate = context.getLastToken(node, 1), - last = context.getLastToken(node), + var first = sourceCode.getFirstToken(node), + second = sourceCode.getFirstToken(node, 1), + penultimate = sourceCode.getLastToken(node, 1), + last = sourceCode.getLastToken(node), firstElement = node.elements[0], lastElement = node.elements[node.elements.length - 1]; diff --git a/node_modules/eslint/lib/rules/arrow-body-style.js b/node_modules/eslint/lib/rules/arrow-body-style.js index 79fde90..13486fa 100644 --- a/node_modules/eslint/lib/rules/arrow-body-style.js +++ b/node_modules/eslint/lib/rules/arrow-body-style.js @@ -16,16 +16,45 @@ module.exports = { recommended: false }, - schema: [ - { - enum: ["always", "as-needed"] - } - ] + schema: { + anyOf: [ + { + type: "array", + items: [ + { + enum: ["always", "never"] + } + ], + minItems: 0, + maxItems: 1 + }, + { + type: "array", + items: [ + { + enum: ["as-needed"] + }, + { + type: "object", + properties: { + requireReturnForObjectLiteral: {type: "boolean"} + }, + additionalProperties: false + } + ], + minItems: 0, + maxItems: 2 + } + ] + } }, create: function(context) { - var always = context.options[0] === "always"; - var asNeeded = !context.options[0] || context.options[0] === "as-needed"; + var options = context.options; + var always = options[0] === "always"; + var asNeeded = !options[0] || options[0] === "as-needed"; + var never = options[0] === "never"; + var requireReturnForObjectLiteral = options[1] && options[1].requireReturnForObjectLiteral; /** * Determines whether a arrow function body needs braces @@ -36,21 +65,34 @@ module.exports = { var arrowBody = node.body; if (arrowBody.type === "BlockStatement") { - var blockBody = arrowBody.body; - - if (blockBody.length !== 1) { - return; - } - - if (asNeeded && blockBody[0].type === "ReturnStatement") { + if (never) { context.report({ node: node, loc: arrowBody.loc.start, message: "Unexpected block statement surrounding arrow body." }); + } else { + var blockBody = arrowBody.body; + + if (blockBody.length !== 1) { + return; + } + + if (asNeeded && requireReturnForObjectLiteral && blockBody[0].type === "ReturnStatement" && + blockBody[0].argument.type === "ObjectExpression") { + return; + } + + if (asNeeded && blockBody[0].type === "ReturnStatement") { + context.report({ + node: node, + loc: arrowBody.loc.start, + message: "Unexpected block statement surrounding arrow body." + }); + } } } else { - if (always) { + if (always || (asNeeded && requireReturnForObjectLiteral && arrowBody.type === "ObjectExpression")) { context.report({ node: node, loc: arrowBody.loc.start, diff --git a/node_modules/eslint/lib/rules/arrow-parens.js b/node_modules/eslint/lib/rules/arrow-parens.js index 78ce045..2f64714 100644 --- a/node_modules/eslint/lib/rules/arrow-parens.js +++ b/node_modules/eslint/lib/rules/arrow-parens.js @@ -28,13 +28,15 @@ module.exports = { var asNeededMessage = "Unexpected parentheses around single function argument"; var asNeeded = context.options[0] === "as-needed"; + var sourceCode = context.getSourceCode(); + /** * Determines whether a arrow function argument end with `)` * @param {ASTNode} node The arrow function node. * @returns {void} */ function parens(node) { - var token = context.getFirstToken(node); + var token = sourceCode.getFirstToken(node); // as-needed: x => x if (asNeeded && node.params.length === 1 && node.params[0].type === "Identifier") { @@ -45,7 +47,7 @@ module.exports = { } if (token.type === "Identifier") { - var after = context.getTokenAfter(token); + var after = sourceCode.getTokenAfter(token); // (x) => x if (after.value !== ")") { diff --git a/node_modules/eslint/lib/rules/arrow-spacing.js b/node_modules/eslint/lib/rules/arrow-spacing.js index 82cec87..3af5ae1 100644 --- a/node_modules/eslint/lib/rules/arrow-spacing.js +++ b/node_modules/eslint/lib/rules/arrow-spacing.js @@ -43,20 +43,22 @@ module.exports = { rule.before = option.before !== false; rule.after = option.after !== false; + var sourceCode = context.getSourceCode(); + /** * Get tokens of arrow(`=>`) and before/after arrow. * @param {ASTNode} node The arrow function node. * @returns {Object} Tokens of arrow and before/after arrow. */ function getTokens(node) { - var t = context.getFirstToken(node); + var t = sourceCode.getFirstToken(node); var before; while (t.type !== "Punctuator" || t.value !== "=>") { before = t; - t = context.getTokenAfter(t); + t = sourceCode.getTokenAfter(t); } - var after = context.getTokenAfter(t); + var after = sourceCode.getTokenAfter(t); return { before: before, arrow: t, after: after }; } diff --git a/node_modules/eslint/lib/rules/block-spacing.js b/node_modules/eslint/lib/rules/block-spacing.js index b6dc6e7..54ae83d 100644 --- a/node_modules/eslint/lib/rules/block-spacing.js +++ b/node_modules/eslint/lib/rules/block-spacing.js @@ -39,11 +39,11 @@ module.exports = { function getOpenBrace(node) { if (node.type === "SwitchStatement") { if (node.cases.length > 0) { - return context.getTokenBefore(node.cases[0]); + return sourceCode.getTokenBefore(node.cases[0]); } - return context.getLastToken(node, 1); + return sourceCode.getLastToken(node, 1); } - return context.getFirstToken(node); + return sourceCode.getFirstToken(node); } /** @@ -73,7 +73,7 @@ module.exports = { // Gets braces and the first/last token of content. var openBrace = getOpenBrace(node); - var closeBrace = context.getLastToken(node); + var closeBrace = sourceCode.getLastToken(node); var firstToken = sourceCode.getTokenOrCommentAfter(openBrace); var lastToken = sourceCode.getTokenOrCommentBefore(closeBrace); diff --git a/node_modules/eslint/lib/rules/callback-return.js b/node_modules/eslint/lib/rules/callback-return.js index a995da3..1d70d0c 100644 --- a/node_modules/eslint/lib/rules/callback-return.js +++ b/node_modules/eslint/lib/rules/callback-return.js @@ -24,7 +24,8 @@ module.exports = { create: function(context) { - var callbacks = context.options[0] || ["callback", "cb", "next"]; + var callbacks = context.options[0] || ["callback", "cb", "next"], + sourceCode = context.getSourceCode(); //-------------------------------------------------------------------------- // Helpers @@ -46,13 +47,34 @@ module.exports = { return node.parent; } + /** + * Check to see if a node contains only identifers + * @param {ASTNode} node The node to check + * @returns {Boolean} Whether or not the node contains only identifers + */ + function containsOnlyIdentifiers(node) { + if (node.type === "Identifier") { + return true; + } + + if (node.type === "MemberExpression") { + if (node.object.type === "Identifier") { + return true; + } else if (node.object.type === "MemberExpression") { + return containsOnlyIdentifiers(node.object); + } + } + + return false; + } + /** * Check to see if a CallExpression is in our callback list. * @param {ASTNode} node The node to check against our callback names list. * @returns {Boolean} Whether or not this function matches our callback name. */ function isCallback(node) { - return node.callee.type === "Identifier" && callbacks.indexOf(node.callee.name) > -1; + return containsOnlyIdentifiers(node.callee) && callbacks.indexOf(sourceCode.getText(node.callee)) > -1; } /** @@ -90,7 +112,7 @@ module.exports = { return { CallExpression: function(node) { - // if we"re not a callback we can return + // if we're not a callback we can return if (!isCallback(node)) { return; } diff --git a/node_modules/eslint/lib/rules/comma-dangle.js b/node_modules/eslint/lib/rules/comma-dangle.js index 7c2451b..ff9f71a 100644 --- a/node_modules/eslint/lib/rules/comma-dangle.js +++ b/node_modules/eslint/lib/rules/comma-dangle.js @@ -143,13 +143,13 @@ module.exports = { } var sourceCode = context.getSourceCode(), - trailingToken; - - // last item can be surrounded by parentheses for object and array literals - if (node.type === "ObjectExpression" || node.type === "ArrayExpression") { - trailingToken = sourceCode.getTokenBefore(sourceCode.getLastToken(node)); - } else { + penultimateToken = lastItem, trailingToken = sourceCode.getTokenAfter(lastItem); + + // Skip close parentheses. + while (trailingToken.value === ")") { + penultimateToken = trailingToken; + trailingToken = sourceCode.getTokenAfter(trailingToken); } if (trailingToken.value !== ",") { @@ -158,7 +158,7 @@ module.exports = { loc: lastItem.loc.end, message: MISSING_MESSAGE, fix: function(fixer) { - return fixer.insertTextAfter(lastItem, ","); + return fixer.insertTextAfter(penultimateToken, ","); } }); } diff --git a/node_modules/eslint/lib/rules/comma-spacing.js b/node_modules/eslint/lib/rules/comma-spacing.js index 2a4ec1f..22fb8b2 100644 --- a/node_modules/eslint/lib/rules/comma-spacing.js +++ b/node_modules/eslint/lib/rules/comma-spacing.js @@ -136,19 +136,19 @@ module.exports = { * @returns {void} */ function addNullElementsToIgnoreList(node) { - var previousToken = context.getFirstToken(node); + var previousToken = sourceCode.getFirstToken(node); node.elements.forEach(function(element) { var token; if (element === null) { - token = context.getTokenAfter(previousToken); + token = sourceCode.getTokenAfter(previousToken); if (isComma(token)) { commaTokensToIgnore.push(token); } } else { - token = context.getTokenAfter(element); + token = sourceCode.getTokenAfter(element); } previousToken = token; diff --git a/node_modules/eslint/lib/rules/comma-style.js b/node_modules/eslint/lib/rules/comma-style.js index 9c7d266..173df90 100644 --- a/node_modules/eslint/lib/rules/comma-style.js +++ b/node_modules/eslint/lib/rules/comma-style.js @@ -39,9 +39,9 @@ module.exports = { }, create: function(context) { - var style = context.options[0] || "last", - exceptions = {}; + exceptions = {}, + sourceCode = context.getSourceCode(); if (context.options.length === 2 && context.options[1].hasOwnProperty("exceptions")) { exceptions = context.options[1].exceptions; @@ -115,12 +115,18 @@ module.exports = { if (items.length > 1 || arrayLiteral) { // seed as opening [ - previousItemToken = context.getFirstToken(node); + previousItemToken = sourceCode.getFirstToken(node); items.forEach(function(item) { - var commaToken = item ? context.getTokenBefore(item) : previousItemToken, - currentItemToken = item ? context.getFirstToken(item) : context.getTokenAfter(commaToken), - reportItem = item || currentItemToken; + var commaToken = item ? sourceCode.getTokenBefore(item) : previousItemToken, + currentItemToken = item ? sourceCode.getFirstToken(item) : sourceCode.getTokenAfter(commaToken), + reportItem = item || currentItemToken, + tokenBeforeComma = sourceCode.getTokenBefore(commaToken); + + // Check if previous token is wrapped in parentheses + if (tokenBeforeComma && tokenBeforeComma.value === ")") { + previousItemToken = tokenBeforeComma; + } /* * This works by comparing three token locations: @@ -141,7 +147,7 @@ module.exports = { currentItemToken, reportItem); } - previousItemToken = item ? context.getLastToken(item) : previousItemToken; + previousItemToken = item ? sourceCode.getLastToken(item) : previousItemToken; }); /* @@ -152,12 +158,12 @@ module.exports = { */ if (arrayLiteral) { - var lastToken = context.getLastToken(node), - nextToLastToken = context.getTokenBefore(lastToken); + var lastToken = sourceCode.getLastToken(node), + nextToLastToken = sourceCode.getTokenBefore(lastToken); if (isComma(nextToLastToken)) { validateCommaItemSpacing( - context.getTokenBefore(nextToLastToken), + sourceCode.getTokenBefore(nextToLastToken), nextToLastToken, lastToken, lastToken diff --git a/node_modules/eslint/lib/rules/computed-property-spacing.js b/node_modules/eslint/lib/rules/computed-property-spacing.js index 1ae674e..89f0cc8 100644 --- a/node_modules/eslint/lib/rules/computed-property-spacing.js +++ b/node_modules/eslint/lib/rules/computed-property-spacing.js @@ -119,10 +119,10 @@ module.exports = { var property = node[propertyName]; - var before = context.getTokenBefore(property), - first = context.getFirstToken(property), - last = context.getLastToken(property), - after = context.getTokenAfter(property); + var before = sourceCode.getTokenBefore(property), + first = sourceCode.getFirstToken(property), + last = sourceCode.getLastToken(property), + after = sourceCode.getTokenAfter(property); if (astUtils.isTokenOnSameLine(before, first)) { if (propertyNameMustBeSpaced) { diff --git a/node_modules/eslint/lib/rules/consistent-return.js b/node_modules/eslint/lib/rules/consistent-return.js index 0e9a8c8..10f1d41 100644 --- a/node_modules/eslint/lib/rules/consistent-return.js +++ b/node_modules/eslint/lib/rules/consistent-return.js @@ -14,6 +14,16 @@ var astUtils = require("../ast-utils"); // Helpers //------------------------------------------------------------------------------ +/** + * Checks whether or not a given node is an `Identifier` node which was named a given name. + * @param {ASTNode} node - A node to check. + * @param {string} name - An expected name of the node. + * @returns {boolean} `true` if the node is an `Identifier` node which was named as expected. + */ +function isIdentifier(node, name) { + return node.type === "Identifier" && node.name === name; +} + /** * Checks whether or not a given code path segment is unreachable. * @param {CodePathSegment} segment - A CodePathSegment to check. @@ -35,10 +45,20 @@ module.exports = { recommended: false }, - schema: [] + schema: [{ + type: "object", + properties: { + treatUndefinedAsUnspecified: { + type: "boolean" + } + }, + additionalProperties: false + }] }, create: function(context) { + var options = context.options[0] || {}; + var treatUndefinedAsUnspecified = options.treatUndefinedAsUnspecified === true; var funcInfo = null; /** @@ -115,7 +135,12 @@ module.exports = { // Reports a given return statement if it's inconsistent. ReturnStatement: function(node) { - var hasReturnValue = Boolean(node.argument); + var argument = node.argument; + var hasReturnValue = Boolean(argument); + + if (treatUndefinedAsUnspecified && hasReturnValue) { + hasReturnValue = !isIdentifier(argument, "undefined") && argument.operator !== "void"; + } if (!funcInfo.hasReturn) { funcInfo.hasReturn = true; diff --git a/node_modules/eslint/lib/rules/curly.js b/node_modules/eslint/lib/rules/curly.js index 0bc5fdb..257366f 100644 --- a/node_modules/eslint/lib/rules/curly.js +++ b/node_modules/eslint/lib/rules/curly.js @@ -58,6 +58,8 @@ module.exports = { var multiOrNest = (context.options[0] === "multi-or-nest"); var consistent = (context.options[1] === "consistent"); + var sourceCode = context.getSourceCode(); + //-------------------------------------------------------------------------- // Helpers //-------------------------------------------------------------------------- @@ -69,8 +71,8 @@ module.exports = { * @private */ function isCollapsedOneLiner(node) { - var before = context.getTokenBefore(node), - last = context.getLastToken(node); + var before = sourceCode.getTokenBefore(node), + last = sourceCode.getLastToken(node); return before.loc.start.line === last.loc.end.line; } @@ -82,8 +84,8 @@ module.exports = { * @private */ function isOneLiner(node) { - var first = context.getFirstToken(node), - last = context.getLastToken(node); + var first = sourceCode.getFirstToken(node), + last = sourceCode.getLastToken(node); return first.loc.start.line === last.loc.end.line; } @@ -94,7 +96,6 @@ module.exports = { * @returns {Token} The `else` keyword token. */ function getElseKeyword(node) { - var sourceCode = context.getSourceCode(); var token = sourceCode.getTokenAfter(node.consequent); while (token.type !== "Keyword" || token.value !== "else") { diff --git a/node_modules/eslint/lib/rules/default-case.js b/node_modules/eslint/lib/rules/default-case.js index a4f3eef..ae70a59 100644 --- a/node_modules/eslint/lib/rules/default-case.js +++ b/node_modules/eslint/lib/rules/default-case.js @@ -13,7 +13,7 @@ var DEFAULT_COMMENT_PATTERN = /^no default$/; module.exports = { meta: { docs: { - description: "require `default` cases in switch statements", + description: "require `default` cases in `switch` statements", category: "Best Practices", recommended: false }, @@ -35,6 +35,8 @@ module.exports = { new RegExp(options.commentPattern) : DEFAULT_COMMENT_PATTERN; + var sourceCode = context.getSourceCode(); + //-------------------------------------------------------------------------- // Helpers //-------------------------------------------------------------------------- @@ -76,7 +78,7 @@ module.exports = { var lastCase = last(node.cases); - comments = context.getComments(lastCase).trailing; + comments = sourceCode.getComments(lastCase).trailing; if (comments.length) { comment = last(comments); diff --git a/node_modules/eslint/lib/rules/dot-location.js b/node_modules/eslint/lib/rules/dot-location.js index 0e1c257..2b29e0f 100644 --- a/node_modules/eslint/lib/rules/dot-location.js +++ b/node_modules/eslint/lib/rules/dot-location.js @@ -28,11 +28,12 @@ module.exports = { create: function(context) { - var config = context.options[0], - onObject; + var config = context.options[0]; // default to onObject if no preference is passed - onObject = config === "object" || !config; + var onObject = config === "object" || !config; + + var sourceCode = context.getSourceCode(); /** * Reports if the dot between object and property is on the correct loccation. @@ -42,7 +43,7 @@ module.exports = { * @returns {void} */ function checkDotLocation(obj, prop, node) { - var dot = context.getTokenBefore(prop); + var dot = sourceCode.getTokenBefore(prop); if (dot.type === "Punctuator" && dot.value === ".") { if (onObject) { diff --git a/node_modules/eslint/lib/rules/eol-last.js b/node_modules/eslint/lib/rules/eol-last.js index 1bd7c28..60b070f 100644 --- a/node_modules/eslint/lib/rules/eol-last.js +++ b/node_modules/eslint/lib/rules/eol-last.js @@ -35,8 +35,8 @@ module.exports = { Program: function checkBadEOF(node) { - // Get the whole source code, not for node only. - var src = context.getSource(), + var sourceCode = context.getSourceCode(), + src = sourceCode.getText(), location = {column: 1}, linebreakStyle = context.options[0] || "unix", linebreak = linebreakStyle === "unix" ? "\n" : "\r\n"; diff --git a/node_modules/eslint/lib/rules/eqeqeq.js b/node_modules/eslint/lib/rules/eqeqeq.js index f1d1d15..441f5b7 100644 --- a/node_modules/eslint/lib/rules/eqeqeq.js +++ b/node_modules/eslint/lib/rules/eqeqeq.js @@ -19,12 +19,13 @@ module.exports = { schema: [ { - enum: ["smart", "allow-null"] + enum: ["always", "smart", "allow-null"] } ] }, create: function(context) { + var sourceCode = context.getSourceCode(); /** * Checks if an expression is a typeof expression @@ -75,7 +76,7 @@ module.exports = { * @private */ function getOperatorLocation(node) { - var opToken = context.getTokenAfter(node.left); + var opToken = sourceCode.getTokenAfter(node.left); return {line: opToken.loc.start.line, column: opToken.loc.start.column}; } diff --git a/node_modules/eslint/lib/rules/func-names.js b/node_modules/eslint/lib/rules/func-names.js index 51a1ffe..44b989b 100644 --- a/node_modules/eslint/lib/rules/func-names.js +++ b/node_modules/eslint/lib/rules/func-names.js @@ -12,15 +12,20 @@ module.exports = { meta: { docs: { - description: "enforce named `function` expressions", + description: "require or disallow named `function` expressions", category: "Stylistic Issues", recommended: false }, - schema: [] + schema: [ + { + enum: ["always", "never"] + } + ] }, create: function(context) { + var never = context.options[0] === "never"; /** * Determines whether the current FunctionExpression node is a get, set, or @@ -44,8 +49,14 @@ module.exports = { var name = node.id && node.id.name; - if (!name && !isObjectOrClassMethod()) { - context.report(node, "Missing function expression name."); + if (never) { + if (name) { + context.report(node, "Unexpected function expression name."); + } + } else { + if (!name && !isObjectOrClassMethod()) { + context.report(node, "Missing function expression name."); + } } } }; diff --git a/node_modules/eslint/lib/rules/generator-star-spacing.js b/node_modules/eslint/lib/rules/generator-star-spacing.js index f05f9f4..0cab2be 100644 --- a/node_modules/eslint/lib/rules/generator-star-spacing.js +++ b/node_modules/eslint/lib/rules/generator-star-spacing.js @@ -52,6 +52,26 @@ module.exports = { return option; }(context.options[0])); + var sourceCode = context.getSourceCode(); + + /** + * Gets `*` token from a given node. + * + * @param {ASTNode} node - A node to get `*` token. This is one of + * FunctionDeclaration, FunctionExpression, Property, and + * MethodDefinition. + * @returns {Token} `*` token. + */ + function getStarToken(node) { + var token = sourceCode.getFirstToken(node); + + while (token.value !== "*") { + token = sourceCode.getTokenAfter(token); + } + + return token; + } + /** * Checks the spacing between two tokens before or after the star token. * @param {string} side Either "before" or "after". @@ -98,18 +118,18 @@ module.exports = { } if (node.parent.method || node.parent.type === "MethodDefinition") { - starToken = context.getTokenBefore(node, 1); + starToken = getStarToken(node.parent); } else { - starToken = context.getFirstToken(node, 1); + starToken = getStarToken(node); } - // Only check before when preceded by `function` keyword - prevToken = context.getTokenBefore(starToken); + // Only check before when preceded by `function`|`static` keyword + prevToken = sourceCode.getTokenBefore(starToken); if (prevToken.value === "function" || prevToken.value === "static") { checkSpacing("before", prevToken, starToken); } - nextToken = context.getTokenAfter(starToken); + nextToken = sourceCode.getTokenAfter(starToken); checkSpacing("after", starToken, nextToken); } diff --git a/node_modules/eslint/lib/rules/indent.js b/node_modules/eslint/lib/rules/indent.js index 3e8f4b9..93d0a3b 100644 --- a/node_modules/eslint/lib/rules/indent.js +++ b/node_modules/eslint/lib/rules/indent.js @@ -90,6 +90,8 @@ module.exports = { } }; + var sourceCode = context.getSourceCode(); + if (context.options.length) { if (context.options[0] === "tab") { indentSize = 1; @@ -213,8 +215,8 @@ module.exports = { * @returns {int} Indent */ function getNodeIndent(node, byLastLine, excludeCommas) { - var token = byLastLine ? context.getLastToken(node) : context.getFirstToken(node); - var src = context.getSource(token, token.loc.start.column); + var token = byLastLine ? sourceCode.getLastToken(node) : sourceCode.getFirstToken(node); + var src = sourceCode.getText(token, token.loc.start.column); var regExp = excludeCommas ? indentPattern.excludeCommas : indentPattern.normal; var indent = regExp.exec(src); @@ -228,7 +230,7 @@ module.exports = { * @returns {boolean} true if its the first in the its start line */ function isNodeFirstInLine(node, byEndLocation) { - var firstToken = byEndLocation === true ? context.getLastToken(node, 1) : context.getTokenBefore(node), + var firstToken = byEndLocation === true ? sourceCode.getLastToken(node, 1) : sourceCode.getTokenBefore(node), startLine = byEndLocation === true ? node.loc.end.line : node.loc.start.line, endLine = firstToken ? firstToken.loc.end.line : -1; @@ -263,7 +265,7 @@ module.exports = { function checkNodesIndent(nodes, indent, excludeCommas) { nodes.forEach(function(node) { if (node.type === "IfStatement" && node.alternate) { - var elseToken = context.getTokenBefore(node.alternate); + var elseToken = sourceCode.getTokenBefore(node.alternate); checkNodeIndent(elseToken, indent, excludeCommas); } @@ -278,7 +280,7 @@ module.exports = { * @returns {void} */ function checkLastNodeLineIndent(node, lastLineIndent) { - var lastToken = context.getLastToken(node); + var lastToken = sourceCode.getLastToken(node); var endIndent = getNodeIndent(lastToken, true); if (endIndent !== lastLineIndent && isNodeFirstInLine(node, true)) { @@ -431,7 +433,7 @@ module.exports = { * @returns {boolean} Whether or not the block starts and ends on the same line. */ function isSingleLineNode(node) { - var lastToken = context.getLastToken(node), + var lastToken = sourceCode.getLastToken(node), startLine = node.loc.start.line, endLine = lastToken.loc.end.line; @@ -641,11 +643,11 @@ module.exports = { checkNodesIndent(elements, elementsIndent, true); // Only check the last line if there is any token after the last item - if (context.getLastToken(node).loc.end.line <= lastElement.loc.end.line) { + if (sourceCode.getLastToken(node).loc.end.line <= lastElement.loc.end.line) { return; } - var tokenBeforeLastElement = context.getTokenBefore(lastElement); + var tokenBeforeLastElement = sourceCode.getTokenBefore(lastElement); if (tokenBeforeLastElement.value === ",") { diff --git a/node_modules/eslint/lib/rules/key-spacing.js b/node_modules/eslint/lib/rules/key-spacing.js index 1bc14ae..1cf6778 100644 --- a/node_modules/eslint/lib/rules/key-spacing.js +++ b/node_modules/eslint/lib/rules/key-spacing.js @@ -118,6 +118,8 @@ module.exports = { recommended: false }, + fixable: "whitespace", + schema: [{ anyOf: [ { @@ -196,6 +198,8 @@ module.exports = { multiLineOptions = initOptions({}, (options.multiLine || options)), singleLineOptions = initOptions({}, (options.singleLine || options)); + var sourceCode = context.getSourceCode(); + /** * Determines if the given property is key-value property. * @param {ASTNode} property Property node to check. @@ -220,7 +224,7 @@ module.exports = { while (node && (node.type !== "Punctuator" || node.value !== ":")) { prevNode = node; - node = context.getTokenAfter(node); + node = sourceCode.getTokenAfter(node); } return prevNode; @@ -235,7 +239,7 @@ module.exports = { function getNextColon(node) { while (node && (node.type !== "Punctuator" || node.value !== ":")) { - node = context.getTokenAfter(node); + node = sourceCode.getTokenAfter(node); } return node; @@ -250,7 +254,7 @@ module.exports = { var key = property.key; if (property.computed) { - return context.getSource().slice(key.range[0], key.range[1]); + return sourceCode.getText().slice(key.range[0], key.range[1]); } return property.key.name || property.key.value; @@ -268,9 +272,16 @@ module.exports = { */ function report(property, side, whitespace, expected, mode) { var diff = whitespace.length - expected, - key = property.key, - firstTokenAfterColon = context.getTokenAfter(getNextColon(key)), - location = side === "key" ? key.loc.start : firstTokenAfterColon.loc.start; + nextColon = getNextColon(property.key), + tokenBeforeColon = sourceCode.getTokenBefore(nextColon), + tokenAfterColon = sourceCode.getTokenAfter(nextColon), + isKeySide = side === "key", + locStart = isKeySide ? tokenBeforeColon.loc.start : tokenAfterColon.loc.start, + isExtra = diff > 0, + diffAbs = Math.abs(diff), + spaces = Array(diffAbs + 1).join(" "), + fix, + range; if (( diff && mode === "strict" || @@ -278,10 +289,41 @@ module.exports = { diff > 0 && !expected && mode === "minimum") && !(expected && containsLineTerminator(whitespace)) ) { - context.report(property[side], location, messages[side], { - error: diff > 0 ? "Extra" : "Missing", - computed: property.computed ? "computed " : "", - key: getKey(property) + if (isExtra) { + + // Remove whitespace + if (isKeySide) { + range = [tokenBeforeColon.end, tokenBeforeColon.end + diffAbs]; + } else { + range = [tokenAfterColon.start - diffAbs, tokenAfterColon.start]; + } + fix = function(fixer) { + return fixer.removeRange(range); + }; + } else { + + // Add whitespace + if (isKeySide) { + fix = function(fixer) { + return fixer.insertTextAfter(tokenBeforeColon, spaces); + }; + } else { + fix = function(fixer) { + return fixer.insertTextBefore(tokenAfterColon, spaces); + }; + } + } + + context.report({ + node: property[side], + loc: locStart, + message: messages[side], + data: { + error: isExtra ? "Extra" : "Missing", + computed: property.computed ? "computed " : "", + key: getKey(property) + }, + fix: fix }); } } @@ -295,7 +337,7 @@ module.exports = { function getKeyWidth(property) { var startToken, endToken; - startToken = context.getFirstToken(property); + startToken = sourceCode.getFirstToken(property); endToken = getLastTokenBeforeColon(property.key); return endToken.range[1] - startToken.range[0]; @@ -307,7 +349,7 @@ module.exports = { * @returns {Object} Whitespace before and after the property's colon. */ function getPropertyWhitespace(property) { - var whitespace = /(\s*):(\s*)/.exec(context.getSource().slice( + var whitespace = /(\s*):(\s*)/.exec(sourceCode.getText().slice( property.key.range[1], property.value.range[0] )); diff --git a/node_modules/eslint/lib/rules/linebreak-style.js b/node_modules/eslint/lib/rules/linebreak-style.js index d99d7e5..5e6b819 100644 --- a/node_modules/eslint/lib/rules/linebreak-style.js +++ b/node_modules/eslint/lib/rules/linebreak-style.js @@ -31,6 +31,8 @@ module.exports = { var EXPECTED_LF_MSG = "Expected linebreaks to be 'LF' but found 'CRLF'.", EXPECTED_CRLF_MSG = "Expected linebreaks to be 'CRLF' but found 'LF'."; + var sourceCode = context.getSourceCode(); + //-------------------------------------------------------------------------- // Helpers //-------------------------------------------------------------------------- @@ -57,7 +59,7 @@ module.exports = { var linebreakStyle = context.options[0] || "unix", expectedLF = linebreakStyle === "unix", expectedLFChars = expectedLF ? "\n" : "\r\n", - source = context.getSource(), + source = sourceCode.getText(), pattern = /\r\n|\r|\n|\u2028|\u2029/g, match, index, @@ -77,7 +79,7 @@ module.exports = { node: node, loc: { line: i, - column: context.getSourceLines()[i - 1].length + column: sourceCode.lines[i - 1].length }, message: expectedLF ? EXPECTED_LF_MSG : EXPECTED_CRLF_MSG, fix: createFix(range, expectedLFChars) diff --git a/node_modules/eslint/lib/rules/lines-around-comment.js b/node_modules/eslint/lib/rules/lines-around-comment.js index 92fc325..a227fe4 100644 --- a/node_modules/eslint/lib/rules/lines-around-comment.js +++ b/node_modules/eslint/lib/rules/lines-around-comment.js @@ -8,7 +8,8 @@ // Requirements //------------------------------------------------------------------------------ -var lodash = require("lodash"); +var lodash = require("lodash"), + astUtils = require("../ast-utils"); //------------------------------------------------------------------------------ // Helpers @@ -51,16 +52,6 @@ function getCommentLineNums(comments) { return lines; } -/** - * Determines if a value is an array. - * @param {number} val The value we wish to check for in the array.. - * @param {Array} array An array. - * @returns {boolean} True if the value is in the array.. - */ -function contains(val, array) { - return array.indexOf(val) > -1; -} - //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -73,6 +64,8 @@ module.exports = { recommended: false }, + fixable: "whitespace", + schema: [ { type: "object", @@ -126,6 +119,22 @@ module.exports = { var sourceCode = context.getSourceCode(); + var lines = sourceCode.lines, + numLines = lines.length + 1, + comments = sourceCode.getAllComments(), + commentLines = getCommentLineNums(comments), + emptyLines = getEmptyLineNums(lines), + commentAndEmptyLines = commentLines.concat(emptyLines); + + /** + * Returns whether or not a token is a comment node type + * @param {Token} token The token to check + * @returns {boolean} True if the token is a comment node + */ + function isCommentNodeType(token) { + return token && (token.type === "Block" || token.type === "Line"); + } + /** * Returns whether or not comments are on lines starting with or ending with code * @param {ASTNode} node The comment node to check. @@ -137,18 +146,18 @@ module.exports = { token = node; do { token = sourceCode.getTokenOrCommentBefore(token); - } while (token && (token.type === "Block" || token.type === "Line")); + } while (isCommentNodeType(token)); - if (token && token.loc.end.line === node.loc.start.line) { + if (token && astUtils.isTokenOnSameLine(token, node)) { return true; } token = node; do { token = sourceCode.getTokenOrCommentAfter(token); - } while (token && (token.type === "Block" || token.type === "Line")); + } while (isCommentNodeType(token)); - if (token && token.loc.start.line === node.loc.end.line) { + if (token && astUtils.isTokenOnSameLine(node, token)) { return true; } @@ -267,14 +276,6 @@ module.exports = { * @returns {void} */ function checkForEmptyLine(node, opts) { - - var lines = context.getSourceLines(), - numLines = lines.length + 1, - comments = context.getAllComments(), - commentLines = getCommentLineNums(comments), - emptyLines = getEmptyLineNums(lines), - commentAndEmptyLines = commentLines.concat(emptyLines); - var after = opts.after, before = opts.before; @@ -305,14 +306,34 @@ module.exports = { return; } + var previousTokenOrComment = sourceCode.getTokenOrCommentBefore(node); + var nextTokenOrComment = sourceCode.getTokenOrCommentAfter(node); + // check for newline before - if (!exceptionStartAllowed && before && !contains(prevLineNum, commentAndEmptyLines)) { - context.report(node, "Expected line before comment."); + if (!exceptionStartAllowed && before && !lodash.includes(commentAndEmptyLines, prevLineNum) && + !(isCommentNodeType(previousTokenOrComment) && astUtils.isTokenOnSameLine(previousTokenOrComment, node))) { + var lineStart = node.range[0] - node.loc.start.column; + var range = [lineStart, lineStart]; + + context.report({ + node: node, + message: "Expected line before comment.", + fix: function(fixer) { + return fixer.insertTextBeforeRange(range, "\n"); + } + }); } // check for newline after - if (!exceptionEndAllowed && after && !contains(nextLineNum, commentAndEmptyLines)) { - context.report(node, "Expected line after comment."); + if (!exceptionEndAllowed && after && !lodash.includes(commentAndEmptyLines, nextLineNum) && + !(isCommentNodeType(nextTokenOrComment) && astUtils.isTokenOnSameLine(node, nextTokenOrComment))) { + context.report({ + node: node, + message: "Expected line after comment.", + fix: function(fixer) { + return fixer.insertTextAfter(node, "\n"); + } + }); } } diff --git a/node_modules/eslint/lib/rules/max-len.js b/node_modules/eslint/lib/rules/max-len.js index 1ba539a..b379835 100644 --- a/node_modules/eslint/lib/rules/max-len.js +++ b/node_modules/eslint/lib/rules/max-len.js @@ -81,6 +81,8 @@ module.exports = { */ var URL_REGEXP = /[^:/?#]:\/\/[^?#]/; + var sourceCode = context.getSourceCode(); + /** * Computes the length of a line that may contain tabs. The width of each * tab will be the number of spaces to the next tab stop. @@ -155,10 +157,11 @@ module.exports = { */ function isFullLineComment(line, lineNumber, comment) { var start = comment.loc.start, - end = comment.loc.end; + end = comment.loc.end, + isFirstTokenOnLine = !line.slice(0, comment.loc.start.column).trim(); return comment && - (start.line < lineNumber || (start.line === lineNumber && start.column === 0)) && + (start.line < lineNumber || (start.line === lineNumber && isFirstTokenOnLine)) && (end.line > lineNumber || end.column === line.length); } @@ -185,10 +188,10 @@ module.exports = { function checkProgramForMaxLength(node) { // split (honors line-ending) - var lines = context.getSourceLines(), + var lines = sourceCode.lines, // list of comments to ignore - comments = ignoreComments || maxCommentLength || ignoreTrailingComments ? context.getAllComments() : [], + comments = ignoreComments || maxCommentLength || ignoreTrailingComments ? sourceCode.getAllComments() : [], // we iterate over comments in parallel with the lines commentsIndex = 0; diff --git a/node_modules/eslint/lib/rules/max-lines.js b/node_modules/eslint/lib/rules/max-lines.js new file mode 100644 index 0000000..751310e --- /dev/null +++ b/node_modules/eslint/lib/rules/max-lines.js @@ -0,0 +1,148 @@ +/** + * @fileoverview enforce a maximum file length + * @author Alberto Rodríguez + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var lodash = require("lodash"); +var astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce a maximum number of lines per file", + category: "Stylistic Issues", + recommended: false + }, + + schema: [ + { + oneOf: [ + { + type: "integer", + minimum: 0 + }, + { + type: "object", + properties: { + max: { + type: "integer", + minimum: 0 + }, + skipComments: { + type: "boolean" + }, + skipBlankLines: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + } + ] + }, + + create: function(context) { + var option = context.options[0], + max = 300; + + if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") { + max = option.max; + } + + if (typeof option === "number") { + max = option; + } + + var skipComments = option && option.skipComments; + var skipBlankLines = option && option.skipBlankLines; + + var sourceCode = context.getSourceCode(); + + /** + * Returns whether or not a token is a comment node type + * @param {Token} token The token to check + * @returns {boolean} True if the token is a comment node + */ + function isCommentNodeType(token) { + return token && (token.type === "Block" || token.type === "Line"); + } + + /** + * Returns the line numbers of a comment that don't have any code on the same line + * @param {Node} comment The comment node to check + * @returns {int[]} The line numbers + */ + function getLinesWithoutCode(comment) { + var start = comment.loc.start.line; + var end = comment.loc.end.line; + + var token; + + token = comment; + do { + token = sourceCode.getTokenOrCommentBefore(token); + } while (isCommentNodeType(token)); + + if (token && astUtils.isTokenOnSameLine(token, comment)) { + start += 1; + } + + token = comment; + do { + token = sourceCode.getTokenOrCommentAfter(token); + } while (isCommentNodeType(token)); + + if (token && astUtils.isTokenOnSameLine(comment, token)) { + end -= 1; + } + + if (start <= end) { + return lodash.range(start, end + 1); + } + return []; + } + + return { + "Program:exit": function() { + var lines = sourceCode.lines.map(function(text, i) { + return { lineNumber: i + 1, text: text }; + }); + + if (skipBlankLines) { + lines = lines.filter(function(l) { + return l.text.trim() !== ""; + }); + } + + if (skipComments) { + var comments = sourceCode.getAllComments(); + + var commentLines = lodash.flatten(comments.map(function(comment) { + return getLinesWithoutCode(comment); + })); + + lines = lines.filter(function(l) { + return !lodash.includes(commentLines, l.lineNumber); + }); + } + + if (lines.length > max) { + context.report({ + loc: { line: 1, column: 0 }, + message: "File must be at most " + max + " lines long" + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/max-statements-per-line.js b/node_modules/eslint/lib/rules/max-statements-per-line.js index 64058f0..55f0974 100644 --- a/node_modules/eslint/lib/rules/max-statements-per-line.js +++ b/node_modules/eslint/lib/rules/max-statements-per-line.js @@ -21,7 +21,8 @@ module.exports = { type: "object", properties: { max: { - type: "integer" + type: "integer", + minimum: 0 } }, additionalProperties: false @@ -31,72 +32,81 @@ module.exports = { create: function(context) { - var options = context.options[0] || {}, + var sourceCode = context.getSourceCode(), + options = context.options[0] || {}, lastStatementLine = 0, numberOfStatementsOnThisLine = 0, - maxStatementsPerLine = typeof options.max !== "undefined" ? options.max : 1; + maxStatementsPerLine = typeof options.max !== "undefined" ? options.max : 1, + message = "This line has too many statements. Maximum allowed is " + maxStatementsPerLine + "."; //-------------------------------------------------------------------------- // Helpers //-------------------------------------------------------------------------- + var SINGLE_CHILD_ALLOWED = /^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/; + /** - * Reports a node - * @param {ASTNode} node The node to report - * @returns {void} - * @private + * Gets the actual last token of a given node. + * + * @param {ASTNode} node - A node to get. This is a node except EmptyStatement. + * @returns {Token} The actual last token. */ - function report(node) { - context.report( - node, - "This line has too many statements. Maximum allowed is {{max}}.", - { max: maxStatementsPerLine }); + function getActualLastToken(node) { + var lastToken = sourceCode.getLastToken(node); + + if (lastToken.value === ";") { + lastToken = sourceCode.getTokenBefore(lastToken); + } + return lastToken; } /** - * Enforce a maximum number of statements per line - * @param {ASTNode} nodes Array of nodes to evaluate + * Addresses a given node. + * It updates the state of this rule, then reports the node if the node violated this rule. + * + * @param {ASTNode} node - A node to check. * @returns {void} - * @private */ - function enforceMaxStatementsPerLine(nodes) { - if (nodes.length < 1) { + function enterStatement(node) { + var line = node.loc.start.line; + + // Skip to allow non-block statements if this is direct child of control statements. + // `if (a) foo();` is counted as 1. + // But `if (a) foo(); else foo();` should be counted as 2. + if (SINGLE_CHILD_ALLOWED.test(node.parent.type) && + node.parent.alternate !== node + ) { return; } - for (var i = 0, l = nodes.length; i < l; ++i) { - var currentStatement = nodes[i]; + // Update state. + if (line === lastStatementLine) { + numberOfStatementsOnThisLine += 1; + } else { + numberOfStatementsOnThisLine = 1; + lastStatementLine = line; + } - if (currentStatement.loc.start.line === lastStatementLine) { - ++numberOfStatementsOnThisLine; - } else { - numberOfStatementsOnThisLine = 1; - lastStatementLine = currentStatement.loc.end.line; - } - if (numberOfStatementsOnThisLine === maxStatementsPerLine + 1) { - report(currentStatement); - } + // Reports if the node violated this rule. + if (numberOfStatementsOnThisLine === maxStatementsPerLine + 1) { + context.report({node: node, message: message}); } } /** - * Check each line in the body of a node - * @param {ASTNode} node node to evaluate + * Updates the state of this rule with the end line of leaving node to check with the next statement. + * + * @param {ASTNode} node - A node to check. * @returns {void} - * @private */ - function checkLinesInBody(node) { - enforceMaxStatementsPerLine(node.body); - } + function leaveStatement(node) { + var line = getActualLastToken(node).loc.end.line; - /** - * Check each line in the consequent of a switch case - * @param {ASTNode} node node to evaluate - * @returns {void} - * @private - */ - function checkLinesInConsequent(node) { - enforceMaxStatementsPerLine(node.consequent); + // Update state. + if (line !== lastStatementLine) { + numberOfStatementsOnThisLine = 1; + lastStatementLine = line; + } } //-------------------------------------------------------------------------- @@ -104,10 +114,61 @@ module.exports = { //-------------------------------------------------------------------------- return { - Program: checkLinesInBody, - BlockStatement: checkLinesInBody, - SwitchCase: checkLinesInConsequent - }; + BreakStatement: enterStatement, + ClassDeclaration: enterStatement, + ContinueStatement: enterStatement, + DebuggerStatement: enterStatement, + DoWhileStatement: enterStatement, + ExpressionStatement: enterStatement, + ForInStatement: enterStatement, + ForOfStatement: enterStatement, + ForStatement: enterStatement, + FunctionDeclaration: enterStatement, + IfStatement: enterStatement, + ImportDeclaration: enterStatement, + LabeledStatement: enterStatement, + ReturnStatement: enterStatement, + SwitchStatement: enterStatement, + ThrowStatement: enterStatement, + TryStatement: enterStatement, + VariableDeclaration: enterStatement, + WhileStatement: enterStatement, + WithStatement: enterStatement, + ExportNamedDeclaration: enterStatement, + ExportDefaultDeclaration: enterStatement, + ExportAllDeclaration: enterStatement, + "BreakStatement:exit": leaveStatement, + "ClassDeclaration:exit": leaveStatement, + "ContinueStatement:exit": leaveStatement, + "DebuggerStatement:exit": leaveStatement, + "DoWhileStatement:exit": leaveStatement, + "ExpressionStatement:exit": leaveStatement, + "ForInStatement:exit": leaveStatement, + "ForOfStatement:exit": leaveStatement, + "ForStatement:exit": leaveStatement, + "FunctionDeclaration:exit": leaveStatement, + "IfStatement:exit": leaveStatement, + "ImportDeclaration:exit": leaveStatement, + "LabeledStatement:exit": leaveStatement, + "ReturnStatement:exit": leaveStatement, + "SwitchStatement:exit": leaveStatement, + "ThrowStatement:exit": leaveStatement, + "TryStatement:exit": leaveStatement, + "VariableDeclaration:exit": leaveStatement, + "WhileStatement:exit": leaveStatement, + "WithStatement:exit": leaveStatement, + "ExportNamedDeclaration:exit": leaveStatement, + "ExportDefaultDeclaration:exit": leaveStatement, + "ExportAllDeclaration:exit": leaveStatement, + + // For backward compatibility. + // Empty blocks should be warned if `{max: 0}` was given. + BlockStatement: function reportIfZero(node) { + if (maxStatementsPerLine === 0 && node.body.length === 0) { + context.report({node: node, message: message}); + } + } + }; } }; diff --git a/node_modules/eslint/lib/rules/new-cap.js b/node_modules/eslint/lib/rules/new-cap.js index 697b60d..2dabb30 100644 --- a/node_modules/eslint/lib/rules/new-cap.js +++ b/node_modules/eslint/lib/rules/new-cap.js @@ -127,6 +127,8 @@ module.exports = { var listeners = {}; + var sourceCode = context.getSourceCode(); + //-------------------------------------------------------------------------- // Helpers //-------------------------------------------------------------------------- @@ -186,7 +188,7 @@ module.exports = { * @returns {Boolean} Returns true if the callee may be capitalized */ function isCapAllowed(allowedMap, node, calleeName) { - if (allowedMap[calleeName] || allowedMap[context.getSource(node.callee)]) { + if (allowedMap[calleeName] || allowedMap[sourceCode.getText(node.callee)]) { return true; } diff --git a/node_modules/eslint/lib/rules/new-parens.js b/node_modules/eslint/lib/rules/new-parens.js index 0d7a84e..ec61066 100644 --- a/node_modules/eslint/lib/rules/new-parens.js +++ b/node_modules/eslint/lib/rules/new-parens.js @@ -21,11 +21,12 @@ module.exports = { }, create: function(context) { + var sourceCode = context.getSourceCode(); return { NewExpression: function(node) { - var tokens = context.getTokens(node); + var tokens = sourceCode.getTokens(node); var prenticesTokens = tokens.filter(function(token) { return token.value === "(" || token.value === ")"; }); diff --git a/node_modules/eslint/lib/rules/newline-after-var.js b/node_modules/eslint/lib/rules/newline-after-var.js index fd80c8c..8801407 100644 --- a/node_modules/eslint/lib/rules/newline-after-var.js +++ b/node_modules/eslint/lib/rules/newline-after-var.js @@ -35,7 +35,7 @@ module.exports = { var mode = context.options[0] === "never" ? "never" : "always"; // Cache starting and ending line numbers of comments for faster lookup - var commentEndLine = context.getAllComments().reduce(function(result, token) { + var commentEndLine = sourceCode.getAllComments().reduce(function(result, token) { result[token.loc.start.line] = token.loc.end.line; return result; }, {}); diff --git a/node_modules/eslint/lib/rules/newline-before-return.js b/node_modules/eslint/lib/rules/newline-before-return.js index 77f3aed..5c8a139 100644 --- a/node_modules/eslint/lib/rules/newline-before-return.js +++ b/node_modules/eslint/lib/rules/newline-before-return.js @@ -133,32 +133,17 @@ module.exports = { return (lineNumNode - lineNumTokenBefore - commentLines) > 1; } - /** - * Reports expected/unexpected newline before return statement - * @param {ASTNode} node - the node to report in the event of an error - * @param {boolean} isExpected - whether the newline is expected or not - * @returns {void} - * @private - */ - function reportError(node, isExpected) { - var expected = isExpected ? "Expected" : "Unexpected"; - - context.report({ - node: node, - message: expected + " newline before return statement." - }); - } - //-------------------------------------------------------------------------- // Public //-------------------------------------------------------------------------- return { ReturnStatement: function(node) { - if (isFirstNode(node) && hasNewlineBefore(node)) { - reportError(node, false); - } else if (!isFirstNode(node) && !hasNewlineBefore(node)) { - reportError(node, true); + if (!isFirstNode(node) && !hasNewlineBefore(node)) { + context.report({ + node: node, + message: "Expected newline before return statement." + }); } } }; diff --git a/node_modules/eslint/lib/rules/newline-per-chained-call.js b/node_modules/eslint/lib/rules/newline-per-chained-call.js index 8040141..c412d53 100644 --- a/node_modules/eslint/lib/rules/newline-per-chained-call.js +++ b/node_modules/eslint/lib/rules/newline-per-chained-call.js @@ -36,6 +36,23 @@ module.exports = { var options = context.options[0] || {}, ignoreChainWithDepth = options.ignoreChainWithDepth || 2; + var sourceCode = context.getSourceCode(); + + /** + * Gets the property text of a given MemberExpression node. + * If the text is multiline, this returns only the first line. + * + * @param {ASTNode} node - A MemberExpression node to get. + * @returns {string} The property text of the node. + */ + function getPropertyText(node) { + var prefix = node.computed ? "[" : "."; + var lines = sourceCode.getText(node.property).split(/\r\n|\r|\n/g); + var suffix = node.computed && lines.length === 1 ? "]" : ""; + + return prefix + lines[0] + suffix; + } + return { "CallExpression:exit": function(node) { if (!node.callee || node.callee.type !== "MemberExpression") { @@ -55,7 +72,7 @@ module.exports = { context.report( callee.property, callee.property.loc.start, - "Expected line break after `" + context.getSource(callee.object).replace(/\r\n|\r|\n/g, "\\n") + "`." + "Expected line break before `" + getPropertyText(callee) + "`." ); } } diff --git a/node_modules/eslint/lib/rules/no-cond-assign.js b/node_modules/eslint/lib/rules/no-cond-assign.js index 27b99c6..e0979dd 100644 --- a/node_modules/eslint/lib/rules/no-cond-assign.js +++ b/node_modules/eslint/lib/rules/no-cond-assign.js @@ -34,6 +34,8 @@ module.exports = { var prohibitAssign = (context.options[0] || "except-parens"); + var sourceCode = context.getSourceCode(); + /** * Check whether an AST node is the test expression for a conditional statement. * @param {!Object} node The node to test. @@ -68,8 +70,8 @@ module.exports = { * @returns {boolean} `true` if the code is enclosed in parentheses; otherwise, `false`. */ function isParenthesised(node) { - var previousToken = context.getTokenBefore(node), - nextToken = context.getTokenAfter(node); + var previousToken = sourceCode.getTokenBefore(node), + nextToken = sourceCode.getTokenAfter(node); return previousToken.value === "(" && previousToken.range[1] <= node.range[0] && nextToken.value === ")" && nextToken.range[0] >= node.range[1]; @@ -81,8 +83,8 @@ module.exports = { * @returns {boolean} `true` if the code is enclosed in two sets of parentheses; otherwise, `false`. */ function isParenthesisedTwice(node) { - var previousToken = context.getTokenBefore(node, 1), - nextToken = context.getTokenAfter(node, 1); + var previousToken = sourceCode.getTokenBefore(node, 1), + nextToken = sourceCode.getTokenAfter(node, 1); return isParenthesised(node) && previousToken.value === "(" && previousToken.range[1] <= node.range[0] && diff --git a/node_modules/eslint/lib/rules/no-confusing-arrow.js b/node_modules/eslint/lib/rules/no-confusing-arrow.js index d951a53..1f18aa3 100644 --- a/node_modules/eslint/lib/rules/no-confusing-arrow.js +++ b/node_modules/eslint/lib/rules/no-confusing-arrow.js @@ -44,6 +44,7 @@ module.exports = { create: function(context) { var config = context.options[0] || {}; + var sourceCode = context.getSourceCode(); /** * Reports if an arrow function contains an ambiguous conditional. @@ -53,7 +54,7 @@ module.exports = { function checkArrowFunc(node) { var body = node.body; - if (isConditional(body) && !(config.allowParens && astUtils.isParenthesised(context, body))) { + if (isConditional(body) && !(config.allowParens && astUtils.isParenthesised(sourceCode, body))) { context.report(node, "Arrow function used ambiguously with a conditional expression."); } } diff --git a/node_modules/eslint/lib/rules/no-constant-condition.js b/node_modules/eslint/lib/rules/no-constant-condition.js index 0072491..7c4ede7 100644 --- a/node_modules/eslint/lib/rules/no-constant-condition.js +++ b/node_modules/eslint/lib/rules/no-constant-condition.js @@ -17,10 +17,23 @@ module.exports = { recommended: true }, - schema: [] + schema: [ + { + type: "object", + properties: { + checkLoops: { + type: "boolean" + } + }, + additionalProperties: false + } + + ] }, create: function(context) { + var options = context.options[0] || {}, + checkLoops = options.checkLoops !== false; //-------------------------------------------------------------------------- // Helpers @@ -102,6 +115,18 @@ module.exports = { } } + /** + * Checks node when checkLoops option is enabled + * @param {ASTNode} node The AST node to check. + * @returns {void} + * @private + */ + function checkLoop(node) { + if (checkLoops) { + checkConstantCondition(node); + } + } + //-------------------------------------------------------------------------- // Public //-------------------------------------------------------------------------- @@ -109,9 +134,9 @@ module.exports = { return { ConditionalExpression: checkConstantCondition, IfStatement: checkConstantCondition, - WhileStatement: checkConstantCondition, - DoWhileStatement: checkConstantCondition, - ForStatement: checkConstantCondition + WhileStatement: checkLoop, + DoWhileStatement: checkLoop, + ForStatement: checkLoop }; } diff --git a/node_modules/eslint/lib/rules/no-div-regex.js b/node_modules/eslint/lib/rules/no-div-regex.js index 58c4466..75a6085 100644 --- a/node_modules/eslint/lib/rules/no-div-regex.js +++ b/node_modules/eslint/lib/rules/no-div-regex.js @@ -21,11 +21,12 @@ module.exports = { }, create: function(context) { + var sourceCode = context.getSourceCode(); return { Literal: function(node) { - var token = context.getFirstToken(node); + var token = sourceCode.getFirstToken(node); if (token.type === "RegularExpression" && token.value[1] === "=") { context.report(node, "A regular expression literal can be confused with '/='."); diff --git a/node_modules/eslint/lib/rules/no-duplicate-case.js b/node_modules/eslint/lib/rules/no-duplicate-case.js index 1308730..8c877ed 100644 --- a/node_modules/eslint/lib/rules/no-duplicate-case.js +++ b/node_modules/eslint/lib/rules/no-duplicate-case.js @@ -22,13 +22,14 @@ module.exports = { }, create: function(context) { + var sourceCode = context.getSourceCode(); return { SwitchStatement: function(node) { var mapping = {}; node.cases.forEach(function(switchCase) { - var key = context.getSource(switchCase.test); + var key = sourceCode.getText(switchCase.test); if (mapping[key]) { context.report(switchCase, "Duplicate case label."); diff --git a/node_modules/eslint/lib/rules/no-empty-character-class.js b/node_modules/eslint/lib/rules/no-empty-character-class.js index e015e0c..34ef78a 100644 --- a/node_modules/eslint/lib/rules/no-empty-character-class.js +++ b/node_modules/eslint/lib/rules/no-empty-character-class.js @@ -39,11 +39,12 @@ module.exports = { }, create: function(context) { + var sourceCode = context.getSourceCode(); return { Literal: function(node) { - var token = context.getFirstToken(node); + var token = sourceCode.getFirstToken(node); if (token.type === "RegularExpression" && !regex.test(token.value)) { context.report(node, "Empty class."); diff --git a/node_modules/eslint/lib/rules/no-empty-function.js b/node_modules/eslint/lib/rules/no-empty-function.js index 412614b..0102acf 100644 --- a/node_modules/eslint/lib/rules/no-empty-function.js +++ b/node_modules/eslint/lib/rules/no-empty-function.js @@ -121,6 +121,8 @@ module.exports = { var options = context.options[0] || {}; var allowed = options.allow || []; + var sourceCode = context.getSourceCode(); + /** * Reports a given function node if the node matches the following patterns. * @@ -139,7 +141,7 @@ module.exports = { if (allowed.indexOf(kind) === -1 && node.body.type === "BlockStatement" && node.body.body.length === 0 && - context.getComments(node.body).trailing.length === 0 + sourceCode.getComments(node.body).trailing.length === 0 ) { context.report({ node: node, diff --git a/node_modules/eslint/lib/rules/no-empty.js b/node_modules/eslint/lib/rules/no-empty.js index 8f32428..1302a90 100644 --- a/node_modules/eslint/lib/rules/no-empty.js +++ b/node_modules/eslint/lib/rules/no-empty.js @@ -35,6 +35,8 @@ module.exports = { var options = context.options[0] || {}, allowEmptyCatch = options.allowEmptyCatch || false; + var sourceCode = context.getSourceCode(); + return { BlockStatement: function(node) { @@ -53,7 +55,7 @@ module.exports = { } // any other block is only allowed to be empty, if it contains a comment - if (context.getComments(node).trailing.length > 0) { + if (sourceCode.getComments(node).trailing.length > 0) { return; } diff --git a/node_modules/eslint/lib/rules/no-extra-parens.js b/node_modules/eslint/lib/rules/no-extra-parens.js index cf12939..c33a649 100644 --- a/node_modules/eslint/lib/rules/no-extra-parens.js +++ b/node_modules/eslint/lib/rules/no-extra-parens.js @@ -40,7 +40,8 @@ module.exports = { type: "object", properties: { conditionalAssign: {type: "boolean"}, - nestedBinaryExpressions: {type: "boolean"} + nestedBinaryExpressions: {type: "boolean"}, + returnAssign: {type: "boolean"} }, additionalProperties: false } @@ -53,11 +54,14 @@ module.exports = { }, create: function(context) { - var isParenthesised = astUtils.isParenthesised.bind(astUtils, context); + var sourceCode = context.getSourceCode(); + + var isParenthesised = astUtils.isParenthesised.bind(astUtils, sourceCode); + var precedence = astUtils.getPrecedence; var ALL_NODES = context.options[0] !== "functions"; var EXCEPT_COND_ASSIGN = ALL_NODES && context.options[1] && context.options[1].conditionalAssign === false; var NESTED_BINARY = ALL_NODES && context.options[1] && context.options[1].nestedBinaryExpressions === false; - var sourceCode = context.getSourceCode(); + var EXCEPT_RETURN_ASSIGN = ALL_NODES && context.options[1] && context.options[1].returnAssign === false; /** * Determines if this rule should be enforced for a node given the current configuration. @@ -76,8 +80,8 @@ module.exports = { * @private */ function isParenthesisedTwice(node) { - var previousToken = context.getTokenBefore(node, 1), - nextToken = context.getTokenAfter(node, 1); + var previousToken = sourceCode.getTokenBefore(node, 1), + nextToken = sourceCode.getTokenAfter(node, 1); return isParenthesised(node) && previousToken && nextToken && previousToken.value === "(" && previousToken.range[1] <= node.range[0] && @@ -115,6 +119,64 @@ module.exports = { return EXCEPT_COND_ASSIGN && node.test.type === "AssignmentExpression"; } + /** + * Determines if a node is in a return statement + * @param {ASTNode} node - The node to be checked. + * @returns {boolean} True if the node is in a return statement. + * @private + */ + function isInReturnStatement(node) { + while (node) { + if (node.type === "ReturnStatement" || + (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement")) { + return true; + } + node = node.parent; + } + + return false; + } + + /** + * Determines if a node is or contains an assignment expression + * @param {ASTNode} node - The node to be checked. + * @returns {boolean} True if the node is or contains an assignment expression. + * @private + */ + function containsAssignment(node) { + if (node.type === "AssignmentExpression") { + return true; + } else if (node.type === "ConditionalExpression" && + (node.consequent.type === "AssignmentExpression" || node.alternate.type === "AssignmentExpression")) { + return true; + } else if ((node.left && node.left.type === "AssignmentExpression") || + (node.right && node.right.type === "AssignmentExpression")) { + return true; + } + + return false; + } + + /** + * Determines if a node is contained by or is itself a return statement and is allowed to have a parenthesised assignment + * @param {ASTNode} node - The node to be checked. + * @returns {boolean} True if the assignment can be parenthesised. + * @private + */ + function isReturnAssignException(node) { + if (!EXCEPT_RETURN_ASSIGN || !isInReturnStatement(node)) { + return false; + } + + if (node.type === "ReturnStatement") { + return node.argument && containsAssignment(node.argument); + } else if (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement") { + return containsAssignment(node.body); + } else { + return containsAssignment(node); + } + } + /** * Determines if a node following a [no LineTerminator here] restriction is * surrounded by (potentially) invalid extra parentheses. @@ -194,98 +256,6 @@ module.exports = { throw new Error("unreachable"); } - /** - * Get the precedence level based on the node type - * @param {ASTNode} node node to evaluate - * @returns {int} precedence level - * @private - */ - function precedence(node) { - - switch (node.type) { - case "SequenceExpression": - return 0; - - case "AssignmentExpression": - case "ArrowFunctionExpression": - case "YieldExpression": - return 1; - - case "ConditionalExpression": - return 3; - - case "LogicalExpression": - switch (node.operator) { - case "||": - return 4; - case "&&": - return 5; - - // no default - } - - /* falls through */ - - case "BinaryExpression": - - switch (node.operator) { - case "|": - return 6; - case "^": - return 7; - case "&": - return 8; - case "==": - case "!=": - case "===": - case "!==": - return 9; - case "<": - case "<=": - case ">": - case ">=": - case "in": - case "instanceof": - return 10; - case "<<": - case ">>": - case ">>>": - return 11; - case "+": - case "-": - return 12; - case "*": - case "/": - case "%": - return 13; - - // no default - } - - /* falls through */ - - case "UnaryExpression": - return 14; - - case "UpdateExpression": - return 15; - - case "CallExpression": - - // IIFE is allowed to have parens in any position (#655) - if (node.callee.type === "FunctionExpression") { - return -1; - } - return 16; - - case "NewExpression": - return 17; - - // no default - } - return 18; - } - /** * Report the node * @param {ASTNode} node node to evaluate @@ -293,7 +263,7 @@ module.exports = { * @private */ function report(node) { - var previousToken = context.getTokenBefore(node); + var previousToken = sourceCode.getTokenBefore(node); context.report(node, previousToken.loc.start, "Gratuitous parentheses around expression."); } @@ -368,6 +338,10 @@ module.exports = { }, ArrowFunctionExpression: function(node) { + if (isReturnAssignException(node)) { + return; + } + if (node.body.type !== "BlockStatement") { if (sourceCode.getFirstToken(node.body).value !== "{" && hasExcessParens(node.body) && precedence(node.body) >= precedence({type: "AssignmentExpression"})) { report(node.body); @@ -383,6 +357,10 @@ module.exports = { }, AssignmentExpression: function(node) { + if (isReturnAssignException(node)) { + return; + } + if (hasExcessParens(node.right) && precedence(node.right) >= precedence(node)) { report(node.right); } @@ -392,12 +370,18 @@ module.exports = { CallExpression: dryCallNew, ConditionalExpression: function(node) { + if (isReturnAssignException(node)) { + return; + } + if (hasExcessParens(node.test) && precedence(node.test) >= precedence({type: "LogicalExpression", operator: "||"})) { report(node.test); } + if (hasExcessParens(node.consequent) && precedence(node.consequent) >= precedence({type: "AssignmentExpression"})) { report(node.consequent); } + if (hasExcessParens(node.alternate) && precedence(node.alternate) >= precedence({type: "AssignmentExpression"})) { report(node.alternate); } @@ -413,7 +397,7 @@ module.exports = { var firstToken, secondToken, firstTokens; if (hasExcessParens(node.expression)) { - firstTokens = context.getFirstTokens(node.expression, 2); + firstTokens = sourceCode.getFirstTokens(node.expression, 2); firstToken = firstTokens[0]; secondToken = firstTokens[1]; @@ -476,7 +460,7 @@ module.exports = { !( (node.object.type === "Literal" && typeof node.object.value === "number" && - /^[0-9]+$/.test(context.getFirstToken(node.object).value)) + /^[0-9]+$/.test(sourceCode.getFirstToken(node.object).value)) || // RegExp literal is allowed to have parens (#1589) @@ -511,6 +495,10 @@ module.exports = { ReturnStatement: function(node) { var returnToken = sourceCode.getFirstToken(node); + if (isReturnAssignException(node)) { + return; + } + if (node.argument && hasExcessParensNoLineTerminator(returnToken, node.argument) && diff --git a/node_modules/eslint/lib/rules/no-extra-semi.js b/node_modules/eslint/lib/rules/no-extra-semi.js index e451b9e..679a166 100644 --- a/node_modules/eslint/lib/rules/no-extra-semi.js +++ b/node_modules/eslint/lib/rules/no-extra-semi.js @@ -22,6 +22,7 @@ module.exports = { }, create: function(context) { + var sourceCode = context.getSourceCode(); /** * Reports an unnecessary semicolon error. @@ -48,7 +49,7 @@ module.exports = { function checkForPartOfClassBody(firstToken) { for (var token = firstToken; token.type === "Punctuator" && token.value !== "}"; - token = context.getTokenAfter(token) + token = sourceCode.getTokenAfter(token) ) { if (token.value === ";") { report(token); @@ -65,7 +66,16 @@ module.exports = { */ EmptyStatement: function(node) { var parent = node.parent, - allowedParentTypes = ["ForStatement", "ForInStatement", "ForOfStatement", "WhileStatement", "DoWhileStatement"]; + allowedParentTypes = [ + "ForStatement", + "ForInStatement", + "ForOfStatement", + "WhileStatement", + "DoWhileStatement", + "IfStatement", + "LabeledStatement", + "WithStatement" + ]; if (allowedParentTypes.indexOf(parent.type) === -1) { report(node); @@ -78,7 +88,7 @@ module.exports = { * @returns {void} */ ClassBody: function(node) { - checkForPartOfClassBody(context.getFirstToken(node, 1)); // 0 is `{`. + checkForPartOfClassBody(sourceCode.getFirstToken(node, 1)); // 0 is `{`. }, /** @@ -87,7 +97,7 @@ module.exports = { * @returns {void} */ MethodDefinition: function(node) { - checkForPartOfClassBody(context.getTokenAfter(node)); + checkForPartOfClassBody(sourceCode.getTokenAfter(node)); } }; diff --git a/node_modules/eslint/lib/rules/no-implicit-coercion.js b/node_modules/eslint/lib/rules/no-implicit-coercion.js index 058d9f3..113c205 100644 --- a/node_modules/eslint/lib/rules/no-implicit-coercion.js +++ b/node_modules/eslint/lib/rules/no-implicit-coercion.js @@ -179,6 +179,8 @@ module.exports = { var options = parseOptions(context.options[0]), operatorAllowed = false; + var sourceCode = context.getSourceCode(); + return { UnaryExpression: function(node) { @@ -188,7 +190,7 @@ module.exports = { context.report( node, "use `Boolean({{code}})` instead.", { - code: context.getSource(node.argument.argument) + code: sourceCode.getText(node.argument.argument) }); } @@ -198,7 +200,7 @@ module.exports = { context.report( node, "use `{{code}} !== -1` instead.", { - code: context.getSource(node.argument) + code: sourceCode.getText(node.argument) }); } @@ -208,7 +210,7 @@ module.exports = { context.report( node, "use `Number({{code}})` instead.", { - code: context.getSource(node.argument) + code: sourceCode.getText(node.argument) }); } }, @@ -224,7 +226,7 @@ module.exports = { context.report( node, "use `Number({{code}})` instead.", { - code: context.getSource(nonNumericOperand) + code: sourceCode.getText(nonNumericOperand) }); } @@ -234,7 +236,7 @@ module.exports = { context.report( node, "use `String({{code}})` instead.", { - code: context.getSource(getOtherOperand(node, "")) + code: sourceCode.getText(getOtherOperand(node, "")) }); } }, @@ -247,7 +249,7 @@ module.exports = { context.report( node, "use `{{code}} = String({{code}})` instead.", { - code: context.getSource(getOtherOperand(node, "")) + code: sourceCode.getText(getOtherOperand(node, "")) }); } } diff --git a/node_modules/eslint/lib/rules/no-inline-comments.js b/node_modules/eslint/lib/rules/no-inline-comments.js index 7835ed3..e313eac 100644 --- a/node_modules/eslint/lib/rules/no-inline-comments.js +++ b/node_modules/eslint/lib/rules/no-inline-comments.js @@ -22,6 +22,7 @@ module.exports = { }, create: function(context) { + var sourceCode = context.getSourceCode(); /** * Will check that comments are not on lines starting with or ending with code @@ -32,8 +33,8 @@ module.exports = { function testCodeAroundComment(node) { // Get the whole line and cut it off at the start of the comment - var startLine = String(context.getSourceLines()[node.loc.start.line - 1]); - var endLine = String(context.getSourceLines()[node.loc.end.line - 1]); + var startLine = String(sourceCode.lines[node.loc.start.line - 1]); + var endLine = String(sourceCode.lines[node.loc.end.line - 1]); var preamble = startLine.slice(0, node.loc.start.column).trim(); diff --git a/node_modules/eslint/lib/rules/no-irregular-whitespace.js b/node_modules/eslint/lib/rules/no-irregular-whitespace.js index 1dbea8f..032dd96 100644 --- a/node_modules/eslint/lib/rules/no-irregular-whitespace.js +++ b/node_modules/eslint/lib/rules/no-irregular-whitespace.js @@ -6,6 +6,15 @@ "use strict"; +//------------------------------------------------------------------------------ +// Constants +//------------------------------------------------------------------------------ + +var ALL_IRREGULARS = /[\f\v\u0085\u00A0\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000\u2028\u2029]/; +var IRREGULAR_WHITESPACE = /[\f\v\u0085\u00A0\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000]+/mg; +var IRREGULAR_LINE_TERMINATORS = /[\u2028\u2029]/mg; +var LINE_BREAK = /\r\n|\r|\n|\u2028|\u2029/g; + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -24,6 +33,15 @@ module.exports = { properties: { skipComments: { type: "boolean" + }, + skipStrings: { + type: "boolean" + }, + skipTemplates: { + type: "boolean" + }, + skipRegExps: { + type: "boolean" } }, additionalProperties: false @@ -33,9 +51,6 @@ module.exports = { create: function(context) { - var irregularWhitespace = /[\u0085\u00A0\ufeff\f\v\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000]+/mg, - irregularLineTerminators = /[\u2028\u2029]/mg; - // Module store of errors that we have found var errors = []; @@ -45,6 +60,11 @@ module.exports = { // Lookup the `skipComments` option, which defaults to `false`. var options = context.options[0] || {}; var skipComments = !!options.skipComments; + var skipStrings = options.skipStrings !== false; + var skipRegExps = !!options.skipRegExps; + var skipTemplates = !!options.skipTemplates; + + var sourceCode = context.getSourceCode(); /** * Removes errors that occur inside a string node @@ -75,10 +95,27 @@ module.exports = { * @private */ function removeInvalidNodeErrorsInIdentifierOrLiteral(node) { - if (typeof node.value === "string") { + var shouldCheckStrings = skipStrings && (typeof node.value === "string"); + var shouldCheckRegExps = skipRegExps && (node.value instanceof RegExp); + + if (shouldCheckStrings || shouldCheckRegExps) { // If we have irregular characters remove them from the errors list - if (node.raw.match(irregularWhitespace) || node.raw.match(irregularLineTerminators)) { + if (ALL_IRREGULARS.test(node.raw)) { + removeWhitespaceError(node); + } + } + } + + /** + * Checks template string literal nodes for errors that we are choosing to ignore and calls the relevant methods to remove the errors + * @param {ASTNode} node to check for matching errors. + * @returns {void} + * @private + */ + function removeInvalidNodeErrorsInTemplateLiteral(node) { + if (typeof node.value.raw === "string") { + if (ALL_IRREGULARS.test(node.value.raw)) { removeWhitespaceError(node); } } @@ -91,7 +128,7 @@ module.exports = { * @private */ function removeInvalidNodeErrorsInComment(node) { - if (node.value.match(irregularWhitespace) || node.value.match(irregularLineTerminators)) { + if (ALL_IRREGULARS.test(node.value)) { removeWhitespaceError(node); } } @@ -103,14 +140,14 @@ module.exports = { * @private */ function checkForIrregularWhitespace(node) { - var sourceLines = context.getSourceLines(); + var sourceLines = sourceCode.lines; sourceLines.forEach(function(sourceLine, lineIndex) { var lineNumber = lineIndex + 1, location, match; - while ((match = irregularWhitespace.exec(sourceLine)) !== null) { + while ((match = IRREGULAR_WHITESPACE.exec(sourceLine)) !== null) { location = { line: lineNumber, column: match.index @@ -128,15 +165,15 @@ module.exports = { * @private */ function checkForIrregularLineTerminators(node) { - var source = context.getSource(), - sourceLines = context.getSourceLines(), - linebreaks = source.match(/\r\n|\r|\n|\u2028|\u2029/g), + var source = sourceCode.getText(), + sourceLines = sourceCode.lines, + linebreaks = source.match(LINE_BREAK), lastLineIndex = -1, lineIndex, location, match; - while ((match = irregularLineTerminators.exec(source)) !== null) { + while ((match = IRREGULAR_LINE_TERMINATORS.exec(source)) !== null) { lineIndex = linebreaks.indexOf(match[0], lastLineIndex + 1) || 0; location = { @@ -166,8 +203,10 @@ module.exports = { */ function noop() {} - return { - Program: function(node) { + var nodes = {}; + + if (ALL_IRREGULARS.test(sourceCode.getText())) { + nodes.Program = function(node) { /* * As we can easily fire warnings for all white space issues with @@ -182,13 +221,14 @@ module.exports = { checkForIrregularWhitespace(node); checkForIrregularLineTerminators(node); - }, + }; - Identifier: removeInvalidNodeErrorsInIdentifierOrLiteral, - Literal: removeInvalidNodeErrorsInIdentifierOrLiteral, - LineComment: skipComments ? rememberCommentNode : noop, - BlockComment: skipComments ? rememberCommentNode : noop, - "Program:exit": function() { + nodes.Identifier = removeInvalidNodeErrorsInIdentifierOrLiteral; + nodes.Literal = removeInvalidNodeErrorsInIdentifierOrLiteral; + nodes.TemplateElement = skipTemplates ? removeInvalidNodeErrorsInTemplateLiteral : noop; + nodes.LineComment = skipComments ? rememberCommentNode : noop; + nodes.BlockComment = skipComments ? rememberCommentNode : noop; + nodes["Program:exit"] = function() { if (skipComments) { @@ -200,7 +240,11 @@ module.exports = { errors.forEach(function(error) { context.report.apply(context, error); }); - } - }; + }; + } else { + nodes.Program = noop; + } + + return nodes; } }; diff --git a/node_modules/eslint/lib/rules/no-loop-func.js b/node_modules/eslint/lib/rules/no-loop-func.js index 2b76093..247dc52 100644 --- a/node_modules/eslint/lib/rules/no-loop-func.js +++ b/node_modules/eslint/lib/rules/no-loop-func.js @@ -73,7 +73,7 @@ function getContainingLoopNode(node) { * @returns {ASTNode} The most outer loop node. */ function getTopLoopNode(node, excludedNode) { - var retv = null; + var retv = node; var border = excludedNode ? excludedNode.range[1] : 0; while (node && node.range[0] >= border) { diff --git a/node_modules/eslint/lib/rules/no-mixed-operators.js b/node_modules/eslint/lib/rules/no-mixed-operators.js new file mode 100644 index 0000000..9a8b1c3 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-mixed-operators.js @@ -0,0 +1,212 @@ +/** + * @fileoverview Rule to disallow mixed binary operators. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var astUtils = require("../ast-utils.js"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +var ARITHMETIC_OPERATORS = ["+", "-", "*", "/", "%", "**"]; +var BITWISE_OPERATORS = ["&", "|", "^", "~", "<<", ">>", ">>>"]; +var COMPARISON_OPERATORS = ["==", "!=", "===", "!==", ">", ">=", "<", "<="]; +var LOGICAL_OPERATORS = ["&&", "||"]; +var RELATIONAL_OPERATORS = ["in", "instanceof"]; +var ALL_OPERATORS = [].concat( + ARITHMETIC_OPERATORS, + BITWISE_OPERATORS, + COMPARISON_OPERATORS, + LOGICAL_OPERATORS, + RELATIONAL_OPERATORS +); +var DEFAULT_GROUPS = [ + ARITHMETIC_OPERATORS, + BITWISE_OPERATORS, + COMPARISON_OPERATORS, + LOGICAL_OPERATORS, + RELATIONAL_OPERATORS +]; +var TARGET_NODE_TYPE = /^(?:Binary|Logical)Expression$/; + +/** + * Normalizes options. + * + * @param {object|undefined} options - A options object to normalize. + * @returns {object} Normalized option object. + */ +function normalizeOptions(options) { + var hasGroups = (options && options.groups && options.groups.length > 0); + var groups = hasGroups ? options.groups : DEFAULT_GROUPS; + var allowSamePrecedence = (options && options.allowSamePrecedence) !== false; + + return { + groups: groups, + allowSamePrecedence: allowSamePrecedence + }; +} + +/** + * Checks whether any group which includes both given operator exists or not. + * + * @param {Array.} groups - A list of groups to check. + * @param {string} left - An operator. + * @param {string} right - Another operator. + * @returns {boolean} `true` if such group existed. + */ +function includesBothInAGroup(groups, left, right) { + return groups.some(function(group) { + return group.indexOf(left) !== -1 && group.indexOf(right) !== -1; + }); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow mixed binary operators", + category: "Stylistic Issues", + recommended: false + }, + schema: [ + { + type: "object", + properties: { + groups: { + type: "array", + items: { + type: "array", + items: {enum: ALL_OPERATORS}, + minItems: 2, + uniqueItems: true + }, + uniqueItems: true + }, + allowSamePrecedence: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create: function(context) { + var sourceCode = context.getSourceCode(); + var options = normalizeOptions(context.options[0]); + + /** + * Checks whether a given node should be ignored by options or not. + * + * @param {ASTNode} node - A node to check. This is a BinaryExpression + * node or a LogicalExpression node. This parent node is one of + * them, too. + * @returns {boolean} `true` if the node should be ignored. + */ + function shouldIgnore(node) { + var a = node; + var b = node.parent; + + return ( + !includesBothInAGroup(options.groups, a.operator, b.operator) || + ( + options.allowSamePrecedence && + astUtils.getPrecedence(a) === astUtils.getPrecedence(b) + ) + ); + } + + /** + * Checks whether the operator of a given node is mixed with parent + * node's operator or not. + * + * @param {ASTNode} node - A node to check. This is a BinaryExpression + * node or a LogicalExpression node. This parent node is one of + * them, too. + * @returns {boolean} `true` if the node was mixed. + */ + function isMixedWithParent(node) { + return ( + node.operator !== node.parent.operator && + !astUtils.isParenthesised(sourceCode, node) + ); + } + + /** + * Gets the operator token of a given node. + * + * @param {ASTNode} node - A node to check. This is a BinaryExpression + * node or a LogicalExpression node. + * @returns {Token} The operator token of the node. + */ + function getOperatorToken(node) { + var token = sourceCode.getTokenAfter(node.left); + + while (token.value === ")") { + token = sourceCode.getTokenAfter(token); + } + + return token; + } + + /** + * Reports both the operator of a given node and the operator of the + * parent node. + * + * @param {ASTNode} node - A node to check. This is a BinaryExpression + * node or a LogicalExpression node. This parent node is one of + * them, too. + * @returns {void} + */ + function reportBothOperators(node) { + var parent = node.parent; + var left = (parent.left === node) ? node : parent; + var right = (parent.left !== node) ? node : parent; + var message = + "Unexpected mix of '" + left.operator + "' and '" + + right.operator + "'."; + + context.report({ + node: left, + loc: getOperatorToken(left).loc.start, + message: message + }); + context.report({ + node: right, + loc: getOperatorToken(right).loc.start, + message: message + }); + } + + /** + * Checks between the operator of this node and the operator of the + * parent node. + * + * @param {ASTNode} node - A node to check. + * @returns {void} + */ + function check(node) { + if (TARGET_NODE_TYPE.test(node.parent.type) && + isMixedWithParent(node) && + !shouldIgnore(node) + ) { + reportBothOperators(node); + } + } + + return { + BinaryExpression: check, + LogicalExpression: check + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js b/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js index b3cdd38..74553f6 100644 --- a/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js +++ b/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js @@ -24,6 +24,7 @@ module.exports = { }, create: function(context) { + var sourceCode = context.getSourceCode(); var smartTabs, ignoredLocs = []; @@ -86,8 +87,8 @@ module.exports = { */ var regex = /^(?=[\t ]*(\t | \t))/, match, - lines = context.getSourceLines(), - comments = context.getAllComments(); + lines = sourceCode.lines, + comments = sourceCode.getAllComments(); comments.forEach(function(comment) { ignoredLocs.push(comment.loc); diff --git a/node_modules/eslint/lib/rules/no-multi-spaces.js b/node_modules/eslint/lib/rules/no-multi-spaces.js index d6c0e41..2fd89ef 100644 --- a/node_modules/eslint/lib/rules/no-multi-spaces.js +++ b/node_modules/eslint/lib/rules/no-multi-spaces.js @@ -95,8 +95,9 @@ module.exports = { return { Program: function() { - var source = context.getSource(), - allComments = context.getAllComments(), + var sourceCode = context.getSourceCode(), + source = sourceCode.getText(), + allComments = sourceCode.getAllComments(), pattern = /[^\n\r\u2028\u2029\t ].? {2,}/g, // note: repeating space token, previousToken, @@ -121,12 +122,12 @@ module.exports = { // do not flag anything inside of comments if (!isIndexInComment(pattern.lastIndex, allComments)) { - token = context.getTokenByRangeStart(pattern.lastIndex); + token = sourceCode.getTokenByRangeStart(pattern.lastIndex); if (token) { - previousToken = context.getTokenBefore(token); + previousToken = sourceCode.getTokenBefore(token); if (hasExceptions) { - parent = context.getNodeByRangeIndex(pattern.lastIndex - 1); + parent = sourceCode.getNodeByRangeIndex(pattern.lastIndex - 1); } if (!parent || !exceptions[parent.type]) { diff --git a/node_modules/eslint/lib/rules/no-multiple-empty-lines.js b/node_modules/eslint/lib/rules/no-multiple-empty-lines.js index 02a41fd..7508164 100644 --- a/node_modules/eslint/lib/rules/no-multiple-empty-lines.js +++ b/node_modules/eslint/lib/rules/no-multiple-empty-lines.js @@ -17,6 +17,8 @@ module.exports = { recommended: false }, + fixable: "whitespace", + schema: [ { type: "object", @@ -52,10 +54,12 @@ module.exports = { if (context.options.length) { max = context.options[0].max; - maxEOF = context.options[0].maxEOF; - maxBOF = context.options[0].maxBOF; + maxEOF = typeof context.options[0].maxEOF !== "undefined" ? context.options[0].maxEOF : max; + maxBOF = typeof context.options[0].maxBOF !== "undefined" ? context.options[0].maxBOF : max; } + var sourceCode = context.getSourceCode(); + //-------------------------------------------------------------------------- // Public //-------------------------------------------------------------------------- @@ -73,22 +77,35 @@ module.exports = { }, "Program:exit": function checkBlankLines(node) { - var lines = context.getSourceLines(), - currentLocation = -1, - lastLocation, + var lines = sourceCode.lines, + fullLines = sourceCode.text.match(/.*(\r\n|\r|\n|\u2028|\u2029)/g) || [], + firstNonBlankLine = -1, + trimmedLines = [], + linesRangeStart = [], blankCounter = 0, + currentLocation, + lastLocation, location, firstOfEndingBlankLines, - firstNonBlankLine = -1, - trimmedLines = []; + diff, + fix, + rangeStart, + rangeEnd; + fix = function(fixer) { + return fixer.removeRange([rangeStart, rangeEnd]); + }; + + linesRangeStart.push(0); lines.forEach(function(str, i) { - var trimmed = str.trim(); + var length = i < fullLines.length ? fullLines[i].length : 0, + trimmed = str.trim(); if ((firstNonBlankLine === -1) && (trimmed !== "")) { firstNonBlankLine = i; } + linesRangeStart.push(linesRangeStart[linesRangeStart.length - 1] + length); trimmedLines.push(trimmed); }); @@ -120,9 +137,17 @@ module.exports = { // Aggregate and count blank lines if (firstNonBlankLine > maxBOF) { - context.report(node, 0, - "Too many blank lines at the beginning of file. Max of " + maxBOF + " allowed."); + diff = firstNonBlankLine - maxBOF; + rangeStart = linesRangeStart[firstNonBlankLine - diff]; + rangeEnd = linesRangeStart[firstNonBlankLine]; + context.report({ + node: node, + loc: node.loc.start, + message: "Too many blank lines at the beginning of file. Max of " + maxBOF + " allowed.", + fix: fix + }); } + currentLocation = firstNonBlankLine - 1; lastLocation = currentLocation; currentLocation = trimmedLines.indexOf("", currentLocation + 1); @@ -141,20 +166,29 @@ module.exports = { // within the file, not at the end if (blankCounter >= max) { + diff = blankCounter - max + 1; + rangeStart = linesRangeStart[location.line - diff]; + rangeEnd = linesRangeStart[location.line]; + context.report({ node: node, loc: location, - message: "More than " + max + " blank " + (max === 1 ? "line" : "lines") + " not allowed." + message: "More than " + max + " blank " + (max === 1 ? "line" : "lines") + " not allowed.", + fix: fix }); } } else { // inside the last blank lines if (blankCounter > maxEOF) { + diff = blankCounter - maxEOF + 1; + rangeStart = linesRangeStart[location.line - diff]; + rangeEnd = linesRangeStart[location.line - 1]; context.report({ node: node, loc: location, - message: "Too many blank lines at the end of file. Max of " + maxEOF + " allowed." + message: "Too many blank lines at the end of file. Max of " + maxEOF + " allowed.", + fix: fix }); } } diff --git a/node_modules/eslint/lib/rules/no-prototype-builtins.js b/node_modules/eslint/lib/rules/no-prototype-builtins.js new file mode 100644 index 0000000..febb145 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-prototype-builtins.js @@ -0,0 +1,52 @@ +/** + * @fileoverview Rule to disallow use of Object.prototype builtins on objects + * @author Andrew Levine + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow calling some `Object.prototype` methods directly on objects", + category: "Possible Errors", + recommended: false + } + }, + + create: function(context) { + var DISALLOWED_PROPS = [ + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable" + ]; + + /** + * Reports if a disallowed property is used in a CallExpression + * @param {ASTNode} node The CallExpression node. + * @returns {void} + */ + function disallowBuiltIns(node) { + if (node.callee.type !== "MemberExpression" || node.callee.computed) { + return; + } + var propName = node.callee.property.name; + + if (DISALLOWED_PROPS.indexOf(propName) > -1) { + context.report({ + message: "Do not access Object.prototype method '{{prop}}' from target object.", + loc: node.callee.property.loc.start, + data: {prop: propName}, + node: node + }); + } + } + + return { + CallExpression: disallowBuiltIns + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-regex-spaces.js b/node_modules/eslint/lib/rules/no-regex-spaces.js index 0584131..bb8df79 100644 --- a/node_modules/eslint/lib/rules/no-regex-spaces.js +++ b/node_modules/eslint/lib/rules/no-regex-spaces.js @@ -21,11 +21,12 @@ module.exports = { }, create: function(context) { + var sourceCode = context.getSourceCode(); return { Literal: function(node) { - var token = context.getFirstToken(node), + var token = sourceCode.getFirstToken(node), nodeType = token.type, nodeValue = token.value, multipleSpacesRegex = /( {2,})+?/, diff --git a/node_modules/eslint/lib/rules/no-return-assign.js b/node_modules/eslint/lib/rules/no-return-assign.js index 0d9e0b4..38fc1cb 100644 --- a/node_modules/eslint/lib/rules/no-return-assign.js +++ b/node_modules/eslint/lib/rules/no-return-assign.js @@ -8,26 +8,19 @@ // Helpers //------------------------------------------------------------------------------ -/** - * Checks whether or not a node is an `AssignmentExpression`. - * @param {Node|null} node - A node to check. - * @returns {boolean} Whether or not the node is an `AssignmentExpression`. - */ -function isAssignment(node) { - return node && node.type === "AssignmentExpression"; -} +var SENTINEL_TYPE = /^(?:[a-zA-Z]+?Statement|ArrowFunctionExpression|FunctionExpression|ClassExpression)$/; /** * Checks whether or not a node is enclosed in parentheses. * @param {Node|null} node - A node to check. - * @param {RuleContext} context - The current context. + * @param {sourceCode} sourceCode - The ESLint SourceCode object. * @returns {boolean} Whether or not the node is enclosed in parentheses. */ -function isEnclosedInParens(node, context) { - var prevToken = context.getTokenBefore(node); - var nextToken = context.getTokenAfter(node); +function isEnclosedInParens(node, sourceCode) { + var prevToken = sourceCode.getTokenBefore(node); + var nextToken = sourceCode.getTokenAfter(node); - return prevToken.value === "(" && nextToken.value === ")"; + return prevToken && prevToken.value === "(" && nextToken && nextToken.value === ")"; } //------------------------------------------------------------------------------ @@ -51,32 +44,33 @@ module.exports = { create: function(context) { var always = (context.options[0] || "except-parens") !== "except-parens"; - - /** - * Check whether return statement contains assignment - * @param {ASTNode} nodeToCheck node to check - * @param {ASTNode} nodeToReport node to report - * @param {string} message message to report - * @returns {void} - * @private - */ - function checkForAssignInReturn(nodeToCheck, nodeToReport, message) { - if (isAssignment(nodeToCheck) && (always || !isEnclosedInParens(nodeToCheck, context))) { - context.report(nodeToReport, message); - } - } + var sourceCode = context.getSourceCode(); return { - ReturnStatement: function(node) { - var message = "Return statement should not contain assignment."; + AssignmentExpression: function(node) { + if (!always && isEnclosedInParens(node, sourceCode)) { + return; + } - checkForAssignInReturn(node.argument, node, message); - }, - ArrowFunctionExpression: function(node) { - if (node.body.type !== "BlockStatement") { - var message = "Arrow function should not return assignment."; + var parent = node.parent; + + // Find ReturnStatement or ArrowFunctionExpression in ancestors. + while (parent && !SENTINEL_TYPE.test(parent.type)) { + node = parent; + parent = parent.parent; + } - checkForAssignInReturn(node.body, node, message); + // Reports. + if (parent && parent.type === "ReturnStatement") { + context.report({ + node: parent, + message: "Return statement should not contain assignment." + }); + } else if (parent && parent.type === "ArrowFunctionExpression" && parent.body === node) { + context.report({ + node: parent, + message: "Arrow function should not return assignment." + }); } } }; diff --git a/node_modules/eslint/lib/rules/no-script-url.js b/node_modules/eslint/lib/rules/no-script-url.js index 0605cd8..1985cf3 100644 --- a/node_modules/eslint/lib/rules/no-script-url.js +++ b/node_modules/eslint/lib/rules/no-script-url.js @@ -14,7 +14,7 @@ module.exports = { meta: { docs: { - description: "disallow `javascript", + description: "disallow `javascript:` urls", category: "Best Practices", recommended: false }, diff --git a/node_modules/eslint/lib/rules/no-sequences.js b/node_modules/eslint/lib/rules/no-sequences.js index ea20a4b..b0d318c 100644 --- a/node_modules/eslint/lib/rules/no-sequences.js +++ b/node_modules/eslint/lib/rules/no-sequences.js @@ -21,6 +21,7 @@ module.exports = { }, create: function(context) { + var sourceCode = context.getSourceCode(); /** * Parts of the grammar that are required to have parens. @@ -30,7 +31,8 @@ module.exports = { IfStatement: "test", SwitchStatement: "discriminant", WhileStatement: "test", - WithStatement: "object" + WithStatement: "object", + ArrowFunctionExpression: "body" // Omitting CallExpression - commas are parsed as argument separators // Omitting NewExpression - commas are parsed as argument separators @@ -55,8 +57,8 @@ module.exports = { * @returns {boolean} True if the node has a paren on each side. */ function isParenthesised(node) { - var previousToken = context.getTokenBefore(node), - nextToken = context.getTokenAfter(node); + var previousToken = sourceCode.getTokenBefore(node), + nextToken = sourceCode.getTokenAfter(node); return previousToken && nextToken && previousToken.value === "(" && previousToken.range[1] <= node.range[0] && @@ -69,8 +71,8 @@ module.exports = { * @returns {boolean} True if two parens surround the node on each side. */ function isParenthesisedTwice(node) { - var previousToken = context.getTokenBefore(node, 1), - nextToken = context.getTokenAfter(node, 1); + var previousToken = sourceCode.getTokenBefore(node, 1), + nextToken = sourceCode.getTokenAfter(node, 1); return isParenthesised(node) && previousToken && nextToken && previousToken.value === "(" && previousToken.range[1] <= node.range[0] && @@ -97,7 +99,7 @@ module.exports = { } } - var child = context.getTokenAfter(node.expressions[0]); + var child = sourceCode.getTokenAfter(node.expressions[0]); context.report(node, child.loc.start, "Unexpected use of comma operator."); } diff --git a/node_modules/eslint/lib/rules/no-unexpected-multiline.js b/node_modules/eslint/lib/rules/no-unexpected-multiline.js index c066673..af0beb2 100644 --- a/node_modules/eslint/lib/rules/no-unexpected-multiline.js +++ b/node_modules/eslint/lib/rules/no-unexpected-multiline.js @@ -24,6 +24,8 @@ module.exports = { var PROPERTY_MESSAGE = "Unexpected newline between object and [ of property access."; var TAGGED_TEMPLATE_MESSAGE = "Unexpected newline between template tag and template literal."; + var sourceCode = context.getSourceCode(); + /** * Check to see if there is a newline between the node and the following open bracket * line's expression @@ -34,12 +36,12 @@ module.exports = { */ function checkForBreakAfter(node, msg) { var nodeExpressionEnd = node; - var openParen = context.getTokenAfter(node); + var openParen = sourceCode.getTokenAfter(node); // Move along until the end of the wrapped expression while (openParen.value === ")") { nodeExpressionEnd = openParen; - openParen = context.getTokenAfter(nodeExpressionEnd); + openParen = sourceCode.getTokenAfter(nodeExpressionEnd); } if (openParen.loc.start.line !== nodeExpressionEnd.loc.end.line) { diff --git a/node_modules/eslint/lib/rules/no-unsafe-finally.js b/node_modules/eslint/lib/rules/no-unsafe-finally.js index 55ea297..e0a5d45 100644 --- a/node_modules/eslint/lib/rules/no-unsafe-finally.js +++ b/node_modules/eslint/lib/rules/no-unsafe-finally.js @@ -9,7 +9,10 @@ // Helpers //------------------------------------------------------------------------------ -var SENTINEL_NODE_TYPE = /^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression)$/; +var SENTINEL_NODE_TYPE_RETURN_THROW = /^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression)$/; +var SENTINEL_NODE_TYPE_BREAK = /^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement|SwitchStatement)$/; +var SENTINEL_NODE_TYPE_CONTINUE = /^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement)$/; + //------------------------------------------------------------------------------ // Rule Definition @@ -18,7 +21,7 @@ var SENTINEL_NODE_TYPE = /^(?:Program|(?:Function|Class)(?:Declaration|Expressio module.exports = { meta: { docs: { - description: "disallow control flow statements in finally blocks", + description: "disallow control flow statements in `finally` blocks", category: "Possible Errors", recommended: false } @@ -39,11 +42,29 @@ module.exports = { * Climbs up the tree if the node is not a sentinel node * * @param {ASTNode} node - node to check. + * @param {String} label - label of the break or continue statement * @returns {Boolean} - return whether the node is a finally block or a sentinel node */ - function isInFinallyBlock(node) { - while (node && !SENTINEL_NODE_TYPE.test(node.type)) { + function isInFinallyBlock(node, label) { + var labelInside = false; + var sentinelNodeType; + + if (node.type === "BreakStatement" && !node.label) { + sentinelNodeType = SENTINEL_NODE_TYPE_BREAK; + } else if (node.type === "ContinueStatement") { + sentinelNodeType = SENTINEL_NODE_TYPE_CONTINUE; + } else { + sentinelNodeType = SENTINEL_NODE_TYPE_RETURN_THROW; + } + + while (node && !sentinelNodeType.test(node.type)) { + if (node.parent.label && label && (node.parent.label.name === label.name)) { + labelInside = true; + } if (isFinallyBlock(node)) { + if (label && labelInside) { + return false; + } return true; } node = node.parent; @@ -58,7 +79,7 @@ module.exports = { * @returns {void} */ function check(node) { - if (isInFinallyBlock(node)) { + if (isInFinallyBlock(node, node.label)) { context.report({ message: "Unsafe usage of " + node.type, node: node, diff --git a/node_modules/eslint/lib/rules/no-useless-call.js b/node_modules/eslint/lib/rules/no-useless-call.js index eb14f0b..49cbbc5 100644 --- a/node_modules/eslint/lib/rules/no-useless-call.js +++ b/node_modules/eslint/lib/rules/no-useless-call.js @@ -32,12 +32,12 @@ function isCallOrNonVariadicApply(node) { * Checks whether or not the tokens of two given nodes are same. * @param {ASTNode} left - A node 1 to compare. * @param {ASTNode} right - A node 2 to compare. - * @param {RuleContext} context - The ESLint rule context object. + * @param {SourceCode} sourceCode - The ESLint source code object. * @returns {boolean} the source code for the given node. */ -function equalTokens(left, right, context) { - var tokensL = context.getTokens(left); - var tokensR = context.getTokens(right); +function equalTokens(left, right, sourceCode) { + var tokensL = sourceCode.getTokens(left); + var tokensR = sourceCode.getTokens(right); if (tokensL.length !== tokensR.length) { return false; @@ -57,14 +57,14 @@ function equalTokens(left, right, context) { * Checks whether or not `thisArg` is not changed by `.call()`/`.apply()`. * @param {ASTNode|null} expectedThis - The node that is the owner of the applied function. * @param {ASTNode} thisArg - The node that is given to the first argument of the `.call()`/`.apply()`. - * @param {RuleContext} context - The ESLint rule context object. + * @param {SourceCode} sourceCode - The ESLint source code object. * @returns {boolean} Whether or not `thisArg` is not changed by `.call()`/`.apply()`. */ -function isValidThisArg(expectedThis, thisArg, context) { +function isValidThisArg(expectedThis, thisArg, sourceCode) { if (!expectedThis) { return astUtils.isNullOrUndefined(thisArg); } - return equalTokens(expectedThis, thisArg, context); + return equalTokens(expectedThis, thisArg, sourceCode); } //------------------------------------------------------------------------------ @@ -83,6 +83,8 @@ module.exports = { }, create: function(context) { + var sourceCode = context.getSourceCode(); + return { CallExpression: function(node) { if (!isCallOrNonVariadicApply(node)) { @@ -93,7 +95,7 @@ module.exports = { var expectedThis = (applied.type === "MemberExpression") ? applied.object : null; var thisArg = node.arguments[0]; - if (isValidThisArg(expectedThis, thisArg, context)) { + if (isValidThisArg(expectedThis, thisArg, sourceCode)) { context.report( node, "unnecessary '.{{name}}()'.", diff --git a/node_modules/eslint/lib/rules/no-useless-computed-key.js b/node_modules/eslint/lib/rules/no-useless-computed-key.js index 0894fb7..2e0ac18 100644 --- a/node_modules/eslint/lib/rules/no-useless-computed-key.js +++ b/node_modules/eslint/lib/rules/no-useless-computed-key.js @@ -19,6 +19,8 @@ module.exports = { } }, create: function(context) { + var sourceCode = context.getSourceCode(); + return { Property: function(node) { if (!node.computed) { @@ -29,7 +31,7 @@ module.exports = { nodeType = typeof key.value; if (key.type === "Literal" && (nodeType === "string" || nodeType === "number")) { - context.report(node, MESSAGE_UNNECESSARY_COMPUTED, { property: context.getSource(key) }); + context.report(node, MESSAGE_UNNECESSARY_COMPUTED, { property: sourceCode.getText(key) }); } } }; diff --git a/node_modules/eslint/lib/rules/no-useless-concat.js b/node_modules/eslint/lib/rules/no-useless-concat.js index ce9589d..8569d42 100644 --- a/node_modules/eslint/lib/rules/no-useless-concat.js +++ b/node_modules/eslint/lib/rules/no-useless-concat.js @@ -67,6 +67,8 @@ module.exports = { }, create: function(context) { + var sourceCode = context.getSourceCode(); + return { BinaryExpression: function(node) { @@ -85,10 +87,10 @@ module.exports = { ) { // move warning location to operator - var operatorToken = context.getTokenAfter(left); + var operatorToken = sourceCode.getTokenAfter(left); while (operatorToken.value !== "+") { - operatorToken = context.getTokenAfter(operatorToken); + operatorToken = sourceCode.getTokenAfter(operatorToken); } context.report( diff --git a/node_modules/eslint/lib/rules/no-useless-rename.js b/node_modules/eslint/lib/rules/no-useless-rename.js new file mode 100644 index 0000000..feb7628 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-useless-rename.js @@ -0,0 +1,150 @@ +/** + * @fileoverview Disallow renaming import, export, and destructured assignments to the same name. + * @author Kai Cataldo + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow renaming import, export, and destructured assignments to the same name", + category: "ECMAScript 6", + recommended: false + }, + fixable: "code", + schema: [ + { + type: "object", + properties: { + ignoreDestructuring: { type: "boolean" }, + ignoreImport: { type: "boolean" }, + ignoreExport: { type: "boolean" } + }, + additionalProperties: false + } + ] + }, + + create: function(context) { + var options = context.options[0] || {}, + ignoreDestructuring = options.ignoreDestructuring === true, + ignoreImport = options.ignoreImport === true, + ignoreExport = options.ignoreExport === true; + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Reports error for unnecessarily renamed assignments + * @param {ASTNode} node - node to report + * @param {ASTNode} initial - node with initial name value + * @param {ASTNode} result - node with new name value + * @param {string} type - the type of the offending node + * @returns {void} + */ + function reportError(node, initial, result, type) { + var name = initial.type === "Identifier" ? initial.name : initial.value; + + return context.report({ + node: node, + message: "{{type}} {{name}} unnecessarily renamed.", + data: { + name: name, + type: type + }, + fix: function(fixer) { + return fixer.replaceTextRange([ + initial.range[0], + result.range[1] + ], name); + } + }); + } + + /** + * Checks whether a destructured assignment is unnecessarily renamed + * @param {ASTNode} node - node to check + * @returns {void} + */ + function checkDestructured(node) { + var properties, + i; + + if (ignoreDestructuring) { + return; + } + + properties = node.properties; + + for (i = 0; i < properties.length; i++) { + if (properties[i].shorthand) { + return; + } + + /** + * If an ObjectPattern property is computed, we have no idea + * if a rename is useless or not. If an ObjectPattern property + * lacks a key, it is likely an ExperimentalRestProperty and + * so there is no "renaming" occurring here. + */ + if (properties[i].computed || !properties[i].key) { + return; + } + + if (properties[i].key.type === "Identifier" && properties[i].key.name === properties[i].value.name || + properties[i].key.type === "Literal" && properties[i].key.value === properties[i].value.name) { + reportError(properties[i], properties[i].key, properties[i].value, "Destructuring assignment"); + } + } + } + + /** + * Checks whether an import is unnecessarily renamed + * @param {ASTNode} node - node to check + * @returns {void} + */ + function checkImport(node) { + if (ignoreImport) { + return; + } + + if (node.imported.name === node.local.name && + node.imported.range[0] !== node.local.range[0]) { + reportError(node, node.imported, node.local, "Import"); + } + } + + /** + * Checks whether an export is unnecessarily renamed + * @param {ASTNode} node - node to check + * @returns {void} + */ + function checkExport(node) { + if (ignoreExport) { + return; + } + + if (node.local.name === node.exported.name && + node.local.range[0] !== node.exported.range[0]) { + reportError(node, node.local, node.exported, "Export"); + } + + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + ObjectPattern: checkDestructured, + ImportSpecifier: checkImport, + ExportSpecifier: checkExport + }; + } +}; diff --git a/node_modules/eslint/lib/rules/object-curly-newline.js b/node_modules/eslint/lib/rules/object-curly-newline.js new file mode 100644 index 0000000..aaa4af0 --- /dev/null +++ b/node_modules/eslint/lib/rules/object-curly-newline.js @@ -0,0 +1,209 @@ +/** + * @fileoverview Rule to require or disallow line breaks inside braces. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +var astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +// Schema objects. +var OPTION_VALUE = { + oneOf: [ + { + enum: ["always", "never"] + }, + { + type: "object", + properties: { + multiline: { + type: "boolean" + }, + minProperties: { + type: "integer", + minimum: 0 + } + }, + additionalProperties: false, + minProperties: 1 + } + ] +}; + +/** + * Normalizes a given option value. + * + * @param {string|object|undefined} value - An option value to parse. + * @returns {{multiline: boolean, minProperties: number}} Normalized option object. + */ +function normalizeOptionValue(value) { + var multiline = false; + var minProperties = Number.POSITIVE_INFINITY; + + if (value) { + if (value === "always") { + minProperties = 0; + } else if (value === "never") { + minProperties = Number.POSITIVE_INFINITY; + } else { + multiline = Boolean(value.multiline); + minProperties = value.minProperties || Number.POSITIVE_INFINITY; + } + } else { + multiline = true; + } + + return {multiline: multiline, minProperties: minProperties}; +} + +/** + * Normalizes a given option value. + * + * @param {string|object|undefined} options - An option value to parse. + * @returns {{ObjectExpression: {multiline: boolean, minProperties: number}, ObjectPattern: {multiline: boolean, minProperties: number}}} Normalized option object. + */ +function normalizeOptions(options) { + if (options && (options.ObjectExpression || options.ObjectPattern)) { + return { + ObjectExpression: normalizeOptionValue(options.ObjectExpression), + ObjectPattern: normalizeOptionValue(options.ObjectPattern) + }; + } + + var value = normalizeOptionValue(options); + + return {ObjectExpression: value, ObjectPattern: value}; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent line breaks inside braces", + category: "Stylistic Issues", + recommended: false + }, + fixable: "whitespace", + schema: [ + { + oneOf: [ + OPTION_VALUE, + { + type: "object", + properties: { + ObjectExpression: OPTION_VALUE, + ObjectPattern: OPTION_VALUE + }, + additionalProperties: false, + minProperties: 1 + } + ] + } + ] + }, + + create: function(context) { + var sourceCode = context.getSourceCode(); + var normalizedOptions = normalizeOptions(context.options[0]); + + /** + * Reports a given node if it violated this rule. + * + * @param {ASTNode} node - A node to check. This is an ObjectExpression node or an ObjectPattern node. + * @param {{multiline: boolean, minProperties: number}} options - An option object. + * @returns {void} + */ + function check(node) { + var options = normalizedOptions[node.type]; + var openBrace = sourceCode.getFirstToken(node); + var closeBrace = sourceCode.getLastToken(node); + var first = sourceCode.getTokenOrCommentAfter(openBrace); + var last = sourceCode.getTokenOrCommentBefore(closeBrace); + var needsLinebreaks = ( + node.properties.length >= options.minProperties || + ( + options.multiline && + node.properties.length > 0 && + first.loc.start.line !== last.loc.end.line + ) + ); + + /* + * Use tokens or comments to check multiline or not. + * But use only tokens to check whether line breaks are needed. + * This allows: + * var obj = { // eslint-disable-line foo + * a: 1 + * } + */ + first = sourceCode.getTokenAfter(openBrace); + last = sourceCode.getTokenBefore(closeBrace); + + if (needsLinebreaks) { + if (astUtils.isTokenOnSameLine(openBrace, first)) { + context.report({ + message: "Expected a line break after this open brace.", + node: node, + loc: openBrace.loc.start, + fix: function(fixer) { + return fixer.insertTextAfter(openBrace, "\n"); + } + }); + } + if (astUtils.isTokenOnSameLine(last, closeBrace)) { + context.report({ + message: "Expected a line break before this close brace.", + node: node, + loc: closeBrace.loc.start, + fix: function(fixer) { + return fixer.insertTextBefore(closeBrace, "\n"); + } + }); + } + } else { + if (!astUtils.isTokenOnSameLine(openBrace, first)) { + context.report({ + message: "Unexpected a line break after this open brace.", + node: node, + loc: openBrace.loc.start, + fix: function(fixer) { + return fixer.removeRange([ + openBrace.range[1], + first.range[0] + ]); + } + }); + } + if (!astUtils.isTokenOnSameLine(last, closeBrace)) { + context.report({ + message: "Unexpected a line break before this close brace.", + node: node, + loc: closeBrace.loc.start, + fix: function(fixer) { + return fixer.removeRange([ + last.range[1], + closeBrace.range[0] + ]); + } + }); + } + } + } + + return { + ObjectExpression: check, + ObjectPattern: check + }; + } +}; diff --git a/node_modules/eslint/lib/rules/object-property-newline.js b/node_modules/eslint/lib/rules/object-property-newline.js new file mode 100644 index 0000000..eb96152 --- /dev/null +++ b/node_modules/eslint/lib/rules/object-property-newline.js @@ -0,0 +1,73 @@ +/** + * @fileoverview Rule to enforce placing object properties on separate lines. + * @author Vitor Balocco + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce placing object properties on separate lines", + category: "Stylistic Issues", + recommended: false + }, + + schema: [ + { + type: "object", + properties: { + allowMultiplePropertiesPerLine: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create: function(context) { + var allowSameLine = context.options[0] && Boolean(context.options[0].allowMultiplePropertiesPerLine); + var errorMessage = allowSameLine ? + "Object properties must go on a new line if they aren't all on the same line" : + "Object properties must go on a new line"; + + var sourceCode = context.getSourceCode(); + + return { + ObjectExpression: function(node) { + var lastTokenOfPreviousProperty, firstTokenOfCurrentProperty; + + if (allowSameLine) { + if (node.properties.length > 1) { + var firstTokenOfFirstProperty = sourceCode.getFirstToken(node.properties[0]); + var lastTokenOfLastProperty = sourceCode.getLastToken(node.properties[node.properties.length - 1]); + + if (firstTokenOfFirstProperty.loc.end.line === lastTokenOfLastProperty.loc.start.line) { + + // All keys and values are on the same line + return; + } + } + } + + for (var i = 1; i < node.properties.length; i++) { + lastTokenOfPreviousProperty = sourceCode.getLastToken(node.properties[i - 1]); + firstTokenOfCurrentProperty = sourceCode.getFirstToken(node.properties[i]); + + if (lastTokenOfPreviousProperty.loc.end.line === firstTokenOfCurrentProperty.loc.start.line) { + context.report({ + node: node, + loc: firstTokenOfCurrentProperty.loc.start, + message: errorMessage + }); + } + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/object-shorthand.js b/node_modules/eslint/lib/rules/object-shorthand.js index 4c7c066..8737d7e 100644 --- a/node_modules/eslint/lib/rules/object-shorthand.js +++ b/node_modules/eslint/lib/rules/object-shorthand.js @@ -23,6 +23,8 @@ module.exports = { recommended: false }, + fixable: "code", + schema: { anyOf: [ { @@ -35,6 +37,25 @@ module.exports = { minItems: 0, maxItems: 1 }, + { + type: "array", + items: [ + { + enum: ["always", "methods", "properties"] + }, + { + type: "object", + properties: { + avoidQuotes: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + minItems: 0, + maxItems: 2 + }, { type: "array", items: [ @@ -46,6 +67,9 @@ module.exports = { properties: { ignoreConstructors: { type: "boolean" + }, + avoidQuotes: { + type: "boolean" } }, additionalProperties: false @@ -66,6 +90,7 @@ module.exports = { var PARAMS = context.options[1] || {}; var IGNORE_CONSTRUCTORS = PARAMS.ignoreConstructors; + var AVOID_QUOTES = PARAMS.avoidQuotes; //-------------------------------------------------------------------------- // Helpers @@ -83,6 +108,15 @@ module.exports = { return firstChar === firstChar.toUpperCase(); } + /** + * Checks whether a node is a string literal. + * @param {ASTNode} node - Any AST node. + * @returns {boolean} `true` if it is a string literal. + */ + function isStringLiteral(node) { + return node.type === "Literal" && typeof node.value === "string"; + } + //-------------------------------------------------------------------------- // Public //-------------------------------------------------------------------------- @@ -100,16 +134,45 @@ module.exports = { // if we're "never" and concise we should warn now if (APPLY_NEVER && isConciseProperty) { type = node.method ? "method" : "property"; - context.report(node, "Expected longform " + type + " syntax."); + context.report({ + node: node, + message: "Expected longform " + type + " syntax.", + fix: function(fixer) { + if (node.method) { + if (node.value.generator) { + return fixer.replaceTextRange([node.range[0], node.key.range[1]], node.key.name + ": function*"); + } + + return fixer.insertTextAfter(node.key, ": function"); + } + + return fixer.insertTextAfter(node.key, ": " + node.key.name); + } + }); + } + + // {'xyz'() {}} should be written as {'xyz': function() {}} + if (AVOID_QUOTES && isStringLiteral(node.key) && isConciseProperty) { + context.report({ + node: node, + message: "Expected longform method syntax for string literal keys.", + fix: function(fixer) { + if (node.computed) { + return fixer.insertTextAfterRange([node.key.range[0], node.key.range[1] + 1], ": function"); + } + + return fixer.insertTextAfter(node.key, ": function"); + } + }); } // at this point if we're concise or if we're "never" we can leave - if (APPLY_NEVER || isConciseProperty) { + if (APPLY_NEVER || AVOID_QUOTES || isConciseProperty) { return; } // only computed methods can fail the following checks - if (!APPLY_TO_METHODS && node.computed) { + if (node.computed && node.value.type !== "FunctionExpression") { return; } @@ -123,19 +186,62 @@ module.exports = { return; } + // {[x]: function(){}} should be written as {[x]() {}} + if (node.computed) { + context.report({ + node: node, + message: "Expected method shorthand.", + fix: function(fixer) { + if (node.value.generator) { + return fixer.replaceTextRange( + [node.key.range[0], node.value.range[0] + "function*".length], + "*[" + node.key.name + "]" + ); + } + + return fixer.removeRange([node.key.range[1] + 1, node.value.range[0] + "function".length]); + } + }); + return; + } + // {x: function(){}} should be written as {x() {}} - context.report(node, "Expected method shorthand."); + context.report({ + node: node, + message: "Expected method shorthand.", + fix: function(fixer) { + if (node.value.generator) { + return fixer.replaceTextRange( + [node.key.range[0], node.value.range[0] + "function*".length], + "*" + node.key.name + ); + } + + return fixer.removeRange([node.key.range[1], node.value.range[0] + "function".length]); + } + }); } else if (node.value.type === "Identifier" && node.key.name === node.value.name && APPLY_TO_PROPS) { // {x: x} should be written as {x} - context.report(node, "Expected property shorthand."); + context.report({ + node: node, + message: "Expected property shorthand.", + fix: function(fixer) { + return fixer.replaceText(node, node.value.name); + } + }); } else if (node.value.type === "Identifier" && node.key.type === "Literal" && node.key.value === node.value.name && APPLY_TO_PROPS) { // {"x": x} should be written as {x} - context.report(node, "Expected property shorthand."); + context.report({ + node: node, + message: "Expected property shorthand.", + fix: function(fixer) { + return fixer.replaceText(node, node.value.name); + } + }); } } }; - } }; diff --git a/node_modules/eslint/lib/rules/one-var.js b/node_modules/eslint/lib/rules/one-var.js index 805cec3..2bd49f5 100644 --- a/node_modules/eslint/lib/rules/one-var.js +++ b/node_modules/eslint/lib/rules/one-var.js @@ -286,6 +286,9 @@ module.exports = { context.report(node, "Combine this with the previous '" + type + "' statement with initialized variables."); } if (options[type].uninitialized === MODE_ALWAYS) { + if (node.parent.left === node && (node.parent.type === "ForInStatement" || node.parent.type === "ForOfStatement")) { + return; + } context.report(node, "Combine this with the previous '" + type + "' statement with uninitialized variables."); } } diff --git a/node_modules/eslint/lib/rules/operator-linebreak.js b/node_modules/eslint/lib/rules/operator-linebreak.js index 85f90b9..8f17155 100644 --- a/node_modules/eslint/lib/rules/operator-linebreak.js +++ b/node_modules/eslint/lib/rules/operator-linebreak.js @@ -57,6 +57,8 @@ module.exports = { styleOverrides[":"] = "before"; } + var sourceCode = context.getSourceCode(); + //-------------------------------------------------------------------------- // Helpers //-------------------------------------------------------------------------- @@ -69,8 +71,8 @@ module.exports = { * @returns {void} */ function validateNode(node, leftSide) { - var leftToken = context.getLastToken(leftSide); - var operatorToken = context.getTokenAfter(leftToken); + var leftToken = sourceCode.getLastToken(leftSide); + var operatorToken = sourceCode.getTokenAfter(leftToken); // When the left part of a binary expression is a single expression wrapped in // parentheses (ex: `(a) + b`), leftToken will be the last token of the expression @@ -79,10 +81,10 @@ module.exports = { // should be the token right after that. while (operatorToken.value === ")") { leftToken = operatorToken; - operatorToken = context.getTokenAfter(operatorToken); + operatorToken = sourceCode.getTokenAfter(operatorToken); } - var rightToken = context.getTokenAfter(operatorToken); + var rightToken = sourceCode.getTokenAfter(operatorToken); var operator = operatorToken.value; var operatorStyleOverride = styleOverrides[operator]; var style = operatorStyleOverride || globalStyle; diff --git a/node_modules/eslint/lib/rules/padded-blocks.js b/node_modules/eslint/lib/rules/padded-blocks.js index 39a2b07..7ec24c6 100644 --- a/node_modules/eslint/lib/rules/padded-blocks.js +++ b/node_modules/eslint/lib/rules/padded-blocks.js @@ -17,6 +17,8 @@ module.exports = { recommended: false }, + fixable: "whitespace", + schema: [ { oneOf: [ @@ -164,6 +166,9 @@ module.exports = { context.report({ node: node, loc: { line: openBrace.loc.start.line, column: openBrace.loc.start.column }, + fix: function(fixer) { + return fixer.insertTextAfter(openBrace, "\n"); + }, message: ALWAYS_MESSAGE }); } @@ -171,23 +176,36 @@ module.exports = { context.report({ node: node, loc: {line: closeBrace.loc.end.line, column: closeBrace.loc.end.column - 1 }, + fix: function(fixer) { + return fixer.insertTextBefore(closeBrace, "\n"); + }, message: ALWAYS_MESSAGE }); } } else { if (blockHasTopPadding) { + var nextToken = sourceCode.getTokenOrCommentAfter(openBrace); + context.report({ node: node, loc: { line: openBrace.loc.start.line, column: openBrace.loc.start.column }, + fix: function(fixer) { + return fixer.replaceTextRange([openBrace.end, nextToken.start - nextToken.loc.start.column], "\n"); + }, message: NEVER_MESSAGE }); } if (blockHasBottomPadding) { + var previousToken = sourceCode.getTokenOrCommentBefore(closeBrace); + context.report({ node: node, loc: {line: closeBrace.loc.end.line, column: closeBrace.loc.end.column - 1 }, - message: NEVER_MESSAGE + message: NEVER_MESSAGE, + fix: function(fixer) { + return fixer.replaceTextRange([previousToken.end, closeBrace.start - closeBrace.loc.start.column], "\n"); + } }); } } diff --git a/node_modules/eslint/lib/rules/prefer-const.js b/node_modules/eslint/lib/rules/prefer-const.js index 6684535..384815b 100644 --- a/node_modules/eslint/lib/rules/prefer-const.js +++ b/node_modules/eslint/lib/rules/prefer-const.js @@ -62,45 +62,72 @@ function canBecomeVariableDeclaration(identifier) { } /** - * Gets the WriteReference of a given variable if the variable should be - * declared as const. + * Gets an identifier node of a given variable. + * + * If the initialization exists or one or more reading references exist before + * the first assignment, the identifier node is the node of the declaration. + * Otherwise, the identifier node is the node of the first assignment. + * + * If the variable should not change to const, this function returns null. + * - If the variable is reassigned. + * - If the variable is never initialized and assigned. + * - If the variable is initialized in a different scope from the declaration. + * - If the unique assignment of the variable cannot change to a declaration. * * @param {escope.Variable} variable - A variable to get. - * @returns {escope.Reference|null} The singular WriteReference or null. + * @param {boolean} ignoreReadBeforeAssign - + * The value of `ignoreReadBeforeAssign` option. + * @returns {ASTNode|null} + * An Identifier node if the variable should change to const. + * Otherwise, null. */ -function getWriteReferenceIfShouldBeConst(variable) { +function getIdentifierIfShouldBeConst(variable, ignoreReadBeforeAssign) { if (variable.eslintUsed) { return null; } - // Finds the singular WriteReference. - var retv = null; + // Finds the unique WriteReference. + var writer = null; + var isReadBeforeInit = false; var references = variable.references; for (var i = 0; i < references.length; ++i) { var reference = references[i]; if (reference.isWrite()) { - var isReassigned = Boolean( - retv && retv.identifier !== reference.identifier + var isReassigned = ( + writer !== null && + writer.identifier !== reference.identifier ); if (isReassigned) { return null; } - retv = reference; + writer = reference; + + } else if (reference.isRead() && writer === null) { + if (ignoreReadBeforeAssign) { + return null; + } + isReadBeforeInit = true; } } - // Checks the writer is located in the same scope and can be modified to - // const. - var isSameScopeAndCanBecomeVariableDeclaration = Boolean( - retv && - retv.from === variable.scope && - canBecomeVariableDeclaration(retv.identifier) + // If the assignment is from a different scope, ignore it. + // If the assignment cannot change to a declaration, ignore it. + var shouldBeConst = ( + writer !== null && + writer.from === variable.scope && + canBecomeVariableDeclaration(writer.identifier) ); - return isSameScopeAndCanBecomeVariableDeclaration ? retv : null; + if (!shouldBeConst) { + return null; + } + if (isReadBeforeInit) { + return variable.defs[0].name; + } + return writer.identifier; } /** @@ -136,15 +163,17 @@ function getDestructuringHost(reference) { * destructuring. * * @param {escope.Variable[]} variables - Variables to group by destructuring. - * @returns {Map} Grouped references. + * @param {boolean} ignoreReadBeforeAssign - + * The value of `ignoreReadBeforeAssign` option. + * @returns {Map} Grouped identifier nodes. */ -function groupByDestructuring(variables) { - var writersMap = new Map(); +function groupByDestructuring(variables, ignoreReadBeforeAssign) { + var identifierMap = new Map(); for (var i = 0; i < variables.length; ++i) { var variable = variables[i]; var references = variable.references; - var writer = getWriteReferenceIfShouldBeConst(variable); + var identifier = getIdentifierIfShouldBeConst(variable, ignoreReadBeforeAssign); var prevId = null; for (var j = 0; j < references.length; ++j) { @@ -158,20 +187,20 @@ function groupByDestructuring(variables) { } prevId = id; - // Add the writer into the destructuring group. + // Add the identifier node into the destructuring group. var group = getDestructuringHost(reference); if (group) { - if (writersMap.has(group)) { - writersMap.get(group).push(writer); + if (identifierMap.has(group)) { + identifierMap.get(group).push(identifier); } else { - writersMap.set(group, [writer]); + identifierMap.set(group, [identifier]); } } } } - return writersMap; + return identifierMap; } //------------------------------------------------------------------------------ @@ -190,7 +219,8 @@ module.exports = { { type: "object", properties: { - destructuring: {enum: ["any", "all"]} + destructuring: {enum: ["any", "all"]}, + ignoreReadBeforeAssign: {type: "boolean"} }, additionalProperties: false } @@ -200,21 +230,20 @@ module.exports = { create: function(context) { var options = context.options[0] || {}; var checkingMixedDestructuring = options.destructuring !== "all"; + var ignoreReadBeforeAssign = options.ignoreReadBeforeAssign === true; var variables = null; /** - * Reports a given reference. + * Reports a given Identifier node. * - * @param {escope.Reference} reference - A reference to report. + * @param {ASTNode} node - An Identifier node to report. * @returns {void} */ - function report(reference) { - var id = reference.identifier; - + function report(node) { context.report({ - node: id, + node: node, message: "'{{name}}' is never reassigned, use 'const' instead.", - data: id + data: node }); } @@ -225,30 +254,30 @@ module.exports = { * @returns {void} */ function checkVariable(variable) { - var writer = getWriteReferenceIfShouldBeConst(variable); + var node = getIdentifierIfShouldBeConst(variable, ignoreReadBeforeAssign); - if (writer) { - report(writer); + if (node) { + report(node); } } /** - * Reports given references if all of the reference should be declared as - * const. + * Reports given identifier nodes if all of the nodes should be declared + * as const. * - * The argument 'writers' is an array of references. - * This reference is the result of - * 'getWriteReferenceIfShouldBeConst(variable)', so it's nullable. - * In simple declaration or assignment cases, the length of the array is 1. - * In destructuring cases, the length of the array can be 2 or more. + * The argument 'nodes' is an array of Identifier nodes. + * This node is the result of 'getIdentifierIfShouldBeConst()', so it's + * nullable. In simple declaration or assignment cases, the length of + * the array is 1. In destructuring cases, the length of the array can + * be 2 or more. * - * @param {(escope.Reference|null)[]} writers - References which are grouped - * by destructuring to report. + * @param {(escope.Reference|null)[]} nodes - + * References which are grouped by destructuring to report. * @returns {void} */ - function checkGroup(writers) { - if (writers.every(Boolean)) { - writers.forEach(report); + function checkGroup(nodes) { + if (nodes.every(Boolean)) { + nodes.forEach(report); } } @@ -261,7 +290,8 @@ module.exports = { if (checkingMixedDestructuring) { variables.forEach(checkVariable); } else { - groupByDestructuring(variables).forEach(checkGroup); + groupByDestructuring(variables, ignoreReadBeforeAssign) + .forEach(checkGroup); } variables = null; diff --git a/node_modules/eslint/lib/rules/prefer-spread.js b/node_modules/eslint/lib/rules/prefer-spread.js index 79c7eb0..67f1e85 100644 --- a/node_modules/eslint/lib/rules/prefer-spread.js +++ b/node_modules/eslint/lib/rules/prefer-spread.js @@ -31,12 +31,12 @@ function isVariadicApplyCalling(node) { * Checks whether or not the tokens of two given nodes are same. * @param {ASTNode} left - A node 1 to compare. * @param {ASTNode} right - A node 2 to compare. - * @param {RuleContext} context - The ESLint rule context object. + * @param {SourceCode} sourceCode - The ESLint source code object. * @returns {boolean} the source code for the given node. */ -function equalTokens(left, right, context) { - var tokensL = context.getTokens(left); - var tokensR = context.getTokens(right); +function equalTokens(left, right, sourceCode) { + var tokensL = sourceCode.getTokens(left); + var tokensR = sourceCode.getTokens(right); if (tokensL.length !== tokensR.length) { return false; @@ -82,6 +82,8 @@ module.exports = { }, create: function(context) { + var sourceCode = context.getSourceCode(); + return { CallExpression: function(node) { if (!isVariadicApplyCalling(node)) { @@ -92,7 +94,7 @@ module.exports = { var expectedThis = (applied.type === "MemberExpression") ? applied.object : null; var thisArg = node.arguments[0]; - if (isValidThisArg(expectedThis, thisArg, context)) { + if (isValidThisArg(expectedThis, thisArg, sourceCode)) { context.report(node, "use the spread operator instead of the '.apply()'."); } } diff --git a/node_modules/eslint/lib/rules/rest-spread-spacing.js b/node_modules/eslint/lib/rules/rest-spread-spacing.js new file mode 100644 index 0000000..7ffafa5 --- /dev/null +++ b/node_modules/eslint/lib/rules/rest-spread-spacing.js @@ -0,0 +1,107 @@ +/** + * @fileoverview Enforce spacing between rest and spread operators and their expressions. + * @author Kai Cataldo + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce spacing between rest and spread operators and their expressions", + category: "ECMAScript 6", + recommended: false + }, + fixable: "whitespace", + schema: [ + { + enum: ["always", "never"] + } + ] + }, + + create: function(context) { + var sourceCode = context.getSourceCode(), + alwaysSpace = context.options[0] === "always"; + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Checks whitespace between rest/spread operators and their expressions + * @param {ASTNode} node - The node to check + * @returns {void} + */ + function checkWhiteSpace(node) { + var operator = sourceCode.getFirstToken(node), + nextToken = sourceCode.getTokenAfter(operator), + hasWhitespace = sourceCode.isSpaceBetweenTokens(operator, nextToken), + type; + + switch (node.type) { + case "SpreadElement": + type = "spread"; + break; + case "RestElement": + type = "rest"; + break; + case "ExperimentalSpreadProperty": + type = "spread property"; + break; + case "ExperimentalRestProperty": + type = "rest property"; + break; + default: + return; + } + + if (alwaysSpace && !hasWhitespace) { + context.report({ + node: node, + loc: { + line: operator.loc.end.line, + column: operator.loc.end.column + }, + message: "Expected whitespace after {{type}} operator", + data: { + type: type + }, + fix: function(fixer) { + return fixer.replaceTextRange([operator.range[1], nextToken.range[0]], " "); + } + }); + } else if (!alwaysSpace && hasWhitespace) { + context.report({ + node: node, + loc: { + line: operator.loc.end.line, + column: operator.loc.end.column + }, + message: "Unexpected whitespace after {{type}} operator", + data: { + type: type + }, + fix: function(fixer) { + return fixer.removeRange([operator.range[1], nextToken.range[0]]); + } + }); + } + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + SpreadElement: checkWhiteSpace, + RestElement: checkWhiteSpace, + ExperimentalSpreadProperty: checkWhiteSpace, + ExperimentalRestProperty: checkWhiteSpace + }; + } +}; diff --git a/node_modules/eslint/lib/rules/semi-spacing.js b/node_modules/eslint/lib/rules/semi-spacing.js index ea43e92..830044d 100644 --- a/node_modules/eslint/lib/rules/semi-spacing.js +++ b/node_modules/eslint/lib/rules/semi-spacing.js @@ -59,7 +59,7 @@ module.exports = { * @returns {boolean} True if the given token has leading space, false if not. */ function hasLeadingSpace(token) { - var tokenBefore = context.getTokenBefore(token); + var tokenBefore = sourceCode.getTokenBefore(token); return tokenBefore && astUtils.isTokenOnSameLine(tokenBefore, token) && sourceCode.isSpaceBetweenTokens(tokenBefore, token); } @@ -70,7 +70,7 @@ module.exports = { * @returns {boolean} True if the given token has trailing space, false if not. */ function hasTrailingSpace(token) { - var tokenAfter = context.getTokenAfter(token); + var tokenAfter = sourceCode.getTokenAfter(token); return tokenAfter && astUtils.isTokenOnSameLine(token, tokenAfter) && sourceCode.isSpaceBetweenTokens(token, tokenAfter); } @@ -81,7 +81,7 @@ module.exports = { * @returns {boolean} Whether or not the token is the last in its line. */ function isLastTokenInCurrentLine(token) { - var tokenAfter = context.getTokenAfter(token); + var tokenAfter = sourceCode.getTokenAfter(token); return !(tokenAfter && astUtils.isTokenOnSameLine(token, tokenAfter)); } @@ -92,7 +92,7 @@ module.exports = { * @returns {boolean} Whether or not the token is the first in its line. */ function isFirstTokenInCurrentLine(token) { - var tokenBefore = context.getTokenBefore(token); + var tokenBefore = sourceCode.getTokenBefore(token); return !(tokenBefore && astUtils.isTokenOnSameLine(token, tokenBefore)); } @@ -103,7 +103,7 @@ module.exports = { * @returns {boolean} Whether or not the next token of a given token is a closing parenthesis. */ function isBeforeClosingParen(token) { - var nextToken = context.getTokenAfter(token); + var nextToken = sourceCode.getTokenAfter(token); return ( nextToken && @@ -140,7 +140,7 @@ module.exports = { loc: location, message: "Unexpected whitespace before semicolon.", fix: function(fixer) { - var tokenBefore = context.getTokenBefore(token); + var tokenBefore = sourceCode.getTokenBefore(token); return fixer.removeRange([tokenBefore.range[1], token.range[0]]); } @@ -167,7 +167,7 @@ module.exports = { loc: location, message: "Unexpected whitespace after semicolon.", fix: function(fixer) { - var tokenAfter = context.getTokenAfter(token); + var tokenAfter = sourceCode.getTokenAfter(token); return fixer.removeRange([token.range[1], tokenAfter.range[0]]); } @@ -195,7 +195,7 @@ module.exports = { * @returns {void} */ function checkNode(node) { - var token = context.getLastToken(node); + var token = sourceCode.getLastToken(node); checkSemicolonSpacing(token, node); } @@ -210,11 +210,11 @@ module.exports = { ThrowStatement: checkNode, ForStatement: function(node) { if (node.init) { - checkSemicolonSpacing(context.getTokenAfter(node.init), node); + checkSemicolonSpacing(sourceCode.getTokenAfter(node.init), node); } if (node.test) { - checkSemicolonSpacing(context.getTokenAfter(node.test), node); + checkSemicolonSpacing(sourceCode.getTokenAfter(node.test), node); } } }; diff --git a/node_modules/eslint/lib/rules/semi.js b/node_modules/eslint/lib/rules/semi.js index e386084..d530725 100644 --- a/node_modules/eslint/lib/rules/semi.js +++ b/node_modules/eslint/lib/rules/semi.js @@ -121,7 +121,7 @@ module.exports = { return false; } - nextToken = context.getTokenAfter(lastToken); + nextToken = sourceCode.getTokenAfter(lastToken); if (!nextToken) { return true; @@ -141,7 +141,7 @@ module.exports = { * @returns {boolean} whether the node is in a one-liner block statement. */ function isOneLinerBlock(node) { - var nextToken = context.getTokenAfter(node); + var nextToken = sourceCode.getTokenAfter(node); if (!nextToken || nextToken.value !== "}") { return false; @@ -159,7 +159,7 @@ module.exports = { * @returns {void} */ function checkForSemicolon(node) { - var lastToken = context.getLastToken(node); + var lastToken = sourceCode.getLastToken(node); if (never) { if (isUnnecessarySemicolon(lastToken)) { diff --git a/node_modules/eslint/lib/rules/space-before-blocks.js b/node_modules/eslint/lib/rules/space-before-blocks.js index 7fb9d5c..468b320 100644 --- a/node_modules/eslint/lib/rules/space-before-blocks.js +++ b/node_modules/eslint/lib/rules/space-before-blocks.js @@ -81,7 +81,7 @@ module.exports = { * @returns {void} undefined. */ function checkPrecedingSpace(node) { - var precedingToken = context.getTokenBefore(node), + var precedingToken = sourceCode.getTokenBefore(node), hasSpace, parent, requireSpace; @@ -133,9 +133,9 @@ module.exports = { if (cases.length > 0) { firstCase = cases[0]; - openingBrace = context.getTokenBefore(firstCase); + openingBrace = sourceCode.getTokenBefore(firstCase); } else { - openingBrace = context.getLastToken(node, 1); + openingBrace = sourceCode.getLastToken(node, 1); } checkPrecedingSpace(openingBrace); diff --git a/node_modules/eslint/lib/rules/space-before-function-paren.js b/node_modules/eslint/lib/rules/space-before-function-paren.js index d96cb4a..2d26e41 100644 --- a/node_modules/eslint/lib/rules/space-before-function-paren.js +++ b/node_modules/eslint/lib/rules/space-before-function-paren.js @@ -106,7 +106,7 @@ module.exports = { while (rightToken.value !== "(") { rightToken = sourceCode.getTokenAfter(rightToken); } - leftToken = context.getTokenBefore(rightToken); + leftToken = sourceCode.getTokenBefore(rightToken); location = leftToken.loc.end; if (sourceCode.isSpaceBetweenTokens(leftToken, rightToken)) { diff --git a/node_modules/eslint/lib/rules/space-infix-ops.js b/node_modules/eslint/lib/rules/space-infix-ops.js index 862ff66..bea82ba 100644 --- a/node_modules/eslint/lib/rules/space-infix-ops.js +++ b/node_modules/eslint/lib/rules/space-infix-ops.js @@ -41,6 +41,8 @@ module.exports = { "?", ":", ",", "**" ]; + var sourceCode = context.getSourceCode(); + /** * Returns the first token which violates the rule * @param {ASTNode} left - The left node of the main node @@ -50,7 +52,7 @@ module.exports = { */ function getFirstNonSpacedToken(left, right) { var op, - tokens = context.getTokensBetween(left, right, 1); + tokens = sourceCode.getTokensBetween(left, right, 1); for (var i = 1, l = tokens.length - 1; i < l; ++i) { op = tokens[i]; @@ -78,8 +80,8 @@ module.exports = { loc: culpritToken.loc.start, message: "Infix operators must be spaced.", fix: function(fixer) { - var previousToken = context.getTokenBefore(culpritToken); - var afterToken = context.getTokenAfter(culpritToken); + var previousToken = sourceCode.getTokenBefore(culpritToken); + var afterToken = sourceCode.getTokenAfter(culpritToken); var fixString = ""; if (culpritToken.range[0] - previousToken.range[1] === 0) { @@ -107,7 +109,7 @@ module.exports = { var nonSpacedNode = getFirstNonSpacedToken(node.left, node.right); if (nonSpacedNode) { - if (!(int32Hint && context.getSource(node).substr(-2) === "|0")) { + if (!(int32Hint && sourceCode.getText(node).substr(-2) === "|0")) { report(node, nonSpacedNode); } } diff --git a/node_modules/eslint/lib/rules/space-unary-ops.js b/node_modules/eslint/lib/rules/space-unary-ops.js index 0bb92af..fdb1c03 100644 --- a/node_modules/eslint/lib/rules/space-unary-ops.js +++ b/node_modules/eslint/lib/rules/space-unary-ops.js @@ -43,6 +43,8 @@ module.exports = { create: function(context) { var options = context.options && Array.isArray(context.options) && context.options[0] || { words: true, nonwords: false }; + var sourceCode = context.getSourceCode(); + //-------------------------------------------------------------------------- // Helpers //-------------------------------------------------------------------------- @@ -158,7 +160,7 @@ module.exports = { * @returns {void} */ function checkForSpacesAfterYield(node) { - var tokens = context.getFirstTokens(node, 3), + var tokens = sourceCode.getFirstTokens(node, 3), word = "yield"; if (!node.argument || node.delegate) { @@ -239,7 +241,7 @@ module.exports = { * @returns {void} */ function checkForSpaces(node) { - var tokens = context.getFirstTokens(node, 2), + var tokens = sourceCode.getFirstTokens(node, 2), firstToken = tokens[0], secondToken = tokens[1]; diff --git a/node_modules/eslint/lib/rules/unicode-bom.js b/node_modules/eslint/lib/rules/unicode-bom.js new file mode 100644 index 0000000..a152b03 --- /dev/null +++ b/node_modules/eslint/lib/rules/unicode-bom.js @@ -0,0 +1,66 @@ +/** + * @fileoverview Require or disallow Unicode BOM + * @author Andrew Johnston + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow Unicode byte order mark (BOM)", + category: "Stylistic Issues", + recommended: false + }, + + fixable: "whitespace", + + schema: [ + { + enum: ["always", "never"] + } + ] + }, + + create: function(context) { + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + + Program: function checkUnicodeBOM(node) { + + var sourceCode = context.getSourceCode(), + location = {column: 0, line: 1}, + requireBOM = context.options[0] || "never"; + + if (!sourceCode.hasBOM && (requireBOM === "always")) { + context.report({ + node: node, + loc: location, + message: "Expected Unicode BOM (Byte Order Mark).", + fix: function(fixer) { + return fixer.insertTextBefore(node, "\uFEFF"); + } + }); + } else if (sourceCode.hasBOM && (requireBOM === "never")) { + context.report({ + node: node, + loc: location, + message: "Unexpected Unicode BOM (Byte Order Mark).", + fix: function(fixer) { + return fixer.removeRange([-1, 0]); + } + }); + } + } + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/valid-jsdoc.js b/node_modules/eslint/lib/rules/valid-jsdoc.js index e7d6fde..65ed539 100644 --- a/node_modules/eslint/lib/rules/valid-jsdoc.js +++ b/node_modules/eslint/lib/rules/valid-jsdoc.js @@ -340,14 +340,14 @@ module.exports = { if (node.params) { node.params.forEach(function(param, i) { - var name = param.name; - if (param.type === "AssignmentPattern") { - name = param.left.name; + param = param.left; } + var name = param.name; + // TODO(nzakas): Figure out logical things to do with destructured, default, rest params - if (param.type === "Identifier" || param.type === "AssignmentPattern") { + if (param.type === "Identifier") { if (jsdocParams[i] && (name !== jsdocParams[i])) { context.report(jsdocNode, "Expected JSDoc for '{{name}}' but found '{{jsdocName}}'.", { name: name, diff --git a/node_modules/eslint/lib/rules/vars-on-top.js b/node_modules/eslint/lib/rules/vars-on-top.js index b44f77e..25bef04 100644 --- a/node_modules/eslint/lib/rules/vars-on-top.js +++ b/node_modules/eslint/lib/rules/vars-on-top.js @@ -46,6 +46,23 @@ module.exports = { node.type === "ImportDefaultSpecifier" || node.type === "ImportNamespaceSpecifier"; } + /** + * Checks whether a given node is a variable declaration or not. + * + * @param {ASTNode} node - any node + * @returns {boolean} `true` if the node is a variable declaration. + */ + function isVariableDeclaration(node) { + return ( + node.type === "VariableDeclaration" || + ( + node.type === "ExportNamedDeclaration" && + node.declaration && + node.declaration.type === "VariableDeclaration" + ) + ); + } + /** * Checks whether this variable is on top of the block body * @param {ASTNode} node - The node to check @@ -64,9 +81,7 @@ module.exports = { } for (; i < l; ++i) { - if (statements[i].type !== "VariableDeclaration" && - (statements[i].type !== "ExportNamedDeclaration" || - statements[i].declaration.type !== "VariableDeclaration")) { + if (!isVariableDeclaration(statements[i])) { return false; } if (statements[i] === node) { diff --git a/node_modules/eslint/lib/rules/wrap-iife.js b/node_modules/eslint/lib/rules/wrap-iife.js index 1dd1a0c..2f73699 100644 --- a/node_modules/eslint/lib/rules/wrap-iife.js +++ b/node_modules/eslint/lib/rules/wrap-iife.js @@ -28,6 +28,8 @@ module.exports = { var style = context.options[0] || "outside"; + var sourceCode = context.getSourceCode(); + /** * Check if the node is wrapped in () * @param {ASTNode} node node to evaluate @@ -35,8 +37,8 @@ module.exports = { * @private */ function wrapped(node) { - var previousToken = context.getTokenBefore(node), - nextToken = context.getTokenAfter(node); + var previousToken = sourceCode.getTokenBefore(node), + nextToken = sourceCode.getTokenAfter(node); return previousToken && previousToken.value === "(" && nextToken && nextToken.value === ")"; diff --git a/node_modules/eslint/lib/rules/wrap-regex.js b/node_modules/eslint/lib/rules/wrap-regex.js index 96df330..1aed713 100644 --- a/node_modules/eslint/lib/rules/wrap-regex.js +++ b/node_modules/eslint/lib/rules/wrap-regex.js @@ -21,18 +21,19 @@ module.exports = { }, create: function(context) { + var sourceCode = context.getSourceCode(); return { Literal: function(node) { - var token = context.getFirstToken(node), + var token = sourceCode.getFirstToken(node), nodeType = token.type, source, grandparent, ancestors; if (nodeType === "RegularExpression") { - source = context.getTokenBefore(node); + source = sourceCode.getTokenBefore(node); ancestors = context.getAncestors(); grandparent = ancestors[ancestors.length - 1]; diff --git a/node_modules/eslint/lib/rules/yoda.js b/node_modules/eslint/lib/rules/yoda.js index ce2709e..0373e91 100644 --- a/node_modules/eslint/lib/rules/yoda.js +++ b/node_modules/eslint/lib/rules/yoda.js @@ -151,6 +151,8 @@ module.exports = { var exceptRange = (context.options[1] && context.options[1].exceptRange); var onlyEquality = (context.options[1] && context.options[1].onlyEquality); + var sourceCode = context.getSourceCode(); + /** * Determines whether node represents a range test. * A range test is a "between" test like `(0 <= x && x < 1)` or an "outside" @@ -202,9 +204,9 @@ module.exports = { function isParenWrapped() { var tokenBefore, tokenAfter; - return ((tokenBefore = context.getTokenBefore(node)) && + return ((tokenBefore = sourceCode.getTokenBefore(node)) && tokenBefore.value === "(" && - (tokenAfter = context.getTokenAfter(node)) && + (tokenAfter = sourceCode.getTokenAfter(node)) && tokenAfter.value === ")"); } diff --git a/node_modules/eslint/lib/testers/rule-tester.js b/node_modules/eslint/lib/testers/rule-tester.js index 4485e0d..2ee87ec 100644 --- a/node_modules/eslint/lib/testers/rule-tester.js +++ b/node_modules/eslint/lib/testers/rule-tester.js @@ -330,6 +330,21 @@ RuleTester.prototype = { } } + /** + * Check if the AST was changed + * @param {ASTNode} beforeAST AST node before running + * @param {ASTNode} afterAST AST node after running + * @returns {void} + * @private + */ + function assertASTDidntChange(beforeAST, afterAST) { + if (!lodash.isEqual(beforeAST, afterAST)) { + + // Not using directly to avoid performance problem in node 6.1.0. See #6111 + assert.deepEqual(beforeAST, afterAST, "Rule should not modify AST."); + } + } + /** * Check if the template is valid or not * all valid cases go through this @@ -345,11 +360,7 @@ RuleTester.prototype = { assert.equal(messages.length, 0, util.format("Should have no errors but had %d: %s", messages.length, util.inspect(messages))); - assert.deepEqual( - result.beforeAST, - result.afterAST, - "Rule should not modify AST." - ); + assertASTDidntChange(result.beforeAST, result.afterAST); } /** @@ -422,11 +433,7 @@ RuleTester.prototype = { } - assert.deepEqual( - result.beforeAST, - result.afterAST, - "Rule should not modify AST." - ); + assertASTDidntChange(result.beforeAST, result.afterAST); } /* diff --git a/node_modules/eslint/lib/util/glob-util.js b/node_modules/eslint/lib/util/glob-util.js index dadefbd..1209dab 100644 --- a/node_modules/eslint/lib/util/glob-util.js +++ b/node_modules/eslint/lib/util/glob-util.js @@ -124,10 +124,12 @@ function listFilesToProcess(globPatterns, options) { var ignored = false; var isSilentlyIgnored; + if (ignoredPaths.contains(filename, "default")) { + ignored = (options.ignore !== false) && shouldWarnIgnored; + isSilentlyIgnored = !shouldWarnIgnored; + } + if (options.ignore !== false) { - if (ignoredPaths.contains(filename, "default")) { - isSilentlyIgnored = true; - } if (ignoredPaths.contains(filename, "custom")) { if (shouldWarnIgnored) { ignored = true; @@ -135,10 +137,12 @@ function listFilesToProcess(globPatterns, options) { isSilentlyIgnored = true; } } - if (isSilentlyIgnored && !ignored) { - return; - } } + + if (isSilentlyIgnored && !ignored) { + return; + } + if (added[filename]) { return; } @@ -150,7 +154,8 @@ function listFilesToProcess(globPatterns, options) { ignoredPaths = new IgnoredPaths(options); globOptions = { nodir: true, - cwd: cwd + cwd: cwd, + ignore: ignoredPaths.getIgnoredFoldersGlobPatterns() }; debug("Creating list of files to process."); diff --git a/node_modules/eslint/lib/util/npm-util.js b/node_modules/eslint/lib/util/npm-util.js index fd08130..27120ad 100644 --- a/node_modules/eslint/lib/util/npm-util.js +++ b/node_modules/eslint/lib/util/npm-util.js @@ -11,7 +11,8 @@ var fs = require("fs"), path = require("path"), - shell = require("shelljs"); + shell = require("shelljs"), + log = require("../logging"); //------------------------------------------------------------------------------ // Helpers @@ -69,11 +70,18 @@ function installSyncSaveDev(packages) { function check(packages, opt) { var deps = []; var pkgJson = (opt) ? findPackageJson(opt.startDir) : findPackageJson(); + var fileJson; if (!pkgJson) { throw new Error("Could not find a package.json file. Run 'npm init' to create one."); } - var fileJson = JSON.parse(fs.readFileSync(pkgJson, "utf8")); + + try { + fileJson = JSON.parse(fs.readFileSync(pkgJson, "utf8")); + } catch (e) { + log.info("Could not read package.json file. Please check that the file contains valid JSON."); + throw new Error(e); + } if (opt.devDependencies && typeof fileJson.devDependencies === "object") { deps = deps.concat(Object.keys(fileJson.devDependencies)); diff --git a/node_modules/eslint/lib/util/source-code-fixer.js b/node_modules/eslint/lib/util/source-code-fixer.js index e8c440d..042eff5 100644 --- a/node_modules/eslint/lib/util/source-code-fixer.js +++ b/node_modules/eslint/lib/util/source-code-fixer.js @@ -85,11 +85,7 @@ SourceCodeFixer.applyFixes = function(sourceCode, messages) { // sort in reverse order of occurrence fixes.sort(function(a, b) { - if (a.fix.range[1] <= b.fix.range[0]) { - return 1; - } else { - return -1; - } + return b.fix.range[1] - a.fix.range[1] || b.fix.range[0] - a.fix.range[0]; }); // split into array of characters for easier manipulation diff --git a/node_modules/eslint/node_modules/.bin/js-yaml b/node_modules/eslint/node_modules/.bin/js-yaml new file mode 100644 index 0000000..e633943 --- /dev/null +++ b/node_modules/eslint/node_modules/.bin/js-yaml @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../../../js-yaml/bin/js-yaml.js" "$@" + ret=$? +else + node "$basedir/../../../js-yaml/bin/js-yaml.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/eslint/node_modules/.bin/js-yaml.cmd b/node_modules/eslint/node_modules/.bin/js-yaml.cmd new file mode 100644 index 0000000..4a4f7b4 --- /dev/null +++ b/node_modules/eslint/node_modules/.bin/js-yaml.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\..\..\js-yaml\bin\js-yaml.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\..\..\js-yaml\bin\js-yaml.js" %* +) \ No newline at end of file diff --git a/node_modules/eslint/node_modules/.bin/mkdirp b/node_modules/eslint/node_modules/.bin/mkdirp new file mode 100644 index 0000000..1c12a6c --- /dev/null +++ b/node_modules/eslint/node_modules/.bin/mkdirp @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../../../mkdirp/bin/cmd.js" "$@" + ret=$? +else + node "$basedir/../../../mkdirp/bin/cmd.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/eslint/node_modules/.bin/mkdirp.cmd b/node_modules/eslint/node_modules/.bin/mkdirp.cmd new file mode 100644 index 0000000..ecac552 --- /dev/null +++ b/node_modules/eslint/node_modules/.bin/mkdirp.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\..\..\mkdirp\bin\cmd.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\..\..\mkdirp\bin\cmd.js" %* +) \ No newline at end of file diff --git a/node_modules/eslint/node_modules/.bin/shjs b/node_modules/eslint/node_modules/.bin/shjs new file mode 100644 index 0000000..f6b0021 --- /dev/null +++ b/node_modules/eslint/node_modules/.bin/shjs @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../../../shelljs/bin/shjs" "$@" + ret=$? +else + node "$basedir/../../../shelljs/bin/shjs" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/eslint/node_modules/.bin/shjs.cmd b/node_modules/eslint/node_modules/.bin/shjs.cmd new file mode 100644 index 0000000..1f1e821 --- /dev/null +++ b/node_modules/eslint/node_modules/.bin/shjs.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\..\..\shelljs\bin\shjs" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\..\..\shelljs\bin\shjs" %* +) \ No newline at end of file diff --git a/node_modules/eslint/node_modules/.bin/strip-json-comments b/node_modules/eslint/node_modules/.bin/strip-json-comments new file mode 100644 index 0000000..4eb2dc2 --- /dev/null +++ b/node_modules/eslint/node_modules/.bin/strip-json-comments @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../../../strip-json-comments/cli.js" "$@" + ret=$? +else + node "$basedir/../../../strip-json-comments/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/eslint/node_modules/.bin/strip-json-comments.cmd b/node_modules/eslint/node_modules/.bin/strip-json-comments.cmd new file mode 100644 index 0000000..63a1e10 --- /dev/null +++ b/node_modules/eslint/node_modules/.bin/strip-json-comments.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\..\..\strip-json-comments\cli.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\..\..\strip-json-comments\cli.js" %* +) \ No newline at end of file diff --git a/node_modules/eslint/package.json b/node_modules/eslint/package.json index b07944b..e7800d3 100644 --- a/node_modules/eslint/package.json +++ b/node_modules/eslint/package.json @@ -1,60 +1,48 @@ { - "_args": [ - [ - "eslint@^2.7.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\sass-lint" - ] - ], - "_from": "eslint@>=2.7.0 <3.0.0", - "_id": "eslint@2.9.0", - "_inCache": true, - "_installable": true, - "_location": "/eslint", - "_nodeVersion": "4.4.2", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/eslint-2.9.0.tgz_1461949357357_0.922593503491953" - }, - "_npmUser": { - "email": "nicholas@nczconsulting.com", - "name": "nzakas" - }, - "_npmVersion": "2.15.0", - "_phantomChildren": {}, - "_requested": { - "name": "eslint", - "raw": "eslint@^2.7.0", - "rawSpec": "^2.7.0", - "scope": null, - "spec": ">=2.7.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/sass-lint" - ], - "_resolved": "https://registry.npmjs.org/eslint/-/eslint-2.9.0.tgz", - "_shasum": "5b3fdb7497bb042e2747e3d1fe95f404dca39a60", - "_shrinkwrap": null, - "_spec": "eslint@^2.7.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\sass-lint", - "author": { - "email": "nicholas+npm@nczconsulting.com", - "name": "Nicholas C. Zakas" - }, + "name": "eslint", + "version": "2.13.1", + "author": "Nicholas C. Zakas ", + "description": "An AST-based pattern checker for JavaScript.", "bin": { "eslint": "./bin/eslint.js" }, - "bugs": { - "url": "https://github.com/eslint/eslint/issues/" + "main": "./lib/api.js", + "scripts": { + "test": "node Makefile.js test", + "lint": "node Makefile.js lint", + "release": "node Makefile.js release", + "alpharelease": "node Makefile.js prerelease -- alpha", + "betarelease": "node Makefile.js prerelease -- beta", + "docs": "node Makefile.js docs", + "gensite": "node Makefile.js gensite", + "browserify": "node Makefile.js browserify", + "perf": "node Makefile.js perf", + "profile": "beefy tests/bench/bench.js --open -- -t brfs -t ./tests/bench/xform-rules.js -r espree", + "coveralls": "cat ./coverage/lcov.info | coveralls", + "check-commit": "node Makefile.js checkGitCommit" + }, + "files": [ + "LICENSE", + "README.md", + "bin", + "conf", + "lib", + "messages" + ], + "repository": { + "type": "git", + "url": "https://github.com/eslint/eslint" }, + "homepage": "http://eslint.org", + "bugs": "https://github.com/eslint/eslint/issues/", "dependencies": { "chalk": "^1.1.3", "concat-stream": "^1.4.6", "debug": "^2.1.1", - "doctrine": "^1.2.1", + "doctrine": "^1.2.2", "es6-map": "^0.1.3", "escope": "^3.6.0", - "espree": "3.1.4", + "espree": "^3.1.6", "estraverse": "^4.2.0", "esutils": "^2.0.2", "file-entry-cache": "^1.1.1", @@ -67,6 +55,7 @@ "is-resolvable": "^1.0.0", "js-yaml": "^3.5.1", "json-stable-stringify": "^1.0.0", + "levn": "^0.3.0", "lodash": "^4.0.0", "mkdirp": "^0.5.0", "optionator": "^0.8.1", @@ -81,7 +70,6 @@ "text-table": "~0.2.0", "user-home": "^2.0.0" }, - "description": "An AST-based pattern checker for JavaScript.", "devDependencies": { "beefy": "^2.0.0", "brfs": "0.0.9", @@ -97,78 +85,34 @@ "gh-got": "^2.2.0", "istanbul": "^0.4.0", "jsdoc": "^3.3.0-beta1", + "karma": "^0.13.22", + "karma-mocha": "^1.0.1", + "karma-mocha-reporter": "^2.0.3", + "karma-phantomjs-launcher": "^1.0.0", "leche": "^2.1.1", "linefix": "^0.1.1", "load-perf": "^0.2.0", "markdownlint": "^0.1.0", "mocha": "^2.4.5", - "mocha-phantomjs": "4.0.1", + "mock-fs": "^3.9.0", "npm-license": "^0.3.2", - "phantomjs-polyfill": "0.0.1", - "proxyquire": "^1.0.0", + "phantomjs-prebuilt": "^2.1.7", + "proxyquire": ">=1.0.0 <1.7.5", "semver": "^5.0.3", "shelljs-nodecli": "~0.1.0", "sinon": "^1.17.2", "temp": "^0.8.3", "through": "^2.3.6" }, - "directories": {}, - "dist": { - "shasum": "5b3fdb7497bb042e2747e3d1fe95f404dca39a60", - "tarball": "https://registry.npmjs.org/eslint/-/eslint-2.9.0.tgz" - }, - "engines": { - "node": ">=0.10" - }, - "files": [ - "LICENSE", - "README.md", - "bin", - "conf", - "lib", - "messages" - ], - "gitHead": "d8887638a9eaeeda6ea09f7d625d1bc57ea7f436", - "homepage": "http://eslint.org", "keywords": [ "ast", - "ecmascript", - "espree", + "lint", "javascript", - "lint" + "ecmascript", + "espree" ], "license": "MIT", - "main": "./lib/api.js", - "maintainers": [ - { - "name": "nzakas", - "email": "nicholas@nczconsulting.com" - }, - { - "name": "ivolodin", - "email": "ivolodin@gmail.com" - } - ], - "name": "eslint", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/eslint/eslint.git" - }, - "scripts": { - "alpharelease": "node Makefile.js prerelease -- alpha", - "betarelease": "node Makefile.js prerelease -- beta", - "browserify": "node Makefile.js browserify", - "check-commit": "node Makefile.js checkGitCommit", - "coveralls": "cat ./coverage/lcov.info | coveralls", - "docs": "node Makefile.js docs", - "gensite": "node Makefile.js gensite", - "lint": "node Makefile.js lint", - "perf": "node Makefile.js perf", - "profile": "beefy tests/bench/bench.js --open -- -t brfs -t ./tests/bench/xform-rules.js -r espree", - "release": "node Makefile.js release", - "test": "node Makefile.js test" - }, - "version": "2.9.0" + "engines": { + "node": ">=0.10" + } } diff --git a/node_modules/espree/CHANGELOG.md b/node_modules/espree/CHANGELOG.md index 5b703c1..f6dabf0 100644 --- a/node_modules/espree/CHANGELOG.md +++ b/node_modules/espree/CHANGELOG.md @@ -1,3 +1,35 @@ +v3.3.2 - September 29, 2016 + +* 7d3e2fc Fix: reset `isAsync` flag for each property (fixes #298) (#299) (Toru Nagashima) + +v3.3.1 - September 26, 2016 + +* 80abdce Fix: `}` token followed by template had been lost (fixes #293) (#294) (Toru Nagashima) +* 9810bab Fix: parsing error on `async` as property name. (#295) (Toru Nagashima) + +v3.3.0 - September 20, 2016 + +* 92b04b1 Update: create-test script (fixes #291) (#292) (Jamund Ferguson) + +v3.2.0 - September 16, 2016 + +* 5a37f80 Build: Update release tool (Nicholas C. Zakas) +* 9bbcad8 Update: Upgrade Acorn to support ES2017 (fixes #287) (#290) (Jamund Ferguson) +* 8d9767d Build: Add CI release scripts (Nicholas C. Zakas) + +v3.1.7 - July 29, 2016 + +* 8f6cfbd Build: Add CI release (Nicholas C. Zakas) +* ff15922 Fix: Catch ES2016 invalid syntax (fixes #284) (#285) (Nicholas C. Zakas) + +v3.1.6 - June 15, 2016 + +* a90edc2 Upgrade: acorn 3.2.0 (fixes #279) (#280) (Toru Nagashima) + +v3.1.5 - May 27, 2016 + +* 7df2e4a Fix: Convert ~ and ! prefix tokens to esprima (fixes #274) (#276) (Daniel Tschinder) + v3.1.4 - April 21, 2016 * e044705 Fix: remove extra leading comments at node level (fixes #264) (Kai Cataldo) diff --git a/node_modules/espree/README.md b/node_modules/espree/README.md index 80ca048..97e7be4 100644 --- a/node_modules/espree/README.md +++ b/node_modules/espree/README.md @@ -41,7 +41,7 @@ var ast = espree.parse(code, { // create a top-level tokens array containing all tokens tokens: true, - // specify the language version (3, 5, 6, or 7, default is 5) + // specify the language version (3, 5, 6, 7, or 8, default is 5) ecmaVersion: 5, // specify which type of script you're parsing (script or module, default is script) @@ -130,10 +130,17 @@ We are building on top of Acorn, however, so that we can contribute back and hel All of them. -### What ECMAScript 7 features do you support? +### What ECMAScript 7/2016 features do you support? There is only one ECMAScript 7 syntax change: the exponentiation operator. Espree supports this. +### What ECMAScript 2017 features do you support? + +Because ECMAScript 2017 is still under development, we are implementing features as they are finalized. Currently, Espree supports: + +* `async` functions +* Trailing commas in function declarations and calls (including arrow functions and concise methods) + ### How do you determine which experimental features to support? In general, we do not support experimental JavaScript features. We may make exceptions from time to time depending on the maturity of the features. diff --git a/node_modules/espree/espree.js b/node_modules/espree/espree.js index 9ad6e2e..d6e65c8 100644 --- a/node_modules/espree/espree.js +++ b/node_modules/espree/espree.js @@ -340,6 +340,7 @@ acorn.plugins.espree = function(instance) { var prop = this.startNode(), isGenerator, + isAsync, startPos, startLoc; @@ -369,8 +370,25 @@ acorn.plugins.espree = function(instance) { } } - this.parsePropertyName(prop); - this.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos); + // grab the property name or "async" + this.parsePropertyName(prop, refShorthandDefaultPos); + if (this.options.ecmaVersion >= 8 && + !isPattern && + !isGenerator && + !prop.computed && + prop.key.type === "Identifier" && + prop.key.name === "async" && + this.type !== tt.parenL && + this.type !== tt.colon && + !this.canInsertSemicolon() + ) { + this.parsePropertyName(prop, refShorthandDefaultPos); + isAsync = true; + } else { + isAsync = false; + } + + this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refShorthandDefaultPos); this.checkPropClash(prop, propHash); node.properties.push(this.finishNode(prop, "Property")); } @@ -506,12 +524,13 @@ function tokenize(code, options) { case 5: case 6: case 7: + case 8: acornOptions.ecmaVersion = options.ecmaVersion; extra.ecmaVersion = options.ecmaVersion; break; default: - throw new Error("ecmaVersion must be 3, 5, 6, or 7."); + throw new Error("ecmaVersion must be 3, 5, 6, 7, or 8."); } } @@ -643,12 +662,13 @@ function parse(code, options) { case 5: case 6: case 7: + case 8: acornOptions.ecmaVersion = options.ecmaVersion; extra.ecmaVersion = options.ecmaVersion; break; default: - throw new Error("ecmaVersion must be 3, 5, 6, or 7."); + throw new Error("ecmaVersion must be 3, 5, 6, 7, or 8."); } } diff --git a/node_modules/espree/lib/token-translator.js b/node_modules/espree/lib/token-translator.js index 857c18e..3921ac7 100644 --- a/node_modules/espree/lib/token-translator.js +++ b/node_modules/espree/lib/token-translator.js @@ -122,7 +122,8 @@ TokenTranslator.prototype = { type === tt.bracketR || type === tt.ellipsis || type === tt.arrow || type === tt.jsxTagStart || type === tt.incDec || type === tt.starstar || - type === tt.jsxTagEnd || (type.binop && !type.keyword) || + type === tt.jsxTagEnd || type === tt.prefix || + (type.binop && !type.keyword) || type.isAssign) { token.type = Token.Punctuator; @@ -200,6 +201,13 @@ TokenTranslator.prototype = { } if (token.type === tt.backQuote) { + + // if there's already a curly, it's not part of the template + if (this._curlyBrace) { + tokens.push(this.translate(this._curlyBrace, extra)); + this._curlyBrace = null; + } + templateTokens.push(token); // it's the end @@ -216,7 +224,6 @@ TokenTranslator.prototype = { // if there's already a curly, it's not part of the template if (this._curlyBrace) { - tokens.push(this.translate(this._curlyBrace, extra)); } diff --git a/node_modules/espree/node_modules/.bin/acorn b/node_modules/espree/node_modules/.bin/acorn new file mode 100644 index 0000000..9daed84 --- /dev/null +++ b/node_modules/espree/node_modules/.bin/acorn @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../../../acorn/bin/acorn" "$@" + ret=$? +else + node "$basedir/../../../acorn/bin/acorn" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/espree/node_modules/.bin/acorn.cmd b/node_modules/espree/node_modules/.bin/acorn.cmd new file mode 100644 index 0000000..8e962f8 --- /dev/null +++ b/node_modules/espree/node_modules/.bin/acorn.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\..\..\acorn\bin\acorn" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\..\..\acorn\bin\acorn" %* +) \ No newline at end of file diff --git a/node_modules/espree/package.json b/node_modules/espree/package.json index 1661dac..14f1487 100644 --- a/node_modules/espree/package.json +++ b/node_modules/espree/package.json @@ -1,60 +1,32 @@ { - "_args": [ - [ - "espree@3.1.4", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "espree@3.1.4", - "_id": "espree@3.1.4", - "_inCache": true, - "_installable": true, - "_location": "/espree", - "_nodeVersion": "4.4.2", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/espree-3.1.4.tgz_1461264685938_0.4520344687625766" - }, - "_npmUser": { - "email": "nicholas@nczconsulting.com", - "name": "nzakas" - }, - "_npmVersion": "2.15.0", - "_phantomChildren": {}, - "_requested": { - "name": "espree", - "raw": "espree@3.1.4", - "rawSpec": "3.1.4", - "scope": null, - "spec": "3.1.4", - "type": "version" - }, - "_requiredBy": [ - "/eslint" + "name": "espree", + "description": "An Esprima-compatible JavaScript parser built on Acorn", + "author": "Nicholas C. Zakas ", + "homepage": "https://github.com/eslint/espree", + "main": "espree.js", + "version": "3.3.2", + "files": [ + "lib", + "espree.js" ], - "_resolved": "https://registry.npmjs.org/espree/-/espree-3.1.4.tgz", - "_shasum": "0726d7ac83af97a7c8498da9b363a3609d2a68a1", - "_shrinkwrap": null, - "_spec": "espree@3.1.4", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint", - "author": { - "email": "nicholas+npm@nczconsulting.com", - "name": "Nicholas C. Zakas" + "engines": { + "node": ">=0.10.0" }, + "repository": "eslint/espree", "bugs": { "url": "http://github.com/eslint/espree.git" }, + "license": "BSD-2-Clause", "dependencies": { - "acorn": "^3.1.0", + "acorn": "^4.0.1", "acorn-jsx": "^3.0.0" }, - "description": "An Esprima-compatible JavaScript parser built on Acorn", "devDependencies": { "browserify": "^7.0.0", "chai": "^1.10.0", "eslint": "^2.0.0-beta.1", "eslint-config-eslint": "^3.0.0", - "eslint-release": "^0.3.0", + "eslint-release": "^0.10.0", "esprima": "latest", "esprima-fb": "^8001.2001.0-dev-harmony-fb", "istanbul": "~0.2.6", @@ -66,51 +38,23 @@ "shelljs-nodecli": "^0.1.1", "unicode-6.3.0": "~0.1.0" }, - "directories": {}, - "dist": { - "shasum": "0726d7ac83af97a7c8498da9b363a3609d2a68a1", - "tarball": "https://registry.npmjs.org/espree/-/espree-3.1.4.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "espree.js", - "lib" - ], - "gitHead": "72ef3f4a332d6f8bfb32a55573eacb06f65e7f11", - "homepage": "https://github.com/eslint/espree", "keywords": [ - "acorn", "ast", "ecmascript", "javascript", "parser", - "syntax" - ], - "license": "BSD-2-Clause", - "main": "espree.js", - "maintainers": [ - { - "name": "nzakas", - "email": "nicholas@nczconsulting.com" - } + "syntax", + "acorn" ], - "name": "espree", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/eslint/espree.git" - }, "scripts": { - "alpharelease": "eslint-prelease alpha", - "betarelease": "eslint-prelease beta", - "browserify": "node Makefile.js browserify", "generate-regex": "node tools/generate-identifier-regex.js", + "test": "npm run-script lint && node Makefile.js test", "lint": "node Makefile.js lint", "release": "eslint-release", - "test": "npm run-script lint && node Makefile.js test" - }, - "version": "3.1.4" + "ci-release": "eslint-ci-release", + "gh-release": "eslint-gh-release", + "alpharelease": "eslint-prelease alpha", + "betarelease": "eslint-prelease beta", + "browserify": "node Makefile.js browserify" + } } diff --git a/node_modules/esprima/ChangeLog b/node_modules/esprima/ChangeLog index 864ab69..fd687ae 100644 --- a/node_modules/esprima/ChangeLog +++ b/node_modules/esprima/ChangeLog @@ -1,3 +1,7 @@ +2016-08-23: Version 2.7.3 + + * Fix tokenizer confusion with a comment (issue 1493, 1516) + 2016-02-02: Version 2.7.2 * Fix out-of-bound error location in an invalid string literal (issue 1457) diff --git a/node_modules/esprima/esprima.js b/node_modules/esprima/esprima.js index 654e5fd..0cb0a93 100644 --- a/node_modules/esprima/esprima.js +++ b/node_modules/esprima/esprima.js @@ -1325,6 +1325,7 @@ try { return new RegExp(pattern, flags); } catch (exception) { + /* istanbul ignore next */ return null; } } @@ -1521,7 +1522,7 @@ return value && (value.length > 1) && (value[0] >= 'a') && (value[0] <= 'z'); } - previous = extra.tokenValues[extra.tokens.length - 1]; + previous = extra.tokenValues[extra.tokenValues.length - 1]; regex = (previous !== null); switch (previous) { @@ -5707,7 +5708,7 @@ } // Sync with *.json manifests. - exports.version = '2.7.2'; + exports.version = '2.7.3'; exports.tokenize = tokenize; diff --git a/node_modules/esprima/package.json b/node_modules/esprima/package.json index 1a22935..f2d5912 100644 --- a/node_modules/esprima/package.json +++ b/node_modules/esprima/package.json @@ -1,55 +1,40 @@ { - "_args": [ - [ - "esprima@^2.6.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\js-yaml" - ] - ], - "_from": "esprima@>=2.6.0 <3.0.0", - "_id": "esprima@2.7.2", - "_inCache": true, - "_installable": true, - "_location": "/esprima", - "_nodeVersion": "4.2.2", - "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/esprima-2.7.2.tgz_1454477276067_0.014412595424801111" - }, - "_npmUser": { - "email": "ariya.hidayat@gmail.com", - "name": "ariya" - }, - "_npmVersion": "2.14.7", - "_phantomChildren": {}, - "_requested": { - "name": "esprima", - "raw": "esprima@^2.6.0", - "rawSpec": "^2.6.0", - "scope": null, - "spec": ">=2.6.0 <3.0.0", - "type": "range" + "name": "esprima", + "description": "ECMAScript parsing infrastructure for multipurpose analysis", + "homepage": "http://esprima.org", + "main": "esprima.js", + "bin": { + "esparse": "./bin/esparse.js", + "esvalidate": "./bin/esvalidate.js" }, - "_requiredBy": [ - "/js-yaml" + "version": "2.7.3", + "files": [ + "bin", + "unit-tests.js", + "esprima.js" ], - "_resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.2.tgz", - "_shasum": "f43be543609984eae44c933ac63352a6af35f339", - "_shrinkwrap": null, - "_spec": "esprima@^2.6.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\js-yaml", + "engines": { + "node": ">=0.10.0" + }, "author": { - "email": "ariya.hidayat@gmail.com", - "name": "Ariya Hidayat" + "name": "Ariya Hidayat", + "email": "ariya.hidayat@gmail.com" }, - "bin": { - "esparse": "./bin/esparse.js", - "esvalidate": "./bin/esvalidate.js" + "maintainers": [ + { + "name": "Ariya Hidayat", + "email": "ariya.hidayat@gmail.com", + "web": "http://ariya.ofilabs.com" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/jquery/esprima.git" }, "bugs": { "url": "https://github.com/jquery/esprima/issues" }, - "dependencies": {}, - "description": "ECMAScript parsing infrastructure for multipurpose analysis", + "license": "BSD-2-Clause", "devDependencies": { "codecov.io": "~0.1.6", "escomplex-js": "1.2.0", @@ -74,21 +59,6 @@ "temp": "~0.8.3", "unicode-7.0.0": "~0.1.5" }, - "directories": {}, - "dist": { - "shasum": "f43be543609984eae44c933ac63352a6af35f339", - "tarball": "https://registry.npmjs.org/esprima/-/esprima-2.7.2.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "bin", - "esprima.js", - "unit-tests.js" - ], - "gitHead": "eb05a03b18b8433ab1ebeabea635a949219cd75e", - "homepage": "http://esprima.org", "keywords": [ "ast", "ecmascript", @@ -96,50 +66,34 @@ "parser", "syntax" ], - "license": "BSD-2-Clause", - "main": "esprima.js", - "maintainers": [ - { - "name": "ariya", - "email": "ariya.hidayat@gmail.com" - } - ], - "name": "esprima", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jquery/esprima.git" - }, "scripts": { - "all-tests": "npm run generate-fixtures && npm run unit-tests && npm run grammar-tests && npm run regression-tests", - "analyze-coverage": "istanbul cover test/unit-tests.js", - "appveyor": "npm run all-tests && npm run browser-tests && npm run dynamic-analysis", - "benchmark": "node test/benchmarks.js", - "benchmark-quick": "node test/benchmarks.js quick", - "browser-tests": "npm run generate-fixtures && cd test && karma start --single-run", - "check-coverage": "istanbul check-coverage --statement 100 --branch 100 --function 100", "check-version": "node test/check-version.js", - "circleci": "npm test && npm run codecov && npm run downstream", - "codecov": "istanbul report cobertura && codecov < ./coverage/cobertura-coverage.xml", - "complexity": "node test/check-complexity.js", - "downstream": "node test/downstream.js", - "droneio": "npm test && npm run saucelabs-evergreen && npm run saucelabs-ie && npm run saucelabs-safari", - "dynamic-analysis": "npm run analyze-coverage && npm run check-coverage", + "jscs": "jscs -p crockford esprima.js && jscs -p crockford test/*.js", "eslint": "node node_modules/eslint/bin/eslint.js -c .lintrc esprima.js", - "generate-fixtures": "node tools/generate-fixtures.js", - "generate-regex": "node tools/generate-identifier-regex.js", + "complexity": "node test/check-complexity.js", + "static-analysis": "npm run check-version && npm run jscs && npm run eslint && npm run complexity", + "unit-tests": "node test/unit-tests.js", "grammar-tests": "node test/grammar-tests.js", - "jscs": "jscs -p crockford esprima.js && jscs -p crockford test/*.js", - "profile": "node --prof test/profile.js && mv isolate*.log v8.log && node-tick-processor", "regression-tests": "node test/regression-tests.js", + "all-tests": "npm run generate-fixtures && npm run unit-tests && npm run grammar-tests && npm run regression-tests", + "generate-fixtures": "node tools/generate-fixtures.js", + "browser-tests": "npm run generate-fixtures && cd test && karma start --single-run", "saucelabs-evergreen": "cd test && karma start saucelabs-evergreen.conf.js", - "saucelabs-ie": "cd test && karma start saucelabs-ie.conf.js", "saucelabs-safari": "cd test && karma start saucelabs-safari.conf.js", - "static-analysis": "npm run check-version && npm run jscs && npm run eslint && npm run complexity", + "saucelabs-ie": "cd test && karma start saucelabs-ie.conf.js", + "analyze-coverage": "istanbul cover test/unit-tests.js", + "check-coverage": "istanbul check-coverage --statement 100 --branch 100 --function 100", + "dynamic-analysis": "npm run analyze-coverage && npm run check-coverage", "test": "npm run all-tests && npm run static-analysis && npm run dynamic-analysis", + "profile": "node --prof test/profile.js && mv isolate*.log v8.log && node-tick-processor", + "benchmark": "node test/benchmarks.js", + "benchmark-quick": "node test/benchmarks.js quick", + "codecov" : "istanbul report cobertura && codecov < ./coverage/cobertura-coverage.xml", + "downstream": "node test/downstream.js", "travis": "npm test", - "unit-tests": "node test/unit-tests.js" - }, - "version": "2.7.2" + "circleci": "npm test && npm run codecov && npm run downstream", + "appveyor": "npm run all-tests && npm run browser-tests && npm run dynamic-analysis", + "droneio": "npm test && npm run saucelabs-evergreen && npm run saucelabs-ie && npm run saucelabs-safari", + "generate-regex": "node tools/generate-identifier-regex.js" + } } diff --git a/node_modules/esrecurse/node_modules/estraverse/package.json b/node_modules/esrecurse/node_modules/estraverse/package.json index 3ab7713..02c8781 100644 --- a/node_modules/esrecurse/node_modules/estraverse/package.json +++ b/node_modules/esrecurse/node_modules/estraverse/package.json @@ -1,43 +1,23 @@ { - "_args": [ - [ - "estraverse@~4.1.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\esrecurse" - ] - ], - "_from": "estraverse@>=4.1.0 <4.2.0", - "_id": "estraverse@4.1.1", - "_inCache": true, - "_installable": true, - "_location": "/esrecurse/estraverse", - "_nodeVersion": "4.1.1", - "_npmUser": { - "email": "utatane.tea@gmail.com", - "name": "constellation" - }, - "_npmVersion": "2.14.4", - "_phantomChildren": {}, - "_requested": { - "name": "estraverse", - "raw": "estraverse@~4.1.0", - "rawSpec": "~4.1.0", - "scope": null, - "spec": ">=4.1.0 <4.2.0", - "type": "range" + "name": "estraverse", + "description": "ECMAScript JS AST traversal functions", + "homepage": "https://github.com/estools/estraverse", + "main": "estraverse.js", + "version": "4.1.1", + "engines": { + "node": ">=0.10.0" }, - "_requiredBy": [ - "/esrecurse" + "maintainers": [ + { + "name": "Yusuke Suzuki", + "email": "utatane.tea@gmail.com", + "web": "http://github.com/Constellation" + } ], - "_resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz", - "_shasum": "f6caca728933a850ef90661d0e17982ba47111a2", - "_shrinkwrap": null, - "_spec": "estraverse@~4.1.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\esrecurse", - "bugs": { - "url": "https://github.com/estools/estraverse/issues" + "repository": { + "type": "git", + "url": "http://github.com/estools/estraverse.git" }, - "dependencies": {}, - "description": "ECMAScript JS AST traversal functions", "devDependencies": { "chai": "^2.1.1", "coffee-script": "^1.8.0", @@ -50,43 +30,10 @@ "jshint": "^2.5.6", "mocha": "^2.1.0" }, - "directories": {}, - "dist": { - "shasum": "f6caca728933a850ef90661d0e17982ba47111a2", - "tarball": "https://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "gitHead": "bbcccbfe98296585e4311c8755e1d00dcd581e3c", - "homepage": "https://github.com/estools/estraverse", "license": "BSD-2-Clause", - "main": "estraverse.js", - "maintainers": [ - { - "name": "constellation", - "email": "utatane.tea@gmail.com" - }, - { - "name": "michaelficarra", - "email": "npm@michael.ficarra.me" - }, - { - "name": "nzakas", - "email": "nicholas@nczconsulting.com" - } - ], - "name": "estraverse", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/estools/estraverse.git" - }, "scripts": { - "lint": "jshint estraverse.js", "test": "npm run-script lint && npm run-script unit-test", + "lint": "jshint estraverse.js", "unit-test": "mocha --compilers coffee:coffee-script/register" - }, - "version": "4.1.1" + } } diff --git a/node_modules/esrecurse/package.json b/node_modules/esrecurse/package.json index 1ec81a2..7ae44e1 100644 --- a/node_modules/esrecurse/package.json +++ b/node_modules/esrecurse/package.json @@ -1,50 +1,27 @@ { - "_args": [ - [ - "esrecurse@^4.1.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\escope" - ] - ], - "_from": "esrecurse@>=4.1.0 <5.0.0", - "_id": "esrecurse@4.1.0", - "_inCache": true, - "_installable": true, - "_location": "/esrecurse", - "_nodeVersion": "0.12.9", - "_npmOperationalInternal": { - "host": "packages-13-west.internal.npmjs.com", - "tmp": "tmp/esrecurse-4.1.0.tgz_1457712782215_0.15950557170435786" - }, - "_npmUser": { - "email": "nicholas@nczconsulting.com", - "name": "nzakas" - }, - "_npmVersion": "2.14.9", - "_phantomChildren": {}, - "_requested": { - "name": "esrecurse", - "raw": "esrecurse@^4.1.0", - "rawSpec": "^4.1.0", - "scope": null, - "spec": ">=4.1.0 <5.0.0", - "type": "range" + "name": "esrecurse", + "description": "ECMAScript AST recursive visitor", + "homepage": "https://github.com/estools/esrecurse", + "main": "esrecurse.js", + "version": "4.1.0", + "engines": { + "node": ">=0.10.0" }, - "_requiredBy": [ - "/escope" + "maintainers": [ + { + "name": "Yusuke Suzuki", + "email": "utatane.tea@gmail.com", + "web": "https://github.com/Constellation" + } ], - "_resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.1.0.tgz", - "_shasum": "4713b6536adf7f2ac4f327d559e7756bff648220", - "_shrinkwrap": null, - "_spec": "esrecurse@^4.1.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\escope", - "bugs": { - "url": "https://github.com/estools/esrecurse/issues" + "repository": { + "type": "git", + "url": "https://github.com/estools/esrecurse.git" }, "dependencies": { "estraverse": "~4.1.0", "object-assign": "^4.0.1" }, - "description": "ECMAScript AST recursive visitor", "devDependencies": { "chai": "^3.3.0", "coffee-script": "^1.9.1", @@ -59,43 +36,10 @@ "jsdoc": "^3.3.0-alpha10", "minimist": "^1.1.0" }, - "directories": {}, - "dist": { - "shasum": "4713b6536adf7f2ac4f327d559e7756bff648220", - "tarball": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.1.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "gitHead": "63a34714834bd7ad2063054bd4abb24fb82ca667", - "homepage": "https://github.com/estools/esrecurse", "license": "BSD-2-Clause", - "main": "esrecurse.js", - "maintainers": [ - { - "name": "constellation", - "email": "utatane.tea@gmail.com" - }, - { - "name": "michaelficarra", - "email": "npm@michael.ficarra.me" - }, - { - "name": "nzakas", - "email": "nicholas@nczconsulting.com" - } - ], - "name": "esrecurse", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/estools/esrecurse.git" - }, "scripts": { - "lint": "gulp lint", "test": "gulp travis", - "unit-test": "gulp test" - }, - "version": "4.1.0" + "unit-test": "gulp test", + "lint": "gulp lint" + } } diff --git a/node_modules/estraverse/package.json b/node_modules/estraverse/package.json index 4228dce..f8567e3 100644 --- a/node_modules/estraverse/package.json +++ b/node_modules/estraverse/package.json @@ -1,48 +1,23 @@ { - "_args": [ - [ - "estraverse@^4.2.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "estraverse@>=4.2.0 <5.0.0", - "_id": "estraverse@4.2.0", - "_inCache": true, - "_installable": true, - "_location": "/estraverse", - "_nodeVersion": "0.12.9", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/estraverse-4.2.0.tgz_1457646738925_0.7118953282479197" - }, - "_npmUser": { - "email": "nicholas@nczconsulting.com", - "name": "nzakas" - }, - "_npmVersion": "2.14.9", - "_phantomChildren": {}, - "_requested": { - "name": "estraverse", - "raw": "estraverse@^4.2.0", - "rawSpec": "^4.2.0", - "scope": null, - "spec": ">=4.2.0 <5.0.0", - "type": "range" + "name": "estraverse", + "description": "ECMAScript JS AST traversal functions", + "homepage": "https://github.com/estools/estraverse", + "main": "estraverse.js", + "version": "4.2.0", + "engines": { + "node": ">=0.10.0" }, - "_requiredBy": [ - "/escope", - "/eslint" + "maintainers": [ + { + "name": "Yusuke Suzuki", + "email": "utatane.tea@gmail.com", + "web": "http://github.com/Constellation" + } ], - "_resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "_shasum": "0dee3fed31fcd469618ce7342099fc1afa0bdb13", - "_shrinkwrap": null, - "_spec": "estraverse@^4.2.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint", - "bugs": { - "url": "https://github.com/estools/estraverse/issues" + "repository": { + "type": "git", + "url": "http://github.com/estools/estraverse.git" }, - "dependencies": {}, - "description": "ECMAScript JS AST traversal functions", "devDependencies": { "babel-preset-es2015": "^6.3.13", "babel-register": "^6.3.13", @@ -56,43 +31,10 @@ "jshint": "^2.5.6", "mocha": "^2.1.0" }, - "directories": {}, - "dist": { - "shasum": "0dee3fed31fcd469618ce7342099fc1afa0bdb13", - "tarball": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "gitHead": "6f6a4e99653908e859c7c10d04d9518bf4844ede", - "homepage": "https://github.com/estools/estraverse", "license": "BSD-2-Clause", - "main": "estraverse.js", - "maintainers": [ - { - "name": "constellation", - "email": "utatane.tea@gmail.com" - }, - { - "name": "michaelficarra", - "email": "npm@michael.ficarra.me" - }, - { - "name": "nzakas", - "email": "nicholas@nczconsulting.com" - } - ], - "name": "estraverse", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/estools/estraverse.git" - }, "scripts": { - "lint": "jshint estraverse.js", "test": "npm run-script lint && npm run-script unit-test", + "lint": "jshint estraverse.js", "unit-test": "mocha --compilers js:babel-register" - }, - "version": "4.2.0" + } } diff --git a/node_modules/esutils/package.json b/node_modules/esutils/package.json index b496ee2..ddce20b 100644 --- a/node_modules/esutils/package.json +++ b/node_modules/esutils/package.json @@ -1,43 +1,31 @@ { - "_args": [ - [ - "esutils@^2.0.2", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "esutils@>=2.0.2 <3.0.0", - "_id": "esutils@2.0.2", - "_inCache": true, - "_installable": true, - "_location": "/esutils", - "_nodeVersion": "0.12.0", - "_npmUser": { - "email": "npm@michael.ficarra.me", - "name": "michaelficarra" + "name": "esutils", + "description": "utility box for ECMAScript language tools", + "homepage": "https://github.com/estools/esutils", + "main": "lib/utils.js", + "version": "2.0.2", + "engines": { + "node": ">=0.10.0" }, - "_npmVersion": "2.5.1", - "_phantomChildren": {}, - "_requested": { - "name": "esutils", - "raw": "esutils@^2.0.2", - "rawSpec": "^2.0.2", - "scope": null, - "spec": ">=2.0.2 <3.0.0", - "type": "range" + "directories": { + "lib": "./lib" }, - "_requiredBy": [ - "/eslint" + "files": [ + "LICENSE.BSD", + "README.md", + "lib" + ], + "maintainers": [ + { + "name": "Yusuke Suzuki", + "email": "utatane.tea@gmail.com", + "web": "http://github.com/Constellation" + } ], - "_resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "_shasum": "0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b", - "_shrinkwrap": null, - "_spec": "esutils@^2.0.2", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint", - "bugs": { - "url": "https://github.com/estools/esutils/issues" + "repository": { + "type": "git", + "url": "http://github.com/estools/esutils.git" }, - "dependencies": {}, - "description": "utility box for ECMAScript language tools", "devDependencies": { "chai": "~1.7.2", "coffee-script": "~1.6.3", @@ -46,52 +34,16 @@ "regenerate": "~1.2.1", "unicode-7.0.0": "^0.1.5" }, - "directories": { - "lib": "./lib" - }, - "dist": { - "shasum": "0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b", - "tarball": "http://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "LICENSE.BSD", - "README.md", - "lib" - ], - "gitHead": "3ffd1c403f3f29db9e8a9574b1895682e57b6a7f", - "homepage": "https://github.com/estools/esutils", "licenses": [ { "type": "BSD", "url": "http://github.com/estools/esutils/raw/master/LICENSE.BSD" } ], - "main": "lib/utils.js", - "maintainers": [ - { - "name": "constellation", - "email": "utatane.tea@gmail.com" - }, - { - "name": "michaelficarra", - "email": "npm@michael.ficarra.me" - } - ], - "name": "esutils", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/estools/esutils.git" - }, "scripts": { - "generate-regex": "node tools/generate-identifier-regex.js", - "lint": "jshint lib/*.js", "test": "npm run-script lint && npm run-script unit-test", - "unit-test": "mocha --compilers coffee:coffee-script -R spec" - }, - "version": "2.0.2" + "lint": "jshint lib/*.js", + "unit-test": "mocha --compilers coffee:coffee-script -R spec", + "generate-regex": "node tools/generate-identifier-regex.js" + } } diff --git a/node_modules/event-emitter/package.json b/node_modules/event-emitter/package.json index 1df4176..9b07440 100644 --- a/node_modules/event-emitter/package.json +++ b/node_modules/event-emitter/package.json @@ -1,91 +1,34 @@ { - "_args": [ - [ - "event-emitter@~0.3.4", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\es6-map" - ] - ], - "_from": "event-emitter@>=0.3.4 <0.4.0", - "_id": "event-emitter@0.3.4", - "_inCache": true, - "_installable": true, - "_location": "/event-emitter", - "_nodeVersion": "4.1.1", - "_npmUser": { - "email": "medikoo+npm@medikoo.com", - "name": "medikoo" - }, - "_npmVersion": "2.14.4", - "_phantomChildren": {}, - "_requested": { - "name": "event-emitter", - "raw": "event-emitter@~0.3.4", - "rawSpec": "~0.3.4", - "scope": null, - "spec": ">=0.3.4 <0.4.0", - "type": "range" - }, - "_requiredBy": [ - "/es6-map", - "/es6-set" - ], - "_resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.4.tgz", - "_shasum": "8d63ddfb4cfe1fae3b32ca265c4c720222080bb5", - "_shrinkwrap": null, - "_spec": "event-emitter@~0.3.4", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\es6-map", - "author": { - "email": "medyk@medikoo.com", - "name": "Mariusz Nowak", - "url": "http://www.medikoo.com/" - }, - "bugs": { - "url": "https://github.com/medikoo/event-emitter/issues" - }, - "dependencies": { - "d": "~0.1.1", - "es5-ext": "~0.10.7" - }, + "name": "event-emitter", + "version": "0.3.4", "description": "Environment agnostic event emitter", - "devDependencies": { - "tad": "~0.2.3", - "xlint": "~0.2.2", - "xlint-jslint-medikoo": "~0.1.4" - }, - "directories": {}, - "dist": { - "shasum": "8d63ddfb4cfe1fae3b32ca265c4c720222080bb5", - "tarball": "http://registry.npmjs.org/event-emitter/-/event-emitter-0.3.4.tgz" - }, - "gitHead": "adc27b543a53528b9af8a82f7c88db3292f0faa0", - "homepage": "https://github.com/medikoo/event-emitter#readme", + "author": "Mariusz Nowak (http://www.medikoo.com/)", "keywords": [ - "emitter", "event", "events", - "listener", + "trigger", "observer", - "pubsub", - "trigger" - ], - "license": "MIT", - "maintainers": [ - { - "name": "medikoo", - "email": "medikoo+npm@medikoo.com" - } + "listener", + "emitter", + "pubsub" ], - "name": "event-emitter", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git://github.com/medikoo/event-emitter.git" }, + "dependencies": { + "es5-ext": "~0.10.7", + "d": "~0.1.1" + }, + "devDependencies": { + "tad": "~0.2.3", + "xlint": "~0.2.2", + "xlint-jslint-medikoo": "~0.1.4" + }, "scripts": { "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", "test": "node ./node_modules/tad/bin/tad" }, - "version": "0.3.4" + "license": "MIT" } diff --git a/node_modules/exit-hook/package.json b/node_modules/exit-hook/package.json index db34e8a..c5b5723 100644 --- a/node_modules/exit-hook/package.json +++ b/node_modules/exit-hook/package.json @@ -1,93 +1,39 @@ { - "_args": [ - [ - "exit-hook@^1.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\restore-cursor" - ] - ], - "_from": "exit-hook@>=1.0.0 <2.0.0", - "_id": "exit-hook@1.1.1", - "_inCache": true, - "_installable": true, - "_location": "/exit-hook", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "1.4.9", - "_phantomChildren": {}, - "_requested": { - "name": "exit-hook", - "raw": "exit-hook@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/restore-cursor" - ], - "_resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", - "_shasum": "f05ca233b48c05d54fff07765df8507e95c02ff8", - "_shrinkwrap": null, - "_spec": "exit-hook@^1.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\restore-cursor", + "name": "exit-hook", + "version": "1.1.1", + "description": "Run some code when the process exits", + "license": "MIT", + "repository": "sindresorhus/exit-hook", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/exit-hook/issues" - }, - "dependencies": {}, - "description": "Run some code when the process exits", - "devDependencies": { - "ava": "0.0.4" - }, - "directories": {}, - "dist": { - "shasum": "f05ca233b48c05d54fff07765df8507e95c02ff8", - "tarball": "http://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "node test.js" + }, "files": [ "index.js" ], - "homepage": "https://github.com/sindresorhus/exit-hook", "keywords": [ - "event", "exit", + "quit", + "process", + "hook", "graceful", "handler", - "hook", - "kill", - "process", - "quit", "shutdown", - "sigint", "sigterm", + "sigint", + "terminate", + "kill", "stop", - "terminate" + "event" ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "exit-hook", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/exit-hook.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.1.1" + "devDependencies": { + "ava": "0.0.4" + } } diff --git a/node_modules/fast-levenshtein/README.md b/node_modules/fast-levenshtein/README.md index 2a917a7..a778995 100644 --- a/node_modules/fast-levenshtein/README.md +++ b/node_modules/fast-levenshtein/README.md @@ -1,15 +1,17 @@ # fast-levenshtein - Levenshtein algorithm in Javascript [![Build Status](https://secure.travis-ci.org/hiddentao/fast-levenshtein.png)](http://travis-ci.org/hiddentao/fast-levenshtein) +[![NPM module](https://badge.fury.io/js/fast-levenshtein.png)](https://badge.fury.io/js/fast-levenshtein) +[![NPM downloads](https://img.shields.io/npm/dm/fast-levenshtein.svg?maxAge=2592000)](https://www.npmjs.com/package/fast-levenshtein) +[![Follow on Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/hiddentao) -An efficient Javascript implementation of the [Levenshtein algorithm](http://en.wikipedia.org/wiki/Levenshtein_distance) with asynchronous callback support. +An efficient Javascript implementation of the [Levenshtein algorithm](http://en.wikipedia.org/wiki/Levenshtein_distance) with locale-specific collator support. ## Features * Works in node.js and in the browser. * Better performance than other implementations by not needing to store the whole matrix ([more info](http://www.codeproject.com/Articles/13525/Fast-memory-efficient-Levenshtein-algorithm)). -* Provides synchronous and asynchronous versions of the algorithm. -* Asynchronous version is almost as fast as the synchronous version for small strings and can also provide progress updates. +* Locale-sensitive string comparisions if needed. * Comprehensive test suite and performance benchmark. * Small: <1 KB minified and gzipped @@ -35,7 +37,7 @@ If you are not using any module loader system then the API will then be accessib ## Examples -**Synchronous** +**Default usage** ```javascript var levenshtein = require('fast-levenshtein'); @@ -44,32 +46,15 @@ var distance = levenshtein.get('back', 'book'); // 2 var distance = levenshtein.get('我愛你', '我叫你'); // 1 ``` -**Asynchronous** +**Locale-sensitive string comparisons** -```javascript -var levenshtein = require('fast-levenshtein'); - -levenshtein.getAsync('back', 'book', function (err, distance) { - // err is null unless an error was thrown - // distance equals 2 -}); -``` - -**Asynchronous with progress updates** +It supports using [Intl.Collator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator) for locale-sensitive string comparisons: ```javascript var levenshtein = require('fast-levenshtein'); -var hugeText1 = fs.readFileSync(...); -var hugeText2 = fs.readFileSync(...); - -levenshtein.getAsync(hugeText1, hugeText2, function (err, distance) { - // process the results as normal -}, { - progress: function(percentComplete) { - console.log(percentComplete + ' % completed so far...'); - } -); +levenshtein.get('mikailovitch', 'Mikhaïlovitch', { useCollator: true}); +// 1 ``` ## Building and Testing @@ -103,7 +88,6 @@ Fastest test is fast-levenshtein at 4.2x faster than levenshtein-component You can run this benchmark yourself by doing: ```bash -$ npm install -g grunt-cli $ npm install $ npm run build $ npm run benchmark diff --git a/node_modules/fast-levenshtein/levenshtein.js b/node_modules/fast-levenshtein/levenshtein.js index 850626d..404a315 100644 --- a/node_modules/fast-levenshtein/levenshtein.js +++ b/node_modules/fast-levenshtein/levenshtein.js @@ -1,39 +1,16 @@ (function() { 'use strict'; - - /** - * Extend an Object with another Object's properties. - * - * The source objects are specified as additional arguments. - * - * @param dst Object the object to extend. - * - * @return Object the final object. - */ - var _extend = function(dst) { - var sources = Array.prototype.slice.call(arguments, 1); - for (var i=0; i tmp) { @@ -89,102 +76,6 @@ } return nextCol; - }, - - /** - * Asynchronously calculate levenshtein distance of the two strings. - * - * @param str1 String the first string. - * @param str2 String the second string. - * @param cb Function callback function with signature: function(Error err, int distance) - * @param [options] Object additional options. - * @param [options.progress] Function progress callback with signature: function(percentComplete) - */ - getAsync: function(str1, str2, cb, options) { - options = _extend({}, { - progress: null - }, options); - - // base cases - if (str1 === str2) return cb(null, 0); - if (str1.length === 0) return cb(null, str2.length); - if (str2.length === 0) return cb(null, str1.length); - - // two rows - var prevRow = new Array(str2.length + 1), - curCol, nextCol, - i, j, tmp, - startTime, currentTime; - - // initialise previous row - for (i=0; i tmp) { - nextCol = tmp; - } - // deletion - tmp = prevRow[j + 1] + 1; - if (nextCol > tmp) { - nextCol = tmp; - } - - // copy current into previous (in preparation for next iteration) - prevRow[j] = curCol; - - // get current time - currentTime = new Date().valueOf(); - } - - // send a progress update? - if (null !== options.progress) { - try { - options.progress.call(null, (i * 100.0/ str1.length)); - } catch (err) { - return cb('Progress callback: ' + err.toString()); - } - } - - // next iteration - _defer(__calculate); - }; - - __calculate(); } }; @@ -196,7 +87,7 @@ }); } // commonjs - else if (typeof module !== "undefined" && module !== null) { + else if (typeof module !== "undefined" && module !== null && typeof exports !== "undefined" && module.exports === exports) { module.exports = Levenshtein; } // web worker diff --git a/node_modules/fast-levenshtein/package.json b/node_modules/fast-levenshtein/package.json index dcc0989..e8b99c0 100644 --- a/node_modules/fast-levenshtein/package.json +++ b/node_modules/fast-levenshtein/package.json @@ -1,52 +1,22 @@ { - "_args": [ - [ - "fast-levenshtein@^1.1.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\optionator" - ] - ], - "_from": "fast-levenshtein@>=1.1.0 <2.0.0", - "_id": "fast-levenshtein@1.1.3", - "_inCache": true, - "_installable": true, - "_location": "/fast-levenshtein", - "_nodeVersion": "0.12.9", - "_npmUser": { - "email": "ram@hiddentao.com", - "name": "hiddentao" - }, - "_npmVersion": "2.14.9", - "_phantomChildren": {}, - "_requested": { - "name": "fast-levenshtein", - "raw": "fast-levenshtein@^1.1.0", - "rawSpec": "^1.1.0", - "scope": null, - "spec": ">=1.1.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/optionator" + "name": "fast-levenshtein", + "version": "2.0.5", + "description": "Efficient implementation of Levenshtein algorithm with locale-specific collator support.", + "main": "levenshtein.js", + "files": [ + "levenshtein.js" ], - "_resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.3.tgz", - "_shasum": "2ae7b32abc1e612da48a4e13849b888a2f61e7e9", - "_shrinkwrap": null, - "_spec": "fast-levenshtein@^1.1.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\optionator", - "author": { - "email": "ram@hiddentao.com", - "name": "Ramesh Nair", - "url": "http://www.hiddentao.com/" - }, - "bugs": { - "url": "https://github.com/hiddentao/fast-levenshtein/issues" + "scripts": { + "build": "grunt build", + "prepublish": "npm run build", + "benchmark": "grunt benchmark", + "test": "mocha" }, - "dependencies": {}, - "description": "Efficient implementation of Levenshtein algorithm with asynchronous callback support", "devDependencies": { "chai": "~1.5.0", "grunt": "~0.4.1", "grunt-benchmark": "~0.2.0", + "grunt-cli": "^1.2.0", "grunt-contrib-jshint": "~0.4.3", "grunt-contrib-uglify": "~0.2.0", "grunt-mocha-test": "~0.2.2", @@ -55,40 +25,15 @@ "lodash": "^4.0.1", "mocha": "~1.9.0" }, - "directories": {}, - "dist": { - "shasum": "2ae7b32abc1e612da48a4e13849b888a2f61e7e9", - "tarball": "http://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.3.tgz" + "repository": { + "type": "git", + "url": "https://github.com/hiddentao/fast-levenshtein.git" }, - "files": [ - "levenshtein.js" - ], - "gitHead": "bce911eb885fb52e37b1be793c22cfaf88d580d2", - "homepage": "https://github.com/hiddentao/fast-levenshtein#readme", "keywords": [ - "distance", "levenshtein", + "distance", "string" ], - "license": "MIT", - "main": "levenshtein.js", - "maintainers": [ - { - "name": "hiddentao", - "email": "ram@hiddentao.com" - } - ], - "name": "fast-levenshtein", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/hiddentao/fast-levenshtein.git" - }, - "scripts": { - "benchmark": "grunt benchmark", - "build": "grunt build", - "test": "mocha" - }, - "version": "1.1.3" + "author": "Ramesh Nair (http://www.hiddentao.com/)", + "license": "MIT" } diff --git a/node_modules/figures/index.js b/node_modules/figures/index.js index edfeff2..090af2a 100644 --- a/node_modules/figures/index.js +++ b/node_modules/figures/index.js @@ -1,4 +1,6 @@ 'use strict'; +var objectAssign = require('object-assign'); +var escapeStringRegexp = require('escape-string-regexp'); var platform = process.platform; var main = { @@ -39,7 +41,25 @@ var main = { checkboxOff: '☐', checkboxCircleOn: 'ⓧ', checkboxCircleOff: 'Ⓘ', - questionMarkPrefix: '?⃝' + questionMarkPrefix: '?⃝', + oneHalf: '½', + oneThird: '⅓', + oneQuarter: '¼', + oneFifth: '⅕', + oneSixth: '⅙', + oneSeventh: '⅐', + oneEighth: '⅛', + oneNinth: '⅑', + oneTenth: '⅒', + twoThirds: '⅔', + twoFifths: '⅖', + threeQuarters: '¾', + threeFifths: '⅗', + threeEighths: '⅜', + fourFifths: '⅘', + fiveSixths: '⅚', + fiveEighths: '⅝', + sevenEighths: '⅞' }; var win = { @@ -80,7 +100,25 @@ var win = { checkboxOff: '[ ]', checkboxCircleOn: '(×)', checkboxCircleOff: '( )', - questionMarkPrefix: '?' + questionMarkPrefix: '?', + oneHalf: '1/2', + oneThird: '1/3', + oneQuarter: '1/4', + oneFifth: '1/5', + oneSixth: '1/6', + oneSeventh: '1/7', + oneEighth: '1/8', + oneNinth: '1/9', + oneTenth: '1/10', + twoThirds: '2/3', + twoFifths: '2/5', + threeQuarters: '3/4', + threeFifths: '3/5', + threeEighths: '3/8', + fourFifths: '4/5', + fiveSixths: '5/6', + fiveEighths: '5/8', + sevenEighths: '7/8' }; if (platform === 'linux') { @@ -88,4 +126,22 @@ if (platform === 'linux') { main.questionMarkPrefix = '?'; } -module.exports = platform === 'win32' ? win : main; +var figures = platform === 'win32' ? win : main; + +var fn = function (str) { + if (figures === main) { + return str; + } + + Object.keys(main).forEach(function (key) { + if (main[key] === figures[key]) { + return; + } + + str = str.replace(new RegExp(escapeStringRegexp(main[key]), 'g'), figures[key]); + }); + + return str; +}; + +module.exports = objectAssign(fn, figures); diff --git a/node_modules/figures/package.json b/node_modules/figures/package.json index 15d3401..c950e07 100644 --- a/node_modules/figures/package.json +++ b/node_modules/figures/package.json @@ -1,98 +1,45 @@ { - "_args": [ - [ - "figures@^1.3.5", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\inquirer" - ] - ], - "_from": "figures@>=1.3.5 <2.0.0", - "_id": "figures@1.5.0", - "_inCache": true, - "_installable": true, - "_location": "/figures", - "_nodeVersion": "5.6.0", - "_npmOperationalInternal": { - "host": "packages-13-west.internal.npmjs.com", - "tmp": "tmp/figures-1.5.0.tgz_1458741326698_0.9015887144487351" - }, - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "3.6.0", - "_phantomChildren": {}, - "_requested": { - "name": "figures", - "raw": "figures@^1.3.5", - "rawSpec": "^1.3.5", - "scope": null, - "spec": ">=1.3.5 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/inquirer" - ], - "_resolved": "https://registry.npmjs.org/figures/-/figures-1.5.0.tgz", - "_shasum": "56d8a0949c19643af764d573a648d384218da737", - "_shrinkwrap": null, - "_spec": "figures@^1.3.5", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\inquirer", + "name": "figures", + "version": "1.7.0", + "description": "Unicode symbols with Windows CMD fallbacks", + "license": "MIT", + "repository": "sindresorhus/figures", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/figures/issues" - }, - "dependencies": {}, - "description": "Unicode symbols with Windows CMD fallbacks", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "56d8a0949c19643af764d573a648d384218da737", - "tarball": "https://registry.npmjs.org/figures/-/figures-1.5.0.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "xo && ava", + "make": "./makefile.js" + }, "files": [ "index.js" ], - "gitHead": "0f0ec0620de08ed4e1b1ab7073cb2e1104c246e8", - "homepage": "https://github.com/sindresorhus/figures#readme", "keywords": [ - "char", - "characters", + "unicode", "cli", "cmd", "command-line", - "fallback", - "figure", - "figures", + "characters", + "char", "symbol", "symbols", - "unicode" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } + "figure", + "figures", + "fallback" ], - "name": "figures", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/figures.git" + "dependencies": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.5.0" + "devDependencies": { + "ava": "*", + "markdown-table": "^0.4.0", + "require-uncached": "^1.0.2", + "xo": "*" + } } diff --git a/node_modules/figures/readme.md b/node_modules/figures/readme.md index 88e2531..10ae286 100644 --- a/node_modules/figures/readme.md +++ b/node_modules/figures/readme.md @@ -1,4 +1,4 @@ -# figures [![Build Status](https://travis-ci.org/sindresorhus/figures.svg?branch=master)](https://travis-ci.org/sindresorhus/figures) +# figures [![Build Status: Linux](https://travis-ci.org/sindresorhus/figures.svg?branch=master)](https://travis-ci.org/sindresorhus/figures) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/mb743hl70269be3r/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/figures/branch/master) > Unicode symbols with Windows CMD fallbacks @@ -23,12 +23,93 @@ See the [source](index.js) for supported symbols. ```js const figures = require('figures'); +console.log(figures('✔︎ check')); +// On real OSes: ✔︎ check +// On Windows: √ check + console.log(figures.tick); // On real OSes: ✔︎ // On Windows: √ ``` +## API + +### figures(input) + +Returns the input with replaced fallback unicode symbols on Windows. + +All the below [figures](#figures) are attached to the main export as shown in the example above. + +#### input + +Type: `string` + +String where the unicode symbols will be replaced with fallback symbols depending on the OS. + + +## Figures + +| Name | Real OSes | Windows | +| ------------------ | :-------: | :-----: | +| tick | ✔ | √ | +| cross | ✖ | × | +| star | ★ | * | +| square | ▇ | █ | +| squareSmall | ◻ | [ ] | +| squareSmallFilled | ◼ | [█] | +| play | ▶ | ► | +| circle | ◯ | ( ) | +| circleFilled | ◉ | (*) | +| circleDotted | ◌ | ( ) | +| circleDouble | ◎ | ( ) | +| circleCircle | ⓞ | (○) | +| circleCross | ⓧ | (×) | +| circlePipe | Ⓘ | (│) | +| circleQuestionMark | ?⃝ | (?) | +| bullet | ● | * | +| dot | ․ | . | +| line | ─ | ─ | +| ellipsis | … | ... | +| pointer | ❯ | > | +| pointerSmall | › | » | +| info | ℹ | i | +| warning | ⚠ | ‼ | +| hamburger | ☰ | ≡ | +| smiley | ㋡ | ☺ | +| mustache | ෴ | ┌─┐ | +| heart | ♥ | ♥ | +| arrowUp | ↑ | ↑ | +| arrowDown | ↓ | ↓ | +| arrowLeft | ← | ← | +| arrowRight | → | → | +| radioOn | ◉ | (*) | +| radioOff | ◯ | ( ) | +| checkboxOn | ☒ | [×] | +| checkboxOff | ☐ | [ ] | +| checkboxCircleOn | ⓧ | (×) | +| checkboxCircleOff | Ⓘ | ( ) | +| questionMarkPrefix | ?⃝ | ? | +| oneHalf | ½ | 1/2 | +| oneThird | ⅓ | 1/3 | +| oneQuarter | ¼ | 1/4 | +| oneFifth | ⅕ | 1/5 | +| oneSixth | ⅙ | 1/6 | +| oneSeventh | ⅐ | 1/7 | +| oneEighth | ⅛ | 1/8 | +| oneNinth | ⅑ | 1/9 | +| oneTenth | ⅒ | 1/10 | +| twoThirds | ⅔ | 2/3 | +| twoFifths | ⅖ | 2/5 | +| threeQuarters | ¾ | 3/4 | +| threeFifths | ⅗ | 3/5 | +| threeEighths | ⅜ | 3/8 | +| fourFifths | ⅘ | 4/5 | +| fiveSixths | ⅚ | 5/6 | +| fiveEighths | ⅝ | 5/8 | +| sevenEighths | ⅞ | 7/8 | + + ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/file-entry-cache/README.md b/node_modules/file-entry-cache/README.md index 0ea7e7a..19d25f0 100644 --- a/node_modules/file-entry-cache/README.md +++ b/node_modules/file-entry-cache/README.md @@ -1,5 +1,5 @@ # file-entry-cache -> Super simple cache for file metadata, useful for process that work o a given series of files +> Super simple cache for file metadata, useful for process that work o a given series of files > and that only need to repeat the job on the changed ones since the previous run of the process — Edit [![NPM Version](http://img.shields.io/npm/v/file-entry-cache.svg?style=flat)](https://npmjs.org/package/file-entry-cache) @@ -14,7 +14,7 @@ npm i --save file-entry-cache ## Usage ```js -// loads the cache, if one does not exists for the given +// loads the cache, if one does not exists for the given // Id a new one will be prepared to be created var fileEntryCache = require('file-entry-cache'); @@ -25,18 +25,23 @@ var files = expand('../fixtures/*.txt'); // the first time this method is called, will return all the files var oFiles = cache.getUpdatedFiles(files); -// this will persist this to disk checking each file stats and +// this will persist this to disk checking each file stats and // updating the meta attributes `size` and `mtime`. // custom fields could also be added to the meta object and will be persisted // in order to retrieve them later -cache.reconcile(); +cache.reconcile(); + +// use this if you want the non visited file entries to be kept in the cache +// for more than one execution +// +// cache.reconcile( true /* noPrune */) // on a second run var cache2 = fileEntryCache.create('testCache'); // will return now only the files that were modified or none // if no files were modified previous to the execution of this function -var oFiles = cache.getUpdatedFiles(files); +var oFiles = cache.getUpdatedFiles(files); // if you want to prevent a file from being considered non modified // something useful if a file failed some sort of validation @@ -64,21 +69,21 @@ entry = { ## Motivation for this module -I needed a super simple and dumb **in-memory cache** with optional disk persistence (write-back cache) in order to make +I needed a super simple and dumb **in-memory cache** with optional disk persistence (write-back cache) in order to make a script that will beautify files with `esformatter` to execute only on the files that were changed since the last run. In doing so the process of beautifying files was reduced from several seconds to a small fraction of a second. -This module uses [flat-cache](https://www.npmjs.com/package/flat-cache) a super simple `key/value` cache storage with +This module uses [flat-cache](https://www.npmjs.com/package/flat-cache) a super simple `key/value` cache storage with optional file persistance. -The main idea is to read the files when the task begins, apply the transforms required, and if the process succeed, -then store the new state of the files. The next time this module request for `getChangedFiles` will return only +The main idea is to read the files when the task begins, apply the transforms required, and if the process succeed, +then store the new state of the files. The next time this module request for `getChangedFiles` will return only the files that were modified. Making the process to end faster. This module could also be used by processes that modify the files applying a transform, in that case the result of the -transform could be stored in the `meta` field, of the entries. Anything added to the meta field will be persisted. -Those processes won't need to call `getChangedFiles` they will instead call `normalizeEntries` that will return the +transform could be stored in the `meta` field, of the entries. Anything added to the meta field will be persisted. +Those processes won't need to call `getChangedFiles` they will instead call `normalizeEntries` that will return the entries with a `changed` field that can be used to determine if the file was changed or not. If it was not changed the transformed stored data could be used instead of actually applying the transformation, saving time in case of only a few files changed. @@ -86,10 +91,16 @@ a few files changed. In the worst case scenario all the files will be processed. In the best case scenario only a few of them will be processed. ## Important notes -- The values set on the meta attribute of the entries should be `stringify-able` ones, meaning no circular references -- All the changes to the cache state are done to memory first and only persisted after reconcile +- The values set on the meta attribute of the entries should be `stringify-able` ones if possible, flat-cache uses `circular-json` to try to persist circular structures, but this should be considered experimental. The best results are always obtained with non circular values +- All the changes to the cache state are done to memory first and only persisted after reconcile. +- By default non visited entries are removed from the cache. This is done to prevent the file from growing too much. If this is not an issue and + you prefer to do a manual pruning of the cache files, you can pass `true` to the `reconcile` call. Like this: + + ```javascript + cache.reconcile( true /* noPrune */ ); + ``` -## License +## License MIT diff --git a/node_modules/file-entry-cache/cache.js b/node_modules/file-entry-cache/cache.js index e4590a1..5823b33 100644 --- a/node_modules/file-entry-cache/cache.js +++ b/node_modules/file-entry-cache/cache.js @@ -16,7 +16,7 @@ module.exports = { return { /** - * the flat cache storage used to persist the metadata of the files + * the flat cache storage used to persist the metadata of the `files * @type {Object} */ cache: cache, @@ -161,16 +161,18 @@ module.exports = { }, /** * Sync the files and persist them to the cache - * + * @param [noPrune=false] {Boolean} whether to remove non visited/saved entries * @method reconcile */ - reconcile: function () { + reconcile: function ( noPrune ) { var entries = normalizedEntries; var keys = Object.keys( entries ); + if ( keys.length === 0 ) { return; } + keys.forEach( function ( entryName ) { var cacheEntry = entries[ entryName ]; var stat = fs.statSync( cacheEntry.key ); @@ -183,7 +185,7 @@ module.exports = { cache.setKey( entryName, meta ); } ); - cache.save(); + cache.save( noPrune ); } }; } diff --git a/node_modules/file-entry-cache/changelog.md b/node_modules/file-entry-cache/changelog.md index 8cc8761..57eec48 100644 --- a/node_modules/file-entry-cache/changelog.md +++ b/node_modules/file-entry-cache/changelog.md @@ -1,5 +1,15 @@ # file-entry-cache - Changelog +## v1.3.1 +- **Build Scripts Changes** + - remove older node version - [0a26ac4]( https://github.com/royriojas/file-entry-cache/commit/0a26ac4 ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 06:09:17 + + +## v1.3.0 +- **Features** + - Add an option to not prune non visited keys. Closes [#2](https://github.com/royriojas/file-entry-cache/issues/2) - [b1a64db]( https://github.com/royriojas/file-entry-cache/commit/b1a64db ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 05:52:12 + + ## v1.2.4 - **Enhancements** - Expose the flat-cache instance - [f34c557]( https://github.com/royriojas/file-entry-cache/commit/f34c557 ), [royriojas](https://github.com/royriojas), 23/09/2015 20:26:33 diff --git a/node_modules/file-entry-cache/package.json b/node_modules/file-entry-cache/package.json index 24d25e6..23b4920 100644 --- a/node_modules/file-entry-cache/package.json +++ b/node_modules/file-entry-cache/package.json @@ -1,62 +1,64 @@ { - "_args": [ - [ - "file-entry-cache@^1.1.1", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "file-entry-cache@>=1.1.1 <2.0.0", - "_id": "file-entry-cache@1.2.4", - "_inCache": true, - "_installable": true, - "_location": "/file-entry-cache", - "_nodeVersion": "0.12.0", - "_npmUser": { - "email": "royriojas@gmail.com", - "name": "royriojas" - }, - "_npmVersion": "2.14.5", - "_phantomChildren": {}, - "_requested": { - "name": "file-entry-cache", - "raw": "file-entry-cache@^1.1.1", - "rawSpec": "^1.1.1", - "scope": null, - "spec": ">=1.1.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.2.4.tgz", - "_shasum": "9a586072c69365a7ef7ec72a7c2b9046de091e9c", - "_shrinkwrap": null, - "_spec": "file-entry-cache@^1.1.1", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint", + "name": "file-entry-cache", + "version": "1.3.1", + "description": "Super simple cache for file metadata, useful for process that work o a given series of files and that only need to repeat the job on the changed ones since the previous run of the process", + "repository": "royriojas/file-entry-cache", + "license": "MIT", "author": { "name": "Roy Riojas", "url": "http://royriojas.com" }, - "bugs": { - "url": "https://github.com/royriojas/file-entry-cache/issues" + "main": "cache.js", + "files": [ + "cache.js" + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "beautify": "esbeautifier 'cache.js' 'test/**/*.js'", + "beautify-check": "npm run beautify -- -k", + "eslint": "eslinter 'cache.js' 'specs/**/*.js'", + "lint": "npm run beautify && npm run eslint", + "verify": "npm run beautify-check && npm run eslint", + "install-hooks": "prepush install && changelogx install-hook && precommit install", + "changelog": "changelogx -f markdown -o ./changelog.md", + "do-changelog": "npm run changelog && git add ./changelog.md && git commit -m 'DOC: Generate changelog' --no-verify", + "pre-v": "npm run test", + "post-v": "npm run do-changelog && git push --no-verify && git push --tags --no-verify", + "bump-major": "npm run pre-v && npm version major -m 'BLD: Release v%s' && npm run post-v", + "bump-minor": "npm run pre-v && npm version minor -m 'BLD: Release v%s' && npm run post-v", + "bump-patch": "npm run pre-v && npm version patch -m 'BLD: Release v%s' && npm run post-v", + "test": "npm run verify && mocha -R spec test/specs", + "cover": "istanbul cover test/runner.js html text-summary", + "watch": "watch-run -i -p 'test/specs/**/*.js' istanbul cover test/runner.js html text-summary" }, + "prepush": [ + "npm run verify" + ], + "precommit": [ + "npm run verify" + ], + "keywords": [ + "file cache", + "task cache files", + "file cache", + "key par", + "key value", + "cache" + ], "changelogx": { - "authorURL": "https://github.com/{0}", - "commitURL": "https://github.com/royriojas/file-entry-cache/commit/{0}", "ignoreRegExp": [ "BLD: Release", "DOC: Generate Changelog", "Generated Changelog" ], "issueIDRegExp": "#(\\d+)", + "commitURL": "https://github.com/royriojas/file-entry-cache/commit/{0}", + "authorURL": "https://github.com/{0}", "issueIDURL": "https://github.com/royriojas/file-entry-cache/issues/{0}", "projectName": "file-entry-cache" }, - "dependencies": { - "flat-cache": "^1.0.9", - "object-assign": "^4.0.1" - }, - "description": "Super simple cache for file metadata, useful for process that work o a given series of files and that only need to repeat the job on the changed ones since the previous run of the process", "devDependencies": { "chai": "^3.2.0", "changelogx": "^1.0.18", @@ -70,71 +72,13 @@ "precommit": "^1.1.5", "prepush": "^3.1.4", "proxyquire": "^1.3.1", - "read-file": "^0.2.0", "sinon": "^1.12.2", "sinon-chai": "^2.7.0", "watch-run": "^1.2.1", - "write": "^0.2.1" + "write": "^0.3.1" }, - "directories": {}, - "dist": { - "shasum": "9a586072c69365a7ef7ec72a7c2b9046de091e9c", - "tarball": "http://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.2.4.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "cache.js" - ], - "gitHead": "3ca70d84f97822df7f769409f49ecf22c8908412", - "homepage": "https://github.com/royriojas/file-entry-cache#readme", - "keywords": [ - "cache", - "file cache", - "file cache", - "key par", - "key value", - "task cache files" - ], - "license": "MIT", - "main": "cache.js", - "maintainers": [ - { - "name": "royriojas", - "email": "royriojas@gmail.com" - } - ], - "name": "file-entry-cache", - "optionalDependencies": {}, - "precommit": [ - "npm run verify" - ], - "prepush": [ - "npm run verify" - ], - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/royriojas/file-entry-cache.git" - }, - "scripts": { - "beautify": "esbeautifier 'cache.js' 'specs/**/*.js'", - "beautify-check": "esbeautifier -k 'cache.js' 'specs/**/*.js'", - "bump-major": "npm run pre-v && npm version major -m 'BLD: Release v%s' && npm run post-v", - "bump-minor": "npm run pre-v && npm version minor -m 'BLD: Release v%s' && npm run post-v", - "bump-patch": "npm run pre-v && npm version patch -m 'BLD: Release v%s' && npm run post-v", - "changelog": "changelogx -f markdown -o ./changelog.md", - "cover": "istanbul cover test/runner.js html text-summary", - "do-changelog": "npm run changelog && git add ./changelog.md && git commit -m 'DOC: Generate changelog' --no-verify", - "eslint": "eslinter 'cache.js' 'specs/**/*.js'", - "install-hooks": "prepush install && changelogx install-hook && precommit install", - "lint": "npm run beautify && npm run eslint", - "post-v": "npm run do-changelog && git push --no-verify && git push --tags --no-verify", - "pre-v": "npm run verify", - "test": "mocha -R spec test/specs", - "verify": "npm run beautify-check && npm run eslint", - "watch": "watch-run -i -p 'test/specs/**/*.js' istanbul cover test/runner.js html text-summary" - }, - "version": "1.2.4" + "dependencies": { + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" + } } diff --git a/node_modules/flat-cache/README.md b/node_modules/flat-cache/README.md index 33a315f..77770aa 100644 --- a/node_modules/flat-cache/README.md +++ b/node_modules/flat-cache/README.md @@ -29,6 +29,7 @@ cache.removeKey('key'); // removes a key from the cache // save it to disk cache.save(); // very important, if you don't save no changes will be persisted. +// cache.save( true /* noPrune */) // can be used to prevent the removal of non visited keys // loads the cache from a given directory, if one does // not exists for the given Id a new one will be prepared to be created @@ -57,6 +58,8 @@ storage was needed and Bam! this module was born. - All the changes to the cache state are done to memory - I could have used a timer or `Object.observe` to deliver the changes to disk, but I wanted to keep this module intentionally dumb and simple +- Non visited keys are removed when `cache.save()` is called. If this is not desired, you can pass `true` to the save call + like: `cache.save( true /* noPrune */ )`. ## License diff --git a/node_modules/flat-cache/cache.js b/node_modules/flat-cache/cache.js index 90b8e77..e7d205e 100644 --- a/node_modules/flat-cache/cache.js +++ b/node_modules/flat-cache/cache.js @@ -1,8 +1,8 @@ var path = require( 'path' ); var fs = require( 'graceful-fs' ); -var readJSON = require( 'read-json-sync' ); -var write = require( 'write' ); var del = require( 'del' ).sync; +var readJSON = require( './utils' ).readJSON; +var writeJSON = require( './utils' ).writeJSON; var cache = { /** @@ -100,13 +100,14 @@ var cache = { /** * Save the state of the cache identified by the docId to disk * as a JSON structure + * @param [noPrune=false] {Boolean} whether to remove from cache the non visited files * @method save */ - save: function () { + save: function ( noPrune ) { var me = this; - me._prune(); - write.sync( me._pathToFile, JSON.stringify( me._persisted ) ); + (!noPrune) && me._prune(); + writeJSON( me._pathToFile, me._persisted ); }, /** diff --git a/node_modules/flat-cache/changelog.md b/node_modules/flat-cache/changelog.md index 6ba9ef7..4312b4c 100644 --- a/node_modules/flat-cache/changelog.md +++ b/node_modules/flat-cache/changelog.md @@ -1,5 +1,46 @@ # flat-cache - Changelog +## v1.2.1 +- **Bug Fixes** + - Add missing utils.js file to the package. closes [#8](https://github.com/royriojas/flat-cache/issues/8) - [ec10cf2]( https://github.com/royriojas/flat-cache/commit/ec10cf2 ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 04:18:57 + + +## v1.2.0 +- **Documentation** + - Add documentation about noPrune option - [23e11f9]( https://github.com/royriojas/flat-cache/commit/23e11f9 ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 04:06:49 + + +## v1.0.11 +- **Features** + - Add noPrune option to cache.save() method. closes [#7](https://github.com/royriojas/flat-cache/issues/7) - [2c8016a]( https://github.com/royriojas/flat-cache/commit/2c8016a ), [Roy Riojas](https://github.com/Roy Riojas), 01/08/2016 04:00:29 + + + - Add json read and write utility based on circular-json - [c31081e]( https://github.com/royriojas/flat-cache/commit/c31081e ), [Jean Ponchon](https://github.com/Jean Ponchon), 28/07/2016 10:58:17 + + +- **Bug Fixes** + - Remove UTF16 BOM stripping - [4a41e22]( https://github.com/royriojas/flat-cache/commit/4a41e22 ), [Jean Ponchon](https://github.com/Jean Ponchon), 29/07/2016 04:18:06 + + Since we control both writing and reading of JSON stream, there no needs + to handle unicode BOM. + - Use circular-json to handle circular references (fix [#5](https://github.com/royriojas/flat-cache/issues/5)) - [cd7aeed]( https://github.com/royriojas/flat-cache/commit/cd7aeed ), [Jean Ponchon](https://github.com/Jean Ponchon), 25/07/2016 13:11:59 + + +- **Tests Related fixes** + - Add missing file from eslint test - [d6fa3c3]( https://github.com/royriojas/flat-cache/commit/d6fa3c3 ), [Jean Ponchon](https://github.com/Jean Ponchon), 29/07/2016 04:15:51 + + + - Add test for circular json serialization / deserialization - [07d2ddd]( https://github.com/royriojas/flat-cache/commit/07d2ddd ), [Jean Ponchon](https://github.com/Jean Ponchon), 28/07/2016 10:59:36 + + +- **Refactoring** + - Remove unused read-json-sync - [2be1c24]( https://github.com/royriojas/flat-cache/commit/2be1c24 ), [Jean Ponchon](https://github.com/Jean Ponchon), 28/07/2016 10:59:18 + + +- **Build Scripts Changes** + - travis tests on 0.12 and 4x - [3a613fd]( https://github.com/royriojas/flat-cache/commit/3a613fd ), [royriojas](https://github.com/royriojas), 15/11/2015 17:34:40 + + ## v1.0.10 - **Build Scripts Changes** - add eslint-fix task - [fd29e52]( https://github.com/royriojas/flat-cache/commit/fd29e52 ), [royriojas](https://github.com/royriojas), 01/11/2015 18:04:08 diff --git a/node_modules/flat-cache/package.json b/node_modules/flat-cache/package.json index 4b01953..0250512 100644 --- a/node_modules/flat-cache/package.json +++ b/node_modules/flat-cache/package.json @@ -1,64 +1,68 @@ { - "_args": [ - [ - "flat-cache@^1.0.9", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\file-entry-cache" - ] - ], - "_from": "flat-cache@>=1.0.9 <2.0.0", - "_id": "flat-cache@1.0.10", - "_inCache": true, - "_installable": true, - "_location": "/flat-cache", - "_nodeVersion": "0.12.0", - "_npmUser": { - "email": "royriojas@gmail.com", - "name": "royriojas" - }, - "_npmVersion": "2.14.5", - "_phantomChildren": {}, - "_requested": { - "name": "flat-cache", - "raw": "flat-cache@^1.0.9", - "rawSpec": "^1.0.9", - "scope": null, - "spec": ">=1.0.9 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/file-entry-cache" - ], - "_resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.0.10.tgz", - "_shasum": "73d6df4a28502160a05e059544a6aeeae8b0047a", - "_shrinkwrap": null, - "_spec": "flat-cache@^1.0.9", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\file-entry-cache", + "name": "flat-cache", + "version": "1.2.1", + "description": "A stupidly simple key/value storage using files to persist some data", + "repository": "royriojas/flat-cache", + "license": "MIT", "author": { "name": "Roy Riojas", "url": "http://royriojas.com" }, - "bugs": { - "url": "https://github.com/royriojas/flat-cache/issues" + "main": "cache.js", + "files": [ + "cache.js", + "utils.js" + ], + "engines": { + "node": ">=0.10.0" + }, + "precommit": [ + "npm run verify --silent" + ], + "prepush": [ + "npm run verify --silent" + ], + "scripts": { + "beautify": "esbeautifier 'cache.js' 'test/specs/**/*.js'", + "beautify-check": "npm run beautify -- -k", + "eslint": "eslinter 'cache.js' 'utils.js' 'specs/**/*.js'", + "eslint-fix": "npm run eslint -- --fix", + "autofix": "npm run beautify && npm run eslint-fix", + "check": "npm run beautify-check && npm run eslint", + "verify": "npm run check && npm run test:cache", + "install-hooks": "prepush install && changelogx install-hook && precommit install", + "changelog": "changelogx -f markdown -o ./changelog.md", + "do-changelog": "npm run changelog && git add ./changelog.md && git commit -m 'DOC: Generate changelog' --no-verify", + "pre-v": "npm run verify", + "post-v": "npm run do-changelog && git push --no-verify && git push --tags --no-verify", + "bump-major": "npm run pre-v && npm version major -m 'BLD: Release v%s' && npm run post-v", + "bump-minor": "npm run pre-v && npm version minor -m 'BLD: Release v%s' && npm run post-v", + "bump-patch": "npm run pre-v && npm version patch -m 'BLD: Release v%s' && npm run post-v", + "test:cache": "mocha -R spec test/specs", + "test": "npm run verify --silent", + "cover": "istanbul cover test/runner.js html text-summary", + "watch": "watch-run -i -p 'test/specs/**/*.js' istanbul cover test/runner.js html text-summary" }, + "keywords": [ + "json cache", + "simple cache", + "file cache", + "key par", + "key value", + "cache" + ], "changelogx": { - "authorURL": "https://github.com/{0}", - "commitURL": "https://github.com/royriojas/flat-cache/commit/{0}", "ignoreRegExp": [ "BLD: Release", "DOC: Generate Changelog", "Generated Changelog" ], "issueIDRegExp": "#(\\d+)", + "commitURL": "https://github.com/royriojas/flat-cache/commit/{0}", + "authorURL": "https://github.com/{0}", "issueIDURL": "https://github.com/royriojas/flat-cache/issues/{0}", "projectName": "flat-cache" }, - "dependencies": { - "del": "^2.0.2", - "graceful-fs": "^4.1.2", - "read-json-sync": "^1.1.0", - "write": "^0.2.1" - }, - "description": "A stupidly simple key/value storage using files to persist some data", "devDependencies": { "chai": "^3.2.0", "changelogx": "^1.0.18", @@ -74,68 +78,10 @@ "sinon-chai": "^2.8.0", "watch-run": "^1.2.2" }, - "directories": {}, - "dist": { - "shasum": "73d6df4a28502160a05e059544a6aeeae8b0047a", - "tarball": "http://registry.npmjs.org/flat-cache/-/flat-cache-1.0.10.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "cache.js" - ], - "gitHead": "58bb40ccc87d79eb16146629be79d7577e6632da", - "homepage": "https://github.com/royriojas/flat-cache#readme", - "keywords": [ - "cache", - "file cache", - "json cache", - "key par", - "key value", - "simple cache" - ], - "license": "MIT", - "main": "cache.js", - "maintainers": [ - { - "name": "royriojas", - "email": "royriojas@gmail.com" - } - ], - "name": "flat-cache", - "optionalDependencies": {}, - "precommit": [ - "npm run verify --silent" - ], - "prepush": [ - "npm run verify --silent" - ], - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/royriojas/flat-cache.git" - }, - "scripts": { - "autofix": "npm run beautify && npm run eslint-fix", - "beautify": "esbeautifier 'cache.js' 'specs/**/*.js'", - "beautify-check": "npm run beautify -- -k", - "bump-major": "npm run pre-v && npm version major -m 'BLD: Release v%s' && npm run post-v", - "bump-minor": "npm run pre-v && npm version minor -m 'BLD: Release v%s' && npm run post-v", - "bump-patch": "npm run pre-v && npm version patch -m 'BLD: Release v%s' && npm run post-v", - "changelog": "changelogx -f markdown -o ./changelog.md", - "check": "npm run beautify-check && npm run eslint", - "cover": "istanbul cover test/runner.js html text-summary", - "do-changelog": "npm run changelog && git add ./changelog.md && git commit -m 'DOC: Generate changelog' --no-verify", - "eslint": "eslinter 'cache.js' 'specs/**/*.js'", - "eslint-fix": "npm run eslint -- --fix", - "install-hooks": "prepush install && changelogx install-hook && precommit install", - "post-v": "npm run do-changelog && git push --no-verify && git push --tags --no-verify", - "pre-v": "npm run verify", - "test": "npm run verify --silent", - "test:cache": "mocha -R spec test/specs", - "verify": "npm run check && npm run test:cache", - "watch": "watch-run -i -p 'test/specs/**/*.js' istanbul cover test/runner.js html text-summary" - }, - "version": "1.0.10" + "dependencies": { + "circular-json": "^0.3.0", + "del": "^2.0.2", + "graceful-fs": "^4.1.2", + "write": "^0.2.1" + } } diff --git a/node_modules/flat-cache/utils.js b/node_modules/flat-cache/utils.js new file mode 100644 index 0000000..3bdd1ef --- /dev/null +++ b/node_modules/flat-cache/utils.js @@ -0,0 +1,29 @@ +var fs = require( 'graceful-fs' ); +var write = require( 'write' ); +var circularJson = require( 'circular-json' ); + +module.exports = { + + /** + * Read json file synchronously using circular-json + * + * @method readJSON + * @param {String} filePath Json filepath + * @returns {*} parse result + */ + readJSON: function ( filePath ) { + return circularJson.parse( fs.readFileSync( filePath ).toString() ); + }, + + /** + * Write json file synchronously using circular-json + * + * @method writeJSON + * @param {String} filePath Json filepath + * @param {*} data Object to serialize + */ + writeJSON: function (filePath, data ) { + write.sync( filePath, circularJson.stringify( data ) ); + } + +}; diff --git a/node_modules/tryit/.npmignore b/node_modules/front-matter/.npmignore similarity index 56% rename from node_modules/tryit/.npmignore rename to node_modules/front-matter/.npmignore index 9daa824..ba2a97b 100644 --- a/node_modules/tryit/.npmignore +++ b/node_modules/front-matter/.npmignore @@ -1,2 +1,2 @@ -.DS_Store node_modules +coverage diff --git a/node_modules/front-matter/.travis.yml b/node_modules/front-matter/.travis.yml new file mode 100644 index 0000000..8f7f665 --- /dev/null +++ b/node_modules/front-matter/.travis.yml @@ -0,0 +1,32 @@ +sudo: false +language: node_js +node_js: +- stable +- 4 +- iojs +- 0.12 +- 0.11 +- 0.1 +before_install: +- npm install -g npm +env: + global: + - secure: he3kGOmSy6s97OdYRUq+k13w2WfIxzKfuDVysMfjOEV1U7YCq6tVeA6rm37yuyyaN3776he/fvPcK1Jd+FNfm8hzJMEu6QHqSd+Ri+q/32P+aXcEq2MEPMdsDAUpFqjT2p7BDPqH4a8DcJ0p48iXP+H2K3+HBaXNrneNLnU+6I8= + - secure: HHxNmsHXJ3p9MBDXHmlSUYWaNX4KEq+VVpK4tlK1g67mGwPdlG9eFB4QFPTitYhqSTexCWSc9QwvPWVTWXzWemvwu6wBATxvKED8CKjTIlO2mOpwigV5KT7op7LU3f8WXvU+n5wV0ftHKU1nuDUu0ZgZEU4V9cAy9hMxNRmwpk8= + - secure: jvL8J6LnjpPwrrGqHu3bUAxdZByq9pMITkhRrxCbYMFcQQRFynqEdbY/c1dldei03HKx4sA76UtlbGPe78wWepSE2zBPuq8XpyRR2oCgmJsYfdNuv6op6Pmx20TJwBCXp1nlAOS+Fm3JLv72N3LZS63YhB1aRi+XEmhm7SbQ3gk= + matrix: + - TEST=node + - TEST=browser +script: make travis +matrix: + exclude: + - node_js: 4 + env: TEST=browser + - node_js: iojs + env: TEST=browser + - node_js: 0.12 + env: TEST=browser + - node_js: 0.11 + env: TEST=browser + - node_js: 0.1 + env: TEST=browser diff --git a/node_modules/front-matter/.zuul.yml b/node_modules/front-matter/.zuul.yml new file mode 100644 index 0000000..4030f0e --- /dev/null +++ b/node_modules/front-matter/.zuul.yml @@ -0,0 +1,18 @@ +ui: tape +browserify: + - transform: brfs +browsers: + - name: chrome + version: latest + - name: firefox + version: latest + - name: ie + version: 9..latest + - name: iphone + version: latest + - name: safari + version: latest + - name: android + version: latest + - name: microsoftedge + version: latest diff --git a/node_modules/front-matter/LICENSE b/node_modules/front-matter/LICENSE new file mode 100644 index 0000000..1aa18d0 --- /dev/null +++ b/node_modules/front-matter/LICENSE @@ -0,0 +1,9 @@ +# The MIT License (MIT) + +Copyright (c) Jason Campbell ("Author") + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/front-matter/Makefile b/node_modules/front-matter/Makefile new file mode 100644 index 0000000..3f94358 --- /dev/null +++ b/node_modules/front-matter/Makefile @@ -0,0 +1,70 @@ +MAKEFLAGS += --warn-undefined-variables +PATH := node_modules/.bin:$(PATH) +SHELL := /bin/bash + +.SHELLFLAGS := -eu -o pipefail -c +.DEFAULT_GOAL := all +.DELETE_ON_ERROR: +.SUFFIXES: + +TEST ?= node +version ?= patch + +node_modules: package.json + @npm prune + @npm install + @touch node_modules + +.PHONY: clean +clean: + @$(RM) -fr node_modules + @$(RM) -fr npm-debug.log + @$(RM) -fr coverage + +.PHONY: fmt +fmt: node_modules + @standard-format -w + +.PHONY: lint +lint: node_modules + @standard + +.PHONY: test +test: lint + @if [ "$(TEST)" = "browser" ]; \ + then make test-browser; \ + else make test-node; \ + fi + +.PHONY: test-node +test-node: node_modules + tape test/index.js + +.PHONY: test-browser +test-browser: node_modules +ifeq ($(TRAVIS_PULL_REQUEST),true) + zuul -- test/index.js +endif + +.PHONY: zuul +zuul: node_modules + zuul --local 8080 --ui tape -- test/index.js + +.PHONY: release +release: test + npm version $(version) + git push && git push --tags + npm publish + +.PHONY: coverage +coverage: node_modules index.js test/index.js node_modules + @istanbul cover --report html --print detail ./test/index.js + @touch coverage + +.PHONY: coveralls +coveralls: node_modules coverage + @istanbul report lcov + (cat coverage/lcov.info | coveralls) || exit 0 + +.PHONY: travis +travis: test coveralls diff --git a/node_modules/front-matter/README.md b/node_modules/front-matter/README.md new file mode 100644 index 0000000..8078f34 --- /dev/null +++ b/node_modules/front-matter/README.md @@ -0,0 +1,140 @@ +# front-matter +[![build][build-img]][build-url] +[![coverage][coverage-img]][coverage-url] +[![npm][npm-img]][npm-url] +[![github][github-img]][github-url] + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/front-matter.svg)](https://saucelabs.com/u/front-matter) + +> Extract meta data (front-matter) from documents. + +This modules does not do any IO (file loading or reading), only extracting and +parsing front matter from strings. + +This concept that was originally introduced to me through the [jeykll][jeykll] blogging system and is pretty useful where you want to be able to easily add meta-data to content without the need for a database. YAML is extracted from the the top of a file between matching separators of "---" or "= yaml =". It will also extract YAML between a separator and "...". + + + +# Install + +With [npm][npm] do: + + npm install front-matter + +# Example + +So you have a file `example.md`: + + --- + title: Just hack'n + description: Nothing to see here + --- + + This is some text about some stuff that happened sometime ago + +**NOTE:** As of `front-matter@2.0.0` valid front matter is considered to have +the starting separator on the first line. + +Then you can do this: + + var fs = require('fs') + , fm = require('front-matter') + + fs.readFile('./example.md', 'utf8', function(err, data){ + if (err) throw err + + var content = fm(data) + + console.log(content) + }) + +And end up with an object like this: + + { + attributes: { + title: 'Just hack\'n', + description: 'Nothing to see here' + }, + body: '\nThis is some text about some stuff that happened sometime ago', + frontmatter: 'title: Just hack\'n\ndescription: Nothing to see here' + } + +# Methods + + var fm = require('front-matter') + +## fm(string) + +Return a `content` object with two properties: + +* `content.attributes` contains the extracted yaml attributes in json form +* `content.body` contains the string contents below the yaml separators +* `content.frontmatter` contains the original yaml string contents + +# fm.test(string) + +Check if a string contains a front matter header of "---" or "= yaml =". Primarily used internally but is useful outside of the module. + +Returns `true` or `false` + + fm.test(string) #=> true || false + +# Contributing + +front-matter is an OPEN Source Project so please help out by [reporting bugs](http://github.com/jxson/front-matter/issues) or [forking and opening pull](https://github.com/jxson/front-matter) requests when possible. + +![standard][standard-img] + +All code is linted/formatted using [standard][standard-url] style, any non-conforming code can be automatically formatted using the the fmt make task: `make fmt`. + +## Maintainers + +- [Adrian Gimenez](https://github.com/axdg) +- [Jason Campbell](https://github.com/jxson) - [@jxson](https://twitter.com/jxson) + +## Contributors + +This module is awesome because of all the folks who submitted pull requests: + +- [Jordan Santell](https://github.com/jsantell) - [@jsantell](https://twitter.com/jsantell) +- [Jean-Philippe Monette](https://github.com/jpmonette) - [@jpmonette](https://twitter.com/jpmonette) +- [Kai Davenport](https://github.com/binocarlos) +- [Marc-André Arseneault](https://github.com/arsnl) - [@im_arsnl](https://twitter.com/im_arsnl) +- [Bret Comnes](https://github.com/bcomnes) - http://bret.io +- [Shinnosuke Watanabe](https://github.com/shinnn) +- [Matt Dickens](https://github.com/mpd106) +- [Rod Knowlton](https://github.com/codelahoma) +- [Rich DeLauder](https://github.com/FMJaguar) +- [Sean Lang](https://github.com/slang800) - http://slang.cx +- [Benjamin Tan](https://github.com/d10) - https://d10.github.io/ +- [Kenneth Lim](https://github.com/kenlimmj) - https://kenlimmj.com +- [Cameron Moy](https://github.com/camoy) +- [Fernando Montoya](https://github.com/montogeek) - https://montogeek.com +- [Martin Heidegger](https://github.com/martinheidegger) +- [Leo Liang](https://github.com/aleung) + +# LICENSE (MIT) + +Copyright (c) Jason Campbell ("Author") + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +[yaml]: http://en.wikipedia.org/wiki/YAML +[haiku]: http://haiku.io +[npm]: http://npmjs.org +[jeykll]: https://github.com/mojombo/jekyll +[coverage-img]: https://img.shields.io/coveralls/jxson/front-matter.svg +[coverage-url]: https://coveralls.io/r/jxson/front-matter?branch=master +[build-img]: https://img.shields.io/travis/jxson/front-matter/master.svg +[build-url]: http://travis-ci.org/jxson/front-matter +[npm-img]: https://img.shields.io/npm/dm/front-matter.svg +[npm-url]: https://npmjs.org/package/standard +[github-img]: https://img.shields.io/github/stars/jxson/front-matter.svg?style=social&label=Star +[github-url]: https://github.com/jxson/front-matter/ +[standard-img]: https://cdn.rawgit.com/feross/standard/master/badge.svg +[standard-url]: http://npmjs.com/package/standard diff --git a/node_modules/front-matter/examples/bom.md b/node_modules/front-matter/examples/bom.md new file mode 100644 index 0000000..38786c9 --- /dev/null +++ b/node_modules/front-matter/examples/bom.md @@ -0,0 +1,3 @@ +--- +title: Relax guy, I'm not hiding any BOMs +--- diff --git a/node_modules/front-matter/examples/complex-yaml.md b/node_modules/front-matter/examples/complex-yaml.md new file mode 100644 index 0000000..fc171f0 --- /dev/null +++ b/node_modules/front-matter/examples/complex-yaml.md @@ -0,0 +1,22 @@ +--- + +title: This is a title! + +name: Derek Worthen +age: young +contact: +email: email@domain.com +address: some location +pets: +- cat +- dog +- bat +match: !!js/regexp /pattern/gim + + + +--- + +- item +- item +- item diff --git a/node_modules/front-matter/examples/dashes-seperator.md b/node_modules/front-matter/examples/dashes-seperator.md new file mode 100644 index 0000000..9bb5160 --- /dev/null +++ b/node_modules/front-matter/examples/dashes-seperator.md @@ -0,0 +1,14 @@ +--- +title: Three dashes marks the spot +tags: + - yaml + - front-matter + - dashes +expaned-description: with some --- crazy stuff in it +--- + +don't break + +--- + +Also this shouldn't be a problem diff --git a/node_modules/front-matter/examples/dots-ending.md b/node_modules/front-matter/examples/dots-ending.md new file mode 100644 index 0000000..09e7436 --- /dev/null +++ b/node_modules/front-matter/examples/dots-ending.md @@ -0,0 +1,6 @@ +--- +title: Example with dots document ending +description: Just an example of using `...` +... + +It shouldn't break with ... diff --git a/node_modules/front-matter/examples/missing-body.md b/node_modules/front-matter/examples/missing-body.md new file mode 100644 index 0000000..2dc6893 --- /dev/null +++ b/node_modules/front-matter/examples/missing-body.md @@ -0,0 +1,8 @@ +--- +title: Three dashes marks the spot +tags: + - yaml + - front-matter + - dashes +expaned-description: with some --- crazy stuff in it +--- diff --git a/node_modules/front-matter/examples/no-front-matter.md b/node_modules/front-matter/examples/no-front-matter.md new file mode 100644 index 0000000..a7b6bbd --- /dev/null +++ b/node_modules/front-matter/examples/no-front-matter.md @@ -0,0 +1,11 @@ +# Hello World + +This is a markdown document. + +--- + +Some text here that is definitely not front matter. + +--- + +More text here. diff --git a/node_modules/front-matter/examples/wrapped-text.md b/node_modules/front-matter/examples/wrapped-text.md new file mode 100644 index 0000000..ef907c5 --- /dev/null +++ b/node_modules/front-matter/examples/wrapped-text.md @@ -0,0 +1,21 @@ +--- +title: Complex yaml example +description: You can use the front-matter module to convert this +tags: [example, yaml, node] +folded-text: | + There once was a man from Darjeeling + Who got on a bus bound for Ealing + It said on the door + "Please don't spit on the floor" + So he carefully spat on the ceiling +wrapped-text: > + Wrapped text + will be folded + into a single + paragraph + + Blank lines denote + paragraph breaks +--- + +Some crazy stuff going on up there ^^ diff --git a/node_modules/front-matter/examples/yaml-seperator.md b/node_modules/front-matter/examples/yaml-seperator.md new file mode 100644 index 0000000..d0b0ed1 --- /dev/null +++ b/node_modules/front-matter/examples/yaml-seperator.md @@ -0,0 +1,6 @@ += yaml = +title: I couldn't think of a better name +description: Just an example of using `= yaml =` += yaml = + +Plays nice with markdown syntax highlighting diff --git a/node_modules/front-matter/index.js b/node_modules/front-matter/index.js new file mode 100644 index 0000000..55441c0 --- /dev/null +++ b/node_modules/front-matter/index.js @@ -0,0 +1,50 @@ +var parser = require('js-yaml') +var optionalByteOrderMark = '\\ufeff?' +var pattern = '^(' + + optionalByteOrderMark + + '(= yaml =|---)' + + '$([\\s\\S]*?)' + + '(?:\\2|\\.\\.\\.)' + + '$' + + (process.platform === 'win32' ? '\\r?' : '') + + '(?:\\n)?)' +// NOTE: If this pattern uses the 'g' flag the `regex` variable definition will +// need to be moved down into the functions that use it. +var regex = new RegExp(pattern, 'm') + +module.exports = extractor +module.exports.test = test + +function extractor (string) { + string = string || '' + + var lines = string.split(/(\r?\n)/) + if (lines[0] && /= yaml =|---/.test(lines[0])) { + return parse(string) + } else { + return { attributes: {}, body: string } + } +} + +function parse (string) { + var match = regex.exec(string) + + if (!match) { + return { + attributes: {}, + body: string + } + } + + var yaml = match[match.length - 1].replace(/^\s+|\s+$/g, '') + var attributes = parser.load(yaml) || {} + var body = string.replace(match[0], '') + + return { attributes: attributes, body: body, frontmatter: yaml } +} + +function test (string) { + string = string || '' + + return regex.test(string) +} diff --git a/node_modules/front-matter/node_modules/.bin/js-yaml b/node_modules/front-matter/node_modules/.bin/js-yaml new file mode 100644 index 0000000..e633943 --- /dev/null +++ b/node_modules/front-matter/node_modules/.bin/js-yaml @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../../../js-yaml/bin/js-yaml.js" "$@" + ret=$? +else + node "$basedir/../../../js-yaml/bin/js-yaml.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/front-matter/node_modules/.bin/js-yaml.cmd b/node_modules/front-matter/node_modules/.bin/js-yaml.cmd new file mode 100644 index 0000000..4a4f7b4 --- /dev/null +++ b/node_modules/front-matter/node_modules/.bin/js-yaml.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\..\..\js-yaml\bin\js-yaml.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\..\..\js-yaml\bin\js-yaml.js" %* +) \ No newline at end of file diff --git a/node_modules/front-matter/notes.md b/node_modules/front-matter/notes.md new file mode 100644 index 0000000..d3703c3 --- /dev/null +++ b/node_modules/front-matter/notes.md @@ -0,0 +1,53 @@ + +* [ ] benchmarks +* [ ] browser tests +* [ ] streaming support +* [ ] custom parsers +* [ ] rename attributes? +* [ ] sauce labs browser badge +* [ ] should the yaml parser be separate? +* [ ] Add benchmark results to the README +* [ ] Add a note about size to the README +* [ ] Add standard + +* [ ] Add notes for collaborators about publishing + +Should we create an org for static site authors? + +https://github.com/juliangruber/balanced-match/blob/master/index.js + +* [ ] streaming support? +* [ ] Since the name of this package is very generic, it would be nice to be able to specify a separators and parsers. For example, parse front-matter as CSON when a *** separator is used: + +*** +title: 'Hello' +greatDocumentaries: [ + 'earthlings.com' + 'forksoverknives.com' + 'cowspiracy.com' +] +*** + +* [ ] Something like below will break front-matter. It thinks the content between the horizontal lines is metadata. + +# hello world + +this is a markdown document + +--- + +some text here + +--- + +foo +This can be avoided by declaring an empty metadata, but maybe a proper fix is to only look for metadata in the beginning of the file. + +--- +--- + +etc + +* [ ] browser tests + +# Hello world! diff --git a/node_modules/front-matter/package.json b/node_modules/front-matter/package.json new file mode 100644 index 0000000..9b3b76f --- /dev/null +++ b/node_modules/front-matter/package.json @@ -0,0 +1,42 @@ +{ + "author": "Jason Campbell (http://twitter.com/jxson)", + "name": "front-matter", + "description": "Extract YAML front matter from a string", + "keywords": [ + "yaml", + "front matter", + "meta data" + ], + "license": "MIT", + "version": "2.1.0", + "homepage": "https://github.com/jxson/front-matter", + "bugs": "https://github.com/jxson/front-matter/issues", + "repository": { + "type": "git", + "url": "git://github.com/jxson/front-matter.git" + }, + "main": "index.js", + "scripts": { + "test": "make test" + }, + "dependencies": { + "js-yaml": "^3.4.6" + }, + "devDependencies": { + "brfs": "^1.4.3", + "coveralls": "^2.11.6", + "istanbul": "^0.3.6", + "standard": "^6.0.4", + "standard-format": "^2.1.0", + "tape": "^4.4.0", + "zuul": "^3.10.1" + }, + "contributors": [ + "Jason Campbell (http://twitter.com/jxson)", + "Jordan Santell (https://github.com/jsantell)", + "Kai Davenport (https://github.com/binocarlos)", + "Jean-Philippe Monette (https://github.com/jpmonette)", + "Marc-André Arseneault (https://github.com/arsnl)", + "Bret Comnes (http://bret.io)" + ] +} diff --git a/node_modules/front-matter/test/index.js b/node_modules/front-matter/test/index.js new file mode 100644 index 0000000..b773125 --- /dev/null +++ b/node_modules/front-matter/test/index.js @@ -0,0 +1,227 @@ +var fm = require('../') +var fs = require('fs') +var path = require('path') +var test = require('tape') + +test('var fm = require("front-matter")', function (t) { + t.equal(typeof fm, 'function') + t.end() +}) + +test('fm(string) - parse yaml delinetead by `---`', function (t) { + fs.readFile( + path.resolve(__dirname, '../examples/dashes-seperator.md'), + 'utf8', + function (err, data) { + t.error(err, 'read(...) should not error') + + var content = fm(data) + + t.ok(content.attributes, 'should have `attributes` key') + t.equal(content.attributes.title, 'Three dashes marks the spot') + t.equal(content.attributes.tags.length, 3) + + t.ok(content.body, 'should have a `body` key') + t.ok(content.body.match("don't break"), 'should match body') + t.ok(content.body.match('---'), 'should match body') + t.ok(content.body.match("Also this shouldn't be a problem"), + 'should match body') + + t.ok(content.frontmatter, 'should have a `frontmatter` key') + t.ok(content.frontmatter.match('title: Three dashes marks the spot'), 'should match frontmatter') + t.ok(content.frontmatter.match('expaned-description: with some --- crazy stuff in it'), 'should match frontmatter') + + t.end() + }) +}) + +test('fm(string) - parse yaml delinetead by `= yaml =`', function (t) { + fs.readFile( + path.resolve(__dirname, '../examples/yaml-seperator.md'), + 'utf8', + function (err, data) { + t.error(err, 'read(...) should not error') + + var content = fm(data) + var meta = content.attributes + var body = content.body + + t.equal(meta.title, "I couldn't think of a better name") + t.equal(meta.description, 'Just an example of using `= yaml =`') + t.ok(body.match('Plays nice with markdown syntax highlighting'), + 'should match body') + + t.end() + }) +}) + +test('fm(string) - parse yaml ended by `...`', function (t) { + fs.readFile( + path.resolve(__dirname, '../examples/dots-ending.md'), + 'utf8', + function (err, data) { + t.error(err, 'read(...) should not error') + + var content = fm(data) + var meta = content.attributes + var body = content.body + + t.equal(meta.title, 'Example with dots document ending') + t.equal(meta.description, 'Just an example of using `...`') + t.ok(body.match("It shouldn't break with ..."), + 'should match body') + + t.end() + }) +}) + +test('fm(string) - string missing front-matter', function (t) { + var content = fm('No front matter here') + + t.equal(content.body, 'No front matter here') + t.end() +}) + +test('fm(string) - string missing body', function (t) { + fs.readFile( + path.resolve(__dirname, '../examples/missing-body.md'), + 'utf8', + function (err, data) { + t.error(err, 'read(...) should not error') + + var content = fm(data) + + t.equal(content.attributes.title, 'Three dashes marks the spot') + t.equal(content.attributes.tags.length, 3) + t.equal(content.body, '') + t.end() + }) +}) + +test('fm(string) - wrapped test in yaml', function (t) { + fs.readFile( + path.resolve(__dirname, '../examples/wrapped-text.md'), + 'utf8', + function (err, data) { + t.error(err, 'read(...) should not error') + + var content = fm(data) + var folded = [ + 'There once was a man from Darjeeling', + 'Who got on a bus bound for Ealing', + ' It said on the door', + ' "Please don\'t spit on the floor"', + 'So he carefully spat on the ceiling\n' + ].join('\n') + + t.equal(content.attributes['folded-text'], folded) + t.ok(content.body.match('Some crazy stuff going on up there'), + 'should match body') + + t.end() + }) +}) + +test('fm(string) - strings with byte order mark', function (t) { + fs.readFile( + path.resolve(__dirname, '../examples/bom.md'), + 'utf8', + function (err, data) { + t.error(err, 'read(...) should not error') + + var content = fm(data) + + t.equal(content.attributes.title, "Relax guy, I'm not hiding any BOMs") + + t.end() + }) +}) + +test('fm(string) - no front matter, markdown with hr', function (t) { + fs.readFile( + path.resolve(__dirname, '../examples/no-front-matter.md'), + 'utf8', + function (err, data) { + t.error(err, 'read should not error') + + var content = fm(data) + t.equal(content.body, data) + t.end() + }) +}) + +test('fm(string) - complex yaml', function (t) { + fs.readFile( + path.resolve(__dirname, '../examples/complex-yaml.md'), + 'utf8', + function (err, data) { + t.error(err, 'read(...) should not error') + var content = fm(data) + t.ok(content.attributes, 'should have `attributes` key') + t.equal(content.attributes.title, 'This is a title!') + t.equal(content.attributes.contact, null) + t.equal(content.attributes.match.toString(), '/pattern/gim') + t.end() + }) +}) + +test('fm.test(string) - yaml seperator', function (t) { + fs.readFile( + path.resolve(__dirname, '../examples/yaml-seperator.md'), + 'utf8', + function (err, data) { + t.error(err, 'read(...) should not error') + t.equal(fm.test(data), true) + t.end() + }) +}) + +test('fm.test(string) - dashes seperator', function (t) { + fs.readFile( + path.resolve(__dirname, '../examples/dashes-seperator.md'), + 'utf8', + function (err, data) { + t.error(err, 'read(...) should not error') + t.equal(fm.test(data), true) + t.end() + }) +}) + +test('fm.test(string) - no front-matter', function (t) { + t.equal(fm.test('no front matter here'), false) + t.end() +}) + +test('Supports live updating', function (t) { + var seperator = '---' + var string = '' + for (var i = 0; i < seperator.length; i++) { + string += seperator[i] + + try { + fm(string) + } catch (e) { + t.error(e) + } + } + + string += '\n' + string += 'foo: bar' + + var content = fm(string) + + t.same(content, { + attributes: {}, + body: string + }) + + string += '\n---\n' + content = fm(string) + t.same(content, { + attributes: { foo: 'bar' }, + body: '', + frontmatter: 'foo: bar' + }) + + t.end() +}) diff --git a/node_modules/fs-extra/CHANGELOG.md b/node_modules/fs-extra/CHANGELOG.md index e19bcf6..43b1f3a 100644 --- a/node_modules/fs-extra/CHANGELOG.md +++ b/node_modules/fs-extra/CHANGELOG.md @@ -1,6 +1,43 @@ +Unreleased +---------- + +### Added + +### Removed + +### Changed + +### Fixed + + +1.0.0 / 2016-11-01 +------------------ + +After five years of development, we finally have reach the 1.0.0 milestone! Big thanks goes +to [Ryan Zim](https://github.com/RyanZim) for leading the charge on this release! + +### Added +- `walkSync()` + +### Changed +- **BREAKING**: dropped Node v0.10 support. +- disabled `rimaf` globbing, wasn't used. [#280] +- deprecate `copy()/copySync()` option `filter` if it's a `RegExp`. `filter` should now be a function. +- inline `rimraf`. This is temporary and was done because `rimraf` depended upon the beefy `glob` which `fs-extra` does not use. [#300] + +### Fixed +- bug fix proper closing of file handle on `utimesMillis()` [#271] +- proper escaping of files with dollar signs [#291] +- `copySync()` failed if user didn't own file. [#199], [#301] + + +0.30.0 / 2016-04-28 +------------------- +- Brought back Node v0.10 support. I didn't realize there was still demand. Official support will end **2016-10-01**. + 0.29.0 / 2016-04-27 ------------------- -- **BREAKING**: removed support for Node v0.10. Everything should work except for `ensureLink()/ensureSymlink()`. Node v0.12 is still supported but will be dropped in the near future as well. +- **BREAKING**: removed support for Node v0.10. If you still want to use Node v0.10, everything should work except for `ensureLink()/ensureSymlink()`. Node v0.12 is still supported but will be dropped in the near future as well. 0.28.0 / 2016-04-17 ------------------- @@ -310,6 +347,76 @@ from `~` to `^`. #67 * Added methods rmrf and rmrfSync * Moved tests from Jasmine to Mocha + +[#307]: https://github.com/jprichardson/node-fs-extra/pull/307 "Fix coverage" +[#306]: https://github.com/jprichardson/node-fs-extra/pull/306 "Update devDeps, fix lint error" +[#305]: https://github.com/jprichardson/node-fs-extra/pull/305 "Re-add Coveralls" +[#304]: https://github.com/jprichardson/node-fs-extra/pull/304 "Remove path-is-absolute [enhancement]" +[#303]: https://github.com/jprichardson/node-fs-extra/pull/303 "Document copySync filter inconsistency [documentation, feature-copy]" +[#302]: https://github.com/jprichardson/node-fs-extra/pull/302 "fix(console): depreciated -> deprecated" +[#301]: https://github.com/jprichardson/node-fs-extra/pull/301 "Remove chmod call from copySync [feature-copy]" +[#300]: https://github.com/jprichardson/node-fs-extra/pull/300 "Inline Rimraf [enhancement, feature-move, feature-remove]" +[#299]: https://github.com/jprichardson/node-fs-extra/pull/299 "Warn when filter is a RegExp [feature-copy]" +[#298]: https://github.com/jprichardson/node-fs-extra/issues/298 "API Docs [documentation]" +[#297]: https://github.com/jprichardson/node-fs-extra/pull/297 "Warn about using preserveTimestamps on 32-bit node" +[#296]: https://github.com/jprichardson/node-fs-extra/pull/296 "Improve EEXIST error message for copySync [enhancement]" +[#295]: https://github.com/jprichardson/node-fs-extra/pull/295 "Depreciate using regular expressions for copy's filter option [documentation]" +[#294]: https://github.com/jprichardson/node-fs-extra/pull/294 "BREAKING: Refactor lib/copy/ncp.js [feature-copy]" +[#293]: https://github.com/jprichardson/node-fs-extra/pull/293 "Update CI configs" +[#292]: https://github.com/jprichardson/node-fs-extra/issues/292 "Rewrite lib/copy/ncp.js [enhancement, feature-copy]" +[#291]: https://github.com/jprichardson/node-fs-extra/pull/291 "Escape '$' in replacement string for async file copying" +[#290]: https://github.com/jprichardson/node-fs-extra/issues/290 "Exclude files pattern while copying using copy.config.js [question]" +[#289]: https://github.com/jprichardson/node-fs-extra/pull/289 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error" +[#288]: https://github.com/jprichardson/node-fs-extra/pull/288 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error" +[#287]: https://github.com/jprichardson/node-fs-extra/issues/287 "emptyDir() callback arguments are inconsistent [enhancement, feature-remove]" +[#286]: https://github.com/jprichardson/node-fs-extra/pull/286 "Added walkSync function" +[#285]: https://github.com/jprichardson/node-fs-extra/issues/285 "CITGM test failing on s390" +[#284]: https://github.com/jprichardson/node-fs-extra/issues/284 "outputFile method is missing a check to determine if existing item is a folder or not" +[#283]: https://github.com/jprichardson/node-fs-extra/pull/283 "Apply filter also on directories and symlinks for copySync()" +[#282]: https://github.com/jprichardson/node-fs-extra/pull/282 "Apply filter also on directories and symlinks for copySync()" +[#281]: https://github.com/jprichardson/node-fs-extra/issues/281 "remove function executes "successfully" but doesn't do anything?" +[#280]: https://github.com/jprichardson/node-fs-extra/pull/280 "Disable rimraf globbing" +[#279]: https://github.com/jprichardson/node-fs-extra/issues/279 "Some code is vendored instead of included [awaiting-reply]" +[#278]: https://github.com/jprichardson/node-fs-extra/issues/278 "copy() does not preserve file/directory ownership" +[#277]: https://github.com/jprichardson/node-fs-extra/pull/277 "Mention defaults for clobber and dereference options" +[#276]: https://github.com/jprichardson/node-fs-extra/issues/276 "Cannot connect to Shared Folder [awaiting-reply]" +[#275]: https://github.com/jprichardson/node-fs-extra/issues/275 "EMFILE, too many open files on Mac OS with JSON API" +[#274]: https://github.com/jprichardson/node-fs-extra/issues/274 "Use with memory-fs? [enhancement, future]" +[#273]: https://github.com/jprichardson/node-fs-extra/pull/273 "tests: rename `remote.test.js` to `remove.test.js`" +[#272]: https://github.com/jprichardson/node-fs-extra/issues/272 "Copy clobber flag never err even when true [bug, feature-copy]" +[#271]: https://github.com/jprichardson/node-fs-extra/issues/271 "Unclosed file handle on futimes error" +[#270]: https://github.com/jprichardson/node-fs-extra/issues/270 "copy not working as desired on Windows [feature-copy, platform-windows]" +[#269]: https://github.com/jprichardson/node-fs-extra/issues/269 "Copying with preserveTimeStamps: true is inaccurate using 32bit node [feature-copy]" +[#268]: https://github.com/jprichardson/node-fs-extra/pull/268 "port fix for mkdirp issue #111" +[#267]: https://github.com/jprichardson/node-fs-extra/issues/267 "WARN deprecated wrench@1.5.9: wrench.js is deprecated!" +[#266]: https://github.com/jprichardson/node-fs-extra/issues/266 "fs-extra" +[#265]: https://github.com/jprichardson/node-fs-extra/issues/265 "Link the `fs.stat fs.exists` etc. methods for replace the `fs` module forever?" +[#264]: https://github.com/jprichardson/node-fs-extra/issues/264 "Renaming a file using move fails when a file inside is open (at least on windows) [wont-fix]" +[#263]: https://github.com/jprichardson/node-fs-extra/issues/263 "ENOSYS: function not implemented, link [needs-confirmed]" +[#262]: https://github.com/jprichardson/node-fs-extra/issues/262 "Add .exists() and .existsSync()" +[#261]: https://github.com/jprichardson/node-fs-extra/issues/261 "Cannot read property 'prototype' of undefined" +[#260]: https://github.com/jprichardson/node-fs-extra/pull/260 "use more specific path for method require" +[#259]: https://github.com/jprichardson/node-fs-extra/issues/259 "Feature Request: isEmpty" +[#258]: https://github.com/jprichardson/node-fs-extra/issues/258 "copy files does not preserve file timestamp" +[#257]: https://github.com/jprichardson/node-fs-extra/issues/257 "Copying a file on windows fails" +[#256]: https://github.com/jprichardson/node-fs-extra/pull/256 "Updated Readme " +[#255]: https://github.com/jprichardson/node-fs-extra/issues/255 "Update rimraf required version" +[#254]: https://github.com/jprichardson/node-fs-extra/issues/254 "request for readTree, readTreeSync, walkSync method" +[#253]: https://github.com/jprichardson/node-fs-extra/issues/253 "outputFile does not touch mtime when file exists" +[#252]: https://github.com/jprichardson/node-fs-extra/pull/252 "Fixing problem when copying file with no write permission" +[#251]: https://github.com/jprichardson/node-fs-extra/issues/251 "Just wanted to say thank you" +[#250]: https://github.com/jprichardson/node-fs-extra/issues/250 "`fs.remove()` not removing files (works with `rm -rf`)" +[#249]: https://github.com/jprichardson/node-fs-extra/issues/249 "Just a Question ... Remove Servers" +[#248]: https://github.com/jprichardson/node-fs-extra/issues/248 "Allow option to not preserve permissions for copy" +[#247]: https://github.com/jprichardson/node-fs-extra/issues/247 "Add TypeScript typing directly in the fs-extra package" +[#246]: https://github.com/jprichardson/node-fs-extra/issues/246 "fse.remove() && fse.removeSync() don't throw error on ENOENT file" +[#245]: https://github.com/jprichardson/node-fs-extra/issues/245 "filter for empty dir [enhancement]" +[#244]: https://github.com/jprichardson/node-fs-extra/issues/244 "copySync doesn't apply the filter to directories" +[#243]: https://github.com/jprichardson/node-fs-extra/issues/243 "Can I request fs.walk() to be synchronous?" +[#242]: https://github.com/jprichardson/node-fs-extra/issues/242 "Accidentally truncates file names ending with $$ [bug, feature-copy]" +[#241]: https://github.com/jprichardson/node-fs-extra/pull/241 "Remove link to createOutputStream" +[#240]: https://github.com/jprichardson/node-fs-extra/issues/240 "walkSync request" +[#239]: https://github.com/jprichardson/node-fs-extra/issues/239 "Depreciate regular expressions for copy's filter [documentation, feature-copy]" [#238]: https://github.com/jprichardson/node-fs-extra/issues/238 "Can't write to files while in a worker thread." [#237]: https://github.com/jprichardson/node-fs-extra/issues/237 ".ensureDir(..) fails silently when passed an invalid path..." [#236]: https://github.com/jprichardson/node-fs-extra/issues/236 "[Removed] Filed under wrong repo" diff --git a/node_modules/fs-extra/README.md b/node_modules/fs-extra/README.md index 5ed9e55..b7fa28a 100644 --- a/node_modules/fs-extra/README.md +++ b/node_modules/fs-extra/README.md @@ -11,6 +11,8 @@ Node.js: fs-extra Standard JavaScript +**NOTE (2016-11-01):** Node v0.12 will be unsupported on 2016-12-31. + Why? ---- @@ -109,6 +111,7 @@ Methods - [remove](#removedir-callback) - [removeSync](#removedir-callback) - [walk](#walk) +- [walkSync](#walkSyncDir) - [writeJson](#writejsonfile-object-options-callback) - [writeJsonSync](#writejsonfile-object-options-callback) @@ -124,10 +127,10 @@ Methods Copy a file or directory. The directory can have contents. Like `cp -r`. Options: -- clobber (boolean): overwrite existing file or directory -- dereference (boolean): dereference symlinks +- clobber (boolean): overwrite existing file or directory, default is `true`. +- dereference (boolean): dereference symlinks, default is `false`. - preserveTimestamps (boolean): will set last modification and access times to the ones of the original source files, default is `false`. -- filter: Function or RegExp to filter copied files. If function, return true to include, false to exclude. If RegExp, same as function, where `filter` is `filter.test`. +- filter: Function to filter copied files. Return `true` to include, `false` to exclude. This can also be a RegExp, however this is deprecated (See [issue #239](https://github.com/jprichardson/node-fs-extra/issues/239) for background). _Warning: `copySync` currently applies the filter only to files (see [#180](https://github.com/jprichardson/node-fs-extra/issues/180)). This will be fixed in a future release._ Sync: `copySync()` @@ -414,8 +417,9 @@ returns an object with two properties: `path` and `stats`. `path` is the full pa Streams 1 (push) example: ```js +var fs = require('fs-extra') var items = [] // files, directories, symlinks, etc -fse.walk(TEST_DIR) +fs.walk(TEST_DIR) .on('data', function (item) { items.push(item.path) }) @@ -428,7 +432,8 @@ Streams 2 & 3 (pull) example: ```js var items = [] // files, directories, symlinks, etc -fse.walk(TEST_DIR) +var fs = require('fs-extra') +fs.walk(TEST_DIR) .on('readable', function () { var item while ((item = this.read())) { @@ -445,6 +450,18 @@ recommend this resource as a good starting point: https://strongloop.com/strongb **See [`klaw` documentation](https://github.com/jprichardson/node-klaw) for more detailed usage.** +### walkSync(dir) + +Lists all files inside a directory recursively + +Examples: + +```js +var fs = require('fs-extra') + +var files = fs.walkSync('/home/jprichardson') +// files = ['/home/jprichardson/file1', '/home/jprichardson/dir1/file2'] +``` ### writeJson(file, object, [options], callback) diff --git a/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js b/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js index c6c5711..9cac892 100644 --- a/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js +++ b/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js @@ -9,10 +9,13 @@ function copyFileSync (srcFile, destFile, options) { if (fs.existsSync(destFile)) { if (clobber) { - fs.chmodSync(destFile, parseInt('777', 8)) fs.unlinkSync(destFile) } else { - throw Error('EEXIST') + var err = new Error('EEXIST: ' + destFile + ' already exists.') + err.code = 'EEXIST' + err.errno = -17 + err.path = destFile + throw err } } diff --git a/node_modules/fs-extra/lib/copy-sync/copy-sync.js b/node_modules/fs-extra/lib/copy-sync/copy-sync.js index 8168dee..38c8c43 100644 --- a/node_modules/fs-extra/lib/copy-sync/copy-sync.js +++ b/node_modules/fs-extra/lib/copy-sync/copy-sync.js @@ -18,14 +18,22 @@ function copySync (src, dest, options) { options.filter = options.filter || function () { return true } + // Warn about using preserveTimestamps on 32-bit node: + if (options.preserveTimestamps && process.arch === 'ia32') { + console.warn('fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n' + + 'see https://github.com/jprichardson/node-fs-extra/issues/269') + } + var stats = (options.recursive && !options.dereference) ? fs.lstatSync(src) : fs.statSync(src) var destFolder = path.dirname(dest) var destFolderExists = fs.existsSync(destFolder) var performCopy = false if (stats.isFile()) { - if (options.filter instanceof RegExp) performCopy = options.filter.test(src) - else if (typeof options.filter === 'function') performCopy = options.filter(src) + if (options.filter instanceof RegExp) { + console.warn('Warning: fs-extra: Passing a RegExp filter is deprecated, use a function') + performCopy = options.filter.test(src) + } else if (typeof options.filter === 'function') performCopy = options.filter(src) if (performCopy) { if (!destFolderExists) mkdir.mkdirsSync(destFolder) diff --git a/node_modules/fs-extra/lib/copy/copy.js b/node_modules/fs-extra/lib/copy/copy.js index d9d2912..6c5e224 100644 --- a/node_modules/fs-extra/lib/copy/copy.js +++ b/node_modules/fs-extra/lib/copy/copy.js @@ -13,6 +13,12 @@ function copy (src, dest, options, callback) { callback = callback || function () {} options = options || {} + // Warn about using preserveTimestamps on 32-bit node: + if (options.preserveTimestamps && process.arch === 'ia32') { + console.warn('fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n' + + 'see https://github.com/jprichardson/node-fs-extra/issues/269') + } + // don't allow src and dest to be the same var basePath = process.cwd() var currentPath = path.resolve(basePath, src) diff --git a/node_modules/fs-extra/lib/copy/ncp.js b/node_modules/fs-extra/lib/copy/ncp.js index d30cae5..a951004 100644 --- a/node_modules/fs-extra/lib/copy/ncp.js +++ b/node_modules/fs-extra/lib/copy/ncp.js @@ -16,18 +16,15 @@ function ncp (source, dest, options, callback) { var filter = options.filter var transform = options.transform - var clobber = options.clobber !== false + var clobber = options.clobber !== false // default true var dereference = options.dereference var preserveTimestamps = options.preserveTimestamps === true - var errs = null - var started = 0 var finished = 0 var running = 0 - // this is pretty useless now that we're using graceful-fs - // consider removing - var limit = options.limit || 512 + + var errored = false startCopy(currentPath) @@ -35,6 +32,7 @@ function ncp (source, dest, options, callback) { started++ if (filter) { if (filter instanceof RegExp) { + console.warn('Warning: fs-extra: Passing a RegExp filter is deprecated, use a function') if (!filter.test(source)) { return doneOne(true) } @@ -49,11 +47,6 @@ function ncp (source, dest, options, callback) { function getStats (source) { var stat = dereference ? fs.stat : fs.lstat - if (running >= limit) { - return setImmediate(function () { - getStats(source) - }) - } running++ stat(source, function (err, stats) { if (err) return onError(err) @@ -79,7 +72,7 @@ function ncp (source, dest, options, callback) { } function onFile (file) { - var target = file.name.replace(currentPath, targetPath) + var target = file.name.replace(currentPath, targetPath.replace('$', '$$$$')) // escapes '$' with '$$' isWritable(target, function (writable) { if (writable) { copyFile(file, target) @@ -89,7 +82,11 @@ function ncp (source, dest, options, callback) { copyFile(file, target) }) } else { - doneOne() + var err = new Error('EEXIST: ' + target + ' already exists.') + err.code = 'EEXIST' + err.errno = -17 + err.path = target + onError(err) } } }) @@ -133,7 +130,7 @@ function ncp (source, dest, options, callback) { } function onDir (dir) { - var target = dir.name.replace(currentPath, targetPath) + var target = dir.name.replace(currentPath, targetPath.replace('$', '$$$$')) // escapes '$' with '$$' isWritable(target, function (writable) { if (writable) { return mkDir(dir, target) @@ -214,19 +211,11 @@ function ncp (source, dest, options, callback) { } function onError (err) { - if (options.stopOnError) { + // ensure callback is defined & called only once: + if (!errored && callback !== undefined) { + errored = true return callback(err) - } else if (!errs && options.errs) { - errs = fs.createWriteStream(options.errs) - } else if (!errs) { - errs = [] - } - if (typeof errs.write === 'undefined') { - errs.push(err) - } else { - errs.write(err.stack + '\n\n') } - return doneOne() } function doneOne (skipped) { @@ -234,7 +223,7 @@ function ncp (source, dest, options, callback) { finished++ if ((started === finished) && (running === 0)) { if (callback !== undefined) { - return errs ? callback(errs) : callback(null) + return callback(null) } } } diff --git a/node_modules/fs-extra/lib/ensure/symlink-paths.js b/node_modules/fs-extra/lib/ensure/symlink-paths.js index de24b4f..eebc12e 100644 --- a/node_modules/fs-extra/lib/ensure/symlink-paths.js +++ b/node_modules/fs-extra/lib/ensure/symlink-paths.js @@ -1,4 +1,5 @@ var path = require('path') +// path.isAbsolute shim for Node.js 0.10 support var fs = require('graceful-fs') /** diff --git a/node_modules/fs-extra/lib/index.js b/node_modules/fs-extra/lib/index.js index a56bb0c..7b874d5 100644 --- a/node_modules/fs-extra/lib/index.js +++ b/node_modules/fs-extra/lib/index.js @@ -20,6 +20,7 @@ assign(fs, require('./empty')) assign(fs, require('./ensure')) assign(fs, require('./output')) assign(fs, require('./walk')) +assign(fs, require('./walk-sync')) module.exports = fs diff --git a/node_modules/fs-extra/lib/move/index.js b/node_modules/fs-extra/lib/move/index.js index f28152f..1eb2a14 100644 --- a/node_modules/fs-extra/lib/move/index.js +++ b/node_modules/fs-extra/lib/move/index.js @@ -7,7 +7,7 @@ var fs = require('graceful-fs') var ncp = require('../copy/ncp') var path = require('path') -var rimraf = require('rimraf') +var remove = require('../remove').remove var mkdirp = require('../mkdirs').mkdirs function mv (source, dest, options, callback) { @@ -40,7 +40,7 @@ function mv (source, dest, options, callback) { if (!err) return callback() if (err.code === 'ENOTEMPTY' || err.code === 'EEXIST') { - rimraf(dest, function (err) { + remove(dest, function (err) { if (err) return callback(err) options.clobber = false // just clobbered it, no need to do it again mv(source, dest, options, callback) @@ -51,7 +51,7 @@ function mv (source, dest, options, callback) { // weird Windows shit if (err.code === 'EPERM') { setTimeout(function () { - rimraf(dest, function (err) { + remove(dest, function (err) { if (err) return callback(err) options.clobber = false mv(source, dest, options, callback) @@ -142,12 +142,12 @@ function moveDirAcrossDevice (source, dest, clobber, limit, callback) { function startNcp () { ncp(source, dest, options, function (errList) { if (errList) return callback(errList[0]) - rimraf(source, callback) + remove(source, callback) }) } if (clobber) { - rimraf(dest, function (err) { + remove(dest, function (err) { if (err) return callback(err) startNcp() }) diff --git a/node_modules/fs-extra/lib/remove/index.js b/node_modules/fs-extra/lib/remove/index.js index 925de67..566b866 100644 --- a/node_modules/fs-extra/lib/remove/index.js +++ b/node_modules/fs-extra/lib/remove/index.js @@ -1,11 +1,12 @@ -var rimraf = require('rimraf') +var rimraf = require('./rimraf') function removeSync (dir) { - return rimraf.sync(dir) + return rimraf.sync(dir, {disableGlob: true}) } function remove (dir, callback) { - return callback ? rimraf(dir, callback) : rimraf(dir, function () {}) + var options = {disableGlob: true} + return callback ? rimraf(dir, options, callback) : rimraf(dir, options, function () {}) } module.exports = { diff --git a/node_modules/fs-extra/lib/remove/rimraf.js b/node_modules/fs-extra/lib/remove/rimraf.js new file mode 100644 index 0000000..da55a62 --- /dev/null +++ b/node_modules/fs-extra/lib/remove/rimraf.js @@ -0,0 +1,301 @@ +module.exports = rimraf +rimraf.sync = rimrafSync + +var assert = require('assert') +var path = require('path') +var fs = require('graceful-fs') + +var isWindows = (process.platform === 'win32') + +function defaults (options) { + var methods = [ + 'unlink', + 'chmod', + 'stat', + 'lstat', + 'rmdir', + 'readdir' + ] + methods.forEach(function (m) { + options[m] = options[m] || fs[m] + m = m + 'Sync' + options[m] = options[m] || fs[m] + }) + + options.maxBusyTries = options.maxBusyTries || 3 +} + +function rimraf (p, options, cb) { + if (typeof options === 'function') { + cb = options + options = {} + } + + assert(p, 'rimraf: missing path') + assert.equal(typeof p, 'string', 'rimraf: path should be a string') + assert.equal(typeof cb, 'function', 'rimraf: callback function required') + assert(options, 'rimraf: invalid options argument provided') + assert.equal(typeof options, 'object', 'rimraf: options should be object') + + defaults(options) + + var busyTries = 0 + + rimraf_(p, options, function CB (er) { + if (er) { + if (isWindows && (er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') && + busyTries < options.maxBusyTries) { + busyTries++ + var time = busyTries * 100 + // try again, with the same exact callback as this one. + return setTimeout(function () { + rimraf_(p, options, CB) + }, time) + } + + // already gone + if (er.code === 'ENOENT') er = null + } + + cb(er) + }) +} + +// Two possible strategies. +// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR +// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR +// +// Both result in an extra syscall when you guess wrong. However, there +// are likely far more normal files in the world than directories. This +// is based on the assumption that a the average number of files per +// directory is >= 1. +// +// If anyone ever complains about this, then I guess the strategy could +// be made configurable somehow. But until then, YAGNI. +function rimraf_ (p, options, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + // sunos lets the root user unlink directories, which is... weird. + // so we have to lstat here and make sure it's not a dir. + options.lstat(p, function (er, st) { + if (er && er.code === 'ENOENT') { + return cb(null) + } + + // Windows can EPERM on stat. Life is suffering. + if (er && er.code === 'EPERM' && isWindows) { + fixWinEPERM(p, options, er, cb) + } + + if (st && st.isDirectory()) { + return rmdir(p, options, er, cb) + } + + options.unlink(p, function (er) { + if (er) { + if (er.code === 'ENOENT') { + return cb(null) + } + if (er.code === 'EPERM') { + return (isWindows) + ? fixWinEPERM(p, options, er, cb) + : rmdir(p, options, er, cb) + } + if (er.code === 'EISDIR') { + return rmdir(p, options, er, cb) + } + } + return cb(er) + }) + }) +} + +function fixWinEPERM (p, options, er, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + if (er) { + assert(er instanceof Error) + } + + options.chmod(p, 666, function (er2) { + if (er2) { + cb(er2.code === 'ENOENT' ? null : er) + } else { + options.stat(p, function (er3, stats) { + if (er3) { + cb(er3.code === 'ENOENT' ? null : er) + } else if (stats.isDirectory()) { + rmdir(p, options, er, cb) + } else { + options.unlink(p, cb) + } + }) + } + }) +} + +function fixWinEPERMSync (p, options, er) { + assert(p) + assert(options) + if (er) { + assert(er instanceof Error) + } + + try { + options.chmodSync(p, 666) + } catch (er2) { + if (er2.code === 'ENOENT') { + return + } else { + throw er + } + } + + try { + var stats = options.statSync(p) + } catch (er3) { + if (er3.code === 'ENOENT') { + return + } else { + throw er + } + } + + if (stats.isDirectory()) { + rmdirSync(p, options, er) + } else { + options.unlinkSync(p) + } +} + +function rmdir (p, options, originalEr, cb) { + assert(p) + assert(options) + if (originalEr) { + assert(originalEr instanceof Error) + } + assert(typeof cb === 'function') + + // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) + // if we guessed wrong, and it's not a directory, then + // raise the original error. + options.rmdir(p, function (er) { + if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) { + rmkids(p, options, cb) + } else if (er && er.code === 'ENOTDIR') { + cb(originalEr) + } else { + cb(er) + } + }) +} + +function rmkids (p, options, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + options.readdir(p, function (er, files) { + if (er) { + return cb(er) + } + var n = files.length + if (n === 0) { + return options.rmdir(p, cb) + } + var errState + files.forEach(function (f) { + rimraf(path.join(p, f), options, function (er) { + if (errState) { + return + } + if (er) { + return cb(errState = er) + } + if (--n === 0) { + options.rmdir(p, cb) + } + }) + }) + }) +} + +// this looks simpler, and is strictly *faster*, but will +// tie up the JavaScript thread and fail on excessively +// deep directory trees. +function rimrafSync (p, options) { + options = options || {} + defaults(options) + + assert(p, 'rimraf: missing path') + assert.equal(typeof p, 'string', 'rimraf: path should be a string') + assert(options, 'rimraf: missing options') + assert.equal(typeof options, 'object', 'rimraf: options should be object') + + try { + var st = options.lstatSync(p) + } catch (er) { + if (er.code === 'ENOENT') { + return + } + + // Windows can EPERM on stat. Life is suffering. + if (er.code === 'EPERM' && isWindows) { + fixWinEPERMSync(p, options, er) + } + } + + try { + // sunos lets the root user unlink directories, which is... weird. + if (st && st.isDirectory()) { + rmdirSync(p, options, null) + } else { + options.unlinkSync(p) + } + } catch (er) { + if (er.code === 'ENOENT') { + return + } + if (er.code === 'EPERM') { + return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) + } + if (er.code !== 'EISDIR') { + throw er + } + rmdirSync(p, options, er) + } +} + +function rmdirSync (p, options, originalEr) { + assert(p) + assert(options) + if (originalEr) { + assert(originalEr instanceof Error) + } + + try { + options.rmdirSync(p) + } catch (er) { + if (er.code === 'ENOENT') { + return + } + if (er.code === 'ENOTDIR') { + throw originalEr + } + if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') { + rmkidsSync(p, options) + } + } +} + +function rmkidsSync (p, options) { + assert(p) + assert(options) + options.readdirSync(p).forEach(function (f) { + rimrafSync(path.join(p, f), options) + }) + options.rmdirSync(p, options) +} diff --git a/node_modules/fs-extra/lib/util/utimes.js b/node_modules/fs-extra/lib/util/utimes.js index c99b010..118f8a7 100644 --- a/node_modules/fs-extra/lib/util/utimes.js +++ b/node_modules/fs-extra/lib/util/utimes.js @@ -54,9 +54,10 @@ function utimesMillis (path, atime, mtime, callback) { // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback) fs.open(path, 'r+', function (err, fd) { if (err) return callback(err) - fs.futimes(fd, atime, mtime, function (err) { - if (err) return callback(err) - fs.close(fd, callback) + fs.futimes(fd, atime, mtime, function (futimesErr) { + fs.close(fd, function (closeErr) { + if (callback) callback(futimesErr || closeErr) + }) }) }) } diff --git a/node_modules/fs-extra/lib/walk-sync/index.js b/node_modules/fs-extra/lib/walk-sync/index.js new file mode 100644 index 0000000..0ebe56e --- /dev/null +++ b/node_modules/fs-extra/lib/walk-sync/index.js @@ -0,0 +1,20 @@ +var fs = require('graceful-fs') +var path = require('path') + +var walkSync = function (dir, filelist) { + var files = fs.readdirSync(dir) + filelist = filelist || [] + files.forEach(function (file) { + var nestedPath = path.join(dir, file) + if (fs.lstatSync(nestedPath).isDirectory()) { + filelist = walkSync(nestedPath, filelist) + } else { + filelist.push(nestedPath) + } + }) + return filelist +} + +module.exports = { + walkSync: walkSync +} diff --git a/node_modules/fs-extra/package.json b/node_modules/fs-extra/package.json index ab680d5..c7e0ac7 100644 --- a/node_modules/fs-extra/package.json +++ b/node_modules/fs-extra/package.json @@ -1,118 +1,61 @@ { - "_args": [ - [ - "fs-extra@^0.29.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\sass-lint" - ] - ], - "_from": "fs-extra@>=0.29.0 <0.30.0", - "_id": "fs-extra@0.29.0", - "_inCache": true, - "_installable": true, - "_location": "/fs-extra", - "_nodeVersion": "5.3.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/fs-extra-0.29.0.tgz_1461769184625_0.5794693247880787" - }, - "_npmUser": { - "email": "jprichardson@gmail.com", - "name": "jprichardson" - }, - "_npmVersion": "3.8.2", - "_phantomChildren": {}, - "_requested": { - "name": "fs-extra", - "raw": "fs-extra@^0.29.0", - "rawSpec": "^0.29.0", - "scope": null, - "spec": ">=0.29.0 <0.30.0", - "type": "range" - }, - "_requiredBy": [ - "/sass-lint" - ], - "_resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.29.0.tgz", - "_shasum": "3dd42d56dc399a700128b62472ef0967d3131eac", - "_shrinkwrap": null, - "_spec": "fs-extra@^0.29.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\sass-lint", - "author": { - "email": "jprichardson@gmail.com", - "name": "JP Richardson" - }, - "bugs": { - "url": "https://github.com/jprichardson/node-fs-extra/issues" - }, - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "rimraf": "^2.2.8" - }, + "name": "fs-extra", + "version": "1.0.0", "description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.", - "devDependencies": { - "coveralls": "^2.11.2", - "istanbul": "^0.3.5", - "minimist": "^1.1.1", - "mocha": "^2.1.0", - "read-dir-files": "^0.1.1", - "secure-random": "^1.1.1", - "semver": "^4.3.6", - "standard": "^7.0.0-beta.0" - }, - "directories": {}, - "dist": { - "shasum": "3dd42d56dc399a700128b62472ef0967d3131eac", - "tarball": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.29.0.tgz" - }, - "gitHead": "daa31b76a16ff246b80c68e34aca9e16b0e51a79", "homepage": "https://github.com/jprichardson/node-fs-extra", + "repository": { + "type": "git", + "url": "https://github.com/jprichardson/node-fs-extra" + }, "keywords": [ + "fs", + "file", + "file system", "copy", - "create", - "delete", "directory", "extra", - "extra", - "file", - "file system", - "fs", - "json", - "mkdir", "mkdirp", + "mkdir", "mkdirs", - "move", - "output", - "read", "recursive", + "json", + "read", + "write", + "extra", + "delete", "remove", - "text", "touch", - "write" + "create", + "text", + "output", + "move" ], + "author": "JP Richardson ", "license": "MIT", - "main": "./lib/index", - "maintainers": [ - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - } - ], - "name": "fs-extra", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jprichardson/node-fs-extra.git" + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0" }, + "devDependencies": { + "coveralls": "^2.11.2", + "istanbul": "^0.4.5", + "minimist": "^1.1.1", + "mocha": "^3.1.2", + "proxyquire": "^1.7.10", + "read-dir-files": "^0.1.1", + "rimraf": "^2.2.8", + "secure-random": "^1.1.1", + "semver": "^5.3.0", + "standard": "^8.5.0" + }, + "main": "./lib/index", "scripts": { - "coverage": "istanbul cover test.js", + "coverage": "istanbul cover -i 'lib/**' -x '**/__tests__/**' test.js", "coveralls": "npm run coverage && coveralls < coverage/lcov.info", "lint": "standard", - "test": "npm run lint && npm run unit", "test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha", + "test": "npm run lint && npm run unit", "unit": "node test.js" - }, - "version": "0.29.0" + } } diff --git a/node_modules/fs.realpath/LICENSE b/node_modules/fs.realpath/LICENSE new file mode 100644 index 0000000..5bd884c --- /dev/null +++ b/node_modules/fs.realpath/LICENSE @@ -0,0 +1,43 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---- + +This library bundles a version of the `fs.realpath` and `fs.realpathSync` +methods from Node.js v0.10 under the terms of the Node.js MIT license. + +Node's license follows, also included at the header of `old.js` which contains +the licensed code: + + Copyright Joyent, Inc. and other Node contributors. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. diff --git a/node_modules/fs.realpath/README.md b/node_modules/fs.realpath/README.md new file mode 100644 index 0000000..a42ceac --- /dev/null +++ b/node_modules/fs.realpath/README.md @@ -0,0 +1,33 @@ +# fs.realpath + +A backwards-compatible fs.realpath for Node v6 and above + +In Node v6, the JavaScript implementation of fs.realpath was replaced +with a faster (but less resilient) native implementation. That raises +new and platform-specific errors and cannot handle long or excessively +symlink-looping paths. + +This module handles those cases by detecting the new errors and +falling back to the JavaScript implementation. On versions of Node +prior to v6, it has no effect. + +## USAGE + +```js +var rp = require('fs.realpath') + +// async version +rp.realpath(someLongAndLoopingPath, function (er, real) { + // the ELOOP was handled, but it was a bit slower +}) + +// sync version +var real = rp.realpathSync(someLongAndLoopingPath) + +// monkeypatch at your own risk! +// This replaces the fs.realpath/fs.realpathSync builtins +rp.monkeypatch() + +// un-do the monkeypatching +rp.unmonkeypatch() +``` diff --git a/node_modules/fs.realpath/index.js b/node_modules/fs.realpath/index.js new file mode 100644 index 0000000..b09c7c7 --- /dev/null +++ b/node_modules/fs.realpath/index.js @@ -0,0 +1,66 @@ +module.exports = realpath +realpath.realpath = realpath +realpath.sync = realpathSync +realpath.realpathSync = realpathSync +realpath.monkeypatch = monkeypatch +realpath.unmonkeypatch = unmonkeypatch + +var fs = require('fs') +var origRealpath = fs.realpath +var origRealpathSync = fs.realpathSync + +var version = process.version +var ok = /^v[0-5]\./.test(version) +var old = require('./old.js') + +function newError (er) { + return er && er.syscall === 'realpath' && ( + er.code === 'ELOOP' || + er.code === 'ENOMEM' || + er.code === 'ENAMETOOLONG' + ) +} + +function realpath (p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb) + } + + if (typeof cache === 'function') { + cb = cache + cache = null + } + origRealpath(p, cache, function (er, result) { + if (newError(er)) { + old.realpath(p, cache, cb) + } else { + cb(er, result) + } + }) +} + +function realpathSync (p, cache) { + if (ok) { + return origRealpathSync(p, cache) + } + + try { + return origRealpathSync(p, cache) + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache) + } else { + throw er + } + } +} + +function monkeypatch () { + fs.realpath = realpath + fs.realpathSync = realpathSync +} + +function unmonkeypatch () { + fs.realpath = origRealpath + fs.realpathSync = origRealpathSync +} diff --git a/node_modules/fs.realpath/old.js b/node_modules/fs.realpath/old.js new file mode 100644 index 0000000..b40305e --- /dev/null +++ b/node_modules/fs.realpath/old.js @@ -0,0 +1,303 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var pathModule = require('path'); +var isWindows = process.platform === 'win32'; +var fs = require('fs'); + +// JavaScript implementation of realpath, ported from node pre-v6 + +var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + +function rethrow() { + // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and + // is fairly slow to generate. + var callback; + if (DEBUG) { + var backtrace = new Error; + callback = debugCallback; + } else + callback = missingCallback; + + return callback; + + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } + } + + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) + throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs + else if (!process.noDeprecation) { + var msg = 'fs: missing callback ' + (err.stack || err.message); + if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + } + } + } +} + +function maybeCallback(cb) { + return typeof cb === 'function' ? cb : rethrow(); +} + +var normalize = pathModule.normalize; + +// Regexp that finds the next partion of a (partial) path +// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] +if (isWindows) { + var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; +} else { + var nextPartRe = /(.*?)(?:[\/]+|$)/g; +} + +// Regex to find the device root, including trailing slash. E.g. 'c:\\'. +if (isWindows) { + var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; +} else { + var splitRootRe = /^[\/]*/; +} + +exports.realpathSync = function realpathSync(p, cache) { + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + // NB: p.length changes. + while (pos < p.length) { + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + continue; + } + + var resolvedLink; + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // some known symbolic link. no need to stat again. + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + continue; + } + + // read the link if it wasn't read before + // dev/ino always return 0 on windows, so skip the check. + var linkTarget = null; + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } + } + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + resolvedLink = pathModule.resolve(previous, linkTarget); + // track this, if given a cache. + if (cache) cache[base] = resolvedLink; + if (!isWindows) seenLinks[id] = linkTarget; + } + + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + + if (cache) cache[original] = p; + + return p; +}; + + +exports.realpath = function realpath(p, cache, cb) { + if (typeof cb !== 'function') { + cb = maybeCallback(cache); + cache = null; + } + + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + function LOOP() { + // stop if scanned past end of path + if (pos >= p.length) { + if (cache) cache[original] = p; + return cb(null, p); + } + + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + return process.nextTick(LOOP); + } + + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // known symbolic link. no need to stat again. + return gotResolvedLink(cache[base]); + } + + return fs.lstat(base, gotStat); + } + + function gotStat(err, stat) { + if (err) return cb(err); + + // if not a symlink, skip to the next path part + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + return process.nextTick(LOOP); + } + + // stat & read the link if not read before + // call gotTarget as soon as the link target is known + // dev/ino always return 0 on windows, so skip the check. + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + fs.stat(base, function(err) { + if (err) return cb(err); + + fs.readlink(base, function(err, target) { + if (!isWindows) seenLinks[id] = target; + gotTarget(err, target); + }); + }); + } + + function gotTarget(err, target, base) { + if (err) return cb(err); + + var resolvedLink = pathModule.resolve(previous, target); + if (cache) cache[base] = resolvedLink; + gotResolvedLink(resolvedLink); + } + + function gotResolvedLink(resolvedLink) { + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } +}; diff --git a/node_modules/fs.realpath/package.json b/node_modules/fs.realpath/package.json new file mode 100644 index 0000000..3edc57d --- /dev/null +++ b/node_modules/fs.realpath/package.json @@ -0,0 +1,26 @@ +{ + "name": "fs.realpath", + "version": "1.0.0", + "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", + "main": "index.js", + "dependencies": {}, + "devDependencies": {}, + "scripts": { + "test": "tap test/*.js --cov" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/fs.realpath.git" + }, + "keywords": [ + "realpath", + "fs", + "polyfill" + ], + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "files": [ + "old.js", + "index.js" + ] +} diff --git a/node_modules/generate-function/package.json b/node_modules/generate-function/package.json index c738ab0..6c4b38d 100644 --- a/node_modules/generate-function/package.json +++ b/node_modules/generate-function/package.json @@ -1,79 +1,29 @@ { - "_args": [ - [ - "generate-function@^2.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\is-my-json-valid" - ] - ], - "_from": "generate-function@>=2.0.0 <3.0.0", - "_id": "generate-function@2.0.0", - "_inCache": true, - "_installable": true, - "_location": "/generate-function", - "_npmUser": { - "email": "mathiasbuus@gmail.com", - "name": "mafintosh" - }, - "_npmVersion": "1.4.23", - "_phantomChildren": {}, - "_requested": { - "name": "generate-function", - "raw": "generate-function@^2.0.0", - "rawSpec": "^2.0.0", - "scope": null, - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/is-my-json-valid" - ], - "_resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", - "_shasum": "6858fe7c0969b7d4e9093337647ac79f60dfbe74", - "_shrinkwrap": null, - "_spec": "generate-function@^2.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\is-my-json-valid", - "author": { - "name": "Mathias Buus" - }, - "bugs": { - "url": "https://github.com/mafintosh/generate-function/issues" - }, - "dependencies": {}, + "name": "generate-function", + "version": "2.0.0", "description": "Module that helps you write generated functions in Node", - "devDependencies": { - "tape": "^2.13.4" + "main": "index.js", + "scripts": { + "test": "tape test.js" }, - "directories": {}, - "dist": { - "shasum": "6858fe7c0969b7d4e9093337647ac79f60dfbe74", - "tarball": "http://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz" + "repository": { + "type": "git", + "url": "https://github.com/mafintosh/generate-function" }, - "gitHead": "3d5fc8de5859be95f58e3af9bfb5f663edd95149", - "homepage": "https://github.com/mafintosh/generate-function", "keywords": [ - "code", - "function", "generate", + "code", "generation", + "function", "performance" ], + "author": "Mathias Buus", "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - } - ], - "name": "generate-function", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/mafintosh/generate-function.git" - }, - "scripts": { - "test": "tape test.js" + "bugs": { + "url": "https://github.com/mafintosh/generate-function/issues" }, - "version": "2.0.0" + "homepage": "https://github.com/mafintosh/generate-function", + "devDependencies": { + "tape": "^2.13.4" + } } diff --git a/node_modules/generate-object-property/package.json b/node_modules/generate-object-property/package.json index b827be6..e6f7b11 100644 --- a/node_modules/generate-object-property/package.json +++ b/node_modules/generate-object-property/package.json @@ -1,76 +1,25 @@ { - "_args": [ - [ - "generate-object-property@^1.1.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\is-my-json-valid" - ] - ], - "_from": "generate-object-property@>=1.1.0 <2.0.0", - "_id": "generate-object-property@1.2.0", - "_inCache": true, - "_installable": true, - "_location": "/generate-object-property", - "_nodeVersion": "2.0.1", - "_npmUser": { - "email": "mathiasbuus@gmail.com", - "name": "mafintosh" - }, - "_npmVersion": "2.9.0", - "_phantomChildren": {}, - "_requested": { - "name": "generate-object-property", - "raw": "generate-object-property@^1.1.0", - "rawSpec": "^1.1.0", - "scope": null, - "spec": ">=1.1.0 <2.0.0", - "type": "range" + "name": "generate-object-property", + "version": "1.2.0", + "description": "Generate safe JS code that can used to reference a object property", + "repository": { + "type": "git", + "url": "https://github.com/mafintosh/generate-object-property" }, - "_requiredBy": [ - "/is-my-json-valid" - ], - "_resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "_shasum": "9c0e1c40308ce804f4783618b937fa88f99d50d0", - "_shrinkwrap": null, - "_spec": "generate-object-property@^1.1.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\is-my-json-valid", - "author": { - "name": "Mathias Buus", - "url": "@mafintosh" + "devDependencies": { + "tape": "^2.13.0" }, - "bugs": { - "url": "https://github.com/mafintosh/generate-object-property/issues" + "scripts": { + "test": "tape test.js" }, "dependencies": { "is-property": "^1.0.0" }, - "description": "Generate safe JS code that can used to reference a object property", - "devDependencies": { - "tape": "^2.13.0" - }, - "directories": {}, - "dist": { - "shasum": "9c0e1c40308ce804f4783618b937fa88f99d50d0", - "tarball": "http://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz" + "bugs": { + "url": "https://github.com/mafintosh/generate-object-property/issues" }, - "gitHead": "0dd7d411018de54b2eae63b424c15b3e50bd678c", "homepage": "https://github.com/mafintosh/generate-object-property", - "license": "MIT", "main": "index.js", - "maintainers": [ - { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - } - ], - "name": "generate-object-property", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/mafintosh/generate-object-property.git" - }, - "scripts": { - "test": "tape test.js" - }, - "version": "1.2.0" + "author": "Mathias Buus (@mafintosh)", + "license": "MIT" } diff --git a/node_modules/glob/README.md b/node_modules/glob/README.md index 9dd9384..baa1d1b 100644 --- a/node_modules/glob/README.md +++ b/node_modules/glob/README.md @@ -273,6 +273,9 @@ the filesystem. In the case of a symlink that cannot be resolved, the full absolute path to the matched entry is returned (though it will usually be a broken symlink) +* `absolute` Set to true to always receive absolute paths for matched + files. Unlike `realpath`, this also affects the values returned in + the `match` event. ## Comparisons to other fnmatch/glob implementations diff --git a/node_modules/glob/common.js b/node_modules/glob/common.js index 58dc41e..66651bb 100644 --- a/node_modules/glob/common.js +++ b/node_modules/glob/common.js @@ -80,6 +80,7 @@ function setopts (self, pattern, options) { self.nocase = !!options.nocase self.stat = !!options.stat self.noprocess = !!options.noprocess + self.absolute = !!options.absolute self.maxLength = options.maxLength || Infinity self.cache = options.cache || Object.create(null) @@ -102,7 +103,11 @@ function setopts (self, pattern, options) { if (process.platform === "win32") self.root = self.root.replace(/\\/g, "/") - self.cwdAbs = makeAbs(self, self.cwd) + // TODO: is an absolute `cwd` supposed to be resolved against `root`? + // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') + self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) + if (process.platform === "win32") + self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") self.nomount = !!options.nomount // disable comments and negation in Minimatch. diff --git a/node_modules/glob/glob.js b/node_modules/glob/glob.js index 4dba04a..bfdd7a1 100644 --- a/node_modules/glob/glob.js +++ b/node_modules/glob/glob.js @@ -41,6 +41,7 @@ module.exports = glob var fs = require('fs') +var rp = require('fs.realpath') var minimatch = require('minimatch') var Minimatch = minimatch.Minimatch var inherits = require('inherits') @@ -99,6 +100,10 @@ glob.hasMagic = function (pattern, options_) { var g = new Glob(pattern, options) var set = g.minimatch.set + + if (!pattern) + return false + if (set.length > 1) return true @@ -232,7 +237,7 @@ Glob.prototype._realpathSet = function (index, cb) { // one or more of the links in the realpath couldn't be // resolved. just return the abs value in that case. p = self._makeAbs(p) - fs.realpath(p, self.realpathCache, function (er, real) { + rp.realpath(p, self.realpathCache, function (er, real) { if (!er) set[real] = true else if (er.syscall === 'stat') @@ -452,9 +457,6 @@ Glob.prototype._emitMatch = function (index, e) { if (this.aborted) return - if (this.matches[index][e]) - return - if (isIgnored(this, e)) return @@ -463,7 +465,16 @@ Glob.prototype._emitMatch = function (index, e) { return } - var abs = this._makeAbs(e) + var abs = isAbsolute(e) ? e : this._makeAbs(e) + + if (this.mark) + e = this._mark(e) + + if (this.absolute) + e = abs + + if (this.matches[index][e]) + return if (this.nodir) { var c = this.cache[abs] @@ -471,9 +482,6 @@ Glob.prototype._emitMatch = function (index, e) { return } - if (this.mark) - e = this._mark(e) - this.matches[index][e] = true var st = this.statCache[abs] @@ -500,15 +508,15 @@ Glob.prototype._readdirInGlobStar = function (abs, cb) { fs.lstat(abs, lstatcb) function lstatcb_ (er, lstat) { - if (er) + if (er && er.code === 'ENOENT') return cb() - var isSym = lstat.isSymbolicLink() + var isSym = lstat && lstat.isSymbolicLink() self.symlinks[abs] = isSym // If it's not a symlink or a dir, then it's definitely a regular file. // don't bother doing a readdir in that case. - if (!isSym && !lstat.isDirectory()) { + if (!isSym && lstat && !lstat.isDirectory()) { self.cache[abs] = 'FILE' cb() } else @@ -761,7 +769,7 @@ Glob.prototype._stat = function (f, cb) { } Glob.prototype._stat2 = function (f, abs, er, stat, cb) { - if (er) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { this.statCache[abs] = false return cb() } @@ -769,13 +777,15 @@ Glob.prototype._stat2 = function (f, abs, er, stat, cb) { var needDir = f.slice(-1) === '/' this.statCache[abs] = stat - if (abs.slice(-1) === '/' && !stat.isDirectory()) + if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) return cb(null, false, stat) - var c = stat.isDirectory() ? 'DIR' : 'FILE' + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' this.cache[abs] = this.cache[abs] || c - if (needDir && c !== 'DIR') + if (needDir && c === 'FILE') return cb() return cb(null, c, stat) diff --git a/node_modules/glob/package.json b/node_modules/glob/package.json index c905a4a..e403b4f 100644 --- a/node_modules/glob/package.json +++ b/node_modules/glob/package.json @@ -1,104 +1,43 @@ { - "_args": [ - [ - "glob@^7.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\sass-lint" - ] - ], - "_from": "glob@>=7.0.0 <8.0.0", - "_id": "glob@7.0.3", - "_inCache": true, - "_installable": true, - "_location": "/glob", - "_nodeVersion": "5.6.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/glob-7.0.3.tgz_1457166529288_0.7840580905321985" - }, - "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" - }, - "_npmVersion": "3.7.3", - "_phantomChildren": {}, - "_requested": { - "name": "glob", - "raw": "glob@^7.0.0", - "rawSpec": "^7.0.0", - "scope": null, - "spec": ">=7.0.0 <8.0.0", - "type": "range" + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "name": "glob", + "description": "a little globber", + "version": "7.1.1", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-glob.git" }, - "_requiredBy": [ - "/eslint", - "/rimraf", - "/sass-lint" + "main": "glob.js", + "files": [ + "glob.js", + "sync.js", + "common.js" ], - "_resolved": "https://registry.npmjs.org/glob/-/glob-7.0.3.tgz", - "_shasum": "0aa235931a4a96ac13d60ffac2fb877bd6ed4f58", - "_shrinkwrap": null, - "_spec": "glob@^7.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\sass-lint", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/node-glob/issues" + "engines": { + "node": "*" }, "dependencies": { + "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "2 || 3", + "minimatch": "^3.0.2", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, - "description": "a little globber", "devDependencies": { "mkdirp": "0", "rimraf": "^2.2.8", - "tap": "^5.7.0", + "tap": "^7.1.2", "tick": "0.0.6" }, - "directories": {}, - "dist": { - "shasum": "0aa235931a4a96ac13d60ffac2fb877bd6ed4f58", - "tarball": "https://registry.npmjs.org/glob/-/glob-7.0.3.tgz" - }, - "engines": { - "node": "*" - }, - "files": [ - "common.js", - "glob.js", - "sync.js" - ], - "gitHead": "2fc2278ab857c7df117213a2fb431de090be6353", - "homepage": "https://github.com/isaacs/node-glob#readme", - "license": "ISC", - "main": "glob.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "glob", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, "scripts": { - "bench": "bash benchmark.sh", - "benchclean": "node benchclean.js", "prepublish": "npm run benchclean", - "prof": "bash prof.sh && cat profile.txt", "profclean": "rm -f v8.log profile.txt", "test": "tap test/*.js --cov", - "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" + "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", + "bench": "bash benchmark.sh", + "prof": "bash prof.sh && cat profile.txt", + "benchclean": "node benchclean.js" }, - "version": "7.0.3" + "license": "ISC" } diff --git a/node_modules/glob/sync.js b/node_modules/glob/sync.js index 301577a..c952134 100644 --- a/node_modules/glob/sync.js +++ b/node_modules/glob/sync.js @@ -2,6 +2,7 @@ module.exports = globSync globSync.GlobSync = GlobSync var fs = require('fs') +var rp = require('fs.realpath') var minimatch = require('minimatch') var Minimatch = minimatch.Minimatch var Glob = require('./glob.js').Glob @@ -15,6 +16,7 @@ var alphasorti = common.alphasorti var setopts = common.setopts var ownProp = common.ownProp var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored function globSync (pattern, options) { if (typeof options === 'function' || arguments.length === 3) @@ -57,7 +59,7 @@ GlobSync.prototype._finish = function () { for (var p in matchset) { try { p = self._makeAbs(p) - var real = fs.realpathSync(p, self.realpathCache) + var real = rp.realpathSync(p, self.realpathCache) set[real] = true } catch (er) { if (er.syscall === 'stat') @@ -186,7 +188,7 @@ GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, if (e.charAt(0) === '/' && !this.nomount) { e = path.join(this.root, e) } - this.matches[index][e] = true + this._emitMatch(index, e) } // This was the last one, and no stats were needed return @@ -208,20 +210,29 @@ GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, GlobSync.prototype._emitMatch = function (index, e) { + if (isIgnored(this, e)) + return + var abs = this._makeAbs(e) + if (this.mark) e = this._mark(e) + if (this.absolute) { + e = abs + } + if (this.matches[index][e]) return if (this.nodir) { - var c = this.cache[this._makeAbs(e)] + var c = this.cache[abs] if (c === 'DIR' || Array.isArray(c)) return } this.matches[index][e] = true + if (this.stat) this._stat(e) } @@ -239,16 +250,18 @@ GlobSync.prototype._readdirInGlobStar = function (abs) { try { lstat = fs.lstatSync(abs) } catch (er) { - // lstat failed, doesn't exist - return null + if (er.code === 'ENOENT') { + // lstat failed, doesn't exist + return null + } } - var isSym = lstat.isSymbolicLink() + var isSym = lstat && lstat.isSymbolicLink() this.symlinks[abs] = isSym // If it's not a symlink or a dir, then it's definitely a regular file. // don't bother doing a readdir in that case. - if (!isSym && !lstat.isDirectory()) + if (!isSym && lstat && !lstat.isDirectory()) this.cache[abs] = 'FILE' else entries = this._readdir(abs, false) @@ -398,7 +411,7 @@ GlobSync.prototype._processSimple = function (prefix, index) { prefix = prefix.replace(/\\/g, '/') // Mark this as a match - this.matches[index][prefix] = true + this._emitMatch(index, prefix) } // Returns either 'DIR', 'FILE', or false @@ -433,10 +446,13 @@ GlobSync.prototype._stat = function (f) { try { lstat = fs.lstatSync(abs) } catch (er) { - return false + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false + return false + } } - if (lstat.isSymbolicLink()) { + if (lstat && lstat.isSymbolicLink()) { try { stat = fs.statSync(abs) } catch (er) { @@ -449,10 +465,13 @@ GlobSync.prototype._stat = function (f) { this.statCache[abs] = stat - var c = stat.isDirectory() ? 'DIR' : 'FILE' + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c - if (needDir && c !== 'DIR') + if (needDir && c === 'FILE') return false return c diff --git a/node_modules/globals/globals.json b/node_modules/globals/globals.json index 0b29757..38b2a89 100644 --- a/node_modules/globals/globals.json +++ b/node_modules/globals/globals.json @@ -217,6 +217,8 @@ "confirm": false, "console": false, "ConvolverNode": false, + "Credential": false, + "CredentialsContainer": false, "crypto": false, "Crypto": false, "CryptoKey": false, @@ -237,6 +239,7 @@ "CSSTransition": false, "CSSUnknownRule": false, "CSSViewportRule": false, + "customElements": false, "CustomEvent": false, "DataTransfer": false, "DataTransferItem": false, @@ -272,6 +275,7 @@ "EventSource": false, "EventTarget": false, "external": false, + "FederatedCredential": false, "fetch": false, "File": false, "FileError": false, @@ -394,6 +398,8 @@ "innerWidth": false, "InputEvent": false, "InputMethodContext": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, "Intl": false, "KeyboardEvent": false, "KeyframeEffect": false, @@ -418,6 +424,7 @@ "MediaQueryList": false, "MediaQueryListEvent": false, "MediaSource": false, + "MediaStream": false, "MediaStreamAudioDestinationNode": false, "MediaStreamAudioSourceNode": false, "MediaStreamEvent": false, @@ -473,6 +480,7 @@ "pageXOffset": false, "pageYOffset": false, "parent": false, + "PasswordCredential": false, "Path2D": false, "performance": false, "Performance": false, @@ -493,6 +501,7 @@ "print": false, "ProcessingInstruction": false, "ProgressEvent": false, + "PromiseRejectionEvent": false, "prompt": false, "PushManager": false, "PushSubscription": false, @@ -503,11 +512,13 @@ "removeEventListener": false, "Request": false, "requestAnimationFrame": false, + "requestIdleCallback": false, "resizeBy": false, "resizeTo": false, "Response": false, "RTCIceCandidate": false, "RTCSessionDescription": false, + "RTCPeerConnection": false, "screen": false, "Screen": false, "screenLeft": false, @@ -535,6 +546,7 @@ "SharedKeyframeList": false, "SharedWorker": false, "showModalDialog": false, + "SiteBoundCredential": false, "speechSynthesis": false, "SpeechSynthesisEvent": false, "SpeechSynthesisUtterance": false, @@ -873,6 +885,7 @@ "describe": false, "it": false, "mocha": false, + "run": false, "setup": false, "specify": false, "suite": false, @@ -906,16 +919,23 @@ "xit": false }, "jest": { + "afterAll": false, "afterEach": false, + "beforeAll": false, "beforeEach": false, + "check": false, "describe": false, "expect": false, + "gen": false, "it": false, + "fit": false, "jest": false, "pit": false, "require": false, + "test": false, "xdescribe": false, - "xit": false + "xit": false, + "xtest": false }, "qunit": { "asyncTest": false, @@ -1046,9 +1066,11 @@ "pwd": false, "rm": false, "sed": false, + "set": false, "target": false, "tempdir": false, "test": false, + "touch": false, "which": false }, "prototypejs": { diff --git a/node_modules/globals/package.json b/node_modules/globals/package.json index 5d40434..8b0bc24 100644 --- a/node_modules/globals/package.json +++ b/node_modules/globals/package.json @@ -1,107 +1,35 @@ { - "_args": [ - [ - "globals@^9.2.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "globals@>=9.2.0 <10.0.0", - "_id": "globals@9.6.0", - "_inCache": true, - "_installable": true, - "_location": "/globals", - "_nodeVersion": "4.4.2", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/globals-9.6.0.tgz_1462095920050_0.08107598079368472" - }, - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "3.8.9", - "_phantomChildren": {}, - "_requested": { - "name": "globals", - "raw": "globals@^9.2.0", - "rawSpec": "^9.2.0", - "scope": null, - "spec": ">=9.2.0 <10.0.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/globals/-/globals-9.6.0.tgz", - "_shasum": "b34eef40f2583df0b7f58645e39636c601c5b79f", - "_shrinkwrap": null, - "_spec": "globals@^9.2.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint", + "name": "globals", + "version": "9.14.0", + "description": "Global identifiers from different JavaScript environments", + "license": "MIT", + "repository": "sindresorhus/globals", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/globals/issues" - }, - "dependencies": {}, - "description": "Global identifiers from different JavaScript environments", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "b34eef40f2583df0b7f58645e39636c601c5b79f", - "tarball": "https://registry.npmjs.org/globals/-/globals-9.6.0.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "mocha" + }, "files": [ - "globals.json", - "index.js" + "index.js", + "globals.json" ], - "gitHead": "def3a004b15985b94aeead981478659701c7ff06", - "homepage": "https://github.com/sindresorhus/globals#readme", "keywords": [ - "environments", - "eslint", - "global", "globals", + "global", "identifiers", - "jshint", "variables", - "vars" - ], - "license": "MIT", - "maintainers": [ - { - "name": "byk", - "email": "ben@byk.im" - }, - { - "name": "lo1tuma", - "email": "schreck.mathias@gmail.com" - }, - { - "name": "nzakas", - "email": "nicholas@nczconsulting.com" - }, - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } + "vars", + "jshint", + "eslint", + "environments" ], - "name": "globals", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/globals.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "9.6.0" + "devDependencies": { + "mocha": "*" + } } diff --git a/node_modules/globby/index.js b/node_modules/globby/index.js index 8f20018..39da9f6 100644 --- a/node_modules/globby/index.js +++ b/node_modules/globby/index.js @@ -6,63 +6,60 @@ var glob = require('glob'); var arrify = require('arrify'); var pify = require('pify'); -function sortPatterns(patterns) { - patterns = arrify(patterns); +var globP = pify(glob, Promise).bind(glob); - var positives = []; - var negatives = []; +function isNegative(pattern) { + return pattern[0] === '!'; +} - patterns.forEach(function (pattern, index) { - var isNegative = pattern[0] === '!'; - (isNegative ? negatives : positives).push({ - index: index, - pattern: isNegative ? pattern.slice(1) : pattern - }); - }); +function generateGlobTasks(patterns, opts) { + var globTasks = []; - return { - positives: positives, - negatives: negatives - }; -} + patterns = arrify(patterns); + opts = objectAssign({ + cache: Object.create(null), + statCache: Object.create(null), + realpathCache: Object.create(null), + symlinks: Object.create(null), + ignore: [] + }, opts); -function setIgnore(opts, negatives, positiveIndex) { - opts = objectAssign({}, opts); + patterns.forEach(function (pattern, i) { + if (isNegative(pattern)) { + return; + } - var negativePatterns = negatives.filter(function (negative) { - return negative.index > positiveIndex; - }).map(function (negative) { - return negative.pattern; + var ignore = patterns.slice(i).filter(isNegative).map(function (pattern) { + return pattern.slice(1); + }); + + globTasks.push({ + pattern: pattern, + opts: objectAssign({}, opts, { + ignore: opts.ignore.concat(ignore) + }) + }); }); - opts.ignore = (opts.ignore || []).concat(negativePatterns); - return opts; + return globTasks; } module.exports = function (patterns, opts) { - var sortedPatterns = sortPatterns(patterns); - opts = opts || {}; + var globTasks = generateGlobTasks(patterns, opts); - if (sortedPatterns.positives.length === 0) { - return Promise.resolve([]); - } - - return Promise.all(sortedPatterns.positives.map(function (positive) { - var globOpts = setIgnore(opts, sortedPatterns.negatives, positive.index); - return pify(glob, Promise)(positive.pattern, globOpts); + return Promise.all(globTasks.map(function (task) { + return globP(task.pattern, task.opts); })).then(function (paths) { return arrayUnion.apply(null, paths); }); }; module.exports.sync = function (patterns, opts) { - var sortedPatterns = sortPatterns(patterns); - - if (sortedPatterns.positives.length === 0) { - return []; - } + var globTasks = generateGlobTasks(patterns, opts); - return sortedPatterns.positives.reduce(function (ret, positive) { - return arrayUnion(ret, glob.sync(positive.pattern, setIgnore(opts, sortedPatterns.negatives, positive.index))); + return globTasks.reduce(function (matches, task) { + return arrayUnion(matches, glob.sync(task.pattern, task.opts)); }, []); }; + +module.exports.generateGlobTasks = generateGlobTasks; diff --git a/node_modules/globby/node_modules/glob/LICENSE b/node_modules/globby/node_modules/glob/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/globby/node_modules/glob/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/globby/node_modules/glob/README.md b/node_modules/globby/node_modules/glob/README.md deleted file mode 100644 index 6960483..0000000 --- a/node_modules/globby/node_modules/glob/README.md +++ /dev/null @@ -1,359 +0,0 @@ -# Glob - -Match files using the patterns the shell uses, like stars and stuff. - -[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Build Status](https://ci.appveyor.com/api/projects/status/kd7f3yftf7unxlsx?svg=true)](https://ci.appveyor.com/project/isaacs/node-glob) [![Coverage Status](https://coveralls.io/repos/isaacs/node-glob/badge.svg?branch=master&service=github)](https://coveralls.io/github/isaacs/node-glob?branch=master) - -This is a glob implementation in JavaScript. It uses the `minimatch` -library to do its matching. - -![](oh-my-glob.gif) - -## Usage - -```javascript -var glob = require("glob") - -// options is optional -glob("**/*.js", options, function (er, files) { - // files is an array of filenames. - // If the `nonull` option is set, and nothing - // was found, then files is ["**/*.js"] - // er is an error object or null. -}) -``` - -## Glob Primer - -"Globs" are the patterns you type when you do stuff like `ls *.js` on -the command line, or put `build/*` in a `.gitignore` file. - -Before parsing the path part patterns, braced sections are expanded -into a set. Braced sections start with `{` and end with `}`, with any -number of comma-delimited sections within. Braced sections may contain -slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. - -The following characters have special magic meaning when used in a -path portion: - -* `*` Matches 0 or more characters in a single path portion -* `?` Matches 1 character -* `[...]` Matches a range of characters, similar to a RegExp range. - If the first character of the range is `!` or `^` then it matches - any character not in the range. -* `!(pattern|pattern|pattern)` Matches anything that does not match - any of the patterns provided. -* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the - patterns provided. -* `+(pattern|pattern|pattern)` Matches one or more occurrences of the - patterns provided. -* `*(a|b|c)` Matches zero or more occurrences of the patterns provided -* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns - provided -* `**` If a "globstar" is alone in a path portion, then it matches - zero or more directories and subdirectories searching for matches. - It does not crawl symlinked directories. - -### Dots - -If a file or directory path portion has a `.` as the first character, -then it will not match any glob pattern unless that pattern's -corresponding path part also has a `.` as its first character. - -For example, the pattern `a/.*/c` would match the file at `a/.b/c`. -However the pattern `a/*/c` would not, because `*` does not start with -a dot character. - -You can make glob treat dots as normal characters by setting -`dot:true` in the options. - -### Basename Matching - -If you set `matchBase:true` in the options, and the pattern has no -slashes in it, then it will seek for any file anywhere in the tree -with a matching basename. For example, `*.js` would match -`test/simple/basic.js`. - -### Empty Sets - -If no matching files are found, then an empty array is returned. This -differs from the shell, where the pattern itself is returned. For -example: - - $ echo a*s*d*f - a*s*d*f - -To get the bash-style behavior, set the `nonull:true` in the options. - -### See Also: - -* `man sh` -* `man bash` (Search for "Pattern Matching") -* `man 3 fnmatch` -* `man 5 gitignore` -* [minimatch documentation](https://github.com/isaacs/minimatch) - -## glob.hasMagic(pattern, [options]) - -Returns `true` if there are any special characters in the pattern, and -`false` otherwise. - -Note that the options affect the results. If `noext:true` is set in -the options object, then `+(a|b)` will not be considered a magic -pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` -then that is considered magical, unless `nobrace:true` is set in the -options. - -## glob(pattern, [options], cb) - -* `pattern` `{String}` Pattern to be matched -* `options` `{Object}` -* `cb` `{Function}` - * `err` `{Error | null}` - * `matches` `{Array}` filenames found matching the pattern - -Perform an asynchronous glob search. - -## glob.sync(pattern, [options]) - -* `pattern` `{String}` Pattern to be matched -* `options` `{Object}` -* return: `{Array}` filenames found matching the pattern - -Perform a synchronous glob search. - -## Class: glob.Glob - -Create a Glob object by instantiating the `glob.Glob` class. - -```javascript -var Glob = require("glob").Glob -var mg = new Glob(pattern, options, cb) -``` - -It's an EventEmitter, and starts walking the filesystem to find matches -immediately. - -### new glob.Glob(pattern, [options], [cb]) - -* `pattern` `{String}` pattern to search for -* `options` `{Object}` -* `cb` `{Function}` Called when an error occurs, or matches are found - * `err` `{Error | null}` - * `matches` `{Array}` filenames found matching the pattern - -Note that if the `sync` flag is set in the options, then matches will -be immediately available on the `g.found` member. - -### Properties - -* `minimatch` The minimatch object that the glob uses. -* `options` The options object passed in. -* `aborted` Boolean which is set to true when calling `abort()`. There - is no way at this time to continue a glob search after aborting, but - you can re-use the statCache to avoid having to duplicate syscalls. -* `cache` Convenience object. Each field has the following possible - values: - * `false` - Path does not exist - * `true` - Path exists - * `'FILE'` - Path exists, and is not a directory - * `'DIR'` - Path exists, and is a directory - * `[file, entries, ...]` - Path exists, is a directory, and the - array value is the results of `fs.readdir` -* `statCache` Cache of `fs.stat` results, to prevent statting the same - path multiple times. -* `symlinks` A record of which paths are symbolic links, which is - relevant in resolving `**` patterns. -* `realpathCache` An optional object which is passed to `fs.realpath` - to minimize unnecessary syscalls. It is stored on the instantiated - Glob object, and may be re-used. - -### Events - -* `end` When the matching is finished, this is emitted with all the - matches found. If the `nonull` option is set, and no match was found, - then the `matches` list contains the original pattern. The matches - are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the specific - thing that matched. It is not deduplicated or resolved to a realpath. -* `error` Emitted when an unexpected error is encountered, or whenever - any fs error occurs if `options.strict` is set. -* `abort` When `abort()` is called, this event is raised. - -### Methods - -* `pause` Temporarily stop the search -* `resume` Resume the search -* `abort` Stop the search forever - -### Options - -All the options that can be passed to Minimatch can also be passed to -Glob to change pattern matching behavior. Also, some have been added, -or have glob-specific ramifications. - -All options are false by default, unless otherwise noted. - -All options are added to the Glob object, as well. - -If you are running many `glob` operations, you can pass a Glob object -as the `options` argument to a subsequent operation to shortcut some -`stat` and `readdir` calls. At the very least, you may pass in shared -`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that -parallel glob operations will be sped up by sharing information about -the filesystem. - -* `cwd` The current working directory in which to search. Defaults - to `process.cwd()`. -* `root` The place where patterns starting with `/` will be mounted - onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix - systems, and `C:\` or some such on Windows.) -* `dot` Include `.dot` files in normal matches and `globstar` matches. - Note that an explicit dot in a portion of the pattern will always - match dot files. -* `nomount` By default, a pattern starting with a forward-slash will be - "mounted" onto the root setting, so that a valid filesystem path is - returned. Set this flag to disable that behavior. -* `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. -* `nosort` Don't sort the results. -* `stat` Set to true to stat *all* results. This reduces performance - somewhat, and is completely unnecessary, unless `readdir` is presumed - to be an untrustworthy indicator of file existence. -* `silent` When an unusual error is encountered when attempting to - read a directory, a warning will be printed to stderr. Set the - `silent` option to true to suppress these warnings. -* `strict` When an unusual error is encountered when attempting to - read a directory, the process will just continue on in search of - other matches. Set the `strict` option to raise an error in these - cases. -* `cache` See `cache` property above. Pass in a previously generated - cache object to save some fs calls. -* `statCache` A cache of results of filesystem information, to prevent - unnecessary stat calls. While it should not normally be necessary - to set this, you may pass the statCache from one glob() call to the - options object of another, if you know that the filesystem will not - change between calls. (See "Race Conditions" below.) -* `symlinks` A cache of known symbolic links. You may pass in a - previously generated `symlinks` object to save `lstat` calls when - resolving `**` matches. -* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. -* `nounique` In some cases, brace-expanded patterns can result in the - same file showing up multiple times in the result set. By default, - this implementation prevents duplicates in the result set. Set this - flag to disable that behavior. -* `nonull` Set to never return an empty set, instead returning a set - containing the pattern itself. This is the default in glob(3). -* `debug` Set to enable debug logging in minimatch and glob. -* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. -* `noglobstar` Do not match `**` against multiple filenames. (Ie, - treat it as a normal `*` instead.) -* `noext` Do not match `+(a|b)` "extglob" patterns. -* `nocase` Perform a case-insensitive match. Note: on - case-insensitive filesystems, non-magic patterns will match by - default, since `stat` and `readdir` will not raise errors. -* `matchBase` Perform a basename-only match if the pattern does not - contain any slash characters. That is, `*.js` would be treated as - equivalent to `**/*.js`, matching all js files in all directories. -* `nodir` Do not match directories, only files. (Note: to match - *only* directories, simply put a `/` at the end of the pattern.) -* `ignore` Add a pattern or an array of glob patterns to exclude matches. - Note: `ignore` patterns are *always* in `dot:true` mode, regardless - of any other settings. -* `follow` Follow symlinked directories when expanding `**` patterns. - Note that this can result in a lot of duplicate references in the - presence of cyclic links. -* `realpath` Set to true to call `fs.realpath` on all of the results. - In the case of a symlink that cannot be resolved, the full absolute - path to the matched entry is returned (though it will usually be a - broken symlink) - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between node-glob and other -implementations, and are intentional. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.3, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -Note that symlinked directories are not crawled as part of a `**`, -though their contents may match against subsequent portions of the -pattern. This prevents infinite loops and duplicates and the like. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then glob returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -### Comments and Negation - -Previously, this module let you mark a pattern as a "comment" if it -started with a `#` character, or a "negated" pattern if it started -with a `!` character. - -These options were deprecated in version 5, and removed in version 6. - -To specify things that should not match, use the `ignore` option. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will always -be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto the -root setting using `path.join`. On windows, this will by default result -in `/foo/*` matching `C:\foo\bar.txt`. - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race conditions, -since it relies on directory walking and such. - -As a result, it is possible that a file that exists when glob looks for -it may have been deleted or modified by the time it returns the result. - -As part of its internal implementation, this program caches all stat -and readdir calls that it makes, in order to cut down on system -overhead. However, this also makes it even more susceptible to races, -especially if the cache or statCache objects are reused between glob -calls. - -Users are thus advised not to use a glob result as a guarantee of -filesystem state in the face of rapid changes. For the vast majority -of operations, this is never a problem. - -## Contributing - -Any change to behavior (including bugfixes) must come with a test. - -Patches that fail tests or reduce performance will be rejected. - -``` -# to run tests -npm test - -# to re-generate test fixtures -npm run test-regen - -# to benchmark against bash/zsh -npm run bench - -# to profile javascript -npm run prof -``` diff --git a/node_modules/globby/node_modules/glob/common.js b/node_modules/globby/node_modules/glob/common.js deleted file mode 100644 index c9127eb..0000000 --- a/node_modules/globby/node_modules/glob/common.js +++ /dev/null @@ -1,226 +0,0 @@ -exports.alphasort = alphasort -exports.alphasorti = alphasorti -exports.setopts = setopts -exports.ownProp = ownProp -exports.makeAbs = makeAbs -exports.finish = finish -exports.mark = mark -exports.isIgnored = isIgnored -exports.childrenIgnored = childrenIgnored - -function ownProp (obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field) -} - -var path = require("path") -var minimatch = require("minimatch") -var isAbsolute = require("path-is-absolute") -var Minimatch = minimatch.Minimatch - -function alphasorti (a, b) { - return a.toLowerCase().localeCompare(b.toLowerCase()) -} - -function alphasort (a, b) { - return a.localeCompare(b) -} - -function setupIgnores (self, options) { - self.ignore = options.ignore || [] - - if (!Array.isArray(self.ignore)) - self.ignore = [self.ignore] - - if (self.ignore.length) { - self.ignore = self.ignore.map(ignoreMap) - } -} - -// ignore patterns are always in dot:true mode. -function ignoreMap (pattern) { - var gmatcher = null - if (pattern.slice(-3) === '/**') { - var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern, { dot: true }) - } - - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher: gmatcher - } -} - -function setopts (self, pattern, options) { - if (!options) - options = {} - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - self.silent = !!options.silent - self.pattern = pattern - self.strict = options.strict !== false - self.realpath = !!options.realpath - self.realpathCache = options.realpathCache || Object.create(null) - self.follow = !!options.follow - self.dot = !!options.dot - self.mark = !!options.mark - self.nodir = !!options.nodir - if (self.nodir) - self.mark = true - self.sync = !!options.sync - self.nounique = !!options.nounique - self.nonull = !!options.nonull - self.nosort = !!options.nosort - self.nocase = !!options.nocase - self.stat = !!options.stat - self.noprocess = !!options.noprocess - - self.maxLength = options.maxLength || Infinity - self.cache = options.cache || Object.create(null) - self.statCache = options.statCache || Object.create(null) - self.symlinks = options.symlinks || Object.create(null) - - setupIgnores(self, options) - - self.changedCwd = false - var cwd = process.cwd() - if (!ownProp(options, "cwd")) - self.cwd = cwd - else { - self.cwd = options.cwd - self.changedCwd = path.resolve(options.cwd) !== cwd - } - - self.root = options.root || path.resolve(self.cwd, "/") - self.root = path.resolve(self.root) - if (process.platform === "win32") - self.root = self.root.replace(/\\/g, "/") - - self.nomount = !!options.nomount - - // disable comments and negation in Minimatch. - // Note that they are not supported in Glob itself anyway. - options.nonegate = true - options.nocomment = true - - self.minimatch = new Minimatch(pattern, options) - self.options = self.minimatch.options -} - -function finish (self) { - var nou = self.nounique - var all = nou ? [] : Object.create(null) - - for (var i = 0, l = self.matches.length; i < l; i ++) { - var matches = self.matches[i] - if (!matches || Object.keys(matches).length === 0) { - if (self.nonull) { - // do like the shell, and spit out the literal glob - var literal = self.minimatch.globSet[i] - if (nou) - all.push(literal) - else - all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) - all.push.apply(all, m) - else - m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) - all = Object.keys(all) - - if (!self.nosort) - all = all.sort(self.nocase ? alphasorti : alphasort) - - // at *some* point we statted all of these - if (self.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self._mark(all[i]) - } - if (self.nodir) { - all = all.filter(function (e) { - return !(/\/$/.test(e)) - }) - } - } - - if (self.ignore.length) - all = all.filter(function(m) { - return !isIgnored(self, m) - }) - - self.found = all -} - -function mark (self, p) { - var abs = makeAbs(self, p) - var c = self.cache[abs] - var m = p - if (c) { - var isDir = c === 'DIR' || Array.isArray(c) - var slash = p.slice(-1) === '/' - - if (isDir && !slash) - m += '/' - else if (!isDir && slash) - m = m.slice(0, -1) - - if (m !== p) { - var mabs = makeAbs(self, m) - self.statCache[mabs] = self.statCache[abs] - self.cache[mabs] = self.cache[abs] - } - } - - return m -} - -// lotta situps... -function makeAbs (self, f) { - var abs = f - if (f.charAt(0) === '/') { - abs = path.join(self.root, f) - } else if (isAbsolute(f) || f === '') { - abs = f - } else if (self.changedCwd) { - abs = path.resolve(self.cwd, f) - } else { - abs = path.resolve(f) - } - return abs -} - - -// Return true, if pattern ends with globstar '**', for the accompanying parent directory. -// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents -function isIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - -function childrenIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path)) - }) -} diff --git a/node_modules/globby/node_modules/glob/glob.js b/node_modules/globby/node_modules/glob/glob.js deleted file mode 100644 index a62da27..0000000 --- a/node_modules/globby/node_modules/glob/glob.js +++ /dev/null @@ -1,765 +0,0 @@ -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern, false) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern, inGlobStar) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// -// If inGlobStar and PREFIX is symlink and points to dir -// set ENTRIES = [] -// else readdir(PREFIX) as ENTRIES -// If fail, END -// -// with ENTRIES -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// // Mark that this entry is a globstar match -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - -module.exports = glob - -var fs = require('fs') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var inherits = require('inherits') -var EE = require('events').EventEmitter -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var globSync = require('./sync.js') -var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var setopts = common.setopts -var ownProp = common.ownProp -var inflight = require('inflight') -var util = require('util') -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -var once = require('once') - -function glob (pattern, options, cb) { - if (typeof options === 'function') cb = options, options = {} - if (!options) options = {} - - if (options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return globSync(pattern, options) - } - - return new Glob(pattern, options, cb) -} - -glob.sync = globSync -var GlobSync = glob.GlobSync = globSync.GlobSync - -// old api surface -glob.glob = glob - -function extend (origin, add) { - if (add === null || typeof add !== 'object') { - return origin - } - - var keys = Object.keys(add) - var i = keys.length - while (i--) { - origin[keys[i]] = add[keys[i]] - } - return origin -} - -glob.hasMagic = function (pattern, options_) { - var options = extend({}, options_) - options.noprocess = true - - var g = new Glob(pattern, options) - var set = g.minimatch.set - if (set.length > 1) - return true - - for (var j = 0; j < set[0].length; j++) { - if (typeof set[0][j] !== 'string') - return true - } - - return false -} - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - - if (options && options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return new GlobSync(pattern, options) - } - - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb) - - setopts(this, pattern, options) - this._didRealPath = false - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - if (typeof cb === 'function') { - cb = once(cb) - this.on('error', cb) - this.on('end', function (matches) { - cb(null, matches) - }) - } - - var self = this - var n = this.minimatch.set.length - this._processing = 0 - this.matches = new Array(n) - - this._emitQueue = [] - this._processQueue = [] - this.paused = false - - if (this.noprocess) - return this - - if (n === 0) - return done() - - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false, done) - } - - function done () { - --self._processing - if (self._processing <= 0) - self._finish() - } -} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - if (this.aborted) - return - - if (this.realpath && !this._didRealpath) - return this._realpath() - - common.finish(this) - this.emit('end', this.found) -} - -Glob.prototype._realpath = function () { - if (this._didRealpath) - return - - this._didRealpath = true - - var n = this.matches.length - if (n === 0) - return this._finish() - - var self = this - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next) - - function next () { - if (--n === 0) - self._finish() - } -} - -Glob.prototype._realpathSet = function (index, cb) { - var matchset = this.matches[index] - if (!matchset) - return cb() - - var found = Object.keys(matchset) - var self = this - var n = found.length - - if (n === 0) - return cb() - - var set = this.matches[index] = Object.create(null) - found.forEach(function (p, i) { - // If there's a problem with the stat, then it means that - // one or more of the links in the realpath couldn't be - // resolved. just return the abs value in that case. - p = self._makeAbs(p) - fs.realpath(p, self.realpathCache, function (er, real) { - if (!er) - set[real] = true - else if (er.syscall === 'stat') - set[p] = true - else - self.emit('error', er) // srsly wtf right here - - if (--n === 0) { - self.matches[index] = set - cb() - } - }) - }) -} - -Glob.prototype._mark = function (p) { - return common.mark(this, p) -} - -Glob.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit('abort') -} - -Glob.prototype.pause = function () { - if (!this.paused) { - this.paused = true - this.emit('pause') - } -} - -Glob.prototype.resume = function () { - if (this.paused) { - this.emit('resume') - this.paused = false - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0) - this._emitQueue.length = 0 - for (var i = 0; i < eq.length; i ++) { - var e = eq[i] - this._emitMatch(e[0], e[1]) - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0) - this._processQueue.length = 0 - for (var i = 0; i < pq.length; i ++) { - var p = pq[i] - this._processing-- - this._process(p[0], p[1], p[2], p[3]) - } - } - } -} - -Glob.prototype._process = function (pattern, index, inGlobStar, cb) { - assert(this instanceof Glob) - assert(typeof cb === 'function') - - if (this.aborted) - return - - this._processing++ - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]) - return - } - - //console.error('PROCESS %d', this._processing, pattern) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index, cb) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip _processing - if (childrenIgnored(this, read)) - return cb() - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) -} - -Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - -Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return cb() - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return cb() - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return cb() - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - this._process([e].concat(remain), index, inGlobStar, cb) - } - cb() -} - -Glob.prototype._emitMatch = function (index, e) { - if (this.aborted) - return - - if (this.matches[index][e]) - return - - if (isIgnored(this, e)) - return - - if (this.paused) { - this._emitQueue.push([index, e]) - return - } - - var abs = this._makeAbs(e) - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - if (this.mark) - e = this._mark(e) - - this.matches[index][e] = true - - var st = this.statCache[abs] - if (st) - this.emit('stat', e, st) - - this.emit('match', e) -} - -Glob.prototype._readdirInGlobStar = function (abs, cb) { - if (this.aborted) - return - - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false, cb) - - var lstatkey = 'lstat\0' + abs - var self = this - var lstatcb = inflight(lstatkey, lstatcb_) - - if (lstatcb) - fs.lstat(abs, lstatcb) - - function lstatcb_ (er, lstat) { - if (er) - return cb() - - var isSym = lstat.isSymbolicLink() - self.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && !lstat.isDirectory()) { - self.cache[abs] = 'FILE' - cb() - } else - self._readdir(abs, false, cb) - } -} - -Glob.prototype._readdir = function (abs, inGlobStar, cb) { - if (this.aborted) - return - - cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) - if (!cb) - return - - //console.error('RD %j %j', +inGlobStar, abs) - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return cb() - - if (Array.isArray(c)) - return cb(null, c) - } - - var self = this - fs.readdir(abs, readdirCb(this, abs, cb)) -} - -function readdirCb (self, abs, cb) { - return function (er, entries) { - if (er) - self._readdirError(abs, er, cb) - else - self._readdirEntries(abs, entries, cb) - } -} - -Glob.prototype._readdirEntries = function (abs, entries, cb) { - if (this.aborted) - return - - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - return cb(null, entries) -} - -Glob.prototype._readdirError = function (f, er, cb) { - if (this.aborted) - return - - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - this.cache[this._makeAbs(f)] = 'FILE' - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) { - this.emit('error', er) - // If the error is handled, then we abort - // if not, we threw out of here - this.abort() - } - if (!this.silent) - console.error('glob error', er) - break - } - - return cb() -} - -Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - - -Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - //console.error('pgs2', prefix, remain[0], entries) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return cb() - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false, cb) - - var isSym = this.symlinks[abs] - var len = entries.length - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return cb() - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true, cb) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true, cb) - } - - cb() -} - -Glob.prototype._processSimple = function (prefix, index, cb) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var self = this - this._stat(prefix, function (er, exists) { - self._processSimple2(prefix, index, er, exists, cb) - }) -} -Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { - - //console.error('ps2', prefix, exists) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return cb() - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) - cb() -} - -// Returns either 'DIR', 'FILE', or false -Glob.prototype._stat = function (f, cb) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return cb() - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return cb(null, c) - - if (needDir && c === 'FILE') - return cb() - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (stat !== undefined) { - if (stat === false) - return cb(null, stat) - else { - var type = stat.isDirectory() ? 'DIR' : 'FILE' - if (needDir && type === 'FILE') - return cb() - else - return cb(null, type, stat) - } - } - - var self = this - var statcb = inflight('stat\0' + abs, lstatcb_) - if (statcb) - fs.lstat(abs, statcb) - - function lstatcb_ (er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - // If it's a symlink, then treat it as the target, unless - // the target does not exist, then treat it as a file. - return fs.stat(abs, function (er, stat) { - if (er) - self._stat2(f, abs, null, lstat, cb) - else - self._stat2(f, abs, er, stat, cb) - }) - } else { - self._stat2(f, abs, er, lstat, cb) - } - } -} - -Glob.prototype._stat2 = function (f, abs, er, stat, cb) { - if (er) { - this.statCache[abs] = false - return cb() - } - - var needDir = f.slice(-1) === '/' - this.statCache[abs] = stat - - if (abs.slice(-1) === '/' && !stat.isDirectory()) - return cb(null, false, stat) - - var c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c !== 'DIR') - return cb() - - return cb(null, c, stat) -} diff --git a/node_modules/globby/node_modules/glob/package.json b/node_modules/globby/node_modules/glob/package.json deleted file mode 100644 index 94cf0af..0000000 --- a/node_modules/globby/node_modules/glob/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "_args": [ - [ - "glob@^6.0.1", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\globby" - ] - ], - "_from": "glob@>=6.0.1 <7.0.0", - "_id": "glob@6.0.4", - "_inCache": true, - "_installable": true, - "_location": "/globby/glob", - "_nodeVersion": "4.0.0", - "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" - }, - "_npmVersion": "2.14.15", - "_phantomChildren": {}, - "_requested": { - "name": "glob", - "raw": "glob@^6.0.1", - "rawSpec": "^6.0.1", - "scope": null, - "spec": ">=6.0.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/globby" - ], - "_resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "_shasum": "0f08860f6a155127b2fadd4f9ce24b1aab6e4d22", - "_shrinkwrap": null, - "_spec": "glob@^6.0.1", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\globby", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/node-glob/issues" - }, - "dependencies": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "description": "a little globber", - "devDependencies": { - "mkdirp": "0", - "rimraf": "^2.2.8", - "tap": "^5.0.0", - "tick": "0.0.6" - }, - "directories": {}, - "dist": { - "shasum": "0f08860f6a155127b2fadd4f9ce24b1aab6e4d22", - "tarball": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz" - }, - "engines": { - "node": "*" - }, - "files": [ - "common.js", - "glob.js", - "sync.js" - ], - "gitHead": "3bd419c538737e56fda7e21c21ff52ca0c198df6", - "homepage": "https://github.com/isaacs/node-glob#readme", - "license": "ISC", - "main": "glob.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "glob", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "scripts": { - "bench": "bash benchmark.sh", - "benchclean": "node benchclean.js", - "prepublish": "npm run benchclean", - "prof": "bash prof.sh && cat profile.txt", - "profclean": "rm -f v8.log profile.txt", - "test": "tap test/*.js --cov", - "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" - }, - "version": "6.0.4" -} diff --git a/node_modules/globby/node_modules/glob/sync.js b/node_modules/globby/node_modules/glob/sync.js deleted file mode 100644 index 09883d2..0000000 --- a/node_modules/globby/node_modules/glob/sync.js +++ /dev/null @@ -1,460 +0,0 @@ -module.exports = globSync -globSync.GlobSync = GlobSync - -var fs = require('fs') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var Glob = require('./glob.js').Glob -var util = require('util') -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var setopts = common.setopts -var ownProp = common.ownProp -var childrenIgnored = common.childrenIgnored - -function globSync (pattern, options) { - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - return new GlobSync(pattern, options).found -} - -function GlobSync (pattern, options) { - if (!pattern) - throw new Error('must provide pattern') - - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options) - - setopts(this, pattern, options) - - if (this.noprocess) - return this - - var n = this.minimatch.set.length - this.matches = new Array(n) - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false) - } - this._finish() -} - -GlobSync.prototype._finish = function () { - assert(this instanceof GlobSync) - if (this.realpath) { - var self = this - this.matches.forEach(function (matchset, index) { - var set = self.matches[index] = Object.create(null) - for (var p in matchset) { - try { - p = self._makeAbs(p) - var real = fs.realpathSync(p, self.realpathCache) - set[real] = true - } catch (er) { - if (er.syscall === 'stat') - set[self._makeAbs(p)] = true - else - throw er - } - } - }) - } - common.finish(this) -} - - -GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert(this instanceof GlobSync) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // See if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip processing - if (childrenIgnored(this, read)) - return - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar) -} - - -GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix.slice(-1) !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this.matches[index][e] = true - } - // This was the last one, and no stats were needed - return - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) - newPattern = [prefix, e] - else - newPattern = [e] - this._process(newPattern.concat(remain), index, inGlobStar) - } -} - - -GlobSync.prototype._emitMatch = function (index, e) { - var abs = this._makeAbs(e) - if (this.mark) - e = this._mark(e) - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[this._makeAbs(e)] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - if (this.stat) - this._stat(e) -} - - -GlobSync.prototype._readdirInGlobStar = function (abs) { - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false) - - var entries - var lstat - var stat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - // lstat failed, doesn't exist - return null - } - - var isSym = lstat.isSymbolicLink() - this.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && !lstat.isDirectory()) - this.cache[abs] = 'FILE' - else - entries = this._readdir(abs, false) - - return entries -} - -GlobSync.prototype._readdir = function (abs, inGlobStar) { - var entries - - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return null - - if (Array.isArray(c)) - return c - } - - try { - return this._readdirEntries(abs, fs.readdirSync(abs)) - } catch (er) { - this._readdirError(abs, er) - return null - } -} - -GlobSync.prototype._readdirEntries = function (abs, entries) { - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - - // mark and cache dir-ness - return entries -} - -GlobSync.prototype._readdirError = function (f, er) { - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - this.cache[this._makeAbs(f)] = 'FILE' - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) - throw er - if (!this.silent) - console.error('glob error', er) - break - } -} - -GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - - var entries = this._readdir(abs, inGlobStar) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false) - - var len = entries.length - var isSym = this.symlinks[abs] - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true) - } -} - -GlobSync.prototype._processSimple = function (prefix, index) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var exists = this._stat(prefix) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this.matches[index][prefix] = true -} - -// Returns either 'DIR', 'FILE', or false -GlobSync.prototype._stat = function (f) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return false - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return c - - if (needDir && c === 'FILE') - return false - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (!stat) { - var lstat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - return false - } - - if (lstat.isSymbolicLink()) { - try { - stat = fs.statSync(abs) - } catch (er) { - stat = lstat - } - } else { - stat = lstat - } - } - - this.statCache[abs] = stat - - var c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c !== 'DIR') - return false - - return c -} - -GlobSync.prototype._mark = function (p) { - return common.mark(this, p) -} - -GlobSync.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} diff --git a/node_modules/globby/package.json b/node_modules/globby/package.json index 45d4070..9a0f580 100644 --- a/node_modules/globby/package.json +++ b/node_modules/globby/package.json @@ -1,76 +1,24 @@ { - "_args": [ - [ - "globby@^4.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\del" - ] - ], - "_from": "globby@>=4.0.0 <5.0.0", - "_id": "globby@4.0.0", - "_inCache": true, - "_installable": true, - "_location": "/globby", - "_nodeVersion": "4.2.1", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.14.7", - "_phantomChildren": {}, - "_requested": { - "name": "globby", - "raw": "globby@^4.0.0", - "rawSpec": "^4.0.0", - "scope": null, - "spec": ">=4.0.0 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/del" - ], - "_resolved": "https://registry.npmjs.org/globby/-/globby-4.0.0.tgz", - "_shasum": "36ff06c5a9dc1dbc201f700074992882857e9817", - "_shrinkwrap": null, - "_spec": "globby@^4.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\del", + "name": "globby", + "version": "5.0.0", + "description": "Extends `glob` with support for multiple patterns and exposes a Promise API", + "license": "MIT", + "repository": "sindresorhus/globby", "author": { "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", "url": "sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/globby/issues" - }, - "dependencies": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^6.0.1", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "description": "Extends `glob` with support for multiple patterns and exposes a Promise API", - "devDependencies": { - "glob-stream": "git+https://github.com/wearefractal/glob-stream.git#master", - "globby": "git+https://github.com/sindresorhus/globby.git#master", - "matcha": "^0.6.0", - "mocha": "*", - "rimraf": "^2.2.8", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "36ff06c5a9dc1dbc201f700074992882857e9817", - "tarball": "http://registry.npmjs.org/globby/-/globby-4.0.0.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "bench": "npm update globby glob-stream && matcha bench.js", + "test": "xo && ava" + }, "files": [ "index.js" ], - "gitHead": "70389b06d4633868ea016ce38956d0a86aa90a23", - "homepage": "https://github.com/sindresorhus/globby", "keywords": [ "all", "array", @@ -96,36 +44,27 @@ "paths", "pattern", "patterns", - "promise", "traverse", "util", "utility", "wildcard", - "wildcards" + "wildcards", + "promise" ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "globby", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/globby.git" - }, - "scripts": { - "bench": "npm update globby glob-stream && matcha bench.js", - "test": "xo && mocha" + "dependencies": { + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" }, - "version": "4.0.0", - "xo": { - "envs": [ - "mocha", - "node" - ] + "devDependencies": { + "ava": "*", + "glob-stream": "wearefractal/glob-stream#master", + "globby": "sindresorhus/globby#master", + "matcha": "^0.7.0", + "rimraf": "^2.2.8", + "xo": "*" } } diff --git a/node_modules/globby/readme.md b/node_modules/globby/readme.md index e0881d5..aad991d 100644 --- a/node_modules/globby/readme.md +++ b/node_modules/globby/readme.md @@ -32,21 +32,27 @@ globby(['*', '!cake']).then(paths => { ### globby(patterns, [options]) -Returns a promise that resolves to an array of matching paths. +Returns a Promise for an array of matching paths. ### globby.sync(patterns, [options]) Returns an array of matching paths. +### globby.generateGlobTasks(patterns, [options]) + +Returns an array of objects in the format `{ pattern: string, opts: Object }`, which can be passed as arguments to [`node-glob`](https://github.com/isaacs/node-glob). This is useful for other globbing-related packages. + +Note that you should avoid running the same tasks multiple times as they contain a file system cache. Instead, create a new tasks list to ensure that file system changes are taken in consideration. + #### patterns -Type: `string`, `array` +Type: `string`, `Array` See supported `minimatch` [patterns](https://github.com/isaacs/minimatch#usage). #### options -Type: `object` +Type: `Object` See the `node-glob` [options](https://github.com/isaacs/node-glob#options). @@ -61,15 +67,16 @@ Just a quick overview. - `{}` allows for a comma-separated list of "or" expressions - `!` at the beginning of a pattern will negate the match -[Various patterns and expected matches](https://github.com/sindresorhus/multimatch/blob/master/test.js). +[Various patterns and expected matches.](https://github.com/sindresorhus/multimatch/blob/master/test.js) ## Related -- [multimatch](https://github.com/sindresorhus/multimatch) - Match against a list instead of the filesystem. -- [glob-stream](https://github.com/wearefractal/glob-stream) - Streaming alternative. +- [multimatch](https://github.com/sindresorhus/multimatch) - Match against a list instead of the filesystem +- [glob-stream](https://github.com/wearefractal/glob-stream) - Streaming alternative +- [matcher](https://github.com/sindresorhus/matcher) - Simple wildcard matching ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/globule/LICENSE b/node_modules/globule/LICENSE new file mode 100644 index 0000000..8ac94f0 --- /dev/null +++ b/node_modules/globule/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2016 "Cowboy" Ben Alman + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/globule/README.md b/node_modules/globule/README.md new file mode 100644 index 0000000..b16abd9 --- /dev/null +++ b/node_modules/globule/README.md @@ -0,0 +1,129 @@ +# globule [![Build Status: Linux](https://travis-ci.org/cowboy/node-globule.svg?branch=master)](https://travis-ci.org/cowboy/node-globule) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/i9fnc38q952r9nc0/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/node-globule/branch/master) + +An easy-to-use wildcard globbing library. + +## Getting Started +Install the module with: `npm install globule` + +```javascript +var globule = require('globule'); +var filepaths = globule.find('**/*.js'); +``` + +## Documentation + +### globule.find +Returns a unique array of all file or directory paths that match the given globbing pattern(s). This method accepts either comma separated globbing patterns or an array of globbing patterns. Paths matching patterns that begin with `!` will be excluded from the returned array. Patterns are processed in order, so inclusion and exclusion order is significant. Patterns may be specified as function arguments or as a `src` property of the options object. + +```js +globule.find(patterns [, patterns [, ...]] [, options]) +globule.find({src: patterns, /* other options */}) +``` + +The `options` object supports all [glob][] library options, along with a few extras. These are the most commonly used: + +* `src` This property may be used instead of specifying patterns as function arguments. +* `filter` Either a valid [fs.Stats method name](http://nodejs.org/docs/latest/api/fs.html#fs_class_fs_stats) or a function that will be passed the matched `src` filepath and `options` object as arguments. This function should return a `Boolean` value. +* `nonull` Retain globbing patterns in result set even if they fail to match files. +* `matchBase` Patterns without slashes will match just the basename part. Eg. this makes `*.js` work like `**/*.js`. +* `srcBase` Patterns will be matched relative to the specified path instead of the current working directory. This is a synonym for `cwd`. +* `prefixBase` Any specified `srcBase` will be prefixed to all returned filepaths. + +[glob]: https://github.com/isaacs/node-glob + +### globule.match +Match one or more globbing patterns against one or more file paths. Returns a uniqued array of all file paths that match any of the specified globbing patterns. Both the `patterns` and `filepaths` arguments can be a single string or array of strings. Paths matching patterns that begin with `!` will be excluded from the returned array. Patterns are processed in order, so inclusion and exclusion order is significant. + +```js +globule.match(patterns, filepaths [, options]) +``` + +### globule.isMatch +This method contains the same signature and logic as the `globule.match` method, but returns `true` if any files were matched, otherwise `false`. + +```js +globule.isMatch(patterns, filepaths [, options]) +``` + +### globule.mapping +Given a set of source file paths, returns an array of src-dest file mapping objects. Both src and dest paths may be renamed, depending on the options specified. Patterns may be specified as function arguments or as a `src` property of the options object. + +```js +globule.mapping(filepaths [, filepaths [, ...]] [, options]) +globule.mapping({src: filepaths, /* other options */}) +``` + +In addition to the options the `globule.find` method supports, the options object also supports these properties: + +* `srcBase` The directory from which patterns are matched. Any string specified as `srcBase` is effectively stripped from the beginning of all matched paths. +* `destBase` The specified path is prefixed to all `dest` filepaths. +* `ext` Remove anything after (and including) the first `.` in the destination path, then append this value. +* `extDot` Change the behavior of `ext`, `"first"` and `"last"` will remove anything after the first or last `.` in the destination filename, respectively. Defaults to `"first"`. +* `flatten` Remove the path component from all matched src files. The src file path is still joined to the specified destBase. +* `rename` If specified, this function will be responsible for returning the final `dest` filepath. By default, it flattens paths (if specified), changes extensions (if specified) and joins the matched path to the `destBase`. + +### globule.findMapping +This method is a convenience wrapper around the `globule.find` and `globule.mapping` methods. + +```js +globule.findMapping(patterns [, options]) +``` + + +## Examples + +Given the files `foo/a.js` and `foo/b.js`: + +### srcBase and destBase + +```js +globule.find("foo/*.js") +// ["foo/a.js", "foo/b.js"] + +globule.find("*.js", {srcBase: "foo"}) +// ["a.js", "b.js"] + +globule.find({src: "*.js", srcBase: "foo", prefixBase: true}) +// ["foo/a.js", "foo/b.js"] +``` + +```js +globule.findMapping("foo/*.js") +// [{src: ["foo/a.js"], dest: "foo/a.js"}, {src: ["foo/b.js"], dest: "foo/b.js"}] + +globule.findMapping("foo/*.js", {destBase: "bar"}) +// [{src: ["foo/a.js"], dest: "bar/foo/a.js"}, {src: ["foo/b.js"], dest: "bar/foo/b.js"}] + +globule.findMapping({src: "*.js", srcBase: "foo", destBase: "bar"}) +// [{src: ["foo/a.js"], dest: "bar/a.js"}, {src: ["foo/b.js"], dest: "bar/b.js"}] +``` + +```js +globule.mapping(["foo/a.js", "foo/b.js"]) +// [{src: ["foo/a.js"], dest: "foo/a.js"}, {src: ["foo/b.js"], dest: "foo/b.js"}] + +globule.mapping(["foo/a.js", "foo/b.js"], {destBase: "bar"}) +// [{src: ["foo/a.js"], dest: "bar/foo/a.js"}, {src: ["foo/b.js"], dest: "bar/foo/b.js"}] + +globule.mapping("foo/a.js", "foo/b.js", {destBase: "bar"}) +// [{src: ["foo/a.js"], dest: "bar/foo/a.js"}, {src: ["foo/b.js"], dest: "bar/foo/b.js"}] + +globule.mapping(["a.js", "b.js"], {srcBase: "foo", destBase: "bar"}) +// [{src: ["foo/a.js"], dest: "bar/a.js"}, {src: ["foo/b.js"], dest: "bar/b.js"}] + +globule.mapping({src: ["a.js", "b.js"], srcBase: "foo", destBase: "bar"}) +// [{src: ["foo/a.js"], dest: "bar/a.js"}, {src: ["foo/b.js"], dest: "bar/b.js"}] +``` + +## Contributing +In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/). + +## Release History +2016-10-23 - v1.1.0 - Update dependencies, lodash@4.16, glob@7.1. +2016-04-14 - v1.0.0 - Update dependencies, lodash@4.9, glob@7.0, minimatch@3.0. Paths are unix-style with prefixBase enabled. +2014-01-07 - v0.2.0 - Updated dependencies. Added `src` option. Improved exclusion speed significantly. +2013-04-11 - v0.1.0 - Initial release. + +## License +Copyright (c) 2016 "Cowboy" Ben Alman +Licensed under the MIT license. diff --git a/node_modules/globule/lib/globule.js b/node_modules/globule/lib/globule.js new file mode 100644 index 0000000..2afd813 --- /dev/null +++ b/node_modules/globule/lib/globule.js @@ -0,0 +1,192 @@ +/* + * globule + * https://github.com/cowboy/node-globule + * + * Copyright (c) 2014 "Cowboy" Ben Alman + * Licensed under the MIT license. + */ + +'use strict'; + +var fs = require('fs'); +var path = require('path'); + +var _ = require('lodash'); +var glob = require('glob'); +var minimatch = require('minimatch'); + +// The module. +var globule = exports; + +// Process specified wildcard glob patterns or filenames against a +// callback, excluding and uniquing files in the result set. +function processPatterns(patterns, options, fn) { + var result = []; + _.each(patterns, function(pattern) { + // The first character is not ! (inclusion). Add all matching filepaths + // to the result set. + if (pattern.indexOf('!') !== 0) { + result = _.union(result, fn(pattern)); + return; + } + // The first character is ! (exclusion). Remove any filepaths from the + // result set that match this pattern, sans leading !. + var filterFn = minimatch.filter(pattern.slice(1), options); + result = _.filter(result, function(filepath) { + return !filterFn(filepath); + }); + }); + return result; +} + +// Normalize paths to be unix-style. +var pathSeparatorRe = /[\/\\]/g; +function normalizePath(path) { + return path.replace(pathSeparatorRe, '/'); +} + +// Match a filepath or filepaths against one or more wildcard patterns. Returns +// all matching filepaths. This behaves just like minimatch.match, but supports +// any number of patterns. +globule.match = function(patterns, filepaths, options) { + // Return empty set if either patterns or filepaths was omitted. + if (patterns == null || filepaths == null) { return []; } + // Normalize patterns and filepaths to flattened arrays. + patterns = _.isArray(patterns) ? _.flattenDeep(patterns) : [patterns]; + filepaths = _.isArray(filepaths) ? _.flattenDeep(filepaths) : [filepaths]; + // Return empty set if there are no patterns or filepaths. + if (patterns.length === 0 || filepaths.length === 0) { return []; } + // Return all matching filepaths. + return processPatterns(patterns, options, function(pattern) { + return minimatch.match(filepaths, pattern, options || {}); + }); +}; + +// Match a filepath or filepaths against one or more wildcard patterns. Returns +// true if any of the patterns match. +globule.isMatch = function() { + return globule.match.apply(null, arguments).length > 0; +}; + +// Return an array of all file paths that match the given wildcard patterns. +globule.find = function() { + var args = _.toArray(arguments); + // If the last argument is an options object, remove it from args. + var options = _.isPlainObject(args[args.length - 1]) ? args.pop() : {}; + // If options.src was specified, use it. Otherwise, use all non-options + // arguments. Flatten nested arrays. + var patterns; + if (options.src) { + patterns = _.isArray(options.src) ? _.flattenDeep(options.src) : [options.src]; + } else { + patterns = _.flattenDeep(args); + } + // Return empty set if there are no patterns. + if (patterns.length === 0) { return []; } + var srcBase = options.srcBase || options.cwd; + // Create glob-specific options object. + var globOptions = _.extend({}, options); + if (srcBase) { + globOptions.cwd = srcBase; + } + // Get all matching filepaths. + var matches = processPatterns(patterns, options, function(pattern) { + return glob.sync(pattern, globOptions); + }); + // If srcBase and prefixBase were specified, prefix srcBase to matched paths. + if (srcBase && options.prefixBase) { + matches = matches.map(function(filepath) { + return normalizePath(path.join(srcBase, filepath)); + }); + } + // Filter result set? + if (options.filter) { + matches = matches.filter(function(filepath) { + // If srcBase was specified but prefixBase was NOT, prefix srcBase + // temporarily, for filtering. + if (srcBase && !options.prefixBase) { + filepath = normalizePath(path.join(srcBase, filepath)); + } + try { + if (_.isFunction(options.filter)) { + return options.filter(filepath, options); + } else { + // If the file is of the right type and exists, this should work. + return fs.statSync(filepath)[options.filter](); + } + } catch(err) { + // Otherwise, it's probably not the right type. + return false; + } + }); + } + return matches; +}; + +var extDotRe = { + first: /(\.[^\/]*)?$/, + last: /(\.[^\/\.]*)?$/, +}; +function rename(dest, options) { + // Flatten path? + if (options.flatten) { + dest = path.basename(dest); + } + // Change the extension? + if (options.ext) { + dest = dest.replace(extDotRe[options.extDot], options.ext); + } + // Join dest and destBase? + if (options.destBase) { + dest = path.join(options.destBase, dest); + } + return dest; +} + +// Build a mapping of src-dest filepaths from the given set of filepaths. +globule.mapping = function(filepaths, options) { + // Return empty set if filepaths was omitted. + if (filepaths == null) { return []; } + options = _.defaults({}, options, { + extDot: 'first', + rename: rename, + }); + var files = []; + var fileByDest = {}; + // Find all files matching pattern, using passed-in options. + filepaths.forEach(function(src) { + // Generate destination filename. + var dest = options.rename(src, options); + // Prepend srcBase to all src paths. + if (options.srcBase) { + src = path.join(options.srcBase, src); + } + // Normalize filepaths to be unix-style. + dest = normalizePath(dest); + src = normalizePath(src); + // Map correct src path to dest path. + if (fileByDest[dest]) { + // If dest already exists, push this src onto that dest's src array. + fileByDest[dest].src.push(src); + } else { + // Otherwise create a new src-dest file mapping object. + files.push({ + src: [src], + dest: dest, + }); + // And store a reference for later use. + fileByDest[dest] = files[files.length - 1]; + } + }); + return files; +}; + +// Return a mapping of src-dest filepaths from files matching the given +// wildcard patterns. +globule.findMapping = function() { + var args = _.toArray(arguments); + // If the last argument is an options object, remove it from args. + var options = _.isPlainObject(args[args.length - 1]) ? args.pop() : {}; + // Generate mapping from found filepaths. + return globule.mapping(globule.find(args, options), options); +}; diff --git a/node_modules/lodash/package/LICENSE b/node_modules/globule/node_modules/lodash/LICENSE similarity index 96% rename from node_modules/lodash/package/LICENSE rename to node_modules/globule/node_modules/lodash/LICENSE index e0c69d5..c6f2f61 100644 --- a/node_modules/lodash/package/LICENSE +++ b/node_modules/globule/node_modules/lodash/LICENSE @@ -1,4 +1,4 @@ -Copyright jQuery Foundation and other contributors +Copyright JS Foundation and other contributors Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors diff --git a/node_modules/globule/node_modules/lodash/README.md b/node_modules/globule/node_modules/lodash/README.md new file mode 100644 index 0000000..f874f13 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/README.md @@ -0,0 +1,39 @@ +# lodash v4.16.6 + +The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. + +## Installation + +Using npm: +```shell +$ npm i -g npm +$ npm i --save lodash +``` + +In Node.js: +```js +// Load the full build. +var _ = require('lodash'); +// Load the core build. +var _ = require('lodash/core'); +// Load the FP build for immutable auto-curried iteratee-first data-last methods. +var fp = require('lodash/fp'); + +// Load method categories. +var array = require('lodash/array'); +var object = require('lodash/fp/object'); + +// Cherry-pick methods for smaller browserify/rollup/webpack bundles. +var at = require('lodash/at'); +var curryN = require('lodash/fp/curryN'); +``` + +See the [package source](https://github.com/lodash/lodash/tree/4.16.6-npm) for more details. + +**Note:**
+Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. + +## Support + +Tested in Chrome 53-54, Firefox 48-49, IE 11, Edge 14, Safari 9-10, Node.js 6-7, & PhantomJS 2.1.1.
+Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. diff --git a/node_modules/lodash/package/_DataView.js b/node_modules/globule/node_modules/lodash/_DataView.js similarity index 100% rename from node_modules/lodash/package/_DataView.js rename to node_modules/globule/node_modules/lodash/_DataView.js diff --git a/node_modules/globule/node_modules/lodash/_Hash.js b/node_modules/globule/node_modules/lodash/_Hash.js new file mode 100644 index 0000000..b504fe3 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_Hash.js @@ -0,0 +1,32 @@ +var hashClear = require('./_hashClear'), + hashDelete = require('./_hashDelete'), + hashGet = require('./_hashGet'), + hashHas = require('./_hashHas'), + hashSet = require('./_hashSet'); + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +module.exports = Hash; diff --git a/node_modules/lodash/package/_LazyWrapper.js b/node_modules/globule/node_modules/lodash/_LazyWrapper.js similarity index 100% rename from node_modules/lodash/package/_LazyWrapper.js rename to node_modules/globule/node_modules/lodash/_LazyWrapper.js diff --git a/node_modules/globule/node_modules/lodash/_ListCache.js b/node_modules/globule/node_modules/lodash/_ListCache.js new file mode 100644 index 0000000..26895c3 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_ListCache.js @@ -0,0 +1,32 @@ +var listCacheClear = require('./_listCacheClear'), + listCacheDelete = require('./_listCacheDelete'), + listCacheGet = require('./_listCacheGet'), + listCacheHas = require('./_listCacheHas'), + listCacheSet = require('./_listCacheSet'); + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +module.exports = ListCache; diff --git a/node_modules/lodash/package/_LodashWrapper.js b/node_modules/globule/node_modules/lodash/_LodashWrapper.js similarity index 100% rename from node_modules/lodash/package/_LodashWrapper.js rename to node_modules/globule/node_modules/lodash/_LodashWrapper.js diff --git a/node_modules/lodash/package/_Map.js b/node_modules/globule/node_modules/lodash/_Map.js similarity index 100% rename from node_modules/lodash/package/_Map.js rename to node_modules/globule/node_modules/lodash/_Map.js diff --git a/node_modules/globule/node_modules/lodash/_MapCache.js b/node_modules/globule/node_modules/lodash/_MapCache.js new file mode 100644 index 0000000..4a4eea7 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_MapCache.js @@ -0,0 +1,32 @@ +var mapCacheClear = require('./_mapCacheClear'), + mapCacheDelete = require('./_mapCacheDelete'), + mapCacheGet = require('./_mapCacheGet'), + mapCacheHas = require('./_mapCacheHas'), + mapCacheSet = require('./_mapCacheSet'); + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +module.exports = MapCache; diff --git a/node_modules/lodash/package/_Promise.js b/node_modules/globule/node_modules/lodash/_Promise.js similarity index 100% rename from node_modules/lodash/package/_Promise.js rename to node_modules/globule/node_modules/lodash/_Promise.js diff --git a/node_modules/lodash/package/_Set.js b/node_modules/globule/node_modules/lodash/_Set.js similarity index 100% rename from node_modules/lodash/package/_Set.js rename to node_modules/globule/node_modules/lodash/_Set.js diff --git a/node_modules/globule/node_modules/lodash/_SetCache.js b/node_modules/globule/node_modules/lodash/_SetCache.js new file mode 100644 index 0000000..6468b06 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_SetCache.js @@ -0,0 +1,27 @@ +var MapCache = require('./_MapCache'), + setCacheAdd = require('./_setCacheAdd'), + setCacheHas = require('./_setCacheHas'); + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; + +module.exports = SetCache; diff --git a/node_modules/lodash/package/_Stack.js b/node_modules/globule/node_modules/lodash/_Stack.js similarity index 62% rename from node_modules/lodash/package/_Stack.js rename to node_modules/globule/node_modules/lodash/_Stack.js index 414cd52..80b2cf1 100644 --- a/node_modules/lodash/package/_Stack.js +++ b/node_modules/globule/node_modules/lodash/_Stack.js @@ -1,4 +1,5 @@ -var stackClear = require('./_stackClear'), +var ListCache = require('./_ListCache'), + stackClear = require('./_stackClear'), stackDelete = require('./_stackDelete'), stackGet = require('./_stackGet'), stackHas = require('./_stackHas'), @@ -9,17 +10,11 @@ var stackClear = require('./_stackClear'), * * @private * @constructor - * @param {Array} [values] The values to cache. + * @param {Array} [entries] The key-value pairs to cache. */ -function Stack(values) { - var index = -1, - length = values ? values.length : 0; - - this.clear(); - while (++index < length) { - var entry = values[index]; - this.set(entry[0], entry[1]); - } +function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; } // Add methods to `Stack`. diff --git a/node_modules/lodash/package/_Symbol.js b/node_modules/globule/node_modules/lodash/_Symbol.js similarity index 100% rename from node_modules/lodash/package/_Symbol.js rename to node_modules/globule/node_modules/lodash/_Symbol.js diff --git a/node_modules/lodash/package/_Uint8Array.js b/node_modules/globule/node_modules/lodash/_Uint8Array.js similarity index 100% rename from node_modules/lodash/package/_Uint8Array.js rename to node_modules/globule/node_modules/lodash/_Uint8Array.js diff --git a/node_modules/lodash/package/_WeakMap.js b/node_modules/globule/node_modules/lodash/_WeakMap.js similarity index 100% rename from node_modules/lodash/package/_WeakMap.js rename to node_modules/globule/node_modules/lodash/_WeakMap.js diff --git a/node_modules/lodash/package/_addMapEntry.js b/node_modules/globule/node_modules/lodash/_addMapEntry.js similarity index 78% rename from node_modules/lodash/package/_addMapEntry.js rename to node_modules/globule/node_modules/lodash/_addMapEntry.js index 0112ef7..5a69212 100644 --- a/node_modules/lodash/package/_addMapEntry.js +++ b/node_modules/globule/node_modules/lodash/_addMapEntry.js @@ -7,7 +7,7 @@ * @returns {Object} Returns `map`. */ function addMapEntry(map, pair) { - // Don't return `Map#set` because it doesn't return the map instance in IE 11. + // Don't return `map.set` because it's not chainable in IE 11. map.set(pair[0], pair[1]); return map; } diff --git a/node_modules/lodash/package/_addSetEntry.js b/node_modules/globule/node_modules/lodash/_addSetEntry.js similarity index 80% rename from node_modules/lodash/package/_addSetEntry.js rename to node_modules/globule/node_modules/lodash/_addSetEntry.js index 7b75c13..1a07b70 100644 --- a/node_modules/lodash/package/_addSetEntry.js +++ b/node_modules/globule/node_modules/lodash/_addSetEntry.js @@ -7,6 +7,7 @@ * @returns {Object} Returns `set`. */ function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. set.add(value); return set; } diff --git a/node_modules/lodash/package/_apply.js b/node_modules/globule/node_modules/lodash/_apply.js similarity index 93% rename from node_modules/lodash/package/_apply.js rename to node_modules/globule/node_modules/lodash/_apply.js index d000f04..36436dd 100644 --- a/node_modules/lodash/package/_apply.js +++ b/node_modules/globule/node_modules/lodash/_apply.js @@ -9,8 +9,7 @@ * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { - var length = args.length; - switch (length) { + switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); diff --git a/node_modules/lodash/package/_arrayAggregator.js b/node_modules/globule/node_modules/lodash/_arrayAggregator.js similarity index 85% rename from node_modules/lodash/package/_arrayAggregator.js rename to node_modules/globule/node_modules/lodash/_arrayAggregator.js index 562eeb3..d96c3ca 100644 --- a/node_modules/lodash/package/_arrayAggregator.js +++ b/node_modules/globule/node_modules/lodash/_arrayAggregator.js @@ -2,7 +2,7 @@ * A specialized version of `baseAggregator` for arrays. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} setter The function to set `accumulator` values. * @param {Function} iteratee The iteratee to transform keys. * @param {Object} accumulator The initial aggregated object. @@ -10,7 +10,7 @@ */ function arrayAggregator(array, setter, iteratee, accumulator) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { var value = array[index]; diff --git a/node_modules/lodash/package/_arrayEach.js b/node_modules/globule/node_modules/lodash/_arrayEach.js similarity index 81% rename from node_modules/lodash/package/_arrayEach.js rename to node_modules/globule/node_modules/lodash/_arrayEach.js index c302e63..2c5f579 100644 --- a/node_modules/lodash/package/_arrayEach.js +++ b/node_modules/globule/node_modules/lodash/_arrayEach.js @@ -3,13 +3,13 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { if (iteratee(array[index], index, array) === false) { diff --git a/node_modules/lodash/package/_arrayEachRight.js b/node_modules/globule/node_modules/lodash/_arrayEachRight.js similarity index 80% rename from node_modules/lodash/package/_arrayEachRight.js rename to node_modules/globule/node_modules/lodash/_arrayEachRight.js index 5318585..976ca5c 100644 --- a/node_modules/lodash/package/_arrayEachRight.js +++ b/node_modules/globule/node_modules/lodash/_arrayEachRight.js @@ -3,12 +3,12 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEachRight(array, iteratee) { - var length = array.length; + var length = array == null ? 0 : array.length; while (length--) { if (iteratee(array[length], length, array) === false) { diff --git a/node_modules/lodash/package/_arrayEvery.js b/node_modules/globule/node_modules/lodash/_arrayEvery.js similarity index 82% rename from node_modules/lodash/package/_arrayEvery.js rename to node_modules/globule/node_modules/lodash/_arrayEvery.js index 8d89fb1..e26a918 100644 --- a/node_modules/lodash/package/_arrayEvery.js +++ b/node_modules/globule/node_modules/lodash/_arrayEvery.js @@ -3,14 +3,14 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if all elements pass the predicate check, * else `false`. */ function arrayEvery(array, predicate) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { if (!predicate(array[index], index, array)) { diff --git a/node_modules/lodash/package/_arrayFilter.js b/node_modules/globule/node_modules/lodash/_arrayFilter.js similarity index 83% rename from node_modules/lodash/package/_arrayFilter.js rename to node_modules/globule/node_modules/lodash/_arrayFilter.js index 7b61ba6..75ea254 100644 --- a/node_modules/lodash/package/_arrayFilter.js +++ b/node_modules/globule/node_modules/lodash/_arrayFilter.js @@ -3,13 +3,13 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, - length = array.length, + length = array == null ? 0 : array.length, resIndex = 0, result = []; diff --git a/node_modules/lodash/package/_arrayIncludes.js b/node_modules/globule/node_modules/lodash/_arrayIncludes.js similarity index 70% rename from node_modules/lodash/package/_arrayIncludes.js rename to node_modules/globule/node_modules/lodash/_arrayIncludes.js index 9574f5d..3737a6d 100644 --- a/node_modules/lodash/package/_arrayIncludes.js +++ b/node_modules/globule/node_modules/lodash/_arrayIncludes.js @@ -5,12 +5,13 @@ var baseIndexOf = require('./_baseIndexOf'); * specifying an index to search from. * * @private - * @param {Array} array The array to search. + * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludes(array, value) { - return !!array.length && baseIndexOf(array, value, 0) > -1; + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; } module.exports = arrayIncludes; diff --git a/node_modules/lodash/package/_arrayIncludesWith.js b/node_modules/globule/node_modules/lodash/_arrayIncludesWith.js similarity index 84% rename from node_modules/lodash/package/_arrayIncludesWith.js rename to node_modules/globule/node_modules/lodash/_arrayIncludesWith.js index 88ea237..235fd97 100644 --- a/node_modules/lodash/package/_arrayIncludesWith.js +++ b/node_modules/globule/node_modules/lodash/_arrayIncludesWith.js @@ -2,14 +2,14 @@ * This function is like `arrayIncludes` except that it accepts a comparator. * * @private - * @param {Array} array The array to search. + * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @param {Function} comparator The comparator invoked per element. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludesWith(array, value, comparator) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { if (comparator(value, array[index])) { diff --git a/node_modules/globule/node_modules/lodash/_arrayLikeKeys.js b/node_modules/globule/node_modules/lodash/_arrayLikeKeys.js new file mode 100644 index 0000000..b2ec9ce --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_arrayLikeKeys.js @@ -0,0 +1,49 @@ +var baseTimes = require('./_baseTimes'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isIndex = require('./_isIndex'), + isTypedArray = require('./isTypedArray'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; +} + +module.exports = arrayLikeKeys; diff --git a/node_modules/lodash/package/_arrayMap.js b/node_modules/globule/node_modules/lodash/_arrayMap.js similarity index 81% rename from node_modules/lodash/package/_arrayMap.js rename to node_modules/globule/node_modules/lodash/_arrayMap.js index 73b29cf..22b2246 100644 --- a/node_modules/lodash/package/_arrayMap.js +++ b/node_modules/globule/node_modules/lodash/_arrayMap.js @@ -3,13 +3,13 @@ * shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, - length = array.length, + length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { diff --git a/node_modules/lodash/package/_arrayPush.js b/node_modules/globule/node_modules/lodash/_arrayPush.js similarity index 100% rename from node_modules/lodash/package/_arrayPush.js rename to node_modules/globule/node_modules/lodash/_arrayPush.js diff --git a/node_modules/lodash/package/_arrayReduce.js b/node_modules/globule/node_modules/lodash/_arrayReduce.js similarity index 87% rename from node_modules/lodash/package/_arrayReduce.js rename to node_modules/globule/node_modules/lodash/_arrayReduce.js index 41bea2c..de8b79b 100644 --- a/node_modules/lodash/package/_arrayReduce.js +++ b/node_modules/globule/node_modules/lodash/_arrayReduce.js @@ -3,7 +3,7 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the first element of `array` as @@ -12,7 +12,7 @@ */ function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[++index]; diff --git a/node_modules/lodash/package/_arrayReduceRight.js b/node_modules/globule/node_modules/lodash/_arrayReduceRight.js similarity index 86% rename from node_modules/lodash/package/_arrayReduceRight.js rename to node_modules/globule/node_modules/lodash/_arrayReduceRight.js index 038e0fa..22d8976 100644 --- a/node_modules/lodash/package/_arrayReduceRight.js +++ b/node_modules/globule/node_modules/lodash/_arrayReduceRight.js @@ -3,7 +3,7 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the last element of `array` as @@ -11,7 +11,7 @@ * @returns {*} Returns the accumulated value. */ function arrayReduceRight(array, iteratee, accumulator, initAccum) { - var length = array.length; + var length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[--length]; } diff --git a/node_modules/globule/node_modules/lodash/_arraySample.js b/node_modules/globule/node_modules/lodash/_arraySample.js new file mode 100644 index 0000000..fcab010 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_arraySample.js @@ -0,0 +1,15 @@ +var baseRandom = require('./_baseRandom'); + +/** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ +function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; +} + +module.exports = arraySample; diff --git a/node_modules/globule/node_modules/lodash/_arraySampleSize.js b/node_modules/globule/node_modules/lodash/_arraySampleSize.js new file mode 100644 index 0000000..8c7e364 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_arraySampleSize.js @@ -0,0 +1,17 @@ +var baseClamp = require('./_baseClamp'), + copyArray = require('./_copyArray'), + shuffleSelf = require('./_shuffleSelf'); + +/** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ +function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); +} + +module.exports = arraySampleSize; diff --git a/node_modules/globule/node_modules/lodash/_arrayShuffle.js b/node_modules/globule/node_modules/lodash/_arrayShuffle.js new file mode 100644 index 0000000..46313a3 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_arrayShuffle.js @@ -0,0 +1,15 @@ +var copyArray = require('./_copyArray'), + shuffleSelf = require('./_shuffleSelf'); + +/** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ +function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); +} + +module.exports = arrayShuffle; diff --git a/node_modules/lodash/package/_arraySome.js b/node_modules/globule/node_modules/lodash/_arraySome.js similarity index 82% rename from node_modules/lodash/package/_arraySome.js rename to node_modules/globule/node_modules/lodash/_arraySome.js index e6e657b..6fd02fd 100644 --- a/node_modules/lodash/package/_arraySome.js +++ b/node_modules/globule/node_modules/lodash/_arraySome.js @@ -3,14 +3,14 @@ * shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { diff --git a/node_modules/globule/node_modules/lodash/_asciiSize.js b/node_modules/globule/node_modules/lodash/_asciiSize.js new file mode 100644 index 0000000..11d29c3 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_asciiSize.js @@ -0,0 +1,12 @@ +var baseProperty = require('./_baseProperty'); + +/** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +var asciiSize = baseProperty('length'); + +module.exports = asciiSize; diff --git a/node_modules/globule/node_modules/lodash/_asciiToArray.js b/node_modules/globule/node_modules/lodash/_asciiToArray.js new file mode 100644 index 0000000..8e3dd5b --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_asciiToArray.js @@ -0,0 +1,12 @@ +/** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function asciiToArray(string) { + return string.split(''); +} + +module.exports = asciiToArray; diff --git a/node_modules/globule/node_modules/lodash/_asciiWords.js b/node_modules/globule/node_modules/lodash/_asciiWords.js new file mode 100644 index 0000000..d765f0f --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_asciiWords.js @@ -0,0 +1,15 @@ +/** Used to match words composed of alphanumeric characters. */ +var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + +/** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ +function asciiWords(string) { + return string.match(reAsciiWord) || []; +} + +module.exports = asciiWords; diff --git a/node_modules/lodash/package/_assignInDefaults.js b/node_modules/globule/node_modules/lodash/_assignInDefaults.js similarity index 100% rename from node_modules/lodash/package/_assignInDefaults.js rename to node_modules/globule/node_modules/lodash/_assignInDefaults.js diff --git a/node_modules/lodash/package/_assignMergeValue.js b/node_modules/globule/node_modules/lodash/_assignMergeValue.js similarity index 70% rename from node_modules/lodash/package/_assignMergeValue.js rename to node_modules/globule/node_modules/lodash/_assignMergeValue.js index 61dd583..cb1185e 100644 --- a/node_modules/lodash/package/_assignMergeValue.js +++ b/node_modules/globule/node_modules/lodash/_assignMergeValue.js @@ -1,4 +1,5 @@ -var eq = require('./eq'); +var baseAssignValue = require('./_baseAssignValue'), + eq = require('./eq'); /** * This function is like `assignValue` except that it doesn't assign @@ -11,8 +12,8 @@ var eq = require('./eq'); */ function assignMergeValue(object, key, value) { if ((value !== undefined && !eq(object[key], value)) || - (typeof key == 'number' && value === undefined && !(key in object))) { - object[key] = value; + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); } } diff --git a/node_modules/lodash/package/_assignValue.js b/node_modules/globule/node_modules/lodash/_assignValue.js similarity index 83% rename from node_modules/lodash/package/_assignValue.js rename to node_modules/globule/node_modules/lodash/_assignValue.js index 35d49f0..4083957 100644 --- a/node_modules/lodash/package/_assignValue.js +++ b/node_modules/globule/node_modules/lodash/_assignValue.js @@ -1,4 +1,5 @@ -var eq = require('./eq'); +var baseAssignValue = require('./_baseAssignValue'), + eq = require('./eq'); /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -8,7 +9,7 @@ var hasOwnProperty = objectProto.hasOwnProperty; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private @@ -20,7 +21,7 @@ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { - object[key] = value; + baseAssignValue(object, key, value); } } diff --git a/node_modules/lodash/package/_assocIndexOf.js b/node_modules/globule/node_modules/lodash/_assocIndexOf.js similarity index 90% rename from node_modules/lodash/package/_assocIndexOf.js rename to node_modules/globule/node_modules/lodash/_assocIndexOf.js index 8f2c41f..5b77a2b 100644 --- a/node_modules/lodash/package/_assocIndexOf.js +++ b/node_modules/globule/node_modules/lodash/_assocIndexOf.js @@ -4,7 +4,7 @@ var eq = require('./eq'); * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ diff --git a/node_modules/lodash/package/_baseAggregator.js b/node_modules/globule/node_modules/lodash/_baseAggregator.js similarity index 100% rename from node_modules/lodash/package/_baseAggregator.js rename to node_modules/globule/node_modules/lodash/_baseAggregator.js diff --git a/node_modules/lodash/package/_baseAssign.js b/node_modules/globule/node_modules/lodash/_baseAssign.js similarity index 100% rename from node_modules/lodash/package/_baseAssign.js rename to node_modules/globule/node_modules/lodash/_baseAssign.js diff --git a/node_modules/globule/node_modules/lodash/_baseAssignValue.js b/node_modules/globule/node_modules/lodash/_baseAssignValue.js new file mode 100644 index 0000000..d6f66ef --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseAssignValue.js @@ -0,0 +1,25 @@ +var defineProperty = require('./_defineProperty'); + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +module.exports = baseAssignValue; diff --git a/node_modules/lodash/package/_baseAt.js b/node_modules/globule/node_modules/lodash/_baseAt.js similarity index 68% rename from node_modules/lodash/package/_baseAt.js rename to node_modules/globule/node_modules/lodash/_baseAt.js index a077cb9..19eba75 100644 --- a/node_modules/lodash/package/_baseAt.js +++ b/node_modules/globule/node_modules/lodash/_baseAt.js @@ -6,16 +6,16 @@ var get = require('./get'); * @private * @param {Object} object The object to iterate over. * @param {string[]} paths The property paths of elements to pick. - * @returns {Array} Returns the new array of picked elements. + * @returns {Array} Returns the picked elements. */ function baseAt(object, paths) { var index = -1, - isNil = object == null, length = paths.length, - result = Array(length); + result = Array(length), + skip = object == null; while (++index < length) { - result[index] = isNil ? undefined : get(object, paths[index]); + result[index] = skip ? undefined : get(object, paths[index]); } return result; } diff --git a/node_modules/lodash/package/_baseClamp.js b/node_modules/globule/node_modules/lodash/_baseClamp.js similarity index 96% rename from node_modules/lodash/package/_baseClamp.js rename to node_modules/globule/node_modules/lodash/_baseClamp.js index ceadeef..a1c5692 100644 --- a/node_modules/lodash/package/_baseClamp.js +++ b/node_modules/globule/node_modules/lodash/_baseClamp.js @@ -1,5 +1,5 @@ /** - * The base implementation of `_.clamp` which doesn't coerce arguments to numbers. + * The base implementation of `_.clamp` which doesn't coerce arguments. * * @private * @param {number} number The number to clamp. diff --git a/node_modules/lodash/package/_baseClone.js b/node_modules/globule/node_modules/lodash/_baseClone.js similarity index 94% rename from node_modules/lodash/package/_baseClone.js rename to node_modules/globule/node_modules/lodash/_baseClone.js index b1079ed..22ff841 100644 --- a/node_modules/lodash/package/_baseClone.js +++ b/node_modules/globule/node_modules/lodash/_baseClone.js @@ -12,7 +12,6 @@ var Stack = require('./_Stack'), initCloneObject = require('./_initCloneObject'), isArray = require('./isArray'), isBuffer = require('./isBuffer'), - isHostObject = require('./_isHostObject'), isObject = require('./isObject'), keys = require('./keys'); @@ -100,9 +99,6 @@ function baseClone(value, isDeep, isFull, customizer, key, object, stack) { return cloneBuffer(value, isDeep); } if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - if (isHostObject(value)) { - return object ? value : {}; - } result = initCloneObject(isFunc ? {} : value); if (!isDeep) { return copySymbols(value, baseAssign(result, value)); @@ -122,15 +118,13 @@ function baseClone(value, isDeep, isFull, customizer, key, object, stack) { } stack.set(value, result); - if (!isArr) { - var props = isFull ? getAllKeys(value) : keys(value); - } - // Recursively populate clone (susceptible to call stack limits). + var props = isArr ? undefined : (isFull ? getAllKeys : keys)(value); arrayEach(props || value, function(subValue, key) { if (props) { key = subValue; subValue = value[key]; } + // Recursively populate clone (susceptible to call stack limits). assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); }); return result; diff --git a/node_modules/globule/node_modules/lodash/_baseConforms.js b/node_modules/globule/node_modules/lodash/_baseConforms.js new file mode 100644 index 0000000..947e20d --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseConforms.js @@ -0,0 +1,18 @@ +var baseConformsTo = require('./_baseConformsTo'), + keys = require('./keys'); + +/** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ +function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; +} + +module.exports = baseConforms; diff --git a/node_modules/globule/node_modules/lodash/_baseConformsTo.js b/node_modules/globule/node_modules/lodash/_baseConformsTo.js new file mode 100644 index 0000000..e449cb8 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseConformsTo.js @@ -0,0 +1,27 @@ +/** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ +function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; +} + +module.exports = baseConformsTo; diff --git a/node_modules/globule/node_modules/lodash/_baseCreate.js b/node_modules/globule/node_modules/lodash/_baseCreate.js new file mode 100644 index 0000000..ffa6a52 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseCreate.js @@ -0,0 +1,30 @@ +var isObject = require('./isObject'); + +/** Built-in value references. */ +var objectCreate = Object.create; + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); + +module.exports = baseCreate; diff --git a/node_modules/lodash/package/_baseDelay.js b/node_modules/globule/node_modules/lodash/_baseDelay.js similarity index 70% rename from node_modules/lodash/package/_baseDelay.js rename to node_modules/globule/node_modules/lodash/_baseDelay.js index c397562..1486d69 100644 --- a/node_modules/lodash/package/_baseDelay.js +++ b/node_modules/globule/node_modules/lodash/_baseDelay.js @@ -1,15 +1,15 @@ -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** - * The base implementation of `_.delay` and `_.defer` which accepts an array - * of `func` arguments. + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. * * @private * @param {Function} func The function to delay. * @param {number} wait The number of milliseconds to delay invocation. - * @param {Object} args The arguments to provide to `func`. - * @returns {number} Returns the timer id. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. */ function baseDelay(func, wait, args) { if (typeof func != 'function') { diff --git a/node_modules/lodash/package/_baseDifference.js b/node_modules/globule/node_modules/lodash/_baseDifference.js similarity index 96% rename from node_modules/lodash/package/_baseDifference.js rename to node_modules/globule/node_modules/lodash/_baseDifference.js index dcccad3..343ac19 100644 --- a/node_modules/lodash/package/_baseDifference.js +++ b/node_modules/globule/node_modules/lodash/_baseDifference.js @@ -45,7 +45,7 @@ function baseDifference(array, values, iteratee, comparator) { outer: while (++index < length) { var value = array[index], - computed = iteratee ? iteratee(value) : value; + computed = iteratee == null ? value : iteratee(value); value = (comparator || value !== 0) ? value : 0; if (isCommon && computed === computed) { diff --git a/node_modules/lodash/package/_baseEach.js b/node_modules/globule/node_modules/lodash/_baseEach.js similarity index 100% rename from node_modules/lodash/package/_baseEach.js rename to node_modules/globule/node_modules/lodash/_baseEach.js diff --git a/node_modules/lodash/package/_baseEachRight.js b/node_modules/globule/node_modules/lodash/_baseEachRight.js similarity index 100% rename from node_modules/lodash/package/_baseEachRight.js rename to node_modules/globule/node_modules/lodash/_baseEachRight.js diff --git a/node_modules/lodash/package/_baseEvery.js b/node_modules/globule/node_modules/lodash/_baseEvery.js similarity index 100% rename from node_modules/lodash/package/_baseEvery.js rename to node_modules/globule/node_modules/lodash/_baseEvery.js diff --git a/node_modules/lodash/package/_baseExtremum.js b/node_modules/globule/node_modules/lodash/_baseExtremum.js similarity index 100% rename from node_modules/lodash/package/_baseExtremum.js rename to node_modules/globule/node_modules/lodash/_baseExtremum.js diff --git a/node_modules/lodash/package/_baseFill.js b/node_modules/globule/node_modules/lodash/_baseFill.js similarity index 100% rename from node_modules/lodash/package/_baseFill.js rename to node_modules/globule/node_modules/lodash/_baseFill.js diff --git a/node_modules/lodash/package/_baseFilter.js b/node_modules/globule/node_modules/lodash/_baseFilter.js similarity index 100% rename from node_modules/lodash/package/_baseFilter.js rename to node_modules/globule/node_modules/lodash/_baseFilter.js diff --git a/node_modules/lodash/package/_baseFindIndex.js b/node_modules/globule/node_modules/lodash/_baseFindIndex.js similarity index 72% rename from node_modules/lodash/package/_baseFindIndex.js rename to node_modules/globule/node_modules/lodash/_baseFindIndex.js index 61428f6..e3f5d8a 100644 --- a/node_modules/lodash/package/_baseFindIndex.js +++ b/node_modules/globule/node_modules/lodash/_baseFindIndex.js @@ -3,14 +3,15 @@ * support for iteratee shorthands. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {number} Returns the index of the matched value, else `-1`. */ -function baseFindIndex(array, predicate, fromRight) { +function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, - index = fromRight ? length : -1; + index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { if (predicate(array[index], index, array)) { diff --git a/node_modules/globule/node_modules/lodash/_baseFindKey.js b/node_modules/globule/node_modules/lodash/_baseFindKey.js new file mode 100644 index 0000000..2e430f3 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseFindKey.js @@ -0,0 +1,23 @@ +/** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ +function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; +} + +module.exports = baseFindKey; diff --git a/node_modules/lodash/package/_baseFlatten.js b/node_modules/globule/node_modules/lodash/_baseFlatten.js similarity index 100% rename from node_modules/lodash/package/_baseFlatten.js rename to node_modules/globule/node_modules/lodash/_baseFlatten.js diff --git a/node_modules/lodash/package/_baseFor.js b/node_modules/globule/node_modules/lodash/_baseFor.js similarity index 100% rename from node_modules/lodash/package/_baseFor.js rename to node_modules/globule/node_modules/lodash/_baseFor.js diff --git a/node_modules/lodash/package/_baseForOwn.js b/node_modules/globule/node_modules/lodash/_baseForOwn.js similarity index 100% rename from node_modules/lodash/package/_baseForOwn.js rename to node_modules/globule/node_modules/lodash/_baseForOwn.js diff --git a/node_modules/lodash/package/_baseForOwnRight.js b/node_modules/globule/node_modules/lodash/_baseForOwnRight.js similarity index 100% rename from node_modules/lodash/package/_baseForOwnRight.js rename to node_modules/globule/node_modules/lodash/_baseForOwnRight.js diff --git a/node_modules/lodash/package/_baseForRight.js b/node_modules/globule/node_modules/lodash/_baseForRight.js similarity index 100% rename from node_modules/lodash/package/_baseForRight.js rename to node_modules/globule/node_modules/lodash/_baseForRight.js diff --git a/node_modules/lodash/package/_baseFunctions.js b/node_modules/globule/node_modules/lodash/_baseFunctions.js similarity index 87% rename from node_modules/lodash/package/_baseFunctions.js rename to node_modules/globule/node_modules/lodash/_baseFunctions.js index 6e1090f..d23bc9b 100644 --- a/node_modules/lodash/package/_baseFunctions.js +++ b/node_modules/globule/node_modules/lodash/_baseFunctions.js @@ -8,7 +8,7 @@ var arrayFilter = require('./_arrayFilter'), * @private * @param {Object} object The object to inspect. * @param {Array} props The property names to filter. - * @returns {Array} Returns the new array of filtered property names. + * @returns {Array} Returns the function names. */ function baseFunctions(object, props) { return arrayFilter(props, function(key) { diff --git a/node_modules/lodash/package/_baseGet.js b/node_modules/globule/node_modules/lodash/_baseGet.js similarity index 100% rename from node_modules/lodash/package/_baseGet.js rename to node_modules/globule/node_modules/lodash/_baseGet.js diff --git a/node_modules/lodash/package/_baseGetAllKeys.js b/node_modules/globule/node_modules/lodash/_baseGetAllKeys.js similarity index 88% rename from node_modules/lodash/package/_baseGetAllKeys.js rename to node_modules/globule/node_modules/lodash/_baseGetAllKeys.js index 7f8b38b..8ad204e 100644 --- a/node_modules/lodash/package/_baseGetAllKeys.js +++ b/node_modules/globule/node_modules/lodash/_baseGetAllKeys.js @@ -14,9 +14,7 @@ var arrayPush = require('./_arrayPush'), */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); - return isArray(object) - ? result - : arrayPush(result, symbolsFunc(object)); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } module.exports = baseGetAllKeys; diff --git a/node_modules/globule/node_modules/lodash/_baseGetTag.js b/node_modules/globule/node_modules/lodash/_baseGetTag.js new file mode 100644 index 0000000..cf869ac --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseGetTag.js @@ -0,0 +1,29 @@ +var Symbol = require('./_Symbol'), + getRawTag = require('./_getRawTag'), + objectToString = require('./_objectToString'); + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + value = Object(value); + return (symToStringTag && symToStringTag in value) + ? getRawTag(value) + : objectToString(value); +} + +module.exports = baseGetTag; diff --git a/node_modules/lodash/package/_baseGt.js b/node_modules/globule/node_modules/lodash/_baseGt.js similarity index 95% rename from node_modules/lodash/package/_baseGt.js rename to node_modules/globule/node_modules/lodash/_baseGt.js index 813238b..502d273 100644 --- a/node_modules/lodash/package/_baseGt.js +++ b/node_modules/globule/node_modules/lodash/_baseGt.js @@ -1,5 +1,5 @@ /** - * The base implementation of `_.gt` which doesn't coerce arguments to numbers. + * The base implementation of `_.gt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. diff --git a/node_modules/lodash/package/_baseHas.js b/node_modules/globule/node_modules/lodash/_baseHas.js similarity index 52% rename from node_modules/lodash/package/_baseHas.js rename to node_modules/globule/node_modules/lodash/_baseHas.js index 1de5d84..1b73032 100644 --- a/node_modules/lodash/package/_baseHas.js +++ b/node_modules/globule/node_modules/lodash/_baseHas.js @@ -1,5 +1,3 @@ -var getPrototype = require('./_getPrototype'); - /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -10,16 +8,12 @@ var hasOwnProperty = objectProto.hasOwnProperty; * The base implementation of `_.has` without support for deep paths. * * @private - * @param {Object} object The object to query. + * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHas(object, key) { - // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`, - // that are composed entirely of index properties, return `false` for - // `hasOwnProperty` checks of them. - return hasOwnProperty.call(object, key) || - (typeof object == 'object' && key in object && getPrototype(object) === null); + return object != null && hasOwnProperty.call(object, key); } module.exports = baseHas; diff --git a/node_modules/lodash/package/_baseHasIn.js b/node_modules/globule/node_modules/lodash/_baseHasIn.js similarity index 73% rename from node_modules/lodash/package/_baseHasIn.js rename to node_modules/globule/node_modules/lodash/_baseHasIn.js index 4a36558..2e0d042 100644 --- a/node_modules/lodash/package/_baseHasIn.js +++ b/node_modules/globule/node_modules/lodash/_baseHasIn.js @@ -2,12 +2,12 @@ * The base implementation of `_.hasIn` without support for deep paths. * * @private - * @param {Object} object The object to query. + * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { - return key in Object(object); + return object != null && key in Object(object); } module.exports = baseHasIn; diff --git a/node_modules/lodash/package/_baseInRange.js b/node_modules/globule/node_modules/lodash/_baseInRange.js similarity index 96% rename from node_modules/lodash/package/_baseInRange.js rename to node_modules/globule/node_modules/lodash/_baseInRange.js index 16d53f2..ec95666 100644 --- a/node_modules/lodash/package/_baseInRange.js +++ b/node_modules/globule/node_modules/lodash/_baseInRange.js @@ -3,7 +3,7 @@ var nativeMax = Math.max, nativeMin = Math.min; /** - * The base implementation of `_.inRange` which doesn't coerce arguments to numbers. + * The base implementation of `_.inRange` which doesn't coerce arguments. * * @private * @param {number} number The number to check. diff --git a/node_modules/globule/node_modules/lodash/_baseIndexOf.js b/node_modules/globule/node_modules/lodash/_baseIndexOf.js new file mode 100644 index 0000000..167e706 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseIndexOf.js @@ -0,0 +1,20 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIsNaN = require('./_baseIsNaN'), + strictIndexOf = require('./_strictIndexOf'); + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); +} + +module.exports = baseIndexOf; diff --git a/node_modules/lodash/package/_baseIndexOfWith.js b/node_modules/globule/node_modules/lodash/_baseIndexOfWith.js similarity index 93% rename from node_modules/lodash/package/_baseIndexOfWith.js rename to node_modules/globule/node_modules/lodash/_baseIndexOfWith.js index 8be568a..f815fe0 100644 --- a/node_modules/lodash/package/_baseIndexOfWith.js +++ b/node_modules/globule/node_modules/lodash/_baseIndexOfWith.js @@ -2,7 +2,7 @@ * This function is like `baseIndexOf` except that it accepts a comparator. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @param {Function} comparator The comparator invoked per element. diff --git a/node_modules/lodash/package/_baseIntersection.js b/node_modules/globule/node_modules/lodash/_baseIntersection.js similarity index 100% rename from node_modules/lodash/package/_baseIntersection.js rename to node_modules/globule/node_modules/lodash/_baseIntersection.js diff --git a/node_modules/lodash/package/_baseInverter.js b/node_modules/globule/node_modules/lodash/_baseInverter.js similarity index 100% rename from node_modules/lodash/package/_baseInverter.js rename to node_modules/globule/node_modules/lodash/_baseInverter.js diff --git a/node_modules/lodash/package/_baseInvoke.js b/node_modules/globule/node_modules/lodash/_baseInvoke.js similarity index 100% rename from node_modules/lodash/package/_baseInvoke.js rename to node_modules/globule/node_modules/lodash/_baseInvoke.js diff --git a/node_modules/globule/node_modules/lodash/_baseIsArguments.js b/node_modules/globule/node_modules/lodash/_baseIsArguments.js new file mode 100644 index 0000000..b3562cc --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseIsArguments.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; +} + +module.exports = baseIsArguments; diff --git a/node_modules/globule/node_modules/lodash/_baseIsArrayBuffer.js b/node_modules/globule/node_modules/lodash/_baseIsArrayBuffer.js new file mode 100644 index 0000000..a2c4f30 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseIsArrayBuffer.js @@ -0,0 +1,17 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +var arrayBufferTag = '[object ArrayBuffer]'; + +/** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ +function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; +} + +module.exports = baseIsArrayBuffer; diff --git a/node_modules/globule/node_modules/lodash/_baseIsDate.js b/node_modules/globule/node_modules/lodash/_baseIsDate.js new file mode 100644 index 0000000..ba67c78 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseIsDate.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var dateTag = '[object Date]'; + +/** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ +function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; +} + +module.exports = baseIsDate; diff --git a/node_modules/lodash/package/_baseIsEqual.js b/node_modules/globule/node_modules/lodash/_baseIsEqual.js similarity index 100% rename from node_modules/lodash/package/_baseIsEqual.js rename to node_modules/globule/node_modules/lodash/_baseIsEqual.js diff --git a/node_modules/lodash/package/_baseIsEqualDeep.js b/node_modules/globule/node_modules/lodash/_baseIsEqualDeep.js similarity index 91% rename from node_modules/lodash/package/_baseIsEqualDeep.js rename to node_modules/globule/node_modules/lodash/_baseIsEqualDeep.js index c18d6d1..42dc03d 100644 --- a/node_modules/lodash/package/_baseIsEqualDeep.js +++ b/node_modules/globule/node_modules/lodash/_baseIsEqualDeep.js @@ -4,7 +4,7 @@ var Stack = require('./_Stack'), equalObjects = require('./_equalObjects'), getTag = require('./_getTag'), isArray = require('./isArray'), - isHostObject = require('./_isHostObject'), + isBuffer = require('./isBuffer'), isTypedArray = require('./isTypedArray'); /** Used to compose bitmasks for comparison styles. */ @@ -50,10 +50,17 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { othTag = getTag(other); othTag = othTag == argsTag ? objectTag : othTag; } - var objIsObj = objTag == objectTag && !isHostObject(object), - othIsObj = othTag == objectTag && !isHostObject(other), + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, isSameTag = objTag == othTag; + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } if (isSameTag && !objIsObj) { stack || (stack = new Stack); return (objIsArr || isTypedArray(object)) diff --git a/node_modules/globule/node_modules/lodash/_baseIsMap.js b/node_modules/globule/node_modules/lodash/_baseIsMap.js new file mode 100644 index 0000000..02a4021 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseIsMap.js @@ -0,0 +1,18 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; +} + +module.exports = baseIsMap; diff --git a/node_modules/lodash/package/_baseIsMatch.js b/node_modules/globule/node_modules/lodash/_baseIsMatch.js similarity index 100% rename from node_modules/lodash/package/_baseIsMatch.js rename to node_modules/globule/node_modules/lodash/_baseIsMatch.js diff --git a/node_modules/globule/node_modules/lodash/_baseIsNaN.js b/node_modules/globule/node_modules/lodash/_baseIsNaN.js new file mode 100644 index 0000000..316f1eb --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseIsNaN.js @@ -0,0 +1,12 @@ +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +module.exports = baseIsNaN; diff --git a/node_modules/lodash/package/isNative.js b/node_modules/globule/node_modules/lodash/_baseIsNative.js similarity index 62% rename from node_modules/lodash/package/isNative.js rename to node_modules/globule/node_modules/lodash/_baseIsNative.js index 2d5149b..8702330 100644 --- a/node_modules/lodash/package/isNative.js +++ b/node_modules/globule/node_modules/lodash/_baseIsNative.js @@ -1,11 +1,11 @@ var isFunction = require('./isFunction'), - isHostObject = require('./_isHostObject'), + isMasked = require('./_isMasked'), isObject = require('./isObject'), toSource = require('./_toSource'); /** * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; @@ -13,10 +13,11 @@ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used for built-in method references. */ -var objectProto = Object.prototype; +var funcProto = Function.prototype, + objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ -var funcToString = Function.prototype.toString; +var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; @@ -28,29 +29,19 @@ var reIsNative = RegExp('^' + ); /** - * Checks if `value` is a native function. + * The base implementation of `_.isNative` without bad shim checks. * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang + * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. - * @example - * - * _.isNative(Array.prototype.push); - * // => true - * - * _.isNative(_); - * // => false */ -function isNative(value) { - if (!isObject(value)) { +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { return false; } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } -module.exports = isNative; +module.exports = baseIsNative; diff --git a/node_modules/globule/node_modules/lodash/_baseIsRegExp.js b/node_modules/globule/node_modules/lodash/_baseIsRegExp.js new file mode 100644 index 0000000..6cd7c1a --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseIsRegExp.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var regexpTag = '[object RegExp]'; + +/** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ +function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; +} + +module.exports = baseIsRegExp; diff --git a/node_modules/globule/node_modules/lodash/_baseIsSet.js b/node_modules/globule/node_modules/lodash/_baseIsSet.js new file mode 100644 index 0000000..6dee367 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseIsSet.js @@ -0,0 +1,18 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; +} + +module.exports = baseIsSet; diff --git a/node_modules/lodash/package/isTypedArray.js b/node_modules/globule/node_modules/lodash/_baseIsTypedArray.js similarity index 71% rename from node_modules/lodash/package/isTypedArray.js rename to node_modules/globule/node_modules/lodash/_baseIsTypedArray.js index 0d86b90..1edb32f 100644 --- a/node_modules/lodash/package/isTypedArray.js +++ b/node_modules/globule/node_modules/lodash/_baseIsTypedArray.js @@ -1,4 +1,5 @@ -var isLength = require('./isLength'), +var baseGetTag = require('./_baseGetTag'), + isLength = require('./isLength'), isObjectLike = require('./isObjectLike'); /** `Object#toString` result references. */ @@ -44,37 +45,16 @@ typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - /** - * Checks if `value` is classified as a typed array. + * The base implementation of `_.isTypedArray` without Node.js optimizations. * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang + * @private * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ -function isTypedArray(value) { +function baseIsTypedArray(value) { return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } -module.exports = isTypedArray; +module.exports = baseIsTypedArray; diff --git a/node_modules/lodash/package/_baseIteratee.js b/node_modules/globule/node_modules/lodash/_baseIteratee.js similarity index 100% rename from node_modules/lodash/package/_baseIteratee.js rename to node_modules/globule/node_modules/lodash/_baseIteratee.js diff --git a/node_modules/globule/node_modules/lodash/_baseKeys.js b/node_modules/globule/node_modules/lodash/_baseKeys.js new file mode 100644 index 0000000..45e9e6f --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseKeys.js @@ -0,0 +1,30 @@ +var isPrototype = require('./_isPrototype'), + nativeKeys = require('./_nativeKeys'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +module.exports = baseKeys; diff --git a/node_modules/globule/node_modules/lodash/_baseKeysIn.js b/node_modules/globule/node_modules/lodash/_baseKeysIn.js new file mode 100644 index 0000000..ea8a0a1 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseKeysIn.js @@ -0,0 +1,33 @@ +var isObject = require('./isObject'), + isPrototype = require('./_isPrototype'), + nativeKeysIn = require('./_nativeKeysIn'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +module.exports = baseKeysIn; diff --git a/node_modules/lodash/package/_baseLodash.js b/node_modules/globule/node_modules/lodash/_baseLodash.js similarity index 100% rename from node_modules/lodash/package/_baseLodash.js rename to node_modules/globule/node_modules/lodash/_baseLodash.js diff --git a/node_modules/lodash/package/_baseLt.js b/node_modules/globule/node_modules/lodash/_baseLt.js similarity index 95% rename from node_modules/lodash/package/_baseLt.js rename to node_modules/globule/node_modules/lodash/_baseLt.js index aa05efa..8674d29 100644 --- a/node_modules/lodash/package/_baseLt.js +++ b/node_modules/globule/node_modules/lodash/_baseLt.js @@ -1,5 +1,5 @@ /** - * The base implementation of `_.lt` which doesn't coerce arguments to numbers. + * The base implementation of `_.lt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. diff --git a/node_modules/lodash/package/_baseMap.js b/node_modules/globule/node_modules/lodash/_baseMap.js similarity index 100% rename from node_modules/lodash/package/_baseMap.js rename to node_modules/globule/node_modules/lodash/_baseMap.js diff --git a/node_modules/lodash/package/_baseMatches.js b/node_modules/globule/node_modules/lodash/_baseMatches.js similarity index 92% rename from node_modules/lodash/package/_baseMatches.js rename to node_modules/globule/node_modules/lodash/_baseMatches.js index ba9012f..e56582a 100644 --- a/node_modules/lodash/package/_baseMatches.js +++ b/node_modules/globule/node_modules/lodash/_baseMatches.js @@ -7,7 +7,7 @@ var baseIsMatch = require('./_baseIsMatch'), * * @private * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var matchData = getMatchData(source); diff --git a/node_modules/lodash/package/_baseMatchesProperty.js b/node_modules/globule/node_modules/lodash/_baseMatchesProperty.js similarity index 95% rename from node_modules/lodash/package/_baseMatchesProperty.js rename to node_modules/globule/node_modules/lodash/_baseMatchesProperty.js index ec5097a..3968081 100644 --- a/node_modules/lodash/package/_baseMatchesProperty.js +++ b/node_modules/globule/node_modules/lodash/_baseMatchesProperty.js @@ -16,7 +16,7 @@ var UNORDERED_COMPARE_FLAG = 1, * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { diff --git a/node_modules/lodash/package/_baseMean.js b/node_modules/globule/node_modules/lodash/_baseMean.js similarity index 91% rename from node_modules/lodash/package/_baseMean.js rename to node_modules/globule/node_modules/lodash/_baseMean.js index ac99a42..fa9e00a 100644 --- a/node_modules/lodash/package/_baseMean.js +++ b/node_modules/globule/node_modules/lodash/_baseMean.js @@ -13,7 +13,7 @@ var NAN = 0 / 0; * @returns {number} Returns the mean. */ function baseMean(array, iteratee) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? (baseSum(array, iteratee) / length) : NAN; } diff --git a/node_modules/lodash/package/_baseMerge.js b/node_modules/globule/node_modules/lodash/_baseMerge.js similarity index 77% rename from node_modules/lodash/package/_baseMerge.js rename to node_modules/globule/node_modules/lodash/_baseMerge.js index e18d3bf..f4cb8c6 100644 --- a/node_modules/lodash/package/_baseMerge.js +++ b/node_modules/globule/node_modules/lodash/_baseMerge.js @@ -1,10 +1,8 @@ var Stack = require('./_Stack'), - arrayEach = require('./_arrayEach'), assignMergeValue = require('./_assignMergeValue'), + baseFor = require('./_baseFor'), baseMergeDeep = require('./_baseMergeDeep'), - isArray = require('./isArray'), isObject = require('./isObject'), - isTypedArray = require('./isTypedArray'), keysIn = require('./keysIn'); /** @@ -22,14 +20,7 @@ function baseMerge(object, source, srcIndex, customizer, stack) { if (object === source) { return; } - if (!(isArray(source) || isTypedArray(source))) { - var props = keysIn(source); - } - arrayEach(props || source, function(srcValue, key) { - if (props) { - key = srcValue; - srcValue = source[key]; - } + baseFor(source, function(srcValue, key) { if (isObject(srcValue)) { stack || (stack = new Stack); baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); @@ -44,7 +35,7 @@ function baseMerge(object, source, srcIndex, customizer, stack) { } assignMergeValue(object, key, newValue); } - }); + }, keysIn); } module.exports = baseMerge; diff --git a/node_modules/lodash/package/_baseMergeDeep.js b/node_modules/globule/node_modules/lodash/_baseMergeDeep.js similarity index 77% rename from node_modules/lodash/package/_baseMergeDeep.js rename to node_modules/globule/node_modules/lodash/_baseMergeDeep.js index 062f004..42b405a 100644 --- a/node_modules/lodash/package/_baseMergeDeep.js +++ b/node_modules/globule/node_modules/lodash/_baseMergeDeep.js @@ -1,9 +1,12 @@ var assignMergeValue = require('./_assignMergeValue'), - baseClone = require('./_baseClone'), + cloneBuffer = require('./_cloneBuffer'), + cloneTypedArray = require('./_cloneTypedArray'), copyArray = require('./_copyArray'), + initCloneObject = require('./_initCloneObject'), isArguments = require('./isArguments'), isArray = require('./isArray'), isArrayLikeObject = require('./isArrayLikeObject'), + isBuffer = require('./isBuffer'), isFunction = require('./isFunction'), isObject = require('./isObject'), isPlainObject = require('./isPlainObject'), @@ -41,42 +44,49 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta var isCommon = newValue === undefined; if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + newValue = srcValue; - if (isArray(srcValue) || isTypedArray(srcValue)) { + if (isArr || isBuff || isTyped) { if (isArray(objValue)) { newValue = objValue; } else if (isArrayLikeObject(objValue)) { newValue = copyArray(objValue); } - else { + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { isCommon = false; - newValue = baseClone(srcValue, true); + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; if (isArguments(objValue)) { newValue = toPlainObject(objValue); } else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { - isCommon = false; - newValue = baseClone(srcValue, true); - } - else { - newValue = objValue; + newValue = initCloneObject(srcValue); } } else { isCommon = false; } } - stack.set(srcValue, newValue); - if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); } - stack['delete'](srcValue); assignMergeValue(object, key, newValue); } diff --git a/node_modules/lodash/package/_baseNth.js b/node_modules/globule/node_modules/lodash/_baseNth.js similarity index 84% rename from node_modules/lodash/package/_baseNth.js rename to node_modules/globule/node_modules/lodash/_baseNth.js index 6978a65..0403c2a 100644 --- a/node_modules/lodash/package/_baseNth.js +++ b/node_modules/globule/node_modules/lodash/_baseNth.js @@ -1,7 +1,7 @@ var isIndex = require('./_isIndex'); /** - * The base implementation of `_.nth` which doesn't coerce `n` to an integer. + * The base implementation of `_.nth` which doesn't coerce arguments. * * @private * @param {Array} array The array to query. diff --git a/node_modules/lodash/package/_baseOrderBy.js b/node_modules/globule/node_modules/lodash/_baseOrderBy.js similarity index 100% rename from node_modules/lodash/package/_baseOrderBy.js rename to node_modules/globule/node_modules/lodash/_baseOrderBy.js diff --git a/node_modules/lodash/package/_basePick.js b/node_modules/globule/node_modules/lodash/_basePick.js similarity index 65% rename from node_modules/lodash/package/_basePick.js rename to node_modules/globule/node_modules/lodash/_basePick.js index 7272548..add3600 100644 --- a/node_modules/lodash/package/_basePick.js +++ b/node_modules/globule/node_modules/lodash/_basePick.js @@ -1,4 +1,4 @@ -var arrayReduce = require('./_arrayReduce'); +var basePickBy = require('./_basePickBy'); /** * The base implementation of `_.pick` without support for individual @@ -11,12 +11,9 @@ var arrayReduce = require('./_arrayReduce'); */ function basePick(object, props) { object = Object(object); - return arrayReduce(props, function(result, key) { - if (key in object) { - result[key] = object[key]; - } - return result; - }, {}); + return basePickBy(object, props, function(value, key) { + return key in object; + }); } module.exports = basePick; diff --git a/node_modules/lodash/package/_basePickBy.js b/node_modules/globule/node_modules/lodash/_basePickBy.js similarity index 70% rename from node_modules/lodash/package/_basePickBy.js rename to node_modules/globule/node_modules/lodash/_basePickBy.js index 56ffa5f..dc9b342 100644 --- a/node_modules/lodash/package/_basePickBy.js +++ b/node_modules/globule/node_modules/lodash/_basePickBy.js @@ -1,16 +1,16 @@ -var getAllKeysIn = require('./_getAllKeysIn'); +var baseAssignValue = require('./_baseAssignValue'); /** * The base implementation of `_.pickBy` without support for iteratee shorthands. * * @private * @param {Object} object The source object. + * @param {string[]} props The property identifiers to pick from. * @param {Function} predicate The function invoked per property. * @returns {Object} Returns the new object. */ -function basePickBy(object, predicate) { +function basePickBy(object, props, predicate) { var index = -1, - props = getAllKeysIn(object), length = props.length, result = {}; @@ -19,7 +19,7 @@ function basePickBy(object, predicate) { value = object[key]; if (predicate(value, key)) { - result[key] = value; + baseAssignValue(result, key, value); } } return result; diff --git a/node_modules/lodash/package/_baseProperty.js b/node_modules/globule/node_modules/lodash/_baseProperty.js similarity index 83% rename from node_modules/lodash/package/_baseProperty.js rename to node_modules/globule/node_modules/lodash/_baseProperty.js index e515941..496281e 100644 --- a/node_modules/lodash/package/_baseProperty.js +++ b/node_modules/globule/node_modules/lodash/_baseProperty.js @@ -3,7 +3,7 @@ * * @private * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { diff --git a/node_modules/lodash/package/_basePropertyDeep.js b/node_modules/globule/node_modules/lodash/_basePropertyDeep.js similarity index 85% rename from node_modules/lodash/package/_basePropertyDeep.js rename to node_modules/globule/node_modules/lodash/_basePropertyDeep.js index acc2009..1e5aae5 100644 --- a/node_modules/lodash/package/_basePropertyDeep.js +++ b/node_modules/globule/node_modules/lodash/_basePropertyDeep.js @@ -5,7 +5,7 @@ var baseGet = require('./_baseGet'); * * @private * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. */ function basePropertyDeep(path) { return function(object) { diff --git a/node_modules/globule/node_modules/lodash/_basePropertyOf.js b/node_modules/globule/node_modules/lodash/_basePropertyOf.js new file mode 100644 index 0000000..4617399 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_basePropertyOf.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = basePropertyOf; diff --git a/node_modules/lodash/package/_basePullAll.js b/node_modules/globule/node_modules/lodash/_basePullAll.js similarity index 90% rename from node_modules/lodash/package/_basePullAll.js rename to node_modules/globule/node_modules/lodash/_basePullAll.js index 3c07c99..305720e 100644 --- a/node_modules/lodash/package/_basePullAll.js +++ b/node_modules/globule/node_modules/lodash/_basePullAll.js @@ -1,7 +1,8 @@ var arrayMap = require('./_arrayMap'), baseIndexOf = require('./_baseIndexOf'), baseIndexOfWith = require('./_baseIndexOfWith'), - baseUnary = require('./_baseUnary'); + baseUnary = require('./_baseUnary'), + copyArray = require('./_copyArray'); /** Used for built-in method references. */ var arrayProto = Array.prototype; @@ -26,6 +27,9 @@ function basePullAll(array, values, iteratee, comparator) { length = values.length, seen = array; + if (array === values) { + values = copyArray(values); + } if (iteratee) { seen = arrayMap(array, baseUnary(iteratee)); } diff --git a/node_modules/lodash/package/_basePullAt.js b/node_modules/globule/node_modules/lodash/_basePullAt.js similarity index 100% rename from node_modules/lodash/package/_basePullAt.js rename to node_modules/globule/node_modules/lodash/_basePullAt.js diff --git a/node_modules/lodash/package/_baseRandom.js b/node_modules/globule/node_modules/lodash/_baseRandom.js similarity index 100% rename from node_modules/lodash/package/_baseRandom.js rename to node_modules/globule/node_modules/lodash/_baseRandom.js diff --git a/node_modules/lodash/package/_baseRange.js b/node_modules/globule/node_modules/lodash/_baseRange.js similarity index 90% rename from node_modules/lodash/package/_baseRange.js rename to node_modules/globule/node_modules/lodash/_baseRange.js index 2b39dd4..0fb8e41 100644 --- a/node_modules/lodash/package/_baseRange.js +++ b/node_modules/globule/node_modules/lodash/_baseRange.js @@ -4,14 +4,14 @@ var nativeCeil = Math.ceil, /** * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments to numbers. + * coerce arguments. * * @private * @param {number} start The start of the range. * @param {number} end The end of the range. * @param {number} step The value to increment or decrement by. * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. */ function baseRange(start, end, step, fromRight) { var index = -1, diff --git a/node_modules/lodash/package/_baseReduce.js b/node_modules/globule/node_modules/lodash/_baseReduce.js similarity index 100% rename from node_modules/lodash/package/_baseReduce.js rename to node_modules/globule/node_modules/lodash/_baseReduce.js diff --git a/node_modules/lodash/package/_baseRepeat.js b/node_modules/globule/node_modules/lodash/_baseRepeat.js similarity index 100% rename from node_modules/lodash/package/_baseRepeat.js rename to node_modules/globule/node_modules/lodash/_baseRepeat.js diff --git a/node_modules/globule/node_modules/lodash/_baseRest.js b/node_modules/globule/node_modules/lodash/_baseRest.js new file mode 100644 index 0000000..d0dc4bd --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseRest.js @@ -0,0 +1,17 @@ +var identity = require('./identity'), + overRest = require('./_overRest'), + setToString = require('./_setToString'); + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); +} + +module.exports = baseRest; diff --git a/node_modules/globule/node_modules/lodash/_baseSample.js b/node_modules/globule/node_modules/lodash/_baseSample.js new file mode 100644 index 0000000..58582b9 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseSample.js @@ -0,0 +1,15 @@ +var arraySample = require('./_arraySample'), + values = require('./values'); + +/** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ +function baseSample(collection) { + return arraySample(values(collection)); +} + +module.exports = baseSample; diff --git a/node_modules/globule/node_modules/lodash/_baseSampleSize.js b/node_modules/globule/node_modules/lodash/_baseSampleSize.js new file mode 100644 index 0000000..5c90ec5 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseSampleSize.js @@ -0,0 +1,18 @@ +var baseClamp = require('./_baseClamp'), + shuffleSelf = require('./_shuffleSelf'), + values = require('./values'); + +/** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ +function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); +} + +module.exports = baseSampleSize; diff --git a/node_modules/lodash/package/_baseSet.js b/node_modules/globule/node_modules/lodash/_baseSet.js similarity index 63% rename from node_modules/lodash/package/_baseSet.js rename to node_modules/globule/node_modules/lodash/_baseSet.js index 34d63e5..2be04d5 100644 --- a/node_modules/lodash/package/_baseSet.js +++ b/node_modules/globule/node_modules/lodash/_baseSet.js @@ -9,13 +9,16 @@ var assignValue = require('./_assignValue'), * The base implementation of `_.set`. * * @private - * @param {Object} object The object to query. + * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @param {Function} [customizer] The function to customize path creation. * @returns {Object} Returns `object`. */ function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } path = isKey(path, object) ? [path] : castPath(path); var index = -1, @@ -24,20 +27,19 @@ function baseSet(object, path, value, customizer) { nested = object; while (nested != null && ++index < length) { - var key = toKey(path[index]); - if (isObject(nested)) { - var newValue = value; - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = objValue == null - ? (isIndex(path[index + 1]) ? [] : {}) - : objValue; - } + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); } - assignValue(nested, key, newValue); } + assignValue(nested, key, newValue); nested = nested[key]; } return object; diff --git a/node_modules/lodash/package/_baseSetData.js b/node_modules/globule/node_modules/lodash/_baseSetData.js similarity index 96% rename from node_modules/lodash/package/_baseSetData.js rename to node_modules/globule/node_modules/lodash/_baseSetData.js index e689df2..c409947 100644 --- a/node_modules/lodash/package/_baseSetData.js +++ b/node_modules/globule/node_modules/lodash/_baseSetData.js @@ -2,7 +2,7 @@ var identity = require('./identity'), metaMap = require('./_metaMap'); /** - * The base implementation of `setData` without support for hot loop detection. + * The base implementation of `setData` without support for hot loop shorting. * * @private * @param {Function} func The function to associate metadata with. diff --git a/node_modules/globule/node_modules/lodash/_baseSetToString.js b/node_modules/globule/node_modules/lodash/_baseSetToString.js new file mode 100644 index 0000000..89eaca3 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseSetToString.js @@ -0,0 +1,22 @@ +var constant = require('./constant'), + defineProperty = require('./_defineProperty'), + identity = require('./identity'); + +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); +}; + +module.exports = baseSetToString; diff --git a/node_modules/globule/node_modules/lodash/_baseShuffle.js b/node_modules/globule/node_modules/lodash/_baseShuffle.js new file mode 100644 index 0000000..023077a --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_baseShuffle.js @@ -0,0 +1,15 @@ +var shuffleSelf = require('./_shuffleSelf'), + values = require('./values'); + +/** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ +function baseShuffle(collection) { + return shuffleSelf(values(collection)); +} + +module.exports = baseShuffle; diff --git a/node_modules/lodash/package/_baseSlice.js b/node_modules/globule/node_modules/lodash/_baseSlice.js similarity index 100% rename from node_modules/lodash/package/_baseSlice.js rename to node_modules/globule/node_modules/lodash/_baseSlice.js diff --git a/node_modules/lodash/package/_baseSome.js b/node_modules/globule/node_modules/lodash/_baseSome.js similarity index 100% rename from node_modules/lodash/package/_baseSome.js rename to node_modules/globule/node_modules/lodash/_baseSome.js diff --git a/node_modules/lodash/package/_baseSortBy.js b/node_modules/globule/node_modules/lodash/_baseSortBy.js similarity index 100% rename from node_modules/lodash/package/_baseSortBy.js rename to node_modules/globule/node_modules/lodash/_baseSortBy.js diff --git a/node_modules/lodash/package/_baseSortedIndex.js b/node_modules/globule/node_modules/lodash/_baseSortedIndex.js similarity index 96% rename from node_modules/lodash/package/_baseSortedIndex.js rename to node_modules/globule/node_modules/lodash/_baseSortedIndex.js index 0e82dc7..638c366 100644 --- a/node_modules/lodash/package/_baseSortedIndex.js +++ b/node_modules/globule/node_modules/lodash/_baseSortedIndex.js @@ -20,7 +20,7 @@ var MAX_ARRAY_LENGTH = 4294967295, */ function baseSortedIndex(array, value, retHighest) { var low = 0, - high = array ? array.length : low; + high = array == null ? low : array.length; if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { while (low < high) { diff --git a/node_modules/lodash/package/_baseSortedIndexBy.js b/node_modules/globule/node_modules/lodash/_baseSortedIndexBy.js similarity index 97% rename from node_modules/lodash/package/_baseSortedIndexBy.js rename to node_modules/globule/node_modules/lodash/_baseSortedIndexBy.js index fde7928..bb22e36 100644 --- a/node_modules/lodash/package/_baseSortedIndexBy.js +++ b/node_modules/globule/node_modules/lodash/_baseSortedIndexBy.js @@ -25,7 +25,7 @@ function baseSortedIndexBy(array, value, iteratee, retHighest) { value = iteratee(value); var low = 0, - high = array ? array.length : 0, + high = array == null ? 0 : array.length, valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), diff --git a/node_modules/lodash/package/_baseSortedUniq.js b/node_modules/globule/node_modules/lodash/_baseSortedUniq.js similarity index 100% rename from node_modules/lodash/package/_baseSortedUniq.js rename to node_modules/globule/node_modules/lodash/_baseSortedUniq.js diff --git a/node_modules/lodash/package/_baseSum.js b/node_modules/globule/node_modules/lodash/_baseSum.js similarity index 100% rename from node_modules/lodash/package/_baseSum.js rename to node_modules/globule/node_modules/lodash/_baseSum.js diff --git a/node_modules/lodash/package/_baseTimes.js b/node_modules/globule/node_modules/lodash/_baseTimes.js similarity index 100% rename from node_modules/lodash/package/_baseTimes.js rename to node_modules/globule/node_modules/lodash/_baseTimes.js diff --git a/node_modules/lodash/package/_baseToNumber.js b/node_modules/globule/node_modules/lodash/_baseToNumber.js similarity index 100% rename from node_modules/lodash/package/_baseToNumber.js rename to node_modules/globule/node_modules/lodash/_baseToNumber.js diff --git a/node_modules/lodash/package/_baseToPairs.js b/node_modules/globule/node_modules/lodash/_baseToPairs.js similarity index 88% rename from node_modules/lodash/package/_baseToPairs.js rename to node_modules/globule/node_modules/lodash/_baseToPairs.js index d80b402..bff1991 100644 --- a/node_modules/lodash/package/_baseToPairs.js +++ b/node_modules/globule/node_modules/lodash/_baseToPairs.js @@ -7,7 +7,7 @@ var arrayMap = require('./_arrayMap'); * @private * @param {Object} object The object to query. * @param {Array} props The property names to get values for. - * @returns {Object} Returns the new array of key-value pairs. + * @returns {Object} Returns the key-value pairs. */ function baseToPairs(object, props) { return arrayMap(props, function(key) { diff --git a/node_modules/lodash/package/_baseToString.js b/node_modules/globule/node_modules/lodash/_baseToString.js similarity index 80% rename from node_modules/lodash/package/_baseToString.js rename to node_modules/globule/node_modules/lodash/_baseToString.js index 462e26f..ada6ad2 100644 --- a/node_modules/lodash/package/_baseToString.js +++ b/node_modules/globule/node_modules/lodash/_baseToString.js @@ -1,4 +1,6 @@ var Symbol = require('./_Symbol'), + arrayMap = require('./_arrayMap'), + isArray = require('./isArray'), isSymbol = require('./isSymbol'); /** Used as references for various `Number` constants. */ @@ -21,6 +23,10 @@ function baseToString(value) { if (typeof value == 'string') { return value; } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } diff --git a/node_modules/lodash/package/_baseUnary.js b/node_modules/globule/node_modules/lodash/_baseUnary.js similarity index 78% rename from node_modules/lodash/package/_baseUnary.js rename to node_modules/globule/node_modules/lodash/_baseUnary.js index e584a99..98639e9 100644 --- a/node_modules/lodash/package/_baseUnary.js +++ b/node_modules/globule/node_modules/lodash/_baseUnary.js @@ -1,9 +1,9 @@ /** - * The base implementation of `_.unary` without support for storing wrapper metadata. + * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { diff --git a/node_modules/lodash/package/_baseUniq.js b/node_modules/globule/node_modules/lodash/_baseUniq.js similarity index 100% rename from node_modules/lodash/package/_baseUniq.js rename to node_modules/globule/node_modules/lodash/_baseUniq.js diff --git a/node_modules/lodash/package/_baseUnset.js b/node_modules/globule/node_modules/lodash/_baseUnset.js similarity index 65% rename from node_modules/lodash/package/_baseUnset.js rename to node_modules/globule/node_modules/lodash/_baseUnset.js index 754eb06..dda80fc 100644 --- a/node_modules/lodash/package/_baseUnset.js +++ b/node_modules/globule/node_modules/lodash/_baseUnset.js @@ -1,10 +1,15 @@ -var baseHas = require('./_baseHas'), - castPath = require('./_castPath'), +var castPath = require('./_castPath'), isKey = require('./_isKey'), last = require('./last'), parent = require('./_parent'), toKey = require('./_toKey'); +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + /** * The base implementation of `_.unset`. * @@ -18,7 +23,7 @@ function baseUnset(object, path) { object = parent(object, path); var key = toKey(last(path)); - return !(object != null && baseHas(object, key)) || delete object[key]; + return !(object != null && hasOwnProperty.call(object, key)) || delete object[key]; } module.exports = baseUnset; diff --git a/node_modules/lodash/package/_baseUpdate.js b/node_modules/globule/node_modules/lodash/_baseUpdate.js similarity index 92% rename from node_modules/lodash/package/_baseUpdate.js rename to node_modules/globule/node_modules/lodash/_baseUpdate.js index ec1b338..92a6237 100644 --- a/node_modules/lodash/package/_baseUpdate.js +++ b/node_modules/globule/node_modules/lodash/_baseUpdate.js @@ -5,7 +5,7 @@ var baseGet = require('./_baseGet'), * The base implementation of `_.update`. * * @private - * @param {Object} object The object to query. + * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to update. * @param {Function} updater The function to produce the updated value. * @param {Function} [customizer] The function to customize path creation. diff --git a/node_modules/lodash/package/_baseValues.js b/node_modules/globule/node_modules/lodash/_baseValues.js similarity index 100% rename from node_modules/lodash/package/_baseValues.js rename to node_modules/globule/node_modules/lodash/_baseValues.js diff --git a/node_modules/lodash/package/_baseWhile.js b/node_modules/globule/node_modules/lodash/_baseWhile.js similarity index 100% rename from node_modules/lodash/package/_baseWhile.js rename to node_modules/globule/node_modules/lodash/_baseWhile.js diff --git a/node_modules/lodash/package/_baseWrapperValue.js b/node_modules/globule/node_modules/lodash/_baseWrapperValue.js similarity index 100% rename from node_modules/lodash/package/_baseWrapperValue.js rename to node_modules/globule/node_modules/lodash/_baseWrapperValue.js diff --git a/node_modules/lodash/package/_baseXor.js b/node_modules/globule/node_modules/lodash/_baseXor.js similarity index 51% rename from node_modules/lodash/package/_baseXor.js rename to node_modules/globule/node_modules/lodash/_baseXor.js index 7e62d1b..8e69338 100644 --- a/node_modules/lodash/package/_baseXor.js +++ b/node_modules/globule/node_modules/lodash/_baseXor.js @@ -1,5 +1,5 @@ -var arrayPush = require('./_arrayPush'), - baseDifference = require('./_baseDifference'), +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), baseUniq = require('./_baseUniq'); /** @@ -13,18 +13,24 @@ var arrayPush = require('./_arrayPush'), * @returns {Array} Returns the new array of values. */ function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } var index = -1, - length = arrays.length; + result = Array(length); while (++index < length) { - var result = result - ? arrayPush( - baseDifference(result, arrays[index], iteratee, comparator), - baseDifference(arrays[index], result, iteratee, comparator) - ) - : arrays[index]; + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } } - return (result && result.length) ? baseUniq(result, iteratee, comparator) : []; + return baseUniq(baseFlatten(result, 1), iteratee, comparator); } module.exports = baseXor; diff --git a/node_modules/lodash/package/_baseZipObject.js b/node_modules/globule/node_modules/lodash/_baseZipObject.js similarity index 100% rename from node_modules/lodash/package/_baseZipObject.js rename to node_modules/globule/node_modules/lodash/_baseZipObject.js diff --git a/node_modules/globule/node_modules/lodash/_cacheHas.js b/node_modules/globule/node_modules/lodash/_cacheHas.js new file mode 100644 index 0000000..2dec892 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_cacheHas.js @@ -0,0 +1,13 @@ +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +module.exports = cacheHas; diff --git a/node_modules/lodash/package/_castArrayLikeObject.js b/node_modules/globule/node_modules/lodash/_castArrayLikeObject.js similarity index 100% rename from node_modules/lodash/package/_castArrayLikeObject.js rename to node_modules/globule/node_modules/lodash/_castArrayLikeObject.js diff --git a/node_modules/lodash/package/_castFunction.js b/node_modules/globule/node_modules/lodash/_castFunction.js similarity index 100% rename from node_modules/lodash/package/_castFunction.js rename to node_modules/globule/node_modules/lodash/_castFunction.js diff --git a/node_modules/lodash/package/_castPath.js b/node_modules/globule/node_modules/lodash/_castPath.js similarity index 100% rename from node_modules/lodash/package/_castPath.js rename to node_modules/globule/node_modules/lodash/_castPath.js diff --git a/node_modules/globule/node_modules/lodash/_castRest.js b/node_modules/globule/node_modules/lodash/_castRest.js new file mode 100644 index 0000000..213c66f --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_castRest.js @@ -0,0 +1,14 @@ +var baseRest = require('./_baseRest'); + +/** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +var castRest = baseRest; + +module.exports = castRest; diff --git a/node_modules/lodash/package/_castSlice.js b/node_modules/globule/node_modules/lodash/_castSlice.js similarity index 100% rename from node_modules/lodash/package/_castSlice.js rename to node_modules/globule/node_modules/lodash/_castSlice.js diff --git a/node_modules/lodash/package/_charsEndIndex.js b/node_modules/globule/node_modules/lodash/_charsEndIndex.js similarity index 100% rename from node_modules/lodash/package/_charsEndIndex.js rename to node_modules/globule/node_modules/lodash/_charsEndIndex.js diff --git a/node_modules/lodash/package/_charsStartIndex.js b/node_modules/globule/node_modules/lodash/_charsStartIndex.js similarity index 100% rename from node_modules/lodash/package/_charsStartIndex.js rename to node_modules/globule/node_modules/lodash/_charsStartIndex.js diff --git a/node_modules/lodash/package/_cloneArrayBuffer.js b/node_modules/globule/node_modules/lodash/_cloneArrayBuffer.js similarity index 100% rename from node_modules/lodash/package/_cloneArrayBuffer.js rename to node_modules/globule/node_modules/lodash/_cloneArrayBuffer.js diff --git a/node_modules/globule/node_modules/lodash/_cloneBuffer.js b/node_modules/globule/node_modules/lodash/_cloneBuffer.js new file mode 100644 index 0000000..27c4810 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_cloneBuffer.js @@ -0,0 +1,35 @@ +var root = require('./_root'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; +} + +module.exports = cloneBuffer; diff --git a/node_modules/lodash/package/_cloneDataView.js b/node_modules/globule/node_modules/lodash/_cloneDataView.js similarity index 100% rename from node_modules/lodash/package/_cloneDataView.js rename to node_modules/globule/node_modules/lodash/_cloneDataView.js diff --git a/node_modules/lodash/package/_cloneMap.js b/node_modules/globule/node_modules/lodash/_cloneMap.js similarity index 100% rename from node_modules/lodash/package/_cloneMap.js rename to node_modules/globule/node_modules/lodash/_cloneMap.js diff --git a/node_modules/lodash/package/_cloneRegExp.js b/node_modules/globule/node_modules/lodash/_cloneRegExp.js similarity index 100% rename from node_modules/lodash/package/_cloneRegExp.js rename to node_modules/globule/node_modules/lodash/_cloneRegExp.js diff --git a/node_modules/lodash/package/_cloneSet.js b/node_modules/globule/node_modules/lodash/_cloneSet.js similarity index 100% rename from node_modules/lodash/package/_cloneSet.js rename to node_modules/globule/node_modules/lodash/_cloneSet.js diff --git a/node_modules/lodash/package/_cloneSymbol.js b/node_modules/globule/node_modules/lodash/_cloneSymbol.js similarity index 100% rename from node_modules/lodash/package/_cloneSymbol.js rename to node_modules/globule/node_modules/lodash/_cloneSymbol.js diff --git a/node_modules/lodash/package/_cloneTypedArray.js b/node_modules/globule/node_modules/lodash/_cloneTypedArray.js similarity index 100% rename from node_modules/lodash/package/_cloneTypedArray.js rename to node_modules/globule/node_modules/lodash/_cloneTypedArray.js diff --git a/node_modules/lodash/package/_compareAscending.js b/node_modules/globule/node_modules/lodash/_compareAscending.js similarity index 100% rename from node_modules/lodash/package/_compareAscending.js rename to node_modules/globule/node_modules/lodash/_compareAscending.js diff --git a/node_modules/lodash/package/_compareMultiple.js b/node_modules/globule/node_modules/lodash/_compareMultiple.js similarity index 100% rename from node_modules/lodash/package/_compareMultiple.js rename to node_modules/globule/node_modules/lodash/_compareMultiple.js diff --git a/node_modules/lodash/package/_composeArgs.js b/node_modules/globule/node_modules/lodash/_composeArgs.js similarity index 95% rename from node_modules/lodash/package/_composeArgs.js rename to node_modules/globule/node_modules/lodash/_composeArgs.js index 07398e7..1ce40f4 100644 --- a/node_modules/lodash/package/_composeArgs.js +++ b/node_modules/globule/node_modules/lodash/_composeArgs.js @@ -6,7 +6,7 @@ var nativeMax = Math.max; * placeholders, and provided arguments into a single array of arguments. * * @private - * @param {Array|Object} args The provided arguments. + * @param {Array} args The provided arguments. * @param {Array} partials The arguments to prepend to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. diff --git a/node_modules/lodash/package/_composeArgsRight.js b/node_modules/globule/node_modules/lodash/_composeArgsRight.js similarity index 96% rename from node_modules/lodash/package/_composeArgsRight.js rename to node_modules/globule/node_modules/lodash/_composeArgsRight.js index 18cfae0..8dc588d 100644 --- a/node_modules/lodash/package/_composeArgsRight.js +++ b/node_modules/globule/node_modules/lodash/_composeArgsRight.js @@ -6,7 +6,7 @@ var nativeMax = Math.max; * is tailored for `_.partialRight`. * * @private - * @param {Array|Object} args The provided arguments. + * @param {Array} args The provided arguments. * @param {Array} partials The arguments to append to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. diff --git a/node_modules/lodash/package/_copyArray.js b/node_modules/globule/node_modules/lodash/_copyArray.js similarity index 100% rename from node_modules/lodash/package/_copyArray.js rename to node_modules/globule/node_modules/lodash/_copyArray.js diff --git a/node_modules/lodash/package/_copyObject.js b/node_modules/globule/node_modules/lodash/_copyObject.js similarity index 68% rename from node_modules/lodash/package/_copyObject.js rename to node_modules/globule/node_modules/lodash/_copyObject.js index 474d17b..2f2a5c2 100644 --- a/node_modules/lodash/package/_copyObject.js +++ b/node_modules/globule/node_modules/lodash/_copyObject.js @@ -1,4 +1,5 @@ -var assignValue = require('./_assignValue'); +var assignValue = require('./_assignValue'), + baseAssignValue = require('./_baseAssignValue'); /** * Copies properties of `source` to `object`. @@ -11,6 +12,7 @@ var assignValue = require('./_assignValue'); * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { + var isNew = !object; object || (object = {}); var index = -1, @@ -21,9 +23,16 @@ function copyObject(source, props, object, customizer) { var newValue = customizer ? customizer(object[key], source[key], key, object, source) - : source[key]; + : undefined; - assignValue(object, key, newValue); + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } } return object; } diff --git a/node_modules/lodash/package/_copySymbols.js b/node_modules/globule/node_modules/lodash/_copySymbols.js similarity index 100% rename from node_modules/lodash/package/_copySymbols.js rename to node_modules/globule/node_modules/lodash/_copySymbols.js diff --git a/node_modules/globule/node_modules/lodash/_coreJsData.js b/node_modules/globule/node_modules/lodash/_coreJsData.js new file mode 100644 index 0000000..f8e5b4e --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_coreJsData.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +module.exports = coreJsData; diff --git a/node_modules/lodash/package/_countHolders.js b/node_modules/globule/node_modules/lodash/_countHolders.js similarity index 96% rename from node_modules/lodash/package/_countHolders.js rename to node_modules/globule/node_modules/lodash/_countHolders.js index 8cc95e6..718fcda 100644 --- a/node_modules/lodash/package/_countHolders.js +++ b/node_modules/globule/node_modules/lodash/_countHolders.js @@ -12,7 +12,7 @@ function countHolders(array, placeholder) { while (length--) { if (array[length] === placeholder) { - result++; + ++result; } } return result; diff --git a/node_modules/lodash/package/_createAggregator.js b/node_modules/globule/node_modules/lodash/_createAggregator.js similarity index 90% rename from node_modules/lodash/package/_createAggregator.js rename to node_modules/globule/node_modules/lodash/_createAggregator.js index 7f7afd2..0be42c4 100644 --- a/node_modules/lodash/package/_createAggregator.js +++ b/node_modules/globule/node_modules/lodash/_createAggregator.js @@ -16,7 +16,7 @@ function createAggregator(setter, initializer) { var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {}; - return func(collection, setter, baseIteratee(iteratee), accumulator); + return func(collection, setter, baseIteratee(iteratee, 2), accumulator); }; } diff --git a/node_modules/lodash/package/_createAssigner.js b/node_modules/globule/node_modules/lodash/_createAssigner.js similarity index 79% rename from node_modules/lodash/package/_createAssigner.js rename to node_modules/globule/node_modules/lodash/_createAssigner.js index 1e81db9..1f904c5 100644 --- a/node_modules/lodash/package/_createAssigner.js +++ b/node_modules/globule/node_modules/lodash/_createAssigner.js @@ -1,5 +1,5 @@ -var isIterateeCall = require('./_isIterateeCall'), - rest = require('./rest'); +var baseRest = require('./_baseRest'), + isIterateeCall = require('./_isIterateeCall'); /** * Creates a function like `_.assign`. @@ -9,13 +9,13 @@ var isIterateeCall = require('./_isIterateeCall'), * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { - return rest(function(object, sources) { + return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; - customizer = typeof customizer == 'function' + customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; diff --git a/node_modules/lodash/package/_createBaseEach.js b/node_modules/globule/node_modules/lodash/_createBaseEach.js similarity index 100% rename from node_modules/lodash/package/_createBaseEach.js rename to node_modules/globule/node_modules/lodash/_createBaseEach.js diff --git a/node_modules/lodash/package/_createBaseFor.js b/node_modules/globule/node_modules/lodash/_createBaseFor.js similarity index 100% rename from node_modules/lodash/package/_createBaseFor.js rename to node_modules/globule/node_modules/lodash/_createBaseFor.js diff --git a/node_modules/lodash/_createBaseWrapper.js b/node_modules/globule/node_modules/lodash/_createBind.js similarity index 62% rename from node_modules/lodash/_createBaseWrapper.js rename to node_modules/globule/node_modules/lodash/_createBind.js index c365621..aadc943 100644 --- a/node_modules/lodash/_createBaseWrapper.js +++ b/node_modules/globule/node_modules/lodash/_createBind.js @@ -1,7 +1,7 @@ -var createCtorWrapper = require('./_createCtorWrapper'), +var createCtor = require('./_createCtor'), root = require('./_root'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1; /** @@ -10,14 +10,13 @@ var BIND_FLAG = 1; * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @returns {Function} Returns the new wrapped function. */ -function createBaseWrapper(func, bitmask, thisArg) { +function createBind(func, bitmask, thisArg) { var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); + Ctor = createCtor(func); function wrapper() { var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; @@ -26,4 +25,4 @@ function createBaseWrapper(func, bitmask, thisArg) { return wrapper; } -module.exports = createBaseWrapper; +module.exports = createBind; diff --git a/node_modules/lodash/package/_createCaseFirst.js b/node_modules/globule/node_modules/lodash/_createCaseFirst.js similarity index 80% rename from node_modules/lodash/package/_createCaseFirst.js rename to node_modules/globule/node_modules/lodash/_createCaseFirst.js index 9296b1d..fe8ea48 100644 --- a/node_modules/lodash/package/_createCaseFirst.js +++ b/node_modules/globule/node_modules/lodash/_createCaseFirst.js @@ -1,5 +1,5 @@ var castSlice = require('./_castSlice'), - reHasComplexSymbol = require('./_reHasComplexSymbol'), + hasUnicode = require('./_hasUnicode'), stringToArray = require('./_stringToArray'), toString = require('./toString'); @@ -8,13 +8,13 @@ var castSlice = require('./_castSlice'), * * @private * @param {string} methodName The name of the `String` case method to use. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new case function. */ function createCaseFirst(methodName) { return function(string) { string = toString(string); - var strSymbols = reHasComplexSymbol.test(string) + var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined; diff --git a/node_modules/lodash/package/_createCompounder.js b/node_modules/globule/node_modules/lodash/_createCompounder.js similarity index 100% rename from node_modules/lodash/package/_createCompounder.js rename to node_modules/globule/node_modules/lodash/_createCompounder.js diff --git a/node_modules/lodash/package/_createCtorWrapper.js b/node_modules/globule/node_modules/lodash/_createCtor.js similarity index 90% rename from node_modules/lodash/package/_createCtorWrapper.js rename to node_modules/globule/node_modules/lodash/_createCtor.js index 17e1bd8..9047aa5 100644 --- a/node_modules/lodash/package/_createCtorWrapper.js +++ b/node_modules/globule/node_modules/lodash/_createCtor.js @@ -9,10 +9,10 @@ var baseCreate = require('./_baseCreate'), * @param {Function} Ctor The constructor to wrap. * @returns {Function} Returns the new wrapped function. */ -function createCtorWrapper(Ctor) { +function createCtor(Ctor) { return function() { // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { @@ -34,4 +34,4 @@ function createCtorWrapper(Ctor) { }; } -module.exports = createCtorWrapper; +module.exports = createCtor; diff --git a/node_modules/lodash/_createCurryWrapper.js b/node_modules/globule/node_modules/lodash/_createCurry.js similarity index 60% rename from node_modules/lodash/_createCurryWrapper.js rename to node_modules/globule/node_modules/lodash/_createCurry.js index c48ba62..f06c2cd 100644 --- a/node_modules/lodash/_createCurryWrapper.js +++ b/node_modules/globule/node_modules/lodash/_createCurry.js @@ -1,8 +1,8 @@ var apply = require('./_apply'), - createCtorWrapper = require('./_createCtorWrapper'), - createHybridWrapper = require('./_createHybridWrapper'), - createRecurryWrapper = require('./_createRecurryWrapper'), - getPlaceholder = require('./_getPlaceholder'), + createCtor = require('./_createCtor'), + createHybrid = require('./_createHybrid'), + createRecurry = require('./_createRecurry'), + getHolder = require('./_getHolder'), replaceHolders = require('./_replaceHolders'), root = require('./_root'); @@ -11,19 +11,18 @@ var apply = require('./_apply'), * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {number} arity The arity of `func`. * @returns {Function} Returns the new wrapped function. */ -function createCurryWrapper(func, bitmask, arity) { - var Ctor = createCtorWrapper(func); +function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); function wrapper() { var length = arguments.length, args = Array(length), index = length, - placeholder = getPlaceholder(wrapper); + placeholder = getHolder(wrapper); while (index--) { args[index] = arguments[index]; @@ -34,8 +33,8 @@ function createCurryWrapper(func, bitmask, arity) { length -= holders.length; if (length < arity) { - return createRecurryWrapper( - func, bitmask, createHybridWrapper, wrapper.placeholder, undefined, + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length); } var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; @@ -44,4 +43,4 @@ function createCurryWrapper(func, bitmask, arity) { return wrapper; } -module.exports = createCurryWrapper; +module.exports = createCurry; diff --git a/node_modules/globule/node_modules/lodash/_createFind.js b/node_modules/globule/node_modules/lodash/_createFind.js new file mode 100644 index 0000000..8859ff8 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_createFind.js @@ -0,0 +1,25 @@ +var baseIteratee = require('./_baseIteratee'), + isArrayLike = require('./isArrayLike'), + keys = require('./keys'); + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; +} + +module.exports = createFind; diff --git a/node_modules/lodash/package/_createFlow.js b/node_modules/globule/node_modules/lodash/_createFlow.js similarity index 87% rename from node_modules/lodash/package/_createFlow.js rename to node_modules/globule/node_modules/lodash/_createFlow.js index 6b5ee54..b70d1df 100644 --- a/node_modules/lodash/package/_createFlow.js +++ b/node_modules/globule/node_modules/lodash/_createFlow.js @@ -1,18 +1,17 @@ var LodashWrapper = require('./_LodashWrapper'), - baseFlatten = require('./_baseFlatten'), + flatRest = require('./_flatRest'), getData = require('./_getData'), getFuncName = require('./_getFuncName'), isArray = require('./isArray'), - isLaziable = require('./_isLaziable'), - rest = require('./rest'); + isLaziable = require('./_isLaziable'); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var CURRY_FLAG = 8, PARTIAL_FLAG = 32, ARY_FLAG = 128, @@ -26,9 +25,7 @@ var CURRY_FLAG = 8, * @returns {Function} Returns the new flow function. */ function createFlow(fromRight) { - return rest(function(funcs) { - funcs = baseFlatten(funcs, 1); - + return flatRest(function(funcs) { var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru; diff --git a/node_modules/lodash/package/_createHybridWrapper.js b/node_modules/globule/node_modules/lodash/_createHybrid.js similarity index 75% rename from node_modules/lodash/package/_createHybridWrapper.js rename to node_modules/globule/node_modules/lodash/_createHybrid.js index 144a90d..1594b88 100644 --- a/node_modules/lodash/package/_createHybridWrapper.js +++ b/node_modules/globule/node_modules/lodash/_createHybrid.js @@ -1,14 +1,14 @@ var composeArgs = require('./_composeArgs'), composeArgsRight = require('./_composeArgsRight'), countHolders = require('./_countHolders'), - createCtorWrapper = require('./_createCtorWrapper'), - createRecurryWrapper = require('./_createRecurryWrapper'), - getPlaceholder = require('./_getPlaceholder'), + createCtor = require('./_createCtor'), + createRecurry = require('./_createRecurry'), + getHolder = require('./_getHolder'), reorder = require('./_reorder'), replaceHolders = require('./_replaceHolders'), root = require('./_root'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1, BIND_KEY_FLAG = 2, CURRY_FLAG = 8, @@ -22,8 +22,7 @@ var BIND_FLAG = 1, * * @private * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to * the new function. @@ -36,24 +35,24 @@ var BIND_FLAG = 1, * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ -function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { +function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { var isAry = bitmask & ARY_FLAG, isBind = bitmask & BIND_FLAG, isBindKey = bitmask & BIND_KEY_FLAG, isCurried = bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG), isFlip = bitmask & FLIP_FLAG, - Ctor = isBindKey ? undefined : createCtorWrapper(func); + Ctor = isBindKey ? undefined : createCtor(func); function wrapper() { var length = arguments.length, - index = length, - args = Array(length); + args = Array(length), + index = length; while (index--) { args[index] = arguments[index]; } if (isCurried) { - var placeholder = getPlaceholder(wrapper), + var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder); } if (partials) { @@ -65,8 +64,8 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials length -= holdersCount; if (isCurried && length < arity) { var newHolders = replaceHolders(args, placeholder); - return createRecurryWrapper( - func, bitmask, createHybridWrapper, wrapper.placeholder, thisArg, + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, args, newHolders, argPos, ary, arity - length ); } @@ -83,11 +82,11 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials args.length = ary; } if (this && this !== root && this instanceof wrapper) { - fn = Ctor || createCtorWrapper(fn); + fn = Ctor || createCtor(fn); } return fn.apply(thisBinding, args); } return wrapper; } -module.exports = createHybridWrapper; +module.exports = createHybrid; diff --git a/node_modules/lodash/package/_createInverter.js b/node_modules/globule/node_modules/lodash/_createInverter.js similarity index 100% rename from node_modules/lodash/package/_createInverter.js rename to node_modules/globule/node_modules/lodash/_createInverter.js diff --git a/node_modules/lodash/package/_createMathOperation.js b/node_modules/globule/node_modules/lodash/_createMathOperation.js similarity index 85% rename from node_modules/lodash/package/_createMathOperation.js rename to node_modules/globule/node_modules/lodash/_createMathOperation.js index e750e98..f1e238a 100644 --- a/node_modules/lodash/package/_createMathOperation.js +++ b/node_modules/globule/node_modules/lodash/_createMathOperation.js @@ -6,13 +6,14 @@ var baseToNumber = require('./_baseToNumber'), * * @private * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. * @returns {Function} Returns the new mathematical operation function. */ -function createMathOperation(operator) { +function createMathOperation(operator, defaultValue) { return function(value, other) { var result; if (value === undefined && other === undefined) { - return 0; + return defaultValue; } if (value !== undefined) { result = value; diff --git a/node_modules/globule/node_modules/lodash/_createOver.js b/node_modules/globule/node_modules/lodash/_createOver.js new file mode 100644 index 0000000..3b94551 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_createOver.js @@ -0,0 +1,27 @@ +var apply = require('./_apply'), + arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + baseUnary = require('./_baseUnary'), + flatRest = require('./_flatRest'); + +/** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ +function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); +} + +module.exports = createOver; diff --git a/node_modules/lodash/package/_createPadding.js b/node_modules/globule/node_modules/lodash/_createPadding.js similarity index 91% rename from node_modules/lodash/package/_createPadding.js rename to node_modules/globule/node_modules/lodash/_createPadding.js index cfc6225..2124612 100644 --- a/node_modules/lodash/package/_createPadding.js +++ b/node_modules/globule/node_modules/lodash/_createPadding.js @@ -1,7 +1,7 @@ var baseRepeat = require('./_baseRepeat'), baseToString = require('./_baseToString'), castSlice = require('./_castSlice'), - reHasComplexSymbol = require('./_reHasComplexSymbol'), + hasUnicode = require('./_hasUnicode'), stringSize = require('./_stringSize'), stringToArray = require('./_stringToArray'); @@ -25,7 +25,7 @@ function createPadding(length, chars) { return charsLength ? baseRepeat(chars, length) : chars; } var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); - return reHasComplexSymbol.test(chars) + return hasUnicode(chars) ? castSlice(stringToArray(result), 0, length).join('') : result.slice(0, length); } diff --git a/node_modules/lodash/package/_createPartialWrapper.js b/node_modules/globule/node_modules/lodash/_createPartial.js similarity index 75% rename from node_modules/lodash/package/_createPartialWrapper.js rename to node_modules/globule/node_modules/lodash/_createPartial.js index cc4314e..fc2bf8b 100644 --- a/node_modules/lodash/package/_createPartialWrapper.js +++ b/node_modules/globule/node_modules/lodash/_createPartial.js @@ -1,8 +1,8 @@ var apply = require('./_apply'), - createCtorWrapper = require('./_createCtorWrapper'), + createCtor = require('./_createCtor'), root = require('./_root'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1; /** @@ -11,16 +11,15 @@ var BIND_FLAG = 1; * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} thisArg The `this` binding of `func`. * @param {Array} partials The arguments to prepend to those provided to * the new function. * @returns {Function} Returns the new wrapped function. */ -function createPartialWrapper(func, bitmask, thisArg, partials) { +function createPartial(func, bitmask, thisArg, partials) { var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); + Ctor = createCtor(func); function wrapper() { var argsIndex = -1, @@ -41,4 +40,4 @@ function createPartialWrapper(func, bitmask, thisArg, partials) { return wrapper; } -module.exports = createPartialWrapper; +module.exports = createPartial; diff --git a/node_modules/lodash/package/_createRange.js b/node_modules/globule/node_modules/lodash/_createRange.js similarity index 76% rename from node_modules/lodash/package/_createRange.js rename to node_modules/globule/node_modules/lodash/_createRange.js index 9728563..9f52c77 100644 --- a/node_modules/lodash/package/_createRange.js +++ b/node_modules/globule/node_modules/lodash/_createRange.js @@ -1,6 +1,6 @@ var baseRange = require('./_baseRange'), isIterateeCall = require('./_isIterateeCall'), - toNumber = require('./toNumber'); + toFinite = require('./toFinite'); /** * Creates a `_.range` or `_.rangeRight` function. @@ -15,15 +15,14 @@ function createRange(fromRight) { end = step = undefined; } // Ensure the sign of `-0` is preserved. - start = toNumber(start); - start = start === start ? start : 0; + start = toFinite(start); if (end === undefined) { end = start; start = 0; } else { - end = toNumber(end) || 0; + end = toFinite(end); } - step = step === undefined ? (start < end ? 1 : -1) : (toNumber(step) || 0); + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); return baseRange(start, end, step, fromRight); }; } diff --git a/node_modules/lodash/_createRecurryWrapper.js b/node_modules/globule/node_modules/lodash/_createRecurry.js similarity index 79% rename from node_modules/lodash/_createRecurryWrapper.js rename to node_modules/globule/node_modules/lodash/_createRecurry.js index 63c096a..35a22e5 100644 --- a/node_modules/lodash/_createRecurryWrapper.js +++ b/node_modules/globule/node_modules/lodash/_createRecurry.js @@ -1,7 +1,8 @@ var isLaziable = require('./_isLaziable'), - setData = require('./_setData'); + setData = require('./_setData'), + setWrapToString = require('./_setWrapToString'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1, BIND_KEY_FLAG = 2, CURRY_BOUND_FLAG = 4, @@ -14,8 +15,7 @@ var BIND_FLAG = 1, * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {Function} wrapFunc The function to create the `func` wrapper. * @param {*} placeholder The placeholder value. * @param {*} [thisArg] The `this` binding of `func`. @@ -27,7 +27,7 @@ var BIND_FLAG = 1, * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ -function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { +function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { var isCurry = bitmask & CURRY_FLAG, newHolders = isCurry ? holders : undefined, newHoldersRight = isCurry ? undefined : holders, @@ -50,7 +50,7 @@ function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, par setData(result, newData); } result.placeholder = placeholder; - return result; + return setWrapToString(result, func, bitmask); } -module.exports = createRecurryWrapper; +module.exports = createRecurry; diff --git a/node_modules/lodash/package/_createRelationalOperation.js b/node_modules/globule/node_modules/lodash/_createRelationalOperation.js similarity index 100% rename from node_modules/lodash/package/_createRelationalOperation.js rename to node_modules/globule/node_modules/lodash/_createRelationalOperation.js diff --git a/node_modules/lodash/package/_createRound.js b/node_modules/globule/node_modules/lodash/_createRound.js similarity index 84% rename from node_modules/lodash/package/_createRound.js rename to node_modules/globule/node_modules/lodash/_createRound.js index cb42ba2..74b20d4 100644 --- a/node_modules/lodash/package/_createRound.js +++ b/node_modules/globule/node_modules/lodash/_createRound.js @@ -2,6 +2,9 @@ var toInteger = require('./toInteger'), toNumber = require('./toNumber'), toString = require('./toString'); +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + /** * Creates a function like `_.round`. * @@ -13,7 +16,7 @@ function createRound(methodName) { var func = Math[methodName]; return function(number, precision) { number = toNumber(number); - precision = toInteger(precision); + precision = nativeMin(toInteger(precision), 292); if (precision) { // Shift with exponential notation to avoid floating-point issues. // See [MDN](https://mdn.io/round#Examples) for more details. diff --git a/node_modules/lodash/package/_createSet.js b/node_modules/globule/node_modules/lodash/_createSet.js similarity index 92% rename from node_modules/lodash/package/_createSet.js rename to node_modules/globule/node_modules/lodash/_createSet.js index ae24d05..0f644ee 100644 --- a/node_modules/lodash/package/_createSet.js +++ b/node_modules/globule/node_modules/lodash/_createSet.js @@ -6,7 +6,7 @@ var Set = require('./_Set'), var INFINITY = 1 / 0; /** - * Creates a set of `values`. + * Creates a set object of `values`. * * @private * @param {Array} values The values to add to the set. diff --git a/node_modules/globule/node_modules/lodash/_createToPairs.js b/node_modules/globule/node_modules/lodash/_createToPairs.js new file mode 100644 index 0000000..568417a --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_createToPairs.js @@ -0,0 +1,30 @@ +var baseToPairs = require('./_baseToPairs'), + getTag = require('./_getTag'), + mapToArray = require('./_mapToArray'), + setToPairs = require('./_setToPairs'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ +function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; +} + +module.exports = createToPairs; diff --git a/node_modules/lodash/_createWrapper.js b/node_modules/globule/node_modules/lodash/_createWrap.js similarity index 78% rename from node_modules/lodash/_createWrapper.js rename to node_modules/globule/node_modules/lodash/_createWrap.js index 7b573b2..09dac30 100644 --- a/node_modules/lodash/_createWrapper.js +++ b/node_modules/globule/node_modules/lodash/_createWrap.js @@ -1,17 +1,18 @@ var baseSetData = require('./_baseSetData'), - createBaseWrapper = require('./_createBaseWrapper'), - createCurryWrapper = require('./_createCurryWrapper'), - createHybridWrapper = require('./_createHybridWrapper'), - createPartialWrapper = require('./_createPartialWrapper'), + createBind = require('./_createBind'), + createCurry = require('./_createCurry'), + createHybrid = require('./_createHybrid'), + createPartial = require('./_createPartial'), getData = require('./_getData'), mergeData = require('./_mergeData'), setData = require('./_setData'), + setWrapToString = require('./_setWrapToString'), toInteger = require('./toInteger'); -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1, BIND_KEY_FLAG = 2, CURRY_FLAG = 8, @@ -28,7 +29,7 @@ var nativeMax = Math.max; * * @private * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask of wrapper flags. + * @param {number} bitmask The bitmask flags. * The bitmask may be composed of the following flags: * 1 - `_.bind` * 2 - `_.bindKey` @@ -39,6 +40,7 @@ var nativeMax = Math.max; * 64 - `_.partialRight` * 128 - `_.rearg` * 256 - `_.ary` + * 512 - `_.flip` * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to be partially applied. * @param {Array} [holders] The `partials` placeholder indexes. @@ -47,7 +49,7 @@ var nativeMax = Math.max; * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ -function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { +function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { var isBindKey = bitmask & BIND_KEY_FLAG; if (!isBindKey && typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); @@ -90,16 +92,16 @@ function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, a bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG); } if (!bitmask || bitmask == BIND_FLAG) { - var result = createBaseWrapper(func, bitmask, thisArg); + var result = createBind(func, bitmask, thisArg); } else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) { - result = createCurryWrapper(func, bitmask, arity); + result = createCurry(func, bitmask, arity); } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) { - result = createPartialWrapper(func, bitmask, thisArg, partials); + result = createPartial(func, bitmask, thisArg, partials); } else { - result = createHybridWrapper.apply(undefined, newData); + result = createHybrid.apply(undefined, newData); } var setter = data ? baseSetData : setData; - return setter(result, newData); + return setWrapToString(setter(result, newData), func, bitmask); } -module.exports = createWrapper; +module.exports = createWrap; diff --git a/node_modules/globule/node_modules/lodash/_deburrLetter.js b/node_modules/globule/node_modules/lodash/_deburrLetter.js new file mode 100644 index 0000000..3e531ed --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_deburrLetter.js @@ -0,0 +1,71 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map Latin Unicode letters to basic Latin letters. */ +var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' +}; + +/** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ +var deburrLetter = basePropertyOf(deburredLetters); + +module.exports = deburrLetter; diff --git a/node_modules/globule/node_modules/lodash/_defineProperty.js b/node_modules/globule/node_modules/lodash/_defineProperty.js new file mode 100644 index 0000000..b6116d9 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_defineProperty.js @@ -0,0 +1,11 @@ +var getNative = require('./_getNative'); + +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); + +module.exports = defineProperty; diff --git a/node_modules/lodash/package/_equalArrays.js b/node_modules/globule/node_modules/lodash/_equalArrays.js similarity index 75% rename from node_modules/lodash/package/_equalArrays.js rename to node_modules/globule/node_modules/lodash/_equalArrays.js index 323c67c..178dced 100644 --- a/node_modules/lodash/package/_equalArrays.js +++ b/node_modules/globule/node_modules/lodash/_equalArrays.js @@ -1,4 +1,6 @@ -var arraySome = require('./_arraySome'); +var SetCache = require('./_SetCache'), + arraySome = require('./_arraySome'), + cacheHas = require('./_cacheHas'); /** Used to compose bitmasks for comparison styles. */ var UNORDERED_COMPARE_FLAG = 1, @@ -19,9 +21,7 @@ var UNORDERED_COMPARE_FLAG = 1, * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { - var index = -1, - isPartial = bitmask & PARTIAL_COMPARE_FLAG, - isUnordered = bitmask & UNORDERED_COMPARE_FLAG, + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, arrLength = array.length, othLength = other.length; @@ -30,11 +30,15 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { } // Assume cyclic values are equal. var stacked = stack.get(array); - if (stacked) { + if (stacked && stack.get(other)) { return stacked == other; } - var result = true; + var index = -1, + result = true, + seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined; + stack.set(array, other); + stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { @@ -54,10 +58,12 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { break; } // Recursively compare arrays (susceptible to call stack limits). - if (isUnordered) { - if (!arraySome(other, function(othValue) { - return arrValue === othValue || - equalFunc(arrValue, othValue, customizer, bitmask, stack); + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + return seen.push(othIndex); + } })) { result = false; break; @@ -71,6 +77,7 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { } } stack['delete'](array); + stack['delete'](other); return result; } diff --git a/node_modules/lodash/package/_equalByTag.js b/node_modules/globule/node_modules/lodash/_equalByTag.js similarity index 88% rename from node_modules/lodash/package/_equalByTag.js rename to node_modules/globule/node_modules/lodash/_equalByTag.js index b3e37bd..07d8c8c 100644 --- a/node_modules/lodash/package/_equalByTag.js +++ b/node_modules/globule/node_modules/lodash/_equalByTag.js @@ -1,5 +1,6 @@ var Symbol = require('./_Symbol'), Uint8Array = require('./_Uint8Array'), + eq = require('./eq'), equalArrays = require('./_equalArrays'), mapToArray = require('./_mapToArray'), setToArray = require('./_setToArray'); @@ -63,22 +64,18 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { case boolTag: case dateTag: - // Coerce dates and booleans to numbers, dates to milliseconds and - // booleans to `1` or `0` treating invalid dates coerced to `NaN` as - // not equal. - return +object == +other; + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; - case numberTag: - // Treat `NaN` vs. `NaN` as equal. - return (object != +object) ? other != +other : object == +other; - case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); @@ -98,10 +95,12 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { return stacked == other; } bitmask |= UNORDERED_COMPARE_FLAG; - stack.set(object, other); // Recursively compare objects (susceptible to call stack limits). - return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); + stack['delete'](object); + return result; case symbolTag: if (symbolValueOf) { diff --git a/node_modules/lodash/package/_equalObjects.js b/node_modules/globule/node_modules/lodash/_equalObjects.js similarity index 87% rename from node_modules/lodash/package/_equalObjects.js rename to node_modules/globule/node_modules/lodash/_equalObjects.js index 9a5d17f..092cb3f 100644 --- a/node_modules/lodash/package/_equalObjects.js +++ b/node_modules/globule/node_modules/lodash/_equalObjects.js @@ -1,9 +1,14 @@ -var baseHas = require('./_baseHas'), - keys = require('./keys'); +var keys = require('./keys'); /** Used to compose bitmasks for comparison styles. */ var PARTIAL_COMPARE_FLAG = 2; +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + /** * A specialized version of `baseIsEqualDeep` for objects with support for * partial deep comparisons. @@ -31,17 +36,18 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { var index = objLength; while (index--) { var key = objProps[index]; - if (!(isPartial ? key in other : baseHas(other, key))) { + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } // Assume cyclic values are equal. var stacked = stack.get(object); - if (stacked) { + if (stacked && stack.get(other)) { return stacked == other; } var result = true; stack.set(object, other); + stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { @@ -77,6 +83,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { } } stack['delete'](object); + stack['delete'](other); return result; } diff --git a/node_modules/lodash/package/_escapeHtmlChar.js b/node_modules/globule/node_modules/lodash/_escapeHtmlChar.js similarity index 75% rename from node_modules/lodash/package/_escapeHtmlChar.js rename to node_modules/globule/node_modules/lodash/_escapeHtmlChar.js index b21e452..7ca68ee 100644 --- a/node_modules/lodash/package/_escapeHtmlChar.js +++ b/node_modules/globule/node_modules/lodash/_escapeHtmlChar.js @@ -1,11 +1,12 @@ +var basePropertyOf = require('./_basePropertyOf'); + /** Used to map characters to HTML entities. */ var htmlEscapes = { '&': '&', '<': '<', '>': '>', '"': '"', - "'": ''', - '`': '`' + "'": ''' }; /** @@ -15,8 +16,6 @@ var htmlEscapes = { * @param {string} chr The matched character to escape. * @returns {string} Returns the escaped character. */ -function escapeHtmlChar(chr) { - return htmlEscapes[chr]; -} +var escapeHtmlChar = basePropertyOf(htmlEscapes); module.exports = escapeHtmlChar; diff --git a/node_modules/lodash/package/_escapeStringChar.js b/node_modules/globule/node_modules/lodash/_escapeStringChar.js similarity index 100% rename from node_modules/lodash/package/_escapeStringChar.js rename to node_modules/globule/node_modules/lodash/_escapeStringChar.js diff --git a/node_modules/globule/node_modules/lodash/_flatRest.js b/node_modules/globule/node_modules/lodash/_flatRest.js new file mode 100644 index 0000000..94ab6cc --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_flatRest.js @@ -0,0 +1,16 @@ +var flatten = require('./flatten'), + overRest = require('./_overRest'), + setToString = require('./_setToString'); + +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); +} + +module.exports = flatRest; diff --git a/node_modules/globule/node_modules/lodash/_freeGlobal.js b/node_modules/globule/node_modules/lodash/_freeGlobal.js new file mode 100644 index 0000000..bbec998 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_freeGlobal.js @@ -0,0 +1,4 @@ +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +module.exports = freeGlobal; diff --git a/node_modules/lodash/package/_getAllKeys.js b/node_modules/globule/node_modules/lodash/_getAllKeys.js similarity index 100% rename from node_modules/lodash/package/_getAllKeys.js rename to node_modules/globule/node_modules/lodash/_getAllKeys.js diff --git a/node_modules/lodash/package/_getAllKeysIn.js b/node_modules/globule/node_modules/lodash/_getAllKeysIn.js similarity index 100% rename from node_modules/lodash/package/_getAllKeysIn.js rename to node_modules/globule/node_modules/lodash/_getAllKeysIn.js diff --git a/node_modules/lodash/package/_getData.js b/node_modules/globule/node_modules/lodash/_getData.js similarity index 100% rename from node_modules/lodash/package/_getData.js rename to node_modules/globule/node_modules/lodash/_getData.js diff --git a/node_modules/lodash/package/_getFuncName.js b/node_modules/globule/node_modules/lodash/_getFuncName.js similarity index 100% rename from node_modules/lodash/package/_getFuncName.js rename to node_modules/globule/node_modules/lodash/_getFuncName.js diff --git a/node_modules/lodash/_getPlaceholder.js b/node_modules/globule/node_modules/lodash/_getHolder.js similarity index 77% rename from node_modules/lodash/_getPlaceholder.js rename to node_modules/globule/node_modules/lodash/_getHolder.js index 4bbcda2..65e94b5 100644 --- a/node_modules/lodash/_getPlaceholder.js +++ b/node_modules/globule/node_modules/lodash/_getHolder.js @@ -5,9 +5,9 @@ * @param {Function} func The function to inspect. * @returns {*} Returns the placeholder value. */ -function getPlaceholder(func) { +function getHolder(func) { var object = func; return object.placeholder; } -module.exports = getPlaceholder; +module.exports = getHolder; diff --git a/node_modules/globule/node_modules/lodash/_getMapData.js b/node_modules/globule/node_modules/lodash/_getMapData.js new file mode 100644 index 0000000..17f6303 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_getMapData.js @@ -0,0 +1,18 @@ +var isKeyable = require('./_isKeyable'); + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +module.exports = getMapData; diff --git a/node_modules/lodash/package/_getMatchData.js b/node_modules/globule/node_modules/lodash/_getMatchData.js similarity index 68% rename from node_modules/lodash/package/_getMatchData.js rename to node_modules/globule/node_modules/lodash/_getMatchData.js index a1456d2..2cc70f9 100644 --- a/node_modules/lodash/package/_getMatchData.js +++ b/node_modules/globule/node_modules/lodash/_getMatchData.js @@ -1,5 +1,5 @@ var isStrictComparable = require('./_isStrictComparable'), - toPairs = require('./toPairs'); + keys = require('./keys'); /** * Gets the property names, values, and compare flags of `object`. @@ -9,11 +9,14 @@ var isStrictComparable = require('./_isStrictComparable'), * @returns {Array} Returns the match data of `object`. */ function getMatchData(object) { - var result = toPairs(object), + var result = keys(object), length = result.length; while (length--) { - result[length][2] = isStrictComparable(result[length][1]); + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; } return result; } diff --git a/node_modules/lodash/package/_getNative.js b/node_modules/globule/node_modules/lodash/_getNative.js similarity index 64% rename from node_modules/lodash/package/_getNative.js rename to node_modules/globule/node_modules/lodash/_getNative.js index f6ff7f1..97a622b 100644 --- a/node_modules/lodash/package/_getNative.js +++ b/node_modules/globule/node_modules/lodash/_getNative.js @@ -1,4 +1,5 @@ -var isNative = require('./isNative'); +var baseIsNative = require('./_baseIsNative'), + getValue = require('./_getValue'); /** * Gets the native function at `key` of `object`. @@ -9,8 +10,8 @@ var isNative = require('./isNative'); * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { - var value = object[key]; - return isNative(value) ? value : undefined; + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; } module.exports = getNative; diff --git a/node_modules/globule/node_modules/lodash/_getPrototype.js b/node_modules/globule/node_modules/lodash/_getPrototype.js new file mode 100644 index 0000000..e808612 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_getPrototype.js @@ -0,0 +1,6 @@ +var overArg = require('./_overArg'); + +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); + +module.exports = getPrototype; diff --git a/node_modules/globule/node_modules/lodash/_getRawTag.js b/node_modules/globule/node_modules/lodash/_getRawTag.js new file mode 100644 index 0000000..49a95c9 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_getRawTag.js @@ -0,0 +1,46 @@ +var Symbol = require('./_Symbol'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +module.exports = getRawTag; diff --git a/node_modules/globule/node_modules/lodash/_getSymbols.js b/node_modules/globule/node_modules/lodash/_getSymbols.js new file mode 100644 index 0000000..e41dad1 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_getSymbols.js @@ -0,0 +1,16 @@ +var overArg = require('./_overArg'), + stubArray = require('./stubArray'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbol properties of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; + +module.exports = getSymbols; diff --git a/node_modules/lodash/package/_getSymbolsIn.js b/node_modules/globule/node_modules/lodash/_getSymbolsIn.js similarity index 61% rename from node_modules/lodash/package/_getSymbolsIn.js rename to node_modules/globule/node_modules/lodash/_getSymbolsIn.js index 3a3729f..221277e 100644 --- a/node_modules/lodash/package/_getSymbolsIn.js +++ b/node_modules/globule/node_modules/lodash/_getSymbolsIn.js @@ -1,9 +1,10 @@ var arrayPush = require('./_arrayPush'), getPrototype = require('./_getPrototype'), - getSymbols = require('./_getSymbols'); + getSymbols = require('./_getSymbols'), + stubArray = require('./stubArray'); -/** Built-in value references. */ -var getOwnPropertySymbols = Object.getOwnPropertySymbols; +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own and inherited enumerable symbol properties @@ -13,7 +14,7 @@ var getOwnPropertySymbols = Object.getOwnPropertySymbols; * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ -var getSymbolsIn = !getOwnPropertySymbols ? getSymbols : function(object) { +var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { var result = []; while (object) { arrayPush(result, getSymbols(object)); diff --git a/node_modules/lodash/package/_getTag.js b/node_modules/globule/node_modules/lodash/_getTag.js similarity index 74% rename from node_modules/lodash/package/_getTag.js rename to node_modules/globule/node_modules/lodash/_getTag.js index 0d1a455..deaf89d 100644 --- a/node_modules/lodash/package/_getTag.js +++ b/node_modules/globule/node_modules/lodash/_getTag.js @@ -3,6 +3,7 @@ var DataView = require('./_DataView'), Promise = require('./_Promise'), Set = require('./_Set'), WeakMap = require('./_WeakMap'), + baseGetTag = require('./_baseGetTag'), toSource = require('./_toSource'); /** `Object#toString` result references. */ @@ -14,16 +15,6 @@ var mapTag = '[object Map]', var dataViewTag = '[object DataView]'; -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), @@ -38,21 +29,18 @@ var dataViewCtorString = toSource(DataView), * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ -function getTag(value) { - return objectToString.call(value); -} +var getTag = baseGetTag; -// Fallback for data views, maps, sets, and weak maps in IE 11, -// for data views in Edge, and promises in Node.js. +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { - var result = objectToString.call(value), + var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : undefined; + ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { diff --git a/node_modules/globule/node_modules/lodash/_getValue.js b/node_modules/globule/node_modules/lodash/_getValue.js new file mode 100644 index 0000000..5f7d773 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_getValue.js @@ -0,0 +1,13 @@ +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +module.exports = getValue; diff --git a/node_modules/lodash/package/_getView.js b/node_modules/globule/node_modules/lodash/_getView.js similarity index 100% rename from node_modules/lodash/package/_getView.js rename to node_modules/globule/node_modules/lodash/_getView.js diff --git a/node_modules/globule/node_modules/lodash/_getWrapDetails.js b/node_modules/globule/node_modules/lodash/_getWrapDetails.js new file mode 100644 index 0000000..3bcc6e4 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_getWrapDetails.js @@ -0,0 +1,17 @@ +/** Used to match wrap detail comments. */ +var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + +/** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ +function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; +} + +module.exports = getWrapDetails; diff --git a/node_modules/lodash/package/_hasPath.js b/node_modules/globule/node_modules/lodash/_hasPath.js similarity index 80% rename from node_modules/lodash/package/_hasPath.js rename to node_modules/globule/node_modules/lodash/_hasPath.js index 4533c60..de11c72 100644 --- a/node_modules/lodash/package/_hasPath.js +++ b/node_modules/globule/node_modules/lodash/_hasPath.js @@ -4,7 +4,6 @@ var castPath = require('./_castPath'), isIndex = require('./_isIndex'), isKey = require('./_isKey'), isLength = require('./isLength'), - isString = require('./isString'), toKey = require('./_toKey'); /** @@ -19,9 +18,9 @@ var castPath = require('./_castPath'), function hasPath(object, path, hasFunc) { path = isKey(path, object) ? [path] : castPath(path); - var result, - index = -1, - length = path.length; + var index = -1, + length = path.length, + result = false; while (++index < length) { var key = toKey(path[index]); @@ -30,12 +29,12 @@ function hasPath(object, path, hasFunc) { } object = object[key]; } - if (result) { + if (result || ++index != length) { return result; } - var length = object ? object.length : 0; + length = object == null ? 0 : object.length; return !!length && isLength(length) && isIndex(key, length) && - (isArray(object) || isString(object) || isArguments(object)); + (isArray(object) || isArguments(object)); } module.exports = hasPath; diff --git a/node_modules/lodash/package/_reHasComplexSymbol.js b/node_modules/globule/node_modules/lodash/_hasUnicode.js similarity index 52% rename from node_modules/lodash/package/_reHasComplexSymbol.js rename to node_modules/globule/node_modules/lodash/_hasUnicode.js index be78c4b..085161a 100644 --- a/node_modules/lodash/package/_reHasComplexSymbol.js +++ b/node_modules/globule/node_modules/lodash/_hasUnicode.js @@ -8,6 +8,17 @@ var rsAstralRange = '\\ud800-\\udfff', var rsZWJ = '\\u200d'; /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); -module.exports = reHasComplexSymbol; +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +module.exports = hasUnicode; diff --git a/node_modules/globule/node_modules/lodash/_hasUnicodeWord.js b/node_modules/globule/node_modules/lodash/_hasUnicodeWord.js new file mode 100644 index 0000000..a35d6e5 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_hasUnicodeWord.js @@ -0,0 +1,15 @@ +/** Used to detect strings that need a more robust regexp to match words. */ +var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + +/** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ +function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); +} + +module.exports = hasUnicodeWord; diff --git a/node_modules/globule/node_modules/lodash/_hashClear.js b/node_modules/globule/node_modules/lodash/_hashClear.js new file mode 100644 index 0000000..5d4b70c --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_hashClear.js @@ -0,0 +1,15 @@ +var nativeCreate = require('./_nativeCreate'); + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; +} + +module.exports = hashClear; diff --git a/node_modules/lodash/package/_hashDelete.js b/node_modules/globule/node_modules/lodash/_hashDelete.js similarity index 62% rename from node_modules/lodash/package/_hashDelete.js rename to node_modules/globule/node_modules/lodash/_hashDelete.js index b562317..ea9dabf 100644 --- a/node_modules/lodash/package/_hashDelete.js +++ b/node_modules/globule/node_modules/lodash/_hashDelete.js @@ -1,15 +1,17 @@ -var hashHas = require('./_hashHas'); - /** * Removes `key` and its value from the hash. * * @private + * @name delete + * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function hashDelete(hash, key) { - return hashHas(hash, key) && delete hash[key]; +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; } module.exports = hashDelete; diff --git a/node_modules/lodash/package/_hashGet.js b/node_modules/globule/node_modules/lodash/_hashGet.js similarity index 77% rename from node_modules/lodash/package/_hashGet.js rename to node_modules/globule/node_modules/lodash/_hashGet.js index ba509b6..1fc2f34 100644 --- a/node_modules/lodash/package/_hashGet.js +++ b/node_modules/globule/node_modules/lodash/_hashGet.js @@ -13,16 +13,18 @@ var hasOwnProperty = objectProto.hasOwnProperty; * Gets the hash value for `key`. * * @private - * @param {Object} hash The hash to query. + * @name get + * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ -function hashGet(hash, key) { +function hashGet(key) { + var data = this.__data__; if (nativeCreate) { - var result = hash[key]; + var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } - return hasOwnProperty.call(hash, key) ? hash[key] : undefined; + return hasOwnProperty.call(data, key) ? data[key] : undefined; } module.exports = hashGet; diff --git a/node_modules/lodash/package/_hashHas.js b/node_modules/globule/node_modules/lodash/_hashHas.js similarity index 73% rename from node_modules/lodash/package/_hashHas.js rename to node_modules/globule/node_modules/lodash/_hashHas.js index 3bbff48..f30aac3 100644 --- a/node_modules/lodash/package/_hashHas.js +++ b/node_modules/globule/node_modules/lodash/_hashHas.js @@ -10,12 +10,14 @@ var hasOwnProperty = objectProto.hasOwnProperty; * Checks if a hash value for `key` exists. * * @private - * @param {Object} hash The hash to query. + * @name has + * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function hashHas(hash, key) { - return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key); +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); } module.exports = hashHas; diff --git a/node_modules/lodash/package/_hashSet.js b/node_modules/globule/node_modules/lodash/_hashSet.js similarity index 57% rename from node_modules/lodash/package/_hashSet.js rename to node_modules/globule/node_modules/lodash/_hashSet.js index f7c3307..e105528 100644 --- a/node_modules/lodash/package/_hashSet.js +++ b/node_modules/globule/node_modules/lodash/_hashSet.js @@ -7,12 +7,17 @@ var HASH_UNDEFINED = '__lodash_hash_undefined__'; * Sets the hash `key` to `value`. * * @private - * @param {Object} hash The hash to modify. + * @name set + * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. */ -function hashSet(hash, key, value) { - hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; } module.exports = hashSet; diff --git a/node_modules/lodash/package/_initCloneArray.js b/node_modules/globule/node_modules/lodash/_initCloneArray.js similarity index 100% rename from node_modules/lodash/package/_initCloneArray.js rename to node_modules/globule/node_modules/lodash/_initCloneArray.js diff --git a/node_modules/lodash/package/_initCloneByTag.js b/node_modules/globule/node_modules/lodash/_initCloneByTag.js similarity index 100% rename from node_modules/lodash/package/_initCloneByTag.js rename to node_modules/globule/node_modules/lodash/_initCloneByTag.js diff --git a/node_modules/lodash/package/_initCloneObject.js b/node_modules/globule/node_modules/lodash/_initCloneObject.js similarity index 100% rename from node_modules/lodash/package/_initCloneObject.js rename to node_modules/globule/node_modules/lodash/_initCloneObject.js diff --git a/node_modules/globule/node_modules/lodash/_insertWrapDetails.js b/node_modules/globule/node_modules/lodash/_insertWrapDetails.js new file mode 100644 index 0000000..e790808 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_insertWrapDetails.js @@ -0,0 +1,23 @@ +/** Used to match wrap detail comments. */ +var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; + +/** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ +function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); +} + +module.exports = insertWrapDetails; diff --git a/node_modules/globule/node_modules/lodash/_isFlattenable.js b/node_modules/globule/node_modules/lodash/_isFlattenable.js new file mode 100644 index 0000000..4cc2c24 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_isFlattenable.js @@ -0,0 +1,20 @@ +var Symbol = require('./_Symbol'), + isArguments = require('./isArguments'), + isArray = require('./isArray'); + +/** Built-in value references. */ +var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +module.exports = isFlattenable; diff --git a/node_modules/lodash/package/_isIndex.js b/node_modules/globule/node_modules/lodash/_isIndex.js similarity index 100% rename from node_modules/lodash/package/_isIndex.js rename to node_modules/globule/node_modules/lodash/_isIndex.js diff --git a/node_modules/lodash/package/_isIterateeCall.js b/node_modules/globule/node_modules/lodash/_isIterateeCall.js similarity index 100% rename from node_modules/lodash/package/_isIterateeCall.js rename to node_modules/globule/node_modules/lodash/_isIterateeCall.js diff --git a/node_modules/lodash/package/_isKey.js b/node_modules/globule/node_modules/lodash/_isKey.js similarity index 100% rename from node_modules/lodash/package/_isKey.js rename to node_modules/globule/node_modules/lodash/_isKey.js diff --git a/node_modules/lodash/package/_isKeyable.js b/node_modules/globule/node_modules/lodash/_isKeyable.js similarity index 100% rename from node_modules/lodash/package/_isKeyable.js rename to node_modules/globule/node_modules/lodash/_isKeyable.js diff --git a/node_modules/lodash/package/_isLaziable.js b/node_modules/globule/node_modules/lodash/_isLaziable.js similarity index 100% rename from node_modules/lodash/package/_isLaziable.js rename to node_modules/globule/node_modules/lodash/_isLaziable.js diff --git a/node_modules/globule/node_modules/lodash/_isMaskable.js b/node_modules/globule/node_modules/lodash/_isMaskable.js new file mode 100644 index 0000000..eb98d09 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_isMaskable.js @@ -0,0 +1,14 @@ +var coreJsData = require('./_coreJsData'), + isFunction = require('./isFunction'), + stubFalse = require('./stubFalse'); + +/** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ +var isMaskable = coreJsData ? isFunction : stubFalse; + +module.exports = isMaskable; diff --git a/node_modules/globule/node_modules/lodash/_isMasked.js b/node_modules/globule/node_modules/lodash/_isMasked.js new file mode 100644 index 0000000..4b0f21b --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_isMasked.js @@ -0,0 +1,20 @@ +var coreJsData = require('./_coreJsData'); + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +module.exports = isMasked; diff --git a/node_modules/lodash/package/_isPrototype.js b/node_modules/globule/node_modules/lodash/_isPrototype.js similarity index 100% rename from node_modules/lodash/package/_isPrototype.js rename to node_modules/globule/node_modules/lodash/_isPrototype.js diff --git a/node_modules/lodash/package/_isStrictComparable.js b/node_modules/globule/node_modules/lodash/_isStrictComparable.js similarity index 100% rename from node_modules/lodash/package/_isStrictComparable.js rename to node_modules/globule/node_modules/lodash/_isStrictComparable.js diff --git a/node_modules/lodash/package/_iteratorToArray.js b/node_modules/globule/node_modules/lodash/_iteratorToArray.js similarity index 100% rename from node_modules/lodash/package/_iteratorToArray.js rename to node_modules/globule/node_modules/lodash/_iteratorToArray.js diff --git a/node_modules/lodash/package/_lazyClone.js b/node_modules/globule/node_modules/lodash/_lazyClone.js similarity index 100% rename from node_modules/lodash/package/_lazyClone.js rename to node_modules/globule/node_modules/lodash/_lazyClone.js diff --git a/node_modules/lodash/package/_lazyReverse.js b/node_modules/globule/node_modules/lodash/_lazyReverse.js similarity index 100% rename from node_modules/lodash/package/_lazyReverse.js rename to node_modules/globule/node_modules/lodash/_lazyReverse.js diff --git a/node_modules/lodash/package/_lazyValue.js b/node_modules/globule/node_modules/lodash/_lazyValue.js similarity index 100% rename from node_modules/lodash/package/_lazyValue.js rename to node_modules/globule/node_modules/lodash/_lazyValue.js diff --git a/node_modules/globule/node_modules/lodash/_listCacheClear.js b/node_modules/globule/node_modules/lodash/_listCacheClear.js new file mode 100644 index 0000000..acbe39a --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_listCacheClear.js @@ -0,0 +1,13 @@ +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +module.exports = listCacheClear; diff --git a/node_modules/lodash/package/_assocDelete.js b/node_modules/globule/node_modules/lodash/_listCacheDelete.js similarity index 58% rename from node_modules/lodash/package/_assocDelete.js rename to node_modules/globule/node_modules/lodash/_listCacheDelete.js index 49f61e8..b1384ad 100644 --- a/node_modules/lodash/package/_assocDelete.js +++ b/node_modules/globule/node_modules/lodash/_listCacheDelete.js @@ -7,25 +7,29 @@ var arrayProto = Array.prototype; var splice = arrayProto.splice; /** - * Removes `key` and its value from the associative array. + * Removes `key` and its value from the list cache. * * @private - * @param {Array} array The array to modify. + * @name delete + * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function assocDelete(array, key) { - var index = assocIndexOf(array, key); +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + if (index < 0) { return false; } - var lastIndex = array.length - 1; + var lastIndex = data.length - 1; if (index == lastIndex) { - array.pop(); + data.pop(); } else { - splice.call(array, index, 1); + splice.call(data, index, 1); } + --this.size; return true; } -module.exports = assocDelete; +module.exports = listCacheDelete; diff --git a/node_modules/globule/node_modules/lodash/_listCacheGet.js b/node_modules/globule/node_modules/lodash/_listCacheGet.js new file mode 100644 index 0000000..f8192fc --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_listCacheGet.js @@ -0,0 +1,19 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +module.exports = listCacheGet; diff --git a/node_modules/lodash/package/_assocHas.js b/node_modules/globule/node_modules/lodash/_listCacheHas.js similarity index 50% rename from node_modules/lodash/package/_assocHas.js rename to node_modules/globule/node_modules/lodash/_listCacheHas.js index a74bd39..2adf671 100644 --- a/node_modules/lodash/package/_assocHas.js +++ b/node_modules/globule/node_modules/lodash/_listCacheHas.js @@ -1,15 +1,16 @@ var assocIndexOf = require('./_assocIndexOf'); /** - * Checks if an associative array value for `key` exists. + * Checks if a list cache value for `key` exists. * * @private - * @param {Array} array The array to query. + * @name has + * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function assocHas(array, key) { - return assocIndexOf(array, key) > -1; +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; } -module.exports = assocHas; +module.exports = listCacheHas; diff --git a/node_modules/globule/node_modules/lodash/_listCacheSet.js b/node_modules/globule/node_modules/lodash/_listCacheSet.js new file mode 100644 index 0000000..5855c95 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_listCacheSet.js @@ -0,0 +1,26 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +module.exports = listCacheSet; diff --git a/node_modules/lodash/_mapClear.js b/node_modules/globule/node_modules/lodash/_mapCacheClear.js similarity index 61% rename from node_modules/lodash/_mapClear.js rename to node_modules/globule/node_modules/lodash/_mapCacheClear.js index 296f417..bc9ca20 100644 --- a/node_modules/lodash/_mapClear.js +++ b/node_modules/globule/node_modules/lodash/_mapCacheClear.js @@ -1,4 +1,5 @@ var Hash = require('./_Hash'), + ListCache = require('./_ListCache'), Map = require('./_Map'); /** @@ -8,12 +9,13 @@ var Hash = require('./_Hash'), * @name clear * @memberOf MapCache */ -function mapClear() { +function mapCacheClear() { + this.size = 0; this.__data__ = { 'hash': new Hash, - 'map': Map ? new Map : [], + 'map': new (Map || ListCache), 'string': new Hash }; } -module.exports = mapClear; +module.exports = mapCacheClear; diff --git a/node_modules/globule/node_modules/lodash/_mapCacheDelete.js b/node_modules/globule/node_modules/lodash/_mapCacheDelete.js new file mode 100644 index 0000000..946ca3c --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_mapCacheDelete.js @@ -0,0 +1,18 @@ +var getMapData = require('./_getMapData'); + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +module.exports = mapCacheDelete; diff --git a/node_modules/globule/node_modules/lodash/_mapCacheGet.js b/node_modules/globule/node_modules/lodash/_mapCacheGet.js new file mode 100644 index 0000000..f29f55c --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_mapCacheGet.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +module.exports = mapCacheGet; diff --git a/node_modules/globule/node_modules/lodash/_mapCacheHas.js b/node_modules/globule/node_modules/lodash/_mapCacheHas.js new file mode 100644 index 0000000..a1214c0 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_mapCacheHas.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +module.exports = mapCacheHas; diff --git a/node_modules/globule/node_modules/lodash/_mapCacheSet.js b/node_modules/globule/node_modules/lodash/_mapCacheSet.js new file mode 100644 index 0000000..7346849 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_mapCacheSet.js @@ -0,0 +1,22 @@ +var getMapData = require('./_getMapData'); + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +module.exports = mapCacheSet; diff --git a/node_modules/lodash/package/_mapToArray.js b/node_modules/globule/node_modules/lodash/_mapToArray.js similarity index 74% rename from node_modules/lodash/package/_mapToArray.js rename to node_modules/globule/node_modules/lodash/_mapToArray.js index e2e8a24..fe3dd53 100644 --- a/node_modules/lodash/package/_mapToArray.js +++ b/node_modules/globule/node_modules/lodash/_mapToArray.js @@ -1,9 +1,9 @@ /** - * Converts `map` to an array. + * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. - * @returns {Array} Returns the converted array. + * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, diff --git a/node_modules/lodash/package/_matchesStrictComparable.js b/node_modules/globule/node_modules/lodash/_matchesStrictComparable.js similarity index 90% rename from node_modules/lodash/package/_matchesStrictComparable.js rename to node_modules/globule/node_modules/lodash/_matchesStrictComparable.js index 70375e0..f608af9 100644 --- a/node_modules/lodash/package/_matchesStrictComparable.js +++ b/node_modules/globule/node_modules/lodash/_matchesStrictComparable.js @@ -5,7 +5,7 @@ * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function matchesStrictComparable(key, srcValue) { return function(object) { diff --git a/node_modules/globule/node_modules/lodash/_memoizeCapped.js b/node_modules/globule/node_modules/lodash/_memoizeCapped.js new file mode 100644 index 0000000..7f71c8f --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_memoizeCapped.js @@ -0,0 +1,26 @@ +var memoize = require('./memoize'); + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +module.exports = memoizeCapped; diff --git a/node_modules/lodash/package/_mergeData.js b/node_modules/globule/node_modules/lodash/_mergeData.js similarity index 98% rename from node_modules/lodash/package/_mergeData.js rename to node_modules/globule/node_modules/lodash/_mergeData.js index 911e6ae..5aa1f1f 100644 --- a/node_modules/lodash/package/_mergeData.js +++ b/node_modules/globule/node_modules/lodash/_mergeData.js @@ -5,7 +5,7 @@ var composeArgs = require('./_composeArgs'), /** Used as the internal argument placeholder. */ var PLACEHOLDER = '__lodash_placeholder__'; -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1, BIND_KEY_FLAG = 2, CURRY_BOUND_FLAG = 4, diff --git a/node_modules/lodash/package/_mergeDefaults.js b/node_modules/globule/node_modules/lodash/_mergeDefaults.js similarity index 84% rename from node_modules/lodash/package/_mergeDefaults.js rename to node_modules/globule/node_modules/lodash/_mergeDefaults.js index 33375cc..9888f0e 100644 --- a/node_modules/lodash/package/_mergeDefaults.js +++ b/node_modules/globule/node_modules/lodash/_mergeDefaults.js @@ -16,7 +16,10 @@ var baseMerge = require('./_baseMerge'), */ function mergeDefaults(objValue, srcValue, key, object, source, stack) { if (isObject(objValue) && isObject(srcValue)) { - baseMerge(objValue, srcValue, undefined, mergeDefaults, stack.set(srcValue, objValue)); + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, mergeDefaults, stack); + stack['delete'](srcValue); } return objValue; } diff --git a/node_modules/lodash/package/_metaMap.js b/node_modules/globule/node_modules/lodash/_metaMap.js similarity index 100% rename from node_modules/lodash/package/_metaMap.js rename to node_modules/globule/node_modules/lodash/_metaMap.js diff --git a/node_modules/lodash/package/_nativeCreate.js b/node_modules/globule/node_modules/lodash/_nativeCreate.js similarity index 100% rename from node_modules/lodash/package/_nativeCreate.js rename to node_modules/globule/node_modules/lodash/_nativeCreate.js diff --git a/node_modules/globule/node_modules/lodash/_nativeKeys.js b/node_modules/globule/node_modules/lodash/_nativeKeys.js new file mode 100644 index 0000000..479a104 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_nativeKeys.js @@ -0,0 +1,6 @@ +var overArg = require('./_overArg'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object); + +module.exports = nativeKeys; diff --git a/node_modules/globule/node_modules/lodash/_nativeKeysIn.js b/node_modules/globule/node_modules/lodash/_nativeKeysIn.js new file mode 100644 index 0000000..00ee505 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_nativeKeysIn.js @@ -0,0 +1,20 @@ +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +module.exports = nativeKeysIn; diff --git a/node_modules/globule/node_modules/lodash/_nodeUtil.js b/node_modules/globule/node_modules/lodash/_nodeUtil.js new file mode 100644 index 0000000..b8e48e3 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_nodeUtil.js @@ -0,0 +1,22 @@ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding('util'); + } catch (e) {} +}()); + +module.exports = nodeUtil; diff --git a/node_modules/globule/node_modules/lodash/_objectToString.js b/node_modules/globule/node_modules/lodash/_objectToString.js new file mode 100644 index 0000000..c614ec0 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_objectToString.js @@ -0,0 +1,22 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +module.exports = objectToString; diff --git a/node_modules/globule/node_modules/lodash/_overArg.js b/node_modules/globule/node_modules/lodash/_overArg.js new file mode 100644 index 0000000..651c5c5 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_overArg.js @@ -0,0 +1,15 @@ +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; diff --git a/node_modules/globule/node_modules/lodash/_overRest.js b/node_modules/globule/node_modules/lodash/_overRest.js new file mode 100644 index 0000000..c7cdef3 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_overRest.js @@ -0,0 +1,36 @@ +var apply = require('./_apply'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; +} + +module.exports = overRest; diff --git a/node_modules/lodash/package/_parent.js b/node_modules/globule/node_modules/lodash/_parent.js similarity index 100% rename from node_modules/lodash/package/_parent.js rename to node_modules/globule/node_modules/lodash/_parent.js diff --git a/node_modules/lodash/package/_reEscape.js b/node_modules/globule/node_modules/lodash/_reEscape.js similarity index 100% rename from node_modules/lodash/package/_reEscape.js rename to node_modules/globule/node_modules/lodash/_reEscape.js diff --git a/node_modules/lodash/package/_reEvaluate.js b/node_modules/globule/node_modules/lodash/_reEvaluate.js similarity index 100% rename from node_modules/lodash/package/_reEvaluate.js rename to node_modules/globule/node_modules/lodash/_reEvaluate.js diff --git a/node_modules/lodash/package/_reInterpolate.js b/node_modules/globule/node_modules/lodash/_reInterpolate.js similarity index 100% rename from node_modules/lodash/package/_reInterpolate.js rename to node_modules/globule/node_modules/lodash/_reInterpolate.js diff --git a/node_modules/lodash/package/_realNames.js b/node_modules/globule/node_modules/lodash/_realNames.js similarity index 100% rename from node_modules/lodash/package/_realNames.js rename to node_modules/globule/node_modules/lodash/_realNames.js diff --git a/node_modules/lodash/package/_reorder.js b/node_modules/globule/node_modules/lodash/_reorder.js similarity index 100% rename from node_modules/lodash/package/_reorder.js rename to node_modules/globule/node_modules/lodash/_reorder.js diff --git a/node_modules/lodash/package/_replaceHolders.js b/node_modules/globule/node_modules/lodash/_replaceHolders.js similarity index 100% rename from node_modules/lodash/package/_replaceHolders.js rename to node_modules/globule/node_modules/lodash/_replaceHolders.js diff --git a/node_modules/globule/node_modules/lodash/_root.js b/node_modules/globule/node_modules/lodash/_root.js new file mode 100644 index 0000000..d2852be --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_root.js @@ -0,0 +1,9 @@ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; diff --git a/node_modules/globule/node_modules/lodash/_setCacheAdd.js b/node_modules/globule/node_modules/lodash/_setCacheAdd.js new file mode 100644 index 0000000..1081a74 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_setCacheAdd.js @@ -0,0 +1,19 @@ +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +module.exports = setCacheAdd; diff --git a/node_modules/globule/node_modules/lodash/_setCacheHas.js b/node_modules/globule/node_modules/lodash/_setCacheHas.js new file mode 100644 index 0000000..9a49255 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_setCacheHas.js @@ -0,0 +1,14 @@ +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +module.exports = setCacheHas; diff --git a/node_modules/lodash/package/_setData.js b/node_modules/globule/node_modules/lodash/_setData.js similarity index 51% rename from node_modules/lodash/package/_setData.js rename to node_modules/globule/node_modules/lodash/_setData.js index d86c610..e5cf3eb 100644 --- a/node_modules/lodash/package/_setData.js +++ b/node_modules/globule/node_modules/lodash/_setData.js @@ -1,9 +1,5 @@ var baseSetData = require('./_baseSetData'), - now = require('./now'); - -/** Used to detect hot functions by number of calls within a span of milliseconds. */ -var HOT_COUNT = 150, - HOT_SPAN = 16; + shortOut = require('./_shortOut'); /** * Sets metadata for `func`. @@ -19,24 +15,6 @@ var HOT_COUNT = 150, * @param {*} data The metadata. * @returns {Function} Returns `func`. */ -var setData = (function() { - var count = 0, - lastCalled = 0; - - return function(key, value) { - var stamp = now(), - remaining = HOT_SPAN - (stamp - lastCalled); - - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return key; - } - } else { - count = 0; - } - return baseSetData(key, value); - }; -}()); +var setData = shortOut(baseSetData); module.exports = setData; diff --git a/node_modules/lodash/package/_setToArray.js b/node_modules/globule/node_modules/lodash/_setToArray.js similarity index 75% rename from node_modules/lodash/package/_setToArray.js rename to node_modules/globule/node_modules/lodash/_setToArray.js index 6b24f30..b87f074 100644 --- a/node_modules/lodash/package/_setToArray.js +++ b/node_modules/globule/node_modules/lodash/_setToArray.js @@ -1,9 +1,9 @@ /** - * Converts `set` to an array. + * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. - * @returns {Array} Returns the converted array. + * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, diff --git a/node_modules/globule/node_modules/lodash/_setToPairs.js b/node_modules/globule/node_modules/lodash/_setToPairs.js new file mode 100644 index 0000000..36ad37a --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_setToPairs.js @@ -0,0 +1,18 @@ +/** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ +function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; +} + +module.exports = setToPairs; diff --git a/node_modules/globule/node_modules/lodash/_setToString.js b/node_modules/globule/node_modules/lodash/_setToString.js new file mode 100644 index 0000000..6ca8419 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_setToString.js @@ -0,0 +1,14 @@ +var baseSetToString = require('./_baseSetToString'), + shortOut = require('./_shortOut'); + +/** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var setToString = shortOut(baseSetToString); + +module.exports = setToString; diff --git a/node_modules/globule/node_modules/lodash/_setWrapToString.js b/node_modules/globule/node_modules/lodash/_setWrapToString.js new file mode 100644 index 0000000..decdc44 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_setWrapToString.js @@ -0,0 +1,21 @@ +var getWrapDetails = require('./_getWrapDetails'), + insertWrapDetails = require('./_insertWrapDetails'), + setToString = require('./_setToString'), + updateWrapDetails = require('./_updateWrapDetails'); + +/** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ +function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); +} + +module.exports = setWrapToString; diff --git a/node_modules/globule/node_modules/lodash/_shortOut.js b/node_modules/globule/node_modules/lodash/_shortOut.js new file mode 100644 index 0000000..3300a07 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_shortOut.js @@ -0,0 +1,37 @@ +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeNow = Date.now; + +/** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; +} + +module.exports = shortOut; diff --git a/node_modules/globule/node_modules/lodash/_shuffleSelf.js b/node_modules/globule/node_modules/lodash/_shuffleSelf.js new file mode 100644 index 0000000..8bcc4f5 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_shuffleSelf.js @@ -0,0 +1,28 @@ +var baseRandom = require('./_baseRandom'); + +/** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ +function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; +} + +module.exports = shuffleSelf; diff --git a/node_modules/lodash/package/_stackClear.js b/node_modules/globule/node_modules/lodash/_stackClear.js similarity index 63% rename from node_modules/lodash/package/_stackClear.js rename to node_modules/globule/node_modules/lodash/_stackClear.js index 8255536..ce8e5a9 100644 --- a/node_modules/lodash/package/_stackClear.js +++ b/node_modules/globule/node_modules/lodash/_stackClear.js @@ -1,3 +1,5 @@ +var ListCache = require('./_ListCache'); + /** * Removes all key-value entries from the stack. * @@ -6,7 +8,8 @@ * @memberOf Stack */ function stackClear() { - this.__data__ = { 'array': [], 'map': null }; + this.__data__ = new ListCache; + this.size = 0; } module.exports = stackClear; diff --git a/node_modules/lodash/package/_stackDelete.js b/node_modules/globule/node_modules/lodash/_stackDelete.js similarity index 70% rename from node_modules/lodash/package/_stackDelete.js rename to node_modules/globule/node_modules/lodash/_stackDelete.js index 7e38a13..ff9887a 100644 --- a/node_modules/lodash/package/_stackDelete.js +++ b/node_modules/globule/node_modules/lodash/_stackDelete.js @@ -1,5 +1,3 @@ -var assocDelete = require('./_assocDelete'); - /** * Removes `key` and its value from the stack. * @@ -11,9 +9,10 @@ var assocDelete = require('./_assocDelete'); */ function stackDelete(key) { var data = this.__data__, - array = data.array; + result = data['delete'](key); - return array ? assocDelete(array, key) : data.map['delete'](key); + this.size = data.size; + return result; } module.exports = stackDelete; diff --git a/node_modules/lodash/package/_stackGet.js b/node_modules/globule/node_modules/lodash/_stackGet.js similarity index 60% rename from node_modules/lodash/package/_stackGet.js rename to node_modules/globule/node_modules/lodash/_stackGet.js index 20b9d9a..1cdf004 100644 --- a/node_modules/lodash/package/_stackGet.js +++ b/node_modules/globule/node_modules/lodash/_stackGet.js @@ -1,5 +1,3 @@ -var assocGet = require('./_assocGet'); - /** * Gets the stack value for `key`. * @@ -10,10 +8,7 @@ var assocGet = require('./_assocGet'); * @returns {*} Returns the entry value. */ function stackGet(key) { - var data = this.__data__, - array = data.array; - - return array ? assocGet(array, key) : data.map.get(key); + return this.__data__.get(key); } module.exports = stackGet; diff --git a/node_modules/lodash/package/_stackHas.js b/node_modules/globule/node_modules/lodash/_stackHas.js similarity index 65% rename from node_modules/lodash/package/_stackHas.js rename to node_modules/globule/node_modules/lodash/_stackHas.js index 7a3b0b9..16a3ad1 100644 --- a/node_modules/lodash/package/_stackHas.js +++ b/node_modules/globule/node_modules/lodash/_stackHas.js @@ -1,5 +1,3 @@ -var assocHas = require('./_assocHas'); - /** * Checks if a stack value for `key` exists. * @@ -10,10 +8,7 @@ var assocHas = require('./_assocHas'); * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { - var data = this.__data__, - array = data.array; - - return array ? assocHas(array, key) : data.map.has(key); + return this.__data__.has(key); } module.exports = stackHas; diff --git a/node_modules/globule/node_modules/lodash/_stackSet.js b/node_modules/globule/node_modules/lodash/_stackSet.js new file mode 100644 index 0000000..b790ac5 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_stackSet.js @@ -0,0 +1,34 @@ +var ListCache = require('./_ListCache'), + Map = require('./_Map'), + MapCache = require('./_MapCache'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; +} + +module.exports = stackSet; diff --git a/node_modules/lodash/package/_baseIndexOf.js b/node_modules/globule/node_modules/lodash/_strictIndexOf.js similarity index 53% rename from node_modules/lodash/package/_baseIndexOf.js rename to node_modules/globule/node_modules/lodash/_strictIndexOf.js index 6cda802..0486a49 100644 --- a/node_modules/lodash/package/_baseIndexOf.js +++ b/node_modules/globule/node_modules/lodash/_strictIndexOf.js @@ -1,18 +1,14 @@ -var indexOfNaN = require('./_indexOfNaN'); - /** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ -function baseIndexOf(array, value, fromIndex) { - if (value !== value) { - return indexOfNaN(array, fromIndex); - } +function strictIndexOf(array, value, fromIndex) { var index = fromIndex - 1, length = array.length; @@ -24,4 +20,4 @@ function baseIndexOf(array, value, fromIndex) { return -1; } -module.exports = baseIndexOf; +module.exports = strictIndexOf; diff --git a/node_modules/globule/node_modules/lodash/_strictLastIndexOf.js b/node_modules/globule/node_modules/lodash/_strictLastIndexOf.js new file mode 100644 index 0000000..d7310dc --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_strictLastIndexOf.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; +} + +module.exports = strictLastIndexOf; diff --git a/node_modules/globule/node_modules/lodash/_stringSize.js b/node_modules/globule/node_modules/lodash/_stringSize.js new file mode 100644 index 0000000..17ef462 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_stringSize.js @@ -0,0 +1,18 @@ +var asciiSize = require('./_asciiSize'), + hasUnicode = require('./_hasUnicode'), + unicodeSize = require('./_unicodeSize'); + +/** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ +function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); +} + +module.exports = stringSize; diff --git a/node_modules/globule/node_modules/lodash/_stringToArray.js b/node_modules/globule/node_modules/lodash/_stringToArray.js new file mode 100644 index 0000000..d161158 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_stringToArray.js @@ -0,0 +1,18 @@ +var asciiToArray = require('./_asciiToArray'), + hasUnicode = require('./_hasUnicode'), + unicodeToArray = require('./_unicodeToArray'); + +/** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); +} + +module.exports = stringToArray; diff --git a/node_modules/lodash/package/_stringToPath.js b/node_modules/globule/node_modules/lodash/_stringToPath.js similarity index 55% rename from node_modules/lodash/package/_stringToPath.js rename to node_modules/globule/node_modules/lodash/_stringToPath.js index b6a1fc2..8bb78e5 100644 --- a/node_modules/lodash/package/_stringToPath.js +++ b/node_modules/globule/node_modules/lodash/_stringToPath.js @@ -1,8 +1,9 @@ -var memoize = require('./memoize'), +var memoizeCapped = require('./_memoizeCapped'), toString = require('./toString'); /** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g; +var reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; @@ -14,9 +15,14 @@ var reEscapeChar = /\\(\\)?/g; * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ -var stringToPath = memoize(function(string) { +var stringToPath = memoizeCapped(function(string) { + string = toString(string); + var result = []; - toString(string).replace(rePropName, function(match, number, quote, string) { + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); }); return result; diff --git a/node_modules/lodash/package/_toKey.js b/node_modules/globule/node_modules/lodash/_toKey.js similarity index 100% rename from node_modules/lodash/package/_toKey.js rename to node_modules/globule/node_modules/lodash/_toKey.js diff --git a/node_modules/lodash/package/_toSource.js b/node_modules/globule/node_modules/lodash/_toSource.js similarity index 69% rename from node_modules/lodash/package/_toSource.js rename to node_modules/globule/node_modules/lodash/_toSource.js index 43f3ff8..a020b38 100644 --- a/node_modules/lodash/package/_toSource.js +++ b/node_modules/globule/node_modules/lodash/_toSource.js @@ -1,11 +1,14 @@ +/** Used for built-in method references. */ +var funcProto = Function.prototype; + /** Used to resolve the decompiled source of functions. */ -var funcToString = Function.prototype.toString; +var funcToString = funcProto.toString; /** * Converts `func` to its source code. * * @private - * @param {Function} func The function to process. + * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { diff --git a/node_modules/lodash/package/_unescapeHtmlChar.js b/node_modules/globule/node_modules/lodash/_unescapeHtmlChar.js similarity index 75% rename from node_modules/lodash/package/_unescapeHtmlChar.js rename to node_modules/globule/node_modules/lodash/_unescapeHtmlChar.js index 28b3454..a71fecb 100644 --- a/node_modules/lodash/package/_unescapeHtmlChar.js +++ b/node_modules/globule/node_modules/lodash/_unescapeHtmlChar.js @@ -1,11 +1,12 @@ +var basePropertyOf = require('./_basePropertyOf'); + /** Used to map HTML entities to characters. */ var htmlUnescapes = { '&': '&', '<': '<', '>': '>', '"': '"', - ''': "'", - '`': '`' + ''': "'" }; /** @@ -15,8 +16,6 @@ var htmlUnescapes = { * @param {string} chr The matched character to unescape. * @returns {string} Returns the unescaped character. */ -function unescapeHtmlChar(chr) { - return htmlUnescapes[chr]; -} +var unescapeHtmlChar = basePropertyOf(htmlUnescapes); module.exports = unescapeHtmlChar; diff --git a/node_modules/lodash/package/_stringSize.js b/node_modules/globule/node_modules/lodash/_unicodeSize.js similarity index 71% rename from node_modules/lodash/package/_stringSize.js rename to node_modules/globule/node_modules/lodash/_unicodeSize.js index c64c7ff..26cd257 100644 --- a/node_modules/lodash/package/_stringSize.js +++ b/node_modules/globule/node_modules/lodash/_unicodeSize.js @@ -1,5 +1,3 @@ -var reHasComplexSymbol = require('./_reHasComplexSymbol'); - /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', @@ -24,24 +22,21 @@ var reOptMod = rsModifier + '?', rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); /** - * Gets the number of symbols in `string`. + * Gets the size of a Unicode `string`. * * @private - * @param {string} string The string to inspect. + * @param {string} string The string inspect. * @returns {number} Returns the string size. */ -function stringSize(string) { - if (!(string && reHasComplexSymbol.test(string))) { - return string.length; - } - var result = reComplexSymbol.lastIndex = 0; - while (reComplexSymbol.test(string)) { - result++; +function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; } return result; } -module.exports = stringSize; +module.exports = unicodeSize; diff --git a/node_modules/lodash/package/_stringToArray.js b/node_modules/globule/node_modules/lodash/_unicodeToArray.js similarity index 84% rename from node_modules/lodash/package/_stringToArray.js rename to node_modules/globule/node_modules/lodash/_unicodeToArray.js index 90986f0..11ac763 100644 --- a/node_modules/lodash/package/_stringToArray.js +++ b/node_modules/globule/node_modules/lodash/_unicodeToArray.js @@ -22,17 +22,17 @@ var reOptMod = rsModifier + '?', rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); /** - * Converts `string` to an array. + * Converts a Unicode `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ -function stringToArray(string) { - return string.match(reComplexSymbol); +function unicodeToArray(string) { + return string.match(reUnicode) || []; } -module.exports = stringToArray; +module.exports = unicodeToArray; diff --git a/node_modules/lodash/package/words.js b/node_modules/globule/node_modules/lodash/_unicodeWords.js similarity index 55% rename from node_modules/lodash/package/words.js rename to node_modules/globule/node_modules/lodash/_unicodeWords.js index 786d14d..6c328ba 100644 --- a/node_modules/lodash/package/words.js +++ b/node_modules/globule/node_modules/lodash/_unicodeWords.js @@ -1,8 +1,3 @@ -var toString = require('./toString'); - -/** Used to match non-compound words composed of alphanumeric characters. */ -var reBasicWord = /[a-zA-Z0-9]+/g; - /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', @@ -34,56 +29,39 @@ var rsApos = "['\u2019]", rsZWJ = '\\u200d'; /** Used to compose unicode regexes. */ -var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')', - rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')', - rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', - rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', +var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', reOptMod = rsModifier + '?', rsOptVar = '[' + rsVarRange + ']?', rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)', + rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)', rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq; /** Used to match complex or compound words. */ -var reComplexWord = RegExp([ - rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', - rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')', - rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr, - rsUpper + '+' + rsOptUpperContr, +var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, rsDigits, rsEmoji ].join('|'), 'g'); -/** Used to detect strings that need a more robust regexp to match words. */ -var reHasComplexWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; - /** - * Splits `string` into an array of its words. + * Splits a Unicode `string` into an array of its words. * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to inspect. - * @param {RegExp|string} [pattern] The pattern to match words. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @private + * @param {string} The string to inspect. * @returns {Array} Returns the words of `string`. - * @example - * - * _.words('fred, barney, & pebbles'); - * // => ['fred', 'barney', 'pebbles'] - * - * _.words('fred, barney, & pebbles', /[^, ]+/g); - * // => ['fred', 'barney', '&', 'pebbles'] */ -function words(string, pattern, guard) { - string = toString(string); - pattern = guard ? undefined : pattern; - - if (pattern === undefined) { - pattern = reHasComplexWord.test(string) ? reComplexWord : reBasicWord; - } - return string.match(pattern) || []; +function unicodeWords(string) { + return string.match(reUnicodeWord) || []; } -module.exports = words; +module.exports = unicodeWords; diff --git a/node_modules/globule/node_modules/lodash/_updateWrapDetails.js b/node_modules/globule/node_modules/lodash/_updateWrapDetails.js new file mode 100644 index 0000000..128b1b4 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/_updateWrapDetails.js @@ -0,0 +1,46 @@ +var arrayEach = require('./_arrayEach'), + arrayIncludes = require('./_arrayIncludes'); + +/** Used to compose bitmasks for function metadata. */ +var BIND_FLAG = 1, + BIND_KEY_FLAG = 2, + CURRY_FLAG = 8, + CURRY_RIGHT_FLAG = 16, + PARTIAL_FLAG = 32, + PARTIAL_RIGHT_FLAG = 64, + ARY_FLAG = 128, + REARG_FLAG = 256, + FLIP_FLAG = 512; + +/** Used to associate wrap methods with their bit flags. */ +var wrapFlags = [ + ['ary', ARY_FLAG], + ['bind', BIND_FLAG], + ['bindKey', BIND_KEY_FLAG], + ['curry', CURRY_FLAG], + ['curryRight', CURRY_RIGHT_FLAG], + ['flip', FLIP_FLAG], + ['partial', PARTIAL_FLAG], + ['partialRight', PARTIAL_RIGHT_FLAG], + ['rearg', REARG_FLAG] +]; + +/** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ +function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); +} + +module.exports = updateWrapDetails; diff --git a/node_modules/lodash/package/_wrapperClone.js b/node_modules/globule/node_modules/lodash/_wrapperClone.js similarity index 100% rename from node_modules/lodash/package/_wrapperClone.js rename to node_modules/globule/node_modules/lodash/_wrapperClone.js diff --git a/node_modules/lodash/package/add.js b/node_modules/globule/node_modules/lodash/add.js similarity index 98% rename from node_modules/lodash/package/add.js rename to node_modules/globule/node_modules/lodash/add.js index d82c652..f069515 100644 --- a/node_modules/lodash/package/add.js +++ b/node_modules/globule/node_modules/lodash/add.js @@ -17,6 +17,6 @@ var createMathOperation = require('./_createMathOperation'); */ var add = createMathOperation(function(augend, addend) { return augend + addend; -}); +}, 0); module.exports = add; diff --git a/node_modules/lodash/package/after.js b/node_modules/globule/node_modules/lodash/after.js similarity index 94% rename from node_modules/lodash/package/after.js rename to node_modules/globule/node_modules/lodash/after.js index 910923a..3900c97 100644 --- a/node_modules/lodash/package/after.js +++ b/node_modules/globule/node_modules/lodash/after.js @@ -1,6 +1,6 @@ var toInteger = require('./toInteger'); -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** diff --git a/node_modules/lodash/package/array.js b/node_modules/globule/node_modules/lodash/array.js similarity index 98% rename from node_modules/lodash/package/array.js rename to node_modules/globule/node_modules/lodash/array.js index 06eda29..af688d3 100644 --- a/node_modules/lodash/package/array.js +++ b/node_modules/globule/node_modules/lodash/array.js @@ -12,6 +12,7 @@ module.exports = { 'fill': require('./fill'), 'findIndex': require('./findIndex'), 'findLastIndex': require('./findLastIndex'), + 'first': require('./first'), 'flatten': require('./flatten'), 'flattenDeep': require('./flattenDeep'), 'flattenDepth': require('./flattenDepth'), diff --git a/node_modules/lodash/package/ary.js b/node_modules/globule/node_modules/lodash/ary.js similarity index 71% rename from node_modules/lodash/package/ary.js rename to node_modules/globule/node_modules/lodash/ary.js index e901f1b..c743b06 100644 --- a/node_modules/lodash/package/ary.js +++ b/node_modules/globule/node_modules/lodash/ary.js @@ -1,6 +1,6 @@ -var createWrapper = require('./_createWrapper'); +var createWrap = require('./_createWrap'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var ARY_FLAG = 128; /** @@ -14,7 +14,7 @@ var ARY_FLAG = 128; * @param {Function} func The function to cap arguments for. * @param {number} [n=func.length] The arity cap. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. * @example * * _.map(['6', '8', '10'], _.ary(parseInt, 1)); @@ -23,7 +23,7 @@ var ARY_FLAG = 128; function ary(func, n, guard) { n = guard ? undefined : n; n = (func && n == null) ? func.length : n; - return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n); + return createWrap(func, ARY_FLAG, undefined, undefined, undefined, undefined, n); } module.exports = ary; diff --git a/node_modules/lodash/package/assign.js b/node_modules/globule/node_modules/lodash/assign.js similarity index 74% rename from node_modules/lodash/package/assign.js rename to node_modules/globule/node_modules/lodash/assign.js index 2a60ff2..909db26 100644 --- a/node_modules/lodash/package/assign.js +++ b/node_modules/globule/node_modules/lodash/assign.js @@ -11,12 +11,6 @@ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */ -var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); - /** * Assigns own enumerable string keyed properties of source objects to the * destination object. Source objects are applied from left to right. @@ -36,21 +30,21 @@ var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); * @example * * function Foo() { - * this.c = 3; + * this.a = 1; * } * * function Bar() { - * this.e = 5; + * this.c = 3; * } * - * Foo.prototype.d = 4; - * Bar.prototype.f = 6; + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; * - * _.assign({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3, 'e': 5 } + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } */ var assign = createAssigner(function(object, source) { - if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { + if (isPrototype(source) || isArrayLike(source)) { copyObject(source, keys(source), object); return; } diff --git a/node_modules/globule/node_modules/lodash/assignIn.js b/node_modules/globule/node_modules/lodash/assignIn.js new file mode 100644 index 0000000..e663473 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/assignIn.js @@ -0,0 +1,40 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ +var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); +}); + +module.exports = assignIn; diff --git a/node_modules/lodash/package/assignInWith.js b/node_modules/globule/node_modules/lodash/assignInWith.js similarity index 100% rename from node_modules/lodash/package/assignInWith.js rename to node_modules/globule/node_modules/lodash/assignInWith.js diff --git a/node_modules/lodash/package/assignWith.js b/node_modules/globule/node_modules/lodash/assignWith.js similarity index 100% rename from node_modules/lodash/package/assignWith.js rename to node_modules/globule/node_modules/lodash/assignWith.js diff --git a/node_modules/lodash/package/at.js b/node_modules/globule/node_modules/lodash/at.js similarity index 61% rename from node_modules/lodash/package/at.js rename to node_modules/globule/node_modules/lodash/at.js index 59b197c..05e9482 100644 --- a/node_modules/lodash/package/at.js +++ b/node_modules/globule/node_modules/lodash/at.js @@ -1,6 +1,5 @@ var baseAt = require('./_baseAt'), - baseFlatten = require('./_baseFlatten'), - rest = require('./rest'); + flatRest = require('./_flatRest'); /** * Creates an array of values corresponding to `paths` of `object`. @@ -11,19 +10,14 @@ var baseAt = require('./_baseAt'), * @category Object * @param {Object} object The object to iterate over. * @param {...(string|string[])} [paths] The property paths of elements to pick. - * @returns {Array} Returns the new array of picked elements. + * @returns {Array} Returns the picked values. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; * * _.at(object, ['a[0].b.c', 'a[1]']); * // => [3, 4] - * - * _.at(['a', 'b', 'c'], 0, 2); - * // => ['a', 'c'] */ -var at = rest(function(object, paths) { - return baseAt(object, baseFlatten(paths, 1)); -}); +var at = flatRest(baseAt); module.exports = at; diff --git a/node_modules/lodash/package/attempt.js b/node_modules/globule/node_modules/lodash/attempt.js similarity index 87% rename from node_modules/lodash/package/attempt.js rename to node_modules/globule/node_modules/lodash/attempt.js index e65b2e6..624d015 100644 --- a/node_modules/lodash/package/attempt.js +++ b/node_modules/globule/node_modules/lodash/attempt.js @@ -1,6 +1,6 @@ var apply = require('./_apply'), - isError = require('./isError'), - rest = require('./rest'); + baseRest = require('./_baseRest'), + isError = require('./isError'); /** * Attempts to invoke `func`, returning either the result or the caught error @@ -24,7 +24,7 @@ var apply = require('./_apply'), * elements = []; * } */ -var attempt = rest(function(func, args) { +var attempt = baseRest(function(func, args) { try { return apply(func, undefined, args); } catch (e) { diff --git a/node_modules/lodash/package/before.js b/node_modules/globule/node_modules/lodash/before.js similarity index 89% rename from node_modules/lodash/package/before.js rename to node_modules/globule/node_modules/lodash/before.js index a495adc..a3e0a16 100644 --- a/node_modules/lodash/package/before.js +++ b/node_modules/globule/node_modules/lodash/before.js @@ -1,6 +1,6 @@ var toInteger = require('./toInteger'); -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** @@ -18,7 +18,7 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * @example * * jQuery(element).on('click', _.before(5, addContactToList)); - * // => allows adding up to 4 contacts to the list + * // => Allows adding up to 4 contacts to the list. */ function before(n, func) { var result; diff --git a/node_modules/lodash/package/bind.js b/node_modules/globule/node_modules/lodash/bind.js similarity index 67% rename from node_modules/lodash/package/bind.js rename to node_modules/globule/node_modules/lodash/bind.js index a41b946..eac913b 100644 --- a/node_modules/lodash/package/bind.js +++ b/node_modules/globule/node_modules/lodash/bind.js @@ -1,9 +1,9 @@ -var createWrapper = require('./_createWrapper'), - getPlaceholder = require('./_getPlaceholder'), - replaceHolders = require('./_replaceHolders'), - rest = require('./rest'); +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1, PARTIAL_FLAG = 32; @@ -14,7 +14,7 @@ var BIND_FLAG = 1, * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for partially applied arguments. * - * **Note:** Unlike native `Function#bind` this method doesn't set the "length" + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" * property of bound functions. * * @static @@ -27,9 +27,9 @@ var BIND_FLAG = 1, * @returns {Function} Returns the new bound function. * @example * - * var greet = function(greeting, punctuation) { + * function greet(greeting, punctuation) { * return greeting + ' ' + this.user + punctuation; - * }; + * } * * var object = { 'user': 'fred' }; * @@ -42,13 +42,13 @@ var BIND_FLAG = 1, * bound('hi'); * // => 'hi fred!' */ -var bind = rest(function(func, thisArg, partials) { +var bind = baseRest(function(func, thisArg, partials) { var bitmask = BIND_FLAG; if (partials.length) { - var holders = replaceHolders(partials, getPlaceholder(bind)); + var holders = replaceHolders(partials, getHolder(bind)); bitmask |= PARTIAL_FLAG; } - return createWrapper(func, bitmask, thisArg, partials, holders); + return createWrap(func, bitmask, thisArg, partials, holders); }); // Assign default placeholders. diff --git a/node_modules/lodash/package/bindAll.js b/node_modules/globule/node_modules/lodash/bindAll.js similarity index 68% rename from node_modules/lodash/package/bindAll.js rename to node_modules/globule/node_modules/lodash/bindAll.js index d389fd7..a35706d 100644 --- a/node_modules/lodash/package/bindAll.js +++ b/node_modules/globule/node_modules/lodash/bindAll.js @@ -1,7 +1,7 @@ var arrayEach = require('./_arrayEach'), - baseFlatten = require('./_baseFlatten'), + baseAssignValue = require('./_baseAssignValue'), bind = require('./bind'), - rest = require('./rest'), + flatRest = require('./_flatRest'), toKey = require('./_toKey'); /** @@ -21,19 +21,19 @@ var arrayEach = require('./_arrayEach'), * * var view = { * 'label': 'docs', - * 'onClick': function() { + * 'click': function() { * console.log('clicked ' + this.label); * } * }; * - * _.bindAll(view, 'onClick'); - * jQuery(element).on('click', view.onClick); + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); * // => Logs 'clicked docs' when clicked. */ -var bindAll = rest(function(object, methodNames) { - arrayEach(baseFlatten(methodNames, 1), function(key) { +var bindAll = flatRest(function(object, methodNames) { + arrayEach(methodNames, function(key) { key = toKey(key); - object[key] = bind(object[key], object); + baseAssignValue(object, key, bind(object[key], object)); }); return object; }); diff --git a/node_modules/lodash/package/bindKey.js b/node_modules/globule/node_modules/lodash/bindKey.js similarity index 79% rename from node_modules/lodash/package/bindKey.js rename to node_modules/globule/node_modules/lodash/bindKey.js index 364dd69..8824440 100644 --- a/node_modules/lodash/package/bindKey.js +++ b/node_modules/globule/node_modules/lodash/bindKey.js @@ -1,9 +1,9 @@ -var createWrapper = require('./_createWrapper'), - getPlaceholder = require('./_getPlaceholder'), - replaceHolders = require('./_replaceHolders'), - rest = require('./rest'); +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1, BIND_KEY_FLAG = 2, PARTIAL_FLAG = 32; @@ -53,13 +53,13 @@ var BIND_FLAG = 1, * bound('hi'); * // => 'hiya fred!' */ -var bindKey = rest(function(object, key, partials) { +var bindKey = baseRest(function(object, key, partials) { var bitmask = BIND_FLAG | BIND_KEY_FLAG; if (partials.length) { - var holders = replaceHolders(partials, getPlaceholder(bindKey)); + var holders = replaceHolders(partials, getHolder(bindKey)); bitmask |= PARTIAL_FLAG; } - return createWrapper(key, bitmask, object, partials, holders); + return createWrap(key, bitmask, object, partials, holders); }); // Assign default placeholders. diff --git a/node_modules/lodash/package/camelCase.js b/node_modules/globule/node_modules/lodash/camelCase.js similarity index 100% rename from node_modules/lodash/package/camelCase.js rename to node_modules/globule/node_modules/lodash/camelCase.js diff --git a/node_modules/lodash/package/capitalize.js b/node_modules/globule/node_modules/lodash/capitalize.js similarity index 100% rename from node_modules/lodash/package/capitalize.js rename to node_modules/globule/node_modules/lodash/capitalize.js diff --git a/node_modules/lodash/package/castArray.js b/node_modules/globule/node_modules/lodash/castArray.js similarity index 100% rename from node_modules/lodash/package/castArray.js rename to node_modules/globule/node_modules/lodash/castArray.js diff --git a/node_modules/lodash/package/ceil.js b/node_modules/globule/node_modules/lodash/ceil.js similarity index 100% rename from node_modules/lodash/package/ceil.js rename to node_modules/globule/node_modules/lodash/ceil.js diff --git a/node_modules/lodash/package/chain.js b/node_modules/globule/node_modules/lodash/chain.js similarity index 100% rename from node_modules/lodash/package/chain.js rename to node_modules/globule/node_modules/lodash/chain.js diff --git a/node_modules/lodash/package/chunk.js b/node_modules/globule/node_modules/lodash/chunk.js similarity index 92% rename from node_modules/lodash/package/chunk.js rename to node_modules/globule/node_modules/lodash/chunk.js index f209474..5b562fe 100644 --- a/node_modules/lodash/package/chunk.js +++ b/node_modules/globule/node_modules/lodash/chunk.js @@ -18,7 +18,7 @@ var nativeCeil = Math.ceil, * @param {Array} array The array to process. * @param {number} [size=1] The length of each chunk * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the new array containing chunks. + * @returns {Array} Returns the new array of chunks. * @example * * _.chunk(['a', 'b', 'c', 'd'], 2); @@ -33,7 +33,7 @@ function chunk(array, size, guard) { } else { size = nativeMax(toInteger(size), 0); } - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length || size < 1) { return []; } diff --git a/node_modules/lodash/package/clamp.js b/node_modules/globule/node_modules/lodash/clamp.js similarity index 100% rename from node_modules/lodash/package/clamp.js rename to node_modules/globule/node_modules/lodash/clamp.js diff --git a/node_modules/lodash/package/clone.js b/node_modules/globule/node_modules/lodash/clone.js similarity index 100% rename from node_modules/lodash/package/clone.js rename to node_modules/globule/node_modules/lodash/clone.js diff --git a/node_modules/lodash/package/cloneDeep.js b/node_modules/globule/node_modules/lodash/cloneDeep.js similarity index 100% rename from node_modules/lodash/package/cloneDeep.js rename to node_modules/globule/node_modules/lodash/cloneDeep.js diff --git a/node_modules/lodash/package/cloneDeepWith.js b/node_modules/globule/node_modules/lodash/cloneDeepWith.js similarity index 92% rename from node_modules/lodash/package/cloneDeepWith.js rename to node_modules/globule/node_modules/lodash/cloneDeepWith.js index 4a345fb..c3ec6ba 100644 --- a/node_modules/lodash/package/cloneDeepWith.js +++ b/node_modules/globule/node_modules/lodash/cloneDeepWith.js @@ -29,6 +29,7 @@ var baseClone = require('./_baseClone'); * // => 20 */ function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; return baseClone(value, true, true, customizer); } diff --git a/node_modules/lodash/package/cloneWith.js b/node_modules/globule/node_modules/lodash/cloneWith.js similarity index 93% rename from node_modules/lodash/package/cloneWith.js rename to node_modules/globule/node_modules/lodash/cloneWith.js index c85f573..f24caf8 100644 --- a/node_modules/lodash/package/cloneWith.js +++ b/node_modules/globule/node_modules/lodash/cloneWith.js @@ -32,6 +32,7 @@ var baseClone = require('./_baseClone'); * // => 0 */ function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; return baseClone(value, false, true, customizer); } diff --git a/node_modules/lodash/package/collection.js b/node_modules/globule/node_modules/lodash/collection.js similarity index 97% rename from node_modules/lodash/package/collection.js rename to node_modules/globule/node_modules/lodash/collection.js index 22b0c8b..77fe837 100644 --- a/node_modules/lodash/package/collection.js +++ b/node_modules/globule/node_modules/lodash/collection.js @@ -1,5 +1,4 @@ module.exports = { - 'at': require('./at'), 'countBy': require('./countBy'), 'each': require('./each'), 'eachRight': require('./eachRight'), diff --git a/node_modules/lodash/package/commit.js b/node_modules/globule/node_modules/lodash/commit.js similarity index 100% rename from node_modules/lodash/package/commit.js rename to node_modules/globule/node_modules/lodash/commit.js diff --git a/node_modules/lodash/package/compact.js b/node_modules/globule/node_modules/lodash/compact.js similarity index 92% rename from node_modules/lodash/package/compact.js rename to node_modules/globule/node_modules/lodash/compact.js index 790f311..031fab4 100644 --- a/node_modules/lodash/package/compact.js +++ b/node_modules/globule/node_modules/lodash/compact.js @@ -15,7 +15,7 @@ */ function compact(array) { var index = -1, - length = array ? array.length : 0, + length = array == null ? 0 : array.length, resIndex = 0, result = []; diff --git a/node_modules/lodash/package/concat.js b/node_modules/globule/node_modules/lodash/concat.js similarity index 59% rename from node_modules/lodash/package/concat.js rename to node_modules/globule/node_modules/lodash/concat.js index de9270b..1da48a4 100644 --- a/node_modules/lodash/package/concat.js +++ b/node_modules/globule/node_modules/lodash/concat.js @@ -1,7 +1,7 @@ -var arrayConcat = require('./_arrayConcat'), +var arrayPush = require('./_arrayPush'), baseFlatten = require('./_baseFlatten'), - castArray = require('./castArray'), - copyArray = require('./_copyArray'); + copyArray = require('./_copyArray'), + isArray = require('./isArray'); /** * Creates a new array concatenating `array` with any additional arrays @@ -26,17 +26,18 @@ var arrayConcat = require('./_arrayConcat'), * // => [1] */ function concat() { - var length = arguments.length, - array = castArray(arguments[0]); - - if (length < 2) { - return length ? copyArray(array) : []; + var length = arguments.length; + if (!length) { + return []; } - var args = Array(length - 1); - while (length--) { - args[length - 1] = arguments[length]; + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; } - return arrayConcat(array, baseFlatten(args, 1)); + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); } module.exports = concat; diff --git a/node_modules/lodash/package/cond.js b/node_modules/globule/node_modules/lodash/cond.js similarity index 82% rename from node_modules/lodash/package/cond.js rename to node_modules/globule/node_modules/lodash/cond.js index 0ba36de..6455598 100644 --- a/node_modules/lodash/package/cond.js +++ b/node_modules/globule/node_modules/lodash/cond.js @@ -1,9 +1,9 @@ var apply = require('./_apply'), arrayMap = require('./_arrayMap'), baseIteratee = require('./_baseIteratee'), - rest = require('./rest'); + baseRest = require('./_baseRest'); -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** @@ -17,13 +17,13 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * @since 4.0.0 * @category Util * @param {Array} pairs The predicate-function pairs. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new composite function. * @example * * var func = _.cond([ * [_.matches({ 'a': 1 }), _.constant('matches A')], * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], - * [_.constant(true), _.constant('no match')] + * [_.stubTrue, _.constant('no match')] * ]); * * func({ 'a': 1, 'b': 2 }); @@ -36,7 +36,7 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * // => 'no match' */ function cond(pairs) { - var length = pairs ? pairs.length : 0, + var length = pairs == null ? 0 : pairs.length, toIteratee = baseIteratee; pairs = !length ? [] : arrayMap(pairs, function(pair) { @@ -46,7 +46,7 @@ function cond(pairs) { return [toIteratee(pair[0]), pair[1]]; }); - return rest(function(args) { + return baseRest(function(args) { var index = -1; while (++index < length) { var pair = pairs[index]; diff --git a/node_modules/lodash/package/conforms.js b/node_modules/globule/node_modules/lodash/conforms.js similarity index 63% rename from node_modules/lodash/package/conforms.js rename to node_modules/globule/node_modules/lodash/conforms.js index 6ec590f..e4c537e 100644 --- a/node_modules/lodash/package/conforms.js +++ b/node_modules/globule/node_modules/lodash/conforms.js @@ -6,21 +6,24 @@ var baseClone = require('./_baseClone'), * the corresponding property values of a given object, returning `true` if * all predicates return truthy, else `false`. * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * * @static * @memberOf _ * @since 4.0.0 * @category Util * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } * ]; * - * _.filter(users, _.conforms({ 'age': _.partial(_.gt, _, 38) })); - * // => [{ 'user': 'fred', 'age': 40 }] + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] */ function conforms(source) { return baseConforms(baseClone(source, true)); diff --git a/node_modules/globule/node_modules/lodash/conformsTo.js b/node_modules/globule/node_modules/lodash/conformsTo.js new file mode 100644 index 0000000..b8a93eb --- /dev/null +++ b/node_modules/globule/node_modules/lodash/conformsTo.js @@ -0,0 +1,32 @@ +var baseConformsTo = require('./_baseConformsTo'), + keys = require('./keys'); + +/** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ +function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); +} + +module.exports = conformsTo; diff --git a/node_modules/lodash/package/constant.js b/node_modules/globule/node_modules/lodash/constant.js similarity index 59% rename from node_modules/lodash/package/constant.js rename to node_modules/globule/node_modules/lodash/constant.js index 59bcb42..655ece3 100644 --- a/node_modules/lodash/package/constant.js +++ b/node_modules/globule/node_modules/lodash/constant.js @@ -6,13 +6,15 @@ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new constant function. * @example * - * var object = { 'user': 'fred' }; - * var getter = _.constant(object); + * var objects = _.times(2, _.constant({ 'a': 1 })); * - * getter() === object; + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { diff --git a/node_modules/lodash/package/core.js b/node_modules/globule/node_modules/lodash/core.js similarity index 81% rename from node_modules/lodash/package/core.js rename to node_modules/globule/node_modules/lodash/core.js index 73b541b..3a13976 100644 --- a/node_modules/lodash/package/core.js +++ b/node_modules/globule/node_modules/lodash/core.js @@ -1,8 +1,8 @@ /** * @license - * lodash 4.11.2 (Custom Build) + * lodash (Custom Build) * Build: `lodash core -o ./dist/lodash.core.js` - * Copyright jQuery Foundation and other contributors + * Copyright JS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors @@ -13,12 +13,12 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.11.2'; + var VERSION = '4.16.6'; - /** Used as the `TypeError` message for "Functions" methods. */ + /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; - /** Used to compose bitmasks for wrapper metadata. */ + /** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1, PARTIAL_FLAG = 32; @@ -33,6 +33,7 @@ /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', @@ -40,83 +41,40 @@ genTag = '[object GeneratorFunction]', numberTag = '[object Number]', objectTag = '[object Object]', + proxyTag = '[object Proxy]', regexpTag = '[object RegExp]', stringTag = '[object String]'; /** Used to match HTML entities and HTML characters. */ - var reUnescapedHtml = /[&<>"'`]/g, + var reUnescapedHtml = /[&<>"']/g, reHasUnescapedHtml = RegExp(reUnescapedHtml.source); - /** Used to detect unsigned integer values. */ - var reIsUint = /^(?:0|[1-9]\d*)$/; - /** Used to map characters to HTML entities. */ var htmlEscapes = { '&': '&', '<': '<', '>': '>', '"': '"', - "'": ''', - '`': '`' - }; - - /** Used to determine if values are of the language type `Object`. */ - var objectTypes = { - 'function': true, - 'object': true + "'": ''' }; - /** Detect free variable `exports`. */ - var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) - ? exports - : undefined; - - /** Detect free variable `module`. */ - var freeModule = (objectTypes[typeof module] && module && !module.nodeType) - ? module - : undefined; - - /** Detect the popular CommonJS extension `module.exports`. */ - var moduleExports = (freeModule && freeModule.exports === freeExports) - ? freeExports - : undefined; - /** Detect free variable `global` from Node.js. */ - var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; /** Detect free variable `self`. */ - var freeSelf = checkGlobal(objectTypes[typeof self] && self); + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - /** Detect free variable `window`. */ - var freeWindow = checkGlobal(objectTypes[typeof window] && window); + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); - /** Detect `this` as the global object. */ - var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - /** - * Used as a reference to the global object. - * - * The `this` value is used if it's the global object to avoid Greasemonkey's - * restricted `window` object, otherwise the `window` object is used. - */ - var root = freeGlobal || - ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || - freeSelf || thisGlobal || Function('return this')(); + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /*--------------------------------------------------------------------------*/ - /** - * Creates a new array concatenating `array` with `other`. - * - * @private - * @param {Array} array The first array to concatenate. - * @param {Array} other The second array to concatenate. - * @returns {Array} Returns the new concatenated array. - */ - function arrayConcat(array, other) { - return arrayPush(copyArray(array), values); - } - /** * Appends the elements of `values` to `array`. * @@ -131,27 +89,52 @@ } /** - * The base implementation of methods like `_.find` and `_.findKey`, without - * support for iteratee shorthands, which iterates over `collection` using - * `eachFunc`. + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. * * @private - * @param {Array|Object} collection The collection to search. + * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. - * @param {Function} eachFunc The function to iterate over `collection`. - * @param {boolean} [retKey] Specify returning the key of the found element - * instead of the element itself. - * @returns {*} Returns the found element or its key, else `undefined`. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. */ - function baseFind(collection, predicate, eachFunc, retKey) { - var result; - eachFunc(collection, function(value, key, collection) { - if (predicate(value, key, collection)) { - result = retKey ? key : value; - return false; + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; } - }); - return result; + } + return -1; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; } /** @@ -176,25 +159,6 @@ return accumulator; } - /** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ - function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; - } - /** * The base implementation of `_.values` and `_.valuesIn` which creates an * array of `object` property values corresponding to the property names @@ -211,17 +175,6 @@ }); } - /** - * Checks if `value` is a global object. - * - * @private - * @param {*} value The value to check. - * @returns {null|Object} Returns `value` if it's a global object, else `null`. - */ - function checkGlobal(value) { - return (value && value.Object === Object) ? value : null; - } - /** * Used by `_.escape` to convert characters to HTML entities. * @@ -229,44 +182,20 @@ * @param {string} chr The matched character to escape. * @returns {string} Returns the escaped character. */ - function escapeHtmlChar(chr) { - return htmlEscapes[chr]; - } - - /** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ - function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; - } + var escapeHtmlChar = basePropertyOf(htmlEscapes); /** - * Converts `iterator` to an array. + * Creates a unary function that invokes `func` with its argument transformed. * * @private - * @param {Object} iterator The iterator to convert. - * @returns {Array} Returns the converted array. + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. */ - function iteratorToArray(iterator) { - var data, - result = []; - - while (!(data = iterator.next()).done) { - result.push(data.value); - } - return result; + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; } /*--------------------------------------------------------------------------*/ @@ -283,25 +212,21 @@ /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ - var objectToString = objectProto.toString; + var nativeObjectToString = objectProto.toString; /** Used to restore the original `_` reference in `_.noConflict`. */ var oldDash = root._; /** Built-in value references. */ - var Reflect = root.Reflect, - Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - enumerate = Reflect ? Reflect.enumerate : undefined, - objectCreate = Object.create, + var objectCreate = Object.create, propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsFinite = root.isFinite, - nativeKeys = Object.keys, + nativeKeys = overArg(Object.keys, Object), nativeMax = Math.max; /*------------------------------------------------------------------------*/ @@ -372,28 +297,30 @@ * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `divide`, `each`, - * `eachRight`, `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`, - * `findIndex`, `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`, - * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, - * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, - * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, - * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`, - * `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`, - * `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`, - * `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, - * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`, - * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, - * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, - * `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, `min`, `minBy`, `multiply`, - * `noConflict`, `noop`, `now`, `nth`, `pad`, `padEnd`, `padStart`, `parseInt`, - * `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`, - * `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, - * `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, - * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toInteger`, - * `toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`, `toString`, - * `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, - * `uniqueId`, `upperCase`, `upperFirst`, `value`, and `words` + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` * * @name _ * @constructor @@ -427,6 +354,30 @@ : new LodashWrapper(value); } + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + /** * The base constructor for creating `lodash` wrapper objects. * @@ -465,7 +416,7 @@ /** * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private @@ -477,31 +428,32 @@ var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { - object[key] = value; + baseAssignValue(object, key, value); } } /** - * The base implementation of `_.create` without support for assigning - * properties to the created object. + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. * * @private - * @param {Object} prototype The object to inherit from. - * @returns {Object} Returns the new object. + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. */ - function baseCreate(proto) { - return isObject(proto) ? objectCreate(proto) : {}; + function baseAssignValue(object, key, value) { + object[key] = value; } /** - * The base implementation of `_.delay` and `_.defer` which accepts an array - * of `func` arguments. + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. * * @private * @param {Function} func The function to delay. * @param {number} wait The number of milliseconds to delay invocation. - * @param {Object} args The arguments to provide to `func`. - * @returns {number} Returns the timer id. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. */ function baseDelay(func, wait, args) { if (typeof func != 'function') { @@ -651,7 +603,7 @@ * @private * @param {Object} object The object to inspect. * @param {Array} props The property names to filter. - * @returns {Array} Returns the new array of filtered property names. + * @returns {Array} Returns the function names. */ function baseFunctions(object, props) { return baseFilter(props, function(key) { @@ -660,7 +612,18 @@ } /** - * The base implementation of `_.gt` which doesn't coerce arguments to numbers. + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + return objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. @@ -672,6 +635,26 @@ return value > other; } + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + var baseIsArguments = noop; + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. @@ -719,27 +702,31 @@ othTag = arrayTag; if (!objIsArr) { - objTag = objectToString.call(object); + objTag = baseGetTag(object); objTag = objTag == argsTag ? objectTag : objTag; } if (!othIsArr) { - othTag = objectToString.call(other); + othTag = baseGetTag(other); othTag = othTag == argsTag ? objectTag : othTag; } - var objIsObj = objTag == objectTag && !isHostObject(object), - othIsObj = othTag == objectTag && !isHostObject(other), + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, isSameTag = objTag == othTag; stack || (stack = []); - var stacked = find(stack, function(entry) { - return entry[0] === object; + var objStack = find(stack, function(entry) { + return entry[0] == object; + }); + var othStack = find(stack, function(entry) { + return entry[0] == other; }); - if (stacked && stacked[1]) { - return stacked[1] == other; + if (objStack && othStack) { + return objStack[1] == other; } stack.push([object, other]); + stack.push([other, object]); if (isSameTag && !objIsObj) { - var result = (objIsArr || isTypedArray(object)) + var result = (objIsArr) ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack); stack.pop(); @@ -766,6 +753,17 @@ return result; } + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + /** * The base implementation of `_.iteratee`. * @@ -784,44 +782,7 @@ } /** - * The base implementation of `_.keys` which doesn't skip the constructor - * property of prototypes or treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function baseKeys(object) { - return nativeKeys(Object(object)); - } - - /** - * The base implementation of `_.keysIn` which doesn't skip the constructor - * property of prototypes or treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function baseKeysIn(object) { - object = object == null ? object : Object(object); - - var result = []; - for (var key in object) { - result.push(key); - } - return result; - } - - // Fallback for IE < 9 with es6-shim. - if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) { - baseKeysIn = function(object) { - return iteratorToArray(enumerate(object)); - }; - } - - /** - * The base implementation of `_.lt` which doesn't coerce arguments to numbers. + * The base implementation of `_.lt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. @@ -856,10 +817,10 @@ * * @private * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseMatches(source) { - var props = keys(source); + var props = nativeKeys(source); return function(object) { var length = props.length; if (object == null) { @@ -898,16 +859,15 @@ } /** - * The base implementation of `_.property` without support for deep paths. + * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private - * @param {string} key The key of the property to get. + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. * @returns {Function} Returns the new function. */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); } /** @@ -1037,6 +997,7 @@ * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { + var isNew = !object; object || (object = {}); var index = -1, @@ -1047,9 +1008,16 @@ var newValue = customizer ? customizer(object[key], source[key], key, object, source) - : source[key]; + : undefined; - assignValue(object, key, newValue); + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } } return object; } @@ -1062,12 +1030,12 @@ * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { - return rest(function(object, sources) { + return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined; - customizer = typeof customizer == 'function' + customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; @@ -1143,10 +1111,10 @@ * @param {Function} Ctor The constructor to wrap. * @returns {Function} Returns the new wrapped function. */ - function createCtorWrapper(Ctor) { + function createCtor(Ctor) { return function() { // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; var thisBinding = baseCreate(Ctor.prototype), @@ -1158,25 +1126,44 @@ }; } + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + /** * Creates a function that wraps `func` to invoke it with the `this` binding * of `thisArg` and `partials` prepended to the arguments it receives. * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} thisArg The `this` binding of `func`. * @param {Array} partials The arguments to prepend to those provided to * the new function. * @returns {Function} Returns the new wrapped function. */ - function createPartialWrapper(func, bitmask, thisArg, partials) { + function createPartial(func, bitmask, thisArg, partials) { if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); + Ctor = createCtor(func); function wrapper() { var argsIndex = -1, @@ -1212,16 +1199,16 @@ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { - var index = -1, - isPartial = bitmask & PARTIAL_COMPARE_FLAG, - isUnordered = bitmask & UNORDERED_COMPARE_FLAG, + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } - var result = true; + var index = -1, + result = true, + seen = (bitmask & UNORDERED_COMPARE_FLAG) ? [] : undefined; // Ignore non-index properties. while (++index < arrLength) { @@ -1237,10 +1224,12 @@ break; } // Recursively compare arrays (susceptible to call stack limits). - if (isUnordered) { - if (!baseSome(other, function(othValue) { - return arrValue === othValue || - equalFunc(arrValue, othValue, customizer, bitmask, stack); + if (seen) { + if (!baseSome(other, function(othValue, othIndex) { + if (!indexOf(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + return seen.push(othIndex); + } })) { result = false; break; @@ -1279,22 +1268,18 @@ case boolTag: case dateTag: - // Coerce dates and booleans to numbers, dates to milliseconds and - // booleans to `1` or `0` treating invalid dates coerced to `NaN` as - // not equal. - return +object == +other; + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; - case numberTag: - // Treat `NaN` vs. `NaN` as equal. - return (object != +object) ? other != +other : object == +other; - case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); @@ -1368,74 +1353,96 @@ } /** - * Gets the "length" property value of `object`. + * A specialized version of `baseRest` which flattens the rest array. * - * **Note:** This function is used to avoid a - * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects - * Safari on at least iOS 8.1-8.3 ARM64. + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. * * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ - var getLength = baseProperty('length'); + function isFlattenable(value) { + return isArray(value) || isArguments(value); + } /** - * Creates an array of index keys for `object` values of arrays, - * `arguments` objects, and strings, otherwise `null` is returned. + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. * * @private * @param {Object} object The object to query. - * @returns {Array|null} Returns index keys, else `null`. + * @returns {Array} Returns the array of property names. */ - function indexKeys(object) { - var length = object ? object.length : undefined; - if (isLength(length) && - (isArray(object) || isString(object) || isArguments(object))) { - return baseTimes(length, String); + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } } - return null; + return result; } /** - * Checks if `value` is a flattenable `arguments` object or array. + * Converts `value` to a string using `Object.prototype.toString`. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. */ - function isFlattenable(value) { - return isArrayLikeObject(value) && (isArray(value) || isArguments(value)); + function objectToString(value) { + return nativeObjectToString.call(value); } /** - * Checks if `value` is a valid array-like index. + * A specialized version of `baseRest` which transforms the rest array. * * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. */ - function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return func.apply(this, otherArgs); + }; } /** - * Checks if `value` is likely a prototype object. + * Sets the `toString` method of `func` to return `string`. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. */ - function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; - } + var setToString = identity; /** * Converts `value` to a string key if it's not a string or symbol. @@ -1490,17 +1497,65 @@ * // => [1] */ function concat() { - var length = arguments.length, - array = castArray(arguments[0]); + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } - if (length < 2) { - return length ? copyArray(array) : []; + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; } - var args = Array(length - 1); - while (length--) { - args[length - 1] = arguments[length]; + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); } - return arrayConcat(array, baseFlatten(args, 1)); + return baseFindIndex(array, baseIteratee(predicate, 3), index); } /** @@ -1518,7 +1573,7 @@ * // => [1, 2, [3, [4]], 5] */ function flatten(array) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? baseFlatten(array, 1) : []; } @@ -1537,7 +1592,7 @@ * // => [1, 2, 3, 4, 5] */ function flattenDeep(array) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? baseFlatten(array, INFINITY) : []; } @@ -1565,7 +1620,7 @@ /** * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. If `fromIndex` is negative, it's used as the * offset from the end of `array`. * @@ -1573,7 +1628,7 @@ * @memberOf _ * @since 0.1.0 * @category Array - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. @@ -1587,7 +1642,7 @@ * // => 3 */ function indexOf(array, value, fromIndex) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (typeof fromIndex == 'number') { fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; } else { @@ -1620,7 +1675,7 @@ * // => 3 */ function last(array) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? array[length - 1] : undefined; } @@ -1641,7 +1696,7 @@ * @returns {Array} Returns the slice of `array`. */ function slice(array, start, end) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; start = start == null ? 0 : +start; end = end === undefined ? length : +end; return length ? baseSlice(array, start, end) : []; @@ -1795,13 +1850,17 @@ * Iteration is stopped once `predicate` returns falsey. The predicate is * invoked with three arguments: (value, index|key, collection). * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if all elements pass the predicate check, * else `false`. @@ -1837,13 +1896,14 @@ * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * + * **Note:** Unlike `_.remove`, this method returns a new array. + * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.reject * @example @@ -1881,9 +1941,9 @@ * @memberOf _ * @since 0.1.0 * @category Collection - * @param {Array|Object} collection The collection to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * @@ -1908,9 +1968,7 @@ * _.find(users, 'active'); * // => object for 'barney' */ - function find(collection, predicate) { - return baseFind(collection, baseIteratee(predicate), baseEach); - } + var find = createFind(findIndex); /** * Iterates over elements of `collection` and invokes `iteratee` for each element. @@ -1932,7 +1990,7 @@ * @see _.forEachRight * @example * - * _([1, 2]).forEach(function(value) { + * _.forEach([1, 2], function(value) { * console.log(value); * }); * // => Logs `1` then `2`. @@ -1965,8 +2023,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * @@ -2042,7 +2099,7 @@ * @memberOf _ * @since 0.1.0 * @category Collection - * @param {Array|Object} collection The collection to inspect. + * @param {Array|Object|string} collection The collection to inspect. * @returns {number} Returns the collection size. * @example * @@ -2059,7 +2116,7 @@ if (collection == null) { return 0; } - collection = isArrayLike(collection) ? collection : keys(collection); + collection = isArrayLike(collection) ? collection : nativeKeys(collection); return collection.length; } @@ -2073,8 +2130,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. @@ -2116,8 +2172,8 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [iteratees=[_.identity]] The iteratees to sort by. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. * @returns {Array} Returns the new sorted array. * @example * @@ -2128,16 +2184,11 @@ * { 'user': 'barney', 'age': 34 } * ]; * - * _.sortBy(users, function(o) { return o.user; }); + * _.sortBy(users, [function(o) { return o.user; }]); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] * * _.sortBy(users, ['user', 'age']); * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] - * - * _.sortBy(users, 'user', function(o) { - * return Math.floor(o.age / 10); - * }); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] */ function sortBy(collection, iteratee) { var index = 0; @@ -2167,7 +2218,7 @@ * @example * * jQuery(element).on('click', _.before(5, addContactToList)); - * // => allows adding up to 4 contacts to the list + * // => Allows adding up to 4 contacts to the list. */ function before(n, func) { var result; @@ -2193,7 +2244,7 @@ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for partially applied arguments. * - * **Note:** Unlike native `Function#bind` this method doesn't set the "length" + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" * property of bound functions. * * @static @@ -2206,9 +2257,9 @@ * @returns {Function} Returns the new bound function. * @example * - * var greet = function(greeting, punctuation) { + * function greet(greeting, punctuation) { * return greeting + ' ' + this.user + punctuation; - * }; + * } * * var object = { 'user': 'fred' }; * @@ -2221,8 +2272,8 @@ * bound('hi'); * // => 'hi fred!' */ - var bind = rest(function(func, thisArg, partials) { - return createPartialWrapper(func, BIND_FLAG | PARTIAL_FLAG, thisArg, partials); + var bind = baseRest(function(func, thisArg, partials) { + return createPartial(func, BIND_FLAG | PARTIAL_FLAG, thisArg, partials); }); /** @@ -2241,9 +2292,9 @@ * _.defer(function(text) { * console.log(text); * }, 'deferred'); - * // => Logs 'deferred' after one or more milliseconds. + * // => Logs 'deferred' after one millisecond. */ - var defer = rest(function(func, args) { + var defer = baseRest(function(func, args) { return baseDelay(func, 1, args); }); @@ -2266,7 +2317,7 @@ * }, 1000, 'later'); * // => Logs 'later' after one second. */ - var delay = rest(function(func, wait, args) { + var delay = baseRest(function(func, wait, args) { return baseDelay(func, toNumber(wait) || 0, args); }); @@ -2280,7 +2331,7 @@ * @since 3.0.0 * @category Function * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new negated function. * @example * * function isEven(n) { @@ -2295,7 +2346,8 @@ throw new TypeError(FUNC_ERROR_TEXT); } return function() { - return !predicate.apply(this, arguments); + var args = arguments; + return !predicate.apply(this, args); }; } @@ -2315,104 +2367,14 @@ * var initialize = _.once(createApplication); * initialize(); * initialize(); - * // `initialize` invokes `createApplication` once + * // => `createApplication` is invoked once */ function once(func) { return before(2, func); } - /** - * Creates a function that invokes `func` with the `this` binding of the - * created function and arguments from `start` and beyond provided as - * an array. - * - * **Note:** This method is based on the - * [rest parameter](https://mdn.io/rest_parameters). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Function - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.rest(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); - * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' - */ - function rest(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = array; - return func.apply(this, otherArgs); - }; - } - /*------------------------------------------------------------------------*/ - /** - * Casts `value` as an array if it's not one. - * - * @static - * @memberOf _ - * @since 4.4.0 - * @category Lang - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast array. - * @example - * - * _.castArray(1); - * // => [1] - * - * _.castArray({ 'a': 1 }); - * // => [{ 'a': 1 }] - * - * _.castArray('abc'); - * // => ['abc'] - * - * _.castArray(null); - * // => [null] - * - * _.castArray(undefined); - * // => [undefined] - * - * _.castArray(); - * // => [] - * - * var array = [1, 2, 3]; - * console.log(_.castArray(array) === array); - * // => true - */ - function castArray() { - if (!arguments.length) { - return []; - } - var value = arguments[0]; - return isArray(value) ? value : [value]; - } - /** * Creates a shallow clone of `value`. * @@ -2443,12 +2405,12 @@ if (!isObject(value)) { return value; } - return isArray(value) ? copyArray(value) : copyObject(value, keys(value)); + return isArray(value) ? copyArray(value) : copyObject(value, nativeKeys(value)); } /** * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static @@ -2460,8 +2422,8 @@ * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.eq(object, object); * // => true @@ -2490,7 +2452,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, + * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * @@ -2500,11 +2462,10 @@ * _.isArguments([1, 2, 3]); * // => false */ - function isArguments(value) { - // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); - } + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; /** * Checks if `value` is classified as an `Array` object. @@ -2512,11 +2473,9 @@ * @static * @memberOf _ * @since 0.1.0 - * @type {Function} * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); @@ -2559,36 +2518,7 @@ * // => false */ function isArrayLike(value) { - return value != null && isLength(getLength(value)) && !isFunction(value); - } - - /** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ - function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); + return value != null && isLength(value.length) && !isFunction(value); } /** @@ -2599,8 +2529,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. * @example * * _.isBoolean(false); @@ -2611,7 +2540,7 @@ */ function isBoolean(value) { return value === true || value === false || - (isObjectLike(value) && objectToString.call(value) == boolTag); + (isObjectLike(value) && baseGetTag(value) == boolTag); } /** @@ -2622,8 +2551,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. * @example * * _.isDate(new Date); @@ -2632,9 +2560,7 @@ * _.isDate('Mon April 23 2012'); * // => false */ - function isDate(value) { - return isObjectLike(value) && objectToString.call(value) == dateTag; - } + var isDate = baseIsDate; /** * Checks if `value` is an empty object, collection, map, or set. @@ -2675,7 +2601,7 @@ isFunction(value.splice) || isArguments(value))) { return !value.length; } - return !keys(value).length; + return !nativeKeys(value).length; } /** @@ -2694,12 +2620,11 @@ * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, - * else `false`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.isEqual(object, other); * // => true @@ -2722,21 +2647,20 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. * @example * * _.isFinite(3); * // => true * - * _.isFinite(Number.MAX_VALUE); - * // => true - * - * _.isFinite(3.14); + * _.isFinite(Number.MIN_VALUE); * // => true * * _.isFinite(Infinity); * // => false + * + * _.isFinite('3'); + * // => false */ function isFinite(value) { return typeof value == 'number' && nativeIsFinite(value); @@ -2750,8 +2674,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); @@ -2761,26 +2684,27 @@ * // => false */ function isFunction(value) { + if (!isObject(value)) { + return false; + } // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); @@ -2802,7 +2726,7 @@ /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -2827,7 +2751,7 @@ */ function isObject(value) { var type = typeof value; - return !!value && (type == 'object' || type == 'function'); + return value != null && (type == 'object' || type == 'function'); } /** @@ -2855,7 +2779,7 @@ * // => false */ function isObjectLike(value) { - return !!value && typeof value == 'object'; + return value != null && typeof value == 'object'; } /** @@ -2925,8 +2849,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. * @example * * _.isNumber(3); @@ -2943,7 +2866,7 @@ */ function isNumber(value) { return typeof value == 'number' || - (isObjectLike(value) && objectToString.call(value) == numberTag); + (isObjectLike(value) && baseGetTag(value) == numberTag); } /** @@ -2954,8 +2877,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. * @example * * _.isRegExp(/abc/); @@ -2964,9 +2886,7 @@ * _.isRegExp('/abc/'); * // => false */ - function isRegExp(value) { - return isObject(value) && objectToString.call(value) == regexpTag; - } + var isRegExp = baseIsRegExp; /** * Checks if `value` is classified as a `String` primitive or object. @@ -2976,8 +2896,7 @@ * @memberOf _ * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. * @example * * _.isString('abc'); @@ -2988,7 +2907,7 @@ */ function isString(value) { return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); } /** @@ -3045,8 +2964,8 @@ /** * Converts `value` to an integer. * - * **Note:** This function is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ @@ -3056,7 +2975,7 @@ * @returns {number} Returns the converted integer. * @example * - * _.toInteger(3); + * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); @@ -3065,7 +2984,7 @@ * _.toInteger(Infinity); * // => 1.7976931348623157e+308 * - * _.toInteger('3'); + * _.toInteger('3.2'); * // => 3 */ var toInteger = Number; @@ -3081,8 +3000,8 @@ * @returns {number} Returns the number. * @example * - * _.toNumber(3); - * // => 3 + * _.toNumber(3.2); + * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 @@ -3090,8 +3009,8 @@ * _.toNumber(Infinity); * // => Infinity * - * _.toNumber('3'); - * // => 3 + * _.toNumber('3.2'); + * // => 3.2 */ var toNumber = Number; @@ -3103,8 +3022,8 @@ * @memberOf _ * @since 4.0.0 * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. * @example * * _.toString(null); @@ -3144,21 +3063,21 @@ * @example * * function Foo() { - * this.c = 3; + * this.a = 1; * } * * function Bar() { - * this.e = 5; + * this.c = 3; * } * - * Foo.prototype.d = 4; - * Bar.prototype.f = 6; + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; * - * _.assign({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3, 'e': 5 } + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } */ var assign = createAssigner(function(object, source) { - copyObject(source, keys(source), object); + copyObject(source, nativeKeys(source), object); }); /** @@ -3179,21 +3098,21 @@ * @example * * function Foo() { - * this.b = 2; + * this.a = 1; * } * * function Bar() { - * this.d = 4; + * this.c = 3; * } * - * Foo.prototype.c = 3; - * Bar.prototype.e = 5; + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; * - * _.assignIn({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 } + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } */ var assignIn = createAssigner(function(object, source) { - copyObject(source, keysIn(source), object); + copyObject(source, nativeKeysIn(source), object); }); /** @@ -3265,7 +3184,7 @@ */ function create(prototype, properties) { var result = baseCreate(prototype); - return properties ? assign(result, properties) : result; + return properties == null ? result : assign(result, properties); } /** @@ -3286,10 +3205,10 @@ * @see _.defaultsDeep * @example * - * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } */ - var defaults = rest(function(args) { + var defaults = baseRest(function(args) { args.push(undefined, assignInDefaults); return assignInWith.apply(undefined, args); }); @@ -3329,7 +3248,7 @@ * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static @@ -3353,25 +3272,7 @@ * _.keys('hi'); * // => ['0', '1'] */ - function keys(object) { - var isProto = isPrototype(object); - if (!(isProto || isArrayLike(object))) { - return baseKeys(object); - } - var indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; - - for (var key in object) { - if (hasOwnProperty.call(object, key) && - !(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(isProto && key == 'constructor')) { - result.push(key); - } - } - return result; - } + var keys = nativeKeys; /** * Creates an array of the own and inherited enumerable property names of `object`. @@ -3396,25 +3297,7 @@ * _.keysIn(new Foo); * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ - function keysIn(object) { - var index = -1, - isProto = isPrototype(object), - props = baseKeysIn(object), - propsLength = props.length, - indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; - - while (++index < propsLength) { - var key = props[index]; - if (!(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; - } + var keysIn = nativeKeysIn; /** * Creates an object composed of the picked `object` properties. @@ -3433,8 +3316,8 @@ * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ - var pick = rest(function(object, props) { - return object == null ? {} : basePick(object, baseMap(baseFlatten(props, 1), toKey)); + var pick = flatRest(function(object, props) { + return object == null ? {} : basePick(object, baseMap(props, toKey)); }); /** @@ -3501,14 +3384,14 @@ * // => ['h', 'i'] */ function values(object) { - return object ? baseValues(object, keys(object)) : []; + return object == null ? [] : baseValues(object, keys(object)); } /*------------------------------------------------------------------------*/ /** - * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to - * their corresponding HTML entities. + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. * * **Note:** No other characters are escaped. To escape additional * characters use a third-party library like [_he_](https://mths.be/he). @@ -3519,12 +3402,6 @@ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) * (under "semi-related fun fact") for more details. * - * Backticks are escaped because in IE < 9, they can break out of - * attribute values or HTML comments. See [#59](https://html5sec.org/#59), - * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and - * [#133](https://html5sec.org/#133) of the - * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details. - * * When working with HTML you should always * [quote attribute values](http://wonko.com/post/html-escaping) to reduce * XSS vectors. @@ -3550,7 +3427,7 @@ /*------------------------------------------------------------------------*/ /** - * This method returns the first argument given to it. + * This method returns the first argument it receives. * * @static * @since 0.1.0 @@ -3560,9 +3437,9 @@ * @returns {*} Returns `value`. * @example * - * var object = { 'user': 'fred' }; + * var object = { 'a': 1 }; * - * _.identity(object) === object; + * console.log(_.identity(object) === object); * // => true */ function identity(value) { @@ -3616,26 +3493,30 @@ /** * Creates a function that performs a partial deep comparison between a given * object and `source`, returning `true` if the given object has equivalent - * property values, else `false`. The created function is equivalent to - * `_.isMatch` with a `source` partially applied. + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. * - * **Note:** This method supports comparing the same values as `_.isEqual`. + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. * * @static * @memberOf _ * @since 3.0.0 * @category Util * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } * ]; * - * _.filter(users, _.matches({ 'age': 40, 'active': false })); - * // => [{ 'user': 'fred', 'age': 40, 'active': false }] + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] */ function matches(source) { return baseMatches(assign({}, source)); @@ -3734,8 +3615,7 @@ } /** - * A no-operation function that returns `undefined` regardless of the - * arguments it receives. + * This method returns `undefined`. * * @static * @memberOf _ @@ -3743,10 +3623,8 @@ * @category Util * @example * - * var object = { 'user': 'fred' }; - * - * _.noop(object) === undefined; - * // => true + * _.times(2, _.noop); + * // => [undefined, undefined] */ function noop() { // No operation performed. @@ -3947,27 +3825,24 @@ /*--------------------------------------------------------------------------*/ - // Expose Lodash on the free variable `window` or `self` when available so it's - // globally accessible, even when bundled with Browserify, Webpack, etc. This - // also prevents errors in cases where Lodash is loaded by a script tag in the - // presence of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch - // for more details. Use `_.noConflict` to remove Lodash from the global object. - (freeWindow || freeSelf || {})._ = lodash; - - // Some AMD build optimizers like r.js check for condition patterns like the following: + // Some AMD build optimizers, like r.js, check for condition patterns like: if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = lodash; + // Define as an anonymous module so, through path mapping, it can be // referenced as the "underscore" module. define(function() { return lodash; }); } - // Check for `exports` after `define` in case a build optimizer adds an `exports` object. - else if (freeExports && freeModule) { + // Check for `exports` after `define` in case a build optimizer adds it. + else if (freeModule) { // Export for Node.js. - if (moduleExports) { - (freeModule.exports = lodash)._ = lodash; - } + (freeModule.exports = lodash)._ = lodash; // Export for CommonJS support. freeExports._ = lodash; } diff --git a/node_modules/globule/node_modules/lodash/core.min.js b/node_modules/globule/node_modules/lodash/core.min.js new file mode 100644 index 0000000..632c523 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/core.min.js @@ -0,0 +1,29 @@ +/** + * @license + * lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + * Build: `lodash core -o ./dist/lodash.core.js` + */ +;(function(){function n(n){return K(n)&&pn.call(n,"callee")&&!bn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?nn:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return d(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r,e){return n===nn||M(n,ln[r])&&!pn.call(e,r)?t:n}function f(n,t,r){ +if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(nn,r)},t)}function a(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function l(n,t,r){for(var e=-1,u=n.length;++et}function b(n,t,r,e,u){return n===t||(null==n||null==t||!H(n)&&!K(t)?n!==n&&t!==t:g(n,t,b,r,e,u))}function g(n,t,r,e,u,o){var i=Sn(n),c=Sn(t),f="[object Array]",a="[object Array]";i||(f=hn.call(n),f="[object Arguments]"==f?"[object Object]":f),c||(a=hn.call(t),a="[object Arguments]"==a?"[object Object]":a);var l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]); +var p=En(o,function(t){return t[0]==n}),s=En(o,function(n){return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=B(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=M(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 2&u||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=R(n,t,r,e,u,o), +o.pop(),r):(i=i?n.value():n,f=f?t.value():t,r=r(i,f,e,u,o),o.pop(),r)}function _(n){return typeof n=="function"?n:null==n?Y:(typeof n=="object"?m:r)(n)}function j(n,t){return nt&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++ei))return false;for(var c=-1,f=true,a=1&u?[]:nn;++cr?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++rarguments.length,mn); +}function J(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=nn),r}}function M(n,t){return n===t||n!==n&&t!==t}function U(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1=t),t&&!V(n)}function V(n){return!!H(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function H(n){var t=typeof n; +return null!=n&&("object"==t||"function"==t)}function K(n){return null!=n&&typeof n=="object"}function L(n){return typeof n=="number"||K(n)&&"[object Number]"==hn.call(n)}function Q(n){return typeof n=="string"||!Sn(n)&&K(n)&&"[object String]"==hn.call(n)}function W(n){return typeof n=="string"?n:null==n?"":n+""}function X(n){return null==n?[]:u(n,qn(n))}function Y(n){return n}function Z(n,r,e){var u=qn(r),o=v(r,u);null!=e||H(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=v(r,qn(r)));var i=!(H(e)&&"chain"in e&&!e.chain),c=V(n); +return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=E(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var nn,tn=1/0,rn=/[&<>"']/g,en=RegExp(rn.source),un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){ +return function(t){return null==n?nn:n[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,yn=Object.create,bn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return H(t)?yn?yn(t):(n.prototype=t,t=new n,n.prototype=nn,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i; +var mn=function(n,t){return function(r,e){if(null==r)return r;if(!U(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++or&&(r=jn(e+r,0));n:{for(t=_(t),e=n.length,r+=-1;++re||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r { '4': 1, '6': 2 } * + * // The `_.property` iteratee shorthand. * _.countBy(['one', 'two', 'three'], 'length'); * // => { '3': 2, '5': 1 } */ var countBy = createAggregator(function(result, value, key) { - hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1); + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } }); module.exports = countBy; diff --git a/node_modules/lodash/package/create.js b/node_modules/globule/node_modules/lodash/create.js similarity index 93% rename from node_modules/lodash/package/create.js rename to node_modules/globule/node_modules/lodash/create.js index a99067f..919edb8 100644 --- a/node_modules/lodash/package/create.js +++ b/node_modules/globule/node_modules/lodash/create.js @@ -37,7 +37,7 @@ var baseAssign = require('./_baseAssign'), */ function create(prototype, properties) { var result = baseCreate(prototype); - return properties ? baseAssign(result, properties) : result; + return properties == null ? result : baseAssign(result, properties); } module.exports = create; diff --git a/node_modules/lodash/package/curry.js b/node_modules/globule/node_modules/lodash/curry.js similarity index 87% rename from node_modules/lodash/package/curry.js rename to node_modules/globule/node_modules/lodash/curry.js index 2f85624..ce3910b 100644 --- a/node_modules/lodash/package/curry.js +++ b/node_modules/globule/node_modules/lodash/curry.js @@ -1,6 +1,6 @@ -var createWrapper = require('./_createWrapper'); +var createWrap = require('./_createWrap'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var CURRY_FLAG = 8; /** @@ -46,7 +46,7 @@ var CURRY_FLAG = 8; */ function curry(func, arity, guard) { arity = guard ? undefined : arity; - var result = createWrapper(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + var result = createWrap(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); result.placeholder = curry.placeholder; return result; } diff --git a/node_modules/lodash/package/curryRight.js b/node_modules/globule/node_modules/lodash/curryRight.js similarity index 85% rename from node_modules/lodash/package/curryRight.js rename to node_modules/globule/node_modules/lodash/curryRight.js index d00bfad..2b7691f 100644 --- a/node_modules/lodash/package/curryRight.js +++ b/node_modules/globule/node_modules/lodash/curryRight.js @@ -1,6 +1,6 @@ -var createWrapper = require('./_createWrapper'); +var createWrap = require('./_createWrap'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var CURRY_RIGHT_FLAG = 16; /** @@ -43,7 +43,7 @@ var CURRY_RIGHT_FLAG = 16; */ function curryRight(func, arity, guard) { arity = guard ? undefined : arity; - var result = createWrapper(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + var result = createWrap(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); result.placeholder = curryRight.placeholder; return result; } diff --git a/node_modules/lodash/package/date.js b/node_modules/globule/node_modules/lodash/date.js similarity index 100% rename from node_modules/lodash/package/date.js rename to node_modules/globule/node_modules/lodash/date.js diff --git a/node_modules/lodash/package/debounce.js b/node_modules/globule/node_modules/lodash/debounce.js similarity index 87% rename from node_modules/lodash/package/debounce.js rename to node_modules/globule/node_modules/lodash/debounce.js index 0fcd6e6..04d7dfd 100644 --- a/node_modules/lodash/package/debounce.js +++ b/node_modules/globule/node_modules/lodash/debounce.js @@ -2,7 +2,7 @@ var isObject = require('./isObject'), now = require('./now'), toNumber = require('./toNumber'); -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /* Built-in method references for those with the same name as other `lodash` methods. */ @@ -14,14 +14,18 @@ var nativeMax = Math.max, * milliseconds have elapsed since the last time the debounced function was * invoked. The debounced function comes with a `cancel` method to cancel * delayed `func` invocations and a `flush` method to immediately invoke them. - * Provide an options object to indicate whether `func` should be invoked on - * the leading and/or trailing edge of the `wait` timeout. The `func` is invoked - * with the last arguments provided to the debounced function. Subsequent calls - * to the debounced function return the result of the last `func` invocation. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. * - * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the debounced function is - * invoked more than once during the `wait` timeout. + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.debounce` and `_.throttle`. @@ -65,7 +69,7 @@ function debounce(func, wait, options) { maxWait, result, timerId, - lastCallTime = 0, + lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, @@ -116,7 +120,7 @@ function debounce(func, wait, options) { // Either this is the first call, activity has stopped and we're at the // trailing edge, the system time has gone backwards and we're treating // it as the trailing edge, or we've hit the `maxWait` limit. - return (!lastCallTime || (timeSinceLastCall >= wait) || + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); } @@ -130,7 +134,6 @@ function debounce(func, wait, options) { } function trailingEdge(time) { - clearTimeout(timerId); timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has been @@ -146,8 +149,8 @@ function debounce(func, wait, options) { if (timerId !== undefined) { clearTimeout(timerId); } - lastCallTime = lastInvokeTime = 0; - lastArgs = lastThis = timerId = undefined; + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; } function flush() { @@ -168,7 +171,6 @@ function debounce(func, wait, options) { } if (maxing) { // Handle invocations in a tight loop. - clearTimeout(timerId); timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } diff --git a/node_modules/lodash/package/deburr.js b/node_modules/globule/node_modules/lodash/deburr.js similarity index 70% rename from node_modules/lodash/package/deburr.js rename to node_modules/globule/node_modules/lodash/deburr.js index 6862072..bc08b05 100644 --- a/node_modules/lodash/package/deburr.js +++ b/node_modules/globule/node_modules/lodash/deburr.js @@ -1,8 +1,8 @@ var deburrLetter = require('./_deburrLetter'), toString = require('./toString'); -/** Used to match latin-1 supplementary letters (excluding mathematical operators). */ -var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g; +/** Used to match Latin Unicode letters (excluding mathematical operators). */ +var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; /** Used to compose unicode character classes. */ var rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', @@ -19,8 +19,9 @@ var reComboMark = RegExp(rsCombo, 'g'); /** * Deburrs `string` by converting - * [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) - * to basic latin letters and removing + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). * * @static @@ -36,7 +37,7 @@ var reComboMark = RegExp(rsCombo, 'g'); */ function deburr(string) { string = toString(string); - return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, ''); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); } module.exports = deburr; diff --git a/node_modules/globule/node_modules/lodash/defaultTo.js b/node_modules/globule/node_modules/lodash/defaultTo.js new file mode 100644 index 0000000..5b33359 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/defaultTo.js @@ -0,0 +1,25 @@ +/** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ +function defaultTo(value, defaultValue) { + return (value == null || value !== value) ? defaultValue : value; +} + +module.exports = defaultTo; diff --git a/node_modules/lodash/package/defaults.js b/node_modules/globule/node_modules/lodash/defaults.js similarity index 82% rename from node_modules/lodash/package/defaults.js rename to node_modules/globule/node_modules/lodash/defaults.js index 099d2e9..5333b42 100644 --- a/node_modules/lodash/package/defaults.js +++ b/node_modules/globule/node_modules/lodash/defaults.js @@ -1,7 +1,7 @@ var apply = require('./_apply'), assignInDefaults = require('./_assignInDefaults'), assignInWith = require('./assignInWith'), - rest = require('./rest'); + baseRest = require('./_baseRest'); /** * Assigns own and inherited enumerable string keyed properties of source @@ -21,10 +21,10 @@ var apply = require('./_apply'), * @see _.defaultsDeep * @example * - * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } */ -var defaults = rest(function(args) { +var defaults = baseRest(function(args) { args.push(undefined, assignInDefaults); return apply(assignInWith, undefined, args); }); diff --git a/node_modules/lodash/package/defaultsDeep.js b/node_modules/globule/node_modules/lodash/defaultsDeep.js similarity index 69% rename from node_modules/lodash/package/defaultsDeep.js rename to node_modules/globule/node_modules/lodash/defaultsDeep.js index b6447f7..41680ed 100644 --- a/node_modules/lodash/package/defaultsDeep.js +++ b/node_modules/globule/node_modules/lodash/defaultsDeep.js @@ -1,7 +1,7 @@ var apply = require('./_apply'), + baseRest = require('./_baseRest'), mergeDefaults = require('./_mergeDefaults'), - mergeWith = require('./mergeWith'), - rest = require('./rest'); + mergeWith = require('./mergeWith'); /** * This method is like `_.defaults` except that it recursively assigns @@ -19,11 +19,10 @@ var apply = require('./_apply'), * @see _.defaults * @example * - * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } }); - * // => { 'user': { 'name': 'barney', 'age': 36 } } - * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } */ -var defaultsDeep = rest(function(args) { +var defaultsDeep = baseRest(function(args) { args.push(undefined, mergeDefaults); return apply(mergeWith, undefined, args); }); diff --git a/node_modules/lodash/package/defer.js b/node_modules/globule/node_modules/lodash/defer.js similarity index 81% rename from node_modules/lodash/package/defer.js rename to node_modules/globule/node_modules/lodash/defer.js index b096f71..f6d6c6f 100644 --- a/node_modules/lodash/package/defer.js +++ b/node_modules/globule/node_modules/lodash/defer.js @@ -1,5 +1,5 @@ var baseDelay = require('./_baseDelay'), - rest = require('./rest'); + baseRest = require('./_baseRest'); /** * Defers invoking the `func` until the current call stack has cleared. Any @@ -17,9 +17,9 @@ var baseDelay = require('./_baseDelay'), * _.defer(function(text) { * console.log(text); * }, 'deferred'); - * // => Logs 'deferred' after one or more milliseconds. + * // => Logs 'deferred' after one millisecond. */ -var defer = rest(function(func, args) { +var defer = baseRest(function(func, args) { return baseDelay(func, 1, args); }); diff --git a/node_modules/lodash/package/delay.js b/node_modules/globule/node_modules/lodash/delay.js similarity index 88% rename from node_modules/lodash/package/delay.js rename to node_modules/globule/node_modules/lodash/delay.js index cac90a9..bd55479 100644 --- a/node_modules/lodash/package/delay.js +++ b/node_modules/globule/node_modules/lodash/delay.js @@ -1,5 +1,5 @@ var baseDelay = require('./_baseDelay'), - rest = require('./rest'), + baseRest = require('./_baseRest'), toNumber = require('./toNumber'); /** @@ -21,7 +21,7 @@ var baseDelay = require('./_baseDelay'), * }, 1000, 'later'); * // => Logs 'later' after one second. */ -var delay = rest(function(func, wait, args) { +var delay = baseRest(function(func, wait, args) { return baseDelay(func, toNumber(wait) || 0, args); }); diff --git a/node_modules/globule/node_modules/lodash/difference.js b/node_modules/globule/node_modules/lodash/difference.js new file mode 100644 index 0000000..fa28bb3 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/difference.js @@ -0,0 +1,33 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'); + +/** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ +var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; +}); + +module.exports = difference; diff --git a/node_modules/lodash/package/differenceBy.js b/node_modules/globule/node_modules/lodash/differenceBy.js similarity index 64% rename from node_modules/lodash/package/differenceBy.js rename to node_modules/globule/node_modules/lodash/differenceBy.js index 7ec2ae8..2cd63e7 100644 --- a/node_modules/lodash/package/differenceBy.js +++ b/node_modules/globule/node_modules/lodash/differenceBy.js @@ -1,15 +1,18 @@ var baseDifference = require('./_baseDifference'), baseFlatten = require('./_baseFlatten'), baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.difference` except that it accepts `iteratee` which * is invoked for each element of `array` and `values` to generate the criterion - * by which they're compared. Result values are chosen from the first array. - * The iteratee is invoked with one argument: (value). + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. * * @static * @memberOf _ @@ -17,25 +20,24 @@ var baseDifference = require('./_baseDifference'), * @category Array * @param {Array} array The array to inspect. * @param {...Array} [values] The values to exclude. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of filtered values. * @example * - * _.differenceBy([3.1, 2.2, 1.3], [4.4, 2.5], Math.floor); - * // => [3.1, 1.3] + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] * * // The `_.property` iteratee shorthand. * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); * // => [{ 'x': 2 }] */ -var differenceBy = rest(function(array, values) { +var differenceBy = baseRest(function(array, values) { var iteratee = last(values); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee)) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2)) : []; }); diff --git a/node_modules/lodash/package/differenceWith.js b/node_modules/globule/node_modules/lodash/differenceWith.js similarity index 75% rename from node_modules/lodash/package/differenceWith.js rename to node_modules/globule/node_modules/lodash/differenceWith.js index 6ae8986..c0233f4 100644 --- a/node_modules/lodash/package/differenceWith.js +++ b/node_modules/globule/node_modules/lodash/differenceWith.js @@ -1,14 +1,16 @@ var baseDifference = require('./_baseDifference'), baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.difference` except that it accepts `comparator` - * which is invoked to compare elements of `array` to `values`. Result values - * are chosen from the first array. The comparator is invoked with two arguments: - * (arrVal, othVal). + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. * * @static * @memberOf _ @@ -25,7 +27,7 @@ var baseDifference = require('./_baseDifference'), * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); * // => [{ 'x': 2, 'y': 1 }] */ -var differenceWith = rest(function(array, values) { +var differenceWith = baseRest(function(array, values) { var comparator = last(values); if (isArrayLikeObject(comparator)) { comparator = undefined; diff --git a/node_modules/lodash/package/divide.js b/node_modules/globule/node_modules/lodash/divide.js similarity index 98% rename from node_modules/lodash/package/divide.js rename to node_modules/globule/node_modules/lodash/divide.js index 2889d79..8cae0cd 100644 --- a/node_modules/lodash/package/divide.js +++ b/node_modules/globule/node_modules/lodash/divide.js @@ -17,6 +17,6 @@ var createMathOperation = require('./_createMathOperation'); */ var divide = createMathOperation(function(dividend, divisor) { return dividend / divisor; -}); +}, 1); module.exports = divide; diff --git a/node_modules/lodash/package/drop.js b/node_modules/globule/node_modules/lodash/drop.js similarity index 94% rename from node_modules/lodash/package/drop.js rename to node_modules/globule/node_modules/lodash/drop.js index 6124ef7..d5c3cba 100644 --- a/node_modules/lodash/package/drop.js +++ b/node_modules/globule/node_modules/lodash/drop.js @@ -27,7 +27,7 @@ var baseSlice = require('./_baseSlice'), * // => [1, 2, 3] */ function drop(array, n, guard) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } diff --git a/node_modules/lodash/package/dropRight.js b/node_modules/globule/node_modules/lodash/dropRight.js similarity index 94% rename from node_modules/lodash/package/dropRight.js rename to node_modules/globule/node_modules/lodash/dropRight.js index 8aa3576..441fe99 100644 --- a/node_modules/lodash/package/dropRight.js +++ b/node_modules/globule/node_modules/lodash/dropRight.js @@ -27,7 +27,7 @@ var baseSlice = require('./_baseSlice'), * // => [1, 2, 3] */ function dropRight(array, n, guard) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } diff --git a/node_modules/lodash/package/dropRightWhile.js b/node_modules/globule/node_modules/lodash/dropRightWhile.js similarity index 92% rename from node_modules/lodash/package/dropRightWhile.js rename to node_modules/globule/node_modules/lodash/dropRightWhile.js index 98f457b..9ad36a0 100644 --- a/node_modules/lodash/package/dropRightWhile.js +++ b/node_modules/globule/node_modules/lodash/dropRightWhile.js @@ -11,8 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * diff --git a/node_modules/lodash/package/dropWhile.js b/node_modules/globule/node_modules/lodash/dropWhile.js similarity index 92% rename from node_modules/lodash/package/dropWhile.js rename to node_modules/globule/node_modules/lodash/dropWhile.js index 94f76e0..903ef56 100644 --- a/node_modules/lodash/package/dropWhile.js +++ b/node_modules/globule/node_modules/lodash/dropWhile.js @@ -11,8 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * diff --git a/node_modules/lodash/package/each.js b/node_modules/globule/node_modules/lodash/each.js similarity index 100% rename from node_modules/lodash/package/each.js rename to node_modules/globule/node_modules/lodash/each.js diff --git a/node_modules/lodash/package/eachRight.js b/node_modules/globule/node_modules/lodash/eachRight.js similarity index 100% rename from node_modules/lodash/package/eachRight.js rename to node_modules/globule/node_modules/lodash/eachRight.js diff --git a/node_modules/lodash/package/endsWith.js b/node_modules/globule/node_modules/lodash/endsWith.js similarity index 86% rename from node_modules/lodash/package/endsWith.js rename to node_modules/globule/node_modules/lodash/endsWith.js index f143f6e..76fc866 100644 --- a/node_modules/lodash/package/endsWith.js +++ b/node_modules/globule/node_modules/lodash/endsWith.js @@ -10,9 +10,9 @@ var baseClamp = require('./_baseClamp'), * @memberOf _ * @since 3.0.0 * @category String - * @param {string} [string=''] The string to search. + * @param {string} [string=''] The string to inspect. * @param {string} [target] The string to search for. - * @param {number} [position=string.length] The position to search from. + * @param {number} [position=string.length] The position to search up to. * @returns {boolean} Returns `true` if `string` ends with `target`, * else `false`. * @example @@ -35,8 +35,9 @@ function endsWith(string, target, position) { ? length : baseClamp(toInteger(position), 0, length); + var end = position; position -= target.length; - return position >= 0 && string.indexOf(target, position) == position; + return position >= 0 && string.slice(position, end) == target; } module.exports = endsWith; diff --git a/node_modules/lodash/package/entries.js b/node_modules/globule/node_modules/lodash/entries.js similarity index 100% rename from node_modules/lodash/package/entries.js rename to node_modules/globule/node_modules/lodash/entries.js diff --git a/node_modules/lodash/package/entriesIn.js b/node_modules/globule/node_modules/lodash/entriesIn.js similarity index 100% rename from node_modules/lodash/package/entriesIn.js rename to node_modules/globule/node_modules/lodash/entriesIn.js diff --git a/node_modules/lodash/package/eq.js b/node_modules/globule/node_modules/lodash/eq.js similarity index 83% rename from node_modules/lodash/package/eq.js rename to node_modules/globule/node_modules/lodash/eq.js index e9445d4..a940688 100644 --- a/node_modules/lodash/package/eq.js +++ b/node_modules/globule/node_modules/lodash/eq.js @@ -1,6 +1,6 @@ /** * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static @@ -12,8 +12,8 @@ * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.eq(object, object); * // => true diff --git a/node_modules/lodash/package/escape.js b/node_modules/globule/node_modules/lodash/escape.js similarity index 72% rename from node_modules/lodash/package/escape.js rename to node_modules/globule/node_modules/lodash/escape.js index 176417c..9247e00 100644 --- a/node_modules/lodash/package/escape.js +++ b/node_modules/globule/node_modules/lodash/escape.js @@ -2,12 +2,12 @@ var escapeHtmlChar = require('./_escapeHtmlChar'), toString = require('./toString'); /** Used to match HTML entities and HTML characters. */ -var reUnescapedHtml = /[&<>"'`]/g, +var reUnescapedHtml = /[&<>"']/g, reHasUnescapedHtml = RegExp(reUnescapedHtml.source); /** - * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to - * their corresponding HTML entities. + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. * * **Note:** No other characters are escaped. To escape additional * characters use a third-party library like [_he_](https://mths.be/he). @@ -18,12 +18,6 @@ var reUnescapedHtml = /[&<>"'`]/g, * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) * (under "semi-related fun fact") for more details. * - * Backticks are escaped because in IE < 9, they can break out of - * attribute values or HTML comments. See [#59](https://html5sec.org/#59), - * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and - * [#133](https://html5sec.org/#133) of the - * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details. - * * When working with HTML you should always * [quote attribute values](http://wonko.com/post/html-escaping) to reduce * XSS vectors. diff --git a/node_modules/lodash/package/escapeRegExp.js b/node_modules/globule/node_modules/lodash/escapeRegExp.js similarity index 92% rename from node_modules/lodash/package/escapeRegExp.js rename to node_modules/globule/node_modules/lodash/escapeRegExp.js index fe51960..0a58c69 100644 --- a/node_modules/lodash/package/escapeRegExp.js +++ b/node_modules/globule/node_modules/lodash/escapeRegExp.js @@ -2,7 +2,7 @@ var toString = require('./toString'); /** * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source); diff --git a/node_modules/lodash/package/every.js b/node_modules/globule/node_modules/lodash/every.js similarity index 83% rename from node_modules/lodash/package/every.js rename to node_modules/globule/node_modules/lodash/every.js index 14f68e7..25080da 100644 --- a/node_modules/lodash/package/every.js +++ b/node_modules/globule/node_modules/lodash/every.js @@ -9,13 +9,17 @@ var arrayEvery = require('./_arrayEvery'), * Iteration is stopped once `predicate` returns falsey. The predicate is * invoked with three arguments: (value, index|key, collection). * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if all elements pass the predicate check, * else `false`. diff --git a/node_modules/lodash/package/extend.js b/node_modules/globule/node_modules/lodash/extend.js similarity index 100% rename from node_modules/lodash/package/extend.js rename to node_modules/globule/node_modules/lodash/extend.js diff --git a/node_modules/lodash/package/extendWith.js b/node_modules/globule/node_modules/lodash/extendWith.js similarity index 100% rename from node_modules/lodash/package/extendWith.js rename to node_modules/globule/node_modules/lodash/extendWith.js diff --git a/node_modules/lodash/package/fill.js b/node_modules/globule/node_modules/lodash/fill.js similarity index 95% rename from node_modules/lodash/package/fill.js rename to node_modules/globule/node_modules/lodash/fill.js index 5730b7d..ae13aa1 100644 --- a/node_modules/lodash/package/fill.js +++ b/node_modules/globule/node_modules/lodash/fill.js @@ -31,7 +31,7 @@ var baseFill = require('./_baseFill'), * // => [4, '*', '*', 10] */ function fill(array, value, start, end) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } diff --git a/node_modules/lodash/package/filter.js b/node_modules/globule/node_modules/lodash/filter.js similarity index 90% rename from node_modules/lodash/package/filter.js rename to node_modules/globule/node_modules/lodash/filter.js index 98e3a96..52616be 100644 --- a/node_modules/lodash/package/filter.js +++ b/node_modules/globule/node_modules/lodash/filter.js @@ -8,13 +8,14 @@ var arrayFilter = require('./_arrayFilter'), * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * + * **Note:** Unlike `_.remove`, this method returns a new array. + * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.reject * @example diff --git a/node_modules/lodash/package/find.js b/node_modules/globule/node_modules/lodash/find.js similarity index 60% rename from node_modules/lodash/package/find.js rename to node_modules/globule/node_modules/lodash/find.js index 83f0dba..de732cc 100644 --- a/node_modules/lodash/package/find.js +++ b/node_modules/globule/node_modules/lodash/find.js @@ -1,8 +1,5 @@ -var baseEach = require('./_baseEach'), - baseFind = require('./_baseFind'), - baseFindIndex = require('./_baseFindIndex'), - baseIteratee = require('./_baseIteratee'), - isArray = require('./isArray'); +var createFind = require('./_createFind'), + findIndex = require('./findIndex'); /** * Iterates over elements of `collection`, returning the first element @@ -13,9 +10,9 @@ var baseEach = require('./_baseEach'), * @memberOf _ * @since 0.1.0 * @category Collection - * @param {Array|Object} collection The collection to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * @@ -40,13 +37,6 @@ var baseEach = require('./_baseEach'), * _.find(users, 'active'); * // => object for 'barney' */ -function find(collection, predicate) { - predicate = baseIteratee(predicate, 3); - if (isArray(collection)) { - var index = baseFindIndex(collection, predicate); - return index > -1 ? collection[index] : undefined; - } - return baseFind(collection, predicate, baseEach); -} +var find = createFind(findIndex); module.exports = find; diff --git a/node_modules/lodash/package/findIndex.js b/node_modules/globule/node_modules/lodash/findIndex.js similarity index 56% rename from node_modules/lodash/package/findIndex.js rename to node_modules/globule/node_modules/lodash/findIndex.js index 84acc74..4689069 100644 --- a/node_modules/lodash/package/findIndex.js +++ b/node_modules/globule/node_modules/lodash/findIndex.js @@ -1,5 +1,9 @@ var baseFindIndex = require('./_baseFindIndex'), - baseIteratee = require('./_baseIteratee'); + baseIteratee = require('./_baseIteratee'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; /** * This method is like `_.find` except that it returns the index of the first @@ -9,9 +13,9 @@ var baseFindIndex = require('./_baseFindIndex'), * @memberOf _ * @since 1.1.0 * @category Array - * @param {Array} array The array to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * @@ -36,10 +40,16 @@ var baseFindIndex = require('./_baseFindIndex'), * _.findIndex(users, 'active'); * // => 2 */ -function findIndex(array, predicate) { - return (array && array.length) - ? baseFindIndex(array, baseIteratee(predicate, 3)) - : -1; +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index); } module.exports = findIndex; diff --git a/node_modules/lodash/package/findKey.js b/node_modules/globule/node_modules/lodash/findKey.js similarity index 80% rename from node_modules/lodash/package/findKey.js rename to node_modules/globule/node_modules/lodash/findKey.js index 16a9fd9..cac0248 100644 --- a/node_modules/lodash/package/findKey.js +++ b/node_modules/globule/node_modules/lodash/findKey.js @@ -1,4 +1,4 @@ -var baseFind = require('./_baseFind'), +var baseFindKey = require('./_baseFindKey'), baseForOwn = require('./_baseForOwn'), baseIteratee = require('./_baseIteratee'); @@ -10,9 +10,8 @@ var baseFind = require('./_baseFind'), * @memberOf _ * @since 1.1.0 * @category Object - * @param {Object} object The object to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {string|undefined} Returns the key of the matched element, * else `undefined`. * @example @@ -39,7 +38,7 @@ var baseFind = require('./_baseFind'), * // => 'barney' */ function findKey(object, predicate) { - return baseFind(object, baseIteratee(predicate, 3), baseForOwn, true); + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn); } module.exports = findKey; diff --git a/node_modules/globule/node_modules/lodash/findLast.js b/node_modules/globule/node_modules/lodash/findLast.js new file mode 100644 index 0000000..70b4271 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/findLast.js @@ -0,0 +1,25 @@ +var createFind = require('./_createFind'), + findLastIndex = require('./findLastIndex'); + +/** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ +var findLast = createFind(findLastIndex); + +module.exports = findLast; diff --git a/node_modules/lodash/package/findLastIndex.js b/node_modules/globule/node_modules/lodash/findLastIndex.js similarity index 52% rename from node_modules/lodash/package/findLastIndex.js rename to node_modules/globule/node_modules/lodash/findLastIndex.js index bf397d8..7da3431 100644 --- a/node_modules/lodash/package/findLastIndex.js +++ b/node_modules/globule/node_modules/lodash/findLastIndex.js @@ -1,5 +1,10 @@ var baseFindIndex = require('./_baseFindIndex'), - baseIteratee = require('./_baseIteratee'); + baseIteratee = require('./_baseIteratee'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; /** * This method is like `_.findIndex` except that it iterates over elements @@ -9,9 +14,9 @@ var baseFindIndex = require('./_baseFindIndex'), * @memberOf _ * @since 2.0.0 * @category Array - * @param {Array} array The array to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * @@ -36,10 +41,19 @@ var baseFindIndex = require('./_baseFindIndex'), * _.findLastIndex(users, 'active'); * // => 0 */ -function findLastIndex(array, predicate) { - return (array && array.length) - ? baseFindIndex(array, baseIteratee(predicate, 3), true) - : -1; +function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index, true); } module.exports = findLastIndex; diff --git a/node_modules/lodash/package/findLastKey.js b/node_modules/globule/node_modules/lodash/findLastKey.js similarity index 80% rename from node_modules/lodash/package/findLastKey.js rename to node_modules/globule/node_modules/lodash/findLastKey.js index fb915df..66fb9fb 100644 --- a/node_modules/lodash/package/findLastKey.js +++ b/node_modules/globule/node_modules/lodash/findLastKey.js @@ -1,4 +1,4 @@ -var baseFind = require('./_baseFind'), +var baseFindKey = require('./_baseFindKey'), baseForOwnRight = require('./_baseForOwnRight'), baseIteratee = require('./_baseIteratee'); @@ -10,9 +10,8 @@ var baseFind = require('./_baseFind'), * @memberOf _ * @since 2.0.0 * @category Object - * @param {Object} object The object to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {string|undefined} Returns the key of the matched element, * else `undefined`. * @example @@ -39,7 +38,7 @@ var baseFind = require('./_baseFind'), * // => 'pebbles' */ function findLastKey(object, predicate) { - return baseFind(object, baseIteratee(predicate, 3), baseForOwnRight, true); + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight); } module.exports = findLastKey; diff --git a/node_modules/lodash/package/fp/first.js b/node_modules/globule/node_modules/lodash/first.js similarity index 100% rename from node_modules/lodash/package/fp/first.js rename to node_modules/globule/node_modules/lodash/first.js diff --git a/node_modules/lodash/package/flatMap.js b/node_modules/globule/node_modules/lodash/flatMap.js similarity index 87% rename from node_modules/lodash/package/flatMap.js rename to node_modules/globule/node_modules/lodash/flatMap.js index f830749..e668506 100644 --- a/node_modules/lodash/package/flatMap.js +++ b/node_modules/globule/node_modules/lodash/flatMap.js @@ -11,8 +11,7 @@ var baseFlatten = require('./_baseFlatten'), * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new flattened array. * @example * diff --git a/node_modules/lodash/package/flatMapDeep.js b/node_modules/globule/node_modules/lodash/flatMapDeep.js similarity index 87% rename from node_modules/lodash/package/flatMapDeep.js rename to node_modules/globule/node_modules/lodash/flatMapDeep.js index 3808262..4653d60 100644 --- a/node_modules/lodash/package/flatMapDeep.js +++ b/node_modules/globule/node_modules/lodash/flatMapDeep.js @@ -13,8 +13,7 @@ var INFINITY = 1 / 0; * @since 4.7.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new flattened array. * @example * diff --git a/node_modules/lodash/package/flatMapDepth.js b/node_modules/globule/node_modules/lodash/flatMapDepth.js similarity index 88% rename from node_modules/lodash/package/flatMapDepth.js rename to node_modules/globule/node_modules/lodash/flatMapDepth.js index d528bff..6d72005 100644 --- a/node_modules/lodash/package/flatMapDepth.js +++ b/node_modules/globule/node_modules/lodash/flatMapDepth.js @@ -11,8 +11,7 @@ var baseFlatten = require('./_baseFlatten'), * @since 4.7.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {number} [depth=1] The maximum recursion depth. * @returns {Array} Returns the new flattened array. * @example diff --git a/node_modules/lodash/package/flatten.js b/node_modules/globule/node_modules/lodash/flatten.js similarity index 89% rename from node_modules/lodash/package/flatten.js rename to node_modules/globule/node_modules/lodash/flatten.js index bd4f439..3f09f7f 100644 --- a/node_modules/lodash/package/flatten.js +++ b/node_modules/globule/node_modules/lodash/flatten.js @@ -15,7 +15,7 @@ var baseFlatten = require('./_baseFlatten'); * // => [1, 2, [3, [4]], 5] */ function flatten(array) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? baseFlatten(array, 1) : []; } diff --git a/node_modules/lodash/package/flattenDeep.js b/node_modules/globule/node_modules/lodash/flattenDeep.js similarity index 91% rename from node_modules/lodash/package/flattenDeep.js rename to node_modules/globule/node_modules/lodash/flattenDeep.js index c20c781..8ad585c 100644 --- a/node_modules/lodash/package/flattenDeep.js +++ b/node_modules/globule/node_modules/lodash/flattenDeep.js @@ -18,7 +18,7 @@ var INFINITY = 1 / 0; * // => [1, 2, 3, 4, 5] */ function flattenDeep(array) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? baseFlatten(array, INFINITY) : []; } diff --git a/node_modules/lodash/package/flattenDepth.js b/node_modules/globule/node_modules/lodash/flattenDepth.js similarity index 93% rename from node_modules/lodash/package/flattenDepth.js rename to node_modules/globule/node_modules/lodash/flattenDepth.js index a0f4b52..441fdcc 100644 --- a/node_modules/lodash/package/flattenDepth.js +++ b/node_modules/globule/node_modules/lodash/flattenDepth.js @@ -22,7 +22,7 @@ var baseFlatten = require('./_baseFlatten'), * // => [1, 2, 3, [4], 5] */ function flattenDepth(array, depth) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } diff --git a/node_modules/lodash/package/flip.js b/node_modules/globule/node_modules/lodash/flip.js similarity index 69% rename from node_modules/lodash/package/flip.js rename to node_modules/globule/node_modules/lodash/flip.js index 82f796c..02e3fc2 100644 --- a/node_modules/lodash/package/flip.js +++ b/node_modules/globule/node_modules/lodash/flip.js @@ -1,6 +1,6 @@ -var createWrapper = require('./_createWrapper'); +var createWrap = require('./_createWrap'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var FLIP_FLAG = 512; /** @@ -11,7 +11,7 @@ var FLIP_FLAG = 512; * @since 4.0.0 * @category Function * @param {Function} func The function to flip arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new flipped function. * @example * * var flipped = _.flip(function() { @@ -22,7 +22,7 @@ var FLIP_FLAG = 512; * // => ['d', 'c', 'b', 'a'] */ function flip(func) { - return createWrapper(func, FLIP_FLAG); + return createWrap(func, FLIP_FLAG); } module.exports = flip; diff --git a/node_modules/lodash/package/floor.js b/node_modules/globule/node_modules/lodash/floor.js similarity index 100% rename from node_modules/lodash/package/floor.js rename to node_modules/globule/node_modules/lodash/floor.js diff --git a/node_modules/lodash/package/flow.js b/node_modules/globule/node_modules/lodash/flow.js similarity index 74% rename from node_modules/lodash/package/flow.js rename to node_modules/globule/node_modules/lodash/flow.js index 2cfec17..74b6b62 100644 --- a/node_modules/lodash/package/flow.js +++ b/node_modules/globule/node_modules/lodash/flow.js @@ -9,8 +9,8 @@ var createFlow = require('./_createFlow'); * @memberOf _ * @since 3.0.0 * @category Util - * @param {...(Function|Function[])} [funcs] Functions to invoke. - * @returns {Function} Returns the new function. + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. * @see _.flowRight * @example * @@ -18,7 +18,7 @@ var createFlow = require('./_createFlow'); * return n * n; * } * - * var addSquare = _.flow(_.add, square); + * var addSquare = _.flow([_.add, square]); * addSquare(1, 2); * // => 9 */ diff --git a/node_modules/lodash/package/flowRight.js b/node_modules/globule/node_modules/lodash/flowRight.js similarity index 69% rename from node_modules/lodash/package/flowRight.js rename to node_modules/globule/node_modules/lodash/flowRight.js index bd867c9..1146141 100644 --- a/node_modules/lodash/package/flowRight.js +++ b/node_modules/globule/node_modules/lodash/flowRight.js @@ -8,8 +8,8 @@ var createFlow = require('./_createFlow'); * @since 3.0.0 * @memberOf _ * @category Util - * @param {...(Function|Function[])} [funcs] Functions to invoke. - * @returns {Function} Returns the new function. + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. * @see _.flow * @example * @@ -17,7 +17,7 @@ var createFlow = require('./_createFlow'); * return n * n; * } * - * var addSquare = _.flowRight(square, _.add); + * var addSquare = _.flowRight([square, _.add]); * addSquare(1, 2); * // => 9 */ diff --git a/node_modules/lodash/package/forEach.js b/node_modules/globule/node_modules/lodash/forEach.js similarity index 82% rename from node_modules/lodash/package/forEach.js rename to node_modules/globule/node_modules/lodash/forEach.js index 7430418..c64eaa7 100644 --- a/node_modules/lodash/package/forEach.js +++ b/node_modules/globule/node_modules/lodash/forEach.js @@ -1,6 +1,6 @@ var arrayEach = require('./_arrayEach'), baseEach = require('./_baseEach'), - baseIteratee = require('./_baseIteratee'), + castFunction = require('./_castFunction'), isArray = require('./isArray'); /** @@ -23,7 +23,7 @@ var arrayEach = require('./_arrayEach'), * @see _.forEachRight * @example * - * _([1, 2]).forEach(function(value) { + * _.forEach([1, 2], function(value) { * console.log(value); * }); * // => Logs `1` then `2`. @@ -34,9 +34,8 @@ var arrayEach = require('./_arrayEach'), * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forEach(collection, iteratee) { - return (typeof iteratee == 'function' && isArray(collection)) - ? arrayEach(collection, iteratee) - : baseEach(collection, baseIteratee(iteratee)); + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, castFunction(iteratee)); } module.exports = forEach; diff --git a/node_modules/lodash/package/forEachRight.js b/node_modules/globule/node_modules/lodash/forEachRight.js similarity index 78% rename from node_modules/lodash/package/forEachRight.js rename to node_modules/globule/node_modules/lodash/forEachRight.js index bcac84c..7390eba 100644 --- a/node_modules/lodash/package/forEachRight.js +++ b/node_modules/globule/node_modules/lodash/forEachRight.js @@ -1,6 +1,6 @@ var arrayEachRight = require('./_arrayEachRight'), baseEachRight = require('./_baseEachRight'), - baseIteratee = require('./_baseIteratee'), + castFunction = require('./_castFunction'), isArray = require('./isArray'); /** @@ -24,9 +24,8 @@ var arrayEachRight = require('./_arrayEachRight'), * // => Logs `2` then `1`. */ function forEachRight(collection, iteratee) { - return (typeof iteratee == 'function' && isArray(collection)) - ? arrayEachRight(collection, iteratee) - : baseEachRight(collection, baseIteratee(iteratee)); + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, castFunction(iteratee)); } module.exports = forEachRight; diff --git a/node_modules/lodash/package/forIn.js b/node_modules/globule/node_modules/lodash/forIn.js similarity index 90% rename from node_modules/lodash/package/forIn.js rename to node_modules/globule/node_modules/lodash/forIn.js index 8dd75dd..583a596 100644 --- a/node_modules/lodash/package/forIn.js +++ b/node_modules/globule/node_modules/lodash/forIn.js @@ -1,5 +1,5 @@ var baseFor = require('./_baseFor'), - baseIteratee = require('./_baseIteratee'), + castFunction = require('./_castFunction'), keysIn = require('./keysIn'); /** @@ -33,7 +33,7 @@ var baseFor = require('./_baseFor'), function forIn(object, iteratee) { return object == null ? object - : baseFor(object, baseIteratee(iteratee), keysIn); + : baseFor(object, castFunction(iteratee), keysIn); } module.exports = forIn; diff --git a/node_modules/lodash/package/forInRight.js b/node_modules/globule/node_modules/lodash/forInRight.js similarity index 88% rename from node_modules/lodash/package/forInRight.js rename to node_modules/globule/node_modules/lodash/forInRight.js index e71f563..4aedf58 100644 --- a/node_modules/lodash/package/forInRight.js +++ b/node_modules/globule/node_modules/lodash/forInRight.js @@ -1,5 +1,5 @@ var baseForRight = require('./_baseForRight'), - baseIteratee = require('./_baseIteratee'), + castFunction = require('./_castFunction'), keysIn = require('./keysIn'); /** @@ -31,7 +31,7 @@ var baseForRight = require('./_baseForRight'), function forInRight(object, iteratee) { return object == null ? object - : baseForRight(object, baseIteratee(iteratee), keysIn); + : baseForRight(object, castFunction(iteratee), keysIn); } module.exports = forInRight; diff --git a/node_modules/lodash/package/forOwn.js b/node_modules/globule/node_modules/lodash/forOwn.js similarity index 88% rename from node_modules/lodash/package/forOwn.js rename to node_modules/globule/node_modules/lodash/forOwn.js index 1a050ac..94eed84 100644 --- a/node_modules/lodash/package/forOwn.js +++ b/node_modules/globule/node_modules/lodash/forOwn.js @@ -1,5 +1,5 @@ var baseForOwn = require('./_baseForOwn'), - baseIteratee = require('./_baseIteratee'); + castFunction = require('./_castFunction'); /** * Iterates over own enumerable string keyed properties of an object and @@ -30,7 +30,7 @@ var baseForOwn = require('./_baseForOwn'), * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forOwn(object, iteratee) { - return object && baseForOwn(object, baseIteratee(iteratee)); + return object && baseForOwn(object, castFunction(iteratee)); } module.exports = forOwn; diff --git a/node_modules/lodash/package/forOwnRight.js b/node_modules/globule/node_modules/lodash/forOwnRight.js similarity index 87% rename from node_modules/lodash/package/forOwnRight.js rename to node_modules/globule/node_modules/lodash/forOwnRight.js index 783d958..86f338f 100644 --- a/node_modules/lodash/package/forOwnRight.js +++ b/node_modules/globule/node_modules/lodash/forOwnRight.js @@ -1,5 +1,5 @@ var baseForOwnRight = require('./_baseForOwnRight'), - baseIteratee = require('./_baseIteratee'); + castFunction = require('./_castFunction'); /** * This method is like `_.forOwn` except that it iterates over properties of @@ -28,7 +28,7 @@ var baseForOwnRight = require('./_baseForOwnRight'), * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. */ function forOwnRight(object, iteratee) { - return object && baseForOwnRight(object, baseIteratee(iteratee)); + return object && baseForOwnRight(object, castFunction(iteratee)); } module.exports = forOwnRight; diff --git a/node_modules/lodash/package/fp.js b/node_modules/globule/node_modules/lodash/fp.js similarity index 100% rename from node_modules/lodash/package/fp.js rename to node_modules/globule/node_modules/lodash/fp.js diff --git a/node_modules/globule/node_modules/lodash/fp/F.js b/node_modules/globule/node_modules/lodash/fp/F.js new file mode 100644 index 0000000..a05a63a --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/F.js @@ -0,0 +1 @@ +module.exports = require('./stubFalse'); diff --git a/node_modules/globule/node_modules/lodash/fp/T.js b/node_modules/globule/node_modules/lodash/fp/T.js new file mode 100644 index 0000000..e2ba8ea --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/T.js @@ -0,0 +1 @@ +module.exports = require('./stubTrue'); diff --git a/node_modules/lodash/package/fp/__.js b/node_modules/globule/node_modules/lodash/fp/__.js similarity index 100% rename from node_modules/lodash/package/fp/__.js rename to node_modules/globule/node_modules/lodash/fp/__.js diff --git a/node_modules/lodash/package/fp/_baseConvert.js b/node_modules/globule/node_modules/lodash/fp/_baseConvert.js similarity index 72% rename from node_modules/lodash/package/fp/_baseConvert.js rename to node_modules/globule/node_modules/lodash/fp/_baseConvert.js index e7e631c..5244985 100644 --- a/node_modules/lodash/package/fp/_baseConvert.js +++ b/node_modules/globule/node_modules/lodash/fp/_baseConvert.js @@ -1,5 +1,4 @@ var mapping = require('./_mapping'), - mutateMap = mapping.mutate, fallbackHolder = require('./placeholder'); /** @@ -71,11 +70,11 @@ function createCloner(func) { * @param {Function} cloner The function to clone arguments. * @returns {Function} Returns the new immutable function. */ -function immutWrap(func, cloner) { +function wrapImmutable(func, cloner) { return function() { var length = arguments.length; if (!length) { - return result; + return; } var args = Array(length); while (length--) { @@ -143,6 +142,7 @@ function baseConvert(util, name, func, options) { 'keys': util.keys, 'rearg': util.rearg, 'spread': util.spread, + 'toInteger': util.toInteger, 'toPath': util.toPath }; @@ -156,6 +156,7 @@ function baseConvert(util, name, func, options) { keys = helpers.keys, rearg = helpers.rearg, spread = helpers.spread, + toInteger = helpers.toInteger, toPath = helpers.toPath; var aryMethodKeys = keys(mapping.aryMethod); @@ -189,30 +190,38 @@ function baseConvert(util, name, func, options) { if (!isFunction(func)) { return mixin(func, Object(source)); } - var methods = [], - methodNames = []; - + var pairs = []; each(keys(source), function(key) { - var value = source[key]; - if (isFunction(value)) { - methodNames.push(key); - methods.push(func.prototype[key]); + if (isFunction(source[key])) { + pairs.push([key, func.prototype[key]]); } }); mixin(func, Object(source)); - each(methodNames, function(methodName, index) { - var method = methods[index]; - if (isFunction(method)) { - func.prototype[methodName] = method; + each(pairs, function(pair) { + var value = pair[1]; + if (isFunction(value)) { + func.prototype[pair[0]] = value; } else { - delete func.prototype[methodName]; + delete func.prototype[pair[0]]; } }); return func; }; }, + 'nthArg': function(nthArg) { + return function(n) { + var arity = n < 0 ? 1 : (toInteger(n) + 1); + return curry(nthArg(n), arity); + }; + }, + 'rearg': function(rearg) { + return function(func, indexes) { + var arity = indexes ? indexes.length : 0; + return curry(rearg(func, indexes), arity); + }; + }, 'runInContext': function(runInContext) { return function(context) { return baseConvert(util, runInContext(context), options); @@ -222,6 +231,77 @@ function baseConvert(util, name, func, options) { /*--------------------------------------------------------------------------*/ + /** + * Casts `func` to a function with an arity capped iteratee if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @returns {Function} Returns the cast function. + */ + function castCap(name, func) { + if (config.cap) { + var indexes = mapping.iterateeRearg[name]; + if (indexes) { + return iterateeRearg(func, indexes); + } + var n = !isLib && mapping.iterateeAry[name]; + if (n) { + return iterateeAry(func, n); + } + } + return func; + } + + /** + * Casts `func` to a curried function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castCurry(name, func, n) { + return (forceCurry || (config.curry && n > 1)) + ? curry(func, n) + : func; + } + + /** + * Casts `func` to a fixed arity function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity cap. + * @returns {Function} Returns the cast function. + */ + function castFixed(name, func, n) { + if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { + var data = mapping.methodSpread[name], + start = data && data.start; + + return start === undefined ? ary(func, n) : spread(func, start); + } + return func; + } + + /** + * Casts `func` to an rearged function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castRearg(name, func, n) { + return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name])) + ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n]) + : func; + } + /** * Creates a clone of `object` by `path`. * @@ -235,6 +315,7 @@ function baseConvert(util, name, func, options) { var index = -1, length = path.length, + lastIndex = length - 1, result = clone(Object(object)), nested = result; @@ -243,7 +324,7 @@ function baseConvert(util, name, func, options) { value = nested[key]; if (value != null) { - nested[key] = clone(Object(value)); + nested[path[index]] = clone(index == lastIndex ? value : Object(value)); } nested = nested[key]; } @@ -269,13 +350,16 @@ function baseConvert(util, name, func, options) { * @returns {Function} Returns the new converter function. */ function createConverter(name, func) { - var oldOptions = options; + var realName = mapping.aliasToReal[name] || name, + methodName = mapping.remap[realName] || realName, + oldOptions = options; + return function(options) { var newUtil = isLib ? pristine : helpers, - newFunc = isLib ? pristine[name] : func, + newFunc = isLib ? pristine[methodName] : func, newOptions = assign(assign({}, oldOptions), options); - return baseConvert(newUtil, name, newFunc, newOptions); + return baseConvert(newUtil, realName, newFunc, newOptions); }; } @@ -313,12 +397,11 @@ function baseConvert(util, name, func, options) { } /** - * Creates a function that invokes `func` with its first argument passed - * thru `transform`. + * Creates a function that invokes `func` with its first argument transformed. * * @private * @param {Function} func The function to wrap. - * @param {...Function} transform The functions to transform the first argument. + * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { @@ -347,53 +430,37 @@ function baseConvert(util, name, func, options) { * @returns {Function} Returns the converted function. */ function wrap(name, func) { - name = mapping.aliasToReal[name] || name; - var result, + realName = mapping.aliasToReal[name] || name, wrapped = func, - wrapper = wrappers[name]; + wrapper = wrappers[realName]; if (wrapper) { wrapped = wrapper(func); } else if (config.immutable) { - if (mutateMap.array[name]) { - wrapped = immutWrap(func, cloneArray); + if (mapping.mutate.array[realName]) { + wrapped = wrapImmutable(func, cloneArray); } - else if (mutateMap.object[name]) { - wrapped = immutWrap(func, createCloner(func)); + else if (mapping.mutate.object[realName]) { + wrapped = wrapImmutable(func, createCloner(func)); } - else if (mutateMap.set[name]) { - wrapped = immutWrap(func, cloneByPath); + else if (mapping.mutate.set[realName]) { + wrapped = wrapImmutable(func, cloneByPath); } } each(aryMethodKeys, function(aryKey) { each(mapping.aryMethod[aryKey], function(otherName) { - if (name == otherName) { - var aryN = !isLib && mapping.iterateeAry[name], - reargIndexes = mapping.iterateeRearg[name], - spreadStart = mapping.methodSpread[name]; - - result = wrapped; - if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { - result = spreadStart === undefined - ? ary(result, aryKey) - : spread(result, spreadStart); - } - if (config.rearg && aryKey > 1 && (forceRearg || !mapping.skipRearg[name])) { - result = rearg(result, mapping.methodRearg[name] || mapping.aryRearg[aryKey]); - } - if (config.cap) { - if (reargIndexes) { - result = iterateeRearg(result, reargIndexes); - } else if (aryN) { - result = iterateeAry(result, aryN); - } - } - if (forceCurry || (config.curry && aryKey > 1)) { - forceCurry && console.log(forceCurry, name); - result = curry(result, aryKey); - } + if (realName == otherName) { + var spreadData = mapping.methodSpread[realName], + afterRearg = spreadData && spreadData.afterRearg; + + result = afterRearg + ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) + : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey); + + result = castCap(realName, result); + result = castCurry(realName, result, aryKey); return false; } }); @@ -406,8 +473,8 @@ function baseConvert(util, name, func, options) { return func.apply(this, arguments); }; } - result.convert = createConverter(name, func); - if (mapping.placeholder[name]) { + result.convert = createConverter(realName, func); + if (mapping.placeholder[realName]) { setPlaceholder = true; result.placeholder = func.placeholder = placeholder; } diff --git a/node_modules/lodash/package/fp/_convertBrowser.js b/node_modules/globule/node_modules/lodash/fp/_convertBrowser.js similarity index 88% rename from node_modules/lodash/package/fp/_convertBrowser.js rename to node_modules/globule/node_modules/lodash/fp/_convertBrowser.js index 1874a54..bde030d 100644 --- a/node_modules/lodash/package/fp/_convertBrowser.js +++ b/node_modules/globule/node_modules/lodash/fp/_convertBrowser.js @@ -12,7 +12,7 @@ function browserConvert(lodash, options) { return baseConvert(lodash, lodash, options); } -if (typeof _ == 'function') { +if (typeof _ == 'function' && typeof _.runInContext == 'function') { _ = browserConvert(_.runInContext()); } module.exports = browserConvert; diff --git a/node_modules/lodash/package/fp/_falseOptions.js b/node_modules/globule/node_modules/lodash/fp/_falseOptions.js similarity index 100% rename from node_modules/lodash/package/fp/_falseOptions.js rename to node_modules/globule/node_modules/lodash/fp/_falseOptions.js diff --git a/node_modules/lodash/package/fp/_mapping.js b/node_modules/globule/node_modules/lodash/fp/_mapping.js similarity index 56% rename from node_modules/lodash/package/fp/_mapping.js rename to node_modules/globule/node_modules/lodash/fp/_mapping.js index 18a3196..7fa8e67 100644 --- a/node_modules/lodash/package/fp/_mapping.js +++ b/node_modules/globule/node_modules/lodash/fp/_mapping.js @@ -7,11 +7,20 @@ exports.aliasToReal = { 'entries': 'toPairs', 'entriesIn': 'toPairsIn', 'extend': 'assignIn', + 'extendAll': 'assignInAll', + 'extendAllWith': 'assignInAllWith', 'extendWith': 'assignInWith', 'first': 'head', + // Methods that are curried variants of others. + 'conforms': 'conformsTo', + 'matches': 'isMatch', + 'property': 'get', + // Ramda aliases. '__': 'placeholder', + 'F': 'stubFalse', + 'T': 'stubTrue', 'all': 'every', 'allPass': 'overEvery', 'always': 'constant', @@ -25,8 +34,11 @@ exports.aliasToReal = { 'contains': 'includes', 'dissoc': 'unset', 'dissocPath': 'unset', + 'dropLast': 'dropRight', + 'dropLastWhile': 'dropRightWhile', 'equals': 'isEqual', 'identical': 'eq', + 'indexBy': 'keyBy', 'init': 'initial', 'invertObj': 'invert', 'juxt': 'over', @@ -43,36 +55,44 @@ exports.aliasToReal = { 'propEq': 'matchesProperty', 'propOr': 'getOr', 'props': 'at', + 'symmetricDifference': 'xor', + 'symmetricDifferenceBy': 'xorBy', + 'symmetricDifferenceWith': 'xorWith', + 'takeLast': 'takeRight', + 'takeLastWhile': 'takeRightWhile', 'unapply': 'rest', 'unnest': 'flatten', 'useWith': 'overArgs', - 'whereEq': 'filter', + 'where': 'conformsTo', + 'whereEq': 'isMatch', 'zipObj': 'zipObject' }; /** Used to map ary to method names. */ exports.aryMethod = { '1': [ - 'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor', - 'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', - 'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse', + 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create', + 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow', + 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll', + 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse', 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart', - 'uniqueId', 'words' + 'uniqueId', 'words', 'zipAll' ], '2': [ - 'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll', - 'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN', - 'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference', - 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', - 'eq', 'every', 'filter', 'find', 'find', 'findIndex', 'findKey', 'findLast', - 'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', - 'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', - 'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', - 'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', - 'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', - 'matchesProperty', 'maxBy', 'meanBy', 'merge', 'minBy', 'multiply', 'nth', - 'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', - 'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll', + 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith', + 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith', + 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN', + 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference', + 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', + 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex', + 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach', + 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get', + 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection', + 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', + 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', + 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit', + 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', + 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll', 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex', 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy', @@ -84,12 +104,14 @@ exports.aryMethod = { ], '3': [ 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith', - 'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs', - 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', 'mergeWith', - 'orderBy', 'padChars', 'padCharsEnd', 'padCharsStart', 'pullAllBy', - 'pullAllWith', 'reduce', 'reduceRight', 'replace', 'set', 'slice', - 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', - 'update', 'xorBy', 'xorWith', 'zipWith' + 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr', + 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith', + 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', + 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd', + 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight', + 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', + 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy', + 'xorWith', 'zipWith' ], '4': [ 'fill', 'setWith', 'updateWith' @@ -110,10 +132,14 @@ exports.iterateeAry = { 'every': 1, 'filter': 1, 'find': 1, + 'findFrom': 1, 'findIndex': 1, + 'findIndexFrom': 1, 'findKey': 1, 'findLast': 1, + 'findLastFrom': 1, 'findLastIndex': 1, + 'findLastIndexFrom': 1, 'findLastKey': 1, 'flatMap': 1, 'flatMapDeep': 1, @@ -146,31 +172,53 @@ exports.iterateeRearg = { /** Used to map method names to rearg configs. */ exports.methodRearg = { + 'assignInAllWith': [1, 2, 0], 'assignInWith': [1, 2, 0], + 'assignAllWith': [1, 2, 0], 'assignWith': [1, 2, 0], + 'differenceBy': [1, 2, 0], + 'differenceWith': [1, 2, 0], 'getOr': [2, 1, 0], + 'intersectionBy': [1, 2, 0], + 'intersectionWith': [1, 2, 0], 'isEqualWith': [1, 2, 0], 'isMatchWith': [2, 1, 0], + 'mergeAllWith': [1, 2, 0], 'mergeWith': [1, 2, 0], 'padChars': [2, 1, 0], 'padCharsEnd': [2, 1, 0], 'padCharsStart': [2, 1, 0], 'pullAllBy': [2, 1, 0], 'pullAllWith': [2, 1, 0], + 'rangeStep': [1, 2, 0], + 'rangeStepRight': [1, 2, 0], 'setWith': [3, 1, 2, 0], 'sortedIndexBy': [2, 1, 0], 'sortedLastIndexBy': [2, 1, 0], + 'unionBy': [1, 2, 0], + 'unionWith': [1, 2, 0], 'updateWith': [3, 1, 2, 0], + 'xorBy': [1, 2, 0], + 'xorWith': [1, 2, 0], 'zipWith': [1, 2, 0] }; /** Used to map method names to spread configs. */ exports.methodSpread = { - 'invokeArgs': 2, - 'invokeArgsMap': 2, - 'partial': 1, - 'partialRight': 1, - 'without': 1 + 'assignAll': { 'start': 0 }, + 'assignAllWith': { 'afterRearg': true, 'start': 1 }, + 'assignInAll': { 'start': 0 }, + 'assignInAllWith': { 'afterRearg': true, 'start': 1 }, + 'defaultsAll': { 'start': 0 }, + 'defaultsDeepAll': { 'start': 0 }, + 'invokeArgs': { 'start': 2 }, + 'invokeArgsMap': { 'start': 2 }, + 'mergeAll': { 'start': 0 }, + 'mergeAllWith': { 'afterRearg': true, 'start': 1 }, + 'partial': { 'start': 1 }, + 'partialRight': { 'start': 1 }, + 'without': { 'start': 1 }, + 'zipAll': { 'start': 0 } }; /** Used to identify methods which mutate arrays or objects. */ @@ -187,13 +235,21 @@ exports.mutate = { }, 'object': { 'assign': true, + 'assignAll': true, + 'assignAllWith': true, 'assignIn': true, + 'assignInAll': true, + 'assignInAllWith': true, 'assignInWith': true, 'assignWith': true, 'defaults': true, + 'defaultsAll': true, 'defaultsDeep': true, + 'defaultsDeepAll': true, 'merge': true, - 'mergeWith': true + 'mergeAll': true, + 'mergeAllWith': true, + 'mergeWith': true, }, 'set': { 'set': true, @@ -233,19 +289,38 @@ exports.realToAlias = (function() { /** Used to map method names to other names. */ exports.remap = { + 'assignAll': 'assign', + 'assignAllWith': 'assignWith', + 'assignInAll': 'assignIn', + 'assignInAllWith': 'assignInWith', 'curryN': 'curry', 'curryRightN': 'curryRight', + 'defaultsAll': 'defaults', + 'defaultsDeepAll': 'defaultsDeep', + 'findFrom': 'find', + 'findIndexFrom': 'findIndex', + 'findLastFrom': 'findLast', + 'findLastIndexFrom': 'findLastIndex', 'getOr': 'get', + 'includesFrom': 'includes', + 'indexOfFrom': 'indexOf', 'invokeArgs': 'invoke', 'invokeArgsMap': 'invokeMap', + 'lastIndexOfFrom': 'lastIndexOf', + 'mergeAll': 'merge', + 'mergeAllWith': 'mergeWith', 'padChars': 'pad', 'padCharsEnd': 'padEnd', 'padCharsStart': 'padStart', + 'propertyOf': 'get', + 'rangeStep': 'range', + 'rangeStepRight': 'rangeRight', 'restFrom': 'rest', 'spreadFrom': 'spread', 'trimChars': 'trim', 'trimCharsEnd': 'trimEnd', - 'trimCharsStart': 'trimStart' + 'trimCharsStart': 'trimStart', + 'zipAll': 'zip' }; /** Used to track methods that skip fixing their arity. */ @@ -255,6 +330,7 @@ exports.skipFixed = { 'flowRight': true, 'iteratee': true, 'mixin': true, + 'rearg': true, 'runInContext': true }; @@ -280,11 +356,12 @@ exports.skipRearg = { 'overArgs': true, 'partial': true, 'partialRight': true, + 'propertyOf': true, 'random': true, 'range': true, 'rangeRight': true, 'subtract': true, - 'without': true, 'zip': true, - 'zipObject': true + 'zipObject': true, + 'zipObjectDeep': true }; diff --git a/node_modules/lodash/package/fp/_util.js b/node_modules/globule/node_modules/lodash/fp/_util.js similarity index 91% rename from node_modules/lodash/package/fp/_util.js rename to node_modules/globule/node_modules/lodash/fp/_util.js index d450396..f814812 100644 --- a/node_modules/lodash/package/fp/_util.js +++ b/node_modules/globule/node_modules/lodash/fp/_util.js @@ -10,5 +10,6 @@ module.exports = { 'keys': require('../_baseKeys'), 'rearg': require('../rearg'), 'spread': require('../spread'), + 'toInteger': require('../toInteger'), 'toPath': require('../toPath') }; diff --git a/node_modules/lodash/package/fp/add.js b/node_modules/globule/node_modules/lodash/fp/add.js similarity index 100% rename from node_modules/lodash/package/fp/add.js rename to node_modules/globule/node_modules/lodash/fp/add.js diff --git a/node_modules/lodash/package/fp/after.js b/node_modules/globule/node_modules/lodash/fp/after.js similarity index 100% rename from node_modules/lodash/package/fp/after.js rename to node_modules/globule/node_modules/lodash/fp/after.js diff --git a/node_modules/lodash/package/fp/all.js b/node_modules/globule/node_modules/lodash/fp/all.js similarity index 100% rename from node_modules/lodash/package/fp/all.js rename to node_modules/globule/node_modules/lodash/fp/all.js diff --git a/node_modules/lodash/package/fp/allPass.js b/node_modules/globule/node_modules/lodash/fp/allPass.js similarity index 100% rename from node_modules/lodash/package/fp/allPass.js rename to node_modules/globule/node_modules/lodash/fp/allPass.js diff --git a/node_modules/lodash/package/fp/always.js b/node_modules/globule/node_modules/lodash/fp/always.js similarity index 100% rename from node_modules/lodash/package/fp/always.js rename to node_modules/globule/node_modules/lodash/fp/always.js diff --git a/node_modules/lodash/package/fp/any.js b/node_modules/globule/node_modules/lodash/fp/any.js similarity index 100% rename from node_modules/lodash/package/fp/any.js rename to node_modules/globule/node_modules/lodash/fp/any.js diff --git a/node_modules/lodash/package/fp/anyPass.js b/node_modules/globule/node_modules/lodash/fp/anyPass.js similarity index 100% rename from node_modules/lodash/package/fp/anyPass.js rename to node_modules/globule/node_modules/lodash/fp/anyPass.js diff --git a/node_modules/lodash/package/fp/apply.js b/node_modules/globule/node_modules/lodash/fp/apply.js similarity index 100% rename from node_modules/lodash/package/fp/apply.js rename to node_modules/globule/node_modules/lodash/fp/apply.js diff --git a/node_modules/lodash/package/fp/array.js b/node_modules/globule/node_modules/lodash/fp/array.js similarity index 100% rename from node_modules/lodash/package/fp/array.js rename to node_modules/globule/node_modules/lodash/fp/array.js diff --git a/node_modules/lodash/package/fp/ary.js b/node_modules/globule/node_modules/lodash/fp/ary.js similarity index 100% rename from node_modules/lodash/package/fp/ary.js rename to node_modules/globule/node_modules/lodash/fp/ary.js diff --git a/node_modules/lodash/package/fp/assign.js b/node_modules/globule/node_modules/lodash/fp/assign.js similarity index 100% rename from node_modules/lodash/package/fp/assign.js rename to node_modules/globule/node_modules/lodash/fp/assign.js diff --git a/node_modules/lodash/package/fp/matches.js b/node_modules/globule/node_modules/lodash/fp/assignAll.js similarity index 56% rename from node_modules/lodash/package/fp/matches.js rename to node_modules/globule/node_modules/lodash/fp/assignAll.js index 629399c..b1d36c7 100644 --- a/node_modules/lodash/package/fp/matches.js +++ b/node_modules/globule/node_modules/lodash/fp/assignAll.js @@ -1,5 +1,5 @@ var convert = require('./convert'), - func = convert('matches', require('../matches'), require('./_falseOptions')); + func = convert('assignAll', require('../assign')); func.placeholder = require('./placeholder'); module.exports = func; diff --git a/node_modules/globule/node_modules/lodash/fp/assignAllWith.js b/node_modules/globule/node_modules/lodash/fp/assignAllWith.js new file mode 100644 index 0000000..21e836e --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/assignAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignAllWith', require('../assignWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/package/fp/assignIn.js b/node_modules/globule/node_modules/lodash/fp/assignIn.js similarity index 100% rename from node_modules/lodash/package/fp/assignIn.js rename to node_modules/globule/node_modules/lodash/fp/assignIn.js diff --git a/node_modules/globule/node_modules/lodash/fp/assignInAll.js b/node_modules/globule/node_modules/lodash/fp/assignInAll.js new file mode 100644 index 0000000..7ba75db --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/assignInAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInAll', require('../assignIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/globule/node_modules/lodash/fp/assignInAllWith.js b/node_modules/globule/node_modules/lodash/fp/assignInAllWith.js new file mode 100644 index 0000000..e766903 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/assignInAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInAllWith', require('../assignInWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/package/fp/assignInWith.js b/node_modules/globule/node_modules/lodash/fp/assignInWith.js similarity index 100% rename from node_modules/lodash/package/fp/assignInWith.js rename to node_modules/globule/node_modules/lodash/fp/assignInWith.js diff --git a/node_modules/lodash/package/fp/assignWith.js b/node_modules/globule/node_modules/lodash/fp/assignWith.js similarity index 100% rename from node_modules/lodash/package/fp/assignWith.js rename to node_modules/globule/node_modules/lodash/fp/assignWith.js diff --git a/node_modules/lodash/package/fp/assoc.js b/node_modules/globule/node_modules/lodash/fp/assoc.js similarity index 100% rename from node_modules/lodash/package/fp/assoc.js rename to node_modules/globule/node_modules/lodash/fp/assoc.js diff --git a/node_modules/lodash/package/fp/assocPath.js b/node_modules/globule/node_modules/lodash/fp/assocPath.js similarity index 100% rename from node_modules/lodash/package/fp/assocPath.js rename to node_modules/globule/node_modules/lodash/fp/assocPath.js diff --git a/node_modules/lodash/package/fp/at.js b/node_modules/globule/node_modules/lodash/fp/at.js similarity index 100% rename from node_modules/lodash/package/fp/at.js rename to node_modules/globule/node_modules/lodash/fp/at.js diff --git a/node_modules/lodash/package/fp/attempt.js b/node_modules/globule/node_modules/lodash/fp/attempt.js similarity index 100% rename from node_modules/lodash/package/fp/attempt.js rename to node_modules/globule/node_modules/lodash/fp/attempt.js diff --git a/node_modules/lodash/package/fp/before.js b/node_modules/globule/node_modules/lodash/fp/before.js similarity index 100% rename from node_modules/lodash/package/fp/before.js rename to node_modules/globule/node_modules/lodash/fp/before.js diff --git a/node_modules/lodash/package/fp/bind.js b/node_modules/globule/node_modules/lodash/fp/bind.js similarity index 100% rename from node_modules/lodash/package/fp/bind.js rename to node_modules/globule/node_modules/lodash/fp/bind.js diff --git a/node_modules/lodash/package/fp/bindAll.js b/node_modules/globule/node_modules/lodash/fp/bindAll.js similarity index 100% rename from node_modules/lodash/package/fp/bindAll.js rename to node_modules/globule/node_modules/lodash/fp/bindAll.js diff --git a/node_modules/lodash/package/fp/bindKey.js b/node_modules/globule/node_modules/lodash/fp/bindKey.js similarity index 100% rename from node_modules/lodash/package/fp/bindKey.js rename to node_modules/globule/node_modules/lodash/fp/bindKey.js diff --git a/node_modules/lodash/package/fp/camelCase.js b/node_modules/globule/node_modules/lodash/fp/camelCase.js similarity index 100% rename from node_modules/lodash/package/fp/camelCase.js rename to node_modules/globule/node_modules/lodash/fp/camelCase.js diff --git a/node_modules/lodash/package/fp/capitalize.js b/node_modules/globule/node_modules/lodash/fp/capitalize.js similarity index 100% rename from node_modules/lodash/package/fp/capitalize.js rename to node_modules/globule/node_modules/lodash/fp/capitalize.js diff --git a/node_modules/lodash/package/fp/castArray.js b/node_modules/globule/node_modules/lodash/fp/castArray.js similarity index 100% rename from node_modules/lodash/package/fp/castArray.js rename to node_modules/globule/node_modules/lodash/fp/castArray.js diff --git a/node_modules/lodash/package/fp/ceil.js b/node_modules/globule/node_modules/lodash/fp/ceil.js similarity index 100% rename from node_modules/lodash/package/fp/ceil.js rename to node_modules/globule/node_modules/lodash/fp/ceil.js diff --git a/node_modules/lodash/package/fp/chain.js b/node_modules/globule/node_modules/lodash/fp/chain.js similarity index 100% rename from node_modules/lodash/package/fp/chain.js rename to node_modules/globule/node_modules/lodash/fp/chain.js diff --git a/node_modules/lodash/package/fp/chunk.js b/node_modules/globule/node_modules/lodash/fp/chunk.js similarity index 100% rename from node_modules/lodash/package/fp/chunk.js rename to node_modules/globule/node_modules/lodash/fp/chunk.js diff --git a/node_modules/lodash/package/fp/clamp.js b/node_modules/globule/node_modules/lodash/fp/clamp.js similarity index 100% rename from node_modules/lodash/package/fp/clamp.js rename to node_modules/globule/node_modules/lodash/fp/clamp.js diff --git a/node_modules/lodash/package/fp/clone.js b/node_modules/globule/node_modules/lodash/fp/clone.js similarity index 100% rename from node_modules/lodash/package/fp/clone.js rename to node_modules/globule/node_modules/lodash/fp/clone.js diff --git a/node_modules/lodash/package/fp/cloneDeep.js b/node_modules/globule/node_modules/lodash/fp/cloneDeep.js similarity index 100% rename from node_modules/lodash/package/fp/cloneDeep.js rename to node_modules/globule/node_modules/lodash/fp/cloneDeep.js diff --git a/node_modules/lodash/package/fp/cloneDeepWith.js b/node_modules/globule/node_modules/lodash/fp/cloneDeepWith.js similarity index 100% rename from node_modules/lodash/package/fp/cloneDeepWith.js rename to node_modules/globule/node_modules/lodash/fp/cloneDeepWith.js diff --git a/node_modules/lodash/package/fp/cloneWith.js b/node_modules/globule/node_modules/lodash/fp/cloneWith.js similarity index 100% rename from node_modules/lodash/package/fp/cloneWith.js rename to node_modules/globule/node_modules/lodash/fp/cloneWith.js diff --git a/node_modules/lodash/package/fp/collection.js b/node_modules/globule/node_modules/lodash/fp/collection.js similarity index 100% rename from node_modules/lodash/package/fp/collection.js rename to node_modules/globule/node_modules/lodash/fp/collection.js diff --git a/node_modules/lodash/package/fp/commit.js b/node_modules/globule/node_modules/lodash/fp/commit.js similarity index 100% rename from node_modules/lodash/package/fp/commit.js rename to node_modules/globule/node_modules/lodash/fp/commit.js diff --git a/node_modules/lodash/package/fp/compact.js b/node_modules/globule/node_modules/lodash/fp/compact.js similarity index 100% rename from node_modules/lodash/package/fp/compact.js rename to node_modules/globule/node_modules/lodash/fp/compact.js diff --git a/node_modules/lodash/package/fp/complement.js b/node_modules/globule/node_modules/lodash/fp/complement.js similarity index 100% rename from node_modules/lodash/package/fp/complement.js rename to node_modules/globule/node_modules/lodash/fp/complement.js diff --git a/node_modules/lodash/package/fp/compose.js b/node_modules/globule/node_modules/lodash/fp/compose.js similarity index 100% rename from node_modules/lodash/package/fp/compose.js rename to node_modules/globule/node_modules/lodash/fp/compose.js diff --git a/node_modules/lodash/package/fp/concat.js b/node_modules/globule/node_modules/lodash/fp/concat.js similarity index 100% rename from node_modules/lodash/package/fp/concat.js rename to node_modules/globule/node_modules/lodash/fp/concat.js diff --git a/node_modules/lodash/package/fp/cond.js b/node_modules/globule/node_modules/lodash/fp/cond.js similarity index 100% rename from node_modules/lodash/package/fp/cond.js rename to node_modules/globule/node_modules/lodash/fp/cond.js diff --git a/node_modules/globule/node_modules/lodash/fp/conforms.js b/node_modules/globule/node_modules/lodash/fp/conforms.js new file mode 100644 index 0000000..3247f64 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/conforms.js @@ -0,0 +1 @@ +module.exports = require('./conformsTo'); diff --git a/node_modules/globule/node_modules/lodash/fp/conformsTo.js b/node_modules/globule/node_modules/lodash/fp/conformsTo.js new file mode 100644 index 0000000..aa7f41e --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/conformsTo.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('conformsTo', require('../conformsTo')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/package/fp/constant.js b/node_modules/globule/node_modules/lodash/fp/constant.js similarity index 100% rename from node_modules/lodash/package/fp/constant.js rename to node_modules/globule/node_modules/lodash/fp/constant.js diff --git a/node_modules/lodash/package/fp/contains.js b/node_modules/globule/node_modules/lodash/fp/contains.js similarity index 100% rename from node_modules/lodash/package/fp/contains.js rename to node_modules/globule/node_modules/lodash/fp/contains.js diff --git a/node_modules/lodash/package/fp/convert.js b/node_modules/globule/node_modules/lodash/fp/convert.js similarity index 100% rename from node_modules/lodash/package/fp/convert.js rename to node_modules/globule/node_modules/lodash/fp/convert.js diff --git a/node_modules/lodash/package/fp/countBy.js b/node_modules/globule/node_modules/lodash/fp/countBy.js similarity index 100% rename from node_modules/lodash/package/fp/countBy.js rename to node_modules/globule/node_modules/lodash/fp/countBy.js diff --git a/node_modules/lodash/package/fp/create.js b/node_modules/globule/node_modules/lodash/fp/create.js similarity index 100% rename from node_modules/lodash/package/fp/create.js rename to node_modules/globule/node_modules/lodash/fp/create.js diff --git a/node_modules/lodash/package/fp/curry.js b/node_modules/globule/node_modules/lodash/fp/curry.js similarity index 100% rename from node_modules/lodash/package/fp/curry.js rename to node_modules/globule/node_modules/lodash/fp/curry.js diff --git a/node_modules/lodash/package/fp/curryN.js b/node_modules/globule/node_modules/lodash/fp/curryN.js similarity index 100% rename from node_modules/lodash/package/fp/curryN.js rename to node_modules/globule/node_modules/lodash/fp/curryN.js diff --git a/node_modules/lodash/package/fp/curryRight.js b/node_modules/globule/node_modules/lodash/fp/curryRight.js similarity index 100% rename from node_modules/lodash/package/fp/curryRight.js rename to node_modules/globule/node_modules/lodash/fp/curryRight.js diff --git a/node_modules/lodash/package/fp/curryRightN.js b/node_modules/globule/node_modules/lodash/fp/curryRightN.js similarity index 100% rename from node_modules/lodash/package/fp/curryRightN.js rename to node_modules/globule/node_modules/lodash/fp/curryRightN.js diff --git a/node_modules/lodash/package/fp/date.js b/node_modules/globule/node_modules/lodash/fp/date.js similarity index 100% rename from node_modules/lodash/package/fp/date.js rename to node_modules/globule/node_modules/lodash/fp/date.js diff --git a/node_modules/lodash/package/fp/debounce.js b/node_modules/globule/node_modules/lodash/fp/debounce.js similarity index 100% rename from node_modules/lodash/package/fp/debounce.js rename to node_modules/globule/node_modules/lodash/fp/debounce.js diff --git a/node_modules/lodash/package/fp/deburr.js b/node_modules/globule/node_modules/lodash/fp/deburr.js similarity index 100% rename from node_modules/lodash/package/fp/deburr.js rename to node_modules/globule/node_modules/lodash/fp/deburr.js diff --git a/node_modules/globule/node_modules/lodash/fp/defaultTo.js b/node_modules/globule/node_modules/lodash/fp/defaultTo.js new file mode 100644 index 0000000..d6b52a4 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/defaultTo.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultTo', require('../defaultTo')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/package/fp/defaults.js b/node_modules/globule/node_modules/lodash/fp/defaults.js similarity index 100% rename from node_modules/lodash/package/fp/defaults.js rename to node_modules/globule/node_modules/lodash/fp/defaults.js diff --git a/node_modules/globule/node_modules/lodash/fp/defaultsAll.js b/node_modules/globule/node_modules/lodash/fp/defaultsAll.js new file mode 100644 index 0000000..238fcc3 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/defaultsAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsAll', require('../defaults')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/package/fp/defaultsDeep.js b/node_modules/globule/node_modules/lodash/fp/defaultsDeep.js similarity index 100% rename from node_modules/lodash/package/fp/defaultsDeep.js rename to node_modules/globule/node_modules/lodash/fp/defaultsDeep.js diff --git a/node_modules/globule/node_modules/lodash/fp/defaultsDeepAll.js b/node_modules/globule/node_modules/lodash/fp/defaultsDeepAll.js new file mode 100644 index 0000000..6835f2f --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/defaultsDeepAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsDeepAll', require('../defaultsDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/package/fp/defer.js b/node_modules/globule/node_modules/lodash/fp/defer.js similarity index 100% rename from node_modules/lodash/package/fp/defer.js rename to node_modules/globule/node_modules/lodash/fp/defer.js diff --git a/node_modules/lodash/package/fp/delay.js b/node_modules/globule/node_modules/lodash/fp/delay.js similarity index 100% rename from node_modules/lodash/package/fp/delay.js rename to node_modules/globule/node_modules/lodash/fp/delay.js diff --git a/node_modules/lodash/package/fp/difference.js b/node_modules/globule/node_modules/lodash/fp/difference.js similarity index 100% rename from node_modules/lodash/package/fp/difference.js rename to node_modules/globule/node_modules/lodash/fp/difference.js diff --git a/node_modules/lodash/package/fp/differenceBy.js b/node_modules/globule/node_modules/lodash/fp/differenceBy.js similarity index 100% rename from node_modules/lodash/package/fp/differenceBy.js rename to node_modules/globule/node_modules/lodash/fp/differenceBy.js diff --git a/node_modules/lodash/package/fp/differenceWith.js b/node_modules/globule/node_modules/lodash/fp/differenceWith.js similarity index 100% rename from node_modules/lodash/package/fp/differenceWith.js rename to node_modules/globule/node_modules/lodash/fp/differenceWith.js diff --git a/node_modules/lodash/package/fp/dissoc.js b/node_modules/globule/node_modules/lodash/fp/dissoc.js similarity index 100% rename from node_modules/lodash/package/fp/dissoc.js rename to node_modules/globule/node_modules/lodash/fp/dissoc.js diff --git a/node_modules/lodash/package/fp/dissocPath.js b/node_modules/globule/node_modules/lodash/fp/dissocPath.js similarity index 100% rename from node_modules/lodash/package/fp/dissocPath.js rename to node_modules/globule/node_modules/lodash/fp/dissocPath.js diff --git a/node_modules/lodash/package/fp/divide.js b/node_modules/globule/node_modules/lodash/fp/divide.js similarity index 100% rename from node_modules/lodash/package/fp/divide.js rename to node_modules/globule/node_modules/lodash/fp/divide.js diff --git a/node_modules/lodash/package/fp/drop.js b/node_modules/globule/node_modules/lodash/fp/drop.js similarity index 100% rename from node_modules/lodash/package/fp/drop.js rename to node_modules/globule/node_modules/lodash/fp/drop.js diff --git a/node_modules/globule/node_modules/lodash/fp/dropLast.js b/node_modules/globule/node_modules/lodash/fp/dropLast.js new file mode 100644 index 0000000..174e525 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/dropLast.js @@ -0,0 +1 @@ +module.exports = require('./dropRight'); diff --git a/node_modules/globule/node_modules/lodash/fp/dropLastWhile.js b/node_modules/globule/node_modules/lodash/fp/dropLastWhile.js new file mode 100644 index 0000000..be2a9d2 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/dropLastWhile.js @@ -0,0 +1 @@ +module.exports = require('./dropRightWhile'); diff --git a/node_modules/lodash/package/fp/dropRight.js b/node_modules/globule/node_modules/lodash/fp/dropRight.js similarity index 100% rename from node_modules/lodash/package/fp/dropRight.js rename to node_modules/globule/node_modules/lodash/fp/dropRight.js diff --git a/node_modules/lodash/package/fp/dropRightWhile.js b/node_modules/globule/node_modules/lodash/fp/dropRightWhile.js similarity index 100% rename from node_modules/lodash/package/fp/dropRightWhile.js rename to node_modules/globule/node_modules/lodash/fp/dropRightWhile.js diff --git a/node_modules/lodash/package/fp/dropWhile.js b/node_modules/globule/node_modules/lodash/fp/dropWhile.js similarity index 100% rename from node_modules/lodash/package/fp/dropWhile.js rename to node_modules/globule/node_modules/lodash/fp/dropWhile.js diff --git a/node_modules/lodash/package/fp/each.js b/node_modules/globule/node_modules/lodash/fp/each.js similarity index 100% rename from node_modules/lodash/package/fp/each.js rename to node_modules/globule/node_modules/lodash/fp/each.js diff --git a/node_modules/lodash/package/fp/eachRight.js b/node_modules/globule/node_modules/lodash/fp/eachRight.js similarity index 100% rename from node_modules/lodash/package/fp/eachRight.js rename to node_modules/globule/node_modules/lodash/fp/eachRight.js diff --git a/node_modules/lodash/package/fp/endsWith.js b/node_modules/globule/node_modules/lodash/fp/endsWith.js similarity index 100% rename from node_modules/lodash/package/fp/endsWith.js rename to node_modules/globule/node_modules/lodash/fp/endsWith.js diff --git a/node_modules/lodash/package/fp/entries.js b/node_modules/globule/node_modules/lodash/fp/entries.js similarity index 100% rename from node_modules/lodash/package/fp/entries.js rename to node_modules/globule/node_modules/lodash/fp/entries.js diff --git a/node_modules/lodash/package/fp/entriesIn.js b/node_modules/globule/node_modules/lodash/fp/entriesIn.js similarity index 100% rename from node_modules/lodash/package/fp/entriesIn.js rename to node_modules/globule/node_modules/lodash/fp/entriesIn.js diff --git a/node_modules/lodash/package/fp/eq.js b/node_modules/globule/node_modules/lodash/fp/eq.js similarity index 100% rename from node_modules/lodash/package/fp/eq.js rename to node_modules/globule/node_modules/lodash/fp/eq.js diff --git a/node_modules/lodash/package/fp/equals.js b/node_modules/globule/node_modules/lodash/fp/equals.js similarity index 100% rename from node_modules/lodash/package/fp/equals.js rename to node_modules/globule/node_modules/lodash/fp/equals.js diff --git a/node_modules/lodash/package/fp/escape.js b/node_modules/globule/node_modules/lodash/fp/escape.js similarity index 100% rename from node_modules/lodash/package/fp/escape.js rename to node_modules/globule/node_modules/lodash/fp/escape.js diff --git a/node_modules/lodash/package/fp/escapeRegExp.js b/node_modules/globule/node_modules/lodash/fp/escapeRegExp.js similarity index 100% rename from node_modules/lodash/package/fp/escapeRegExp.js rename to node_modules/globule/node_modules/lodash/fp/escapeRegExp.js diff --git a/node_modules/lodash/package/fp/every.js b/node_modules/globule/node_modules/lodash/fp/every.js similarity index 100% rename from node_modules/lodash/package/fp/every.js rename to node_modules/globule/node_modules/lodash/fp/every.js diff --git a/node_modules/lodash/package/fp/extend.js b/node_modules/globule/node_modules/lodash/fp/extend.js similarity index 100% rename from node_modules/lodash/package/fp/extend.js rename to node_modules/globule/node_modules/lodash/fp/extend.js diff --git a/node_modules/globule/node_modules/lodash/fp/extendAll.js b/node_modules/globule/node_modules/lodash/fp/extendAll.js new file mode 100644 index 0000000..cc55b64 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/extendAll.js @@ -0,0 +1 @@ +module.exports = require('./assignInAll'); diff --git a/node_modules/globule/node_modules/lodash/fp/extendAllWith.js b/node_modules/globule/node_modules/lodash/fp/extendAllWith.js new file mode 100644 index 0000000..6679d20 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/extendAllWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInAllWith'); diff --git a/node_modules/lodash/package/fp/extendWith.js b/node_modules/globule/node_modules/lodash/fp/extendWith.js similarity index 100% rename from node_modules/lodash/package/fp/extendWith.js rename to node_modules/globule/node_modules/lodash/fp/extendWith.js diff --git a/node_modules/lodash/package/fp/fill.js b/node_modules/globule/node_modules/lodash/fp/fill.js similarity index 100% rename from node_modules/lodash/package/fp/fill.js rename to node_modules/globule/node_modules/lodash/fp/fill.js diff --git a/node_modules/lodash/package/fp/filter.js b/node_modules/globule/node_modules/lodash/fp/filter.js similarity index 100% rename from node_modules/lodash/package/fp/filter.js rename to node_modules/globule/node_modules/lodash/fp/filter.js diff --git a/node_modules/lodash/package/fp/find.js b/node_modules/globule/node_modules/lodash/fp/find.js similarity index 100% rename from node_modules/lodash/package/fp/find.js rename to node_modules/globule/node_modules/lodash/fp/find.js diff --git a/node_modules/globule/node_modules/lodash/fp/findFrom.js b/node_modules/globule/node_modules/lodash/fp/findFrom.js new file mode 100644 index 0000000..da8275e --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/findFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findFrom', require('../find')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/package/fp/findIndex.js b/node_modules/globule/node_modules/lodash/fp/findIndex.js similarity index 100% rename from node_modules/lodash/package/fp/findIndex.js rename to node_modules/globule/node_modules/lodash/fp/findIndex.js diff --git a/node_modules/globule/node_modules/lodash/fp/findIndexFrom.js b/node_modules/globule/node_modules/lodash/fp/findIndexFrom.js new file mode 100644 index 0000000..32e98cb --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/findIndexFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findIndexFrom', require('../findIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/package/fp/findKey.js b/node_modules/globule/node_modules/lodash/fp/findKey.js similarity index 100% rename from node_modules/lodash/package/fp/findKey.js rename to node_modules/globule/node_modules/lodash/fp/findKey.js diff --git a/node_modules/lodash/package/fp/findLast.js b/node_modules/globule/node_modules/lodash/fp/findLast.js similarity index 100% rename from node_modules/lodash/package/fp/findLast.js rename to node_modules/globule/node_modules/lodash/fp/findLast.js diff --git a/node_modules/globule/node_modules/lodash/fp/findLastFrom.js b/node_modules/globule/node_modules/lodash/fp/findLastFrom.js new file mode 100644 index 0000000..76c38fb --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/findLastFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastFrom', require('../findLast')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/package/fp/findLastIndex.js b/node_modules/globule/node_modules/lodash/fp/findLastIndex.js similarity index 100% rename from node_modules/lodash/package/fp/findLastIndex.js rename to node_modules/globule/node_modules/lodash/fp/findLastIndex.js diff --git a/node_modules/globule/node_modules/lodash/fp/findLastIndexFrom.js b/node_modules/globule/node_modules/lodash/fp/findLastIndexFrom.js new file mode 100644 index 0000000..34c8176 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/findLastIndexFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastIndexFrom', require('../findLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/package/fp/findLastKey.js b/node_modules/globule/node_modules/lodash/fp/findLastKey.js similarity index 100% rename from node_modules/lodash/package/fp/findLastKey.js rename to node_modules/globule/node_modules/lodash/fp/findLastKey.js diff --git a/node_modules/globule/node_modules/lodash/fp/first.js b/node_modules/globule/node_modules/lodash/fp/first.js new file mode 100644 index 0000000..53f4ad1 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/first.js @@ -0,0 +1 @@ +module.exports = require('./head'); diff --git a/node_modules/lodash/package/fp/flatMap.js b/node_modules/globule/node_modules/lodash/fp/flatMap.js similarity index 100% rename from node_modules/lodash/package/fp/flatMap.js rename to node_modules/globule/node_modules/lodash/fp/flatMap.js diff --git a/node_modules/lodash/package/fp/flatMapDeep.js b/node_modules/globule/node_modules/lodash/fp/flatMapDeep.js similarity index 100% rename from node_modules/lodash/package/fp/flatMapDeep.js rename to node_modules/globule/node_modules/lodash/fp/flatMapDeep.js diff --git a/node_modules/lodash/package/fp/flatMapDepth.js b/node_modules/globule/node_modules/lodash/fp/flatMapDepth.js similarity index 100% rename from node_modules/lodash/package/fp/flatMapDepth.js rename to node_modules/globule/node_modules/lodash/fp/flatMapDepth.js diff --git a/node_modules/lodash/package/fp/flatten.js b/node_modules/globule/node_modules/lodash/fp/flatten.js similarity index 100% rename from node_modules/lodash/package/fp/flatten.js rename to node_modules/globule/node_modules/lodash/fp/flatten.js diff --git a/node_modules/lodash/package/fp/flattenDeep.js b/node_modules/globule/node_modules/lodash/fp/flattenDeep.js similarity index 100% rename from node_modules/lodash/package/fp/flattenDeep.js rename to node_modules/globule/node_modules/lodash/fp/flattenDeep.js diff --git a/node_modules/lodash/package/fp/flattenDepth.js b/node_modules/globule/node_modules/lodash/fp/flattenDepth.js similarity index 100% rename from node_modules/lodash/package/fp/flattenDepth.js rename to node_modules/globule/node_modules/lodash/fp/flattenDepth.js diff --git a/node_modules/lodash/package/fp/flip.js b/node_modules/globule/node_modules/lodash/fp/flip.js similarity index 100% rename from node_modules/lodash/package/fp/flip.js rename to node_modules/globule/node_modules/lodash/fp/flip.js diff --git a/node_modules/lodash/package/fp/floor.js b/node_modules/globule/node_modules/lodash/fp/floor.js similarity index 100% rename from node_modules/lodash/package/fp/floor.js rename to node_modules/globule/node_modules/lodash/fp/floor.js diff --git a/node_modules/lodash/package/fp/flow.js b/node_modules/globule/node_modules/lodash/fp/flow.js similarity index 100% rename from node_modules/lodash/package/fp/flow.js rename to node_modules/globule/node_modules/lodash/fp/flow.js diff --git a/node_modules/lodash/package/fp/flowRight.js b/node_modules/globule/node_modules/lodash/fp/flowRight.js similarity index 100% rename from node_modules/lodash/package/fp/flowRight.js rename to node_modules/globule/node_modules/lodash/fp/flowRight.js diff --git a/node_modules/lodash/package/fp/forEach.js b/node_modules/globule/node_modules/lodash/fp/forEach.js similarity index 100% rename from node_modules/lodash/package/fp/forEach.js rename to node_modules/globule/node_modules/lodash/fp/forEach.js diff --git a/node_modules/lodash/package/fp/forEachRight.js b/node_modules/globule/node_modules/lodash/fp/forEachRight.js similarity index 100% rename from node_modules/lodash/package/fp/forEachRight.js rename to node_modules/globule/node_modules/lodash/fp/forEachRight.js diff --git a/node_modules/lodash/package/fp/forIn.js b/node_modules/globule/node_modules/lodash/fp/forIn.js similarity index 100% rename from node_modules/lodash/package/fp/forIn.js rename to node_modules/globule/node_modules/lodash/fp/forIn.js diff --git a/node_modules/lodash/package/fp/forInRight.js b/node_modules/globule/node_modules/lodash/fp/forInRight.js similarity index 100% rename from node_modules/lodash/package/fp/forInRight.js rename to node_modules/globule/node_modules/lodash/fp/forInRight.js diff --git a/node_modules/lodash/package/fp/forOwn.js b/node_modules/globule/node_modules/lodash/fp/forOwn.js similarity index 100% rename from node_modules/lodash/package/fp/forOwn.js rename to node_modules/globule/node_modules/lodash/fp/forOwn.js diff --git a/node_modules/lodash/package/fp/forOwnRight.js b/node_modules/globule/node_modules/lodash/fp/forOwnRight.js similarity index 100% rename from node_modules/lodash/package/fp/forOwnRight.js rename to node_modules/globule/node_modules/lodash/fp/forOwnRight.js diff --git a/node_modules/lodash/package/fp/fromPairs.js b/node_modules/globule/node_modules/lodash/fp/fromPairs.js similarity index 100% rename from node_modules/lodash/package/fp/fromPairs.js rename to node_modules/globule/node_modules/lodash/fp/fromPairs.js diff --git a/node_modules/lodash/package/fp/function.js b/node_modules/globule/node_modules/lodash/fp/function.js similarity index 100% rename from node_modules/lodash/package/fp/function.js rename to node_modules/globule/node_modules/lodash/fp/function.js diff --git a/node_modules/lodash/package/fp/functions.js b/node_modules/globule/node_modules/lodash/fp/functions.js similarity index 100% rename from node_modules/lodash/package/fp/functions.js rename to node_modules/globule/node_modules/lodash/fp/functions.js diff --git a/node_modules/lodash/package/fp/functionsIn.js b/node_modules/globule/node_modules/lodash/fp/functionsIn.js similarity index 100% rename from node_modules/lodash/package/fp/functionsIn.js rename to node_modules/globule/node_modules/lodash/fp/functionsIn.js diff --git a/node_modules/lodash/package/fp/get.js b/node_modules/globule/node_modules/lodash/fp/get.js similarity index 100% rename from node_modules/lodash/package/fp/get.js rename to node_modules/globule/node_modules/lodash/fp/get.js diff --git a/node_modules/lodash/package/fp/getOr.js b/node_modules/globule/node_modules/lodash/fp/getOr.js similarity index 100% rename from node_modules/lodash/package/fp/getOr.js rename to node_modules/globule/node_modules/lodash/fp/getOr.js diff --git a/node_modules/lodash/package/fp/groupBy.js b/node_modules/globule/node_modules/lodash/fp/groupBy.js similarity index 100% rename from node_modules/lodash/package/fp/groupBy.js rename to node_modules/globule/node_modules/lodash/fp/groupBy.js diff --git a/node_modules/lodash/package/fp/gt.js b/node_modules/globule/node_modules/lodash/fp/gt.js similarity index 100% rename from node_modules/lodash/package/fp/gt.js rename to node_modules/globule/node_modules/lodash/fp/gt.js diff --git a/node_modules/lodash/package/fp/gte.js b/node_modules/globule/node_modules/lodash/fp/gte.js similarity index 100% rename from node_modules/lodash/package/fp/gte.js rename to node_modules/globule/node_modules/lodash/fp/gte.js diff --git a/node_modules/lodash/package/fp/has.js b/node_modules/globule/node_modules/lodash/fp/has.js similarity index 100% rename from node_modules/lodash/package/fp/has.js rename to node_modules/globule/node_modules/lodash/fp/has.js diff --git a/node_modules/lodash/package/fp/hasIn.js b/node_modules/globule/node_modules/lodash/fp/hasIn.js similarity index 100% rename from node_modules/lodash/package/fp/hasIn.js rename to node_modules/globule/node_modules/lodash/fp/hasIn.js diff --git a/node_modules/lodash/package/fp/head.js b/node_modules/globule/node_modules/lodash/fp/head.js similarity index 100% rename from node_modules/lodash/package/fp/head.js rename to node_modules/globule/node_modules/lodash/fp/head.js diff --git a/node_modules/lodash/package/fp/identical.js b/node_modules/globule/node_modules/lodash/fp/identical.js similarity index 100% rename from node_modules/lodash/package/fp/identical.js rename to node_modules/globule/node_modules/lodash/fp/identical.js diff --git a/node_modules/lodash/package/fp/identity.js b/node_modules/globule/node_modules/lodash/fp/identity.js similarity index 100% rename from node_modules/lodash/package/fp/identity.js rename to node_modules/globule/node_modules/lodash/fp/identity.js diff --git a/node_modules/lodash/package/fp/inRange.js b/node_modules/globule/node_modules/lodash/fp/inRange.js similarity index 100% rename from node_modules/lodash/package/fp/inRange.js rename to node_modules/globule/node_modules/lodash/fp/inRange.js diff --git a/node_modules/lodash/package/fp/includes.js b/node_modules/globule/node_modules/lodash/fp/includes.js similarity index 100% rename from node_modules/lodash/package/fp/includes.js rename to node_modules/globule/node_modules/lodash/fp/includes.js diff --git a/node_modules/globule/node_modules/lodash/fp/includesFrom.js b/node_modules/globule/node_modules/lodash/fp/includesFrom.js new file mode 100644 index 0000000..683afdb --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/includesFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('includesFrom', require('../includes')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/globule/node_modules/lodash/fp/indexBy.js b/node_modules/globule/node_modules/lodash/fp/indexBy.js new file mode 100644 index 0000000..7e64bc0 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/indexBy.js @@ -0,0 +1 @@ +module.exports = require('./keyBy'); diff --git a/node_modules/lodash/package/fp/indexOf.js b/node_modules/globule/node_modules/lodash/fp/indexOf.js similarity index 100% rename from node_modules/lodash/package/fp/indexOf.js rename to node_modules/globule/node_modules/lodash/fp/indexOf.js diff --git a/node_modules/globule/node_modules/lodash/fp/indexOfFrom.js b/node_modules/globule/node_modules/lodash/fp/indexOfFrom.js new file mode 100644 index 0000000..d99c822 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/indexOfFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('indexOfFrom', require('../indexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/package/fp/init.js b/node_modules/globule/node_modules/lodash/fp/init.js similarity index 100% rename from node_modules/lodash/package/fp/init.js rename to node_modules/globule/node_modules/lodash/fp/init.js diff --git a/node_modules/lodash/package/fp/initial.js b/node_modules/globule/node_modules/lodash/fp/initial.js similarity index 100% rename from node_modules/lodash/package/fp/initial.js rename to node_modules/globule/node_modules/lodash/fp/initial.js diff --git a/node_modules/lodash/package/fp/intersection.js b/node_modules/globule/node_modules/lodash/fp/intersection.js similarity index 100% rename from node_modules/lodash/package/fp/intersection.js rename to node_modules/globule/node_modules/lodash/fp/intersection.js diff --git a/node_modules/lodash/package/fp/intersectionBy.js b/node_modules/globule/node_modules/lodash/fp/intersectionBy.js similarity index 100% rename from node_modules/lodash/package/fp/intersectionBy.js rename to node_modules/globule/node_modules/lodash/fp/intersectionBy.js diff --git a/node_modules/lodash/package/fp/intersectionWith.js b/node_modules/globule/node_modules/lodash/fp/intersectionWith.js similarity index 100% rename from node_modules/lodash/package/fp/intersectionWith.js rename to node_modules/globule/node_modules/lodash/fp/intersectionWith.js diff --git a/node_modules/lodash/package/fp/invert.js b/node_modules/globule/node_modules/lodash/fp/invert.js similarity index 100% rename from node_modules/lodash/package/fp/invert.js rename to node_modules/globule/node_modules/lodash/fp/invert.js diff --git a/node_modules/lodash/package/fp/invertBy.js b/node_modules/globule/node_modules/lodash/fp/invertBy.js similarity index 100% rename from node_modules/lodash/package/fp/invertBy.js rename to node_modules/globule/node_modules/lodash/fp/invertBy.js diff --git a/node_modules/lodash/package/fp/invertObj.js b/node_modules/globule/node_modules/lodash/fp/invertObj.js similarity index 100% rename from node_modules/lodash/package/fp/invertObj.js rename to node_modules/globule/node_modules/lodash/fp/invertObj.js diff --git a/node_modules/lodash/package/fp/invoke.js b/node_modules/globule/node_modules/lodash/fp/invoke.js similarity index 100% rename from node_modules/lodash/package/fp/invoke.js rename to node_modules/globule/node_modules/lodash/fp/invoke.js diff --git a/node_modules/lodash/package/fp/invokeArgs.js b/node_modules/globule/node_modules/lodash/fp/invokeArgs.js similarity index 100% rename from node_modules/lodash/package/fp/invokeArgs.js rename to node_modules/globule/node_modules/lodash/fp/invokeArgs.js diff --git a/node_modules/lodash/package/fp/invokeArgsMap.js b/node_modules/globule/node_modules/lodash/fp/invokeArgsMap.js similarity index 100% rename from node_modules/lodash/package/fp/invokeArgsMap.js rename to node_modules/globule/node_modules/lodash/fp/invokeArgsMap.js diff --git a/node_modules/lodash/package/fp/invokeMap.js b/node_modules/globule/node_modules/lodash/fp/invokeMap.js similarity index 100% rename from node_modules/lodash/package/fp/invokeMap.js rename to node_modules/globule/node_modules/lodash/fp/invokeMap.js diff --git a/node_modules/lodash/package/fp/isArguments.js b/node_modules/globule/node_modules/lodash/fp/isArguments.js similarity index 100% rename from node_modules/lodash/package/fp/isArguments.js rename to node_modules/globule/node_modules/lodash/fp/isArguments.js diff --git a/node_modules/lodash/package/fp/isArray.js b/node_modules/globule/node_modules/lodash/fp/isArray.js similarity index 100% rename from node_modules/lodash/package/fp/isArray.js rename to node_modules/globule/node_modules/lodash/fp/isArray.js diff --git a/node_modules/lodash/package/fp/isArrayBuffer.js b/node_modules/globule/node_modules/lodash/fp/isArrayBuffer.js similarity index 100% rename from node_modules/lodash/package/fp/isArrayBuffer.js rename to node_modules/globule/node_modules/lodash/fp/isArrayBuffer.js diff --git a/node_modules/lodash/package/fp/isArrayLike.js b/node_modules/globule/node_modules/lodash/fp/isArrayLike.js similarity index 100% rename from node_modules/lodash/package/fp/isArrayLike.js rename to node_modules/globule/node_modules/lodash/fp/isArrayLike.js diff --git a/node_modules/lodash/package/fp/isArrayLikeObject.js b/node_modules/globule/node_modules/lodash/fp/isArrayLikeObject.js similarity index 100% rename from node_modules/lodash/package/fp/isArrayLikeObject.js rename to node_modules/globule/node_modules/lodash/fp/isArrayLikeObject.js diff --git a/node_modules/lodash/package/fp/isBoolean.js b/node_modules/globule/node_modules/lodash/fp/isBoolean.js similarity index 100% rename from node_modules/lodash/package/fp/isBoolean.js rename to node_modules/globule/node_modules/lodash/fp/isBoolean.js diff --git a/node_modules/lodash/package/fp/isBuffer.js b/node_modules/globule/node_modules/lodash/fp/isBuffer.js similarity index 100% rename from node_modules/lodash/package/fp/isBuffer.js rename to node_modules/globule/node_modules/lodash/fp/isBuffer.js diff --git a/node_modules/lodash/package/fp/isDate.js b/node_modules/globule/node_modules/lodash/fp/isDate.js similarity index 100% rename from node_modules/lodash/package/fp/isDate.js rename to node_modules/globule/node_modules/lodash/fp/isDate.js diff --git a/node_modules/lodash/package/fp/isElement.js b/node_modules/globule/node_modules/lodash/fp/isElement.js similarity index 100% rename from node_modules/lodash/package/fp/isElement.js rename to node_modules/globule/node_modules/lodash/fp/isElement.js diff --git a/node_modules/lodash/package/fp/isEmpty.js b/node_modules/globule/node_modules/lodash/fp/isEmpty.js similarity index 100% rename from node_modules/lodash/package/fp/isEmpty.js rename to node_modules/globule/node_modules/lodash/fp/isEmpty.js diff --git a/node_modules/lodash/package/fp/isEqual.js b/node_modules/globule/node_modules/lodash/fp/isEqual.js similarity index 100% rename from node_modules/lodash/package/fp/isEqual.js rename to node_modules/globule/node_modules/lodash/fp/isEqual.js diff --git a/node_modules/lodash/package/fp/isEqualWith.js b/node_modules/globule/node_modules/lodash/fp/isEqualWith.js similarity index 100% rename from node_modules/lodash/package/fp/isEqualWith.js rename to node_modules/globule/node_modules/lodash/fp/isEqualWith.js diff --git a/node_modules/lodash/package/fp/isError.js b/node_modules/globule/node_modules/lodash/fp/isError.js similarity index 100% rename from node_modules/lodash/package/fp/isError.js rename to node_modules/globule/node_modules/lodash/fp/isError.js diff --git a/node_modules/lodash/package/fp/isFinite.js b/node_modules/globule/node_modules/lodash/fp/isFinite.js similarity index 100% rename from node_modules/lodash/package/fp/isFinite.js rename to node_modules/globule/node_modules/lodash/fp/isFinite.js diff --git a/node_modules/lodash/package/fp/isFunction.js b/node_modules/globule/node_modules/lodash/fp/isFunction.js similarity index 100% rename from node_modules/lodash/package/fp/isFunction.js rename to node_modules/globule/node_modules/lodash/fp/isFunction.js diff --git a/node_modules/lodash/package/fp/isInteger.js b/node_modules/globule/node_modules/lodash/fp/isInteger.js similarity index 100% rename from node_modules/lodash/package/fp/isInteger.js rename to node_modules/globule/node_modules/lodash/fp/isInteger.js diff --git a/node_modules/lodash/package/fp/isLength.js b/node_modules/globule/node_modules/lodash/fp/isLength.js similarity index 100% rename from node_modules/lodash/package/fp/isLength.js rename to node_modules/globule/node_modules/lodash/fp/isLength.js diff --git a/node_modules/lodash/package/fp/isMap.js b/node_modules/globule/node_modules/lodash/fp/isMap.js similarity index 100% rename from node_modules/lodash/package/fp/isMap.js rename to node_modules/globule/node_modules/lodash/fp/isMap.js diff --git a/node_modules/lodash/package/fp/isMatch.js b/node_modules/globule/node_modules/lodash/fp/isMatch.js similarity index 100% rename from node_modules/lodash/package/fp/isMatch.js rename to node_modules/globule/node_modules/lodash/fp/isMatch.js diff --git a/node_modules/lodash/package/fp/isMatchWith.js b/node_modules/globule/node_modules/lodash/fp/isMatchWith.js similarity index 100% rename from node_modules/lodash/package/fp/isMatchWith.js rename to node_modules/globule/node_modules/lodash/fp/isMatchWith.js diff --git a/node_modules/lodash/package/fp/isNaN.js b/node_modules/globule/node_modules/lodash/fp/isNaN.js similarity index 100% rename from node_modules/lodash/package/fp/isNaN.js rename to node_modules/globule/node_modules/lodash/fp/isNaN.js diff --git a/node_modules/lodash/package/fp/isNative.js b/node_modules/globule/node_modules/lodash/fp/isNative.js similarity index 100% rename from node_modules/lodash/package/fp/isNative.js rename to node_modules/globule/node_modules/lodash/fp/isNative.js diff --git a/node_modules/lodash/package/fp/isNil.js b/node_modules/globule/node_modules/lodash/fp/isNil.js similarity index 100% rename from node_modules/lodash/package/fp/isNil.js rename to node_modules/globule/node_modules/lodash/fp/isNil.js diff --git a/node_modules/lodash/package/fp/isNull.js b/node_modules/globule/node_modules/lodash/fp/isNull.js similarity index 100% rename from node_modules/lodash/package/fp/isNull.js rename to node_modules/globule/node_modules/lodash/fp/isNull.js diff --git a/node_modules/lodash/package/fp/isNumber.js b/node_modules/globule/node_modules/lodash/fp/isNumber.js similarity index 100% rename from node_modules/lodash/package/fp/isNumber.js rename to node_modules/globule/node_modules/lodash/fp/isNumber.js diff --git a/node_modules/lodash/package/fp/isObject.js b/node_modules/globule/node_modules/lodash/fp/isObject.js similarity index 100% rename from node_modules/lodash/package/fp/isObject.js rename to node_modules/globule/node_modules/lodash/fp/isObject.js diff --git a/node_modules/lodash/package/fp/isObjectLike.js b/node_modules/globule/node_modules/lodash/fp/isObjectLike.js similarity index 100% rename from node_modules/lodash/package/fp/isObjectLike.js rename to node_modules/globule/node_modules/lodash/fp/isObjectLike.js diff --git a/node_modules/lodash/package/fp/isPlainObject.js b/node_modules/globule/node_modules/lodash/fp/isPlainObject.js similarity index 100% rename from node_modules/lodash/package/fp/isPlainObject.js rename to node_modules/globule/node_modules/lodash/fp/isPlainObject.js diff --git a/node_modules/lodash/package/fp/isRegExp.js b/node_modules/globule/node_modules/lodash/fp/isRegExp.js similarity index 100% rename from node_modules/lodash/package/fp/isRegExp.js rename to node_modules/globule/node_modules/lodash/fp/isRegExp.js diff --git a/node_modules/lodash/package/fp/isSafeInteger.js b/node_modules/globule/node_modules/lodash/fp/isSafeInteger.js similarity index 100% rename from node_modules/lodash/package/fp/isSafeInteger.js rename to node_modules/globule/node_modules/lodash/fp/isSafeInteger.js diff --git a/node_modules/lodash/package/fp/isSet.js b/node_modules/globule/node_modules/lodash/fp/isSet.js similarity index 100% rename from node_modules/lodash/package/fp/isSet.js rename to node_modules/globule/node_modules/lodash/fp/isSet.js diff --git a/node_modules/lodash/package/fp/isString.js b/node_modules/globule/node_modules/lodash/fp/isString.js similarity index 100% rename from node_modules/lodash/package/fp/isString.js rename to node_modules/globule/node_modules/lodash/fp/isString.js diff --git a/node_modules/lodash/package/fp/isSymbol.js b/node_modules/globule/node_modules/lodash/fp/isSymbol.js similarity index 100% rename from node_modules/lodash/package/fp/isSymbol.js rename to node_modules/globule/node_modules/lodash/fp/isSymbol.js diff --git a/node_modules/lodash/package/fp/isTypedArray.js b/node_modules/globule/node_modules/lodash/fp/isTypedArray.js similarity index 100% rename from node_modules/lodash/package/fp/isTypedArray.js rename to node_modules/globule/node_modules/lodash/fp/isTypedArray.js diff --git a/node_modules/lodash/package/fp/isUndefined.js b/node_modules/globule/node_modules/lodash/fp/isUndefined.js similarity index 100% rename from node_modules/lodash/package/fp/isUndefined.js rename to node_modules/globule/node_modules/lodash/fp/isUndefined.js diff --git a/node_modules/lodash/package/fp/isWeakMap.js b/node_modules/globule/node_modules/lodash/fp/isWeakMap.js similarity index 100% rename from node_modules/lodash/package/fp/isWeakMap.js rename to node_modules/globule/node_modules/lodash/fp/isWeakMap.js diff --git a/node_modules/lodash/package/fp/isWeakSet.js b/node_modules/globule/node_modules/lodash/fp/isWeakSet.js similarity index 100% rename from node_modules/lodash/package/fp/isWeakSet.js rename to node_modules/globule/node_modules/lodash/fp/isWeakSet.js diff --git a/node_modules/lodash/package/fp/iteratee.js b/node_modules/globule/node_modules/lodash/fp/iteratee.js similarity index 100% rename from node_modules/lodash/package/fp/iteratee.js rename to node_modules/globule/node_modules/lodash/fp/iteratee.js diff --git a/node_modules/lodash/package/fp/join.js b/node_modules/globule/node_modules/lodash/fp/join.js similarity index 100% rename from node_modules/lodash/package/fp/join.js rename to node_modules/globule/node_modules/lodash/fp/join.js diff --git a/node_modules/lodash/package/fp/juxt.js b/node_modules/globule/node_modules/lodash/fp/juxt.js similarity index 100% rename from node_modules/lodash/package/fp/juxt.js rename to node_modules/globule/node_modules/lodash/fp/juxt.js diff --git a/node_modules/lodash/package/fp/kebabCase.js b/node_modules/globule/node_modules/lodash/fp/kebabCase.js similarity index 100% rename from node_modules/lodash/package/fp/kebabCase.js rename to node_modules/globule/node_modules/lodash/fp/kebabCase.js diff --git a/node_modules/lodash/package/fp/keyBy.js b/node_modules/globule/node_modules/lodash/fp/keyBy.js similarity index 100% rename from node_modules/lodash/package/fp/keyBy.js rename to node_modules/globule/node_modules/lodash/fp/keyBy.js diff --git a/node_modules/lodash/package/fp/keys.js b/node_modules/globule/node_modules/lodash/fp/keys.js similarity index 100% rename from node_modules/lodash/package/fp/keys.js rename to node_modules/globule/node_modules/lodash/fp/keys.js diff --git a/node_modules/lodash/package/fp/keysIn.js b/node_modules/globule/node_modules/lodash/fp/keysIn.js similarity index 100% rename from node_modules/lodash/package/fp/keysIn.js rename to node_modules/globule/node_modules/lodash/fp/keysIn.js diff --git a/node_modules/lodash/package/fp/lang.js b/node_modules/globule/node_modules/lodash/fp/lang.js similarity index 100% rename from node_modules/lodash/package/fp/lang.js rename to node_modules/globule/node_modules/lodash/fp/lang.js diff --git a/node_modules/lodash/package/fp/last.js b/node_modules/globule/node_modules/lodash/fp/last.js similarity index 100% rename from node_modules/lodash/package/fp/last.js rename to node_modules/globule/node_modules/lodash/fp/last.js diff --git a/node_modules/lodash/package/fp/lastIndexOf.js b/node_modules/globule/node_modules/lodash/fp/lastIndexOf.js similarity index 100% rename from node_modules/lodash/package/fp/lastIndexOf.js rename to node_modules/globule/node_modules/lodash/fp/lastIndexOf.js diff --git a/node_modules/globule/node_modules/lodash/fp/lastIndexOfFrom.js b/node_modules/globule/node_modules/lodash/fp/lastIndexOfFrom.js new file mode 100644 index 0000000..1ff6a0b --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/lastIndexOfFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lastIndexOfFrom', require('../lastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/package/fp/lowerCase.js b/node_modules/globule/node_modules/lodash/fp/lowerCase.js similarity index 100% rename from node_modules/lodash/package/fp/lowerCase.js rename to node_modules/globule/node_modules/lodash/fp/lowerCase.js diff --git a/node_modules/lodash/package/fp/lowerFirst.js b/node_modules/globule/node_modules/lodash/fp/lowerFirst.js similarity index 100% rename from node_modules/lodash/package/fp/lowerFirst.js rename to node_modules/globule/node_modules/lodash/fp/lowerFirst.js diff --git a/node_modules/lodash/package/fp/lt.js b/node_modules/globule/node_modules/lodash/fp/lt.js similarity index 100% rename from node_modules/lodash/package/fp/lt.js rename to node_modules/globule/node_modules/lodash/fp/lt.js diff --git a/node_modules/lodash/package/fp/lte.js b/node_modules/globule/node_modules/lodash/fp/lte.js similarity index 100% rename from node_modules/lodash/package/fp/lte.js rename to node_modules/globule/node_modules/lodash/fp/lte.js diff --git a/node_modules/lodash/package/fp/map.js b/node_modules/globule/node_modules/lodash/fp/map.js similarity index 100% rename from node_modules/lodash/package/fp/map.js rename to node_modules/globule/node_modules/lodash/fp/map.js diff --git a/node_modules/lodash/package/fp/mapKeys.js b/node_modules/globule/node_modules/lodash/fp/mapKeys.js similarity index 100% rename from node_modules/lodash/package/fp/mapKeys.js rename to node_modules/globule/node_modules/lodash/fp/mapKeys.js diff --git a/node_modules/lodash/package/fp/mapValues.js b/node_modules/globule/node_modules/lodash/fp/mapValues.js similarity index 100% rename from node_modules/lodash/package/fp/mapValues.js rename to node_modules/globule/node_modules/lodash/fp/mapValues.js diff --git a/node_modules/globule/node_modules/lodash/fp/matches.js b/node_modules/globule/node_modules/lodash/fp/matches.js new file mode 100644 index 0000000..29d1e1e --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/matches.js @@ -0,0 +1 @@ +module.exports = require('./isMatch'); diff --git a/node_modules/lodash/package/fp/matchesProperty.js b/node_modules/globule/node_modules/lodash/fp/matchesProperty.js similarity index 100% rename from node_modules/lodash/package/fp/matchesProperty.js rename to node_modules/globule/node_modules/lodash/fp/matchesProperty.js diff --git a/node_modules/lodash/package/fp/math.js b/node_modules/globule/node_modules/lodash/fp/math.js similarity index 100% rename from node_modules/lodash/package/fp/math.js rename to node_modules/globule/node_modules/lodash/fp/math.js diff --git a/node_modules/lodash/package/fp/max.js b/node_modules/globule/node_modules/lodash/fp/max.js similarity index 100% rename from node_modules/lodash/package/fp/max.js rename to node_modules/globule/node_modules/lodash/fp/max.js diff --git a/node_modules/lodash/package/fp/maxBy.js b/node_modules/globule/node_modules/lodash/fp/maxBy.js similarity index 100% rename from node_modules/lodash/package/fp/maxBy.js rename to node_modules/globule/node_modules/lodash/fp/maxBy.js diff --git a/node_modules/lodash/package/fp/mean.js b/node_modules/globule/node_modules/lodash/fp/mean.js similarity index 100% rename from node_modules/lodash/package/fp/mean.js rename to node_modules/globule/node_modules/lodash/fp/mean.js diff --git a/node_modules/lodash/package/fp/meanBy.js b/node_modules/globule/node_modules/lodash/fp/meanBy.js similarity index 100% rename from node_modules/lodash/package/fp/meanBy.js rename to node_modules/globule/node_modules/lodash/fp/meanBy.js diff --git a/node_modules/lodash/package/fp/memoize.js b/node_modules/globule/node_modules/lodash/fp/memoize.js similarity index 100% rename from node_modules/lodash/package/fp/memoize.js rename to node_modules/globule/node_modules/lodash/fp/memoize.js diff --git a/node_modules/lodash/package/fp/merge.js b/node_modules/globule/node_modules/lodash/fp/merge.js similarity index 100% rename from node_modules/lodash/package/fp/merge.js rename to node_modules/globule/node_modules/lodash/fp/merge.js diff --git a/node_modules/globule/node_modules/lodash/fp/mergeAll.js b/node_modules/globule/node_modules/lodash/fp/mergeAll.js new file mode 100644 index 0000000..a3674d6 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/mergeAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeAll', require('../merge')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/globule/node_modules/lodash/fp/mergeAllWith.js b/node_modules/globule/node_modules/lodash/fp/mergeAllWith.js new file mode 100644 index 0000000..4bd4206 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/mergeAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeAllWith', require('../mergeWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/package/fp/mergeWith.js b/node_modules/globule/node_modules/lodash/fp/mergeWith.js similarity index 100% rename from node_modules/lodash/package/fp/mergeWith.js rename to node_modules/globule/node_modules/lodash/fp/mergeWith.js diff --git a/node_modules/lodash/package/fp/method.js b/node_modules/globule/node_modules/lodash/fp/method.js similarity index 100% rename from node_modules/lodash/package/fp/method.js rename to node_modules/globule/node_modules/lodash/fp/method.js diff --git a/node_modules/lodash/package/fp/methodOf.js b/node_modules/globule/node_modules/lodash/fp/methodOf.js similarity index 100% rename from node_modules/lodash/package/fp/methodOf.js rename to node_modules/globule/node_modules/lodash/fp/methodOf.js diff --git a/node_modules/lodash/package/fp/min.js b/node_modules/globule/node_modules/lodash/fp/min.js similarity index 100% rename from node_modules/lodash/package/fp/min.js rename to node_modules/globule/node_modules/lodash/fp/min.js diff --git a/node_modules/lodash/package/fp/minBy.js b/node_modules/globule/node_modules/lodash/fp/minBy.js similarity index 100% rename from node_modules/lodash/package/fp/minBy.js rename to node_modules/globule/node_modules/lodash/fp/minBy.js diff --git a/node_modules/lodash/package/fp/mixin.js b/node_modules/globule/node_modules/lodash/fp/mixin.js similarity index 100% rename from node_modules/lodash/package/fp/mixin.js rename to node_modules/globule/node_modules/lodash/fp/mixin.js diff --git a/node_modules/lodash/package/fp/multiply.js b/node_modules/globule/node_modules/lodash/fp/multiply.js similarity index 100% rename from node_modules/lodash/package/fp/multiply.js rename to node_modules/globule/node_modules/lodash/fp/multiply.js diff --git a/node_modules/lodash/package/fp/nAry.js b/node_modules/globule/node_modules/lodash/fp/nAry.js similarity index 100% rename from node_modules/lodash/package/fp/nAry.js rename to node_modules/globule/node_modules/lodash/fp/nAry.js diff --git a/node_modules/lodash/package/fp/negate.js b/node_modules/globule/node_modules/lodash/fp/negate.js similarity index 100% rename from node_modules/lodash/package/fp/negate.js rename to node_modules/globule/node_modules/lodash/fp/negate.js diff --git a/node_modules/lodash/package/fp/next.js b/node_modules/globule/node_modules/lodash/fp/next.js similarity index 100% rename from node_modules/lodash/package/fp/next.js rename to node_modules/globule/node_modules/lodash/fp/next.js diff --git a/node_modules/lodash/package/fp/noop.js b/node_modules/globule/node_modules/lodash/fp/noop.js similarity index 100% rename from node_modules/lodash/package/fp/noop.js rename to node_modules/globule/node_modules/lodash/fp/noop.js diff --git a/node_modules/lodash/package/fp/now.js b/node_modules/globule/node_modules/lodash/fp/now.js similarity index 100% rename from node_modules/lodash/package/fp/now.js rename to node_modules/globule/node_modules/lodash/fp/now.js diff --git a/node_modules/lodash/package/fp/nth.js b/node_modules/globule/node_modules/lodash/fp/nth.js similarity index 100% rename from node_modules/lodash/package/fp/nth.js rename to node_modules/globule/node_modules/lodash/fp/nth.js diff --git a/node_modules/lodash/package/fp/nthArg.js b/node_modules/globule/node_modules/lodash/fp/nthArg.js similarity index 56% rename from node_modules/lodash/package/fp/nthArg.js rename to node_modules/globule/node_modules/lodash/fp/nthArg.js index 8ccd8e6..fce3165 100644 --- a/node_modules/lodash/package/fp/nthArg.js +++ b/node_modules/globule/node_modules/lodash/fp/nthArg.js @@ -1,5 +1,5 @@ var convert = require('./convert'), - func = convert('nthArg', require('../nthArg'), require('./_falseOptions')); + func = convert('nthArg', require('../nthArg')); func.placeholder = require('./placeholder'); module.exports = func; diff --git a/node_modules/lodash/package/fp/number.js b/node_modules/globule/node_modules/lodash/fp/number.js similarity index 100% rename from node_modules/lodash/package/fp/number.js rename to node_modules/globule/node_modules/lodash/fp/number.js diff --git a/node_modules/lodash/package/fp/object.js b/node_modules/globule/node_modules/lodash/fp/object.js similarity index 100% rename from node_modules/lodash/package/fp/object.js rename to node_modules/globule/node_modules/lodash/fp/object.js diff --git a/node_modules/lodash/package/fp/omit.js b/node_modules/globule/node_modules/lodash/fp/omit.js similarity index 100% rename from node_modules/lodash/package/fp/omit.js rename to node_modules/globule/node_modules/lodash/fp/omit.js diff --git a/node_modules/lodash/package/fp/omitAll.js b/node_modules/globule/node_modules/lodash/fp/omitAll.js similarity index 100% rename from node_modules/lodash/package/fp/omitAll.js rename to node_modules/globule/node_modules/lodash/fp/omitAll.js diff --git a/node_modules/lodash/package/fp/omitBy.js b/node_modules/globule/node_modules/lodash/fp/omitBy.js similarity index 100% rename from node_modules/lodash/package/fp/omitBy.js rename to node_modules/globule/node_modules/lodash/fp/omitBy.js diff --git a/node_modules/lodash/package/fp/once.js b/node_modules/globule/node_modules/lodash/fp/once.js similarity index 100% rename from node_modules/lodash/package/fp/once.js rename to node_modules/globule/node_modules/lodash/fp/once.js diff --git a/node_modules/lodash/package/fp/orderBy.js b/node_modules/globule/node_modules/lodash/fp/orderBy.js similarity index 100% rename from node_modules/lodash/package/fp/orderBy.js rename to node_modules/globule/node_modules/lodash/fp/orderBy.js diff --git a/node_modules/lodash/package/fp/over.js b/node_modules/globule/node_modules/lodash/fp/over.js similarity index 100% rename from node_modules/lodash/package/fp/over.js rename to node_modules/globule/node_modules/lodash/fp/over.js diff --git a/node_modules/lodash/package/fp/overArgs.js b/node_modules/globule/node_modules/lodash/fp/overArgs.js similarity index 100% rename from node_modules/lodash/package/fp/overArgs.js rename to node_modules/globule/node_modules/lodash/fp/overArgs.js diff --git a/node_modules/lodash/package/fp/overEvery.js b/node_modules/globule/node_modules/lodash/fp/overEvery.js similarity index 100% rename from node_modules/lodash/package/fp/overEvery.js rename to node_modules/globule/node_modules/lodash/fp/overEvery.js diff --git a/node_modules/lodash/package/fp/overSome.js b/node_modules/globule/node_modules/lodash/fp/overSome.js similarity index 100% rename from node_modules/lodash/package/fp/overSome.js rename to node_modules/globule/node_modules/lodash/fp/overSome.js diff --git a/node_modules/lodash/package/fp/pad.js b/node_modules/globule/node_modules/lodash/fp/pad.js similarity index 100% rename from node_modules/lodash/package/fp/pad.js rename to node_modules/globule/node_modules/lodash/fp/pad.js diff --git a/node_modules/lodash/package/fp/padChars.js b/node_modules/globule/node_modules/lodash/fp/padChars.js similarity index 100% rename from node_modules/lodash/package/fp/padChars.js rename to node_modules/globule/node_modules/lodash/fp/padChars.js diff --git a/node_modules/lodash/package/fp/padCharsEnd.js b/node_modules/globule/node_modules/lodash/fp/padCharsEnd.js similarity index 100% rename from node_modules/lodash/package/fp/padCharsEnd.js rename to node_modules/globule/node_modules/lodash/fp/padCharsEnd.js diff --git a/node_modules/lodash/package/fp/padCharsStart.js b/node_modules/globule/node_modules/lodash/fp/padCharsStart.js similarity index 100% rename from node_modules/lodash/package/fp/padCharsStart.js rename to node_modules/globule/node_modules/lodash/fp/padCharsStart.js diff --git a/node_modules/lodash/package/fp/padEnd.js b/node_modules/globule/node_modules/lodash/fp/padEnd.js similarity index 100% rename from node_modules/lodash/package/fp/padEnd.js rename to node_modules/globule/node_modules/lodash/fp/padEnd.js diff --git a/node_modules/lodash/package/fp/padStart.js b/node_modules/globule/node_modules/lodash/fp/padStart.js similarity index 100% rename from node_modules/lodash/package/fp/padStart.js rename to node_modules/globule/node_modules/lodash/fp/padStart.js diff --git a/node_modules/lodash/package/fp/parseInt.js b/node_modules/globule/node_modules/lodash/fp/parseInt.js similarity index 100% rename from node_modules/lodash/package/fp/parseInt.js rename to node_modules/globule/node_modules/lodash/fp/parseInt.js diff --git a/node_modules/lodash/package/fp/partial.js b/node_modules/globule/node_modules/lodash/fp/partial.js similarity index 100% rename from node_modules/lodash/package/fp/partial.js rename to node_modules/globule/node_modules/lodash/fp/partial.js diff --git a/node_modules/lodash/package/fp/partialRight.js b/node_modules/globule/node_modules/lodash/fp/partialRight.js similarity index 100% rename from node_modules/lodash/package/fp/partialRight.js rename to node_modules/globule/node_modules/lodash/fp/partialRight.js diff --git a/node_modules/lodash/package/fp/partition.js b/node_modules/globule/node_modules/lodash/fp/partition.js similarity index 100% rename from node_modules/lodash/package/fp/partition.js rename to node_modules/globule/node_modules/lodash/fp/partition.js diff --git a/node_modules/lodash/package/fp/path.js b/node_modules/globule/node_modules/lodash/fp/path.js similarity index 100% rename from node_modules/lodash/package/fp/path.js rename to node_modules/globule/node_modules/lodash/fp/path.js diff --git a/node_modules/lodash/package/fp/pathEq.js b/node_modules/globule/node_modules/lodash/fp/pathEq.js similarity index 100% rename from node_modules/lodash/package/fp/pathEq.js rename to node_modules/globule/node_modules/lodash/fp/pathEq.js diff --git a/node_modules/lodash/package/fp/pathOr.js b/node_modules/globule/node_modules/lodash/fp/pathOr.js similarity index 100% rename from node_modules/lodash/package/fp/pathOr.js rename to node_modules/globule/node_modules/lodash/fp/pathOr.js diff --git a/node_modules/lodash/package/fp/paths.js b/node_modules/globule/node_modules/lodash/fp/paths.js similarity index 100% rename from node_modules/lodash/package/fp/paths.js rename to node_modules/globule/node_modules/lodash/fp/paths.js diff --git a/node_modules/lodash/package/fp/pick.js b/node_modules/globule/node_modules/lodash/fp/pick.js similarity index 100% rename from node_modules/lodash/package/fp/pick.js rename to node_modules/globule/node_modules/lodash/fp/pick.js diff --git a/node_modules/lodash/package/fp/pickAll.js b/node_modules/globule/node_modules/lodash/fp/pickAll.js similarity index 100% rename from node_modules/lodash/package/fp/pickAll.js rename to node_modules/globule/node_modules/lodash/fp/pickAll.js diff --git a/node_modules/lodash/package/fp/pickBy.js b/node_modules/globule/node_modules/lodash/fp/pickBy.js similarity index 100% rename from node_modules/lodash/package/fp/pickBy.js rename to node_modules/globule/node_modules/lodash/fp/pickBy.js diff --git a/node_modules/lodash/package/fp/pipe.js b/node_modules/globule/node_modules/lodash/fp/pipe.js similarity index 100% rename from node_modules/lodash/package/fp/pipe.js rename to node_modules/globule/node_modules/lodash/fp/pipe.js diff --git a/node_modules/lodash/package/fp/placeholder.js b/node_modules/globule/node_modules/lodash/fp/placeholder.js similarity index 100% rename from node_modules/lodash/package/fp/placeholder.js rename to node_modules/globule/node_modules/lodash/fp/placeholder.js diff --git a/node_modules/lodash/package/fp/plant.js b/node_modules/globule/node_modules/lodash/fp/plant.js similarity index 100% rename from node_modules/lodash/package/fp/plant.js rename to node_modules/globule/node_modules/lodash/fp/plant.js diff --git a/node_modules/lodash/package/fp/pluck.js b/node_modules/globule/node_modules/lodash/fp/pluck.js similarity index 100% rename from node_modules/lodash/package/fp/pluck.js rename to node_modules/globule/node_modules/lodash/fp/pluck.js diff --git a/node_modules/lodash/package/fp/prop.js b/node_modules/globule/node_modules/lodash/fp/prop.js similarity index 100% rename from node_modules/lodash/package/fp/prop.js rename to node_modules/globule/node_modules/lodash/fp/prop.js diff --git a/node_modules/lodash/package/fp/propEq.js b/node_modules/globule/node_modules/lodash/fp/propEq.js similarity index 100% rename from node_modules/lodash/package/fp/propEq.js rename to node_modules/globule/node_modules/lodash/fp/propEq.js diff --git a/node_modules/lodash/package/fp/propOr.js b/node_modules/globule/node_modules/lodash/fp/propOr.js similarity index 100% rename from node_modules/lodash/package/fp/propOr.js rename to node_modules/globule/node_modules/lodash/fp/propOr.js diff --git a/node_modules/globule/node_modules/lodash/fp/property.js b/node_modules/globule/node_modules/lodash/fp/property.js new file mode 100644 index 0000000..b29cfb2 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/property.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/node_modules/globule/node_modules/lodash/fp/propertyOf.js b/node_modules/globule/node_modules/lodash/fp/propertyOf.js new file mode 100644 index 0000000..f6273ee --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/propertyOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('propertyOf', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/package/fp/props.js b/node_modules/globule/node_modules/lodash/fp/props.js similarity index 100% rename from node_modules/lodash/package/fp/props.js rename to node_modules/globule/node_modules/lodash/fp/props.js diff --git a/node_modules/lodash/package/fp/pull.js b/node_modules/globule/node_modules/lodash/fp/pull.js similarity index 100% rename from node_modules/lodash/package/fp/pull.js rename to node_modules/globule/node_modules/lodash/fp/pull.js diff --git a/node_modules/lodash/package/fp/pullAll.js b/node_modules/globule/node_modules/lodash/fp/pullAll.js similarity index 100% rename from node_modules/lodash/package/fp/pullAll.js rename to node_modules/globule/node_modules/lodash/fp/pullAll.js diff --git a/node_modules/lodash/package/fp/pullAllBy.js b/node_modules/globule/node_modules/lodash/fp/pullAllBy.js similarity index 100% rename from node_modules/lodash/package/fp/pullAllBy.js rename to node_modules/globule/node_modules/lodash/fp/pullAllBy.js diff --git a/node_modules/lodash/package/fp/pullAllWith.js b/node_modules/globule/node_modules/lodash/fp/pullAllWith.js similarity index 100% rename from node_modules/lodash/package/fp/pullAllWith.js rename to node_modules/globule/node_modules/lodash/fp/pullAllWith.js diff --git a/node_modules/lodash/package/fp/pullAt.js b/node_modules/globule/node_modules/lodash/fp/pullAt.js similarity index 100% rename from node_modules/lodash/package/fp/pullAt.js rename to node_modules/globule/node_modules/lodash/fp/pullAt.js diff --git a/node_modules/lodash/package/fp/random.js b/node_modules/globule/node_modules/lodash/fp/random.js similarity index 100% rename from node_modules/lodash/package/fp/random.js rename to node_modules/globule/node_modules/lodash/fp/random.js diff --git a/node_modules/lodash/package/fp/range.js b/node_modules/globule/node_modules/lodash/fp/range.js similarity index 100% rename from node_modules/lodash/package/fp/range.js rename to node_modules/globule/node_modules/lodash/fp/range.js diff --git a/node_modules/lodash/package/fp/rangeRight.js b/node_modules/globule/node_modules/lodash/fp/rangeRight.js similarity index 100% rename from node_modules/lodash/package/fp/rangeRight.js rename to node_modules/globule/node_modules/lodash/fp/rangeRight.js diff --git a/node_modules/globule/node_modules/lodash/fp/rangeStep.js b/node_modules/globule/node_modules/lodash/fp/rangeStep.js new file mode 100644 index 0000000..d72dfc2 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/rangeStep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeStep', require('../range')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/globule/node_modules/lodash/fp/rangeStepRight.js b/node_modules/globule/node_modules/lodash/fp/rangeStepRight.js new file mode 100644 index 0000000..8b2a67b --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/rangeStepRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeStepRight', require('../rangeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/package/fp/rearg.js b/node_modules/globule/node_modules/lodash/fp/rearg.js similarity index 100% rename from node_modules/lodash/package/fp/rearg.js rename to node_modules/globule/node_modules/lodash/fp/rearg.js diff --git a/node_modules/lodash/package/fp/reduce.js b/node_modules/globule/node_modules/lodash/fp/reduce.js similarity index 100% rename from node_modules/lodash/package/fp/reduce.js rename to node_modules/globule/node_modules/lodash/fp/reduce.js diff --git a/node_modules/lodash/package/fp/reduceRight.js b/node_modules/globule/node_modules/lodash/fp/reduceRight.js similarity index 100% rename from node_modules/lodash/package/fp/reduceRight.js rename to node_modules/globule/node_modules/lodash/fp/reduceRight.js diff --git a/node_modules/lodash/package/fp/reject.js b/node_modules/globule/node_modules/lodash/fp/reject.js similarity index 100% rename from node_modules/lodash/package/fp/reject.js rename to node_modules/globule/node_modules/lodash/fp/reject.js diff --git a/node_modules/lodash/package/fp/remove.js b/node_modules/globule/node_modules/lodash/fp/remove.js similarity index 100% rename from node_modules/lodash/package/fp/remove.js rename to node_modules/globule/node_modules/lodash/fp/remove.js diff --git a/node_modules/lodash/package/fp/repeat.js b/node_modules/globule/node_modules/lodash/fp/repeat.js similarity index 100% rename from node_modules/lodash/package/fp/repeat.js rename to node_modules/globule/node_modules/lodash/fp/repeat.js diff --git a/node_modules/lodash/package/fp/replace.js b/node_modules/globule/node_modules/lodash/fp/replace.js similarity index 100% rename from node_modules/lodash/package/fp/replace.js rename to node_modules/globule/node_modules/lodash/fp/replace.js diff --git a/node_modules/lodash/package/fp/rest.js b/node_modules/globule/node_modules/lodash/fp/rest.js similarity index 100% rename from node_modules/lodash/package/fp/rest.js rename to node_modules/globule/node_modules/lodash/fp/rest.js diff --git a/node_modules/lodash/package/fp/restFrom.js b/node_modules/globule/node_modules/lodash/fp/restFrom.js similarity index 100% rename from node_modules/lodash/package/fp/restFrom.js rename to node_modules/globule/node_modules/lodash/fp/restFrom.js diff --git a/node_modules/lodash/package/fp/result.js b/node_modules/globule/node_modules/lodash/fp/result.js similarity index 100% rename from node_modules/lodash/package/fp/result.js rename to node_modules/globule/node_modules/lodash/fp/result.js diff --git a/node_modules/lodash/package/fp/reverse.js b/node_modules/globule/node_modules/lodash/fp/reverse.js similarity index 100% rename from node_modules/lodash/package/fp/reverse.js rename to node_modules/globule/node_modules/lodash/fp/reverse.js diff --git a/node_modules/lodash/package/fp/round.js b/node_modules/globule/node_modules/lodash/fp/round.js similarity index 100% rename from node_modules/lodash/package/fp/round.js rename to node_modules/globule/node_modules/lodash/fp/round.js diff --git a/node_modules/lodash/package/fp/sample.js b/node_modules/globule/node_modules/lodash/fp/sample.js similarity index 100% rename from node_modules/lodash/package/fp/sample.js rename to node_modules/globule/node_modules/lodash/fp/sample.js diff --git a/node_modules/lodash/package/fp/sampleSize.js b/node_modules/globule/node_modules/lodash/fp/sampleSize.js similarity index 100% rename from node_modules/lodash/package/fp/sampleSize.js rename to node_modules/globule/node_modules/lodash/fp/sampleSize.js diff --git a/node_modules/lodash/package/fp/seq.js b/node_modules/globule/node_modules/lodash/fp/seq.js similarity index 100% rename from node_modules/lodash/package/fp/seq.js rename to node_modules/globule/node_modules/lodash/fp/seq.js diff --git a/node_modules/lodash/package/fp/set.js b/node_modules/globule/node_modules/lodash/fp/set.js similarity index 100% rename from node_modules/lodash/package/fp/set.js rename to node_modules/globule/node_modules/lodash/fp/set.js diff --git a/node_modules/lodash/package/fp/setWith.js b/node_modules/globule/node_modules/lodash/fp/setWith.js similarity index 100% rename from node_modules/lodash/package/fp/setWith.js rename to node_modules/globule/node_modules/lodash/fp/setWith.js diff --git a/node_modules/lodash/package/fp/shuffle.js b/node_modules/globule/node_modules/lodash/fp/shuffle.js similarity index 100% rename from node_modules/lodash/package/fp/shuffle.js rename to node_modules/globule/node_modules/lodash/fp/shuffle.js diff --git a/node_modules/lodash/package/fp/size.js b/node_modules/globule/node_modules/lodash/fp/size.js similarity index 100% rename from node_modules/lodash/package/fp/size.js rename to node_modules/globule/node_modules/lodash/fp/size.js diff --git a/node_modules/lodash/package/fp/slice.js b/node_modules/globule/node_modules/lodash/fp/slice.js similarity index 100% rename from node_modules/lodash/package/fp/slice.js rename to node_modules/globule/node_modules/lodash/fp/slice.js diff --git a/node_modules/lodash/package/fp/snakeCase.js b/node_modules/globule/node_modules/lodash/fp/snakeCase.js similarity index 100% rename from node_modules/lodash/package/fp/snakeCase.js rename to node_modules/globule/node_modules/lodash/fp/snakeCase.js diff --git a/node_modules/lodash/package/fp/some.js b/node_modules/globule/node_modules/lodash/fp/some.js similarity index 100% rename from node_modules/lodash/package/fp/some.js rename to node_modules/globule/node_modules/lodash/fp/some.js diff --git a/node_modules/lodash/package/fp/sortBy.js b/node_modules/globule/node_modules/lodash/fp/sortBy.js similarity index 100% rename from node_modules/lodash/package/fp/sortBy.js rename to node_modules/globule/node_modules/lodash/fp/sortBy.js diff --git a/node_modules/lodash/package/fp/sortedIndex.js b/node_modules/globule/node_modules/lodash/fp/sortedIndex.js similarity index 100% rename from node_modules/lodash/package/fp/sortedIndex.js rename to node_modules/globule/node_modules/lodash/fp/sortedIndex.js diff --git a/node_modules/lodash/package/fp/sortedIndexBy.js b/node_modules/globule/node_modules/lodash/fp/sortedIndexBy.js similarity index 100% rename from node_modules/lodash/package/fp/sortedIndexBy.js rename to node_modules/globule/node_modules/lodash/fp/sortedIndexBy.js diff --git a/node_modules/lodash/package/fp/sortedIndexOf.js b/node_modules/globule/node_modules/lodash/fp/sortedIndexOf.js similarity index 100% rename from node_modules/lodash/package/fp/sortedIndexOf.js rename to node_modules/globule/node_modules/lodash/fp/sortedIndexOf.js diff --git a/node_modules/lodash/package/fp/sortedLastIndex.js b/node_modules/globule/node_modules/lodash/fp/sortedLastIndex.js similarity index 100% rename from node_modules/lodash/package/fp/sortedLastIndex.js rename to node_modules/globule/node_modules/lodash/fp/sortedLastIndex.js diff --git a/node_modules/lodash/package/fp/sortedLastIndexBy.js b/node_modules/globule/node_modules/lodash/fp/sortedLastIndexBy.js similarity index 100% rename from node_modules/lodash/package/fp/sortedLastIndexBy.js rename to node_modules/globule/node_modules/lodash/fp/sortedLastIndexBy.js diff --git a/node_modules/lodash/package/fp/sortedLastIndexOf.js b/node_modules/globule/node_modules/lodash/fp/sortedLastIndexOf.js similarity index 100% rename from node_modules/lodash/package/fp/sortedLastIndexOf.js rename to node_modules/globule/node_modules/lodash/fp/sortedLastIndexOf.js diff --git a/node_modules/lodash/package/fp/sortedUniq.js b/node_modules/globule/node_modules/lodash/fp/sortedUniq.js similarity index 100% rename from node_modules/lodash/package/fp/sortedUniq.js rename to node_modules/globule/node_modules/lodash/fp/sortedUniq.js diff --git a/node_modules/lodash/package/fp/sortedUniqBy.js b/node_modules/globule/node_modules/lodash/fp/sortedUniqBy.js similarity index 100% rename from node_modules/lodash/package/fp/sortedUniqBy.js rename to node_modules/globule/node_modules/lodash/fp/sortedUniqBy.js diff --git a/node_modules/lodash/package/fp/split.js b/node_modules/globule/node_modules/lodash/fp/split.js similarity index 100% rename from node_modules/lodash/package/fp/split.js rename to node_modules/globule/node_modules/lodash/fp/split.js diff --git a/node_modules/lodash/package/fp/spread.js b/node_modules/globule/node_modules/lodash/fp/spread.js similarity index 100% rename from node_modules/lodash/package/fp/spread.js rename to node_modules/globule/node_modules/lodash/fp/spread.js diff --git a/node_modules/lodash/package/fp/spreadFrom.js b/node_modules/globule/node_modules/lodash/fp/spreadFrom.js similarity index 100% rename from node_modules/lodash/package/fp/spreadFrom.js rename to node_modules/globule/node_modules/lodash/fp/spreadFrom.js diff --git a/node_modules/lodash/package/fp/startCase.js b/node_modules/globule/node_modules/lodash/fp/startCase.js similarity index 100% rename from node_modules/lodash/package/fp/startCase.js rename to node_modules/globule/node_modules/lodash/fp/startCase.js diff --git a/node_modules/lodash/package/fp/startsWith.js b/node_modules/globule/node_modules/lodash/fp/startsWith.js similarity index 100% rename from node_modules/lodash/package/fp/startsWith.js rename to node_modules/globule/node_modules/lodash/fp/startsWith.js diff --git a/node_modules/lodash/package/fp/string.js b/node_modules/globule/node_modules/lodash/fp/string.js similarity index 100% rename from node_modules/lodash/package/fp/string.js rename to node_modules/globule/node_modules/lodash/fp/string.js diff --git a/node_modules/globule/node_modules/lodash/fp/stubArray.js b/node_modules/globule/node_modules/lodash/fp/stubArray.js new file mode 100644 index 0000000..cd604cb --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/stubArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubArray', require('../stubArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/globule/node_modules/lodash/fp/stubFalse.js b/node_modules/globule/node_modules/lodash/fp/stubFalse.js new file mode 100644 index 0000000..3296664 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/stubFalse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubFalse', require('../stubFalse'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/package/fp/propertyOf.js b/node_modules/globule/node_modules/lodash/fp/stubObject.js similarity index 66% rename from node_modules/lodash/package/fp/propertyOf.js rename to node_modules/globule/node_modules/lodash/fp/stubObject.js index 3cfdef7..c6c8ec4 100644 --- a/node_modules/lodash/package/fp/propertyOf.js +++ b/node_modules/globule/node_modules/lodash/fp/stubObject.js @@ -1,5 +1,5 @@ var convert = require('./convert'), - func = convert('propertyOf', require('../propertyOf'), require('./_falseOptions')); + func = convert('stubObject', require('../stubObject'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func; diff --git a/node_modules/globule/node_modules/lodash/fp/stubString.js b/node_modules/globule/node_modules/lodash/fp/stubString.js new file mode 100644 index 0000000..701051e --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/stubString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubString', require('../stubString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/package/fp/property.js b/node_modules/globule/node_modules/lodash/fp/stubTrue.js similarity index 66% rename from node_modules/lodash/package/fp/property.js rename to node_modules/globule/node_modules/lodash/fp/stubTrue.js index d832fbb..9249082 100644 --- a/node_modules/lodash/package/fp/property.js +++ b/node_modules/globule/node_modules/lodash/fp/stubTrue.js @@ -1,5 +1,5 @@ var convert = require('./convert'), - func = convert('property', require('../property'), require('./_falseOptions')); + func = convert('stubTrue', require('../stubTrue'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func; diff --git a/node_modules/lodash/package/fp/subtract.js b/node_modules/globule/node_modules/lodash/fp/subtract.js similarity index 100% rename from node_modules/lodash/package/fp/subtract.js rename to node_modules/globule/node_modules/lodash/fp/subtract.js diff --git a/node_modules/lodash/package/fp/sum.js b/node_modules/globule/node_modules/lodash/fp/sum.js similarity index 100% rename from node_modules/lodash/package/fp/sum.js rename to node_modules/globule/node_modules/lodash/fp/sum.js diff --git a/node_modules/lodash/package/fp/sumBy.js b/node_modules/globule/node_modules/lodash/fp/sumBy.js similarity index 100% rename from node_modules/lodash/package/fp/sumBy.js rename to node_modules/globule/node_modules/lodash/fp/sumBy.js diff --git a/node_modules/globule/node_modules/lodash/fp/symmetricDifference.js b/node_modules/globule/node_modules/lodash/fp/symmetricDifference.js new file mode 100644 index 0000000..78c16ad --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/symmetricDifference.js @@ -0,0 +1 @@ +module.exports = require('./xor'); diff --git a/node_modules/globule/node_modules/lodash/fp/symmetricDifferenceBy.js b/node_modules/globule/node_modules/lodash/fp/symmetricDifferenceBy.js new file mode 100644 index 0000000..298fc7f --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/symmetricDifferenceBy.js @@ -0,0 +1 @@ +module.exports = require('./xorBy'); diff --git a/node_modules/globule/node_modules/lodash/fp/symmetricDifferenceWith.js b/node_modules/globule/node_modules/lodash/fp/symmetricDifferenceWith.js new file mode 100644 index 0000000..70bc6fa --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/symmetricDifferenceWith.js @@ -0,0 +1 @@ +module.exports = require('./xorWith'); diff --git a/node_modules/lodash/package/fp/tail.js b/node_modules/globule/node_modules/lodash/fp/tail.js similarity index 100% rename from node_modules/lodash/package/fp/tail.js rename to node_modules/globule/node_modules/lodash/fp/tail.js diff --git a/node_modules/lodash/package/fp/take.js b/node_modules/globule/node_modules/lodash/fp/take.js similarity index 100% rename from node_modules/lodash/package/fp/take.js rename to node_modules/globule/node_modules/lodash/fp/take.js diff --git a/node_modules/globule/node_modules/lodash/fp/takeLast.js b/node_modules/globule/node_modules/lodash/fp/takeLast.js new file mode 100644 index 0000000..e98c84a --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/takeLast.js @@ -0,0 +1 @@ +module.exports = require('./takeRight'); diff --git a/node_modules/globule/node_modules/lodash/fp/takeLastWhile.js b/node_modules/globule/node_modules/lodash/fp/takeLastWhile.js new file mode 100644 index 0000000..5367968 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/takeLastWhile.js @@ -0,0 +1 @@ +module.exports = require('./takeRightWhile'); diff --git a/node_modules/lodash/package/fp/takeRight.js b/node_modules/globule/node_modules/lodash/fp/takeRight.js similarity index 100% rename from node_modules/lodash/package/fp/takeRight.js rename to node_modules/globule/node_modules/lodash/fp/takeRight.js diff --git a/node_modules/lodash/package/fp/takeRightWhile.js b/node_modules/globule/node_modules/lodash/fp/takeRightWhile.js similarity index 100% rename from node_modules/lodash/package/fp/takeRightWhile.js rename to node_modules/globule/node_modules/lodash/fp/takeRightWhile.js diff --git a/node_modules/lodash/package/fp/takeWhile.js b/node_modules/globule/node_modules/lodash/fp/takeWhile.js similarity index 100% rename from node_modules/lodash/package/fp/takeWhile.js rename to node_modules/globule/node_modules/lodash/fp/takeWhile.js diff --git a/node_modules/lodash/package/fp/tap.js b/node_modules/globule/node_modules/lodash/fp/tap.js similarity index 100% rename from node_modules/lodash/package/fp/tap.js rename to node_modules/globule/node_modules/lodash/fp/tap.js diff --git a/node_modules/lodash/package/fp/template.js b/node_modules/globule/node_modules/lodash/fp/template.js similarity index 100% rename from node_modules/lodash/package/fp/template.js rename to node_modules/globule/node_modules/lodash/fp/template.js diff --git a/node_modules/lodash/package/fp/templateSettings.js b/node_modules/globule/node_modules/lodash/fp/templateSettings.js similarity index 100% rename from node_modules/lodash/package/fp/templateSettings.js rename to node_modules/globule/node_modules/lodash/fp/templateSettings.js diff --git a/node_modules/lodash/package/fp/throttle.js b/node_modules/globule/node_modules/lodash/fp/throttle.js similarity index 100% rename from node_modules/lodash/package/fp/throttle.js rename to node_modules/globule/node_modules/lodash/fp/throttle.js diff --git a/node_modules/lodash/package/fp/thru.js b/node_modules/globule/node_modules/lodash/fp/thru.js similarity index 100% rename from node_modules/lodash/package/fp/thru.js rename to node_modules/globule/node_modules/lodash/fp/thru.js diff --git a/node_modules/lodash/package/fp/times.js b/node_modules/globule/node_modules/lodash/fp/times.js similarity index 100% rename from node_modules/lodash/package/fp/times.js rename to node_modules/globule/node_modules/lodash/fp/times.js diff --git a/node_modules/lodash/package/fp/toArray.js b/node_modules/globule/node_modules/lodash/fp/toArray.js similarity index 100% rename from node_modules/lodash/package/fp/toArray.js rename to node_modules/globule/node_modules/lodash/fp/toArray.js diff --git a/node_modules/lodash/package/fp/conforms.js b/node_modules/globule/node_modules/lodash/fp/toFinite.js similarity index 66% rename from node_modules/lodash/package/fp/conforms.js rename to node_modules/globule/node_modules/lodash/fp/toFinite.js index e193cd6..3a47687 100644 --- a/node_modules/lodash/package/fp/conforms.js +++ b/node_modules/globule/node_modules/lodash/fp/toFinite.js @@ -1,5 +1,5 @@ var convert = require('./convert'), - func = convert('conforms', require('../conforms'), require('./_falseOptions')); + func = convert('toFinite', require('../toFinite'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func; diff --git a/node_modules/lodash/package/fp/toInteger.js b/node_modules/globule/node_modules/lodash/fp/toInteger.js similarity index 100% rename from node_modules/lodash/package/fp/toInteger.js rename to node_modules/globule/node_modules/lodash/fp/toInteger.js diff --git a/node_modules/lodash/package/fp/toIterator.js b/node_modules/globule/node_modules/lodash/fp/toIterator.js similarity index 100% rename from node_modules/lodash/package/fp/toIterator.js rename to node_modules/globule/node_modules/lodash/fp/toIterator.js diff --git a/node_modules/lodash/package/fp/toJSON.js b/node_modules/globule/node_modules/lodash/fp/toJSON.js similarity index 100% rename from node_modules/lodash/package/fp/toJSON.js rename to node_modules/globule/node_modules/lodash/fp/toJSON.js diff --git a/node_modules/lodash/package/fp/toLength.js b/node_modules/globule/node_modules/lodash/fp/toLength.js similarity index 100% rename from node_modules/lodash/package/fp/toLength.js rename to node_modules/globule/node_modules/lodash/fp/toLength.js diff --git a/node_modules/lodash/package/fp/toLower.js b/node_modules/globule/node_modules/lodash/fp/toLower.js similarity index 100% rename from node_modules/lodash/package/fp/toLower.js rename to node_modules/globule/node_modules/lodash/fp/toLower.js diff --git a/node_modules/lodash/package/fp/toNumber.js b/node_modules/globule/node_modules/lodash/fp/toNumber.js similarity index 100% rename from node_modules/lodash/package/fp/toNumber.js rename to node_modules/globule/node_modules/lodash/fp/toNumber.js diff --git a/node_modules/lodash/package/fp/toPairs.js b/node_modules/globule/node_modules/lodash/fp/toPairs.js similarity index 100% rename from node_modules/lodash/package/fp/toPairs.js rename to node_modules/globule/node_modules/lodash/fp/toPairs.js diff --git a/node_modules/lodash/package/fp/toPairsIn.js b/node_modules/globule/node_modules/lodash/fp/toPairsIn.js similarity index 100% rename from node_modules/lodash/package/fp/toPairsIn.js rename to node_modules/globule/node_modules/lodash/fp/toPairsIn.js diff --git a/node_modules/lodash/package/fp/toPath.js b/node_modules/globule/node_modules/lodash/fp/toPath.js similarity index 100% rename from node_modules/lodash/package/fp/toPath.js rename to node_modules/globule/node_modules/lodash/fp/toPath.js diff --git a/node_modules/lodash/package/fp/toPlainObject.js b/node_modules/globule/node_modules/lodash/fp/toPlainObject.js similarity index 100% rename from node_modules/lodash/package/fp/toPlainObject.js rename to node_modules/globule/node_modules/lodash/fp/toPlainObject.js diff --git a/node_modules/lodash/package/fp/toSafeInteger.js b/node_modules/globule/node_modules/lodash/fp/toSafeInteger.js similarity index 100% rename from node_modules/lodash/package/fp/toSafeInteger.js rename to node_modules/globule/node_modules/lodash/fp/toSafeInteger.js diff --git a/node_modules/lodash/package/fp/toString.js b/node_modules/globule/node_modules/lodash/fp/toString.js similarity index 100% rename from node_modules/lodash/package/fp/toString.js rename to node_modules/globule/node_modules/lodash/fp/toString.js diff --git a/node_modules/lodash/package/fp/toUpper.js b/node_modules/globule/node_modules/lodash/fp/toUpper.js similarity index 100% rename from node_modules/lodash/package/fp/toUpper.js rename to node_modules/globule/node_modules/lodash/fp/toUpper.js diff --git a/node_modules/lodash/package/fp/transform.js b/node_modules/globule/node_modules/lodash/fp/transform.js similarity index 100% rename from node_modules/lodash/package/fp/transform.js rename to node_modules/globule/node_modules/lodash/fp/transform.js diff --git a/node_modules/lodash/package/fp/trim.js b/node_modules/globule/node_modules/lodash/fp/trim.js similarity index 100% rename from node_modules/lodash/package/fp/trim.js rename to node_modules/globule/node_modules/lodash/fp/trim.js diff --git a/node_modules/lodash/package/fp/trimChars.js b/node_modules/globule/node_modules/lodash/fp/trimChars.js similarity index 100% rename from node_modules/lodash/package/fp/trimChars.js rename to node_modules/globule/node_modules/lodash/fp/trimChars.js diff --git a/node_modules/lodash/package/fp/trimCharsEnd.js b/node_modules/globule/node_modules/lodash/fp/trimCharsEnd.js similarity index 100% rename from node_modules/lodash/package/fp/trimCharsEnd.js rename to node_modules/globule/node_modules/lodash/fp/trimCharsEnd.js diff --git a/node_modules/lodash/package/fp/trimCharsStart.js b/node_modules/globule/node_modules/lodash/fp/trimCharsStart.js similarity index 100% rename from node_modules/lodash/package/fp/trimCharsStart.js rename to node_modules/globule/node_modules/lodash/fp/trimCharsStart.js diff --git a/node_modules/lodash/package/fp/trimEnd.js b/node_modules/globule/node_modules/lodash/fp/trimEnd.js similarity index 100% rename from node_modules/lodash/package/fp/trimEnd.js rename to node_modules/globule/node_modules/lodash/fp/trimEnd.js diff --git a/node_modules/lodash/package/fp/trimStart.js b/node_modules/globule/node_modules/lodash/fp/trimStart.js similarity index 100% rename from node_modules/lodash/package/fp/trimStart.js rename to node_modules/globule/node_modules/lodash/fp/trimStart.js diff --git a/node_modules/lodash/package/fp/truncate.js b/node_modules/globule/node_modules/lodash/fp/truncate.js similarity index 100% rename from node_modules/lodash/package/fp/truncate.js rename to node_modules/globule/node_modules/lodash/fp/truncate.js diff --git a/node_modules/lodash/package/fp/unapply.js b/node_modules/globule/node_modules/lodash/fp/unapply.js similarity index 100% rename from node_modules/lodash/package/fp/unapply.js rename to node_modules/globule/node_modules/lodash/fp/unapply.js diff --git a/node_modules/lodash/package/fp/unary.js b/node_modules/globule/node_modules/lodash/fp/unary.js similarity index 100% rename from node_modules/lodash/package/fp/unary.js rename to node_modules/globule/node_modules/lodash/fp/unary.js diff --git a/node_modules/lodash/package/fp/unescape.js b/node_modules/globule/node_modules/lodash/fp/unescape.js similarity index 100% rename from node_modules/lodash/package/fp/unescape.js rename to node_modules/globule/node_modules/lodash/fp/unescape.js diff --git a/node_modules/lodash/package/fp/union.js b/node_modules/globule/node_modules/lodash/fp/union.js similarity index 100% rename from node_modules/lodash/package/fp/union.js rename to node_modules/globule/node_modules/lodash/fp/union.js diff --git a/node_modules/lodash/package/fp/unionBy.js b/node_modules/globule/node_modules/lodash/fp/unionBy.js similarity index 100% rename from node_modules/lodash/package/fp/unionBy.js rename to node_modules/globule/node_modules/lodash/fp/unionBy.js diff --git a/node_modules/lodash/package/fp/unionWith.js b/node_modules/globule/node_modules/lodash/fp/unionWith.js similarity index 100% rename from node_modules/lodash/package/fp/unionWith.js rename to node_modules/globule/node_modules/lodash/fp/unionWith.js diff --git a/node_modules/lodash/package/fp/uniq.js b/node_modules/globule/node_modules/lodash/fp/uniq.js similarity index 100% rename from node_modules/lodash/package/fp/uniq.js rename to node_modules/globule/node_modules/lodash/fp/uniq.js diff --git a/node_modules/lodash/package/fp/uniqBy.js b/node_modules/globule/node_modules/lodash/fp/uniqBy.js similarity index 100% rename from node_modules/lodash/package/fp/uniqBy.js rename to node_modules/globule/node_modules/lodash/fp/uniqBy.js diff --git a/node_modules/lodash/package/fp/uniqWith.js b/node_modules/globule/node_modules/lodash/fp/uniqWith.js similarity index 100% rename from node_modules/lodash/package/fp/uniqWith.js rename to node_modules/globule/node_modules/lodash/fp/uniqWith.js diff --git a/node_modules/lodash/package/fp/uniqueId.js b/node_modules/globule/node_modules/lodash/fp/uniqueId.js similarity index 100% rename from node_modules/lodash/package/fp/uniqueId.js rename to node_modules/globule/node_modules/lodash/fp/uniqueId.js diff --git a/node_modules/lodash/package/fp/unnest.js b/node_modules/globule/node_modules/lodash/fp/unnest.js similarity index 100% rename from node_modules/lodash/package/fp/unnest.js rename to node_modules/globule/node_modules/lodash/fp/unnest.js diff --git a/node_modules/lodash/package/fp/unset.js b/node_modules/globule/node_modules/lodash/fp/unset.js similarity index 100% rename from node_modules/lodash/package/fp/unset.js rename to node_modules/globule/node_modules/lodash/fp/unset.js diff --git a/node_modules/lodash/package/fp/unzip.js b/node_modules/globule/node_modules/lodash/fp/unzip.js similarity index 100% rename from node_modules/lodash/package/fp/unzip.js rename to node_modules/globule/node_modules/lodash/fp/unzip.js diff --git a/node_modules/lodash/package/fp/unzipWith.js b/node_modules/globule/node_modules/lodash/fp/unzipWith.js similarity index 100% rename from node_modules/lodash/package/fp/unzipWith.js rename to node_modules/globule/node_modules/lodash/fp/unzipWith.js diff --git a/node_modules/lodash/package/fp/update.js b/node_modules/globule/node_modules/lodash/fp/update.js similarity index 100% rename from node_modules/lodash/package/fp/update.js rename to node_modules/globule/node_modules/lodash/fp/update.js diff --git a/node_modules/lodash/package/fp/updateWith.js b/node_modules/globule/node_modules/lodash/fp/updateWith.js similarity index 100% rename from node_modules/lodash/package/fp/updateWith.js rename to node_modules/globule/node_modules/lodash/fp/updateWith.js diff --git a/node_modules/lodash/package/fp/upperCase.js b/node_modules/globule/node_modules/lodash/fp/upperCase.js similarity index 100% rename from node_modules/lodash/package/fp/upperCase.js rename to node_modules/globule/node_modules/lodash/fp/upperCase.js diff --git a/node_modules/lodash/package/fp/upperFirst.js b/node_modules/globule/node_modules/lodash/fp/upperFirst.js similarity index 100% rename from node_modules/lodash/package/fp/upperFirst.js rename to node_modules/globule/node_modules/lodash/fp/upperFirst.js diff --git a/node_modules/lodash/package/fp/useWith.js b/node_modules/globule/node_modules/lodash/fp/useWith.js similarity index 100% rename from node_modules/lodash/package/fp/useWith.js rename to node_modules/globule/node_modules/lodash/fp/useWith.js diff --git a/node_modules/lodash/package/fp/util.js b/node_modules/globule/node_modules/lodash/fp/util.js similarity index 100% rename from node_modules/lodash/package/fp/util.js rename to node_modules/globule/node_modules/lodash/fp/util.js diff --git a/node_modules/lodash/package/fp/value.js b/node_modules/globule/node_modules/lodash/fp/value.js similarity index 100% rename from node_modules/lodash/package/fp/value.js rename to node_modules/globule/node_modules/lodash/fp/value.js diff --git a/node_modules/lodash/package/fp/valueOf.js b/node_modules/globule/node_modules/lodash/fp/valueOf.js similarity index 100% rename from node_modules/lodash/package/fp/valueOf.js rename to node_modules/globule/node_modules/lodash/fp/valueOf.js diff --git a/node_modules/lodash/package/fp/values.js b/node_modules/globule/node_modules/lodash/fp/values.js similarity index 100% rename from node_modules/lodash/package/fp/values.js rename to node_modules/globule/node_modules/lodash/fp/values.js diff --git a/node_modules/lodash/package/fp/valuesIn.js b/node_modules/globule/node_modules/lodash/fp/valuesIn.js similarity index 100% rename from node_modules/lodash/package/fp/valuesIn.js rename to node_modules/globule/node_modules/lodash/fp/valuesIn.js diff --git a/node_modules/globule/node_modules/lodash/fp/where.js b/node_modules/globule/node_modules/lodash/fp/where.js new file mode 100644 index 0000000..3247f64 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/where.js @@ -0,0 +1 @@ +module.exports = require('./conformsTo'); diff --git a/node_modules/globule/node_modules/lodash/fp/whereEq.js b/node_modules/globule/node_modules/lodash/fp/whereEq.js new file mode 100644 index 0000000..29d1e1e --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/whereEq.js @@ -0,0 +1 @@ +module.exports = require('./isMatch'); diff --git a/node_modules/lodash/package/fp/without.js b/node_modules/globule/node_modules/lodash/fp/without.js similarity index 100% rename from node_modules/lodash/package/fp/without.js rename to node_modules/globule/node_modules/lodash/fp/without.js diff --git a/node_modules/lodash/package/fp/words.js b/node_modules/globule/node_modules/lodash/fp/words.js similarity index 100% rename from node_modules/lodash/package/fp/words.js rename to node_modules/globule/node_modules/lodash/fp/words.js diff --git a/node_modules/lodash/package/fp/wrap.js b/node_modules/globule/node_modules/lodash/fp/wrap.js similarity index 100% rename from node_modules/lodash/package/fp/wrap.js rename to node_modules/globule/node_modules/lodash/fp/wrap.js diff --git a/node_modules/lodash/package/fp/wrapperAt.js b/node_modules/globule/node_modules/lodash/fp/wrapperAt.js similarity index 100% rename from node_modules/lodash/package/fp/wrapperAt.js rename to node_modules/globule/node_modules/lodash/fp/wrapperAt.js diff --git a/node_modules/lodash/package/fp/wrapperChain.js b/node_modules/globule/node_modules/lodash/fp/wrapperChain.js similarity index 100% rename from node_modules/lodash/package/fp/wrapperChain.js rename to node_modules/globule/node_modules/lodash/fp/wrapperChain.js diff --git a/node_modules/lodash/package/fp/wrapperLodash.js b/node_modules/globule/node_modules/lodash/fp/wrapperLodash.js similarity index 100% rename from node_modules/lodash/package/fp/wrapperLodash.js rename to node_modules/globule/node_modules/lodash/fp/wrapperLodash.js diff --git a/node_modules/lodash/package/fp/wrapperReverse.js b/node_modules/globule/node_modules/lodash/fp/wrapperReverse.js similarity index 100% rename from node_modules/lodash/package/fp/wrapperReverse.js rename to node_modules/globule/node_modules/lodash/fp/wrapperReverse.js diff --git a/node_modules/lodash/package/fp/wrapperValue.js b/node_modules/globule/node_modules/lodash/fp/wrapperValue.js similarity index 100% rename from node_modules/lodash/package/fp/wrapperValue.js rename to node_modules/globule/node_modules/lodash/fp/wrapperValue.js diff --git a/node_modules/lodash/package/fp/xor.js b/node_modules/globule/node_modules/lodash/fp/xor.js similarity index 100% rename from node_modules/lodash/package/fp/xor.js rename to node_modules/globule/node_modules/lodash/fp/xor.js diff --git a/node_modules/lodash/package/fp/xorBy.js b/node_modules/globule/node_modules/lodash/fp/xorBy.js similarity index 100% rename from node_modules/lodash/package/fp/xorBy.js rename to node_modules/globule/node_modules/lodash/fp/xorBy.js diff --git a/node_modules/lodash/package/fp/xorWith.js b/node_modules/globule/node_modules/lodash/fp/xorWith.js similarity index 100% rename from node_modules/lodash/package/fp/xorWith.js rename to node_modules/globule/node_modules/lodash/fp/xorWith.js diff --git a/node_modules/lodash/package/fp/zip.js b/node_modules/globule/node_modules/lodash/fp/zip.js similarity index 100% rename from node_modules/lodash/package/fp/zip.js rename to node_modules/globule/node_modules/lodash/fp/zip.js diff --git a/node_modules/globule/node_modules/lodash/fp/zipAll.js b/node_modules/globule/node_modules/lodash/fp/zipAll.js new file mode 100644 index 0000000..efa8ccb --- /dev/null +++ b/node_modules/globule/node_modules/lodash/fp/zipAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipAll', require('../zip')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/package/fp/zipObj.js b/node_modules/globule/node_modules/lodash/fp/zipObj.js similarity index 100% rename from node_modules/lodash/package/fp/zipObj.js rename to node_modules/globule/node_modules/lodash/fp/zipObj.js diff --git a/node_modules/lodash/package/fp/zipObject.js b/node_modules/globule/node_modules/lodash/fp/zipObject.js similarity index 100% rename from node_modules/lodash/package/fp/zipObject.js rename to node_modules/globule/node_modules/lodash/fp/zipObject.js diff --git a/node_modules/lodash/package/fp/zipObjectDeep.js b/node_modules/globule/node_modules/lodash/fp/zipObjectDeep.js similarity index 100% rename from node_modules/lodash/package/fp/zipObjectDeep.js rename to node_modules/globule/node_modules/lodash/fp/zipObjectDeep.js diff --git a/node_modules/lodash/package/fp/zipWith.js b/node_modules/globule/node_modules/lodash/fp/zipWith.js similarity index 100% rename from node_modules/lodash/package/fp/zipWith.js rename to node_modules/globule/node_modules/lodash/fp/zipWith.js diff --git a/node_modules/lodash/package/fromPairs.js b/node_modules/globule/node_modules/lodash/fromPairs.js similarity index 79% rename from node_modules/lodash/package/fromPairs.js rename to node_modules/globule/node_modules/lodash/fromPairs.js index a591488..ee7940d 100644 --- a/node_modules/lodash/package/fromPairs.js +++ b/node_modules/globule/node_modules/lodash/fromPairs.js @@ -10,12 +10,12 @@ * @returns {Object} Returns the new object. * @example * - * _.fromPairs([['fred', 30], ['barney', 40]]); - * // => { 'fred': 30, 'barney': 40 } + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } */ function fromPairs(pairs) { var index = -1, - length = pairs ? pairs.length : 0, + length = pairs == null ? 0 : pairs.length, result = {}; while (++index < length) { diff --git a/node_modules/lodash/package/function.js b/node_modules/globule/node_modules/lodash/function.js similarity index 100% rename from node_modules/lodash/package/function.js rename to node_modules/globule/node_modules/lodash/function.js diff --git a/node_modules/lodash/package/functions.js b/node_modules/globule/node_modules/lodash/functions.js similarity index 91% rename from node_modules/lodash/package/functions.js rename to node_modules/globule/node_modules/lodash/functions.js index 115d378..9722928 100644 --- a/node_modules/lodash/package/functions.js +++ b/node_modules/globule/node_modules/lodash/functions.js @@ -10,7 +10,7 @@ var baseFunctions = require('./_baseFunctions'), * @memberOf _ * @category Object * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. + * @returns {Array} Returns the function names. * @see _.functionsIn * @example * diff --git a/node_modules/lodash/package/functionsIn.js b/node_modules/globule/node_modules/lodash/functionsIn.js similarity index 91% rename from node_modules/lodash/package/functionsIn.js rename to node_modules/globule/node_modules/lodash/functionsIn.js index 5aba98f..f00345d 100644 --- a/node_modules/lodash/package/functionsIn.js +++ b/node_modules/globule/node_modules/lodash/functionsIn.js @@ -10,7 +10,7 @@ var baseFunctions = require('./_baseFunctions'), * @since 4.0.0 * @category Object * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. + * @returns {Array} Returns the function names. * @see _.functions * @example * diff --git a/node_modules/lodash/package/get.js b/node_modules/globule/node_modules/lodash/get.js similarity index 93% rename from node_modules/lodash/package/get.js rename to node_modules/globule/node_modules/lodash/get.js index 5a5837b..8805ff9 100644 --- a/node_modules/lodash/package/get.js +++ b/node_modules/globule/node_modules/lodash/get.js @@ -2,7 +2,7 @@ var baseGet = require('./_baseGet'); /** * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is used in its place. + * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ diff --git a/node_modules/lodash/package/groupBy.js b/node_modules/globule/node_modules/lodash/groupBy.js similarity index 83% rename from node_modules/lodash/package/groupBy.js rename to node_modules/globule/node_modules/lodash/groupBy.js index ae7db5f..babf4f6 100644 --- a/node_modules/lodash/package/groupBy.js +++ b/node_modules/globule/node_modules/lodash/groupBy.js @@ -1,4 +1,5 @@ -var createAggregator = require('./_createAggregator'); +var baseAssignValue = require('./_baseAssignValue'), + createAggregator = require('./_createAggregator'); /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -18,8 +19,7 @@ var hasOwnProperty = objectProto.hasOwnProperty; * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee to transform keys. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example * @@ -34,7 +34,7 @@ var groupBy = createAggregator(function(result, value, key) { if (hasOwnProperty.call(result, key)) { result[key].push(value); } else { - result[key] = [value]; + baseAssignValue(result, key, [value]); } }); diff --git a/node_modules/lodash/package/gt.js b/node_modules/globule/node_modules/lodash/gt.js similarity index 100% rename from node_modules/lodash/package/gt.js rename to node_modules/globule/node_modules/lodash/gt.js diff --git a/node_modules/lodash/package/gte.js b/node_modules/globule/node_modules/lodash/gte.js similarity index 100% rename from node_modules/lodash/package/gte.js rename to node_modules/globule/node_modules/lodash/gte.js diff --git a/node_modules/lodash/package/has.js b/node_modules/globule/node_modules/lodash/has.js similarity index 100% rename from node_modules/lodash/package/has.js rename to node_modules/globule/node_modules/lodash/has.js diff --git a/node_modules/lodash/package/hasIn.js b/node_modules/globule/node_modules/lodash/hasIn.js similarity index 100% rename from node_modules/lodash/package/hasIn.js rename to node_modules/globule/node_modules/lodash/hasIn.js diff --git a/node_modules/lodash/package/head.js b/node_modules/globule/node_modules/lodash/head.js similarity index 100% rename from node_modules/lodash/package/head.js rename to node_modules/globule/node_modules/lodash/head.js diff --git a/node_modules/lodash/package/identity.js b/node_modules/globule/node_modules/lodash/identity.js similarity index 64% rename from node_modules/lodash/package/identity.js rename to node_modules/globule/node_modules/lodash/identity.js index 3732edb..2d5d963 100644 --- a/node_modules/lodash/package/identity.js +++ b/node_modules/globule/node_modules/lodash/identity.js @@ -1,5 +1,5 @@ /** - * This method returns the first argument given to it. + * This method returns the first argument it receives. * * @static * @since 0.1.0 @@ -9,9 +9,9 @@ * @returns {*} Returns `value`. * @example * - * var object = { 'user': 'fred' }; + * var object = { 'a': 1 }; * - * _.identity(object) === object; + * console.log(_.identity(object) === object); * // => true */ function identity(value) { diff --git a/node_modules/lodash/package/inRange.js b/node_modules/globule/node_modules/lodash/inRange.js similarity index 92% rename from node_modules/lodash/package/inRange.js rename to node_modules/globule/node_modules/lodash/inRange.js index bf71a8d..f20728d 100644 --- a/node_modules/lodash/package/inRange.js +++ b/node_modules/globule/node_modules/lodash/inRange.js @@ -1,4 +1,5 @@ var baseInRange = require('./_baseInRange'), + toFinite = require('./toFinite'), toNumber = require('./toNumber'); /** @@ -40,12 +41,12 @@ var baseInRange = require('./_baseInRange'), * // => true */ function inRange(number, start, end) { - start = toNumber(start) || 0; + start = toFinite(start); if (end === undefined) { end = start; start = 0; } else { - end = toNumber(end) || 0; + end = toFinite(end); } number = toNumber(number); return baseInRange(number, start, end); diff --git a/node_modules/lodash/package/includes.js b/node_modules/globule/node_modules/lodash/includes.js similarity index 87% rename from node_modules/lodash/package/includes.js rename to node_modules/globule/node_modules/lodash/includes.js index cefe3bf..ae0deed 100644 --- a/node_modules/lodash/package/includes.js +++ b/node_modules/globule/node_modules/lodash/includes.js @@ -10,7 +10,7 @@ var nativeMax = Math.max; /** * Checks if `value` is in `collection`. If `collection` is a string, it's * checked for a substring of `value`, otherwise - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * is used for equality comparisons. If `fromIndex` is negative, it's used as * the offset from the end of `collection`. * @@ -18,7 +18,7 @@ var nativeMax = Math.max; * @memberOf _ * @since 0.1.0 * @category Collection - * @param {Array|Object|string} collection The collection to search. + * @param {Array|Object|string} collection The collection to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. @@ -31,10 +31,10 @@ var nativeMax = Math.max; * _.includes([1, 2, 3], 1, 2); * // => false * - * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); + * _.includes({ 'a': 1, 'b': 2 }, 1); * // => true * - * _.includes('pebbles', 'eb'); + * _.includes('abcd', 'bc'); * // => true */ function includes(collection, value, fromIndex, guard) { diff --git a/node_modules/lodash/package/index.js b/node_modules/globule/node_modules/lodash/index.js similarity index 100% rename from node_modules/lodash/package/index.js rename to node_modules/globule/node_modules/lodash/index.js diff --git a/node_modules/lodash/package/indexOf.js b/node_modules/globule/node_modules/lodash/indexOf.js similarity index 77% rename from node_modules/lodash/package/indexOf.js rename to node_modules/globule/node_modules/lodash/indexOf.js index 65616d4..3c644af 100644 --- a/node_modules/lodash/package/indexOf.js +++ b/node_modules/globule/node_modules/lodash/indexOf.js @@ -6,7 +6,7 @@ var nativeMax = Math.max; /** * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. If `fromIndex` is negative, it's used as the * offset from the end of `array`. * @@ -14,7 +14,7 @@ var nativeMax = Math.max; * @memberOf _ * @since 0.1.0 * @category Array - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. @@ -28,15 +28,15 @@ var nativeMax = Math.max; * // => 3 */ function indexOf(array, value, fromIndex) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return -1; } - fromIndex = toInteger(fromIndex); - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); } - return baseIndexOf(array, value, fromIndex); + return baseIndexOf(array, value, index); } module.exports = indexOf; diff --git a/node_modules/lodash/package/initial.js b/node_modules/globule/node_modules/lodash/initial.js similarity index 70% rename from node_modules/lodash/package/initial.js rename to node_modules/globule/node_modules/lodash/initial.js index f4441b5..f47fc50 100644 --- a/node_modules/lodash/package/initial.js +++ b/node_modules/globule/node_modules/lodash/initial.js @@ -1,4 +1,4 @@ -var dropRight = require('./dropRight'); +var baseSlice = require('./_baseSlice'); /** * Gets all but the last element of `array`. @@ -15,7 +15,8 @@ var dropRight = require('./dropRight'); * // => [1, 2] */ function initial(array) { - return dropRight(array, 1); + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; } module.exports = initial; diff --git a/node_modules/lodash/package/intersection.js b/node_modules/globule/node_modules/lodash/intersection.js similarity index 66% rename from node_modules/lodash/package/intersection.js rename to node_modules/globule/node_modules/lodash/intersection.js index 1a7c770..a94c135 100644 --- a/node_modules/lodash/package/intersection.js +++ b/node_modules/globule/node_modules/lodash/intersection.js @@ -1,13 +1,13 @@ var arrayMap = require('./_arrayMap'), baseIntersection = require('./_baseIntersection'), - castArrayLikeObject = require('./_castArrayLikeObject'), - rest = require('./rest'); + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'); /** * Creates an array of unique values that are included in all given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. The order of result values is determined by the - * order they occur in the first array. + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. * * @static * @memberOf _ @@ -17,10 +17,10 @@ var arrayMap = require('./_arrayMap'), * @returns {Array} Returns the new array of intersecting values. * @example * - * _.intersection([2, 1], [4, 2], [1, 2]); + * _.intersection([2, 1], [2, 3]); * // => [2] */ -var intersection = rest(function(arrays) { +var intersection = baseRest(function(arrays) { var mapped = arrayMap(arrays, castArrayLikeObject); return (mapped.length && mapped[0] === arrays[0]) ? baseIntersection(mapped) diff --git a/node_modules/lodash/package/intersectionBy.js b/node_modules/globule/node_modules/lodash/intersectionBy.js similarity index 67% rename from node_modules/lodash/package/intersectionBy.js rename to node_modules/globule/node_modules/lodash/intersectionBy.js index 6afb79d..31461aa 100644 --- a/node_modules/lodash/package/intersectionBy.js +++ b/node_modules/globule/node_modules/lodash/intersectionBy.js @@ -1,34 +1,34 @@ var arrayMap = require('./_arrayMap'), baseIntersection = require('./_baseIntersection'), baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), castArrayLikeObject = require('./_castArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.intersection` except that it accepts `iteratee` * which is invoked for each element of each `arrays` to generate the criterion - * by which they're compared. Result values are chosen from the first array. - * The iteratee is invoked with one argument: (value). + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of intersecting values. * @example * - * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor); + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); * // => [2.1] * * // The `_.property` iteratee shorthand. * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }] */ -var intersectionBy = rest(function(arrays) { +var intersectionBy = baseRest(function(arrays) { var iteratee = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); @@ -38,7 +38,7 @@ var intersectionBy = rest(function(arrays) { mapped.pop(); } return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, baseIteratee(iteratee)) + ? baseIntersection(mapped, baseIteratee(iteratee, 2)) : []; }); diff --git a/node_modules/lodash/package/intersectionWith.js b/node_modules/globule/node_modules/lodash/intersectionWith.js similarity index 70% rename from node_modules/lodash/package/intersectionWith.js rename to node_modules/globule/node_modules/lodash/intersectionWith.js index bc195dc..63cabfa 100644 --- a/node_modules/lodash/package/intersectionWith.js +++ b/node_modules/globule/node_modules/lodash/intersectionWith.js @@ -1,14 +1,14 @@ var arrayMap = require('./_arrayMap'), baseIntersection = require('./_baseIntersection'), + baseRest = require('./_baseRest'), castArrayLikeObject = require('./_castArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.intersection` except that it accepts `comparator` - * which is invoked to compare elements of `arrays`. Result values are chosen - * from the first array. The comparator is invoked with two arguments: - * (arrVal, othVal). + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). * * @static * @memberOf _ @@ -25,13 +25,12 @@ var arrayMap = require('./_arrayMap'), * _.intersectionWith(objects, others, _.isEqual); * // => [{ 'x': 1, 'y': 2 }] */ -var intersectionWith = rest(function(arrays) { +var intersectionWith = baseRest(function(arrays) { var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); - if (comparator === last(mapped)) { - comparator = undefined; - } else { + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { mapped.pop(); } return (mapped.length && mapped[0] === arrays[0]) diff --git a/node_modules/lodash/package/invert.js b/node_modules/globule/node_modules/lodash/invert.js similarity index 100% rename from node_modules/lodash/package/invert.js rename to node_modules/globule/node_modules/lodash/invert.js diff --git a/node_modules/lodash/package/invertBy.js b/node_modules/globule/node_modules/lodash/invertBy.js similarity index 92% rename from node_modules/lodash/package/invertBy.js rename to node_modules/globule/node_modules/lodash/invertBy.js index 4298199..e5ba0f7 100644 --- a/node_modules/lodash/package/invertBy.js +++ b/node_modules/globule/node_modules/lodash/invertBy.js @@ -19,8 +19,7 @@ var hasOwnProperty = objectProto.hasOwnProperty; * @since 4.1.0 * @category Object * @param {Object} object The object to invert. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Object} Returns the new inverted object. * @example * diff --git a/node_modules/lodash/package/invoke.js b/node_modules/globule/node_modules/lodash/invoke.js similarity index 88% rename from node_modules/lodash/package/invoke.js rename to node_modules/globule/node_modules/lodash/invoke.js index 7b6f56b..97d51eb 100644 --- a/node_modules/lodash/package/invoke.js +++ b/node_modules/globule/node_modules/lodash/invoke.js @@ -1,5 +1,5 @@ var baseInvoke = require('./_baseInvoke'), - rest = require('./rest'); + baseRest = require('./_baseRest'); /** * Invokes the method at `path` of `object`. @@ -19,6 +19,6 @@ var baseInvoke = require('./_baseInvoke'), * _.invoke(object, 'a[0].b.c.slice', 1, 3); * // => [2, 3] */ -var invoke = rest(baseInvoke); +var invoke = baseRest(baseInvoke); module.exports = invoke; diff --git a/node_modules/lodash/package/invokeMap.js b/node_modules/globule/node_modules/lodash/invokeMap.js similarity index 83% rename from node_modules/lodash/package/invokeMap.js rename to node_modules/globule/node_modules/lodash/invokeMap.js index 4a6063e..f3302db 100644 --- a/node_modules/lodash/package/invokeMap.js +++ b/node_modules/globule/node_modules/lodash/invokeMap.js @@ -1,15 +1,15 @@ var apply = require('./_apply'), baseEach = require('./_baseEach'), baseInvoke = require('./_baseInvoke'), + baseRest = require('./_baseRest'), isArrayLike = require('./isArrayLike'), - isKey = require('./_isKey'), - rest = require('./rest'); + isKey = require('./_isKey'); /** * Invokes the method at `path` of each element in `collection`, returning * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `methodName` is a function, it's - * invoked for and `this` bound to, each element in `collection`. + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. * * @static * @memberOf _ @@ -28,7 +28,7 @@ var apply = require('./_apply'), * _.invokeMap([123, 456], String.prototype.split, ''); * // => [['1', '2', '3'], ['4', '5', '6']] */ -var invokeMap = rest(function(collection, path, args) { +var invokeMap = baseRest(function(collection, path, args) { var index = -1, isFunc = typeof path == 'function', isProp = isKey(path), diff --git a/node_modules/globule/node_modules/lodash/isArguments.js b/node_modules/globule/node_modules/lodash/isArguments.js new file mode 100644 index 0000000..8b9ed66 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/isArguments.js @@ -0,0 +1,36 @@ +var baseIsArguments = require('./_baseIsArguments'), + isObjectLike = require('./isObjectLike'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +module.exports = isArguments; diff --git a/node_modules/lodash/package/isArray.js b/node_modules/globule/node_modules/lodash/isArray.js similarity index 78% rename from node_modules/lodash/package/isArray.js rename to node_modules/globule/node_modules/lodash/isArray.js index 1901120..88ab55f 100644 --- a/node_modules/lodash/package/isArray.js +++ b/node_modules/globule/node_modules/lodash/isArray.js @@ -4,11 +4,9 @@ * @static * @memberOf _ * @since 0.1.0 - * @type {Function} * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); diff --git a/node_modules/globule/node_modules/lodash/isArrayBuffer.js b/node_modules/globule/node_modules/lodash/isArrayBuffer.js new file mode 100644 index 0000000..12904a6 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/isArrayBuffer.js @@ -0,0 +1,27 @@ +var baseIsArrayBuffer = require('./_baseIsArrayBuffer'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer; + +/** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ +var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + +module.exports = isArrayBuffer; diff --git a/node_modules/lodash/package/isArrayLike.js b/node_modules/globule/node_modules/lodash/isArrayLike.js similarity index 81% rename from node_modules/lodash/package/isArrayLike.js rename to node_modules/globule/node_modules/lodash/isArrayLike.js index 189a611..0f96680 100644 --- a/node_modules/lodash/package/isArrayLike.js +++ b/node_modules/globule/node_modules/lodash/isArrayLike.js @@ -1,5 +1,4 @@ -var getLength = require('./_getLength'), - isFunction = require('./isFunction'), +var isFunction = require('./isFunction'), isLength = require('./isLength'); /** @@ -28,7 +27,7 @@ var getLength = require('./_getLength'), * // => false */ function isArrayLike(value) { - return value != null && isLength(getLength(value)) && !isFunction(value); + return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; diff --git a/node_modules/lodash/package/isArrayLikeObject.js b/node_modules/globule/node_modules/lodash/isArrayLikeObject.js similarity index 100% rename from node_modules/lodash/package/isArrayLikeObject.js rename to node_modules/globule/node_modules/lodash/isArrayLikeObject.js diff --git a/node_modules/globule/node_modules/lodash/isBoolean.js b/node_modules/globule/node_modules/lodash/isBoolean.js new file mode 100644 index 0000000..a43ed4b --- /dev/null +++ b/node_modules/globule/node_modules/lodash/isBoolean.js @@ -0,0 +1,29 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]'; + +/** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ +function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); +} + +module.exports = isBoolean; diff --git a/node_modules/globule/node_modules/lodash/isBuffer.js b/node_modules/globule/node_modules/lodash/isBuffer.js new file mode 100644 index 0000000..c103cc7 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/isBuffer.js @@ -0,0 +1,38 @@ +var root = require('./_root'), + stubFalse = require('./stubFalse'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +module.exports = isBuffer; diff --git a/node_modules/globule/node_modules/lodash/isDate.js b/node_modules/globule/node_modules/lodash/isDate.js new file mode 100644 index 0000000..7f0209f --- /dev/null +++ b/node_modules/globule/node_modules/lodash/isDate.js @@ -0,0 +1,27 @@ +var baseIsDate = require('./_baseIsDate'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsDate = nodeUtil && nodeUtil.isDate; + +/** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ +var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + +module.exports = isDate; diff --git a/node_modules/lodash/package/isElement.js b/node_modules/globule/node_modules/lodash/isElement.js similarity index 81% rename from node_modules/lodash/package/isElement.js rename to node_modules/globule/node_modules/lodash/isElement.js index 67aca5d..76ae29c 100644 --- a/node_modules/lodash/package/isElement.js +++ b/node_modules/globule/node_modules/lodash/isElement.js @@ -9,8 +9,7 @@ var isObjectLike = require('./isObjectLike'), * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a DOM element, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. * @example * * _.isElement(document.body); @@ -20,7 +19,7 @@ var isObjectLike = require('./isObjectLike'), * // => false */ function isElement(value) { - return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value); + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); } module.exports = isElement; diff --git a/node_modules/lodash/package/isEmpty.js b/node_modules/globule/node_modules/lodash/isEmpty.js similarity index 65% rename from node_modules/lodash/package/isEmpty.js rename to node_modules/globule/node_modules/lodash/isEmpty.js index 9d46496..3597294 100644 --- a/node_modules/lodash/package/isEmpty.js +++ b/node_modules/globule/node_modules/lodash/isEmpty.js @@ -1,12 +1,11 @@ -var getTag = require('./_getTag'), +var baseKeys = require('./_baseKeys'), + getTag = require('./_getTag'), isArguments = require('./isArguments'), isArray = require('./isArray'), isArrayLike = require('./isArrayLike'), isBuffer = require('./isBuffer'), - isFunction = require('./isFunction'), - isObjectLike = require('./isObjectLike'), - isString = require('./isString'), - keys = require('./keys'); + isPrototype = require('./_isPrototype'), + isTypedArray = require('./isTypedArray'); /** `Object#toString` result references. */ var mapTag = '[object Map]', @@ -18,12 +17,6 @@ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */ -var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); - /** * Checks if `value` is an empty object, collection, map, or set. * @@ -58,23 +51,27 @@ var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); * // => false */ function isEmpty(value) { + if (value == null) { + return true; + } if (isArrayLike(value) && - (isArray(value) || isString(value) || isFunction(value.splice) || - isArguments(value) || isBuffer(value))) { + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { return !value.length; } - if (isObjectLike(value)) { - var tag = getTag(value); - if (tag == mapTag || tag == setTag) { - return !value.size; - } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; } for (var key in value) { if (hasOwnProperty.call(value, key)) { return false; } } - return !(nonEnumShadows && keys(value).length); + return true; } module.exports = isEmpty; diff --git a/node_modules/lodash/package/isEqual.js b/node_modules/globule/node_modules/lodash/isEqual.js similarity index 90% rename from node_modules/lodash/package/isEqual.js rename to node_modules/globule/node_modules/lodash/isEqual.js index dd5d0cc..8a54126 100644 --- a/node_modules/lodash/package/isEqual.js +++ b/node_modules/globule/node_modules/lodash/isEqual.js @@ -16,12 +16,11 @@ var baseIsEqual = require('./_baseIsEqual'); * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, - * else `false`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.isEqual(object, other); * // => true diff --git a/node_modules/lodash/package/isEqualWith.js b/node_modules/globule/node_modules/lodash/isEqualWith.js similarity index 98% rename from node_modules/lodash/package/isEqualWith.js rename to node_modules/globule/node_modules/lodash/isEqualWith.js index a442b24..fb83d50 100644 --- a/node_modules/lodash/package/isEqualWith.js +++ b/node_modules/globule/node_modules/lodash/isEqualWith.js @@ -13,8 +13,7 @@ var baseIsEqual = require('./_baseIsEqual'); * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if the values are equivalent, - * else `false`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * function isGreeting(value) { diff --git a/node_modules/lodash/package/isError.js b/node_modules/globule/node_modules/lodash/isError.js similarity index 59% rename from node_modules/lodash/package/isError.js rename to node_modules/globule/node_modules/lodash/isError.js index b4a93ae..b4f41e0 100644 --- a/node_modules/lodash/package/isError.js +++ b/node_modules/globule/node_modules/lodash/isError.js @@ -1,17 +1,10 @@ -var isObjectLike = require('./isObjectLike'); +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'), + isPlainObject = require('./isPlainObject'); /** `Object#toString` result references. */ -var errorTag = '[object Error]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; +var domExcTag = '[object DOMException]', + errorTag = '[object Error]'; /** * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, @@ -22,8 +15,7 @@ var objectToString = objectProto.toString; * @since 3.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an error object, - * else `false`. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. * @example * * _.isError(new Error); @@ -36,8 +28,9 @@ function isError(value) { if (!isObjectLike(value)) { return false; } - return (objectToString.call(value) == errorTag) || - (typeof value.message == 'string' && typeof value.name == 'string'); + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); } module.exports = isError; diff --git a/node_modules/lodash/package/isFinite.js b/node_modules/globule/node_modules/lodash/isFinite.js similarity index 88% rename from node_modules/lodash/package/isFinite.js rename to node_modules/globule/node_modules/lodash/isFinite.js index 744e7a6..601842b 100644 --- a/node_modules/lodash/package/isFinite.js +++ b/node_modules/globule/node_modules/lodash/isFinite.js @@ -14,21 +14,20 @@ var nativeIsFinite = root.isFinite; * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. * @example * * _.isFinite(3); * // => true * - * _.isFinite(Number.MAX_VALUE); - * // => true - * - * _.isFinite(3.14); + * _.isFinite(Number.MIN_VALUE); * // => true * * _.isFinite(Infinity); * // => false + * + * _.isFinite('3'); + * // => false */ function isFinite(value) { return typeof value == 'number' && nativeIsFinite(value); diff --git a/node_modules/globule/node_modules/lodash/isFunction.js b/node_modules/globule/node_modules/lodash/isFunction.js new file mode 100644 index 0000000..907a8cd --- /dev/null +++ b/node_modules/globule/node_modules/lodash/isFunction.js @@ -0,0 +1,37 @@ +var baseGetTag = require('./_baseGetTag'), + isObject = require('./isObject'); + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +module.exports = isFunction; diff --git a/node_modules/lodash/package/isInteger.js b/node_modules/globule/node_modules/lodash/isInteger.js similarity index 100% rename from node_modules/lodash/package/isInteger.js rename to node_modules/globule/node_modules/lodash/isInteger.js diff --git a/node_modules/lodash/package/isLength.js b/node_modules/globule/node_modules/lodash/isLength.js similarity index 83% rename from node_modules/lodash/package/isLength.js rename to node_modules/globule/node_modules/lodash/isLength.js index cd9b257..3a95caa 100644 --- a/node_modules/lodash/package/isLength.js +++ b/node_modules/globule/node_modules/lodash/isLength.js @@ -4,16 +4,15 @@ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); diff --git a/node_modules/globule/node_modules/lodash/isMap.js b/node_modules/globule/node_modules/lodash/isMap.js new file mode 100644 index 0000000..44f8517 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/isMap.js @@ -0,0 +1,27 @@ +var baseIsMap = require('./_baseIsMap'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsMap = nodeUtil && nodeUtil.isMap; + +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + +module.exports = isMap; diff --git a/node_modules/lodash/package/isMatch.js b/node_modules/globule/node_modules/lodash/isMatch.js similarity index 57% rename from node_modules/lodash/package/isMatch.js rename to node_modules/globule/node_modules/lodash/isMatch.js index 371e445..9773a18 100644 --- a/node_modules/lodash/package/isMatch.js +++ b/node_modules/globule/node_modules/lodash/isMatch.js @@ -3,10 +3,14 @@ var baseIsMatch = require('./_baseIsMatch'), /** * Performs a partial deep comparison between `object` and `source` to - * determine if `object` contains equivalent property values. This method is - * equivalent to a `_.matches` function when `source` is partially applied. + * determine if `object` contains equivalent property values. * - * **Note:** This method supports comparing the same values as `_.isEqual`. + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. * * @static * @memberOf _ @@ -17,12 +21,12 @@ var baseIsMatch = require('./_baseIsMatch'), * @returns {boolean} Returns `true` if `object` is a match, else `false`. * @example * - * var object = { 'user': 'fred', 'age': 40 }; + * var object = { 'a': 1, 'b': 2 }; * - * _.isMatch(object, { 'age': 40 }); + * _.isMatch(object, { 'b': 2 }); * // => true * - * _.isMatch(object, { 'age': 36 }); + * _.isMatch(object, { 'b': 1 }); * // => false */ function isMatch(object, source) { diff --git a/node_modules/lodash/package/isMatchWith.js b/node_modules/globule/node_modules/lodash/isMatchWith.js similarity index 100% rename from node_modules/lodash/package/isMatchWith.js rename to node_modules/globule/node_modules/lodash/isMatchWith.js diff --git a/node_modules/lodash/package/isNaN.js b/node_modules/globule/node_modules/lodash/isNaN.js similarity index 100% rename from node_modules/lodash/package/isNaN.js rename to node_modules/globule/node_modules/lodash/isNaN.js diff --git a/node_modules/globule/node_modules/lodash/isNative.js b/node_modules/globule/node_modules/lodash/isNative.js new file mode 100644 index 0000000..310b39d --- /dev/null +++ b/node_modules/globule/node_modules/lodash/isNative.js @@ -0,0 +1,40 @@ +var baseIsNative = require('./_baseIsNative'), + isMaskable = require('./_isMaskable'); + +/** Error message constants. */ +var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://github.com/es-shims.'; + +/** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ +function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); +} + +module.exports = isNative; diff --git a/node_modules/lodash/package/isNil.js b/node_modules/globule/node_modules/lodash/isNil.js similarity index 100% rename from node_modules/lodash/package/isNil.js rename to node_modules/globule/node_modules/lodash/isNil.js diff --git a/node_modules/lodash/package/isNull.js b/node_modules/globule/node_modules/lodash/isNull.js similarity index 100% rename from node_modules/lodash/package/isNull.js rename to node_modules/globule/node_modules/lodash/isNull.js diff --git a/node_modules/lodash/package/isNumber.js b/node_modules/globule/node_modules/lodash/isNumber.js similarity index 58% rename from node_modules/lodash/package/isNumber.js rename to node_modules/globule/node_modules/lodash/isNumber.js index e427282..cd34ee4 100644 --- a/node_modules/lodash/package/isNumber.js +++ b/node_modules/globule/node_modules/lodash/isNumber.js @@ -1,18 +1,9 @@ -var isObjectLike = require('./isObjectLike'); +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); /** `Object#toString` result references. */ var numberTag = '[object Number]'; -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - /** * Checks if `value` is classified as a `Number` primitive or object. * @@ -24,8 +15,7 @@ var objectToString = objectProto.toString; * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. * @example * * _.isNumber(3); @@ -42,7 +32,7 @@ var objectToString = objectProto.toString; */ function isNumber(value) { return typeof value == 'number' || - (isObjectLike(value) && objectToString.call(value) == numberTag); + (isObjectLike(value) && baseGetTag(value) == numberTag); } module.exports = isNumber; diff --git a/node_modules/lodash/package/isObject.js b/node_modules/globule/node_modules/lodash/isObject.js similarity index 81% rename from node_modules/lodash/package/isObject.js rename to node_modules/globule/node_modules/lodash/isObject.js index d16542f..1dc8939 100644 --- a/node_modules/lodash/package/isObject.js +++ b/node_modules/globule/node_modules/lodash/isObject.js @@ -1,6 +1,6 @@ /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -25,7 +25,7 @@ */ function isObject(value) { var type = typeof value; - return !!value && (type == 'object' || type == 'function'); + return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; diff --git a/node_modules/lodash/package/isObjectLike.js b/node_modules/globule/node_modules/lodash/isObjectLike.js similarity index 91% rename from node_modules/lodash/package/isObjectLike.js rename to node_modules/globule/node_modules/lodash/isObjectLike.js index e34114b..301716b 100644 --- a/node_modules/lodash/package/isObjectLike.js +++ b/node_modules/globule/node_modules/lodash/isObjectLike.js @@ -23,7 +23,7 @@ * // => false */ function isObjectLike(value) { - return !!value && typeof value == 'object'; + return value != null && typeof value == 'object'; } module.exports = isObjectLike; diff --git a/node_modules/lodash/package/isPlainObject.js b/node_modules/globule/node_modules/lodash/isPlainObject.js similarity index 67% rename from node_modules/lodash/package/isPlainObject.js rename to node_modules/globule/node_modules/lodash/isPlainObject.js index 13a90e7..2387373 100644 --- a/node_modules/lodash/package/isPlainObject.js +++ b/node_modules/globule/node_modules/lodash/isPlainObject.js @@ -1,15 +1,16 @@ -var getPrototype = require('./_getPrototype'), - isHostObject = require('./_isHostObject'), +var baseGetTag = require('./_baseGetTag'), + getPrototype = require('./_getPrototype'), isObjectLike = require('./isObjectLike'); /** `Object#toString` result references. */ var objectTag = '[object Object]'; /** Used for built-in method references. */ -var objectProto = Object.prototype; +var funcProto = Function.prototype, + objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ -var funcToString = Function.prototype.toString; +var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; @@ -17,13 +18,6 @@ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to infer the `Object` constructor. */ var objectCtorString = funcToString.call(Object); -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - /** * Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. @@ -33,8 +27,7 @@ var objectToString = objectProto.toString; * @since 0.8.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Foo() { @@ -54,8 +47,7 @@ var objectToString = objectProto.toString; * // => true */ function isPlainObject(value) { - if (!isObjectLike(value) || - objectToString.call(value) != objectTag || isHostObject(value)) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } var proto = getPrototype(value); @@ -63,8 +55,8 @@ function isPlainObject(value) { return true; } var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return (typeof Ctor == 'function' && - Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; } module.exports = isPlainObject; diff --git a/node_modules/globule/node_modules/lodash/isRegExp.js b/node_modules/globule/node_modules/lodash/isRegExp.js new file mode 100644 index 0000000..76c9b6e --- /dev/null +++ b/node_modules/globule/node_modules/lodash/isRegExp.js @@ -0,0 +1,27 @@ +var baseIsRegExp = require('./_baseIsRegExp'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; + +/** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ +var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + +module.exports = isRegExp; diff --git a/node_modules/lodash/package/isSafeInteger.js b/node_modules/globule/node_modules/lodash/isSafeInteger.js similarity index 97% rename from node_modules/lodash/package/isSafeInteger.js rename to node_modules/globule/node_modules/lodash/isSafeInteger.js index a780afb..2a48526 100644 --- a/node_modules/lodash/package/isSafeInteger.js +++ b/node_modules/globule/node_modules/lodash/isSafeInteger.js @@ -15,8 +15,7 @@ var MAX_SAFE_INTEGER = 9007199254740991; * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a safe integer, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. * @example * * _.isSafeInteger(3); diff --git a/node_modules/globule/node_modules/lodash/isSet.js b/node_modules/globule/node_modules/lodash/isSet.js new file mode 100644 index 0000000..ab88bdf --- /dev/null +++ b/node_modules/globule/node_modules/lodash/isSet.js @@ -0,0 +1,27 @@ +var baseIsSet = require('./_baseIsSet'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsSet = nodeUtil && nodeUtil.isSet; + +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + +module.exports = isSet; diff --git a/node_modules/lodash/package/isString.js b/node_modules/globule/node_modules/lodash/isString.js similarity index 50% rename from node_modules/lodash/package/isString.js rename to node_modules/globule/node_modules/lodash/isString.js index 573de3b..627eb9c 100644 --- a/node_modules/lodash/package/isString.js +++ b/node_modules/globule/node_modules/lodash/isString.js @@ -1,19 +1,10 @@ -var isArray = require('./isArray'), +var baseGetTag = require('./_baseGetTag'), + isArray = require('./isArray'), isObjectLike = require('./isObjectLike'); /** `Object#toString` result references. */ var stringTag = '[object String]'; -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - /** * Checks if `value` is classified as a `String` primitive or object. * @@ -22,8 +13,7 @@ var objectToString = objectProto.toString; * @memberOf _ * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. * @example * * _.isString('abc'); @@ -34,7 +24,7 @@ var objectToString = objectProto.toString; */ function isString(value) { return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); } module.exports = isString; diff --git a/node_modules/globule/node_modules/lodash/isSymbol.js b/node_modules/globule/node_modules/lodash/isSymbol.js new file mode 100644 index 0000000..dfb60b9 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/isSymbol.js @@ -0,0 +1,29 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); +} + +module.exports = isSymbol; diff --git a/node_modules/globule/node_modules/lodash/isTypedArray.js b/node_modules/globule/node_modules/lodash/isTypedArray.js new file mode 100644 index 0000000..da3f8dd --- /dev/null +++ b/node_modules/globule/node_modules/lodash/isTypedArray.js @@ -0,0 +1,27 @@ +var baseIsTypedArray = require('./_baseIsTypedArray'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +module.exports = isTypedArray; diff --git a/node_modules/lodash/package/isUndefined.js b/node_modules/globule/node_modules/lodash/isUndefined.js similarity index 100% rename from node_modules/lodash/package/isUndefined.js rename to node_modules/globule/node_modules/lodash/isUndefined.js diff --git a/node_modules/lodash/package/isWeakMap.js b/node_modules/globule/node_modules/lodash/isWeakMap.js similarity index 85% rename from node_modules/lodash/package/isWeakMap.js rename to node_modules/globule/node_modules/lodash/isWeakMap.js index cd7b9ed..8d36f66 100644 --- a/node_modules/lodash/package/isWeakMap.js +++ b/node_modules/globule/node_modules/lodash/isWeakMap.js @@ -12,8 +12,7 @@ var weakMapTag = '[object WeakMap]'; * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. * @example * * _.isWeakMap(new WeakMap); diff --git a/node_modules/globule/node_modules/lodash/isWeakSet.js b/node_modules/globule/node_modules/lodash/isWeakSet.js new file mode 100644 index 0000000..e628b26 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/isWeakSet.js @@ -0,0 +1,28 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var weakSetTag = '[object WeakSet]'; + +/** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ +function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; +} + +module.exports = isWeakSet; diff --git a/node_modules/lodash/package/iteratee.js b/node_modules/globule/node_modules/lodash/iteratee.js similarity index 100% rename from node_modules/lodash/package/iteratee.js rename to node_modules/globule/node_modules/lodash/iteratee.js diff --git a/node_modules/lodash/package/join.js b/node_modules/globule/node_modules/lodash/join.js similarity index 90% rename from node_modules/lodash/package/join.js rename to node_modules/globule/node_modules/lodash/join.js index fe31067..45de079 100644 --- a/node_modules/lodash/package/join.js +++ b/node_modules/globule/node_modules/lodash/join.js @@ -20,7 +20,7 @@ var nativeJoin = arrayProto.join; * // => 'a~b~c' */ function join(array, separator) { - return array ? nativeJoin.call(array, separator) : ''; + return array == null ? '' : nativeJoin.call(array, separator); } module.exports = join; diff --git a/node_modules/lodash/package/kebabCase.js b/node_modules/globule/node_modules/lodash/kebabCase.js similarity index 100% rename from node_modules/lodash/package/kebabCase.js rename to node_modules/globule/node_modules/lodash/kebabCase.js diff --git a/node_modules/lodash/package/keyBy.js b/node_modules/globule/node_modules/lodash/keyBy.js similarity index 81% rename from node_modules/lodash/package/keyBy.js rename to node_modules/globule/node_modules/lodash/keyBy.js index 97e6f4b..acc007a 100644 --- a/node_modules/lodash/package/keyBy.js +++ b/node_modules/globule/node_modules/lodash/keyBy.js @@ -1,4 +1,5 @@ -var createAggregator = require('./_createAggregator'); +var baseAssignValue = require('./_baseAssignValue'), + createAggregator = require('./_createAggregator'); /** * Creates an object composed of keys generated from the results of running @@ -11,8 +12,7 @@ var createAggregator = require('./_createAggregator'); * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee to transform keys. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example * @@ -30,7 +30,7 @@ var createAggregator = require('./_createAggregator'); * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } */ var keyBy = createAggregator(function(result, value, key) { - result[key] = value; + baseAssignValue(result, key, value); }); module.exports = keyBy; diff --git a/node_modules/globule/node_modules/lodash/keys.js b/node_modules/globule/node_modules/lodash/keys.js new file mode 100644 index 0000000..d143c71 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/keys.js @@ -0,0 +1,37 @@ +var arrayLikeKeys = require('./_arrayLikeKeys'), + baseKeys = require('./_baseKeys'), + isArrayLike = require('./isArrayLike'); + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +module.exports = keys; diff --git a/node_modules/globule/node_modules/lodash/keysIn.js b/node_modules/globule/node_modules/lodash/keysIn.js new file mode 100644 index 0000000..a62308f --- /dev/null +++ b/node_modules/globule/node_modules/lodash/keysIn.js @@ -0,0 +1,32 @@ +var arrayLikeKeys = require('./_arrayLikeKeys'), + baseKeysIn = require('./_baseKeysIn'), + isArrayLike = require('./isArrayLike'); + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} + +module.exports = keysIn; diff --git a/node_modules/lodash/package/lang.js b/node_modules/globule/node_modules/lodash/lang.js similarity index 96% rename from node_modules/lodash/package/lang.js rename to node_modules/globule/node_modules/lodash/lang.js index 665f5c6..a396216 100644 --- a/node_modules/lodash/package/lang.js +++ b/node_modules/globule/node_modules/lodash/lang.js @@ -4,6 +4,7 @@ module.exports = { 'cloneDeep': require('./cloneDeep'), 'cloneDeepWith': require('./cloneDeepWith'), 'cloneWith': require('./cloneWith'), + 'conformsTo': require('./conformsTo'), 'eq': require('./eq'), 'gt': require('./gt'), 'gte': require('./gte'), @@ -47,6 +48,7 @@ module.exports = { 'lt': require('./lt'), 'lte': require('./lte'), 'toArray': require('./toArray'), + 'toFinite': require('./toFinite'), 'toInteger': require('./toInteger'), 'toLength': require('./toLength'), 'toNumber': require('./toNumber'), diff --git a/node_modules/lodash/package/last.js b/node_modules/globule/node_modules/lodash/last.js similarity index 87% rename from node_modules/lodash/package/last.js rename to node_modules/globule/node_modules/lodash/last.js index 6402a4c..cad1eaf 100644 --- a/node_modules/lodash/package/last.js +++ b/node_modules/globule/node_modules/lodash/last.js @@ -13,7 +13,7 @@ * // => 3 */ function last(array) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? array[length - 1] : undefined; } diff --git a/node_modules/lodash/package/lastIndexOf.js b/node_modules/globule/node_modules/lodash/lastIndexOf.js similarity index 66% rename from node_modules/lodash/package/lastIndexOf.js rename to node_modules/globule/node_modules/lodash/lastIndexOf.js index 7e9d988..dabfb61 100644 --- a/node_modules/lodash/package/lastIndexOf.js +++ b/node_modules/globule/node_modules/lodash/lastIndexOf.js @@ -1,4 +1,6 @@ -var indexOfNaN = require('./_indexOfNaN'), +var baseFindIndex = require('./_baseFindIndex'), + baseIsNaN = require('./_baseIsNaN'), + strictLastIndexOf = require('./_strictLastIndexOf'), toInteger = require('./toInteger'); /* Built-in method references for those with the same name as other `lodash` methods. */ @@ -13,7 +15,7 @@ var nativeMax = Math.max, * @memberOf _ * @since 0.1.0 * @category Array - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=array.length-1] The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. @@ -27,28 +29,18 @@ var nativeMax = Math.max, * // => 1 */ function lastIndexOf(array, value, fromIndex) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = length; if (fromIndex !== undefined) { index = toInteger(fromIndex); - index = ( - index < 0 - ? nativeMax(length + index, 0) - : nativeMin(index, length - 1) - ) + 1; + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); } - if (value !== value) { - return indexOfNaN(array, index, true); - } - while (index--) { - if (array[index] === value) { - return index; - } - } - return -1; + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); } module.exports = lastIndexOf; diff --git a/node_modules/lodash/package/lodash.js b/node_modules/globule/node_modules/lodash/lodash.js similarity index 82% rename from node_modules/lodash/package/lodash.js rename to node_modules/globule/node_modules/lodash/lodash.js index 52b7325..72f744f 100644 --- a/node_modules/lodash/package/lodash.js +++ b/node_modules/globule/node_modules/lodash/lodash.js @@ -1,8 +1,7 @@ /** * @license - * lodash 4.11.2 (Custom Build) - * Build: `lodash -d -o ./foo/lodash.js` - * Copyright jQuery Foundation and other contributors + * lodash + * Copyright JS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors @@ -13,21 +12,25 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.11.2'; + var VERSION = '4.16.6'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; - /** Used as the `TypeError` message for "Functions" methods. */ - var FUNC_ERROR_TEXT = 'Expected a function'; + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://github.com/es-shims.', + FUNC_ERROR_TEXT = 'Expected a function'; /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + /** Used as the internal argument placeholder. */ var PLACEHOLDER = '__lodash_placeholder__'; - /** Used to compose bitmasks for wrapper metadata. */ + /** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1, BIND_KEY_FLAG = 2, CURRY_BOUND_FLAG = 4, @@ -48,7 +51,7 @@ DEFAULT_TRUNC_OMISSION = '...'; /** Used to detect hot functions by number of calls within a span of milliseconds. */ - var HOT_COUNT = 150, + var HOT_COUNT = 800, HOT_SPAN = 16; /** Used to indicate the type of lazy iteratees. */ @@ -67,22 +70,40 @@ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', ARY_FLAG], + ['bind', BIND_FLAG], + ['bindKey', BIND_KEY_FLAG], + ['curry', CURRY_FLAG], + ['curryRight', CURRY_RIGHT_FLAG], + ['flip', FLIP_FLAG], + ['partial', PARTIAL_FLAG], + ['partialRight', PARTIAL_RIGHT_FLAG], + ['rearg', REARG_FLAG] + ]; + /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', boolTag = '[object Boolean]', dateTag = '[object Date]', + domExcTag = '[object DOMException]', errorTag = '[object Error]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', mapTag = '[object Map]', numberTag = '[object Number]', + nullTag = '[object Null]', objectTag = '[object Object]', promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', weakMapTag = '[object WeakMap]', weakSetTag = '[object WeakSet]'; @@ -104,8 +125,8 @@ reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; /** Used to match HTML entities and HTML characters. */ - var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g, - reUnescapedHtml = /[&<>"'`]/g, + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source); @@ -117,11 +138,12 @@ /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g; + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source); @@ -131,24 +153,26 @@ reTrimStart = /^\s+/, reTrimEnd = /\s+$/; - /** Used to match non-compound words composed of alphanumeric characters. */ - var reBasicWord = /[a-zA-Z0-9]+/g; + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** * Used to match - * [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). */ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; /** Used to match `RegExp` flags from their coerced string values. */ var reFlags = /\w*$/; - /** Used to detect hexadecimal string values. */ - var reHasHexPrefix = /^0x/i; - /** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; @@ -164,8 +188,8 @@ /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; - /** Used to match latin-1 supplementary letters (excluding mathematical operators). */ - var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g; + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; /** Used to ensure capturing order of template delimiters. */ var reNoMatch = /($^)/; @@ -205,13 +229,15 @@ rsZWJ = '\\u200d'; /** Used to compose unicode regexes. */ - var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')', - rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')', - rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', - rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', reOptMod = rsModifier + '?', rsOptVar = '[' + rsVarRange + ']?', rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)', + rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)', rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; @@ -226,30 +252,32 @@ var reComboMark = RegExp(rsCombo, 'g'); /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ - var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); /** Used to match complex or compound words. */ - var reComplexWord = RegExp([ - rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', - rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')', - rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr, - rsUpper + '+' + rsOptUpperContr, + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, rsDigits, rsEmoji ].join('|'), 'g'); /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ - var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); /** Used to detect strings that need a more robust regexp to match words. */ - var reHasComplexWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; /** Used to assign default `context` object properties. */ var contextProps = [ 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', - 'Promise', 'Reflect', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', - 'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', + 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' ]; @@ -288,16 +316,17 @@ cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; - /** Used to map latin-1 supplementary letters to basic latin letters. */ + /** Used to map Latin Unicode letters to basic Latin letters. */ var deburredLetters = { + // Latin-1 Supplement block. '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', '\xc7': 'C', '\xe7': 'c', '\xd0': 'D', '\xf0': 'd', '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', - '\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', - '\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', '\xd1': 'N', '\xf1': 'n', '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', @@ -306,7 +335,43 @@ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', '\xc6': 'Ae', '\xe6': 'ae', '\xde': 'Th', '\xfe': 'th', - '\xdf': 'ss' + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' }; /** Used to map characters to HTML entities. */ @@ -315,8 +380,7 @@ '<': '<', '>': '>', '"': '"', - "'": ''', - '`': '`' + "'": ''' }; /** Used to map HTML entities to characters. */ @@ -325,14 +389,7 @@ '<': '<', '>': '>', '"': '"', - ''': "'", - '`': '`' - }; - - /** Used to determine if values are of the language type `Object`. */ - var objectTypes = { - 'function': true, - 'object': true + ''': "'" }; /** Used to escape characters for inclusion in compiled string literals. */ @@ -349,42 +406,41 @@ var freeParseFloat = parseFloat, freeParseInt = parseInt; - /** Detect free variable `exports`. */ - var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) - ? exports - : undefined; - - /** Detect free variable `module`. */ - var freeModule = (objectTypes[typeof module] && module && !module.nodeType) - ? module - : undefined; - - /** Detect the popular CommonJS extension `module.exports`. */ - var moduleExports = (freeModule && freeModule.exports === freeExports) - ? freeExports - : undefined; - /** Detect free variable `global` from Node.js. */ - var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; /** Detect free variable `self`. */ - var freeSelf = checkGlobal(objectTypes[typeof self] && self); + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - /** Detect free variable `window`. */ - var freeWindow = checkGlobal(objectTypes[typeof window] && window); + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); - /** Detect `this` as the global object. */ - var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - /** - * Used as a reference to the global object. - * - * The `this` value is used if it's the global object to avoid Greasemonkey's - * restricted `window` object, otherwise the `window` object is used. - */ - var root = freeGlobal || - ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || - freeSelf || thisGlobal || Function('return this')(); + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding('util'); + } catch (e) {} + }()); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /*--------------------------------------------------------------------------*/ @@ -397,7 +453,7 @@ * @returns {Object} Returns `map`. */ function addMapEntry(map, pair) { - // Don't return `Map#set` because it doesn't return the map instance in IE 11. + // Don't return `map.set` because it's not chainable in IE 11. map.set(pair[0], pair[1]); return map; } @@ -411,6 +467,7 @@ * @returns {Object} Returns `set`. */ function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. set.add(value); return set; } @@ -426,8 +483,7 @@ * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { - var length = args.length; - switch (length) { + switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); @@ -440,7 +496,7 @@ * A specialized version of `baseAggregator` for arrays. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} setter The function to set `accumulator` values. * @param {Function} iteratee The iteratee to transform keys. * @param {Object} accumulator The initial aggregated object. @@ -448,7 +504,7 @@ */ function arrayAggregator(array, setter, iteratee, accumulator) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { var value = array[index]; @@ -457,42 +513,18 @@ return accumulator; } - /** - * Creates a new array concatenating `array` with `other`. - * - * @private - * @param {Array} array The first array to concatenate. - * @param {Array} other The second array to concatenate. - * @returns {Array} Returns the new concatenated array. - */ - function arrayConcat(array, other) { - var index = -1, - length = array.length, - othIndex = -1, - othLength = other.length, - result = Array(length + othLength); - - while (++index < length) { - result[index] = array[index]; - } - while (++othIndex < othLength) { - result[index++] = other[othIndex]; - } - return result; - } - /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { if (iteratee(array[index], index, array) === false) { @@ -507,12 +539,12 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEachRight(array, iteratee) { - var length = array.length; + var length = array == null ? 0 : array.length; while (length--) { if (iteratee(array[length], length, array) === false) { @@ -527,14 +559,14 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if all elements pass the predicate check, * else `false`. */ function arrayEvery(array, predicate) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { if (!predicate(array[index], index, array)) { @@ -549,13 +581,13 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, - length = array.length, + length = array == null ? 0 : array.length, resIndex = 0, result = []; @@ -573,26 +605,27 @@ * specifying an index to search from. * * @private - * @param {Array} array The array to search. + * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludes(array, value) { - return !!array.length && baseIndexOf(array, value, 0) > -1; + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; } /** * This function is like `arrayIncludes` except that it accepts a comparator. * * @private - * @param {Array} array The array to search. + * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @param {Function} comparator The comparator invoked per element. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludesWith(array, value, comparator) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { if (comparator(value, array[index])) { @@ -607,13 +640,13 @@ * shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, - length = array.length, + length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { @@ -646,7 +679,7 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the first element of `array` as @@ -655,7 +688,7 @@ */ function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[++index]; @@ -671,7 +704,7 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the last element of `array` as @@ -679,7 +712,7 @@ * @returns {*} Returns the accumulated value. */ function arrayReduceRight(array, iteratee, accumulator, initAccum) { - var length = array.length; + var length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[--length]; } @@ -694,14 +727,14 @@ * shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { @@ -712,23 +745,52 @@ } /** - * The base implementation of methods like `_.find` and `_.findKey`, without - * support for iteratee shorthands, which iterates over `collection` using - * `eachFunc`. + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. * * @private - * @param {Array|Object} collection The collection to search. + * @param {Array|Object} collection The collection to inspect. * @param {Function} predicate The function invoked per iteration. * @param {Function} eachFunc The function to iterate over `collection`. - * @param {boolean} [retKey] Specify returning the key of the found element - * instead of the element itself. * @returns {*} Returns the found element or its key, else `undefined`. */ - function baseFind(collection, predicate, eachFunc, retKey) { + function baseFindKey(collection, predicate, eachFunc) { var result; eachFunc(collection, function(value, key, collection) { if (predicate(value, key, collection)) { - result = retKey ? key : value; + result = key; return false; } }); @@ -740,14 +802,15 @@ * support for iteratee shorthands. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {number} Returns the index of the matched value, else `-1`. */ - function baseFindIndex(array, predicate, fromRight) { + function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, - index = fromRight ? length : -1; + index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { if (predicate(array[index], index, array)) { @@ -761,31 +824,22 @@ * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseIndexOf(array, value, fromIndex) { - if (value !== value) { - return indexOfNaN(array, fromIndex); - } - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); } /** * This function is like `baseIndexOf` except that it accepts a comparator. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @param {Function} comparator The comparator invoked per element. @@ -803,6 +857,17 @@ return -1; } + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + /** * The base implementation of `_.mean` and `_.meanBy` without support for * iteratee shorthands. @@ -813,10 +878,36 @@ * @returns {number} Returns the mean. */ function baseMean(array, iteratee) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? (baseSum(array, iteratee) / length) : NAN; } + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + /** * The base implementation of `_.reduce` and `_.reduceRight`, without support * for iteratee shorthands, which iterates over `collection` using `eachFunc`. @@ -908,7 +999,7 @@ * @private * @param {Object} object The object to query. * @param {Array} props The property names to get values for. - * @returns {Object} Returns the new array of key-value pairs. + * @returns {Object} Returns the key-value pairs. */ function baseToPairs(object, props) { return arrayMap(props, function(key) { @@ -917,11 +1008,11 @@ } /** - * The base implementation of `_.unary` without support for storing wrapper metadata. + * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { @@ -945,6 +1036,18 @@ }); } + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + /** * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol * that is not found in the character symbols. @@ -978,17 +1081,6 @@ return index; } - /** - * Checks if `value` is a global object. - * - * @private - * @param {*} value The value to check. - * @returns {null|Object} Returns `value` if it's a global object, else `null`. - */ - function checkGlobal(value) { - return (value && value.Object === Object) ? value : null; - } - /** * Gets the number of `placeholder` occurrences in `array`. * @@ -1003,22 +1095,21 @@ while (length--) { if (array[length] === placeholder) { - result++; + ++result; } } return result; } /** - * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters. + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. * * @private * @param {string} letter The matched letter to deburr. * @returns {string} Returns the deburred letter. */ - function deburrLetter(letter) { - return deburredLetters[letter]; - } + var deburrLetter = basePropertyOf(deburredLetters); /** * Used by `_.escape` to convert characters to HTML entities. @@ -1027,9 +1118,7 @@ * @param {string} chr The matched character to escape. * @returns {string} Returns the escaped character. */ - function escapeHtmlChar(chr) { - return htmlEscapes[chr]; - } + var escapeHtmlChar = basePropertyOf(htmlEscapes); /** * Used by `_.template` to escape characters for inclusion in compiled string literals. @@ -1043,44 +1132,37 @@ } /** - * Gets the index at which the first occurrence of `NaN` is found in `array`. + * Gets the value at `key` of `object`. * * @private - * @param {Array} array The array to search. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched `NaN`, else `-1`. + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. */ - function indexOfNaN(array, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 0 : -1); + function getValue(object, key) { + return object == null ? undefined : object[key]; + } - while ((fromRight ? index-- : ++index < length)) { - var other = array[index]; - if (other !== other) { - return index; - } - } - return -1; + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); } /** - * Checks if `value` is a host object in IE < 9. + * Checks if `string` contains a word composed of Unicode symbols. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. */ - function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); } /** @@ -1101,11 +1183,11 @@ } /** - * Converts `map` to an array. + * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. - * @returns {Array} Returns the converted array. + * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, @@ -1117,6 +1199,20 @@ return result; } + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + /** * Replaces all `placeholder` elements in `array` with an internal placeholder * and returns an array of their indexes. @@ -1143,11 +1239,11 @@ } /** - * Converts `set` to an array. + * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. - * @returns {Array} Returns the converted array. + * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, @@ -1159,6 +1255,65 @@ return result; } + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + /** * Gets the number of symbols in `string`. * @@ -1167,14 +1322,9 @@ * @returns {number} Returns the string size. */ function stringSize(string) { - if (!(string && reHasComplexSymbol.test(string))) { - return string.length; - } - var result = reComplexSymbol.lastIndex = 0; - while (reComplexSymbol.test(string)) { - result++; - } - return result; + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); } /** @@ -1185,7 +1335,9 @@ * @returns {Array} Returns the converted array. */ function stringToArray(string) { - return string.match(reComplexSymbol); + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); } /** @@ -1195,8 +1347,43 @@ * @param {string} chr The matched character to unescape. * @returns {string} Returns the unescaped character. */ - function unescapeHtmlChar(chr) { - return htmlUnescapes[chr]; + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; } /*--------------------------------------------------------------------------*/ @@ -1227,33 +1414,33 @@ * lodash.isFunction(lodash.bar); * // => true * - * // Use `context` to mock `Date#getTime` use in `_.now`. - * var mock = _.runInContext({ - * 'Date': function() { - * return { 'getTime': getTimeMock }; - * } - * }); - * * // Create a suped-up `defer` in Node.js. * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; */ - function runInContext(context) { - context = context ? _.defaults({}, context, _.pick(root, contextProps)) : root; + var runInContext = (function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); /** Built-in constructor references. */ - var Date = context.Date, + var Array = context.Array, + Date = context.Date, Error = context.Error, + Function = context.Function, Math = context.Math, + Object = context.Object, RegExp = context.RegExp, + String = context.String, TypeError = context.TypeError; /** Used for built-in method references. */ - var arrayProto = context.Array.prototype, - objectProto = context.Object.prototype, - stringProto = context.String.prototype; + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; /** Used to resolve the decompiled source of functions. */ - var funcToString = context.Function.prototype.toString; + var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; @@ -1261,15 +1448,21 @@ /** Used to generate unique IDs. */ var idCounter = 0; - /** Used to infer the `Object` constructor. */ - var objectCtorString = funcToString.call(Object); + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ - var objectToString = objectProto.toString; + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); /** Used to restore the original `_` reference in `_.noConflict`. */ var oldDash = root._; @@ -1282,32 +1475,44 @@ /** Built-in value references. */ var Buffer = moduleExports ? context.Buffer : undefined, - Reflect = context.Reflect, Symbol = context.Symbol, Uint8Array = context.Uint8Array, - clearTimeout = context.clearTimeout, - enumerate = Reflect ? Reflect.enumerate : undefined, - getOwnPropertySymbols = Object.getOwnPropertySymbols, - iteratorSymbol = typeof (iteratorSymbol = Symbol && Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), objectCreate = Object.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, - setTimeout = context.setTimeout, - splice = arrayProto.splice; + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeCeil = Math.ceil, nativeFloor = Math.floor, - nativeGetPrototype = Object.getPrototypeOf, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, - nativeKeys = Object.keys, + nativeKeys = overArg(Object.keys, Object), nativeMax = Math.max, nativeMin = Math.min, + nativeNow = Date.now, nativeParseInt = context.parseInt, nativeRandom = Math.random, - nativeReplace = stringProto.replace, - nativeReverse = arrayProto.reverse, - nativeSplit = stringProto.split; + nativeReverse = arrayProto.reverse; /* Built-in method references that are verified to be native. */ var DataView = getNative(context, 'DataView'), @@ -1320,9 +1525,6 @@ /** Used to store function metadata. */ var metaMap = WeakMap && new WeakMap; - /** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */ - var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); - /** Used to lookup unminified function names. */ var realNames = {}; @@ -1406,28 +1608,30 @@ * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `divide`, `each`, - * `eachRight`, `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`, - * `findIndex`, `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`, - * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, - * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, - * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, - * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`, - * `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`, - * `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`, - * `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, - * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`, - * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, - * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, - * `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, `min`, `minBy`, `multiply`, - * `noConflict`, `noop`, `now`, `nth`, `pad`, `padEnd`, `padStart`, `parseInt`, - * `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`, - * `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, - * `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, - * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toInteger`, - * `toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`, `toString`, - * `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, - * `uniqueId`, `upperCase`, `upperFirst`, `value`, and `words` + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` * * @name _ * @constructor @@ -1467,6 +1671,30 @@ return new LodashWrapper(value); } + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + /** * The function whose prototype chain sequence wrappers inherit from. * @@ -1686,64 +1914,219 @@ * * @private * @constructor - * @returns {Object} Returns the new hash object. + * @param {Array} [entries] The key-value pairs to cache. */ - function Hash() {} + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; - /** - * Removes `key` and its value from the hash. + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. * * @private + * @name delete + * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function hashDelete(hash, key) { - return hashHas(hash, key) && delete hash[key]; + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; } /** * Gets the hash value for `key`. * * @private - * @param {Object} hash The hash to query. + * @name get + * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ - function hashGet(hash, key) { + function hashGet(key) { + var data = this.__data__; if (nativeCreate) { - var result = hash[key]; + var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } - return hasOwnProperty.call(hash, key) ? hash[key] : undefined; + return hasOwnProperty.call(data, key) ? data[key] : undefined; } /** * Checks if a hash value for `key` exists. * * @private - * @param {Object} hash The hash to query. + * @name has + * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function hashHas(hash, key) { - return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key); + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); } /** * Sets the hash `key` to `value`. * * @private - * @param {Object} hash The hash to modify. + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. */ - function hashSet(hash, key, value) { - hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; } - // Avoid inheriting from `Object.prototype` when possible. - Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto; + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; /*------------------------------------------------------------------------*/ @@ -1752,15 +2135,15 @@ * * @private * @constructor - * @param {Array} [values] The values to cache. + * @param {Array} [entries] The key-value pairs to cache. */ - function MapCache(values) { + function MapCache(entries) { var index = -1, - length = values ? values.length : 0; + length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { - var entry = values[index]; + var entry = entries[index]; this.set(entry[0], entry[1]); } } @@ -1772,10 +2155,11 @@ * @name clear * @memberOf MapCache */ - function mapClear() { + function mapCacheClear() { + this.size = 0; this.__data__ = { 'hash': new Hash, - 'map': Map ? new Map : [], + 'map': new (Map || ListCache), 'string': new Hash }; } @@ -1789,12 +2173,10 @@ * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function mapDelete(key) { - var data = this.__data__; - if (isKeyable(key)) { - return hashDelete(typeof key == 'string' ? data.string : data.hash, key); - } - return Map ? data.map['delete'](key) : assocDelete(data.map, key); + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; } /** @@ -1806,12 +2188,8 @@ * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ - function mapGet(key) { - var data = this.__data__; - if (isKeyable(key)) { - return hashGet(typeof key == 'string' ? data.string : data.hash, key); - } - return Map ? data.map.get(key) : assocGet(data.map, key); + function mapCacheGet(key) { + return getMapData(this, key).get(key); } /** @@ -1823,12 +2201,8 @@ * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function mapHas(key) { - var data = this.__data__; - if (isKeyable(key)) { - return hashHas(typeof key == 'string' ? data.string : data.hash, key); - } - return Map ? data.map.has(key) : assocHas(data.map, key); + function mapCacheHas(key) { + return getMapData(this, key).has(key); } /** @@ -1841,30 +2215,27 @@ * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ - function mapSet(key, value) { - var data = this.__data__; - if (isKeyable(key)) { - hashSet(typeof key == 'string' ? data.string : data.hash, key, value); - } else if (Map) { - data.map.set(key, value); - } else { - assocSet(data.map, key, value); - } + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; return this; } // Add methods to `MapCache`. - MapCache.prototype.clear = mapClear; - MapCache.prototype['delete'] = mapDelete; - MapCache.prototype.get = mapGet; - MapCache.prototype.has = mapHas; - MapCache.prototype.set = mapSet; + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; /*------------------------------------------------------------------------*/ /** * - * Creates a set cache object to store unique values. + * Creates an array cache object to store unique values. * * @private * @constructor @@ -1872,56 +2243,45 @@ */ function SetCache(values) { var index = -1, - length = values ? values.length : 0; + length = values == null ? 0 : values.length; this.__data__ = new MapCache; while (++index < length) { - this.push(values[index]); + this.add(values[index]); } } /** - * Checks if `value` is in `cache`. + * Adds `value` to the array cache. * * @private - * @param {Object} cache The set cache to search. - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. */ - function cacheHas(cache, value) { - var map = cache.__data__; - if (isKeyable(value)) { - var data = map.__data__, - hash = typeof value == 'string' ? data.string : data.hash; - - return hash[value] === HASH_UNDEFINED; - } - return map.has(value); + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; } /** - * Adds `value` to the set cache. + * Checks if `value` is in the array cache. * * @private - * @name push + * @name has * @memberOf SetCache - * @param {*} value The value to cache. + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. */ - function cachePush(value) { - var map = this.__data__; - if (isKeyable(value)) { - var data = map.__data__, - hash = typeof value == 'string' ? data.string : data.hash; - - hash[value] = HASH_UNDEFINED; - } - else { - map.set(value, HASH_UNDEFINED); - } + function setCacheHas(value) { + return this.__data__.has(value); } // Add methods to `SetCache`. - SetCache.prototype.push = cachePush; + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; /*------------------------------------------------------------------------*/ @@ -1930,17 +2290,11 @@ * * @private * @constructor - * @param {Array} [values] The values to cache. + * @param {Array} [entries] The key-value pairs to cache. */ - function Stack(values) { - var index = -1, - length = values ? values.length : 0; - - this.clear(); - while (++index < length) { - var entry = values[index]; - this.set(entry[0], entry[1]); - } + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; } /** @@ -1951,7 +2305,8 @@ * @memberOf Stack */ function stackClear() { - this.__data__ = { 'array': [], 'map': null }; + this.__data__ = new ListCache; + this.size = 0; } /** @@ -1965,9 +2320,10 @@ */ function stackDelete(key) { var data = this.__data__, - array = data.array; + result = data['delete'](key); - return array ? assocDelete(array, key) : data.map['delete'](key); + this.size = data.size; + return result; } /** @@ -1980,10 +2336,7 @@ * @returns {*} Returns the entry value. */ function stackGet(key) { - var data = this.__data__, - array = data.array; - - return array ? assocGet(array, key) : data.map.get(key); + return this.__data__.get(key); } /** @@ -1996,10 +2349,7 @@ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { - var data = this.__data__, - array = data.array; - - return array ? assocHas(array, key) : data.map.has(key); + return this.__data__.has(key); } /** @@ -2013,21 +2363,18 @@ * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { - var data = this.__data__, - array = data.array; - - if (array) { - if (array.length < (LARGE_ARRAY_SIZE - 1)) { - assocSet(array, key, value); - } else { - data.array = null; - data.map = new MapCache(array); + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; } + data = this.__data__ = new MapCache(pairs); } - var map = data.map; - if (map) { - map.set(key, value); - } + data.set(key, value); + this.size = data.size; return this; } @@ -2041,89 +2388,75 @@ /*------------------------------------------------------------------------*/ /** - * Removes `key` and its value from the associative array. + * Creates an array of the enumerable property names of the array-like `value`. * * @private - * @param {Array} array The array to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. */ - function assocDelete(array, key) { - var index = assocIndexOf(array, key); - if (index < 0) { - return false; - } - var lastIndex = array.length - 1; - if (index == lastIndex) { - array.pop(); - } else { - splice.call(array, index, 1); - } - return true; - } + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; - /** - * Gets the associative array value for `key`. - * - * @private - * @param {Array} array The array to query. - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function assocGet(array, key) { - var index = assocIndexOf(array, key); - return index < 0 ? undefined : array[index][1]; + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; } /** - * Checks if an associative array value for `key` exists. + * A specialized version of `_.sample` for arrays. * * @private - * @param {Array} array The array to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. */ - function assocHas(array, key) { - return assocIndexOf(array, key) > -1; + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; } /** - * Gets the index at which the `key` is found in `array` of key-value pairs. + * A specialized version of `_.sampleSize` for arrays. * * @private - * @param {Array} array The array to search. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. */ - function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); } /** - * Sets the associative array `key` to `value`. + * A specialized version of `_.shuffle` for arrays. * * @private - * @param {Array} array The array to modify. - * @param {string} key The key of the value to set. - * @param {*} value The value to set. + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. */ - function assocSet(array, key, value) { - var index = assocIndexOf(array, key); - if (index < 0) { - array.push([key, value]); - } else { - array[index][1] = value; - } + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); } - /*------------------------------------------------------------------------*/ - /** * Used by `_.defaults` to customize its `_.assignIn` use. * @@ -2153,14 +2486,14 @@ */ function assignMergeValue(object, key, value) { if ((value !== undefined && !eq(object[key], value)) || - (typeof key == 'number' && value === undefined && !(key in object))) { - object[key] = value; + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); } } /** * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private @@ -2172,10 +2505,28 @@ var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { - object[key] = value; + baseAssignValue(object, key, value); } } + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + /** * Aggregates elements of `collection` on `accumulator` with keys transformed * by `iteratee` and values set by `setter`. @@ -2207,28 +2558,50 @@ return object && copyObject(source, keys(source), object); } + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + /** * The base implementation of `_.at` without support for individual paths. * * @private * @param {Object} object The object to iterate over. * @param {string[]} paths The property paths of elements to pick. - * @returns {Array} Returns the new array of picked elements. + * @returns {Array} Returns the picked elements. */ function baseAt(object, paths) { var index = -1, - isNil = object == null, length = paths.length, - result = Array(length); + result = Array(length), + skip = object == null; while (++index < length) { - result[index] = isNil ? undefined : get(object, paths[index]); + result[index] = skip ? undefined : get(object, paths[index]); } return result; } /** - * The base implementation of `_.clamp` which doesn't coerce arguments to numbers. + * The base implementation of `_.clamp` which doesn't coerce arguments. * * @private * @param {number} number The number to clamp. @@ -2287,9 +2660,6 @@ return cloneBuffer(value, isDeep); } if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - if (isHostObject(value)) { - return object ? value : {}; - } result = initCloneObject(isFunc ? {} : value); if (!isDeep) { return copySymbols(value, baseAssign(result, value)); @@ -2309,15 +2679,13 @@ } stack.set(value, result); - if (!isArr) { - var props = isFull ? getAllKeys(value) : keys(value); - } - // Recursively populate clone (susceptible to call stack limits). + var props = isArr ? undefined : (isFull ? getAllKeys : keys)(value); arrayEach(props || value, function(subValue, key) { if (props) { key = subValue; subValue = value[key]; } + // Recursively populate clone (susceptible to call stack limits). assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); }); return result; @@ -2328,52 +2696,50 @@ * * @private * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseConforms(source) { - var props = keys(source), - length = props.length; - + var props = keys(source); return function(object) { - if (object == null) { - return !length; - } - var index = length; - while (index--) { - var key = props[index], - predicate = source[key], - value = object[key]; - - if ((value === undefined && - !(key in Object(object))) || !predicate(value)) { - return false; - } - } - return true; + return baseConformsTo(object, source, props); }; } /** - * The base implementation of `_.create` without support for assigning - * properties to the created object. + * The base implementation of `_.conformsTo` which accepts `props` to check. * * @private - * @param {Object} prototype The object to inherit from. - * @returns {Object} Returns the new object. + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. */ - function baseCreate(proto) { - return isObject(proto) ? objectCreate(proto) : {}; + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; } /** - * The base implementation of `_.delay` and `_.defer` which accepts an array - * of `func` arguments. + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. * * @private * @param {Function} func The function to delay. * @param {number} wait The number of milliseconds to delay invocation. - * @param {Object} args The arguments to provide to `func`. - * @returns {number} Returns the timer id. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. */ function baseDelay(func, wait, args) { if (typeof func != 'function') { @@ -2419,7 +2785,7 @@ outer: while (++index < length) { var value = array[index], - computed = iteratee ? iteratee(value) : value; + computed = iteratee == null ? value : iteratee(value); value = (comparator || value !== 0) ? value : 0; if (isCommon && computed === computed) { @@ -2641,7 +3007,7 @@ * @private * @param {Object} object The object to inspect. * @param {Array} props The property names to filter. - * @returns {Array} Returns the new array of filtered property names. + * @returns {Array} Returns the function names. */ function baseFunctions(object, props) { return arrayFilter(props, function(key) { @@ -2682,13 +3048,28 @@ */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); - return isArray(object) - ? result - : arrayPush(result, symbolsFunc(object)); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + value = Object(value); + return (symToStringTag && symToStringTag in value) + ? getRawTag(value) + : objectToString(value); } /** - * The base implementation of `_.gt` which doesn't coerce arguments to numbers. + * The base implementation of `_.gt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. @@ -2704,32 +3085,28 @@ * The base implementation of `_.has` without support for deep paths. * * @private - * @param {Object} object The object to query. + * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHas(object, key) { - // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`, - // that are composed entirely of index properties, return `false` for - // `hasOwnProperty` checks of them. - return hasOwnProperty.call(object, key) || - (typeof object == 'object' && key in object && getPrototype(object) === null); + return object != null && hasOwnProperty.call(object, key); } /** * The base implementation of `_.hasIn` without support for deep paths. * * @private - * @param {Object} object The object to query. + * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { - return key in Object(object); + return object != null && key in Object(object); } /** - * The base implementation of `_.inRange` which doesn't coerce arguments to numbers. + * The base implementation of `_.inRange` which doesn't coerce arguments. * * @private * @param {number} number The number to check. @@ -2842,6 +3219,39 @@ return func == null ? undefined : apply(func, object, args); } + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. @@ -2896,10 +3306,17 @@ othTag = getTag(other); othTag = othTag == argsTag ? objectTag : othTag; } - var objIsObj = objTag == objectTag && !isHostObject(object), - othIsObj = othTag == objectTag && !isHostObject(other), + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, isSameTag = objTag == othTag; + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } if (isSameTag && !objIsObj) { stack || (stack = new Stack); return (objIsArr || isTypedArray(object)) @@ -2925,6 +3342,17 @@ return equalObjects(object, other, equalFunc, customizer, bitmask, stack); } + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + /** * The base implementation of `_.isMatch` without support for iteratee shorthands. * @@ -2979,6 +3407,56 @@ return true; } + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + /** * The base implementation of `_.iteratee`. * @@ -3004,44 +3482,49 @@ } /** - * The base implementation of `_.keys` which doesn't skip the constructor - * property of prototypes or treat sparse arrays as dense. + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { - return nativeKeys(Object(object)); + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; } /** - * The base implementation of `_.keysIn` which doesn't skip the constructor - * property of prototypes or treat sparse arrays as dense. + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeysIn(object) { - object = object == null ? object : Object(object); + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; - var result = []; for (var key in object) { - result.push(key); + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } } return result; } - // Fallback for IE < 9 with es6-shim. - if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) { - baseKeysIn = function(object) { - return iteratorToArray(enumerate(object)); - }; - } - /** - * The base implementation of `_.lt` which doesn't coerce arguments to numbers. + * The base implementation of `_.lt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. @@ -3076,7 +3559,7 @@ * * @private * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var matchData = getMatchData(source); @@ -3094,7 +3577,7 @@ * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { @@ -3123,14 +3606,7 @@ if (object === source) { return; } - if (!(isArray(source) || isTypedArray(source))) { - var props = keysIn(source); - } - arrayEach(props || source, function(srcValue, key) { - if (props) { - key = srcValue; - srcValue = source[key]; - } + baseFor(source, function(srcValue, key) { if (isObject(srcValue)) { stack || (stack = new Stack); baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); @@ -3145,7 +3621,7 @@ } assignMergeValue(object, key, newValue); } - }); + }, keysIn); } /** @@ -3179,47 +3655,54 @@ var isCommon = newValue === undefined; if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + newValue = srcValue; - if (isArray(srcValue) || isTypedArray(srcValue)) { + if (isArr || isBuff || isTyped) { if (isArray(objValue)) { newValue = objValue; } else if (isArrayLikeObject(objValue)) { newValue = copyArray(objValue); } - else { + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { isCommon = false; - newValue = baseClone(srcValue, true); + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; if (isArguments(objValue)) { newValue = toPlainObject(objValue); } else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { - isCommon = false; - newValue = baseClone(srcValue, true); - } - else { - newValue = objValue; + newValue = initCloneObject(srcValue); } } else { isCommon = false; } } - stack.set(srcValue, newValue); - if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); } - stack['delete'](srcValue); assignMergeValue(object, key, newValue); } /** - * The base implementation of `_.nth` which doesn't coerce `n` to an integer. + * The base implementation of `_.nth` which doesn't coerce arguments. * * @private * @param {Array} array The array to query. @@ -3271,12 +3754,9 @@ */ function basePick(object, props) { object = Object(object); - return arrayReduce(props, function(result, key) { - if (key in object) { - result[key] = object[key]; - } - return result; - }, {}); + return basePickBy(object, props, function(value, key) { + return key in object; + }); } /** @@ -3284,12 +3764,12 @@ * * @private * @param {Object} object The source object. + * @param {string[]} props The property identifiers to pick from. * @param {Function} predicate The function invoked per property. * @returns {Object} Returns the new object. */ - function basePickBy(object, predicate) { + function basePickBy(object, props, predicate) { var index = -1, - props = getAllKeysIn(object), length = props.length, result = {}; @@ -3298,31 +3778,18 @@ value = object[key]; if (predicate(value, key)) { - result[key] = value; + baseAssignValue(result, key, value); } } return result; } - /** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; - } - /** * A specialized version of `baseProperty` which supports deep paths. * * @private * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. */ function basePropertyDeep(path) { return function(object) { @@ -3347,6 +3814,9 @@ length = values.length, seen = array; + if (array === values) { + values = copyArray(values); + } if (iteratee) { seen = arrayMap(array, baseUnary(iteratee)); } @@ -3416,14 +3886,14 @@ /** * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments to numbers. + * coerce arguments. * * @private * @param {number} start The start of the range. * @param {number} end The end of the range. * @param {number} step The value to increment or decrement by. * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. */ function baseRange(start, end, step, fromRight) { var index = -1, @@ -3465,17 +3935,56 @@ return result; } + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + /** * The base implementation of `_.set`. * * @private - * @param {Object} object The object to query. + * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @param {Function} [customizer] The function to customize path creation. * @returns {Object} Returns `object`. */ function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } path = isKey(path, object) ? [path] : castPath(path); var index = -1, @@ -3484,37 +3993,64 @@ nested = object; while (nested != null && ++index < length) { - var key = toKey(path[index]); - if (isObject(nested)) { - var newValue = value; - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = objValue == null - ? (isIndex(path[index + 1]) ? [] : {}) - : objValue; - } + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); } - assignValue(nested, key, newValue); } + assignValue(nested, key, newValue); nested = nested[key]; } return object; } /** - * The base implementation of `setData` without support for hot loop detection. + * The base implementation of `setData` without support for hot loop shorting. * * @private * @param {Function} func The function to associate metadata with. * @param {*} data The metadata. * @returns {Function} Returns `func`. */ - var baseSetData = !metaMap ? identity : function(func, data) { - metaMap.set(func, data); - return func; - }; + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } /** * The base implementation of `_.slice` without an iteratee call guard. @@ -3579,7 +4115,7 @@ */ function baseSortedIndex(array, value, retHighest) { var low = 0, - high = array ? array.length : low; + high = array == null ? low : array.length; if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { while (low < high) { @@ -3615,7 +4151,7 @@ value = iteratee(value); var low = 0, - high = array ? array.length : 0, + high = array == null ? 0 : array.length, valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), @@ -3709,6 +4245,10 @@ if (typeof value == 'string') { return value; } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } @@ -3790,14 +4330,14 @@ object = parent(object, path); var key = toKey(last(path)); - return !(object != null && baseHas(object, key)) || delete object[key]; + return !(object != null && hasOwnProperty.call(object, key)) || delete object[key]; } /** * The base implementation of `_.update`. * * @private - * @param {Object} object The object to query. + * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to update. * @param {Function} updater The function to produce the updated value. * @param {Function} [customizer] The function to customize path creation. @@ -3861,18 +4401,24 @@ * @returns {Array} Returns the new array of values. */ function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } var index = -1, - length = arrays.length; + result = Array(length); while (++index < length) { - var result = result - ? arrayPush( - baseDifference(result, arrays[index], iteratee, comparator), - baseDifference(arrays[index], result, iteratee, comparator) - ) - : arrays[index]; + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } } - return (result && result.length) ? baseUniq(result, iteratee, comparator) : []; + return baseUniq(baseFlatten(result, 1), iteratee, comparator); } /** @@ -3930,6 +4476,17 @@ return isArray(value) ? value : stringToPath(value); } + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + /** * Casts `array` to a slice if it's needed. * @@ -3945,6 +4502,16 @@ return (!start && end >= length) ? array : baseSlice(array, start, end); } + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; + /** * Creates a clone of `buffer`. * @@ -3957,7 +4524,9 @@ if (isDeep) { return buffer.slice(); } - var result = new buffer.constructor(buffer.length); + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + buffer.copy(result); return result; } @@ -4137,7 +4706,7 @@ * placeholders, and provided arguments into a single array of arguments. * * @private - * @param {Array|Object} args The provided arguments. + * @param {Array} args The provided arguments. * @param {Array} partials The arguments to prepend to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. @@ -4172,7 +4741,7 @@ * is tailored for `_.partialRight`. * * @private - * @param {Array|Object} args The provided arguments. + * @param {Array} args The provided arguments. * @param {Array} partials The arguments to append to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. @@ -4234,6 +4803,7 @@ * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { + var isNew = !object; object || (object = {}); var index = -1, @@ -4244,9 +4814,16 @@ var newValue = customizer ? customizer(object[key], source[key], key, object, source) - : source[key]; + : undefined; - assignValue(object, key, newValue); + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } } return object; } @@ -4276,7 +4853,7 @@ var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {}; - return func(collection, setter, getIteratee(iteratee), accumulator); + return func(collection, setter, getIteratee(iteratee, 2), accumulator); }; } @@ -4288,13 +4865,13 @@ * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { - return rest(function(object, sources) { + return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; - customizer = typeof customizer == 'function' + customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; @@ -4372,14 +4949,13 @@ * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @returns {Function} Returns the new wrapped function. */ - function createBaseWrapper(func, bitmask, thisArg) { + function createBind(func, bitmask, thisArg) { var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); + Ctor = createCtor(func); function wrapper() { var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; @@ -4393,13 +4969,13 @@ * * @private * @param {string} methodName The name of the `String` case method to use. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new case function. */ function createCaseFirst(methodName) { return function(string) { string = toString(string); - var strSymbols = reHasComplexSymbol.test(string) + var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined; @@ -4436,10 +5012,10 @@ * @param {Function} Ctor The constructor to wrap. * @returns {Function} Returns the new wrapped function. */ - function createCtorWrapper(Ctor) { + function createCtor(Ctor) { return function() { // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { @@ -4466,19 +5042,18 @@ * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {number} arity The arity of `func`. * @returns {Function} Returns the new wrapped function. */ - function createCurryWrapper(func, bitmask, arity) { - var Ctor = createCtorWrapper(func); + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); function wrapper() { var length = arguments.length, args = Array(length), index = length, - placeholder = getPlaceholder(wrapper); + placeholder = getHolder(wrapper); while (index--) { args[index] = arguments[index]; @@ -4489,8 +5064,8 @@ length -= holders.length; if (length < arity) { - return createRecurryWrapper( - func, bitmask, createHybridWrapper, wrapper.placeholder, undefined, + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length); } var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; @@ -4499,6 +5074,26 @@ return wrapper; } + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + /** * Creates a `_.flow` or `_.flowRight` function. * @@ -4507,9 +5102,7 @@ * @returns {Function} Returns the new flow function. */ function createFlow(fromRight) { - return rest(function(funcs) { - funcs = baseFlatten(funcs, 1); - + return flatRest(function(funcs) { var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru; @@ -4569,8 +5162,7 @@ * * @private * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to * the new function. @@ -4583,24 +5175,24 @@ * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ - function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { var isAry = bitmask & ARY_FLAG, isBind = bitmask & BIND_FLAG, isBindKey = bitmask & BIND_KEY_FLAG, isCurried = bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG), isFlip = bitmask & FLIP_FLAG, - Ctor = isBindKey ? undefined : createCtorWrapper(func); + Ctor = isBindKey ? undefined : createCtor(func); function wrapper() { var length = arguments.length, - index = length, - args = Array(length); + args = Array(length), + index = length; while (index--) { args[index] = arguments[index]; } if (isCurried) { - var placeholder = getPlaceholder(wrapper), + var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder); } if (partials) { @@ -4612,8 +5204,8 @@ length -= holdersCount; if (isCurried && length < arity) { var newHolders = replaceHolders(args, placeholder); - return createRecurryWrapper( - func, bitmask, createHybridWrapper, wrapper.placeholder, thisArg, + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, args, newHolders, argPos, ary, arity - length ); } @@ -4630,7 +5222,7 @@ args.length = ary; } if (this && this !== root && this instanceof wrapper) { - fn = Ctor || createCtorWrapper(fn); + fn = Ctor || createCtor(fn); } return fn.apply(thisBinding, args); } @@ -4656,13 +5248,14 @@ * * @private * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. * @returns {Function} Returns the new mathematical operation function. */ - function createMathOperation(operator) { + function createMathOperation(operator, defaultValue) { return function(value, other) { var result; if (value === undefined && other === undefined) { - return 0; + return defaultValue; } if (value !== undefined) { result = value; @@ -4689,15 +5282,12 @@ * * @private * @param {Function} arrayFunc The function to iterate over iteratees. - * @returns {Function} Returns the new invoker function. + * @returns {Function} Returns the new over function. */ function createOver(arrayFunc) { - return rest(function(iteratees) { - iteratees = (iteratees.length == 1 && isArray(iteratees[0])) - ? arrayMap(iteratees[0], baseUnary(getIteratee())) - : arrayMap(baseFlatten(iteratees, 1, isFlattenableIteratee), baseUnary(getIteratee())); - - return rest(function(args) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { var thisArg = this; return arrayFunc(iteratees, function(iteratee) { return apply(iteratee, thisArg, args); @@ -4723,7 +5313,7 @@ return charsLength ? baseRepeat(chars, length) : chars; } var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); - return reHasComplexSymbol.test(chars) + return hasUnicode(chars) ? castSlice(stringToArray(result), 0, length).join('') : result.slice(0, length); } @@ -4734,16 +5324,15 @@ * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} thisArg The `this` binding of `func`. * @param {Array} partials The arguments to prepend to those provided to * the new function. * @returns {Function} Returns the new wrapped function. */ - function createPartialWrapper(func, bitmask, thisArg, partials) { + function createPartial(func, bitmask, thisArg, partials) { var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); + Ctor = createCtor(func); function wrapper() { var argsIndex = -1, @@ -4777,15 +5366,14 @@ end = step = undefined; } // Ensure the sign of `-0` is preserved. - start = toNumber(start); - start = start === start ? start : 0; + start = toFinite(start); if (end === undefined) { end = start; start = 0; } else { - end = toNumber(end) || 0; + end = toFinite(end); } - step = step === undefined ? (start < end ? 1 : -1) : (toNumber(step) || 0); + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); return baseRange(start, end, step, fromRight); }; } @@ -4812,8 +5400,7 @@ * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {Function} wrapFunc The function to create the `func` wrapper. * @param {*} placeholder The placeholder value. * @param {*} [thisArg] The `this` binding of `func`. @@ -4825,7 +5412,7 @@ * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ - function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { var isCurry = bitmask & CURRY_FLAG, newHolders = isCurry ? holders : undefined, newHoldersRight = isCurry ? undefined : holders, @@ -4848,7 +5435,7 @@ setData(result, newData); } result.placeholder = placeholder; - return result; + return setWrapToString(result, func, bitmask); } /** @@ -4862,7 +5449,7 @@ var func = Math[methodName]; return function(number, precision) { number = toNumber(number); - precision = toInteger(precision); + precision = nativeMin(toInteger(precision), 292); if (precision) { // Shift with exponential notation to avoid floating-point issues. // See [MDN](https://mdn.io/round#Examples) for more details. @@ -4877,7 +5464,7 @@ } /** - * Creates a set of `values`. + * Creates a set object of `values`. * * @private * @param {Array} values The values to add to the set. @@ -4887,13 +5474,33 @@ return new Set(values); }; + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + /** * Creates a function that either curries or invokes `func` with optional * `this` binding and partially applied arguments. * * @private * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask of wrapper flags. + * @param {number} bitmask The bitmask flags. * The bitmask may be composed of the following flags: * 1 - `_.bind` * 2 - `_.bindKey` @@ -4904,6 +5511,7 @@ * 64 - `_.partialRight` * 128 - `_.rearg` * 256 - `_.ary` + * 512 - `_.flip` * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to be partially applied. * @param {Array} [holders] The `partials` placeholder indexes. @@ -4912,7 +5520,7 @@ * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ - function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { var isBindKey = bitmask & BIND_KEY_FLAG; if (!isBindKey && typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); @@ -4955,16 +5563,16 @@ bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG); } if (!bitmask || bitmask == BIND_FLAG) { - var result = createBaseWrapper(func, bitmask, thisArg); + var result = createBind(func, bitmask, thisArg); } else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) { - result = createCurryWrapper(func, bitmask, arity); + result = createCurry(func, bitmask, arity); } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) { - result = createPartialWrapper(func, bitmask, thisArg, partials); + result = createPartial(func, bitmask, thisArg, partials); } else { - result = createHybridWrapper.apply(undefined, newData); + result = createHybrid.apply(undefined, newData); } var setter = data ? baseSetData : setData; - return setter(result, newData); + return setWrapToString(setter(result, newData), func, bitmask); } /** @@ -4982,9 +5590,7 @@ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { - var index = -1, - isPartial = bitmask & PARTIAL_COMPARE_FLAG, - isUnordered = bitmask & UNORDERED_COMPARE_FLAG, + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, arrLength = array.length, othLength = other.length; @@ -4993,11 +5599,15 @@ } // Assume cyclic values are equal. var stacked = stack.get(array); - if (stacked) { + if (stacked && stack.get(other)) { return stacked == other; } - var result = true; + var index = -1, + result = true, + seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined; + stack.set(array, other); + stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { @@ -5017,10 +5627,12 @@ break; } // Recursively compare arrays (susceptible to call stack limits). - if (isUnordered) { - if (!arraySome(other, function(othValue) { - return arrValue === othValue || - equalFunc(arrValue, othValue, customizer, bitmask, stack); + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + return seen.push(othIndex); + } })) { result = false; break; @@ -5034,6 +5646,7 @@ } } stack['delete'](array); + stack['delete'](other); return result; } @@ -5074,22 +5687,18 @@ case boolTag: case dateTag: - // Coerce dates and booleans to numbers, dates to milliseconds and - // booleans to `1` or `0` treating invalid dates coerced to `NaN` as - // not equal. - return +object == +other; + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; - case numberTag: - // Treat `NaN` vs. `NaN` as equal. - return (object != +object) ? other != +other : object == +other; - case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); @@ -5109,10 +5718,12 @@ return stacked == other; } bitmask |= UNORDERED_COMPARE_FLAG; - stack.set(object, other); // Recursively compare objects (susceptible to call stack limits). - return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); + stack['delete'](object); + return result; case symbolTag: if (symbolValueOf) { @@ -5149,17 +5760,18 @@ var index = objLength; while (index--) { var key = objProps[index]; - if (!(isPartial ? key in other : baseHas(other, key))) { + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } // Assume cyclic values are equal. var stacked = stack.get(object); - if (stacked) { + if (stacked && stack.get(other)) { return stacked == other; } var result = true; stack.set(object, other); + stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { @@ -5195,9 +5807,21 @@ } } stack['delete'](object); + stack['delete'](other); return result; } + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + /** * Creates an array of own enumerable property names and symbols of `object`. * @@ -5254,6 +5878,18 @@ return result; } + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + /** * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, * this function returns the custom method, otherwise it returns `baseIteratee`. @@ -5272,17 +5908,19 @@ } /** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a - * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects - * Safari on at least iOS 8.1-8.3 ARM64. + * Gets the data for `map`. * * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. */ - var getLength = baseProperty('length'); + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } /** * Gets the property names, values, and compare flags of `object`. @@ -5292,11 +5930,14 @@ * @returns {Array} Returns the match data of `object`. */ function getMatchData(object) { - var result = toPairs(object), + var result = keys(object), length = result.length; while (length--) { - result[length][2] = isStrictComparable(result[length][1]); + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; } return result; } @@ -5310,31 +5951,35 @@ * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { - var value = object[key]; - return isNative(value) ? value : undefined; - } - - /** - * Gets the argument placeholder value for `func`. - * - * @private - * @param {Function} func The function to inspect. - * @returns {*} Returns the placeholder value. - */ - function getPlaceholder(func) { - var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; - return object.placeholder; + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; } /** - * Gets the `[[Prototype]]` of `value`. + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. - * @returns {null|Object} Returns the `[[Prototype]]`. + * @returns {string} Returns the raw `toStringTag`. */ - function getPrototype(value) { - return nativeGetPrototype(Object(value)); + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; } /** @@ -5344,18 +5989,7 @@ * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ - function getSymbols(object) { - // Coerce `object` to an object to avoid non-object errors in V8. - // See https://bugs.chromium.org/p/v8/issues/detail?id=3443 for more details. - return getOwnPropertySymbols(Object(object)); - } - - // Fallback for IE < 11. - if (!getOwnPropertySymbols) { - getSymbols = function() { - return []; - }; - } + var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; /** * Creates an array of the own and inherited enumerable symbol properties @@ -5365,7 +5999,7 @@ * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ - var getSymbolsIn = !getOwnPropertySymbols ? getSymbols : function(object) { + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { var result = []; while (object) { arrayPush(result, getSymbols(object)); @@ -5381,21 +6015,18 @@ * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ - function getTag(value) { - return objectToString.call(value); - } + var getTag = baseGetTag; - // Fallback for data views, maps, sets, and weak maps in IE 11, - // for data views in Edge, and promises in Node.js. + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { - var result = objectToString.call(value), + var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : undefined; + ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { @@ -5438,6 +6069,18 @@ return { 'start': start, 'end': end }; } + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + /** * Checks if `path` exists on `object`. * @@ -5450,9 +6093,9 @@ function hasPath(object, path, hasFunc) { path = isKey(path, object) ? [path] : castPath(path); - var result, - index = -1, - length = path.length; + var index = -1, + length = path.length, + result = false; while (++index < length) { var key = toKey(path[index]); @@ -5461,12 +6104,12 @@ } object = object[key]; } - if (result) { + if (result || ++index != length) { return result; } - var length = object ? object.length : 0; + length = object == null ? 0 : object.length; return !!length && isLength(length) && isIndex(key, length) && - (isArray(object) || isString(object) || isArguments(object)); + (isArray(object) || isArguments(object)); } /** @@ -5551,20 +6194,22 @@ } /** - * Creates an array of index keys for `object` values of arrays, - * `arguments` objects, and strings, otherwise `null` is returned. + * Inserts wrapper `details` in a comment at the top of the `source` body. * * @private - * @param {Object} object The object to query. - * @returns {Array|null} Returns index keys, else `null`. + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. */ - function indexKeys(object) { - var length = object ? object.length : undefined; - if (isLength(length) && - (isArray(object) || isString(object) || isArguments(object))) { - return baseTimes(length, String); + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; } - return null; + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); } /** @@ -5575,19 +6220,8 @@ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenable(value) { - return isArrayLikeObject(value) && (isArray(value) || isArguments(value)); - } - - /** - * Checks if `value` is a flattenable array and not a `_.matchesProperty` - * iteratee shorthand. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ - function isFlattenableIteratee(value) { - return isArray(value) && !(value.length == 2 && !isFunction(value[0])); + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); } /** @@ -5686,6 +6320,26 @@ return !!data && func === data[0]; } + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + /** * Checks if `value` is likely a prototype object. * @@ -5719,7 +6373,7 @@ * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function matchesStrictComparable(key, srcValue) { return function(object) { @@ -5731,6 +6385,26 @@ }; } + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + /** * Merges the function metadata of `source` into `data`. * @@ -5817,11 +6491,74 @@ */ function mergeDefaults(objValue, srcValue, key, object, source, stack) { if (isObject(objValue) && isObject(srcValue)) { - baseMerge(objValue, srcValue, undefined, mergeDefaults, stack.set(srcValue, objValue)); + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, mergeDefaults, stack); + stack['delete'](srcValue); } return objValue; } + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + /** * Gets the parent value at `path` of `object`. * @@ -5870,25 +6607,98 @@ * @param {*} data The metadata. * @returns {Function} Returns `func`. */ - var setData = (function() { + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { var count = 0, lastCalled = 0; - return function(key, value) { - var stamp = now(), + return function() { + var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); lastCalled = stamp; if (remaining > 0) { if (++count >= HOT_COUNT) { - return key; + return arguments[0]; } } else { count = 0; } - return baseSetData(key, value); + return func.apply(undefined, arguments); }; - }()); + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } /** * Converts `string` to a property path array. @@ -5897,9 +6707,14 @@ * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ - var stringToPath = memoize(function(string) { + var stringToPath = memoizeCapped(function(string) { + string = toString(string); + var result = []; - toString(string).replace(rePropName, function(match, number, quote, string) { + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); }); return result; @@ -5924,7 +6739,7 @@ * Converts `func` to its source code. * * @private - * @param {Function} func The function to process. + * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { @@ -5939,6 +6754,24 @@ return ''; } + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + /** * Creates a clone of `wrapper`. * @@ -5971,7 +6804,7 @@ * @param {Array} array The array to process. * @param {number} [size=1] The length of each chunk * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the new array containing chunks. + * @returns {Array} Returns the new array of chunks. * @example * * _.chunk(['a', 'b', 'c', 'd'], 2); @@ -5986,7 +6819,7 @@ } else { size = nativeMax(toInteger(size), 0); } - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length || size < 1) { return []; } @@ -6017,7 +6850,7 @@ */ function compact(array) { var index = -1, - length = array ? array.length : 0, + length = array == null ? 0 : array.length, resIndex = 0, result = []; @@ -6053,24 +6886,27 @@ * // => [1] */ function concat() { - var length = arguments.length, - array = castArray(arguments[0]); - - if (length < 2) { - return length ? copyArray(array) : []; + var length = arguments.length; + if (!length) { + return []; } - var args = Array(length - 1); - while (length--) { - args[length - 1] = arguments[length]; + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; } - return arrayConcat(array, baseFlatten(args, 1)); + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); } /** - * Creates an array of unique `array` values not included in the other given - * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. The order of result values is determined by the - * order they occur in the first array. + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. * * @static * @memberOf _ @@ -6082,10 +6918,10 @@ * @see _.without, _.xor * @example * - * _.difference([3, 2, 1], [4, 2]); - * // => [3, 1] + * _.difference([2, 1], [2, 3]); + * // => [1] */ - var difference = rest(function(array, values) { + var difference = baseRest(function(array, values) { return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : []; @@ -6094,8 +6930,11 @@ /** * This method is like `_.difference` except that it accepts `iteratee` which * is invoked for each element of `array` and `values` to generate the criterion - * by which they're compared. Result values are chosen from the first array. - * The iteratee is invoked with one argument: (value). + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. * * @static * @memberOf _ @@ -6103,33 +6942,34 @@ * @category Array * @param {Array} array The array to inspect. * @param {...Array} [values] The values to exclude. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of filtered values. * @example * - * _.differenceBy([3.1, 2.2, 1.3], [4.4, 2.5], Math.floor); - * // => [3.1, 1.3] + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] * * // The `_.property` iteratee shorthand. * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); * // => [{ 'x': 2 }] */ - var differenceBy = rest(function(array, values) { + var differenceBy = baseRest(function(array, values) { var iteratee = last(values); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee)) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) : []; }); /** * This method is like `_.difference` except that it accepts `comparator` - * which is invoked to compare elements of `array` to `values`. Result values - * are chosen from the first array. The comparator is invoked with two arguments: - * (arrVal, othVal). + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. * * @static * @memberOf _ @@ -6146,7 +6986,7 @@ * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); * // => [{ 'x': 2, 'y': 1 }] */ - var differenceWith = rest(function(array, values) { + var differenceWith = baseRest(function(array, values) { var comparator = last(values); if (isArrayLikeObject(comparator)) { comparator = undefined; @@ -6182,7 +7022,7 @@ * // => [1, 2, 3] */ function drop(array, n, guard) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } @@ -6216,7 +7056,7 @@ * // => [1, 2, 3] */ function dropRight(array, n, guard) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } @@ -6235,8 +7075,7 @@ * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * @@ -6277,8 +7116,7 @@ * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * @@ -6339,7 +7177,7 @@ * // => [4, '*', '*', 10] */ function fill(array, value, start, end) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } @@ -6358,9 +7196,9 @@ * @memberOf _ * @since 1.1.0 * @category Array - * @param {Array} array The array to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * @@ -6385,10 +7223,16 @@ * _.findIndex(users, 'active'); * // => 2 */ - function findIndex(array, predicate) { - return (array && array.length) - ? baseFindIndex(array, getIteratee(predicate, 3)) - : -1; + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); } /** @@ -6399,9 +7243,9 @@ * @memberOf _ * @since 2.0.0 * @category Array - * @param {Array} array The array to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * @@ -6426,10 +7270,19 @@ * _.findLastIndex(users, 'active'); * // => 0 */ - function findLastIndex(array, predicate) { - return (array && array.length) - ? baseFindIndex(array, getIteratee(predicate, 3), true) - : -1; + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); } /** @@ -6447,7 +7300,7 @@ * // => [1, 2, [3, [4]], 5] */ function flatten(array) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? baseFlatten(array, 1) : []; } @@ -6466,7 +7319,7 @@ * // => [1, 2, 3, 4, 5] */ function flattenDeep(array) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? baseFlatten(array, INFINITY) : []; } @@ -6491,7 +7344,7 @@ * // => [1, 2, 3, [4], 5] */ function flattenDepth(array, depth) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } @@ -6511,12 +7364,12 @@ * @returns {Object} Returns the new object. * @example * - * _.fromPairs([['fred', 30], ['barney', 40]]); - * // => { 'fred': 30, 'barney': 40 } + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } */ function fromPairs(pairs) { var index = -1, - length = pairs ? pairs.length : 0, + length = pairs == null ? 0 : pairs.length, result = {}; while (++index < length) { @@ -6550,7 +7403,7 @@ /** * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. If `fromIndex` is negative, it's used as the * offset from the end of `array`. * @@ -6558,7 +7411,7 @@ * @memberOf _ * @since 0.1.0 * @category Array - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. @@ -6572,15 +7425,15 @@ * // => 3 */ function indexOf(array, value, fromIndex) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return -1; } - fromIndex = toInteger(fromIndex); - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); } - return baseIndexOf(array, value, fromIndex); + return baseIndexOf(array, value, index); } /** @@ -6598,14 +7451,15 @@ * // => [1, 2] */ function initial(array) { - return dropRight(array, 1); + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; } /** * Creates an array of unique values that are included in all given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. The order of result values is determined by the - * order they occur in the first array. + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. * * @static * @memberOf _ @@ -6615,10 +7469,10 @@ * @returns {Array} Returns the new array of intersecting values. * @example * - * _.intersection([2, 1], [4, 2], [1, 2]); + * _.intersection([2, 1], [2, 3]); * // => [2] */ - var intersection = rest(function(arrays) { + var intersection = baseRest(function(arrays) { var mapped = arrayMap(arrays, castArrayLikeObject); return (mapped.length && mapped[0] === arrays[0]) ? baseIntersection(mapped) @@ -6628,27 +7482,27 @@ /** * This method is like `_.intersection` except that it accepts `iteratee` * which is invoked for each element of each `arrays` to generate the criterion - * by which they're compared. Result values are chosen from the first array. - * The iteratee is invoked with one argument: (value). + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of intersecting values. * @example * - * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor); + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); * // => [2.1] * * // The `_.property` iteratee shorthand. * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }] */ - var intersectionBy = rest(function(arrays) { + var intersectionBy = baseRest(function(arrays) { var iteratee = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); @@ -6658,15 +7512,15 @@ mapped.pop(); } return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, getIteratee(iteratee)) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) : []; }); /** * This method is like `_.intersection` except that it accepts `comparator` - * which is invoked to compare elements of `arrays`. Result values are chosen - * from the first array. The comparator is invoked with two arguments: - * (arrVal, othVal). + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). * * @static * @memberOf _ @@ -6683,13 +7537,12 @@ * _.intersectionWith(objects, others, _.isEqual); * // => [{ 'x': 1, 'y': 2 }] */ - var intersectionWith = rest(function(arrays) { + var intersectionWith = baseRest(function(arrays) { var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); - if (comparator === last(mapped)) { - comparator = undefined; - } else { + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { mapped.pop(); } return (mapped.length && mapped[0] === arrays[0]) @@ -6713,7 +7566,7 @@ * // => 'a~b~c' */ function join(array, separator) { - return array ? nativeJoin.call(array, separator) : ''; + return array == null ? '' : nativeJoin.call(array, separator); } /** @@ -6731,7 +7584,7 @@ * // => 3 */ function last(array) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? array[length - 1] : undefined; } @@ -6743,7 +7596,7 @@ * @memberOf _ * @since 0.1.0 * @category Array - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=array.length-1] The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. @@ -6757,33 +7610,23 @@ * // => 1 */ function lastIndexOf(array, value, fromIndex) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = length; if (fromIndex !== undefined) { index = toInteger(fromIndex); - index = ( - index < 0 - ? nativeMax(length + index, 0) - : nativeMin(index, length - 1) - ) + 1; - } - if (value !== value) { - return indexOfNaN(array, index, true); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); } - while (index--) { - if (array[index] === value) { - return index; - } - } - return -1; + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); } /** - * Gets the nth element of `array`. If `n` is negative, the nth element - * from the end is returned. + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. * * @static * @memberOf _ @@ -6808,7 +7651,7 @@ /** * Removes all given values from `array` using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` @@ -6823,13 +7666,13 @@ * @returns {Array} Returns `array`. * @example * - * var array = [1, 2, 3, 1, 2, 3]; + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; * - * _.pull(array, 2, 3); + * _.pull(array, 'a', 'c'); * console.log(array); - * // => [1, 1] + * // => ['b', 'b'] */ - var pull = rest(pullAll); + var pull = baseRest(pullAll); /** * This method is like `_.pull` except that it accepts an array of values to remove. @@ -6845,11 +7688,11 @@ * @returns {Array} Returns `array`. * @example * - * var array = [1, 2, 3, 1, 2, 3]; + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; * - * _.pullAll(array, [2, 3]); + * _.pullAll(array, ['a', 'c']); * console.log(array); - * // => [1, 1] + * // => ['b', 'b'] */ function pullAll(array, values) { return (array && array.length && values && values.length) @@ -6870,8 +7713,7 @@ * @category Array * @param {Array} array The array to modify. * @param {Array} values The values to remove. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns `array`. * @example * @@ -6883,7 +7725,7 @@ */ function pullAllBy(array, values, iteratee) { return (array && array.length && values && values.length) - ? basePullAll(array, values, getIteratee(iteratee)) + ? basePullAll(array, values, getIteratee(iteratee, 2)) : array; } @@ -6931,19 +7773,17 @@ * @returns {Array} Returns the new array of removed elements. * @example * - * var array = [5, 10, 15, 20]; - * var evens = _.pullAt(array, 1, 3); + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); * * console.log(array); - * // => [5, 15] + * // => ['a', 'c'] * - * console.log(evens); - * // => [10, 20] + * console.log(pulled); + * // => ['b', 'd'] */ - var pullAt = rest(function(array, indexes) { - indexes = baseFlatten(indexes, 1); - - var length = array ? array.length : 0, + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, result = baseAt(array, indexes); basePullAt(array, arrayMap(indexes, function(index) { @@ -6966,8 +7806,7 @@ * @since 2.0.0 * @category Array * @param {Array} array The array to modify. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new array of removed elements. * @example * @@ -7027,7 +7866,7 @@ * // => [3, 2, 1] */ function reverse(array) { - return array ? nativeReverse.call(array) : array; + return array == null ? array : nativeReverse.call(array); } /** @@ -7047,7 +7886,7 @@ * @returns {Array} Returns the slice of `array`. */ function slice(array, start, end) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } @@ -7078,9 +7917,6 @@ * * _.sortedIndex([30, 50], 40); * // => 1 - * - * _.sortedIndex([4, 5], 4); - * // => 0 */ function sortedIndex(array, value) { return baseSortedIndex(array, value); @@ -7097,23 +7933,22 @@ * @category Array * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the index at which `value` should be inserted * into `array`. * @example * - * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 }; + * var objects = [{ 'x': 4 }, { 'x': 5 }]; * - * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict)); - * // => 1 + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 * * // The `_.property` iteratee shorthand. - * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); * // => 0 */ function sortedIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, getIteratee(iteratee)); + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); } /** @@ -7124,16 +7959,16 @@ * @memberOf _ * @since 4.0.0 * @category Array - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @returns {number} Returns the index of the matched value, else `-1`. * @example * - * _.sortedIndexOf([1, 1, 2, 2], 2); - * // => 2 + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 */ function sortedIndexOf(array, value) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (length) { var index = baseSortedIndex(array, value); if (index < length && eq(array[index], value)) { @@ -7158,8 +7993,8 @@ * into `array`. * @example * - * _.sortedLastIndex([4, 5], 4); - * // => 1 + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 */ function sortedLastIndex(array, value) { return baseSortedIndex(array, value, true); @@ -7176,18 +8011,22 @@ * @category Array * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the index at which `value` should be inserted * into `array`. * @example * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * * // The `_.property` iteratee shorthand. - * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); * // => 1 */ function sortedLastIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, getIteratee(iteratee), true); + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); } /** @@ -7198,16 +8037,16 @@ * @memberOf _ * @since 4.0.0 * @category Array - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @returns {number} Returns the index of the matched value, else `-1`. * @example * - * _.sortedLastIndexOf([1, 1, 2, 2], 2); + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); * // => 3 */ function sortedLastIndexOf(array, value) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (length) { var index = baseSortedIndex(array, value, true) - 1; if (eq(array[index], value)) { @@ -7256,7 +8095,7 @@ */ function sortedUniqBy(array, iteratee) { return (array && array.length) - ? baseSortedUniq(array, getIteratee(iteratee)) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) : []; } @@ -7275,7 +8114,8 @@ * // => [2, 3] */ function tail(array) { - return drop(array, 1); + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; } /** @@ -7337,7 +8177,7 @@ * // => [] */ function takeRight(array, n, guard) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } @@ -7356,8 +8196,7 @@ * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * @@ -7398,8 +8237,7 @@ * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * @@ -7432,7 +8270,7 @@ /** * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @static @@ -7443,17 +8281,18 @@ * @returns {Array} Returns the new array of combined values. * @example * - * _.union([2, 1], [4, 2], [1, 2]); - * // => [2, 1, 4] + * _.union([2], [1, 2]); + * // => [2, 1] */ - var union = rest(function(arrays) { + var union = baseRest(function(arrays) { return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); }); /** * This method is like `_.union` except that it accepts `iteratee` which is * invoked for each element of each `arrays` to generate the criterion by - * which uniqueness is computed. The iteratee is invoked with one argument: + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: * (value). * * @static @@ -7461,29 +8300,29 @@ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of combined values. * @example * - * _.unionBy([2.1, 1.2], [4.3, 2.4], Math.floor); - * // => [2.1, 1.2, 4.3] + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] * * // The `_.property` iteratee shorthand. * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }, { 'x': 2 }] */ - var unionBy = rest(function(arrays) { + var unionBy = baseRest(function(arrays) { var iteratee = last(arrays); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee)); + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); }); /** * This method is like `_.union` except that it accepts `comparator` which - * is invoked to compare elements of `arrays`. The comparator is invoked + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked * with two arguments: (arrVal, othVal). * * @static @@ -7501,19 +8340,18 @@ * _.unionWith(objects, others, _.isEqual); * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ - var unionWith = rest(function(arrays) { + var unionWith = baseRest(function(arrays) { var comparator = last(arrays); - if (isArrayLikeObject(comparator)) { - comparator = undefined; - } + comparator = typeof comparator == 'function' ? comparator : undefined; return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); }); /** * Creates a duplicate-free version of an array, using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons, in which only the first occurrence of each - * element is kept. + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. * * @static * @memberOf _ @@ -7527,23 +8365,22 @@ * // => [2, 1] */ function uniq(array) { - return (array && array.length) - ? baseUniq(array) - : []; + return (array && array.length) ? baseUniq(array) : []; } /** * This method is like `_.uniq` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the criterion by which - * uniqueness is computed. The iteratee is invoked with one argument: (value). + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new duplicate free array. * @example * @@ -7555,15 +8392,14 @@ * // => [{ 'x': 1 }, { 'x': 2 }] */ function uniqBy(array, iteratee) { - return (array && array.length) - ? baseUniq(array, getIteratee(iteratee)) - : []; + return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; } /** * This method is like `_.uniq` except that it accepts `comparator` which - * is invoked to compare elements of `array`. The comparator is invoked with - * two arguments: (arrVal, othVal). + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). * * @static * @memberOf _ @@ -7574,15 +8410,14 @@ * @returns {Array} Returns the new duplicate free array. * @example * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; * * _.uniqWith(objects, _.isEqual); * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] */ function uniqWith(array, comparator) { - return (array && array.length) - ? baseUniq(array, undefined, comparator) - : []; + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; } /** @@ -7598,11 +8433,11 @@ * @returns {Array} Returns the new array of regrouped elements. * @example * - * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]); - * // => [['fred', 30, true], ['barney', 40, false]] + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] * * _.unzip(zipped); - * // => [['fred', 'barney'], [30, 40], [true, false]] + * // => [['a', 'b'], [1, 2], [true, false]] */ function unzip(array) { if (!(array && array.length)) { @@ -7656,23 +8491,25 @@ /** * Creates an array excluding all given values using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * + * **Note:** Unlike `_.pull`, this method returns a new array. + * * @static * @memberOf _ * @since 0.1.0 * @category Array - * @param {Array} array The array to filter. + * @param {Array} array The array to inspect. * @param {...*} [values] The values to exclude. * @returns {Array} Returns the new array of filtered values. * @see _.difference, _.xor * @example * - * _.without([1, 2, 1, 3], 1, 2); + * _.without([2, 1, 2, 3], 1, 2); * // => [3] */ - var without = rest(function(array, values) { + var without = baseRest(function(array, values) { return isArrayLikeObject(array) ? baseDifference(array, values) : []; @@ -7689,52 +8526,53 @@ * @since 2.4.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of values. + * @returns {Array} Returns the new array of filtered values. * @see _.difference, _.without * @example * - * _.xor([2, 1], [4, 2]); - * // => [1, 4] + * _.xor([2, 1], [2, 3]); + * // => [1, 3] */ - var xor = rest(function(arrays) { + var xor = baseRest(function(arrays) { return baseXor(arrayFilter(arrays, isArrayLikeObject)); }); /** * This method is like `_.xor` except that it accepts `iteratee` which is * invoked for each element of each `arrays` to generate the criterion by - * which by which they're compared. The iteratee is invoked with one argument: - * (value). + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. - * @returns {Array} Returns the new array of values. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. * @example * - * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor); - * // => [1.2, 4.3] + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] * * // The `_.property` iteratee shorthand. * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 2 }] */ - var xorBy = rest(function(arrays) { + var xorBy = baseRest(function(arrays) { var iteratee = last(arrays); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } - return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee)); + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); }); /** * This method is like `_.xor` except that it accepts `comparator` which is - * invoked to compare elements of `arrays`. The comparator is invoked with - * two arguments: (arrVal, othVal). + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). * * @static * @memberOf _ @@ -7742,7 +8580,7 @@ * @category Array * @param {...Array} [arrays] The arrays to inspect. * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of values. + * @returns {Array} Returns the new array of filtered values. * @example * * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; @@ -7751,11 +8589,9 @@ * _.xorWith(objects, others, _.isEqual); * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ - var xorWith = rest(function(arrays) { + var xorWith = baseRest(function(arrays) { var comparator = last(arrays); - if (isArrayLikeObject(comparator)) { - comparator = undefined; - } + comparator = typeof comparator == 'function' ? comparator : undefined; return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); }); @@ -7772,10 +8608,10 @@ * @returns {Array} Returns the new array of grouped elements. * @example * - * _.zip(['fred', 'barney'], [30, 40], [true, false]); - * // => [['fred', 30, true], ['barney', 40, false]] + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] */ - var zip = rest(unzip); + var zip = baseRest(unzip); /** * This method is like `_.fromPairs` except that it accepts two arrays, @@ -7826,7 +8662,8 @@ * @since 3.8.0 * @category Array * @param {...Array} [arrays] The arrays to process. - * @param {Function} [iteratee=_.identity] The function to combine grouped values. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. * @returns {Array} Returns the new array of grouped elements. * @example * @@ -7835,7 +8672,7 @@ * }); * // => [111, 222] */ - var zipWith = rest(function(arrays) { + var zipWith = baseRest(function(arrays) { var length = arrays.length, iteratee = length > 1 ? arrays[length - 1] : undefined; @@ -7950,12 +8787,8 @@ * * _(object).at(['a[0].b.c', 'a[1]']).value(); * // => [3, 4] - * - * _(['a', 'b', 'c']).at(0, 2).value(); - * // => ['a', 'c'] */ - var wrapperAt = rest(function(paths) { - paths = baseFlatten(paths, 1); + var wrapperAt = flatRest(function(paths) { var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, @@ -8207,19 +9040,23 @@ * @since 0.5.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee to transform keys. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example * * _.countBy([6.1, 4.2, 6.3], Math.floor); * // => { '4': 1, '6': 2 } * + * // The `_.property` iteratee shorthand. * _.countBy(['one', 'two', 'three'], 'length'); * // => { '3': 2, '5': 1 } */ var countBy = createAggregator(function(result, value, key) { - hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1); + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } }); /** @@ -8227,13 +9064,17 @@ * Iteration is stopped once `predicate` returns falsey. The predicate is * invoked with three arguments: (value, index|key, collection). * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if all elements pass the predicate check, * else `false`. @@ -8272,13 +9113,14 @@ * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * + * **Note:** Unlike `_.remove`, this method returns a new array. + * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.reject * @example @@ -8317,9 +9159,9 @@ * @memberOf _ * @since 0.1.0 * @category Collection - * @param {Array|Object} collection The collection to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * @@ -8344,14 +9186,7 @@ * _.find(users, 'active'); * // => object for 'barney' */ - function find(collection, predicate) { - predicate = getIteratee(predicate, 3); - if (isArray(collection)) { - var index = baseFindIndex(collection, predicate); - return index > -1 ? collection[index] : undefined; - } - return baseFind(collection, predicate, baseEach); - } + var find = createFind(findIndex); /** * This method is like `_.find` except that it iterates over elements of @@ -8361,9 +9196,9 @@ * @memberOf _ * @since 2.0.0 * @category Collection - * @param {Array|Object} collection The collection to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * @@ -8372,14 +9207,7 @@ * }); * // => 3 */ - function findLast(collection, predicate) { - predicate = getIteratee(predicate, 3); - if (isArray(collection)) { - var index = baseFindIndex(collection, predicate, true); - return index > -1 ? collection[index] : undefined; - } - return baseFind(collection, predicate, baseEachRight); - } + var findLast = createFind(findLastIndex); /** * Creates a flattened array of values by running each element in `collection` @@ -8391,8 +9219,7 @@ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new flattened array. * @example * @@ -8416,8 +9243,7 @@ * @since 4.7.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new flattened array. * @example * @@ -8441,8 +9267,7 @@ * @since 4.7.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {number} [depth=1] The maximum recursion depth. * @returns {Array} Returns the new flattened array. * @example @@ -8479,7 +9304,7 @@ * @see _.forEachRight * @example * - * _([1, 2]).forEach(function(value) { + * _.forEach([1, 2], function(value) { * console.log(value); * }); * // => Logs `1` then `2`. @@ -8490,9 +9315,8 @@ * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forEach(collection, iteratee) { - return (typeof iteratee == 'function' && isArray(collection)) - ? arrayEach(collection, iteratee) - : baseEach(collection, getIteratee(iteratee)); + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); } /** @@ -8516,9 +9340,8 @@ * // => Logs `2` then `1`. */ function forEachRight(collection, iteratee) { - return (typeof iteratee == 'function' && isArray(collection)) - ? arrayEachRight(collection, iteratee) - : baseEachRight(collection, getIteratee(iteratee)); + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); } /** @@ -8533,8 +9356,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee to transform keys. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example * @@ -8549,14 +9371,14 @@ if (hasOwnProperty.call(result, key)) { result[key].push(value); } else { - result[key] = [value]; + baseAssignValue(result, key, [value]); } }); /** * Checks if `value` is in `collection`. If `collection` is a string, it's * checked for a substring of `value`, otherwise - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * is used for equality comparisons. If `fromIndex` is negative, it's used as * the offset from the end of `collection`. * @@ -8564,7 +9386,7 @@ * @memberOf _ * @since 0.1.0 * @category Collection - * @param {Array|Object|string} collection The collection to search. + * @param {Array|Object|string} collection The collection to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. @@ -8577,10 +9399,10 @@ * _.includes([1, 2, 3], 1, 2); * // => false * - * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); + * _.includes({ 'a': 1, 'b': 2 }, 1); * // => true * - * _.includes('pebbles', 'eb'); + * _.includes('abcd', 'bc'); * // => true */ function includes(collection, value, fromIndex, guard) { @@ -8599,8 +9421,8 @@ /** * Invokes the method at `path` of each element in `collection`, returning * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `methodName` is a function, it's - * invoked for and `this` bound to, each element in `collection`. + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. * * @static * @memberOf _ @@ -8619,7 +9441,7 @@ * _.invokeMap([123, 456], String.prototype.split, ''); * // => [['1', '2', '3'], ['4', '5', '6']] */ - var invokeMap = rest(function(collection, path, args) { + var invokeMap = baseRest(function(collection, path, args) { var index = -1, isFunc = typeof path == 'function', isProp = isKey(path), @@ -8643,8 +9465,7 @@ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee to transform keys. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example * @@ -8662,7 +9483,7 @@ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } */ var keyBy = createAggregator(function(result, value, key) { - result[key] = value; + baseAssignValue(result, key, value); }); /** @@ -8684,8 +9505,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * @@ -8767,8 +9587,7 @@ * @since 3.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the array of grouped elements. * @example * @@ -8879,8 +9698,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.filter * @example @@ -8907,10 +9725,7 @@ */ function reject(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; - predicate = getIteratee(predicate, 3); - return func(collection, function(value, index, collection) { - return !predicate(value, index, collection); - }); + return func(collection, negate(getIteratee(predicate, 3))); } /** @@ -8928,10 +9743,8 @@ * // => 2 */ function sample(collection) { - var array = isArrayLike(collection) ? collection : values(collection), - length = array.length; - - return length > 0 ? array[baseRandom(0, length - 1)] : undefined; + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); } /** @@ -8955,25 +9768,13 @@ * // => [2, 3, 1] */ function sampleSize(collection, n, guard) { - var index = -1, - result = toArray(collection), - length = result.length, - lastIndex = length - 1; - if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { n = 1; } else { - n = baseClamp(toInteger(n), 0, length); - } - while (++index < n) { - var rand = baseRandom(index, lastIndex), - value = result[rand]; - - result[rand] = result[index]; - result[index] = value; + n = toInteger(n); } - result.length = n; - return result; + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); } /** @@ -8992,7 +9793,8 @@ * // => [4, 1, 3, 2] */ function shuffle(collection) { - return sampleSize(collection, MAX_ARRAY_LENGTH); + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); } /** @@ -9003,7 +9805,7 @@ * @memberOf _ * @since 0.1.0 * @category Collection - * @param {Array|Object} collection The collection to inspect. + * @param {Array|Object|string} collection The collection to inspect. * @returns {number} Returns the collection size. * @example * @@ -9021,16 +9823,13 @@ return 0; } if (isArrayLike(collection)) { - var result = collection.length; - return (result && isString(collection)) ? stringSize(collection) : result; + return isString(collection) ? stringSize(collection) : collection.length; } - if (isObjectLike(collection)) { - var tag = getTag(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; } - return keys(collection).length; + return baseKeys(collection).length; } /** @@ -9043,8 +9842,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. @@ -9089,8 +9887,8 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [iteratees=[_.identity]] The iteratees to sort by. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. * @returns {Array} Returns the new sorted array. * @example * @@ -9101,18 +9899,13 @@ * { 'user': 'barney', 'age': 34 } * ]; * - * _.sortBy(users, function(o) { return o.user; }); + * _.sortBy(users, [function(o) { return o.user; }]); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] * * _.sortBy(users, ['user', 'age']); * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] - * - * _.sortBy(users, 'user', function(o) { - * return Math.floor(o.age / 10); - * }); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] */ - var sortBy = rest(function(collection, iteratees) { + var sortBy = baseRest(function(collection, iteratees) { if (collection == null) { return []; } @@ -9122,11 +9915,7 @@ } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { iteratees = [iteratees[0]]; } - iteratees = (iteratees.length == 1 && isArray(iteratees[0])) - ? iteratees[0] - : baseFlatten(iteratees, 1, isFlattenableIteratee); - - return baseOrderBy(collection, iteratees, []); + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); }); /*------------------------------------------------------------------------*/ @@ -9138,7 +9927,6 @@ * @static * @memberOf _ * @since 2.4.0 - * @type {Function} * @category Date * @returns {number} Returns the timestamp. * @example @@ -9146,9 +9934,11 @@ * _.defer(function(stamp) { * console.log(_.now() - stamp); * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred function to be invoked. + * // => Logs the number of milliseconds it took for the deferred invocation. */ - var now = Date.now; + var now = ctxNow || function() { + return root.Date.now(); + }; /*------------------------------------------------------------------------*/ @@ -9199,7 +9989,7 @@ * @param {Function} func The function to cap arguments for. * @param {number} [n=func.length] The arity cap. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. * @example * * _.map(['6', '8', '10'], _.ary(parseInt, 1)); @@ -9208,7 +9998,7 @@ function ary(func, n, guard) { n = guard ? undefined : n; n = (func && n == null) ? func.length : n; - return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n); + return createWrap(func, ARY_FLAG, undefined, undefined, undefined, undefined, n); } /** @@ -9226,7 +10016,7 @@ * @example * * jQuery(element).on('click', _.before(5, addContactToList)); - * // => allows adding up to 4 contacts to the list + * // => Allows adding up to 4 contacts to the list. */ function before(n, func) { var result; @@ -9252,7 +10042,7 @@ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for partially applied arguments. * - * **Note:** Unlike native `Function#bind` this method doesn't set the "length" + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" * property of bound functions. * * @static @@ -9265,9 +10055,9 @@ * @returns {Function} Returns the new bound function. * @example * - * var greet = function(greeting, punctuation) { + * function greet(greeting, punctuation) { * return greeting + ' ' + this.user + punctuation; - * }; + * } * * var object = { 'user': 'fred' }; * @@ -9280,13 +10070,13 @@ * bound('hi'); * // => 'hi fred!' */ - var bind = rest(function(func, thisArg, partials) { + var bind = baseRest(function(func, thisArg, partials) { var bitmask = BIND_FLAG; if (partials.length) { - var holders = replaceHolders(partials, getPlaceholder(bind)); + var holders = replaceHolders(partials, getHolder(bind)); bitmask |= PARTIAL_FLAG; } - return createWrapper(func, bitmask, thisArg, partials, holders); + return createWrap(func, bitmask, thisArg, partials, holders); }); /** @@ -9334,13 +10124,13 @@ * bound('hi'); * // => 'hiya fred!' */ - var bindKey = rest(function(object, key, partials) { + var bindKey = baseRest(function(object, key, partials) { var bitmask = BIND_FLAG | BIND_KEY_FLAG; if (partials.length) { - var holders = replaceHolders(partials, getPlaceholder(bindKey)); + var holders = replaceHolders(partials, getHolder(bindKey)); bitmask |= PARTIAL_FLAG; } - return createWrapper(key, bitmask, object, partials, holders); + return createWrap(key, bitmask, object, partials, holders); }); /** @@ -9386,7 +10176,7 @@ */ function curry(func, arity, guard) { arity = guard ? undefined : arity; - var result = createWrapper(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + var result = createWrap(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); result.placeholder = curry.placeholder; return result; } @@ -9431,7 +10221,7 @@ */ function curryRight(func, arity, guard) { arity = guard ? undefined : arity; - var result = createWrapper(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + var result = createWrap(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); result.placeholder = curryRight.placeholder; return result; } @@ -9441,14 +10231,18 @@ * milliseconds have elapsed since the last time the debounced function was * invoked. The debounced function comes with a `cancel` method to cancel * delayed `func` invocations and a `flush` method to immediately invoke them. - * Provide an options object to indicate whether `func` should be invoked on - * the leading and/or trailing edge of the `wait` timeout. The `func` is invoked - * with the last arguments provided to the debounced function. Subsequent calls - * to the debounced function return the result of the last `func` invocation. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. * - * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the debounced function is - * invoked more than once during the `wait` timeout. + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.debounce` and `_.throttle`. @@ -9492,7 +10286,7 @@ maxWait, result, timerId, - lastCallTime = 0, + lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, @@ -9543,7 +10337,7 @@ // Either this is the first call, activity has stopped and we're at the // trailing edge, the system time has gone backwards and we're treating // it as the trailing edge, or we've hit the `maxWait` limit. - return (!lastCallTime || (timeSinceLastCall >= wait) || + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); } @@ -9557,7 +10351,6 @@ } function trailingEdge(time) { - clearTimeout(timerId); timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has been @@ -9573,8 +10366,8 @@ if (timerId !== undefined) { clearTimeout(timerId); } - lastCallTime = lastInvokeTime = 0; - lastArgs = lastThis = timerId = undefined; + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; } function flush() { @@ -9595,7 +10388,6 @@ } if (maxing) { // Handle invocations in a tight loop. - clearTimeout(timerId); timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } @@ -9626,9 +10418,9 @@ * _.defer(function(text) { * console.log(text); * }, 'deferred'); - * // => Logs 'deferred' after one or more milliseconds. + * // => Logs 'deferred' after one millisecond. */ - var defer = rest(function(func, args) { + var defer = baseRest(function(func, args) { return baseDelay(func, 1, args); }); @@ -9651,7 +10443,7 @@ * }, 1000, 'later'); * // => Logs 'later' after one second. */ - var delay = rest(function(func, wait, args) { + var delay = baseRest(function(func, wait, args) { return baseDelay(func, toNumber(wait) || 0, args); }); @@ -9663,7 +10455,7 @@ * @since 4.0.0 * @category Function * @param {Function} func The function to flip arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new flipped function. * @example * * var flipped = _.flip(function() { @@ -9674,7 +10466,7 @@ * // => ['d', 'c', 'b', 'a'] */ function flip(func) { - return createWrapper(func, FLIP_FLAG); + return createWrap(func, FLIP_FLAG); } /** @@ -9687,8 +10479,8 @@ * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object) - * method interface of `delete`, `get`, `has`, and `set`. + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ @@ -9696,7 +10488,7 @@ * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoizing function. + * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; @@ -9722,7 +10514,7 @@ * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { - if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { @@ -9734,14 +10526,14 @@ return cache.get(key); } var result = func.apply(this, args); - memoized.cache = cache.set(key, result); + memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } - // Assign cache to `_.memoize`. + // Expose `MapCache`. memoize.Cache = MapCache; /** @@ -9754,7 +10546,7 @@ * @since 3.0.0 * @category Function * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new negated function. * @example * * function isEven(n) { @@ -9769,7 +10561,14 @@ throw new TypeError(FUNC_ERROR_TEXT); } return function() { - return !predicate.apply(this, arguments); + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); }; } @@ -9789,23 +10588,22 @@ * var initialize = _.once(createApplication); * initialize(); * initialize(); - * // `initialize` invokes `createApplication` once + * // => `createApplication` is invoked once */ function once(func) { return before(2, func); } /** - * Creates a function that invokes `func` with arguments transformed by - * corresponding `transforms`. + * Creates a function that invokes `func` with its arguments transformed. * * @static * @since 4.0.0 * @memberOf _ * @category Function * @param {Function} func The function to wrap. - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [transforms[_.identity]] The functions to transform. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. * @returns {Function} Returns the new function. * @example * @@ -9819,7 +10617,7 @@ * * var func = _.overArgs(function(x, y) { * return [x, y]; - * }, square, doubled); + * }, [square, doubled]); * * func(9, 3); * // => [81, 6] @@ -9827,13 +10625,13 @@ * func(10, 5); * // => [100, 10] */ - var overArgs = rest(function(func, transforms) { + var overArgs = castRest(function(func, transforms) { transforms = (transforms.length == 1 && isArray(transforms[0])) ? arrayMap(transforms[0], baseUnary(getIteratee())) - : arrayMap(baseFlatten(transforms, 1, isFlattenableIteratee), baseUnary(getIteratee())); + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); var funcsLength = transforms.length; - return rest(function(args) { + return baseRest(function(args) { var index = -1, length = nativeMin(args.length, funcsLength); @@ -9864,9 +10662,9 @@ * @returns {Function} Returns the new partially applied function. * @example * - * var greet = function(greeting, name) { + * function greet(greeting, name) { * return greeting + ' ' + name; - * }; + * } * * var sayHelloTo = _.partial(greet, 'hello'); * sayHelloTo('fred'); @@ -9877,9 +10675,9 @@ * greetFred('hi'); * // => 'hi fred' */ - var partial = rest(function(func, partials) { - var holders = replaceHolders(partials, getPlaceholder(partial)); - return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders); + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, PARTIAL_FLAG, undefined, partials, holders); }); /** @@ -9901,9 +10699,9 @@ * @returns {Function} Returns the new partially applied function. * @example * - * var greet = function(greeting, name) { + * function greet(greeting, name) { * return greeting + ' ' + name; - * }; + * } * * var greetFred = _.partialRight(greet, 'fred'); * greetFred('hi'); @@ -9914,9 +10712,9 @@ * sayHelloTo('fred'); * // => 'hello fred' */ - var partialRight = rest(function(func, partials) { - var holders = replaceHolders(partials, getPlaceholder(partialRight)); - return createWrapper(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders); + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders); }); /** @@ -9936,13 +10734,13 @@ * * var rearged = _.rearg(function(a, b, c) { * return [a, b, c]; - * }, 2, 0, 1); + * }, [2, 0, 1]); * * rearged('b', 'c', 'a') * // => ['a', 'b', 'c'] */ - var rearg = rest(function(func, indexes) { - return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes, 1)); + var rearg = flatRest(function(func, indexes) { + return createWrap(func, REARG_FLAG, undefined, undefined, undefined, indexes); }); /** @@ -9974,35 +10772,14 @@ if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } - start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - switch (start) { - case 0: return func.call(this, array); - case 1: return func.call(this, args[0], array); - case 2: return func.call(this, args[0], args[1], array); - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = array; - return apply(func, this, otherArgs); - }; + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); } /** * Creates a function that invokes `func` with the `this` binding of the * create function and an array of arguments much like - * [`Function#apply`](http://www.ecma-international.org/ecma-262/6.0/#sec-function.prototype.apply). + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). * * **Note:** This method is based on the * [spread operator](https://mdn.io/spread_operator). @@ -10038,7 +10815,7 @@ throw new TypeError(FUNC_ERROR_TEXT); } start = start === undefined ? 0 : nativeMax(toInteger(start), 0); - return rest(function(args) { + return baseRest(function(args) { var array = args[start], otherArgs = castSlice(args, 0, start); @@ -10053,8 +10830,8 @@ * Creates a throttled function that only invokes `func` at most once per * every `wait` milliseconds. The throttled function comes with a `cancel` * method to cancel delayed `func` invocations and a `flush` method to - * immediately invoke them. Provide an options object to indicate whether - * `func` should be invoked on the leading and/or trailing edge of the `wait` + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` * timeout. The `func` is invoked with the last arguments provided to the * throttled function. Subsequent calls to the throttled function return the * result of the last `func` invocation. @@ -10063,6 +10840,9 @@ * invoked on the trailing edge of the timeout only if the throttled function * is invoked more than once during the `wait` timeout. * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.throttle` and `_.debounce`. * @@ -10117,7 +10897,7 @@ * @since 4.0.0 * @category Function * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. * @example * * _.map(['6', '8', '10'], _.unary(parseInt)); @@ -10128,10 +10908,10 @@ } /** - * Creates a function that provides `value` to the wrapper function as its - * first argument. Any additional arguments provided to the function are - * appended to those provided to the wrapper function. The wrapper is invoked - * with the `this` binding of the created function. + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. * * @static * @memberOf _ @@ -10150,8 +10930,7 @@ * // => '

fred, barney, & pebbles

' */ function wrap(value, wrapper) { - wrapper = wrapper == null ? identity : wrapper; - return partial(wrapper, value); + return partial(castFunction(wrapper), value); } /*------------------------------------------------------------------------*/ @@ -10259,6 +11038,7 @@ * // => 0 */ function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; return baseClone(value, false, true, customizer); } @@ -10313,12 +11093,41 @@ * // => 20 */ function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; return baseClone(value, true, true, customizer); } + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + /** * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static @@ -10330,8 +11139,8 @@ * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.eq(object, object); * // => true @@ -10412,7 +11221,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, + * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * @@ -10422,11 +11231,10 @@ * _.isArguments([1, 2, 3]); * // => false */ - function isArguments(value) { - // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); - } + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; /** * Checks if `value` is classified as an `Array` object. @@ -10434,11 +11242,9 @@ * @static * @memberOf _ * @since 0.1.0 - * @type {Function} * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); @@ -10463,8 +11269,7 @@ * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. * @example * * _.isArrayBuffer(new ArrayBuffer(2)); @@ -10473,9 +11278,7 @@ * _.isArrayBuffer(new Array(2)); * // => false */ - function isArrayBuffer(value) { - return isObjectLike(value) && objectToString.call(value) == arrayBufferTag; - } + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; /** * Checks if `value` is array-like. A value is considered array-like if it's @@ -10503,7 +11306,7 @@ * // => false */ function isArrayLike(value) { - return value != null && isLength(getLength(value)) && !isFunction(value); + return value != null && isLength(value.length) && !isFunction(value); } /** @@ -10543,8 +11346,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. * @example * * _.isBoolean(false); @@ -10555,7 +11357,7 @@ */ function isBoolean(value) { return value === true || value === false || - (isObjectLike(value) && objectToString.call(value) == boolTag); + (isObjectLike(value) && baseGetTag(value) == boolTag); } /** @@ -10575,9 +11377,7 @@ * _.isBuffer(new Uint8Array(2)); * // => false */ - var isBuffer = !Buffer ? constant(false) : function(value) { - return value instanceof Buffer; - }; + var isBuffer = nativeIsBuffer || stubFalse; /** * Checks if `value` is classified as a `Date` object. @@ -10587,8 +11387,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. * @example * * _.isDate(new Date); @@ -10597,9 +11396,7 @@ * _.isDate('Mon April 23 2012'); * // => false */ - function isDate(value) { - return isObjectLike(value) && objectToString.call(value) == dateTag; - } + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; /** * Checks if `value` is likely a DOM element. @@ -10609,8 +11406,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a DOM element, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. * @example * * _.isElement(document.body); @@ -10620,7 +11416,7 @@ * // => false */ function isElement(value) { - return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value); + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); } /** @@ -10657,23 +11453,27 @@ * // => false */ function isEmpty(value) { + if (value == null) { + return true; + } if (isArrayLike(value) && - (isArray(value) || isString(value) || isFunction(value.splice) || - isArguments(value) || isBuffer(value))) { + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { return !value.length; } - if (isObjectLike(value)) { - var tag = getTag(value); - if (tag == mapTag || tag == setTag) { - return !value.size; - } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; } for (var key in value) { if (hasOwnProperty.call(value, key)) { return false; } } - return !(nonEnumShadows && keys(value).length); + return true; } /** @@ -10692,12 +11492,11 @@ * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, - * else `false`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.isEqual(object, other); * // => true @@ -10722,8 +11521,7 @@ * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if the values are equivalent, - * else `false`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * function isGreeting(value) { @@ -10757,8 +11555,7 @@ * @since 3.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an error object, - * else `false`. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. * @example * * _.isError(new Error); @@ -10771,8 +11568,9 @@ if (!isObjectLike(value)) { return false; } - return (objectToString.call(value) == errorTag) || - (typeof value.message == 'string' && typeof value.name == 'string'); + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); } /** @@ -10786,21 +11584,20 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. * @example * * _.isFinite(3); * // => true * - * _.isFinite(Number.MAX_VALUE); - * // => true - * - * _.isFinite(3.14); + * _.isFinite(Number.MIN_VALUE); * // => true * * _.isFinite(Infinity); * // => false + * + * _.isFinite('3'); + * // => false */ function isFinite(value) { return typeof value == 'number' && nativeIsFinite(value); @@ -10814,8 +11611,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); @@ -10825,11 +11621,13 @@ * // => false */ function isFunction(value) { + if (!isObject(value)) { + return false; + } // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } /** @@ -10865,16 +11663,15 @@ /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); @@ -10896,7 +11693,7 @@ /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -10921,7 +11718,7 @@ */ function isObject(value) { var type = typeof value; - return !!value && (type == 'object' || type == 'function'); + return value != null && (type == 'object' || type == 'function'); } /** @@ -10949,7 +11746,7 @@ * // => false */ function isObjectLike(value) { - return !!value && typeof value == 'object'; + return value != null && typeof value == 'object'; } /** @@ -10960,8 +11757,7 @@ * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. * @example * * _.isMap(new Map); @@ -10970,16 +11766,18 @@ * _.isMap(new WeakMap); * // => false */ - function isMap(value) { - return isObjectLike(value) && getTag(value) == mapTag; - } + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; /** * Performs a partial deep comparison between `object` and `source` to - * determine if `object` contains equivalent property values. This method is - * equivalent to a `_.matches` function when `source` is partially applied. + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. * - * **Note:** This method supports comparing the same values as `_.isEqual`. + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. * * @static * @memberOf _ @@ -10990,12 +11788,12 @@ * @returns {boolean} Returns `true` if `object` is a match, else `false`. * @example * - * var object = { 'user': 'fred', 'age': 40 }; + * var object = { 'a': 1, 'b': 2 }; * - * _.isMatch(object, { 'age': 40 }); + * _.isMatch(object, { 'b': 2 }); * // => true * - * _.isMatch(object, { 'age': 36 }); + * _.isMatch(object, { 'b': 1 }); * // => false */ function isMatch(object, source) { @@ -11075,7 +11873,15 @@ } /** - * Checks if `value` is a native function. + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. * * @static * @memberOf _ @@ -11093,11 +11899,10 @@ * // => false */ function isNative(value) { - if (!isObject(value)) { - return false; + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); + return baseIsNative(value); } /** @@ -11156,8 +11961,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. * @example * * _.isNumber(3); @@ -11174,7 +11978,7 @@ */ function isNumber(value) { return typeof value == 'number' || - (isObjectLike(value) && objectToString.call(value) == numberTag); + (isObjectLike(value) && baseGetTag(value) == numberTag); } /** @@ -11186,8 +11990,7 @@ * @since 0.8.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Foo() { @@ -11207,8 +12010,7 @@ * // => true */ function isPlainObject(value) { - if (!isObjectLike(value) || - objectToString.call(value) != objectTag || isHostObject(value)) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } var proto = getPrototype(value); @@ -11216,8 +12018,8 @@ return true; } var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return (typeof Ctor == 'function' && - Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; } /** @@ -11228,8 +12030,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. * @example * * _.isRegExp(/abc/); @@ -11238,9 +12039,7 @@ * _.isRegExp('/abc/'); * // => false */ - function isRegExp(value) { - return isObject(value) && objectToString.call(value) == regexpTag; - } + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; /** * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 @@ -11254,8 +12053,7 @@ * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a safe integer, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. * @example * * _.isSafeInteger(3); @@ -11282,8 +12080,7 @@ * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. * @example * * _.isSet(new Set); @@ -11292,9 +12089,7 @@ * _.isSet(new WeakSet); * // => false */ - function isSet(value) { - return isObjectLike(value) && getTag(value) == setTag; - } + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; /** * Checks if `value` is classified as a `String` primitive or object. @@ -11304,8 +12099,7 @@ * @memberOf _ * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. * @example * * _.isString('abc'); @@ -11316,7 +12110,7 @@ */ function isString(value) { return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); } /** @@ -11327,8 +12121,7 @@ * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); @@ -11339,7 +12132,7 @@ */ function isSymbol(value) { return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); + (isObjectLike(value) && baseGetTag(value) == symbolTag); } /** @@ -11350,8 +12143,7 @@ * @since 3.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); @@ -11360,10 +12152,7 @@ * _.isTypedArray([]); * // => false */ - function isTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; - } + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; /** * Checks if `value` is `undefined`. @@ -11394,8 +12183,7 @@ * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. * @example * * _.isWeakMap(new WeakMap); @@ -11416,8 +12204,7 @@ * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. * @example * * _.isWeakSet(new WeakSet); @@ -11427,7 +12214,7 @@ * // => false */ function isWeakSet(value) { - return isObjectLike(value) && objectToString.call(value) == weakSetTag; + return isObjectLike(value) && baseGetTag(value) == weakSetTag; } /** @@ -11512,8 +12299,8 @@ if (isArrayLike(value)) { return isString(value) ? stringToArray(value) : copyArray(value); } - if (iteratorSymbol && value[iteratorSymbol]) { - return iteratorToArray(value[iteratorSymbol]()); + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); } var tag = getTag(value), func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); @@ -11521,11 +12308,46 @@ return func(value); } + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + /** * Converts `value` to an integer. * - * **Note:** This function is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ @@ -11535,7 +12357,7 @@ * @returns {number} Returns the converted integer. * @example * - * _.toInteger(3); + * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); @@ -11544,20 +12366,14 @@ * _.toInteger(Infinity); * // => 1.7976931348623157e+308 * - * _.toInteger('3'); + * _.toInteger('3.2'); * // => 3 */ function toInteger(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; } /** @@ -11565,7 +12381,7 @@ * array-like object. * * **Note:** This method is based on - * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ @@ -11575,7 +12391,7 @@ * @returns {number} Returns the converted integer. * @example * - * _.toLength(3); + * _.toLength(3.2); * // => 3 * * _.toLength(Number.MIN_VALUE); @@ -11584,7 +12400,7 @@ * _.toLength(Infinity); * // => 4294967295 * - * _.toLength('3'); + * _.toLength('3.2'); * // => 3 */ function toLength(value) { @@ -11602,8 +12418,8 @@ * @returns {number} Returns the number. * @example * - * _.toNumber(3); - * // => 3 + * _.toNumber(3.2); + * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 @@ -11611,8 +12427,8 @@ * _.toNumber(Infinity); * // => Infinity * - * _.toNumber('3'); - * // => 3 + * _.toNumber('3.2'); + * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { @@ -11622,7 +12438,7 @@ return NAN; } if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { @@ -11675,7 +12491,7 @@ * @returns {number} Returns the converted integer. * @example * - * _.toSafeInteger(3); + * _.toSafeInteger(3.2); * // => 3 * * _.toSafeInteger(Number.MIN_VALUE); @@ -11684,7 +12500,7 @@ * _.toSafeInteger(Infinity); * // => 9007199254740991 * - * _.toSafeInteger('3'); + * _.toSafeInteger('3.2'); * // => 3 */ function toSafeInteger(value) { @@ -11699,8 +12515,8 @@ * @memberOf _ * @since 4.0.0 * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. * @example * * _.toString(null); @@ -11737,21 +12553,21 @@ * @example * * function Foo() { - * this.c = 3; + * this.a = 1; * } * * function Bar() { - * this.e = 5; + * this.c = 3; * } * - * Foo.prototype.d = 4; - * Bar.prototype.f = 6; + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; * - * _.assign({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3, 'e': 5 } + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } */ var assign = createAssigner(function(object, source) { - if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { + if (isPrototype(source) || isArrayLike(source)) { copyObject(source, keys(source), object); return; } @@ -11780,27 +12596,21 @@ * @example * * function Foo() { - * this.b = 2; + * this.a = 1; * } * * function Bar() { - * this.d = 4; + * this.c = 3; * } * - * Foo.prototype.c = 3; - * Bar.prototype.e = 5; + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; * - * _.assignIn({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 } + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } */ var assignIn = createAssigner(function(object, source) { - if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { - copyObject(source, keysIn(source), object); - return; - } - for (var key in source) { - assignValue(object, key, source[key]); - } + copyObject(source, keysIn(source), object); }); /** @@ -11877,20 +12687,15 @@ * @category Object * @param {Object} object The object to iterate over. * @param {...(string|string[])} [paths] The property paths of elements to pick. - * @returns {Array} Returns the new array of picked elements. + * @returns {Array} Returns the picked values. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; * * _.at(object, ['a[0].b.c', 'a[1]']); * // => [3, 4] - * - * _.at(['a', 'b', 'c'], 0, 2); - * // => ['a', 'c'] */ - var at = rest(function(object, paths) { - return baseAt(object, baseFlatten(paths, 1)); - }); + var at = flatRest(baseAt); /** * Creates an object that inherits from the `prototype` object. If a @@ -11928,7 +12733,7 @@ */ function create(prototype, properties) { var result = baseCreate(prototype); - return properties ? baseAssign(result, properties) : result; + return properties == null ? result : baseAssign(result, properties); } /** @@ -11949,10 +12754,10 @@ * @see _.defaultsDeep * @example * - * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } */ - var defaults = rest(function(args) { + var defaults = baseRest(function(args) { args.push(undefined, assignInDefaults); return apply(assignInWith, undefined, args); }); @@ -11973,11 +12778,10 @@ * @see _.defaults * @example * - * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } }); - * // => { 'user': { 'name': 'barney', 'age': 36 } } - * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } */ - var defaultsDeep = rest(function(args) { + var defaultsDeep = baseRest(function(args) { args.push(undefined, mergeDefaults); return apply(mergeWith, undefined, args); }); @@ -11990,9 +12794,8 @@ * @memberOf _ * @since 1.1.0 * @category Object - * @param {Object} object The object to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {string|undefined} Returns the key of the matched element, * else `undefined`. * @example @@ -12019,7 +12822,7 @@ * // => 'barney' */ function findKey(object, predicate) { - return baseFind(object, getIteratee(predicate, 3), baseForOwn, true); + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); } /** @@ -12030,9 +12833,8 @@ * @memberOf _ * @since 2.0.0 * @category Object - * @param {Object} object The object to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {string|undefined} Returns the key of the matched element, * else `undefined`. * @example @@ -12059,7 +12861,7 @@ * // => 'pebbles' */ function findLastKey(object, predicate) { - return baseFind(object, getIteratee(predicate, 3), baseForOwnRight, true); + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); } /** @@ -12093,7 +12895,7 @@ function forIn(object, iteratee) { return object == null ? object - : baseFor(object, getIteratee(iteratee), keysIn); + : baseFor(object, getIteratee(iteratee, 3), keysIn); } /** @@ -12125,7 +12927,7 @@ function forInRight(object, iteratee) { return object == null ? object - : baseForRight(object, getIteratee(iteratee), keysIn); + : baseForRight(object, getIteratee(iteratee, 3), keysIn); } /** @@ -12157,7 +12959,7 @@ * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forOwn(object, iteratee) { - return object && baseForOwn(object, getIteratee(iteratee)); + return object && baseForOwn(object, getIteratee(iteratee, 3)); } /** @@ -12187,7 +12989,7 @@ * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. */ function forOwnRight(object, iteratee) { - return object && baseForOwnRight(object, getIteratee(iteratee)); + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); } /** @@ -12199,7 +13001,7 @@ * @memberOf _ * @category Object * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. + * @returns {Array} Returns the function names. * @see _.functionsIn * @example * @@ -12226,7 +13028,7 @@ * @since 4.0.0 * @category Object * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. + * @returns {Array} Returns the function names. * @see _.functions * @example * @@ -12246,7 +13048,7 @@ /** * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is used in its place. + * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ @@ -12369,8 +13171,7 @@ * @since 4.1.0 * @category Object * @param {Object} object The object to invert. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Object} Returns the new inverted object. * @example * @@ -12410,13 +13211,13 @@ * _.invoke(object, 'a[0].b.c.slice', 1, 3); * // => [2, 3] */ - var invoke = rest(baseInvoke); + var invoke = baseRest(baseInvoke); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static @@ -12441,23 +13242,7 @@ * // => ['0', '1'] */ function keys(object) { - var isProto = isPrototype(object); - if (!(isProto || isArrayLike(object))) { - return baseKeys(object); - } - var indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; - - for (var key in object) { - if (baseHas(object, key) && - !(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(isProto && key == 'constructor')) { - result.push(key); - } - } - return result; + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } /** @@ -12484,23 +13269,7 @@ * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ function keysIn(object) { - var index = -1, - isProto = isPrototype(object), - props = baseKeysIn(object), - propsLength = props.length, - indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; - - while (++index < propsLength) { - var key = props[index]; - if (!(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } /** @@ -12514,8 +13283,7 @@ * @since 3.8.0 * @category Object * @param {Object} object The object to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapValues * @example @@ -12530,7 +13298,7 @@ iteratee = getIteratee(iteratee, 3); baseForOwn(object, function(value, key, object) { - result[iteratee(value, key, object)] = value; + baseAssignValue(result, iteratee(value, key, object), value); }); return result; } @@ -12546,8 +13314,7 @@ * @since 2.4.0 * @category Object * @param {Object} object The object to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapKeys * @example @@ -12569,7 +13336,7 @@ iteratee = getIteratee(iteratee, 3); baseForOwn(object, function(value, key, object) { - result[key] = iteratee(value, key, object); + baseAssignValue(result, key, iteratee(value, key, object)); }); return result; } @@ -12579,7 +13346,7 @@ * inherited enumerable string keyed properties of source objects into the * destination object. Source properties that resolve to `undefined` are * skipped if a destination value exists. Array and plain object properties - * are merged recursively.Other objects and value types are overridden by + * are merged recursively. Other objects and value types are overridden by * assignment. Source objects are applied from left to right. Subsequent * sources overwrite property assignments of previous sources. * @@ -12594,16 +13361,16 @@ * @returns {Object} Returns `object`. * @example * - * var users = { - * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] * }; * - * var ages = { - * 'data': [{ 'age': 36 }, { 'age': 40 }] + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] * }; * - * _.merge(users, ages); - * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ var merge = createAssigner(function(object, source, srcIndex) { baseMerge(object, source, srcIndex); @@ -12613,7 +13380,7 @@ * This method is like `_.merge` except that it accepts `customizer` which * is invoked to produce the merged values of the destination and source * properties. If `customizer` returns `undefined`, merging is handled by the - * method instead. The `customizer` is invoked with seven arguments: + * method instead. The `customizer` is invoked with six arguments: * (objValue, srcValue, key, object, source, stack). * * **Note:** This method mutates `object`. @@ -12634,18 +13401,11 @@ * } * } * - * var object = { - * 'fruits': ['apple'], - * 'vegetables': ['beet'] - * }; - * - * var other = { - * 'fruits': ['banana'], - * 'vegetables': ['carrot'] - * }; + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; * * _.mergeWith(object, other, customizer); - * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } + * // => { 'a': [1, 3], 'b': [2, 4] } */ var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { baseMerge(object, source, srcIndex, customizer); @@ -12670,11 +13430,11 @@ * _.omit(object, ['a', 'c']); * // => { 'b': '2' } */ - var omit = rest(function(object, props) { + var omit = flatRest(function(object, props) { if (object == null) { return {}; } - props = arrayMap(baseFlatten(props, 1), toKey); + props = arrayMap(props, toKey); return basePick(object, baseDifference(getAllKeysIn(object), props)); }); @@ -12689,8 +13449,7 @@ * @since 4.0.0 * @category Object * @param {Object} object The source object. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per property. + * @param {Function} [predicate=_.identity] The function invoked per property. * @returns {Object} Returns the new object. * @example * @@ -12700,10 +13459,7 @@ * // => { 'b': '2' } */ function omitBy(object, predicate) { - predicate = getIteratee(predicate); - return basePickBy(object, function(value, key) { - return !predicate(value, key); - }); + return pickBy(object, negate(getIteratee(predicate))); } /** @@ -12723,8 +13479,8 @@ * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ - var pick = rest(function(object, props) { - return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey)); + var pick = flatRest(function(object, props) { + return object == null ? {} : basePick(object, arrayMap(props, toKey)); }); /** @@ -12736,8 +13492,7 @@ * @since 4.0.0 * @category Object * @param {Object} object The source object. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per property. + * @param {Function} [predicate=_.identity] The function invoked per property. * @returns {Object} Returns the new object. * @example * @@ -12747,7 +13502,7 @@ * // => { 'a': 1, 'c': 3 } */ function pickBy(object, predicate) { - return object == null ? {} : basePickBy(object, getIteratee(predicate)); + return object == null ? {} : basePickBy(object, getAllKeysIn(object), getIteratee(predicate)); } /** @@ -12864,7 +13619,8 @@ /** * Creates an array of own enumerable string keyed-value pairs for `object` - * which can be consumed by `_.fromPairs`. + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. * * @static * @memberOf _ @@ -12872,7 +13628,7 @@ * @alias entries * @category Object * @param {Object} object The object to query. - * @returns {Array} Returns the new array of key-value pairs. + * @returns {Array} Returns the key-value pairs. * @example * * function Foo() { @@ -12885,13 +13641,12 @@ * _.toPairs(new Foo); * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) */ - function toPairs(object) { - return baseToPairs(object, keys(object)); - } + var toPairs = createToPairs(keys); /** * Creates an array of own and inherited enumerable string keyed-value pairs - * for `object` which can be consumed by `_.fromPairs`. + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. * * @static * @memberOf _ @@ -12899,7 +13654,7 @@ * @alias entriesIn * @category Object * @param {Object} object The object to query. - * @returns {Array} Returns the new array of key-value pairs. + * @returns {Array} Returns the key-value pairs. * @example * * function Foo() { @@ -12910,25 +13665,24 @@ * Foo.prototype.c = 3; * * _.toPairsIn(new Foo); - * // => [['a', 1], ['b', 2], ['c', 1]] (iteration order is not guaranteed) + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) */ - function toPairsIn(object) { - return baseToPairs(object, keysIn(object)); - } + var toPairsIn = createToPairs(keysIn); /** * An alternative to `_.reduce`; this method transforms `object` to a new * `accumulator` object which is the result of running each of its own * enumerable string keyed properties thru `iteratee`, with each invocation - * potentially mutating the `accumulator` object. The iteratee is invoked - * with four arguments: (accumulator, value, key, object). Iteratee functions - * may exit iteration early by explicitly returning `false`. + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. * * @static * @memberOf _ * @since 1.3.0 * @category Object - * @param {Array|Object} object The object to iterate over. + * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The custom accumulator value. * @returns {*} Returns the accumulated value. @@ -12946,22 +13700,23 @@ * // => { '1': ['a', 'c'], '2': ['b'] } */ function transform(object, iteratee, accumulator) { - var isArr = isArray(object) || isTypedArray(object); - iteratee = getIteratee(iteratee, 4); + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + iteratee = getIteratee(iteratee, 4); if (accumulator == null) { - if (isArr || isObject(object)) { - var Ctor = object.constructor; - if (isArr) { - accumulator = isArray(object) ? new Ctor : []; - } else { - accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; - } - } else { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; + } + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } + else { accumulator = {}; } } - (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) { + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { return iteratee(accumulator, value, index, object); }); return accumulator; @@ -13085,7 +13840,7 @@ * // => ['h', 'i'] */ function values(object) { - return object ? baseValues(object, keys(object)) : []; + return object == null ? [] : baseValues(object, keys(object)); } /** @@ -13192,12 +13947,12 @@ * // => true */ function inRange(number, start, end) { - start = toNumber(start) || 0; + start = toFinite(start); if (end === undefined) { end = start; start = 0; } else { - end = toNumber(end) || 0; + end = toFinite(end); } number = toNumber(number); return baseInRange(number, start, end); @@ -13253,12 +14008,12 @@ upper = 1; } else { - lower = toNumber(lower) || 0; + lower = toFinite(lower); if (upper === undefined) { upper = lower; lower = 0; } else { - upper = toNumber(upper) || 0; + upper = toFinite(upper); } } if (lower > upper) { @@ -13321,8 +14076,9 @@ /** * Deburrs `string` by converting - * [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) - * to basic latin letters and removing + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). * * @static @@ -13338,7 +14094,7 @@ */ function deburr(string) { string = toString(string); - return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, ''); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); } /** @@ -13348,9 +14104,9 @@ * @memberOf _ * @since 3.0.0 * @category String - * @param {string} [string=''] The string to search. + * @param {string} [string=''] The string to inspect. * @param {string} [target] The string to search for. - * @param {number} [position=string.length] The position to search from. + * @param {number} [position=string.length] The position to search up to. * @returns {boolean} Returns `true` if `string` ends with `target`, * else `false`. * @example @@ -13373,13 +14129,14 @@ ? length : baseClamp(toInteger(position), 0, length); + var end = position; position -= target.length; - return position >= 0 && string.indexOf(target, position) == position; + return position >= 0 && string.slice(position, end) == target; } /** - * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to - * their corresponding HTML entities. + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. * * **Note:** No other characters are escaped. To escape additional * characters use a third-party library like [_he_](https://mths.be/he). @@ -13390,12 +14147,6 @@ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) * (under "semi-related fun fact") for more details. * - * Backticks are escaped because in IE < 9, they can break out of - * attribute values or HTML comments. See [#59](https://html5sec.org/#59), - * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and - * [#133](https://html5sec.org/#133) of the - * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details. - * * When working with HTML you should always * [quote attribute values](http://wonko.com/post/html-escaping) to reduce * XSS vectors. @@ -13638,15 +14389,12 @@ * // => [6, 8, 10] */ function parseInt(string, radix, guard) { - // Chrome fails to trim leading whitespace characters. - // See https://bugs.chromium.org/p/v8/issues/detail?id=3109 for more details. if (guard || radix == null) { radix = 0; } else if (radix) { radix = +radix; } - string = toString(string).replace(reTrim, ''); - return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10)); + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); } /** @@ -13703,7 +14451,7 @@ var args = arguments, string = toString(args[0]); - return args.length < 3 ? string : nativeReplace.call(string, args[1], args[2]); + return args.length < 3 ? string : string.replace(args[1], args[2]); } /** @@ -13744,7 +14492,7 @@ * @param {string} [string=''] The string to split. * @param {RegExp|string} separator The separator pattern to split by. * @param {number} [limit] The length to truncate results to. - * @returns {Array} Returns the new array of string segments. + * @returns {Array} Returns the string segments. * @example * * _.split('a-b-c', '-', 2); @@ -13764,11 +14512,11 @@ (separator != null && !isRegExp(separator)) )) { separator = baseToString(separator); - if (separator == '' && reHasComplexSymbol.test(string)) { + if (!separator && hasUnicode(string)) { return castSlice(stringToArray(string), 0, limit); } } - return nativeSplit.call(string, separator, limit); + return string.split(separator, limit); } /** @@ -13803,7 +14551,7 @@ * @memberOf _ * @since 3.0.0 * @category String - * @param {string} [string=''] The string to search. + * @param {string} [string=''] The string to inspect. * @param {string} [target] The string to search for. * @param {number} [position=0] The position to search from. * @returns {boolean} Returns `true` if `string` starts with `target`, @@ -13822,7 +14570,8 @@ function startsWith(string, target, position) { string = toString(string); position = baseClamp(toInteger(position), 0, string.length); - return string.lastIndexOf(baseToString(target), position) == position; + target = baseToString(target); + return string.slice(position, position + target.length) == target; } /** @@ -13884,17 +14633,12 @@ * compiled({ 'user': 'barney' }); * // => 'hello barney!' * - * // Use the ES delimiter as an alternative to the default "interpolate" delimiter. + * // Use the ES template literal delimiter as an "interpolate" delimiter. + * // Disable support by replacing the "interpolate" delimiter. * var compiled = _.template('hello ${ user }!'); * compiled({ 'user': 'pebbles' }); * // => 'hello pebbles!' * - * // Use custom template delimiters. - * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; - * var compiled = _.template('hello {{ user }}!'); - * compiled({ 'user': 'mustache' }); - * // => 'hello mustache!' - * * // Use backslashes to treat delimiters as plain text. * var compiled = _.template('<%= "\\<%- value %\\>" %>'); * compiled({ 'value': 'ignored' }); @@ -13920,9 +14664,15 @@ * // return __p; * // } * + * // Use custom template delimiters. + * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; + * var compiled = _.template('hello {{ user }}!'); + * compiled({ 'user': 'mustache' }); + * // => 'hello mustache!' + * * // Use the `source` property to inline compiled templates for meaningful * // line numbers in error messages and stack traces. - * fs.writeFileSync(path.join(cwd, 'jst.js'), '\ + * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\ * var JST = {\ * "main": ' + _.template(mainText).source + '\ * };\ @@ -14239,7 +14989,7 @@ string = toString(string); var strLength = string.length; - if (reHasComplexSymbol.test(string)) { + if (hasUnicode(string)) { var strSymbols = stringToArray(string); strLength = strSymbols.length; } @@ -14285,7 +15035,7 @@ /** * The inverse of `_.escape`; this method converts the HTML entities - * `&`, `<`, `>`, `"`, `'`, and ``` in `string` to + * `&`, `<`, `>`, `"`, and `'` in `string` to * their corresponding characters. * * **Note:** No other HTML entities are unescaped. To unescape additional @@ -14376,7 +15126,7 @@ pattern = guard ? undefined : pattern; if (pattern === undefined) { - pattern = reHasComplexWord.test(string) ? reComplexWord : reBasicWord; + return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); } return string.match(pattern) || []; } @@ -14405,7 +15155,7 @@ * elements = []; * } */ - var attempt = rest(function(func, args) { + var attempt = baseRest(function(func, args) { try { return apply(func, undefined, args); } catch (e) { @@ -14430,19 +15180,19 @@ * * var view = { * 'label': 'docs', - * 'onClick': function() { + * 'click': function() { * console.log('clicked ' + this.label); * } * }; * - * _.bindAll(view, 'onClick'); - * jQuery(element).on('click', view.onClick); + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); * // => Logs 'clicked docs' when clicked. */ - var bindAll = rest(function(object, methodNames) { - arrayEach(baseFlatten(methodNames, 1), function(key) { + var bindAll = flatRest(function(object, methodNames) { + arrayEach(methodNames, function(key) { key = toKey(key); - object[key] = bind(object[key], object); + baseAssignValue(object, key, bind(object[key], object)); }); return object; }); @@ -14458,13 +15208,13 @@ * @since 4.0.0 * @category Util * @param {Array} pairs The predicate-function pairs. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new composite function. * @example * * var func = _.cond([ * [_.matches({ 'a': 1 }), _.constant('matches A')], * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], - * [_.constant(true), _.constant('no match')] + * [_.stubTrue, _.constant('no match')] * ]); * * func({ 'a': 1, 'b': 2 }); @@ -14477,7 +15227,7 @@ * // => 'no match' */ function cond(pairs) { - var length = pairs ? pairs.length : 0, + var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee(); pairs = !length ? [] : arrayMap(pairs, function(pair) { @@ -14487,7 +15237,7 @@ return [toIteratee(pair[0]), pair[1]]; }); - return rest(function(args) { + return baseRest(function(args) { var index = -1; while (++index < length) { var pair = pairs[index]; @@ -14503,21 +15253,24 @@ * the corresponding property values of a given object, returning `true` if * all predicates return truthy, else `false`. * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * * @static * @memberOf _ * @since 4.0.0 * @category Util * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } * ]; * - * _.filter(users, _.conforms({ 'age': _.partial(_.gt, _, 38) })); - * // => [{ 'user': 'fred', 'age': 40 }] + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] */ function conforms(source) { return baseConforms(baseClone(source, true)); @@ -14531,13 +15284,15 @@ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new constant function. * @example * - * var object = { 'user': 'fred' }; - * var getter = _.constant(object); + * var objects = _.times(2, _.constant({ 'a': 1 })); * - * getter() === object; + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { @@ -14546,6 +15301,30 @@ }; } + /** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ + function defaultTo(value, defaultValue) { + return (value == null || value !== value) ? defaultValue : value; + } + /** * Creates a function that returns the result of invoking the given functions * with the `this` binding of the created function, where each successive @@ -14555,8 +15334,8 @@ * @memberOf _ * @since 3.0.0 * @category Util - * @param {...(Function|Function[])} [funcs] Functions to invoke. - * @returns {Function} Returns the new function. + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. * @see _.flowRight * @example * @@ -14564,7 +15343,7 @@ * return n * n; * } * - * var addSquare = _.flow(_.add, square); + * var addSquare = _.flow([_.add, square]); * addSquare(1, 2); * // => 9 */ @@ -14578,8 +15357,8 @@ * @since 3.0.0 * @memberOf _ * @category Util - * @param {...(Function|Function[])} [funcs] Functions to invoke. - * @returns {Function} Returns the new function. + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. * @see _.flow * @example * @@ -14587,14 +15366,14 @@ * return n * n; * } * - * var addSquare = _.flowRight(square, _.add); + * var addSquare = _.flowRight([square, _.add]); * addSquare(1, 2); * // => 9 */ var flowRight = createFlow(true); /** - * This method returns the first argument given to it. + * This method returns the first argument it receives. * * @static * @since 0.1.0 @@ -14604,9 +15383,9 @@ * @returns {*} Returns `value`. * @example * - * var object = { 'user': 'fred' }; + * var object = { 'a': 1 }; * - * _.identity(object) === object; + * console.log(_.identity(object) === object); * // => true */ function identity(value) { @@ -14662,26 +15441,30 @@ /** * Creates a function that performs a partial deep comparison between a given * object and `source`, returning `true` if the given object has equivalent - * property values, else `false`. The created function is equivalent to - * `_.isMatch` with a `source` partially applied. + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. * - * **Note:** This method supports comparing the same values as `_.isEqual`. + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. * * @static * @memberOf _ * @since 3.0.0 * @category Util * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } * ]; * - * _.filter(users, _.matches({ 'age': 40, 'active': false })); - * // => [{ 'user': 'fred', 'age': 40, 'active': false }] + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] */ function matches(source) { return baseMatches(baseClone(source, true)); @@ -14692,7 +15475,9 @@ * value at `path` of a given object to `srcValue`, returning `true` if the * object value is equivalent, else `false`. * - * **Note:** This method supports comparing the same values as `_.isEqual`. + * **Note:** Partial comparisons will match empty array and empty object + * `srcValue` values against any array or object value, respectively. See + * `_.isEqual` for a list of supported value comparisons. * * @static * @memberOf _ @@ -14700,16 +15485,16 @@ * @category Util * @param {Array|string} path The path of the property to get. * @param {*} srcValue The value to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } * ]; * - * _.find(users, _.matchesProperty('user', 'fred')); - * // => { 'user': 'fred' } + * _.find(objects, _.matchesProperty('a', 4)); + * // => { 'a': 4, 'b': 5, 'c': 6 } */ function matchesProperty(path, srcValue) { return baseMatchesProperty(path, baseClone(srcValue, true)); @@ -14725,7 +15510,7 @@ * @category Util * @param {Array|string} path The path of the method to invoke. * @param {...*} [args] The arguments to invoke the method with. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new invoker function. * @example * * var objects = [ @@ -14739,7 +15524,7 @@ * _.map(objects, _.method(['a', 'b'])); * // => [2, 1] */ - var method = rest(function(path, args) { + var method = baseRest(function(path, args) { return function(object) { return baseInvoke(object, path, args); }; @@ -14756,7 +15541,7 @@ * @category Util * @param {Object} object The object to query. * @param {...*} [args] The arguments to invoke the method with. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new invoker function. * @example * * var array = _.times(3, _.constant), @@ -14768,7 +15553,7 @@ * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); * // => [2, 0] */ - var methodOf = rest(function(object, args) { + var methodOf = baseRest(function(object, args) { return function(path) { return baseInvoke(object, path, args); }; @@ -14867,8 +15652,7 @@ } /** - * A no-operation function that returns `undefined` regardless of the - * arguments it receives. + * This method returns `undefined`. * * @static * @memberOf _ @@ -14876,17 +15660,15 @@ * @category Util * @example * - * var object = { 'user': 'fred' }; - * - * _.noop(object) === undefined; - * // => true + * _.times(2, _.noop); + * // => [undefined, undefined] */ function noop() { // No operation performed. } /** - * Creates a function that returns its nth argument. If `n` is negative, + * Creates a function that gets the argument at index `n`. If `n` is negative, * the nth argument from the end is returned. * * @static @@ -14894,7 +15676,7 @@ * @since 4.0.0 * @category Util * @param {number} [n=0] The index of the argument to return. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new pass-thru function. * @example * * var func = _.nthArg(1); @@ -14907,7 +15689,7 @@ */ function nthArg(n) { n = toInteger(n); - return rest(function(args) { + return baseRest(function(args) { return baseNth(args, n); }); } @@ -14920,12 +15702,12 @@ * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [iteratees=[_.identity]] The iteratees to invoke. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to invoke. * @returns {Function} Returns the new function. * @example * - * var func = _.over(Math.max, Math.min); + * var func = _.over([Math.max, Math.min]); * * func(1, 2, 3, 4); * // => [4, 1] @@ -14940,12 +15722,12 @@ * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [predicates=[_.identity]] The predicates to check. + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. * @returns {Function} Returns the new function. * @example * - * var func = _.overEvery(Boolean, isFinite); + * var func = _.overEvery([Boolean, isFinite]); * * func('1'); * // => true @@ -14966,12 +15748,12 @@ * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [predicates=[_.identity]] The predicates to check. + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. * @returns {Function} Returns the new function. * @example * - * var func = _.overSome(Boolean, isFinite); + * var func = _.overSome([Boolean, isFinite]); * * func('1'); * // => true @@ -14992,7 +15774,7 @@ * @since 2.4.0 * @category Util * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. * @example * * var objects = [ @@ -15019,7 +15801,7 @@ * @since 3.0.0 * @category Util * @param {Object} object The object to query. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. * @example * * var array = [0, 1, 2], @@ -15053,7 +15835,7 @@ * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. * @see _.inRange, _.rangeRight * @example * @@ -15091,7 +15873,7 @@ * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. * @see _.inRange, _.range * @example * @@ -15118,6 +15900,101 @@ */ var rangeRight = createRange(true); + /** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + function stubArray() { + return []; + } + + /** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + function stubFalse() { + return false; + } + + /** + * This method returns a new empty object. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Object} Returns the new empty object. + * @example + * + * var objects = _.times(2, _.stubObject); + * + * console.log(objects); + * // => [{}, {}] + * + * console.log(objects[0] === objects[1]); + * // => false + */ + function stubObject() { + return {}; + } + + /** + * This method returns an empty string. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {string} Returns the empty string. + * @example + * + * _.times(2, _.stubString); + * // => ['', ''] + */ + function stubString() { + return ''; + } + + /** + * This method returns `true`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `true`. + * @example + * + * _.times(2, _.stubTrue); + * // => [true, true] + */ + function stubTrue() { + return true; + } + /** * Invokes the iteratee `n` times, returning an array of the results of * each invocation. The iteratee is invoked with one argument; (index). @@ -15134,8 +16011,8 @@ * _.times(3, String); * // => ['0', '1', '2'] * - * _.times(4, _.constant(true)); - * // => [true, true, true, true] + * _.times(4, _.constant(0)); + * // => [0, 0, 0, 0] */ function times(n, iteratee) { n = toInteger(n); @@ -15171,15 +16048,6 @@ * * _.toPath('a[0].b.c'); * // => ['a', '0', 'b', 'c'] - * - * var path = ['a', 'b', 'c'], - * newPath = _.toPath(path); - * - * console.log(newPath); - * // => ['a', 'b', 'c'] - * - * console.log(path === newPath); - * // => false */ function toPath(value) { if (isArray(value)) { @@ -15229,7 +16097,7 @@ */ var add = createMathOperation(function(augend, addend) { return augend + addend; - }); + }, 0); /** * Computes `number` rounded up to `precision`. @@ -15271,7 +16139,7 @@ */ var divide = createMathOperation(function(dividend, divisor) { return dividend / divisor; - }); + }, 1); /** * Computes `number` rounded down to `precision`. @@ -15330,8 +16198,7 @@ * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {*} Returns the maximum value. * @example * @@ -15346,7 +16213,7 @@ */ function maxBy(array, iteratee) { return (array && array.length) - ? baseExtremum(array, getIteratee(iteratee), baseGt) + ? baseExtremum(array, getIteratee(iteratee, 2), baseGt) : undefined; } @@ -15378,8 +16245,7 @@ * @since 4.7.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the mean. * @example * @@ -15393,7 +16259,7 @@ * // => 5 */ function meanBy(array, iteratee) { - return baseMean(array, getIteratee(iteratee)); + return baseMean(array, getIteratee(iteratee, 2)); } /** @@ -15430,8 +16296,7 @@ * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {*} Returns the minimum value. * @example * @@ -15446,7 +16311,7 @@ */ function minBy(array, iteratee) { return (array && array.length) - ? baseExtremum(array, getIteratee(iteratee), baseLt) + ? baseExtremum(array, getIteratee(iteratee, 2), baseLt) : undefined; } @@ -15467,7 +16332,7 @@ */ var multiply = createMathOperation(function(multiplier, multiplicand) { return multiplier * multiplicand; - }); + }, 1); /** * Computes `number` rounded to `precision`. @@ -15509,7 +16374,7 @@ */ var subtract = createMathOperation(function(minuend, subtrahend) { return minuend - subtrahend; - }); + }, 0); /** * Computes the sum of the values in `array`. @@ -15541,8 +16406,7 @@ * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the sum. * @example * @@ -15557,7 +16421,7 @@ */ function sumBy(array, iteratee) { return (array && array.length) - ? baseSum(array, getIteratee(iteratee)) + ? baseSum(array, getIteratee(iteratee, 2)) : 0; } @@ -15736,7 +16600,9 @@ lodash.cloneDeep = cloneDeep; lodash.cloneDeepWith = cloneDeepWith; lodash.cloneWith = cloneWith; + lodash.conformsTo = conformsTo; lodash.deburr = deburr; + lodash.defaultTo = defaultTo; lodash.divide = divide; lodash.endsWith = endsWith; lodash.eq = eq; @@ -15818,6 +16684,11 @@ lodash.meanBy = meanBy; lodash.min = min; lodash.minBy = minBy; + lodash.stubArray = stubArray; + lodash.stubFalse = stubFalse; + lodash.stubObject = stubObject; + lodash.stubString = stubString; + lodash.stubTrue = stubTrue; lodash.multiply = multiply; lodash.nth = nth; lodash.noConflict = noConflict; @@ -15852,6 +16723,7 @@ lodash.sumBy = sumBy; lodash.template = template; lodash.times = times; + lodash.toFinite = toFinite; lodash.toInteger = toInteger; lodash.toLength = toLength; lodash.toLower = toLower; @@ -15971,7 +16843,7 @@ return this.reverse().find(predicate); }; - LazyWrapper.prototype.invokeMap = rest(function(path, args) { + LazyWrapper.prototype.invokeMap = baseRest(function(path, args) { if (typeof path == 'function') { return new LazyWrapper(this); } @@ -15981,10 +16853,7 @@ }); LazyWrapper.prototype.reject = function(predicate) { - predicate = getIteratee(predicate, 3); - return this.filter(function(value) { - return !predicate(value); - }); + return this.filter(negate(getIteratee(predicate))); }; LazyWrapper.prototype.slice = function(start, end) { @@ -16088,7 +16957,7 @@ } }); - realNames[createHybridWrapper(undefined, BIND_KEY_FLAG).name] = [{ + realNames[createHybrid(undefined, BIND_KEY_FLAG).name] = [{ 'name': 'wrapper', 'func': undefined }]; @@ -16107,38 +16976,38 @@ lodash.prototype.reverse = wrapperReverse; lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; - if (iteratorSymbol) { - lodash.prototype[iteratorSymbol] = wrapperToIterator; + // Add lazy aliases. + lodash.prototype.first = lodash.prototype.head; + + if (symIterator) { + lodash.prototype[symIterator] = wrapperToIterator; } return lodash; - } + }); /*--------------------------------------------------------------------------*/ // Export lodash. var _ = runInContext(); - // Expose Lodash on the free variable `window` or `self` when available so it's - // globally accessible, even when bundled with Browserify, Webpack, etc. This - // also prevents errors in cases where Lodash is loaded by a script tag in the - // presence of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch - // for more details. Use `_.noConflict` to remove Lodash from the global object. - (freeWindow || freeSelf || {})._ = _; - - // Some AMD build optimizers like r.js check for condition patterns like the following: + // Some AMD build optimizers, like r.js, check for condition patterns like: if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = _; + // Define as an anonymous module so, through path mapping, it can be // referenced as the "underscore" module. define(function() { return _; }); } - // Check for `exports` after `define` in case a build optimizer adds an `exports` object. - else if (freeExports && freeModule) { + // Check for `exports` after `define` in case a build optimizer adds it. + else if (freeModule) { // Export for Node.js. - if (moduleExports) { - (freeModule.exports = _)._ = _; - } + (freeModule.exports = _)._ = _; // Export for CommonJS support. freeExports._ = _; } diff --git a/node_modules/globule/node_modules/lodash/lodash.min.js b/node_modules/globule/node_modules/lodash/lodash.min.js new file mode 100644 index 0000000..e126e6b --- /dev/null +++ b/node_modules/globule/node_modules/lodash/lodash.min.js @@ -0,0 +1,135 @@ +/** + * @license + * lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + */ +;(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u"']/g,J=RegExp(G.source),Y=RegExp(H.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,nn=/<%=([\s\S]+?)%>/g,tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rn=/^\w*$/,en=/^\./,un=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,on=/[\\^$.*+?()[\]{}|]/g,fn=RegExp(on.source),cn=/^\s+|\s+$/g,an=/^\s+/,ln=/\s+$/,sn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,hn=/\{\n\/\* \[wrapped with (.+)\] \*/,pn=/,? & /,_n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vn=/\\(\\)?/g,gn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dn=/\w*$/,yn=/^[-+]0x[0-9a-f]+$/i,bn=/^0b[01]+$/i,xn=/^\[object .+?Constructor\]$/,jn=/^0o[0-7]+$/i,wn=/^(?:0|[1-9]\d*)$/,mn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,An=/($^)/,kn=/['\n\r\u2028\u2029\\]/g,En="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",On="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+En,Sn="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",In=RegExp("['\u2019]","g"),Rn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),zn=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+Sn+En,"g"),Wn=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)|\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)|\\d+",On].join("|"),"g"),Bn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),Ln=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Un="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Cn={}; +Cn["[object Float32Array]"]=Cn["[object Float64Array]"]=Cn["[object Int8Array]"]=Cn["[object Int16Array]"]=Cn["[object Int32Array]"]=Cn["[object Uint8Array]"]=Cn["[object Uint8ClampedArray]"]=Cn["[object Uint16Array]"]=Cn["[object Uint32Array]"]=true,Cn["[object Arguments]"]=Cn["[object Array]"]=Cn["[object ArrayBuffer]"]=Cn["[object Boolean]"]=Cn["[object DataView]"]=Cn["[object Date]"]=Cn["[object Error]"]=Cn["[object Function]"]=Cn["[object Map]"]=Cn["[object Number]"]=Cn["[object Object]"]=Cn["[object RegExp]"]=Cn["[object Set]"]=Cn["[object String]"]=Cn["[object WeakMap]"]=false; +var Dn={};Dn["[object Arguments]"]=Dn["[object Array]"]=Dn["[object ArrayBuffer]"]=Dn["[object DataView]"]=Dn["[object Boolean]"]=Dn["[object Date]"]=Dn["[object Float32Array]"]=Dn["[object Float64Array]"]=Dn["[object Int8Array]"]=Dn["[object Int16Array]"]=Dn["[object Int32Array]"]=Dn["[object Map]"]=Dn["[object Number]"]=Dn["[object Object]"]=Dn["[object RegExp]"]=Dn["[object Set]"]=Dn["[object String]"]=Dn["[object Symbol]"]=Dn["[object Uint8Array]"]=Dn["[object Uint8ClampedArray]"]=Dn["[object Uint16Array]"]=Dn["[object Uint32Array]"]=true, +Dn["[object Error]"]=Dn["[object Function]"]=Dn["[object WeakMap]"]=false;var Mn,Tn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$n=parseFloat,Fn=parseInt,Nn=typeof global=="object"&&global&&global.Object===Object&&global,Pn=typeof self=="object"&&self&&self.Object===Object&&self,Zn=Nn||Pn||Function("return this")(),qn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vn=qn&&typeof module=="object"&&module&&!module.nodeType&&module,Kn=Vn&&Vn.exports===qn,Gn=Kn&&Nn.h; +n:{try{Mn=Gn&&Gn.g("util");break n}catch(n){}Mn=void 0}var Hn=Mn&&Mn.isArrayBuffer,Jn=Mn&&Mn.isDate,Yn=Mn&&Mn.isMap,Qn=Mn&&Mn.isRegExp,Xn=Mn&&Mn.isSet,nt=Mn&&Mn.isTypedArray,tt=j("length"),rt=w({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I", +"\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C", +"\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i", +"\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S", +"\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n", +"\u017f":"s"}),et=w({"&":"&","<":"<",">":">",'"':""","'":"'"}),ut=w({"&":"&","<":"<",">":">",""":'"',"'":"'"}),it=function w(En){function On(n){if(gu(n)&&!uf(n)&&!(n instanceof Mn)){if(n instanceof zn)return n;if(ui.call(n,"__wrapped__"))return Te(n)}return new zn(n)}function Sn(){}function zn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=F}function Mn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=false, +this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Tn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function dt(n,t,r,e,i,o,f){var c;if(e&&(c=o?e(n,i,o,f):e(n)),c!==F)return c;if(!vu(n))return n;if(i=uf(n)){if(c=xe(n),!t)return Dr(n,c)}else{var a=po(n),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(ff(n))return zr(n,t);if("[object Object]"==a||"[object Arguments]"==a||l&&!o){if(c=je(l?{}:n),!t)return Tr(n,pt(c,n))}else{if(!Dn[a])return o?n:{};c=we(n,a,dt,t)}}if(f||(f=new Vn),o=f.get(n))return o;f.set(n,c); +var s=i?F:(r?he:Ru)(n);return u(s||n,function(u,i){s&&(i=u,u=n[i]),lt(c,i,dt(u,t,r,e,i,n,f))}),c}function yt(n){var t=Ru(n);return function(r){return bt(r,n,t)}}function bt(n,t,r){var e=r.length;if(null==n)return!e;for(n=Ju(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===F&&!(u in n)||!i(o))return false}return true}function xt(n,t,r){if(typeof n!="function")throw new Xu("Expected a function");return go(function(){n.apply(F,r)},t)}function jt(n,t,r,e){var u=-1,i=c,o=true,f=n.length,s=[],h=t.length;if(!f)return s;r&&(t=l(t,S(r))), +e?(i=a,o=false):200<=t.length&&(i=R,o=false,t=new qn(t));n:for(;++ut}function Bt(n,t){return null!=n&&ui.call(n,t)}function Lt(n,t){return null!=n&&t in Ju(n)}function Ut(n,t,r){for(var e=r?a:c,u=n[0].length,i=n.length,o=i,f=qu(i),s=1/0,h=[];o--;){var p=n[o];o&&t&&(p=l(p,S(t))),s=Li(p.length,s),f[o]=!r&&(t||120<=u&&120<=p.length)?new qn(o&&p):F}var p=n[0],_=-1,v=f[0];n:for(;++_t?r:0,Ae(t,r)?n[t]:F}function rr(n,t,r){var e=-1;return t=l(t.length?t:[Mu],S(ve())),n=Yt(n,function(n){return{a:l(t,function(t){return t(n)}),b:++e,c:n}}),A(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e=f?c:c*("desc"==r[e]?-1:1); +break n}}e=n.b-t.b}return e})}function er(n,t){return n=Ju(n),ur(n,t,function(t,r){return r in n})}function ur(n,t,r){for(var e=-1,u=t.length,i={};++et||9007199254740991t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=qu(u);++e=u){for(;e>>1,o=n[i];null!==o&&!xu(o)&&(r?o<=t:oe)return e?wr(n[0]):[];for(var u=-1,i=qu(e);++u=e?n:vr(n,t,r)}function zr(n,t){if(t)return n.slice();var r=n.length,r=_i?_i(r):new n.constructor(r);return n.copy(r),r}function Wr(n){var t=new n.constructor(n.byteLength);return new pi(t).set(new pi(n)),t}function Br(n,t){return new n.constructor(t?Wr(n.buffer):n.buffer,n.byteOffset,n.length)}function Lr(n,t){if(n!==t){var r=n!==F,e=null===n,u=n===n,i=xu(n),o=t!==F,f=null===t,c=t===t,a=xu(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1; +if(!e&&!i&&!a&&nu?F:i,u=1),t=Ju(t);++eo&&f[0]!==a&&f[o-1]!==a?[]:C(f,a),o-=c.length,or?r?ar(t,n):t:(r=ar(t,Ei(n/T(t))),Bn.test(t)?Rr($(r),0,n).join(""):r.slice(0,n)); +}function re(n,t,e,u){function i(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=qu(l+c),h=this&&this!==Zn&&this instanceof i?f:n;++at||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Ur(e,r,h[4]):r,i[4]=e?C(i[3],"__lodash_placeholder__"):h[4]), +(r=h[5])&&(e=i[5],i[5]=e?Cr(e,r,h[6]):r,i[6]=e?C(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Li(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0],t=i[1],r=i[2],e=i[3],u=i[4],f=i[9]=null==i[9]?c?0:n.length:Bi(i[9]-a,0),!f&&24&t&&(t&=-25),Be((h?oo:vo)(t&&1!=t?8==t||16==t?Gr(n,t,f):32!=t&&33!=t||u.length?Yr.apply(F,i):re(n,t,r,e):Zr(n,t,r),i),n,t)}function ae(n,t,r,e,u,i){var o=2&u,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t; +var c=-1,a=true,l=1&u?new qn:F;for(i.set(n,t),i.set(t,n);++cr&&(r=Bi(e+r,0)),g(n,ve(t,3),r)):-1; +}function Fe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==F&&(u=mu(r),u=0>r?Bi(e+u,0):Li(u,e-1)),g(n,ve(t,3),u,true)}function Ne(n){return(null==n?0:n.length)?kt(n,1):[]}function Pe(n){return n&&n.length?n[0]:F}function Ze(n){var t=null==n?0:n.length;return t?n[t-1]:F}function qe(n,t){return n&&n.length&&t&&t.length?or(n,t):n}function Ve(n){return null==n?n:Mi.call(n)}function Ke(n){if(!n||!n.length)return[];var t=0;return n=f(n,function(n){if(lu(n))return t=Bi(n.length,t),true; +}),E(t,function(t){return l(n,j(t))})}function Ge(n,t){if(!n||!n.length)return[];var e=Ke(n);return null==t?e:l(e,function(n){return r(t,F,n)})}function He(n){return n=On(n),n.__chain__=true,n}function Je(n,t){return t(n)}function Ye(){return this}function Qe(n,t){return(uf(n)?u:ro)(n,ve(t,3))}function Xe(n,t){return(uf(n)?i:eo)(n,ve(t,3))}function nu(n,t){return(uf(n)?l:Yt)(n,ve(t,3))}function tu(n,t,r){return t=r?F:t,t=n&&null==t?n.length:t,ce(n,128,F,F,F,F,t)}function ru(n,t){var r;if(typeof t!="function")throw new Xu("Expected a function"); +return n=mu(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=F),r}}function eu(n,t,r){return t=r?F:t,n=ce(n,8,F,F,F,F,F,t),n.placeholder=eu.placeholder,n}function uu(n,t,r){return t=r?F:t,n=ce(n,16,F,F,F,F,F,t),n.placeholder=uu.placeholder,n}function iu(n,t,r){function e(t){var r=c,e=a;return c=a=F,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===F||r>=t||0>r||g&&n>=l}function i(){var n=Vo();if(u(n))return o(n);var r,e=go;r=n-_,n=t-(n-p),r=g?Li(n,l-r):n,h=e(i,r)}function o(n){ +return h=F,d&&c?e(n):(c=a=F,s)}function f(){var n=Vo(),r=u(n);if(c=arguments,a=this,p=n,r){if(h===F)return _=n=p,h=go(i,t),v?e(n):s;if(g)return h=go(i,t),e(p)}return h===F&&(h=go(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new Xu("Expected a function");return t=ku(t)||0,vu(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Bi(ku(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==F&&co(h),_=0,c=p=a=h=F},f.flush=function(){return h===F?s:o(Vo())},f}function ou(n,t){ +function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=n.apply(this,e),r.cache=i.set(u,e)||i,e)}if(typeof n!="function"||null!=t&&typeof t!="function")throw new Xu("Expected a function");return r.cache=new(ou.Cache||Pn),r}function fu(n){if(typeof n!="function")throw new Xu("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2]); +}return!n.apply(this,t)}}function cu(n,t){return n===t||n!==n&&t!==t}function au(n){return null!=n&&_u(n.length)&&!hu(n)}function lu(n){return gu(n)&&au(n)}function su(n){if(!gu(n))return false;var t=zt(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!yu(n)}function hu(n){return!!vu(n)&&(n=zt(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function pu(n){return typeof n=="number"&&n==mu(n); +}function _u(n){return typeof n=="number"&&-1=n}function vu(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function gu(n){return null!=n&&typeof n=="object"}function du(n){return typeof n=="number"||gu(n)&&"[object Number]"==zt(n)}function yu(n){return!(!gu(n)||"[object Object]"!=zt(n))&&(n=vi(n),null===n||(n=ui.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&ei.call(n)==ci))}function bu(n){return typeof n=="string"||!uf(n)&&gu(n)&&"[object String]"==zt(n); +}function xu(n){return typeof n=="symbol"||gu(n)&&"[object Symbol]"==zt(n)}function ju(n){if(!n)return[];if(au(n))return bu(n)?$(n):Dr(n);if(xi&&n[xi]){n=n[xi]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=po(n),("[object Map]"==t?L:"[object Set]"==t?D:Bu)(n)}function wu(n){return n?(n=ku(n),n===N||n===-N?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function mu(n){n=wu(n);var t=n%1;return n===n?t?n-t:n:0}function Au(n){return n?gt(mu(n),0,4294967295):0}function ku(n){ +if(typeof n=="number")return n;if(xu(n))return P;if(vu(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,n=vu(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(cn,"");var t=bn.test(n);return t||jn.test(n)?Fn(n.slice(2),t?2:8):yn.test(n)?P:+n}function Eu(n){return Mr(n,zu(n))}function Ou(n){return null==n?"":jr(n)}function Su(n,t,r){return n=null==n?F:It(n,t),n===F?r:n}function Iu(n,t){return null!=n&&be(n,t,Lt)}function Ru(n){return au(n)?Gn(n):Ht(n)}function zu(n){if(au(n))n=Gn(n,true);else if(vu(n)){ +var t,r=Se(n),e=[];for(t in n)("constructor"!=t||!r&&ui.call(n,t))&&e.push(t);n=e}else{if(t=[],null!=n)for(r in Ju(n))t.push(r);n=t}return n}function Wu(n,t){return null==n?{}:ur(n,Rt(n,zu,ho),ve(t))}function Bu(n){return null==n?[]:I(n,Ru(n))}function Lu(n){return Mf(Ou(n).toLowerCase())}function Uu(n){return(n=Ou(n))&&n.replace(mn,rt).replace(Rn,"")}function Cu(n,t,r){return n=Ou(n),t=r?F:t,t===F?Ln.test(n)?n.match(Wn)||[]:n.match(_n)||[]:n.match(t)||[]}function Du(n){return function(){return n; +}}function Mu(n){return n}function Tu(n){return Gt(typeof n=="function"?n:dt(n,true))}function $u(n,t,r){var e=Ru(t),i=St(t,e);null!=r||vu(t)&&(i.length||!e.length)||(r=t,t=n,n=this,i=St(t,Ru(t)));var o=!(vu(r)&&"chain"in r&&!r.chain),f=hu(n);return u(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Dr(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,s([this.value()],arguments)); +})}),n}function Fu(){}function Nu(n){return Ee(n)?j(Ce(n)):ir(n)}function Pu(){return[]}function Zu(){return false}En=null==En?Zn:it.defaults(Zn.Object(),En,it.pick(Zn,Un));var qu=En.Array,Vu=En.Date,Ku=En.Error,Gu=En.Function,Hu=En.Math,Ju=En.Object,Yu=En.RegExp,Qu=En.String,Xu=En.TypeError,ni=qu.prototype,ti=Ju.prototype,ri=En["__core-js_shared__"],ei=Gu.prototype.toString,ui=ti.hasOwnProperty,ii=0,oi=function(){var n=/[^.]+$/.exec(ri&&ri.keys&&ri.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),fi=ti.toString,ci=ei.call(Ju),ai=Zn._,li=Yu("^"+ei.call(ui).replace(on,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),si=Kn?En.Buffer:F,hi=En.Symbol,pi=En.Uint8Array,_i=si?si.f:F,vi=U(Ju.getPrototypeOf,Ju),gi=Ju.create,di=ti.propertyIsEnumerable,yi=ni.splice,bi=hi?hi.isConcatSpreadable:F,xi=hi?hi.iterator:F,ji=hi?hi.toStringTag:F,wi=function(){ +try{var n=ye(Ju,"defineProperty");return n({},"",{}),n}catch(n){}}(),mi=En.clearTimeout!==Zn.clearTimeout&&En.clearTimeout,Ai=Vu&&Vu.now!==Zn.Date.now&&Vu.now,ki=En.setTimeout!==Zn.setTimeout&&En.setTimeout,Ei=Hu.ceil,Oi=Hu.floor,Si=Ju.getOwnPropertySymbols,Ii=si?si.isBuffer:F,Ri=En.isFinite,zi=ni.join,Wi=U(Ju.keys,Ju),Bi=Hu.max,Li=Hu.min,Ui=Vu.now,Ci=En.parseInt,Di=Hu.random,Mi=ni.reverse,Ti=ye(En,"DataView"),$i=ye(En,"Map"),Fi=ye(En,"Promise"),Ni=ye(En,"Set"),Pi=ye(En,"WeakMap"),Zi=ye(Ju,"create"),qi=Pi&&new Pi,Vi={},Ki=De(Ti),Gi=De($i),Hi=De(Fi),Ji=De(Ni),Yi=De(Pi),Qi=hi?hi.prototype:F,Xi=Qi?Qi.valueOf:F,no=Qi?Qi.toString:F,to=function(){ +function n(){}return function(t){return vu(t)?gi?gi(t):(n.prototype=t,t=new n,n.prototype=F,t):{}}}();On.templateSettings={escape:Q,evaluate:X,interpolate:nn,variable:"",imports:{_:On}},On.prototype=Sn.prototype,On.prototype.constructor=On,zn.prototype=to(Sn.prototype),zn.prototype.constructor=zn,Mn.prototype=to(Sn.prototype),Mn.prototype.constructor=Mn,Tn.prototype.clear=function(){this.__data__=Zi?Zi(null):{},this.size=0},Tn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n], +this.size-=n?1:0,n},Tn.prototype.get=function(n){var t=this.__data__;return Zi?(n=t[n],"__lodash_hash_undefined__"===n?F:n):ui.call(t,n)?t[n]:F},Tn.prototype.has=function(n){var t=this.__data__;return Zi?t[n]!==F:ui.call(t,n)},Tn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Zi&&t===F?"__lodash_hash_undefined__":t,this},Nn.prototype.clear=function(){this.__data__=[],this.size=0},Nn.prototype.delete=function(n){var t=this.__data__;return n=st(t,n),!(0>n)&&(n==t.length-1?t.pop():yi.call(t,n,1), +--this.size,true)},Nn.prototype.get=function(n){var t=this.__data__;return n=st(t,n),0>n?F:t[n][1]},Nn.prototype.has=function(n){return-1e?(++this.size,r.push([n,t])):r[e][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Tn,map:new($i||Nn),string:new Tn}},Pn.prototype.delete=function(n){return n=ge(this,n).delete(n),this.size-=n?1:0,n},Pn.prototype.get=function(n){return ge(this,n).get(n); +},Pn.prototype.has=function(n){return ge(this,n).has(n)},Pn.prototype.set=function(n,t){var r=ge(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},qn.prototype.add=qn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},qn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.clear=function(){this.__data__=new Nn,this.size=0},Vn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Vn.prototype.get=function(n){ +return this.__data__.get(n)},Vn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Nn){var e=r.__data__;if(!$i||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Pn(e)}return r.set(n,t),this.size=r.size,this};var ro=Nr(Et),eo=Nr(Ot,true),uo=Pr(),io=Pr(true),oo=qi?function(n,t){return qi.set(n,t),n}:Mu,fo=wi?function(n,t){return wi(n,"toString",{configurable:true,enumerable:false,value:Du(t),writable:true})}:Mu,co=mi||function(n){ +return Zn.clearTimeout(n)},ao=Ni&&1/D(new Ni([,-0]))[1]==N?function(n){return new Ni(n)}:Fu,lo=qi?function(n){return qi.get(n)}:Fu,so=Si?U(Si,Ju):Pu,ho=Si?function(n){for(var t=[];n;)s(t,so(n)),n=vi(n);return t}:Pu,po=zt;(Ti&&"[object DataView]"!=po(new Ti(new ArrayBuffer(1)))||$i&&"[object Map]"!=po(new $i)||Fi&&"[object Promise]"!=po(Fi.resolve())||Ni&&"[object Set]"!=po(new Ni)||Pi&&"[object WeakMap]"!=po(new Pi))&&(po=function(n){var t=zt(n);if(n=(n="[object Object]"==t?n.constructor:F)?De(n):"")switch(n){ +case Ki:return"[object DataView]";case Gi:return"[object Map]";case Hi:return"[object Promise]";case Ji:return"[object Set]";case Yi:return"[object WeakMap]"}return t});var _o=ri?hu:Zu,vo=Le(oo),go=ki||function(n,t){return Zn.setTimeout(n,t)},yo=Le(fo),bo=function(n){n=ou(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){n=Ou(n);var t=[];return en.test(n)&&t.push(""),n.replace(un,function(n,r,e,u){t.push(e?u.replace(vn,"$1"):r||n)}),t}),xo=lr(function(n,t){return lu(n)?jt(n,kt(t,1,lu,true)):[]; +}),jo=lr(function(n,t){var r=Ze(t);return lu(r)&&(r=F),lu(n)?jt(n,kt(t,1,lu,true),ve(r,2)):[]}),wo=lr(function(n,t){var r=Ze(t);return lu(r)&&(r=F),lu(n)?jt(n,kt(t,1,lu,true),F,r):[]}),mo=lr(function(n){var t=l(n,Or);return t.length&&t[0]===n[0]?Ut(t):[]}),Ao=lr(function(n){var t=Ze(n),r=l(n,Or);return t===Ze(r)?t=F:r.pop(),r.length&&r[0]===n[0]?Ut(r,ve(t,2)):[]}),ko=lr(function(n){var t=Ze(n),r=l(n,Or);return(t=typeof t=="function"?t:F)&&r.pop(),r.length&&r[0]===n[0]?Ut(r,F,t):[]}),Eo=lr(qe),Oo=se(function(n,t){ +var r=null==n?0:n.length,e=vt(n,t);return fr(n,l(t,function(n){return Ae(n,r)?+n:n}).sort(Lr)),e}),So=lr(function(n){return wr(kt(n,1,lu,true))}),Io=lr(function(n){var t=Ze(n);return lu(t)&&(t=F),wr(kt(n,1,lu,true),ve(t,2))}),Ro=lr(function(n){var t=Ze(n),t=typeof t=="function"?t:F;return wr(kt(n,1,lu,true),F,t)}),zo=lr(function(n,t){return lu(n)?jt(n,t):[]}),Wo=lr(function(n){return kr(f(n,lu))}),Bo=lr(function(n){var t=Ze(n);return lu(t)&&(t=F),kr(f(n,lu),ve(t,2))}),Lo=lr(function(n){var t=Ze(n),t=typeof t=="function"?t:F; +return kr(f(n,lu),F,t)}),Uo=lr(Ke),Co=lr(function(n){var t=n.length,t=1=t}),ef=Mt(function(){return arguments}())?Mt:function(n){return gu(n)&&ui.call(n,"callee")&&!di.call(n,"callee")},uf=qu.isArray,of=Hn?S(Hn):Tt,ff=Ii||Zu,cf=Jn?S(Jn):$t,af=Yn?S(Yn):Nt,lf=Qn?S(Qn):qt,sf=Xn?S(Xn):Vt,hf=nt?S(nt):Kt,pf=ue(Jt),_f=ue(function(n,t){return n<=t}),vf=Fr(function(n,t){if(Se(t)||au(t))Mr(t,Ru(t),n);else for(var r in t)ui.call(t,r)&<(n,r,t[r]); +}),gf=Fr(function(n,t){Mr(t,zu(t),n)}),df=Fr(function(n,t,r,e){Mr(t,zu(t),n,e)}),yf=Fr(function(n,t,r,e){Mr(t,Ru(t),n,e)}),bf=se(vt),xf=lr(function(n){return n.push(F,ct),r(df,F,n)}),jf=lr(function(n){return n.push(F,Re),r(Ef,F,n)}),wf=Qr(function(n,t,r){n[t]=r},Du(Mu)),mf=Qr(function(n,t,r){ui.call(n,t)?n[t].push(r):n[t]=[r]},ve),Af=lr(Dt),kf=Fr(function(n,t,r){nr(n,t,r)}),Ef=Fr(function(n,t,r,e){nr(n,t,r,e)}),Of=se(function(n,t){return null==n?{}:(t=l(t,Ce),er(n,jt(Rt(n,zu,ho),t)))}),Sf=se(function(n,t){ +return null==n?{}:er(n,l(t,Ce))}),If=fe(Ru),Rf=fe(zu),zf=Vr(function(n,t,r){return t=t.toLowerCase(),n+(r?Lu(t):t)}),Wf=Vr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Bf=Vr(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Lf=qr("toLowerCase"),Uf=Vr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),Cf=Vr(function(n,t,r){return n+(r?" ":"")+Mf(t)}),Df=Vr(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Mf=qr("toUpperCase"),Tf=lr(function(n,t){try{return r(n,F,t)}catch(n){return su(n)?n:new Ku(n); +}}),$f=se(function(n,t){return u(t,function(t){t=Ce(t),_t(n,t,Ko(n[t],n))}),n}),Ff=Jr(),Nf=Jr(true),Pf=lr(function(n,t){return function(r){return Dt(r,n,t)}}),Zf=lr(function(n,t){return function(r){return Dt(n,r,t)}}),qf=ne(l),Vf=ne(o),Kf=ne(_),Gf=ee(),Hf=ee(true),Jf=Xr(function(n,t){return n+t},0),Yf=oe("ceil"),Qf=Xr(function(n,t){return n/t},1),Xf=oe("floor"),nc=Xr(function(n,t){return n*t},1),tc=oe("round"),rc=Xr(function(n,t){return n-t},0);return On.after=function(n,t){if(typeof t!="function")throw new Xu("Expected a function"); +return n=mu(n),function(){if(1>--n)return t.apply(this,arguments)}},On.ary=tu,On.assign=vf,On.assignIn=gf,On.assignInWith=df,On.assignWith=yf,On.at=bf,On.before=ru,On.bind=Ko,On.bindAll=$f,On.bindKey=Go,On.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return uf(n)?n:[n]},On.chain=He,On.chunk=function(n,t,r){if(t=(r?ke(n,t,r):t===F)?1:Bi(mu(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=qu(Ei(r/t));et?0:t,e)):[]},On.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:mu(t),t=e-t,vr(n,0,0>t?0:t)):[]},On.dropRightWhile=function(n,t){return n&&n.length?mr(n,ve(t,3),true,true):[]; +},On.dropWhile=function(n,t){return n&&n.length?mr(n,ve(t,3),true):[]},On.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&ke(n,t,r)&&(r=0,e=u),u=n.length,r=mu(r),0>r&&(r=-r>u?0:u+r),e=e===F||e>u?u:mu(e),0>e&&(e+=u),e=r>e?0:Au(e);r>>0,r?(n=Ou(n))&&(typeof t=="string"||null!=t&&!lf(t))&&(t=jr(t),!t&&Bn.test(n))?Rr($(n),0,r):n.split(t,r):[]},On.spread=function(n,t){if(typeof n!="function")throw new Xu("Expected a function");return t=t===F?0:Bi(mu(t),0), +lr(function(e){var u=e[t];return e=Rr(e,0,t),u&&s(e,u),r(n,this,e)})},On.tail=function(n){var t=null==n?0:n.length;return t?vr(n,1,t):[]},On.take=function(n,t,r){return n&&n.length?(t=r||t===F?1:mu(t),vr(n,0,0>t?0:t)):[]},On.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:mu(t),t=e-t,vr(n,0>t?0:t,e)):[]},On.takeRightWhile=function(n,t){return n&&n.length?mr(n,ve(t,3),false,true):[]},On.takeWhile=function(n,t){return n&&n.length?mr(n,ve(t,3)):[]},On.tap=function(n,t){return t(n), +n},On.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new Xu("Expected a function");return vu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),iu(n,t,{leading:e,maxWait:t,trailing:u})},On.thru=Je,On.toArray=ju,On.toPairs=If,On.toPairsIn=Rf,On.toPath=function(n){return uf(n)?l(n,Ce):xu(n)?[n]:Dr(bo(n))},On.toPlainObject=Eu,On.transform=function(n,t,r){var e=uf(n),i=e||ff(n)||hf(n);if(t=ve(t,4),null==r){var o=n&&n.constructor;r=i?e?new o:[]:vu(n)&&hu(o)?to(vi(n)):{}; +}return(i?u:Et)(n,function(n,e,u){return t(r,n,e,u)}),r},On.unary=function(n){return tu(n,1)},On.union=So,On.unionBy=Io,On.unionWith=Ro,On.uniq=function(n){return n&&n.length?wr(n):[]},On.uniqBy=function(n,t){return n&&n.length?wr(n,ve(t,2)):[]},On.uniqWith=function(n,t){return t=typeof t=="function"?t:F,n&&n.length?wr(n,F,t):[]},On.unset=function(n,t){var r;if(null==n)r=true;else{r=n;var e=t,e=Ee(e,r)?[e]:Ir(e);r=We(r,e),e=Ce(Ze(e)),r=!(null!=r&&ui.call(r,e))||delete r[e]}return r},On.unzip=Ke,On.unzipWith=Ge, +On.update=function(n,t,r){return null==n?n:pr(n,t,Sr(r)(It(n,t)),void 0)},On.updateWith=function(n,t,r,e){return e=typeof e=="function"?e:F,null!=n&&(n=pr(n,t,Sr(r)(It(n,t)),e)),n},On.values=Bu,On.valuesIn=function(n){return null==n?[]:I(n,zu(n))},On.without=zo,On.words=Cu,On.wrap=function(n,t){return Qo(Sr(t),n)},On.xor=Wo,On.xorBy=Bo,On.xorWith=Lo,On.zip=Uo,On.zipObject=function(n,t){return Er(n||[],t||[],lt)},On.zipObjectDeep=function(n,t){return Er(n||[],t||[],pr)},On.zipWith=Co,On.entries=If, +On.entriesIn=Rf,On.extend=gf,On.extendWith=df,$u(On,On),On.add=Jf,On.attempt=Tf,On.camelCase=zf,On.capitalize=Lu,On.ceil=Yf,On.clamp=function(n,t,r){return r===F&&(r=t,t=F),r!==F&&(r=ku(r),r=r===r?r:0),t!==F&&(t=ku(t),t=t===t?t:0),gt(ku(n),t,r)},On.clone=function(n){return dt(n,false,true)},On.cloneDeep=function(n){return dt(n,true,true)},On.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:F,dt(n,true,true,t)},On.cloneWith=function(n,t){return t=typeof t=="function"?t:F,dt(n,false,true,t)},On.conformsTo=function(n,t){ +return null==t||bt(n,t,Ru(t))},On.deburr=Uu,On.defaultTo=function(n,t){return null==n||n!==n?t:n},On.divide=Qf,On.endsWith=function(n,t,r){n=Ou(n),t=jr(t);var e=n.length,e=r=r===F?e:gt(mu(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},On.eq=cu,On.escape=function(n){return(n=Ou(n))&&Y.test(n)?n.replace(H,et):n},On.escapeRegExp=function(n){return(n=Ou(n))&&fn.test(n)?n.replace(on,"\\$&"):n},On.every=function(n,t,r){var e=uf(n)?o:wt;return r&&ke(n,t,r)&&(t=F),e(n,ve(t,3))},On.find=To,On.findIndex=$e, +On.findKey=function(n,t){return v(n,ve(t,3),Et)},On.findLast=$o,On.findLastIndex=Fe,On.findLastKey=function(n,t){return v(n,ve(t,3),Ot)},On.floor=Xf,On.forEach=Qe,On.forEachRight=Xe,On.forIn=function(n,t){return null==n?n:uo(n,ve(t,3),zu)},On.forInRight=function(n,t){return null==n?n:io(n,ve(t,3),zu)},On.forOwn=function(n,t){return n&&Et(n,ve(t,3))},On.forOwnRight=function(n,t){return n&&Ot(n,ve(t,3))},On.get=Su,On.gt=tf,On.gte=rf,On.has=function(n,t){return null!=n&&be(n,t,Bt)},On.hasIn=Iu,On.head=Pe, +On.identity=Mu,On.includes=function(n,t,r,e){return n=au(n)?n:Bu(n),r=r&&!e?mu(r):0,e=n.length,0>r&&(r=Bi(e+r,0)),bu(n)?r<=e&&-1r&&(r=Bi(e+r,0)),d(n,t,r)):-1},On.inRange=function(n,t,r){return t=wu(t),r===F?(r=t,t=0):r=wu(r),n=ku(n),n>=Li(t,r)&&n=n},On.isSet=sf,On.isString=bu,On.isSymbol=xu,On.isTypedArray=hf,On.isUndefined=function(n){return n===F},On.isWeakMap=function(n){return gu(n)&&"[object WeakMap]"==po(n)},On.isWeakSet=function(n){return gu(n)&&"[object WeakSet]"==zt(n)},On.join=function(n,t){ +return null==n?"":zi.call(n,t)},On.kebabCase=Wf,On.last=Ze,On.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==F&&(u=mu(r),u=0>u?Bi(e+u,0):Li(u,e-1)),t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=g(n,b,u,true);return n},On.lowerCase=Bf,On.lowerFirst=Lf,On.lt=pf,On.lte=_f,On.max=function(n){return n&&n.length?mt(n,Mu,Wt):F},On.maxBy=function(n,t){return n&&n.length?mt(n,ve(t,2),Wt):F},On.mean=function(n){return x(n,Mu)},On.meanBy=function(n,t){return x(n,ve(t,2))},On.min=function(n){ +return n&&n.length?mt(n,Mu,Jt):F},On.minBy=function(n,t){return n&&n.length?mt(n,ve(t,2),Jt):F},On.stubArray=Pu,On.stubFalse=Zu,On.stubObject=function(){return{}},On.stubString=function(){return""},On.stubTrue=function(){return true},On.multiply=nc,On.nth=function(n,t){return n&&n.length?tr(n,mu(t)):F},On.noConflict=function(){return Zn._===this&&(Zn._=ai),this},On.noop=Fu,On.now=Vo,On.pad=function(n,t,r){n=Ou(n);var e=(t=mu(t))?T(n):0;return!t||e>=t?n:(t=(t-e)/2,te(Oi(t),r)+n+te(Ei(t),r))},On.padEnd=function(n,t,r){ +n=Ou(n);var e=(t=mu(t))?T(n):0;return t&&et){var e=n;n=t,t=e}return r||n%1||t%1?(r=Di(),Li(n+r*(t-n+$n("1e-"+((r+"").length-1))),t)):cr(n,t); +},On.reduce=function(n,t,r){var e=uf(n)?h:m,u=3>arguments.length;return e(n,ve(t,4),r,u,ro)},On.reduceRight=function(n,t,r){var e=uf(n)?p:m,u=3>arguments.length;return e(n,ve(t,4),r,u,eo)},On.repeat=function(n,t,r){return t=(r?ke(n,t,r):t===F)?1:mu(t),ar(Ou(n),t)},On.replace=function(){var n=arguments,t=Ou(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},On.result=function(n,t,r){t=Ee(t,n)?[t]:Ir(t);var e=-1,u=t.length;for(u||(n=F,u=1);++en||9007199254740991=i)return n;if(i=r-T(e),1>i)return e;if(r=o?Rr(o,0,i).join(""):n.slice(0,i), +u===F)return r+e;if(o&&(i+=r.length-i),lf(u)){if(n.slice(i).search(u)){var f=r;for(u.global||(u=Yu(u.source,Ou(dn.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===F?i:c)}}else n.indexOf(jr(u),i)!=i&&(u=r.lastIndexOf(u),-1u.__dir__?"Right":"")}),u},Mn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse(); +}}),u(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;Mn.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:ve(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u(["head","last"],function(n,t){var r="take"+(t?"Right":"");Mn.prototype[n]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Mn.prototype[n]=function(){return this.__filtered__?new Mn(this):this[r](1)}}),Mn.prototype.compact=function(){ +return this.filter(Mu)},Mn.prototype.find=function(n){return this.filter(n).head()},Mn.prototype.findLast=function(n){return this.reverse().find(n)},Mn.prototype.invokeMap=lr(function(n,t){return typeof n=="function"?new Mn(this):this.map(function(r){return Dt(r,n,t)})}),Mn.prototype.reject=function(n){return this.filter(fu(ve(n)))},Mn.prototype.slice=function(n,t){n=mu(n);var r=this;return r.__filtered__&&(0t)?new Mn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==F&&(t=mu(t),r=0>t?r.dropRight(-t):r.take(t-n)), +r)},Mn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Mn.prototype.toArray=function(){return this.take(4294967295)},Et(Mn.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=On[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(On.prototype[t]=function(){function t(n){return n=u.apply(On,s([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Mn,a=f[0],l=c||uf(o);l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false); +var h=this.__chain__,p=!!this.__actions__.length,a=i&&!h,c=c&&!p;return!i&&l?(o=c?o:new Mn(this),o=n.apply(o,f),o.__actions__.push({func:Je,args:[t],thisArg:F}),new zn(o,h)):a&&c?n.apply(this,f):(o=this.thru(t),a?e?o.value()[0]:o.value():o)})}),u("pop push shift sort splice unshift".split(" "),function(n){var t=ni[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);On.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(uf(u)?u:[],n); +}return this[r](function(r){return t.apply(uf(r)?r:[],n)})}}),Et(Mn.prototype,function(n,t){var r=On[t];if(r){var e=r.name+"";(Vi[e]||(Vi[e]=[])).push({name:t,func:r})}}),Vi[Yr(F,2).name]=[{name:"wrapper",func:F}],Mn.prototype.clone=function(){var n=new Mn(this.__wrapped__);return n.__actions__=Dr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Dr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Dr(this.__views__),n},Mn.prototype.reverse=function(){ +if(this.__filtered__){var n=new Mn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Mn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=uf(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++ci||i==n&&a==n)return Ar(t,this.__actions__);e=[];n:for(;n--&&c=this.__values__.length; +return{done:n,value:n?F:this.__values__[this.__index__++]}},On.prototype.plant=function(n){for(var t,r=this;r instanceof Sn;){var e=Te(r);e.__index__=0,e.__values__=F,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},On.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Mn?(this.__actions__.length&&(n=new Mn(this)),n=n.reverse(),n.__actions__.push({func:Je,args:[Ve],thisArg:F}),new zn(n,this.__chain__)):this.thru(Ve)},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){ +return Ar(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,xi&&(On.prototype[xi]=Ye),On}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Zn._=it, define(function(){return it})):Vn?((Vn.exports=it)._=it,qn._=it):Zn._=it}).call(this); \ No newline at end of file diff --git a/node_modules/lodash/package/lowerCase.js b/node_modules/globule/node_modules/lodash/lowerCase.js similarity index 100% rename from node_modules/lodash/package/lowerCase.js rename to node_modules/globule/node_modules/lodash/lowerCase.js diff --git a/node_modules/lodash/package/lowerFirst.js b/node_modules/globule/node_modules/lodash/lowerFirst.js similarity index 100% rename from node_modules/lodash/package/lowerFirst.js rename to node_modules/globule/node_modules/lodash/lowerFirst.js diff --git a/node_modules/lodash/package/lt.js b/node_modules/globule/node_modules/lodash/lt.js similarity index 100% rename from node_modules/lodash/package/lt.js rename to node_modules/globule/node_modules/lodash/lt.js diff --git a/node_modules/lodash/package/lte.js b/node_modules/globule/node_modules/lodash/lte.js similarity index 100% rename from node_modules/lodash/package/lte.js rename to node_modules/globule/node_modules/lodash/lte.js diff --git a/node_modules/lodash/package/map.js b/node_modules/globule/node_modules/lodash/map.js similarity index 93% rename from node_modules/lodash/package/map.js rename to node_modules/globule/node_modules/lodash/map.js index e9f9f22..22efee7 100644 --- a/node_modules/lodash/package/map.js +++ b/node_modules/globule/node_modules/lodash/map.js @@ -22,8 +22,7 @@ var arrayMap = require('./_arrayMap'), * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * diff --git a/node_modules/lodash/package/mapKeys.js b/node_modules/globule/node_modules/lodash/mapKeys.js similarity index 78% rename from node_modules/lodash/package/mapKeys.js rename to node_modules/globule/node_modules/lodash/mapKeys.js index 8af3ac5..3b68797 100644 --- a/node_modules/lodash/package/mapKeys.js +++ b/node_modules/globule/node_modules/lodash/mapKeys.js @@ -1,4 +1,5 @@ -var baseForOwn = require('./_baseForOwn'), +var baseAssignValue = require('./_baseAssignValue'), + baseForOwn = require('./_baseForOwn'), baseIteratee = require('./_baseIteratee'); /** @@ -12,8 +13,7 @@ var baseForOwn = require('./_baseForOwn'), * @since 3.8.0 * @category Object * @param {Object} object The object to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapValues * @example @@ -28,7 +28,7 @@ function mapKeys(object, iteratee) { iteratee = baseIteratee(iteratee, 3); baseForOwn(object, function(value, key, object) { - result[iteratee(value, key, object)] = value; + baseAssignValue(result, iteratee(value, key, object), value); }); return result; } diff --git a/node_modules/lodash/package/mapValues.js b/node_modules/globule/node_modules/lodash/mapValues.js similarity index 82% rename from node_modules/lodash/package/mapValues.js rename to node_modules/globule/node_modules/lodash/mapValues.js index 610f458..4ec0825 100644 --- a/node_modules/lodash/package/mapValues.js +++ b/node_modules/globule/node_modules/lodash/mapValues.js @@ -1,4 +1,5 @@ -var baseForOwn = require('./_baseForOwn'), +var baseAssignValue = require('./_baseAssignValue'), + baseForOwn = require('./_baseForOwn'), baseIteratee = require('./_baseIteratee'); /** @@ -12,8 +13,7 @@ var baseForOwn = require('./_baseForOwn'), * @since 2.4.0 * @category Object * @param {Object} object The object to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapKeys * @example @@ -35,7 +35,7 @@ function mapValues(object, iteratee) { iteratee = baseIteratee(iteratee, 3); baseForOwn(object, function(value, key, object) { - result[key] = iteratee(value, key, object); + baseAssignValue(result, key, iteratee(value, key, object)); }); return result; } diff --git a/node_modules/globule/node_modules/lodash/matches.js b/node_modules/globule/node_modules/lodash/matches.js new file mode 100644 index 0000000..d34e98e --- /dev/null +++ b/node_modules/globule/node_modules/lodash/matches.js @@ -0,0 +1,36 @@ +var baseClone = require('./_baseClone'), + baseMatches = require('./_baseMatches'); + +/** + * Creates a function that performs a partial deep comparison between a given + * object and `source`, returning `true` if the given object has equivalent + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + */ +function matches(source) { + return baseMatches(baseClone(source, true)); +} + +module.exports = matches; diff --git a/node_modules/lodash/package/matchesProperty.js b/node_modules/globule/node_modules/lodash/matchesProperty.js similarity index 60% rename from node_modules/lodash/package/matchesProperty.js rename to node_modules/globule/node_modules/lodash/matchesProperty.js index 3dd59d5..ff8f2df 100644 --- a/node_modules/lodash/package/matchesProperty.js +++ b/node_modules/globule/node_modules/lodash/matchesProperty.js @@ -6,7 +6,9 @@ var baseClone = require('./_baseClone'), * value at `path` of a given object to `srcValue`, returning `true` if the * object value is equivalent, else `false`. * - * **Note:** This method supports comparing the same values as `_.isEqual`. + * **Note:** Partial comparisons will match empty array and empty object + * `srcValue` values against any array or object value, respectively. See + * `_.isEqual` for a list of supported value comparisons. * * @static * @memberOf _ @@ -14,16 +16,16 @@ var baseClone = require('./_baseClone'), * @category Util * @param {Array|string} path The path of the property to get. * @param {*} srcValue The value to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } * ]; * - * _.find(users, _.matchesProperty('user', 'fred')); - * // => { 'user': 'fred' } + * _.find(objects, _.matchesProperty('a', 4)); + * // => { 'a': 4, 'b': 5, 'c': 6 } */ function matchesProperty(path, srcValue) { return baseMatchesProperty(path, baseClone(srcValue, true)); diff --git a/node_modules/lodash/package/math.js b/node_modules/globule/node_modules/lodash/math.js similarity index 100% rename from node_modules/lodash/package/math.js rename to node_modules/globule/node_modules/lodash/math.js diff --git a/node_modules/lodash/package/max.js b/node_modules/globule/node_modules/lodash/max.js similarity index 100% rename from node_modules/lodash/package/max.js rename to node_modules/globule/node_modules/lodash/max.js diff --git a/node_modules/lodash/package/maxBy.js b/node_modules/globule/node_modules/lodash/maxBy.js similarity index 84% rename from node_modules/lodash/package/maxBy.js rename to node_modules/globule/node_modules/lodash/maxBy.js index 4627bac..2eba9c0 100644 --- a/node_modules/lodash/package/maxBy.js +++ b/node_modules/globule/node_modules/lodash/maxBy.js @@ -12,8 +12,7 @@ var baseExtremum = require('./_baseExtremum'), * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {*} Returns the maximum value. * @example * @@ -28,7 +27,7 @@ var baseExtremum = require('./_baseExtremum'), */ function maxBy(array, iteratee) { return (array && array.length) - ? baseExtremum(array, baseIteratee(iteratee), baseGt) + ? baseExtremum(array, baseIteratee(iteratee, 2), baseGt) : undefined; } diff --git a/node_modules/lodash/package/mean.js b/node_modules/globule/node_modules/lodash/mean.js similarity index 100% rename from node_modules/lodash/package/mean.js rename to node_modules/globule/node_modules/lodash/mean.js diff --git a/node_modules/lodash/package/meanBy.js b/node_modules/globule/node_modules/lodash/meanBy.js similarity index 83% rename from node_modules/lodash/package/meanBy.js rename to node_modules/globule/node_modules/lodash/meanBy.js index 970d798..b031671 100644 --- a/node_modules/lodash/package/meanBy.js +++ b/node_modules/globule/node_modules/lodash/meanBy.js @@ -11,8 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 4.7.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the mean. * @example * @@ -26,7 +25,7 @@ var baseIteratee = require('./_baseIteratee'), * // => 5 */ function meanBy(array, iteratee) { - return baseMean(array, baseIteratee(iteratee)); + return baseMean(array, baseIteratee(iteratee, 2)); } module.exports = meanBy; diff --git a/node_modules/lodash/package/memoize.js b/node_modules/globule/node_modules/lodash/memoize.js similarity index 81% rename from node_modules/lodash/package/memoize.js rename to node_modules/globule/node_modules/lodash/memoize.js index b657bbe..d6035af 100644 --- a/node_modules/lodash/package/memoize.js +++ b/node_modules/globule/node_modules/lodash/memoize.js @@ -1,6 +1,6 @@ var MapCache = require('./_MapCache'); -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** @@ -13,8 +13,8 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object) - * method interface of `delete`, `get`, `has`, and `set`. + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ @@ -22,7 +22,7 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoizing function. + * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; @@ -48,7 +48,7 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { - if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { @@ -60,14 +60,14 @@ function memoize(func, resolver) { return cache.get(key); } var result = func.apply(this, args); - memoized.cache = cache.set(key, result); + memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } -// Assign cache to `_.memoize`. +// Expose `MapCache`. memoize.Cache = MapCache; module.exports = memoize; diff --git a/node_modules/lodash/package/merge.js b/node_modules/globule/node_modules/lodash/merge.js similarity index 75% rename from node_modules/lodash/package/merge.js rename to node_modules/globule/node_modules/lodash/merge.js index 61c6e01..4bbc3a1 100644 --- a/node_modules/lodash/package/merge.js +++ b/node_modules/globule/node_modules/lodash/merge.js @@ -6,7 +6,7 @@ var baseMerge = require('./_baseMerge'), * inherited enumerable string keyed properties of source objects into the * destination object. Source properties that resolve to `undefined` are * skipped if a destination value exists. Array and plain object properties - * are merged recursively.Other objects and value types are overridden by + * are merged recursively. Other objects and value types are overridden by * assignment. Source objects are applied from left to right. Subsequent * sources overwrite property assignments of previous sources. * @@ -21,16 +21,16 @@ var baseMerge = require('./_baseMerge'), * @returns {Object} Returns `object`. * @example * - * var users = { - * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] * }; * - * var ages = { - * 'data': [{ 'age': 36 }, { 'age': 40 }] + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] * }; * - * _.merge(users, ages); - * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ var merge = createAssigner(function(object, source, srcIndex) { baseMerge(object, source, srcIndex); diff --git a/node_modules/lodash/package/mergeWith.js b/node_modules/globule/node_modules/lodash/mergeWith.js similarity index 77% rename from node_modules/lodash/package/mergeWith.js rename to node_modules/globule/node_modules/lodash/mergeWith.js index 8fada62..1b43a2c 100644 --- a/node_modules/lodash/package/mergeWith.js +++ b/node_modules/globule/node_modules/lodash/mergeWith.js @@ -5,7 +5,7 @@ var baseMerge = require('./_baseMerge'), * This method is like `_.merge` except that it accepts `customizer` which * is invoked to produce the merged values of the destination and source * properties. If `customizer` returns `undefined`, merging is handled by the - * method instead. The `customizer` is invoked with seven arguments: + * method instead. The `customizer` is invoked with six arguments: * (objValue, srcValue, key, object, source, stack). * * **Note:** This method mutates `object`. @@ -26,18 +26,11 @@ var baseMerge = require('./_baseMerge'), * } * } * - * var object = { - * 'fruits': ['apple'], - * 'vegetables': ['beet'] - * }; - * - * var other = { - * 'fruits': ['banana'], - * 'vegetables': ['carrot'] - * }; + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; * * _.mergeWith(object, other, customizer); - * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } + * // => { 'a': [1, 3], 'b': [2, 4] } */ var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { baseMerge(object, source, srcIndex, customizer); diff --git a/node_modules/lodash/package/method.js b/node_modules/globule/node_modules/lodash/method.js similarity index 83% rename from node_modules/lodash/package/method.js rename to node_modules/globule/node_modules/lodash/method.js index 12bc4bf..23ec32d 100644 --- a/node_modules/lodash/package/method.js +++ b/node_modules/globule/node_modules/lodash/method.js @@ -1,5 +1,5 @@ var baseInvoke = require('./_baseInvoke'), - rest = require('./rest'); + baseRest = require('./_baseRest'); /** * Creates a function that invokes the method at `path` of a given object. @@ -11,7 +11,7 @@ var baseInvoke = require('./_baseInvoke'), * @category Util * @param {Array|string} path The path of the method to invoke. * @param {...*} [args] The arguments to invoke the method with. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new invoker function. * @example * * var objects = [ @@ -25,7 +25,7 @@ var baseInvoke = require('./_baseInvoke'), * _.map(objects, _.method(['a', 'b'])); * // => [2, 1] */ -var method = rest(function(path, args) { +var method = baseRest(function(path, args) { return function(object) { return baseInvoke(object, path, args); }; diff --git a/node_modules/lodash/package/methodOf.js b/node_modules/globule/node_modules/lodash/methodOf.js similarity index 84% rename from node_modules/lodash/package/methodOf.js rename to node_modules/globule/node_modules/lodash/methodOf.js index edac32f..df59b57 100644 --- a/node_modules/lodash/package/methodOf.js +++ b/node_modules/globule/node_modules/lodash/methodOf.js @@ -1,5 +1,5 @@ var baseInvoke = require('./_baseInvoke'), - rest = require('./rest'); + baseRest = require('./_baseRest'); /** * The opposite of `_.method`; this method creates a function that invokes @@ -12,7 +12,7 @@ var baseInvoke = require('./_baseInvoke'), * @category Util * @param {Object} object The object to query. * @param {...*} [args] The arguments to invoke the method with. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new invoker function. * @example * * var array = _.times(3, _.constant), @@ -24,7 +24,7 @@ var baseInvoke = require('./_baseInvoke'), * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); * // => [2, 0] */ -var methodOf = rest(function(object, args) { +var methodOf = baseRest(function(object, args) { return function(path) { return baseInvoke(object, path, args); }; diff --git a/node_modules/lodash/package/min.js b/node_modules/globule/node_modules/lodash/min.js similarity index 100% rename from node_modules/lodash/package/min.js rename to node_modules/globule/node_modules/lodash/min.js diff --git a/node_modules/lodash/package/minBy.js b/node_modules/globule/node_modules/lodash/minBy.js similarity index 84% rename from node_modules/lodash/package/minBy.js rename to node_modules/globule/node_modules/lodash/minBy.js index d580846..b2697e4 100644 --- a/node_modules/lodash/package/minBy.js +++ b/node_modules/globule/node_modules/lodash/minBy.js @@ -12,8 +12,7 @@ var baseExtremum = require('./_baseExtremum'), * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {*} Returns the minimum value. * @example * @@ -28,7 +27,7 @@ var baseExtremum = require('./_baseExtremum'), */ function minBy(array, iteratee) { return (array && array.length) - ? baseExtremum(array, baseIteratee(iteratee), baseLt) + ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt) : undefined; } diff --git a/node_modules/lodash/package/mixin.js b/node_modules/globule/node_modules/lodash/mixin.js similarity index 100% rename from node_modules/lodash/package/mixin.js rename to node_modules/globule/node_modules/lodash/mixin.js diff --git a/node_modules/lodash/package/multiply.js b/node_modules/globule/node_modules/lodash/multiply.js similarity index 98% rename from node_modules/lodash/package/multiply.js rename to node_modules/globule/node_modules/lodash/multiply.js index 57ba939..d7876e1 100644 --- a/node_modules/lodash/package/multiply.js +++ b/node_modules/globule/node_modules/lodash/multiply.js @@ -17,6 +17,6 @@ var createMathOperation = require('./_createMathOperation'); */ var multiply = createMathOperation(function(multiplier, multiplicand) { return multiplier * multiplicand; -}); +}, 1); module.exports = multiply; diff --git a/node_modules/lodash/package/negate.js b/node_modules/globule/node_modules/lodash/negate.js similarity index 61% rename from node_modules/lodash/package/negate.js rename to node_modules/globule/node_modules/lodash/negate.js index 2ad58d6..5a65cd1 100644 --- a/node_modules/lodash/package/negate.js +++ b/node_modules/globule/node_modules/lodash/negate.js @@ -1,4 +1,4 @@ -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** @@ -11,7 +11,7 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * @since 3.0.0 * @category Function * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new negated function. * @example * * function isEven(n) { @@ -26,7 +26,14 @@ function negate(predicate) { throw new TypeError(FUNC_ERROR_TEXT); } return function() { - return !predicate.apply(this, arguments); + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); }; } diff --git a/node_modules/lodash/package/next.js b/node_modules/globule/node_modules/lodash/next.js similarity index 100% rename from node_modules/lodash/package/next.js rename to node_modules/globule/node_modules/lodash/next.js diff --git a/node_modules/globule/node_modules/lodash/noop.js b/node_modules/globule/node_modules/lodash/noop.js new file mode 100644 index 0000000..3c0862e --- /dev/null +++ b/node_modules/globule/node_modules/lodash/noop.js @@ -0,0 +1,17 @@ +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +module.exports = noop; diff --git a/node_modules/lodash/package/now.js b/node_modules/globule/node_modules/lodash/now.js similarity index 81% rename from node_modules/lodash/package/now.js rename to node_modules/globule/node_modules/lodash/now.js index c065672..44a0562 100644 --- a/node_modules/lodash/package/now.js +++ b/node_modules/globule/node_modules/lodash/now.js @@ -1,3 +1,5 @@ +var root = require('./_root'); + /** * Gets the timestamp of the number of milliseconds that have elapsed since * the Unix epoch (1 January 1970 00:00:00 UTC). @@ -5,7 +7,6 @@ * @static * @memberOf _ * @since 2.4.0 - * @type {Function} * @category Date * @returns {number} Returns the timestamp. * @example @@ -13,8 +14,10 @@ * _.defer(function(stamp) { * console.log(_.now() - stamp); * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred function to be invoked. + * // => Logs the number of milliseconds it took for the deferred invocation. */ -var now = Date.now; +var now = function() { + return root.Date.now(); +}; module.exports = now; diff --git a/node_modules/lodash/package/nth.js b/node_modules/globule/node_modules/lodash/nth.js similarity index 83% rename from node_modules/lodash/package/nth.js rename to node_modules/globule/node_modules/lodash/nth.js index eed69e2..8a344de 100644 --- a/node_modules/lodash/package/nth.js +++ b/node_modules/globule/node_modules/lodash/nth.js @@ -2,8 +2,8 @@ var baseNth = require('./_baseNth'), toInteger = require('./toInteger'); /** - * Gets the nth element of `array`. If `n` is negative, the nth element - * from the end is returned. + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. * * @static * @memberOf _ diff --git a/node_modules/lodash/package/nthArg.js b/node_modules/globule/node_modules/lodash/nthArg.js similarity index 70% rename from node_modules/lodash/package/nthArg.js rename to node_modules/globule/node_modules/lodash/nthArg.js index 533747a..09406dd 100644 --- a/node_modules/lodash/package/nthArg.js +++ b/node_modules/globule/node_modules/lodash/nthArg.js @@ -1,9 +1,9 @@ var baseNth = require('./_baseNth'), - rest = require('./rest'), + baseRest = require('./_baseRest'), toInteger = require('./toInteger'); /** - * Creates a function that returns its nth argument. If `n` is negative, + * Creates a function that gets the argument at index `n`. If `n` is negative, * the nth argument from the end is returned. * * @static @@ -11,7 +11,7 @@ var baseNth = require('./_baseNth'), * @since 4.0.0 * @category Util * @param {number} [n=0] The index of the argument to return. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new pass-thru function. * @example * * var func = _.nthArg(1); @@ -24,7 +24,7 @@ var baseNth = require('./_baseNth'), */ function nthArg(n) { n = toInteger(n); - return rest(function(args) { + return baseRest(function(args) { return baseNth(args, n); }); } diff --git a/node_modules/lodash/package/number.js b/node_modules/globule/node_modules/lodash/number.js similarity index 100% rename from node_modules/lodash/package/number.js rename to node_modules/globule/node_modules/lodash/number.js diff --git a/node_modules/lodash/package/object.js b/node_modules/globule/node_modules/lodash/object.js similarity index 98% rename from node_modules/lodash/package/object.js rename to node_modules/globule/node_modules/lodash/object.js index d6f51c8..f046b05 100644 --- a/node_modules/lodash/package/object.js +++ b/node_modules/globule/node_modules/lodash/object.js @@ -3,6 +3,7 @@ module.exports = { 'assignIn': require('./assignIn'), 'assignInWith': require('./assignInWith'), 'assignWith': require('./assignWith'), + 'at': require('./at'), 'create': require('./create'), 'defaults': require('./defaults'), 'defaultsDeep': require('./defaultsDeep'), diff --git a/node_modules/lodash/package/omit.js b/node_modules/globule/node_modules/lodash/omit.js similarity index 83% rename from node_modules/lodash/package/omit.js rename to node_modules/globule/node_modules/lodash/omit.js index a19974d..38f9190 100644 --- a/node_modules/lodash/package/omit.js +++ b/node_modules/globule/node_modules/lodash/omit.js @@ -1,9 +1,8 @@ var arrayMap = require('./_arrayMap'), baseDifference = require('./_baseDifference'), - baseFlatten = require('./_baseFlatten'), basePick = require('./_basePick'), + flatRest = require('./_flatRest'), getAllKeysIn = require('./_getAllKeysIn'), - rest = require('./rest'), toKey = require('./_toKey'); /** @@ -25,11 +24,11 @@ var arrayMap = require('./_arrayMap'), * _.omit(object, ['a', 'c']); * // => { 'b': '2' } */ -var omit = rest(function(object, props) { +var omit = flatRest(function(object, props) { if (object == null) { return {}; } - props = arrayMap(baseFlatten(props, 1), toKey); + props = arrayMap(props, toKey); return basePick(object, baseDifference(getAllKeysIn(object), props)); }); diff --git a/node_modules/lodash/package/omitBy.js b/node_modules/globule/node_modules/lodash/omitBy.js similarity index 70% rename from node_modules/lodash/package/omitBy.js rename to node_modules/globule/node_modules/lodash/omitBy.js index 79505de..a064036 100644 --- a/node_modules/lodash/package/omitBy.js +++ b/node_modules/globule/node_modules/lodash/omitBy.js @@ -1,5 +1,6 @@ var baseIteratee = require('./_baseIteratee'), - basePickBy = require('./_basePickBy'); + negate = require('./negate'), + pickBy = require('./pickBy'); /** * The opposite of `_.pickBy`; this method creates an object composed of @@ -12,8 +13,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 4.0.0 * @category Object * @param {Object} object The source object. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per property. + * @param {Function} [predicate=_.identity] The function invoked per property. * @returns {Object} Returns the new object. * @example * @@ -23,10 +23,7 @@ var baseIteratee = require('./_baseIteratee'), * // => { 'b': '2' } */ function omitBy(object, predicate) { - predicate = baseIteratee(predicate); - return basePickBy(object, function(value, key) { - return !predicate(value, key); - }); + return pickBy(object, negate(baseIteratee(predicate))); } module.exports = omitBy; diff --git a/node_modules/lodash/package/once.js b/node_modules/globule/node_modules/lodash/once.js similarity index 92% rename from node_modules/lodash/package/once.js rename to node_modules/globule/node_modules/lodash/once.js index 4f66808..0706fc3 100644 --- a/node_modules/lodash/package/once.js +++ b/node_modules/globule/node_modules/lodash/once.js @@ -16,7 +16,7 @@ var before = require('./before'); * var initialize = _.once(createApplication); * initialize(); * initialize(); - * // `initialize` invokes `createApplication` once + * // => `createApplication` is invoked once */ function once(func) { return before(2, func); diff --git a/node_modules/lodash/package/orderBy.js b/node_modules/globule/node_modules/lodash/orderBy.js similarity index 100% rename from node_modules/lodash/package/orderBy.js rename to node_modules/globule/node_modules/lodash/orderBy.js diff --git a/node_modules/lodash/package/over.js b/node_modules/globule/node_modules/lodash/over.js similarity index 70% rename from node_modules/lodash/package/over.js rename to node_modules/globule/node_modules/lodash/over.js index 2275bf7..bea2f91 100644 --- a/node_modules/lodash/package/over.js +++ b/node_modules/globule/node_modules/lodash/over.js @@ -9,12 +9,12 @@ var arrayMap = require('./_arrayMap'), * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [iteratees=[_.identity]] The iteratees to invoke. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to invoke. * @returns {Function} Returns the new function. * @example * - * var func = _.over(Math.max, Math.min); + * var func = _.over([Math.max, Math.min]); * * func(1, 2, 3, 4); * // => [4, 1] diff --git a/node_modules/lodash/package/overArgs.js b/node_modules/globule/node_modules/lodash/overArgs.js similarity index 66% rename from node_modules/lodash/package/overArgs.js rename to node_modules/globule/node_modules/lodash/overArgs.js index d6a7467..f0067db 100644 --- a/node_modules/lodash/package/overArgs.js +++ b/node_modules/globule/node_modules/lodash/overArgs.js @@ -2,25 +2,24 @@ var apply = require('./_apply'), arrayMap = require('./_arrayMap'), baseFlatten = require('./_baseFlatten'), baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), baseUnary = require('./_baseUnary'), - isArray = require('./isArray'), - isFlattenableIteratee = require('./_isFlattenableIteratee'), - rest = require('./rest'); + castRest = require('./_castRest'), + isArray = require('./isArray'); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMin = Math.min; /** - * Creates a function that invokes `func` with arguments transformed by - * corresponding `transforms`. + * Creates a function that invokes `func` with its arguments transformed. * * @static * @since 4.0.0 * @memberOf _ * @category Function * @param {Function} func The function to wrap. - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [transforms[_.identity]] The functions to transform. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. * @returns {Function} Returns the new function. * @example * @@ -34,7 +33,7 @@ var nativeMin = Math.min; * * var func = _.overArgs(function(x, y) { * return [x, y]; - * }, square, doubled); + * }, [square, doubled]); * * func(9, 3); * // => [81, 6] @@ -42,13 +41,13 @@ var nativeMin = Math.min; * func(10, 5); * // => [100, 10] */ -var overArgs = rest(function(func, transforms) { +var overArgs = castRest(function(func, transforms) { transforms = (transforms.length == 1 && isArray(transforms[0])) ? arrayMap(transforms[0], baseUnary(baseIteratee)) - : arrayMap(baseFlatten(transforms, 1, isFlattenableIteratee), baseUnary(baseIteratee)); + : arrayMap(baseFlatten(transforms, 1), baseUnary(baseIteratee)); var funcsLength = transforms.length; - return rest(function(args) { + return baseRest(function(args) { var index = -1, length = nativeMin(args.length, funcsLength); diff --git a/node_modules/lodash/package/overEvery.js b/node_modules/globule/node_modules/lodash/overEvery.js similarity index 73% rename from node_modules/lodash/package/overEvery.js rename to node_modules/globule/node_modules/lodash/overEvery.js index 4ea596a..c115d15 100644 --- a/node_modules/lodash/package/overEvery.js +++ b/node_modules/globule/node_modules/lodash/overEvery.js @@ -9,12 +9,12 @@ var arrayEvery = require('./_arrayEvery'), * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [predicates=[_.identity]] The predicates to check. + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. * @returns {Function} Returns the new function. * @example * - * var func = _.overEvery(Boolean, isFinite); + * var func = _.overEvery([Boolean, isFinite]); * * func('1'); * // => true diff --git a/node_modules/lodash/package/overSome.js b/node_modules/globule/node_modules/lodash/overSome.js similarity index 73% rename from node_modules/lodash/package/overSome.js rename to node_modules/globule/node_modules/lodash/overSome.js index 55ff733..f902907 100644 --- a/node_modules/lodash/package/overSome.js +++ b/node_modules/globule/node_modules/lodash/overSome.js @@ -9,12 +9,12 @@ var arraySome = require('./_arraySome'), * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [predicates=[_.identity]] The predicates to check. + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. * @returns {Function} Returns the new function. * @example * - * var func = _.overSome(Boolean, isFinite); + * var func = _.overSome([Boolean, isFinite]); * * func('1'); * // => true diff --git a/node_modules/lodash/package/package.json b/node_modules/globule/node_modules/lodash/package.json similarity index 96% rename from node_modules/lodash/package/package.json rename to node_modules/globule/node_modules/lodash/package.json index 3e3177d..8945de6 100644 --- a/node_modules/lodash/package/package.json +++ b/node_modules/globule/node_modules/lodash/package.json @@ -1,6 +1,6 @@ { "name": "lodash", - "version": "4.11.2", + "version": "4.16.6", "description": "Lodash modular utilities.", "keywords": "modules, stdlib, util", "homepage": "https://lodash.com/", diff --git a/node_modules/lodash/package/pad.js b/node_modules/globule/node_modules/lodash/pad.js similarity index 100% rename from node_modules/lodash/package/pad.js rename to node_modules/globule/node_modules/lodash/pad.js diff --git a/node_modules/lodash/package/padEnd.js b/node_modules/globule/node_modules/lodash/padEnd.js similarity index 100% rename from node_modules/lodash/package/padEnd.js rename to node_modules/globule/node_modules/lodash/padEnd.js diff --git a/node_modules/lodash/package/padStart.js b/node_modules/globule/node_modules/lodash/padStart.js similarity index 100% rename from node_modules/lodash/package/padStart.js rename to node_modules/globule/node_modules/lodash/padStart.js diff --git a/node_modules/lodash/package/parseInt.js b/node_modules/globule/node_modules/lodash/parseInt.js similarity index 75% rename from node_modules/lodash/package/parseInt.js rename to node_modules/globule/node_modules/lodash/parseInt.js index fe140f6..82badf0 100644 --- a/node_modules/lodash/package/parseInt.js +++ b/node_modules/globule/node_modules/lodash/parseInt.js @@ -2,10 +2,7 @@ var root = require('./_root'), toString = require('./toString'); /** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect hexadecimal string values. */ -var reHasHexPrefix = /^0x/i; +var reTrimStart = /^\s+/; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeParseInt = root.parseInt; @@ -35,15 +32,12 @@ var nativeParseInt = root.parseInt; * // => [6, 8, 10] */ function parseInt(string, radix, guard) { - // Chrome fails to trim leading whitespace characters. - // See https://bugs.chromium.org/p/v8/issues/detail?id=3109 for more details. if (guard || radix == null) { radix = 0; } else if (radix) { radix = +radix; } - string = toString(string).replace(reTrim, ''); - return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10)); + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); } module.exports = parseInt; diff --git a/node_modules/lodash/package/partial.js b/node_modules/globule/node_modules/lodash/partial.js similarity index 70% rename from node_modules/lodash/package/partial.js rename to node_modules/globule/node_modules/lodash/partial.js index 149060e..85d6535 100644 --- a/node_modules/lodash/package/partial.js +++ b/node_modules/globule/node_modules/lodash/partial.js @@ -1,9 +1,9 @@ -var createWrapper = require('./_createWrapper'), - getPlaceholder = require('./_getPlaceholder'), - replaceHolders = require('./_replaceHolders'), - rest = require('./rest'); +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var PARTIAL_FLAG = 32; /** @@ -26,9 +26,9 @@ var PARTIAL_FLAG = 32; * @returns {Function} Returns the new partially applied function. * @example * - * var greet = function(greeting, name) { + * function greet(greeting, name) { * return greeting + ' ' + name; - * }; + * } * * var sayHelloTo = _.partial(greet, 'hello'); * sayHelloTo('fred'); @@ -39,9 +39,9 @@ var PARTIAL_FLAG = 32; * greetFred('hi'); * // => 'hi fred' */ -var partial = rest(function(func, partials) { - var holders = replaceHolders(partials, getPlaceholder(partial)); - return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders); +var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, PARTIAL_FLAG, undefined, partials, holders); }); // Assign default placeholders. diff --git a/node_modules/lodash/package/partialRight.js b/node_modules/globule/node_modules/lodash/partialRight.js similarity index 68% rename from node_modules/lodash/package/partialRight.js rename to node_modules/globule/node_modules/lodash/partialRight.js index 02d14b9..813aa57 100644 --- a/node_modules/lodash/package/partialRight.js +++ b/node_modules/globule/node_modules/lodash/partialRight.js @@ -1,9 +1,9 @@ -var createWrapper = require('./_createWrapper'), - getPlaceholder = require('./_getPlaceholder'), - replaceHolders = require('./_replaceHolders'), - rest = require('./rest'); +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var PARTIAL_RIGHT_FLAG = 64; /** @@ -25,9 +25,9 @@ var PARTIAL_RIGHT_FLAG = 64; * @returns {Function} Returns the new partially applied function. * @example * - * var greet = function(greeting, name) { + * function greet(greeting, name) { * return greeting + ' ' + name; - * }; + * } * * var greetFred = _.partialRight(greet, 'fred'); * greetFred('hi'); @@ -38,9 +38,9 @@ var PARTIAL_RIGHT_FLAG = 64; * sayHelloTo('fred'); * // => 'hello fred' */ -var partialRight = rest(function(func, partials) { - var holders = replaceHolders(partials, getPlaceholder(partialRight)); - return createWrapper(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders); +var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders); }); // Assign default placeholders. diff --git a/node_modules/lodash/package/partition.js b/node_modules/globule/node_modules/lodash/partition.js similarity index 93% rename from node_modules/lodash/package/partition.js rename to node_modules/globule/node_modules/lodash/partition.js index 2e30e8b..6b814a9 100644 --- a/node_modules/lodash/package/partition.js +++ b/node_modules/globule/node_modules/lodash/partition.js @@ -11,8 +11,7 @@ var createAggregator = require('./_createAggregator'); * @since 3.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the array of grouped elements. * @example * diff --git a/node_modules/lodash/package/pick.js b/node_modules/globule/node_modules/lodash/pick.js similarity index 73% rename from node_modules/lodash/package/pick.js rename to node_modules/globule/node_modules/lodash/pick.js index 2812586..a631b15 100644 --- a/node_modules/lodash/package/pick.js +++ b/node_modules/globule/node_modules/lodash/pick.js @@ -1,7 +1,6 @@ var arrayMap = require('./_arrayMap'), - baseFlatten = require('./_baseFlatten'), basePick = require('./_basePick'), - rest = require('./rest'), + flatRest = require('./_flatRest'), toKey = require('./_toKey'); /** @@ -21,8 +20,8 @@ var arrayMap = require('./_arrayMap'), * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ -var pick = rest(function(object, props) { - return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey)); +var pick = flatRest(function(object, props) { + return object == null ? {} : basePick(object, arrayMap(props, toKey)); }); module.exports = pick; diff --git a/node_modules/lodash/package/pickBy.js b/node_modules/globule/node_modules/lodash/pickBy.js similarity index 67% rename from node_modules/lodash/package/pickBy.js rename to node_modules/globule/node_modules/lodash/pickBy.js index d355442..6e9e193 100644 --- a/node_modules/lodash/package/pickBy.js +++ b/node_modules/globule/node_modules/lodash/pickBy.js @@ -1,5 +1,6 @@ var baseIteratee = require('./_baseIteratee'), - basePickBy = require('./_basePickBy'); + basePickBy = require('./_basePickBy'), + getAllKeysIn = require('./_getAllKeysIn'); /** * Creates an object composed of the `object` properties `predicate` returns @@ -10,8 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 4.0.0 * @category Object * @param {Object} object The source object. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per property. + * @param {Function} [predicate=_.identity] The function invoked per property. * @returns {Object} Returns the new object. * @example * @@ -21,7 +21,7 @@ var baseIteratee = require('./_baseIteratee'), * // => { 'a': 1, 'c': 3 } */ function pickBy(object, predicate) { - return object == null ? {} : basePickBy(object, baseIteratee(predicate)); + return object == null ? {} : basePickBy(object, getAllKeysIn(object), baseIteratee(predicate)); } module.exports = pickBy; diff --git a/node_modules/lodash/package/plant.js b/node_modules/globule/node_modules/lodash/plant.js similarity index 100% rename from node_modules/lodash/package/plant.js rename to node_modules/globule/node_modules/lodash/plant.js diff --git a/node_modules/lodash/package/property.js b/node_modules/globule/node_modules/lodash/property.js similarity index 92% rename from node_modules/lodash/package/property.js rename to node_modules/globule/node_modules/lodash/property.js index 9843dc0..ca8202f 100644 --- a/node_modules/lodash/package/property.js +++ b/node_modules/globule/node_modules/lodash/property.js @@ -11,7 +11,7 @@ var baseProperty = require('./_baseProperty'), * @since 2.4.0 * @category Util * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. * @example * * var objects = [ diff --git a/node_modules/lodash/package/propertyOf.js b/node_modules/globule/node_modules/lodash/propertyOf.js similarity index 92% rename from node_modules/lodash/package/propertyOf.js rename to node_modules/globule/node_modules/lodash/propertyOf.js index 13bdbbb..384044d 100644 --- a/node_modules/lodash/package/propertyOf.js +++ b/node_modules/globule/node_modules/lodash/propertyOf.js @@ -9,7 +9,7 @@ var baseGet = require('./_baseGet'); * @since 3.0.0 * @category Util * @param {Object} object The object to query. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. * @example * * var array = [0, 1, 2], diff --git a/node_modules/lodash/package/pull.js b/node_modules/globule/node_modules/lodash/pull.js similarity index 65% rename from node_modules/lodash/package/pull.js rename to node_modules/globule/node_modules/lodash/pull.js index f5846fb..a2efcb5 100644 --- a/node_modules/lodash/package/pull.js +++ b/node_modules/globule/node_modules/lodash/pull.js @@ -1,9 +1,9 @@ -var pullAll = require('./pullAll'), - rest = require('./rest'); +var baseRest = require('./_baseRest'), + pullAll = require('./pullAll'); /** * Removes all given values from `array` using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` @@ -18,12 +18,12 @@ var pullAll = require('./pullAll'), * @returns {Array} Returns `array`. * @example * - * var array = [1, 2, 3, 1, 2, 3]; + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; * - * _.pull(array, 2, 3); + * _.pull(array, 'a', 'c'); * console.log(array); - * // => [1, 1] + * // => ['b', 'b'] */ -var pull = rest(pullAll); +var pull = baseRest(pullAll); module.exports = pull; diff --git a/node_modules/lodash/package/pullAll.js b/node_modules/globule/node_modules/lodash/pullAll.js similarity index 85% rename from node_modules/lodash/package/pullAll.js rename to node_modules/globule/node_modules/lodash/pullAll.js index d6ce1bf..f4605c2 100644 --- a/node_modules/lodash/package/pullAll.js +++ b/node_modules/globule/node_modules/lodash/pullAll.js @@ -14,11 +14,11 @@ var basePullAll = require('./_basePullAll'); * @returns {Array} Returns `array`. * @example * - * var array = [1, 2, 3, 1, 2, 3]; + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; * - * _.pullAll(array, [2, 3]); + * _.pullAll(array, ['a', 'c']); * console.log(array); - * // => [1, 1] + * // => ['b', 'b'] */ function pullAll(array, values) { return (array && array.length && values && values.length) diff --git a/node_modules/lodash/package/pullAllBy.js b/node_modules/globule/node_modules/lodash/pullAllBy.js similarity index 85% rename from node_modules/lodash/package/pullAllBy.js rename to node_modules/globule/node_modules/lodash/pullAllBy.js index 7192650..74025e8 100644 --- a/node_modules/lodash/package/pullAllBy.js +++ b/node_modules/globule/node_modules/lodash/pullAllBy.js @@ -14,8 +14,7 @@ var baseIteratee = require('./_baseIteratee'), * @category Array * @param {Array} array The array to modify. * @param {Array} values The values to remove. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns `array`. * @example * @@ -27,7 +26,7 @@ var baseIteratee = require('./_baseIteratee'), */ function pullAllBy(array, values, iteratee) { return (array && array.length && values && values.length) - ? basePullAll(array, values, baseIteratee(iteratee)) + ? basePullAll(array, values, baseIteratee(iteratee, 2)) : array; } diff --git a/node_modules/lodash/package/pullAllWith.js b/node_modules/globule/node_modules/lodash/pullAllWith.js similarity index 100% rename from node_modules/lodash/package/pullAllWith.js rename to node_modules/globule/node_modules/lodash/pullAllWith.js diff --git a/node_modules/lodash/package/pullAt.js b/node_modules/globule/node_modules/lodash/pullAt.js similarity index 70% rename from node_modules/lodash/package/pullAt.js rename to node_modules/globule/node_modules/lodash/pullAt.js index 565d2b1..6ed84e0 100644 --- a/node_modules/lodash/package/pullAt.js +++ b/node_modules/globule/node_modules/lodash/pullAt.js @@ -1,10 +1,9 @@ var arrayMap = require('./_arrayMap'), baseAt = require('./_baseAt'), - baseFlatten = require('./_baseFlatten'), basePullAt = require('./_basePullAt'), compareAscending = require('./_compareAscending'), - isIndex = require('./_isIndex'), - rest = require('./rest'); + flatRest = require('./_flatRest'), + isIndex = require('./_isIndex'); /** * Removes elements from `array` corresponding to `indexes` and returns an @@ -21,19 +20,17 @@ var arrayMap = require('./_arrayMap'), * @returns {Array} Returns the new array of removed elements. * @example * - * var array = [5, 10, 15, 20]; - * var evens = _.pullAt(array, 1, 3); + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); * * console.log(array); - * // => [5, 15] + * // => ['a', 'c'] * - * console.log(evens); - * // => [10, 20] + * console.log(pulled); + * // => ['b', 'd'] */ -var pullAt = rest(function(array, indexes) { - indexes = baseFlatten(indexes, 1); - - var length = array ? array.length : 0, +var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, result = baseAt(array, indexes); basePullAt(array, arrayMap(indexes, function(index) { diff --git a/node_modules/lodash/package/random.js b/node_modules/globule/node_modules/lodash/random.js similarity index 95% rename from node_modules/lodash/package/random.js rename to node_modules/globule/node_modules/lodash/random.js index 22e9259..8067711 100644 --- a/node_modules/lodash/package/random.js +++ b/node_modules/globule/node_modules/lodash/random.js @@ -1,6 +1,6 @@ var baseRandom = require('./_baseRandom'), isIterateeCall = require('./_isIterateeCall'), - toNumber = require('./toNumber'); + toFinite = require('./toFinite'); /** Built-in method references without a dependency on `root`. */ var freeParseFloat = parseFloat; @@ -59,12 +59,12 @@ function random(lower, upper, floating) { upper = 1; } else { - lower = toNumber(lower) || 0; + lower = toFinite(lower); if (upper === undefined) { upper = lower; lower = 0; } else { - upper = toNumber(upper) || 0; + upper = toFinite(upper); } } if (lower > upper) { diff --git a/node_modules/lodash/package/range.js b/node_modules/globule/node_modules/lodash/range.js similarity index 95% rename from node_modules/lodash/package/range.js rename to node_modules/globule/node_modules/lodash/range.js index 2d6b1bb..fa63b09 100644 --- a/node_modules/lodash/package/range.js +++ b/node_modules/globule/node_modules/lodash/range.js @@ -16,7 +16,7 @@ var createRange = require('./_createRange'); * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. * @see _.inRange, _.rangeRight * @example * diff --git a/node_modules/lodash/package/rangeRight.js b/node_modules/globule/node_modules/lodash/rangeRight.js similarity index 93% rename from node_modules/lodash/package/rangeRight.js rename to node_modules/globule/node_modules/lodash/rangeRight.js index ba6fc99..271fafc 100644 --- a/node_modules/lodash/package/rangeRight.js +++ b/node_modules/globule/node_modules/lodash/rangeRight.js @@ -11,7 +11,7 @@ var createRange = require('./_createRange'); * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. * @see _.inRange, _.range * @example * diff --git a/node_modules/lodash/package/rearg.js b/node_modules/globule/node_modules/lodash/rearg.js similarity index 68% rename from node_modules/lodash/package/rearg.js rename to node_modules/globule/node_modules/lodash/rearg.js index 6648ec8..4df6989 100644 --- a/node_modules/lodash/package/rearg.js +++ b/node_modules/globule/node_modules/lodash/rearg.js @@ -1,8 +1,7 @@ -var baseFlatten = require('./_baseFlatten'), - createWrapper = require('./_createWrapper'), - rest = require('./rest'); +var createWrap = require('./_createWrap'), + flatRest = require('./_flatRest'); -/** Used to compose bitmasks for wrapper metadata. */ +/** Used to compose bitmasks for function metadata. */ var REARG_FLAG = 256; /** @@ -22,13 +21,13 @@ var REARG_FLAG = 256; * * var rearged = _.rearg(function(a, b, c) { * return [a, b, c]; - * }, 2, 0, 1); + * }, [2, 0, 1]); * * rearged('b', 'c', 'a') * // => ['a', 'b', 'c'] */ -var rearg = rest(function(func, indexes) { - return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes, 1)); +var rearg = flatRest(function(func, indexes) { + return createWrap(func, REARG_FLAG, undefined, undefined, undefined, indexes); }); module.exports = rearg; diff --git a/node_modules/lodash/package/reduce.js b/node_modules/globule/node_modules/lodash/reduce.js similarity index 100% rename from node_modules/lodash/package/reduce.js rename to node_modules/globule/node_modules/lodash/reduce.js diff --git a/node_modules/lodash/package/reduceRight.js b/node_modules/globule/node_modules/lodash/reduceRight.js similarity index 100% rename from node_modules/lodash/package/reduceRight.js rename to node_modules/globule/node_modules/lodash/reduceRight.js diff --git a/node_modules/lodash/package/reject.js b/node_modules/globule/node_modules/lodash/reject.js similarity index 80% rename from node_modules/lodash/package/reject.js rename to node_modules/globule/node_modules/lodash/reject.js index 4ed47b3..a13e554 100644 --- a/node_modules/lodash/package/reject.js +++ b/node_modules/globule/node_modules/lodash/reject.js @@ -1,7 +1,8 @@ var arrayFilter = require('./_arrayFilter'), baseFilter = require('./_baseFilter'), baseIteratee = require('./_baseIteratee'), - isArray = require('./isArray'); + isArray = require('./isArray'), + negate = require('./negate'); /** * The opposite of `_.filter`; this method returns the elements of `collection` @@ -12,8 +13,7 @@ var arrayFilter = require('./_arrayFilter'), * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.filter * @example @@ -40,10 +40,7 @@ var arrayFilter = require('./_arrayFilter'), */ function reject(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; - predicate = baseIteratee(predicate, 3); - return func(collection, function(value, index, collection) { - return !predicate(value, index, collection); - }); + return func(collection, negate(baseIteratee(predicate, 3))); } module.exports = reject; diff --git a/node_modules/lodash/package/remove.js b/node_modules/globule/node_modules/lodash/remove.js similarity index 92% rename from node_modules/lodash/package/remove.js rename to node_modules/globule/node_modules/lodash/remove.js index ef3d681..87b1898 100644 --- a/node_modules/lodash/package/remove.js +++ b/node_modules/globule/node_modules/lodash/remove.js @@ -14,8 +14,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 2.0.0 * @category Array * @param {Array} array The array to modify. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new array of removed elements. * @example * diff --git a/node_modules/lodash/package/repeat.js b/node_modules/globule/node_modules/lodash/repeat.js similarity index 100% rename from node_modules/lodash/package/repeat.js rename to node_modules/globule/node_modules/lodash/repeat.js diff --git a/node_modules/lodash/package/replace.js b/node_modules/globule/node_modules/lodash/replace.js similarity index 69% rename from node_modules/lodash/package/replace.js rename to node_modules/globule/node_modules/lodash/replace.js index 1d113e7..6e26ecd 100644 --- a/node_modules/lodash/package/replace.js +++ b/node_modules/globule/node_modules/lodash/replace.js @@ -1,11 +1,5 @@ var toString = require('./toString'); -/** Used for built-in method references. */ -var stringProto = String.prototype; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeReplace = stringProto.replace; - /** * Replaces matches for `pattern` in `string` with `replacement`. * @@ -29,7 +23,7 @@ function replace() { var args = arguments, string = toString(args[0]); - return args.length < 3 ? string : nativeReplace.call(string, args[1], args[2]); + return args.length < 3 ? string : string.replace(args[1], args[2]); } module.exports = replace; diff --git a/node_modules/lodash/package/rest.js b/node_modules/globule/node_modules/lodash/rest.js similarity index 52% rename from node_modules/lodash/package/rest.js rename to node_modules/globule/node_modules/lodash/rest.js index ddb7326..eaaad00 100644 --- a/node_modules/lodash/package/rest.js +++ b/node_modules/globule/node_modules/lodash/rest.js @@ -1,12 +1,9 @@ -var apply = require('./_apply'), +var baseRest = require('./_baseRest'), toInteger = require('./toInteger'); -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - /** * Creates a function that invokes `func` with the `this` binding of the * created function and arguments from `start` and beyond provided as @@ -36,29 +33,8 @@ function rest(func, start) { if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } - start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - switch (start) { - case 0: return func.call(this, array); - case 1: return func.call(this, args[0], array); - case 2: return func.call(this, args[0], args[1], array); - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = array; - return apply(func, this, otherArgs); - }; + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); } module.exports = rest; diff --git a/node_modules/lodash/package/result.js b/node_modules/globule/node_modules/lodash/result.js similarity index 100% rename from node_modules/lodash/package/result.js rename to node_modules/globule/node_modules/lodash/result.js diff --git a/node_modules/lodash/package/reverse.js b/node_modules/globule/node_modules/lodash/reverse.js similarity index 92% rename from node_modules/lodash/package/reverse.js rename to node_modules/globule/node_modules/lodash/reverse.js index d566997..21764af 100644 --- a/node_modules/lodash/package/reverse.js +++ b/node_modules/globule/node_modules/lodash/reverse.js @@ -28,7 +28,7 @@ var nativeReverse = arrayProto.reverse; * // => [3, 2, 1] */ function reverse(array) { - return array ? nativeReverse.call(array) : array; + return array == null ? array : nativeReverse.call(array); } module.exports = reverse; diff --git a/node_modules/lodash/package/round.js b/node_modules/globule/node_modules/lodash/round.js similarity index 100% rename from node_modules/lodash/package/round.js rename to node_modules/globule/node_modules/lodash/round.js diff --git a/node_modules/lodash/package/sample.js b/node_modules/globule/node_modules/lodash/sample.js similarity index 53% rename from node_modules/lodash/package/sample.js rename to node_modules/globule/node_modules/lodash/sample.js index aff8e77..39c3560 100644 --- a/node_modules/lodash/package/sample.js +++ b/node_modules/globule/node_modules/lodash/sample.js @@ -1,6 +1,6 @@ -var baseRandom = require('./_baseRandom'), - isArrayLike = require('./isArrayLike'), - values = require('./values'); +var arraySample = require('./_arraySample'), + baseSample = require('./_baseSample'), + isArray = require('./isArray'); /** * Gets a random element from `collection`. @@ -17,10 +17,8 @@ var baseRandom = require('./_baseRandom'), * // => 2 */ function sample(collection) { - var array = isArrayLike(collection) ? collection : values(collection), - length = array.length; - - return length > 0 ? array[baseRandom(0, length - 1)] : undefined; + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); } module.exports = sample; diff --git a/node_modules/lodash/package/sampleSize.js b/node_modules/globule/node_modules/lodash/sampleSize.js similarity index 62% rename from node_modules/lodash/package/sampleSize.js rename to node_modules/globule/node_modules/lodash/sampleSize.js index 29df2e6..a303686 100644 --- a/node_modules/lodash/package/sampleSize.js +++ b/node_modules/globule/node_modules/lodash/sampleSize.js @@ -1,7 +1,7 @@ -var baseClamp = require('./_baseClamp'), - baseRandom = require('./_baseRandom'), +var arraySampleSize = require('./_arraySampleSize'), + baseSampleSize = require('./_baseSampleSize'), + isArray = require('./isArray'), isIterateeCall = require('./_isIterateeCall'), - toArray = require('./toArray'), toInteger = require('./toInteger'); /** @@ -25,25 +25,13 @@ var baseClamp = require('./_baseClamp'), * // => [2, 3, 1] */ function sampleSize(collection, n, guard) { - var index = -1, - result = toArray(collection), - length = result.length, - lastIndex = length - 1; - if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { n = 1; } else { - n = baseClamp(toInteger(n), 0, length); - } - while (++index < n) { - var rand = baseRandom(index, lastIndex), - value = result[rand]; - - result[rand] = result[index]; - result[index] = value; + n = toInteger(n); } - result.length = n; - return result; + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); } module.exports = sampleSize; diff --git a/node_modules/lodash/package/seq.js b/node_modules/globule/node_modules/lodash/seq.js similarity index 100% rename from node_modules/lodash/package/seq.js rename to node_modules/globule/node_modules/lodash/seq.js diff --git a/node_modules/lodash/package/set.js b/node_modules/globule/node_modules/lodash/set.js similarity index 100% rename from node_modules/lodash/package/set.js rename to node_modules/globule/node_modules/lodash/set.js diff --git a/node_modules/lodash/package/setWith.js b/node_modules/globule/node_modules/lodash/setWith.js similarity index 100% rename from node_modules/lodash/package/setWith.js rename to node_modules/globule/node_modules/lodash/setWith.js diff --git a/node_modules/lodash/package/shuffle.js b/node_modules/globule/node_modules/lodash/shuffle.js similarity index 67% rename from node_modules/lodash/package/shuffle.js rename to node_modules/globule/node_modules/lodash/shuffle.js index 88d00ce..2b72da7 100644 --- a/node_modules/lodash/package/shuffle.js +++ b/node_modules/globule/node_modules/lodash/shuffle.js @@ -1,7 +1,6 @@ -var sampleSize = require('./sampleSize'); - -/** Used as references for the maximum length and index of an array. */ -var MAX_ARRAY_LENGTH = 4294967295; +var arrayShuffle = require('./_arrayShuffle'), + baseShuffle = require('./_baseShuffle'), + isArray = require('./isArray'); /** * Creates an array of shuffled values, using a version of the @@ -19,7 +18,8 @@ var MAX_ARRAY_LENGTH = 4294967295; * // => [4, 1, 3, 2] */ function shuffle(collection) { - return sampleSize(collection, MAX_ARRAY_LENGTH); + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); } module.exports = shuffle; diff --git a/node_modules/lodash/package/size.js b/node_modules/globule/node_modules/lodash/size.js similarity index 62% rename from node_modules/lodash/package/size.js rename to node_modules/globule/node_modules/lodash/size.js index 2e414ab..3561fc1 100644 --- a/node_modules/lodash/package/size.js +++ b/node_modules/globule/node_modules/lodash/size.js @@ -1,8 +1,7 @@ -var getTag = require('./_getTag'), +var baseKeys = require('./_baseKeys'), + getTag = require('./_getTag'), isArrayLike = require('./isArrayLike'), - isObjectLike = require('./isObjectLike'), isString = require('./isString'), - keys = require('./keys'), stringSize = require('./_stringSize'); /** `Object#toString` result references. */ @@ -17,7 +16,7 @@ var mapTag = '[object Map]', * @memberOf _ * @since 0.1.0 * @category Collection - * @param {Array|Object} collection The collection to inspect. + * @param {Array|Object|string} collection The collection to inspect. * @returns {number} Returns the collection size. * @example * @@ -35,16 +34,13 @@ function size(collection) { return 0; } if (isArrayLike(collection)) { - var result = collection.length; - return (result && isString(collection)) ? stringSize(collection) : result; + return isString(collection) ? stringSize(collection) : collection.length; } - if (isObjectLike(collection)) { - var tag = getTag(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; } - return keys(collection).length; + return baseKeys(collection).length; } module.exports = size; diff --git a/node_modules/lodash/package/slice.js b/node_modules/globule/node_modules/lodash/slice.js similarity index 95% rename from node_modules/lodash/package/slice.js rename to node_modules/globule/node_modules/lodash/slice.js index ac8cb75..f732442 100644 --- a/node_modules/lodash/package/slice.js +++ b/node_modules/globule/node_modules/lodash/slice.js @@ -19,7 +19,7 @@ var baseSlice = require('./_baseSlice'), * @returns {Array} Returns the slice of `array`. */ function slice(array, start, end) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } diff --git a/node_modules/lodash/package/snakeCase.js b/node_modules/globule/node_modules/lodash/snakeCase.js similarity index 100% rename from node_modules/lodash/package/snakeCase.js rename to node_modules/globule/node_modules/lodash/snakeCase.js diff --git a/node_modules/lodash/package/some.js b/node_modules/globule/node_modules/lodash/some.js similarity index 93% rename from node_modules/lodash/package/some.js rename to node_modules/globule/node_modules/lodash/some.js index eeb7c18..9c1d08c 100644 --- a/node_modules/lodash/package/some.js +++ b/node_modules/globule/node_modules/lodash/some.js @@ -14,8 +14,7 @@ var arraySome = require('./_arraySome'), * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. diff --git a/node_modules/lodash/package/sortBy.js b/node_modules/globule/node_modules/lodash/sortBy.js similarity index 62% rename from node_modules/lodash/package/sortBy.js rename to node_modules/globule/node_modules/lodash/sortBy.js index c6d40bb..4ba8f7a 100644 --- a/node_modules/lodash/package/sortBy.js +++ b/node_modules/globule/node_modules/lodash/sortBy.js @@ -1,9 +1,7 @@ var baseFlatten = require('./_baseFlatten'), baseOrderBy = require('./_baseOrderBy'), - isArray = require('./isArray'), - isFlattenableIteratee = require('./_isFlattenableIteratee'), - isIterateeCall = require('./_isIterateeCall'), - rest = require('./rest'); + baseRest = require('./_baseRest'), + isIterateeCall = require('./_isIterateeCall'); /** * Creates an array of elements, sorted in ascending order by the results of @@ -16,8 +14,8 @@ var baseFlatten = require('./_baseFlatten'), * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [iteratees=[_.identity]] The iteratees to sort by. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. * @returns {Array} Returns the new sorted array. * @example * @@ -28,18 +26,13 @@ var baseFlatten = require('./_baseFlatten'), * { 'user': 'barney', 'age': 34 } * ]; * - * _.sortBy(users, function(o) { return o.user; }); + * _.sortBy(users, [function(o) { return o.user; }]); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] * * _.sortBy(users, ['user', 'age']); * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] - * - * _.sortBy(users, 'user', function(o) { - * return Math.floor(o.age / 10); - * }); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] */ -var sortBy = rest(function(collection, iteratees) { +var sortBy = baseRest(function(collection, iteratees) { if (collection == null) { return []; } @@ -49,11 +42,7 @@ var sortBy = rest(function(collection, iteratees) { } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { iteratees = [iteratees[0]]; } - iteratees = (iteratees.length == 1 && isArray(iteratees[0])) - ? iteratees[0] - : baseFlatten(iteratees, 1, isFlattenableIteratee); - - return baseOrderBy(collection, iteratees, []); + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); }); module.exports = sortBy; diff --git a/node_modules/lodash/package/sortedIndex.js b/node_modules/globule/node_modules/lodash/sortedIndex.js similarity index 93% rename from node_modules/lodash/package/sortedIndex.js rename to node_modules/globule/node_modules/lodash/sortedIndex.js index 044a57e..e763473 100644 --- a/node_modules/lodash/package/sortedIndex.js +++ b/node_modules/globule/node_modules/lodash/sortedIndex.js @@ -16,9 +16,6 @@ var baseSortedIndex = require('./_baseSortedIndex'); * * _.sortedIndex([30, 50], 40); * // => 1 - * - * _.sortedIndex([4, 5], 4); - * // => 0 */ function sortedIndex(array, value) { return baseSortedIndex(array, value); diff --git a/node_modules/lodash/package/sortedIndexBy.js b/node_modules/globule/node_modules/lodash/sortedIndexBy.js similarity index 66% rename from node_modules/lodash/package/sortedIndexBy.js rename to node_modules/globule/node_modules/lodash/sortedIndexBy.js index df05972..945f23c 100644 --- a/node_modules/lodash/package/sortedIndexBy.js +++ b/node_modules/globule/node_modules/lodash/sortedIndexBy.js @@ -12,23 +12,22 @@ var baseIteratee = require('./_baseIteratee'), * @category Array * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the index at which `value` should be inserted * into `array`. * @example * - * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 }; + * var objects = [{ 'x': 4 }, { 'x': 5 }]; * - * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict)); - * // => 1 + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 * * // The `_.property` iteratee shorthand. - * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); * // => 0 */ function sortedIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, baseIteratee(iteratee)); + return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2)); } module.exports = sortedIndexBy; diff --git a/node_modules/lodash/package/sortedIndexOf.js b/node_modules/globule/node_modules/lodash/sortedIndexOf.js similarity index 80% rename from node_modules/lodash/package/sortedIndexOf.js rename to node_modules/globule/node_modules/lodash/sortedIndexOf.js index 2c534d3..e2d3b7a 100644 --- a/node_modules/lodash/package/sortedIndexOf.js +++ b/node_modules/globule/node_modules/lodash/sortedIndexOf.js @@ -9,16 +9,16 @@ var baseSortedIndex = require('./_baseSortedIndex'), * @memberOf _ * @since 4.0.0 * @category Array - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @returns {number} Returns the index of the matched value, else `-1`. * @example * - * _.sortedIndexOf([1, 1, 2, 2], 2); - * // => 2 + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 */ function sortedIndexOf(array, value) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (length) { var index = baseSortedIndex(array, value); if (index < length && eq(array[index], value)) { diff --git a/node_modules/lodash/package/sortedLastIndex.js b/node_modules/globule/node_modules/lodash/sortedLastIndex.js similarity index 92% rename from node_modules/lodash/package/sortedLastIndex.js rename to node_modules/globule/node_modules/lodash/sortedLastIndex.js index 919089f..9380cb9 100644 --- a/node_modules/lodash/package/sortedLastIndex.js +++ b/node_modules/globule/node_modules/lodash/sortedLastIndex.js @@ -15,8 +15,8 @@ var baseSortedIndex = require('./_baseSortedIndex'); * into `array`. * @example * - * _.sortedLastIndex([4, 5], 4); - * // => 1 + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 */ function sortedLastIndex(array, value) { return baseSortedIndex(array, value, true); diff --git a/node_modules/lodash/package/sortedLastIndexBy.js b/node_modules/globule/node_modules/lodash/sortedLastIndexBy.js similarity index 69% rename from node_modules/lodash/package/sortedLastIndexBy.js rename to node_modules/globule/node_modules/lodash/sortedLastIndexBy.js index 74e8d7a..9225eeb 100644 --- a/node_modules/lodash/package/sortedLastIndexBy.js +++ b/node_modules/globule/node_modules/lodash/sortedLastIndexBy.js @@ -12,18 +12,22 @@ var baseIteratee = require('./_baseIteratee'), * @category Array * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the index at which `value` should be inserted * into `array`. * @example * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * * // The `_.property` iteratee shorthand. - * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); * // => 1 */ function sortedLastIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, baseIteratee(iteratee), true); + return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2), true); } module.exports = sortedLastIndexBy; diff --git a/node_modules/lodash/package/sortedLastIndexOf.js b/node_modules/globule/node_modules/lodash/sortedLastIndexOf.js similarity index 81% rename from node_modules/lodash/package/sortedLastIndexOf.js rename to node_modules/globule/node_modules/lodash/sortedLastIndexOf.js index 80234de..18bc4c5 100644 --- a/node_modules/lodash/package/sortedLastIndexOf.js +++ b/node_modules/globule/node_modules/lodash/sortedLastIndexOf.js @@ -9,16 +9,16 @@ var baseSortedIndex = require('./_baseSortedIndex'), * @memberOf _ * @since 4.0.0 * @category Array - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @returns {number} Returns the index of the matched value, else `-1`. * @example * - * _.sortedLastIndexOf([1, 1, 2, 2], 2); + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); * // => 3 */ function sortedLastIndexOf(array, value) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (length) { var index = baseSortedIndex(array, value, true) - 1; if (eq(array[index], value)) { diff --git a/node_modules/lodash/package/sortedUniq.js b/node_modules/globule/node_modules/lodash/sortedUniq.js similarity index 100% rename from node_modules/lodash/package/sortedUniq.js rename to node_modules/globule/node_modules/lodash/sortedUniq.js diff --git a/node_modules/lodash/package/sortedUniqBy.js b/node_modules/globule/node_modules/lodash/sortedUniqBy.js similarity index 92% rename from node_modules/lodash/package/sortedUniqBy.js rename to node_modules/globule/node_modules/lodash/sortedUniqBy.js index 1cbdeaf..4f05ebe 100644 --- a/node_modules/lodash/package/sortedUniqBy.js +++ b/node_modules/globule/node_modules/lodash/sortedUniqBy.js @@ -19,7 +19,7 @@ var baseIteratee = require('./_baseIteratee'), */ function sortedUniqBy(array, iteratee) { return (array && array.length) - ? baseSortedUniq(array, baseIteratee(iteratee)) + ? baseSortedUniq(array, baseIteratee(iteratee, 2)) : []; } diff --git a/node_modules/lodash/package/split.js b/node_modules/globule/node_modules/lodash/split.js similarity index 75% rename from node_modules/lodash/package/split.js rename to node_modules/globule/node_modules/lodash/split.js index 2ed4015..956b48a 100644 --- a/node_modules/lodash/package/split.js +++ b/node_modules/globule/node_modules/lodash/split.js @@ -1,20 +1,14 @@ var baseToString = require('./_baseToString'), castSlice = require('./_castSlice'), + hasUnicode = require('./_hasUnicode'), isIterateeCall = require('./_isIterateeCall'), isRegExp = require('./isRegExp'), - reHasComplexSymbol = require('./_reHasComplexSymbol'), stringToArray = require('./_stringToArray'), toString = require('./toString'); /** Used as references for the maximum length and index of an array. */ var MAX_ARRAY_LENGTH = 4294967295; -/** Used for built-in method references. */ -var stringProto = String.prototype; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeSplit = stringProto.split; - /** * Splits `string` by `separator`. * @@ -28,7 +22,7 @@ var nativeSplit = stringProto.split; * @param {string} [string=''] The string to split. * @param {RegExp|string} separator The separator pattern to split by. * @param {number} [limit] The length to truncate results to. - * @returns {Array} Returns the new array of string segments. + * @returns {Array} Returns the string segments. * @example * * _.split('a-b-c', '-', 2); @@ -48,11 +42,11 @@ function split(string, separator, limit) { (separator != null && !isRegExp(separator)) )) { separator = baseToString(separator); - if (separator == '' && reHasComplexSymbol.test(string)) { + if (!separator && hasUnicode(string)) { return castSlice(stringToArray(string), 0, limit); } } - return nativeSplit.call(string, separator, limit); + return string.split(separator, limit); } module.exports = split; diff --git a/node_modules/lodash/package/spread.js b/node_modules/globule/node_modules/lodash/spread.js similarity index 90% rename from node_modules/lodash/package/spread.js rename to node_modules/globule/node_modules/lodash/spread.js index 9d32bb9..ee44c8d 100644 --- a/node_modules/lodash/package/spread.js +++ b/node_modules/globule/node_modules/lodash/spread.js @@ -1,10 +1,10 @@ var apply = require('./_apply'), arrayPush = require('./_arrayPush'), + baseRest = require('./_baseRest'), castSlice = require('./_castSlice'), - rest = require('./rest'), toInteger = require('./toInteger'); -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /* Built-in method references for those with the same name as other `lodash` methods. */ @@ -13,7 +13,7 @@ var nativeMax = Math.max; /** * Creates a function that invokes `func` with the `this` binding of the * create function and an array of arguments much like - * [`Function#apply`](http://www.ecma-international.org/ecma-262/6.0/#sec-function.prototype.apply). + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). * * **Note:** This method is based on the * [spread operator](https://mdn.io/spread_operator). @@ -49,7 +49,7 @@ function spread(func, start) { throw new TypeError(FUNC_ERROR_TEXT); } start = start === undefined ? 0 : nativeMax(toInteger(start), 0); - return rest(function(args) { + return baseRest(function(args) { var array = args[start], otherArgs = castSlice(args, 0, start); diff --git a/node_modules/lodash/package/startCase.js b/node_modules/globule/node_modules/lodash/startCase.js similarity index 100% rename from node_modules/lodash/package/startCase.js rename to node_modules/globule/node_modules/lodash/startCase.js diff --git a/node_modules/lodash/package/startsWith.js b/node_modules/globule/node_modules/lodash/startsWith.js similarity index 84% rename from node_modules/lodash/package/startsWith.js rename to node_modules/globule/node_modules/lodash/startsWith.js index 8881855..359e5ad 100644 --- a/node_modules/lodash/package/startsWith.js +++ b/node_modules/globule/node_modules/lodash/startsWith.js @@ -10,7 +10,7 @@ var baseClamp = require('./_baseClamp'), * @memberOf _ * @since 3.0.0 * @category String - * @param {string} [string=''] The string to search. + * @param {string} [string=''] The string to inspect. * @param {string} [target] The string to search for. * @param {number} [position=0] The position to search from. * @returns {boolean} Returns `true` if `string` starts with `target`, @@ -29,7 +29,8 @@ var baseClamp = require('./_baseClamp'), function startsWith(string, target, position) { string = toString(string); position = baseClamp(toInteger(position), 0, string.length); - return string.lastIndexOf(baseToString(target), position) == position; + target = baseToString(target); + return string.slice(position, position + target.length) == target; } module.exports = startsWith; diff --git a/node_modules/lodash/package/string.js b/node_modules/globule/node_modules/lodash/string.js similarity index 100% rename from node_modules/lodash/package/string.js rename to node_modules/globule/node_modules/lodash/string.js diff --git a/node_modules/globule/node_modules/lodash/stubArray.js b/node_modules/globule/node_modules/lodash/stubArray.js new file mode 100644 index 0000000..f460c15 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/stubArray.js @@ -0,0 +1,23 @@ +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +module.exports = stubArray; diff --git a/node_modules/globule/node_modules/lodash/stubFalse.js b/node_modules/globule/node_modules/lodash/stubFalse.js new file mode 100644 index 0000000..9b346fc --- /dev/null +++ b/node_modules/globule/node_modules/lodash/stubFalse.js @@ -0,0 +1,18 @@ +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = stubFalse; diff --git a/node_modules/globule/node_modules/lodash/stubObject.js b/node_modules/globule/node_modules/lodash/stubObject.js new file mode 100644 index 0000000..1d190a1 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/stubObject.js @@ -0,0 +1,23 @@ +/** + * This method returns a new empty object. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Object} Returns the new empty object. + * @example + * + * var objects = _.times(2, _.stubObject); + * + * console.log(objects); + * // => [{}, {}] + * + * console.log(objects[0] === objects[1]); + * // => false + */ +function stubObject() { + return {}; +} + +module.exports = stubObject; diff --git a/node_modules/globule/node_modules/lodash/stubString.js b/node_modules/globule/node_modules/lodash/stubString.js new file mode 100644 index 0000000..2db0bed --- /dev/null +++ b/node_modules/globule/node_modules/lodash/stubString.js @@ -0,0 +1,18 @@ +/** + * This method returns an empty string. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {string} Returns the empty string. + * @example + * + * _.times(2, _.stubString); + * // => ['', ''] + */ +function stubString() { + return ''; +} + +module.exports = stubString; diff --git a/node_modules/globule/node_modules/lodash/stubTrue.js b/node_modules/globule/node_modules/lodash/stubTrue.js new file mode 100644 index 0000000..af3cc9e --- /dev/null +++ b/node_modules/globule/node_modules/lodash/stubTrue.js @@ -0,0 +1,18 @@ +/** + * This method returns `true`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `true`. + * @example + * + * _.times(2, _.stubTrue); + * // => [true, true] + */ +function stubTrue() { + return true; +} + +module.exports = stubTrue; diff --git a/node_modules/lodash/package/subtract.js b/node_modules/globule/node_modules/lodash/subtract.js similarity index 98% rename from node_modules/lodash/package/subtract.js rename to node_modules/globule/node_modules/lodash/subtract.js index bd4086a..6720778 100644 --- a/node_modules/lodash/package/subtract.js +++ b/node_modules/globule/node_modules/lodash/subtract.js @@ -17,6 +17,6 @@ var createMathOperation = require('./_createMathOperation'); */ var subtract = createMathOperation(function(minuend, subtrahend) { return minuend - subtrahend; -}); +}, 0); module.exports = subtract; diff --git a/node_modules/lodash/package/sum.js b/node_modules/globule/node_modules/lodash/sum.js similarity index 100% rename from node_modules/lodash/package/sum.js rename to node_modules/globule/node_modules/lodash/sum.js diff --git a/node_modules/lodash/package/sumBy.js b/node_modules/globule/node_modules/lodash/sumBy.js similarity index 84% rename from node_modules/lodash/package/sumBy.js rename to node_modules/globule/node_modules/lodash/sumBy.js index ce73c84..00e36d0 100644 --- a/node_modules/lodash/package/sumBy.js +++ b/node_modules/globule/node_modules/lodash/sumBy.js @@ -11,8 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the sum. * @example * @@ -27,7 +26,7 @@ var baseIteratee = require('./_baseIteratee'), */ function sumBy(array, iteratee) { return (array && array.length) - ? baseSum(array, baseIteratee(iteratee)) + ? baseSum(array, baseIteratee(iteratee, 2)) : 0; } diff --git a/node_modules/lodash/package/tail.js b/node_modules/globule/node_modules/lodash/tail.js similarity index 68% rename from node_modules/lodash/package/tail.js rename to node_modules/globule/node_modules/lodash/tail.js index 459a8a3..001c22d 100644 --- a/node_modules/lodash/package/tail.js +++ b/node_modules/globule/node_modules/lodash/tail.js @@ -1,4 +1,4 @@ -var drop = require('./drop'); +var baseSlice = require('./_baseSlice'); /** * Gets all but the first element of `array`. @@ -15,7 +15,8 @@ var drop = require('./drop'); * // => [2, 3] */ function tail(array) { - return drop(array, 1); + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; } module.exports = tail; diff --git a/node_modules/lodash/package/take.js b/node_modules/globule/node_modules/lodash/take.js similarity index 100% rename from node_modules/lodash/package/take.js rename to node_modules/globule/node_modules/lodash/take.js diff --git a/node_modules/lodash/package/takeRight.js b/node_modules/globule/node_modules/lodash/takeRight.js similarity index 94% rename from node_modules/lodash/package/takeRight.js rename to node_modules/globule/node_modules/lodash/takeRight.js index b11fb34..6c37506 100644 --- a/node_modules/lodash/package/takeRight.js +++ b/node_modules/globule/node_modules/lodash/takeRight.js @@ -27,7 +27,7 @@ var baseSlice = require('./_baseSlice'), * // => [] */ function takeRight(array, n, guard) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } diff --git a/node_modules/lodash/package/takeRightWhile.js b/node_modules/globule/node_modules/lodash/takeRightWhile.js similarity index 92% rename from node_modules/lodash/package/takeRightWhile.js rename to node_modules/globule/node_modules/lodash/takeRightWhile.js index 1d49750..94ab783 100644 --- a/node_modules/lodash/package/takeRightWhile.js +++ b/node_modules/globule/node_modules/lodash/takeRightWhile.js @@ -11,8 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * diff --git a/node_modules/lodash/package/takeWhile.js b/node_modules/globule/node_modules/lodash/takeWhile.js similarity index 92% rename from node_modules/lodash/package/takeWhile.js rename to node_modules/globule/node_modules/lodash/takeWhile.js index 1283755..dc84d69 100644 --- a/node_modules/lodash/package/takeWhile.js +++ b/node_modules/globule/node_modules/lodash/takeWhile.js @@ -11,8 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * diff --git a/node_modules/lodash/package/tap.js b/node_modules/globule/node_modules/lodash/tap.js similarity index 100% rename from node_modules/lodash/package/tap.js rename to node_modules/globule/node_modules/lodash/tap.js diff --git a/node_modules/lodash/package/template.js b/node_modules/globule/node_modules/lodash/template.js similarity index 97% rename from node_modules/lodash/package/template.js rename to node_modules/globule/node_modules/lodash/template.js index 304d287..2df417f 100644 --- a/node_modules/lodash/package/template.js +++ b/node_modules/globule/node_modules/lodash/template.js @@ -17,7 +17,7 @@ var reEmptyStringLeading = /\b__p \+= '';/g, /** * Used to match - * [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). */ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; @@ -86,17 +86,12 @@ var reUnescapedString = /['\n\r\u2028\u2029\\]/g; * compiled({ 'user': 'barney' }); * // => 'hello barney!' * - * // Use the ES delimiter as an alternative to the default "interpolate" delimiter. + * // Use the ES template literal delimiter as an "interpolate" delimiter. + * // Disable support by replacing the "interpolate" delimiter. * var compiled = _.template('hello ${ user }!'); * compiled({ 'user': 'pebbles' }); * // => 'hello pebbles!' * - * // Use custom template delimiters. - * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; - * var compiled = _.template('hello {{ user }}!'); - * compiled({ 'user': 'mustache' }); - * // => 'hello mustache!' - * * // Use backslashes to treat delimiters as plain text. * var compiled = _.template('<%= "\\<%- value %\\>" %>'); * compiled({ 'value': 'ignored' }); @@ -122,9 +117,15 @@ var reUnescapedString = /['\n\r\u2028\u2029\\]/g; * // return __p; * // } * + * // Use custom template delimiters. + * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; + * var compiled = _.template('hello {{ user }}!'); + * compiled({ 'user': 'mustache' }); + * // => 'hello mustache!' + * * // Use the `source` property to inline compiled templates for meaningful * // line numbers in error messages and stack traces. - * fs.writeFileSync(path.join(cwd, 'jst.js'), '\ + * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\ * var JST = {\ * "main": ' + _.template(mainText).source + '\ * };\ diff --git a/node_modules/lodash/package/templateSettings.js b/node_modules/globule/node_modules/lodash/templateSettings.js similarity index 100% rename from node_modules/lodash/package/templateSettings.js rename to node_modules/globule/node_modules/lodash/templateSettings.js diff --git a/node_modules/lodash/package/throttle.js b/node_modules/globule/node_modules/lodash/throttle.js similarity index 87% rename from node_modules/lodash/package/throttle.js rename to node_modules/globule/node_modules/lodash/throttle.js index d201885..e2bb806 100644 --- a/node_modules/lodash/package/throttle.js +++ b/node_modules/globule/node_modules/lodash/throttle.js @@ -1,15 +1,15 @@ var debounce = require('./debounce'), isObject = require('./isObject'); -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a throttled function that only invokes `func` at most once per * every `wait` milliseconds. The throttled function comes with a `cancel` * method to cancel delayed `func` invocations and a `flush` method to - * immediately invoke them. Provide an options object to indicate whether - * `func` should be invoked on the leading and/or trailing edge of the `wait` + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` * timeout. The `func` is invoked with the last arguments provided to the * throttled function. Subsequent calls to the throttled function return the * result of the last `func` invocation. @@ -18,6 +18,9 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * invoked on the trailing edge of the timeout only if the throttled function * is invoked more than once during the `wait` timeout. * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.throttle` and `_.debounce`. * diff --git a/node_modules/lodash/package/thru.js b/node_modules/globule/node_modules/lodash/thru.js similarity index 100% rename from node_modules/lodash/package/thru.js rename to node_modules/globule/node_modules/lodash/thru.js diff --git a/node_modules/lodash/package/times.js b/node_modules/globule/node_modules/lodash/times.js similarity index 86% rename from node_modules/lodash/package/times.js rename to node_modules/globule/node_modules/lodash/times.js index d0bff57..266c90c 100644 --- a/node_modules/lodash/package/times.js +++ b/node_modules/globule/node_modules/lodash/times.js @@ -1,5 +1,5 @@ -var baseIteratee = require('./_baseIteratee'), - baseTimes = require('./_baseTimes'), +var baseTimes = require('./_baseTimes'), + castFunction = require('./_castFunction'), toInteger = require('./toInteger'); /** Used as references for various `Number` constants. */ @@ -27,8 +27,8 @@ var nativeMin = Math.min; * _.times(3, String); * // => ['0', '1', '2'] * - * _.times(4, _.constant(true)); - * // => [true, true, true, true] + * _.times(4, _.constant(0)); + * // => [0, 0, 0, 0] */ function times(n, iteratee) { n = toInteger(n); @@ -38,7 +38,7 @@ function times(n, iteratee) { var index = MAX_ARRAY_LENGTH, length = nativeMin(n, MAX_ARRAY_LENGTH); - iteratee = baseIteratee(iteratee); + iteratee = castFunction(iteratee); n -= MAX_ARRAY_LENGTH; var result = baseTimes(length, iteratee); diff --git a/node_modules/lodash/package/toArray.js b/node_modules/globule/node_modules/lodash/toArray.js similarity index 85% rename from node_modules/lodash/package/toArray.js rename to node_modules/globule/node_modules/lodash/toArray.js index 6675806..9809584 100644 --- a/node_modules/lodash/package/toArray.js +++ b/node_modules/globule/node_modules/lodash/toArray.js @@ -14,7 +14,7 @@ var mapTag = '[object Map]', setTag = '[object Set]'; /** Built-in value references. */ -var iteratorSymbol = typeof (iteratorSymbol = Symbol && Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined; +var symIterator = Symbol ? Symbol.iterator : undefined; /** * Converts `value` to an array. @@ -46,8 +46,8 @@ function toArray(value) { if (isArrayLike(value)) { return isString(value) ? stringToArray(value) : copyArray(value); } - if (iteratorSymbol && value[iteratorSymbol]) { - return iteratorToArray(value[iteratorSymbol]()); + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); } var tag = getTag(value), func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); diff --git a/node_modules/lodash/package/toInteger.js b/node_modules/globule/node_modules/lodash/toFinite.js similarity index 50% rename from node_modules/lodash/package/toInteger.js rename to node_modules/globule/node_modules/lodash/toFinite.js index 459f0c3..3b5bba6 100644 --- a/node_modules/lodash/package/toInteger.js +++ b/node_modules/globule/node_modules/lodash/toFinite.js @@ -5,32 +5,29 @@ var INFINITY = 1 / 0, MAX_INTEGER = 1.7976931348623157e+308; /** - * Converts `value` to an integer. - * - * **Note:** This function is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * Converts `value` to a finite number. * * @static * @memberOf _ - * @since 4.0.0 + * @since 4.12.0 * @category Lang * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. + * @returns {number} Returns the converted number. * @example * - * _.toInteger(3); - * // => 3 + * _.toFinite(3.2); + * // => 3.2 * - * _.toInteger(Number.MIN_VALUE); - * // => 0 + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 * - * _.toInteger(Infinity); + * _.toFinite(Infinity); * // => 1.7976931348623157e+308 * - * _.toInteger('3'); - * // => 3 + * _.toFinite('3.2'); + * // => 3.2 */ -function toInteger(value) { +function toFinite(value) { if (!value) { return value === 0 ? value : 0; } @@ -39,8 +36,7 @@ function toInteger(value) { var sign = (value < 0 ? -1 : 1); return sign * MAX_INTEGER; } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; + return value === value ? value : 0; } -module.exports = toInteger; +module.exports = toFinite; diff --git a/node_modules/globule/node_modules/lodash/toInteger.js b/node_modules/globule/node_modules/lodash/toInteger.js new file mode 100644 index 0000000..c6aadf8 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/toInteger.js @@ -0,0 +1,36 @@ +var toFinite = require('./toFinite'); + +/** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; +} + +module.exports = toInteger; diff --git a/node_modules/lodash/package/toIterator.js b/node_modules/globule/node_modules/lodash/toIterator.js similarity index 100% rename from node_modules/lodash/package/toIterator.js rename to node_modules/globule/node_modules/lodash/toIterator.js diff --git a/node_modules/lodash/package/toJSON.js b/node_modules/globule/node_modules/lodash/toJSON.js similarity index 100% rename from node_modules/lodash/package/toJSON.js rename to node_modules/globule/node_modules/lodash/toJSON.js diff --git a/node_modules/lodash/package/toLength.js b/node_modules/globule/node_modules/lodash/toLength.js similarity index 87% rename from node_modules/lodash/package/toLength.js rename to node_modules/globule/node_modules/lodash/toLength.js index 9d41514..be8f2a7 100644 --- a/node_modules/lodash/package/toLength.js +++ b/node_modules/globule/node_modules/lodash/toLength.js @@ -9,7 +9,7 @@ var MAX_ARRAY_LENGTH = 4294967295; * array-like object. * * **Note:** This method is based on - * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ @@ -19,7 +19,7 @@ var MAX_ARRAY_LENGTH = 4294967295; * @returns {number} Returns the converted integer. * @example * - * _.toLength(3); + * _.toLength(3.2); * // => 3 * * _.toLength(Number.MIN_VALUE); @@ -28,7 +28,7 @@ var MAX_ARRAY_LENGTH = 4294967295; * _.toLength(Infinity); * // => 4294967295 * - * _.toLength('3'); + * _.toLength('3.2'); * // => 3 */ function toLength(value) { diff --git a/node_modules/lodash/package/toLower.js b/node_modules/globule/node_modules/lodash/toLower.js similarity index 100% rename from node_modules/lodash/package/toLower.js rename to node_modules/globule/node_modules/lodash/toLower.js diff --git a/node_modules/lodash/package/toNumber.js b/node_modules/globule/node_modules/lodash/toNumber.js similarity index 86% rename from node_modules/lodash/package/toNumber.js rename to node_modules/globule/node_modules/lodash/toNumber.js index 9baba70..b0f72de 100644 --- a/node_modules/lodash/package/toNumber.js +++ b/node_modules/globule/node_modules/lodash/toNumber.js @@ -1,5 +1,4 @@ -var isFunction = require('./isFunction'), - isObject = require('./isObject'), +var isObject = require('./isObject'), isSymbol = require('./isSymbol'); /** Used as references for various `Number` constants. */ @@ -31,8 +30,8 @@ var freeParseInt = parseInt; * @returns {number} Returns the number. * @example * - * _.toNumber(3); - * // => 3 + * _.toNumber(3.2); + * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 @@ -40,8 +39,8 @@ var freeParseInt = parseInt; * _.toNumber(Infinity); * // => Infinity * - * _.toNumber('3'); - * // => 3 + * _.toNumber('3.2'); + * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { @@ -51,7 +50,7 @@ function toNumber(value) { return NAN; } if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { diff --git a/node_modules/lodash/package/toPairs.js b/node_modules/globule/node_modules/lodash/toPairs.js similarity index 66% rename from node_modules/lodash/package/toPairs.js rename to node_modules/globule/node_modules/lodash/toPairs.js index 417ac8c..c4f52ae 100644 --- a/node_modules/lodash/package/toPairs.js +++ b/node_modules/globule/node_modules/lodash/toPairs.js @@ -1,9 +1,10 @@ -var baseToPairs = require('./_baseToPairs'), +var createToPairs = require('./_createToPairs'), keys = require('./keys'); /** * Creates an array of own enumerable string keyed-value pairs for `object` - * which can be consumed by `_.fromPairs`. + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. * * @static * @memberOf _ @@ -11,7 +12,7 @@ var baseToPairs = require('./_baseToPairs'), * @alias entries * @category Object * @param {Object} object The object to query. - * @returns {Array} Returns the new array of key-value pairs. + * @returns {Array} Returns the key-value pairs. * @example * * function Foo() { @@ -24,8 +25,6 @@ var baseToPairs = require('./_baseToPairs'), * _.toPairs(new Foo); * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) */ -function toPairs(object) { - return baseToPairs(object, keys(object)); -} +var toPairs = createToPairs(keys); module.exports = toPairs; diff --git a/node_modules/lodash/package/toPairsIn.js b/node_modules/globule/node_modules/lodash/toPairsIn.js similarity index 57% rename from node_modules/lodash/package/toPairsIn.js rename to node_modules/globule/node_modules/lodash/toPairsIn.js index b84ef7e..32c562c 100644 --- a/node_modules/lodash/package/toPairsIn.js +++ b/node_modules/globule/node_modules/lodash/toPairsIn.js @@ -1,9 +1,10 @@ -var baseToPairs = require('./_baseToPairs'), +var createToPairs = require('./_createToPairs'), keysIn = require('./keysIn'); /** * Creates an array of own and inherited enumerable string keyed-value pairs - * for `object` which can be consumed by `_.fromPairs`. + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. * * @static * @memberOf _ @@ -11,7 +12,7 @@ var baseToPairs = require('./_baseToPairs'), * @alias entriesIn * @category Object * @param {Object} object The object to query. - * @returns {Array} Returns the new array of key-value pairs. + * @returns {Array} Returns the key-value pairs. * @example * * function Foo() { @@ -22,10 +23,8 @@ var baseToPairs = require('./_baseToPairs'), * Foo.prototype.c = 3; * * _.toPairsIn(new Foo); - * // => [['a', 1], ['b', 2], ['c', 1]] (iteration order is not guaranteed) + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) */ -function toPairsIn(object) { - return baseToPairs(object, keysIn(object)); -} +var toPairsIn = createToPairs(keysIn); module.exports = toPairsIn; diff --git a/node_modules/lodash/package/toPath.js b/node_modules/globule/node_modules/lodash/toPath.js similarity index 81% rename from node_modules/lodash/package/toPath.js rename to node_modules/globule/node_modules/lodash/toPath.js index e2dc7ae..c9e8e4b 100644 --- a/node_modules/lodash/package/toPath.js +++ b/node_modules/globule/node_modules/lodash/toPath.js @@ -21,15 +21,6 @@ var arrayMap = require('./_arrayMap'), * * _.toPath('a[0].b.c'); * // => ['a', '0', 'b', 'c'] - * - * var path = ['a', 'b', 'c'], - * newPath = _.toPath(path); - * - * console.log(newPath); - * // => ['a', 'b', 'c'] - * - * console.log(path === newPath); - * // => false */ function toPath(value) { if (isArray(value)) { diff --git a/node_modules/lodash/package/toPlainObject.js b/node_modules/globule/node_modules/lodash/toPlainObject.js similarity index 100% rename from node_modules/lodash/package/toPlainObject.js rename to node_modules/globule/node_modules/lodash/toPlainObject.js diff --git a/node_modules/lodash/package/toSafeInteger.js b/node_modules/globule/node_modules/lodash/toSafeInteger.js similarity index 93% rename from node_modules/lodash/package/toSafeInteger.js rename to node_modules/globule/node_modules/lodash/toSafeInteger.js index 475874f..885c5fb 100644 --- a/node_modules/lodash/package/toSafeInteger.js +++ b/node_modules/globule/node_modules/lodash/toSafeInteger.js @@ -16,7 +16,7 @@ var MAX_SAFE_INTEGER = 9007199254740991; * @returns {number} Returns the converted integer. * @example * - * _.toSafeInteger(3); + * _.toSafeInteger(3.2); * // => 3 * * _.toSafeInteger(Number.MIN_VALUE); @@ -25,7 +25,7 @@ var MAX_SAFE_INTEGER = 9007199254740991; * _.toSafeInteger(Infinity); * // => 9007199254740991 * - * _.toSafeInteger('3'); + * _.toSafeInteger('3.2'); * // => 3 */ function toSafeInteger(value) { diff --git a/node_modules/lodash/package/toString.js b/node_modules/globule/node_modules/lodash/toString.js similarity index 83% rename from node_modules/lodash/package/toString.js rename to node_modules/globule/node_modules/lodash/toString.js index f20d65a..daaf681 100644 --- a/node_modules/lodash/package/toString.js +++ b/node_modules/globule/node_modules/lodash/toString.js @@ -8,8 +8,8 @@ var baseToString = require('./_baseToString'); * @memberOf _ * @since 4.0.0 * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. * @example * * _.toString(null); diff --git a/node_modules/lodash/package/toUpper.js b/node_modules/globule/node_modules/lodash/toUpper.js similarity index 100% rename from node_modules/lodash/package/toUpper.js rename to node_modules/globule/node_modules/lodash/toUpper.js diff --git a/node_modules/lodash/package/transform.js b/node_modules/globule/node_modules/lodash/transform.js similarity index 63% rename from node_modules/lodash/package/transform.js rename to node_modules/globule/node_modules/lodash/transform.js index 3013a83..d755a15 100644 --- a/node_modules/lodash/package/transform.js +++ b/node_modules/globule/node_modules/lodash/transform.js @@ -4,6 +4,7 @@ var arrayEach = require('./_arrayEach'), baseIteratee = require('./_baseIteratee'), getPrototype = require('./_getPrototype'), isArray = require('./isArray'), + isBuffer = require('./isBuffer'), isFunction = require('./isFunction'), isObject = require('./isObject'), isTypedArray = require('./isTypedArray'); @@ -12,15 +13,16 @@ var arrayEach = require('./_arrayEach'), * An alternative to `_.reduce`; this method transforms `object` to a new * `accumulator` object which is the result of running each of its own * enumerable string keyed properties thru `iteratee`, with each invocation - * potentially mutating the `accumulator` object. The iteratee is invoked - * with four arguments: (accumulator, value, key, object). Iteratee functions - * may exit iteration early by explicitly returning `false`. + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. * * @static * @memberOf _ * @since 1.3.0 * @category Object - * @param {Array|Object} object The object to iterate over. + * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The custom accumulator value. * @returns {*} Returns the accumulated value. @@ -38,22 +40,23 @@ var arrayEach = require('./_arrayEach'), * // => { '1': ['a', 'c'], '2': ['b'] } */ function transform(object, iteratee, accumulator) { - var isArr = isArray(object) || isTypedArray(object); - iteratee = baseIteratee(iteratee, 4); + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + iteratee = baseIteratee(iteratee, 4); if (accumulator == null) { - if (isArr || isObject(object)) { - var Ctor = object.constructor; - if (isArr) { - accumulator = isArray(object) ? new Ctor : []; - } else { - accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; - } - } else { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; + } + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } + else { accumulator = {}; } } - (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) { + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { return iteratee(accumulator, value, index, object); }); return accumulator; diff --git a/node_modules/lodash/package/trim.js b/node_modules/globule/node_modules/lodash/trim.js similarity index 100% rename from node_modules/lodash/package/trim.js rename to node_modules/globule/node_modules/lodash/trim.js diff --git a/node_modules/lodash/package/trimEnd.js b/node_modules/globule/node_modules/lodash/trimEnd.js similarity index 100% rename from node_modules/lodash/package/trimEnd.js rename to node_modules/globule/node_modules/lodash/trimEnd.js diff --git a/node_modules/lodash/package/trimStart.js b/node_modules/globule/node_modules/lodash/trimStart.js similarity index 100% rename from node_modules/lodash/package/trimStart.js rename to node_modules/globule/node_modules/lodash/trimStart.js diff --git a/node_modules/lodash/package/truncate.js b/node_modules/globule/node_modules/lodash/truncate.js similarity index 97% rename from node_modules/lodash/package/truncate.js rename to node_modules/globule/node_modules/lodash/truncate.js index 4290315..21fcdfe 100644 --- a/node_modules/lodash/package/truncate.js +++ b/node_modules/globule/node_modules/lodash/truncate.js @@ -1,8 +1,8 @@ var baseToString = require('./_baseToString'), castSlice = require('./_castSlice'), + hasUnicode = require('./_hasUnicode'), isObject = require('./isObject'), isRegExp = require('./isRegExp'), - reHasComplexSymbol = require('./_reHasComplexSymbol'), stringSize = require('./_stringSize'), stringToArray = require('./_stringToArray'), toInteger = require('./toInteger'), @@ -64,7 +64,7 @@ function truncate(string, options) { string = toString(string); var strLength = string.length; - if (reHasComplexSymbol.test(string)) { + if (hasUnicode(string)) { var strSymbols = stringToArray(string); strLength = strSymbols.length; } diff --git a/node_modules/lodash/package/unary.js b/node_modules/globule/node_modules/lodash/unary.js similarity index 88% rename from node_modules/lodash/package/unary.js rename to node_modules/globule/node_modules/lodash/unary.js index 34c144c..76f48f6 100644 --- a/node_modules/lodash/package/unary.js +++ b/node_modules/globule/node_modules/lodash/unary.js @@ -9,7 +9,7 @@ var ary = require('./ary'); * @since 4.0.0 * @category Function * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. * @example * * _.map(['6', '8', '10'], _.unary(parseInt)); diff --git a/node_modules/lodash/package/unescape.js b/node_modules/globule/node_modules/lodash/unescape.js similarity index 88% rename from node_modules/lodash/package/unescape.js rename to node_modules/globule/node_modules/lodash/unescape.js index 929bb16..3b6efd5 100644 --- a/node_modules/lodash/package/unescape.js +++ b/node_modules/globule/node_modules/lodash/unescape.js @@ -2,12 +2,12 @@ var toString = require('./toString'), unescapeHtmlChar = require('./_unescapeHtmlChar'); /** Used to match HTML entities and HTML characters. */ -var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g, +var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reHasEscapedHtml = RegExp(reEscapedHtml.source); /** * The inverse of `_.escape`; this method converts the HTML entities - * `&`, `<`, `>`, `"`, `'`, and ``` in `string` to + * `&`, `<`, `>`, `"`, and `'` in `string` to * their corresponding characters. * * **Note:** No other HTML entities are unescaped. To unescape additional diff --git a/node_modules/lodash/package/union.js b/node_modules/globule/node_modules/lodash/union.js similarity index 67% rename from node_modules/lodash/package/union.js rename to node_modules/globule/node_modules/lodash/union.js index 1276c88..e676dfe 100644 --- a/node_modules/lodash/package/union.js +++ b/node_modules/globule/node_modules/lodash/union.js @@ -1,11 +1,11 @@ var baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), baseUniq = require('./_baseUniq'), - isArrayLikeObject = require('./isArrayLikeObject'), - rest = require('./rest'); + isArrayLikeObject = require('./isArrayLikeObject'); /** * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @static @@ -16,10 +16,10 @@ var baseFlatten = require('./_baseFlatten'), * @returns {Array} Returns the new array of combined values. * @example * - * _.union([2, 1], [4, 2], [1, 2]); - * // => [2, 1, 4] + * _.union([2], [1, 2]); + * // => [2, 1] */ -var union = rest(function(arrays) { +var union = baseRest(function(arrays) { return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); }); diff --git a/node_modules/lodash/package/unionBy.js b/node_modules/globule/node_modules/lodash/unionBy.js similarity index 66% rename from node_modules/lodash/package/unionBy.js rename to node_modules/globule/node_modules/lodash/unionBy.js index f44340c..6ae8ccd 100644 --- a/node_modules/lodash/package/unionBy.js +++ b/node_modules/globule/node_modules/lodash/unionBy.js @@ -1,14 +1,15 @@ var baseFlatten = require('./_baseFlatten'), baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), baseUniq = require('./_baseUniq'), isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.union` except that it accepts `iteratee` which is * invoked for each element of each `arrays` to generate the criterion by - * which uniqueness is computed. The iteratee is invoked with one argument: + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: * (value). * * @static @@ -16,24 +17,23 @@ var baseFlatten = require('./_baseFlatten'), * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of combined values. * @example * - * _.unionBy([2.1, 1.2], [4.3, 2.4], Math.floor); - * // => [2.1, 1.2, 4.3] + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] * * // The `_.property` iteratee shorthand. * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }, { 'x': 2 }] */ -var unionBy = rest(function(arrays) { +var unionBy = baseRest(function(arrays) { var iteratee = last(arrays); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), baseIteratee(iteratee)); + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2)); }); module.exports = unionBy; diff --git a/node_modules/lodash/package/unionWith.js b/node_modules/globule/node_modules/lodash/unionWith.js similarity index 73% rename from node_modules/lodash/package/unionWith.js rename to node_modules/globule/node_modules/lodash/unionWith.js index dad71f9..78736b2 100644 --- a/node_modules/lodash/package/unionWith.js +++ b/node_modules/globule/node_modules/lodash/unionWith.js @@ -1,12 +1,13 @@ var baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), baseUniq = require('./_baseUniq'), isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.union` except that it accepts `comparator` which - * is invoked to compare elements of `arrays`. The comparator is invoked + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked * with two arguments: (arrVal, othVal). * * @static @@ -24,11 +25,9 @@ var baseFlatten = require('./_baseFlatten'), * _.unionWith(objects, others, _.isEqual); * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ -var unionWith = rest(function(arrays) { +var unionWith = baseRest(function(arrays) { var comparator = last(arrays); - if (isArrayLikeObject(comparator)) { - comparator = undefined; - } + comparator = typeof comparator == 'function' ? comparator : undefined; return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); }); diff --git a/node_modules/lodash/package/uniq.js b/node_modules/globule/node_modules/lodash/uniq.js similarity index 66% rename from node_modules/lodash/package/uniq.js rename to node_modules/globule/node_modules/lodash/uniq.js index 0e99ee9..157d1cd 100644 --- a/node_modules/lodash/package/uniq.js +++ b/node_modules/globule/node_modules/lodash/uniq.js @@ -2,9 +2,10 @@ var baseUniq = require('./_baseUniq'); /** * Creates a duplicate-free version of an array, using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons, in which only the first occurrence of each - * element is kept. + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. * * @static * @memberOf _ @@ -18,9 +19,7 @@ var baseUniq = require('./_baseUniq'); * // => [2, 1] */ function uniq(array) { - return (array && array.length) - ? baseUniq(array) - : []; + return (array && array.length) ? baseUniq(array) : []; } module.exports = uniq; diff --git a/node_modules/lodash/package/uniqBy.js b/node_modules/globule/node_modules/lodash/uniqBy.js similarity index 67% rename from node_modules/lodash/package/uniqBy.js rename to node_modules/globule/node_modules/lodash/uniqBy.js index 91cf9e0..53402a9 100644 --- a/node_modules/lodash/package/uniqBy.js +++ b/node_modules/globule/node_modules/lodash/uniqBy.js @@ -4,15 +4,16 @@ var baseIteratee = require('./_baseIteratee'), /** * This method is like `_.uniq` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the criterion by which - * uniqueness is computed. The iteratee is invoked with one argument: (value). + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new duplicate free array. * @example * @@ -24,9 +25,7 @@ var baseIteratee = require('./_baseIteratee'), * // => [{ 'x': 1 }, { 'x': 2 }] */ function uniqBy(array, iteratee) { - return (array && array.length) - ? baseUniq(array, baseIteratee(iteratee)) - : []; + return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : []; } module.exports = uniqBy; diff --git a/node_modules/lodash/package/uniqWith.js b/node_modules/globule/node_modules/lodash/uniqWith.js similarity index 55% rename from node_modules/lodash/package/uniqWith.js rename to node_modules/globule/node_modules/lodash/uniqWith.js index 957c17d..18d72aa 100644 --- a/node_modules/lodash/package/uniqWith.js +++ b/node_modules/globule/node_modules/lodash/uniqWith.js @@ -2,8 +2,9 @@ var baseUniq = require('./_baseUniq'); /** * This method is like `_.uniq` except that it accepts `comparator` which - * is invoked to compare elements of `array`. The comparator is invoked with - * two arguments: (arrVal, othVal). + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). * * @static * @memberOf _ @@ -14,15 +15,14 @@ var baseUniq = require('./_baseUniq'); * @returns {Array} Returns the new duplicate free array. * @example * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; * * _.uniqWith(objects, _.isEqual); * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] */ function uniqWith(array, comparator) { - return (array && array.length) - ? baseUniq(array, undefined, comparator) - : []; + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; } module.exports = uniqWith; diff --git a/node_modules/lodash/package/uniqueId.js b/node_modules/globule/node_modules/lodash/uniqueId.js similarity index 100% rename from node_modules/lodash/package/uniqueId.js rename to node_modules/globule/node_modules/lodash/uniqueId.js diff --git a/node_modules/lodash/package/unset.js b/node_modules/globule/node_modules/lodash/unset.js similarity index 100% rename from node_modules/lodash/package/unset.js rename to node_modules/globule/node_modules/lodash/unset.js diff --git a/node_modules/lodash/package/unzip.js b/node_modules/globule/node_modules/lodash/unzip.js similarity index 86% rename from node_modules/lodash/package/unzip.js rename to node_modules/globule/node_modules/lodash/unzip.js index 7990d26..fce0ec7 100644 --- a/node_modules/lodash/package/unzip.js +++ b/node_modules/globule/node_modules/lodash/unzip.js @@ -20,11 +20,11 @@ var nativeMax = Math.max; * @returns {Array} Returns the new array of regrouped elements. * @example * - * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]); - * // => [['fred', 30, true], ['barney', 40, false]] + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] * * _.unzip(zipped); - * // => [['fred', 'barney'], [30, 40], [true, false]] + * // => [['a', 'b'], [1, 2], [true, false]] */ function unzip(array) { if (!(array && array.length)) { diff --git a/node_modules/lodash/package/unzipWith.js b/node_modules/globule/node_modules/lodash/unzipWith.js similarity index 100% rename from node_modules/lodash/package/unzipWith.js rename to node_modules/globule/node_modules/lodash/unzipWith.js diff --git a/node_modules/lodash/package/update.js b/node_modules/globule/node_modules/lodash/update.js similarity index 100% rename from node_modules/lodash/package/update.js rename to node_modules/globule/node_modules/lodash/update.js diff --git a/node_modules/lodash/package/updateWith.js b/node_modules/globule/node_modules/lodash/updateWith.js similarity index 100% rename from node_modules/lodash/package/updateWith.js rename to node_modules/globule/node_modules/lodash/updateWith.js diff --git a/node_modules/lodash/package/upperCase.js b/node_modules/globule/node_modules/lodash/upperCase.js similarity index 100% rename from node_modules/lodash/package/upperCase.js rename to node_modules/globule/node_modules/lodash/upperCase.js diff --git a/node_modules/lodash/package/upperFirst.js b/node_modules/globule/node_modules/lodash/upperFirst.js similarity index 100% rename from node_modules/lodash/package/upperFirst.js rename to node_modules/globule/node_modules/lodash/upperFirst.js diff --git a/node_modules/lodash/package/util.js b/node_modules/globule/node_modules/lodash/util.js similarity index 79% rename from node_modules/lodash/package/util.js rename to node_modules/globule/node_modules/lodash/util.js index 11b0372..d244dc2 100644 --- a/node_modules/lodash/package/util.js +++ b/node_modules/globule/node_modules/lodash/util.js @@ -4,6 +4,7 @@ module.exports = { 'cond': require('./cond'), 'conforms': require('./conforms'), 'constant': require('./constant'), + 'defaultTo': require('./defaultTo'), 'flow': require('./flow'), 'flowRight': require('./flowRight'), 'identity': require('./identity'), @@ -22,6 +23,11 @@ module.exports = { 'propertyOf': require('./propertyOf'), 'range': require('./range'), 'rangeRight': require('./rangeRight'), + 'stubArray': require('./stubArray'), + 'stubFalse': require('./stubFalse'), + 'stubObject': require('./stubObject'), + 'stubString': require('./stubString'), + 'stubTrue': require('./stubTrue'), 'times': require('./times'), 'toPath': require('./toPath'), 'uniqueId': require('./uniqueId') diff --git a/node_modules/lodash/package/value.js b/node_modules/globule/node_modules/lodash/value.js similarity index 100% rename from node_modules/lodash/package/value.js rename to node_modules/globule/node_modules/lodash/value.js diff --git a/node_modules/lodash/package/valueOf.js b/node_modules/globule/node_modules/lodash/valueOf.js similarity index 100% rename from node_modules/lodash/package/valueOf.js rename to node_modules/globule/node_modules/lodash/valueOf.js diff --git a/node_modules/lodash/package/values.js b/node_modules/globule/node_modules/lodash/values.js similarity index 91% rename from node_modules/lodash/package/values.js rename to node_modules/globule/node_modules/lodash/values.js index 738260b..b069654 100644 --- a/node_modules/lodash/package/values.js +++ b/node_modules/globule/node_modules/lodash/values.js @@ -28,7 +28,7 @@ var baseValues = require('./_baseValues'), * // => ['h', 'i'] */ function values(object) { - return object ? baseValues(object, keys(object)) : []; + return object == null ? [] : baseValues(object, keys(object)); } module.exports = values; diff --git a/node_modules/lodash/package/valuesIn.js b/node_modules/globule/node_modules/lodash/valuesIn.js similarity index 100% rename from node_modules/lodash/package/valuesIn.js rename to node_modules/globule/node_modules/lodash/valuesIn.js diff --git a/node_modules/lodash/package/without.js b/node_modules/globule/node_modules/lodash/without.js similarity index 58% rename from node_modules/lodash/package/without.js rename to node_modules/globule/node_modules/lodash/without.js index 4ce45c1..3a28e8a 100644 --- a/node_modules/lodash/package/without.js +++ b/node_modules/globule/node_modules/lodash/without.js @@ -1,26 +1,28 @@ var baseDifference = require('./_baseDifference'), - isArrayLikeObject = require('./isArrayLikeObject'), - rest = require('./rest'); + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'); /** * Creates an array excluding all given values using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * + * **Note:** Unlike `_.pull`, this method returns a new array. + * * @static * @memberOf _ * @since 0.1.0 * @category Array - * @param {Array} array The array to filter. + * @param {Array} array The array to inspect. * @param {...*} [values] The values to exclude. * @returns {Array} Returns the new array of filtered values. * @see _.difference, _.xor * @example * - * _.without([1, 2, 1, 3], 1, 2); + * _.without([2, 1, 2, 3], 1, 2); * // => [3] */ -var without = rest(function(array, values) { +var without = baseRest(function(array, values) { return isArrayLikeObject(array) ? baseDifference(array, values) : []; diff --git a/node_modules/globule/node_modules/lodash/words.js b/node_modules/globule/node_modules/lodash/words.js new file mode 100644 index 0000000..6d7cdd1 --- /dev/null +++ b/node_modules/globule/node_modules/lodash/words.js @@ -0,0 +1,35 @@ +var asciiWords = require('./_asciiWords'), + hasUnicodeWord = require('./_hasUnicodeWord'), + toString = require('./toString'), + unicodeWords = require('./_unicodeWords'); + +/** + * Splits `string` into an array of its words. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {RegExp|string} [pattern] The pattern to match words. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the words of `string`. + * @example + * + * _.words('fred, barney, & pebbles'); + * // => ['fred', 'barney', 'pebbles'] + * + * _.words('fred, barney, & pebbles', /[^, ]+/g); + * // => ['fred', 'barney', '&', 'pebbles'] + */ +function words(string, pattern, guard) { + string = toString(string); + pattern = guard ? undefined : pattern; + + if (pattern === undefined) { + return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); + } + return string.match(pattern) || []; +} + +module.exports = words; diff --git a/node_modules/lodash/package/wrap.js b/node_modules/globule/node_modules/lodash/wrap.js similarity index 56% rename from node_modules/lodash/package/wrap.js rename to node_modules/globule/node_modules/lodash/wrap.js index 9a4542d..cad3c50 100644 --- a/node_modules/lodash/package/wrap.js +++ b/node_modules/globule/node_modules/lodash/wrap.js @@ -1,11 +1,11 @@ -var identity = require('./identity'), +var castFunction = require('./_castFunction'), partial = require('./partial'); /** - * Creates a function that provides `value` to the wrapper function as its - * first argument. Any additional arguments provided to the function are - * appended to those provided to the wrapper function. The wrapper is invoked - * with the `this` binding of the created function. + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. * * @static * @memberOf _ @@ -24,8 +24,7 @@ var identity = require('./identity'), * // => '

fred, barney, & pebbles

' */ function wrap(value, wrapper) { - wrapper = wrapper == null ? identity : wrapper; - return partial(wrapper, value); + return partial(castFunction(wrapper), value); } module.exports = wrap; diff --git a/node_modules/lodash/package/wrapperAt.js b/node_modules/globule/node_modules/lodash/wrapperAt.js similarity index 85% rename from node_modules/lodash/package/wrapperAt.js rename to node_modules/globule/node_modules/lodash/wrapperAt.js index 1190894..ab3d22a 100644 --- a/node_modules/lodash/package/wrapperAt.js +++ b/node_modules/globule/node_modules/lodash/wrapperAt.js @@ -1,9 +1,8 @@ var LazyWrapper = require('./_LazyWrapper'), LodashWrapper = require('./_LodashWrapper'), baseAt = require('./_baseAt'), - baseFlatten = require('./_baseFlatten'), + flatRest = require('./_flatRest'), isIndex = require('./_isIndex'), - rest = require('./rest'), thru = require('./thru'); /** @@ -21,12 +20,8 @@ var LazyWrapper = require('./_LazyWrapper'), * * _(object).at(['a[0].b.c', 'a[1]']).value(); * // => [3, 4] - * - * _(['a', 'b', 'c']).at(0, 2).value(); - * // => ['a', 'c'] */ -var wrapperAt = rest(function(paths) { - paths = baseFlatten(paths, 1); +var wrapperAt = flatRest(function(paths) { var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, diff --git a/node_modules/lodash/package/wrapperChain.js b/node_modules/globule/node_modules/lodash/wrapperChain.js similarity index 100% rename from node_modules/lodash/package/wrapperChain.js rename to node_modules/globule/node_modules/lodash/wrapperChain.js diff --git a/node_modules/lodash/package/wrapperLodash.js b/node_modules/globule/node_modules/lodash/wrapperLodash.js similarity index 74% rename from node_modules/lodash/package/wrapperLodash.js rename to node_modules/globule/node_modules/lodash/wrapperLodash.js index 717ff8e..bf27a3c 100644 --- a/node_modules/lodash/package/wrapperLodash.js +++ b/node_modules/globule/node_modules/lodash/wrapperLodash.js @@ -77,28 +77,30 @@ var hasOwnProperty = objectProto.hasOwnProperty; * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `divide`, `each`, - * `eachRight`, `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`, - * `findIndex`, `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`, - * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, - * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, - * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, - * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`, - * `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`, - * `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`, - * `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, - * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`, - * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, - * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, - * `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, `min`, `minBy`, `multiply`, - * `noConflict`, `noop`, `now`, `nth`, `pad`, `padEnd`, `padStart`, `parseInt`, - * `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`, - * `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, - * `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, - * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toInteger`, - * `toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`, `toString`, - * `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, - * `uniqueId`, `upperCase`, `upperFirst`, `value`, and `words` + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` * * @name _ * @constructor diff --git a/node_modules/lodash/package/wrapperReverse.js b/node_modules/globule/node_modules/lodash/wrapperReverse.js similarity index 100% rename from node_modules/lodash/package/wrapperReverse.js rename to node_modules/globule/node_modules/lodash/wrapperReverse.js diff --git a/node_modules/lodash/package/wrapperValue.js b/node_modules/globule/node_modules/lodash/wrapperValue.js similarity index 100% rename from node_modules/lodash/package/wrapperValue.js rename to node_modules/globule/node_modules/lodash/wrapperValue.js diff --git a/node_modules/lodash/package/xor.js b/node_modules/globule/node_modules/lodash/xor.js similarity index 70% rename from node_modules/lodash/package/xor.js rename to node_modules/globule/node_modules/lodash/xor.js index 6d4d4b1..d4d2860 100644 --- a/node_modules/lodash/package/xor.js +++ b/node_modules/globule/node_modules/lodash/xor.js @@ -1,7 +1,7 @@ var arrayFilter = require('./_arrayFilter'), + baseRest = require('./_baseRest'), baseXor = require('./_baseXor'), - isArrayLikeObject = require('./isArrayLikeObject'), - rest = require('./rest'); + isArrayLikeObject = require('./isArrayLikeObject'); /** * Creates an array of unique values that is the @@ -14,14 +14,14 @@ var arrayFilter = require('./_arrayFilter'), * @since 2.4.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of values. + * @returns {Array} Returns the new array of filtered values. * @see _.difference, _.without * @example * - * _.xor([2, 1], [4, 2]); - * // => [1, 4] + * _.xor([2, 1], [2, 3]); + * // => [1, 3] */ -var xor = rest(function(arrays) { +var xor = baseRest(function(arrays) { return baseXor(arrayFilter(arrays, isArrayLikeObject)); }); diff --git a/node_modules/lodash/package/xorBy.js b/node_modules/globule/node_modules/lodash/xorBy.js similarity index 60% rename from node_modules/lodash/package/xorBy.js rename to node_modules/globule/node_modules/lodash/xorBy.js index efb977d..e047895 100644 --- a/node_modules/lodash/package/xorBy.js +++ b/node_modules/globule/node_modules/lodash/xorBy.js @@ -1,39 +1,39 @@ var arrayFilter = require('./_arrayFilter'), baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), baseXor = require('./_baseXor'), isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.xor` except that it accepts `iteratee` which is * invoked for each element of each `arrays` to generate the criterion by - * which by which they're compared. The iteratee is invoked with one argument: - * (value). + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. - * @returns {Array} Returns the new array of values. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. * @example * - * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor); - * // => [1.2, 4.3] + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] * * // The `_.property` iteratee shorthand. * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 2 }] */ -var xorBy = rest(function(arrays) { +var xorBy = baseRest(function(arrays) { var iteratee = last(arrays); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } - return baseXor(arrayFilter(arrays, isArrayLikeObject), baseIteratee(iteratee)); + return baseXor(arrayFilter(arrays, isArrayLikeObject), baseIteratee(iteratee, 2)); }); module.exports = xorBy; diff --git a/node_modules/lodash/package/xorWith.js b/node_modules/globule/node_modules/lodash/xorWith.js similarity index 63% rename from node_modules/lodash/package/xorWith.js rename to node_modules/globule/node_modules/lodash/xorWith.js index d1335b8..e3a8ac6 100644 --- a/node_modules/lodash/package/xorWith.js +++ b/node_modules/globule/node_modules/lodash/xorWith.js @@ -1,13 +1,14 @@ var arrayFilter = require('./_arrayFilter'), + baseRest = require('./_baseRest'), baseXor = require('./_baseXor'), isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.xor` except that it accepts `comparator` which is - * invoked to compare elements of `arrays`. The comparator is invoked with - * two arguments: (arrVal, othVal). + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). * * @static * @memberOf _ @@ -15,7 +16,7 @@ var arrayFilter = require('./_arrayFilter'), * @category Array * @param {...Array} [arrays] The arrays to inspect. * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of values. + * @returns {Array} Returns the new array of filtered values. * @example * * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; @@ -24,11 +25,9 @@ var arrayFilter = require('./_arrayFilter'), * _.xorWith(objects, others, _.isEqual); * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ -var xorWith = rest(function(arrays) { +var xorWith = baseRest(function(arrays) { var comparator = last(arrays); - if (isArrayLikeObject(comparator)) { - comparator = undefined; - } + comparator = typeof comparator == 'function' ? comparator : undefined; return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); }); diff --git a/node_modules/lodash/package/zip.js b/node_modules/globule/node_modules/lodash/zip.js similarity index 73% rename from node_modules/lodash/package/zip.js rename to node_modules/globule/node_modules/lodash/zip.js index e1cbbbb..c800ab3 100644 --- a/node_modules/lodash/package/zip.js +++ b/node_modules/globule/node_modules/lodash/zip.js @@ -1,4 +1,4 @@ -var rest = require('./rest'), +var baseRest = require('./_baseRest'), unzip = require('./unzip'); /** @@ -14,9 +14,9 @@ var rest = require('./rest'), * @returns {Array} Returns the new array of grouped elements. * @example * - * _.zip(['fred', 'barney'], [30, 40], [true, false]); - * // => [['fred', 30, true], ['barney', 40, false]] + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] */ -var zip = rest(unzip); +var zip = baseRest(unzip); module.exports = zip; diff --git a/node_modules/lodash/package/zipObject.js b/node_modules/globule/node_modules/lodash/zipObject.js similarity index 100% rename from node_modules/lodash/package/zipObject.js rename to node_modules/globule/node_modules/lodash/zipObject.js diff --git a/node_modules/lodash/package/zipObjectDeep.js b/node_modules/globule/node_modules/lodash/zipObjectDeep.js similarity index 100% rename from node_modules/lodash/package/zipObjectDeep.js rename to node_modules/globule/node_modules/lodash/zipObjectDeep.js diff --git a/node_modules/lodash/package/zipWith.js b/node_modules/globule/node_modules/lodash/zipWith.js similarity index 89% rename from node_modules/lodash/package/zipWith.js rename to node_modules/globule/node_modules/lodash/zipWith.js index d01b638..d7a1f91 100644 --- a/node_modules/lodash/package/zipWith.js +++ b/node_modules/globule/node_modules/lodash/zipWith.js @@ -1,4 +1,4 @@ -var rest = require('./rest'), +var baseRest = require('./_baseRest'), unzipWith = require('./unzipWith'); /** @@ -11,7 +11,8 @@ var rest = require('./rest'), * @since 3.8.0 * @category Array * @param {...Array} [arrays] The arrays to process. - * @param {Function} [iteratee=_.identity] The function to combine grouped values. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. * @returns {Array} Returns the new array of grouped elements. * @example * @@ -20,7 +21,7 @@ var rest = require('./rest'), * }); * // => [111, 222] */ -var zipWith = rest(function(arrays) { +var zipWith = baseRest(function(arrays) { var length = arrays.length, iteratee = length > 1 ? arrays[length - 1] : undefined; diff --git a/node_modules/globule/package.json b/node_modules/globule/package.json new file mode 100644 index 0000000..4283e79 --- /dev/null +++ b/node_modules/globule/package.json @@ -0,0 +1,50 @@ +{ + "name": "globule", + "description": "An easy-to-use wildcard globbing library.", + "version": "1.1.0", + "homepage": "https://github.com/cowboy/node-globule", + "author": { + "name": "\"Cowboy\" Ben Alman", + "url": "http://benalman.com/" + }, + "repository": { + "type": "git", + "url": "git://github.com/cowboy/node-globule.git" + }, + "bugs": { + "url": "https://github.com/cowboy/node-globule/issues" + }, + "license": "MIT", + "main": "lib/globule", + "files": [ + "lib" + ], + "engines": { + "node": ">= 0.10" + }, + "scripts": { + "test": "grunt" + }, + "devDependencies": { + "grunt-contrib-jshint": "^1.0.0", + "grunt-contrib-nodeunit": "^1.0.0", + "grunt-contrib-watch": "^1.0.0", + "grunt": "^1.0.0" + }, + "keywords": [ + "glob", + "file", + "match", + "mapping", + "expand", + "wildcard", + "pattern", + "sync", + "awesome" + ], + "dependencies": { + "glob": "~7.1.1", + "lodash": "~4.16.4", + "minimatch": "~3.0.2" + } +} diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/.editorconfig b/node_modules/gonzales-pe/.editorconfig similarity index 100% rename from node_modules/sass-lint/node_modules/gonzales-pe-sl/.editorconfig rename to node_modules/gonzales-pe/.editorconfig diff --git a/node_modules/gonzales-pe/.eslintrc.yaml b/node_modules/gonzales-pe/.eslintrc.yaml new file mode 100644 index 0000000..897280e --- /dev/null +++ b/node_modules/gonzales-pe/.eslintrc.yaml @@ -0,0 +1,63 @@ +--- + parserOptions: + ecmaVersion: 6 + sourceType: module + env: + es6: true + mocha: true + rules: + no-dupe-args: error + no-dupe-keys: error + no-duplicate-case: error + no-empty: error + no-func-assign: error + no-inner-declarations: error + no-irregular-whitespace: error + no-unexpected-multiline: error + no-unreachable: error + use-isnan: error + valid-jsdoc: + - off + - + prefer: + returns: return + preferType: + Boolean: boolean + Number: number + String: string + array: Array + object: Object + requireReturn: false + requireParamDescription: false + requireReturnDescription: false + valid-typeof: error + dot-location: + - error + - property + eqeqeq: error + no-empty-function: error + no-extend-native: error + no-extra-bind: error + no-multi-spaces: error + no-native-reassign: error + no-redeclare: error + no-return-assign: error + no-unused-expressions: error + radix: error + yoda: error + no-unused-vars: error + array-bracket-spacing: error + comma-spacing: error + indent: + - off + - 2 + max-len: error + max-params: + - warn + - 5 + no-lonely-if: error + no-nested-ternary: error + no-spaced-func: error + no-trailing-spaces: error + no-var: off + prefer-const: off diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/.gitmessage.txt b/node_modules/gonzales-pe/.gitmessage.txt similarity index 100% rename from node_modules/sass-lint/node_modules/gonzales-pe-sl/.gitmessage.txt rename to node_modules/gonzales-pe/.gitmessage.txt diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/.jscs.json b/node_modules/gonzales-pe/.jscs.json similarity index 97% rename from node_modules/sass-lint/node_modules/gonzales-pe-sl/.jscs.json rename to node_modules/gonzales-pe/.jscs.json index f15790a..f4af042 100644 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/.jscs.json +++ b/node_modules/gonzales-pe/.jscs.json @@ -13,6 +13,7 @@ "disallowTrailingComma": true, "disallowTrailingWhitespace": true, "esnext": true, + "excludeFiles": ["src/syntaxes.js"], "maximumLineLength": 80, "requireBlocksOnNewline": 1, "requireCapitalizedComments": true, @@ -57,7 +58,6 @@ "checkRedundantReturns": true, "checkReturnTypes": true, "checkTypes": true, - "disallowNewlineAfterDescription": true, "requireParamTypes": true, "requireReturnTypes": true } diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/.jshintrc b/node_modules/gonzales-pe/.jshintrc similarity index 100% rename from node_modules/sass-lint/node_modules/gonzales-pe-sl/.jshintrc rename to node_modules/gonzales-pe/.jshintrc diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/.npmignore b/node_modules/gonzales-pe/.npmignore similarity index 100% rename from node_modules/sass-lint/node_modules/gonzales-pe-sl/.npmignore rename to node_modules/gonzales-pe/.npmignore diff --git a/node_modules/gonzales-pe/.travis.yml b/node_modules/gonzales-pe/.travis.yml new file mode 100644 index 0000000..feae4ca --- /dev/null +++ b/node_modules/gonzales-pe/.travis.yml @@ -0,0 +1,14 @@ +language: node_js + +node_js: + - "5.0" + - "4.2" + - "4.1" + - "4.0" + - "0.12" + - "0.11" + - "0.10" + +matrix: + allow_failures: + - node_js: "0.11" diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/CHANGELOG.md b/node_modules/gonzales-pe/CHANGELOG.md similarity index 66% rename from node_modules/sass-lint/node_modules/gonzales-pe-sl/CHANGELOG.md rename to node_modules/gonzales-pe/CHANGELOG.md index 793405f..131b077 100644 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/CHANGELOG.md +++ b/node_modules/gonzales-pe/CHANGELOG.md @@ -5,41 +5,118 @@ :japanese_ogre: — be afraid of this change because it breaks the way things worked before. :star: — some new thing has been added. -:green_apple: — some bad thing has been fixed. +:green_apple: — some bad thing has been fixed. ---- +## 22.10.2016, version 3.4.7 -# GONZALES-PE-SL FORK CHANGES +:green_apple: Included forgotten test for #226. +:green_apple: Fixed issue when `!important` was not parsed as function argument. -As of 3.2.6 The sasstools team decided to fork and maintain a separate copy of gonzales-pe named gonzales-pe-sl. Our intention is to still provide fixes etc back into gonzales-pe but at the same time allow sass-lint and anyone else who feels like they want to depend on this fork to continue and progress with any issues that remain unfixed/unmerged in the base repository. We will be looking to support this fork for as long as is necessary. +## 22.10.2016, version 3.4.6 -## 27.04.2016, Version 3.2.8 -:green_apple: - Fixed a nested child selectors bug for Sass and SCSS format [#8](https://github.com/DanPurdy/gonzales-pe/pull/8) +:green_apple: Changed parsing of `ident` nodes which fixed issue with asterisks +being parsed as idents instead of operators. +:green_apple: Fixed capitalisation in Changelog. -:green_apple: - Fixed an in issue with functions inside `url()` [#5](https://github.com/DanPurdy/gonzales-pe/pull/5) +## 20.10.2016, version 3.4.5 -## 21.04.2016, Version 3.2.7 -:green_apple: - Removed postinstall bash specific scripts, to work on the development version you will manually need to run these now but installing from NPM now won't fail for all users not using bash. +:green_apple: Change parser to strip DOS newlines from comments. +:star: Add links to README.md. -:green_apple: - Fixed CRLF line endings and line/column numbers for `.sass`, `.scss` syntaxes. +## 12.08.2016, version 3.4.4 -:green_apple: - Fixed @extends not reporting correctly in Sass. +:green_apple: Fixed parsing of numbers following interpolation in class +selectors in Sass and SCSS. ---- +## 08.08.2016, version 3.4.3 -## 07.02.2016, Version 3.2.6 +:green_apple: Fixed parsing of unicode ranges. + +## 04.08.2016, version 3.4.2 + +:green_apple: Disable Google Closure Compiler due to some errors in parsing. + +## 27.07.2016, version 3.4.1 + +:star: Added publich script. +:green_apple: Fixed post-refactor error in Node#last method. + +## 27.07.2016, version 3.4.0 + +:star: Added `unicode-range` and `urange` node types in CSS, Less, Sass and SCSS. +:green_apple: Fixed parsing of trailing interpolation in compound selector in Sass and SCSS. +:green_apple: Fix parsing of hyphens after interpolation with parentSelectors in Sass and SCSS. +:green_apple: Added ESLint and moved linters to a separate script. +:green_apple: Fixed incorrect dimension wrap of unicode-ranges in CSS, Sass and SCSS. +:green_apple: Fixed parsing of hyphens in interpolated idents in Sass and SCSS. +:green_apple: Added compilation of JS using Google Closure. + +## 01.07.2016, version 3.3.6 + +:green_apple: Fixed parsing of nth selector without numbers before `n`. + +## 21.06.2016, version 3.3.5 + +:green_apple: Fixed issue with content at-rule and keyframes in Sass and SCSS. +:green_apple: Fixed namespace attribute selector in CSS, Sass and SCSS. +:green_apple: Fixed issue with modulo operator in values in Sass. +:green_apple: Fixed usage of @content with keyframes in Sass and SCSS. +:green_apple: Fixed namespace attribute selector issue in CSS, Sass and SCSS. +:green_apple: Fixed parsing of interpolations in pseudo-classes in Sass and SCSS. +:green_apple: Fixed interpolated percentage keyframe selector issue in Sass and SCSS. +:green_apple: Updated Travis config to not include environment variables. + +## 18.05.2016, version 3.3.4 + +:green_apple: Fixed mistake from `@3.3.2` version when parent selector was +"correctly" parsed as property instead of value. + +## 18.05.2016, version 3.3.3 + +:green_apple: Fixed prepublish script to build lib. + +## 18.05.2016, version 3.3.2 + +:star: Added AppVeyor badge. +:green_apple: Fixed build file to glue multiple syntaxes into one file. +:green_apple: Fixed parsing of functions inside urls in Sass. +:green_apple: Fixed parsing of mulitple keyframe selectors in CSS, Sass and SCSS. +:green_apple: Fixed parsing of parent selector as property in Sass and SCSS. +:green_apple: Fixed parsing of parent selector inside interpolations in Sass and SCSS. + +## 29.04.2016, version 3.3.1 + +:star: Added config for AppVeyor to run automated tests on Windows. +:green_apple: Fix installation for Windows. + +## 28.04.2016, version 3.3.0 + +:star: Added browser support. `build.sh` now build a script that can be used in +browsers. + +## 28.04.2016, version 3.2.7 + +:green_apple: Fixed typos and example in documentation. +:green_apple: Fixed parsing of functions inside urls in SCSS. +:green_apple: Fixed parsing of selectors starting with combinators in Sass, SCSS +and Less. +:green_apple: Fixed incorrect CRLF line numbers. +:green_apple: Fixed parsing of extends that sometimes were incorrectly parsed +as atrules. + +## 07.02.2016, version 3.2.6 :green_apple: Fixed the issue with installation of the package with npm@3. -## 07.02.2016, Version 3.2.5 +## 07.02.2016, version 3.2.5 :green_apple: Fixed parsing of nested multiline selectors group. -## 07.02.2016, Version 3.2.4 +## 07.02.2016, version 3.2.4 :star: Added support for `!global` in Sass. -## 07.02.2016, Version 3.2.3 +## 07.02.2016, version 3.2.3 :star: Modified `npm test` to remove `.DS_Store` files before running tests. :star: Updated Travis config to use Node@5.0. @@ -50,11 +127,11 @@ As of 3.2.6 The sasstools team decided to fork and maintain a separate copy of g extension in Sass and SCSS. :green_apple: Fixed issue with keyframeSelector in includes in SCSS. -## 17.01.2016, Version 3.2.2 +## 17.01.2016, version 3.2.2 :green_apple: Made `ParsingError#message` property writeable. -## 19.10.2015, Version 3.2.1 +## 19.10.2015, version 3.2.1 #### Parsing rules @@ -62,7 +139,7 @@ extension in Sass and SCSS. `selector` nodes in Sass and SCSS. :green_apple: Fixed parsing of multiple selectors in extends in Sass and SCSS. -## 19.10.2015, Version 3.2.0 +## 19.10.2015, version 3.2.0 #### Node types @@ -73,14 +150,14 @@ extension in Sass and SCSS. :green_apple: Fixed parsing of parent selectors with extensions, like `&__element` or `&--modifier`. -## 19.10.2015, Version 3.1.1 +## 19.10.2015, version 3.1.1 #### Parsing rules :green_apple: Fixed parsing of selectors starting or ending with a combinator in Less, Sass and SCSS. -## 18.10.2015, Version 3.1.0 +## 18.10.2015, version 3.1.0 #### CLI @@ -95,26 +172,26 @@ in Less, Sass and SCSS. :green_apple: Fixed parsing of keyframes in all syntaxes. -## 18.10.2015, Version 3.0.3 +## 18.10.2015, version 3.0.3 #### Parsing rules :green_apple: Fixed parsing of spaces inside interpolations in Sass and SCSS. -## 18.10.2015, Version 3.0.2 +## 18.10.2015, version 3.0.2 #### Parsing rules :green_apple: Fixed the issue when operators were parsed as idents inside parentheses in Sass and SCSS. -## 18.10.2015, Version 3.0.1 +## 18.10.2015, version 3.0.1 #### Parsing rules :green_apple: Fixed parsing of parent selectors in SCSS and Less. :green_apple: Fixed parsing of placeholders inside selectors in SCSS. -## 18.10.2015, Version 3.0.0 +## 18.10.2015, version 3.0.0 #### CLI @@ -145,7 +222,7 @@ parentheses in Sass and SCSS. :star: Added init script to build sources. :star: Added commit message template. -## 05.10.2015, Version 3.0.0-beta +## 05.10.2015, version 3.0.0-beta #### CLI @@ -227,16 +304,16 @@ nodes in parse tree. :rocket: Moved source files from `lib` to `src` directory. :rocket: Made package availbale for install from GitHub. -## 29.12.2013, Version 2.0.2 +## 29.12.2013, version 2.0.2 - Sass includes can have both arguments list and content block, i.e. `@include nani() { color: tomato }` is valid syntax. -## 18.11.2013, Version 2.0.1 +## 18.11.2013, version 2.0.1 - Bring back lost whitespaces and comments -## 11.11.2013, Version 2.0.0 +## 11.11.2013, version 2.0.0 - Support preprocessors: Sass (both SCSS and indented syntax), LESS. - New node types: @@ -268,37 +345,37 @@ nodes in parse tree. - Add script to test one specific css string - Add token's index number to info object -## 11.02.2013, Version 1.0.7 +## 11.02.2013, version 1.0.7 - Identifiers like `_0` are identifiers now. - Throw error instead of console.error: https://github.com/css/csso/issues/109 -## 25.11.2012, Version 1.0.6 +## 25.11.2012, version 1.0.6 - Typo fix (global variable leak): https://github.com/css/csso/pull/110 - Attribute selectors extended by `|`. - `not(..)` pseudo-class special support: https://github.com/css/csso/issues/111 -## 28.10.2012, Version 1.0.5 +## 28.10.2012, version 1.0.5 - Better error line numbering: https://github.com/css/gonzales/issues/2 -## 11.10.2012, Version 1.0.4 +## 11.10.2012, version 1.0.4 - CSSO issue (@page inside @media error): https://github.com/css/csso/issues/90 -## 10.10.2012, Version 1.0.3 +## 10.10.2012, version 1.0.3 - Both .t-1 and .t-01 should be idents: https://github.com/css/gonzales/issues/1 -## 08.10.2012, Version 1.0.2 +## 08.10.2012, version 1.0.2 - CSSO issue (filter + important breaks csso v1.3.1): https://github.com/css/csso/issues/87 -## 08.10.2012, Version 1.0.1 +## 08.10.2012, version 1.0.1 - CSSO issue ("filter" IE property breaks CSSO v1.3.0): https://github.com/css/csso/issues/86 -## 03.10.2012, Version 1.0.0 +## 03.10.2012, version 1.0.0 - First revision. diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/MIT-LICENSE.txt b/node_modules/gonzales-pe/MIT-LICENSE.txt similarity index 100% rename from node_modules/sass-lint/node_modules/gonzales-pe-sl/MIT-LICENSE.txt rename to node_modules/gonzales-pe/MIT-LICENSE.txt diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/README.md b/node_modules/gonzales-pe/README.md similarity index 97% rename from node_modules/sass-lint/node_modules/gonzales-pe-sl/README.md rename to node_modules/gonzales-pe/README.md index 93a81d3..f2154dd 100644 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/README.md +++ b/node_modules/gonzales-pe/README.md @@ -2,9 +2,12 @@ [![Build Status](https://travis-ci.org/tonyganch/gonzales-pe.svg)] (https://travis-ci.org/tonyganch/gonzales-pe) +[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/m29jphtrqt398v2o/branch/dev?svg=true)] +(https://ci.appveyor.com/project/tonyganch/gonzales-pe/branch/dev) Gonzales PE is a CSS parser which plays nicely with preprocessors. -Currently those are supported: SCSS, Sass, LESS. +Currently those are supported: SCSS, Sass, LESS. +Try out Gonzales PE online: [Gonzales PE Playground](http://tonyganch.com/gonzales-pe/). ## Install @@ -43,6 +46,8 @@ Basically there are a few things you can do: 4. add new nodes to the tree; 5. convert modified tree back to a string. +The different type of tree nodes can be found in [docs/node-types.md](https://github.com/tonyganch/gonzales-pe/blob/dev/docs/node-types.md). + In examples below I assume that `gonzales` is a parser module and `parseTree` is some parsed css: @@ -280,7 +285,7 @@ parseTree.eachFor('space', function(spaceNode, i) { ##### Description -Gets the first child node. If `type` parameter is passed, gets the fisrt child +Gets the first child node. If `type` parameter is passed, gets the first child node of a given type. If no node has been found, returns `null`. ##### Parameters diff --git a/node_modules/gonzales-pe/appveyor.yml b/node_modules/gonzales-pe/appveyor.yml new file mode 100644 index 0000000..2d3905d --- /dev/null +++ b/node_modules/gonzales-pe/appveyor.yml @@ -0,0 +1,21 @@ +# Test against this version of Node.js +environment: + nodejs_version: "4.2" + +# Install scripts. (runs after repo cloning) +install: + # Get the latest stable version of Node.js or io.js + - ps: Install-Product node $env:nodejs_version + # install modules + - npm install + +# Post-install test scripts. +test_script: + # Output useful info for debugging. + - node --version + - npm --version + # run tests + - npm test + +# Don't actually build. +build: off diff --git a/node_modules/gonzales-pe/bin/gonzales.js b/node_modules/gonzales-pe/bin/gonzales.js new file mode 100644 index 0000000..22968a2 --- /dev/null +++ b/node_modules/gonzales-pe/bin/gonzales.js @@ -0,0 +1,116 @@ +#!/usr/bin/env node + +'use strict'; + +var parseArgs = require('minimist'); +var gonzales = require('..'); +var fs = require('fs'); +var path = require('path'); + +var options = getOptions(); + +if (options.help) { + displayHelp(); + process.exit(0); +} + +if (isSTDIN()) { + processSTDIN(); +} else { + processFile(options._[0]); +} + +function getOptions() { + var parserOptions = { + boolean: ['silent', 'simple'], + alias: { + help: 'h', + syntax: 's', + context: 'c' + } + }; + return parseArgs(process.argv.slice(2), parserOptions); +} + +function isSTDIN() { + return options._.indexOf('-') !== -1; +} + +function processSTDIN() { + var input = ''; + process.stdin.resume(); + process.stdin.setEncoding('utf8'); + process.stdin.on('data', data => { + input += data; + }); + process.stdin.on('end', () => { + processInputData(input); + }); +} + +function processFile(file) { + if (!file) process.exit(0); + if (!options.syntax) options.syntax = path.extname(file).substring(1); + var css = fs.readFileSync(file, 'utf-8').trim(); + processInputData(css); +} + +function processInputData(input) { + try { + var ast = gonzales.parse(input, { + syntax: options.syntax, + context: options.context + }); + printTree(ast); + process.exit(0); + } catch (e) { + if (!options.silent) process.stderr.write(e.toString()); + process.exit(1); + } +} + +function printTree(ast) { + if (!options.simple) { + var tree = ast.toJson(); + process.stdout.write(tree); + } else { + var lastLevel; + + ast.traverse(function(node, i, parent, lastLevel) { + var type = node.type; + var spaces = new Array(lastLevel).join(' |'); + if (typeof node.content === 'string') { + var content = JSON.stringify(node.content); + console.log(spaces, '->', type); + console.log(spaces, ' ', content); + } else { + console.log(spaces, '->', type); + } + }); + + var spaces = new Array(lastLevel).join(' -'); + console.log(spaces); + } +} + +function displayHelp() { + var help = [ + 'NAME', + ' gonzlaes-pe — Parse a css file and print its parse tree in JSON', + '', + 'SYNOPSIS', + ' gonzales-pe [options] file.js', + ' cat file.js | gonzales-pe [options] -', + '', + 'OPTIONS', + ' -s, --syntax', + ' Syntax name: css, less, sass or scss.', + ' -c, --context', + ' Context of code part. See docs on node types for more info.', + ' --simple', + ' Print a simplified parse tree structure instead of JSON.', + ' --silent', + ' Don\'t print any error messages.' + ]; + console.log(help.join('\n')); +} diff --git a/node_modules/gonzales-pe/lib/gonzales.js b/node_modules/gonzales-pe/lib/gonzales.js new file mode 100644 index 0000000..16d0821 --- /dev/null +++ b/node_modules/gonzales-pe/lib/gonzales.js @@ -0,0 +1,11873 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["gonzales"] = factory(); + else + root["gonzales"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var Node = __webpack_require__(1); + var parse = __webpack_require__(7); + + module.exports = { + createNode: function (options) { + return new Node(options); + }, + parse: parse + }; + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + /** + * @param {string} type + * @param {array|string} content + * @param {number} line + * @param {number} column + * @constructor + */ + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + var Node = (function () { + function Node(options) { + _classCallCheck(this, Node); + + this.type = options.type; + this.content = options.content; + this.syntax = options.syntax; + + if (options.start) this.start = options.start; + if (options.end) this.end = options.end; + } + + /** + * @param {String} type Node type + * @return {Boolean} Whether there is a child node of given type + */ + + Node.prototype.contains = function contains(type) { + return this.content.some(function (node) { + return node.type === type; + }); + }; + + /** + * @param {String} type Node type + * @param {Function} callback Function to call for every found node + */ + + Node.prototype.eachFor = function eachFor(type, callback) { + if (!Array.isArray(this.content)) return; + + if (typeof type !== 'string') { + callback = type; + type = null; + } + + var l = this.content.length; + var breakLoop; + + for (var i = l; i--;) { + if (breakLoop === null) break; + + if (!type || this.content[i] && this.content[i].type === type) breakLoop = callback(this.content[i], i, this); + } + + if (breakLoop === null) return null; + }; + + /** + * @param {String} type + * @return {?Node} First child node or `null` if nothing's been found. + */ + + Node.prototype.first = function first(type) { + if (!Array.isArray(this.content)) return null; + + if (!type) return this.content[0]; + + var i = 0; + var l = this.content.length; + + for (; i < l; i++) { + if (this.content[i].type === type) return this.content[i]; + } + + return null; + }; + + /** + * @param {String} type Node type + * @param {Function} callback Function to call for every found node + */ + + Node.prototype.forEach = function forEach(type, callback) { + if (!Array.isArray(this.content)) return; + + if (typeof type !== 'string') { + callback = type; + type = null; + } + + var i = 0; + var l = this.content.length; + var breakLoop; + + for (; i < l; i++) { + if (breakLoop === null) break; + + if (!type || this.content[i] && this.content[i].type === type) breakLoop = callback(this.content[i], i, this); + } + + if (breakLoop === null) return null; + }; + + /** + * @param {Number} index + * @return {?Node} + */ + + Node.prototype.get = function get(index) { + if (!Array.isArray(this.content)) return null; + + var node = this.content[index]; + return node ? node : null; + }; + + /** + * @param {Number} index + * @param {Node} node + */ + + Node.prototype.insert = function insert(index, node) { + if (!Array.isArray(this.content)) return; + + this.content.splice(index, 0, node); + }; + + /** + * @param {String} type + * @return {Boolean} Whether the node is of given type + */ + + Node.prototype.is = function is(type) { + return this.type === type; + }; + + /** + * @param {String} type + * @return {?Node} Last child node or `null` if nothing's been found. + */ + + Node.prototype.last = function last(type) { + if (!Array.isArray(this.content)) return null; + + var i = this.content.length; + if (!type) return this.content[i - 1]; + + for (; i--;) { + if (this.content[i].type === type) return this.content[i]; + } + + return null; + }; + + /** + * Number of child nodes. + * @type {number} + */ + + /** + * @param {Number} index + * @return {Node} + */ + + Node.prototype.removeChild = function removeChild(index) { + if (!Array.isArray(this.content)) return; + + var removedChild = this.content.splice(index, 1); + + return removedChild; + }; + + Node.prototype.toJson = function toJson() { + return JSON.stringify(this, false, 2); + }; + + Node.prototype.toString = function toString() { + var stringify = undefined; + + try { + stringify = __webpack_require__(2)("./" + this.syntax + '/stringify'); + } catch (e) { + var message = 'Syntax "' + this.syntax + '" is not supported yet, sorry'; + return console.error(message); + } + + return stringify(this); + }; + + /** + * @param {Function} callback + */ + + Node.prototype.traverse = function traverse(callback, index) { + var level = arguments.length <= 2 || arguments[2] === undefined ? 0 : arguments[2]; + var parent = arguments.length <= 3 || arguments[3] === undefined ? null : arguments[3]; + + var breakLoop; + var x; + + level++; + + callback(this, index, parent, level); + + if (!Array.isArray(this.content)) return; + + for (var i = 0, l = this.content.length; i < l; i++) { + breakLoop = this.content[i].traverse(callback, i, level, this); + if (breakLoop === null) break; + + // If some nodes were removed or added: + if (x = this.content.length - l) { + l += x; + i += x; + } + } + + if (breakLoop === null) return null; + }; + + Node.prototype.traverseByType = function traverseByType(type, callback) { + this.traverse(function (node) { + if (node.type === type) callback.apply(node, arguments); + }); + }; + + Node.prototype.traverseByTypes = function traverseByTypes(types, callback) { + this.traverse(function (node) { + if (types.indexOf(node.type) !== -1) callback.apply(node, arguments); + }); + }; + + _createClass(Node, [{ + key: 'length', + get: function () { + if (!Array.isArray(this.content)) return 0; + return this.content.length; + } + }]); + + return Node; + })(); + + module.exports = Node; + +/***/ }, +/* 2 */ +/***/ function(module, exports, __webpack_require__) { + + var map = { + "./css/stringify": 3, + "./less/stringify": 4, + "./sass/stringify": 5, + "./scss/stringify": 6 + }; + function webpackContext(req) { + return __webpack_require__(webpackContextResolve(req)); + }; + function webpackContextResolve(req) { + return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }()); + }; + webpackContext.keys = function webpackContextKeys() { + return Object.keys(map); + }; + webpackContext.resolve = webpackContextResolve; + module.exports = webpackContext; + webpackContext.id = 2; + + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + 'use strict'; + + module.exports = function stringify(tree) { + // TODO: Better error message + if (!tree) throw new Error('We need tree to translate'); + + function _t(tree) { + var type = tree.type; + if (_unique[type]) return _unique[type](tree); + if (typeof tree.content === 'string') return tree.content; + if (Array.isArray(tree.content)) return _composite(tree.content); + return ''; + } + + function _composite(t, i) { + if (!t) return ''; + + var s = ''; + i = i || 0; + for (; i < t.length; i++) s += _t(t[i]); + return s; + } + + var _unique = { + 'arguments': function (t) { + return '(' + _composite(t.content) + ')'; + }, + 'atkeyword': function (t) { + return '@' + _composite(t.content); + }, + 'attributeSelector': function (t) { + return '[' + _composite(t.content) + ']'; + }, + 'block': function (t) { + return '{' + _composite(t.content) + '}'; + }, + 'brackets': function (t) { + return '[' + _composite(t.content) + ']'; + }, + 'class': function (t) { + return '.' + _composite(t.content); + }, + 'color': function (t) { + return '#' + t.content; + }, + 'expression': function (t) { + return 'expression(' + t.content + ')'; + }, + 'id': function (t) { + return '#' + _composite(t.content); + }, + 'multilineComment': function (t) { + return '/*' + t.content + '*/'; + }, + 'nthSelector': function (t) { + return ':' + _t(t.content[0]) + '(' + _composite(t.content.slice(1)) + ')'; + }, + 'parentheses': function (t) { + return '(' + _composite(t.content) + ')'; + }, + 'percentage': function (t) { + return _composite(t.content) + '%'; + }, + 'pseudoClass': function (t) { + return ':' + _composite(t.content); + }, + 'pseudoElement': function (t) { + return '::' + _composite(t.content); + }, + 'uri': function (t) { + return 'url(' + _composite(t.content) + ')'; + } + }; + + return _t(tree); + }; + +/***/ }, +/* 4 */ +/***/ function(module, exports) { + + 'use strict'; + + module.exports = function stringify(tree) { + // TODO: Better error message + if (!tree) throw new Error('We need tree to translate'); + + function _t(tree) { + var type = tree.type; + if (_unique[type]) return _unique[type](tree); + if (typeof tree.content === 'string') return tree.content; + if (Array.isArray(tree.content)) return _composite(tree.content); + return ''; + } + + function _composite(t, i) { + if (!t) return ''; + + var s = ''; + i = i || 0; + for (; i < t.length; i++) s += _t(t[i]); + return s; + } + + var _unique = { + 'arguments': function (t) { + return '(' + _composite(t.content) + ')'; + }, + 'atkeyword': function (t) { + return '@' + _composite(t.content); + }, + 'attributeSelector': function (t) { + return '[' + _composite(t.content) + ']'; + }, + 'block': function (t) { + return '{' + _composite(t.content) + '}'; + }, + 'brackets': function (t) { + return '[' + _composite(t.content) + ']'; + }, + 'class': function (t) { + return '.' + _composite(t.content); + }, + 'color': function (t) { + return '#' + t.content; + }, + 'escapedString': function (t) { + return '~' + t.content; + }, + 'expression': function (t) { + return 'expression(' + t.content + ')'; + }, + 'id': function (t) { + return '#' + _composite(t.content); + }, + 'interpolatedVariable': function (t) { + return '@{' + _composite(t.content) + '}'; + }, + 'multilineComment': function (t) { + return '/*' + t.content + '*/'; + }, + 'nthSelector': function (t) { + return ':' + _t(t.content[0]) + '(' + _composite(t.content.slice(1)) + ')'; + }, + 'parentheses': function (t) { + return '(' + _composite(t.content) + ')'; + }, + 'percentage': function (t) { + return _composite(t.content) + '%'; + }, + 'pseudoClass': function (t) { + return ':' + _composite(t.content); + }, + 'pseudoElement': function (t) { + return '::' + _composite(t.content); + }, + 'singlelineComment': function (t) { + return '/' + '/' + t.content; + }, + 'uri': function (t) { + return 'url(' + _composite(t.content) + ')'; + }, + 'variable': function (t) { + return '@' + _composite(t.content); + }, + 'variablesList': function (t) { + return _composite(t.content) + '...'; + } + }; + + return _t(tree); + }; + +/***/ }, +/* 5 */ +/***/ function(module, exports) { + + 'use strict'; + + module.exports = function stringify(tree) { + // TODO: Better error message + if (!tree) throw new Error('We need tree to translate'); + + function _t(tree) { + var type = tree.type; + if (_unique[type]) return _unique[type](tree); + if (typeof tree.content === 'string') return tree.content; + if (Array.isArray(tree.content)) return _composite(tree.content); + return ''; + } + + function _composite(t, i) { + if (!t) return ''; + + var s = ''; + i = i || 0; + for (; i < t.length; i++) s += _t(t[i]); + return s; + } + + var _unique = { + 'arguments': function (t) { + return '(' + _composite(t.content) + ')'; + }, + 'atkeyword': function (t) { + return '@' + _composite(t.content); + }, + 'attributeSelector': function (t) { + return '[' + _composite(t.content) + ']'; + }, + 'block': function (t) { + return _composite(t.content); + }, + 'brackets': function (t) { + return '[' + _composite(t.content) + ']'; + }, + 'class': function (t) { + return '.' + _composite(t.content); + }, + 'color': function (t) { + return '#' + t.content; + }, + 'expression': function (t) { + return 'expression(' + t.content + ')'; + }, + 'id': function (t) { + return '#' + _composite(t.content); + }, + 'interpolation': function (t) { + return '#{' + _composite(t.content) + '}'; + }, + 'multilineComment': function (t) { + return '/*' + t.content; + }, + 'nthSelector': function (t) { + return ':' + _t(t.content[0]) + '(' + _composite(t.content.slice(1)) + ')'; + }, + 'parentheses': function (t) { + return '(' + _composite(t.content) + ')'; + }, + 'percentage': function (t) { + return _composite(t.content) + '%'; + }, + 'placeholder': function (t) { + return '%' + _composite(t.content); + }, + 'pseudoClass': function (t) { + return ':' + _composite(t.content); + }, + 'pseudoElement': function (t) { + return '::' + _composite(t.content); + }, + 'singlelineComment': function (t) { + return '/' + '/' + t.content; + }, + 'uri': function (t) { + return 'url(' + _composite(t.content) + ')'; + }, + 'variable': function (t) { + return '$' + _composite(t.content); + }, + 'variablesList': function (t) { + return _composite(t.content) + '...'; + } + }; + + return _t(tree); + }; + +/***/ }, +/* 6 */ +/***/ function(module, exports) { + + 'use strict'; + + module.exports = function stringify(tree) { + // TODO: Better error message + if (!tree) throw new Error('We need tree to translate'); + + function _t(tree) { + var type = tree.type; + if (_unique[type]) return _unique[type](tree); + if (typeof tree.content === 'string') return tree.content; + if (Array.isArray(tree.content)) return _composite(tree.content); + return ''; + } + + function _composite(t, i) { + if (!t) return ''; + + var s = ''; + i = i || 0; + for (; i < t.length; i++) s += _t(t[i]); + return s; + } + + var _unique = { + 'arguments': function (t) { + return '(' + _composite(t.content) + ')'; + }, + 'atkeyword': function (t) { + return '@' + _composite(t.content); + }, + 'attributeSelector': function (t) { + return '[' + _composite(t.content) + ']'; + }, + 'block': function (t) { + return '{' + _composite(t.content) + '}'; + }, + 'brackets': function (t) { + return '[' + _composite(t.content) + ']'; + }, + 'class': function (t) { + return '.' + _composite(t.content); + }, + 'color': function (t) { + return '#' + t.content; + }, + 'expression': function (t) { + return 'expression(' + t.content + ')'; + }, + 'id': function (t) { + return '#' + _composite(t.content); + }, + 'interpolation': function (t) { + return '#{' + _composite(t.content) + '}'; + }, + 'multilineComment': function (t) { + return '/*' + t.content + '*/'; + }, + 'nthSelector': function (t) { + return ':' + _t(t.content[0]) + '(' + _composite(t.content.slice(1)) + ')'; + }, + 'parentheses': function (t) { + return '(' + _composite(t.content) + ')'; + }, + 'percentage': function (t) { + return _composite(t.content) + '%'; + }, + 'placeholder': function (t) { + return '%' + _composite(t.content); + }, + 'pseudoClass': function (t) { + return ':' + _composite(t.content); + }, + 'pseudoElement': function (t) { + return '::' + _composite(t.content); + }, + 'singlelineComment': function (t) { + return '/' + '/' + t.content; + }, + 'uri': function (t) { + return 'url(' + _composite(t.content) + ')'; + }, + 'variable': function (t) { + return '$' + _composite(t.content); + }, + 'variablesList': function (t) { + return _composite(t.content) + '...'; + } + }; + + return _t(tree); + }; + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var ParsingError = __webpack_require__(8); + var syntaxes = __webpack_require__(10); + + var isInteger = Number.isInteger || function (value) { + return typeof value === 'number' && Math.floor(value) === value; + }; + + /** + * @param {String} css + * @param {Object} options + * @return {Object} AST + */ + function parser(css, options) { + if (typeof css !== 'string') throw new Error('Please, pass a string to parse');else if (!css) return __webpack_require__(29)(); + + var syntax = options && options.syntax || 'css'; + var context = options && options.context || 'stylesheet'; + var tabSize = options && options.tabSize; + if (!isInteger(tabSize) || tabSize < 1) tabSize = 1; + + var syntaxParser = syntaxes[syntax]; + + if (!syntaxParser) { + var message = 'Syntax "' + syntax + '" is not supported yet, sorry'; + return console.error(message); + } + + var getTokens = syntaxParser.tokenizer; + var mark = syntaxParser.mark; + var parse = syntaxParser.parse; + + var tokens = getTokens(css, tabSize); + mark(tokens); + + var ast; + try { + ast = parse(tokens, context); + } catch (e) { + if (!e.syntax) throw e; + throw new ParsingError(e, css); + } + + return ast; + } + + module.exports = parser; + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var parserPackage = __webpack_require__(9); + + /** + * @param {Error} e + * @param {String} css + */ + function ParsingError(e, css) { + this.line = e.line; + this.syntax = e.syntax; + this.css_ = css; + } + + ParsingError.prototype = Object.defineProperties({ + /** + * @type {String} + * @private + */ + customMessage_: '', + + /** + * @type {Number} + */ + line: null, + + /** + * @type {String} + */ + name: 'Parsing error', + + /** + * @type {String} + */ + syntax: null, + + /** + * @type {String} + */ + version: parserPackage.version, + + /** + * @return {String} + */ + toString: function () { + return [this.name + ': ' + this.message, '', this.context, '', 'Syntax: ' + this.syntax, 'Gonzales PE version: ' + this.version].join('\n'); + } + }, { + context: { /** + * @type {String} + */ + + get: function () { + var LINES_AROUND = 2; + + var result = []; + var currentLineNumber = this.line; + var start = currentLineNumber - 1 - LINES_AROUND; + var end = currentLineNumber + LINES_AROUND; + var lines = this.css_.split(/\r\n|\r|\n/); + + for (var i = start; i < end; i++) { + var line = lines[i]; + if (!line) continue; + var ln = i + 1; + var mark = ln === currentLineNumber ? '*' : ' '; + result.push(ln + mark + '| ' + line); + } + + return result.join('\n'); + }, + configurable: true, + enumerable: true + }, + message: { + + /** + * @type {String} + */ + + get: function () { + if (this.customMessage_) { + return this.customMessage_; + } else { + var message = 'Please check validity of the block'; + if (typeof this.line === 'number') message += ' starting from line #' + this.line; + return message; + } + }, + set: function (message) { + this.customMessage_ = message; + }, + configurable: true, + enumerable: true + } + }); + + module.exports = ParsingError; + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + module.exports = { + "name": "gonzales-pe", + "description": "Gonzales Preprocessor Edition (fast CSS parser)", + "version": "3.4.7", + "homepage": "http://github.com/tonyganch/gonzales-pe", + "bugs": "http://github.com/tonyganch/gonzales-pe/issues", + "license": "MIT", + "author": { + "name": "Tony Ganch", + "email": "tonyganch+github@gmail.com", + "url": "http://tonyganch.com" + }, + "main": "./lib/gonzales", + "repository": { + "type": "git", + "url": "http://github.com/tonyganch/gonzales-pe.git" + }, + "scripts": { + "autofix-tests": "bash ./scripts/build.sh && bash ./scripts/autofix-tests.sh", + "build": "bash ./scripts/build.sh", + "init": "bash ./scripts/init.sh", + "lint": "bash ./scripts/lint.sh", + "log": "bash ./scripts/log.sh", + "prepublish": "bash ./scripts/prepublish.sh", + "postpublish": "bash ./scripts/postpublish.sh", + "test": "bash ./scripts/test.sh", + "watch": "bash ./scripts/watch.sh" + }, + "bin": { + "gonzales": "./bin/gonzales.js" + }, + "dependencies": { + "minimist": "1.1.x" + }, + "devDependencies": { + "babel-loader": "^5.3.2", + "coffee-script": "~1.7.1", + "eslint": "^3.0.0", + "jscs": "2.1.0", + "jshint": "2.8.0", + "json-loader": "^0.5.3", + "mocha": "2.2.x", + "webpack": "^1.12.2", + "webpack-closure-compiler": "^2.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }; + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + module.exports = { + css: __webpack_require__(11), + less: __webpack_require__(17), + sass: __webpack_require__(21), + scss: __webpack_require__(25) + }; + +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + exports['default'] = { + mark: __webpack_require__(12), + parse: __webpack_require__(14), + stringify: __webpack_require__(3), + tokenizer: __webpack_require__(16) + }; + module.exports = exports['default']; + +/***/ }, +/* 12 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var TokenType = __webpack_require__(13); + + /** + * Mark whitespaces and comments + * @param {Array} tokens + */ + function markSpacesAndComments(tokens) { + var tokensLength = tokens.length; + var spaces = [-1, -1]; + var type; // Current token's type + + // For every token in the token list, mark spaces and line breaks + // as spaces (set both `ws` and `sc` flags). Mark multiline comments + // with `sc` flag. + // If there are several spaces or tabs or line breaks or multiline + // comments in a row, group them: take the last one's index number + // and save it to the first token in the group as a reference: + // e.g., `ws_last = 7` for a group of whitespaces or `sc_last = 9` + // for a group of whitespaces and comments. + for (var i = 0; i < tokensLength; i++) { + type = tokens[i].type; + + if (type === TokenType.Space || type === TokenType.Tab || type === TokenType.Newline) { + markSpace(tokens, i, spaces); + } else if (type === TokenType.CommentML) { + markComment(tokens, i, spaces); + } else { + markEndOfSpacesAndComments(tokens, i, spaces); + } + } + + markEndOfSpacesAndComments(tokens, i, spaces); + } + + function markSpace(tokens, i, spaces) { + var token = tokens[i]; + token.ws = true; + token.sc = true; + + if (spaces[0] === -1) spaces[0] = i; + if (spaces[1] === -1) spaces[1] = i; + } + + function markComment(tokens, i, spaces) { + var ws = spaces[0]; + tokens[i].sc = true; + + if (ws !== -1) { + tokens[ws].ws_last = i - 1; + spaces[0] = -1; + } + } + + function markEndOfSpacesAndComments(tokens, i, spaces) { + var ws = spaces[0]; + var sc = spaces[1]; + if (ws !== -1) { + tokens[ws].ws_last = i - 1; + spaces[0] = -1; + } + if (sc !== -1) { + tokens[sc].sc_last = i - 1; + spaces[1] = -1; + } + } + + /** + * Pair brackets + * @param {Array} tokens + */ + function markBrackets(tokens) { + var tokensLength = tokens.length; + var ps = []; // Parentheses + var sbs = []; // Square brackets + var cbs = []; // Curly brackets + var t = undefined; // Current token + + // For every token in the token list, if we meet an opening (left) + // bracket, push its index number to a corresponding array. + // If we then meet a closing (right) bracket, look at the corresponding + // array. If there are any elements (records about previously met + // left brackets), take a token of the last left bracket (take + // the last index number from the array and find a token with + // this index number) and save right bracket's index as a reference: + for (var i = 0; i < tokensLength; i++) { + t = tokens[i]; + var type = t.type; + + if (type === TokenType.LeftParenthesis) { + ps.push(i); + } else if (type === TokenType.RightParenthesis) { + if (ps.length) { + t.left = ps.pop(); + tokens[t.left].right = i; + } + } else if (type === TokenType.LeftSquareBracket) { + sbs.push(i); + } else if (type === TokenType.RightSquareBracket) { + if (sbs.length) { + t.left = sbs.pop(); + tokens[t.left].right = i; + } + } else if (type === TokenType.LeftCurlyBracket) { + cbs.push(i); + } else if (type === TokenType.RightCurlyBracket) { + if (cbs.length) { + t.left = cbs.pop(); + tokens[t.left].right = i; + } + } + } + } + + /** + * @param {Array} tokens + */ + function markTokens(tokens) { + // Mark paired brackets: + markBrackets(tokens); + // Mark whitespaces and comments: + markSpacesAndComments(tokens); + } + + module.exports = markTokens; + +/***/ }, +/* 13 */ +/***/ function(module, exports) { + + // jscs:disable + + 'use strict'; + + module.exports = { + StringSQ: 'StringSQ', + StringDQ: 'StringDQ', + CommentML: 'CommentML', + CommentSL: 'CommentSL', + + Newline: 'Newline', + Space: 'Space', + Tab: 'Tab', + + ExclamationMark: 'ExclamationMark', // ! + QuotationMark: 'QuotationMark', // " + NumberSign: 'NumberSign', // # + DollarSign: 'DollarSign', // $ + PercentSign: 'PercentSign', // % + Ampersand: 'Ampersand', // & + Apostrophe: 'Apostrophe', // ' + LeftParenthesis: 'LeftParenthesis', // ( + RightParenthesis: 'RightParenthesis', // ) + Asterisk: 'Asterisk', // * + PlusSign: 'PlusSign', // + + Comma: 'Comma', // , + HyphenMinus: 'HyphenMinus', // - + FullStop: 'FullStop', // . + Solidus: 'Solidus', // / + Colon: 'Colon', // : + Semicolon: 'Semicolon', // ; + LessThanSign: 'LessThanSign', // < + EqualsSign: 'EqualsSign', // = + EqualitySign: 'EqualitySign', // == + InequalitySign: 'InequalitySign', // != + GreaterThanSign: 'GreaterThanSign', // > + QuestionMark: 'QuestionMark', // ? + CommercialAt: 'CommercialAt', // @ + LeftSquareBracket: 'LeftSquareBracket', // [ + ReverseSolidus: 'ReverseSolidus', // \ + RightSquareBracket: 'RightSquareBracket', // ] + CircumflexAccent: 'CircumflexAccent', // ^ + LowLine: 'LowLine', // _ + LeftCurlyBracket: 'LeftCurlyBracket', // { + VerticalLine: 'VerticalLine', // | + RightCurlyBracket: 'RightCurlyBracket', // } + Tilde: 'Tilde', // ~ + + Identifier: 'Identifier', + DecimalNumber: 'DecimalNumber' + }; + +/***/ }, +/* 14 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var Node = __webpack_require__(1); + var NodeType = __webpack_require__(15); + var TokenType = __webpack_require__(13); + + /** + * @type {Array} + */ + var tokens; + + /** + * @type {Number} + */ + var tokensLength; + + /** + * @type {Number} + */ + var pos; + + var contexts = { + 'atkeyword': function () { + return checkAtkeyword(pos) && getAtkeyword(); + }, + 'atrule': function () { + return checkAtrule(pos) && getAtrule(); + }, + 'block': function () { + return checkBlock(pos) && getBlock(); + }, + 'brackets': function () { + return checkBrackets(pos) && getBrackets(); + }, + 'class': function () { + return checkClass(pos) && getClass(); + }, + 'combinator': function () { + return checkCombinator(pos) && getCombinator(); + }, + 'commentML': function () { + return checkCommentML(pos) && getCommentML(); + }, + 'declaration': function () { + return checkDeclaration(pos) && getDeclaration(); + }, + 'declDelim': function () { + return checkDeclDelim(pos) && getDeclDelim(); + }, + 'delim': function () { + return checkDelim(pos) && getDelim(); + }, + 'dimension': function () { + return checkDimension(pos) && getDimension(); + }, + 'expression': function () { + return checkExpression(pos) && getExpression(); + }, + 'function': function () { + return checkFunction(pos) && getFunction(); + }, + 'ident': function () { + return checkIdent(pos) && getIdent(); + }, + 'important': function () { + return checkImportant(pos) && getImportant(); + }, + 'namespace': function () { + return checkNamespace(pos) && getNamespace(); + }, + 'number': function () { + return checkNumber(pos) && getNumber(); + }, + 'operator': function () { + return checkOperator(pos) && getOperator(); + }, + 'parentheses': function () { + return checkParentheses(pos) && getParentheses(); + }, + 'percentage': function () { + return checkPercentage(pos) && getPercentage(); + }, + 'progid': function () { + return checkProgid(pos) && getProgid(); + }, + 'property': function () { + return checkProperty(pos) && getProperty(); + }, + 'propertyDelim': function () { + return checkPropertyDelim(pos) && getPropertyDelim(); + }, + 'pseudoc': function () { + return checkPseudoc(pos) && getPseudoc(); + }, + 'pseudoe': function () { + return checkPseudoe(pos) && getPseudoe(); + }, + 'ruleset': function () { + return checkRuleset(pos) && getRuleset(); + }, + 's': function () { + return checkS(pos) && getS(); + }, + 'selector': function () { + return checkSelector(pos) && getSelector(); + }, + 'shash': function () { + return checkShash(pos) && getShash(); + }, + 'string': function () { + return checkString(pos) && getString(); + }, + 'stylesheet': function () { + return checkStylesheet(pos) && getStylesheet(); + }, + 'unary': function () { + return checkUnary(pos) && getUnary(); + }, + 'unicodeRange': function () { + return checkUnicodeRange(pos) && getUnicodeRange(); + }, + 'urange': function () { + return checkUrange(pos) && getUrange(); + }, + 'uri': function () { + return checkUri(pos) && getUri(); + }, + 'value': function () { + return checkValue(pos) && getValue(); + }, + 'vhash': function () { + return checkVhash(pos) && getVhash(); + } + }; + + /** + * Stop parsing and display error. + * @param {Number=} i Token's index number + */ + function throwError(i) { + var ln = tokens[i].ln; + + throw { line: ln, syntax: 'css' }; + } + + /** + * @param {Object} exclude + * @param {Number} i Token's index number + * @return {Number} + */ + function checkExcluding(exclude, i) { + var start = i; + + while (i < tokensLength) { + if (exclude[tokens[i++].type]) break; + } + + return i - start - 2; + } + + /** + * @param {Number} start + * @param {Number} finish + * @return {String} + */ + function joinValues(start, finish) { + var s = ''; + + for (var i = start; i < finish + 1; i++) { + s += tokens[i].value; + } + + return s; + } + + /** + * @param {Number} start + * @param {Number} num + * @return {String} + */ + function joinValues2(start, num) { + if (start + num - 1 >= tokensLength) return; + + var s = ''; + + for (var i = 0; i < num; i++) { + s += tokens[start + i].value; + } + + return s; + } + + function getLastPosition(content, line, column, colOffset) { + return typeof content === 'string' ? getLastPositionForString(content, line, column, colOffset) : getLastPositionForArray(content, line, column, colOffset); + } + + function getLastPositionForString(content, line, column, colOffset) { + var position = []; + + if (!content) { + position = [line, column]; + if (colOffset) position[1] += colOffset - 1; + return position; + } + + var lastLinebreak = content.lastIndexOf('\n'); + var endsWithLinebreak = lastLinebreak === content.length - 1; + var splitContent = content.split('\n'); + var linebreaksCount = splitContent.length - 1; + var prevLinebreak = linebreaksCount === 0 || linebreaksCount === 1 ? -1 : content.length - splitContent[linebreaksCount - 1].length - 2; + + // Line: + var offset = endsWithLinebreak ? linebreaksCount - 1 : linebreaksCount; + position[0] = line + offset; + + // Column: + if (endsWithLinebreak) { + offset = prevLinebreak !== -1 ? content.length - prevLinebreak : content.length - 1; + } else { + offset = linebreaksCount !== 0 ? content.length - lastLinebreak - column - 1 : content.length - 1; + } + position[1] = column + offset; + + if (!colOffset) return position; + + if (endsWithLinebreak) { + position[0]++; + position[1] = colOffset; + } else { + position[1] += colOffset; + } + + return position; + } + + function getLastPositionForArray(content, line, column, colOffset) { + var position; + + if (content.length === 0) { + position = [line, column]; + } else { + var c = content[content.length - 1]; + if (c.hasOwnProperty('end')) { + position = [c.end.line, c.end.column]; + } else { + position = getLastPosition(c.content, line, column); + } + } + + if (!colOffset) return position; + + if (tokens[pos - 1].type !== 'Newline') { + position[1] += colOffset; + } else { + position[0]++; + position[1] = 1; + } + + return position; + } + + function newNode(type, content, line, column, end) { + if (!end) end = getLastPosition(content, line, column); + return new Node({ + type: type, + content: content, + start: { + line: line, + column: column + }, + end: { + line: end[0], + column: end[1] + }, + syntax: 'css' + }); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkAny(i) { + var l; + + if (l = checkBrackets(i)) tokens[i].any_child = 1;else if (l = checkParentheses(i)) tokens[i].any_child = 2;else if (l = checkString(i)) tokens[i].any_child = 3;else if (l = checkPercentage(i)) tokens[i].any_child = 4;else if (l = checkDimension(i)) tokens[i].any_child = 5;else if (l = checkUnicodeRange(i)) tokens[i].any_child = 13;else if (l = checkNumber(i)) tokens[i].any_child = 6;else if (l = checkUri(i)) tokens[i].any_child = 7;else if (l = checkExpression(i)) tokens[i].any_child = 8;else if (l = checkFunction(i)) tokens[i].any_child = 9;else if (l = checkIdent(i)) tokens[i].any_child = 10;else if (l = checkClass(i)) tokens[i].any_child = 11;else if (l = checkUnary(i)) tokens[i].any_child = 12; + + return l; + } + + /** + * @return {Node} + */ + function getAny() { + var childType = tokens[pos].any_child; + + if (childType === 1) return getBrackets();else if (childType === 2) return getParentheses();else if (childType === 3) return getString();else if (childType === 4) return getPercentage();else if (childType === 5) return getDimension();else if (childType === 13) return getUnicodeRange();else if (childType === 6) return getNumber();else if (childType === 7) return getUri();else if (childType === 8) return getExpression();else if (childType === 9) return getFunction();else if (childType === 10) return getIdent();else if (childType === 11) return getClass();else if (childType === 12) return getUnary(); + } + + /** + * Check if token is part of an @-word (e.g. `@import`, `@include`) + * @param {Number} i Token's index number + * @return {Number} + */ + function checkAtkeyword(i) { + var l; + + // Check that token is `@`: + if (i >= tokensLength || tokens[i++].type !== TokenType.CommercialAt) return 0; + + return (l = checkIdent(i)) ? l + 1 : 0; + } + + /** + * Get node with @-word + * @return {Node} + */ + function getAtkeyword() { + var type = NodeType.AtkeywordType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + pos++; + + content.push(getIdent()); + + return newNode(type, content, line, column); + } + + /** + * Check if token is a part of an @-rule + * @param {Number} i Token's index number + * @return {Number} Length of @-rule + */ + function checkAtrule(i) { + var l; + + if (i >= tokensLength) return 0; + + // If token already has a record of being part of an @-rule, + // return the @-rule's length: + if (tokens[i].atrule_l !== undefined) return tokens[i].atrule_l; + + // If token is part of an @-rule, save the rule's type to token. + // @keyframes: + if (l = checkKeyframesRule(i)) tokens[i].atrule_type = 4; + // @-rule with ruleset: + else if (l = checkAtruler(i)) tokens[i].atrule_type = 1; + // Block @-rule: + else if (l = checkAtruleb(i)) tokens[i].atrule_type = 2; + // Single-line @-rule: + else if (l = checkAtrules(i)) tokens[i].atrule_type = 3;else return 0; + + // If token is part of an @-rule, save the rule's length to token: + tokens[i].atrule_l = l; + + return l; + } + + /** + * Get node with @-rule + * @return {Node} + */ + function getAtrule() { + switch (tokens[pos].atrule_type) { + case 1: + return getAtruler(); // @-rule with ruleset + case 2: + return getAtruleb(); // Block @-rule + case 3: + return getAtrules(); // Single-line @-rule + case 4: + return getKeyframesRule(); + } + } + + /** + * Check if token is part of a block @-rule + * @param {Number} i Token's index number + * @return {Number} Length of the @-rule + */ + function checkAtruleb(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkAtkeyword(i)) i += l;else return 0; + + if (l = checkTsets(i)) i += l; + + if (l = checkBlock(i)) i += l;else return 0; + + return i - start; + } + + /** + * Get node with a block @-rule + * @return {Node} + */ + function getAtruleb() { + var type = NodeType.AtruleType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = [getAtkeyword()].concat(getTsets()).concat([getBlock()]); + + return newNode(type, content, line, column); + } + + /** + * Check if token is part of an @-rule with ruleset + * @param {Number} i Token's index number + * @return {Number} Length of the @-rule + */ + function checkAtruler(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkAtkeyword(i)) i += l;else return 0; + + if (l = checkTsets(i)) i += l; + + if (i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket) i++;else return 0; + + if (l = checkAtrulers(i)) i += l; + + if (i < tokensLength && tokens[i].type === TokenType.RightCurlyBracket) i++;else return 0; + + return i - start; + } + + /** + * Get node with an @-rule with ruleset + * @return {Node} + */ + function getAtruler() { + var type = NodeType.AtruleType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = [getAtkeyword()]; + + content = content.concat(getTsets()); + + content.push(getAtrulers()); + + return newNode(type, content, line, column); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkAtrulers(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkSC(i)) i += l; + + while (i < tokensLength) { + if (l = checkSC(i)) tokens[i].atrulers_child = 1;else if (l = checkAtrule(i)) tokens[i].atrulers_child = 2;else if (l = checkRuleset(i)) tokens[i].atrulers_child = 3;else break; + i += l; + } + + tokens[i].atrulers_end = 1; + + if (l = checkSC(i)) i += l; + + return i - start; + } + + /** + * @return {Node} + */ + function getAtrulers() { + var type = NodeType.BlockType; + var token = tokens[pos++]; + var line = token.ln; + var column = token.col; + var content = getSC(); + + while (!tokens[pos].atrulers_end) { + var childType = tokens[pos].atrulers_child; + if (childType === 1) content = content.concat(getSC());else if (childType === 2) content.push(getAtrule());else if (childType === 3) content.push(getRuleset()); + } + + content = content.concat(getSC()); + + var end = getLastPosition(content, line, column, 1); + pos++; + + return newNode(type, content, line, column, end); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkAtrules(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkAtkeyword(i)) i += l;else return 0; + + if (l = checkTsets(i)) i += l; + + return i - start; + } + + /** + * @return {Node} + */ + function getAtrules() { + var type = NodeType.AtruleType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = [getAtkeyword()].concat(getTsets()); + + return newNode(type, content, line, column); + } + + /** + * Check if token is part of a block (e.g. `{...}`). + * @param {Number} i Token's index number + * @return {Number} Length of the block + */ + function checkBlock(i) { + return i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket ? tokens[i].right - i + 1 : 0; + } + + /** + * Get node with a block + * @return {Node} + */ + function getBlock() { + var type = NodeType.BlockType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var end = tokens[pos++].right; + var content = []; + + while (pos < end) { + if (checkBlockdecl(pos)) content = content.concat(getBlockdecl());else throwError(pos); + } + + var end_ = getLastPosition(content, line, column, 1); + pos = end + 1; + + return newNode(type, content, line, column, end_); + } + + /** + * Check if token is part of a declaration (property-value pair) + * @param {Number} i Token's index number + * @return {Number} Length of the declaration + */ + function checkBlockdecl(i) { + var l; + + if (i >= tokensLength) return 0; + + if (l = checkBlockdecl1(i)) tokens[i].bd_type = 1;else if (l = checkBlockdecl2(i)) tokens[i].bd_type = 2;else if (l = checkBlockdecl3(i)) tokens[i].bd_type = 3;else if (l = checkBlockdecl4(i)) tokens[i].bd_type = 4;else return 0; + + return l; + } + + /** + * @return {Array} + */ + function getBlockdecl() { + switch (tokens[pos].bd_type) { + case 1: + return getBlockdecl1(); + case 2: + return getBlockdecl2(); + case 3: + return getBlockdecl3(); + case 4: + return getBlockdecl4(); + } + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkBlockdecl1(i) { + var start = i; + var l = undefined; + + if (l = checkSC(i)) i += l; + + if (l = checkDeclaration(i)) tokens[i].bd_kind = 1;else if (l = checkAtrule(i)) tokens[i].bd_kind = 2;else return 0; + + i += l; + + if (l = checkSC(i)) i += l; + + if (i < tokensLength && (l = checkDeclDelim(i))) i += l;else return 0; + + if (l = checkSC(i)) i += l;else return 0; + + return i - start; + } + + /** + * @return {Array} + */ + function getBlockdecl1() { + var sc = getSC(); + var x = undefined; + + switch (tokens[pos].bd_kind) { + case 1: + x = getDeclaration(); + break; + case 2: + x = getAtrule(); + break; + } + + return sc.concat([x]).concat(getSC()).concat([getDeclDelim()]).concat(getSC()); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkBlockdecl2(i) { + var start = i; + var l = undefined; + + if (l = checkSC(i)) i += l; + + if (l = checkDeclaration(i)) tokens[i].bd_kind = 1;else if (l = checkAtrule(i)) tokens[i].bd_kind = 2;else return 0; + + i += l; + + if (l = checkSC(i)) i += l; + + return i - start; + } + + /** + * @return {Array} + */ + function getBlockdecl2() { + var sc = getSC(); + var x = undefined; + + switch (tokens[pos].bd_kind) { + case 1: + x = getDeclaration(); + break; + case 2: + x = getAtrule(); + break; + } + + return sc.concat([x]).concat(getSC()); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkBlockdecl3(i) { + var start = i; + var l = undefined; + + if (l = checkSC(i)) i += l; + + if (l = checkDeclDelim(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + return i - start; + } + + /** + * @return {Array} + */ + function getBlockdecl3() { + return getSC().concat([getDeclDelim()]).concat(getSC()); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkBlockdecl4(i) { + return checkSC(i); + } + + /** + * @return {Array} + */ + function getBlockdecl4() { + return getSC(); + } + + /** + * Check if token is part of text inside square brackets, e.g. `[1]` + * @param {Number} i Token's index number + * @return {Number} + */ + function checkBrackets(i) { + if (i >= tokensLength || tokens[i].type !== TokenType.LeftSquareBracket) return 0; + + return tokens[i].right - i + 1; + } + + /** + * Get node with text inside square brackets, e.g. `[1]` + * @return {Node} + */ + function getBrackets() { + var type = NodeType.BracketsType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + + pos++; + + var tsets = getTsets(); + var end = getLastPosition(tsets, line, column, 1); + pos++; + + return newNode(type, tsets, line, column, end); + } + + /** + * Check if token is part of a class selector (e.g. `.abc`) + * @param {Number} i Token's index number + * @return {Number} Length of the class selector + */ + function checkClass(i) { + var l; + + if (i >= tokensLength) return 0; + + if (tokens[i].class_l) return tokens[i].class_l; + + if (tokens[i++].type === TokenType.FullStop && (l = checkIdent(i))) { + tokens[i].class_l = l + 1; + return l + 1; + } + + return 0; + } + + /** + * Get node with a class selector + * @return {Node} + */ + function getClass() { + var type = NodeType.ClassType; + var token = tokens[pos++]; + var line = token.ln; + var column = token.col; + var content = [getIdent()]; + + return newNode(type, content, line, column); + } + + function checkCombinator(i) { + if (i >= tokensLength) return 0; + + var l = undefined; + if (l = checkCombinator1(i)) tokens[i].combinatorType = 1;else if (l = checkCombinator2(i)) tokens[i].combinatorType = 2;else if (l = checkCombinator3(i)) tokens[i].combinatorType = 3; + + return l; + } + + function getCombinator() { + var type = tokens[pos].combinatorType; + if (type === 1) return getCombinator1(); + if (type === 2) return getCombinator2(); + if (type === 3) return getCombinator3(); + } + /** + * (1) `||` + */ + function checkCombinator1(i) { + if (tokens[i].type === TokenType.VerticalLine && tokens[i + 1].type === TokenType.VerticalLine) return 2;else return 0; + } + + function getCombinator1() { + var type = NodeType.CombinatorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = '||'; + + pos += 2; + return newNode(type, content, line, column); + } + + /** + * (1) `>` + * (2) `+` + * (3) `~` + */ + function checkCombinator2(i) { + var type = tokens[i].type; + if (type === TokenType.PlusSign || type === TokenType.GreaterThanSign || type === TokenType.Tilde) return 1;else return 0; + } + + function getCombinator2() { + var type = NodeType.CombinatorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = tokens[pos++].value; + + return newNode(type, content, line, column); + } + + /** + * (1) `/panda/` + */ + function checkCombinator3(i) { + var start = i; + + if (tokens[i].type === TokenType.Solidus) i++;else return 0; + + var l = undefined; + if (l = checkIdent(i)) i += l;else return 0; + + if (tokens[i].type === TokenType.Solidus) i++;else return 0; + + return i - start; + } + + function getCombinator3() { + var type = NodeType.CombinatorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + + // Skip `/`. + pos++; + var ident = getIdent(); + + // Skip `/`. + pos++; + + var content = '/' + ident.content + '/'; + + return newNode(type, content, line, column); + } + + /** + * Check if token is a multiline comment. + * @param {Number} i Token's index number + * @return {Number} `1` if token is a multiline comment, otherwise `0` + */ + function checkCommentML(i) { + return i < tokensLength && tokens[i].type === TokenType.CommentML ? 1 : 0; + } + + /** + * Get node with a multiline comment + * @return {Node} + */ + function getCommentML() { + var type = NodeType.CommentMLType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = tokens[pos].value.substring(2); + var l = content.length; + + if (content.charAt(l - 2) === '*' && content.charAt(l - 1) === '/') content = content.substring(0, l - 2); + + var end = getLastPosition(content, line, column, 2); + if (end[0] === line) end[1] += 2; + pos++; + + return newNode(type, content, line, column, end); + } + + /** + * Check if token is part of a declaration (property-value pair) + * @param {Number} i Token's index number + * @return {Number} Length of the declaration + */ + function checkDeclaration(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkProperty(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkPropertyDelim(i)) i++;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkValue(i)) i += l;else return 0; + + return i - start; + } + + /** + * Get node with a declaration + * @return {Node} + */ + function getDeclaration() { + var type = NodeType.DeclarationType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + + var content = [getProperty()].concat(getSC()).concat([getPropertyDelim()]).concat(getSC()).concat([getValue()]); + + return newNode(type, content, line, column); + } + + /** + * Check if token is a semicolon + * @param {Number} i Token's index number + * @return {Number} `1` if token is a semicolon, otherwise `0` + */ + function checkDeclDelim(i) { + return i < tokensLength && tokens[i].type === TokenType.Semicolon ? 1 : 0; + } + + /** + * Get node with a semicolon + * @return {Node} + */ + function getDeclDelim() { + var type = NodeType.DeclDelimType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = ';'; + + pos++; + + return newNode(type, content, line, column); + } + + /** + * Check if token is a comma + * @param {Number} i Token's index number + * @return {Number} `1` if token is a comma, otherwise `0` + */ + function checkDelim(i) { + return i < tokensLength && tokens[i].type === TokenType.Comma ? 1 : 0; + } + + /** + * Get node with a comma + * @return {Node} + */ + function getDelim() { + var type = NodeType.DelimType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = ','; + + pos++; + + return newNode(type, content, line, column); + } + + /** + * Check if token is part of a number with dimension unit (e.g. `10px`) + * @param {Number} i Token's index number + * @return {Number} + */ + function checkDimension(i) { + var ln = checkNumber(i); + var li = undefined; + + if (i >= tokensLength || !ln || i + ln >= tokensLength) return 0; + + return (li = checkUnit(i + ln)) ? ln + li : 0; + } + + /** + * Get node of a number with dimension unit + * @return {Node} + */ + function getDimension() { + var type = NodeType.DimensionType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = [getNumber(), getUnit()]; + + return newNode(type, content, line, column); + } + + /** + * Check if token is unit + * @param {Number} i Token's index number + * @return {Number} + */ + function checkUnit(i) { + var units = ['em', 'ex', 'ch', 'rem', 'vh', 'vw', 'vmin', 'vmax', 'px', 'mm', 'q', 'cm', 'in', 'pt', 'pc', 'deg', 'grad', 'rad', 'turn', 's', 'ms', 'Hz', 'kHz', 'dpi', 'dpcm', 'dppx']; + + return units.indexOf(tokens[i].value) !== -1 ? 1 : 0; + } + + /** + * Get unit node of type ident + * @return {Node} An ident node containing the unit value + */ + function getUnit() { + var type = NodeType.IdentType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = token.value; + + pos++; + + return newNode(type, content, line, column); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkExpression(i) { + var start = i; + + if (i >= tokensLength || tokens[i++].value !== 'expression' || i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis) { + return 0; + } + + return tokens[i].right - start + 1; + } + + /** + * @return {Node} + */ + function getExpression() { + var type = NodeType.ExpressionType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + + pos++; + + var content = joinValues(pos + 1, tokens[pos].right - 1); + var end = getLastPosition(content, line, column, 1); + if (end[0] === line) end[1] += 11; + pos = tokens[pos].right + 1; + + return newNode(type, content, line, column, end); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkFunction(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkIdent(i)) i += l;else return 0; + + return i < tokensLength && tokens[i].type === TokenType.LeftParenthesis ? tokens[i].right - start + 1 : 0; + } + + /** + * @return {Node} + */ + function getFunction() { + var type = NodeType.FunctionType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var ident = getIdent(); + var content = [ident]; + + content.push(getArguments()); + + return newNode(type, content, line, column); + } + + /** + * @return {Node} + */ + function getArguments() { + var type = NodeType.ArgumentsType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + var body = undefined; + + pos++; + + while (pos < tokensLength && tokens[pos].type !== TokenType.RightParenthesis) { + if (checkDeclaration(pos)) content.push(getDeclaration());else if (checkArgument(pos)) { + body = getArgument(); + if (typeof body.content === 'string') content.push(body);else content = content.concat(body); + } else if (checkClass(pos)) content.push(getClass());else throwError(pos); + } + + var end = getLastPosition(content, line, column, 1); + pos++; + + return newNode(type, content, line, column, end); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkArgument(i) { + var l; + + if (l = checkVhash(i)) tokens[i].argument_child = 1;else if (l = checkAny(i)) tokens[i].argument_child = 2;else if (l = checkSC(i)) tokens[i].argument_child = 3;else if (l = checkOperator(i)) tokens[i].argument_child = 4; + + return l; + } + + /** + * @return {Node} + */ + function getArgument() { + var childType = tokens[pos].argument_child; + if (childType === 1) return getVhash();else if (childType === 2) return getAny();else if (childType === 3) return getSC();else if (childType === 4) return getOperator(); + } + + /** + * Check if token is part of an identifierю + * Grammar from CSS spec: + * h [0-9a-f] + * nonascii [\240-\377] + * unicode \\{h}{1,6}(\r\n|[ \t\r\n\f])? + * escape {unicode}|\\[^\r\n\f0-9a-f] + * nmstart [_a-z]|{nonascii}|{escape} + * nmchar [_a-z0-9-]|{nonascii}|{escape} + * ident -?{nmstart}{nmchar}* + * + * @param {number} i Token's index number + * @return {number} Length of the identifier + */ + function checkIdent(i) { + var start = i; + + if (i >= tokensLength) return 0; + + if (tokens[i].type === TokenType.HyphenMinus) i++; + + if (tokens[i].type === TokenType.LowLine || tokens[i].type === TokenType.Identifier) i++;else return 0; + + for (; i < tokensLength; i++) { + if (tokens[i].type !== TokenType.HyphenMinus && tokens[i].type !== TokenType.LowLine && tokens[i].type !== TokenType.Identifier && tokens[i].type !== TokenType.DecimalNumber) break; + } + + tokens[start].ident_last = i - 1; + + return i - start; + } + + /** + * Get node with an identifier + * @return {Node} + */ + function getIdent() { + var type = NodeType.IdentType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = joinValues(pos, tokens[pos].ident_last); + + pos = tokens[pos].ident_last + 1; + + return newNode(type, content, line, column); + } + + /** + * Check if token is part of `!important` word + * @param {Number} i Token's index number + * @return {Number} + */ + function checkImportant(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark) return 0; + + if (l = checkSC(i)) i += l; + + if (tokens[i].value === 'important') { + tokens[start].importantEnd = i; + return i - start + 1; + } else { + return 0; + } + } + + /** + * Get node with `!important` word + * @return {Node} + */ + function getImportant() { + var type = NodeType.ImportantType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = joinValues(pos, token.importantEnd); + + pos = token.importantEnd + 1; + + return newNode(type, content, line, column); + } + + /** + * Check a single keyframe block - `5% {}` + * @param {Number} i + * @returns {Number} + */ + function checkKeyframesBlock(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkKeyframesSelectorsGroup(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkBlock(i)) i += l;else return 0; + + return i - start; + } + + /** + * Get a single keyframe block - `5% {}` + * @returns {Node} + */ + function getKeyframesBlock() { + var type = NodeType.RulesetType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = [].concat(getKeyframesSelectorsGroup(), getSC(), [getBlock()]); + + return newNode(type, content, line, column); + } + + /** + * Check all keyframe blocks - `5% {} 100% {}` + * @param {Number} i + * @returns {Number} + */ + function checkKeyframesBlocks(i) { + var start = i; + var l = undefined; + + if (i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket) i++;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkKeyframesBlock(i)) i += l;else return 0; + + while (tokens[i].type !== TokenType.RightCurlyBracket) { + if (l = checkSC(i)) i += l;else if (l = checkKeyframesBlock(i)) i += l;else break; + } + + if (i < tokensLength && tokens[i].type === TokenType.RightCurlyBracket) i++;else return 0; + + return i - start; + } + + /** + * Get all keyframe blocks - `5% {} 100% {}` + * @returns {Node} + */ + function getKeyframesBlocks() { + var type = NodeType.BlockType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + var keyframesBlocksEnd = token.right; + + // Skip `{`. + pos++; + + while (pos < keyframesBlocksEnd) { + if (checkSC(pos)) content = content.concat(getSC());else if (checkKeyframesBlock(pos)) content.push(getKeyframesBlock()); + } + + var end = getLastPosition(content, line, column, 1); + + // Skip `}`. + pos++; + + return newNode(type, content, line, column, end); + } + + /** + * Check if token is part of a @keyframes rule. + * @param {Number} i Token's index number + * @return {Number} Length of the @keyframes rule + */ + function checkKeyframesRule(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkAtkeyword(i)) i += l;else return 0; + + var atruleName = joinValues2(i - l, l); + if (atruleName.indexOf('keyframes') === -1) return 0; + + if (l = checkSC(i)) i += l;else return 0; + + if (l = checkIdent(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkKeyframesBlocks(i)) i += l;else return 0; + + return i - start; + } + + /** + * @return {Node} + */ + function getKeyframesRule() { + var type = NodeType.AtruleType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = [].concat([getAtkeyword()], getSC(), [getIdent()], getSC(), [getKeyframesBlocks()]); + + return newNode(type, content, line, column); + } + + /** + * Check a single keyframe selector - `5%`, `from` etc + * @param {Number} i + * @returns {Number} + */ + function checkKeyframesSelector(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkIdent(i)) { + // Valid selectors are only `from` and `to`. + var selector = joinValues2(i, l); + if (selector !== 'from' && selector !== 'to') return 0; + + i += l; + tokens[start].keyframesSelectorType = 1; + } else if (l = checkPercentage(i)) { + i += l; + tokens[start].keyframesSelectorType = 2; + } else { + return 0; + } + + return i - start; + } + + /** + * Get a single keyframe selector + * @returns {Node} + */ + function getKeyframesSelector() { + var keyframesSelectorType = NodeType.KeyframesSelectorType; + var selectorType = NodeType.SelectorType; + + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + if (token.keyframesSelectorType === 1) { + content.push(getIdent()); + } else { + content.push(getPercentage()); + } + + var keyframesSelector = newNode(keyframesSelectorType, content, line, column); + return newNode(selectorType, [keyframesSelector], line, column); + } + + /** + * Check the keyframe's selector groups + * @param {Number} i + * @returns {Number} + */ + function checkKeyframesSelectorsGroup(i) { + var start = i; + var l = undefined; + + if (l = checkKeyframesSelector(i)) i += l;else return 0; + + while (i < tokensLength) { + var sb = checkSC(i); + var c = checkDelim(i + sb); + if (!c) break; + var sa = checkSC(i + sb + c); + if (l = checkKeyframesSelector(i + sb + c + sa)) i += sb + c + sa + l;else break; + } + + tokens[start].selectorsGroupEnd = i; + + return i - start; + } + + /** + * Get the keyframe's selector groups + * @returns {Array} An array of keyframe selectors + */ + function getKeyframesSelectorsGroup() { + var selectorsGroup = []; + var selectorsGroupEnd = tokens[pos].selectorsGroupEnd; + + selectorsGroup.push(getKeyframesSelector()); + + while (pos < selectorsGroupEnd) { + selectorsGroup = selectorsGroup.concat(getSC()); + selectorsGroup.push(getDelim()); + selectorsGroup = selectorsGroup.concat(getSC()); + selectorsGroup.push(getKeyframesSelector()); + } + + return selectorsGroup; + } + + /** + * Check if token is a namespace sign (`|`) + * @param {Number} i Token's index number + * @return {Number} `1` if token is `|`, `0` if not + */ + function checkNamespace(i) { + return i < tokensLength && tokens[i].type === TokenType.VerticalLine ? 1 : 0; + } + + /** + * Get node with a namespace sign + * @return {Node} + */ + function getNamespace() { + var type = NodeType.NamespaceType; + var token = tokens[pos++]; + var line = token.ln; + var column = token.col; + var content = '|'; + + return newNode(type, content, line, column); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkNmName2(i) { + if (tokens[i].type === TokenType.Identifier) return 1;else if (tokens[i].type !== TokenType.DecimalNumber) return 0; + + i++; + + return i < tokensLength && tokens[i].type === TokenType.Identifier ? 2 : 1; + } + + /** + * @return {String} + */ + function getNmName2() { + var s = tokens[pos].value; + + if (tokens[pos++].type === TokenType.DecimalNumber && pos < tokensLength && tokens[pos].type === TokenType.Identifier) s += tokens[pos++].value; + + return s; + } + + /** + * Check if token is part of a number + * @param {Number} i Token's index number + * @return {Number} Length of number + */ + function checkNumber(i) { + if (i >= tokensLength) return 0; + + if (tokens[i].number_l) return tokens[i].number_l; + + // `10`: + if (i < tokensLength && tokens[i].type === TokenType.DecimalNumber && (!tokens[i + 1] || tokens[i + 1] && tokens[i + 1].type !== TokenType.FullStop)) { + tokens[i].number_l = 1; + return 1; + } + + // `10.`: + if (i < tokensLength && tokens[i].type === TokenType.DecimalNumber && tokens[i + 1] && tokens[i + 1].type === TokenType.FullStop && (!tokens[i + 2] || tokens[i + 2].type !== TokenType.DecimalNumber)) { + tokens[i].number_l = 2; + return 2; + } + + // `.10`: + if (i < tokensLength && tokens[i].type === TokenType.FullStop && tokens[i + 1].type === TokenType.DecimalNumber) { + tokens[i].number_l = 2; + return 2; + } + + // `10.10`: + if (i < tokensLength && tokens[i].type === TokenType.DecimalNumber && tokens[i + 1] && tokens[i + 1].type === TokenType.FullStop && tokens[i + 2] && tokens[i + 2].type === TokenType.DecimalNumber) { + tokens[i].number_l = 3; + return 3; + } + + return 0; + } + + /** + * Get node with number + * @return {Node} + */ + function getNumber() { + var type = NodeType.NumberType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = ''; + var l = tokens[pos].number_l; + + for (var j = 0; j < l; j++) { + content += tokens[pos + j].value; + } + + pos += l; + + return newNode(type, content, line, column); + } + + /** + * Check if token is an operator (`/`, `,`, `:` or `=`). + * @param {Number} i Token's index number + * @return {Number} `1` if token is an operator, otherwise `0` + */ + function checkOperator(i) { + if (i >= tokensLength) return 0; + + switch (tokens[i].type) { + case TokenType.Solidus: + case TokenType.Comma: + case TokenType.Colon: + case TokenType.EqualsSign: + return 1; + } + + return 0; + } + + /** + * Get node with an operator + * @return {Node} + */ + function getOperator() { + var type = NodeType.OperatorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = token.value; + + pos++; + + return newNode(type, content, line, column); + } + + /** + * Check if token is part of text inside parentheses, e.g. `(1)` + * @param {Number} i Token's index number + * @return {Number} + */ + function checkParentheses(i) { + if (i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis) return 0; + + return tokens[i].right - i + 1; + } + + /** + * Get node with text inside parentheses, e.g. `(1)` + * @return {Node} + */ + function getParentheses() { + var type = NodeType.ParenthesesType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + + pos++; + + var tsets = getTsets(); + var end = getLastPosition(tsets, line, column, 1); + pos++; + + return newNode(type, tsets, line, column, end); + } + + /** + * Check if token is part of a number with percent sign (e.g. `10%`) + * @param {Number} i Token's index number + * @return {Number} + */ + function checkPercentage(i) { + var x; + + if (i >= tokensLength) return 0; + + x = checkNumber(i); + + if (!x || i + x >= tokensLength) return 0; + + return tokens[i + x].type === TokenType.PercentSign ? x + 1 : 0; + } + + /** + * Get node of number with percent sign + * @return {Node} + */ + function getPercentage() { + var type = NodeType.PercentageType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = [getNumber()]; + + var end = getLastPosition(content, line, column, 1); + pos++; + + return newNode(type, content, line, column, end); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkProgid(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (joinValues2(i, 6) === 'progid:DXImageTransform.Microsoft.') i += 6;else return 0; + + if (l = checkIdent(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (tokens[i].type === TokenType.LeftParenthesis) { + tokens[start].progid_end = tokens[i].right; + i = tokens[i].right + 1; + } else return 0; + + return i - start; + } + + /** + * @return {Node} + */ + function getProgid() { + var type = NodeType.ProgidType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var progid_end = token.progid_end; + var content = joinValues(pos, progid_end); + + pos = progid_end + 1; + + return newNode(type, content, line, column); + } + + /** + * Check if token is part of a property + * @param {Number} i Token's index number + * @return {Number} Length of the property + */ + function checkProperty(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkIdent(i)) i += l;else return 0; + + return i - start; + } + + /** + * Get node with a property + * @return {Node} + */ + function getProperty() { + var type = NodeType.PropertyType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = [getIdent()]; + + return newNode(type, content, line, column); + } + + /** + * Check if token is a colon + * @param {Number} i Token's index number + * @return {Number} `1` if token is a colon, otherwise `0` + */ + function checkPropertyDelim(i) { + return i < tokensLength && tokens[i].type === TokenType.Colon ? 1 : 0; + } + + /** + * Get node with a colon + * @return {Node} + */ + function getPropertyDelim() { + var type = NodeType.PropertyDelimType; + var token = tokens[pos++]; + var line = token.ln; + var column = token.col; + var content = ':'; + + return newNode(type, content, line, column); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkPseudo(i) { + return checkPseudoe(i) || checkPseudoc(i); + } + + /** + * @return {Node} + */ + function getPseudo() { + if (checkPseudoe(pos)) return getPseudoe(); + if (checkPseudoc(pos)) return getPseudoc(); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkPseudoe(i) { + var l; + + if (i >= tokensLength || tokens[i++].type !== TokenType.Colon || i >= tokensLength || tokens[i++].type !== TokenType.Colon) return 0; + + return (l = checkIdent(i)) ? l + 2 : 0; + } + + /** + * @return {Node} + */ + function getPseudoe() { + var type = NodeType.PseudoeType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + pos += 2; + + content.push(getIdent()); + + return newNode(type, content, line, column); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkPseudoc(i) { + var l; + + if (i >= tokensLength || tokens[i].type !== TokenType.Colon) return 0; + + if (l = checkPseudoClass1(i)) tokens[i].pseudoClassType = 1;else if (l = checkPseudoClass2(i)) tokens[i].pseudoClassType = 2;else if (l = checkPseudoClass3(i)) tokens[i].pseudoClassType = 3;else if (l = checkPseudoClass4(i)) tokens[i].pseudoClassType = 4;else if (l = checkPseudoClass5(i)) tokens[i].pseudoClassType = 5;else if (l = checkPseudoClass6(i)) tokens[i].pseudoClassType = 6;else return 0; + + return l; + } + + /** + * @return {Node} + */ + function getPseudoc() { + var childType = tokens[pos].pseudoClassType; + if (childType === 1) return getPseudoClass1(); + if (childType === 2) return getPseudoClass2(); + if (childType === 3) return getPseudoClass3(); + if (childType === 4) return getPseudoClass4(); + if (childType === 5) return getPseudoClass5(); + if (childType === 6) return getPseudoClass6(); + } + + /** + * (1) `:panda(selector)` + * (2) `:panda(selector, selector)` + */ + function checkPseudoClass1(i) { + var start = i; + + // Skip `:`. + i++; + + var l = undefined; + if (l = checkIdent(i)) i += l;else return 0; + + if (i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis) return 0; + + var right = tokens[i].right; + + // Skip `(`. + i++; + + if (l = checkSelectorsGroup(i)) i += l;else return 0; + + if (i !== right) return 0; + + return i - start + 1; + } + + /** + * (-) `:not(panda)` + */ + function getPseudoClass1() { + var type = NodeType.PseudocType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + // Skip `:`. + pos++; + + content.push(getIdent()); + + { + var _type = NodeType.ArgumentsType; + var _token = tokens[pos]; + var _line = _token.ln; + var _column = _token.col; + + // Skip `(`. + pos++; + + var selectors = getSelectorsGroup(); + var end = getLastPosition(selectors, _line, _column, 1); + var args = newNode(_type, selectors, _line, _column, end); + content.push(args); + + // Skip `)`. + pos++; + } + + return newNode(type, content, line, column); + } + + /** + * (1) `:nth-child(odd)` + * (2) `:nth-child(even)` + * (3) `:lang(de-DE)` + */ + function checkPseudoClass2(i) { + var start = i; + var l = 0; + + // Skip `:`. + i++; + + if (i >= tokensLength) return 0; + + if (l = checkIdent(i)) i += l;else return 0; + + if (i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis) return 0; + + var right = tokens[i].right; + + // Skip `(`. + i++; + + if (l = checkSC(i)) i += l; + + if (l = checkIdent(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (i !== right) return 0; + + return i - start + 1; + } + + function getPseudoClass2() { + var type = NodeType.PseudocType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + // Skip `:`. + pos++; + + var ident = getIdent(); + content.push(ident); + + // Skip `(`. + pos++; + + var l = tokens[pos].ln; + var c = tokens[pos].col; + var value = []; + + value = value.concat(getSC()); + value.push(getIdent()); + value = value.concat(getSC()); + + var end = getLastPosition(value, l, c, 1); + var args = newNode(NodeType.ArgumentsType, value, l, c, end); + content.push(args); + + // Skip `)`. + pos++; + + return newNode(type, content, line, column); + } + + /** + * (-) `:nth-child(-3n + 2)` + */ + function checkPseudoClass3(i) { + var start = i; + var l = 0; + + // Skip `:`. + i++; + + if (i >= tokensLength) return 0; + + if (l = checkIdent(i)) i += l;else return 0; + + if (i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis) return 0; + + var right = tokens[i].right; + + // Skip `(`. + i++; + + if (l = checkSC(i)) i += l; + + if (l = checkUnary(i)) i += l; + if (i >= tokensLength) return 0; + if (tokens[i].type === TokenType.DecimalNumber) i++; + + if (i >= tokensLength) return 0; + if (tokens[i].value === 'n') i++;else return 0; + + if (l = checkSC(i)) i += l; + + if (i >= tokensLength) return 0; + if (tokens[i].value === '+' || tokens[i].value === '-') i++;else return 0; + + if (l = checkSC(i)) i += l; + + if (tokens[i].type === TokenType.DecimalNumber) i++;else return 0; + + if (l = checkSC(i)) i += l; + + if (i !== right) return 0; + + return i - start + 1; + } + + function getPseudoClass3() { + var type = NodeType.PseudocType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + // Skip `:`. + pos++; + + var ident = getIdent(); + content.push(ident); + + var l = tokens[pos].ln; + var c = tokens[pos].col; + var value = []; + + // Skip `(`. + pos++; + + if (checkUnary(pos)) value.push(getUnary()); + if (checkNumber(pos)) value.push(getNumber()); + + { + var _l = tokens[pos].ln; + var _c = tokens[pos].col; + var _content = tokens[pos].value; + var _ident = newNode(NodeType.IdentType, _content, _l, _c); + value.push(_ident); + pos++; + } + + value = value.concat(getSC()); + if (checkUnary(pos)) value.push(getUnary()); + value = value.concat(getSC()); + if (checkNumber(pos)) value.push(getNumber()); + value = value.concat(getSC()); + + var end = getLastPosition(value, l, c, 1); + var args = newNode(NodeType.ArgumentsType, value, l, c, end); + content.push(args); + + // Skip `)`. + pos++; + + return newNode(type, content, line, column); + } + + /** + * (-) `:nth-child(-3n)` + */ + function checkPseudoClass4(i) { + var start = i; + var l = 0; + + // Skip `:`. + i++; + + if (i >= tokensLength) return 0; + + if (l = checkIdent(i)) i += l;else return 0; + + if (i >= tokensLength) return 0; + if (tokens[i].type !== TokenType.LeftParenthesis) return 0; + + var right = tokens[i].right; + + // Skip `(`. + i++; + + if (l = checkSC(i)) i += l; + + if (l = checkUnary(i)) i += l; + if (tokens[i].type === TokenType.DecimalNumber) i++; + + if (tokens[i].value === 'n') i++;else return 0; + + if (l = checkSC(i)) i += l; + + if (i !== right) return 0; + + return i - start + 1; + } + + function getPseudoClass4() { + var type = NodeType.PseudocType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + // Skip `:`. + pos++; + + var ident = getIdent(); + content.push(ident); + + // Skip `(`. + pos++; + + var l = tokens[pos].ln; + var c = tokens[pos].col; + var value = []; + + if (checkUnary(pos)) value.push(getUnary()); + if (checkNumber(pos)) value.push(getNumber()); + if (checkIdent(pos)) value.push(getIdent()); + value = value.concat(getSC()); + + var end = getLastPosition(value, l, c, 1); + var args = newNode(NodeType.ArgumentsType, value, l, c, end); + content.push(args); + + // Skip `)`. + pos++; + + return newNode(type, content, line, column); + } + + /** + * (-) `:nth-child(+8)` + */ + function checkPseudoClass5(i) { + var start = i; + var l = 0; + + // Skip `:`. + i++; + + if (i >= tokensLength) return 0; + + if (l = checkIdent(i)) i += l;else return 0; + + if (i >= tokensLength) return 0; + if (tokens[i].type !== TokenType.LeftParenthesis) return 0; + + var right = tokens[i].right; + + // Skip `(`. + i++; + + if (l = checkSC(i)) i += l; + + if (l = checkUnary(i)) i += l; + if (tokens[i].type === TokenType.DecimalNumber) i++;else return 0; + + if (l = checkSC(i)) i += l; + + if (i !== right) return 0; + + return i - start + 1; + } + + function getPseudoClass5() { + var type = NodeType.PseudocType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + // Skip `:`. + pos++; + + var ident = getIdent(); + content.push(ident); + + // Skip `(`. + pos++; + + var l = tokens[pos].ln; + var c = tokens[pos].col; + var value = []; + + if (checkUnary(pos)) value.push(getUnary()); + if (checkNumber(pos)) value.push(getNumber()); + value = value.concat(getSC()); + + var end = getLastPosition(value, l, c, 1); + var args = newNode(NodeType.ArgumentsType, value, l, c, end); + content.push(args); + + // Skip `)`. + pos++; + + return newNode(type, content, line, column); + } + + /** + * (-) `:checked` + */ + function checkPseudoClass6(i) { + var start = i; + var l = 0; + + // Skip `:`. + i++; + + if (i >= tokensLength) return 0; + + if (l = checkIdent(i)) i += l;else return 0; + + return i - start; + } + + function getPseudoClass6() { + var type = NodeType.PseudocType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + // Skip `:`. + pos++; + + var ident = getIdent(); + content.push(ident); + + return newNode(type, content, line, column); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkRuleset(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkSelectorsGroup(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkBlock(i)) i += l;else return 0; + + return i - start; + } + + /** + * @return {Node} + */ + function getRuleset() { + var type = NodeType.RulesetType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + content = content.concat(getSelectorsGroup()); + content = content.concat(getSC()); + content.push(getBlock()); + + return newNode(type, content, line, column); + } + + /** + * Check if token is marked as a space (if it's a space or a tab + * or a line break). + * @param {Number} i + * @return {Number} Number of spaces in a row starting with the given token. + */ + function checkS(i) { + return i < tokensLength && tokens[i].ws ? tokens[i].ws_last - i + 1 : 0; + } + + /** + * Get node with spaces + * @return {Node} + */ + function getS() { + var type = NodeType.SType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = joinValues(pos, tokens[pos].ws_last); + + pos = tokens[pos].ws_last + 1; + + return newNode(type, content, line, column); + } + + /** + * Check if token is a space or a comment. + * @param {Number} i Token's index number + * @return {Number} Number of similar (space or comment) tokens + * in a row starting with the given token. + */ + function checkSC(i) { + var l = undefined; + var lsc = 0; + + while (i < tokensLength) { + if (l = checkS(i)) tokens[i].sc_child = 1;else if (l = checkCommentML(i)) tokens[i].sc_child = 2;else break; + i += l; + lsc += l; + } + + return lsc || 0; + } + + /** + * Get node with spaces and comments + * @return {Array} + */ + function getSC() { + var sc = []; + + if (pos >= tokensLength) return sc; + + while (pos < tokensLength) { + var childType = tokens[pos].sc_child; + if (childType === 1) sc.push(getS());else if (childType === 2) sc.push(getCommentML());else break; + } + + return sc; + } + + /** + * Check if token is part of a hexadecimal number (e.g. `#fff`) inside + * a simple selector + * @param {Number} i Token's index number + * @return {Number} + */ + function checkShash(i) { + var l; + + if (i >= tokensLength || tokens[i].type !== TokenType.NumberSign) return 0; + + return (l = checkIdent(i + 1)) ? l + 1 : 0; + } + + /** + * Get node with a hexadecimal number (e.g. `#fff`) inside a simple + * selector + * @return {Node} + */ + function getShash() { + var type = NodeType.ShashType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + pos++; + + var ident = getIdent(); + content.push(ident); + + return newNode(type, content, line, column); + } + + /** + * Check if token is part of a string (text wrapped in quotes) + * @param {Number} i Token's index number + * @return {Number} `1` if token is part of a string, `0` if not + */ + function checkString(i) { + if (i >= tokensLength) { + return 0; + } + + if (tokens[i].type === TokenType.StringSQ || tokens[i].type === TokenType.StringDQ) { + return 1; + } + + return 0; + } + + /** + * Get string's node + * @return {Array} `['string', x]` where `x` is a string (including + * quotes). + */ + function getString() { + var type = NodeType.StringType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = token.value; + + pos++; + + return newNode(type, content, line, column); + } + + /** + * Validate stylesheet: it should consist of any number (0 or more) of + * rulesets (sets of rules with selectors), @-rules, whitespaces or + * comments. + * @param {Number} i Token's index number + * @return {Number} + */ + function checkStylesheet(i) { + var start = i; + var l = undefined; + + // Check every token: + while (i < tokensLength) { + if (l = checkSC(i)) tokens[i].stylesheet_child = 1;else if (l = checkRuleset(i)) tokens[i].stylesheet_child = 2;else if (l = checkAtrule(i)) tokens[i].stylesheet_child = 3;else if (l = checkDeclDelim(i)) tokens[i].stylesheet_child = 4;else throwError(i); + + i += l; + } + + return i - start; + } + + /** + * @return {Array} `['stylesheet', x]` where `x` is all stylesheet's + * nodes. + */ + function getStylesheet() { + var type = NodeType.StylesheetType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + var childType = undefined; + + while (pos < tokensLength) { + childType = tokens[pos].stylesheet_child; + if (childType === 1) content = content.concat(getSC());else if (childType === 2) content.push(getRuleset());else if (childType === 3) content.push(getAtrule());else if (childType === 4) content.push(getDeclDelim()); + } + + return newNode(type, content, line, column); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkTset(i) { + var l; + + if (l = checkVhash(i)) tokens[i].tset_child = 1;else if (l = checkAny(i)) tokens[i].tset_child = 2;else if (l = checkSC(i)) tokens[i].tset_child = 3;else if (l = checkOperator(i)) tokens[i].tset_child = 4; + + return l; + } + + /** + * @return {Array} + */ + function getTset() { + var childType = tokens[pos].tset_child; + if (childType === 1) return getVhash();else if (childType === 2) return getAny();else if (childType === 3) return getSC();else if (childType === 4) return getOperator(); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkTsets(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + while (l = checkTset(i)) { + i += l; + } + + return i - start; + } + + /** + * @return {Array} + */ + function getTsets() { + var x = []; + var t = undefined; + + while (checkTset(pos)) { + t = getTset(); + if (typeof t.content === 'string') x.push(t);else x = x.concat(t); + } + + return x; + } + + /** + * Check if token is an unary (arithmetical) sign (`+` or `-`) + * @param {Number} i Token's index number + * @return {Number} `1` if token is an unary sign, `0` if not + */ + function checkUnary(i) { + if (i >= tokensLength) { + return 0; + } + + if (tokens[i].type === TokenType.HyphenMinus || tokens[i].type === TokenType.PlusSign) { + return 1; + } + + return 0; + } + + /** + * Get node with an unary (arithmetical) sign (`+` or `-`) + * @return {Array} `['unary', x]` where `x` is an unary sign + * converted to string. + */ + function getUnary() { + var type = NodeType.OperatorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = token.value; + + pos++; + + return newNode(type, content, line, column); + } + + /** + * Check if token is a unicode range (single or multiple nodes) + * @param {number} i Token's index + * @return {number} Unicode range node's length + */ + function checkUnicodeRange(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkUrange(i)) i += l;else return 0; + + while (i < tokensLength) { + var spaceBefore = checkSC(i); + var comma = checkDelim(i + spaceBefore); + if (!comma) break; + + var spaceAfter = checkSC(i + spaceBefore + comma); + if (l = checkUrange(i + spaceBefore + comma + spaceAfter)) { + i += spaceBefore + comma + spaceAfter + l; + } else break; + } + + return i - start; + } + + /** + * Get a unicode range node + * @return {Node} + */ + function getUnicodeRange() { + var type = NodeType.UnicodeRangeType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + while (pos < tokensLength) { + if (checkSC(pos)) content = content.concat(getSC());else if (checkDelim(pos)) content.push(getDelim());else if (checkUrange(pos)) content.push(getUrange());else break; + } + + return newNode(type, content, line, column); + } + + /** + * Check if token is a u-range (part of a unicode-range) + * (1) `U+416` + * (2) `U+400-4ff` + * (3) `U+4??` + * @param {number} i Token's index + * @return {number} Urange node's length + */ + function checkUrange(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + // Check for unicode prefix (u+ or U+) + if (tokens[i].value === 'U' || tokens[i].value === 'u') i += 1;else return 0; + + if (i >= tokensLength) return 0; + + if (tokens[i].value === '+') i += 1;else return 0; + + while (i < tokensLength) { + if (l = checkIdent(i)) i += l;else if (l = checkNumber(i)) i += l;else if (l = checkUnary(i)) i += l;else if (l = _checkUnicodeWildcard(i)) i += l;else break; + } + + tokens[start].urangeEnd = i - 1; + + return i - start; + } + + /** + * Get a u-range node (part of a unicode-range) + * @return {Node} + */ + function getUrange() { + var startPos = pos; + var type = NodeType.UrangeType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + content = joinValues(startPos, tokens[startPos].urangeEnd); + pos = tokens[startPos].urangeEnd + 1; + + return newNode(type, content, line, column); + } + + /** + * Check for unicode wildcard characters `?` + * @param {number} i Token's index + * @return {number} Wildcard length + */ + function _checkUnicodeWildcard(i) { + var start = i; + + if (i >= tokensLength) return 0; + + while (i < tokensLength) { + if (tokens[i].type === TokenType.QuestionMark) i += 1;else break; + } + + return i - start; + } + + /** + * Check if token is part of URI (e.g. `url('/css/styles.css')`) + * @param {Number} i Token's index number + * @return {Number} Length of URI + */ + function checkUri(i) { + var start = i; + + if (i >= tokensLength || tokens[i].value !== 'url') return 0; + i += 1; + if (i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis) return 0; + + return tokens[i].right - start + 1; + } + + /** + * Get node with URI + * @return {Array} `['uri', x]` where `x` is URI's nodes (without `url` + * and braces, e.g. `['string', ''/css/styles.css'']`). + */ + function getUri() { + var startPos = pos; + var uriExcluding = {}; + var uri = undefined; + var l = undefined; + var raw = undefined; + + var rawContent = undefined; + var t = undefined; + + pos += 2; + + uriExcluding[TokenType.Space] = 1; + uriExcluding[TokenType.Tab] = 1; + uriExcluding[TokenType.Newline] = 1; + uriExcluding[TokenType.LeftParenthesis] = 1; + uriExcluding[TokenType.RightParenthesis] = 1; + + if (checkUri1(pos)) { + uri = [].concat(getSC()).concat([getString()]).concat(getSC()); + } else { + uri = checkSC(pos) ? getSC() : []; + l = checkExcluding(uriExcluding, pos); + rawContent = joinValues(pos, pos + l); + t = tokens[pos]; + raw = newNode(NodeType.RawType, rawContent, t.ln, t.col); + + uri.push(raw); + + pos += l + 1; + + if (checkSC(pos)) uri = uri.concat(getSC()); + } + + t = tokens[startPos]; + var line = t.ln; + var column = t.col; + var end = getLastPosition(uri, line, column, 1); + pos++; + + return newNode(NodeType.UriType, uri, line, column, end); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function checkUri1(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkSC(i)) i += l; + + if (tokens[i].type !== TokenType.StringDQ && tokens[i].type !== TokenType.StringSQ) return 0; + + i++; + + if (l = checkSC(i)) i += l; + + return i - start; + } + + /** + * Check if token is part of a value + * @param {Number} i Token's index number + * @return {Number} Length of the value + */ + function checkValue(i) { + var start = i; + var l = undefined; + var s = undefined; + var _i = undefined; + + while (i < tokensLength) { + s = checkSC(i); + _i = i + s; + + if (l = _checkValue(_i)) i += l + s;else break; + } + + tokens[start].value_end = i; + return i - start; + } + + /** + * @return {Array} + */ + function getValue() { + var startPos = pos; + var end = tokens[pos].value_end; + var x = []; + + while (pos < end) { + if (tokens[pos].value_child) x.push(_getValue());else x = x.concat(getSC()); + } + + var t = tokens[startPos]; + return newNode(NodeType.ValueType, x, t.ln, t.col); + } + + /** + * @param {Number} i Token's index number + * @return {Number} + */ + function _checkValue(i) { + var l; + + if (l = checkProgid(i)) tokens[i].value_child = 1;else if (l = checkVhash(i)) tokens[i].value_child = 2;else if (l = checkAny(i)) tokens[i].value_child = 3;else if (l = checkOperator(i)) tokens[i].value_child = 4;else if (l = checkImportant(i)) tokens[i].value_child = 5; + + return l; + } + + /** + * @return {Array} + */ + function _getValue() { + var childType = tokens[pos].value_child; + if (childType === 1) return getProgid();else if (childType === 2) return getVhash();else if (childType === 3) return getAny();else if (childType === 4) return getOperator();else if (childType === 5) return getImportant(); + } + + /** + * Check if token is part of a hexadecimal number (e.g. `#fff`) inside + * some value + * @param {Number} i Token's index number + * @return {Number} + */ + function checkVhash(i) { + var l; + + if (i >= tokensLength || tokens[i].type !== TokenType.NumberSign) return 0; + + return (l = checkNmName2(i + 1)) ? l + 1 : 0; + } + + /** + * Get node with a hexadecimal number (e.g. `#fff`) inside some value + * @return {Array} `['vhash', x]` where `x` is a hexadecimal number + * converted to string (without `#`, e.g. `'fff'`). + */ + function getVhash() { + var type = NodeType.VhashType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = undefined; + + pos++; + + content = getNmName2(); + var end = getLastPosition(content, line, column + 1); + return newNode(type, content, line, column, end); + } + + module.exports = function (_tokens, context) { + tokens = _tokens; + tokensLength = tokens.length; + pos = 0; + + return contexts[context](); + }; + + function checkSelectorsGroup(i) { + if (i >= tokensLength) return 0; + + var start = i; + var l = undefined; + + if (l = checkSelector(i)) i += l;else return 0; + + while (i < tokensLength) { + var sb = checkSC(i); + var c = checkDelim(i + sb); + if (!c) break; + var sa = checkSC(i + sb + c); + if (l = checkSelector(i + sb + c + sa)) i += sb + c + sa + l;else break; + } + + tokens[start].selectorsGroupEnd = i; + return i - start; + } + + function getSelectorsGroup() { + var selectorsGroup = []; + var selectorsGroupEnd = tokens[pos].selectorsGroupEnd; + + selectorsGroup.push(getSelector()); + + while (pos < selectorsGroupEnd) { + selectorsGroup = selectorsGroup.concat(getSC()); + selectorsGroup.push(getDelim()); + selectorsGroup = selectorsGroup.concat(getSC()); + selectorsGroup.push(getSelector()); + } + + return selectorsGroup; + } + + function checkSelector(i) { + if (i >= tokensLength) return 0; + + var start = i; + var l = undefined; + + if (l = checkCompoundSelector(i)) i += l;else return 0; + + while (i < tokensLength) { + var sb = checkSC(i); + var c = checkCombinator(i + sb); + if (!sb && !c) break; + var sa = checkSC(i + sb + c); + if (l = checkCompoundSelector(i + sb + c + sa)) i += sb + c + sa + l;else break; + } + + tokens[start].selectorEnd = i; + return i - start; + } + + function getSelector() { + var type = NodeType.SelectorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var selectorEnd = token.selectorEnd; + var content = undefined; + + content = getCompoundSelector(); + + while (pos < selectorEnd) { + content = content.concat(getSC()); + if (checkCombinator(pos)) content.push(getCombinator()); + content = content.concat(getSC()); + content = content.concat(getCompoundSelector()); + } + + return newNode(type, content, line, column); + } + + function checkCompoundSelector(i) { + var l = undefined; + + if (l = checkCompoundSelector1(i)) { + tokens[i].compoundSelectorType = 1; + } else if (l = checkCompoundSelector2(i)) { + tokens[i].compoundSelectorType = 2; + } + + return l; + } + + function getCompoundSelector() { + var type = tokens[pos].compoundSelectorType; + if (type === 1) return getCompoundSelector1(); + if (type === 2) return getCompoundSelector2(); + } + + function checkCompoundSelector1(i) { + if (i >= tokensLength) return 0; + + var start = i; + + var l = undefined; + if (l = checkTypeSelector(i)) i += l;else return 0; + + while (i < tokensLength) { + var _l2 = checkShash(i) || checkClass(i) || checkAttributeSelector(i) || checkPseudo(i); + if (_l2) i += _l2;else break; + } + + tokens[start].compoundSelectorEnd = i; + + return i - start; + } + + function getCompoundSelector1() { + var sequence = []; + var compoundSelectorEnd = tokens[pos].compoundSelectorEnd; + + sequence.push(getTypeSelector()); + + while (pos < compoundSelectorEnd) { + if (checkShash(pos)) sequence.push(getShash());else if (checkClass(pos)) sequence.push(getClass());else if (checkAttributeSelector(pos)) sequence.push(getAttributeSelector());else if (checkPseudo(pos)) sequence.push(getPseudo()); + } + + return sequence; + } + + function checkCompoundSelector2(i) { + if (i >= tokensLength) return 0; + + var start = i; + + while (i < tokensLength) { + var l = checkShash(i) || checkClass(i) || checkAttributeSelector(i) || checkPseudo(i); + if (l) i += l;else break; + } + + tokens[start].compoundSelectorEnd = i; + + return i - start; + } + + function getCompoundSelector2() { + var sequence = []; + var compoundSelectorEnd = tokens[pos].compoundSelectorEnd; + + while (pos < compoundSelectorEnd) { + if (checkShash(pos)) sequence.push(getShash());else if (checkClass(pos)) sequence.push(getClass());else if (checkAttributeSelector(pos)) sequence.push(getAttributeSelector());else if (checkPseudo(pos)) sequence.push(getPseudo()); + } + + return sequence; + } + + function checkTypeSelector(i) { + if (i >= tokensLength) return 0; + + var start = i; + var l = undefined; + + if (l = checkNamePrefix(i)) i += l; + + if (tokens[i].type === TokenType.Asterisk) i++;else if (l = checkIdent(i)) i += l;else return 0; + + return i - start; + } + + function getTypeSelector() { + var type = NodeType.TypeSelectorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + if (checkNamePrefix(pos)) content.push(getNamePrefix()); + + token = tokens[pos]; + if (token.type === TokenType.Asterisk) { + var asteriskNode = newNode(NodeType.IdentType, '*', token.ln, token.col); + content.push(asteriskNode); + pos++; + } else if (checkIdent(pos)) content.push(getIdent()); + + return newNode(type, content, line, column); + } + + function checkAttributeSelector(i) { + var l = undefined; + if (l = checkAttributeSelector1(i)) tokens[i].attributeSelectorType = 1;else if (l = checkAttributeSelector2(i)) tokens[i].attributeSelectorType = 2; + + return l; + } + + function getAttributeSelector() { + var type = tokens[pos].attributeSelectorType; + if (type === 1) return getAttributeSelector1();else return getAttributeSelector2(); + } + + /** + * (1) `[panda=nani]` + * (2) `[panda='nani']` + * (3) `[panda='nani' i]` + * + */ + function checkAttributeSelector1(i) { + var start = i; + + if (tokens[i].type === TokenType.LeftSquareBracket) i++;else return 0; + + var l = undefined; + if (l = checkSC(i)) i += l; + + if (l = checkAttributeName(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkAttributeMatch(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkAttributeValue(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkAttributeFlags(i)) { + i += l; + if (l = checkSC(i)) i += l; + } + + if (tokens[i].type === TokenType.RightSquareBracket) i++;else return 0; + + return i - start; + } + + function getAttributeSelector1() { + var type = NodeType.AttributeSelectorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + // Skip `[`. + pos++; + + content = content.concat(getSC()); + content.push(getAttributeName()); + content = content.concat(getSC()); + content.push(getAttributeMatch()); + content = content.concat(getSC()); + content.push(getAttributeValue()); + content = content.concat(getSC()); + + if (checkAttributeFlags(pos)) { + content.push(getAttributeFlags()); + content = content.concat(getSC()); + } + + // Skip `]`. + pos++; + + var end = getLastPosition(content, line, column, 1); + return newNode(type, content, line, column, end); + } + + /** + * (1) `[panda]` + */ + function checkAttributeSelector2(i) { + var start = i; + + if (tokens[i].type === TokenType.LeftSquareBracket) i++;else return 0; + + var l = undefined; + if (l = checkSC(i)) i += l; + + if (l = checkAttributeName(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (tokens[i].type === TokenType.RightSquareBracket) i++;else return 0; + + return i - start; + } + + function getAttributeSelector2() { + var type = NodeType.AttributeSelectorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + // Skip `[`. + pos++; + + content = content.concat(getSC()); + content.push(getAttributeName()); + content = content.concat(getSC()); + + // Skip `]`. + pos++; + + var end = getLastPosition(content, line, column, 1); + return newNode(type, content, line, column, end); + } + + function checkAttributeName(i) { + var start = i; + var l = undefined; + + if (l = checkNamePrefix(i)) i += l; + + if (l = checkIdent(i)) i += l;else return 0; + + return i - start; + } + + function getAttributeName() { + var type = NodeType.AttributeNameType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + if (checkNamePrefix(pos)) content.push(getNamePrefix()); + content.push(getIdent()); + + return newNode(type, content, line, column); + } + + function checkAttributeMatch(i) { + var l = undefined; + if (l = checkAttributeMatch1(i)) tokens[i].attributeMatchType = 1;else if (l = checkAttributeMatch2(i)) tokens[i].attributeMatchType = 2; + + return l; + } + + function getAttributeMatch() { + var type = tokens[pos].attributeMatchType; + if (type === 1) return getAttributeMatch1();else return getAttributeMatch2(); + } + + function checkAttributeMatch1(i) { + var start = i; + + var type = tokens[i].type; + if (type === TokenType.Tilde || type === TokenType.VerticalLine || type === TokenType.CircumflexAccent || type === TokenType.DollarSign || type === TokenType.Asterisk) i++;else return 0; + + if (tokens[i].type === TokenType.EqualsSign) i++;else return 0; + + return i - start; + } + + function getAttributeMatch1() { + var type = NodeType.AttributeMatchType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = tokens[pos].value + tokens[pos + 1].value; + pos += 2; + + return newNode(type, content, line, column); + } + + function checkAttributeMatch2(i) { + if (tokens[i].type === TokenType.EqualsSign) return 1;else return 0; + } + + function getAttributeMatch2() { + var type = NodeType.AttributeMatchType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = '='; + + pos++; + return newNode(type, content, line, column); + } + + function checkAttributeValue(i) { + return checkString(i) || checkIdent(i); + } + + function getAttributeValue() { + var type = NodeType.AttributeValueType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + if (checkString(pos)) content.push(getString());else content.push(getIdent()); + + return newNode(type, content, line, column); + } + + function checkAttributeFlags(i) { + return checkIdent(i); + } + + function getAttributeFlags() { + var type = NodeType.AttributeFlagsType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = [getIdent()]; + + return newNode(type, content, line, column); + } + + function checkNamePrefix(i) { + if (i >= tokensLength) return 0; + + var l = undefined; + if (l = checkNamePrefix1(i)) tokens[i].namePrefixType = 1;else if (l = checkNamePrefix2(i)) tokens[i].namePrefixType = 2; + + return l; + } + + function getNamePrefix() { + var type = tokens[pos].namePrefixType; + if (type === 1) return getNamePrefix1();else return getNamePrefix2(); + } + + /** + * (1) `panda|` + * (2) `panda|` + */ + function checkNamePrefix1(i) { + var start = i; + var l = undefined; + + if (l = checkNamespacePrefix(i)) i += l;else return 0; + + if (l = checkCommentML(i)) i += l; + + if (l = checkNamespaceSeparator(i)) i += l;else return 0; + + return i - start; + } + + function getNamePrefix1() { + var type = NodeType.NamePrefixType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + content.push(getNamespacePrefix()); + + if (checkCommentML(pos)) content.push(getCommentML()); + + content.push(getNamespaceSeparator()); + + return newNode(type, content, line, column); + } + + /** + * (1) `|` + */ + function checkNamePrefix2(i) { + return checkNamespaceSeparator(i); + } + + function getNamePrefix2() { + var type = NodeType.NamePrefixType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = [getNamespaceSeparator()]; + + return newNode(type, content, line, column); + } + + /** + * (1) `*` + * (2) `panda` + */ + function checkNamespacePrefix(i) { + if (i >= tokensLength) return 0; + + var l = undefined; + + if (tokens[i].type === TokenType.Asterisk) return 1;else if (l = checkIdent(i)) return l;else return 0; + } + + function getNamespacePrefix() { + var type = NodeType.NamespacePrefixType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + if (tokens[pos].type === TokenType.Asterisk) { + var asteriskNode = newNode(NodeType.IdentType, '*', line, column); + content.push(asteriskNode); + pos++; + } else if (checkIdent(pos)) content.push(getIdent()); + + return newNode(type, content, line, column); + } + + /** + * (1) `|` + */ + function checkNamespaceSeparator(i) { + if (i >= tokensLength) return 0; + + if (tokens[i].type !== TokenType.VerticalLine) return 0; + + // Return false if `|=` - [attr|=value] + if (tokens[i + 1] && tokens[i + 1].type === TokenType.EqualsSign) return 0; + + return 1; + } + + function getNamespaceSeparator() { + var type = NodeType.NamespaceSeparatorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = '|'; + + pos++; + return newNode(type, content, line, column); + } + +/***/ }, +/* 15 */ +/***/ function(module, exports) { + + 'use strict'; + + module.exports = { + ArgumentsType: 'arguments', + AtkeywordType: 'atkeyword', + AtruleType: 'atrule', + AttributeSelectorType: 'attributeSelector', + AttributeNameType: 'attributeName', + AttributeFlagsType: 'attributeFlags', + AttributeMatchType: 'attributeMatch', + AttributeValueType: 'attributeValue', + BlockType: 'block', + BracketsType: 'brackets', + ClassType: 'class', + CombinatorType: 'combinator', + CommentMLType: 'multilineComment', + CommentSLType: 'singlelineComment', + ConditionType: 'condition', + ConditionalStatementType: 'conditionalStatement', + DeclarationType: 'declaration', + DeclDelimType: 'declarationDelimiter', + DefaultType: 'default', + DelimType: 'delimiter', + DimensionType: 'dimension', + EscapedStringType: 'escapedString', + ExtendType: 'extend', + ExpressionType: 'expression', + FunctionType: 'function', + GlobalType: 'global', + IdentType: 'ident', + ImportantType: 'important', + IncludeType: 'include', + InterpolationType: 'interpolation', + InterpolatedVariableType: 'interpolatedVariable', + KeyframesSelectorType: 'keyframesSelector', + LoopType: 'loop', + MixinType: 'mixin', + NamePrefixType: 'namePrefix', + NamespacePrefixType: 'namespacePrefix', + NamespaceSeparatorType: 'namespaceSeparator', + NumberType: 'number', + OperatorType: 'operator', + OptionalType: 'optional', + ParenthesesType: 'parentheses', + ParentSelectorType: 'parentSelector', + ParentSelectorExtensionType: 'parentSelectorExtension', + PercentageType: 'percentage', + PlaceholderType: 'placeholder', + ProgidType: 'progid', + PropertyType: 'property', + PropertyDelimType: 'propertyDelimiter', + PseudocType: 'pseudoClass', + PseudoeType: 'pseudoElement', + RawType: 'raw', + RulesetType: 'ruleset', + SType: 'space', + SelectorType: 'selector', + ShashType: 'id', + StringType: 'string', + StylesheetType: 'stylesheet', + TypeSelectorType: 'typeSelector', + UnicodeRangeType: 'unicodeRange', + UriType: 'uri', + UrangeType: 'urange', + ValueType: 'value', + VariableType: 'variable', + VariablesListType: 'variablesList', + VhashType: 'color' + }; + +/***/ }, +/* 16 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + module.exports = function (css, tabSize) { + var TokenType = __webpack_require__(13); + + var tokens = []; + var urlMode = false; + var blockMode = 0; + var pos = 0; + var tn = 0; + var ln = 1; + var col = 1; + var cssLength = 0; + + var Punctuation = { + ' ': TokenType.Space, + '\n': TokenType.Newline, + '\r': TokenType.Newline, + '\t': TokenType.Tab, + '!': TokenType.ExclamationMark, + '"': TokenType.QuotationMark, + '#': TokenType.NumberSign, + '$': TokenType.DollarSign, + '%': TokenType.PercentSign, + '&': TokenType.Ampersand, + '\'': TokenType.Apostrophe, + '(': TokenType.LeftParenthesis, + ')': TokenType.RightParenthesis, + '*': TokenType.Asterisk, + '+': TokenType.PlusSign, + ',': TokenType.Comma, + '-': TokenType.HyphenMinus, + '.': TokenType.FullStop, + '/': TokenType.Solidus, + ':': TokenType.Colon, + ';': TokenType.Semicolon, + '<': TokenType.LessThanSign, + '=': TokenType.EqualsSign, + '>': TokenType.GreaterThanSign, + '?': TokenType.QuestionMark, + '@': TokenType.CommercialAt, + '[': TokenType.LeftSquareBracket, + ']': TokenType.RightSquareBracket, + '^': TokenType.CircumflexAccent, + '_': TokenType.LowLine, + '{': TokenType.LeftCurlyBracket, + '|': TokenType.VerticalLine, + '}': TokenType.RightCurlyBracket, + '~': TokenType.Tilde + }; + + /** + * Add a token to the token list + * @param {string} type + * @param {string} value + */ + function pushToken(type, value, column) { + tokens.push({ + tn: tn++, + ln: ln, + col: column, + type: type, + value: value + }); + } + + /** + * Check if a character is a decimal digit + * @param {string} c Character + * @returns {boolean} + */ + function isDecimalDigit(c) { + return '0123456789'.indexOf(c) >= 0; + } + + /** + * Parse spaces + * @param {string} css Unparsed part of CSS string + */ + function parseSpaces(css) { + var start = pos; + + // Read the string until we meet a non-space character: + for (; pos < cssLength; pos++) { + if (css.charAt(pos) !== ' ') break; + } + + // Add a substring containing only spaces to tokens: + pushToken(TokenType.Space, css.substring(start, pos--), col); + col += pos - start; + } + + /** + * Parse a string within quotes + * @param {string} css Unparsed part of CSS string + * @param {string} q Quote (either `'` or `"`) + */ + function parseString(css, q) { + var start = pos; + + // Read the string until we meet a matching quote: + for (pos++; pos < cssLength; pos++) { + // Skip escaped quotes: + if (css.charAt(pos) === '\\') pos++;else if (css.charAt(pos) === q) break; + } + + // Add the string (including quotes) to tokens: + pushToken(q === '"' ? TokenType.StringDQ : TokenType.StringSQ, css.substring(start, pos + 1), col); + col += pos - start; + } + + /** + * Parse numbers + * @param {string} css Unparsed part of CSS string + */ + function parseDecimalNumber(css) { + var start = pos; + + // Read the string until we meet a character that's not a digit: + for (; pos < cssLength; pos++) { + if (!isDecimalDigit(css.charAt(pos))) break; + } + + // Add the number to tokens: + pushToken(TokenType.DecimalNumber, css.substring(start, pos--), col); + col += pos - start; + } + + /** + * Parse identifier + * @param {string} css Unparsed part of CSS string + */ + function parseIdentifier(css) { + var start = pos; + + // Skip all opening slashes: + while (css.charAt(pos) === '/') pos++; + + // Read the string until we meet a punctuation mark: + for (; pos < cssLength; pos++) { + // Skip all '\': + if (css.charAt(pos) === '\\') pos++;else if (Punctuation[css.charAt(pos)]) break; + } + + var ident = css.substring(start, pos--); + + // Enter url mode if parsed substring is `url`: + urlMode = urlMode || ident === 'url'; + + // Add identifier to tokens: + pushToken(TokenType.Identifier, ident, col); + col += pos - start; + } + + /** + * Parse a multiline comment + * @param {string} css Unparsed part of CSS string + */ + function parseMLComment(css) { + var start = pos; + + // Read the string until we meet `*/`. + // Since we already know first 2 characters (`/*`), start reading + // from `pos + 2`: + for (pos = pos + 2; pos < cssLength; pos++) { + if (css.charAt(pos) === '*' && css.charAt(pos + 1) === '/') { + pos++; + break; + } + } + + // Add full comment (including `/*` and `*/`) to the list of tokens: + var comment = css.substring(start, pos + 1); + pushToken(TokenType.CommentML, comment, col); + + var newlines = comment.split('\n'); + if (newlines.length > 1) { + ln += newlines.length - 1; + col = newlines[newlines.length - 1].length; + } else { + col += pos - start; + } + } + + function parseSLComment(css) { + var start = pos; + + // Read the string until we meet line break. + // Since we already know first 2 characters (`//`), start reading + // from `pos + 2`: + for (pos += 2; pos < cssLength; pos++) { + if (css.charAt(pos) === '\n' || css.charAt(pos) === '\r') { + break; + } + } + + // Add comment (including `//` and line break) to the list of tokens: + pushToken(TokenType.CommentSL, css.substring(start, pos--), col); + col += pos - start; + } + + /** + * Convert a CSS string to a list of tokens + * @param {string} css CSS string + * @returns {Array} List of tokens + * @private + */ + function getTokens(css) { + var c; // Current character + var cn; // Next character + + cssLength = css.length; + + // Parse string, character by character: + for (pos = 0; pos < cssLength; col++, pos++) { + c = css.charAt(pos); + cn = css.charAt(pos + 1); + + // If we meet `/*`, it's a start of a multiline comment. + // Parse following characters as a multiline comment: + if (c === '/' && cn === '*') { + parseMLComment(css); + } + + // If we meet `//` and it is not a part of url: + else if (!urlMode && c === '/' && cn === '/') { + // If we're currently inside a block, treat `//` as a start + // of identifier. Else treat `//` as a start of a single-line + // comment: + if (blockMode > 0) parseIdentifier(css);else parseSLComment(css); + } + + // If current character is a double or single quote, it's a start + // of a string: + else if (c === '"' || c === "'") { + parseString(css, c); + } + + // If current character is a space: + else if (c === ' ') { + parseSpaces(css); + } + + // If current character is a punctuation mark: + else if (Punctuation[c]) { + // Add it to the list of tokens: + pushToken(Punctuation[c], c, col); + if (c === '\n' || c === '\r') { + ln++; + col = 0; + } // Go to next line + else if (c === ')') urlMode = false; // Exit url mode + else if (c === '{') blockMode++; // Enter a block + else if (c === '}') blockMode--; // Exit a block + else if (c === '\t' && tabSize > 1) col += tabSize - 1; + } + + // If current character is a decimal digit: + else if (isDecimalDigit(c)) { + parseDecimalNumber(css); + } + + // If current character is anything else: + else { + parseIdentifier(css); + } + } + + return tokens; + } + + return getTokens(css); + }; + +/***/ }, +/* 17 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + exports['default'] = { + mark: __webpack_require__(18), + parse: __webpack_require__(19), + stringify: __webpack_require__(4), + tokenizer: __webpack_require__(20) + }; + module.exports = exports['default']; + +/***/ }, +/* 18 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var TokenType = __webpack_require__(13); + + module.exports = (function () { + /** + * Mark whitespaces and comments + */ + function markSC(tokens) { + var tokensLength = tokens.length; + var ws = -1; // Flag for whitespaces + var sc = -1; // Flag for whitespaces and comments + var t = undefined; // Current token + + // For every token in the token list, mark spaces and line breaks + // as spaces (set both `ws` and `sc` flags). Mark multiline comments + // with `sc` flag. + // If there are several spaces or tabs or line breaks or multiline + // comments in a row, group them: take the last one's index number + // and save it to the first token in the group as a reference: + // e.g., `ws_last = 7` for a group of whitespaces or `sc_last = 9` + // for a group of whitespaces and comments. + for (var i = 0; i < tokensLength; i++) { + t = tokens[i]; + switch (t.type) { + case TokenType.Space: + case TokenType.Tab: + case TokenType.Newline: + t.ws = true; + t.sc = true; + + if (ws === -1) ws = i; + if (sc === -1) sc = i; + + break; + case TokenType.CommentML: + case TokenType.CommentSL: + if (ws !== -1) { + tokens[ws].ws_last = i - 1; + ws = -1; + } + + t.sc = true; + + break; + default: + if (ws !== -1) { + tokens[ws].ws_last = i - 1; + ws = -1; + } + + if (sc !== -1) { + tokens[sc].sc_last = i - 1; + sc = -1; + } + } + } + + if (ws !== -1) tokens[ws].ws_last = i - 1; + if (sc !== -1) tokens[sc].sc_last = i - 1; + } + + /** + * Pair brackets + */ + function markBrackets(tokens) { + var tokensLength = tokens.length; + var ps = []; // Parentheses + var sbs = []; // Square brackets + var cbs = []; // Curly brackets + var t = undefined; // Current token + + // For every token in the token list, if we meet an opening (left) + // bracket, push its index number to a corresponding array. + // If we then meet a closing (right) bracket, look at the corresponding + // array. If there are any elements (records about previously met + // left brackets), take a token of the last left bracket (take + // the last index number from the array and find a token with + // this index number) and save right bracket's index as a reference: + for (var i = 0; i < tokensLength; i++) { + t = tokens[i]; + switch (t.type) { + case TokenType.LeftParenthesis: + ps.push(i); + break; + case TokenType.RightParenthesis: + if (ps.length) { + t.left = ps.pop(); + tokens[t.left].right = i; + } + break; + case TokenType.LeftSquareBracket: + sbs.push(i); + break; + case TokenType.RightSquareBracket: + if (sbs.length) { + t.left = sbs.pop(); + tokens[t.left].right = i; + } + break; + case TokenType.LeftCurlyBracket: + cbs.push(i); + break; + case TokenType.RightCurlyBracket: + if (cbs.length) { + t.left = cbs.pop(); + tokens[t.left].right = i; + } + break; + } + } + } + + return function (tokens) { + markBrackets(tokens); + markSC(tokens); + }; + })(); + +/***/ }, +/* 19 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var Node = __webpack_require__(1); + var NodeType = __webpack_require__(15); + var TokenType = __webpack_require__(13); + + var tokens = undefined; + var tokensLength = undefined; + var pos = undefined; + + var contexts = { + 'arguments': function () { + return checkArguments(pos) && getArguments(); + }, + 'atkeyword': function () { + return checkAtkeyword(pos) && getAtkeyword(); + }, + 'atrule': function () { + return checkAtrule(pos) && getAtrule(); + }, + 'block': function () { + return checkBlock(pos) && getBlock(); + }, + 'brackets': function () { + return checkBrackets(pos) && getBrackets(); + }, + 'class': function () { + return checkClass(pos) && getClass(); + }, + 'combinator': function () { + return checkCombinator(pos) && getCombinator(); + }, + 'commentML': function () { + return checkCommentML(pos) && getCommentML(); + }, + 'commentSL': function () { + return checkCommentSL(pos) && getCommentSL(); + }, + 'condition': function () { + return checkCondition(pos) && getCondition(); + }, + 'declaration': function () { + return checkDeclaration(pos) && getDeclaration(); + }, + 'declDelim': function () { + return checkDeclDelim(pos) && getDeclDelim(); + }, + 'delim': function () { + return checkDelim(pos) && getDelim(); + }, + 'dimension': function () { + return checkDimension(pos) && getDimension(); + }, + 'escapedString': function () { + return checkEscapedString(pos) && getEscapedString(); + }, + 'expression': function () { + return checkExpression(pos) && getExpression(); + }, + 'extend': function () { + return checkExtend(pos) && getExtend(); + }, + 'function': function () { + return checkFunction(pos) && getFunction(); + }, + 'ident': function () { + return checkIdent(pos) && getIdent(); + }, + 'important': function () { + return checkImportant(pos) && getImportant(); + }, + 'include': function () { + return checkInclude(pos) && getInclude(); + }, + 'interpolatedVariable': function () { + return checkInterpolatedVariable(pos) && getInterpolatedVariable(); + }, + 'mixin': function () { + return checkMixin(pos) && getMixin(); + }, + 'namespace': function () { + return checkNamespace(pos) && getNamespace(); + }, + 'number': function () { + return checkNumber(pos) && getNumber(); + }, + 'operator': function () { + return checkOperator(pos) && getOperator(); + }, + 'parentheses': function () { + return checkParentheses(pos) && getParentheses(); + }, + 'parentselector': function () { + return checkParentSelector(pos) && getParentSelector(); + }, + 'percentage': function () { + return checkPercentage(pos) && getPercentage(); + }, + 'progid': function () { + return checkProgid(pos) && getProgid(); + }, + 'property': function () { + return checkProperty(pos) && getProperty(); + }, + 'propertyDelim': function () { + return checkPropertyDelim(pos) && getPropertyDelim(); + }, + 'pseudoc': function () { + return checkPseudoc(pos) && getPseudoc(); + }, + 'pseudoe': function () { + return checkPseudoe(pos) && getPseudoe(); + }, + 'ruleset': function () { + return checkRuleset(pos) && getRuleset(); + }, + 's': function () { + return checkS(pos) && getS(); + }, + 'selector': function () { + return checkSelector(pos) && getSelector(); + }, + 'shash': function () { + return checkShash(pos) && getShash(); + }, + 'string': function () { + return checkString(pos) && getString(); + }, + 'stylesheet': function () { + return checkStylesheet(pos) && getStylesheet(); + }, + 'unary': function () { + return checkUnary(pos) && getUnary(); + }, + 'unicodeRange': function () { + return checkUnicodeRange(pos) && getUnicodeRange(); + }, + 'urange': function () { + return checkUrange(pos) && getUrange(); + }, + 'uri': function () { + return checkUri(pos) && getUri(); + }, + 'value': function () { + return checkValue(pos) && getValue(); + }, + 'variable': function () { + return checkVariable(pos) && getVariable(); + }, + 'variableslist': function () { + return checkVariablesList(pos) && getVariablesList(); + }, + 'vhash': function () { + return checkVhash(pos) && getVhash(); + } + }; + + /** + * Stop parsing and display error + * @param {Number=} i Token's index number + */ + function throwError(i) { + var ln = tokens[i].ln; + + throw { line: ln, syntax: 'less' }; + } + + /** + * @param {Object} exclude + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkExcluding(exclude, i) { + var start = i; + + while (i < tokensLength) { + if (exclude[tokens[i++].type]) break; + } + + return i - start - 2; + } + + /** + * @param {Number} start + * @param {Number} finish + * @returns {String} + */ + function joinValues(start, finish) { + var s = ''; + + for (var i = start; i < finish + 1; i++) { + s += tokens[i].value; + } + + return s; + } + + /** + * @param {Number} start + * @param {Number} num + * @returns {String} + */ + function joinValues2(start, num) { + if (start + num - 1 >= tokensLength) return; + + var s = ''; + + for (var i = 0; i < num; i++) { + s += tokens[start + i].value; + } + + return s; + } + + function getLastPosition(content, line, column, colOffset) { + return typeof content === 'string' ? getLastPositionForString(content, line, column, colOffset) : getLastPositionForArray(content, line, column, colOffset); + } + + function getLastPositionForString(content, line, column, colOffset) { + var position = []; + + if (!content) { + position = [line, column]; + if (colOffset) position[1] += colOffset - 1; + return position; + } + + var lastLinebreak = content.lastIndexOf('\n'); + var endsWithLinebreak = lastLinebreak === content.length - 1; + var splitContent = content.split('\n'); + var linebreaksCount = splitContent.length - 1; + var prevLinebreak = linebreaksCount === 0 || linebreaksCount === 1 ? -1 : content.length - splitContent[linebreaksCount - 1].length - 2; + + // Line: + var offset = endsWithLinebreak ? linebreaksCount - 1 : linebreaksCount; + position[0] = line + offset; + + // Column: + if (endsWithLinebreak) { + offset = prevLinebreak !== -1 ? content.length - prevLinebreak : content.length - 1; + } else { + offset = linebreaksCount !== 0 ? content.length - lastLinebreak - column - 1 : content.length - 1; + } + position[1] = column + offset; + + if (!colOffset) return position; + + if (endsWithLinebreak) { + position[0]++; + position[1] = colOffset; + } else { + position[1] += colOffset; + } + + return position; + } + + function getLastPositionForArray(content, line, column, colOffset) { + var position; + + if (content.length === 0) { + position = [line, column]; + } else { + var c = content[content.length - 1]; + if (c.hasOwnProperty('end')) { + position = [c.end.line, c.end.column]; + } else { + position = getLastPosition(c.content, line, column); + } + } + + if (!colOffset) return position; + + if (tokens[pos - 1].type !== 'Newline') { + position[1] += colOffset; + } else { + position[0]++; + position[1] = 1; + } + + return position; + } + + function newNode(type, content, line, column, end) { + if (!end) end = getLastPosition(content, line, column); + return new Node({ + type: type, + content: content, + start: { + line: line, + column: column + }, + end: { + line: end[0], + column: end[1] + }, + syntax: 'less' + }); + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkAny(i) { + var l; + + if (l = checkBrackets(i)) tokens[i].any_child = 1;else if (l = checkParentheses(i)) tokens[i].any_child = 2;else if (l = checkString(i)) tokens[i].any_child = 3;else if (l = checkVariablesList(i)) tokens[i].any_child = 4;else if (l = checkVariable(i)) tokens[i].any_child = 5;else if (l = checkPercentage(i)) tokens[i].any_child = 6;else if (l = checkDimension(i)) tokens[i].any_child = 7;else if (l = checkUnicodeRange(i)) tokens[i].any_child = 15;else if (l = checkNumber(i)) tokens[i].any_child = 8;else if (l = checkUri(i)) tokens[i].any_child = 9;else if (l = checkExpression(i)) tokens[i].any_child = 10;else if (l = checkFunction(i)) tokens[i].any_child = 11;else if (l = checkIdent(i)) tokens[i].any_child = 12;else if (l = checkClass(i)) tokens[i].any_child = 13;else if (l = checkUnary(i)) tokens[i].any_child = 14; + + return l; + } + + /** + * @returns {Array} + */ + function getAny() { + var childType = tokens[pos].any_child; + + if (childType === 1) return getBrackets(); + if (childType === 2) return getParentheses(); + if (childType === 3) return getString(); + if (childType === 4) return getVariablesList(); + if (childType === 5) return getVariable(); + if (childType === 6) return getPercentage(); + if (childType === 7) return getDimension(); + if (childType === 15) return getUnicodeRange(); + if (childType === 8) return getNumber(); + if (childType === 9) return getUri(); + if (childType === 10) return getExpression(); + if (childType === 11) return getFunction(); + if (childType === 12) return getIdent(); + if (childType === 13) return getClass(); + if (childType === 14) return getUnary(); + } + + /** + * Check if token is part of mixin's arguments. + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkArguments(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength || tokens[i++].type !== TokenType.LeftParenthesis) return 0; + + while (i < tokens[start].right) { + if (l = checkArgument(i)) i += l;else return 0; + } + + return tokens[start].right - start + 1; + } + + /** + * Check if token is valid to be part of arguments list. + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkArgument(i) { + var l; + + if (l = checkEscapedString(i)) tokens[i].argument_child = 1;else if (l = checkDeclaration(i)) tokens[i].argument_child = 2;else if (l = checkVariablesList(i)) tokens[i].argument_child = 3;else if (l = checkVariable(i)) tokens[i].argument_child = 4;else if (l = checkSC(i)) tokens[i].argument_child = 5;else if (l = checkUnary(i)) tokens[i].argument_child = 6;else if (l = checkOperator(i)) tokens[i].argument_child = 7;else if (l = checkDelim(i)) tokens[i].argument_child = 8;else if (l = checkDeclDelim(i)) tokens[i].argument_child = 9;else if (l = checkString(i)) tokens[i].argument_child = 10;else if (l = checkPercentage(i)) tokens[i].argument_child = 11;else if (l = checkDimension(i)) tokens[i].argument_child = 12;else if (l = checkNumber(i)) tokens[i].argument_child = 13;else if (l = checkUri(i)) tokens[i].argument_child = 14;else if (l = checkFunction(i)) tokens[i].argument_child = 15;else if (l = checkIdent(i)) tokens[i].argument_child = 16;else if (l = checkVhash(i)) tokens[i].argument_child = 17;else if (l = checkBlock(i)) tokens[i].argument_child = 18;else if (l = checkParentheses(i)) tokens[i].argument_child = 19; + + return l; + } + + /** + * @returns {Array} Node that is part of arguments list. + */ + function getArgument() { + var childType = tokens[pos].argument_child; + + if (childType === 1) return getEscapedString(); + if (childType === 2) return getDeclaration(); + if (childType === 3) return getVariablesList(); + if (childType === 4) return getVariable(); + if (childType === 5) return getSC(); + if (childType === 6) return getUnary(); + if (childType === 7) return getOperator(); + if (childType === 8) return getDelim(); + if (childType === 9) return getDeclDelim(); + if (childType === 10) return getString(); + if (childType === 11) return getPercentage(); + if (childType === 12) return getDimension(); + if (childType === 13) return getNumber(); + if (childType === 14) return getUri(); + if (childType === 15) return getFunction(); + if (childType === 16) return getIdent(); + if (childType === 17) return getVhash(); + if (childType === 18) return getBlock(); + if (childType === 19) return getParentheses(); + } + + /** + * Check if token is part of an @-word (e.g. `@import`, `@include`) + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkAtkeyword(i) { + var l; + + // Check that token is `@`: + if (i >= tokensLength || tokens[i++].type !== TokenType.CommercialAt) return 0; + + return (l = checkIdent(i)) ? l + 1 : 0; + } + + /** + * Get node with @-word + * @returns {Array} `['atkeyword', ['ident', x]]` where `x` is + * an identifier without + * `@` (e.g. `import`, `include`) + */ + function getAtkeyword() { + var token = tokens[pos++]; + var content = [getIdent()]; + + return newNode(NodeType.AtkeywordType, content, token.ln, token.col); + } + + /** + * Check if token is a part of an @-rule + * @param {Number} i Token's index number + * @returns {Number} Length of @-rule + */ + function checkAtrule(i) { + var l; + + if (i >= tokensLength) return 0; + + // If token already has a record of being part of an @-rule, + // return the @-rule's length: + if (tokens[i].atrule_l !== undefined) return tokens[i].atrule_l; + + // If token is part of an @-rule, save the rule's type to token. + if (l = checkKeyframesRule(i)) tokens[i].atrule_type = 4; + // @-rule with ruleset: + else if (l = checkAtruler(i)) tokens[i].atrule_type = 1; + // Block @-rule: + else if (l = checkAtruleb(i)) tokens[i].atrule_type = 2; + // Single-line @-rule: + else if (l = checkAtrules(i)) tokens[i].atrule_type = 3;else return 0; + + // If token is part of an @-rule, save the rule's length to token: + tokens[i].atrule_l = l; + + return l; + } + + /** + * Get node with @-rule + * @returns {Array} + */ + function getAtrule() { + switch (tokens[pos].atrule_type) { + case 1: + return getAtruler(); // @-rule with ruleset + case 2: + return getAtruleb(); // Block @-rule + case 3: + return getAtrules(); // Single-line @-rule + case 4: + return getKeyframesRule(); + } + } + + /** + * Check if token is part of a block @-rule + * @param {Number} i Token's index number + * @returns {Number} Length of the @-rule + */ + function checkAtruleb(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkAtkeyword(i)) i += l;else return 0; + + if (l = checkTsets(i)) i += l; + + if (l = checkBlock(i)) i += l;else return 0; + + return i - start; + } + + /** + * Get node with a block @-rule + * @returns {Array} `['atruleb', ['atkeyword', x], y, ['block', z]]` + */ + function getAtruleb() { + var startPos = pos; + var content = [getAtkeyword()].concat(getTsets()).concat([getBlock()]); + + var token = tokens[startPos]; + return newNode(NodeType.AtruleType, content, token.ln, token.col); + } + + /** + * Check if token is part of an @-rule with ruleset + * @param {Number} i Token's index number + * @returns {Number} Length of the @-rule + */ + function checkAtruler(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkAtkeyword(i)) i += l;else return 0; + + if (l = checkTsets(i)) i += l; + + if (i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket) i++;else return 0; + + if (l = checkAtrulers(i)) i += l; + + if (i < tokensLength && tokens[i].type === TokenType.RightCurlyBracket) i++;else return 0; + + return i - start; + } + + /** + * Get node with an @-rule with ruleset + * @returns {Array} ['atruler', ['atkeyword', x], y, z] + */ + function getAtruler() { + var startPos = pos; + var content = [getAtkeyword()]; + content = content.concat(getTsets()); + content.push(getAtrulers()); + + var token = tokens[startPos]; + return newNode(NodeType.AtruleType, content, token.ln, token.col); + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkAtrulers(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkSC(i)) i += l; + + while (i < tokensLength) { + if (l = checkSC(i)) tokens[i].atrulers_child = 1;else if (l = checkAtrule(i)) tokens[i].atrulers_child = 2;else if (l = checkRuleset(i)) tokens[i].atrulers_child = 3;else break; + i += l; + } + + tokens[i].atrulers_end = 1; + + if (l = checkSC(i)) i += l; + + return i - start; + } + + /** + * @returns {Array} `['atrulers', x]` + */ + function getAtrulers() { + var token = tokens[pos++]; + var line = token.ln; + var column = token.col; + var content = getSC(); + + while (!tokens[pos].atrulers_end) { + var childType = tokens[pos].atrulers_child; + if (childType === 1) content = content.concat(getSC());else if (childType === 2) content.push(getAtrule());else if (childType === 3) content.push(getRuleset()); + } + + content = content.concat(getSC()); + + var end = getLastPosition(content, line, column, 1); + pos++; + + return newNode(NodeType.BlockType, content, line, column, end); + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkAtrules(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkAtkeyword(i)) i += l;else return 0; + + if (l = checkTsets(i)) i += l; + + return i - start; + } + + /** + * @returns {Array} `['atrules', ['atkeyword', x], y]` + */ + function getAtrules() { + var startPos = pos; + var content = [getAtkeyword()].concat(getTsets()); + + var token = tokens[startPos]; + return newNode(NodeType.AtruleType, content, token.ln, token.col); + } + + /** + * Check if token is part of a block (e.g. `{...}`). + * @param {Number} i Token's index number + * @returns {Number} Length of the block + */ + function checkBlock(i) { + return i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket ? tokens[i].right - i + 1 : 0; + } + + /** + * Get node with a block + * @returns {Array} `['block', x]` + */ + function getBlock() { + var startPos = pos; + var end = tokens[pos++].right; + var content = []; + var token = tokens[startPos]; + var line = token.ln; + var column = token.col; + + while (pos < end) { + if (checkBlockdecl(pos)) content = content.concat(getBlockdecl());else throwError(pos); + } + + var end_ = getLastPosition(content, line, column, 1); + pos = end + 1; + + return newNode(NodeType.BlockType, content, line, column, end_); + } + + /** + * Check if token is part of a declaration (property-value pair) + * @param {Number} i Token's index number + * @returns {Number} Length of the declaration + */ + function checkBlockdecl(i) { + var l; + + if (i >= tokensLength) return 0; + + if (l = checkBlockdecl1(i)) tokens[i].bd_type = 1;else if (l = checkBlockdecl2(i)) tokens[i].bd_type = 2;else if (l = checkBlockdecl3(i)) tokens[i].bd_type = 3;else if (l = checkBlockdecl4(i)) tokens[i].bd_type = 4;else return 0; + + return l; + } + + /** + * @returns {Array} + */ + function getBlockdecl() { + switch (tokens[pos].bd_type) { + case 1: + return getBlockdecl1(); + case 2: + return getBlockdecl2(); + case 3: + return getBlockdecl3(); + case 4: + return getBlockdecl4(); + } + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkBlockdecl1(i) { + var start = i; + var l = undefined; + + if (l = checkSC(i)) i += l; + + if (l = checkCondition(i)) tokens[i].bd_kind = 1;else if (l = checkExtend(i)) tokens[i].bd_kind = 6;else if (l = checkRuleset(i)) tokens[i].bd_kind = 2;else if (l = checkDeclaration(i)) tokens[i].bd_kind = 3;else if (l = checkAtrule(i)) tokens[i].bd_kind = 4;else if (l = checkInclude(i)) tokens[i].bd_kind = 5;else return 0; + + i += l; + + if (i < tokensLength && (l = checkDeclDelim(i))) i += l;else return 0; + + if (l = checkSC(i)) i += l;else return 0; + + return i - start; + } + + /** + * @returns {Array} + */ + function getBlockdecl1() { + var sc = getSC(); + var x = undefined; + + switch (tokens[pos].bd_kind) { + case 1: + x = getCondition(); + break; + case 2: + x = getRuleset(); + break; + case 3: + x = getDeclaration(); + break; + case 4: + x = getAtrule(); + break; + case 5: + x = getInclude(); + break; + case 6: + x = getExtend(); + break; + } + + return sc.concat([x]).concat([getDeclDelim()]).concat(getSC()); + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkBlockdecl2(i) { + var start = i; + var l = undefined; + + if (l = checkSC(i)) i += l; + + if (l = checkCondition(i)) tokens[i].bd_kind = 1;else if (l = checkExtend(i)) tokens[i].bd_kind = 3;else if (l = checkRuleset(i)) tokens[i].bd_kind = 6;else if (l = checkDeclaration(i)) tokens[i].bd_kind = 4;else if (l = checkAtrule(i)) tokens[i].bd_kind = 5;else if (l = checkInclude(i)) tokens[i].bd_kind = 2;else return 0; + + i += l; + + if (l = checkSC(i)) i += l; + + return i - start; + } + + /** + * @returns {Array} + */ + function getBlockdecl2() { + var sc = getSC(); + var x = undefined; + + switch (tokens[pos].bd_kind) { + case 1: + x = getCondition(); + break; + case 2: + x = getInclude(); + break; + case 3: + x = getExtend(); + break; + case 4: + x = getDeclaration(); + break; + case 5: + x = getAtrule(); + break; + case 6: + x = getRuleset(); + break; + } + + return sc.concat([x]).concat(getSC()); + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkBlockdecl3(i) { + var start = i; + var l = undefined; + + if (l = checkSC(i)) i += l; + + if (l = checkDeclDelim(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + return i - start; + } + + /** + * @returns {Array} `[s0, ['declDelim'], s1]` where `s0` and `s1` are + * are optional whitespaces. + */ + function getBlockdecl3() { + return getSC().concat([getDeclDelim()]).concat(getSC()); + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkBlockdecl4(i) { + return checkSC(i); + } + + /** + * @returns {Array} + */ + function getBlockdecl4() { + return getSC(); + } + + /** + * Check if token is part of text inside square brackets, e.g. `[1]` + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkBrackets(i) { + if (i >= tokensLength || tokens[i].type !== TokenType.LeftSquareBracket) return 0; + + return tokens[i].right - i + 1; + } + + /** + * Get node with text inside square brackets, e.g. `[1]` + * @returns {Node} + */ + function getBrackets() { + var startPos = pos++; + var token = tokens[startPos]; + var line = token.ln; + var column = token.col; + var tsets = getTsets(); + + var end = getLastPosition(tsets, line, column, 1); + pos++; + + return newNode(NodeType.BracketsType, tsets, line, column, end); + } + + /** + * Check if token is part of a class selector (e.g. `.abc`) + * @param {Number} i Token's index number + * @returns {Number} Length of the class selector + */ + function checkClass(i) { + var l; + + if (i >= tokensLength) return 0; + + if (tokens[i].class_l) return tokens[i].class_l; + + if (tokens[i++].type === TokenType.FullStop) { + if (l = checkInterpolatedVariable(i)) tokens[i].class_child = 1;else if (l = checkIdent(i)) tokens[i].class_child = 2;else return 0; + + tokens[i].class_l = l + 1; + return l + 1; + } + + return 0; + } + + /** + * Get node with a class selector + * @returns {Array} `['class', ['ident', x]]` where x is a class's + * identifier (without `.`, e.g. `abc`). + */ + function getClass() { + var startPos = pos++; + var content = []; + + var childType = tokens[pos].class_child; + if (childType === 1) content.push(getInterpolatedVariable());else content.push(getIdent()); + + var token = tokens[startPos]; + return newNode(NodeType.ClassType, content, token.ln, token.col); + } + + function checkCombinator(i) { + if (i >= tokensLength) return 0; + + var l = undefined; + if (l = checkCombinator1(i)) tokens[i].combinatorType = 1;else if (l = checkCombinator2(i)) tokens[i].combinatorType = 2;else if (l = checkCombinator3(i)) tokens[i].combinatorType = 3; + + return l; + } + + function getCombinator() { + var type = tokens[pos].combinatorType; + if (type === 1) return getCombinator1(); + if (type === 2) return getCombinator2(); + if (type === 3) return getCombinator3(); + } + /** + * (1) `||` + */ + function checkCombinator1(i) { + if (tokens[i].type === TokenType.VerticalLine && tokens[i + 1].type === TokenType.VerticalLine) return 2;else return 0; + } + + function getCombinator1() { + var type = NodeType.CombinatorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = '||'; + + pos += 2; + return newNode(type, content, line, column); + } + + /** + * (1) `>` + * (2) `+` + * (3) `~` + */ + function checkCombinator2(i) { + var type = tokens[i].type; + if (type === TokenType.PlusSign || type === TokenType.GreaterThanSign || type === TokenType.Tilde) return 1;else return 0; + } + + function getCombinator2() { + var type = NodeType.CombinatorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = tokens[pos++].value; + + return newNode(type, content, line, column); + } + + /** + * (1) `/panda/` + */ + function checkCombinator3(i) { + var start = i; + + if (tokens[i].type === TokenType.Solidus) i++;else return 0; + + var l = undefined; + if (l = checkIdent(i)) i += l;else return 0; + + if (tokens[i].type === TokenType.Solidus) i++;else return 0; + + return i - start; + } + + function getCombinator3() { + var type = NodeType.CombinatorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + + // Skip `/`. + pos++; + var ident = getIdent(); + + // Skip `/`. + pos++; + + var content = '/' + ident.content + '/'; + + return newNode(type, content, line, column); + } + + /** + * Check if token is a multiline comment. + * @param {Number} i Token's index number + * @returns {Number} `1` if token is a multiline comment, otherwise `0` + */ + function checkCommentML(i) { + return i < tokensLength && tokens[i].type === TokenType.CommentML ? 1 : 0; + } + + /** + * Get node with a multiline comment + * @returns {Array} `['commentML', x]` where `x` + * is the comment's text (without `/*` and `* /`). + */ + function getCommentML() { + var startPos = pos; + var s = tokens[pos].value.substring(2); + var l = s.length; + var token = tokens[startPos]; + var line = token.ln; + var column = token.col; + + if (s.charAt(l - 2) === '*' && s.charAt(l - 1) === '/') s = s.substring(0, l - 2); + + var end = getLastPosition(s, line, column, 2); + if (end[0] === line) end[1] += 2; + pos++; + + return newNode(NodeType.CommentMLType, s, line, column, end); + } + + /** + * Check if token is part of a single-line comment. + * @param {Number} i Token's index number + * @returns {Number} `1` if token is a single-line comment, otherwise `0` + */ + function checkCommentSL(i) { + return i < tokensLength && tokens[i].type === TokenType.CommentSL ? 1 : 0; + } + + /** + * Get node with a single-line comment. + * @returns {Array} + */ + function getCommentSL() { + var startPos = pos; + var x = tokens[pos++].value.substring(2); + var token = tokens[startPos]; + var line = token.ln; + var column = token.col; + + var end = getLastPosition(x, line, column + 2); + return newNode(NodeType.CommentSLType, x, line, column, end); + } + + /** + * Check if token is part of a condition. + * @param {Number} i Token's index number + * @return {Number} Length of the condition + */ + function checkCondition(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if ((l = checkIdent(i)) && tokens[i].value === 'when') i += l;else return 0; + + while (i < tokensLength) { + if (l = checkBlock(i)) { + tokens[i].condition_child = 0; + break; + } else if (l = checkFunction(i)) tokens[i].condition_child = 1;else if (l = checkBrackets(i)) tokens[i].condition_child = 2;else if (l = checkParentheses(i)) tokens[i].condition_child = 3;else if (l = checkVariable(i)) tokens[i].condition_child = 4;else if (l = checkIdent(i)) tokens[i].condition_child = 5;else if (l = checkNumber(i)) tokens[i].condition_child = 6;else if (l = checkDelim(i)) tokens[i].condition_child = 7;else if (l = checkOperator(i)) tokens[i].condition_child = 8;else if (l = checkCombinator(i)) tokens[i].condition_child = 9;else if (l = checkSC(i)) tokens[i].condition_child = 10;else if (l = checkString(i)) tokens[i].condition_child = 11;else return 0; + + i += l; + } + + return i - start; + } + + /** + * Get node with a condition. + * @returns {Array} `['condition', x]` + */ + function getCondition() { + var startPos = pos; + var x = []; + + x.push(getIdent()); + + while (pos < tokensLength) { + var childType = tokens[pos].condition_child; + + if (childType === 0) break;else if (childType === 1) x.push(getFunction());else if (childType === 2) x.push(getBrackets());else if (childType === 3) x.push(getParentheses());else if (childType === 4) x.push(getVariable());else if (childType === 5) x.push(getIdent());else if (childType === 6) x.push(getNumber());else if (childType === 7) x.push(getDelim());else if (childType === 8) x.push(getOperator());else if (childType === 9) x.push(getCombinator());else if (childType === 10) x = x.concat(getSC());else if (childType === 11) x.push(getString()); + } + + var token = tokens[startPos]; + return newNode(NodeType.ConditionType, x, token.ln, token.col); + } + + /** + * Check if token is part of a declaration (property-value pair) + * @param {Number} i Token's index number + * @returns {Number} Length of the declaration + */ + function checkDeclaration(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkProperty(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkPropertyDelim(i)) i++;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkValue(i)) i += l;else return 0; + + return i - start; + } + + /** + * Get node with a declaration + * @returns {Array} `['declaration', ['property', x], ['propertyDelim'], + * ['value', y]]` + */ + function getDeclaration() { + var startPos = pos; + var x = [getProperty()].concat(getSC()).concat([getPropertyDelim()]).concat(getSC()).concat([getValue()]); + + var token = tokens[startPos]; + return newNode(NodeType.DeclarationType, x, token.ln, token.col); + } + + /** + * Check if token is a semicolon + * @param {Number} i Token's index number + * @returns {Number} `1` if token is a semicolon, otherwise `0` + */ + function checkDeclDelim(i) { + return i < tokensLength && tokens[i].type === TokenType.Semicolon ? 1 : 0; + } + + /** + * Get node with a semicolon + * @returns {Array} `['declDelim']` + */ + function getDeclDelim() { + var startPos = pos++; + + var token = tokens[startPos]; + return newNode(NodeType.DeclDelimType, ';', token.ln, token.col); + } + + /** + * Check if token is a comma + * @param {Number} i Token's index number + * @returns {Number} `1` if token is a comma, otherwise `0` + */ + function checkDelim(i) { + return i < tokensLength && tokens[i].type === TokenType.Comma ? 1 : 0; + } + + /** + * Get node with a comma + * @returns {Array} `['delim']` + */ + function getDelim() { + var startPos = pos++; + + var token = tokens[startPos]; + return newNode(NodeType.DelimType, ',', token.ln, token.col); + } + + /** + * Check if token is part of a number with dimension unit (e.g. `10px`) + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkDimension(i) { + var ln = checkNumber(i); + var li = undefined; + + if (i >= tokensLength || !ln || i + ln >= tokensLength) return 0; + + return (li = checkNmName2(i + ln)) ? ln + li : 0; + } + + /** + * Get node of a number with dimension unit + * @returns {Array} `['dimension', ['number', x], ['ident', y]]` where + * `x` is a number converted to string (e.g. `'10'`) and `y` is + * a dimension unit (e.g. `'px'`). + */ + function getDimension() { + var startPos = pos; + var x = [getNumber()]; + var token = tokens[pos]; + var ident = newNode(NodeType.IdentType, getNmName2(), token.ln, token.col); + + x.push(ident); + + token = tokens[startPos]; + return newNode(NodeType.DimensionType, x, token.ln, token.col); + } + + /** + * Check if token is part of an escaped string (e.g. `~"ms:something"`). + * @param {Number} i Token's index number + * @returns {Number} Length of the string (including `~` and quotes) + */ + function checkEscapedString(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (tokens[i].type === TokenType.Tilde && (l = checkString(i + 1))) return i + l - start;else return 0; + } + + /** + * Get node with an escaped string + * @returns {Array} `['escapedString', ['string', x]]` where `x` is a string + * without `~` but with quotes + */ + function getEscapedString() { + var startPos = pos++; + var x = tokens[pos++].value; + var token = tokens[startPos]; + var line = token.ln; + var column = token.col; + + var end = getLastPosition(x, line, column + 1); + return newNode(NodeType.EscapedStringType, x, line, column, end); + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkExpression(i) { + var start = i; + + if (i >= tokensLength || tokens[i++].value !== 'expression' || i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis) { + return 0; + } + + return tokens[i].right - start + 1; + } + + /** + * @returns {Array} + */ + function getExpression() { + var startPos = pos++; + var x = undefined; + var token = tokens[startPos]; + var line = token.ln; + var column = token.col; + + x = joinValues(pos + 1, tokens[pos].right - 1); + var end = getLastPosition(x, line, column, 1); + if (end[0] === line) end[1] += 11; + pos = tokens[pos].right + 1; + + return newNode(NodeType.ExpressionType, x, token.ln, token.col, end); + } + + function checkExtend(i) { + if (i >= tokensLength) return 0; + + var l; + if (l = checkExtend1(i)) tokens[i].extendType = 1;else if (l = checkExtend2(i)) tokens[i].extendType = 2;else return 0; + + return l; + } + + function getExtend() { + var childType = tokens[pos].extendType; + if (childType === 1) return getExtend1(); + if (childType === 2) return getExtend2(); + } + + /** + * (1) `selector:extend(selector) {...}` + */ + function checkExtend1(i) { + var start = i; + var l; + + if (i >= tokensLength) return 0; + + if (l = checkExtendSelector(i)) i += l;else return 0; + + if (tokens[i + 1] && tokens[i + 1].value === 'extend' && (l = checkPseudoc(i))) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkBlock(i)) i += l;else return 0; + + return i - start; + } + + function getExtend1() { + var startPos = pos; + var x = [].concat(getExtendSelector(), [getPseudoc()], getSC(), [getBlock()]); + + var token = tokens[startPos]; + return newNode(NodeType.ExtendType, x, token.ln, token.col); + } + + /** + * (1) `selector:extend(selector)` + */ + function checkExtend2(i) { + var start = i; + var l; + + if (i >= tokensLength) return 0; + + if (l = checkExtendSelector(i)) i += l;else return 0; + + if (tokens[i + 1] && tokens[i + 1].value === 'extend' && (l = checkPseudoc(i))) i += l;else return 0; + + return i - start; + } + + function getExtend2() { + var startPos = pos; + var x = [].concat(getExtendSelector(), [getPseudoc()]); + + var token = tokens[startPos]; + return newNode(NodeType.ExtendType, x, token.ln, token.col); + } + + function checkExtendSelector(i) { + var l; + + if (l = checkParentSelectorWithExtension(i)) tokens[i].extend_type = 1;else if (l = checkIdent(i)) tokens[i].extend_type = 2;else if (l = checkClass(i)) tokens[i].extend_type = 3;else if (l = checkShash(i)) tokens[i].extend_type = 4; + + return l; + } + + function getExtendSelector() { + var childType = tokens[pos].extend_type; + + if (childType === 1) return getParentSelectorWithExtension(); + if (childType === 2) return [getIdent()]; + if (childType === 3) return [getClass()]; + if (childType === 4) return [getShash()]; + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkFunction(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkIdent(i)) i += l;else return 0; + + return i < tokensLength && tokens[i].type === TokenType.LeftParenthesis ? tokens[i].right - start + 1 : 0; + } + + /** + * @returns {Array} + */ + function getFunction() { + var token = tokens[pos]; + var ident = getIdent(); + var x = [ident]; + var body; + + body = getArguments(); + + x.push(body); + + return newNode(NodeType.FunctionType, x, token.ln, token.col); + } + + /** + * @returns {Array} + */ + function getArguments() { + var startPos = pos; + var x = []; + var body = undefined; + var token = tokens[startPos]; + var line = token.ln; + var column = token.col; + + pos++; + + while (pos < tokensLength && tokens[pos].type !== TokenType.RightParenthesis) { + if (checkDeclaration(pos)) x.push(getDeclaration());else if (checkArgument(pos)) { + body = getArgument(); + if (typeof body.content === 'string') x.push(body);else x = x.concat(body); + } else if (checkClass(pos)) x.push(getClass());else throwError(pos); + } + + var end = getLastPosition(x, line, column, 1); + pos++; + + return newNode(NodeType.ArgumentsType, x, line, column, end); + } + + /** + * Check if token is part of an identifier + * @param {Number} i Token's index number + * @returns {Number} Length of the identifier + */ + function checkIdent(i) { + var start = i; + + if (i >= tokensLength) return 0; + + if (tokens[i].type === TokenType.HyphenMinus) i++; + + if (tokens[i].type === TokenType.LowLine || tokens[i].type === TokenType.Identifier) i++;else return 0; + + for (; i < tokensLength; i++) { + if (tokens[i].type !== TokenType.HyphenMinus && tokens[i].type !== TokenType.LowLine && tokens[i].type !== TokenType.Identifier && tokens[i].type !== TokenType.DecimalNumber) break; + } + + tokens[start].ident_last = i - 1; + + return i - start; + } + + /** + * Get node with an identifier + * @returns {Array} `['ident', x]` where `x` is identifier's name + */ + function getIdent() { + var startPos = pos; + var x = joinValues(pos, tokens[pos].ident_last); + + pos = tokens[pos].ident_last + 1; + + var token = tokens[startPos]; + return newNode(NodeType.IdentType, x, token.ln, token.col); + } + + /** + * @param {number} i Token's index number + * @returns {number} Length of the identifier + */ + function checkPartialIdent(i) { + var start = i; + + if (i >= tokensLength) return 0; + + for (; i < tokensLength; i++) { + if (tokens[i].type !== TokenType.HyphenMinus && tokens[i].type !== TokenType.LowLine && tokens[i].type !== TokenType.Identifier && tokens[i].type !== TokenType.DecimalNumber) break; + } + + tokens[start].ident_last = i - 1; + + return i - start; + } + + /** + * Check if token is part of `!important` word + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkImportant(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark) return 0; + + if (l = checkSC(i)) i += l; + + if (tokens[i].value === 'important') { + tokens[start].importantEnd = i; + return i - start + 1; + } else { + return 0; + } + } + + /** + * Get node with `!important` word + * @returns {Array} `['important', sc]` where `sc` is optional whitespace + */ + function getImportant() { + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = joinValues(pos, token.importantEnd); + + pos = token.importantEnd + 1; + + return newNode(NodeType.ImportantType, content, line, column); + } + + /** + * Check if token is part of an include (`@include` or `@extend` directive). + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkInclude(i) { + var l; + + if (i >= tokensLength) return 0; + + if (l = checkInclude1(i)) tokens[i].include_type = 1;else if (l = checkInclude2(i)) tokens[i].include_type = 2; + + return l; + } + + /** + * Get node with included mixin + * @returns {Array} `['include', x]` + */ + function getInclude() { + switch (tokens[pos].include_type) { + case 1: + return getInclude1(); + case 2: + return getInclude2(); + } + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkInclude1(i) { + var start = i; + var l = undefined; + + if (l = checkClass(i) || checkShash(i)) i += l;else return 0; + + while (i < tokensLength) { + if (l = checkClass(i) || checkShash(i) || checkSC(i)) i += l;else if (tokens[i].type === TokenType.GreaterThanSign) i++;else break; + } + + if (l = checkArguments(i)) i += l;else return 0; + + if (i < tokensLength && (l = checkSC(i))) i += l; + + if (i < tokensLength && (l = checkImportant(i))) i += l; + + return i - start; + } + + /** + * @returns {Array} `['include', x]` + */ + function getInclude1() { + var startPos = pos; + var x = []; + + x.push(checkClass(pos) ? getClass() : getShash()); + + while (pos < tokensLength) { + if (checkClass(pos)) x.push(getClass());else if (checkShash(pos)) x.push(getShash());else if (checkSC(pos)) x = x.concat(getSC());else if (checkOperator(pos)) x.push(getOperator());else break; + } + + x.push(getArguments()); + + x = x.concat(getSC()); + + if (checkImportant(pos)) x.push(getImportant()); + + var token = tokens[startPos]; + return newNode(NodeType.IncludeType, x, token.ln, token.col); + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkInclude2(i) { + var start = i; + var l = undefined; + + if (l = checkClass(i) || checkShash(i)) i += l;else return 0; + + while (i < tokensLength) { + if (l = checkClass(i) || checkShash(i) || checkSC(i)) i += l;else if (tokens[i].type === TokenType.GreaterThanSign) i++;else break; + } + + return i - start; + } + + /** + * @returns {Array} `['include', x]` + */ + function getInclude2() { + var startPos = pos; + var x = []; + + x.push(checkClass(pos) ? getClass() : getShash()); + + while (pos < tokensLength) { + if (checkClass(pos)) x.push(getClass());else if (checkShash(pos)) x.push(getShash());else if (checkSC(pos)) x = x.concat(getSC());else if (checkOperator(pos)) x.push(getOperator());else break; + } + + var token = tokens[startPos]; + return newNode(NodeType.IncludeType, x, token.ln, token.col); + } + + /** + * Check if token is part of LESS interpolated variable + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkInterpolatedVariable(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (tokens[i].type !== TokenType.CommercialAt || !tokens[i + 1] || tokens[i + 1].type !== TokenType.LeftCurlyBracket) { + return 0; + } + + i += 2; + + if (l = checkIdent(i)) i += l;else return 0; + + return tokens[i].type === TokenType.RightCurlyBracket ? i - start + 1 : 0; + } + + /** + * Get node with LESS interpolated variable + * @returns {Array} `['interpolatedVariable', x]` + */ + function getInterpolatedVariable() { + var startPos = pos; + var x = []; + var token = tokens[startPos]; + var line = token.ln; + var column = token.col; + + // Skip `@{`: + pos += 2; + + x.push(getIdent()); + + // Skip `}`: + var end = getLastPosition(x, line, column, 1); + pos++; + + return newNode(NodeType.InterpolatedVariableType, x, line, column, end); + } + + function checkKeyframesBlock(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkKeyframesSelector(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkBlock(i)) i += l;else return 0; + + return i - start; + } + + function getKeyframesBlock() { + var type = NodeType.RulesetType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = [].concat([getKeyframesSelector()], getSC(), [getBlock()]); + + return newNode(type, content, line, column); + } + + function checkKeyframesBlocks(i) { + var start = i; + var l = undefined; + + if (i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket) i++;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkKeyframesBlock(i)) i += l;else return 0; + + while (tokens[i].type !== TokenType.RightCurlyBracket) { + if (l = checkSC(i)) i += l;else if (l = checkKeyframesBlock(i)) i += l;else break; + } + + if (i < tokensLength && tokens[i].type === TokenType.RightCurlyBracket) i++;else return 0; + + return i - start; + } + + function getKeyframesBlocks() { + var type = NodeType.BlockType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + var keyframesBlocksEnd = token.right; + + // Skip `{`. + pos++; + + while (pos < keyframesBlocksEnd) { + if (checkSC(pos)) content = content.concat(getSC());else if (checkKeyframesBlock(pos)) content.push(getKeyframesBlock()); + } + + var end = getLastPosition(content, line, column, 1); + + // Skip `}`. + pos++; + + return newNode(type, content, line, column, end); + } + + /** + * Check if token is part of a @keyframes rule. + * @param {Number} i Token's index number + * @return {Number} Length of the @keyframes rule + */ + function checkKeyframesRule(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkAtkeyword(i)) i += l;else return 0; + + var atruleName = joinValues2(i - l, l); + if (atruleName.indexOf('keyframes') === -1) return 0; + + if (l = checkSC(i)) i += l;else return 0; + + if (l = checkIdent(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkKeyframesBlocks(i)) i += l;else return 0; + + return i - start; + } + + /** + * @return {Node} + */ + function getKeyframesRule() { + var type = NodeType.AtruleType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = [].concat([getAtkeyword()], getSC(), [getIdent()], getSC(), [getKeyframesBlocks()]); + + return newNode(type, content, line, column); + } + + function checkKeyframesSelector(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkIdent(i)) { + // Valid selectors are only `from` and `to`. + var selector = joinValues2(i, l); + if (selector !== 'from' && selector !== 'to') return 0; + + i += l; + tokens[start].keyframesSelectorType = 1; + } else if (l = checkPercentage(i)) { + i += l; + tokens[start].keyframesSelectorType = 2; + } else { + return 0; + } + + return i - start; + } + + function getKeyframesSelector() { + var keyframesSelectorType = NodeType.KeyframesSelectorType; + var selectorType = NodeType.SelectorType; + + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + if (token.keyframesSelectorType === 1) { + content.push(getIdent()); + } else { + content.push(getPercentage()); + } + + var keyframesSelector = newNode(keyframesSelectorType, content, line, column); + return newNode(selectorType, [keyframesSelector], line, column); + } + + /** + * Check if token is part of a LESS mixin + * @param {Number} i Token's index number + * @returns {Number} Length of the mixin + */ + function checkMixin(i) { + var l; + + if (i >= tokensLength) return 0; + + if (l = checkMixin1(i)) tokens[i].mixin_type = 1;else if (l = checkMixin2(i)) tokens[i].mixin_type = 2;else return 0; + + return l; + } + + /** + * @returns {Array} + */ + function getMixin() { + switch (tokens[pos].mixin_type) { + case 1: + return getMixin1(); + case 2: + return getMixin2(); + } + } + + function checkMixin1(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkClass(i) || checkShash(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkArguments(i)) i += l; + + if (l = checkSC(i)) i += l; + + if (l = checkBlock(i)) i += l;else return 0; + + return i - start; + } + + /** + * Get node with a mixin + * @returns {Array} `['mixin', x]` + */ + function getMixin1() { + var startPos = pos; + var x = []; + + x.push(checkClass(pos) ? getClass() : getShash()); + + x = x.concat(getSC()); + + if (checkArguments(pos)) x.push(getArguments()); + + x = x.concat(getSC()); + + if (checkBlock(pos)) x.push(getBlock()); + + var token = tokens[startPos]; + return newNode(NodeType.MixinType, x, token.ln, token.col); + } + + /** + * Check if token is part of a LESS mixin + * @param {Number} i Token's index number + * @returns {Number} Length of the mixin + */ + function checkMixin2(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkClass(i) || checkShash(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkArguments(i)) i += l; + + return i - start; + } + + /** + * Get node with a mixin + * @returns {Array} `['mixin', x]` + */ + function getMixin2() { + var startPos = pos; + var x = []; + + x.push(checkClass(pos) ? getClass() : getShash()); + + x = x.concat(getSC()); + + if (checkArguments(pos)) x.push(getArguments()); + + var token = tokens[startPos]; + return newNode(NodeType.MixinType, x, token.ln, token.col); + } + + /** + * Check if token is a namespace sign (`|`) + * @param {Number} i Token's index number + * @returns {Number} `1` if token is `|`, `0` if not + */ + function checkNamespace(i) { + return i < tokensLength && tokens[i].type === TokenType.VerticalLine ? 1 : 0; + } + + /** + * Get node with a namespace sign + * @returns {Array} `['namespace']` + */ + function getNamespace() { + var startPos = pos++; + + var token = tokens[startPos]; + return newNode(NodeType.NamespaceType, '|', token.ln, token.col); + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkNmName2(i) { + if (tokens[i].type === TokenType.Identifier) return 1;else if (tokens[i].type !== TokenType.DecimalNumber) return 0; + + i++; + + return i < tokensLength && tokens[i].type === TokenType.Identifier ? 2 : 1; + } + + /** + * @returns {String} + */ + function getNmName2() { + var s = tokens[pos].value; + + if (tokens[pos++].type === TokenType.DecimalNumber && pos < tokensLength && tokens[pos].type === TokenType.Identifier) s += tokens[pos++].value; + + return s; + } + + /** + * Check if token is part of a number + * @param {Number} i Token's index number + * @returns {Number} Length of number + */ + function checkNumber(i) { + if (i >= tokensLength) return 0; + + if (tokens[i].number_l) return tokens[i].number_l; + + // `10`: + if (i < tokensLength && tokens[i].type === TokenType.DecimalNumber && (!tokens[i + 1] || tokens[i + 1] && tokens[i + 1].type !== TokenType.FullStop)) { + tokens[i].number_l = 1; + return 1; + } + + // `10.`: + if (i < tokensLength && tokens[i].type === TokenType.DecimalNumber && tokens[i + 1] && tokens[i + 1].type === TokenType.FullStop && (!tokens[i + 2] || tokens[i + 2].type !== TokenType.DecimalNumber)) { + tokens[i].number_l = 2; + return 2; + } + + // `.10`: + if (i < tokensLength && tokens[i].type === TokenType.FullStop && tokens[i + 1].type === TokenType.DecimalNumber) { + tokens[i].number_l = 2; + return 2; + } + + // `10.10`: + if (i < tokensLength && tokens[i].type === TokenType.DecimalNumber && tokens[i + 1] && tokens[i + 1].type === TokenType.FullStop && tokens[i + 2] && tokens[i + 2].type === TokenType.DecimalNumber) { + tokens[i].number_l = 3; + return 3; + } + + return 0; + } + + /** + * Get node with number + * @returns {Array} `['number', x]` where `x` is a number converted + * to string. + */ + function getNumber() { + var x = ''; + var startPos = pos; + var l = tokens[pos].number_l; + + for (var j = 0; j < l; j++) { + x += tokens[pos + j].value; + } + + pos += l; + + var token = tokens[startPos]; + return newNode(NodeType.NumberType, x, token.ln, token.col); + } + + /** + * Check if token is an operator (`/`, `,`, `:`, `=`, `>`, `<` or `*`) + * @param {Number} i Token's index number + * @returns {Number} `1` if token is an operator, otherwise `0` + */ + function checkOperator(i) { + if (i >= tokensLength) return 0; + + switch (tokens[i].type) { + case TokenType.Solidus: + case TokenType.Comma: + case TokenType.Colon: + case TokenType.EqualsSign: + case TokenType.LessThanSign: + case TokenType.GreaterThanSign: + case TokenType.Asterisk: + return 1; + } + + return 0; + } + + /** + * Get node with an operator + * @returns {Array} `['operator', x]` where `x` is an operator converted + * to string. + */ + function getOperator() { + var startPos = pos; + var x = tokens[pos++].value; + + var token = tokens[startPos]; + return newNode(NodeType.OperatorType, x, token.ln, token.col); + } + + /** + * Check if token is part of text inside parentheses, e.g. `(1)` + * @param {Number} i Token's index number + * @return {Number} + */ + function checkParentheses(i) { + if (i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis) return 0; + + return tokens[i].right - i + 1; + } + + /** + * Get node with text inside parentheses, e.g. `(1)` + * @return {Node} + */ + function getParentheses() { + var type = NodeType.ParenthesesType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + + pos++; + + var tsets = getTsets(); + + var end = getLastPosition(tsets, line, column, 1); + pos++; + + return newNode(type, tsets, line, column, end); + } + + /** + * Check if token is a parent selector (`&`). + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkParentSelector(i) { + return i < tokensLength && tokens[i].type === TokenType.Ampersand ? 1 : 0; + } + + /** + * Get node with a parent selector + * @returns {Array} `['parentSelector']` + */ + function getParentSelector() { + var startPos = pos++; + + var token = tokens[startPos]; + return newNode(NodeType.ParentSelectorType, '&', token.ln, token.col); + } + + function checkParentSelectorExtension(i) { + if (i >= tokensLength) return 0; + + var start = i; + var l = undefined; + + while (i < tokensLength) { + if (l = checkNumber(i) || checkPartialIdent(i)) i += l;else break; + } + + return i - start; + } + + function getParentSelectorExtension() { + var type = NodeType.ParentSelectorExtensionType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + while (pos < tokensLength) { + if (checkNumber(pos)) content.push(getNumber());else if (checkPartialIdent(pos)) content.push(getIdent());else break; + } + + return newNode(type, content, line, column); + } + + function checkParentSelectorWithExtension(i) { + if (i >= tokensLength) return 0; + + var start = i; + var l = undefined; + + if (l = checkParentSelector(i)) i += l;else return 0; + + if (l = checkParentSelectorExtension(i)) i += l; + + return i - start; + } + + function getParentSelectorWithExtension() { + var content = [getParentSelector()]; + + if (checkParentSelectorExtension(pos)) content.push(getParentSelectorExtension()); + + return content; + } + + /** + * Check if token is part of a number with percent sign (e.g. `10%`) + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkPercentage(i) { + var x; + + if (i >= tokensLength) return 0; + + x = checkNumber(i); + + if (!x || i + x >= tokensLength) return 0; + + return tokens[i + x].type === TokenType.PercentSign ? x + 1 : 0; + } + + /** + * Get node of number with percent sign + * @returns {Array} `['percentage', ['number', x]]` where `x` is a number + * (without percent sign) converted to string. + */ + function getPercentage() { + var startPos = pos; + var x = [getNumber()]; + var token = tokens[startPos]; + var line = token.ln; + var column = token.col; + + var end = getLastPosition(x, line, column, 1); + pos++; + + return newNode(NodeType.PercentageType, x, line, column, end); + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkProgid(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (joinValues2(i, 6) === 'progid:DXImageTransform.Microsoft.') i += 6;else return 0; + + if (l = checkIdent(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (tokens[i].type === TokenType.LeftParenthesis) { + tokens[start].progid_end = tokens[i].right; + i = tokens[i].right + 1; + } else return 0; + + return i - start; + } + + /** + * @returns {Array} + */ + function getProgid() { + var startPos = pos; + var progid_end = tokens[pos].progid_end; + var x = joinValues(pos, progid_end); + + pos = progid_end + 1; + var token = tokens[startPos]; + return newNode(NodeType.ProgidType, x, token.ln, token.col); + } + + /** + * Check if token is part of a property + * @param {Number} i Token's index number + * @returns {Number} Length of the property + */ + function checkProperty(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkVariable(i) || checkIdent(i)) i += l;else return 0; + + return i - start; + } + + /** + * Get node with a property + * @returns {Array} `['property', x]` + */ + function getProperty() { + var startPos = pos; + var x = []; + + if (checkVariable(pos)) x.push(getVariable());else x.push(getIdent()); + + var token = tokens[startPos]; + return newNode(NodeType.PropertyType, x, token.ln, token.col); + } + + /** + * Check if token is a colon + * @param {Number} i Token's index number + * @returns {Number} `1` if token is a colon, otherwise `0` + */ + function checkPropertyDelim(i) { + return i < tokensLength && tokens[i].type === TokenType.Colon ? 1 : 0; + } + + /** + * Get node with a colon + * @returns {Array} `['propertyDelim']` + */ + function getPropertyDelim() { + var startPos = pos++; + + var token = tokens[startPos]; + return newNode(NodeType.PropertyDelimType, ':', token.ln, token.col); + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkPseudo(i) { + return checkPseudoe(i) || checkPseudoc(i); + } + + /** + * @returns {Array} + */ + function getPseudo() { + if (checkPseudoe(pos)) return getPseudoe(); + if (checkPseudoc(pos)) return getPseudoc(); + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkPseudoe(i) { + var l; + + if (i >= tokensLength || tokens[i++].type !== TokenType.Colon || i >= tokensLength || tokens[i++].type !== TokenType.Colon) return 0; + + return (l = checkInterpolatedVariable(i) || checkIdent(i)) ? l + 2 : 0; + } + + /** + * @returns {Array} + */ + function getPseudoe() { + var startPos = pos; + var x = []; + + pos += 2; + + if (checkInterpolatedVariable(pos)) { + x.push(getInterpolatedVariable()); + } else { + x.push(getIdent()); + } + + var token = tokens[startPos]; + return newNode(NodeType.PseudoeType, x, token.ln, token.col); + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkPseudoc(i) { + var l; + + if (i >= tokensLength || tokens[i].type !== TokenType.Colon) return 0; + + if (l = checkPseudoClass3(i)) tokens[i].pseudoClassType = 3;else if (l = checkPseudoClass4(i)) tokens[i].pseudoClassType = 4;else if (l = checkPseudoClass5(i)) tokens[i].pseudoClassType = 5;else if (l = checkPseudoClass1(i)) tokens[i].pseudoClassType = 1;else if (l = checkPseudoClass2(i)) tokens[i].pseudoClassType = 2;else if (l = checkPseudoClass6(i)) tokens[i].pseudoClassType = 6;else return 0; + + return l; + } + + function getPseudoc() { + var childType = tokens[pos].pseudoClassType; + if (childType === 1) return getPseudoClass1(); + if (childType === 2) return getPseudoClass2(); + if (childType === 3) return getPseudoClass3(); + if (childType === 4) return getPseudoClass4(); + if (childType === 5) return getPseudoClass5(); + if (childType === 6) return getPseudoClass6(); + } + + /** + * (1) `:not(selector)` + * (2) `:extend(selector, selector)` + */ + function checkPseudoClass1(i) { + var start = i; + + // Skip `:`. + i++; + + var l = undefined; + if (l = checkIdent(i)) i += l;else return 0; + + if (i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis) return 0; + + var right = tokens[i].right; + + // Skip `(`. + i++; + + if (l = checkSelectorsGroup(i)) i += l;else return 0; + + if (i !== right) return 0; + + return right - start + 1; + } + + /** + * (-) `:not(panda)` + */ + function getPseudoClass1() { + var type = NodeType.PseudocType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + // Skip `:`. + pos++; + + content.push(getIdent()); + + { + var _type = NodeType.ArgumentsType; + var _token = tokens[pos]; + var _line = _token.ln; + var _column = _token.col; + + // Skip `(`. + pos++; + + var selectors = getSelectorsGroup(); + var end = getLastPosition(selectors, _line, _column, 1); + var args = newNode(_type, selectors, _line, _column, end); + content.push(args); + + // Skip `)`. + pos++; + } + + return newNode(type, content, line, column); + } + + /** + * (1) `:nth-child(odd)` + * (2) `:nth-child(even)` + * (3) `:lang(de-DE)` + */ + function checkPseudoClass2(i) { + var start = i; + var l = 0; + + // Skip `:`. + i++; + + if (i >= tokensLength) return 0; + + if (l = checkIdent(i)) i += l;else return 0; + + if (i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis) return 0; + + var right = tokens[i].right; + + // Skip `(`. + i++; + + if (l = checkSC(i)) i += l; + + if (l = checkIdent(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (i !== right) return 0; + + return i - start + 1; + } + + function getPseudoClass2() { + var type = NodeType.PseudocType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + // Skip `:`. + pos++; + + var ident = getIdent(); + content.push(ident); + + { + // Skip `(`. + pos++; + + var l = tokens[pos].ln; + var c = tokens[pos].col; + var value = []; + + value = value.concat(getSC()); + value.push(getIdent()); + value = value.concat(getSC()); + + var end = getLastPosition(value, l, c, 1); + var args = newNode(NodeType.ArgumentsType, value, l, c, end); + content.push(args); + + // Skip `)`. + pos++; + } + + return newNode(type, content, line, column); + } + + /** + * (-) `:nth-child(-3n + 2)` + */ + function checkPseudoClass3(i) { + var start = i; + var l = 0; + + // Skip `:`. + i++; + + if (i >= tokensLength) return 0; + + if (l = checkIdent(i)) i += l;else return 0; + + if (i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis) return 0; + + var right = tokens[i].right; + + // Skip `(`. + i++; + + if (l = checkSC(i)) i += l; + + if (l = checkUnary(i)) i += l; + if (i >= tokensLength) return 0; + if (tokens[i].type === TokenType.DecimalNumber) i++; + + if (i >= tokensLength) return 0; + if (tokens[i].value === 'n') i++;else return 0; + + if (l = checkSC(i)) i += l; + + if (i >= tokensLength) return 0; + if (tokens[i].value === '+' || tokens[i].value === '-') i++;else return 0; + + if (l = checkSC(i)) i += l; + + if (tokens[i].type === TokenType.DecimalNumber) i++;else return 0; + + if (l = checkSC(i)) i += l; + + if (i !== right) return 0; + + return i - start + 1; + } + + function getPseudoClass3() { + var type = NodeType.PseudocType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + // Skip `:`. + pos++; + + var ident = getIdent(); + content.push(ident); + + var l = tokens[pos].ln; + var c = tokens[pos].col; + var value = []; + + // Skip `(`. + pos++; + + if (checkUnary(pos)) value.push(getUnary()); + if (checkNumber(pos)) value.push(getNumber()); + + { + var _l = tokens[pos].ln; + var _c = tokens[pos].col; + var _content = tokens[pos].value; + var _ident = newNode(NodeType.IdentType, _content, _l, _c); + value.push(_ident); + pos++; + } + + value = value.concat(getSC()); + if (checkUnary(pos)) value.push(getUnary()); + value = value.concat(getSC()); + if (checkNumber(pos)) value.push(getNumber()); + value = value.concat(getSC()); + + var end = getLastPosition(value, l, c, 1); + var args = newNode(NodeType.ArgumentsType, value, l, c, end); + content.push(args); + + // Skip `)`. + pos++; + + return newNode(type, content, line, column); + } + + /** + * (-) `:nth-child(-3n)` + */ + function checkPseudoClass4(i) { + var start = i; + var l = 0; + + // Skip `:`. + i++; + + if (i >= tokensLength) return 0; + + if (l = checkIdent(i)) i += l;else return 0; + + if (i >= tokensLength) return 0; + if (tokens[i].type !== TokenType.LeftParenthesis) return 0; + + var right = tokens[i].right; + + // Skip `(`. + i++; + + if (l = checkSC(i)) i += l; + + if (l = checkUnary(i)) i += l; + if (tokens[i].type === TokenType.DecimalNumber) i++; + + if (tokens[i].value === 'n') i++;else return 0; + + if (l = checkSC(i)) i += l; + + if (i !== right) return 0; + + return i - start + 1; + } + + function getPseudoClass4() { + var type = NodeType.PseudocType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + // Skip `:`. + pos++; + + var ident = getIdent(); + content.push(ident); + + // Skip `(`. + pos++; + + var l = tokens[pos].ln; + var c = tokens[pos].col; + var value = []; + + if (checkUnary(pos)) value.push(getUnary()); + if (checkNumber(pos)) value.push(getNumber()); + if (checkIdent(pos)) value.push(getIdent()); + value = value.concat(getSC()); + + var end = getLastPosition(value, l, c, 1); + var args = newNode(NodeType.ArgumentsType, value, l, c, end); + content.push(args); + + // Skip `)`. + pos++; + + return newNode(type, content, line, column); + } + + /** + * (-) `:nth-child(+8)` + */ + function checkPseudoClass5(i) { + var start = i; + var l = 0; + + // Skip `:`. + i++; + + if (i >= tokensLength) return 0; + + if (l = checkIdent(i)) i += l;else return 0; + + if (i >= tokensLength) return 0; + if (tokens[i].type !== TokenType.LeftParenthesis) return 0; + + var right = tokens[i].right; + + // Skip `(`. + i++; + + if (l = checkSC(i)) i += l; + + if (l = checkUnary(i)) i += l; + if (tokens[i].type === TokenType.DecimalNumber) i++;else return 0; + + if (l = checkSC(i)) i += l; + + if (i !== right) return 0; + + return i - start + 1; + } + + function getPseudoClass5() { + var type = NodeType.PseudocType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + // Skip `:`. + pos++; + + var ident = getIdent(); + content.push(ident); + + // Skip `(`. + pos++; + + var l = tokens[pos].ln; + var c = tokens[pos].col; + var value = []; + + if (checkUnary(pos)) value.push(getUnary()); + if (checkNumber(pos)) value.push(getNumber()); + value = value.concat(getSC()); + + var end = getLastPosition(value, l, c, 1); + var args = newNode(NodeType.ArgumentsType, value, l, c, end); + content.push(args); + + // Skip `)`. + pos++; + + return newNode(type, content, line, column); + } + + /** + * (-) `:checked` + */ + function checkPseudoClass6(i) { + var start = i; + var l = 0; + + // Skip `:`. + i++; + + if (i >= tokensLength) return 0; + + if (l = checkInterpolatedVariable(i)) i += l;else if (l = checkIdent(i)) i += l;else return 0; + + return i - start; + } + + function getPseudoClass6() { + var type = NodeType.PseudocType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + // Skip `:`. + pos++; + + var ident = checkInterpolatedVariable(pos) ? getInterpolatedVariable() : getIdent(); + content.push(ident); + + return newNode(type, content, line, column); + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkRuleset(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkSelectorsGroup(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkBlock(i)) i += l;else return 0; + + return i - start; + } + + function getRuleset() { + var type = NodeType.RulesetType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + content = content.concat(getSelectorsGroup()); + content = content.concat(getSC()); + content.push(getBlock()); + + return newNode(type, content, line, column); + } + + /** + * Check if token is marked as a space (if it's a space or a tab + * or a line break). + * @param {Number} i + * @returns {Number} Number of spaces in a row starting with the given token. + */ + function checkS(i) { + return i < tokensLength && tokens[i].ws ? tokens[i].ws_last - i + 1 : 0; + } + + /** + * Get node with spaces + * @returns {Array} `['s', x]` where `x` is a string containing spaces + */ + function getS() { + var startPos = pos; + var x = joinValues(pos, tokens[pos].ws_last); + + pos = tokens[pos].ws_last + 1; + + var token = tokens[startPos]; + return newNode(NodeType.SType, x, token.ln, token.col); + } + + /** + * Check if token is a space or a comment. + * @param {Number} i Token's index number + * @returns {Number} Number of similar (space or comment) tokens + * in a row starting with the given token. + */ + function checkSC(i) { + if (i >= tokensLength) return 0; + + var l = undefined; + var lsc = 0; + + while (i < tokensLength) { + if (!(l = checkS(i)) && !(l = checkCommentML(i)) && !(l = checkCommentSL(i))) break; + i += l; + lsc += l; + } + + return lsc || 0; + } + + /** + * Get node with spaces and comments + * @returns {Array} Array containing nodes with spaces (if there are any) + * and nodes with comments (if there are any): + * `[['s', x]*, ['comment', y]*]` where `x` is a string of spaces + * and `y` is a comment's text (without `/*` and `* /`). + */ + function getSC() { + var sc = []; + + if (pos >= tokensLength) return sc; + + while (pos < tokensLength) { + if (checkS(pos)) sc.push(getS());else if (checkCommentML(pos)) sc.push(getCommentML());else if (checkCommentSL(pos)) sc.push(getCommentSL());else break; + } + + return sc; + } + + /** + * Check if token is part of a hexadecimal number (e.g. `#fff`) inside + * a simple selector + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkShash(i) { + var l; + + if (i >= tokensLength || tokens[i].type !== TokenType.NumberSign) return 0; + + if (l = checkInterpolatedVariable(i + 1) || checkIdent(i + 1)) return l + 1;else return 0; + } + + /** + * Get node with a hexadecimal number (e.g. `#fff`) inside a simple + * selector + * @returns {Array} `['shash', x]` where `x` is a hexadecimal number + * converted to string (without `#`, e.g. `fff`) + */ + function getShash() { + var startPos = pos; + var x = []; + + pos++; + + if (checkInterpolatedVariable(pos)) x.push(getInterpolatedVariable());else x.push(getIdent()); + + var token = tokens[startPos]; + return newNode(NodeType.ShashType, x, token.ln, token.col); + } + + /** + * Check if token is part of a string (text wrapped in quotes) + * @param {Number} i Token's index number + * @returns {Number} `1` if token is part of a string, `0` if not + */ + function checkString(i) { + if (i >= tokensLength) { + return 0; + } + + if (tokens[i].type === TokenType.StringSQ || tokens[i].type === TokenType.StringDQ) { + return 1; + } + + return 0; + } + + /** + * Get string's node + * @returns {Array} `['string', x]` where `x` is a string (including + * quotes). + */ + function getString() { + var startPos = pos; + var x = tokens[pos++].value; + + var token = tokens[startPos]; + return newNode(NodeType.StringType, x, token.ln, token.col); + } + + /** + * Validate stylesheet: it should consist of any number (0 or more) of + * rulesets (sets of rules with selectors), @-rules, whitespaces or + * comments. + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkStylesheet(i) { + var start = i; + var l = undefined; + + // Check every token: + while (i < tokensLength) { + if (l = checkSC(i) || checkAtrule(i) || checkRuleset(i) || checkMixin(i) || checkDeclaration(i) || checkDeclDelim(i)) i += l;else throwError(i); + } + + return i - start; + } + + /** + * @returns {Array} `['stylesheet', x]` where `x` is all stylesheet's + * nodes. + */ + function getStylesheet() { + var startPos = pos; + var x = []; + + while (pos < tokensLength) { + if (checkSC(pos)) x = x.concat(getSC());else if (checkAtrule(pos)) x.push(getAtrule());else if (checkRuleset(pos)) x.push(getRuleset());else if (checkMixin(pos)) x.push(getMixin());else if (checkDeclaration(pos)) x.push(getDeclaration());else if (checkDeclDelim(pos)) x.push(getDeclDelim());else throwError(pos); + } + + var token = tokens[startPos]; + return newNode(NodeType.StylesheetType, x, token.ln, token.col); + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkTset(i) { + var l; + + if (l = checkVhash(i)) tokens[i].tset_child = 1;else if (l = checkAny(i)) tokens[i].tset_child = 2;else if (l = checkSC(i)) tokens[i].tset_child = 3;else if (l = checkOperator(i)) tokens[i].tset_child = 4; + + return l; + } + + /** + * @returns {Array} + */ + function getTset() { + var childType = tokens[pos].tset_child; + if (childType === 1) return getVhash();else if (childType === 2) return getAny();else if (childType === 3) return getSC();else if (childType === 4) return getOperator(); + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkTsets(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + while (l = checkTset(i)) { + i += l; + } + + return i - start; + } + + /** + * @returns {Array} + */ + function getTsets() { + var x = []; + var t = undefined; + + while (checkTset(pos)) { + t = getTset(); + if (typeof t.content === 'string') x.push(t);else x = x.concat(t); + } + + return x; + } + + /** + * Check if token is an unary (arithmetical) sign (`+` or `-`) + * @param {Number} i Token's index number + * @returns {Number} `1` if token is an unary sign, `0` if not + */ + function checkUnary(i) { + if (i >= tokensLength) { + return 0; + } + + if (tokens[i].type === TokenType.HyphenMinus || tokens[i].type === TokenType.PlusSign) { + return 1; + } + + return 0; + } + + /** + * Get node with an unary (arithmetical) sign (`+` or `-`) + * @returns {Array} `['unary', x]` where `x` is an unary sign + * converted to string. + */ + function getUnary() { + var startPos = pos; + var x = tokens[pos++].value; + + var token = tokens[startPos]; + return newNode(NodeType.OperatorType, x, token.ln, token.col); + } + + /** + * Check if token is a unicode range (single or multiple nodes) + * @param {number} i Token's index + * @return {number} Unicode range node's length + */ + function checkUnicodeRange(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkUrange(i)) i += l;else return 0; + + while (i < tokensLength) { + var spaceBefore = checkSC(i); + var comma = checkDelim(i + spaceBefore); + if (!comma) break; + + var spaceAfter = checkSC(i + spaceBefore + comma); + if (l = checkUrange(i + spaceBefore + comma + spaceAfter)) { + i += spaceBefore + comma + spaceAfter + l; + } else break; + } + + return i - start; + } + + /** + * Get a unicode range node + * @return {Node} + */ + function getUnicodeRange() { + var type = NodeType.UnicodeRangeType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + while (pos < tokensLength) { + if (checkSC(pos)) content = content.concat(getSC());else if (checkDelim(pos)) content.push(getDelim());else if (checkUrange(pos)) content.push(getUrange());else break; + } + + return newNode(type, content, line, column); + } + + /** + * Check if token is a u-range (part of a unicode-range) + * (1) `U+416` + * (2) `U+400-4ff` + * (3) `U+4??` + * @param {number} i Token's index + * @return {number} Urange node's length + */ + function checkUrange(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + // Check for unicode prefix (u+ or U+) + if (tokens[i].value === 'U' || tokens[i].value === 'u') i += 1;else return 0; + + if (i >= tokensLength) return 0; + + if (tokens[i].value === '+') i += 1;else return 0; + + while (i < tokensLength) { + if (l = checkIdent(i)) i += l;else if (l = checkNumber(i)) i += l;else if (l = checkUnary(i)) i += l;else if (l = _checkUnicodeWildcard(i)) i += l;else break; + } + + tokens[start].urangeEnd = i - 1; + + return i - start; + } + + /** + * Get a u-range node (part of a unicode-range) + * @return {Node} + */ + function getUrange() { + var startPos = pos; + var type = NodeType.UrangeType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + content = joinValues(startPos, tokens[startPos].urangeEnd); + pos = tokens[startPos].urangeEnd + 1; + + return newNode(type, content, line, column); + } + + /** + * Check for unicode wildcard characters `?` + * @param {number} i Token's index + * @return {number} Wildcard length + */ + function _checkUnicodeWildcard(i) { + var start = i; + + if (i >= tokensLength) return 0; + + while (i < tokensLength) { + if (tokens[i].type === TokenType.QuestionMark) i += 1;else break; + } + + return i - start; + } + + /** + * Check if token is part of URI (e.g. `url('/css/styles.css')`) + * @param {Number} i Token's index number + * @returns {Number} Length of URI + */ + function checkUri(i) { + var start = i; + + if (i >= tokensLength || tokens[i++].value !== 'url' || i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis) return 0; + + return tokens[i].right - start + 1; + } + + /** + * Get node with URI + * @returns {Array} `['uri', x]` where `x` is URI's nodes (without `url` + * and braces, e.g. `['string', ''/css/styles.css'']`). + */ + function getUri() { + var startPos = pos; + var uriExcluding = {}; + var uri = undefined; + var token = undefined; + var l = undefined; + var raw = undefined; + + pos += 2; + + uriExcluding[TokenType.Space] = 1; + uriExcluding[TokenType.Tab] = 1; + uriExcluding[TokenType.Newline] = 1; + uriExcluding[TokenType.LeftParenthesis] = 1; + uriExcluding[TokenType.RightParenthesis] = 1; + + if (checkUri1(pos)) { + uri = [].concat(getSC()).concat([getString()]).concat(getSC()); + } else { + uri = getSC(); + l = checkExcluding(uriExcluding, pos); + token = tokens[pos]; + raw = newNode(NodeType.RawType, joinValues(pos, pos + l), token.ln, token.col); + + uri.push(raw); + + pos += l + 1; + + uri = uri.concat(getSC()); + } + + token = tokens[startPos]; + var line = token.ln; + var column = token.col; + var end = getLastPosition(uri, line, column, 1); + pos++; + return newNode(NodeType.UriType, uri, line, column, end); + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkUri1(i) { + var start = i; + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkSC(i)) i += l; + + if (tokens[i].type !== TokenType.StringDQ && tokens[i].type !== TokenType.StringSQ) { + return 0; + } + + i++; + + if (l = checkSC(i)) i += l; + + return i - start; + } + + /** + * Check if token is part of a value + * @param {Number} i Token's index number + * @returns {Number} Length of the value + */ + function checkValue(i) { + var start = i; + var l = undefined; + var s = undefined; + var _i = undefined; + + while (i < tokensLength) { + s = checkSC(i); + _i = i + s; + + if (l = _checkValue(_i)) i += l + s; + if (!l || checkBlock(_i)) break; + } + + return i - start; + } + + /** + * @param {Number} i Token's index number + * @returns {Number} + */ + function _checkValue(i) { + return checkEscapedString(i) || checkInterpolatedVariable(i) || checkVariable(i) || checkVhash(i) || checkBlock(i) || checkProgid(i) || checkAny(i) || checkAtkeyword(i) || checkOperator(i) || checkImportant(i); + } + + /** + * @returns {Array} + */ + function getValue() { + var startPos = pos; + var x = []; + var s = undefined; + var _pos = undefined; + + while (pos < tokensLength) { + s = checkSC(pos); + _pos = pos + s; + + if (!_checkValue(_pos)) break; + + if (s) x = x.concat(getSC()); + x.push(_getValue()); + } + + var token = tokens[startPos]; + return newNode(NodeType.ValueType, x, token.ln, token.col); + } + + /** + * @returns {Array} + */ + function _getValue() { + if (checkEscapedString(pos)) return getEscapedString();else if (checkInterpolatedVariable(pos)) return getInterpolatedVariable();else if (checkVariable(pos)) return getVariable();else if (checkVhash(pos)) return getVhash();else if (checkBlock(pos)) return getBlock();else if (checkProgid(pos)) return getProgid();else if (checkAny(pos)) return getAny();else if (checkAtkeyword(pos)) return getAtkeyword();else if (checkOperator(pos)) return getOperator();else if (checkImportant(pos)) return getImportant(); + } + + /** + * Check if token is part of LESS variable + * @param {Number} i Token's index number + * @returns {Number} Length of the variable + */ + function checkVariable(i) { + var l; + + if (i >= tokensLength || tokens[i].type !== TokenType.CommercialAt) return 0; + + if (tokens[i - 1] && tokens[i - 1].type === TokenType.CommercialAt && tokens[i - 2] && tokens[i - 2].type === TokenType.CommercialAt) return 0; + + return (l = checkVariable(i + 1) || checkIdent(i + 1)) ? l + 1 : 0; + } + + /** + * Get node with a variable + * @returns {Array} `['variable', ['ident', x]]` where `x` is + * a variable name. + */ + function getVariable() { + var startPos = pos; + var x = []; + + pos++; + + if (checkVariable(pos)) x.push(getVariable());else x.push(getIdent()); + + var token = tokens[startPos]; + return newNode(NodeType.VariableType, x, token.ln, token.col); + } + + /** + * Check if token is part of a variables list (e.g. `@rest...`). + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkVariablesList(i) { + var d = 0; // Number of dots + var l = undefined; + + if (i >= tokensLength) return 0; + + if (l = checkVariable(i)) i += l;else return 0; + + while (tokens[i] && tokens[i].type === TokenType.FullStop) { + d++; + i++; + } + + return d === 3 ? l + d : 0; + } + + /** + * Get node with a variables list + * @returns {Array} `['variableslist', ['variable', ['ident', x]]]` where + * `x` is a variable name. + */ + function getVariablesList() { + var startPos = pos; + var x = [getVariable()]; + var token = tokens[startPos]; + var line = token.ln; + var column = token.col; + + var end = getLastPosition(x, line, column, 3); + pos += 3; + + return newNode(NodeType.VariablesListType, x, line, column, end); + } + + /** + * Check if token is part of a hexadecimal number (e.g. `#fff`) inside + * some value + * @param {Number} i Token's index number + * @returns {Number} + */ + function checkVhash(i) { + var l; + + if (i >= tokensLength || tokens[i].type !== TokenType.NumberSign) return 0; + + return (l = checkNmName2(i + 1)) ? l + 1 : 0; + } + + /** + * Get node with a hexadecimal number (e.g. `#fff`) inside some value + * @returns {Array} `['vhash', x]` where `x` is a hexadecimal number + * converted to string (without `#`, e.g. `'fff'`). + */ + function getVhash() { + var startPos = pos; + var x = undefined; + var token = tokens[startPos]; + var line = token.ln; + var column = token.col; + + pos++; + + x = getNmName2(); + var end = getLastPosition(x, line, column + 1); + return newNode(NodeType.VhashType, x, line, column, end); + } + + module.exports = function (_tokens, context) { + tokens = _tokens; + tokensLength = tokens.length; + pos = 0; + + return contexts[context](); + }; + + function checkSelectorsGroup(i) { + if (i >= tokensLength) return 0; + + var start = i; + var l = undefined; + + if (l = checkSelector(i)) i += l;else return 0; + + while (i < tokensLength) { + var sb = checkSC(i); + var c = checkDelim(i + sb); + if (!c) break; + var sa = checkSC(i + sb + c); + if (l = checkSelector(i + sb + c + sa)) i += sb + c + sa + l;else break; + } + + tokens[start].selectorsGroupEnd = i; + return i - start; + } + + function getSelectorsGroup() { + var selectorsGroup = []; + var selectorsGroupEnd = tokens[pos].selectorsGroupEnd; + + selectorsGroup.push(getSelector()); + + while (pos < selectorsGroupEnd) { + selectorsGroup = selectorsGroup.concat(getSC()); + selectorsGroup.push(getDelim()); + selectorsGroup = selectorsGroup.concat(getSC()); + selectorsGroup.push(getSelector()); + } + + return selectorsGroup; + } + + function checkSelector(i) { + var l; + + if (l = checkSelector1(i)) tokens[i].selectorType = 1;else if (l = checkSelector2(i)) tokens[i].selectorType = 2; + + return l; + } + + function getSelector() { + var selectorType = tokens[pos].selectorType; + if (selectorType === 1) return getSelector1();else return getSelector2(); + } + + /** + * Checks for selector which starts with a compound selector. + */ + function checkSelector1(i) { + if (i >= tokensLength) return 0; + + var start = i; + var l = undefined; + + if (l = checkCompoundSelector(i)) i += l;else return 0; + + while (i < tokensLength) { + var s = checkSC(i); + var c = checkCombinator(i + s); + if (!s && !c) break; + if (c) { + i += s + c; + s = checkSC(i); + } + + if (l = checkCompoundSelector(i + s)) i += s + l;else break; + } + + tokens[start].selectorEnd = i; + return i - start; + } + + function getSelector1() { + var type = NodeType.SelectorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var selectorEnd = token.selectorEnd; + var content = getCompoundSelector(); + + while (pos < selectorEnd) { + if (checkSC(pos)) content = content.concat(getSC());else if (checkCombinator(pos)) content.push(getCombinator());else if (checkCompoundSelector(pos)) content = content.concat(getCompoundSelector()); + } + + return newNode(type, content, line, column); + } + + /** + * Checks for a selector that starts with a combinator. + */ + function checkSelector2(i) { + if (i >= tokensLength) return 0; + + var start = i; + var l = undefined; + + if (l = checkCombinator(i)) i += l;else return 0; + + while (i < tokensLength) { + var sb = checkSC(i); + if (l = checkCompoundSelector(i + sb)) i += sb + l;else break; + + var sa = checkSC(i); + var c = checkCombinator(i + sa); + if (!sa && !c) break; + if (c) { + i += sa + c; + } + } + + tokens[start].selectorEnd = i; + return i - start; + } + + function getSelector2() { + var type = NodeType.SelectorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var selectorEnd = token.selectorEnd; + var content = [getCombinator()]; + + while (pos < selectorEnd) { + if (checkSC(pos)) content = content.concat(getSC());else if (checkCombinator(pos)) content.push(getCombinator());else if (checkCompoundSelector(pos)) content = content.concat(getCompoundSelector()); + } + + return newNode(type, content, line, column); + } + + function checkCompoundSelector(i) { + var l = undefined; + + if (l = checkCompoundSelector1(i)) { + tokens[i].compoundSelectorType = 1; + } else if (l = checkCompoundSelector2(i)) { + tokens[i].compoundSelectorType = 2; + } + + return l; + } + + function getCompoundSelector() { + var type = tokens[pos].compoundSelectorType; + if (type === 1) return getCompoundSelector1(); + if (type === 2) return getCompoundSelector2(); + } + + function checkCompoundSelector1(i) { + if (i >= tokensLength) return 0; + + var start = i; + + var l = undefined; + if (l = checkTypeSelector(i) || checkParentSelectorWithExtension(i)) i += l;else return 0; + + while (i < tokensLength) { + var _l2 = checkShash(i) || checkClass(i) || checkAttributeSelector(i) || checkPseudo(i); + if (_l2) i += _l2;else break; + } + + tokens[start].compoundSelectorEnd = i; + + return i - start; + } + + function getCompoundSelector1() { + var sequence = []; + var compoundSelectorEnd = tokens[pos].compoundSelectorEnd; + + if (checkTypeSelector(pos)) sequence.push(getTypeSelector());else if (checkParentSelectorWithExtension(pos)) sequence = sequence.concat(getParentSelectorWithExtension()); + + while (pos < compoundSelectorEnd) { + if (checkShash(pos)) sequence.push(getShash());else if (checkClass(pos)) sequence.push(getClass());else if (checkAttributeSelector(pos)) sequence.push(getAttributeSelector());else if (checkPseudo(pos)) sequence.push(getPseudo()); + } + + return sequence; + } + + function checkCompoundSelector2(i) { + if (i >= tokensLength) return 0; + + var start = i; + + while (i < tokensLength) { + var l = checkShash(i) || checkClass(i) || checkAttributeSelector(i) || checkPseudo(i); + if (l) i += l;else break; + } + + tokens[start].compoundSelectorEnd = i; + + return i - start; + } + + function getCompoundSelector2() { + var sequence = []; + var compoundSelectorEnd = tokens[pos].compoundSelectorEnd; + + while (pos < compoundSelectorEnd) { + if (checkShash(pos)) sequence.push(getShash());else if (checkClass(pos)) sequence.push(getClass());else if (checkAttributeSelector(pos)) sequence.push(getAttributeSelector());else if (checkPseudo(pos)) sequence.push(getPseudo()); + } + + return sequence; + } + + function checkTypeSelector(i) { + if (i >= tokensLength) return 0; + + var start = i; + var l = undefined; + + if (l = checkNamePrefix(i)) i += l; + + if (tokens[i].type === TokenType.Asterisk) i++;else if (l = checkIdent(i)) i += l;else return 0; + + return i - start; + } + + function getTypeSelector() { + var type = NodeType.TypeSelectorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + if (checkNamePrefix(pos)) content.push(getNamePrefix()); + + token = tokens[pos]; + if (token.type === TokenType.Asterisk) { + var asteriskNode = newNode(NodeType.IdentType, '*', token.ln, token.col); + content.push(asteriskNode); + pos++; + } else if (checkIdent(pos)) content.push(getIdent()); + + return newNode(type, content, line, column); + } + + function checkAttributeSelector(i) { + var l = undefined; + if (l = checkAttributeSelector1(i)) tokens[i].attributeSelectorType = 1;else if (l = checkAttributeSelector2(i)) tokens[i].attributeSelectorType = 2; + + return l; + } + + function getAttributeSelector() { + var type = tokens[pos].attributeSelectorType; + if (type === 1) return getAttributeSelector1();else return getAttributeSelector2(); + } + + /** + * (1) `[panda=nani]` + * (2) `[panda='nani']` + * (3) `[panda='nani' i]` + * + */ + function checkAttributeSelector1(i) { + var start = i; + + if (tokens[i].type === TokenType.LeftSquareBracket) i++;else return 0; + + var l = undefined; + if (l = checkSC(i)) i += l; + + if (l = checkAttributeName(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkAttributeMatch(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkAttributeValue(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (l = checkAttributeFlags(i)) { + i += l; + if (l = checkSC(i)) i += l; + } + + if (tokens[i].type === TokenType.RightSquareBracket) i++;else return 0; + + return i - start; + } + + function getAttributeSelector1() { + var type = NodeType.AttributeSelectorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + // Skip `[`. + pos++; + + content = content.concat(getSC()); + content.push(getAttributeName()); + content = content.concat(getSC()); + content.push(getAttributeMatch()); + content = content.concat(getSC()); + content.push(getAttributeValue()); + content = content.concat(getSC()); + + if (checkAttributeFlags(pos)) { + content.push(getAttributeFlags()); + content = content.concat(getSC()); + } + + // Skip `]`. + pos++; + + var end = getLastPosition(content, line, column, 1); + return newNode(type, content, line, column, end); + } + + /** + * (1) `[panda]` + */ + function checkAttributeSelector2(i) { + var start = i; + + if (tokens[i].type === TokenType.LeftSquareBracket) i++;else return 0; + + var l = undefined; + if (l = checkSC(i)) i += l; + + if (l = checkAttributeName(i)) i += l;else return 0; + + if (l = checkSC(i)) i += l; + + if (tokens[i].type === TokenType.RightSquareBracket) i++;else return 0; + + return i - start; + } + + function getAttributeSelector2() { + var type = NodeType.AttributeSelectorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + // Skip `[`. + pos++; + + content = content.concat(getSC()); + content.push(getAttributeName()); + content = content.concat(getSC()); + + // Skip `]`. + pos++; + + var end = getLastPosition(content, line, column, 1); + return newNode(type, content, line, column, end); + } + + function checkAttributeName(i) { + var start = i; + var l = undefined; + + if (l = checkNamePrefix(i)) i += l; + + if (l = checkIdent(i)) i += l;else return 0; + + return i - start; + } + + function getAttributeName() { + var type = NodeType.AttributeNameType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + if (checkNamePrefix(pos)) content.push(getNamePrefix()); + content.push(getIdent()); + + return newNode(type, content, line, column); + } + + function checkAttributeMatch(i) { + var l = undefined; + if (l = checkAttributeMatch1(i)) tokens[i].attributeMatchType = 1;else if (l = checkAttributeMatch2(i)) tokens[i].attributeMatchType = 2; + + return l; + } + + function getAttributeMatch() { + var type = tokens[pos].attributeMatchType; + if (type === 1) return getAttributeMatch1();else return getAttributeMatch2(); + } + + function checkAttributeMatch1(i) { + var start = i; + + var type = tokens[i].type; + if (type === TokenType.Tilde || type === TokenType.VerticalLine || type === TokenType.CircumflexAccent || type === TokenType.DollarSign || type === TokenType.Asterisk) i++;else return 0; + + if (tokens[i].type === TokenType.EqualsSign) i++;else return 0; + + return i - start; + } + + function getAttributeMatch1() { + var type = NodeType.AttributeMatchType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = tokens[pos].value + tokens[pos + 1].value; + pos += 2; + + return newNode(type, content, line, column); + } + + function checkAttributeMatch2(i) { + if (tokens[i].type === TokenType.EqualsSign) return 1;else return 0; + } + + function getAttributeMatch2() { + var type = NodeType.AttributeMatchType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = '='; + + pos++; + return newNode(type, content, line, column); + } + + function checkAttributeValue(i) { + return checkString(i) || checkIdent(i); + } + + function getAttributeValue() { + var type = NodeType.AttributeValueType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + if (checkString(pos)) content.push(getString());else content.push(getIdent()); + + return newNode(type, content, line, column); + } + + function checkAttributeFlags(i) { + return checkIdent(i); + } + + function getAttributeFlags() { + var type = NodeType.AttributeFlagsType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = [getIdent()]; + + return newNode(type, content, line, column); + } + + function checkNamePrefix(i) { + if (i >= tokensLength) return 0; + + var l = undefined; + if (l = checkNamePrefix1(i)) tokens[i].namePrefixType = 1;else if (l = checkNamePrefix2(i)) tokens[i].namePrefixType = 2; + + return l; + } + + function getNamePrefix() { + var type = tokens[pos].namePrefixType; + if (type === 1) return getNamePrefix1();else return getNamePrefix2(); + } + + /** + * (1) `panda|` + * (2) `panda|` + */ + function checkNamePrefix1(i) { + var start = i; + var l = undefined; + + if (l = checkNamespacePrefix(i)) i += l;else return 0; + + if (l = checkCommentML(i)) i += l; + + if (l = checkNamespaceSeparator(i)) i += l;else return 0; + + return i - start; + } + + function getNamePrefix1() { + var type = NodeType.NamePrefixType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + content.push(getNamespacePrefix()); + + if (checkCommentML(pos)) content.push(getCommentML()); + + content.push(getNamespaceSeparator()); + + return newNode(type, content, line, column); + } + + /** + * (1) `|` + */ + function checkNamePrefix2(i) { + return checkNamespaceSeparator(i); + } + + function getNamePrefix2() { + var type = NodeType.NamePrefixType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = [getNamespaceSeparator()]; + + return newNode(type, content, line, column); + } + + /** + * (1) `*` + * (2) `panda` + */ + function checkNamespacePrefix(i) { + if (i >= tokensLength) return 0; + + var l = undefined; + + if (tokens[i].type === TokenType.Asterisk) return 1;else if (l = checkIdent(i)) return l;else return 0; + } + + function getNamespacePrefix() { + var type = NodeType.NamespacePrefixType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = []; + + if (tokens[pos].type === TokenType.Asterisk) { + var asteriskNode = newNode(NodeType.IdentType, '*', line, column); + content.push(asteriskNode); + pos++; + } else if (checkIdent(pos)) content.push(getIdent()); + + return newNode(type, content, line, column); + } + + /** + * (1) `|` + */ + function checkNamespaceSeparator(i) { + if (i >= tokensLength) return 0; + + if (tokens[i].type === TokenType.VerticalLine) return 1;else return 0; + } + + function getNamespaceSeparator() { + var type = NodeType.NamespaceSeparatorType; + var token = tokens[pos]; + var line = token.ln; + var column = token.col; + var content = '|'; + + pos++; + return newNode(type, content, line, column); + } + +/***/ }, +/* 20 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + module.exports = function (css, tabSize) { + var TokenType = __webpack_require__(13); + + var tokens = []; + var urlMode = false; + var c = undefined; // Current character + var cn = undefined; // Next character + var pos = 0; + var tn = 0; + var ln = 1; + var col = 1; + + var Punctuation = { + ' ': TokenType.Space, + '\n': TokenType.Newline, + '\r': TokenType.Newline, + '\t': TokenType.Tab, + '!': TokenType.ExclamationMark, + '"': TokenType.QuotationMark, + '#': TokenType.NumberSign, + '$': TokenType.DollarSign, + '%': TokenType.PercentSign, + '&': TokenType.Ampersand, + '\'': TokenType.Apostrophe, + '(': TokenType.LeftParenthesis, + ')': TokenType.RightParenthesis, + '*': TokenType.Asterisk, + '+': TokenType.PlusSign, + ',': TokenType.Comma, + '-': TokenType.HyphenMinus, + '.': TokenType.FullStop, + '/': TokenType.Solidus, + ':': TokenType.Colon, + ';': TokenType.Semicolon, + '<': TokenType.LessThanSign, + '=': TokenType.EqualsSign, + '>': TokenType.GreaterThanSign, + '?': TokenType.QuestionMark, + '@': TokenType.CommercialAt, + '[': TokenType.LeftSquareBracket, + ']': TokenType.RightSquareBracket, + '^': TokenType.CircumflexAccent, + '_': TokenType.LowLine, + '{': TokenType.LeftCurlyBracket, + '|': TokenType.VerticalLine, + '}': TokenType.RightCurlyBracket, + '~': TokenType.Tilde + }; + + /** + * Add a token to the token list + * @param {string} type + * @param {string} value + */ + function pushToken(type, value, column) { + tokens.push({ + tn: tn++, + ln: ln, + col: column, + type: type, + value: value + }); + } + + /** + * Check if a character is a decimal digit + * @param {string} c Character + * @returns {boolean} + */ + function isDecimalDigit(c) { + return '0123456789'.indexOf(c) >= 0; + } + + /** + * Parse spaces + * @param {string} css Unparsed part of CSS string + */ + function parseSpaces(css) { + var start = pos; + + // Read the string until we meet a non-space character: + for (; pos < css.length; pos++) { + if (css.charAt(pos) !== ' ') break; + } + + // Add a substring containing only spaces to tokens: + pushToken(TokenType.Space, css.substring(start, pos--), col); + col += pos - start; + } + + /** + * Parse a string within quotes + * @param {string} css Unparsed part of CSS string + * @param {string} q Quote (either `'` or `"`) + */ + function parseString(css, q) { + var start = pos; + + // Read the string until we meet a matching quote: + for (pos++; pos < css.length; pos++) { + // Skip escaped quotes: + if (css.charAt(pos) === '\\') pos++;else if (css.charAt(pos) === q) break; + } + + // Add the string (including quotes) to tokens: + var type = q === '"' ? TokenType.StringDQ : TokenType.StringSQ; + pushToken(type, css.substring(start, pos + 1), col); + col += pos - start; + } + + /** + * Parse numbers + * @param {string} css Unparsed part of CSS string + */ + function parseDecimalNumber(css) { + var start = pos; + + // Read the string until we meet a character that's not a digit: + for (; pos < css.length; pos++) { + if (!isDecimalDigit(css.charAt(pos))) break; + } + + // Add the number to tokens: + pushToken(TokenType.DecimalNumber, css.substring(start, pos--), col); + col += pos - start; + } + + /** + * Parse identifier + * @param {string} css Unparsed part of CSS string + */ + function parseIdentifier(css) { + var start = pos; + + // Skip all opening slashes: + while (css.charAt(pos) === '/') pos++; + + // Read the string until we meet a punctuation mark: + for (; pos < css.length; pos++) { + // Skip all '\': + if (css.charAt(pos) === '\\') pos++;else if (css.charAt(pos) in Punctuation) break; + } + + var ident = css.substring(start, pos--); + + // Enter url mode if parsed substring is `url`: + if (!urlMode && ident === 'url' && css.charAt(pos + 1) === '(') { + urlMode = true; + } + + // Add identifier to tokens: + pushToken(TokenType.Identifier, ident, col); + col += pos - start; + } + + /** + * Parse a multiline comment + * @param {string} css Unparsed part of CSS string + */ + function parseMLComment(css) { + var start = pos; + + // Read the string until we meet `*/`. + // Since we already know first 2 characters (`/*`), start reading + // from `pos + 2`: + for (pos = pos + 2; pos < css.length; pos++) { + if (css.charAt(pos) === '*' && css.charAt(pos + 1) === '/') { + pos++; + break; + } + } + + // Add full comment (including `/*` and `*/`) to the list of tokens: + var comment = css.substring(start, pos + 1); + pushToken(TokenType.CommentML, comment, col); + + var newlines = comment.split('\n'); + if (newlines.length > 1) { + ln += newlines.length - 1; + col = newlines[newlines.length - 1].length; + } else { + col += pos - start; + } + } + + /** + * Parse a single line comment + * @param {string} css Unparsed part of CSS string + */ + function parseSLComment(css) { + var start = pos; + + // Read the string until we meet line break. + // Since we already know first 2 characters (`//`), start reading + // from `pos + 2`: + for (pos += 2; pos < css.length; pos++) { + if (css.charAt(pos) === '\n' || css.charAt(pos) === '\r') { + break; + } + } + + // Add comment (including `//` and line break) to the list of tokens: + pushToken(TokenType.CommentSL, css.substring(start, pos--), col); + col += pos - start; + } + + /** + * Convert a CSS string to a list of tokens + * @param {string} css CSS string + * @returns {Array} List of tokens + * @private + */ + function getTokens(css) { + // Parse string, character by character: + for (pos = 0; pos < css.length; col++, pos++) { + c = css.charAt(pos); + cn = css.charAt(pos + 1); + + // If we meet `/*`, it's a start of a multiline comment. + // Parse following characters as a multiline comment: + if (c === '/' && cn === '*') { + parseMLComment(css); + } + + // If we meet `//` and it is not a part of url: + else if (!urlMode && c === '/' && cn === '/') { + // If we're currently inside a block, treat `//` as a start + // of identifier. Else treat `//` as a start of a single-line + // comment: + parseSLComment(css); + } + + // If current character is a double or single quote, it's a start + // of a string: + else if (c === '"' || c === "'") { + parseString(css, c); + } + + // If current character is a space: + else if (c === ' ') { + parseSpaces(css); + } + + // If current character is a punctuation mark: + else if (c in Punctuation) { + // Add it to the list of tokens: + pushToken(Punctuation[c], c, col); + if (c === '\n' || c === '\r') { + ln++; + col = 0; + } // Go to next line + if (c === ')') urlMode = false; // Exit url mode + else if (c === '\t' && tabSize > 1) col += tabSize - 1; + } + + // If current character is a decimal digit: + else if (isDecimalDigit(c)) { + parseDecimalNumber(css); + } + + // If current character is anything else: + else { + parseIdentifier(css); + } + } + + return tokens; + } + + return getTokens(css); + }; + +/***/ }, +/* 21 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + exports['default'] = { + mark: __webpack_require__(22), + parse: __webpack_require__(23), + stringify: __webpack_require__(5), + tokenizer: __webpack_require__(24) + }; + module.exports = exports['default']; + +/***/ }, +/* 22 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var TokenType = __webpack_require__(13); + + module.exports = (function () { + /** + * Mark whitespaces and comments + */ + function markSC(tokens) { + var tokensLength = tokens.length; + var ws = -1; // Flag for whitespaces + var sc = -1; // Flag for whitespaces and comments + var t = undefined; // Current token + + // For every token in the token list, mark spaces and line breaks + // as spaces (set both `ws` and `sc` flags). Mark multiline comments + // with `sc` flag. + // If there are several spaces or tabs or line breaks or multiline + // comments in a row, group them: take the last one's index number + // and save it to the first token in the group as a reference: + // e.g., `ws_last = 7` for a group of whitespaces or `sc_last = 9` + // for a group of whitespaces and comments. + for (var i = 0; i < tokensLength; i++) { + t = tokens[i]; + switch (t.type) { + case TokenType.Space: + case TokenType.Tab: + t.ws = true; + t.sc = true; + + if (ws === -1) ws = i; + if (sc === -1) sc = i; + + break; + case TokenType.Newline: + t.ws = true; + t.sc = true; + + ws = ws === -1 ? i : ws; + sc = sc === -1 ? i : ws; + + tokens[ws].ws_last = i - 1; + tokens[sc].sc_last = i - 1; + tokens[i].ws_last = i; + tokens[i].sc_last = i; + + ws = -1; + sc = -1; + + break; + case TokenType.CommentML: + case TokenType.CommentSL: + if (ws !== -1) { + tokens[ws].ws_last = i - 1; + ws = -1; + } + + t.sc = true; + + break; + default: + if (ws !== -1) { + tokens[ws].ws_last = i - 1; + ws = -1; + } + + if (sc !== -1) { + tokens[sc].sc_last = i - 1; + sc = -1; + } + } + } + + if (ws !== -1) tokens[ws].ws_last = i - 1; + if (sc !== -1) tokens[sc].sc_last = i - 1; + } + + /** + * Pair brackets + */ + function markBrackets(tokens) { + var tokensLength = tokens.length; + var ps = []; // Parentheses + var sbs = []; // Square brackets + var cbs = []; // Curly brackets + var t = undefined; // Current token + + // For every token in the token list, if we meet an opening (left) + // bracket, push its index number to a corresponding array. + // If we then meet a closing (right) bracket, look at the corresponding + // array. If there are any elements (records about previously met + // left brackets), take a token of the last left bracket (take + // the last index number from the array and find a token with + // this index number) and save right bracket's index as a reference: + for (var i = 0; i < tokensLength; i++) { + t = tokens[i]; + switch (t.type) { + case TokenType.LeftParenthesis: + ps.push(i); + break; + case TokenType.RightParenthesis: + if (ps.length) { + t.left = ps.pop(); + tokens[t.left].right = i; + } + break; + case TokenType.LeftSquareBracket: + sbs.push(i); + break; + case TokenType.RightSquareBracket: + if (sbs.length) { + t.left = sbs.pop(); + tokens[t.left].right = i; + } + break; + case TokenType.LeftCurlyBracket: + cbs.push(i); + break; + case TokenType.RightCurlyBracket: + if (cbs.length) { + t.left = cbs.pop(); + tokens[t.left].right = i; + } + break; + } + } + } + + function markBlocks(tokens) { + var blocks = {}; + var currentIL = 0; + var i = 0; + var l = tokens.length; + var iw = undefined; + + for (; i !== l; i++) { + if (!tokens[i - 1]) continue; + + // Skip all tokens on current line: + if (tokens[i].type !== TokenType.Newline) continue; + + var end = getBlockEnd(tokens, i + 1, currentIL, iw); + if (!iw) iw = end.iw; + + if (end.indent && end.indent === currentIL) continue; + + // Not found nested block. + if (end.end !== null) { + markBlocksWithIndent(tokens, blocks, end); + + for (var z = end.end + 1; z < l; z++) { + if (tokens[z].type === TokenType.Space || tokens[z].type === TokenType.Tab || tokens[z].type === TokenType.CommentSL || tokens[z].type === TokenType.CommentML) continue; + if (tokens[z].type === TokenType.Newline) i = z; + break; + } + } + + if (!blocks[end.indent]) blocks[end.indent] = []; + blocks[end.indent].push(i + 1); + currentIL = end.indent; + } + + markBlocksWithIndent(tokens, blocks, { end: i - 1, indent: 0 }); + } + + function getBlockEnd(tokens, i, indent, iw, maybeEnd) { + var spaces = ''; + if (!maybeEnd) maybeEnd = i - 1; + + if (!tokens[i]) return { end: maybeEnd, indent: 0 }; + + for (var l = tokens.length; i < l; i++) { + if (tokens[i].type === TokenType.Space || tokens[i].type === TokenType.Tab || tokens[i].type === TokenType.CommentML || tokens[i].type === TokenType.CommentSL || tokens[i].type === TokenType.Newline) { + spaces += tokens[i].value; + continue; + } + + // Got all spaces. + // Find trailing spaces. + var lastNewline = spaces.lastIndexOf('\n'); + spaces = spaces.slice(lastNewline + 1); + + // Mark previous node as block end. + if (!spaces) return { end: maybeEnd, indent: 0 }; + + if (!iw) iw = spaces.length; + var newIndent = spaces.length / iw; + + if (newIndent < indent) return { end: maybeEnd, indent: newIndent, iw: iw }; + + if (newIndent === indent) { + // Look for line end + for (; i < l; i++) { + if (tokens[i].type !== TokenType.Newline) continue; + var end = getBlockEnd(tokens, i + 1, indent, iw, maybeEnd); + return { end: end.end, indent: indent, iw: iw }; + } + + return { end: i - 1, indent: newIndent, iw: iw }; + } else { + // If newIndent > indent + return { end: null, indent: newIndent, iw: iw }; + } + } + + return { end: i - 1 }; + } + + function markBlocksWithIndent(tokens, blocks, end) { + for (var indent in blocks) { + if (indent < end.indent + 1) continue; + var block = blocks[indent]; + if (!block) continue; + + for (var x = 0; x < block.length; x++) { + var y = block[x]; + tokens[y].block_end = end.end; + } + blocks[indent] = null; + } + } + + return function (tokens) { + markBrackets(tokens); + markSC(tokens); + markBlocks(tokens); + }; + })(); + +/***/ }, +/* 23 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict';var Node=__webpack_require__(1);var NodeType=__webpack_require__(15);var TokenType=__webpack_require__(13);var tokens=undefined;var tokensLength=undefined;var pos=undefined;var contexts={'arguments':function(){return checkArguments(pos) && getArguments();},'atkeyword':function(){return checkAtkeyword(pos) && getAtkeyword();},'atrule':function(){return checkAtrule(pos) && getAtrule();},'block':function(){return checkBlock(pos) && getBlock();},'brackets':function(){return checkBrackets(pos) && getBrackets();},'class':function(){return checkClass(pos) && getClass();},'combinator':function(){return checkCombinator(pos) && getCombinator();},'commentML':function(){return checkCommentML(pos) && getCommentML();},'commentSL':function(){return checkCommentSL(pos) && getCommentSL();},'condition':function(){return checkCondition(pos) && getCondition();},'conditionalStatement':function(){return checkConditionalStatement(pos) && getConditionalStatement();},'declaration':function(){return checkDeclaration(pos) && getDeclaration();},'declDelim':function(){return checkDeclDelim(pos) && getDeclDelim();},'default':function(){return checkDefault(pos) && getDefault();},'delim':function(){return checkDelim(pos) && getDelim();},'dimension':function(){return checkDimension(pos) && getDimension();},'expression':function(){return checkExpression(pos) && getExpression();},'extend':function(){return checkExtend(pos) && getExtend();},'function':function(){return checkFunction(pos) && getFunction();},'global':function(){return checkGlobal(pos) && getGlobal();},'ident':function(){return checkIdent(pos) && getIdent();},'important':function(){return checkImportant(pos) && getImportant();},'include':function(){return checkInclude(pos) && getInclude();},'interpolation':function(){return checkInterpolation(pos) && getInterpolation();},'loop':function(){return checkLoop(pos) && getLoop();},'mixin':function(){return checkMixin(pos) && getMixin();},'namespace':function(){return checkNamespace(pos) && getNamespace();},'number':function(){return checkNumber(pos) && getNumber();},'operator':function(){return checkOperator(pos) && getOperator();},'optional':function(){return checkOptional(pos) && getOptional();},'parentheses':function(){return checkParentheses(pos) && getParentheses();},'parentselector':function(){return checkParentSelector(pos) && getParentSelector();},'percentage':function(){return checkPercentage(pos) && getPercentage();},'placeholder':function(){return checkPlaceholder(pos) && getPlaceholder();},'progid':function(){return checkProgid(pos) && getProgid();},'property':function(){return checkProperty(pos) && getProperty();},'propertyDelim':function(){return checkPropertyDelim(pos) && getPropertyDelim();},'pseudoc':function(){return checkPseudoc(pos) && getPseudoc();},'pseudoe':function(){return checkPseudoe(pos) && getPseudoe();},'ruleset':function(){return checkRuleset(pos) && getRuleset();},'s':function(){return checkS(pos) && getS();},'selector':function(){return checkSelector(pos) && getSelector();},'shash':function(){return checkShash(pos) && getShash();},'string':function(){return checkString(pos) && getString();},'stylesheet':function(){return checkStylesheet(pos) && getStylesheet();},'unary':function(){return checkUnary(pos) && getUnary();},'unicodeRange':function(){return checkUnicodeRange(pos) && getUnicodeRange();},'urange':function(){return checkUrange(pos) && getUrange();},'uri':function(){return checkUri(pos) && getUri();},'value':function(){return checkValue(pos) && getValue();},'variable':function(){return checkVariable(pos) && getVariable();},'variableslist':function(){return checkVariablesList(pos) && getVariablesList();},'vhash':function(){return checkVhash(pos) && getVhash();}}; /** + * Stops parsing and display error. + * + * @param {number=} opt_i Token's index number + */function throwError(opt_i){var ln=opt_i?tokens[opt_i].ln:tokens[pos].ln;throw {line:ln,syntax:'sass'};} /** + * @param {!Object} exclude + * @param {number} i Token's index number + * @return {number} + */function checkExcluding(exclude,i){var start=i;while(i < tokensLength) {if(exclude[tokens[i++].type])break;}return i - start - 2;} /** + * @param {number} start + * @param {number} finish + * @return {string} + */function joinValues(start,finish){var s='';for(var i=start;i < finish + 1;i++) {s += tokens[i].value;}return s;} /** + * @param {number} start + * @param {number} num + * @return {string} + */function joinValues2(start,num){if(start + num - 1 >= tokensLength)return;var s='';for(var i=0;i < num;i++) {s += tokens[start + i].value;}return s;} /** + * @param {string|!Array} content + * @param {number} line + * @param {number} column + * @param {number} colOffset + */function getLastPosition(content,line,column,colOffset){return typeof content === 'string'?getLastPositionForString(content,line,column,colOffset):getLastPositionForArray(content,line,column,colOffset);} /** + * @param {string} content + * @param {number} line + * @param {number} column + * @param {number} colOffset + */function getLastPositionForString(content,line,column,colOffset){var position=[];if(!content){position = [line,column];if(colOffset)position[1] += colOffset - 1;return position;}var lastLinebreak=content.lastIndexOf('\n');var endsWithLinebreak=lastLinebreak === content.length - 1;var splitContent=content.split('\n');var linebreaksCount=splitContent.length - 1;var prevLinebreak=linebreaksCount === 0 || linebreaksCount === 1?-1:content.length - splitContent[linebreaksCount - 1].length - 2; // Line: + var offset=endsWithLinebreak?linebreaksCount - 1:linebreaksCount;position[0] = line + offset; // Column: + if(endsWithLinebreak){offset = prevLinebreak !== -1?content.length - prevLinebreak:content.length - 1;}else {offset = linebreaksCount !== 0?content.length - lastLinebreak - column - 1:content.length - 1;}position[1] = column + offset;if(!colOffset)return position;if(endsWithLinebreak){position[0]++;position[1] = colOffset;}else {position[1] += colOffset;}return position;} /** + * @param {!Array} content + * @param {number} line + * @param {number} column + * @param {number} colOffset + */function getLastPositionForArray(content,line,column,colOffset){var position;if(content.length === 0){position = [line,column];}else {var c=content[content.length - 1];if(c.hasOwnProperty('end')){position = [c.end.line,c.end.column];}else {position = getLastPosition(c.content,line,column);}}if(!colOffset)return position;if(tokens[pos - 1].type !== 'Newline'){position[1] += colOffset;}else {position[0]++;position[1] = 1;}return position;} /** + * @param {string} type + * @param {string|!Array} content + * @param {number} line + * @param {number} column + * @param {!Array} end + */function newNode(type,content,line,column,end){if(!end)end = getLastPosition(content,line,column);return new Node({type:type,content:content,start:{line:line,column:column},end:{line:end[0],column:end[1]},syntax:'sass'});} /** + * @param {number} i Token's index number + * @return {number} + */function checkAny(i){var l;if(l = checkBrackets(i))tokens[i].any_child = 1;else if(l = checkParentheses(i))tokens[i].any_child = 2;else if(l = checkString(i))tokens[i].any_child = 3;else if(l = checkVariablesList(i))tokens[i].any_child = 4;else if(l = checkVariable(i))tokens[i].any_child = 5;else if(l = checkPlaceholder(i))tokens[i].any_child = 6;else if(l = checkPercentage(i))tokens[i].any_child = 7;else if(l = checkDimension(i))tokens[i].any_child = 8;else if(l = checkUnicodeRange(i))tokens[i].any_child = 17;else if(l = checkNumber(i))tokens[i].any_child = 9;else if(l = checkUri(i))tokens[i].any_child = 10;else if(l = checkExpression(i))tokens[i].any_child = 11;else if(l = checkFunction(i))tokens[i].any_child = 12;else if(l = checkInterpolation(i))tokens[i].any_child = 13;else if(l = checkIdent(i))tokens[i].any_child = 14;else if(l = checkClass(i))tokens[i].any_child = 15;else if(l = checkUnary(i))tokens[i].any_child = 16;return l;} /** + * @return {!Node} + */function getAny(){var childType=tokens[pos].any_child;if(childType === 1)return getBrackets();else if(childType === 2)return getParentheses();else if(childType === 3)return getString();else if(childType === 4)return getVariablesList();else if(childType === 5)return getVariable();else if(childType === 6)return getPlaceholder();else if(childType === 7)return getPercentage();else if(childType === 8)return getDimension();else if(childType === 17)return getUnicodeRange();else if(childType === 9)return getNumber();else if(childType === 10)return getUri();else if(childType === 11)return getExpression();else if(childType === 12)return getFunction();else if(childType === 13)return getInterpolation();else if(childType === 14)return getIdent();else if(childType === 15)return getClass();else if(childType === 16)return getUnary();} /** + * Checks if token is part of mixin's arguments. + * + * @param {number} i Token's index number + * @return {number} Length of arguments + */function checkArguments(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;i++;while(i < tokens[start].right) {if(l = checkArgument(i))i += l;else return 0;}return tokens[start].right - start + 1;} /** + * Checks if token is valid to be part of arguments list + * + * @param {number} i Token's index number + * @return {number} Length of argument + */function checkArgument(i){var l;if(l = checkBrackets(i))tokens[i].argument_child = 1;else if(l = checkParentheses(i))tokens[i].argument_child = 2;else if(l = checkDeclaration(i))tokens[i].argument_child = 3;else if(l = checkFunction(i))tokens[i].argument_child = 4;else if(l = checkVariablesList(i))tokens[i].argument_child = 5;else if(l = checkVariable(i))tokens[i].argument_child = 6;else if(l = checkSC(i))tokens[i].argument_child = 7;else if(l = checkDelim(i))tokens[i].argument_child = 8;else if(l = checkDeclDelim(i))tokens[i].argument_child = 9;else if(l = checkString(i))tokens[i].argument_child = 10;else if(l = checkPercentage(i))tokens[i].argument_child = 11;else if(l = checkDimension(i))tokens[i].argument_child = 12;else if(l = checkNumber(i))tokens[i].argument_child = 13;else if(l = checkUri(i))tokens[i].argument_child = 14;else if(l = checkInterpolation(i))tokens[i].argument_child = 15;else if(l = checkIdent(i))tokens[i].argument_child = 16;else if(l = checkVhash(i))tokens[i].argument_child = 17;else if(l = checkOperator(i))tokens[i].argument_child = 18;else if(l = checkUnary(i))tokens[i].argument_child = 19;else if(l = checkParentSelector(i))tokens[i].argument_child = 20;else if(l = checkImportant(i))tokens[i].argument_child = 21;return l;} /** + * @return {!Node} + */function getArgument(){var childType=tokens[pos].argument_child;if(childType === 1)return getBrackets();else if(childType === 2)return getParentheses();else if(childType === 3)return getDeclaration();else if(childType === 4)return getFunction();else if(childType === 5)return getVariablesList();else if(childType === 6)return getVariable();else if(childType === 7)return getSC();else if(childType === 8)return getDelim();else if(childType === 9)return getDeclDelim();else if(childType === 10)return getString();else if(childType === 11)return getPercentage();else if(childType === 12)return getDimension();else if(childType === 13)return getNumber();else if(childType === 14)return getUri();else if(childType === 15)return getInterpolation();else if(childType === 16)return getIdent();else if(childType === 17)return getVhash();else if(childType === 18)return getOperator();else if(childType === 19)return getUnary();else if(childType === 20)return getParentSelector();else if(childType === 21)return getImportant();} /** + * Checks if token is part of an @-word (e.g. `@import`, `@include`). + * + * @param {number} i Token's index number + * @return {number} + */function checkAtkeyword(i){var l; // Check that token is `@`: + if(i >= tokensLength || tokens[i++].type !== TokenType.CommercialAt)return 0;return (l = checkIdentOrInterpolation(i))?l + 1:0;} /** + * Gets node with @-word. + * + * @return {!Node} + */function getAtkeyword(){var startPos=pos++;var x=getIdentOrInterpolation();var token=tokens[startPos];return newNode(NodeType.AtkeywordType,x,token.ln,token.col);} /** + * Checks if token is a part of an @-rule. + * + * @param {number} i Token's index number + * @return {number} Length of @-rule + */function checkAtrule(i){var l;if(i >= tokensLength)return 0; // If token already has a record of being part of an @-rule, + // return the @-rule's length: + if(tokens[i].atrule_l !== undefined)return tokens[i].atrule_l; // If token is part of an @-rule, save the rule's type to token. + // @keyframes: + if(l = checkKeyframesRule(i))tokens[i].atrule_type = 4; // @-rule with ruleset: + else if(l = checkAtruler(i))tokens[i].atrule_type = 1; // Block @-rule: + else if(l = checkAtruleb(i))tokens[i].atrule_type = 2; // Single-line @-rule: + else if(l = checkAtrules(i))tokens[i].atrule_type = 3;else return 0; // If token is part of an @-rule, save the rule's length to token: + tokens[i].atrule_l = l;return l;} /** + * Gets node with @-rule. + * + * @return {!Node} + */function getAtrule(){switch(tokens[pos].atrule_type){case 1:return getAtruler(); // @-rule with ruleset + case 2:return getAtruleb(); // Block @-rule + case 3:return getAtrules(); // Single-line @-rule + case 4:return getKeyframesRule();}} /** + * Checks if token is part of a block @-rule. + * + * @param {number} i Token's index number + * @return {number} Length of the @-rule + */function checkAtruleb(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(l = checkTsets(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** + * Gets node with a block @-rule. + * + * @return {!Node} + */function getAtruleb(){var startPos=pos;var x=undefined;x = [getAtkeyword()].concat(getTsets()).concat([getBlock()]);var token=tokens[startPos];return newNode(NodeType.AtruleType,x,token.ln,token.col);} /** + * Checks if token is part of an @-rule with ruleset. + * + * @param {number} i Token's index number + * @return {number} Length of the @-rule + */function checkAtruler(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(l = checkTsets(i))i += l;if(l = checkAtrulers(i))i += l;else return 0;return i - start;} /** + * Gets node with an @-rule with ruleset. + * + * @return {!Node} + */function getAtruler(){var startPos=pos;var x=undefined;x = [getAtkeyword()].concat(getTsets());x.push(getAtrulers());var token=tokens[startPos];return newNode(NodeType.AtruleType,x,token.ln,token.col);} /** + * @param {number} i Token's index number + * @return {number} + */function checkAtrulers(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(!tokens[i].block_end)return 0;if(l = checkSC(i))i += l;if(l = checkRuleset(i) || checkAtrule(i))i += l;else return 0;while(l = checkRuleset(i) || checkAtrule(i) || checkSC(i)) {i += l;}if(i < tokensLength)tokens[i].atrulers_end = 1;return i - start;} /** + * @return {!Node} + */function getAtrulers(){var startPos=pos;var token=tokens[startPos];var line=token.ln;var column=token.col;var x=getSC();while(pos < tokensLength && !tokens[pos].atrulers_end) {if(checkSC(pos))x = x.concat(getSC());else if(checkAtrule(pos))x.push(getAtrule());else if(checkRuleset(pos))x.push(getRuleset());}var end=getLastPosition(x,line,column);return newNode(NodeType.BlockType,x,token.ln,token.col,end);} /** + * @param {number} i Token's index number + * @return {number} + */function checkAtrules(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(l = checkTsets(i))i += l;return i - start;} /** + * @return {!Node} + */function getAtrules(){var startPos=pos;var x=undefined;x = [getAtkeyword()].concat(getTsets());var token=tokens[startPos];return newNode(NodeType.AtruleType,x,token.ln,token.col);} /** + * Checks if token is part of a block (e.g. `{...}`). + * + * @param {number} i Token's index number + * @return {number} Length of the block + */function checkBlock(i){return i < tokensLength && tokens[i].block_end?tokens[i].block_end - i + 1:0;} /** + * Gets node with a block. + * + * @return {!Node} + */function getBlock(){var startPos=pos;var end=tokens[pos].block_end;var x=[];var token=tokens[startPos];while(pos < end) {if(checkBlockdecl(pos))x = x.concat(getBlockdecl());else throwError();}return newNode(NodeType.BlockType,x,token.ln,token.col);} /** + * Checks if token is part of a declaration (property-value pair). + * + * @param {number} i Token's index number + * @return {number} Length of the declaration + */function checkBlockdecl(i){var l;if(i >= tokensLength)return 0;if(l = checkBlockdecl7(i))tokens[i].bd_type = 7;else if(l = checkBlockdecl5(i))tokens[i].bd_type = 5;else if(l = checkBlockdecl6(i))tokens[i].bd_type = 6;else if(l = checkBlockdecl1(i))tokens[i].bd_type = 1;else if(l = checkBlockdecl2(i))tokens[i].bd_type = 2;else if(l = checkBlockdecl3(i))tokens[i].bd_type = 3;else if(l = checkBlockdecl4(i))tokens[i].bd_type = 4;else return 0;return l;} /** + * @return {!Array} + */function getBlockdecl(){switch(tokens[pos].bd_type){case 1:return getBlockdecl1();case 2:return getBlockdecl2();case 3:return getBlockdecl3();case 4:return getBlockdecl4();case 5:return getBlockdecl5();case 6:return getBlockdecl6();case 7:return getBlockdecl7();}} /** + * @param {number} i Token's index number + * @return {number} + */function checkBlockdecl1(i){var start=i;var l=undefined;if(l = checkInclude(i))tokens[i].bd_kind = 2;else if(l = checkDeclaration(i))tokens[i].bd_kind = 5;else if(l = checkAtrule(i))tokens[i].bd_kind = 6;else return 0;i += l;if(tokens[start].bd_kind === 2 && [2,4,6,8].indexOf(tokens[start].include_type) === -1)return 0;if(tokens[start].bd_kind === 6 && tokens[start].atrule_type === 3)return 0;while(i < tokensLength) {if(l = checkDeclDelim(i))return i + l - start;if(l = checkS(i))i += l;else if(l = checkCommentSL(i))i += l;else break;}return 0;} /** + * @return {!Array} + */function getBlockdecl1(){var x=[];var _x=[];var kind=tokens[pos].bd_kind;switch(kind){case 2:x.push(getInclude());break;case 5:x.push(getDeclaration());break;case 6:x.push(getAtrule());break;}while(pos < tokensLength) {var _pos=pos;if(checkDeclDelim(pos)){_x.push(getDeclDelim());x = x.concat(_x);break;}if(checkS(pos))_x.push(getS());else if(checkCommentSL(pos))_x.push(getCommentSL());else {pos = _pos;break;}}return x;} /** + * @param {number} i Token's index number + * @return {number} + */function checkBlockdecl2(i){var start=i;var l=undefined;if(l = checkConditionalStatement(i))tokens[i].bd_kind = 1;else if(l = checkInclude(i))tokens[i].bd_kind = 2;else if(l = checkExtend(i))tokens[i].bd_kind = 4;else if(l = checkMixin(i))tokens[i].bd_kind = 8;else if(l = checkLoop(i))tokens[i].bd_kind = 3;else if(l = checkRuleset(i))tokens[i].bd_kind = 7;else if(l = checkDeclaration(i))tokens[i].bd_kind = 5;else if(l = checkAtrule(i))tokens[i].bd_kind = 6;else return 0;i += l;while(i < tokensLength) {if(l = checkS(i))i += l;else if(l = checkCommentSL(i))i += l;else break;}return i - start;} /** + * @return {!Array} + */function getBlockdecl2(){var x=[];switch(tokens[pos].bd_kind){case 1:x.push(getConditionalStatement());break;case 2:x.push(getInclude());break;case 3:x.push(getLoop());break;case 4:x.push(getExtend());break;case 5:x.push(getDeclaration());break;case 6:x.push(getAtrule());break;case 7:x.push(getRuleset());break;case 8:x.push(getMixin());break;}while(pos < tokensLength) {if(checkS(pos))x.push(getS());else if(checkCommentSL(pos))x.push(getCommentSL());else break;}return x;} /** + * @param {number} i Token's index number + * @return {number} + */function checkBlockdecl3(i){var start=i;var l=undefined;if(l = checkConditionalStatement(i))tokens[i].bd_kind = 1;else if(l = checkInclude(i))tokens[i].bd_kind = 2;else if(l = checkExtend(i))tokens[i].bd_kind = 4;else if(l = checkLoop(i))tokens[i].bd_kind = 3;else if(l = checkRuleset(i))tokens[i].bd_kind = 7;else if(l = checkDeclaration(i))tokens[i].bd_kind = 5;else if(l = checkAtrule(i))tokens[i].bd_kind = 6;else return 0;i += l;return i - start;} /** + * @return {!Array} + */function getBlockdecl3(){var x=undefined;switch(tokens[pos].bd_kind){case 1:x = getConditionalStatement();break;case 2:x = getInclude();break;case 3:x = getLoop();break;case 4:x = getExtend();break;case 5:x = getDeclaration();break;case 6:x = getAtrule();break;case 7:x = getRuleset();break;}return [x];} /** + * @param {number} i Token's index number + * @return {number} + */function checkBlockdecl4(i){return checkSC(i);} /** + * @return {!Array} + */function getBlockdecl4(){return getSC();} /** + * @param {number} i Token's index number + * @return {number} + */function checkBlockdecl5(i){var start=i;var l=undefined;if(l = checkInclude(i))i += l;else if(l = checkRuleset(i))i += l;else return 0;while(i < tokensLength) {if(l = checkS(i))i += l;else if(l = checkCommentSL(i))i += l;else break;}return i - start;} /** + * @return {!Array} + */function getBlockdecl5(){var x=[];if(checkInclude(pos))x.push(getInclude());else x.push(getRuleset());while(pos < tokensLength) {if(checkS(pos))x.push(getS());else if(checkCommentSL(pos))x.push(getCommentSL());else break;}return x;} /** + * @param {number} i Token's index number + * @return {number} + */function checkBlockdecl6(i){var start=i;var l=undefined;if(l = checkInclude(i))i += l;else if(l = checkRuleset(i))i += l;else return 0;return i - start;} /** + * @return {!Array} + */function getBlockdecl6(){var x=undefined;if(checkInclude(pos))x = getInclude();else x = getRuleset();return [x];} /** + * @param {number} i Token's index number + * @return {number} + */function checkBlockdecl7(i){var start=i;var l=undefined;if(l = checkInclude(i))i += l;else return 0;if([2,4,6,8].indexOf(tokens[start].include_type) === -1)return 0;while(i < tokensLength) {if(l = checkDeclDelim(i))return i + l - start;if(l = checkS(i))i += l;else if(l = checkCommentSL(i))i += l;else break;}return 0;} /** + * @return {!Array} + */function getBlockdecl7(){var x=[];var _x=[];x.push(getInclude());while(pos < tokensLength) {var _pos=pos;if(checkDeclDelim(pos)){_x.push(getDeclDelim());x = x.concat(_x);break;}if(checkS(pos))_x.push(getS());else if(checkCommentSL(pos))_x.push(getCommentSL());else {pos = _pos;break;}}return x;} /** + * Checks if token is part of text inside square brackets, e.g. `[1]`. + * + * @param {number} i Token's index number + * @return {number} + */function checkBrackets(i){if(i >= tokensLength || tokens[i].type !== TokenType.LeftSquareBracket)return 0;return tokens[i].right - i + 1;} /** + * Gets node with text inside square brackets, e.g. `[1]`. + * + * @return {!Node} + */function getBrackets(){var startPos=pos;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;var tsets=getTsets();var end=getLastPosition(tsets,line,column,1);pos++;return newNode(NodeType.BracketsType,tsets,token.ln,token.col,end);} /** + * Checks if token is part of a class selector (e.g. `.abc`). + * + * @param {number} i Token's index number + * @return {number} Length of the class selector + */function checkClass(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(tokens[i].class_l)return tokens[i].class_l;if(tokens[i++].type !== TokenType.FullStop)return 0; // Check for `-` at beginning + if(tokens[i].type === TokenType.HyphenMinus)i += 1;if(l = checkIdentOrInterpolation(i))i += l;else return 0;while(i < tokensLength) {if(l = checkIdentOrInterpolation(i) || checkNumber(i))i += l;else if(tokens[i].type === TokenType.HyphenMinus)i += 1;else break;}tokens[start].classEnd = i;return i - start;} /** + * Gets node with a class selector. + * + * @return {!Node} + */function getClass(){var startPos=pos;var type=NodeType.ClassType;var token=tokens[startPos];var line=token.ln;var column=token.col;var content=[];var end=token.classEnd; // Skip `.` + pos++;while(pos < end) {if(checkIdentOrInterpolation(pos)){content = content.concat(getIdentOrInterpolation());}else if(checkNumber(pos)){content = content.concat(getNumber());}else if(tokens[pos].type === TokenType.HyphenMinus){content.push(newNode(NodeType.IdentType,tokens[pos].value,tokens[pos].ln,tokens[pos].col));pos++;}else break;}return newNode(type,content,line,column);} /** + * @param {number} i + * @return {number} + */function checkCombinator(i){if(i >= tokensLength)return 0;var l=undefined;if(l = checkCombinator1(i))tokens[i].combinatorType = 1;else if(l = checkCombinator2(i))tokens[i].combinatorType = 2;else if(l = checkCombinator3(i))tokens[i].combinatorType = 3;return l;} /** + * @return {!Node} + */function getCombinator(){var type=tokens[pos].combinatorType;if(type === 1)return getCombinator1();if(type === 2)return getCombinator2();if(type === 3)return getCombinator3();} /** + * (1) `||` + * + * @param {number} i + * @return {number} + */function checkCombinator1(i){if(tokens[i].type === TokenType.VerticalLine && tokens[i + 1].type === TokenType.VerticalLine)return 2;else return 0;} /** + * @return {!Node} + */function getCombinator1(){var type=NodeType.CombinatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='||';pos += 2;return newNode(type,content,line,column);} /** + * (1) `>` + * (2) `+` + * (3) `~` + * + * @param {number} i + * @return {number} + */function checkCombinator2(i){var type=tokens[i].type;if(type === TokenType.PlusSign || type === TokenType.GreaterThanSign || type === TokenType.Tilde)return 1;else return 0;}function getCombinator2(){var type=NodeType.CombinatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=tokens[pos++].value;return newNode(type,content,line,column);} /** + * (1) `/panda/` + */function checkCombinator3(i){var start=i;if(tokens[i].type === TokenType.Solidus)i++;else return 0;var l=undefined;if(l = checkIdent(i))i += l;else return 0;if(tokens[i].type === TokenType.Solidus)i++;else return 0;return i - start;}function getCombinator3(){var type=NodeType.CombinatorType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `/`. + pos++;var ident=getIdent(); // Skip `/`. + pos++;var content='/' + ident.content + '/';return newNode(type,content,line,column);} /** + * Check if token is a multiline comment. + * @param {number} i Token's index number + * @return {number} `1` if token is a multiline comment, otherwise `0` + */function checkCommentML(i){return i < tokensLength && tokens[i].type === TokenType.CommentML?1:0;} /** + * Get node with a multiline comment + * @return {Array} `['commentML', x]` where `x` + * is the comment's text (without `/*` and `* /`). + */function getCommentML(){var startPos=pos;var x=tokens[pos].value.substring(2);var token=tokens[startPos];var line=token.ln;var column=token.col;var end=getLastPosition(x,line,column + 2);pos++;return newNode(NodeType.CommentMLType,x,token.ln,token.col,end);} /** + * Check if token is part of a single-line comment. + * @param {number} i Token's index number + * @return {number} `1` if token is a single-line comment, otherwise `0` + */function checkCommentSL(i){return i < tokensLength && tokens[i].type === TokenType.CommentSL?1:0;} /** + * Get node with a single-line comment. + * @return {Array} `['commentSL', x]` where `x` is comment's message + * (without `//`) + */function getCommentSL(){var startPos=pos;var token=tokens[startPos];var line=token.ln;var column=token.col;var x=tokens[pos++].value.substring(2);var end=!x?[line,column + 1]:getLastPosition(x,line,column + 2);return newNode(NodeType.CommentSLType,x,token.ln,token.col,end);} /** + * Check if token is part of a condition + * (e.g. `@if ...`, `@else if ...` or `@else ...`). + * @param {number} i Token's index number + * @return {number} Length of the condition + */function checkCondition(i){var start=i;var l=undefined;var _i=undefined;var s=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(['if','else'].indexOf(tokens[start + 1].value) < 0)return 0;while(i < tokensLength) {if(l = checkBlock(i))break;s = checkSC(i);_i = i + s;if(l = _checkCondition(_i))i += l + s;else break;}return i - start;}function _checkCondition(i){return checkVariable(i) || checkNumber(i) || checkInterpolation(i) || checkIdent(i) || checkOperator(i) || checkCombinator(i) || checkString(i);} /** + * Get node with a condition. + * @return {Array} `['condition', x]` + */function getCondition(){var startPos=pos;var x=[getAtkeyword()];while(pos < tokensLength) {if(checkBlock(pos))break;var s=checkSC(pos);var _pos=pos + s;if(!_checkCondition(_pos))break;if(s)x = x.concat(getSC());x.push(_getCondition());}var token=tokens[startPos];return newNode(NodeType.ConditionType,x,token.ln,token.col);}function _getCondition(){if(checkVariable(pos))return getVariable();if(checkNumber(pos))return getNumber();if(checkInterpolation(pos))return getInterpolation();if(checkIdent(pos))return getIdent();if(checkOperator(pos))return getOperator();if(checkCombinator(pos))return getCombinator();if(checkString(pos))return getString();} /** + * Check if token is part of a conditional statement + * (e.g. `@if ... {} @else if ... {} @else ... {}`). + * @param {number} i Token's index number + * @return {number} Length of the condition + */function checkConditionalStatement(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkCondition(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** + * Get node with a condition. + * @return {Array} `['condition', x]` + */function getConditionalStatement(){var startPos=pos;var x=[];x.push(getCondition());x = x.concat(getSC());x.push(getBlock());var token=tokens[startPos];return newNode(NodeType.ConditionalStatementType,x,token.ln,token.col);} /** + * Check if token is part of a declaration (property-value pair) + * @param {number} i Token's index number + * @return {number} Length of the declaration + */function checkDeclaration(i){return checkDeclaration1(i) || checkDeclaration2(i);} /** + * Get node with a declaration + * @return {Array} `['declaration', ['property', x], ['propertyDelim'], + * ['value', y]]` + */function getDeclaration(){return checkDeclaration1(pos)?getDeclaration1():getDeclaration2();} /** + * Check if token is part of a declaration (property-value pair) + * @param {number} i Token's index number + * @return {number} Length of the declaration + */function checkDeclaration1(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkProperty(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkPropertyDelim(i))i++;else return 0;if(l = checkValue(i))return i + l - start;if(l = checkS(i))i += l;if(l = checkValue(i))i += l;else return 0;return i - start;} /** + * Get node with a declaration + * @return {Array} `['declaration', ['property', x], ['propertyDelim'], + * ['value', y]]` + */function getDeclaration1(){var startPos=pos;var x=[];x.push(getProperty());if(checkS(pos))x.push(getS());x.push(getPropertyDelim());if(checkS(pos))x.push(getS());x.push(getValue());var token=tokens[startPos];return newNode(NodeType.DeclarationType,x,token.ln,token.col);} /** + * Check if token is part of a declaration (property-value pair) + * @param {number} i Token's index number + * @return {number} Length of the declaration + */function checkDeclaration2(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkPropertyDelim(i))i++;else return 0;if(l = checkProperty(i))i += l;else return 0;if(l = checkValue(i))return i + l - start;if(l = checkSC(i))i += l;if(l = checkValue(i))i += l;else return 0;return i - start;} /** + * Get node with a declaration + * @return {Array} `['declaration', ['propertyDelim'], ['property', x], + * ['value', y]]` + */function getDeclaration2(){var startPos=pos;var x=[];x.push(getPropertyDelim());x.push(getProperty());x = x.concat(getSC());x.push(getValue());var token=tokens[startPos];return newNode(NodeType.DeclarationType,x,token.ln,token.col);} /** + * Check if token is a semicolon + * @param {number} i Token's index number + * @return {number} `1` if token is a semicolon, otherwise `0` + */function checkDeclDelim(i){if(i >= tokensLength)return 0;return tokens[i].type === TokenType.Newline || tokens[i].type === TokenType.Semicolon?1:0;} /** + * Get node with a semicolon + * @return {Array} `['declDelim']` + */function getDeclDelim(){var startPos=pos++;var token=tokens[startPos];return newNode(NodeType.DeclDelimType,'\n',token.ln,token.col);} /** + * Check if token if part of `!default` word. + * @param {number} i Token's index number + * @return {number} Length of the `!default` word + */function checkDefault(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark)return 0;if(l = checkSC(i))i += l;if(tokens[i].value === 'default'){tokens[start].defaultEnd = i;return i - start + 1;}else {return 0;}} /** + * Get node with a `!default` word + * @return {Array} `['default', sc]` where `sc` is optional whitespace + */function getDefault(){var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,token.defaultEnd);pos = token.defaultEnd + 1;return newNode(NodeType.DefaultType,content,line,column);} /** + * Check if token is a comma + * @param {number} i Token's index number + * @return {number} `1` if token is a comma, otherwise `0` + */function checkDelim(i){return i < tokensLength && tokens[i].type === TokenType.Comma?1:0;} /** + * Get node with a comma + * @return {Array} `['delim']` + */function getDelim(){var startPos=pos++;var token=tokens[startPos];return newNode(NodeType.DelimType,',',token.ln,token.col);} /** + * Check if token is part of a number with dimension unit (e.g. `10px`) + * @param {Number} i Token's index number + * @return {Number} + */function checkDimension(i){var ln=checkNumber(i);var li=undefined;if(i >= tokensLength || !ln || i + ln >= tokensLength)return 0;return (li = checkUnit(i + ln))?ln + li:0;} /** + * Get node of a number with dimension unit + * @return {Node} + */function getDimension(){var type=NodeType.DimensionType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[getNumber(),getUnit()];return newNode(type,content,line,column);} /** + * Check if token is unit + * @param {Number} i Token's index number + * @return {Number} + */function checkUnit(i){var units=['em','ex','ch','rem','vh','vw','vmin','vmax','px','mm','q','cm','in','pt','pc','deg','grad','rad','turn','s','ms','Hz','kHz','dpi','dpcm','dppx'];return units.indexOf(tokens[i].value) !== -1?1:0;} /** + * Get unit node of type ident + * @return {Node} An ident node containing the unit value + */function getUnit(){var type=NodeType.IdentType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=token.value;pos++;return newNode(type,content,line,column);} /** + * @param {number} i Token's index number + * @return {number} + */function checkExpression(i){var start=i;if(i >= tokensLength || tokens[i++].value !== 'expression' || i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis){return 0;}return tokens[i].right - start + 1;} /** + * @return {Array} + */function getExpression(){var startPos=pos;var x=undefined;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;x = joinValues(pos + 1,tokens[pos].right - 1);var end=getLastPosition(x,line,column,1);if(end[0] === line)end[1] += 11;pos = tokens[pos].right + 1;return newNode(NodeType.ExpressionType,x,token.ln,token.col,end);}function checkExtend(i){var l=0;if(l = checkExtend1(i))tokens[i].extend_child = 1;else if(l = checkExtend2(i))tokens[i].extend_child = 2;return l;}function getExtend(){var type=tokens[pos].extend_child;if(type === 1)return getExtend1();else if(type === 2)return getExtend2();} /** + * Checks if token is part of an extend with `!optional` flag. + * @param {number} i + */function checkExtend1(i){var start=i;var l;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'extend')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkSelectorsGroup(i))i += l;else return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkOptional(i))i += l;else return 0;return i - start;}function getExtend1(){var startPos=pos;var x=[].concat([getAtkeyword()],getSC(),getSelectorsGroup(),getSC(),getOptional());var token=tokens[startPos];return newNode(NodeType.ExtendType,x,token.ln,token.col);} /** + * Checks if token is part of an extend without `!optional` flag. + * @param {number} i + */function checkExtend2(i){var start=i;var l;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'extend')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkSelectorsGroup(i))i += l;else return 0;return i - start;}function getExtend2(){var startPos=pos;var x=[].concat([getAtkeyword()],getSC(),getSelectorsGroup());var token=tokens[startPos];return newNode(NodeType.ExtendType,x,token.ln,token.col);} /** + * @param {number} i Token's index number + * @return {number} + */function checkFunction(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i < tokensLength && tokens[i].type === TokenType.LeftParenthesis?tokens[i].right - start + 1:0;} /** + * @return {Array} + */function getFunction(){var startPos=pos;var x=getIdentOrInterpolation();var body=undefined;body = getArguments();x.push(body);var token=tokens[startPos];return newNode(NodeType.FunctionType,x,token.ln,token.col);} /** + * @return {Array} + */function getArguments(){var startPos=pos;var x=[];var body=undefined;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;while(pos < tokensLength && tokens[pos].type !== TokenType.RightParenthesis) {if(checkDeclaration(pos))x.push(getDeclaration());else if(checkArgument(pos)){body = getArgument();if(typeof body.content === 'string')x.push(body);else x = x.concat(body);}else if(checkClass(pos))x.push(getClass());else throwError();}var end=getLastPosition(x,line,column,1);pos++;return newNode(NodeType.ArgumentsType,x,token.ln,token.col,end);} /** + * Check if token is part of `!global` word + * @param {number} i Token's index number + * @return {number} + */function checkGlobal(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark)return 0;if(l = checkSC(i))i += l;if(tokens[i].value === 'global'){tokens[start].globalEnd = i;return i - start + 1;}else {return 0;}} /** + * Get node with `!global` word + */function getGlobal(){var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,token.globalEnd);pos = token.globalEnd + 1;return newNode(NodeType.GlobalType,content,line,column);} /** + * Check if token is part of an identifier + * @param {number} i Token's index number + * @return {number} Length of the identifier + */function checkIdent(i){var start=i;if(i >= tokensLength)return 0;if(tokens[i].type === TokenType.HyphenMinus && tokens[i + 1].type === TokenType.DecimalNumber)return 0;if(tokens[i].type === TokenType.HyphenMinus)i++;if(tokens[i].type === TokenType.LowLine || tokens[i].type === TokenType.Identifier)i++;else return 0;for(;i < tokensLength;i++) {if(tokens[i].type !== TokenType.HyphenMinus && tokens[i].type !== TokenType.LowLine && tokens[i].type !== TokenType.Identifier && tokens[i].type !== TokenType.DecimalNumber)break;}tokens[start].ident_last = i - 1;return i - start;} /** + * Get node with an identifier + * @return {Array} `['ident', x]` where `x` is identifier's name + */function getIdent(){var startPos=pos;var x=joinValues(pos,tokens[pos].ident_last);pos = tokens[pos].ident_last + 1;var token=tokens[startPos];return newNode(NodeType.IdentType,x,token.ln,token.col);} /** + * @param {number} i Token's index number + * @returns {number} Length of the identifier + */function checkPartialIdent(i){var start=i;if(i >= tokensLength)return 0;for(;i < tokensLength;i++) {if(tokens[i].type !== TokenType.HyphenMinus && tokens[i].type !== TokenType.LowLine && tokens[i].type !== TokenType.Identifier && tokens[i].type !== TokenType.DecimalNumber)break;}tokens[start].ident_last = i - 1;return i - start;}function checkIdentOrInterpolation(i){var start=i;var l=undefined;while(i < tokensLength) {if(l = checkInterpolation(i) || checkIdent(i))i += l;else break;}return i - start;}function getIdentOrInterpolation(){var x=[];while(pos < tokensLength) {if(checkInterpolation(pos))x.push(getInterpolation());else if(checkIdent(pos))x.push(getIdent());else break;}return x;} /** + * Check if token is part of `!important` word + * @param {number} i Token's index number + * @return {number} + */function checkImportant(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark)return 0;if(l = checkSC(i))i += l;if(tokens[i].value === 'important'){tokens[start].importantEnd = i;return i - start + 1;}else {return 0;}} /** + * Get node with `!important` word + * @return {Array} `['important', sc]` where `sc` is optional whitespace + */function getImportant(){var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,token.importantEnd);pos = token.importantEnd + 1;return newNode(NodeType.ImportantType,content,line,column);} /** + * Check if token is part of an included mixin (`@include` or `@extend` + * directive). + * @param {number} i Token's index number + * @return {number} Length of the included mixin + */function checkInclude(i){var l;if(i >= tokensLength)return 0;if(l = checkInclude1(i))tokens[i].include_type = 1;else if(l = checkInclude2(i))tokens[i].include_type = 2;else if(l = checkInclude3(i))tokens[i].include_type = 3;else if(l = checkInclude4(i))tokens[i].include_type = 4;else if(l = checkInclude5(i))tokens[i].include_type = 5;else if(l = checkInclude6(i))tokens[i].include_type = 6;else if(l = checkInclude7(i))tokens[i].include_type = 7;else if(l = checkInclude8(i))tokens[i].include_type = 8;return l;} /** + * Get node with included mixin + * @return {Array} `['include', x]` + */function getInclude(){switch(tokens[pos].include_type){case 1:return getInclude1();case 2:return getInclude2();case 3:return getInclude3();case 4:return getInclude4();case 5:return getInclude5();case 6:return getInclude6();case 7:return getInclude7();case 8:return getInclude8();}} /** + * Check if token is part of an included mixin like `@include nani(foo) {...}` + * @param {number} i Token's index number + * @return {number} Length of the include + */function checkInclude1(i){var start=i;var l=undefined;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'include')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkArguments(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** + * Get node with included mixin like `@include nani(foo) {...}` + * @return {Array} `['include', ['atkeyword', x], sc, ['selector', y], sc, + * ['arguments', z], sc, ['block', q], sc` where `x` is `include` or + * `extend`, `y` is mixin's identifier (selector), `z` are arguments + * passed to the mixin, `q` is block passed to the mixin and `sc` + * are optional whitespaces + */function getInclude1(){var startPos=pos;var x=[].concat(getAtkeyword(),getSC(),getIdentOrInterpolation(),getSC(),getArguments(),getSC(),getBlock());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** + * Check if token is part of an included mixin like `@include nani(foo)` + * @param {number} i Token's index number + * @return {number} Length of the include + */function checkInclude2(i){var start=i;var l=undefined;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'include')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkArguments(i))i += l;else return 0;return i - start;} /** + * Get node with included mixin like `@include nani(foo)` + * @return {Array} `['include', ['atkeyword', x], sc, ['selector', y], sc, + * ['arguments', z], sc]` where `x` is `include` or `extend`, `y` is + * mixin's identifier (selector), `z` are arguments passed to the + * mixin and `sc` are optional whitespaces + */function getInclude2(){var startPos=pos;var x=[].concat(getAtkeyword(),getSC(),getIdentOrInterpolation(),getSC(),getArguments());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** + * Check if token is part of an included mixin with a content block passed + * as an argument (e.g. `@include nani {...}`) + * @param {number} i Token's index number + * @return {number} Length of the mixin + */function checkInclude3(i){var start=i;var l=undefined;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'include')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** + * Get node with an included mixin with a content block passed + * as an argument (e.g. `@include nani {...}`) + * @return {Array} `['include', x]` + */function getInclude3(){var startPos=pos;var x=[].concat(getAtkeyword(),getSC(),getIdentOrInterpolation(),getSC(),getBlock());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** + * @param {number} i Token's index number + * @return {number} + */function checkInclude4(i){var start=i;var l=undefined;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'include')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;} /** + * @return {Array} `['include', x]` + */function getInclude4(){var startPos=pos;var x=[].concat(getAtkeyword(),getSC(),getIdentOrInterpolation());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** + * Check if token is part of an included mixin like `+nani(foo) {...}` + * @param {number} i Token's index number + * @return {number} Length of the include + */function checkInclude5(i){var start=i;var l=undefined;if(tokens[i].type === TokenType.PlusSign)i++;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkArguments(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** + * Get node with included mixin like `+nani(foo) {...}` + * @return {Array} `['include', ['operator', '+'], ['selector', x], sc, + * ['arguments', y], sc, ['block', z], sc` where `x` is + * mixin's identifier (selector), `y` are arguments passed to the + * mixin, `z` is block passed to mixin and `sc` are optional whitespaces + */function getInclude5(){var startPos=pos;var x=[].concat(getOperator(),getIdentOrInterpolation(),getSC(),getArguments(),getSC(),getBlock());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** + * Check if token is part of an included mixin like `+nani(foo)` + * @param {number} i Token's index number + * @return {number} Length of the include + */function checkInclude6(i){var start=i;var l=undefined;if(tokens[i].type === TokenType.PlusSign)i++;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkArguments(i))i += l;else return 0;return i - start;} /** + * Get node with included mixin like `+nani(foo)` + * @return {Array} `['include', ['operator', '+'], ['selector', y], sc, + * ['arguments', z], sc]` where `y` is + * mixin's identifier (selector), `z` are arguments passed to the + * mixin and `sc` are optional whitespaces + */function getInclude6(){var startPos=pos;var x=[].concat(getOperator(),getIdentOrInterpolation(),getSC(),getArguments());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** + * Check if token is part of an included mixin with a content block passed + * as an argument (e.g. `+nani {...}`) + * @param {number} i Token's index number + * @return {number} Length of the mixin + */function checkInclude7(i){var start=i;var l=undefined;if(tokens[i].type === TokenType.PlusSign)i++;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** + * Get node with an included mixin with a content block passed + * as an argument (e.g. `+nani {...}`) + * @return {Array} `['include', x]` + */function getInclude7(){var startPos=pos;var x=[].concat(getOperator(),getIdentOrInterpolation(),getSC(),getBlock());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** + * @param {number} i Token's index number + * @return {number} + */function checkInclude8(i){var start=i;var l=undefined;if(tokens[i].type === TokenType.PlusSign)i++;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;} /** + * @return {Array} `['include', x]` + */function getInclude8(){var startPos=pos;var x=[].concat(getOperator(),getIdentOrInterpolation());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** + * Check if token is part of an interpolated variable (e.g. `#{$nani}`). + * @param {number} i Token's index number + * @return {number} + */function checkInterpolation(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.NumberSign || !tokens[i + 1] || tokens[i + 1].type !== TokenType.LeftCurlyBracket)return 0;i += 2;while(tokens[i].type !== TokenType.RightCurlyBracket) {if(l = checkArgument(i))i += l;else return 0;}return tokens[i].type === TokenType.RightCurlyBracket?i - start + 1:0;} /** + * Get node with an interpolated variable + * @return {Array} `['interpolation', x]` + */function getInterpolation(){var startPos=pos;var x=[];var token=tokens[startPos];var line=token.ln;var column=token.col; // Skip `#{`: + pos += 2;while(pos < tokensLength && tokens[pos].type !== TokenType.RightCurlyBracket) {var body=getArgument();if(typeof body.content === 'string')x.push(body);else x = x.concat(body);}var end=getLastPosition(x,line,column,1); // Skip `}`: + pos++;return newNode(NodeType.InterpolationType,x,token.ln,token.col,end);} /** + * Check a single keyframe block - `5% {}` + * @param {number} i + * @return {number} + */function checkKeyframesBlock(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkKeyframesSelectorsGroup(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** + * Get a single keyframe block - `5% {}` + * @return {Node} + */function getKeyframesBlock(){var type=NodeType.RulesetType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[].concat(getKeyframesSelectorsGroup(),getSC(),[getBlock()]);return newNode(type,content,line,column);} /** + * Check all keyframe blocks - `5% {} 100% {}` + * @param {number} i + * @return {number} + */function checkKeyframesBlocks(i){return i < tokensLength && tokens[i].block_end?tokens[i].block_end - i + 1:0;} /** + * Get all keyframe blocks - `5% {} 100% {}` + * @return {Node} + */function getKeyframesBlocks(){var type=NodeType.BlockType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];var keyframesBlocksEnd=token.block_end;while(pos < keyframesBlocksEnd) {if(checkSC(pos))content = content.concat(getSC());else if(checkKeyframesBlock(pos))content.push(getKeyframesBlock());else if(checkAtrule(pos))content.push(getAtrule()); // @content + else break;}return newNode(type,content,line,column);} /** + * Check if token is part of a @keyframes rule. + * @param {number} i Token's index number + * @return {number} Length of the @keyframes rule + */function checkKeyframesRule(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;var atruleName=joinValues2(i - l,l);if(atruleName.indexOf('keyframes') === -1)return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkKeyframesBlocks(i))i += l;else return 0;return i - start;} /** + * @return {Node} + */function getKeyframesRule(){var type=NodeType.AtruleType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[].concat([getAtkeyword()],getSC(),getIdentOrInterpolation(),getSC(),[getKeyframesBlocks()]);return newNode(type,content,line,column);} /** + * Check a single keyframe selector - `5%`, `from` etc + * @param {number} i + * @return {number} + */function checkKeyframesSelector(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkIdent(i)){ // Valid selectors are only `from` and `to`. + var selector=joinValues2(i,l);if(selector !== 'from' && selector !== 'to')return 0;i += l;tokens[start].keyframesSelectorType = 1;}else if(l = checkPercentage(i)){i += l;tokens[start].keyframesSelectorType = 2;}else if(l = checkInterpolation(i)){i += l;tokens[start].keyframesSelectorType = 3;}else {return 0;}return i - start;} /** + * Get a single keyframe selector + * @return {Node} + */function getKeyframesSelector(){var keyframesSelectorType=NodeType.KeyframesSelectorType;var selectorType=NodeType.SelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(token.keyframesSelectorType === 1){content.push(getIdent());}else if(token.keyframesSelectorType === 2){content.push(getPercentage());}else if(token.keyframesSelectorType === 3){content.push(getInterpolation());}var keyframesSelector=newNode(keyframesSelectorType,content,line,column);return newNode(selectorType,[keyframesSelector],line,column);} /** + * Check the keyframe's selector groups + * @param {number} i + * @return {number} + */function checkKeyframesSelectorsGroup(i){var start=i;var l=undefined;if(l = checkKeyframesSelector(i))i += l;else return 0;while(i < tokensLength) {var sb=checkSC(i);var c=checkDelim(i + sb);if(!c)break;var sa=checkSC(i + sb + c);if(l = checkKeyframesSelector(i + sb + c + sa))i += sb + c + sa + l;else break;}tokens[start].selectorsGroupEnd = i;return i - start;} /** + * Get the keyframe's selector groups + * @return {Array} An array of keyframe selectors + */function getKeyframesSelectorsGroup(){var selectorsGroup=[];var selectorsGroupEnd=tokens[pos].selectorsGroupEnd;selectorsGroup.push(getKeyframesSelector());while(pos < selectorsGroupEnd) {selectorsGroup = selectorsGroup.concat(getSC());selectorsGroup.push(getDelim());selectorsGroup = selectorsGroup.concat(getSC());selectorsGroup.push(getKeyframesSelector());}return selectorsGroup;} /** + * Check if token is part of a loop. + * @param {number} i Token's index number + * @return {number} Length of the loop + */function checkLoop(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(['for','each','while'].indexOf(tokens[start + 1].value) < 0)return 0;while(i < tokensLength) {if(l = checkBlock(i)){i += l;break;}else if(l = checkVariable(i) || checkNumber(i) || checkInterpolation(i) || checkIdent(i) || checkSC(i) || checkOperator(i) || checkCombinator(i) || checkString(i))i += l;else return 0;}return i - start;} /** + * Get node with a loop. + * @return {Array} `['loop', x]` + */function getLoop(){var startPos=pos;var x=[];x.push(getAtkeyword());while(pos < tokensLength) {if(checkBlock(pos)){x.push(getBlock());break;}else if(checkVariable(pos))x.push(getVariable());else if(checkNumber(pos))x.push(getNumber());else if(checkInterpolation(pos))x.push(getInterpolation());else if(checkIdent(pos))x.push(getIdent());else if(checkOperator(pos))x.push(getOperator());else if(checkCombinator(pos))x.push(getCombinator());else if(checkSC(pos))x = x.concat(getSC());else if(checkString(pos))x.push(getString());}var token=tokens[startPos];return newNode(NodeType.LoopType,x,token.ln,token.col);} /** + * Check if token is part of a mixin + * @param {number} i Token's index number + * @return {number} Length of the mixin + */function checkMixin(i){return checkMixin1(i) || checkMixin2(i);} /** + * Get node with a mixin + * @return {Array} `['mixin', x]` + */function getMixin(){return checkMixin1(pos)?getMixin1():getMixin2();} /** + * Check if token is part of a mixin + * @param {number} i Token's index number + * @return {number} Length of the mixin + */function checkMixin1(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if((l = checkAtkeyword(i)) && tokens[i + 1].value === 'mixin')i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else {if(l = checkArguments(i))i += l;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;}return i - start;} /** + * Get node with a mixin + * @return {Array} `['mixin', x]` + */function getMixin1(){var startPos=pos;var x=[getAtkeyword()];x = x.concat(getSC());if(checkIdentOrInterpolation(pos))x = x.concat(getIdentOrInterpolation());x = x.concat(getSC());if(checkBlock(pos))x.push(getBlock());else {if(checkArguments(pos))x.push(getArguments());x = x.concat(getSC());x.push(getBlock());}var token=tokens[startPos];return newNode(NodeType.MixinType,x,token.ln,token.col);} /** + * Check if token is part of a mixin + * @param {number} i Token's index number + * @return {number} Length of the mixin + */function checkMixin2(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(tokens[i].type === TokenType.EqualsSign)i++;else return 0;if(l = checkSC(i))i += l;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else {if(l = checkArguments(i))i += l;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;}return i - start;} /** + * Get node with a mixin + * @return {Array} `['mixin', x]` + */function getMixin2(){var startPos=pos;var x=[getOperator()];x = x.concat(getSC());if(checkIdentOrInterpolation(pos))x = x.concat(getIdentOrInterpolation());x = x.concat(getSC());if(checkBlock(pos))x.push(getBlock());else {if(checkArguments(pos))x.push(getArguments());x = x.concat(getSC());x.push(getBlock());}var token=tokens[startPos];return newNode(NodeType.MixinType,x,token.ln,token.col);} /** + * Check if token is a namespace sign (`|`) + * @param {number} i Token's index number + * @return {number} `1` if token is `|`, `0` if not + */function checkNamespace(i){return i < tokensLength && tokens[i].type === TokenType.VerticalLine?1:0;} /** + * Get node with a namespace sign + * @return {Array} `['namespace']` + */function getNamespace(){var startPos=pos++;var token=tokens[startPos];return newNode(NodeType.NamespaceType,'|',token.ln,token.col);} /** + * @param {number} i Token's index number + * @return {number} + */function checkNmName2(i){if(tokens[i].type === TokenType.Identifier)return 1;else if(tokens[i].type !== TokenType.DecimalNumber)return 0;i++;return i < tokensLength && tokens[i].type === TokenType.Identifier?2:1;} /** + * @return {string} + */function getNmName2(){var s=tokens[pos].value;if(tokens[pos++].type === TokenType.DecimalNumber && pos < tokensLength && tokens[pos].type === TokenType.Identifier)s += tokens[pos++].value;return s;} /** + * Check if token is part of a number + * @param {number} i Token's index number + * @return {number} Length of number + */function checkNumber(i){if(i >= tokensLength)return 0;if(tokens[i].number_l)return tokens[i].number_l; // `10`: + if(i < tokensLength && tokens[i].type === TokenType.DecimalNumber && (!tokens[i + 1] || tokens[i + 1] && tokens[i + 1].type !== TokenType.FullStop)){tokens[i].number_l = 1;return 1;} // `10.`: + if(i < tokensLength && tokens[i].type === TokenType.DecimalNumber && tokens[i + 1] && tokens[i + 1].type === TokenType.FullStop && (!tokens[i + 2] || tokens[i + 2].type !== TokenType.DecimalNumber)){tokens[i].number_l = 2;return 2;} // `.10`: + if(i < tokensLength && tokens[i].type === TokenType.FullStop && tokens[i + 1].type === TokenType.DecimalNumber){tokens[i].number_l = 2;return 2;} // `10.10`: + if(i < tokensLength && tokens[i].type === TokenType.DecimalNumber && tokens[i + 1] && tokens[i + 1].type === TokenType.FullStop && tokens[i + 2] && tokens[i + 2].type === TokenType.DecimalNumber){tokens[i].number_l = 3;return 3;}return 0;} /** + * Get node with number + * @return {Array} `['number', x]` where `x` is a number converted + * to string. + */function getNumber(){var s='';var startPos=pos;var l=tokens[pos].number_l;for(var j=0;j < l;j++) {s += tokens[pos + j].value;}pos += l;var token=tokens[startPos];return newNode(NodeType.NumberType,s,token.ln,token.col);} /** + * Check if token is an operator (`/`, `%`, `,`, `:` or `=`). + * @param {number} i Token's index number + * @return {number} `1` if token is an operator, otherwise `0` + */function checkOperator(i){if(i >= tokensLength)return 0;switch(tokens[i].type){case TokenType.Solidus:case TokenType.PercentSign:case TokenType.Comma:case TokenType.Colon:case TokenType.EqualsSign:case TokenType.EqualitySign:case TokenType.InequalitySign:case TokenType.LessThanSign:case TokenType.GreaterThanSign:case TokenType.Asterisk:return 1;}return 0;} /** + * Get node with an operator + * @return {Array} `['operator', x]` where `x` is an operator converted + * to string. + */function getOperator(){var startPos=pos;var x=tokens[pos++].value;var token=tokens[startPos];return newNode(NodeType.OperatorType,x,token.ln,token.col);} /** + * Check if token is part of `!optional` word + * @param {number} i Token's index number + * @return {number} + */function checkOptional(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark)return 0;if(l = checkSC(i))i += l;if(tokens[i].value === 'optional'){tokens[start].optionalEnd = i;return i - start + 1;}else {return 0;}} /** + * Get node with `!optional` word + */function getOptional(){var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,token.optionalEnd);pos = token.optionalEnd + 1;return newNode(NodeType.OptionalType,content,line,column);} /** + * Check if token is part of text inside parentheses, e.g. `(1)` + * @param {number} i Token's index number + * @return {number} + */function checkParentheses(i){if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;return tokens[i].right - i + 1;} /** + * Get node with text inside parentheses, e.g. `(1)` + * @return {Node} + */function getParentheses(){var type=NodeType.ParenthesesType;var token=tokens[pos];var line=token.ln;var column=token.col;pos++;var tsets=getTsets();var end=getLastPosition(tsets,line,column,1);pos++;return newNode(type,tsets,line,column,end);} /** + * Check if token is a parent selector, e.g. `&` + * @param {number} i Token's index number + * @return {number} + */function checkParentSelector(i){return i < tokensLength && tokens[i].type === TokenType.Ampersand?1:0;} /** + * Get node with a parent selector + * @return {Node} + */function getParentSelector(){var startPos=pos;var token=tokens[startPos];pos++;return newNode(NodeType.ParentSelectorType,'&',token.ln,token.col);} /** + * Check if token is a parent selector extension, e.g. `&--foo-bar` + * @param {number} i Token's index number + * @returns {number} Length of the parent selector extension + */function checkParentSelectorExtension(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;while(i < tokensLength) {if(l = checkNumber(i) || checkPartialIdent(i) || checkIdentOrInterpolation(i))i += l;else break;}return i - start;} /** + * Get parent selector extension node + * @return {Node} + */function getParentSelectorExtension(){var type=NodeType.ParentSelectorExtensionType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];while(pos < tokensLength) {if(checkNumber(pos)){content.push(getNumber());}else if(checkPartialIdent(pos)){content.push(getIdent());}else if(checkIdentOrInterpolation(pos)){content = content.concat(getIdentOrInterpolation());}else break;}return newNode(type,content,line,column);} /** + * Check if token is a parent selector with an extension or not + * @param {number} i Token's index number + * @return {number} Length of the parent selector and extension if applicable + */function checkParentSelectorWithExtension(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkParentSelector(i))i += l;else return 0;if(l = checkParentSelectorExtension(i))i += l;return i - start;} /** + * Get parent selector node and extension node if applicable + * @return {Array} + */function getParentSelectorWithExtension(){var content=[getParentSelector()];if(checkParentSelectorExtension(pos))content.push(getParentSelectorExtension());return content;} /** + * Check if token is part of a number or an interpolation with a percent sign + * (e.g. `10%`). + * @param {number} i Token's index number + * @return {number} + */function checkPercentage(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkNumberOrInterpolation(i))i += l;else return 0;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.PercentSign)return 0;return i - start + 1;} /** + * Get a percentage node that contains either a number or an interpolation + * @return {Object} The percentage node + */function getPercentage(){var startPos=pos;var token=tokens[startPos];var line=token.ln;var column=token.col;var content=getNumberOrInterpolation();var end=getLastPosition(content,line,column,1); // Skip % + pos++;return newNode(NodeType.PercentageType,content,token.ln,token.col,end);} /** + * Check if token is a number or an interpolation + * @param {number} i Token's index number + * @return {number} + */function checkNumberOrInterpolation(i){var start=i;var l=undefined;while(i < tokensLength) {if(l = checkInterpolation(i) || checkNumber(i))i += l;else break;}return i - start;} /** + * Get a number and/or interpolation node + * @return {Array} An array containing a single or multiple nodes + */function getNumberOrInterpolation(){var content=[];while(pos < tokensLength) {if(checkInterpolation(pos))content.push(getInterpolation());else if(checkNumber(pos))content.push(getNumber());else break;}return content;} /** + * Check if token is part of a placeholder selector (e.g. `%abc`). + * @param {number} i Token's index number + * @return {number} Length of the selector + */function checkPlaceholder(i){var l;if(i >= tokensLength)return 0;if(tokens[i].placeholder_l)return tokens[i].placeholder_l;if(tokens[i].type !== TokenType.PercentSign){return 0;}if(l = checkIdentOrInterpolation(i + 1)){tokens[i].placeholder_l = l + 1;return l + 1;}return 0;} /** + * Get node with a placeholder selector + * @return {Array} `['placeholder', ['ident', x]]` where x is a placeholder's + * identifier (without `%`, e.g. `abc`). + */function getPlaceholder(){var startPos=pos;pos++;var x=getIdentOrInterpolation();var token=tokens[startPos];return newNode(NodeType.PlaceholderType,x,token.ln,token.col);} /** + * @param {number} i Token's index number + * @return {number} + */function checkProgid(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(joinValues2(i,6) === 'progid:DXImageTransform.Microsoft.')i += 6;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(tokens[i].type === TokenType.LeftParenthesis){tokens[start].progid_end = tokens[i].right;i = tokens[i].right + 1;}else return 0;return i - start;} /** + * @return {Array} + */function getProgid(){var startPos=pos;var progid_end=tokens[pos].progid_end;var x=joinValues(pos,progid_end);pos = progid_end + 1;var token=tokens[startPos];return newNode(NodeType.ProgidType,x,token.ln,token.col);} /** + * Check if token is part of a property + * @param {number} i Token's index number + * @return {number} Length of the property + */function checkProperty(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkVariable(i) || checkIdentOrInterpolation(i))i += l;else return 0;return i - start;} /** + * Get node with a property + * @return {Array} `['property', x]` + */function getProperty(){var startPos=pos;var x=[];if(checkVariable(pos)){x.push(getVariable());}else {x = x.concat(getIdentOrInterpolation());}var token=tokens[startPos];return newNode(NodeType.PropertyType,x,token.ln,token.col);} /** + * Check if token is a colon + * @param {number} i Token's index number + * @return {number} `1` if token is a colon, otherwise `0` + */function checkPropertyDelim(i){return i < tokensLength && tokens[i].type === TokenType.Colon?1:0;} /** + * Get node with a colon + * @return {Array} `['propertyDelim']` + */function getPropertyDelim(){var startPos=pos++;var token=tokens[startPos];return newNode(NodeType.PropertyDelimType,':',token.ln,token.col);} /** + * @param {number} i Token's index number + * @return {number} + */function checkPseudo(i){return checkPseudoe(i) || checkPseudoc(i);} /** + * @return {Array} + */function getPseudo(){if(checkPseudoe(pos))return getPseudoe();if(checkPseudoc(pos))return getPseudoc();} /** + * @param {number} i Token's index number + * @return {number} + */function checkPseudoe(i){var l;if(i >= tokensLength || tokens[i++].type !== TokenType.Colon || i >= tokensLength || tokens[i++].type !== TokenType.Colon)return 0;return (l = checkIdentOrInterpolation(i))?l + 2:0;} /** + * @return {Array} + */function getPseudoe(){var startPos=pos;pos += 2;var x=getIdentOrInterpolation();var token=tokens[startPos];return newNode(NodeType.PseudoeType,x,token.ln,token.col);} /** + * @param {number} i Token's index number + * @return {number} + */function checkPseudoc(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.Colon)return 0;if(l = checkPseudoClass3(i))tokens[i].pseudoClassType = 3;else if(l = checkPseudoClass4(i))tokens[i].pseudoClassType = 4;else if(l = checkPseudoClass5(i))tokens[i].pseudoClassType = 5;else if(l = checkPseudoClass1(i))tokens[i].pseudoClassType = 1;else if(l = checkPseudoClass2(i))tokens[i].pseudoClassType = 2;else if(l = checkPseudoClass6(i))tokens[i].pseudoClassType = 6;else return 0;return l;} /** + * @return {Array} + */function getPseudoc(){var childType=tokens[pos].pseudoClassType;if(childType === 1)return getPseudoClass1();if(childType === 2)return getPseudoClass2();if(childType === 3)return getPseudoClass3();if(childType === 4)return getPseudoClass4();if(childType === 5)return getPseudoClass5();if(childType === 6)return getPseudoClass6();} /** + * (-) `:not(panda)` + */function checkPseudoClass1(i){var start=i; // Skip `:`. + i++;if(i >= tokensLength)return 0;var l=undefined;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. + i++;if(l = checkSelectorsGroup(i))i += l;else return 0;if(i !== right)return 0;return right - start + 1;} /** + * (-) `:not(panda)` + */function getPseudoClass1(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. + pos++;content = content.concat(getIdentOrInterpolation());{var _type=NodeType.ArgumentsType;var _token=tokens[pos];var _line=_token.ln;var _column=_token.col; // Skip `(`. + pos++;var selectors=getSelectorsGroup();var end=getLastPosition(selectors,_line,_column,1);var args=newNode(_type,selectors,_line,_column,end);content.push(args); // Skip `)`. + pos++;}return newNode(type,content,line,column);} /** + * (1) `:nth-child(odd)` + * (2) `:nth-child(even)` + * (3) `:lang(de-DE)` + */function checkPseudoClass2(i){var start=i;var l=0; // Skip `:`. + i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. + i++;if(l = checkSC(i))i += l;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass2(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. + pos++;content = content.concat(getIdentOrInterpolation());var l=tokens[pos].ln;var c=tokens[pos].col;var value=[]; // Skip `(`. + pos++;value = value.concat(getSC()).concat(getIdentOrInterpolation()).concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. + pos++;return newNode(type,content,line,column);} /** + * (-) `:nth-child(-3n + 2)` + */function checkPseudoClass3(i){var start=i;var l=0; // Skip `:`. + i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. + i++;if(l = checkSC(i))i += l;if(l = checkUnary(i))i += l;if(l = checkNumberOrInterpolation(i))i += l;if(i >= tokensLength)return 0;if(tokens[i].value === 'n')i++;else return 0;if(l = checkSC(i))i += l;if(i >= tokensLength)return 0;if(tokens[i].type === TokenType.PlusSign || tokens[i].type === TokenType.HyphenMinus)i++;else return 0;if(l = checkSC(i))i += l;if(l = checkNumberOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass3(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `:`. + pos++;var content=getIdentOrInterpolation();var l=tokens[pos].ln;var c=tokens[pos].col;var value=[]; // Skip `(`. + pos++;if(checkUnary(pos))value.push(getUnary());if(checkNumberOrInterpolation(pos))value = value.concat(getNumberOrInterpolation());{var _l=tokens[pos].ln;var _c=tokens[pos].col;var _content=tokens[pos].value;var ident=newNode(NodeType.IdentType,_content,_l,_c);value.push(ident);pos++;}value = value.concat(getSC());if(checkUnary(pos))value.push(getUnary());value = value.concat(getSC());if(checkNumberOrInterpolation(pos))value = value.concat(getNumberOrInterpolation());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. + pos++;return newNode(type,content,line,column);} /** + * (-) `:nth-child(-3n)` + */function checkPseudoClass4(i){var start=i;var l=0; // Skip `:`. + i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. + i++;if(l = checkSC(i))i += l;if(l = checkUnary(i))i += l;if(l = checkInterpolation(i))i += l;if(tokens[i].type === TokenType.DecimalNumber)i++;if(tokens[i].value === 'n')i++;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass4(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `:`. + pos++;var content=getIdentOrInterpolation();var l=tokens[pos].ln;var c=tokens[pos].col;var value=[]; // Skip `(`. + pos++;if(checkUnary(pos))value.push(getUnary());if(checkInterpolation(pos))value.push(getInterpolation());if(checkNumber(pos))value.push(getNumber());if(checkIdent(pos))value.push(getIdent());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. + pos++;return newNode(type,content,line,column);} /** + * (-) `:nth-child(+8)` + */function checkPseudoClass5(i){var start=i;var l=0; // Skip `:`. + i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. + i++;if(l = checkSC(i))i += l;if(l = checkUnary(i))i += l;if(tokens[i].type === TokenType.DecimalNumber)i++;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass5(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `:`. + pos++;var content=getIdentOrInterpolation();var l=tokens[pos].ln;var c=tokens[pos].col;var value=[]; // Skip `(`. + pos++;if(checkUnary(pos))value.push(getUnary());if(checkNumber(pos))value.push(getNumber());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. + pos++;return newNode(type,content,line,column);} /** + * (-) `:checked` + */function checkPseudoClass6(i){var start=i;var l=0; // Skip `:`. + i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;}function getPseudoClass6(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `:`. + pos++;var content=getIdentOrInterpolation();return newNode(type,content,line,column);} /** + * @param {number} i Token's index number + * @return {number} + */function checkRuleset(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkSelectorsGroup(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i)){i += l;}else if(l = checkSC(i)){i += l;if(l = checkBlock(i))i += l;else return 0;}else return 0;return i - start;}function getRuleset(){var type=NodeType.RulesetType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];content = content.concat(getSelectorsGroup());content = content.concat(getSC());if(checkBlock(pos)){content.push(getBlock());}else {content = content.concat(getSC(),getBlock());}return newNode(type,content,line,column);} /** + * Check if token is marked as a space (if it's a space or a tab + * or a line break). + * @param {number} i + * @return {number} Number of spaces in a row starting with the given token. + */function checkS(i){return i < tokensLength && tokens[i].ws?tokens[i].ws_last - i + 1:0;} /** + * Get node with spaces + * @return {Array} `['s', x]` where `x` is a string containing spaces + */function getS(){var startPos=pos;var x=joinValues(pos,tokens[pos].ws_last);pos = tokens[pos].ws_last + 1;var token=tokens[startPos];return newNode(NodeType.SType,x,token.ln,token.col);} /** + * Check if token is a space or a comment. + * @param {number} i Token's index number + * @return {number} Number of similar (space or comment) tokens + * in a row starting with the given token. + */function checkSC(i){if(!tokens[i])return 0;var l=undefined;var lsc=0;var ln=tokens[i].ln;while(i < tokensLength) {if(tokens[i].ln !== ln)break;if(!(l = checkS(i)) && !(l = checkCommentML(i)) && !(l = checkCommentSL(i)))break;i += l;lsc += l;if(tokens[i] && tokens[i].type === TokenType.Newline)break;}return lsc || 0;} /** + * Get node with spaces and comments + * @return {Array} Array containing nodes with spaces (if there are any) + * and nodes with comments (if there are any): + * `[['s', x]*, ['comment', y]*]` where `x` is a string of spaces + * and `y` is a comment's text (without `/*` and `* /`). + */function getSC(){var sc=[];var ln=undefined;if(pos >= tokensLength)return sc;ln = tokens[pos].ln;while(pos < tokensLength) {if(tokens[pos].ln !== ln)break;else if(checkS(pos))sc.push(getS());else if(checkCommentML(pos))sc.push(getCommentML());else if(checkCommentSL(pos))sc.push(getCommentSL());else break;if(tokens[pos] && tokens[pos].type === TokenType.Newline)break;}return sc;} /** + * Check if token is part of a hexadecimal number (e.g. `#fff`) inside + * a simple selector + * @param {number} i Token's index number + * @return {number} + */function checkShash(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.NumberSign)return 0;return (l = checkIdentOrInterpolation(i + 1))?l + 1:0;} /** + * Get node with a hexadecimal number (e.g. `#fff`) inside a simple + * selector + * @return {Array} `['shash', x]` where `x` is a hexadecimal number + * converted to string (without `#`, e.g. `fff`) + */function getShash(){var startPos=pos;var token=tokens[startPos];pos++;var x=getIdentOrInterpolation();return newNode(NodeType.ShashType,x,token.ln,token.col);} /** + * Check if token is part of a string (text wrapped in quotes) + * @param {number} i Token's index number + * @return {number} `1` if token is part of a string, `0` if not + */function checkString(i){if(i >= tokensLength){return 0;}if(tokens[i].type === TokenType.StringSQ || tokens[i].type === TokenType.StringDQ){return 1;}return 0;} /** + * Get string's node + * @return {Array} `['string', x]` where `x` is a string (including + * quotes). + */function getString(){var startPos=pos;var x=tokens[pos++].value;var token=tokens[startPos];return newNode(NodeType.StringType,x,token.ln,token.col);} /** + * Validate stylesheet: it should consist of any number (0 or more) of + * rulesets (sets of rules with selectors), @-rules, whitespaces or + * comments. + * @param {number} i Token's index number + * @return {number} + */function checkStylesheet(i){var start=i;var l=undefined;while(i < tokensLength) {if(l = checkSC(i) || checkDeclaration(i) || checkDeclDelim(i) || checkInclude(i) || checkExtend(i) || checkMixin(i) || checkLoop(i) || checkConditionalStatement(i) || checkAtrule(i) || checkRuleset(i))i += l;else throwError(i);}return i - start;} /** + * @return {Array} `['stylesheet', x]` where `x` is all stylesheet's + * nodes. + */function getStylesheet(){var startPos=pos;var x=[];var node;var wasDeclaration=false;while(pos < tokensLength) {if(wasDeclaration && checkDeclDelim(pos))node = getDeclDelim();else if(checkSC(pos))node = getSC();else if(checkRuleset(pos))node = getRuleset();else if(checkInclude(pos))node = getInclude();else if(checkExtend(pos))node = getExtend();else if(checkMixin(pos))node = getMixin();else if(checkLoop(pos))node = getLoop();else if(checkConditionalStatement(pos))node = getConditionalStatement();else if(checkAtrule(pos))node = getAtrule();else if(checkDeclaration(pos))node = getDeclaration();else throwError();wasDeclaration = node.type === NodeType.DeclarationType;if(Array.isArray(node))x = x.concat(node);else x.push(node);}var token=tokens[startPos];return newNode(NodeType.StylesheetType,x,token.ln,token.col);} /** + * @param {number} i Token's index number + * @return {number} + */function checkTset(i){return checkVhash(i) || checkOperator(i) || checkAny(i) || checkSC(i) || checkInterpolation(i);} /** + * @return {Array} + */function getTset(){if(checkVhash(pos))return getVhash();else if(checkOperator(pos))return getOperator();else if(checkAny(pos))return getAny();else if(checkSC(pos))return getSC();else if(checkInterpolation(pos))return getInterpolation();} /** + * @param {number} i Token's index number + * @return {number} + */function checkTsets(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;while(tokens[i - 1].type !== TokenType.Newline && (l = checkTset(i))) {i += l;}return i - start;} /** + * @return {Array} + */function getTsets(){var x=[];var t=undefined;while(tokens[pos - 1].type !== TokenType.Newline && (t = getTset())) {if(typeof t.content === 'string')x.push(t);else x = x.concat(t);}return x;} /** + * Check if token is an unary (arithmetical) sign (`+` or `-`) + * @param {number} i Token's index number + * @return {number} `1` if token is an unary sign, `0` if not + */function checkUnary(i){if(i >= tokensLength){return 0;}if(tokens[i].type === TokenType.HyphenMinus || tokens[i].type === TokenType.PlusSign){return 1;}return 0;} /** + * Get node with an unary (arithmetical) sign (`+` or `-`) + * @return {Array} `['unary', x]` where `x` is an unary sign + * converted to string. + */function getUnary(){var startPos=pos;var x=tokens[pos++].value;var token=tokens[startPos];return newNode(NodeType.OperatorType,x,token.ln,token.col);} /** + * Check if token is a unicode range (single or multiple nodes) + * @param {number} i Token's index + * @return {number} Unicode range node's length + */function checkUnicodeRange(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkUrange(i))i += l;else return 0;while(i < tokensLength) {var spaceBefore=checkSC(i);var comma=checkDelim(i + spaceBefore);if(!comma)break;var spaceAfter=checkSC(i + spaceBefore + comma);if(l = checkUrange(i + spaceBefore + comma + spaceAfter)){i += spaceBefore + comma + spaceAfter + l;}else break;}return i - start;} /** + * Get a unicode range node + * @return {Node} + */function getUnicodeRange(){var type=NodeType.UnicodeRangeType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];while(pos < tokensLength) {if(checkSC(pos))content = content.concat(getSC());else if(checkDelim(pos))content.push(getDelim());else if(checkUrange(pos))content.push(getUrange());else break;}return newNode(type,content,line,column);} /** + * Check if token is a u-range (part of a unicode-range) + * (1) `U+416` + * (2) `U+400-4ff` + * (3) `U+4??` + * @param {number} i Token's index + * @return {number} Urange node's length + */function checkUrange(i){var start=i;var l=undefined;if(i >= tokensLength)return 0; // Check for unicode prefix (u+ or U+) + if(tokens[i].value === 'U' || tokens[i].value === 'u')i += 1;else return 0;if(i >= tokensLength)return 0;if(tokens[i].value === '+')i += 1;else return 0;while(i < tokensLength) {if(l = checkIdent(i))i += l;else if(l = checkNumber(i))i += l;else if(l = checkUnary(i))i += l;else if(l = _checkUnicodeWildcard(i))i += l;else break;}tokens[start].urangeEnd = i - 1;return i - start;} /** + * Get a u-range node (part of a unicode-range) + * @return {Node} + */function getUrange(){var startPos=pos;var type=NodeType.UrangeType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];content = joinValues(startPos,tokens[startPos].urangeEnd);pos = tokens[startPos].urangeEnd + 1;return newNode(type,content,line,column);} /** + * Check for unicode wildcard characters `?` + * @param {number} i Token's index + * @return {number} Wildcard length + */function _checkUnicodeWildcard(i){var start=i;if(i >= tokensLength)return 0;while(i < tokensLength) {if(tokens[i].type === TokenType.QuestionMark)i += 1;else break;}return i - start;} /** + * Check if token is part of URI (e.g. `url('/css/styles.css')`) + * @param {number} i Token's index number + * @return {number} Length of URI + */function checkUri(i){var start=i;if(i >= tokensLength || tokens[i++].value !== 'url' || i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;return tokens[i].right - start + 1;} /** + * Get node with URI + * @return {Array} `['uri', x]` where `x` is URI's nodes (without `url` + * and braces, e.g. `['string', ''/css/styles.css'']`). + */function getUri(){var startPos=pos;var uriExcluding={};var uri=undefined;var token=undefined;var l=undefined;var raw=undefined;pos += 2;uriExcluding[TokenType.Space] = 1;uriExcluding[TokenType.Tab] = 1;uriExcluding[TokenType.Newline] = 1;uriExcluding[TokenType.LeftParenthesis] = 1;uriExcluding[TokenType.RightParenthesis] = 1;if(checkUriContent(pos)){uri = [].concat(getSC()).concat(getUriContent()).concat(getSC());}else {uri = [].concat(getSC());l = checkExcluding(uriExcluding,pos);token = tokens[pos];raw = newNode(NodeType.RawType,joinValues(pos,pos + l),token.ln,token.col);uri.push(raw);pos += l + 1;uri = uri.concat(getSC());}token = tokens[startPos];var line=token.ln;var column=token.col;var end=getLastPosition(uri,line,column,1);pos++;return newNode(NodeType.UriType,uri,token.ln,token.col,end);} /** + * @param {number} i Token's index number + * @return {number} + */function checkUriContent(i){return checkUri1(i) || checkFunction(i);} /** + * @return {Array} + */function getUriContent(){if(checkUri1(pos))return getString();else if(checkFunction(pos))return getFunction();} /** + * @param {number} i Token's index number + * @return {number} + */function checkUri1(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkSC(i))i += l;if(tokens[i].type !== TokenType.StringDQ && tokens[i].type !== TokenType.StringSQ)return 0;i++;if(l = checkSC(i))i += l;return i - start;} /** + * Check if token is part of a value + * @param {number} i Token's index number + * @return {number} Length of the value + */function checkValue(i){var start=i;var l=undefined;var s=undefined;var _i=undefined;while(i < tokensLength) {if(checkDeclDelim(i))break;if(l = checkBlock(i)){i += l;break;}s = checkS(i);_i = i + s;if(l = _checkValue(_i))i += l + s;if(!l || checkBlock(i - l))break;}return i - start;} /** + * @param {number} i Token's index number + * @return {number} + */function _checkValue(i){return checkVhash(i) || checkOperator(i) || checkImportant(i) || checkGlobal(i) || checkDefault(i) || checkProgid(i) || checkAny(i) || checkInterpolation(i) || checkParentSelector(i);} /** + * @return {Array} + */function getValue(){var startPos=pos;var x=[];var _pos=undefined;var s=undefined;while(pos < tokensLength) {if(checkDeclDelim(pos))break;s = checkS(pos);_pos = pos + s;if(checkDeclDelim(_pos))break;if(checkBlock(pos)){x.push(getBlock());break;}if(!_checkValue(_pos))break;if(s)x.push(getS());x.push(_getValue());if(checkBlock(_pos))break;}var token=tokens[startPos];return newNode(NodeType.ValueType,x,token.ln,token.col);} /** + * @return {Array} + */function _getValue(){if(checkVhash(pos))return getVhash();if(checkOperator(pos))return getOperator();if(checkImportant(pos))return getImportant();if(checkGlobal(pos))return getGlobal();if(checkDefault(pos))return getDefault();if(checkProgid(pos))return getProgid();if(checkAny(pos))return getAny();if(checkInterpolation(pos))return getInterpolation();if(checkParentSelector(pos))return getParentSelector();} /** + * Check if token is part of a variable + * @param {number} i Token's index number + * @return {number} Length of the variable + */function checkVariable(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.DollarSign)return 0;return (l = checkIdent(i + 1))?l + 1:0;} /** + * Get node with a variable + * @return {Array} `['variable', ['ident', x]]` where `x` is + * a variable name. + */function getVariable(){var startPos=pos;var x=[];pos++;x.push(getIdent());var token=tokens[startPos];return newNode(NodeType.VariableType,x,token.ln,token.col);} /** + * Check if token is part of a variables list (e.g. `$values...`). + * @param {number} i Token's index number + * @return {number} + */function checkVariablesList(i){var d=0; // Number of dots + var l=undefined;if(i >= tokensLength)return 0;if(l = checkVariable(i))i += l;else return 0;while(i < tokensLength && tokens[i].type === TokenType.FullStop) {d++;i++;}return d === 3?l + d:0;} /** + * Get node with a variables list + * @return {Array} `['variableslist', ['variable', ['ident', x]]]` where + * `x` is a variable name. + */function getVariablesList(){var startPos=pos;var x=[getVariable()];var token=tokens[startPos];var line=token.ln;var column=token.col;var end=getLastPosition(x,line,column,3);pos += 3;return newNode(NodeType.VariablesListType,x,token.ln,token.col,end);} /** + * Check if token is part of a hexadecimal number (e.g. `#fff`) inside + * some value + * @param {number} i Token's index number + * @return {number} + */function checkVhash(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.NumberSign)return 0;return (l = checkNmName2(i + 1))?l + 1:0;} /** + * Get node with a hexadecimal number (e.g. `#fff`) inside some value + * @return {Array} `['vhash', x]` where `x` is a hexadecimal number + * converted to string (without `#`, e.g. `'fff'`). + */function getVhash(){var startPos=pos;var x=undefined;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;x = getNmName2();var end=getLastPosition(x,line,column + 1);return newNode(NodeType.VhashType,x,token.ln,token.col,end);}module.exports = function(_tokens,context){tokens = _tokens;tokensLength = tokens.length;pos = 0;return contexts[context]();};function checkSelectorsGroup(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkSelector(i))i += l;else return 0;while(i < tokensLength) {var sb=checkSC(i);var c=checkDelim(i + sb);if(!c)break;var sa=checkSC(i + sb + c);var saa=sa?checkSC(i + sb + c + sa):0;if(l = checkSelector(i + sb + c + sa + saa))i += sb + c + sa + saa + l;else break;}tokens[start].selectorsGroupEnd = i;return i - start;}function getSelectorsGroup(){var selectorsGroup=[];var selectorsGroupEnd=tokens[pos].selectorsGroupEnd;selectorsGroup.push(getSelector());while(pos < selectorsGroupEnd) {selectorsGroup = selectorsGroup.concat(getSC());selectorsGroup.push(getDelim());selectorsGroup = selectorsGroup.concat(getSC());selectorsGroup = selectorsGroup.concat(getSC());selectorsGroup.push(getSelector());}return selectorsGroup;}function checkSelector(i){var l;if(l = checkSelector1(i))tokens[i].selectorType = 1;else if(l = checkSelector2(i))tokens[i].selectorType = 2;return l;}function getSelector(){var selectorType=tokens[pos].selectorType;if(selectorType === 1)return getSelector1();else return getSelector2();} /** + * Checks for selector which starts with a compound selector. + */function checkSelector1(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkCompoundSelector(i))i += l;else return 0;while(i < tokensLength) {var s=checkSC(i);var c=checkCombinator(i + s);if(!s && !c)break;if(c){i += s + c;s = checkSC(i);}if(l = checkCompoundSelector(i + s))i += s + l;else break;}tokens[start].selectorEnd = i;return i - start;}function getSelector1(){var type=NodeType.SelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var selectorEnd=token.selectorEnd;var content=getCompoundSelector();while(pos < selectorEnd) {if(checkSC(pos))content = content.concat(getSC());else if(checkCombinator(pos))content.push(getCombinator());else if(checkCompoundSelector(pos))content = content.concat(getCompoundSelector());}return newNode(type,content,line,column);} /** + * Checks for a selector that starts with a combinator. + */function checkSelector2(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkCombinator(i))i += l;else return 0;while(i < tokensLength) {var sb=checkSC(i);if(l = checkCompoundSelector(i + sb))i += sb + l;else break;var sa=checkSC(i);var c=checkCombinator(i + sa);if(!sa && !c)break;if(c){i += sa + c;}}tokens[start].selectorEnd = i;return i - start;}function getSelector2(){var type=NodeType.SelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var selectorEnd=token.selectorEnd;var content=[getCombinator()];while(pos < selectorEnd) {if(checkSC(pos))content = content.concat(getSC());else if(checkCombinator(pos))content.push(getCombinator());else if(checkCompoundSelector(pos))content = content.concat(getCompoundSelector());}return newNode(type,content,line,column);}function checkCompoundSelector(i){var l=undefined;if(l = checkCompoundSelector1(i)){tokens[i].compoundSelectorType = 1;}else if(l = checkCompoundSelector2(i)){tokens[i].compoundSelectorType = 2;}return l;}function getCompoundSelector(){var type=tokens[pos].compoundSelectorType;if(type === 1)return getCompoundSelector1();if(type === 2)return getCompoundSelector2();} /** + * Check for compound selectors that start with either a type selector, + * placeholder or parent selector with extension + * (1) `foo.bar` + * (2) `foo[attr=val]` + * (3) `foo:first-of-type` + * (4) `foo%bar` + * @param {number} i Token's index + * @return {number} Compound selector's length + */function checkCompoundSelector1(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkTypeSelector(i) || checkPlaceholder(i) || checkParentSelectorWithExtension(i))i += l;else return 0;while(i < tokensLength) {var _l2=checkShash(i) || checkClass(i) || checkAttributeSelector(i) || checkPseudo(i) || checkPlaceholder(i);if(_l2)i += _l2;else break;}tokens[start].compoundSelectorEnd = i;return i - start;} /** + * @return {Array} An array of nodes that make up the compound selector + */function getCompoundSelector1(){var sequence=[];var compoundSelectorEnd=tokens[pos].compoundSelectorEnd;if(checkTypeSelector(pos))sequence.push(getTypeSelector());else if(checkPlaceholder(pos))sequence.push(getPlaceholder());else if(checkParentSelectorWithExtension(pos))sequence = sequence.concat(getParentSelectorWithExtension());while(pos < compoundSelectorEnd) {if(checkShash(pos))sequence.push(getShash());else if(checkClass(pos))sequence.push(getClass());else if(checkAttributeSelector(pos))sequence.push(getAttributeSelector());else if(checkPseudo(pos))sequence.push(getPseudo());else if(checkPlaceholder(pos))sequence.push(getPlaceholder());else break;}return sequence;} /** + * Check for all other compound selectors + * (1) `.foo.bar` + * (2) `.foo[attr=val]` + * (3) `.foo:first-of-type` + * (4) `.foo%bar` + * (5) `.foo#{$bar}` + * @param {number} i Token's index + * @return {number} Compound selector's length + */function checkCompoundSelector2(i){if(i >= tokensLength)return 0;var start=i;while(i < tokensLength) {var l=checkShash(i) || checkClass(i) || checkAttributeSelector(i) || checkPseudo(i) || checkPlaceholder(i) || checkInterpolation(i);if(l)i += l;else break;}tokens[start].compoundSelectorEnd = i;return i - start;} /** + * @return {Array} An array of nodes that make up the compound selector + */function getCompoundSelector2(){var sequence=[];var compoundSelectorEnd=tokens[pos].compoundSelectorEnd;while(pos < compoundSelectorEnd) {if(checkShash(pos))sequence.push(getShash());else if(checkClass(pos))sequence.push(getClass());else if(checkAttributeSelector(pos))sequence.push(getAttributeSelector());else if(checkPseudo(pos))sequence.push(getPseudo());else if(checkPlaceholder(pos))sequence.push(getPlaceholder());else if(checkInterpolation(pos))sequence.push(getInterpolation());else break;}return sequence;}function checkTypeSelector(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkNamePrefix(i))i += l;if(tokens[i].type === TokenType.Asterisk)i++;else if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;}function getTypeSelector(){var type=NodeType.TypeSelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkNamePrefix(pos))content.push(getNamePrefix());token = tokens[pos];if(token.type === TokenType.Asterisk){var asteriskNode=newNode(NodeType.IdentType,'*',token.ln,token.col);content.push(asteriskNode);pos++;}else if(checkIdentOrInterpolation(pos))content = content.concat(getIdentOrInterpolation());return newNode(type,content,line,column);}function checkAttributeSelector(i){var l=undefined;if(l = checkAttributeSelector1(i))tokens[i].attributeSelectorType = 1;else if(l = checkAttributeSelector2(i))tokens[i].attributeSelectorType = 2;return l;}function getAttributeSelector(){var type=tokens[pos].attributeSelectorType;if(type === 1)return getAttributeSelector1();else return getAttributeSelector2();} /** + * (1) `[panda=nani]` + * (2) `[panda='nani']` + * (3) `[panda='nani' i]` + * + */function checkAttributeSelector1(i){var start=i;if(tokens[i].type === TokenType.LeftSquareBracket)i++;else return 0;var l=undefined;if(l = checkSC(i))i += l;if(l = checkAttributeName(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkAttributeMatch(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkAttributeValue(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkAttributeFlags(i)){i += l;if(l = checkSC(i))i += l;}if(tokens[i].type === TokenType.RightSquareBracket)i++;else return 0;return i - start;}function getAttributeSelector1(){var type=NodeType.AttributeSelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `[`. + pos++;content = content.concat(getSC());content.push(getAttributeName());content = content.concat(getSC());content.push(getAttributeMatch());content = content.concat(getSC());content.push(getAttributeValue());content = content.concat(getSC());if(checkAttributeFlags(pos)){content.push(getAttributeFlags());content = content.concat(getSC());} // Skip `]`. + pos++;var end=getLastPosition(content,line,column,1);return newNode(type,content,line,column,end);} /** + * (1) `[panda]` + */function checkAttributeSelector2(i){var start=i;if(tokens[i].type === TokenType.LeftSquareBracket)i++;else return 0;var l=undefined;if(l = checkSC(i))i += l;if(l = checkAttributeName(i))i += l;else return 0;if(l = checkSC(i))i += l;if(tokens[i].type === TokenType.RightSquareBracket)i++;else return 0;return i - start;}function getAttributeSelector2(){var type=NodeType.AttributeSelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `[`. + pos++;content = content.concat(getSC());content.push(getAttributeName());content = content.concat(getSC()); // Skip `]`. + pos++;var end=getLastPosition(content,line,column,1);return newNode(type,content,line,column,end);}function checkAttributeName(i){var start=i;var l=undefined;if(l = checkNamePrefix(i))i += l;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;}function getAttributeName(){var type=NodeType.AttributeNameType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkNamePrefix(pos))content.push(getNamePrefix());content = content.concat(getIdentOrInterpolation());return newNode(type,content,line,column);}function checkAttributeMatch(i){var l=undefined;if(l = checkAttributeMatch1(i))tokens[i].attributeMatchType = 1;else if(l = checkAttributeMatch2(i))tokens[i].attributeMatchType = 2;return l;}function getAttributeMatch(){var type=tokens[pos].attributeMatchType;if(type === 1)return getAttributeMatch1();else return getAttributeMatch2();}function checkAttributeMatch1(i){var start=i;var type=tokens[i].type;if(type === TokenType.Tilde || type === TokenType.VerticalLine || type === TokenType.CircumflexAccent || type === TokenType.DollarSign || type === TokenType.Asterisk)i++;else return 0;if(tokens[i].type === TokenType.EqualsSign)i++;else return 0;return i - start;}function getAttributeMatch1(){var type=NodeType.AttributeMatchType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=tokens[pos].value + tokens[pos + 1].value;pos += 2;return newNode(type,content,line,column);}function checkAttributeMatch2(i){if(tokens[i].type === TokenType.EqualsSign)return 1;else return 0;}function getAttributeMatch2(){var type=NodeType.AttributeMatchType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='=';pos++;return newNode(type,content,line,column);}function checkAttributeValue(i){return checkString(i) || checkIdentOrInterpolation(i);}function getAttributeValue(){var type=NodeType.AttributeValueType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkString(pos))content.push(getString());else content = content.concat(getIdentOrInterpolation());return newNode(type,content,line,column);}function checkAttributeFlags(i){return checkIdentOrInterpolation(i);}function getAttributeFlags(){var type=NodeType.AttributeFlagsType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=getIdentOrInterpolation();return newNode(type,content,line,column);}function checkNamePrefix(i){if(i >= tokensLength)return 0;var l=undefined;if(l = checkNamePrefix1(i))tokens[i].namePrefixType = 1;else if(l = checkNamePrefix2(i))tokens[i].namePrefixType = 2;return l;}function getNamePrefix(){var type=tokens[pos].namePrefixType;if(type === 1)return getNamePrefix1();else return getNamePrefix2();} /** + * (1) `panda|` + * (2) `panda|` + */function checkNamePrefix1(i){var start=i;var l=undefined;if(l = checkNamespacePrefix(i))i += l;else return 0;if(l = checkCommentML(i))i += l;if(l = checkNamespaceSeparator(i))i += l;else return 0;return i - start;}function getNamePrefix1(){var type=NodeType.NamePrefixType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];content.push(getNamespacePrefix());if(checkCommentML(pos))content.push(getCommentML());content.push(getNamespaceSeparator());return newNode(type,content,line,column);} /** + * (1) `|` + */function checkNamePrefix2(i){return checkNamespaceSeparator(i);}function getNamePrefix2(){var type=NodeType.NamePrefixType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[getNamespaceSeparator()];return newNode(type,content,line,column);} /** + * (1) `*` + * (2) `panda` + */function checkNamespacePrefix(i){if(i >= tokensLength)return 0;var l=undefined;if(tokens[i].type === TokenType.Asterisk)return 1;else if(l = checkIdentOrInterpolation(i))return l;else return 0;}function getNamespacePrefix(){var type=NodeType.NamespacePrefixType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(token.type === TokenType.Asterisk){var asteriskNode=newNode(NodeType.IdentType,'*',token.ln,token.col);content.push(asteriskNode);pos++;}else if(checkIdentOrInterpolation(pos))content = content.concat(getIdentOrInterpolation());return newNode(type,content,line,column);} /** + * (1) `|` + */function checkNamespaceSeparator(i){if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.VerticalLine)return 0; // Return false if `|=` - [attr|=value] + if(tokens[i + 1] && tokens[i + 1].type === TokenType.EqualsSign)return 0;return 1;}function getNamespaceSeparator(){var type=NodeType.NamespaceSeparatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='|';pos++;return newNode(type,content,line,column);} + +/***/ }, +/* 24 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + module.exports = function (css, tabSize) { + var TokenType = __webpack_require__(13); + + var tokens = []; + var urlMode = false; + var c = undefined; // Current character + var cn = undefined; // Next character + var pos = 0; + var tn = 0; + var ln = 1; + var col = 1; + + var Punctuation = { + ' ': TokenType.Space, + '\n': TokenType.Newline, + '\r': TokenType.Newline, + '\t': TokenType.Tab, + '!': TokenType.ExclamationMark, + '"': TokenType.QuotationMark, + '#': TokenType.NumberSign, + '$': TokenType.DollarSign, + '%': TokenType.PercentSign, + '&': TokenType.Ampersand, + '\'': TokenType.Apostrophe, + '(': TokenType.LeftParenthesis, + ')': TokenType.RightParenthesis, + '*': TokenType.Asterisk, + '+': TokenType.PlusSign, + ',': TokenType.Comma, + '-': TokenType.HyphenMinus, + '.': TokenType.FullStop, + '/': TokenType.Solidus, + ':': TokenType.Colon, + ';': TokenType.Semicolon, + '<': TokenType.LessThanSign, + '=': TokenType.EqualsSign, + '==': TokenType.EqualitySign, + '!=': TokenType.InequalitySign, + '>': TokenType.GreaterThanSign, + '?': TokenType.QuestionMark, + '@': TokenType.CommercialAt, + '[': TokenType.LeftSquareBracket, + ']': TokenType.RightSquareBracket, + '^': TokenType.CircumflexAccent, + '_': TokenType.LowLine, + '{': TokenType.LeftCurlyBracket, + '|': TokenType.VerticalLine, + '}': TokenType.RightCurlyBracket, + '~': TokenType.Tilde + }; + + /** + * Add a token to the token list + * @param {string} type + * @param {string} value + */ + function pushToken(type, value, column) { + tokens.push({ + tn: tn++, + ln: ln, + col: column, + type: type, + value: value + }); + } + + /** + * Check if a character is a decimal digit + * @param {string} c Character + * @returns {boolean} + */ + function isDecimalDigit(c) { + return '0123456789'.indexOf(c) >= 0; + } + + /** + * Parse spaces + * @param {string} css Unparsed part of CSS string + */ + function parseSpaces(css) { + var start = pos; + + // Read the string until we meet a non-space character: + for (; pos < css.length; pos++) { + if (css.charAt(pos) !== ' ') break; + } + + // Add a substring containing only spaces to tokens: + pushToken(TokenType.Space, css.substring(start, pos--), col); + col += pos - start; + } + + /** + * Parse a string within quotes + * @param {string} css Unparsed part of CSS string + * @param {string} q Quote (either `'` or `"`) + */ + function parseString(css, q) { + var start = pos; + + // Read the string until we meet a matching quote: + for (pos++; pos < css.length; pos++) { + // Skip escaped quotes: + if (css.charAt(pos) === '\\') pos++;else if (css.charAt(pos) === q) break; + } + + // Add the string (including quotes) to tokens: + var type = q === '"' ? TokenType.StringDQ : TokenType.StringSQ; + pushToken(type, css.substring(start, pos + 1), col); + col += pos - start; + } + + /** + * Parse numbers + * @param {string} css Unparsed part of CSS string + */ + function parseDecimalNumber(css) { + var start = pos; + + // Read the string until we meet a character that's not a digit: + for (; pos < css.length; pos++) { + if (!isDecimalDigit(css.charAt(pos))) break; + } + + // Add the number to tokens: + pushToken(TokenType.DecimalNumber, css.substring(start, pos--), col); + col += pos - start; + } + + /** + * Parse identifier + * @param {string} css Unparsed part of CSS string + */ + function parseIdentifier(css) { + var start = pos; + + // Skip all opening slashes: + while (css.charAt(pos) === '/') pos++; + + // Read the string until we meet a punctuation mark: + for (; pos < css.length; pos++) { + // Skip all '\': + if (css.charAt(pos) === '\\') pos++;else if (css.charAt(pos) in Punctuation) break; + } + + var ident = css.substring(start, pos--); + + // Enter url mode if parsed substring is `url`: + if (!urlMode && ident === 'url' && css.charAt(pos + 1) === '(') { + urlMode = true; + } + + // Add identifier to tokens: + pushToken(TokenType.Identifier, ident, col); + col += pos - start; + } + + /** + * Parse equality sign + */ + function parseEquality() { + pushToken(TokenType.EqualitySign, '==', col); + pos++; + col++; + } + + /** + * Parse inequality sign + */ + function parseInequality() { + pushToken(TokenType.InequalitySign, '!=', col); + pos++; + col++; + } + + /** + * Parse a multiline comment + * @param {string} css Unparsed part of CSS string + */ + function parseMLComment(css) { + var start = pos; + var col_ = col; + + // Get current indent level: + var il = 0; + for (var _pos = pos - 1; _pos > -1; _pos--) { + // TODO: Can be tabs: + if (css.charAt(_pos) === ' ') il++;else break; + } + + for (pos += 2; pos < css.length; pos++) { + if (css.charAt(pos) === '\n') { + var _pos = undefined; + // Get new line's indent level: + var _il = 0; + for (_pos = pos + 1; _pos < css.length; _pos++) { + if (css.charAt(_pos) === ' ') _il++;else break; + } + + if (_il > il) { + col = 0; + pos += _pos - pos; + } else { + pos--; + break; + } + } + } + + // If CRLF is used, we need to adjust pos + if (css.charAt(pos) === '\r') pos--; + + // Add full comment (including `/*`) to the list of tokens: + var comment = css.substring(start, pos + 1); + pushToken(TokenType.CommentML, comment, col_); + + var newlines = comment.split('\n'); + if (newlines.length > 1) { + ln += newlines.length - 1; + col = newlines[newlines.length - 1].length; + } else { + col += pos - start; + } + } + + /** + * Parse a single line comment + * @param {string} css Unparsed part of CSS string + */ + function parseSLComment(css) { + var start = pos; + var col_ = col; + var _pos; + + // Check if comment is the only token on the line, and if so, + // get current indent level: + var il = 0; + var onlyToken = false; + for (_pos = pos - 1; _pos > -1; _pos--) { + // TODO: Can be tabs: + if (css.charAt(_pos) === ' ') il++;else if (css.charAt(_pos) === '\n') { + onlyToken = true; + break; + } else break; + } + if (_pos === -1) onlyToken = true; + + // Read the string until we meet comment end. + // Since we already know first 2 characters (`//`), start reading + // from `pos + 2`: + if (!onlyToken) { + for (pos += 2; pos < css.length; pos++) { + if (css.charAt(pos) === '\n' || css.charAt(pos) === '\r') { + break; + } + } + } else { + for (pos += 2; pos < css.length; pos++) { + if (css.charAt(pos) === '\n') { + // Get new line's indent level: + var _il = 0; + for (_pos = pos + 1; _pos < css.length; _pos++) { + if (css.charAt(_pos) === ' ') _il++;else break; + } + + if (_il > il) { + col = 0; + pos += _pos - pos; + } else { + break; + } + } + } + } + + // If CRLF is used, we need to adjust pos + if (css.charAt(pos - 1) === '\r') pos--; + + // Add comment (including `//` and line break) to the list of tokens: + var comment = css.substring(start, pos--); + pushToken(TokenType.CommentSL, comment, col_); + + var newlines = comment.split('\n'); + if (newlines.length > 1) { + ln += newlines.length - 1; + col = newlines[newlines.length - 1].length; + } else { + col += pos - start; + } + } + + /** + * Convert a CSS string to a list of tokens + * @param {string} css CSS string + * @returns {Array} List of tokens + * @private + */ + function getTokens(css) { + // Parse string, character by character: + for (pos = 0; pos < css.length; col++, pos++) { + c = css.charAt(pos); + cn = css.charAt(pos + 1); + + // If we meet `/*`, it's a start of a multiline comment. + // Parse following characters as a multiline comment: + if (c === '/' && cn === '*') { + parseMLComment(css); + } + + // If we meet `//` and it is not a part of url: + else if (!urlMode && c === '/' && cn === '/') { + // If we're currently inside a block, treat `//` as a start + // of identifier. Else treat `//` as a start of a single-line + // comment: + parseSLComment(css); + } + + // If current character is a double or single quote, it's a start + // of a string: + else if (c === '"' || c === "'") { + parseString(css, c); + } + + // If current character is a space: + else if (c === ' ') { + parseSpaces(css); + } + + // If current character is `=`, it must be combined with next `=` + else if (c === '=' && cn === '=') { + parseEquality(css); + } + + // If we meet `!=`, this must be inequality + else if (c === '!' && cn === '=') { + parseInequality(css); + } + + // If current character is a punctuation mark: + else if (c in Punctuation) { + // Check for CRLF here or just LF + if (c === '\r' && cn === '\n' || c === '\n') { + // If \r we know the next character is \n due to statement above + // so we push a CRLF token type to the token list and importantly + // skip the next character so as not to double count newlines or + // columns etc + if (c === '\r') { + pushToken(TokenType.Newline, '\r\n', col); + pos++; // If CRLF skip the next character and push crlf token + } else if (c === '\n') { + // If just a LF newline and not part of CRLF newline we can just + // push punctuation as usual + pushToken(Punctuation[c], c, col); + } + + ln++; // Go to next line + col = 0; // Reset the column count + } else if (c !== '\r' && c !== '\n') { + // Handle all other punctuation and add to list of tokens + pushToken(Punctuation[c], c, col); + } // Go to next line + if (c === ')') urlMode = false; // Exit url mode + else if (c === '\t' && tabSize > 1) col += tabSize - 1; + } + + // If current character is a decimal digit: + else if (isDecimalDigit(c)) { + parseDecimalNumber(css); + } + + // If current character is anything else: + else { + parseIdentifier(css); + } + } + + return tokens; + } + + return getTokens(css); + }; + +/***/ }, +/* 25 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + exports['default'] = { + mark: __webpack_require__(26), + parse: __webpack_require__(27), + stringify: __webpack_require__(6), + tokenizer: __webpack_require__(28) + }; + module.exports = exports['default']; + +/***/ }, +/* 26 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var TokenType = __webpack_require__(13); + + module.exports = (function () { + /** + * Mark whitespaces and comments + */ + function markSC(tokens) { + var tokensLength = tokens.length; + var ws = -1; // Flag for whitespaces + var sc = -1; // Flag for whitespaces and comments + var t = undefined; // Current token + + // For every token in the token list, mark spaces and line breaks + // as spaces (set both `ws` and `sc` flags). Mark multiline comments + // with `sc` flag. + // If there are several spaces or tabs or line breaks or multiline + // comments in a row, group them: take the last one's index number + // and save it to the first token in the group as a reference: + // e.g., `ws_last = 7` for a group of whitespaces or `sc_last = 9` + // for a group of whitespaces and comments. + for (var i = 0; i < tokensLength; i++) { + t = tokens[i]; + switch (t.type) { + case TokenType.Space: + case TokenType.Tab: + case TokenType.Newline: + t.ws = true; + t.sc = true; + + if (ws === -1) ws = i; + if (sc === -1) sc = i; + + break; + case TokenType.CommentML: + case TokenType.CommentSL: + if (ws !== -1) { + tokens[ws].ws_last = i - 1; + ws = -1; + } + + t.sc = true; + + break; + default: + if (ws !== -1) { + tokens[ws].ws_last = i - 1; + ws = -1; + } + + if (sc !== -1) { + tokens[sc].sc_last = i - 1; + sc = -1; + } + } + } + + if (ws !== -1) tokens[ws].ws_last = i - 1; + if (sc !== -1) tokens[sc].sc_last = i - 1; + } + + /** + * Pair brackets + */ + function markBrackets(tokens) { + var tokensLength = tokens.length; + var ps = []; // Parentheses + var sbs = []; // Square brackets + var cbs = []; // Curly brackets + var t = undefined; // Current token + + // For every token in the token list, if we meet an opening (left) + // bracket, push its index number to a corresponding array. + // If we then meet a closing (right) bracket, look at the corresponding + // array. If there are any elements (records about previously met + // left brackets), take a token of the last left bracket (take + // the last index number from the array and find a token with + // this index number) and save right bracket's index as a reference: + for (var i = 0; i < tokensLength; i++) { + t = tokens[i]; + switch (t.type) { + case TokenType.LeftParenthesis: + ps.push(i); + break; + case TokenType.RightParenthesis: + if (ps.length) { + t.left = ps.pop(); + tokens[t.left].right = i; + } + break; + case TokenType.LeftSquareBracket: + sbs.push(i); + break; + case TokenType.RightSquareBracket: + if (sbs.length) { + t.left = sbs.pop(); + tokens[t.left].right = i; + } + break; + case TokenType.LeftCurlyBracket: + cbs.push(i); + break; + case TokenType.RightCurlyBracket: + if (cbs.length) { + t.left = cbs.pop(); + tokens[t.left].right = i; + } + break; + } + } + } + + return function (tokens) { + markBrackets(tokens); + markSC(tokens); + }; + })(); + +/***/ }, +/* 27 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict';var Node=__webpack_require__(1);var NodeType=__webpack_require__(15);var TokenType=__webpack_require__(13);var tokens=undefined;var tokensLength=undefined;var pos=undefined;var contexts={'arguments':function(){return checkArguments(pos) && getArguments();},'atkeyword':function(){return checkAtkeyword(pos) && getAtkeyword();},'atrule':function(){return checkAtrule(pos) && getAtrule();},'block':function(){return checkBlock(pos) && getBlock();},'brackets':function(){return checkBrackets(pos) && getBrackets();},'class':function(){return checkClass(pos) && getClass();},'combinator':function(){return checkCombinator(pos) && getCombinator();},'commentML':function(){return checkCommentML(pos) && getCommentML();},'commentSL':function(){return checkCommentSL(pos) && getCommentSL();},'condition':function(){return checkCondition(pos) && getCondition();},'conditionalStatement':function(){return checkConditionalStatement(pos) && getConditionalStatement();},'declaration':function(){return checkDeclaration(pos) && getDeclaration();},'declDelim':function(){return checkDeclDelim(pos) && getDeclDelim();},'default':function(){return checkDefault(pos) && getDefault();},'delim':function(){return checkDelim(pos) && getDelim();},'dimension':function(){return checkDimension(pos) && getDimension();},'expression':function(){return checkExpression(pos) && getExpression();},'extend':function(){return checkExtend(pos) && getExtend();},'function':function(){return checkFunction(pos) && getFunction();},'global':function(){return checkGlobal(pos) && getGlobal();},'ident':function(){return checkIdent(pos) && getIdent();},'important':function(){return checkImportant(pos) && getImportant();},'include':function(){return checkInclude(pos) && getInclude();},'interpolation':function(){return checkInterpolation(pos) && getInterpolation();},'loop':function(){return checkLoop(pos) && getLoop();},'mixin':function(){return checkMixin(pos) && getMixin();},'namespace':function(){return checkNamespace(pos) && getNamespace();},'number':function(){return checkNumber(pos) && getNumber();},'operator':function(){return checkOperator(pos) && getOperator();},'optional':function(){return checkOptional(pos) && getOptional();},'parentheses':function(){return checkParentheses(pos) && getParentheses();},'parentselector':function(){return checkParentSelector(pos) && getParentSelector();},'percentage':function(){return checkPercentage(pos) && getPercentage();},'placeholder':function(){return checkPlaceholder(pos) && getPlaceholder();},'progid':function(){return checkProgid(pos) && getProgid();},'property':function(){return checkProperty(pos) && getProperty();},'propertyDelim':function(){return checkPropertyDelim(pos) && getPropertyDelim();},'pseudoc':function(){return checkPseudoc(pos) && getPseudoc();},'pseudoe':function(){return checkPseudoe(pos) && getPseudoe();},'ruleset':function(){return checkRuleset(pos) && getRuleset();},'s':function(){return checkS(pos) && getS();},'selector':function(){return checkSelector(pos) && getSelector();},'shash':function(){return checkShash(pos) && getShash();},'string':function(){return checkString(pos) && getString();},'stylesheet':function(){return checkStylesheet(pos) && getStylesheet();},'unary':function(){return checkUnary(pos) && getUnary();},'unicodeRange':function(){return checkUnicodeRange(pos) && getUnicodeRange();},'urange':function(){return checkUrange(pos) && getUrange();},'uri':function(){return checkUri(pos) && getUri();},'value':function(){return checkValue(pos) && getValue();},'variable':function(){return checkVariable(pos) && getVariable();},'variableslist':function(){return checkVariablesList(pos) && getVariablesList();},'vhash':function(){return checkVhash(pos) && getVhash();}}; /** + * Stop parsing and display error + * @param {Number=} i Token's index number + */function throwError(i){var ln=i?tokens[i].ln:tokens[pos].ln;throw {line:ln,syntax:'scss'};} /** + * @param {Object} exclude + * @param {Number} i Token's index number + * @returns {Number} + */function checkExcluding(exclude,i){var start=i;while(i < tokensLength) {if(exclude[tokens[i++].type])break;}return i - start - 2;} /** + * @param {Number} start + * @param {Number} finish + * @returns {String} + */function joinValues(start,finish){var s='';for(var i=start;i < finish + 1;i++) {s += tokens[i].value;}return s;} /** + * @param {Number} start + * @param {Number} num + * @returns {String} + */function joinValues2(start,num){if(start + num - 1 >= tokensLength)return;var s='';for(var i=0;i < num;i++) {s += tokens[start + i].value;}return s;}function getLastPosition(content,line,column,colOffset){return typeof content === 'string'?getLastPositionForString(content,line,column,colOffset):getLastPositionForArray(content,line,column,colOffset);}function getLastPositionForString(content,line,column,colOffset){var position=[];if(!content){position = [line,column];if(colOffset)position[1] += colOffset - 1;return position;}var lastLinebreak=content.lastIndexOf('\n');var endsWithLinebreak=lastLinebreak === content.length - 1;var splitContent=content.split('\n');var linebreaksCount=splitContent.length - 1;var prevLinebreak=linebreaksCount === 0 || linebreaksCount === 1?-1:content.length - splitContent[linebreaksCount - 1].length - 2; // Line: + var offset=endsWithLinebreak?linebreaksCount - 1:linebreaksCount;position[0] = line + offset; // Column: + if(endsWithLinebreak){offset = prevLinebreak !== -1?content.length - prevLinebreak:content.length - 1;}else {offset = linebreaksCount !== 0?content.length - lastLinebreak - column - 1:content.length - 1;}position[1] = column + offset;if(!colOffset)return position;if(endsWithLinebreak){position[0]++;position[1] = colOffset;}else {position[1] += colOffset;}return position;}function getLastPositionForArray(content,line,column,colOffset){var position;if(content.length === 0){position = [line,column];}else {var c=content[content.length - 1];if(c.hasOwnProperty('end')){position = [c.end.line,c.end.column];}else {position = getLastPosition(c.content,line,column);}}if(!colOffset)return position;if(tokens[pos - 1].type !== 'Newline'){position[1] += colOffset;}else {position[0]++;position[1] = 1;}return position;}function newNode(type,content,line,column,end){if(!end)end = getLastPosition(content,line,column);return new Node({type:type,content:content,start:{line:line,column:column},end:{line:end[0],column:end[1]},syntax:'scss'});} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkAny(i){return checkBrackets(i) || checkParentheses(i) || checkString(i) || checkVariablesList(i) || checkVariable(i) || checkPlaceholder(i) || checkPercentage(i) || checkDimension(i) || checkUnicodeRange(i) || checkNumber(i) || checkUri(i) || checkExpression(i) || checkFunction(i) || checkInterpolation(i) || checkIdent(i) || checkClass(i) || checkUnary(i);} /** + * @returns {Array} + */function getAny(){if(checkBrackets(pos))return getBrackets();else if(checkParentheses(pos))return getParentheses();else if(checkString(pos))return getString();else if(checkVariablesList(pos))return getVariablesList();else if(checkVariable(pos))return getVariable();else if(checkPlaceholder(pos))return getPlaceholder();else if(checkPercentage(pos))return getPercentage();else if(checkDimension(pos))return getDimension();else if(checkUnicodeRange(pos))return getUnicodeRange();else if(checkNumber(pos))return getNumber();else if(checkUri(pos))return getUri();else if(checkExpression(pos))return getExpression();else if(checkFunction(pos))return getFunction();else if(checkInterpolation(pos))return getInterpolation();else if(checkIdent(pos))return getIdent();else if(checkClass(pos))return getClass();else if(checkUnary(pos))return getUnary();} /** + * Check if token is part of mixin's arguments. + * @param {Number} i Token's index number + * @returns {Number} Length of arguments + */function checkArguments(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;i++;while(i < tokens[start].right) {if(l = checkArgument(i))i += l;else return 0;}return tokens[start].right - start + 1;} /** + * Check if token is valid to be part of arguments list + * @param {Number} i Token's index number + * @returns {Number} Length of argument + */function checkArgument(i){return checkBrackets(i) || checkParentheses(i) || checkDeclaration(i) || checkFunction(i) || checkVariablesList(i) || checkVariable(i) || checkSC(i) || checkDelim(i) || checkDeclDelim(i) || checkString(i) || checkPercentage(i) || checkDimension(i) || checkNumber(i) || checkUri(i) || checkInterpolation(i) || checkIdent(i) || checkVhash(i) || checkOperator(i) || checkUnary(i) || checkImportant(i) || checkParentSelector(i);} /** + * @returns {Array} Node that is part of arguments list + */function getArgument(){if(checkBrackets(pos))return getBrackets();else if(checkParentheses(pos))return getParentheses();else if(checkDeclaration(pos))return getDeclaration();else if(checkFunction(pos))return getFunction();else if(checkVariablesList(pos))return getVariablesList();else if(checkVariable(pos))return getVariable();else if(checkSC(pos))return getSC();else if(checkDelim(pos))return getDelim();else if(checkDeclDelim(pos))return getDeclDelim();else if(checkString(pos))return getString();else if(checkPercentage(pos))return getPercentage();else if(checkDimension(pos))return getDimension();else if(checkNumber(pos))return getNumber();else if(checkUri(pos))return getUri();else if(checkInterpolation(pos))return getInterpolation();else if(checkIdent(pos))return getIdent();else if(checkVhash(pos))return getVhash();else if(checkOperator(pos))return getOperator();else if(checkUnary(pos))return getUnary();else if(checkImportant(pos))return getImportant();else if(checkParentSelector(pos))return getParentSelector();} /** + * Check if token is part of an @-word (e.g. `@import`, `@include`) + * @param {Number} i Token's index number + * @returns {Number} + */function checkAtkeyword(i){var l; // Check that token is `@`: + if(i >= tokensLength || tokens[i++].type !== TokenType.CommercialAt)return 0;return (l = checkIdentOrInterpolation(i))?l + 1:0;} /** + * Get node with @-word + * @returns {Array} `['atkeyword', ['ident', x]]` where `x` is + * an identifier without + * `@` (e.g. `import`, `include`) + */function getAtkeyword(){var startPos=pos;var x=undefined;pos++;x = getIdentOrInterpolation();var token=tokens[startPos];return newNode(NodeType.AtkeywordType,x,token.ln,token.col);} /** + * Check if token is a part of an @-rule + * @param {Number} i Token's index number + * @returns {Number} Length of @-rule + */function checkAtrule(i){var l;if(i >= tokensLength)return 0; // If token already has a record of being part of an @-rule, + // return the @-rule's length: + if(tokens[i].atrule_l !== undefined)return tokens[i].atrule_l; // If token is part of an @-rule, save the rule's type to token. + // @keyframes: + if(l = checkKeyframesRule(i))tokens[i].atrule_type = 4; // @-rule with ruleset: + else if(l = checkAtruler(i))tokens[i].atrule_type = 1; // Block @-rule: + else if(l = checkAtruleb(i))tokens[i].atrule_type = 2; // Single-line @-rule: + else if(l = checkAtrules(i))tokens[i].atrule_type = 3;else return 0; // If token is part of an @-rule, save the rule's length to token: + tokens[i].atrule_l = l;return l;} /** + * Get node with @-rule + * @returns {Array} + */function getAtrule(){switch(tokens[pos].atrule_type){case 1:return getAtruler(); // @-rule with ruleset + case 2:return getAtruleb(); // Block @-rule + case 3:return getAtrules(); // Single-line @-rule + case 4:return getKeyframesRule();}} /** + * Check if token is part of a block @-rule + * @param {Number} i Token's index number + * @returns {Number} Length of the @-rule + */function checkAtruleb(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(l = checkTsets(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** + * Get node with a block @-rule + * @returns {Array} `['atruleb', ['atkeyword', x], y, ['block', z]]` + */function getAtruleb(){var startPos=pos;var x=undefined;x = [getAtkeyword()].concat(getTsets()).concat([getBlock()]);var token=tokens[startPos];return newNode(NodeType.AtruleType,x,token.ln,token.col);} /** + * Check if token is part of an @-rule with ruleset + * @param {Number} i Token's index number + * @returns {Number} Length of the @-rule + */function checkAtruler(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(l = checkTsets(i))i += l;if(i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket)i++;else return 0;if(l = checkAtrulers(i))i += l;if(i < tokensLength && tokens[i].type === TokenType.RightCurlyBracket)i++;else return 0;return i - start;} /** + * Get node with an @-rule with ruleset + * @returns {Array} ['atruler', ['atkeyword', x], y, z] + */function getAtruler(){var startPos=pos;var x=undefined;x = [getAtkeyword()].concat(getTsets());x.push(getAtrulers());var token=tokens[startPos];return newNode(NodeType.AtruleType,x,token.ln,token.col);} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkAtrulers(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;while(l = checkRuleset(i) || checkAtrule(i) || checkSC(i)) {i += l;}if(i < tokensLength)tokens[i].atrulers_end = 1;return i - start;} /** + * @returns {Array} `['atrulers', x]` + */function getAtrulers(){var startPos=pos;var x=undefined;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;x = getSC();while(!tokens[pos].atrulers_end) {if(checkSC(pos))x = x.concat(getSC());else if(checkAtrule(pos))x.push(getAtrule());else if(checkRuleset(pos))x.push(getRuleset());}x = x.concat(getSC());var end=getLastPosition(x,line,column,1);pos++;return newNode(NodeType.BlockType,x,token.ln,token.col,end);} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkAtrules(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(l = checkTsets(i))i += l;return i - start;} /** + * @returns {Array} `['atrules', ['atkeyword', x], y]` + */function getAtrules(){var startPos=pos;var x=undefined;x = [getAtkeyword()].concat(getTsets());var token=tokens[startPos];return newNode(NodeType.AtruleType,x,token.ln,token.col);} /** + * Check if token is part of a block (e.g. `{...}`). + * @param {Number} i Token's index number + * @returns {Number} Length of the block + */function checkBlock(i){return i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket?tokens[i].right - i + 1:0;} /** + * Get node with a block + * @returns {Array} `['block', x]` + */function getBlock(){var startPos=pos;var end=tokens[pos].right;var x=[];var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;while(pos < end) {if(checkBlockdecl(pos))x = x.concat(getBlockdecl());else throwError();}var end_=getLastPosition(x,line,column,1);pos = end + 1;return newNode(NodeType.BlockType,x,token.ln,token.col,end_);} /** + * Check if token is part of a declaration (property-value pair) + * @param {Number} i Token's index number + * @returns {Number} Length of the declaration + */function checkBlockdecl(i){var l;if(i >= tokensLength)return 0;if(l = checkBlockdecl1(i))tokens[i].bd_type = 1;else if(l = checkBlockdecl2(i))tokens[i].bd_type = 2;else if(l = checkBlockdecl3(i))tokens[i].bd_type = 3;else if(l = checkBlockdecl4(i))tokens[i].bd_type = 4;else return 0;return l;} /** + * @returns {Array} + */function getBlockdecl(){switch(tokens[pos].bd_type){case 1:return getBlockdecl1();case 2:return getBlockdecl2();case 3:return getBlockdecl3();case 4:return getBlockdecl4();}} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkBlockdecl1(i){var start=i;var l=undefined;if(l = checkSC(i))i += l;if(l = checkConditionalStatement(i))tokens[i].bd_kind = 1;else if(l = checkInclude(i))tokens[i].bd_kind = 2;else if(l = checkExtend(i))tokens[i].bd_kind = 4;else if(l = checkLoop(i))tokens[i].bd_kind = 3;else if(l = checkAtrule(i))tokens[i].bd_kind = 6;else if(l = checkRuleset(i))tokens[i].bd_kind = 7;else if(l = checkDeclaration(i))tokens[i].bd_kind = 5;else return 0;i += l;if(i < tokensLength && (l = checkDeclDelim(i)))i += l;else return 0;if(l = checkSC(i))i += l;return i - start;} /** + * @returns {Array} + */function getBlockdecl1(){var sc=getSC();var x=undefined;switch(tokens[pos].bd_kind){case 1:x = getConditionalStatement();break;case 2:x = getInclude();break;case 3:x = getLoop();break;case 4:x = getExtend();break;case 5:x = getDeclaration();break;case 6:x = getAtrule();break;case 7:x = getRuleset();break;}return sc.concat([x]).concat([getDeclDelim()]).concat(getSC());} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkBlockdecl2(i){var start=i;var l=undefined;if(l = checkSC(i))i += l;if(l = checkConditionalStatement(i))tokens[i].bd_kind = 1;else if(l = checkInclude(i))tokens[i].bd_kind = 2;else if(l = checkExtend(i))tokens[i].bd_kind = 4;else if(l = checkMixin(i))tokens[i].bd_kind = 8;else if(l = checkLoop(i))tokens[i].bd_kind = 3;else if(l = checkAtrule(i))tokens[i].bd_kind = 6;else if(l = checkRuleset(i))tokens[i].bd_kind = 7;else if(l = checkDeclaration(i))tokens[i].bd_kind = 5;else return 0;i += l;if(l = checkSC(i))i += l;return i - start;} /** + * @returns {Array} + */function getBlockdecl2(){var sc=getSC();var x=undefined;switch(tokens[pos].bd_kind){case 1:x = getConditionalStatement();break;case 2:x = getInclude();break;case 3:x = getLoop();break;case 4:x = getExtend();break;case 5:x = getDeclaration();break;case 6:x = getAtrule();break;case 7:x = getRuleset();break;case 8:x = getMixin();break;}return sc.concat([x]).concat(getSC());} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkBlockdecl3(i){var start=i;var l=undefined;if(l = checkSC(i))i += l;if(l = checkDeclDelim(i))i += l;else return 0;if(l = checkSC(i))i += l;return i - start;} /** + * @returns {Array} `[s0, ['declDelim'], s1]` where `s0` and `s1` are + * are optional whitespaces. + */function getBlockdecl3(){return getSC().concat([getDeclDelim()]).concat(getSC());} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkBlockdecl4(i){return checkSC(i);} /** + * @returns {Array} + */function getBlockdecl4(){return getSC();} /** + * Check if token is part of text inside square brackets, e.g. `[1]` + * @param {Number} i Token's index number + * @returns {Number} + */function checkBrackets(i){if(i >= tokensLength || tokens[i].type !== TokenType.LeftSquareBracket)return 0;return tokens[i].right - i + 1;} /** + * Get node with text inside parentheses or square brackets (e.g. `(1)`) + * @return {Node} + */function getBrackets(){var startPos=pos;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;var tsets=getTsets();var end=getLastPosition(tsets,line,column,1);pos++;return newNode(NodeType.BracketsType,tsets,token.ln,token.col,end);} /** + * Check if token is part of a class selector (e.g. `.abc`) + * @param {Number} i Token's index number + * @returns {Number} Length of the class selector + */function checkClass(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(tokens[i].class_l)return tokens[i].class_l;if(tokens[i++].type !== TokenType.FullStop)return 0; // Check for `-` at beginning. + if(tokens[i].type === TokenType.HyphenMinus)i += 1;if(l = checkIdentOrInterpolation(i))i += l;else return 0;while(i < tokensLength) {if(l = checkIdentOrInterpolation(i) || checkNumber(i))i += l;else if(tokens[i].type === TokenType.HyphenMinus)i += 1;else break;}tokens[start].classEnd = i;return i - start;} /** + * Get node with a class selector + * @returns {Array} `['class', ['ident', x]]` where x is a class's + * identifier (without `.`, e.g. `abc`). + */function getClass(){var startPos=pos;var type=NodeType.ClassType;var token=tokens[startPos];var line=token.ln;var column=token.col;var content=[];var end=token.classEnd; // Skip `.` + pos++;while(pos < end) {if(checkIdentOrInterpolation(pos)){content = content.concat(getIdentOrInterpolation());}else if(checkNumber(pos)){content = content.concat(getNumber());}else if(tokens[pos].type === TokenType.HyphenMinus){content.push(newNode(NodeType.IdentType,tokens[pos].value,tokens[pos].ln,tokens[pos].col));pos++;}else break;}return newNode(type,content,line,column);}function checkCombinator(i){if(i >= tokensLength)return 0;var l=undefined;if(l = checkCombinator1(i))tokens[i].combinatorType = 1;else if(l = checkCombinator2(i))tokens[i].combinatorType = 2;else if(l = checkCombinator3(i))tokens[i].combinatorType = 3;return l;}function getCombinator(){var type=tokens[pos].combinatorType;if(type === 1)return getCombinator1();if(type === 2)return getCombinator2();if(type === 3)return getCombinator3();} /** + * (1) `||` + */function checkCombinator1(i){if(tokens[i].type === TokenType.VerticalLine && tokens[i + 1].type === TokenType.VerticalLine)return 2;else return 0;}function getCombinator1(){var type=NodeType.CombinatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='||';pos += 2;return newNode(type,content,line,column);} /** + * (1) `>` + * (2) `+` + * (3) `~` + */function checkCombinator2(i){var type=tokens[i].type;if(type === TokenType.PlusSign || type === TokenType.GreaterThanSign || type === TokenType.Tilde)return 1;else return 0;}function getCombinator2(){var type=NodeType.CombinatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=tokens[pos++].value;return newNode(type,content,line,column);} /** + * (1) `/panda/` + */function checkCombinator3(i){var start=i;if(tokens[i].type === TokenType.Solidus)i++;else return 0;var l=undefined;if(l = checkIdent(i))i += l;else return 0;if(tokens[i].type === TokenType.Solidus)i++;else return 0;return i - start;}function getCombinator3(){var type=NodeType.CombinatorType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `/`. + pos++;var ident=getIdent(); // Skip `/`. + pos++;var content='/' + ident.content + '/';return newNode(type,content,line,column);} /** + * Check if token is a multiline comment. + * @param {Number} i Token's index number + * @returns {Number} `1` if token is a multiline comment, otherwise `0` + */function checkCommentML(i){return i < tokensLength && tokens[i].type === TokenType.CommentML?1:0;} /** + * Get node with a multiline comment + * @returns {Array} `['commentML', x]` where `x` + * is the comment's text (without `/*` and `* /`). + */function getCommentML(){var startPos=pos;var s=tokens[pos].value.substring(2);var l=s.length;var token=tokens[startPos];var line=token.ln;var column=token.col;if(s.charAt(l - 2) === '*' && s.charAt(l - 1) === '/')s = s.substring(0,l - 2);var end=getLastPosition(s,line,column,2);if(end[0] === line)end[1] += 2;pos++;return newNode(NodeType.CommentMLType,s,token.ln,token.col,end);} /** + * Check if token is part of a single-line comment. + * @param {Number} i Token's index number + * @returns {Number} `1` if token is a single-line comment, otherwise `0` + */function checkCommentSL(i){return i < tokensLength && tokens[i].type === TokenType.CommentSL?1:0;} /** + * Get node with a single-line comment. + * @returns {Array} `['commentSL', x]` where `x` is comment's message + * (without `//`) + */function getCommentSL(){var startPos=pos;var x=undefined;var token=tokens[startPos];var line=token.ln;var column=token.col;x = tokens[pos++].value.substring(2);var end=getLastPosition(x,line,column + 2);return newNode(NodeType.CommentSLType,x,token.ln,token.col,end);} /** + * Check if token is part of a condition + * (e.g. `@if ...`, `@else if ...` or `@else ...`). + * @param {Number} i Token's index number + * @returns {Number} Length of the condition + */function checkCondition(i){var start=i;var l=undefined;var _i=undefined;var s=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(['if','else'].indexOf(tokens[start + 1].value) < 0)return 0;while(i < tokensLength) {if(l = checkBlock(i))break;s = checkSC(i);_i = i + s;if(l = _checkCondition(_i))i += l + s;else break;}return i - start;}function _checkCondition(i){return checkVariable(i) || checkNumber(i) || checkInterpolation(i) || checkIdent(i) || checkOperator(i) || checkCombinator(i) || checkString(i);} /** + * Get node with a condition. + * @returns {Array} `['condition', x]` + */function getCondition(){var startPos=pos;var x=[];var s;var _pos;x.push(getAtkeyword());while(pos < tokensLength) {if(checkBlock(pos))break;s = checkSC(pos);_pos = pos + s;if(!_checkCondition(_pos))break;if(s)x = x.concat(getSC());x.push(_getCondition());}var token=tokens[startPos];return newNode(NodeType.ConditionType,x,token.ln,token.col);}function _getCondition(){if(checkVariable(pos))return getVariable();if(checkNumber(pos))return getNumber();if(checkInterpolation(pos))return getInterpolation();if(checkIdent(pos))return getIdent();if(checkOperator(pos))return getOperator();if(checkCombinator(pos))return getCombinator();if(checkString(pos))return getString();} /** + * Check if token is part of a conditional statement + * (e.g. `@if ... {} @else if ... {} @else ... {}`). + * @param {Number} i Token's index number + * @returns {Number} Length of the condition + */function checkConditionalStatement(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkCondition(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** + * Get node with a condition. + * @returns {Array} `['condition', x]` + */function getConditionalStatement(){var startPos=pos;var x=[];x.push(getCondition());x = x.concat(getSC());x.push(getBlock());var token=tokens[startPos];return newNode(NodeType.ConditionalStatementType,x,token.ln,token.col);} /** + * Check if token is part of a declaration (property-value pair) + * @param {Number} i Token's index number + * @returns {Number} Length of the declaration + */function checkDeclaration(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkProperty(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkPropertyDelim(i))i++;else return 0;if(l = checkSC(i))i += l;if(l = checkValue(i))i += l;else return 0;return i - start;} /** + * Get node with a declaration + * @returns {Array} `['declaration', ['property', x], ['propertyDelim'], + * ['value', y]]` + */function getDeclaration(){var startPos=pos;var x=[];x.push(getProperty());x = x.concat(getSC());x.push(getPropertyDelim());x = x.concat(getSC());x.push(getValue());var token=tokens[startPos];return newNode(NodeType.DeclarationType,x,token.ln,token.col);} /** + * Check if token is a semicolon + * @param {Number} i Token's index number + * @returns {Number} `1` if token is a semicolon, otherwise `0` + */function checkDeclDelim(i){return i < tokensLength && tokens[i].type === TokenType.Semicolon?1:0;} /** + * Get node with a semicolon + * @returns {Array} `['declDelim']` + */function getDeclDelim(){var startPos=pos++;var token=tokens[startPos];return newNode(NodeType.DeclDelimType,';',token.ln,token.col);} /** + * Check if token if part of `!default` word. + * @param {Number} i Token's index number + * @returns {Number} Length of the `!default` word + */function checkDefault(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark)return 0;if(l = checkSC(i))i += l;if(tokens[i].value === 'default'){tokens[start].defaultEnd = i;return i - start + 1;}else {return 0;}} /** + * Get node with a `!default` word + * @returns {Array} `['default', sc]` where `sc` is optional whitespace + */function getDefault(){var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,token.defaultEnd);pos = token.defaultEnd + 1;return newNode(NodeType.DefaultType,content,line,column);} /** + * Check if token is a comma + * @param {Number} i Token's index number + * @returns {Number} `1` if token is a comma, otherwise `0` + */function checkDelim(i){return i < tokensLength && tokens[i].type === TokenType.Comma?1:0;} /** + * Get node with a comma + * @returns {Array} `['delim']` + */function getDelim(){var startPos=pos;pos++;var token=tokens[startPos];return newNode(NodeType.DelimType,',',token.ln,token.col);} /** + * Check if token is part of a number with dimension unit (e.g. `10px`) + * @param {Number} i Token's index number + * @return {Number} + */function checkDimension(i){var ln=checkNumber(i);var li=undefined;if(i >= tokensLength || !ln || i + ln >= tokensLength)return 0;return (li = checkUnit(i + ln))?ln + li:0;} /** + * Get node of a number with dimension unit + * @return {Node} + */function getDimension(){var type=NodeType.DimensionType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[getNumber(),getUnit()];return newNode(type,content,line,column);} /** + * Check if token is unit + * @param {Number} i Token's index number + * @return {Number} + */function checkUnit(i){var units=['em','ex','ch','rem','vh','vw','vmin','vmax','px','mm','q','cm','in','pt','pc','deg','grad','rad','turn','s','ms','Hz','kHz','dpi','dpcm','dppx'];return units.indexOf(tokens[i].value) !== -1?1:0;} /** + * Get unit node of type ident + * @return {Node} An ident node containing the unit value + */function getUnit(){var type=NodeType.IdentType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=token.value;pos++;return newNode(type,content,line,column);} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkExpression(i){var start=i;if(i >= tokensLength || tokens[i++].value !== 'expression' || i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;return tokens[i].right - start + 1;} /** + * @returns {Array} + */function getExpression(){var startPos=pos;var e;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;e = joinValues(pos + 1,tokens[pos].right - 1);var end=getLastPosition(e,line,column,1);if(end[0] === line)end[1] += 11;pos = tokens[pos].right + 1;return newNode(NodeType.ExpressionType,e,token.ln,token.col,end);}function checkExtend(i){var l=0;if(l = checkExtend1(i))tokens[i].extend_child = 1;else if(l = checkExtend2(i))tokens[i].extend_child = 2;return l;}function getExtend(){var type=tokens[pos].extend_child;if(type === 1)return getExtend1();else if(type === 2)return getExtend2();} /** + * Checks if token is part of an extend with `!optional` flag. + * @param {Number} i + */function checkExtend1(i){var start=i;var l;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'extend')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkSelectorsGroup(i))i += l;else return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkOptional(i))i += l;else return 0;return i - start;}function getExtend1(){var startPos=pos;var x=[].concat([getAtkeyword()],getSC(),getSelectorsGroup(),getSC(),[getOptional()]);var token=tokens[startPos];return newNode(NodeType.ExtendType,x,token.ln,token.col);} /** + * Checks if token is part of an extend without `!optional` flag. + * @param {Number} i + */function checkExtend2(i){var start=i;var l;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'extend')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkSelectorsGroup(i))i += l;else return 0;return i - start;}function getExtend2(){var startPos=pos;var x=[].concat([getAtkeyword()],getSC(),getSelectorsGroup());var token=tokens[startPos];return newNode(NodeType.ExtendType,x,token.ln,token.col);} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkFunction(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i < tokensLength && tokens[i].type === TokenType.LeftParenthesis?tokens[i].right - start + 1:0;} /** + * @returns {Array} + */function getFunction(){var startPos=pos;var x=getIdentOrInterpolation();var body=undefined;body = getArguments();x.push(body);var token=tokens[startPos];return newNode(NodeType.FunctionType,x,token.ln,token.col);} /** + * @returns {Array} + */function getArguments(){var startPos=pos;var x=[];var body=undefined;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;while(pos < tokensLength && tokens[pos].type !== TokenType.RightParenthesis) {if(checkDeclaration(pos))x.push(getDeclaration());else if(checkArgument(pos)){body = getArgument();if(typeof body.content === 'string')x.push(body);else x = x.concat(body);}else if(checkClass(pos))x.push(getClass());else throwError();}var end=getLastPosition(x,line,column,1);pos++;return newNode(NodeType.ArgumentsType,x,token.ln,token.col,end);} /** + * Check if token is part of an identifier + * @param {Number} i Token's index number + * @returns {Number} Length of the identifier + */function checkIdent(i){var start=i;if(i >= tokensLength)return 0; // Check if token is part of a negative number + if(tokens[i].type === TokenType.HyphenMinus && tokens[i + 1].type === TokenType.DecimalNumber)return 0;if(tokens[i].type === TokenType.HyphenMinus)i++;if(tokens[i].type === TokenType.LowLine || tokens[i].type === TokenType.Identifier)i++;else return 0;for(;i < tokensLength;i++) {if(tokens[i].type !== TokenType.HyphenMinus && tokens[i].type !== TokenType.LowLine && tokens[i].type !== TokenType.Identifier && tokens[i].type !== TokenType.DecimalNumber)break;}tokens[start].ident_last = i - 1;return i - start;} /** + * Get node with an identifier + * @returns {Array} `['ident', x]` where `x` is identifier's name + */function getIdent(){var startPos=pos;var x=joinValues(pos,tokens[pos].ident_last);pos = tokens[pos].ident_last + 1;var token=tokens[startPos];return newNode(NodeType.IdentType,x,token.ln,token.col);} /** + * @param {number} i Token's index number + * @returns {number} Length of the identifier + */function checkPartialIdent(i){var start=i;if(i >= tokensLength)return 0;for(;i < tokensLength;i++) {if(tokens[i].type !== TokenType.HyphenMinus && tokens[i].type !== TokenType.LowLine && tokens[i].type !== TokenType.Identifier && tokens[i].type !== TokenType.DecimalNumber)break;}tokens[start].ident_last = i - 1;return i - start;}function checkIdentOrInterpolation(i){var start=i;var l=undefined;while(i < tokensLength) {if(l = checkInterpolation(i) || checkIdent(i))i += l;else break;}return i - start;}function getIdentOrInterpolation(){var x=[];while(pos < tokensLength) {if(checkInterpolation(pos))x.push(getInterpolation());else if(checkIdent(pos))x.push(getIdent());else break;}return x;} /** + * Check if token is part of `!important` word + * @param {Number} i Token's index number + * @returns {Number} + */function checkImportant(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark)return 0;if(l = checkSC(i))i += l;if(tokens[i].value === 'important'){tokens[start].importantEnd = i;return i - start + 1;}else {return 0;}} /** + * Get node with `!important` word + * @returns {Array} `['important', sc]` where `sc` is optional whitespace + */function getImportant(){var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,token.importantEnd);pos = token.importantEnd + 1;return newNode(NodeType.ImportantType,content,line,column);} /** + * Check if token is part of an included mixin (`@include` or `@extend` + * directive). + * @param {Number} i Token's index number + * @returns {Number} Length of the included mixin + */function checkInclude(i){var l;if(i >= tokensLength)return 0;if(l = checkInclude1(i))tokens[i].include_type = 1;else if(l = checkInclude2(i))tokens[i].include_type = 2;else if(l = checkInclude3(i))tokens[i].include_type = 3;else if(l = checkInclude4(i))tokens[i].include_type = 4;else if(l = checkInclude5(i))tokens[i].include_type = 5;return l;} /** + * Check if token is part of `!global` word + * @param {Number} i Token's index number + * @returns {Number} + */function checkGlobal(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark)return 0;if(l = checkSC(i))i += l;if(tokens[i].value === 'global'){tokens[start].globalEnd = i;return i - start + 1;}else {return 0;}} /** + * Get node with `!global` word + */function getGlobal(){var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,token.globalEnd);pos = token.globalEnd + 1;return newNode(NodeType.GlobalType,content,line,column);} /** + * Get node with included mixin + * @returns {Array} `['include', x]` + */function getInclude(){switch(tokens[pos].include_type){case 1:return getInclude1();case 2:return getInclude2();case 3:return getInclude3();case 4:return getInclude4();case 5:return getInclude5();}} /** + * Get node with included mixin with keyfames selector like + * `@include nani(foo) { 0% {}}` + * @param {Number} i Token's index number + * @returns {Number} Length of the include + */function checkInclude1(i){var start=i;var l=undefined;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'include')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkArguments(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkKeyframesBlocks(i))i += l;else return 0;return i - start;} /** + * Get node with included mixin with keyfames selector like + * `@include nani(foo) { 0% {}}` + * @returns {Array} `['include', ['atkeyword', x], sc, ['selector', y], sc, + * ['arguments', z], sc, ['block', q], sc` where `x` is `include` or + * `extend`, `y` is mixin's identifier (selector), `z` are arguments + * passed to the mixin, `q` is block passed to the mixin containing a + * ruleset > selector > keyframesSelector, and `sc` are optional + * whitespaces + */function getInclude1(){var startPos=pos;var x=[].concat(getAtkeyword(),getSC(),getIdentOrInterpolation(),getSC(),getArguments(),getSC(),getKeyframesBlocks());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** + * Check if token is part of an included mixin like `@include nani(foo) {...}` + * @param {Number} i Token's index number + * @returns {Number} Length of the include + */function checkInclude2(i){var start=i;var l=undefined;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'include')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkArguments(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** + * Get node with included mixin like `@include nani(foo) {...}` + * @returns {Array} `['include', ['atkeyword', x], sc, ['selector', y], sc, + * ['arguments', z], sc, ['block', q], sc` where `x` is `include` or + * `extend`, `y` is mixin's identifier (selector), `z` are arguments + * passed to the mixin, `q` is block passed to the mixin and `sc` + * are optional whitespaces + */function getInclude2(){var startPos=pos;var x=[].concat(getAtkeyword(),getSC(),getIdentOrInterpolation(),getSC(),getArguments(),getSC(),getBlock());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** + * Check if token is part of an included mixin like `@include nani(foo)` + * @param {Number} i Token's index number + * @returns {Number} Length of the include + */function checkInclude3(i){var start=i;var l=undefined;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'include')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkArguments(i))i += l;else return 0;return i - start;} /** + * Get node with included mixin like `@include nani(foo)` + * @returns {Array} `['include', ['atkeyword', x], sc, ['selector', y], sc, + * ['arguments', z], sc]` where `x` is `include` or `extend`, `y` is + * mixin's identifier (selector), `z` are arguments passed to the + * mixin and `sc` are optional whitespaces + */function getInclude3(){var startPos=pos;var x=[].concat(getAtkeyword(),getSC(),getIdentOrInterpolation(),getSC(),getArguments());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** + * Check if token is part of an included mixin with a content block passed + * as an argument (e.g. `@include nani {...}`) + * @param {Number} i Token's index number + * @returns {Number} Length of the mixin + */function checkInclude4(i){var start=i;var l=undefined;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'include')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** + * Get node with an included mixin with a content block passed + * as an argument (e.g. `@include nani {...}`) + * @returns {Array} `['include', x]` + */function getInclude4(){var startPos=pos;var x=[].concat(getAtkeyword(),getSC(),getIdentOrInterpolation(),getSC(),getBlock());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkInclude5(i){var start=i;var l=undefined;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'include')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;} /** + * @returns {Array} `['include', x]` + */function getInclude5(){var startPos=pos;var x=[].concat(getAtkeyword(),getSC(),getIdentOrInterpolation());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** + * Check if token is part of an interpolated variable (e.g. `#{$nani}`). + * @param {Number} i Token's index number + * @returns {Number} + */function checkInterpolation(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.NumberSign || !tokens[i + 1] || tokens[i + 1].type !== TokenType.LeftCurlyBracket)return 0;i += 2;while(tokens[i].type !== TokenType.RightCurlyBracket) {if(l = checkArgument(i))i += l;else return 0;}return tokens[i].type === TokenType.RightCurlyBracket?i - start + 1:0;} /** + * Get node with an interpolated variable + * @returns {Array} `['interpolation', x]` + */function getInterpolation(){var startPos=pos;var x=[];var token=tokens[startPos];var line=token.ln;var column=token.col; // Skip `#{`: + pos += 2;while(pos < tokensLength && tokens[pos].type !== TokenType.RightCurlyBracket) {var body=getArgument();if(typeof body.content === 'string')x.push(body);else x = x.concat(body);}var end=getLastPosition(x,line,column,1); // Skip `}`: + pos++;return newNode(NodeType.InterpolationType,x,token.ln,token.col,end);} /** + * Check a single keyframe block - `5% {}` + * @param {Number} i + * @returns {Number} + */function checkKeyframesBlock(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkKeyframesSelectorsGroup(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** + * Get a single keyframe block - `5% {}` + * @returns {Node} + */function getKeyframesBlock(){var type=NodeType.RulesetType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[].concat(getKeyframesSelectorsGroup(),getSC(),[getBlock()]);return newNode(type,content,line,column);} /** + * Check all keyframe blocks - `5% {} 100% {}` + * @param {Number} i + * @returns {Number} + */function checkKeyframesBlocks(i){var start=i;var l=undefined;if(i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket)i++;else return 0;if(l = checkSC(i))i += l;if(l = checkKeyframesBlock(i))i += l;else return 0;while(tokens[i].type !== TokenType.RightCurlyBracket) {if(l = checkSC(i))i += l;else if(l = checkKeyframesBlock(i))i += l;else break;}if(i < tokensLength && tokens[i].type === TokenType.RightCurlyBracket)i++;else return 0;return i - start;} /** + * Get all keyframe blocks - `5% {} 100% {}` + * @returns {Node} + */function getKeyframesBlocks(){var type=NodeType.BlockType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];var keyframesBlocksEnd=token.right; // Skip `{`. + pos++;while(pos < keyframesBlocksEnd) {if(checkSC(pos))content = content.concat(getSC());else if(checkKeyframesBlock(pos))content.push(getKeyframesBlock());else if(checkAtrule(pos))content.push(getAtrule()); // @content + else break;}var end=getLastPosition(content,line,column,1); // Skip `}`. + pos++;return newNode(type,content,line,column,end);} /** + * Check if token is part of a @keyframes rule. + * @param {Number} i Token's index number + * @return {Number} Length of the @keyframes rule + */function checkKeyframesRule(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;var atruleName=joinValues2(i - l,l);if(atruleName.indexOf('keyframes') === -1)return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkKeyframesBlocks(i))i += l;else return 0;return i - start;} /** + * @return {Node} + */function getKeyframesRule(){var type=NodeType.AtruleType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[].concat([getAtkeyword()],getSC(),getIdentOrInterpolation(),getSC(),[getKeyframesBlocks()]);return newNode(type,content,line,column);} /** + * Check a single keyframe selector - `5%`, `from` etc + * @param {Number} i + * @returns {Number} + */function checkKeyframesSelector(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkIdent(i)){ // Valid selectors are only `from` and `to`. + var selector=joinValues2(i,l);if(selector !== 'from' && selector !== 'to')return 0;i += l;tokens[start].keyframesSelectorType = 1;}else if(l = checkPercentage(i)){i += l;tokens[start].keyframesSelectorType = 2;}else if(l = checkInterpolation(i)){i += l;tokens[start].keyframesSelectorType = 3;}else {return 0;}return i - start;} /** + * Get a single keyframe selector + * @returns {Node} + */function getKeyframesSelector(){var keyframesSelectorType=NodeType.KeyframesSelectorType;var selectorType=NodeType.SelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(token.keyframesSelectorType === 1){content.push(getIdent());}else if(token.keyframesSelectorType === 2){content.push(getPercentage());}else if(token.keyframesSelectorType === 3){content.push(getInterpolation());}var keyframesSelector=newNode(keyframesSelectorType,content,line,column);return newNode(selectorType,[keyframesSelector],line,column);} /** + * Check the keyframe's selector groups + * @param {Number} i + * @returns {Number} + */function checkKeyframesSelectorsGroup(i){var start=i;var l=undefined;if(l = checkKeyframesSelector(i))i += l;else return 0;while(i < tokensLength) {var sb=checkSC(i);var c=checkDelim(i + sb);if(!c)break;var sa=checkSC(i + sb + c);if(l = checkKeyframesSelector(i + sb + c + sa))i += sb + c + sa + l;else break;}tokens[start].selectorsGroupEnd = i;return i - start;} /** + * Get the keyframe's selector groups + * @returns {Array} An array of keyframe selectors + */function getKeyframesSelectorsGroup(){var selectorsGroup=[];var selectorsGroupEnd=tokens[pos].selectorsGroupEnd;selectorsGroup.push(getKeyframesSelector());while(pos < selectorsGroupEnd) {selectorsGroup = selectorsGroup.concat(getSC());selectorsGroup.push(getDelim());selectorsGroup = selectorsGroup.concat(getSC());selectorsGroup.push(getKeyframesSelector());}return selectorsGroup;} /** + * Check if token is part of a loop. + * @param {Number} i Token's index number + * @returns {Number} Length of the loop + */function checkLoop(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(['for','each','while'].indexOf(tokens[start + 1].value) < 0)return 0;while(i < tokensLength) {if(l = checkBlock(i)){i += l;break;}else if(l = checkVariable(i) || checkNumber(i) || checkInterpolation(i) || checkIdent(i) || checkSC(i) || checkOperator(i) || checkCombinator(i) || checkString(i))i += l;else return 0;}return i - start;} /** + * Get node with a loop. + * @returns {Array} `['loop', x]` + */function getLoop(){var startPos=pos;var x=[];x.push(getAtkeyword());while(pos < tokensLength) {if(checkBlock(pos)){x.push(getBlock());break;}else if(checkVariable(pos))x.push(getVariable());else if(checkNumber(pos))x.push(getNumber());else if(checkInterpolation(pos))x.push(getInterpolation());else if(checkIdent(pos))x.push(getIdent());else if(checkOperator(pos))x.push(getOperator());else if(checkCombinator(pos))x.push(getCombinator());else if(checkSC(pos))x = x.concat(getSC());else if(checkString(pos))x.push(getString());}var token=tokens[startPos];return newNode(NodeType.LoopType,x,token.ln,token.col);} /** + * Check if token is part of a mixin + * @param {Number} i Token's index number + * @returns {Number} Length of the mixin + */function checkMixin(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if((l = checkAtkeyword(i)) && tokens[i + 1].value === 'mixin')i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkArguments(i))i += l;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** + * Get node with a mixin + * @returns {Array} `['mixin', x]` + */function getMixin(){var startPos=pos;var x=[getAtkeyword()];x = x.concat(getSC());if(checkIdentOrInterpolation(pos))x = x.concat(getIdentOrInterpolation());x = x.concat(getSC());if(checkArguments(pos))x.push(getArguments());x = x.concat(getSC());if(checkBlock(pos))x.push(getBlock());var token=tokens[startPos];return newNode(NodeType.MixinType,x,token.ln,token.col);} /** + * Check if token is a namespace sign (`|`) + * @param {Number} i Token's index number + * @returns {Number} `1` if token is `|`, `0` if not + */function checkNamespace(i){return i < tokensLength && tokens[i].type === TokenType.VerticalLine?1:0;} /** + * Get node with a namespace sign + * @returns {Array} `['namespace']` + */function getNamespace(){var startPos=pos;pos++;var token=tokens[startPos];return newNode(NodeType.NamespaceType,'|',token.ln,token.col);} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkNmName2(i){if(tokens[i].type === TokenType.Identifier)return 1;else if(tokens[i].type !== TokenType.DecimalNumber)return 0;i++;return i < tokensLength && tokens[i].type === TokenType.Identifier?2:1;} /** + * @returns {String} + */function getNmName2(){var s=tokens[pos].value;if(tokens[pos++].type === TokenType.DecimalNumber && pos < tokensLength && tokens[pos].type === TokenType.Identifier)s += tokens[pos++].value;return s;} /** + * Check if token is part of a number + * @param {Number} i Token's index number + * @returns {Number} Length of number + */function checkNumber(i){if(i >= tokensLength)return 0;if(tokens[i].number_l)return tokens[i].number_l; // `10`: + if(i < tokensLength && tokens[i].type === TokenType.DecimalNumber && (!tokens[i + 1] || tokens[i + 1] && tokens[i + 1].type !== TokenType.FullStop)){tokens[i].number_l = 1;return 1;} // `10.`: + if(i < tokensLength && tokens[i].type === TokenType.DecimalNumber && tokens[i + 1] && tokens[i + 1].type === TokenType.FullStop && (!tokens[i + 2] || tokens[i + 2].type !== TokenType.DecimalNumber)){tokens[i].number_l = 2;return 2;} // `.10`: + if(i < tokensLength && tokens[i].type === TokenType.FullStop && tokens[i + 1].type === TokenType.DecimalNumber){tokens[i].number_l = 2;return 2;} // `10.10`: + if(i < tokensLength && tokens[i].type === TokenType.DecimalNumber && tokens[i + 1] && tokens[i + 1].type === TokenType.FullStop && tokens[i + 2] && tokens[i + 2].type === TokenType.DecimalNumber){tokens[i].number_l = 3;return 3;}return 0;} /** + * Get node with number + * @returns {Array} `['number', x]` where `x` is a number converted + * to string. + */function getNumber(){var s='';var startPos=pos;var l=tokens[pos].number_l;for(var j=0;j < l;j++) {s += tokens[pos + j].value;}pos += l;var token=tokens[startPos];return newNode(NodeType.NumberType,s,token.ln,token.col);} /** + * Check if token is an operator (`/`, `%`, `,`, `:` or `=`). + * @param {Number} i Token's index number + * @returns {Number} `1` if token is an operator, otherwise `0` + */function checkOperator(i){if(i >= tokensLength)return 0;switch(tokens[i].type){case TokenType.Solidus:case TokenType.PercentSign:case TokenType.Comma:case TokenType.Colon:case TokenType.EqualsSign:case TokenType.EqualitySign:case TokenType.InequalitySign:case TokenType.LessThanSign:case TokenType.GreaterThanSign:case TokenType.Asterisk:return 1;}return 0;} /** + * Get node with an operator + * @returns {Array} `['operator', x]` where `x` is an operator converted + * to string. + */function getOperator(){var startPos=pos;var x=tokens[pos++].value;var token=tokens[startPos];return newNode(NodeType.OperatorType,x,token.ln,token.col);} /** + * Check if token is part of `!optional` word + * @param {Number} i Token's index number + * @returns {Number} + */function checkOptional(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark)return 0;if(l = checkSC(i))i += l;if(tokens[i].value === 'optional'){tokens[start].optionalEnd = i;return i - start + 1;}else {return 0;}} /** + * Get node with `!optional` word + */function getOptional(){var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,token.optionalEnd);pos = token.optionalEnd + 1;return newNode(NodeType.OptionalType,content,line,column);} /** + * Check if token is part of text inside parentheses, e.g. `(1)` + * @param {Number} i Token's index number + * @return {Number} + */function checkParentheses(i){if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;return tokens[i].right - i + 1;} /** + * Get node with text inside parentheses, e.g. `(1)` + * @return {Node} + */function getParentheses(){var type=NodeType.ParenthesesType;var token=tokens[pos];var line=token.ln;var column=token.col;pos++;var tsets=getTsets();var end=getLastPosition(tsets,line,column,1);pos++;return newNode(type,tsets,line,column,end);} /** + * Check if token is a parent selector, e.g. `&` + * @param {number} i Token's index number + * @return {number} + */function checkParentSelector(i){return i < tokensLength && tokens[i].type === TokenType.Ampersand?1:0;} /** + * Get node with a parent selector + * @return {Node} + */function getParentSelector(){var startPos=pos;var token=tokens[startPos];pos++;return newNode(NodeType.ParentSelectorType,'&',token.ln,token.col);} /** + * Check if token is a parent selector extension, e.g. `&--foo-bar` + * @param {number} i Token's index number + * @returns {number} Length of the parent selector extension + */function checkParentSelectorExtension(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;while(i < tokensLength) {if(l = checkNumber(i) || checkPartialIdent(i) || checkIdentOrInterpolation(i))i += l;else break;}return i - start;} /** + * Get parent selector extension node + * @return {Node} + */function getParentSelectorExtension(){var type=NodeType.ParentSelectorExtensionType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];while(pos < tokensLength) {if(checkNumber(pos)){content.push(getNumber());}else if(checkPartialIdent(pos)){content.push(getIdent());}else if(checkIdentOrInterpolation(pos)){content = content.concat(getIdentOrInterpolation());}else break;}return newNode(type,content,line,column);} /** + * Check if token is a parent selector with an extension or not + * @param {number} i Token's index number + * @return {number} Length of the parent selector and extension if applicable + */function checkParentSelectorWithExtension(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkParentSelector(i))i += l;else return 0;if(l = checkParentSelectorExtension(i))i += l;return i - start;} /** + * Get parent selector node and extension node if applicable + * @return {Array} + */function getParentSelectorWithExtension(){var content=[getParentSelector()];if(checkParentSelectorExtension(pos))content.push(getParentSelectorExtension());return content;} /** + * Check if token is part of a number or an interpolation with a percent sign + * (e.g. `10%`). + * @param {Number} i Token's index number + * @returns {Number} + */function checkPercentage(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkNumberOrInterpolation(i))i += l;else return 0;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.PercentSign)return 0;return i - start + 1;} /** + * Get a percentage node that contains either a number or an interpolation + * @returns {Object} The percentage node + */function getPercentage(){var startPos=pos;var token=tokens[startPos];var line=token.ln;var column=token.col;var content=getNumberOrInterpolation();var end=getLastPosition(content,line,column,1); // Skip % + pos++;return newNode(NodeType.PercentageType,content,token.ln,token.col,end);} /** + * Check if token is a number or an interpolation + * @param {Number} i Token's index number + * @returns {Number} + */function checkNumberOrInterpolation(i){var start=i;var l=undefined;while(i < tokensLength) {if(l = checkInterpolation(i) || checkNumber(i))i += l;else break;}return i - start;} /** + * Get a number and/or interpolation node + * @returns {Array} An array containing a single or multiple nodes + */function getNumberOrInterpolation(){var content=[];while(pos < tokensLength) {if(checkInterpolation(pos))content.push(getInterpolation());else if(checkNumber(pos))content.push(getNumber());else break;}return content;} /** + * Check if token is part of a placeholder selector (e.g. `%abc`). + * @param {Number} i Token's index number + * @returns {Number} Length of the selector + */function checkPlaceholder(i){var l;if(i >= tokensLength)return 0;if(tokens[i].placeholder_l)return tokens[i].placeholder_l;if(tokens[i].type !== TokenType.PercentSign)return 0;if(l = checkIdentOrInterpolation(i + 1)){tokens[i].placeholder_l = l + 1;return l + 1;}else return 0;} /** + * Get node with a placeholder selector + * @returns {Array} `['placeholder', ['ident', x]]` where x is a placeholder's + * identifier (without `%`, e.g. `abc`). + */function getPlaceholder(){var startPos=pos;pos++;var x=getIdentOrInterpolation();var token=tokens[startPos];return newNode(NodeType.PlaceholderType,x,token.ln,token.col);} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkProgid(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(joinValues2(i,6) === 'progid:DXImageTransform.Microsoft.')i += 6;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(tokens[i].type === TokenType.LeftParenthesis){tokens[start].progid_end = tokens[i].right;i = tokens[i].right + 1;}else return 0;return i - start;} /** + * @returns {Array} + */function getProgid(){var startPos=pos;var progid_end=tokens[pos].progid_end;var x=joinValues(pos,progid_end);pos = progid_end + 1;var token=tokens[startPos];return newNode(NodeType.ProgidType,x,token.ln,token.col);} /** + * Check if token is part of a property + * @param {Number} i Token's index number + * @returns {Number} Length of the property + */function checkProperty(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkVariable(i) || checkIdentOrInterpolation(i))i += l;else return 0;return i - start;} /** + * Get node with a property + * @returns {Array} `['property', x]` + */function getProperty(){var startPos=pos;var x=[];if(checkVariable(pos)){x.push(getVariable());}else {x = x.concat(getIdentOrInterpolation());}var token=tokens[startPos];return newNode(NodeType.PropertyType,x,token.ln,token.col);} /** + * Check if token is a colon + * @param {Number} i Token's index number + * @returns {Number} `1` if token is a colon, otherwise `0` + */function checkPropertyDelim(i){return i < tokensLength && tokens[i].type === TokenType.Colon?1:0;} /** + * Get node with a colon + * @returns {Array} `['propertyDelim']` + */function getPropertyDelim(){var startPos=pos;pos++;var token=tokens[startPos];return newNode(NodeType.PropertyDelimType,':',token.ln,token.col);} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkPseudo(i){return checkPseudoe(i) || checkPseudoc(i);} /** + * @returns {Array} + */function getPseudo(){if(checkPseudoe(pos))return getPseudoe();if(checkPseudoc(pos))return getPseudoc();} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkPseudoe(i){var l;if(i >= tokensLength || tokens[i++].type !== TokenType.Colon || i >= tokensLength || tokens[i++].type !== TokenType.Colon)return 0;return (l = checkIdentOrInterpolation(i))?l + 2:0;} /** + * @returns {Array} + */function getPseudoe(){var startPos=pos;pos += 2;var x=getIdentOrInterpolation();var token=tokens[startPos];return newNode(NodeType.PseudoeType,x,token.ln,token.col);} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkPseudoc(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.Colon)return 0;if(l = checkPseudoClass3(i))tokens[i].pseudoClassType = 3;else if(l = checkPseudoClass4(i))tokens[i].pseudoClassType = 4;else if(l = checkPseudoClass5(i))tokens[i].pseudoClassType = 5;else if(l = checkPseudoClass1(i))tokens[i].pseudoClassType = 1;else if(l = checkPseudoClass2(i))tokens[i].pseudoClassType = 2;else if(l = checkPseudoClass6(i))tokens[i].pseudoClassType = 6;else return 0;return l;} /** + * @returns {Array} + */function getPseudoc(){var childType=tokens[pos].pseudoClassType;if(childType === 1)return getPseudoClass1();if(childType === 2)return getPseudoClass2();if(childType === 3)return getPseudoClass3();if(childType === 4)return getPseudoClass4();if(childType === 5)return getPseudoClass5();if(childType === 6)return getPseudoClass6();} /** + * (-) `:not(panda)` + */function checkPseudoClass1(i){var start=i; // Skip `:`. + i++;if(i >= tokensLength)return 0;var l=undefined;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. + i++;if(l = checkSelectorsGroup(i))i += l;else return 0;if(i !== right)return 0;return right - start + 1;} /** + * (-) `:not(panda)` + */function getPseudoClass1(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. + pos++;content = content.concat(getIdentOrInterpolation());{var _type=NodeType.ArgumentsType;var _token=tokens[pos];var _line=_token.ln;var _column=_token.col; // Skip `(`. + pos++;var selectors=getSelectorsGroup();var end=getLastPosition(selectors,_line,_column,1);var args=newNode(_type,selectors,_line,_column,end);content.push(args); // Skip `)`. + pos++;}return newNode(type,content,line,column);} /** + * (1) `:nth-child(odd)` + * (2) `:nth-child(even)` + * (3) `:lang(de-DE)` + */function checkPseudoClass2(i){var start=i;var l=0; // Skip `:`. + i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. + i++;if(l = checkSC(i))i += l;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass2(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. + pos++;content = content.concat(getIdentOrInterpolation());var l=tokens[pos].ln;var c=tokens[pos].col;var value=[]; // Skip `(`. + pos++;value = value.concat(getSC()).concat(getIdentOrInterpolation()).concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. + pos++;return newNode(type,content,line,column);} /** + * (-) `:nth-child(-3n + 2)` + */function checkPseudoClass3(i){var start=i;var l=0; // Skip `:`. + i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. + i++;if(l = checkSC(i))i += l;if(l = checkUnary(i))i += l;if(l = checkNumberOrInterpolation(i))i += l;if(i >= tokensLength)return 0;if(tokens[i].value === 'n')i++;else return 0;if(l = checkSC(i))i += l;if(i >= tokensLength)return 0;if(tokens[i].type === TokenType.PlusSign || tokens[i].type === TokenType.HyphenMinus)i++;else return 0;if(l = checkSC(i))i += l;if(l = checkNumberOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass3(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `:`. + pos++;var content=getIdentOrInterpolation();var l=tokens[pos].ln;var c=tokens[pos].col;var value=[]; // Skip `(`. + pos++;if(checkUnary(pos))value.push(getUnary());if(checkNumberOrInterpolation(pos))value = value.concat(getNumberOrInterpolation());{var _l=tokens[pos].ln;var _c=tokens[pos].col;var _content=tokens[pos].value;var ident=newNode(NodeType.IdentType,_content,_l,_c);value.push(ident);pos++;}value = value.concat(getSC());if(checkUnary(pos))value.push(getUnary());value = value.concat(getSC());if(checkNumberOrInterpolation(pos))value = value.concat(getNumberOrInterpolation());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. + pos++;return newNode(type,content,line,column);} /** + * (-) `:nth-child(-3n)` + */function checkPseudoClass4(i){var start=i;var l=0; // Skip `:`. + i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. + i++;if(l = checkSC(i))i += l; // Check for leading unary `-` + if(l = checkUnary(i))i += l; // Check for interpolation `#{i}` + if(l = checkInterpolation(i))i += l;if(tokens[i].type === TokenType.DecimalNumber)i++;if(tokens[i].value === 'n')i++;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass4(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `:`. + pos++;var content=getIdentOrInterpolation();var l=tokens[pos].ln;var c=tokens[pos].col;var value=[]; // Skip `(`. + pos++;value = value.concat(getSC());if(checkUnary(pos))value.push(getUnary());if(checkInterpolation(pos))value.push(getInterpolation());if(checkNumber(pos))value.push(getNumber());if(checkIdent(pos))value.push(getIdent());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. + pos++;return newNode(type,content,line,column);} /** + * (-) `:nth-child(+8)` + */function checkPseudoClass5(i){var start=i;var l=0; // Skip `:`. + i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. + i++;if(l = checkSC(i))i += l;if(l = checkUnary(i))i += l;if(tokens[i].type === TokenType.DecimalNumber)i++;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass5(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `:`. + pos++;var content=getIdentOrInterpolation();var l=tokens[pos].ln;var c=tokens[pos].col;var value=[]; // Skip `(`. + pos++;if(checkUnary(pos))value.push(getUnary());if(checkNumber(pos))value.push(getNumber());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. + pos++;return newNode(type,content,line,column);} /** + * (-) `:checked` + */function checkPseudoClass6(i){var start=i;var l=0; // Skip `:`. + i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;}function getPseudoClass6(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `:`. + pos++;var content=getIdentOrInterpolation();return newNode(type,content,line,column);} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkRuleset(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkSelectorsGroup(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;}function getRuleset(){var type=NodeType.RulesetType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];content = content.concat(getSelectorsGroup());content = content.concat(getSC());content.push(getBlock());return newNode(type,content,line,column);} /** + * Check if token is marked as a space (if it's a space or a tab + * or a line break). + * @param {Number} i + * @returns {Number} Number of spaces in a row starting with the given token. + */function checkS(i){return i < tokensLength && tokens[i].ws?tokens[i].ws_last - i + 1:0;} /** + * Get node with spaces + * @returns {Array} `['s', x]` where `x` is a string containing spaces + */function getS(){var startPos=pos;var x=joinValues(pos,tokens[pos].ws_last);pos = tokens[pos].ws_last + 1;var token=tokens[startPos];return newNode(NodeType.SType,x,token.ln,token.col);} /** + * Check if token is a space or a comment. + * @param {Number} i Token's index number + * @returns {Number} Number of similar (space or comment) tokens + * in a row starting with the given token. + */function checkSC(i){if(i >= tokensLength)return 0;var l=undefined;var lsc=0;while(i < tokensLength) {if(!(l = checkS(i)) && !(l = checkCommentML(i)) && !(l = checkCommentSL(i)))break;i += l;lsc += l;}return lsc || 0;} /** + * Get node with spaces and comments + * @returns {Array} Array containing nodes with spaces (if there are any) + * and nodes with comments (if there are any): + * `[['s', x]*, ['comment', y]*]` where `x` is a string of spaces + * and `y` is a comment's text (without `/*` and `* /`). + */function getSC(){var sc=[];if(pos >= tokensLength)return sc;while(pos < tokensLength) {if(checkS(pos))sc.push(getS());else if(checkCommentML(pos))sc.push(getCommentML());else if(checkCommentSL(pos))sc.push(getCommentSL());else break;}return sc;} /** + * Check if token is part of a hexadecimal number (e.g. `#fff`) inside + * a simple selector + * @param {Number} i Token's index number + * @returns {Number} + */function checkShash(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.NumberSign)return 0;return (l = checkIdentOrInterpolation(i + 1))?l + 1:0;} /** + * Get node with a hexadecimal number (e.g. `#fff`) inside a simple + * selector + * @returns {Array} `['shash', x]` where `x` is a hexadecimal number + * converted to string (without `#`, e.g. `fff`) + */function getShash(){var startPos=pos;var token=tokens[startPos];pos++;var x=getIdentOrInterpolation();return newNode(NodeType.ShashType,x,token.ln,token.col);} /** + * Check if token is part of a string (text wrapped in quotes) + * @param {Number} i Token's index number + * @returns {Number} `1` if token is part of a string, `0` if not + */function checkString(i){if(i >= tokensLength)return 0;if(tokens[i].type === TokenType.StringSQ || tokens[i].type === TokenType.StringDQ){return 1;}return 0;} /** + * Get string's node + * @returns {Array} `['string', x]` where `x` is a string (including + * quotes). + */function getString(){var startPos=pos;var x=tokens[pos++].value;var token=tokens[startPos];return newNode(NodeType.StringType,x,token.ln,token.col);} /** + * Validate stylesheet: it should consist of any number (0 or more) of + * rulesets (sets of rules with selectors), @-rules, whitespaces or + * comments. + * @param {Number} i Token's index number + * @returns {Number} + */function checkStylesheet(i){var start=i;var l=undefined;while(i < tokensLength) {if(l = checkSC(i) || checkDeclaration(i) || checkDeclDelim(i) || checkInclude(i) || checkExtend(i) || checkMixin(i) || checkLoop(i) || checkConditionalStatement(i) || checkAtrule(i) || checkRuleset(i))i += l;else throwError(i);}return i - start;} /** + * @returns {Array} `['stylesheet', x]` where `x` is all stylesheet's + * nodes. + */function getStylesheet(){var startPos=pos;var x=[];while(pos < tokensLength) {if(checkSC(pos))x = x.concat(getSC());else if(checkRuleset(pos))x.push(getRuleset());else if(checkInclude(pos))x.push(getInclude());else if(checkExtend(pos))x.push(getExtend());else if(checkMixin(pos))x.push(getMixin());else if(checkLoop(pos))x.push(getLoop());else if(checkConditionalStatement(pos))x.push(getConditionalStatement());else if(checkAtrule(pos))x.push(getAtrule());else if(checkDeclaration(pos))x.push(getDeclaration());else if(checkDeclDelim(pos))x.push(getDeclDelim());else throwError();}var token=tokens[startPos];return newNode(NodeType.StylesheetType,x,token.ln,token.col);} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkTset(i){return checkVhash(i) || checkOperator(i) || checkAny(i) || checkSC(i) || checkInterpolation(i);} /** + * @returns {Array} + */function getTset(){if(checkVhash(pos))return getVhash();else if(checkOperator(pos))return getOperator();else if(checkAny(pos))return getAny();else if(checkSC(pos))return getSC();else if(checkInterpolation(pos))return getInterpolation();} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkTsets(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;while(l = checkTset(i)) {i += l;}return i - start;} /** + * @returns {Array} + */function getTsets(){var x=[];var t=undefined;while(t = getTset()) {if(typeof t.content === 'string')x.push(t);else x = x.concat(t);}return x;} /** + * Check if token is an unary (arithmetical) sign (`+` or `-`) + * @param {Number} i Token's index number + * @returns {Number} `1` if token is an unary sign, `0` if not + */function checkUnary(i){if(i >= tokensLength){return 0;}if(tokens[i].type === TokenType.HyphenMinus || tokens[i].type === TokenType.PlusSign){return 1;}return 0;} /** + * Get node with an unary (arithmetical) sign (`+` or `-`) + * @returns {Array} `['unary', x]` where `x` is an unary sign + * converted to string. + */function getUnary(){var startPos=pos;var x=tokens[pos++].value;var token=tokens[startPos];return newNode(NodeType.OperatorType,x,token.ln,token.col);} /** + * Check if token is a unicode range (single or multiple nodes) + * @param {number} i Token's index + * @return {number} Unicode range node's length + */function checkUnicodeRange(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkUrange(i))i += l;else return 0;while(i < tokensLength) {var spaceBefore=checkSC(i);var comma=checkDelim(i + spaceBefore);if(!comma)break;var spaceAfter=checkSC(i + spaceBefore + comma);if(l = checkUrange(i + spaceBefore + comma + spaceAfter)){i += spaceBefore + comma + spaceAfter + l;}else break;}return i - start;} /** + * Get a unicode range node + * @return {Node} + */function getUnicodeRange(){var type=NodeType.UnicodeRangeType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];while(pos < tokensLength) {if(checkSC(pos))content = content.concat(getSC());else if(checkDelim(pos))content.push(getDelim());else if(checkUrange(pos))content.push(getUrange());else break;}return newNode(type,content,line,column);} /** + * Check if token is a u-range (part of a unicode-range) + * (1) `U+416` + * (2) `U+400-4ff` + * (3) `U+4??` + * @param {number} i Token's index + * @return {number} Urange node's length + */function checkUrange(i){var start=i;var l=undefined;if(i >= tokensLength)return 0; // Check for unicode prefix (u+ or U+) + if(tokens[i].value === 'U' || tokens[i].value === 'u')i += 1;else return 0;if(i >= tokensLength)return 0;if(tokens[i].value === '+')i += 1;else return 0;while(i < tokensLength) {if(l = checkIdent(i))i += l;else if(l = checkNumber(i))i += l;else if(l = checkUnary(i))i += l;else if(l = _checkUnicodeWildcard(i))i += l;else break;}tokens[start].urangeEnd = i - 1;return i - start;} /** + * Get a u-range node (part of a unicode-range) + * @return {Node} + */function getUrange(){var startPos=pos;var type=NodeType.UrangeType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];content = joinValues(startPos,tokens[startPos].urangeEnd);pos = tokens[startPos].urangeEnd + 1;return newNode(type,content,line,column);} /** + * Check for unicode wildcard characters `?` + * @param {number} i Token's index + * @return {number} Wildcard length + */function _checkUnicodeWildcard(i){var start=i;if(i >= tokensLength)return 0;while(i < tokensLength) {if(tokens[i].type === TokenType.QuestionMark)i += 1;else break;}return i - start;} /** + * Check if token is part of URI (e.g. `url('/css/styles.css')`) + * @param {Number} i Token's index number + * @returns {Number} Length of URI + */function checkUri(i){var start=i;if(i >= tokensLength || tokens[i++].value !== 'url' || i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;return tokens[i].right - start + 1;} /** + * Get node with URI + * @returns {Array} `['uri', x]` where `x` is URI's nodes (without `url` + * and braces, e.g. `['string', ''/css/styles.css'']`). + */function getUri(){var startPos=pos;var uriExcluding={};var uri=undefined;var token=undefined;var l=undefined;var raw=undefined;pos += 2;uriExcluding[TokenType.Space] = 1;uriExcluding[TokenType.Tab] = 1;uriExcluding[TokenType.Newline] = 1;uriExcluding[TokenType.LeftParenthesis] = 1;uriExcluding[TokenType.RightParenthesis] = 1;if(checkUriContent(pos)){uri = [].concat(getSC()).concat(getUriContent()).concat(getSC());}else {uri = [].concat(getSC());l = checkExcluding(uriExcluding,pos);token = tokens[pos];raw = newNode(NodeType.RawType,joinValues(pos,pos + l),token.ln,token.col);uri.push(raw);pos += l + 1;uri = uri.concat(getSC());}token = tokens[startPos];var line=token.ln;var column=token.col;var end=getLastPosition(uri,line,column,1);pos++;return newNode(NodeType.UriType,uri,token.ln,token.col,end);} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkUriContent(i){return checkUri1(i) || checkFunction(i);} /** + * @returns {Array} + */function getUriContent(){if(checkUri1(pos))return getString();else if(checkFunction(pos))return getFunction();} /** + * @param {Number} i Token's index number + * @returns {Number} + */function checkUri1(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkSC(i))i += l;if(tokens[i].type !== TokenType.StringDQ && tokens[i].type !== TokenType.StringSQ)return 0;i++;if(l = checkSC(i))i += l;return i - start;} /** + * Check if token is part of a value + * @param {Number} i Token's index number + * @returns {Number} Length of the value + */function checkValue(i){var start=i;var l=undefined;var s=undefined;var _i=undefined;while(i < tokensLength) {if(checkDeclDelim(i))break;s = checkSC(i);_i = i + s;if(l = _checkValue(_i))i += l + s;if(!l || checkBlock(i - l))break;}return i - start;} /** + * @param {Number} i Token's index number + * @returns {Number} + */function _checkValue(i){return checkInterpolation(i) || checkVariable(i) || checkVhash(i) || checkBlock(i) || checkAtkeyword(i) || checkOperator(i) || checkImportant(i) || checkGlobal(i) || checkDefault(i) || checkProgid(i) || checkAny(i) || checkParentSelector(i);} /** + * @returns {Array} + */function getValue(){var startPos=pos;var x=[];var _pos=undefined;var s=undefined;while(pos < tokensLength) {s = checkSC(pos);_pos = pos + s;if(checkDeclDelim(_pos))break;if(!_checkValue(_pos))break;if(s)x = x.concat(getSC());x.push(_getValue());if(checkBlock(_pos))break;}var token=tokens[startPos];return newNode(NodeType.ValueType,x,token.ln,token.col);} /** + * @returns {Array} + */function _getValue(){if(checkInterpolation(pos))return getInterpolation();else if(checkVariable(pos))return getVariable();else if(checkVhash(pos))return getVhash();else if(checkBlock(pos))return getBlock();else if(checkAtkeyword(pos))return getAtkeyword();else if(checkOperator(pos))return getOperator();else if(checkImportant(pos))return getImportant();else if(checkGlobal(pos))return getGlobal();else if(checkDefault(pos))return getDefault();else if(checkProgid(pos))return getProgid();else if(checkAny(pos))return getAny();else if(checkParentSelector(pos))return getParentSelector();} /** + * Check if token is part of a variable + * @param {Number} i Token's index number + * @returns {Number} Length of the variable + */function checkVariable(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.DollarSign)return 0;return (l = checkIdent(i + 1))?l + 1:0;} /** + * Get node with a variable + * @returns {Array} `['variable', ['ident', x]]` where `x` is + * a variable name. + */function getVariable(){var startPos=pos;var x=[];pos++;x.push(getIdent());var token=tokens[startPos];return newNode(NodeType.VariableType,x,token.ln,token.col);} /** + * Check if token is part of a variables list (e.g. `$values...`). + * @param {Number} i Token's index number + * @returns {Number} + */function checkVariablesList(i){var d=0; // Number of dots + var l=undefined;if(i >= tokensLength)return 0;if(l = checkVariable(i))i += l;else return 0;while(i < tokensLength && tokens[i].type === TokenType.FullStop) {d++;i++;}return d === 3?l + d:0;} /** + * Get node with a variables list + * @returns {Array} `['variableslist', ['variable', ['ident', x]]]` where + * `x` is a variable name. + */function getVariablesList(){var startPos=pos;var x=getVariable();var token=tokens[startPos];var line=token.ln;var column=token.col;var end=getLastPosition([x],line,column,3);pos += 3;return newNode(NodeType.VariablesListType,[x],token.ln,token.col,end);} /** + * Check if token is part of a hexadecimal number (e.g. `#fff`) inside + * some value + * @param {Number} i Token's index number + * @returns {Number} + */function checkVhash(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.NumberSign)return 0;return (l = checkNmName2(i + 1))?l + 1:0;} /** + * Get node with a hexadecimal number (e.g. `#fff`) inside some value + * @returns {Array} `['vhash', x]` where `x` is a hexadecimal number + * converted to string (without `#`, e.g. `'fff'`). + */function getVhash(){var startPos=pos;var x=undefined;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;x = getNmName2();var end=getLastPosition(x,line,column + 1);return newNode(NodeType.VhashType,x,token.ln,token.col,end);}module.exports = function(_tokens,context){tokens = _tokens;tokensLength = tokens.length;pos = 0;return contexts[context]();};function checkSelectorsGroup(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkSelector(i))i += l;else return 0;while(i < tokensLength) {var sb=checkSC(i);var c=checkDelim(i + sb);if(!c)break;var sa=checkSC(i + sb + c);if(l = checkSelector(i + sb + c + sa))i += sb + c + sa + l;else break;}tokens[start].selectorsGroupEnd = i;return i - start;}function getSelectorsGroup(){var selectorsGroup=[];var selectorsGroupEnd=tokens[pos].selectorsGroupEnd;selectorsGroup.push(getSelector());while(pos < selectorsGroupEnd) {selectorsGroup = selectorsGroup.concat(getSC());selectorsGroup.push(getDelim());selectorsGroup = selectorsGroup.concat(getSC());selectorsGroup.push(getSelector());}return selectorsGroup;}function checkSelector(i){var l;if(l = checkSelector1(i))tokens[i].selectorType = 1;else if(l = checkSelector2(i))tokens[i].selectorType = 2;return l;}function getSelector(){var selectorType=tokens[pos].selectorType;if(selectorType === 1)return getSelector1();else return getSelector2();} /** + * Checks for selector which starts with a compound selector. + */function checkSelector1(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkCompoundSelector(i))i += l;else return 0;while(i < tokensLength) {var s=checkSC(i);var c=checkCombinator(i + s);if(!s && !c)break;if(c){i += s + c;s = checkSC(i);}if(l = checkCompoundSelector(i + s))i += s + l;else break;}tokens[start].selectorEnd = i;return i - start;}function getSelector1(){var type=NodeType.SelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var selectorEnd=token.selectorEnd;var content=getCompoundSelector();while(pos < selectorEnd) {if(checkSC(pos))content = content.concat(getSC());else if(checkCombinator(pos))content.push(getCombinator());else if(checkCompoundSelector(pos))content = content.concat(getCompoundSelector());}return newNode(type,content,line,column);} /** + * Checks for a selector that starts with a combinator. + */function checkSelector2(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkCombinator(i))i += l;else return 0;while(i < tokensLength) {var sb=checkSC(i);if(l = checkCompoundSelector(i + sb))i += sb + l;else break;var sa=checkSC(i);var c=checkCombinator(i + sa);if(!sa && !c)break;if(c){i += sa + c;}}tokens[start].selectorEnd = i;return i - start;}function getSelector2(){var type=NodeType.SelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var selectorEnd=token.selectorEnd;var content=[getCombinator()];while(pos < selectorEnd) {if(checkSC(pos))content = content.concat(getSC());else if(checkCombinator(pos))content.push(getCombinator());else if(checkCompoundSelector(pos))content = content.concat(getCompoundSelector());}return newNode(type,content,line,column);}function checkCompoundSelector(i){var l=undefined;if(l = checkCompoundSelector1(i)){tokens[i].compoundSelectorType = 1;}else if(l = checkCompoundSelector2(i)){tokens[i].compoundSelectorType = 2;}return l;}function getCompoundSelector(){var type=tokens[pos].compoundSelectorType;if(type === 1)return getCompoundSelector1();if(type === 2)return getCompoundSelector2();} /** + * Check for compound selectors that start with either a type selector, + * placeholder or parent selector with extension + * (1) `foo.bar` + * (2) `foo[attr=val]` + * (3) `foo:first-of-type` + * (4) `foo%bar` + * @param {number} i Token's index + * @return {number} Compound selector's length + */function checkCompoundSelector1(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkTypeSelector(i) || checkPlaceholder(i) || checkParentSelectorWithExtension(i))i += l;else return 0;while(i < tokensLength) {var _l2=checkShash(i) || checkClass(i) || checkAttributeSelector(i) || checkPseudo(i) || checkPlaceholder(i);if(_l2)i += _l2;else break;}tokens[start].compoundSelectorEnd = i;return i - start;} /** + * @return {Array} An array of nodes that make up the compound selector + */function getCompoundSelector1(){var sequence=[];var compoundSelectorEnd=tokens[pos].compoundSelectorEnd;if(checkTypeSelector(pos))sequence.push(getTypeSelector());else if(checkPlaceholder(pos))sequence.push(getPlaceholder());else if(checkParentSelectorWithExtension(pos))sequence = sequence.concat(getParentSelectorWithExtension());while(pos < compoundSelectorEnd) {if(checkShash(pos))sequence.push(getShash());else if(checkClass(pos))sequence.push(getClass());else if(checkAttributeSelector(pos))sequence.push(getAttributeSelector());else if(checkPseudo(pos))sequence.push(getPseudo());else if(checkPlaceholder(pos))sequence.push(getPlaceholder());else break;}return sequence;} /** + * Check for all other compound selectors + * (1) `.foo.bar` + * (2) `.foo[attr=val]` + * (3) `.foo:first-of-type` + * (4) `.foo%bar` + * (5) `.foo#{$bar}` + * @param {number} i Token's index + * @return {number} Compound selector's length + */function checkCompoundSelector2(i){if(i >= tokensLength)return 0;var start=i;while(i < tokensLength) {var l=checkShash(i) || checkClass(i) || checkAttributeSelector(i) || checkPseudo(i) || checkPlaceholder(i) || checkInterpolation(i);if(l)i += l;else break;}tokens[start].compoundSelectorEnd = i;return i - start;} /** + * @return {Array} An array of nodes that make up the compound selector + */function getCompoundSelector2(){var sequence=[];var compoundSelectorEnd=tokens[pos].compoundSelectorEnd;while(pos < compoundSelectorEnd) {if(checkShash(pos))sequence.push(getShash());else if(checkClass(pos))sequence.push(getClass());else if(checkAttributeSelector(pos))sequence.push(getAttributeSelector());else if(checkPseudo(pos))sequence.push(getPseudo());else if(checkPlaceholder(pos))sequence.push(getPlaceholder());else if(checkInterpolation(pos))sequence.push(getInterpolation());else break;}return sequence;}function checkTypeSelector(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkNamePrefix(i))i += l;if(tokens[i].type === TokenType.Asterisk)i++;else if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;}function getTypeSelector(){var type=NodeType.TypeSelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkNamePrefix(pos))content.push(getNamePrefix());token = tokens[pos];if(token.type === TokenType.Asterisk){var asteriskNode=newNode(NodeType.IdentType,'*',token.ln,token.col);content.push(asteriskNode);pos++;}else if(checkIdentOrInterpolation(pos))content = content.concat(getIdentOrInterpolation());return newNode(type,content,line,column);}function checkAttributeSelector(i){var l=undefined;if(l = checkAttributeSelector1(i))tokens[i].attributeSelectorType = 1;else if(l = checkAttributeSelector2(i))tokens[i].attributeSelectorType = 2;return l;}function getAttributeSelector(){var type=tokens[pos].attributeSelectorType;if(type === 1)return getAttributeSelector1();else return getAttributeSelector2();} /** + * (1) `[panda=nani]` + * (2) `[panda='nani']` + * (3) `[panda='nani' i]` + * + */function checkAttributeSelector1(i){var start=i;if(tokens[i].type === TokenType.LeftSquareBracket)i++;else return 0;var l=undefined;if(l = checkSC(i))i += l;if(l = checkAttributeName(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkAttributeMatch(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkAttributeValue(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkAttributeFlags(i)){i += l;if(l = checkSC(i))i += l;}if(tokens[i].type === TokenType.RightSquareBracket)i++;else return 0;return i - start;}function getAttributeSelector1(){var type=NodeType.AttributeSelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `[`. + pos++;content = content.concat(getSC());content.push(getAttributeName());content = content.concat(getSC());content.push(getAttributeMatch());content = content.concat(getSC());content.push(getAttributeValue());content = content.concat(getSC());if(checkAttributeFlags(pos)){content.push(getAttributeFlags());content = content.concat(getSC());} // Skip `]`. + pos++;var end=getLastPosition(content,line,column,1);return newNode(type,content,line,column,end);} /** + * (1) `[panda]` + */function checkAttributeSelector2(i){var start=i;if(tokens[i].type === TokenType.LeftSquareBracket)i++;else return 0;var l=undefined;if(l = checkSC(i))i += l;if(l = checkAttributeName(i))i += l;else return 0;if(l = checkSC(i))i += l;if(tokens[i].type === TokenType.RightSquareBracket)i++;else return 0;return i - start;}function getAttributeSelector2(){var type=NodeType.AttributeSelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `[`. + pos++;content = content.concat(getSC());content.push(getAttributeName());content = content.concat(getSC()); // Skip `]`. + pos++;var end=getLastPosition(content,line,column,1);return newNode(type,content,line,column,end);}function checkAttributeName(i){var start=i;var l=undefined;if(l = checkNamePrefix(i))i += l;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;}function getAttributeName(){var type=NodeType.AttributeNameType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkNamePrefix(pos))content.push(getNamePrefix());content = content.concat(getIdentOrInterpolation());return newNode(type,content,line,column);}function checkAttributeMatch(i){var l=undefined;if(l = checkAttributeMatch1(i))tokens[i].attributeMatchType = 1;else if(l = checkAttributeMatch2(i))tokens[i].attributeMatchType = 2;return l;}function getAttributeMatch(){var type=tokens[pos].attributeMatchType;if(type === 1)return getAttributeMatch1();else return getAttributeMatch2();}function checkAttributeMatch1(i){var start=i;var type=tokens[i].type;if(type === TokenType.Tilde || type === TokenType.VerticalLine || type === TokenType.CircumflexAccent || type === TokenType.DollarSign || type === TokenType.Asterisk)i++;else return 0;if(tokens[i].type === TokenType.EqualsSign)i++;else return 0;return i - start;}function getAttributeMatch1(){var type=NodeType.AttributeMatchType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=tokens[pos].value + tokens[pos + 1].value;pos += 2;return newNode(type,content,line,column);}function checkAttributeMatch2(i){if(tokens[i].type === TokenType.EqualsSign)return 1;else return 0;}function getAttributeMatch2(){var type=NodeType.AttributeMatchType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='=';pos++;return newNode(type,content,line,column);}function checkAttributeValue(i){return checkString(i) || checkIdentOrInterpolation(i);}function getAttributeValue(){var type=NodeType.AttributeValueType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkString(pos))content.push(getString());else content = content.concat(getIdentOrInterpolation());return newNode(type,content,line,column);}function checkAttributeFlags(i){return checkIdentOrInterpolation(i);}function getAttributeFlags(){var type=NodeType.AttributeFlagsType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=getIdentOrInterpolation();return newNode(type,content,line,column);}function checkNamePrefix(i){if(i >= tokensLength)return 0;var l=undefined;if(l = checkNamePrefix1(i))tokens[i].namePrefixType = 1;else if(l = checkNamePrefix2(i))tokens[i].namePrefixType = 2;return l;}function getNamePrefix(){var type=tokens[pos].namePrefixType;if(type === 1)return getNamePrefix1();else return getNamePrefix2();} /** + * (1) `panda|` + * (2) `panda|` + */function checkNamePrefix1(i){var start=i;var l=undefined;if(l = checkNamespacePrefix(i))i += l;else return 0;if(l = checkCommentML(i))i += l;if(l = checkNamespaceSeparator(i))i += l;else return 0;return i - start;}function getNamePrefix1(){var type=NodeType.NamePrefixType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];content.push(getNamespacePrefix());if(checkCommentML(pos))content.push(getCommentML());content.push(getNamespaceSeparator());return newNode(type,content,line,column);} /** + * (1) `|` + */function checkNamePrefix2(i){return checkNamespaceSeparator(i);}function getNamePrefix2(){var type=NodeType.NamePrefixType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[getNamespaceSeparator()];return newNode(type,content,line,column);} /** + * (1) `*` + * (2) `panda` + */function checkNamespacePrefix(i){if(i >= tokensLength)return 0;var l=undefined;if(tokens[i].type === TokenType.Asterisk)return 1;else if(l = checkIdentOrInterpolation(i))return l;else return 0;}function getNamespacePrefix(){var type=NodeType.NamespacePrefixType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(token.type === TokenType.Asterisk){var asteriskNode=newNode(NodeType.IdentType,'*',token.ln,token.col);content.push(asteriskNode);pos++;}else if(checkIdentOrInterpolation(pos))content = content.concat(getIdentOrInterpolation());return newNode(type,content,line,column);} /** + * (1) `|` + */function checkNamespaceSeparator(i){if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.VerticalLine)return 0; // Return false if `|=` - [attr|=value] + if(tokens[i + 1] && tokens[i + 1].type === TokenType.EqualsSign)return 0;return 1;}function getNamespaceSeparator(){var type=NodeType.NamespaceSeparatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='|';pos++;return newNode(type,content,line,column);} + +/***/ }, +/* 28 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + module.exports = function (css, tabSize) { + var TokenType = __webpack_require__(13); + + var tokens = []; + var urlMode = false; + var c = undefined; // Current character + var cn = undefined; // Next character + var pos = 0; + var tn = 0; + var ln = 1; + var col = 1; + + var Punctuation = { + ' ': TokenType.Space, + '\n': TokenType.Newline, + '\r': TokenType.Newline, + '\t': TokenType.Tab, + '!': TokenType.ExclamationMark, + '"': TokenType.QuotationMark, + '#': TokenType.NumberSign, + '$': TokenType.DollarSign, + '%': TokenType.PercentSign, + '&': TokenType.Ampersand, + '\'': TokenType.Apostrophe, + '(': TokenType.LeftParenthesis, + ')': TokenType.RightParenthesis, + '*': TokenType.Asterisk, + '+': TokenType.PlusSign, + ',': TokenType.Comma, + '-': TokenType.HyphenMinus, + '.': TokenType.FullStop, + '/': TokenType.Solidus, + ':': TokenType.Colon, + ';': TokenType.Semicolon, + '<': TokenType.LessThanSign, + '=': TokenType.EqualsSign, + '==': TokenType.EqualitySign, + '!=': TokenType.InequalitySign, + '>': TokenType.GreaterThanSign, + '?': TokenType.QuestionMark, + '@': TokenType.CommercialAt, + '[': TokenType.LeftSquareBracket, + ']': TokenType.RightSquareBracket, + '^': TokenType.CircumflexAccent, + '_': TokenType.LowLine, + '{': TokenType.LeftCurlyBracket, + '|': TokenType.VerticalLine, + '}': TokenType.RightCurlyBracket, + '~': TokenType.Tilde + }; + + /** + * Add a token to the token list + * @param {string} type + * @param {string} value + */ + function pushToken(type, value, column) { + tokens.push({ + tn: tn++, + ln: ln, + col: column, + type: type, + value: value + }); + } + + /** + * Check if a character is a decimal digit + * @param {string} c Character + * @returns {boolean} + */ + function isDecimalDigit(c) { + return '0123456789'.indexOf(c) >= 0; + } + + /** + * Parse spaces + * @param {string} css Unparsed part of CSS string + */ + function parseSpaces(css) { + var start = pos; + + // Read the string until we meet a non-space character: + for (; pos < css.length; pos++) { + if (css.charAt(pos) !== ' ') break; + } + + // Add a substring containing only spaces to tokens: + pushToken(TokenType.Space, css.substring(start, pos--), col); + col += pos - start; + } + + /** + * Parse a string within quotes + * @param {string} css Unparsed part of CSS string + * @param {string} q Quote (either `'` or `"`) + */ + function parseString(css, q) { + var start = pos; + + // Read the string until we meet a matching quote: + for (pos++; pos < css.length; pos++) { + // Skip escaped quotes: + if (css.charAt(pos) === '\\') pos++;else if (css.charAt(pos) === q) break; + } + + // Add the string (including quotes) to tokens: + var type = q === '"' ? TokenType.StringDQ : TokenType.StringSQ; + pushToken(type, css.substring(start, pos + 1), col); + col += pos - start; + } + + /** + * Parse numbers + * @param {string} css Unparsed part of CSS string + */ + function parseDecimalNumber(css) { + var start = pos; + + // Read the string until we meet a character that's not a digit: + for (; pos < css.length; pos++) { + if (!isDecimalDigit(css.charAt(pos))) break; + } + + // Add the number to tokens: + pushToken(TokenType.DecimalNumber, css.substring(start, pos--), col); + col += pos - start; + } + + /** + * Parse identifier + * @param {string} css Unparsed part of CSS string + */ + function parseIdentifier(css) { + var start = pos; + + // Skip all opening slashes: + while (css.charAt(pos) === '/') pos++; + + // Read the string until we meet a punctuation mark: + for (; pos < css.length; pos++) { + // Skip all '\': + if (css.charAt(pos) === '\\') pos++;else if (css.charAt(pos) in Punctuation) break; + } + + var ident = css.substring(start, pos--); + + // Enter url mode if parsed substring is `url`: + if (!urlMode && ident === 'url' && css.charAt(pos + 1) === '(') { + urlMode = true; + } + + // Add identifier to tokens: + pushToken(TokenType.Identifier, ident, col); + col += pos - start; + } + + /** + * Parse equality sign + */ + function parseEquality() { + pushToken(TokenType.EqualitySign, '==', col); + pos++; + col++; + } + + /** + * Parse inequality sign + */ + function parseInequality() { + pushToken(TokenType.InequalitySign, '!=', col); + pos++; + col++; + } + + /** + * Parse a multiline comment + * @param {string} css Unparsed part of CSS string + */ + function parseMLComment(css) { + var start = pos; + + // Read the string until we meet `*/`. + // Since we already know first 2 characters (`/*`), start reading + // from `pos + 2`: + for (pos += 2; pos < css.length; pos++) { + if (css.charAt(pos) === '*' && css.charAt(pos + 1) === '/') { + pos++; + break; + } + } + + // Add full comment (including `/*` and `*/`) to the list of tokens: + var comment = css.substring(start, pos + 1); + pushToken(TokenType.CommentML, comment, col); + + var newlines = comment.split('\n'); + if (newlines.length > 1) { + ln += newlines.length - 1; + col = newlines[newlines.length - 1].length; + } else { + col += pos - start; + } + } + + /** + * Parse a single line comment + * @param {string} css Unparsed part of CSS string + */ + function parseSLComment(css) { + var start = pos; + + // Read the string until we meet line break. + // Since we already know first 2 characters (`//`), start reading + // from `pos + 2`: + for (pos += 2; pos < css.length; pos++) { + if (css.charAt(pos) === '\n' || css.charAt(pos) === '\r') { + break; + } + } + + // Add comment (including `//` and line break) to the list of tokens: + pushToken(TokenType.CommentSL, css.substring(start, pos--), col); + col += pos - start; + } + + /** + * Convert a CSS string to a list of tokens + * @param {string} css CSS string + * @returns {Array} List of tokens + * @private + */ + function getTokens(css) { + // Parse string, character by character: + for (pos = 0; pos < css.length; col++, pos++) { + c = css.charAt(pos); + cn = css.charAt(pos + 1); + + // If we meet `/*`, it's a start of a multiline comment. + // Parse following characters as a multiline comment: + if (c === '/' && cn === '*') { + parseMLComment(css); + } + + // If we meet `//` and it is not a part of url: + else if (!urlMode && c === '/' && cn === '/') { + // If we're currently inside a block, treat `//` as a start + // of identifier. Else treat `//` as a start of a single-line + // comment: + parseSLComment(css); + } + + // If current character is a double or single quote, it's a start + // of a string: + else if (c === '"' || c === "'") { + parseString(css, c); + } + + // If current character is a space: + else if (c === ' ') { + parseSpaces(css); + } + + // If current character is `=`, it must be combined with next `=` + else if (c === '=' && cn === '=') { + parseEquality(css); + } + + // If we meet `!=`, this must be inequality + else if (c === '!' && cn === '=') { + parseInequality(css); + } + + // If current character is a punctuation mark: + else if (c in Punctuation) { + // Check for CRLF here or just LF + if (c === '\r' && cn === '\n' || c === '\n') { + // If \r we know the next character is \n due to statement above + // so we push a CRLF token type to the token list and importantly + // skip the next character so as not to double count newlines or + // columns etc + if (c === '\r') { + pushToken(TokenType.Newline, '\r\n', col); + pos++; // If CRLF skip the next character and push crlf token + } else if (c === '\n') { + // If just a LF newline and not part of CRLF newline we can just + // push punctuation as usual + pushToken(Punctuation[c], c, col); + } + + ln++; // Go to next line + col = 0; // Reset the column count + } else if (c !== '\r' && c !== '\n') { + // Handle all other punctuation and add to list of tokens + pushToken(Punctuation[c], c, col); + } // Go to next line + if (c === ')') urlMode = false; // Exit url mode + else if (c === '\t' && tabSize > 1) col += tabSize - 1; + } + + // If current character is a decimal digit: + else if (isDecimalDigit(c)) { + parseDecimalNumber(css); + } + + // If current character is anything else: + else { + parseIdentifier(css); + } + } + + return tokens; + } + + return getTokens(css); + }; + +/***/ }, +/* 29 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var Node = __webpack_require__(1); + var NodeTypes = __webpack_require__(15); + + module.exports = function () { + return new Node({ + type: NodeTypes.StylesheetType, + content: [], + start: [0, 0], + end: [0, 0] + }); + }; + +/***/ } +/******/ ]) +}); +; \ No newline at end of file diff --git a/node_modules/gonzales-pe/package.json b/node_modules/gonzales-pe/package.json new file mode 100644 index 0000000..681da00 --- /dev/null +++ b/node_modules/gonzales-pe/package.json @@ -0,0 +1,49 @@ +{ + "name": "gonzales-pe", + "description": "Gonzales Preprocessor Edition (fast CSS parser)", + "version": "3.4.7", + "homepage": "http://github.com/tonyganch/gonzales-pe", + "bugs": "http://github.com/tonyganch/gonzales-pe/issues", + "license": "MIT", + "author": { + "name": "Tony Ganch", + "email": "tonyganch+github@gmail.com", + "url": "http://tonyganch.com" + }, + "main": "./lib/gonzales", + "repository": { + "type": "git", + "url": "http://github.com/tonyganch/gonzales-pe.git" + }, + "scripts": { + "autofix-tests": "bash ./scripts/build.sh && bash ./scripts/autofix-tests.sh", + "build": "bash ./scripts/build.sh", + "init": "bash ./scripts/init.sh", + "lint": "bash ./scripts/lint.sh", + "log": "bash ./scripts/log.sh", + "prepublish": "bash ./scripts/prepublish.sh", + "postpublish": "bash ./scripts/postpublish.sh", + "test": "bash ./scripts/test.sh", + "watch": "bash ./scripts/watch.sh" + }, + "bin": { + "gonzales": "./bin/gonzales.js" + }, + "dependencies": { + "minimist": "1.1.x" + }, + "devDependencies": { + "babel-loader": "^5.3.2", + "coffee-script": "~1.7.1", + "eslint": "^3.0.0", + "jscs": "2.1.0", + "jshint": "2.8.0", + "json-loader": "^0.5.3", + "mocha": "2.2.x", + "webpack": "^1.12.2", + "webpack-closure-compiler": "^2.0.2" + }, + "engines": { + "node": ">=0.6.0" + } +} diff --git a/node_modules/gonzales-pe/tags b/node_modules/gonzales-pe/tags new file mode 100644 index 0000000..730eb83 --- /dev/null +++ b/node_modules/gonzales-pe/tags @@ -0,0 +1,19 @@ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ +!_TAG_PROGRAM_NAME Exuberant Ctags // +!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ +!_TAG_PROGRAM_VERSION 5.8 // +ISTANBUL node_modules/Base64/Makefile /^ISTANBUL = node_modules\/.bin\/istanbul$/;" m +UGLIFYJS node_modules/Base64/Makefile /^UGLIFYJS = node_modules\/.bin\/uglifyjs$/;" m +XYZ node_modules/Base64/Makefile /^XYZ = node_modules\/.bin\/xyz --message X.Y.Z --tag X.Y.Z$/;" m +SRC node_modules/Base64/Makefile /^SRC = base64.js$/;" m +MIN node_modules/Base64/Makefile /^MIN = $(patsubst %.js,%.min.js,$(SRC))$/;" m +cliWidth node_modules/cli-width/coverage/lcov-report/cli-width/index.js.html /^function cliWidth() {$/;" f +require node_modules/clone/test.html /^ function require(moduleName) {$/;" f +log node_modules/clone/test.html /^ function log(str) {$/;" f +isUndefinedOrNull node_modules/clone/test.html /^ function isUndefinedOrNull(value) {$/;" f +isArguments node_modules/clone/test.html /^ function isArguments(object) {$/;" f +objEquiv node_modules/clone/test.html /^ function objEquiv(a, b) {$/;" f +_deepEqual node_modules/clone/test.html /^ function _deepEqual(actual, expected) {$/;" f +incFinished node_modules/clone/test.html /^ function incFinished() {$/;" f diff --git a/node_modules/gonzales-pe/webpack.config.js b/node_modules/gonzales-pe/webpack.config.js new file mode 100644 index 0000000..9b52d0f --- /dev/null +++ b/node_modules/gonzales-pe/webpack.config.js @@ -0,0 +1,24 @@ +module.exports = { + entry: { + gonzales: './src/gonzales' + }, + output: { + filename: 'gonzales.js', + library: 'gonzales', + libraryTarget: 'umd', + path: __dirname + '/lib' + }, + module: { + loaders: [ + { + test: /\.js?$/, + exclude: /node_modules/, + loader: 'babel', + query: { + loose: 'all', + blacklist: 'spec.functionName' + } + } + ] + } +}; diff --git a/node_modules/graceful-fs/README.md b/node_modules/graceful-fs/README.md index d0dcd49..5273a50 100644 --- a/node_modules/graceful-fs/README.md +++ b/node_modules/graceful-fs/README.md @@ -7,7 +7,7 @@ The improvements are meant to normalize behavior across different platforms and environments, and to make filesystem access more resilient to errors. -## Improvements over [fs module](http://api.nodejs.org/fs.html) +## Improvements over [fs module](https://nodejs.org/api/fs.html) * Queues up `open` and `readdir` calls, and retries them once something closes if there is an EMFILE error from too many file diff --git a/node_modules/graceful-fs/graceful-fs.js b/node_modules/graceful-fs/graceful-fs.js index 9bf803e..33b30d2 100644 --- a/node_modules/graceful-fs/graceful-fs.js +++ b/node_modules/graceful-fs/graceful-fs.js @@ -127,25 +127,34 @@ function patch (fs) { var fs$readdir = fs.readdir fs.readdir = readdir - function readdir (path, cb) { - return go$readdir(path, cb) + function readdir (path, options, cb) { + var args = [path] + if (typeof options !== 'function') { + args.push(options) + } else { + cb = options + } + args.push(go$readdir$cb) - function go$readdir () { - return fs$readdir(path, function (err, files) { - if (files && files.sort) - files.sort(); // Backwards compatibility with graceful-fs. + return go$readdir(args) - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readdir, [path, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) + function go$readdir$cb (err, files) { + if (files && files.sort) + files.sort() + + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readdir, [args]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } } } + function go$readdir (args) { + return fs$readdir.apply(fs, args) + } if (process.version.substr(0, 4) === 'v0.8') { var legStreams = legacy(fs) diff --git a/node_modules/graceful-fs/package.json b/node_modules/graceful-fs/package.json index d008b61..cde9d0d 100644 --- a/node_modules/graceful-fs/package.json +++ b/node_modules/graceful-fs/package.json @@ -1,105 +1,47 @@ { - "_args": [ - [ - "graceful-fs@^4.1.2", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\flat-cache" - ] - ], - "_from": "graceful-fs@>=4.1.2 <5.0.0", - "_id": "graceful-fs@4.1.4", - "_inCache": true, - "_installable": true, - "_location": "/graceful-fs", - "_nodeVersion": "5.6.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/graceful-fs-4.1.4.tgz_1462474854900_0.9423982477746904" - }, - "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" - }, - "_npmVersion": "3.8.9", - "_phantomChildren": {}, - "_requested": { - "name": "graceful-fs", - "raw": "graceful-fs@^4.1.2", - "rawSpec": "^4.1.2", - "scope": null, - "spec": ">=4.1.2 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/flat-cache", - "/fs-extra", - "/read-json-sync" - ], - "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.4.tgz", - "_shasum": "ef089d2880f033b011823ce5c8fae798da775dbd", - "_shrinkwrap": null, - "_spec": "graceful-fs@^4.1.2", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\flat-cache", - "bugs": { - "url": "https://github.com/isaacs/node-graceful-fs/issues" - }, - "dependencies": {}, + "name": "graceful-fs", "description": "A drop-in replacement for fs, making various improvements.", - "devDependencies": { - "mkdirp": "^0.5.0", - "rimraf": "^2.2.8", - "tap": "^5.4.2" + "version": "4.1.11", + "repository": { + "type": "git", + "url": "https://github.com/isaacs/node-graceful-fs" + }, + "main": "graceful-fs.js", + "engines": { + "node": ">=0.4.0" }, "directories": { "test": "test" }, - "dist": { - "shasum": "ef089d2880f033b011823ce5c8fae798da775dbd", - "tarball": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.4.tgz" - }, - "engines": { - "node": ">=0.4.0" + "scripts": { + "test": "node test.js | tap -" }, - "files": [ - "fs.js", - "graceful-fs.js", - "legacy-streams.js", - "polyfills.js" - ], - "gitHead": "fe8f05ccc2779d1dfa6db6173f3ed64f1e9aa72c", - "homepage": "https://github.com/isaacs/node-graceful-fs#readme", "keywords": [ - "EACCESS", - "EAGAIN", - "EINVAL", - "EMFILE", - "EPERM", - "error", - "errors", "fs", - "handling", "module", - "queue", "reading", + "retry", "retries", - "retry" + "queue", + "error", + "errors", + "handling", + "EMFILE", + "EAGAIN", + "EINVAL", + "EPERM", + "EACCESS" ], "license": "ISC", - "main": "graceful-fs.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "graceful-fs", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/node-graceful-fs.git" - }, - "scripts": { - "test": "node test.js | tap -" + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.2.8", + "tap": "^5.4.2" }, - "version": "4.1.4" + "files": [ + "fs.js", + "graceful-fs.js", + "legacy-streams.js", + "polyfills.js" + ] } diff --git a/node_modules/graceful-fs/polyfills.js b/node_modules/graceful-fs/polyfills.js index 5e4f480..4c6aca7 100644 --- a/node_modules/graceful-fs/polyfills.js +++ b/node_modules/graceful-fs/polyfills.js @@ -3,6 +3,9 @@ var constants = require('constants') var origCwd = process.cwd var cwd = null + +var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform + process.cwd = function() { if (!cwd) cwd = origCwd.call(process) @@ -44,43 +47,68 @@ function patch (fs) { fs.fchown = chownFix(fs.fchown) fs.lchown = chownFix(fs.lchown) - fs.chmod = chownFix(fs.chmod) - fs.fchmod = chownFix(fs.fchmod) - fs.lchmod = chownFix(fs.lchmod) + fs.chmod = chmodFix(fs.chmod) + fs.fchmod = chmodFix(fs.fchmod) + fs.lchmod = chmodFix(fs.lchmod) fs.chownSync = chownFixSync(fs.chownSync) fs.fchownSync = chownFixSync(fs.fchownSync) fs.lchownSync = chownFixSync(fs.lchownSync) - fs.chmodSync = chownFix(fs.chmodSync) - fs.fchmodSync = chownFix(fs.fchmodSync) - fs.lchmodSync = chownFix(fs.lchmodSync) + fs.chmodSync = chmodFixSync(fs.chmodSync) + fs.fchmodSync = chmodFixSync(fs.fchmodSync) + fs.lchmodSync = chmodFixSync(fs.lchmodSync) + + fs.stat = statFix(fs.stat) + fs.fstat = statFix(fs.fstat) + fs.lstat = statFix(fs.lstat) + + fs.statSync = statFixSync(fs.statSync) + fs.fstatSync = statFixSync(fs.fstatSync) + fs.lstatSync = statFixSync(fs.lstatSync) // if lchmod/lchown do not exist, then make them no-ops if (!fs.lchmod) { fs.lchmod = function (path, mode, cb) { - process.nextTick(cb) + if (cb) process.nextTick(cb) } fs.lchmodSync = function () {} } if (!fs.lchown) { fs.lchown = function (path, uid, gid, cb) { - process.nextTick(cb) + if (cb) process.nextTick(cb) } fs.lchownSync = function () {} } // on Windows, A/V software can lock the directory, causing this // to fail with an EACCES or EPERM if the directory contains newly - // created files. Try again on failure, for up to 1 second. - if (process.platform === "win32") { + // created files. Try again on failure, for up to 60 seconds. + + // Set the timeout this long because some Windows Anti-Virus, such as Parity + // bit9, may lock files for up to a minute, causing npm package install + // failures. Also, take care to yield the scheduler. Windows scheduling gives + // CPU to a busy looping process, which can cause the program causing the lock + // contention to be starved of CPU by node, so the contention doesn't resolve. + if (platform === "win32") { fs.rename = (function (fs$rename) { return function (from, to, cb) { var start = Date.now() + var backoff = 0; fs$rename(from, to, function CB (er) { if (er && (er.code === "EACCES" || er.code === "EPERM") - && Date.now() - start < 1000) { - return fs$rename(from, to, CB) + && Date.now() - start < 60000) { + setTimeout(function() { + fs.stat(to, function (stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er) + }) + }, backoff) + if (backoff < 100) + backoff += 10; + return; } if (cb) cb(er) }) @@ -121,20 +149,19 @@ function patch (fs) { function patchLchmod (fs) { fs.lchmod = function (path, mode, callback) { - callback = callback || noop fs.open( path , constants.O_WRONLY | constants.O_SYMLINK , mode , function (err, fd) { if (err) { - callback(err) + if (callback) callback(err) return } // prefer to return the chmod error, if one occurs, // but still try to close, and report closing errors if they occur. fs.fchmod(fd, mode, function (err) { fs.close(fd, function(err2) { - callback(err || err2) + if (callback) callback(err || err2) }) }) }) @@ -167,11 +194,13 @@ function patchLutimes (fs) { if (constants.hasOwnProperty("O_SYMLINK")) { fs.lutimes = function (path, at, mt, cb) { fs.open(path, constants.O_SYMLINK, function (er, fd) { - cb = cb || noop - if (er) return cb(er) + if (er) { + if (cb) cb(er) + return + } fs.futimes(fd, at, mt, function (er) { fs.close(fd, function (er2) { - return cb(er || er2) + if (cb) cb(er || er2) }) }) }) @@ -197,17 +226,39 @@ function patchLutimes (fs) { } } else { - fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) } + fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } fs.lutimesSync = function () {} } } +function chmodFix (orig) { + if (!orig) return orig + return function (target, mode, cb) { + return orig.call(fs, target, mode, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } +} + +function chmodFixSync (orig) { + if (!orig) return orig + return function (target, mode) { + try { + return orig.call(fs, target, mode) + } catch (er) { + if (!chownErOk(er)) throw er + } + } +} + + function chownFix (orig) { if (!orig) return orig return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er, res) { + return orig.call(fs, target, uid, gid, function (er) { if (chownErOk(er)) er = null - cb(er, res) + if (cb) cb.apply(this, arguments) }) } } @@ -223,6 +274,33 @@ function chownFixSync (orig) { } } + +function statFix (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, cb) { + return orig.call(fs, target, function (er, stats) { + if (!stats) return cb.apply(this, arguments) + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + if (cb) cb.apply(this, arguments) + }) + } +} + +function statFixSync (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target) { + var stats = orig.call(fs, target) + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + return stats; + } +} + // ENOSYS means that the fs doesn't support the op. Just ignore // that, because it doesn't matter. // diff --git a/node_modules/graceful-readlink/package.json b/node_modules/graceful-readlink/package.json index 0a66ecf..ac86c1f 100644 --- a/node_modules/graceful-readlink/package.json +++ b/node_modules/graceful-readlink/package.json @@ -1,75 +1,18 @@ { - "_args": [ - [ - "graceful-readlink@>= 1.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\commander" - ] - ], - "_from": "graceful-readlink@>=1.0.0", - "_id": "graceful-readlink@1.0.1", - "_inCache": true, - "_installable": true, - "_location": "/graceful-readlink", - "_nodeVersion": "0.11.14", - "_npmUser": { - "email": "zhiyelee@gmail.com", - "name": "zhiyelee" - }, - "_npmVersion": "2.1.17", - "_phantomChildren": {}, - "_requested": { - "name": "graceful-readlink", - "raw": "graceful-readlink@>= 1.0.0", - "rawSpec": ">= 1.0.0", - "scope": null, - "spec": ">=1.0.0", - "type": "range" - }, - "_requiredBy": [ - "/commander" - ], - "_resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "_shasum": "4cafad76bc62f02fa039b2f94e9a3dd3a391a725", - "_shrinkwrap": null, - "_spec": "graceful-readlink@>= 1.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\commander", - "author": { - "name": "zhiyelee" - }, - "bugs": { - "url": "https://github.com/zhiyelee/graceful-readlink/issues" - }, - "dependencies": {}, + "name": "graceful-readlink", + "version": "1.0.1", "description": "graceful fs.readlink", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "4cafad76bc62f02fa039b2f94e9a3dd3a391a725", - "tarball": "http://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz" - }, - "gitHead": "f6655275bebef706fb63fd01b5f062a7052419a5", + "main": "index.js", + "repository": "git://github.com/zhiyelee/graceful-readlink.git", "homepage": "https://github.com/zhiyelee/graceful-readlink", + "bugs": "https://github.com/zhiyelee/graceful-readlink/issues", "keywords": [ "fs.readlink", "readlink" ], + "author": "zhiyelee", "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "zhiyelee", - "email": "zhiyelee@gmail.com" - } - ], - "name": "graceful-readlink", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/zhiyelee/graceful-readlink.git" - }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "1.0.1" + } } diff --git a/node_modules/has-ansi/package.json b/node_modules/has-ansi/package.json index c4b7432..01e08d4 100644 --- a/node_modules/has-ansi/package.json +++ b/node_modules/has-ansi/package.json @@ -1,110 +1,55 @@ { - "_args": [ - [ - "has-ansi@^2.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\chalk" - ] - ], - "_from": "has-ansi@>=2.0.0 <3.0.0", - "_id": "has-ansi@2.0.0", - "_inCache": true, - "_installable": true, - "_location": "/has-ansi", - "_nodeVersion": "0.12.5", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.11.2", - "_phantomChildren": {}, - "_requested": { - "name": "has-ansi", - "raw": "has-ansi@^2.0.0", - "rawSpec": "^2.0.0", - "scope": null, - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/chalk" - ], - "_resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "_shasum": "34f5049ce1ecdf2b0649af3ef24e45ed35416d91", - "_shrinkwrap": null, - "_spec": "has-ansi@^2.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\chalk", + "name": "has-ansi", + "version": "2.0.0", + "description": "Check if a string has ANSI escape codes", + "license": "MIT", + "repository": "sindresorhus/has-ansi", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/has-ansi/issues" - }, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "description": "Check if a string has ANSI escape codes", - "devDependencies": { - "ava": "0.0.4" - }, - "directories": {}, - "dist": { - "shasum": "34f5049ce1ecdf2b0649af3ef24e45ed35416d91", - "tarball": "http://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz" - }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)" + ], "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "node test.js" + }, "files": [ "index.js" ], - "gitHead": "0722275e1bef139fcd09137da6e5550c3cd368b9", - "homepage": "https://github.com/sindresorhus/has-ansi", "keywords": [ "ansi", + "styles", "color", - "colors", "colour", - "command-line", + "colors", + "terminal", "console", + "string", + "tty", "escape", - "find", - "has", - "match", - "pattern", - "re", + "shell", + "xterm", + "command-line", + "text", "regex", "regexp", - "shell", - "string", - "styles", - "terminal", + "re", + "match", "test", - "text", - "tty", - "xterm" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - } + "find", + "pattern", + "has" ], - "name": "has-ansi", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/has-ansi.git" - }, - "scripts": { - "test": "node test.js" + "dependencies": { + "ansi-regex": "^2.0.0" }, - "version": "2.0.0" + "devDependencies": { + "ava": "0.0.4" + } } diff --git a/node_modules/ignore/README.md b/node_modules/ignore/README.md index cd4518f..9bc9268 100644 --- a/node_modules/ignore/README.md +++ b/node_modules/ignore/README.md @@ -23,13 +23,13 @@ Pay attention that [`minimatch`](https://www.npmjs.org/package/minimatch) does n ```js const ignore = require('ignore') -var ig = ignore().add(['.abc/*', '!.abc/d/']) +const ig = ignore().add(['.abc/*', '!.abc/d/']) ``` ### Filter the given paths ```js -var paths = [ +const paths = [ '.abc/a.js', // filtered out '.abc/d/e.js' // included ] @@ -153,7 +153,7 @@ glob('**', { return console.error(err) } - var filtered = ignore().add(patterns).filter(files) + let filtered = ignore().add(patterns).filter(files) console.log(filtered) }) ``` @@ -164,6 +164,16 @@ Creates a filter function which could filter an array of paths with `Array.proto Returns `function(path)` the filter function. +### .ignores(pathname) + +> new in 3.2.0 + +Returns `Boolean` whether `pathname` should be ignored. + +```js +ig.ignores('.abc/a.js') // true +``` + **** ## Upgrade 2.x -> 3.x diff --git a/node_modules/ignore/ignore.js b/node_modules/ignore/ignore.js index e1529f1..cddf60c 100644 --- a/node_modules/ignore/ignore.js +++ b/node_modules/ignore/ignore.js @@ -103,16 +103,20 @@ var IgnoreBase = function () { return _this2._filter(path); }; } + }, { + key: 'ignores', + value: function ignores(path) { + return !this._filter(path); + } }, { key: '_createRule', value: function _createRule(pattern) { - var rule_object = { - origin: pattern - }; + var origin = pattern; + var negative = false; // > An optional prefix "!" which negates the pattern; if (pattern.indexOf('!') === 0) { - rule_object.negative = true; + negative = true; pattern = pattern.substr(1); } @@ -122,11 +126,18 @@ var IgnoreBase = function () { // > Put a backslash ("\") in front of the first hash for patterns that begin with a hash. .replace(REGEX_LEADING_EXCAPED_HASH, '#'); - rule_object.pattern = pattern; - rule_object.regex = regex(pattern); + var regex = make_regex(pattern, negative); - return rule_object; + return { + origin: origin, + pattern: pattern, + negative: negative, + regex: regex + }; } + + // @returns `Boolean` true if the `path` is NOT ignored + }, { key: '_filter', value: function _filter(path, slices) { @@ -197,7 +208,7 @@ var IgnoreBase = function () { // '`foo/`' should not continue with the '`..`' -var REPLACERS = [ +var DEFAULT_REPLACER_PREFIX = [ // > Trailing spaces are ignored unless they are quoted with backslash ("\") [ @@ -209,7 +220,7 @@ var REPLACERS = [ }], // replace (\ ) with ' ' -[/\\\s/g, function (match) { +[/\\\s/g, function () { return ' '; }], @@ -259,36 +270,14 @@ var REPLACERS = [ // just remove it function () { return '^(?:.*\\/)?'; -}], - -// 'f' -// matches -// - /f(end) -// - /f/ -// - (start)f(end) -// - (start)f/ -// doesn't match -// - oof -// - foo -// pseudo: -// -> (^|/)f(/|$) - -// ending -[ -// 'js' will not match 'js.' -// 'ab' will not match 'abc' -/(?:[^*\/])$/, function (match) { - // 'js*' will not match 'a.js' - // 'js/' will not match 'a.js' - // 'js' will match 'a.js' and 'a.js/' - return match + '(?=$|\\/)'; -}], +}]]; +var DEFAULT_REPLACER_SUFFIX = [ // starting [ // there will be no leading '/' (which has been replaced by section "leading slash") // If starts with '**', adding a '^' to the regular expression also works -/^(?=[^\^])/, function (match) { +/^(?=[^\^])/, function () { return !/\/(?!$)/.test(this) // > If the pattern does not contain a slash /, Git treats it as a shell glob pattern // Actually, if there is only a trailing slash, git also treats it as a shell glob pattern @@ -299,13 +288,15 @@ function () { }], // two globstars -[/\\\/\\\*\\\*(?=\\\/|$)/g, +[ +// Use lookahead assertions so that we could match more than one `'/**'` +/\\\/\\\*\\\*(?=\\\/|$)/g, // Zero, one or several directories // should not use '*', or it will be replaced by the next replacer -function (m, index, str) { - // Check if it is not the last `'/**'` +// Check if it is not the last `'/**'` +function (match, index, str) { return index + 6 < str.length // case: /**/ @@ -328,19 +319,21 @@ function (m, index, str) { // 'abc.*/' -> go // 'abc.*' -> skip this rule -/(^|[^\\]+)\\\*(?=.+)/g, function (match, p1) { - // '*.js' matches '.js' - // '*.js' doesn't match 'abc' +/(^|[^\\]+)\\\*(?=.+)/g, + +// '*.js' matches '.js' +// '*.js' doesn't match 'abc' +function (match, p1) { return p1 + '[^\\/]*'; }], // trailing wildcard -[/(\\\/)?\\\*$/, function (m, p1) { +[/(\\\/)?\\\*$/, function (match, p1) { return p1 === '\\/' // 'a/*' does not match 'a/' // 'a/*' matches 'a/a' // 'a/' - ? '\\/[^/]+' + ? '\\/[^/]+(?=$|\\/$)' // or it will match everything after : ''; @@ -350,17 +343,60 @@ function (m, index, str) { return '\\'; }]]; +var POSITIVE_REPLACERS = [].concat(DEFAULT_REPLACER_PREFIX, [ + +// 'f' +// matches +// - /f(end) +// - /f/ +// - (start)f(end) +// - (start)f/ +// doesn't match +// - oof +// - foo +// pseudo: +// -> (^|/)f(/|$) + +// ending +[ +// 'js' will not match 'js.' +// 'ab' will not match 'abc' +/(?:[^*\/])$/, + +// 'js*' will not match 'a.js' +// 'js/' will not match 'a.js' +// 'js' will match 'a.js' and 'a.js/' +function (match) { + return match + '(?=$|\\/)'; +}]], DEFAULT_REPLACER_SUFFIX); + +var NEGATIVE_REPLACERS = [].concat(DEFAULT_REPLACER_PREFIX, [ + +// #24 +// The MISSING rule of [gitignore docs](https://git-scm.com/docs/gitignore) +// A negative pattern without a trailing wildcard should not +// re-include the things inside that directory. + +// eg: +// ['node_modules/*', '!node_modules'] +// should ignore `node_modules/a.js` +[/(?:[^*\/])$/, function (match) { + return match + '(?=$|\\/$)'; +}]], DEFAULT_REPLACER_SUFFIX); + // A simple cache, because an ignore rule only has only one certain meaning var cache = {}; // @param {pattern} -function regex(pattern) { +function make_regex(pattern, negative) { var r = cache[pattern]; if (r) { return r; } - var source = REPLACERS.reduce(function (prev, current) { + var replacers = negative ? NEGATIVE_REPLACERS : POSITIVE_REPLACERS; + + var source = replacers.reduce(function (prev, current) { return prev.replace(current[0], current[1].bind(pattern)); }, pattern); diff --git a/node_modules/ignore/package.json b/node_modules/ignore/package.json index e3dd398..371db5c 100644 --- a/node_modules/ignore/package.json +++ b/node_modules/ignore/package.json @@ -1,97 +1,42 @@ { - "_args": [ - [ - "ignore@^3.1.2", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "ignore@>=3.1.2 <4.0.0", - "_id": "ignore@3.1.2", - "_inCache": true, - "_installable": true, - "_location": "/ignore", - "_nodeVersion": "5.10.1", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/ignore-3.1.2.tgz_1461812650504_0.7420230738352984" - }, - "_npmUser": { - "email": "i@kael.me", - "name": "kael" - }, - "_npmVersion": "3.8.3", - "_phantomChildren": {}, - "_requested": { - "name": "ignore", - "raw": "ignore@^3.1.2", - "rawSpec": "^3.1.2", - "scope": null, - "spec": ">=3.1.2 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/ignore/-/ignore-3.1.2.tgz", - "_shasum": "dd17765e9233b4019762ba82b892202b0980161b", - "_shrinkwrap": null, - "_spec": "ignore@^3.1.2", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint", - "author": { - "name": "kael" - }, - "bugs": { - "url": "https://github.com/kaelzhang/node-ignore/issues" - }, - "dependencies": {}, + "name": "ignore", + "version": "3.2.0", "description": "Ignore is a manager and filter for .gitignore rules.", - "devDependencies": { - "chai": "~1.7.2", - "mocha": "~1.13.0" - }, - "directories": {}, - "dist": { - "shasum": "dd17765e9233b4019762ba82b892202b0980161b", - "tarball": "https://registry.npmjs.org/ignore/-/ignore-3.1.2.tgz" - }, + "main": "./ignore.js", "files": [ - "LICENSE-MIT", - "ignore.js" + "ignore.js", + "LICENSE-MIT" ], - "gitHead": "3bfb96869396873cc08ab6239f0f08fbd43863f5", - "homepage": "https://github.com/kaelzhang/node-ignore#readme", + "scripts": { + "test": "./node_modules/.bin/mocha --reporter spec ./test/ignore.js" + }, + "repository": { + "type": "git", + "url": "git@github.com:kaelzhang/node-ignore.git" + }, "keywords": [ + "ignore", ".gitignore", - "asterisks", - "filter", - "fnmatch", "gitignore", - "glob", - "ignore", - "manager", "npmignore", - "regex", + "rules", + "manager", + "filter", "regexp", - "regular-expression", - "rules" + "regex", + "fnmatch", + "glob", + "asterisks", + "regular-expression" ], + "author": "kael", "license": "MIT", - "main": "./ignore.js", - "maintainers": [ - { - "name": "kael", - "email": "i@kael.me" - } - ], - "name": "ignore", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/kaelzhang/node-ignore.git" - }, - "scripts": { - "test": "mocha --reporter spec ./test/ignore.js" + "bugs": { + "url": "https://github.com/kaelzhang/node-ignore/issues" }, - "version": "3.1.2" + "dependencies": {}, + "devDependencies": { + "chai": "~1.7.2", + "mocha": "~1.13.0" + } } diff --git a/node_modules/imurmurhash/package.json b/node_modules/imurmurhash/package.json index 002b8f9..8a93edb 100644 --- a/node_modules/imurmurhash/package.json +++ b/node_modules/imurmurhash/package.json @@ -1,85 +1,40 @@ { - "_args": [ - [ - "imurmurhash@^0.1.4", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint" - ] + "name": "imurmurhash", + "version": "0.1.4", + "description": "An incremental implementation of MurmurHash3", + "homepage": "https://github.com/jensyt/imurmurhash-js", + "main": "imurmurhash.js", + "files": [ + "imurmurhash.js", + "imurmurhash.min.js", + "package.json", + "README.md" ], - "_from": "imurmurhash@>=0.1.4 <0.2.0", - "_id": "imurmurhash@0.1.4", - "_inCache": true, - "_installable": true, - "_location": "/imurmurhash", - "_npmUser": { - "email": "jensyt@gmail.com", - "name": "jensyt" + "repository": { + "type": "git", + "url": "https://github.com/jensyt/imurmurhash-js" }, - "_npmVersion": "1.3.2", - "_phantomChildren": {}, - "_requested": { - "name": "imurmurhash", - "raw": "imurmurhash@^0.1.4", - "rawSpec": "^0.1.4", - "scope": null, - "spec": ">=0.1.4 <0.2.0", - "type": "range" + "bugs": { + "url": "https://github.com/jensyt/imurmurhash-js/issues" }, - "_requiredBy": [ - "/eslint" + "keywords": [ + "murmur", + "murmurhash", + "murmurhash3", + "hash", + "incremental" ], - "_resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "_shasum": "9218b9b2b928a238b13dc4fb6b6d576f231453ea", - "_shrinkwrap": null, - "_spec": "imurmurhash@^0.1.4", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint", "author": { - "email": "jensyt@gmail.com", "name": "Jens Taylor", + "email": "jensyt@gmail.com", "url": "https://github.com/homebrewing" }, - "bugs": { - "url": "https://github.com/jensyt/imurmurhash-js/issues" + "license": "MIT", + "dependencies": { }, - "dependencies": {}, - "description": "An incremental implementation of MurmurHash3", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "9218b9b2b928a238b13dc4fb6b6d576f231453ea", - "tarball": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" + "devDependencies": { }, "engines": { "node": ">=0.8.19" - }, - "files": [ - "README.md", - "imurmurhash.js", - "imurmurhash.min.js", - "package.json" - ], - "homepage": "https://github.com/jensyt/imurmurhash-js", - "keywords": [ - "hash", - "incremental", - "murmur", - "murmurhash", - "murmurhash3" - ], - "license": "MIT", - "main": "imurmurhash.js", - "maintainers": [ - { - "name": "jensyt", - "email": "jensyt@gmail.com" - } - ], - "name": "imurmurhash", - "optionalDependencies": {}, - "readme": "iMurmurHash.js\n==============\n\nAn incremental implementation of the MurmurHash3 (32-bit) hashing algorithm for JavaScript based on [Gary Court's implementation](https://github.com/garycourt/murmurhash-js) with [kazuyukitanimura's modifications](https://github.com/kazuyukitanimura/murmurhash-js).\n\nThis version works significantly faster than the non-incremental version if you need to hash many small strings into a single hash, since string concatenation (to build the single string to pass the non-incremental version) is fairly costly. In one case tested, using the incremental version was about 50% faster than concatenating 5-10 strings and then hashing.\n\nInstallation\n------------\n\nTo use iMurmurHash in the browser, [download the latest version](https://raw.github.com/jensyt/imurmurhash-js/master/imurmurhash.min.js) and include it as a script on your site.\n\n```html\n\n\n```\n\n---\n\nTo use iMurmurHash in Node.js, install the module using NPM:\n\n```bash\nnpm install imurmurhash\n```\n\nThen simply include it in your scripts:\n\n```javascript\nMurmurHash3 = require('imurmurhash');\n```\n\nQuick Example\n-------------\n\n```javascript\n// Create the initial hash\nvar hashState = MurmurHash3('string');\n\n// Incrementally add text\nhashState.hash('more strings');\nhashState.hash('even more strings');\n\n// All calls can be chained if desired\nhashState.hash('and').hash('some').hash('more');\n\n// Get a result\nhashState.result();\n// returns 0xe4ccfe6b\n```\n\nFunctions\n---------\n\n### MurmurHash3 ([string], [seed])\nGet a hash state object, optionally initialized with the given _string_ and _seed_. _Seed_ must be a positive integer if provided. Calling this function without the `new` keyword will return a cached state object that has been reset. This is safe to use as long as the object is only used from a single thread and no other hashes are created while operating on this one. If this constraint cannot be met, you can use `new` to create a new state object. For example:\n\n```javascript\n// Use the cached object, calling the function again will return the same\n// object (but reset, so the current state would be lost)\nhashState = MurmurHash3();\n...\n\n// Create a new object that can be safely used however you wish. Calling the\n// function again will simply return a new state object, and no state loss\n// will occur, at the cost of creating more objects.\nhashState = new MurmurHash3();\n```\n\nBoth methods can be mixed however you like if you have different use cases.\n\n---\n\n### MurmurHash3.prototype.hash (string)\nIncrementally add _string_ to the hash. This can be called as many times as you want for the hash state object, including after a call to `result()`. Returns `this` so calls can be chained.\n\n---\n\n### MurmurHash3.prototype.result ()\nGet the result of the hash as a 32-bit positive integer. This performs the tail and finalizer portions of the algorithm, but does not store the result in the state object. This means that it is perfectly safe to get results and then continue adding strings via `hash`.\n\n```javascript\n// Do the whole string at once\nMurmurHash3('this is a test string').result();\n// 0x70529328\n\n// Do part of the string, get a result, then the other part\nvar m = MurmurHash3('this is a');\nm.result();\n// 0xbfc4f834\nm.hash(' test string').result();\n// 0x70529328 (same as above)\n```\n\n---\n\n### MurmurHash3.prototype.reset ([seed])\nReset the state object for reuse, optionally using the given _seed_ (defaults to 0 like the constructor). Returns `this` so calls can be chained.\n\n---\n\nLicense (MIT)\n-------------\nCopyright (c) 2013 Gary Court, Jens Taylor\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "README.md", - "repository": { - "type": "git", - "url": "git+https://github.com/jensyt/imurmurhash-js.git" - }, - "version": "0.1.4" + } } diff --git a/node_modules/inflight/.eslintrc b/node_modules/inflight/.eslintrc deleted file mode 100644 index b7a1550..0000000 --- a/node_modules/inflight/.eslintrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "env" : { - "node" : true - }, - "rules" : { - "semi": [2, "never"], - "strict": 0, - "quotes": [1, "single", "avoid-escape"], - "no-use-before-define": 0, - "curly": 0, - "no-underscore-dangle": 0, - "no-lonely-if": 1, - "no-unused-vars": [2, {"vars" : "all", "args" : "after-used"}], - "no-mixed-requires": 0, - "space-infix-ops": 0 - } -} diff --git a/node_modules/inflight/inflight.js b/node_modules/inflight/inflight.js index 8bc96cb..48202b3 100644 --- a/node_modules/inflight/inflight.js +++ b/node_modules/inflight/inflight.js @@ -19,18 +19,28 @@ function makeres (key) { var cbs = reqs[key] var len = cbs.length var args = slice(arguments) - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args) - } - if (cbs.length > len) { - // added more in the interim. - // de-zalgo, just in case, but don't call again. - cbs.splice(0, len) - process.nextTick(function () { - RES.apply(null, args) - }) - } else { - delete reqs[key] + + // XXX It's somewhat ambiguous whether a new callback added in this + // pass should be queued for later execution if something in the + // list of callbacks throws, or if it should just be discarded. + // However, it's such an edge case that it hardly matters, and either + // choice is likely as surprising as the other. + // As it happens, we do go ahead and schedule it for later execution. + try { + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args) + } + } finally { + if (cbs.length > len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len) + process.nextTick(function () { + RES.apply(null, args) + }) + } else { + delete reqs[key] + } } }) } diff --git a/node_modules/inflight/package.json b/node_modules/inflight/package.json index 48cc3b9..6084d35 100644 --- a/node_modules/inflight/package.json +++ b/node_modules/inflight/package.json @@ -1,87 +1,29 @@ { - "_args": [ - [ - "inflight@^1.0.4", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\glob" - ] - ], - "_from": "inflight@>=1.0.4 <2.0.0", - "_id": "inflight@1.0.4", - "_inCache": true, - "_installable": true, - "_location": "/inflight", - "_nodeVersion": "0.10.32", - "_npmUser": { - "email": "ogd@aoaioxxysz.net", - "name": "othiym23" - }, - "_npmVersion": "2.1.3", - "_phantomChildren": {}, - "_requested": { - "name": "inflight", - "raw": "inflight@^1.0.4", - "rawSpec": "^1.0.4", - "scope": null, - "spec": ">=1.0.4 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint/glob", - "/glob" + "name": "inflight", + "version": "1.0.6", + "description": "Add callbacks to requests in flight to avoid async duplication", + "main": "inflight.js", + "files": [ + "inflight.js" ], - "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz", - "_shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", - "_shrinkwrap": null, - "_spec": "inflight@^1.0.4", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\glob", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/inflight/issues" - }, "dependencies": { "once": "^1.3.0", "wrappy": "1" }, - "description": "Add callbacks to requests in flight to avoid async duplication", "devDependencies": { - "tap": "^0.4.10" + "tap": "^7.1.2" }, - "directories": {}, - "dist": { - "shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", - "tarball": "http://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz" + "scripts": { + "test": "tap test.js --100" }, - "gitHead": "c7b5531d572a867064d4a1da9e013e8910b7d1ba", - "homepage": "https://github.com/isaacs/inflight", - "license": "ISC", - "main": "inflight.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - }, - { - "name": "othiym23", - "email": "ogd@aoaioxxysz.net" - }, - { - "name": "iarna", - "email": "me@re-becca.org" - } - ], - "name": "inflight", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", "repository": { "type": "git", - "url": "git://github.com/isaacs/inflight.git" + "url": "https://github.com/npm/inflight.git" }, - "scripts": { - "test": "tap test.js" + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "bugs": { + "url": "https://github.com/isaacs/inflight/issues" }, - "version": "1.0.4" + "homepage": "https://github.com/isaacs/inflight", + "license": "ISC" } diff --git a/node_modules/inflight/test.js b/node_modules/inflight/test.js deleted file mode 100644 index 2bb75b3..0000000 --- a/node_modules/inflight/test.js +++ /dev/null @@ -1,97 +0,0 @@ -var test = require('tap').test -var inf = require('./inflight.js') - - -function req (key, cb) { - cb = inf(key, cb) - if (cb) setTimeout(function () { - cb(key) - cb(key) - }) - return cb -} - -test('basic', function (t) { - var calleda = false - var a = req('key', function (k) { - t.notOk(calleda) - calleda = true - t.equal(k, 'key') - if (calledb) t.end() - }) - t.ok(a, 'first returned cb function') - - var calledb = false - var b = req('key', function (k) { - t.notOk(calledb) - calledb = true - t.equal(k, 'key') - if (calleda) t.end() - }) - - t.notOk(b, 'second should get falsey inflight response') -}) - -test('timing', function (t) { - var expect = [ - 'method one', - 'start one', - 'end one', - 'two', - 'tick', - 'three' - ] - var i = 0 - - function log (m) { - t.equal(m, expect[i], m + ' === ' + expect[i]) - ++i - if (i === expect.length) - t.end() - } - - function method (name, cb) { - log('method ' + name) - process.nextTick(cb) - } - - var one = inf('foo', function () { - log('start one') - var three = inf('foo', function () { - log('three') - }) - if (three) method('three', three) - log('end one') - }) - - method('one', one) - - var two = inf('foo', function () { - log('two') - }) - if (two) method('one', two) - - process.nextTick(log.bind(null, 'tick')) -}) - -test('parameters', function (t) { - t.plan(8) - - var a = inf('key', function (first, second, third) { - t.equal(first, 1) - t.equal(second, 2) - t.equal(third, 3) - }) - t.ok(a, 'first returned cb function') - - var b = inf('key', function (first, second, third) { - t.equal(first, 1) - t.equal(second, 2) - t.equal(third, 3) - }) - t.notOk(b, 'second should get falsey inflight response') - - setTimeout(function () { - a(1, 2, 3) - }) -}) diff --git a/node_modules/inherits/package.json b/node_modules/inherits/package.json index f305733..0e36965 100644 --- a/node_modules/inherits/package.json +++ b/node_modules/inherits/package.json @@ -1,81 +1,22 @@ { - "_args": [ - [ - "inherits@~2.0.1", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\concat-stream" - ] - ], - "_from": "inherits@>=2.0.1 <2.1.0", - "_id": "inherits@2.0.1", - "_inCache": true, - "_installable": true, - "_location": "/inherits", - "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" - }, - "_npmVersion": "1.3.8", - "_phantomChildren": {}, - "_requested": { - "name": "inherits", - "raw": "inherits@~2.0.1", - "rawSpec": "~2.0.1", - "scope": null, - "spec": ">=2.0.1 <2.1.0", - "type": "range" - }, - "_requiredBy": [ - "/concat-stream", - "/eslint/glob", - "/glob", - "/readable-stream", - "/util" - ], - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", - "_shrinkwrap": null, - "_spec": "inherits@~2.0.1", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\concat-stream", - "browser": "./inherits_browser.js", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "dependencies": {}, + "name": "inherits", "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", - "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" - }, - "homepage": "https://github.com/isaacs/inherits#readme", + "version": "2.0.1", "keywords": [ - "browser", - "browserify", - "class", "inheritance", - "inherits", + "class", "klass", + "oop", "object-oriented", - "oop" + "inherits", + "browser", + "browserify" ], - "license": "ISC", "main": "./inherits.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "inherits", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits.git" - }, + "browser": "./inherits_browser.js", + "repository": "git://github.com/isaacs/inherits", + "license": "ISC", "scripts": { "test": "node test" - }, - "version": "2.0.1" + } } diff --git a/node_modules/inquirer/package.json b/node_modules/inquirer/package.json index 178050f..69d8c97 100644 --- a/node_modules/inquirer/package.json +++ b/node_modules/inquirer/package.json @@ -1,49 +1,25 @@ { - "_args": [ - [ - "inquirer@^0.12.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "inquirer@>=0.12.0 <0.13.0", - "_id": "inquirer@0.12.0", - "_inCache": true, - "_installable": true, - "_location": "/inquirer", - "_nodeVersion": "5.2.0", - "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/inquirer-0.12.0.tgz_1454990163157_0.11014768108725548" - }, - "_npmUser": { - "email": "admin@simonboudrias.com", - "name": "sboudrias" - }, - "_npmVersion": "3.5.3", - "_phantomChildren": {}, - "_requested": { - "name": "inquirer", - "raw": "inquirer@^0.12.0", - "rawSpec": "^0.12.0", - "scope": null, - "spec": ">=0.12.0 <0.13.0", - "type": "range" + "name": "inquirer", + "version": "0.12.0", + "description": "A collection of common interactive command line user interfaces.", + "main": "lib/inquirer.js", + "scripts": { + "test": "grunt --verbose" }, - "_requiredBy": [ - "/eslint" + "repository": "SBoudrias/Inquirer.js", + "keywords": [ + "command", + "prompt", + "stdin", + "cli", + "tty", + "menu" + ], + "author": "Simon Boudrias ", + "license": "MIT", + "files": [ + "lib" ], - "_resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", - "_shasum": "1ef2bfd63504df0bc75785fff8c2c41df12f077e", - "_shrinkwrap": null, - "_spec": "inquirer@^0.12.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint", - "author": { - "email": "admin@simonboudrias.com", - "name": "Simon Boudrias" - }, - "bugs": { - "url": "https://github.com/sboudrias/Inquirer.js/issues" - }, "dependencies": { "ansi-escapes": "^1.1.0", "ansi-regex": "^2.0.0", @@ -59,7 +35,6 @@ "strip-ansi": "^3.0.0", "through": "^2.3.6" }, - "description": "A collection of common interactive command line user interfaces.", "devDependencies": { "chai": "^3.0.0", "cmdify": "^0.0.4", @@ -70,42 +45,5 @@ "mocha": "^2.2.1", "mockery": "^1.4.0", "sinon": "^1.12.1" - }, - "directories": {}, - "dist": { - "shasum": "1ef2bfd63504df0bc75785fff8c2c41df12f077e", - "tarball": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz" - }, - "files": [ - "lib" - ], - "gitHead": "a0c2d4d2bcd2818f27c8a2e96477d65f0f386944", - "homepage": "https://github.com/sboudrias/Inquirer.js#readme", - "keywords": [ - "cli", - "command", - "menu", - "prompt", - "stdin", - "tty" - ], - "license": "MIT", - "main": "lib/inquirer.js", - "maintainers": [ - { - "name": "sboudrias", - "email": "admin@simonboudrias.com" - } - ], - "name": "inquirer", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sboudrias/Inquirer.js.git" - }, - "scripts": { - "test": "grunt --verbose" - }, - "version": "0.12.0" + } } diff --git a/node_modules/is-fullwidth-code-point/package.json b/node_modules/is-fullwidth-code-point/package.json index a745d6e..b678d40 100644 --- a/node_modules/is-fullwidth-code-point/package.json +++ b/node_modules/is-fullwidth-code-point/package.json @@ -1,100 +1,45 @@ { - "_args": [ - [ - "is-fullwidth-code-point@^1.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\readline2" - ] - ], - "_from": "is-fullwidth-code-point@>=1.0.0 <2.0.0", - "_id": "is-fullwidth-code-point@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/is-fullwidth-code-point", - "_nodeVersion": "0.12.5", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.11.2", - "_phantomChildren": {}, - "_requested": { - "name": "is-fullwidth-code-point", - "raw": "is-fullwidth-code-point@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/readline2" - ], - "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "_shasum": "ef9e31386f031a7f0d643af82fde50c457ef00cb", - "_shrinkwrap": null, - "_spec": "is-fullwidth-code-point@^1.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\readline2", + "name": "is-fullwidth-code-point", + "version": "1.0.0", + "description": "Check if the character represented by a given Unicode code point is fullwidth", + "license": "MIT", + "repository": "sindresorhus/is-fullwidth-code-point", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues" - }, - "dependencies": { - "number-is-nan": "^1.0.0" - }, - "description": "Check if the character represented by a given Unicode code point is fullwidth", - "devDependencies": { - "ava": "0.0.4", - "code-point-at": "^1.0.0" - }, - "directories": {}, - "dist": { - "shasum": "ef9e31386f031a7f0d643af82fde50c457ef00cb", - "tarball": "http://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "node test.js" + }, "files": [ "index.js" ], - "gitHead": "f2152d357f41f82785436d428e4f8ede143b7548", - "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point", "keywords": [ - "char", + "fullwidth", + "full-width", + "full", + "width", + "unicode", "character", - "check", - "code", + "char", + "string", + "str", "codepoint", - "detect", - "full", - "full-width", - "fullwidth", - "is", + "code", "point", - "str", - "string", - "unicode", - "width" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } + "is", + "detect", + "check" ], - "name": "is-fullwidth-code-point", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git" - }, - "scripts": { - "test": "node test.js" + "dependencies": { + "number-is-nan": "^1.0.0" }, - "version": "1.0.0" + "devDependencies": { + "ava": "0.0.4", + "code-point-at": "^1.0.0" + } } diff --git a/node_modules/is-my-json-valid/index.js b/node_modules/is-my-json-valid/index.js index f929bb7..779cfe2 100644 --- a/node_modules/is-my-json-valid/index.js +++ b/node_modules/is-my-json-valid/index.js @@ -514,15 +514,23 @@ var compile = function(schema, cache, root, reporter, opts) { } if (node.minimum !== undefined) { + if (type !== 'number' && type !== 'integer') validate('if (%s) {', types.number(name)) + validate('if (%s %s %d) {', name, node.exclusiveMinimum ? '<=' : '<', node.minimum) error('is less than minimum') validate('}') + + if (type !== 'number' && type !== 'integer') validate('}') } if (node.maximum !== undefined) { + if (type !== 'number' && type !== 'integer') validate('if (%s) {', types.number(name)) + validate('if (%s %s %d) {', name, node.exclusiveMaximum ? '>=' : '>', node.maximum) error('is more than maximum') validate('}') + + if (type !== 'number' && type !== 'integer') validate('}') } if (properties) { @@ -540,6 +548,8 @@ var compile = function(schema, cache, root, reporter, opts) { var validate = genfun ('function validate(data) {') + // Since undefined is not a valid JSON value, we coerce to null and other checks will catch this + ('if (data === undefined) data = null') ('validate.errors = null') ('var errors = 0') diff --git a/node_modules/is-my-json-valid/package.json b/node_modules/is-my-json-valid/package.json index fa25b75..12a98f8 100644 --- a/node_modules/is-my-json-valid/package.json +++ b/node_modules/is-my-json-valid/package.json @@ -1,100 +1,34 @@ { - "_args": [ - [ - "is-my-json-valid@^2.10.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "is-my-json-valid@>=2.10.0 <3.0.0", - "_id": "is-my-json-valid@2.13.1", - "_inCache": true, - "_installable": true, - "_location": "/is-my-json-valid", - "_nodeVersion": "4.2.3", - "_npmOperationalInternal": { - "host": "packages-5-east.internal.npmjs.com", - "tmp": "tmp/is-my-json-valid-2.13.1.tgz_1456180270224_0.17748022079467773" - }, - "_npmUser": { - "email": "mathiasbuus@gmail.com", - "name": "mafintosh" - }, - "_npmVersion": "2.14.7", - "_phantomChildren": {}, - "_requested": { - "name": "is-my-json-valid", - "raw": "is-my-json-valid@^2.10.0", - "rawSpec": "^2.10.0", - "scope": null, - "spec": ">=2.10.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.13.1.tgz", - "_shasum": "d55778a82feb6b0963ff4be111d5d1684e890707", - "_shrinkwrap": null, - "_spec": "is-my-json-valid@^2.10.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint", - "author": { - "name": "Mathias Buus" - }, - "bugs": { - "url": "https://github.com/mafintosh/is-my-json-valid/issues" - }, + "name": "is-my-json-valid", + "version": "2.15.0", + "description": "A JSONSchema validator that uses code generation to be extremely fast", + "main": "index.js", "dependencies": { "generate-function": "^2.0.0", "generate-object-property": "^1.1.0", - "jsonpointer": "2.0.0", + "jsonpointer": "^4.0.0", "xtend": "^4.0.0" }, - "description": "A JSONSchema validator that uses code generation to be extremely fast", "devDependencies": { "tape": "^2.13.4" }, - "directories": {}, - "dist": { - "shasum": "d55778a82feb6b0963ff4be111d5d1684e890707", - "tarball": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.13.1.tgz" + "scripts": { + "test": "tape test/*.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/mafintosh/is-my-json-valid" }, - "gitHead": "5bacc71441750bc6e79829abcfc21d4f2f0c4396", - "homepage": "https://github.com/mafintosh/is-my-json-valid", "keywords": [ "json", - "jsonschema", + "schema", "orderly", - "schema" + "jsonschema" ], + "author": "Mathias Buus", "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "freeall", - "email": "freeall@gmail.com" - }, - { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - }, - { - "name": "watson", - "email": "w@tson.dk" - }, - { - "name": "yoshuawuyts", - "email": "i@yoshuawuyts.com" - } - ], - "name": "is-my-json-valid", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/mafintosh/is-my-json-valid.git" - }, - "scripts": { - "test": "tape test/*.js" + "bugs": { + "url": "https://github.com/mafintosh/is-my-json-valid/issues" }, - "version": "2.13.1" + "homepage": "https://github.com/mafintosh/is-my-json-valid" } diff --git a/node_modules/is-my-json-valid/test/misc.js b/node_modules/is-my-json-valid/test/misc.js index 275f2ac..4ea36d5 100644 --- a/node_modules/is-my-json-valid/test/misc.js +++ b/node_modules/is-my-json-valid/test/misc.js @@ -20,6 +20,14 @@ tape('simple', function(t) { t.end() }) +tape('data is undefined', function (t) { + var validate = validator({type: 'string'}) + + t.notOk(validate(null)) + t.notOk(validate(undefined)) + t.end() +}) + tape('advanced', function(t) { var validate = validator(cosmic.schema) @@ -194,6 +202,22 @@ tape('exclusiveMinimum/exclusiveMaximum', function(t) { t.end() }) +tape('minimum/maximum number type', function(t) { + var validate = validator({ + type: ['integer', 'null'], + minimum: 1, + maximum: 100 + }) + + t.notOk(validate(-1)) + t.notOk(validate(0)) + t.ok(validate(null)) + t.ok(validate(1)) + t.ok(validate(100)) + t.notOk(validate(101)) + t.end() +}) + tape('custom format', function(t) { var validate = validator({ type: 'object', diff --git a/node_modules/is-path-cwd/package.json b/node_modules/is-path-cwd/package.json index 8cebda7..3aa84f7 100644 --- a/node_modules/is-path-cwd/package.json +++ b/node_modules/is-path-cwd/package.json @@ -1,88 +1,33 @@ { - "_args": [ - [ - "is-path-cwd@^1.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\del" - ] - ], - "_from": "is-path-cwd@>=1.0.0 <2.0.0", - "_id": "is-path-cwd@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/is-path-cwd", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "1.4.21", - "_phantomChildren": {}, - "_requested": { - "name": "is-path-cwd", - "raw": "is-path-cwd@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/del" - ], - "_resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "_shasum": "d225ec23132e89edd38fda767472e62e65f1106d", - "_shrinkwrap": null, - "_spec": "is-path-cwd@^1.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\del", + "name": "is-path-cwd", + "version": "1.0.0", + "description": "Check if a path is CWD", + "license": "MIT", + "repository": "sindresorhus/is-path-cwd", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/is-path-cwd/issues" - }, - "dependencies": {}, - "description": "Check if a path is CWD", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "d225ec23132e89edd38fda767472e62e65f1106d", - "tarball": "http://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "mocha" + }, "files": [ "index.js" ], - "gitHead": "f71d4ecaa43bfe23c9cb35af6bf31e6b5b3f04eb", - "homepage": "https://github.com/sindresorhus/is-path-cwd", "keywords": [ - "check", + "path", "cwd", - "file", + "pwd", + "check", "filepath", - "folder", - "path", - "pwd" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } + "file", + "folder" ], - "name": "is-path-cwd", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/is-path-cwd.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "1.0.0" + "devDependencies": { + "mocha": "*" + } } diff --git a/node_modules/is-path-in-cwd/package.json b/node_modules/is-path-in-cwd/package.json index fc60106..422d020 100644 --- a/node_modules/is-path-in-cwd/package.json +++ b/node_modules/is-path-in-cwd/package.json @@ -1,92 +1,38 @@ { - "_args": [ - [ - "is-path-in-cwd@^1.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\del" - ] - ], - "_from": "is-path-in-cwd@>=1.0.0 <2.0.0", - "_id": "is-path-in-cwd@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/is-path-in-cwd", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "1.4.21", - "_phantomChildren": {}, - "_requested": { - "name": "is-path-in-cwd", - "raw": "is-path-in-cwd@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/del" - ], - "_resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", - "_shasum": "6477582b8214d602346094567003be8a9eac04dc", - "_shrinkwrap": null, - "_spec": "is-path-in-cwd@^1.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\del", + "name": "is-path-in-cwd", + "version": "1.0.0", + "description": "Check if a path is in the current working directory", + "license": "MIT", + "repository": "sindresorhus/is-path-in-cwd", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/is-path-in-cwd/issues" - }, - "dependencies": { - "is-path-inside": "^1.0.0" - }, - "description": "Check if a path is in the current working directory", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "6477582b8214d602346094567003be8a9eac04dc", - "tarball": "http://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "mocha" + }, "files": [ "index.js" ], - "gitHead": "a5a2a7c967eae3f6faee9ab5e40abca6127d55de", - "homepage": "https://github.com/sindresorhus/is-path-in-cwd", "keywords": [ - "check", + "path", "cwd", - "file", + "pwd", + "check", "filepath", + "file", "folder", "in", - "inside", - "path", - "pwd" + "inside" ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "is-path-in-cwd", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/is-path-in-cwd.git" - }, - "scripts": { - "test": "mocha" + "dependencies": { + "is-path-inside": "^1.0.0" }, - "version": "1.0.0" + "devDependencies": { + "mocha": "*" + } } diff --git a/node_modules/is-path-inside/package.json b/node_modules/is-path-inside/package.json index 132bf03..27a3471 100644 --- a/node_modules/is-path-inside/package.json +++ b/node_modules/is-path-inside/package.json @@ -1,90 +1,36 @@ { - "_args": [ - [ - "is-path-inside@^1.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\is-path-in-cwd" - ] - ], - "_from": "is-path-inside@>=1.0.0 <2.0.0", - "_id": "is-path-inside@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/is-path-inside", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "1.4.21", - "_phantomChildren": {}, - "_requested": { - "name": "is-path-inside", - "raw": "is-path-inside@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/is-path-in-cwd" - ], - "_resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", - "_shasum": "fc06e5a1683fbda13de667aff717bbc10a48f37f", - "_shrinkwrap": null, - "_spec": "is-path-inside@^1.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\is-path-in-cwd", + "name": "is-path-inside", + "version": "1.0.0", + "description": "Check if a path is inside another path", + "license": "MIT", + "repository": "sindresorhus/is-path-inside", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/is-path-inside/issues" - }, - "dependencies": { - "path-is-inside": "^1.0.1" - }, - "description": "Check if a path is inside another path", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "fc06e5a1683fbda13de667aff717bbc10a48f37f", - "tarball": "http://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "mocha" + }, "files": [ "index.js" ], - "gitHead": "b507035b66a539b7c12ba8b6b486377aa02aef9f", - "homepage": "https://github.com/sindresorhus/is-path-inside", "keywords": [ - "dir", + "path", + "inside", + "folder", "directory", + "dir", "file", - "folder", - "inside", - "path", "resolve" ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "is-path-inside", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/is-path-inside.git" - }, - "scripts": { - "test": "mocha" + "dependencies": { + "path-is-inside": "^1.0.1" }, - "version": "1.0.0" + "devDependencies": { + "mocha": "*" + } } diff --git a/node_modules/is-property/package.json b/node_modules/is-property/package.json index db0772e..2105f7b 100644 --- a/node_modules/is-property/package.json +++ b/node_modules/is-property/package.json @@ -1,84 +1,36 @@ { - "_args": [ - [ - "is-property@^1.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\generate-object-property" - ] - ], - "_from": "is-property@>=1.0.0 <2.0.0", - "_id": "is-property@1.0.2", - "_inCache": true, - "_installable": true, - "_location": "/is-property", - "_nodeVersion": "0.10.26", - "_npmUser": { - "email": "mikolalysenko@gmail.com", - "name": "mikolalysenko" - }, - "_npmVersion": "2.1.4", - "_phantomChildren": {}, - "_requested": { - "name": "is-property", - "raw": "is-property@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/generate-object-property" - ], - "_resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "_shasum": "57fe1c4e48474edd65b09911f26b1cd4095dda84", - "_shrinkwrap": null, - "_spec": "is-property@^1.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\generate-object-property", - "author": { - "name": "Mikola Lysenko" - }, - "bugs": { - "url": "https://github.com/mikolalysenko/is-property/issues" + "name": "is-property", + "version": "1.0.2", + "description": "Tests if a JSON property can be accessed using . syntax", + "main": "is-property.js", + "directories": { + "test": "test" }, "dependencies": {}, - "description": "Tests if a JSON property can be accessed using . syntax", "devDependencies": { "tape": "~1.0.4" }, - "directories": { - "test": "test" + "scripts": { + "test": "tap test/*.js" }, - "dist": { - "shasum": "57fe1c4e48474edd65b09911f26b1cd4095dda84", - "tarball": "http://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz" + "repository": { + "type": "git", + "url": "git://github.com/mikolalysenko/is-property.git" }, - "gitHead": "0a85ea5b6b1264ea1cdecc6e5cf186adbb3ffc50", - "homepage": "https://github.com/mikolalysenko/is-property", "keywords": [ - ".", - "[]", - "bracket", - "dot", "is", + "property", "json", - "property" + "dot", + "bracket", + ".", + "[]" ], + "author": "Mikola Lysenko", "license": "MIT", - "main": "is-property.js", - "maintainers": [ - { - "name": "mikolalysenko", - "email": "mikolalysenko@gmail.com" - } - ], - "name": "is-property", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/mikolalysenko/is-property.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "1.0.2" + "readmeFilename": "README.md", + "gitHead": "0a85ea5b6b1264ea1cdecc6e5cf186adbb3ffc50", + "bugs": { + "url": "https://github.com/mikolalysenko/is-property/issues" + } } diff --git a/node_modules/is-resolvable/package.json b/node_modules/is-resolvable/package.json index 02d8ffd..1d4c53c 100644 --- a/node_modules/is-resolvable/package.json +++ b/node_modules/is-resolvable/package.json @@ -1,96 +1,38 @@ { - "_args": [ - [ - "is-resolvable@^1.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "is-resolvable@>=1.0.0 <2.0.0", - "_id": "is-resolvable@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/is-resolvable", - "_nodeVersion": "2.4.0", - "_npmUser": { - "email": "snnskwtnb@gmail.com", - "name": "shinnn" - }, - "_npmVersion": "2.13.1", - "_phantomChildren": {}, - "_requested": { - "name": "is-resolvable", - "raw": "is-resolvable@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz", - "_shasum": "8df57c61ea2e3c501408d100fb013cf8d6e0cc62", - "_shrinkwrap": null, - "_spec": "is-resolvable@^1.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint", - "author": { - "name": "Shinnosuke Watanabe", - "url": "https://github.com/shinnn" - }, - "bugs": { - "url": "https://github.com/shinnn/is-resolvable/issues" - }, - "dependencies": { - "tryit": "^1.0.1" - }, + "name": "is-resolvable", + "version": "1.0.0", "description": "Check if a module ID is resolvable with require()", - "devDependencies": { - "@shinnn/eslintrc-node": "^1.0.2", - "eslint": "^0.24.0", - "istanbul": "^0.3.17", - "tape": "^4.0.0" - }, - "directories": {}, - "dist": { - "shasum": "8df57c61ea2e3c501408d100fb013cf8d6e0cc62", - "tarball": "http://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz" + "repository": "shinnn/is-resolvable", + "author": "Shinnosuke Watanabe (https://github.com/shinnn)", + "scripts": { + "pretest": "eslint --config node_modules/@shinnn/eslintrc-node/rc.json index.js test.js", + "test": "node test.js", + "coverage": "istanbul cover test.js" }, + "license": "MIT", "files": [ "index.js" ], - "gitHead": "e68ea1b3affa382cbd31b4bae1e1421040249a73", - "homepage": "https://github.com/shinnn/is-resolvable#readme", "keywords": [ - "cmap", - "code-point", - "data", + "read", "file", "font", "glyph", - "metadata", + "code-point", + "unicode", "parse", - "read", + "cmap", "table", - "unicode" - ], - "license": "MIT", - "maintainers": [ - { - "name": "shinnn", - "email": "snnskwtnb@gmail.com" - } + "data", + "metadata" ], - "name": "is-resolvable", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/shinnn/is-resolvable.git" - }, - "scripts": { - "coverage": "istanbul cover test.js", - "pretest": "eslint --config node_modules/@shinnn/eslintrc-node/rc.json index.js test.js", - "test": "node test.js" + "dependencies": { + "tryit": "^1.0.1" }, - "version": "1.0.0" + "devDependencies": { + "@shinnn/eslintrc-node": "^1.0.2", + "eslint": "^0.24.0", + "istanbul": "^0.3.17", + "tape": "^4.0.0" + } } diff --git a/node_modules/isarray/package.json b/node_modules/isarray/package.json index 15ac0c0..1a4317a 100644 --- a/node_modules/isarray/package.json +++ b/node_modules/isarray/package.json @@ -1,97 +1,45 @@ { - "_args": [ - [ - "isarray@~1.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\readable-stream" - ] - ], - "_from": "isarray@>=1.0.0 <1.1.0", - "_id": "isarray@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/isarray", - "_nodeVersion": "5.1.0", - "_npmUser": { - "email": "julian@juliangruber.com", - "name": "juliangruber" - }, - "_npmVersion": "3.3.12", - "_phantomChildren": {}, - "_requested": { - "name": "isarray", - "raw": "isarray@~1.0.0", - "rawSpec": "~1.0.0", - "scope": null, - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/doctrine", - "/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "_shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "_shrinkwrap": null, - "_spec": "isarray@~1.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\readable-stream", - "author": { - "email": "mail@juliangruber.com", - "name": "Julian Gruber", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" + "name": "isarray", + "description": "Array#isArray for older browsers", + "version": "1.0.0", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" }, + "homepage": "https://github.com/juliangruber/isarray", + "main": "index.js", "dependencies": {}, - "description": "Array#isArray for older browsers", "devDependencies": { "tape": "~2.13.4" }, - "directories": {}, - "dist": { - "shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "tarball": "http://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - }, - "gitHead": "2a23a281f369e9ae06394c0fb4d2381355a6ba33", - "homepage": "https://github.com/juliangruber/isarray", "keywords": [ - "array", "browser", - "isarray" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } + "isarray", + "array" ], - "name": "isarray", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "scripts": { - "test": "tape test.js" + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" }, + "license": "MIT", "testling": { + "files": "test.js", "browsers": [ - "android-browser/4.2..latest", - "chrome/22..latest", - "chrome/canary", + "ie/8..latest", "firefox/17..latest", "firefox/nightly", - "ie/8..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", + "chrome/22..latest", + "chrome/canary", "opera/12..latest", "opera/next", - "safari/5.1..latest" - ], - "files": "test.js" + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] }, - "version": "1.0.0" + "scripts": { + "test": "tape test.js" + } } diff --git a/node_modules/js-yaml/CHANGELOG.md b/node_modules/js-yaml/CHANGELOG.md index 72d92a5..103b1bb 100644 --- a/node_modules/js-yaml/CHANGELOG.md +++ b/node_modules/js-yaml/CHANGELOG.md @@ -1,3 +1,16 @@ +3.7.0 / 2016-11-12 +------------------ + +- Fix parsing of quotes followed by newlines (#304, thanks to @dplepage). +- Support polymorphism for tags (#300, thanks to @monken). + + +3.6.1 / 2016-05-11 +------------------ + +- Fix output cut on a pipe, #286. + + 3.6.0 / 2016-04-16 ------------------ diff --git a/node_modules/js-yaml/bin/js-yaml.js b/node_modules/js-yaml/bin/js-yaml.js index 5e32400..e79186b 100644 --- a/node_modules/js-yaml/bin/js-yaml.js +++ b/node_modules/js-yaml/bin/js-yaml.js @@ -129,6 +129,4 @@ readFile(options.file, 'utf8', function (error, input) { if (isYaml) console.log(JSON.stringify(output, null, ' ')); else console.log(yaml.dump(output)); - - process.exit(0); }); diff --git a/node_modules/js-yaml/dist/js-yaml.js b/node_modules/js-yaml/dist/js-yaml.js index 10b98b7..49cb23c 100644 --- a/node_modules/js-yaml/dist/js-yaml.js +++ b/node_modules/js-yaml/dist/js-yaml.js @@ -1,4 +1,4 @@ -/* js-yaml 3.6.0 https://github.com/nodeca/js-yaml */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.jsyaml = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o tag; it should be "' + type.kind + '", not "' + state.kind + '"'); @@ -2634,7 +2634,7 @@ function compileList(schema, name, result) { schema[name].forEach(function (currentType) { result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { exclude.push(previousIndex); } }); @@ -2649,16 +2649,20 @@ function compileList(schema, name, result) { function compileMap(/* lists... */) { - var result = {}, index, length; + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {} + }, index, length; function collectType(type) { - result[type.tag] = type; + result[type.kind][type.tag] = result['fallback'][type.tag] = type; } for (index = 0, length = arguments.length; index < length; index += 1) { arguments[index].forEach(collectType); } - return result; } diff --git a/node_modules/js-yaml/dist/js-yaml.min.js b/node_modules/js-yaml/dist/js-yaml.min.js index 2678b7f..211c64c 100644 --- a/node_modules/js-yaml/dist/js-yaml.min.js +++ b/node_modules/js-yaml/dist/js-yaml.min.js @@ -1,3 +1,3 @@ -/* js-yaml 3.6.0 https://github.com/nodeca/js-yaml */ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.jsyaml=e()}}(function(){return function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return r(n?n:e)},l,l.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;an;n+=1)r=o[n],e[r]=t[r];return e}function s(e,t){var n,i="";for(n=0;t>n;n+=1)i+=e;return i}function c(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}t.exports.isNothing=i,t.exports.isObject=r,t.exports.toArray=o,t.exports.repeat=s,t.exports.isNegativeZero=c,t.exports.extend=a},{}],3:[function(e,t,n){"use strict";function i(e,t){var n,i,r,o,a,s,c;if(null===t)return{};for(n={},i=Object.keys(t),r=0,o=i.length;o>r;r+=1)a=i[r],s=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),c=e.compiledTypeMap[a],c&&L.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[a]=s;return n}function r(e){var t,n,i;if(t=e.toString(16).toUpperCase(),255>=e)n="x",i=2;else if(65535>=e)n="u",i=4;else{if(!(4294967295>=e))throw new N("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+F.repeat("0",i-t.length)+t}function o(e){this.schema=e.schema||M,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=F.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=i(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function a(e,t){for(var n,i=F.repeat(" ",t),r=0,o=-1,a="",s=e.length;s>r;)o=e.indexOf("\n",r),-1===o?(n=e.slice(r),r=s):(n=e.slice(r,o+1),r=o+1),n.length&&"\n"!==n&&(a+=i),a+=n;return a}function s(e,t){return"\n"+F.repeat(" ",e.indent*t)}function c(e,t){var n,i,r;for(n=0,i=e.implicitTypes.length;i>n;n+=1)if(r=e.implicitTypes[n],r.resolve(t))return!0;return!1}function u(e){return e===q||e===D}function l(e){return e>=32&&126>=e||e>=161&&55295>=e&&8232!==e&&8233!==e||e>=57344&&65533>=e&&65279!==e||e>=65536&&1114111>=e}function p(e){return l(e)&&65279!==e&&e!==H&&e!==Q&&e!==X&&e!==te&&e!==ie&&e!==V&&e!==B}function f(e){return l(e)&&65279!==e&&!u(e)&&e!==G&&e!==z&&e!==V&&e!==H&&e!==Q&&e!==X&&e!==te&&e!==ie&&e!==B&&e!==W&&e!==$&&e!==Y&&e!==ne&&e!==Z&&e!==K&&e!==R&&e!==P&&e!==J&&e!==ee}function d(e,t,n,i,r){var o,a,s=!1,c=!1,d=-1!==i,h=-1,m=f(e.charCodeAt(0))&&!u(e.charCodeAt(e.length-1));if(t)for(o=0;oi&&" "!==e[h+1],h=o);else if(!l(a))return le;m=m&&p(a)}c=c||d&&o-h-1>i&&" "!==e[h+1]}return s||c?" "===e[0]&&n>9?le:c?ue:ce:m&&!r(e)?ae:se}function h(e,t,n,i){e.dump=function(){function r(t){return c(e,t)}if(0===t.length)return"''";if(!e.noCompatMode&&-1!==oe.indexOf(t))return"'"+t+"'";var o=e.indent*Math.max(1,n),s=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),u=i||e.flowLevel>-1&&n>=e.flowLevel;switch(d(t,u,e.indent,s,r)){case ae:return t;case se:return"'"+t.replace(/'/g,"''")+"'";case ce:return"|"+m(t,e.indent)+g(a(t,o));case ue:return">"+m(t,e.indent)+g(a(y(t,s),o));case le:return'"'+v(t,s)+'"';default:throw new N("impossible error: invalid scalar style")}}()}function m(e,t){var n=" "===e[0]?String(t):"",i="\n"===e[e.length-1],r=i&&("\n"===e[e.length-2]||"\n"===e),o=r?"+":i?"":"-";return n+o+"\n"}function g(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function y(e,t){for(var n,i,r=/(\n+)([^\n]*)/g,o=function(){var n=e.indexOf("\n");return n=-1!==n?n:e.length,r.lastIndex=n,x(e.slice(0,n),t)}(),a="\n"===e[0]||" "===e[0];i=r.exec(e);){var s=i[1],c=i[2];n=" "===c[0],o+=s+(a||n||""===c?"":"\n")+x(c,t),a=n}return o}function x(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,o=0,a=0,s=0,c="";n=r.exec(e);)s=n.index,s-o>t&&(i=a>o?a:s,c+="\n"+e.slice(o,i),o=i+1),a=s;return c+="\n",c+=e.length-o>t&&a>o?e.slice(o,a)+"\n"+e.slice(a+1):e.slice(o),c.slice(1)}function v(e){for(var t,n,i="",o=0;oi;i+=1)j(e,t,n[i],!1,!1)&&(0!==i&&(o+=", "),o+=e.dump);e.tag=a,e.dump="["+o+"]"}function b(e,t,n,i){var r,o,a="",c=e.tag;for(r=0,o=n.length;o>r;r+=1)j(e,t+1,n[r],!0,!0)&&(i&&0===r||(a+=s(e,t)),a+="- "+e.dump);e.tag=c,e.dump=a||"[]"}function w(e,t,n){var i,r,o,a,s,c="",u=e.tag,l=Object.keys(n);for(i=0,r=l.length;r>i;i+=1)s="",0!==i&&(s+=", "),o=l[i],a=n[o],j(e,t,o,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+": ",j(e,t,a,!1,!1)&&(s+=e.dump,c+=s));e.tag=u,e.dump="{"+c+"}"}function C(e,t,n,i){var r,o,a,c,u,l,p="",f=e.tag,d=Object.keys(n);if(e.sortKeys===!0)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new N("sortKeys must be a boolean or a function");for(r=0,o=d.length;o>r;r+=1)l="",i&&0===r||(l+=s(e,t)),a=d[r],c=n[a],j(e,t+1,a,!0,!0,!0)&&(u=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024,u&&(l+=e.dump&&U===e.dump.charCodeAt(0)?"?":"? "),l+=e.dump,u&&(l+=s(e,t)),j(e,t+1,c,!0,u)&&(l+=e.dump&&U===e.dump.charCodeAt(0)?":":": ",l+=e.dump,p+=l));e.tag=f,e.dump=p||"{}"}function k(e,t,n){var i,r,o,a,s,c;for(r=n?e.explicitTypes:e.implicitTypes,o=0,a=r.length;a>o;o+=1)if(s=r[o],(s.instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(e.tag=n?s.tag:"?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,"[object Function]"===T.call(s.represent))i=s.represent(t,c);else{if(!L.call(s.represent,c))throw new N("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');i=s.represent[c](t,c)}e.dump=i}return!0}return!1}function j(e,t,n,i,r,o){e.tag=null,e.dump=n,k(e,n,!1)||k(e,n,!0);var a=T.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var s,c,u="[object Object]"===a||"[object Array]"===a;if(u&&(s=e.duplicates.indexOf(n),c=-1!==s),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&t>0)&&(r=!1),c&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(u&&c&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===a)i&&0!==Object.keys(e.dump).length?(C(e,t,e.dump,r),c&&(e.dump="&ref_"+s+e.dump)):(w(e,t,e.dump),c&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===a)i&&0!==e.dump.length?(b(e,t,e.dump,r),c&&(e.dump="&ref_"+s+e.dump)):(A(e,t,e.dump),c&&(e.dump="&ref_"+s+" "+e.dump));else{if("[object String]"!==a){if(e.skipInvalid)return!1;throw new N("unacceptable kind of an object to dump "+a)}"?"!==e.tag&&h(e,e.dump,t,o)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function I(e,t){var n,i,r=[],o=[];for(S(e,r,o),n=0,i=o.length;i>n;n+=1)t.duplicates.push(r[o[n]]);t.usedDuplicates=new Array(i)}function S(e,t,n){var i,r,o;if(null!==e&&"object"==typeof e)if(r=t.indexOf(e),-1!==r)-1===n.indexOf(r)&&n.push(r);else if(t.push(e),Array.isArray(e))for(r=0,o=e.length;o>r;r+=1)S(e[r],t,n);else for(i=Object.keys(e),r=0,o=i.length;o>r;r+=1)S(e[i[r]],t,n)}function O(e,t){t=t||{};var n=new o(t);return n.noRefs||I(e,n),j(n,0,e,!0,!0)?n.dump+"\n":""}function E(e,t){return O(e,F.extend({schema:_},t))}var F=e("./common"),N=e("./exception"),M=e("./schema/default_full"),_=e("./schema/default_safe"),T=Object.prototype.toString,L=Object.prototype.hasOwnProperty,D=9,U=10,q=32,Y=33,R=34,B=35,P=37,W=38,K=39,$=42,H=44,G=45,V=58,Z=62,z=63,J=64,Q=91,X=93,ee=96,te=123,ne=124,ie=125,re={};re[0]="\\0",re[7]="\\a",re[8]="\\b",re[9]="\\t",re[10]="\\n",re[11]="\\v",re[12]="\\f",re[13]="\\r",re[27]="\\e",re[34]='\\"',re[92]="\\\\",re[133]="\\N",re[160]="\\_",re[8232]="\\L",re[8233]="\\P";var oe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],ae=1,se=2,ce=3,ue=4,le=5;t.exports.dump=O,t.exports.safeDump=E},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(e,t,n){"use strict";function i(e,t){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"")}i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},t.exports=i},{}],5:[function(e,t,n){"use strict";function i(e){return 10===e||13===e}function r(e){return 9===e||32===e}function o(e){return 9===e||32===e||10===e||13===e}function a(e){return 44===e||91===e||93===e||123===e||125===e}function s(e){var t;return e>=48&&57>=e?e-48:(t=32|e,t>=97&&102>=t?t-97+10:-1)}function c(e){return 120===e?2:117===e?4:85===e?8:0}function u(e){return e>=48&&57>=e?e-48:-1}function l(e){return 48===e?"\x00":97===e?"":98===e?"\b":116===e?" ":9===e?" ":110===e?"\n":118===e?"\x0B":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function p(e){return 65535>=e?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function f(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||K,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function d(e,t){return new B(t,new P(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function h(e,t){throw d(e,t)}function m(e,t){e.onWarning&&e.onWarning.call(null,d(e,t))}function g(e,t,n,i){var r,o,a,s;if(n>t){if(s=e.input.slice(t,n),i)for(r=0,o=s.length;o>r;r+=1)a=s.charCodeAt(r),9===a||a>=32&&1114111>=a||h(e,"expected valid JSON character");else X.test(s)&&h(e,"the stream contains non-printable characters");e.result+=s}}function y(e,t,n,i){var r,o,a,s;for(R.isObject(n)||h(e,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(n),a=0,s=r.length;s>a;a+=1)o=r[a],$.call(t,o)||(t[o]=n[o],i[o]=!0)}function x(e,t,n,i,r,o){var a,s;if(r=String(r),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(o))for(a=0,s=o.length;s>a;a+=1)y(e,t,o[a],n);else y(e,t,o,n);else e.json||$.call(n,r)||!$.call(t,r)||h(e,"duplicated mapping key"),t[r]=o,delete n[r];return t}function v(e){var t;t=e.input.charCodeAt(e.position),10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):h(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function A(e,t,n){for(var o=0,a=e.input.charCodeAt(e.position);0!==a;){for(;r(a);)a=e.input.charCodeAt(++e.position);if(t&&35===a)do a=e.input.charCodeAt(++e.position);while(10!==a&&13!==a&&0!==a);if(!i(a))break;for(v(e),a=e.input.charCodeAt(e.position),o++,e.lineIndent=0;32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position)}return-1!==n&&0!==o&&e.lineIndent1&&(e.result+=R.repeat("\n",t-1))}function C(e,t,n){var s,c,u,l,p,f,d,h,m,y=e.kind,x=e.result;if(m=e.input.charCodeAt(e.position),o(m)||a(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(c=e.input.charCodeAt(e.position+1),o(c)||n&&a(c)))return!1;for(e.kind="scalar",e.result="",u=l=e.position,p=!1;0!==m;){if(58===m){if(c=e.input.charCodeAt(e.position+1),o(c)||n&&a(c))break}else if(35===m){if(s=e.input.charCodeAt(e.position-1),o(s))break}else{if(e.position===e.lineStart&&b(e)||n&&a(m))break;if(i(m)){if(f=e.line,d=e.lineStart,h=e.lineIndent,A(e,!1,-1),e.lineIndent>=t){p=!0,m=e.input.charCodeAt(e.position);continue}e.position=l,e.line=f,e.lineStart=d,e.lineIndent=h;break}}p&&(g(e,u,l,!1),w(e,e.line-f),u=l=e.position,p=!1),r(m)||(l=e.position+1),m=e.input.charCodeAt(++e.position)}return g(e,u,l,!1),e.result?!0:(e.kind=y,e.result=x,!1)}function k(e,t){var n,r,o;if(n=e.input.charCodeAt(e.position),39!==n)return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(g(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),39!==n)return!0;r=o=e.position,e.position++}else i(n)?(g(e,r,o,!0),w(e,A(e,!1,t)),r=o=e.position):e.position===e.lineStart&&b(e)?h(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);h(e,"unexpected end of the stream within a single quoted scalar")}function j(e,t){var n,r,o,a,u,l;if(l=e.input.charCodeAt(e.position),34!==l)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return g(e,n,e.position,!0),e.position++,!0;if(92===l){if(g(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),i(l))A(e,!1,t);else if(256>l&&re[l])e.result+=oe[l],e.position++;else if((u=c(l))>0){for(o=u,a=0;o>0;o--)l=e.input.charCodeAt(++e.position),(u=s(l))>=0?a=(a<<4)+u:h(e,"expected hexadecimal character");e.result+=p(a),e.position++}else h(e,"unknown escape sequence");n=r=e.position}else i(l)?(g(e,n,r,!0),w(e,A(e,!1,t)),n=r=e.position):e.position===e.lineStart&&b(e)?h(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}h(e,"unexpected end of the stream within a double quoted scalar")}function I(e,t){var n,i,r,a,s,c,u,l,p,f,d,m=!0,g=e.tag,y=e.anchor,v={};if(d=e.input.charCodeAt(e.position),91===d)a=93,u=!1,i=[];else{if(123!==d)return!1;a=125,u=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),d=e.input.charCodeAt(++e.position);0!==d;){if(A(e,!0,t),d=e.input.charCodeAt(e.position),d===a)return e.position++,e.tag=g,e.anchor=y,e.kind=u?"mapping":"sequence",e.result=i,!0;m||h(e,"missed comma between flow collection entries"),p=l=f=null,s=c=!1,63===d&&(r=e.input.charCodeAt(e.position+1),o(r)&&(s=c=!0,e.position++,A(e,!0,t))),n=e.line,_(e,t,H,!1,!0),p=e.tag,l=e.result,A(e,!0,t),d=e.input.charCodeAt(e.position),!c&&e.line!==n||58!==d||(s=!0,d=e.input.charCodeAt(++e.position),A(e,!0,t),_(e,t,H,!1,!0),f=e.result),u?x(e,i,v,p,l,f):s?i.push(x(e,null,v,p,l,f)):i.push(l),A(e,!0,t),d=e.input.charCodeAt(e.position),44===d?(m=!0,d=e.input.charCodeAt(++e.position)):m=!1}h(e,"unexpected end of the stream within a flow collection")}function S(e,t){var n,o,a,s,c=z,l=!1,p=!1,f=t,d=0,m=!1;if(s=e.input.charCodeAt(e.position),124===s)o=!1;else{if(62!==s)return!1;o=!0}for(e.kind="scalar",e.result="";0!==s;)if(s=e.input.charCodeAt(++e.position),43===s||45===s)z===c?c=43===s?Q:J:h(e,"repeat of a chomping mode identifier");else{if(!((a=u(s))>=0))break;0===a?h(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?h(e,"repeat of an indentation width identifier"):(f=t+a-1,p=!0)}if(r(s)){do s=e.input.charCodeAt(++e.position);while(r(s));if(35===s)do s=e.input.charCodeAt(++e.position);while(!i(s)&&0!==s)}for(;0!==s;){for(v(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!p||e.lineIndentf&&(f=e.lineIndent),i(s))d++;else{if(e.lineIndentt)&&0!==r)h(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(_(e,t,Z,!0,a)&&(y?m=e.result:g=e.result),y||(x(e,p,f,d,m,g),d=m=g=null),A(e,!0,-1),c=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==c)h(e,"bad indentation of a mapping entry");else if(e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentc;c+=1)if(l=e.implicitTypes[c],l.resolve(e.result)){e.result=l.construct(e.result),e.tag=l.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else $.call(e.typeMap,e.tag)?(l=e.typeMap[e.tag],null!==e.result&&l.kind!==e.kind&&h(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):h(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):h(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function T(e){var t,n,a,s,c=e.position,u=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(A(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(u=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),a=[],n.length<1&&h(e,"directive name must not be less than one character in length");0!==s;){for(;r(s);)s=e.input.charCodeAt(++e.position);if(35===s){do s=e.input.charCodeAt(++e.position);while(0!==s&&!i(s));break}if(i(s))break;for(t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);a.push(e.input.slice(t,e.position))}0!==s&&v(e),$.call(se,n)?se[n](e,n,a):m(e,'unknown document directive "'+n+'"')}return A(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,A(e,!0,-1)):u&&h(e,"directives end mark is expected"),_(e,e.lineIndent-1,Z,!1,!0),A(e,!0,-1),e.checkLineBreaks&&ee.test(e.input.slice(c,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&b(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,A(e,!0,-1))):void(e.positioni;i+=1)t(o[i])}function U(e,t){var n=L(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new B("expected a single document in the stream, but found more")}}function q(e,t,n){D(e,t,R.extend({schema:W},n))}function Y(e,t){return U(e,R.extend({schema:W},t))}for(var R=e("./common"),B=e("./exception"),P=e("./mark"),W=e("./schema/default_safe"),K=e("./schema/default_full"),$=Object.prototype.hasOwnProperty,H=1,G=2,V=3,Z=4,z=1,J=2,Q=3,X=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ee=/[\x85\u2028\u2029]/,te=/[,\[\]\{\}]/,ne=/^(?:!|!!|![a-z\-]+!)$/i,ie=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,re=new Array(256),oe=new Array(256),ae=0;256>ae;ae++)re[ae]=l(ae)?1:0,oe[ae]=l(ae);var se={YAML:function(e,t,n){var i,r,o;null!==e.version&&h(e,"duplication of %YAML directive"),1!==n.length&&h(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),null===i&&h(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&h(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=2>o,1!==o&&2!==o&&m(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&h(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],ne.test(i)||h(e,"ill-formed tag handle (first argument) of the TAG directive"),$.call(e.tagMap,i)&&h(e,'there is a previously declared suffix for "'+i+'" tag handle'),ie.test(r)||h(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[i]=r}};t.exports.loadAll=D,t.exports.load=U,t.exports.safeLoadAll=q,t.exports.safeLoad=Y},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(e,t,n){"use strict";function i(e,t,n,i,r){this.name=e,this.buffer=t,this.position=n,this.line=i,this.column=r}var r=e("./common");i.prototype.getSnippet=function(e,t){var n,i,o,a,s;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",i=this.position;i>0&&-1==="\x00\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;at/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",e)+n+s+o+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(n+=":\n"+t)),n},t.exports=i},{"./common":2}],7:[function(e,t,n){"use strict";function i(e,t,n){var r=[];return e.include.forEach(function(e){n=i(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&r.push(n)}),n.push(e)}),n.filter(function(e,t){return-1===r.indexOf(t)})}function r(){function e(e){i[e.tag]=e}var t,n,i={};for(t=0,n=arguments.length;n>t;t+=1)arguments[t].forEach(e);return i}function o(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=i(this,"implicit",[]),this.compiledExplicit=i(this,"explicit",[]),this.compiledTypeMap=r(this.compiledImplicit,this.compiledExplicit)}var a=e("./common"),s=e("./exception"),c=e("./type");o.DEFAULT=null,o.create=function(){var e,t;switch(arguments.length){case 1:e=o.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new s("Wrong number of arguments for Schema.create function")}if(e=a.toArray(e),t=a.toArray(t),!e.every(function(e){return e instanceof o}))throw new s("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every(function(e){return e instanceof c}))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new o({include:e,explicit:t})},t.exports=o},{"./common":2,"./exception":4,"./type":13}],8:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./json")]})},{"../schema":7,"./json":12}],9:[function(e,t,n){"use strict";var i=e("../schema");t.exports=i.DEFAULT=new i({include:[e("./default_safe")],explicit:[e("../type/js/undefined"),e("../type/js/regexp"),e("../type/js/function")]})},{"../schema":7,"../type/js/function":18,"../type/js/regexp":19,"../type/js/undefined":20,"./default_safe":10}],10:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./core")],implicit:[e("../type/timestamp"),e("../type/merge")],explicit:[e("../type/binary"),e("../type/omap"),e("../type/pairs"),e("../type/set")]})},{"../schema":7,"../type/binary":14,"../type/merge":22,"../type/omap":24,"../type/pairs":25,"../type/set":27,"../type/timestamp":29,"./core":8}],11:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({explicit:[e("../type/str"),e("../type/seq"),e("../type/map")]})},{"../schema":7,"../type/map":21,"../type/seq":26,"../type/str":28}],12:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./failsafe")],implicit:[e("../type/null"),e("../type/bool"),e("../type/int"),e("../type/float")]})},{"../schema":7,"../type/bool":15,"../type/float":16,"../type/int":17,"../type/null":23,"./failsafe":11}],13:[function(e,t,n){"use strict";function i(e){var t={};return null!==e&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}function r(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===a.indexOf(t))throw new o('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=i(t.styleAliases||null),-1===s.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var o=e("./exception"),a=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];t.exports=r},{"./exception":4}],14:[function(e,t,n){"use strict";function i(e){if(null===e)return!1;var t,n,i=0,r=e.length,o=p;for(n=0;r>n;n++)if(t=o.indexOf(e.charAt(n)),!(t>64)){if(0>t)return!1;i+=6}return i%8===0}function r(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=p,a=0,c=[];for(t=0;r>t;t++)t%4===0&&t&&(c.push(a>>16&255),c.push(a>>8&255),c.push(255&a)),a=a<<6|o.indexOf(i.charAt(t));return n=r%4*6,0===n?(c.push(a>>16&255),c.push(a>>8&255),c.push(255&a)):18===n?(c.push(a>>10&255),c.push(a>>2&255)):12===n&&c.push(a>>4&255),s?new s(c):c}function o(e){var t,n,i="",r=0,o=e.length,a=p;for(t=0;o>t;t++)t%3===0&&t&&(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t];return n=o%3,0===n?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}function a(e){return s&&s.isBuffer(e)}var s;try{var c=e;s=c("buffer").Buffer; -}catch(u){}var l=e("../type"),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new l("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../type":13}],15:[function(e,t,n){"use strict";function i(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)}function r(e){return"true"===e||"True"===e||"TRUE"===e}function o(e){return"[object Boolean]"===Object.prototype.toString.call(e)}var a=e("../type");t.exports=new a("tag:yaml.org,2002:bool",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(e,t,n){"use strict";function i(e){return null===e?!1:!!u.test(e)}function r(e){var t,n,i,r;return t=e.replace(/_/g,"").toLowerCase(),n="-"===t[0]?-1:1,r=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(e){r.unshift(parseFloat(e,10))}),t=0,i=1,r.forEach(function(e){t+=e*i,i*=60}),n*t):n*parseFloat(t,10)}function o(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(s.isNegativeZero(e))return"-0.0";return n=e.toString(10),l.test(n)?n.replace("e",".e"):n}function a(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!==0||s.isNegativeZero(e))}var s=e("../common"),c=e("../type"),u=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),l=/^[-+]?[0-9]+e/;t.exports=new c("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o,defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(e,t,n){"use strict";function i(e){return e>=48&&57>=e||e>=65&&70>=e||e>=97&&102>=e}function r(e){return e>=48&&55>=e}function o(e){return e>=48&&57>=e}function a(e){if(null===e)return!1;var t,n=e.length,a=0,s=!1;if(!n)return!1;if(t=e[a],"-"!==t&&"+"!==t||(t=e[++a]),"0"===t){if(a+1===n)return!0;if(t=e[++a],"b"===t){for(a++;n>a;a++)if(t=e[a],"_"!==t){if("0"!==t&&"1"!==t)return!1;s=!0}return s}if("x"===t){for(a++;n>a;a++)if(t=e[a],"_"!==t){if(!i(e.charCodeAt(a)))return!1;s=!0}return s}for(;n>a;a++)if(t=e[a],"_"!==t){if(!r(e.charCodeAt(a)))return!1;s=!0}return s}for(;n>a;a++)if(t=e[a],"_"!==t){if(":"===t)break;if(!o(e.charCodeAt(a)))return!1;s=!0}return s?":"!==t?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(a)):!1}function s(e){var t,n,i=e,r=1,o=[];return-1!==i.indexOf("_")&&(i=i.replace(/_/g,"")),t=i[0],"-"!==t&&"+"!==t||("-"===t&&(r=-1),i=i.slice(1),t=i[0]),"0"===i?0:"0"===t?"b"===i[1]?r*parseInt(i.slice(2),2):"x"===i[1]?r*parseInt(i,16):r*parseInt(i,8):-1!==i.indexOf(":")?(i.split(":").forEach(function(e){o.unshift(parseInt(e,10))}),i=0,n=1,o.forEach(function(e){i+=e*n,n*=60}),r*i):r*parseInt(i,10)}function c(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1===0&&!u.isNegativeZero(e)}var u=e("../common"),l=e("../type");t.exports=new l("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:s,predicate:c,represent:{binary:function(e){return"0b"+e.toString(2)},octal:function(e){return"0"+e.toString(8)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return"0x"+e.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":2,"../type":13}],18:[function(e,t,n){"use strict";function i(e){if(null===e)return!1;try{var t="("+e+")",n=s.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&"FunctionExpression"===n.body[0].expression.type}catch(i){return!1}}function r(e){var t,n="("+e+")",i=s.parse(n,{range:!0}),r=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach(function(e){r.push(e.name)}),t=i.body[0].expression.body.range,new Function(r,n.slice(t[0]+1,t[1]-1))}function o(e){return e.toString()}function a(e){return"[object Function]"===Object.prototype.toString.call(e)}var s;try{var c=e;s=c("esprima")}catch(u){"undefined"!=typeof window&&(s=window.esprima)}var l=e("../../type");t.exports=new l("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],19:[function(e,t,n){"use strict";function i(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,n=/\/([gim]*)$/.exec(e),i="";if("/"===t[0]){if(n&&(i=n[1]),i.length>3)return!1;if("/"!==t[t.length-i.length-1])return!1}return!0}function r(e){var t=e,n=/\/([gim]*)$/.exec(e),i="";return"/"===t[0]&&(n&&(i=n[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)}function o(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function a(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],20:[function(e,t,n){"use strict";function i(){return!0}function r(){}function o(){return""}function a(e){return"undefined"==typeof e}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],21:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":13}],22:[function(e,t,n){"use strict";function i(e){return"<<"===e||null===e}var r=e("../type");t.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:i})},{"../type":13}],23:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function r(){return null}function o(e){return null===e}var a=e("../type");t.exports=new a("tag:yaml.org,2002:null",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":13}],24:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t,n,i,r,o,c=[],u=e;for(t=0,n=u.length;n>t;t+=1){if(i=u[t],o=!1,"[object Object]"!==s.call(i))return!1;for(r in i)if(a.call(i,r)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==c.indexOf(r))return!1;c.push(r)}return!0}function r(e){return null!==e?e:[]}var o=e("../type"),a=Object.prototype.hasOwnProperty,s=Object.prototype.toString;t.exports=new o("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:r})},{"../type":13}],25:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t,n,i,r,o,s=e;for(o=new Array(s.length),t=0,n=s.length;n>t;t+=1){if(i=s[t],"[object Object]"!==a.call(i))return!1;if(r=Object.keys(i),1!==r.length)return!1;o[t]=[r[0],i[r[0]]]}return!0}function r(e){if(null===e)return[];var t,n,i,r,o,a=e;for(o=new Array(a.length),t=0,n=a.length;n>t;t+=1)i=a[t],r=Object.keys(i),o[t]=[r[0],i[r[0]]];return o}var o=e("../type"),a=Object.prototype.toString;t.exports=new o("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:r})},{"../type":13}],26:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},{"../type":13}],27:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t,n=e;for(t in n)if(a.call(n,t)&&null!==n[t])return!1;return!0}function r(e){return null!==e?e:{}}var o=e("../type"),a=Object.prototype.hasOwnProperty;t.exports=new o("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:r})},{"../type":13}],28:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},{"../type":13}],29:[function(e,t,n){"use strict";function i(e){return null===e?!1:null!==s.exec(e)?!0:null!==c.exec(e)}function r(e){var t,n,i,r,o,a,u,l,p,f,d=0,h=null;if(t=s.exec(e),null===t&&(t=c.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r));if(o=+t[4],a=+t[5],u=+t[6],t[7]){for(d=t[7].slice(0,3);d.length<3;)d+="0";d=+d}return t[9]&&(l=+t[10],p=+(t[11]||0),h=6e4*(60*l+p),"-"===t[9]&&(h=-h)),f=new Date(Date.UTC(n,i,r,o,a,u,d)),h&&f.setTime(f.getTime()-h),f}function o(e){return e.toISOString()}var a=e("../type"),s=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),c=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");t.exports=new a("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:r,instanceOf:Date,represent:o})},{"../type":13}],"/":[function(e,t,n){"use strict";var i=e("./lib/js-yaml.js");t.exports=i},{"./lib/js-yaml.js":1}]},{},[])("/")}); +/* js-yaml 3.7.0 https://github.com/nodeca/js-yaml */ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.jsyaml=e()}}(function(){return function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return r(n?n:e)},l,l.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;ai&&" "!==e[h+1],h=o);else if(!l(a))return le;m=m&&p(a)}c=c||d&&o-h-1>i&&" "!==e[h+1]}return s||c?" "===e[0]&&n>9?le:c?ue:ce:m&&!r(e)?ae:se}function h(e,t,n,i){e.dump=function(){function r(t){return c(e,t)}if(0===t.length)return"''";if(!e.noCompatMode&&oe.indexOf(t)!==-1)return"'"+t+"'";var o=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),u=i||e.flowLevel>-1&&n>=e.flowLevel;switch(d(t,u,e.indent,s,r)){case ae:return t;case se:return"'"+t.replace(/'/g,"''")+"'";case ce:return"|"+m(t,e.indent)+g(a(t,o));case ue:return">"+m(t,e.indent)+g(a(y(t,s),o));case le:return'"'+v(t,s)+'"';default:throw new N("impossible error: invalid scalar style")}}()}function m(e,t){var n=" "===e[0]?String(t):"",i="\n"===e[e.length-1],r=i&&("\n"===e[e.length-2]||"\n"===e),o=r?"+":i?"":"-";return n+o+"\n"}function g(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function y(e,t){for(var n,i,r=/(\n+)([^\n]*)/g,o=function(){var n=e.indexOf("\n");return n=n!==-1?n:e.length,r.lastIndex=n,x(e.slice(0,n),t)}(),a="\n"===e[0]||" "===e[0];i=r.exec(e);){var s=i[1],c=i[2];n=" "===c[0],o+=s+(a||n||""===c?"":"\n")+x(c,t),a=n}return o}function x(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,o=0,a=0,s=0,c="";n=r.exec(e);)s=n.index,s-o>t&&(i=a>o?a:s,c+="\n"+e.slice(o,i),o=i+1),a=s;return c+="\n",c+=e.length-o>t&&a>o?e.slice(o,a)+"\n"+e.slice(a+1):e.slice(o),c.slice(1)}function v(e){for(var t,n,i="",o=0;o1024&&(s+="? "),s+=e.dump+": ",j(e,t,a,!1,!1)&&(s+=e.dump,c+=s));e.tag=u,e.dump="{"+c+"}"}function C(e,t,n,i){var r,o,a,c,u,l,p="",f=e.tag,d=Object.keys(n);if(e.sortKeys===!0)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new N("sortKeys must be a boolean or a function");for(r=0,o=d.length;r1024,u&&(l+=e.dump&&U===e.dump.charCodeAt(0)?"?":"? "),l+=e.dump,u&&(l+=s(e,t)),j(e,t+1,c,!0,u)&&(l+=e.dump&&U===e.dump.charCodeAt(0)?":":": ",l+=e.dump,p+=l));e.tag=f,e.dump=p||"{}"}function k(e,t,n){var i,r,o,a,s,c;for(r=n?e.explicitTypes:e.implicitTypes,o=0,a=r.length;o tag resolver accepts not "'+c+'" style');i=s.represent[c](t,c)}e.dump=i}return!0}return!1}function j(e,t,n,i,r,o){e.tag=null,e.dump=n,k(e,n,!1)||k(e,n,!0);var a=T.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var s,c,u="[object Object]"===a||"[object Array]"===a;if(u&&(s=e.duplicates.indexOf(n),c=s!==-1),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&t>0)&&(r=!1),c&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(u&&c&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===a)i&&0!==Object.keys(e.dump).length?(C(e,t,e.dump,r),c&&(e.dump="&ref_"+s+e.dump)):(w(e,t,e.dump),c&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===a)i&&0!==e.dump.length?(b(e,t,e.dump,r),c&&(e.dump="&ref_"+s+e.dump)):(A(e,t,e.dump),c&&(e.dump="&ref_"+s+" "+e.dump));else{if("[object String]"!==a){if(e.skipInvalid)return!1;throw new N("unacceptable kind of an object to dump "+a)}"?"!==e.tag&&h(e,e.dump,t,o)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function I(e,t){var n,i,r=[],o=[];for(S(e,r,o),n=0,i=o.length;n>10)+55296,(e-65536&1023)+56320)}function f(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||K,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function d(e,t){return new P(t,new W(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function h(e,t){throw d(e,t)}function m(e,t){e.onWarning&&e.onWarning.call(null,d(e,t))}function g(e,t,n,i){var r,o,a,s;if(t1&&(e.result+=R.repeat("\n",t-1))}function C(e,t,n){var s,c,u,l,p,f,d,h,m,y=e.kind,x=e.result;if(m=e.input.charCodeAt(e.position),o(m)||a(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(c=e.input.charCodeAt(e.position+1),o(c)||n&&a(c)))return!1;for(e.kind="scalar",e.result="",u=l=e.position,p=!1;0!==m;){if(58===m){if(c=e.input.charCodeAt(e.position+1),o(c)||n&&a(c))break}else if(35===m){if(s=e.input.charCodeAt(e.position-1),o(s))break}else{if(e.position===e.lineStart&&b(e)||n&&a(m))break;if(i(m)){if(f=e.line,d=e.lineStart,h=e.lineIndent,A(e,!1,-1),e.lineIndent>=t){p=!0,m=e.input.charCodeAt(e.position);continue}e.position=l,e.line=f,e.lineStart=d,e.lineIndent=h;break}}p&&(g(e,u,l,!1),w(e,e.line-f),u=l=e.position,p=!1),r(m)||(l=e.position+1),m=e.input.charCodeAt(++e.position)}return g(e,u,l,!1),!!e.result||(e.kind=y,e.result=x,!1)}function k(e,t){var n,r,o;if(n=e.input.charCodeAt(e.position),39!==n)return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(g(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),39!==n)return!0;r=e.position,e.position++,o=e.position}else i(n)?(g(e,r,o,!0),w(e,A(e,!1,t)),r=o=e.position):e.position===e.lineStart&&b(e)?h(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);h(e,"unexpected end of the stream within a single quoted scalar")}function j(e,t){var n,r,o,a,u,l;if(l=e.input.charCodeAt(e.position),34!==l)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return g(e,n,e.position,!0),e.position++,!0;if(92===l){if(g(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),i(l))A(e,!1,t);else if(l<256&&re[l])e.result+=oe[l],e.position++;else if((u=c(l))>0){for(o=u,a=0;o>0;o--)l=e.input.charCodeAt(++e.position),(u=s(l))>=0?a=(a<<4)+u:h(e,"expected hexadecimal character");e.result+=p(a),e.position++}else h(e,"unknown escape sequence");n=r=e.position}else i(l)?(g(e,n,r,!0),w(e,A(e,!1,t)),n=r=e.position):e.position===e.lineStart&&b(e)?h(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}h(e,"unexpected end of the stream within a double quoted scalar")}function I(e,t){var n,i,r,a,s,c,u,l,p,f,d,m=!0,g=e.tag,y=e.anchor,v={};if(d=e.input.charCodeAt(e.position),91===d)a=93,u=!1,i=[];else{if(123!==d)return!1;a=125,u=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),d=e.input.charCodeAt(++e.position);0!==d;){if(A(e,!0,t),d=e.input.charCodeAt(e.position),d===a)return e.position++,e.tag=g,e.anchor=y,e.kind=u?"mapping":"sequence",e.result=i,!0;m||h(e,"missed comma between flow collection entries"),p=l=f=null,s=c=!1,63===d&&(r=e.input.charCodeAt(e.position+1),o(r)&&(s=c=!0,e.position++,A(e,!0,t))),n=e.line,_(e,t,H,!1,!0),p=e.tag,l=e.result,A(e,!0,t),d=e.input.charCodeAt(e.position),!c&&e.line!==n||58!==d||(s=!0,d=e.input.charCodeAt(++e.position),A(e,!0,t),_(e,t,H,!1,!0),f=e.result),u?x(e,i,v,p,l,f):s?i.push(x(e,null,v,p,l,f)):i.push(l),A(e,!0,t),d=e.input.charCodeAt(e.position),44===d?(m=!0,d=e.input.charCodeAt(++e.position)):m=!1}h(e,"unexpected end of the stream within a flow collection")}function S(e,t){var n,o,a,s,c=z,l=!1,p=!1,f=t,d=0,m=!1;if(s=e.input.charCodeAt(e.position),124===s)o=!1;else{if(62!==s)return!1;o=!0}for(e.kind="scalar",e.result="";0!==s;)if(s=e.input.charCodeAt(++e.position),43===s||45===s)z===c?c=43===s?Q:J:h(e,"repeat of a chomping mode identifier");else{if(!((a=u(s))>=0))break;0===a?h(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?h(e,"repeat of an indentation width identifier"):(f=t+a-1,p=!0)}if(r(s)){do s=e.input.charCodeAt(++e.position);while(r(s));if(35===s)do s=e.input.charCodeAt(++e.position);while(!i(s)&&0!==s)}for(;0!==s;){for(v(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!p||e.lineIndentf&&(f=e.lineIndent),i(s))d++;else{if(e.lineIndentt)&&0!==r)h(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(_(e,t,Z,!0,a)&&(y?m=e.result:g=e.result),y||(x(e,p,f,d,m,g),d=m=g=null),A(e,!0,-1),c=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==c)h(e,"bad indentation of a mapping entry");else if(e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndent tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):h(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):h(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function T(e){var t,n,a,s,c=e.position,u=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(A(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(u=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),a=[],n.length<1&&h(e,"directive name must not be less than one character in length");0!==s;){for(;r(s);)s=e.input.charCodeAt(++e.position);if(35===s){do s=e.input.charCodeAt(++e.position);while(0!==s&&!i(s));break}if(i(s))break;for(t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);a.push(e.input.slice(t,e.position))}0!==s&&v(e),$.call(se,n)?se[n](e,n,a):m(e,'unknown document directive "'+n+'"')}return A(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,A(e,!0,-1)):u&&h(e,"directives end mark is expected"),_(e,e.lineIndent-1,Z,!1,!0),A(e,!0,-1),e.checkLineBreaks&&ee.test(e.input.slice(c,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&b(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,A(e,!0,-1))):void(e.position0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1))===-1;)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;at/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",e)+n+s+o+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(n+=":\n"+t)),n},t.exports=i},{"./common":2}],7:[function(e,t,n){"use strict";function i(e,t,n){var r=[];return e.include.forEach(function(e){n=i(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&t.kind===e.kind&&r.push(n)}),n.push(e)}),n.filter(function(e,t){return r.indexOf(t)===-1})}function r(){function e(e){i[e.kind][e.tag]=i.fallback[e.tag]=e}var t,n,i={scalar:{},sequence:{},mapping:{},fallback:{}};for(t=0,n=arguments.length;t64)){if(t<0)return!1;i+=6}return i%8===0}function r(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=l,a=0,c=[];for(t=0;t>16&255),c.push(a>>8&255),c.push(255&a)),a=a<<6|o.indexOf(i.charAt(t));return n=r%4*6,0===n?(c.push(a>>16&255),c.push(a>>8&255),c.push(255&a)):18===n?(c.push(a>>10&255),c.push(a>>2&255)):12===n&&c.push(a>>4&255),s?new s(c):c}function o(e){var t,n,i="",r=0,o=e.length,a=l;for(t=0;t>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t];return n=o%3,0===n?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63], +i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}function a(e){return s&&s.isBuffer(e)}var s;try{var c=e;s=c("buffer").Buffer}catch(e){}var u=e("../type"),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../type":13}],15:[function(e,t,n){"use strict";function i(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)}function r(e){return"true"===e||"True"===e||"TRUE"===e}function o(e){return"[object Boolean]"===Object.prototype.toString.call(e)}var a=e("../type");t.exports=new a("tag:yaml.org,2002:bool",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(e,t,n){"use strict";function i(e){return null!==e&&!!u.test(e)}function r(e){var t,n,i,r;return t=e.replace(/_/g,"").toLowerCase(),n="-"===t[0]?-1:1,r=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(e){r.unshift(parseFloat(e,10))}),t=0,i=1,r.forEach(function(e){t+=e*i,i*=60}),n*t):n*parseFloat(t,10)}function o(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(s.isNegativeZero(e))return"-0.0";return n=e.toString(10),l.test(n)?n.replace("e",".e"):n}function a(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!==0||s.isNegativeZero(e))}var s=e("../common"),c=e("../type"),u=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),l=/^[-+]?[0-9]+e/;t.exports=new c("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o,defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(e,t,n){"use strict";function i(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function r(e){return 48<=e&&e<=55}function o(e){return 48<=e&&e<=57}function a(e){if(null===e)return!1;var t,n=e.length,a=0,s=!1;if(!n)return!1;if(t=e[a],"-"!==t&&"+"!==t||(t=e[++a]),"0"===t){if(a+1===n)return!0;if(t=e[++a],"b"===t){for(a++;a3)return!1;if("/"!==t[t.length-i.length-1])return!1}return!0}function r(e){var t=e,n=/\/([gim]*)$/.exec(e),i="";return"/"===t[0]&&(n&&(i=n[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)}function o(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function a(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],20:[function(e,t,n){"use strict";function i(){return!0}function r(){}function o(){return""}function a(e){return"undefined"==typeof e}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],21:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":13}],22:[function(e,t,n){"use strict";function i(e){return"<<"===e||null===e}var r=e("../type");t.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:i})},{"../type":13}],23:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function r(){return null}function o(e){return null===e}var a=e("../type");t.exports=new a("tag:yaml.org,2002:null",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":13}],24:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t,n,i,r,o,c=[],u=e;for(t=0,n=u.length;t tag; it should be "' + type.kind + '", not "' + state.kind + '"'); diff --git a/node_modules/js-yaml/lib/js-yaml/schema.js b/node_modules/js-yaml/lib/js-yaml/schema.js index 32803ff..ca7cf47 100644 --- a/node_modules/js-yaml/lib/js-yaml/schema.js +++ b/node_modules/js-yaml/lib/js-yaml/schema.js @@ -16,7 +16,7 @@ function compileList(schema, name, result) { schema[name].forEach(function (currentType) { result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { exclude.push(previousIndex); } }); @@ -31,16 +31,20 @@ function compileList(schema, name, result) { function compileMap(/* lists... */) { - var result = {}, index, length; + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {} + }, index, length; function collectType(type) { - result[type.tag] = type; + result[type.kind][type.tag] = result['fallback'][type.tag] = type; } for (index = 0, length = arguments.length; index < length; index += 1) { arguments[index].forEach(collectType); } - return result; } diff --git a/node_modules/js-yaml/node_modules/.bin/esparse b/node_modules/js-yaml/node_modules/.bin/esparse new file mode 100644 index 0000000..29512d9 --- /dev/null +++ b/node_modules/js-yaml/node_modules/.bin/esparse @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../../../esprima/bin/esparse.js" "$@" + ret=$? +else + node "$basedir/../../../esprima/bin/esparse.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/js-yaml/node_modules/.bin/esparse.cmd b/node_modules/js-yaml/node_modules/.bin/esparse.cmd new file mode 100644 index 0000000..c6b5d84 --- /dev/null +++ b/node_modules/js-yaml/node_modules/.bin/esparse.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\..\..\esprima\bin\esparse.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\..\..\esprima\bin\esparse.js" %* +) \ No newline at end of file diff --git a/node_modules/js-yaml/node_modules/.bin/esvalidate b/node_modules/js-yaml/node_modules/.bin/esvalidate new file mode 100644 index 0000000..41eb4d9 --- /dev/null +++ b/node_modules/js-yaml/node_modules/.bin/esvalidate @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../../../esprima/bin/esvalidate.js" "$@" + ret=$? +else + node "$basedir/../../../esprima/bin/esvalidate.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/js-yaml/node_modules/.bin/esvalidate.cmd b/node_modules/js-yaml/node_modules/.bin/esvalidate.cmd new file mode 100644 index 0000000..18eb35d --- /dev/null +++ b/node_modules/js-yaml/node_modules/.bin/esvalidate.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\..\..\esprima\bin\esvalidate.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\..\..\esprima\bin\esvalidate.js" %* +) \ No newline at end of file diff --git a/node_modules/js-yaml/package.json b/node_modules/js-yaml/package.json index 39c5f9b..1c6deb1 100644 --- a/node_modules/js-yaml/package.json +++ b/node_modules/js-yaml/package.json @@ -1,75 +1,35 @@ { - "_args": [ - [ - "js-yaml@^3.5.4", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\sass-lint" - ] + "name": "js-yaml", + "version": "3.7.0", + "description": "YAML 1.2 parser and serializer", + "keywords": [ + "yaml", + "parser", + "serializer", + "pyyaml" ], - "_from": "js-yaml@>=3.5.4 <4.0.0", - "_id": "js-yaml@3.6.0", - "_inCache": true, - "_installable": true, - "_location": "/js-yaml", - "_nodeVersion": "4.4.1", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/js-yaml-3.6.0.tgz_1460755132000_0.1514641239773482" - }, - "_npmUser": { - "email": "vitaly@rcdesign.ru", - "name": "vitaly" - }, - "_npmVersion": "2.14.20", - "_phantomChildren": {}, - "_requested": { - "name": "js-yaml", - "raw": "js-yaml@^3.5.4", - "rawSpec": "^3.5.4", - "scope": null, - "spec": ">=3.5.4 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint", - "/sass-lint" + "homepage": "https://github.com/nodeca/js-yaml", + "author": "Vladimir Zapparov ", + "contributors": [ + "Aleksey V Zapparov (http://www.ixti.net/)", + "Vitaly Puzrin (https://github.com/puzrin)", + "Martin Grenfell (http://got-ravings.blogspot.com)" + ], + "license": "MIT", + "repository": "nodeca/js-yaml", + "files": [ + "index.js", + "lib/", + "bin/", + "dist/" ], - "_resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.0.tgz", - "_shasum": "3b7bf3256dd598f60f8b6f8ea75514a585a24dc6", - "_shrinkwrap": null, - "_spec": "js-yaml@^3.5.4", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\sass-lint", - "author": { - "email": "dervus.grim@gmail.com", - "name": "Vladimir Zapparov" - }, "bin": { "js-yaml": "bin/js-yaml.js" }, - "bugs": { - "url": "https://github.com/nodeca/js-yaml/issues" - }, - "contributors": [ - { - "name": "Aleksey V Zapparov", - "email": "ixti@member.fsf.org", - "url": "http://www.ixti.net/" - }, - { - "name": "Vitaly Puzrin", - "email": "vitaly@rcdesign.ru", - "url": "https://github.com/puzrin" - }, - { - "name": "Martin Grenfell", - "email": "martin.grenfell@gmail.com", - "url": "http://got-ravings.blogspot.com" - } - ], "dependencies": { "argparse": "^1.0.7", "esprima": "^2.6.0" }, - "description": "YAML 1.2 parser and serializer", "devDependencies": { "ansi": "*", "benchmark": "*", @@ -80,41 +40,7 @@ "mocha": "*", "uglify-js": "^2.6.1" }, - "directories": {}, - "dist": { - "shasum": "3b7bf3256dd598f60f8b6f8ea75514a585a24dc6", - "tarball": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.0.tgz" - }, - "files": [ - "bin/", - "dist/", - "index.js", - "lib/" - ], - "gitHead": "87e4cdc21deec3dda9b811366fb3a3af16c08f0d", - "homepage": "https://github.com/nodeca/js-yaml", - "keywords": [ - "parser", - "pyyaml", - "serializer", - "yaml" - ], - "license": "MIT", - "maintainers": [ - { - "name": "vitaly", - "email": "vitaly@rcdesign.ru" - } - ], - "name": "js-yaml", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/nodeca/js-yaml.git" - }, "scripts": { "test": "make test" - }, - "version": "3.6.0" + } } diff --git a/node_modules/json-stable-stringify/package.json b/node_modules/json-stable-stringify/package.json index 17ba014..4fbcc34 100644 --- a/node_modules/json-stable-stringify/package.json +++ b/node_modules/json-stable-stringify/package.json @@ -1,101 +1,44 @@ { - "_args": [ - [ - "json-stable-stringify@^1.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "json-stable-stringify@>=1.0.0 <2.0.0", - "_id": "json-stable-stringify@1.0.1", - "_inCache": true, - "_installable": true, - "_location": "/json-stable-stringify", - "_nodeVersion": "4.2.1", - "_npmOperationalInternal": { - "host": "packages-5-east.internal.npmjs.com", - "tmp": "tmp/json-stable-stringify-1.0.1.tgz_1454436356521_0.9410459187347442" - }, - "_npmUser": { - "email": "substack@gmail.com", - "name": "substack" - }, - "_npmVersion": "3.4.1", - "_phantomChildren": {}, - "_requested": { - "name": "json-stable-stringify", - "raw": "json-stable-stringify@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "_shasum": "9a759d39c5f2ff503fd5300646ed445f88c4f9af", - "_shrinkwrap": null, - "_spec": "json-stable-stringify@^1.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint", - "author": { - "email": "mail@substack.net", - "name": "James Halliday", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/json-stable-stringify/issues" - }, + "name": "json-stable-stringify", + "version": "1.0.1", + "description": "deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results", + "main": "index.js", "dependencies": { "jsonify": "~0.0.0" }, - "description": "deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results", "devDependencies": { "tape": "~1.0.4" }, - "directories": {}, - "dist": { - "shasum": "9a759d39c5f2ff503fd5300646ed445f88c4f9af", - "tarball": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz" + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "ff/5", "ff/latest", + "chrome/15", "chrome/latest", + "safari/latest", + "opera/latest" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/json-stable-stringify.git" }, - "gitHead": "4a3ac9cc006a91e64901f8ebe78d23bf9fc9fbd0", "homepage": "https://github.com/substack/json-stable-stringify", "keywords": [ + "json", + "stringify", "deterministic", "hash", - "json", "sort", - "stable", - "stringify" + "stable" ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "name": "json-stable-stringify", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/substack/json-stable-stringify.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "testling": { - "browsers": [ - "chrome/15", - "chrome/latest", - "ff/5", - "ff/latest", - "ie/8..latest", - "opera/latest", - "safari/latest" - ], - "files": "test/*.js" + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" }, - "version": "1.0.1" + "license": "MIT" } diff --git a/node_modules/jsonfile/CHANGELOG.md b/node_modules/jsonfile/CHANGELOG.md index 43adcdf..66fcbb4 100644 --- a/node_modules/jsonfile/CHANGELOG.md +++ b/node_modules/jsonfile/CHANGELOG.md @@ -1,3 +1,12 @@ +2.4.0 / 2016-09-15 +------------------ +### Changed +- added optional support for `graceful-fs` [#62] + +2.3.1 / 2016-05-13 +------------------ +- fix to support BOM. [#45][#45] + 2.3.0 / 2016-04-16 ------------------ - add `throws` to `readFile()`. See [#39][#39] @@ -70,6 +79,7 @@ changes it according to docs. [#12][#12] ------------------ * Initial release. +[#45]: https://github.com/jprichardson/node-jsonfile/issues/45 "Reading of UTF8-encoded (w/ BOM) files fails" [#44]: https://github.com/jprichardson/node-jsonfile/issues/44 "Extra characters in written file" [#43]: https://github.com/jprichardson/node-jsonfile/issues/43 "Prettyfy json when written to file" [#42]: https://github.com/jprichardson/node-jsonfile/pull/42 "Moved fs.readFileSync within the try/catch" diff --git a/node_modules/jsonfile/appveyor.yml b/node_modules/jsonfile/appveyor.yml index 08a2803..872af18 100644 --- a/node_modules/jsonfile/appveyor.yml +++ b/node_modules/jsonfile/appveyor.yml @@ -6,6 +6,7 @@ environment: - nodejs_version: "0.12" - nodejs_version: "4" - nodejs_version: "5" + - nodejs_version: "6" # Install scripts. (runs after repo cloning) install: diff --git a/node_modules/jsonfile/index.js b/node_modules/jsonfile/index.js index 3ea6fbe..7111e15 100644 --- a/node_modules/jsonfile/index.js +++ b/node_modules/jsonfile/index.js @@ -1,4 +1,9 @@ -var _fs = require('fs') +var _fs +try { + _fs = require('graceful-fs') +} catch (_) { + _fs = require('fs') +} function readFile (file, options, callback) { if (callback == null) { @@ -24,6 +29,8 @@ function readFile (file, options, callback) { fs.readFile(file, options, function (err, data) { if (err) return callback(err) + data = stripBom(data) + var obj try { obj = JSON.parse(data, options ? options.reviver : null) @@ -57,6 +64,7 @@ function readFileSync (file, options) { } var content = fs.readFileSync(file, options) + content = stripBom(content) try { return JSON.parse(content, options.reviver) @@ -107,6 +115,13 @@ function writeFileSync (file, obj, options) { return fs.writeFileSync(file, str, options) } +function stripBom (content) { + // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified + if (Buffer.isBuffer(content)) content = content.toString('utf8') + content = content.replace(/^\uFEFF/, '') + return content +} + var jsonfile = { spaces: null, readFile: readFile, diff --git a/node_modules/jsonfile/package.json b/node_modules/jsonfile/package.json index d3ed853..ea7ac1e 100644 --- a/node_modules/jsonfile/package.json +++ b/node_modules/jsonfile/package.json @@ -1,91 +1,35 @@ { - "_args": [ - [ - "jsonfile@^2.1.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\fs-extra" - ] - ], - "_from": "jsonfile@>=2.1.0 <3.0.0", - "_id": "jsonfile@2.3.0", - "_inCache": true, - "_installable": true, - "_location": "/jsonfile", - "_nodeVersion": "5.3.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/jsonfile-2.3.0.tgz_1460870694675_0.8002879491541535" - }, - "_npmUser": { - "email": "jprichardson@gmail.com", - "name": "jprichardson" - }, - "_npmVersion": "3.8.2", - "_phantomChildren": {}, - "_requested": { - "name": "jsonfile", - "raw": "jsonfile@^2.1.0", - "rawSpec": "^2.1.0", - "scope": null, - "spec": ">=2.1.0 <3.0.0", - "type": "range" + "name": "jsonfile", + "version": "2.4.0", + "description": "Easily read/write JSON files.", + "repository": { + "type": "git", + "url": "git@github.com:jprichardson/node-jsonfile.git" }, - "_requiredBy": [ - "/fs-extra" + "keywords": [ + "read", + "write", + "file", + "json", + "fs", + "fs-extra" ], - "_resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.3.0.tgz", - "_shasum": "ff9c20b67b9605c852e09f299859f48f130c19ec", - "_shrinkwrap": null, - "_spec": "jsonfile@^2.1.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\fs-extra", - "author": { - "email": "jprichardson@gmail.com", - "name": "JP Richardson" - }, - "bugs": { - "url": "https://github.com/jprichardson/node-jsonfile/issues" - }, + "author": "JP Richardson ", + "license": "MIT", "dependencies": {}, - "description": "Easily read/write JSON files.", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + }, "devDependencies": { "mocha": "2.x", "mock-fs": "^3.8.0", "rimraf": "^2.4.0", "standard": "^6.0.8" }, - "directories": {}, - "dist": { - "shasum": "ff9c20b67b9605c852e09f299859f48f130c19ec", - "tarball": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.3.0.tgz" - }, - "gitHead": "99e8d3280fcbcacaf93aa49738e0889ae5c2527f", - "homepage": "https://github.com/jprichardson/node-jsonfile#readme", - "keywords": [ - "file", - "fs", - "fs-extra", - "json", - "read", - "write" - ], - "license": "MIT", "main": "index.js", - "maintainers": [ - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - } - ], - "name": "jsonfile", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/jprichardson/node-jsonfile.git" - }, "scripts": { "lint": "standard", "test": "npm run lint && npm run unit", "unit": "mocha" - }, - "version": "2.3.0" + } } diff --git a/node_modules/jsonify/package.json b/node_modules/jsonify/package.json index 6b22c4c..e42c0e3 100644 --- a/node_modules/jsonify/package.json +++ b/node_modules/jsonify/package.json @@ -1,82 +1,30 @@ { - "_args": [ - [ - "jsonify@~0.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\json-stable-stringify" - ] - ], - "_defaultsLoaded": true, - "_engineSupported": true, - "_from": "jsonify@>=0.0.0 <0.1.0", - "_id": "jsonify@0.0.0", - "_inCache": true, - "_installable": true, - "_location": "/jsonify", - "_nodeVersion": "v0.5.0-pre", - "_npmVersion": "1.0.10", - "_phantomChildren": {}, - "_requested": { - "name": "jsonify", - "raw": "jsonify@~0.0.0", - "rawSpec": "~0.0.0", - "scope": null, - "spec": ">=0.0.0 <0.1.0", - "type": "range" - }, - "_requiredBy": [ - "/json-stable-stringify" - ], - "_resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "_shasum": "2c74b6ee41d93ca51b7b5aaee8f503631d252a73", - "_shrinkwrap": null, - "_spec": "jsonify@~0.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\json-stable-stringify", - "author": { - "name": "Douglas Crockford", - "url": "http://crockford.com/" - }, - "bugs": { - "url": "https://github.com/substack/jsonify/issues" - }, - "dependencies": {}, - "description": "JSON without touching any globals", - "devDependencies": { - "garbage": "0.0.x", - "tap": "0.0.x" - }, - "directories": { - "lib": ".", - "test": "test" - }, - "dist": { - "shasum": "2c74b6ee41d93ca51b7b5aaee8f503631d252a73", - "tarball": "http://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" - }, - "engines": { - "node": "*" - }, - "homepage": "https://github.com/substack/jsonify#readme", - "keywords": [ - "browser", - "json" - ], - "license": "Public Domain", - "main": "index.js", - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "name": "jsonify", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/substack/jsonify.git" - }, - "scripts": { - "test": "tap test" - }, - "version": "0.0.0" + "name" : "jsonify", + "version" : "0.0.0", + "description" : "JSON without touching any globals", + "main" : "index.js", + "directories" : { + "lib" : ".", + "test" : "test" + }, + "devDependencies" : { + "tap" : "0.0.x", + "garbage" : "0.0.x" + }, + "scripts" : { + "test" : "tap test" + }, + "repository" : { + "type" : "git", + "url" : "http://github.com/substack/jsonify.git" + }, + "keywords" : [ + "json", + "browser" + ], + "author" : { + "name" : "Douglas Crockford", + "url" : "http://crockford.com/" + }, + "license" : "Public Domain" } diff --git a/node_modules/jsonpointer/.travis.yml b/node_modules/jsonpointer/.travis.yml index 9338bf1..7f56324 100644 --- a/node_modules/jsonpointer/.travis.yml +++ b/node_modules/jsonpointer/.travis.yml @@ -1,10 +1,7 @@ language: "node_js" node_js: - - 0.6 - - 0.8 - 0.10 - 0.11 - 0.12 - - iojs-v1.0 - - iojs-v2.0 - - iojs + - 4.0 + - node diff --git a/node_modules/jsonpointer/LICENSE.md b/node_modules/jsonpointer/LICENSE.md new file mode 100644 index 0000000..ac32f5d --- /dev/null +++ b/node_modules/jsonpointer/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2011-2015 Jan Lehnardt & Marc Bachmann + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/jsonpointer/README.md b/node_modules/jsonpointer/README.md index e096dfa..bc7aa15 100644 --- a/node_modules/jsonpointer/README.md +++ b/node_modules/jsonpointer/README.md @@ -3,17 +3,24 @@ This is an implementation of [JSON Pointer](http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-08). ## Usage +```javascript +var jsonpointer = require('jsonpointer'); +var obj = { foo: 1, bar: { baz: 2}, qux: [3, 4, 5]}; - var jsonpointer = require("jsonpointer"); - var obj = { foo: 1, bar: { baz: 2}, qux: [3, 4, 5]}; - var one = jsonpointer.get(obj, "/foo"); - var two = jsonpointer.get(obj, "/bar/baz"); - var three = jsonpointer.get(obj, "/qux/0"); - var four = jsonpointer.get(obj, "/qux/1"); - var five = jsonpointer.get(obj, "/qux/2"); - var notfound = jsonpointer.get(obj, "/quo"); // returns null +jsonpointer.get(obj, '/foo'); // returns 1 +jsonpointer.get(obj, '/bar/baz'); // returns 2 +jsonpointer.get(obj, '/qux/0'); // returns 3 +jsonpointer.get(obj, '/qux/1'); // returns 4 +jsonpointer.get(obj, '/qux/2'); // returns 5 +jsonpointer.get(obj, '/quo'); // returns null - jsonpointer.set(obj, "/foo", 6); // obj.foo = 6; +jsonpointer.set(obj, '/foo', 6); // sets obj.foo = 6; +jsonpointer.set(obj, '/qux/-', 6) // sets obj.qux = [3, 4, 5, 6] + +var pointer = jsonpointer.compile('/foo') +pointer.get(obj) // returns 1 +pointer.set(obj, 1) // sets obj.foo = 1 +``` ## Testing @@ -25,7 +32,7 @@ This is an implementation of [JSON Pointer](http://tools.ietf.org/html/draft-iet ## Author -(c) 2011 Jan Lehnardt +(c) 2011-2015 Jan Lehnardt & Marc Bachmann ## License diff --git a/node_modules/jsonpointer/benchmark.js b/node_modules/jsonpointer/benchmark.js new file mode 100644 index 0000000..8a95636 --- /dev/null +++ b/node_modules/jsonpointer/benchmark.js @@ -0,0 +1,56 @@ +var jsonpointer = require('./') + +var i +var obj = { + a: 1, + b: { + c: 2 + }, + d: { + e: [{ a: 3 }, { b: 4 }, { c: 5 }] + } +} + +// Get +console.time('get first level property') +for (i = 0; i < 1e6; i++) { + jsonpointer.get(obj, '/a') +} +console.timeEnd('get first level property') + +console.time('get second level property') +for (i = 0; i < 1e6; i++) { + jsonpointer.get(obj, '/d/e') +} +console.timeEnd('get second level property') + +console.time('get third level property') +for (i = 0; i < 1e6; i++) { + jsonpointer.get(obj, '/d/e/0') +} +console.timeEnd('get third level property') + +// Set +console.time('set first level property') +for (i = 0; i < 1e6; i++) { + jsonpointer.set(obj, '/a', 'bla') +} +console.timeEnd('set first level property') + +console.time('set second level property') +for (i = 0; i < 1e6; i++) { + jsonpointer.set(obj, '/d/e', 'bla') +} +console.timeEnd('set second level property') + +console.time('set third level property') +for (i = 0; i < 1e6; i++) { + jsonpointer.set(obj, '/d/e/0', 'bla') +} +console.timeEnd('set third level property') + +console.time('push property into array') +for (i = 0; i < 1e6; i++) { + jsonpointer.set(obj, '/d/e/-', 'bla') +} +console.timeEnd('push property into array') diff --git a/node_modules/jsonpointer/jsonpointer.js b/node_modules/jsonpointer/jsonpointer.js index 006f85e..7cfaec0 100644 --- a/node_modules/jsonpointer/jsonpointer.js +++ b/node_modules/jsonpointer/jsonpointer.js @@ -1,76 +1,93 @@ -var untilde = function(str) { - return str.replace(/~./g, function(m) { - switch (m) { - case "~0": - return "~"; - case "~1": - return "/"; - } - throw new Error("Invalid tilde escape: " + m); - }); +var hasExcape = /~/ +var escapeMatcher = /~[01]/g +function escapeReplacer (m) { + switch (m) { + case '~1': return '/' + case '~0': return '~' + } + throw new Error('Invalid tilde escape: ' + m) } -var traverse = function(obj, pointer, value) { - // assert(isArray(pointer)) - var part = untilde(pointer.shift()); - if(!obj.hasOwnProperty(part)) { - return null; - } - if(pointer.length !== 0) { // keep traversin! - return traverse(obj[part], pointer, value); - } - // we're done - if(typeof value === "undefined") { - // just reading - return obj[part]; - } - // set new value, return old value - var old_value = obj[part]; - if(value === null) { - delete obj[part]; - } else { - obj[part] = value; - } - return old_value; +function untilde (str) { + if (!hasExcape.test(str)) return str + return str.replace(escapeMatcher, escapeReplacer) } -var validate_input = function(obj, pointer) { - if(typeof obj !== "object") { - throw new Error("Invalid input object."); - } +function setter (obj, pointer, value) { + var part + var hasNextPart - if(pointer === "") { - return []; - } + for (var p = 1, len = pointer.length; p < len;) { + part = untilde(pointer[p++]) + hasNextPart = len > p + + if (typeof obj[part] === 'undefined') { + // support setting of /- + if (Array.isArray(obj) && part === '-') { + part = obj.length + } - if(!pointer) { - throw new Error("Invalid JSON pointer."); + // support nested objects/array when setting values + if (hasNextPart) { + if ((pointer[p] !== '' && pointer[p] < Infinity) || pointer[p] === '-') obj[part] = [] + else obj[part] = {} + } + } + + if (!hasNextPart) break + obj = obj[part] } - pointer = pointer.split("/"); - var first = pointer.shift(); - if (first !== "") { - throw new Error("Invalid JSON pointer."); + var oldValue = obj[part] + if (value === undefined) delete obj[part] + else obj[part] = value + return oldValue +} + +function compilePointer (pointer) { + if (typeof pointer === 'string') { + pointer = pointer.split('/') + if (pointer[0] === '') return pointer + throw new Error('Invalid JSON pointer.') + } else if (Array.isArray(pointer)) { + return pointer } - return pointer; + throw new Error('Invalid JSON pointer.') } -var get = function(obj, pointer) { - pointer = validate_input(obj, pointer); - if (pointer.length === 0) { - return obj; +function get (obj, pointer) { + if (typeof obj !== 'object') throw new Error('Invalid input object.') + pointer = compilePointer(pointer) + var len = pointer.length + if (len === 1) return obj + + for (var p = 1; p < len;) { + obj = obj[untilde(pointer[p++])] + if (len === p) return obj + if (typeof obj !== 'object') return undefined } - return traverse(obj, pointer); } -var set = function(obj, pointer, value) { - pointer = validate_input(obj, pointer); - if (pointer.length === 0) { - throw new Error("Invalid JSON pointer for set.") +function set (obj, pointer, value) { + if (typeof obj !== 'object') throw new Error('Invalid input object.') + pointer = compilePointer(pointer) + if (pointer.length === 0) throw new Error('Invalid JSON pointer for set.') + return setter(obj, pointer, value) +} + +function compile (pointer) { + var compiled = compilePointer(pointer) + return { + get: function (object) { + return get(object, compiled) + }, + set: function (object, value) { + return set(object, compiled, value) + } } - return traverse(obj, pointer, value); } exports.get = get exports.set = set +exports.compile = compile diff --git a/node_modules/jsonpointer/package.json b/node_modules/jsonpointer/package.json index e74a71e..19bdd38 100644 --- a/node_modules/jsonpointer/package.json +++ b/node_modules/jsonpointer/package.json @@ -1,91 +1,34 @@ { - "_args": [ - [ - "jsonpointer@2.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\is-my-json-valid" - ] + "name": "jsonpointer", + "description": "Simple JSON Addressing.", + "tags": [ + "util", + "simple", + "util", + "utility" ], - "_from": "jsonpointer@2.0.0", - "_id": "jsonpointer@2.0.0", - "_inCache": true, - "_installable": true, - "_location": "/jsonpointer", - "_nodeVersion": "0.10.36", - "_npmUser": { - "email": "marc.brookman@gmail.com", - "name": "marcbachmann" - }, - "_npmVersion": "2.10.1", - "_phantomChildren": {}, - "_requested": { - "name": "jsonpointer", - "raw": "jsonpointer@2.0.0", - "rawSpec": "2.0.0", - "scope": null, - "spec": "2.0.0", - "type": "version" - }, - "_requiredBy": [ - "/is-my-json-valid" + "version": "4.0.0", + "author": "Jan Lehnardt ", + "contributors": [ + "Joe Hildebrand ", + "Marc Bachmann " ], - "_resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz", - "_shasum": "3af1dd20fe85463910d469a385e33017d2a030d9", - "_shrinkwrap": null, - "_spec": "jsonpointer@2.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\is-my-json-valid", - "author": { - "email": "jan@apache.org", - "name": "Jan Lehnardt" + "repository": { + "type": "git", + "url": "http://github.com/janl/node-jsonpointer.git" }, "bugs": { "url": "http://github.com/janl/node-jsonpointer/issues" }, - "contributors": [ - { - "name": "Joe Hildebrand", - "email": "joe-github@cursive.net" - } - ], - "dependencies": {}, - "description": "Simple JSON Addressing.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "3af1dd20fe85463910d469a385e33017d2a030d9", - "tarball": "http://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz" - }, "engines": { - "node": ">=0.6.0" + "node": ">=0.10.0" }, - "gitHead": "26ea4a5c0fcb6d9a2e87f733403791dd05637af8", - "homepage": "https://github.com/janl/node-jsonpointer#readme", - "license": "MIT", "main": "./jsonpointer", - "maintainers": [ - { - "name": "jan", - "email": "jan@apache.org" - }, - { - "name": "marcbachmann", - "email": "marc.brookman@gmail.com" - } - ], - "name": "jsonpointer", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/janl/node-jsonpointer.git" - }, "scripts": { - "test": "node test.js" + "test": "standard && node test.js" }, - "tags": [ - "simple", - "util", - "util", - "utility" - ], - "version": "2.0.0" + "license": "MIT", + "devDependencies": { + "standard": "^5.3.1" + } } diff --git a/node_modules/jsonpointer/test.js b/node_modules/jsonpointer/test.js index 1c67d7f..e3d9963 100644 --- a/node_modules/jsonpointer/test.js +++ b/node_modules/jsonpointer/test.js @@ -1,5 +1,5 @@ -var assert = require("assert"); -var jsonpointer = require("./jsonpointer"); +var assert = require('assert') +var jsonpointer = require('./jsonpointer') var obj = { a: 1, @@ -7,92 +7,125 @@ var obj = { c: 2 }, d: { - e: [{a:3}, {b:4}, {c:5}] + e: [{ a: 3 }, { b: 4 }, { c: 5 }] } -}; +} -assert.equal(jsonpointer.get(obj, "/a"), 1); -assert.equal(jsonpointer.get(obj, "/b/c"), 2); -assert.equal(jsonpointer.get(obj, "/d/e/0/a"), 3); -assert.equal(jsonpointer.get(obj, "/d/e/1/b"), 4); -assert.equal(jsonpointer.get(obj, "/d/e/2/c"), 5); +assert.equal(jsonpointer.get(obj, '/a'), 1) +assert.equal(jsonpointer.get(obj, '/b/c'), 2) +assert.equal(jsonpointer.get(obj, '/d/e/0/a'), 3) +assert.equal(jsonpointer.get(obj, '/d/e/1/b'), 4) +assert.equal(jsonpointer.get(obj, '/d/e/2/c'), 5) // set returns old value -assert.equal(jsonpointer.set(obj, "/a", 2), 1); -assert.equal(jsonpointer.set(obj, "/b/c", 3), 2); -assert.equal(jsonpointer.set(obj, "/d/e/0/a", 4), 3); -assert.equal(jsonpointer.set(obj, "/d/e/1/b", 5), 4); -assert.equal(jsonpointer.set(obj, "/d/e/2/c", 6), 5); - -assert.equal(jsonpointer.get(obj, "/a"), 2); -assert.equal(jsonpointer.get(obj, "/b/c"), 3); -assert.equal(jsonpointer.get(obj, "/d/e/0/a"), 4); -assert.equal(jsonpointer.get(obj, "/d/e/1/b"), 5); -assert.equal(jsonpointer.get(obj, "/d/e/2/c"), 6); - -assert.equal(jsonpointer.get(obj, ""), obj); -assert.throws(function(){ jsonpointer.get(obj, "a"); }, validateError); -assert.throws(function(){ jsonpointer.get(obj, "a/"); }, validateError); - -function validateError(err) { - if ( (err instanceof Error) && /Invalid JSON pointer/.test(err.message) ) { - return true; +assert.equal(jsonpointer.set(obj, '/a', 2), 1) +assert.equal(jsonpointer.set(obj, '/b/c', 3), 2) +assert.equal(jsonpointer.set(obj, '/d/e/0/a', 4), 3) +assert.equal(jsonpointer.set(obj, '/d/e/1/b', 5), 4) +assert.equal(jsonpointer.set(obj, '/d/e/2/c', 6), 5) + +// set nested properties +assert.equal(jsonpointer.set(obj, '/f/g/h/i', 6), undefined) +assert.equal(jsonpointer.get(obj, '/f/g/h/i'), 6) + +// set an array +assert.equal(jsonpointer.set(obj, '/f/g/h/foo/-', 'test'), undefined) +var arr = jsonpointer.get(obj, '/f/g/h/foo') +assert(Array.isArray(arr), 'set /- creates an array.') +assert.equal(arr[0], 'test') + +assert.equal(jsonpointer.get(obj, '/a'), 2) +assert.equal(jsonpointer.get(obj, '/b/c'), 3) +assert.equal(jsonpointer.get(obj, '/d/e/0/a'), 4) +assert.equal(jsonpointer.get(obj, '/d/e/1/b'), 5) +assert.equal(jsonpointer.get(obj, '/d/e/2/c'), 6) + +// can set `null` as a value +assert.equal(jsonpointer.set(obj, '/f/g/h/foo/0', null), 'test') +assert.strictEqual(jsonpointer.get(obj, '/f/g/h/foo/0'), null) +assert.equal(jsonpointer.set(obj, '/b/c', null), 3) +assert.strictEqual(jsonpointer.get(obj, '/b/c'), null) + +assert.equal(jsonpointer.get(obj, ''), obj) +assert.throws(function () { jsonpointer.get(obj, 'a') }, validateError) +assert.throws(function () { jsonpointer.get(obj, 'a/') }, validateError) + +// can unset values with `undefined` +jsonpointer.set(obj, '/a', undefined) +assert.strictEqual(jsonpointer.get(obj, '/a'), undefined) +jsonpointer.set(obj, '/d/e/1', undefined) +assert.strictEqual(jsonpointer.get(obj, '/d/e/1'), undefined) + +// returns `undefined` when path extends beyond any existing objects +assert.strictEqual(jsonpointer.get(obj, '/x/y/z'), undefined) + +function validateError (err) { + if ((err instanceof Error) && /Invalid JSON pointer/.test(err.message)) { + return true } } var complexKeys = { - "a/b": { + 'a/b': { c: 1 }, d: { - "e/f": 2 + 'e/f': 2 }, - "~1": 3, - "01": 4 + '~1': 3, + '01': 4 } -assert.equal(jsonpointer.get(complexKeys, "/a~1b/c"), 1); -assert.equal(jsonpointer.get(complexKeys, "/d/e~1f"), 2); -assert.equal(jsonpointer.get(complexKeys, "/~01"), 3); -assert.equal(jsonpointer.get(complexKeys, "/01"), 4); -assert.equal(jsonpointer.get(complexKeys, "/a/b/c"), null); -assert.equal(jsonpointer.get(complexKeys, "/~1"), null); +assert.equal(jsonpointer.get(complexKeys, '/a~1b/c'), 1) +assert.equal(jsonpointer.get(complexKeys, '/d/e~1f'), 2) +assert.equal(jsonpointer.get(complexKeys, '/~01'), 3) +assert.equal(jsonpointer.get(complexKeys, '/01'), 4) +assert.equal(jsonpointer.get(complexKeys, '/a/b/c'), null) +assert.equal(jsonpointer.get(complexKeys, '/~1'), null) // draft-ietf-appsawg-json-pointer-08 has special array rules -var ary = [ "zero", "one", "two" ]; -assert.equal(jsonpointer.get(ary, "/01"), null); +var ary = [ 'zero', 'one', 'two' ] +assert.equal(jsonpointer.get(ary, '/01'), null) -//assert.equal(jsonpointer.set(ary, "/-", "three"), null); -//assert.equal(ary[3], "three"); +assert.equal(jsonpointer.set(ary, '/-', 'three'), null) +assert.equal(ary[3], 'three') // Examples from the draft: var example = { - "foo": ["bar", "baz"], - "": 0, - "a/b": 1, - "c%d": 2, - "e^f": 3, - "g|h": 4, - "i\\j": 5, - "k\"l": 6, - " ": 7, - "m~n": 8 -}; - -assert.equal(jsonpointer.get(example, ""), example); -var ans = jsonpointer.get(example, "/foo"); -assert.equal(ans.length, 2); -assert.equal(ans[0], "bar"); -assert.equal(ans[1], "baz"); -assert.equal(jsonpointer.get(example, "/foo/0"), "bar"); -assert.equal(jsonpointer.get(example, "/"), 0); -assert.equal(jsonpointer.get(example, "/a~1b"), 1); -assert.equal(jsonpointer.get(example, "/c%d"), 2); -assert.equal(jsonpointer.get(example, "/e^f"), 3); -assert.equal(jsonpointer.get(example, "/g|h"), 4); -assert.equal(jsonpointer.get(example, "/i\\j"), 5); -assert.equal(jsonpointer.get(example, "/k\"l"), 6); -assert.equal(jsonpointer.get(example, "/ "), 7); -assert.equal(jsonpointer.get(example, "/m~0n"), 8); - -console.log("All tests pass."); + 'foo': ['bar', 'baz'], + '': 0, + 'a/b': 1, + 'c%d': 2, + 'e^f': 3, + 'g|h': 4, + 'i\\j': 5, + 'k\'l': 6, + ' ': 7, + 'm~n': 8 +} + +assert.equal(jsonpointer.get(example, ''), example) +var ans = jsonpointer.get(example, '/foo') +assert.equal(ans.length, 2) +assert.equal(ans[0], 'bar') +assert.equal(ans[1], 'baz') +assert.equal(jsonpointer.get(example, '/foo/0'), 'bar') +assert.equal(jsonpointer.get(example, '/'), 0) +assert.equal(jsonpointer.get(example, '/a~1b'), 1) +assert.equal(jsonpointer.get(example, '/c%d'), 2) +assert.equal(jsonpointer.get(example, '/e^f'), 3) +assert.equal(jsonpointer.get(example, '/g|h'), 4) +assert.equal(jsonpointer.get(example, '/i\\j'), 5) +assert.equal(jsonpointer.get(example, '/k\'l'), 6) +assert.equal(jsonpointer.get(example, '/ '), 7) +assert.equal(jsonpointer.get(example, '/m~0n'), 8) + +// jsonpointer.compile(path) +var a = {foo: 'bar'} +var pointer = jsonpointer.compile('/foo') +assert.equal(pointer.get(a), 'bar') +assert.equal(pointer.set(a, 'test'), 'bar') +assert.equal(pointer.get(a), 'test') +assert.deepEqual(a, {foo: 'test'}) + +console.log('All tests pass.') diff --git a/node_modules/klaw/CHANGELOG.md b/node_modules/klaw/CHANGELOG.md index 78adcc6..83410c7 100644 --- a/node_modules/klaw/CHANGELOG.md +++ b/node_modules/klaw/CHANGELOG.md @@ -1,3 +1,13 @@ +1.3.1 / 2016-10-25 +------------------ +### Added +- `graceful-fs` added as an `optionalDependencies`. Thanks [ryanzim]! + +1.3.0 / 2016-06-09 +------------------ +### Added +- `filter` option to pre-filter and not walk directories. + 1.2.0 / 2016-04-16 ------------------ - added support for custom `fs` implementation. Useful for https://github.com/tschaub/mock-fs @@ -27,3 +37,6 @@ 0.1.0 / 2015-10-25 ------------------ - initial release + + +[ryanzim]: https://github.com/ryanzim diff --git a/node_modules/klaw/README.md b/node_modules/klaw/README.md index 712d816..78386e4 100644 --- a/node_modules/klaw/README.md +++ b/node_modules/klaw/README.md @@ -7,7 +7,8 @@ A Node.js file system walker extracted from [fs-extra](https://github.com/jprich [![build status](https://api.travis-ci.org/jprichardson/node-klaw.svg)](http://travis-ci.org/jprichardson/node-klaw) [![windows build status](https://ci.appveyor.com/api/projects/status/github/jprichardson/node-klaw?branch=master&svg=true)](https://ci.appveyor.com/project/jprichardson/node-klaw/branch/master) -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) + +Standard Install ------- @@ -37,6 +38,7 @@ the following: - `queueMethod` (`string`, default: `'shift'`): Either `'shift'` or `'pop'`. On `readdir()` array, call either `shift()` or `pop()`. - `pathSorter` (`function`, default: `undefined`): Sorting [function for Arrays](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort). - `fs` (`object`, default: `require('fs')`): Use this to hook into the `fs` methods or to use [`mock-fs`](https://github.com/tschaub/mock-fs) + - `filter` (`function`, default: `undefined`): Filtering [function for Arrays](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) **Streams 1 (push) example:** @@ -137,7 +139,22 @@ klaw('/some/dir') }) ``` +**Example (ignore hidden directories):** +```js +var klaw = require('klaw') +var path = require('path') +var filterFunc = function(item){ + var basename = path.basename(item) + return basename === '.' || basename[0] !== '.' +} + +klaw('/some/dir', { filter : filterFunc }) + .on('data', function(item){ + // only items of none hidden folders will reach here + }) + +``` **Example (totaling size of PNG files):** diff --git a/node_modules/klaw/package.json b/node_modules/klaw/package.json index 6ae3b57..6a2346a 100644 --- a/node_modules/klaw/package.json +++ b/node_modules/klaw/package.json @@ -1,92 +1,40 @@ { - "_args": [ - [ - "klaw@^1.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\fs-extra" - ] - ], - "_from": "klaw@>=1.0.0 <2.0.0", - "_id": "klaw@1.2.0", - "_inCache": true, - "_installable": true, - "_location": "/klaw", - "_nodeVersion": "5.3.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/klaw-1.2.0.tgz_1460811249600_0.7625697441399097" - }, - "_npmUser": { - "email": "jprichardson@gmail.com", - "name": "jprichardson" + "name": "klaw", + "version": "1.3.1", + "description": "File system walker with Readable stream interface.", + "main": "./src/index.js", + "scripts": { + "lint": "standard", + "test": "npm run lint && npm run unit", + "unit": "tape tests/**/*.js | tap-spec" }, - "_npmVersion": "3.8.2", - "_phantomChildren": {}, - "_requested": { - "name": "klaw", - "raw": "klaw@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" + "repository": { + "type": "git", + "url": "git+https://github.com/jprichardson/node-klaw.git" }, - "_requiredBy": [ - "/fs-extra" + "keywords": [ + "walk", + "walker", + "fs", + "fs-extra", + "readable", + "streams" ], - "_resolved": "https://registry.npmjs.org/klaw/-/klaw-1.2.0.tgz", - "_shasum": "db38692ddc2f5d10fa14450071dd63ab932ba2b1", - "_shrinkwrap": null, - "_spec": "klaw@^1.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\fs-extra", - "author": { - "name": "JP Richardson" - }, + "author": "JP Richardson", + "license": "MIT", "bugs": { "url": "https://github.com/jprichardson/node-klaw/issues" }, - "dependencies": {}, - "description": "File system walker with Readable stream interface.", + "homepage": "https://github.com/jprichardson/node-klaw#readme", "devDependencies": { "mkdirp": "^0.5.1", "mock-fs": "^3.8.0", "rimraf": "^2.4.3", - "standard": "^5.3.1", + "standard": "^8.4.0", "tap-spec": "^4.1.1", "tape": "^4.2.2" }, - "directories": {}, - "dist": { - "shasum": "db38692ddc2f5d10fa14450071dd63ab932ba2b1", - "tarball": "https://registry.npmjs.org/klaw/-/klaw-1.2.0.tgz" - }, - "gitHead": "9d5a5b71a8f1bd872212cff31a6281cd82378450", - "homepage": "https://github.com/jprichardson/node-klaw#readme", - "keywords": [ - "fs", - "fs-extra", - "readable", - "streams", - "walk", - "walker" - ], - "license": "MIT", - "main": "./src/index.js", - "maintainers": [ - { - "name": "jprichardson", - "email": "jprichardson@gmail.com" - } - ], - "name": "klaw", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jprichardson/node-klaw.git" - }, - "scripts": { - "lint": "standard", - "test": "npm run lint && npm run unit", - "unit": "tape tests/**/*.js | tap-spec" - }, - "version": "1.2.0" + "optionalDependencies": { + "graceful-fs": "^4.1.9" + } } diff --git a/node_modules/klaw/src/index.js b/node_modules/klaw/src/index.js index 77d68c7..ae4a20e 100644 --- a/node_modules/klaw/src/index.js +++ b/node_modules/klaw/src/index.js @@ -1,5 +1,10 @@ var assert = require('assert') -var fs = require('fs') +var fs +try { + fs = require('graceful-fs') +} catch (e) { + fs = require('fs') +} var path = require('path') var Readable = require('stream').Readable var util = require('util') @@ -8,7 +13,7 @@ var assign = require('./assign') function Walker (dir, options) { assert.strictEqual(typeof dir, 'string', '`dir` parameter should be of type string. Got type: ' + typeof dir) var defaultStreamOptions = { objectMode: true } - var defaultOpts = { queueMethod: 'shift', pathSorter: undefined } + var defaultOpts = { queueMethod: 'shift', pathSorter: undefined, filter: undefined } options = assign(defaultOpts, options, defaultStreamOptions) Readable.call(this, options) @@ -36,6 +41,7 @@ Walker.prototype._read = function () { } pathItems = pathItems.map(function (part) { return path.join(pathItem, part) }) + if (self.options.filter) pathItems = pathItems.filter(self.options.filter) if (self.options.pathSorter) pathItems.sort(self.options.pathSorter) pathItems.forEach(function (pi) { self.paths.push(pi) }) diff --git a/node_modules/levn/package.json b/node_modules/levn/package.json index 0dcf21b..56dfbc4 100644 --- a/node_modules/levn/package.json +++ b/node_modules/levn/package.json @@ -1,94 +1,33 @@ { - "_args": [ - [ - "levn@~0.3.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\optionator" - ] - ], - "_from": "levn@>=0.3.0 <0.4.0", - "_id": "levn@0.3.0", - "_inCache": true, - "_installable": true, - "_location": "/levn", - "_nodeVersion": "4.2.4", - "_npmUser": { - "email": "z@georgezahariev.com", - "name": "gkz" - }, - "_npmVersion": "2.14.12", - "_phantomChildren": {}, - "_requested": { - "name": "levn", - "raw": "levn@~0.3.0", - "rawSpec": "~0.3.0", - "scope": null, - "spec": ">=0.3.0 <0.4.0", - "type": "range" - }, - "_requiredBy": [ - "/optionator" - ], - "_resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "_shasum": "3b09924edf9f083c0490fdd4c0bc4421e04764ee", - "_shrinkwrap": null, - "_spec": "levn@~0.3.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\optionator", - "author": { - "email": "z@georgezahariev.com", - "name": "George Zahariev" - }, - "bugs": { - "url": "https://github.com/gkz/levn/issues" - }, - "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, + "name": "levn", + "version": "0.3.0", + "author": "George Zahariev ", "description": "Light ECMAScript (JavaScript) Value Notation - human written, concise, typed, flexible", - "devDependencies": { - "istanbul": "~0.4.1", - "livescript": "~1.4.0", - "mocha": "~2.3.4" - }, - "directories": {}, - "dist": { - "shasum": "3b09924edf9f083c0490fdd4c0bc4421e04764ee", - "tarball": "http://registry.npmjs.org/levn/-/levn-0.3.0.tgz" - }, - "engines": { - "node": ">= 0.8.0" - }, - "files": [ - "LICENSE", - "README.md", - "lib" - ], - "gitHead": "a92b9acf928282ba81134b4ae8e6a5f29e1f5e1e", "homepage": "https://github.com/gkz/levn", "keywords": [ - "concise", - "ecmascript", - "flexible", - "human", - "json", "levn", "light", + "ecmascript", + "value", "notation", + "json", "typed", + "human", + "concise", "typed", - "value" + "flexible" ], - "license": "MIT", - "main": "./lib/", - "maintainers": [ - { - "name": "gkz", - "email": "z@georgezahariev.com" - } + "files": [ + "lib", + "README.md", + "LICENSE" ], - "name": "levn", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", + "main": "./lib/", + "bugs": "https://github.com/gkz/levn/issues", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + }, "repository": { "type": "git", "url": "git://github.com/gkz/levn.git" @@ -96,5 +35,13 @@ "scripts": { "test": "make test" }, - "version": "0.3.0" + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "devDependencies": { + "livescript": "~1.4.0", + "mocha": "~2.3.4", + "istanbul": "~0.4.1" + } } diff --git a/node_modules/lodash._baseslice/LICENSE b/node_modules/lodash._baseslice/LICENSE deleted file mode 100644 index b054ca5..0000000 --- a/node_modules/lodash._baseslice/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/lodash._baseslice/README.md b/node_modules/lodash._baseslice/README.md deleted file mode 100644 index 8cd4181..0000000 --- a/node_modules/lodash._baseslice/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash._baseslice v4.0.0 - -The internal [lodash](https://lodash.com/) function `baseSlice` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash._baseslice -``` - -In Node.js: -```js -var baseSlice = require('lodash._baseslice'); -``` - -See the [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash._baseslice) for more details. diff --git a/node_modules/lodash._baseslice/index.js b/node_modules/lodash._baseslice/index.js deleted file mode 100644 index 59293c3..0000000 --- a/node_modules/lodash._baseslice/index.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * lodash 4.0.0 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ -function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; -} - -module.exports = baseSlice; diff --git a/node_modules/lodash._baseslice/package.json b/node_modules/lodash._baseslice/package.json deleted file mode 100644 index b13b535..0000000 --- a/node_modules/lodash._baseslice/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - "lodash._baseslice@~4.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\lodash.upperfirst" - ] - ], - "_from": "lodash._baseslice@>=4.0.0 <4.1.0", - "_id": "lodash._baseslice@4.0.0", - "_inCache": true, - "_installable": true, - "_location": "/lodash._baseslice", - "_nodeVersion": "5.4.0", - "_npmUser": { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" - }, - "_npmVersion": "2.14.15", - "_phantomChildren": {}, - "_requested": { - "name": "lodash._baseslice", - "raw": "lodash._baseslice@~4.0.0", - "rawSpec": "~4.0.0", - "scope": null, - "spec": ">=4.0.0 <4.1.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash.upperfirst" - ], - "_resolved": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz", - "_shasum": "f5ce1df982948ecaff63f223853415b7b9763704", - "_shrinkwrap": null, - "_spec": "lodash._baseslice@~4.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\lodash.upperfirst", - "author": { - "email": "john.david.dalton@gmail.com", - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The internal lodash function `baseSlice` exported as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "f5ce1df982948ecaff63f223853415b7b9763704", - "tarball": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash._baseslice", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.0.0" -} diff --git a/node_modules/lodash._basetostring/LICENSE b/node_modules/lodash._basetostring/LICENSE deleted file mode 100644 index 9cd87e5..0000000 --- a/node_modules/lodash._basetostring/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/lodash._basetostring/README.md b/node_modules/lodash._basetostring/README.md deleted file mode 100644 index f81145e..0000000 --- a/node_modules/lodash._basetostring/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash._basetostring v3.0.1 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseToString` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash._basetostring -``` - -In Node.js/io.js: - -```js -var baseToString = require('lodash._basetostring'); -``` - -See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._basetostring) for more details. diff --git a/node_modules/lodash._basetostring/index.js b/node_modules/lodash._basetostring/index.js deleted file mode 100644 index db8ecc9..0000000 --- a/node_modules/lodash._basetostring/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * lodash 3.0.1 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` or `undefined` values. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - return value == null ? '' : (value + ''); -} - -module.exports = baseToString; diff --git a/node_modules/lodash._basetostring/package.json b/node_modules/lodash._basetostring/package.json deleted file mode 100644 index 9b23936..0000000 --- a/node_modules/lodash._basetostring/package.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "_args": [ - [ - "lodash._basetostring@^3.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\lodash.deburr" - ] - ], - "_from": "lodash._basetostring@>=3.0.0 <4.0.0", - "_id": "lodash._basetostring@3.0.1", - "_inCache": true, - "_installable": true, - "_location": "/lodash._basetostring", - "_nodeVersion": "0.12.5", - "_npmUser": { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" - }, - "_npmVersion": "2.12.0", - "_phantomChildren": {}, - "_requested": { - "name": "lodash._basetostring", - "raw": "lodash._basetostring@^3.0.0", - "rawSpec": "^3.0.0", - "scope": null, - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash.deburr", - "/lodash.words" - ], - "_resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", - "_shasum": "d1861d877f824a52f669832dcaf3ee15566a07d5", - "_shrinkwrap": null, - "_spec": "lodash._basetostring@^3.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\lodash.deburr", - "author": { - "email": "john.david.dalton@gmail.com", - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The modern build of lodash’s internal `baseToString` as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "d1861d877f824a52f669832dcaf3ee15566a07d5", - "tarball": "http://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash._basetostring", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "3.0.1" -} diff --git a/node_modules/lodash._isiterateecall/LICENSE.txt b/node_modules/lodash._isiterateecall/LICENSE.txt deleted file mode 100644 index 9cd87e5..0000000 --- a/node_modules/lodash._isiterateecall/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/lodash._isiterateecall/README.md b/node_modules/lodash._isiterateecall/README.md deleted file mode 100644 index 0c5c701..0000000 --- a/node_modules/lodash._isiterateecall/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash._isiterateecall v3.0.9 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `isIterateeCall` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash._isiterateecall -``` - -In Node.js/io.js: - -```js -var isIterateeCall = require('lodash._isiterateecall'); -``` - -See the [package source](https://github.com/lodash/lodash/blob/3.0.9-npm-packages/lodash._isiterateecall) for more details. diff --git a/node_modules/lodash._isiterateecall/index.js b/node_modules/lodash._isiterateecall/index.js deleted file mode 100644 index ea3761b..0000000 --- a/node_modules/lodash._isiterateecall/index.js +++ /dev/null @@ -1,132 +0,0 @@ -/** - * lodash 3.0.9 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used to detect unsigned integer values. */ -var reIsUint = /^\d+$/; - -/** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -/** - * Checks if `value` is array-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - */ -function isArrayLike(value) { - return value != null && isLength(getLength(value)); -} - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; -} - -/** - * Checks if the provided arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. - */ -function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object)) { - var other = object[index]; - return value === value ? (value === other) : (other !== other); - } - return false; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -module.exports = isIterateeCall; diff --git a/node_modules/lodash._isiterateecall/package.json b/node_modules/lodash._isiterateecall/package.json deleted file mode 100644 index 4e76ef1..0000000 --- a/node_modules/lodash._isiterateecall/package.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "_args": [ - [ - "lodash._isiterateecall@^3.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\lodash.words" - ] - ], - "_from": "lodash._isiterateecall@>=3.0.0 <4.0.0", - "_id": "lodash._isiterateecall@3.0.9", - "_inCache": true, - "_installable": true, - "_location": "/lodash._isiterateecall", - "_nodeVersion": "2.0.2", - "_npmUser": { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" - }, - "_npmVersion": "2.10.1", - "_phantomChildren": {}, - "_requested": { - "name": "lodash._isiterateecall", - "raw": "lodash._isiterateecall@^3.0.0", - "rawSpec": "^3.0.0", - "scope": null, - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash.words" - ], - "_resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "_shasum": "5203ad7ba425fae842460e696db9cf3e6aac057c", - "_shrinkwrap": null, - "_spec": "lodash._isiterateecall@^3.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\lodash.words", - "author": { - "email": "john.david.dalton@gmail.com", - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The modern build of lodash’s internal `isIterateeCall` as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "5203ad7ba425fae842460e696db9cf3e6aac057c", - "tarball": "http://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash._isiterateecall", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "3.0.9" -} diff --git a/node_modules/lodash.capitalize/LICENSE b/node_modules/lodash.capitalize/LICENSE index bcbe13d..e0c69d5 100644 --- a/node_modules/lodash.capitalize/LICENSE +++ b/node_modules/lodash.capitalize/LICENSE @@ -1,23 +1,47 @@ -The MIT License (MIT) +Copyright jQuery Foundation and other contributors -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, +Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash.capitalize/README.md b/node_modules/lodash.capitalize/README.md index b0f2318..c4bdb30 100644 --- a/node_modules/lodash.capitalize/README.md +++ b/node_modules/lodash.capitalize/README.md @@ -1,4 +1,4 @@ -# lodash.capitalize v4.1.1 +# lodash.capitalize v4.2.1 The [lodash](https://lodash.com/) method `_.capitalize` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var capitalize = require('lodash.capitalize'); ``` -See the [documentation](https://lodash.com/docs#capitalize) or [package source](https://github.com/lodash/lodash/blob/4.1.1-npm-packages/lodash.capitalize) for more details. +See the [documentation](https://lodash.com/docs#capitalize) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.capitalize) for more details. diff --git a/node_modules/lodash.capitalize/index.js b/node_modules/lodash.capitalize/index.js index a4e496c..978293e 100644 --- a/node_modules/lodash.capitalize/index.js +++ b/node_modules/lodash.capitalize/index.js @@ -1,13 +1,285 @@ /** - * lodash 4.1.1 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ -var toString = require('lodash.tostring'), - upperFirst = require('lodash.upperfirst'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', + rsComboSymbolsRange = '\\u20d0-\\u20f0', + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function asciiToArray(string) { + return string.split(''); +} + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +/** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); +} + +/** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function unicodeToArray(string) { + return string.match(reUnicode) || []; +} + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Built-in value references. */ +var Symbol = root.Symbol; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} + +/** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ +function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : baseToString(value); +} /** * Converts the first character of `string` to upper case and the remaining @@ -15,6 +287,7 @@ var toString = require('lodash.tostring'), * * @static * @memberOf _ + * @since 3.0.0 * @category String * @param {string} [string=''] The string to capitalize. * @returns {string} Returns the capitalized string. @@ -27,4 +300,23 @@ function capitalize(string) { return upperFirst(toString(string).toLowerCase()); } +/** + * Converts the first character of `string` to upper case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.upperFirst('fred'); + * // => 'Fred' + * + * _.upperFirst('FRED'); + * // => 'FRED' + */ +var upperFirst = createCaseFirst('toUpperCase'); + module.exports = capitalize; diff --git a/node_modules/lodash.capitalize/package.json b/node_modules/lodash.capitalize/package.json index 8a64248..378eb3f 100644 --- a/node_modules/lodash.capitalize/package.json +++ b/node_modules/lodash.capitalize/package.json @@ -1,108 +1,17 @@ { - "_args": [ - [ - "lodash.capitalize@^4.1.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\sass-lint" - ] - ], - "_from": "lodash.capitalize@>=4.1.0 <5.0.0", - "_id": "lodash.capitalize@4.1.1", - "_inCache": true, - "_installable": true, - "_location": "/lodash.capitalize", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-5-east.internal.npmjs.com", - "tmp": "tmp/lodash.capitalize-4.1.1.tgz_1455602172098_0.9730918298009783" - }, - "_npmUser": { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" - }, - "_npmVersion": "2.14.18", - "_phantomChildren": {}, - "_requested": { - "name": "lodash.capitalize", - "raw": "lodash.capitalize@^4.1.0", - "rawSpec": "^4.1.0", - "scope": null, - "spec": ">=4.1.0 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/sass-lint" - ], - "_resolved": "https://registry.npmjs.org/lodash.capitalize/-/lodash.capitalize-4.1.1.tgz", - "_shasum": "860497ad211317c3b728dc583c2ebbfe57f658c2", - "_shrinkwrap": null, - "_spec": "lodash.capitalize@^4.1.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\sass-lint", - "author": { - "email": "john.david.dalton@gmail.com", - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": { - "lodash.tostring": "^4.0.0", - "lodash.upperfirst": "^4.0.0" - }, + "name": "lodash.capitalize", + "version": "4.2.1", "description": "The lodash method `_.capitalize` exported as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "860497ad211317c3b728dc583c2ebbfe57f658c2", - "tarball": "https://registry.npmjs.org/lodash.capitalize/-/lodash.capitalize-4.1.1.tgz" - }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", - "keywords": [ - "capitalize", - "lodash-modularized" - ], "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } + "keywords": "lodash-modularized, capitalize", + "author": "John-David Dalton (http://allyoucanleet.com/)", + "contributors": [ + "John-David Dalton (http://allyoucanleet.com/)", + "Blaine Bublitz (https://github.com/phated)", + "Mathias Bynens (https://mathiasbynens.be/)" ], - "name": "lodash.capitalize", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.1.1" + "repository": "lodash/lodash", + "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } } diff --git a/node_modules/lodash.deburr/LICENSE.txt b/node_modules/lodash.deburr/LICENSE.txt deleted file mode 100644 index 9cd87e5..0000000 --- a/node_modules/lodash.deburr/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/lodash.deburr/README.md b/node_modules/lodash.deburr/README.md deleted file mode 100644 index 19d789c..0000000 --- a/node_modules/lodash.deburr/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash.deburr v3.0.2 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.deburr` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.deburr -``` - -In Node.js/io.js: - -```js -var deburr = require('lodash.deburr'); -``` - -See the [documentation](https://lodash.com/docs#deburr) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.deburr) for more details. diff --git a/node_modules/lodash.deburr/index.js b/node_modules/lodash.deburr/index.js deleted file mode 100644 index 3bbda44..0000000 --- a/node_modules/lodash.deburr/index.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * lodash 3.0.2 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseToString = require('lodash._basetostring'); - -/** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */ -var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g; - -/** Used to match latin-1 supplementary letters (excluding mathematical operators). */ -var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g; - -/** Used to map latin-1 supplementary letters to basic latin letters. */ -var deburredLetters = { - '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', - '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', - '\xc7': 'C', '\xe7': 'c', - '\xd0': 'D', '\xf0': 'd', - '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', - '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', - '\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', - '\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', - '\xd1': 'N', '\xf1': 'n', - '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', - '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', - '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', - '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', - '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', - '\xc6': 'Ae', '\xe6': 'ae', - '\xde': 'Th', '\xfe': 'th', - '\xdf': 'ss' -}; - -/** - * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters. - * - * @private - * @param {string} letter The matched letter to deburr. - * @returns {string} Returns the deburred letter. - */ -function deburrLetter(letter) { - return deburredLetters[letter]; -} - -/** - * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) - * to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to deburr. - * @returns {string} Returns the deburred string. - * @example - * - * _.deburr('déjà vu'); - * // => 'deja vu' - */ -function deburr(string) { - string = baseToString(string); - return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, ''); -} - -module.exports = deburr; diff --git a/node_modules/lodash.deburr/package.json b/node_modules/lodash.deburr/package.json deleted file mode 100644 index 57c3284..0000000 --- a/node_modules/lodash.deburr/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "_args": [ - [ - "lodash.deburr@^3.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\lodash._createcompounder" - ] - ], - "_from": "lodash.deburr@>=3.0.0 <4.0.0", - "_id": "lodash.deburr@3.0.2", - "_inCache": true, - "_installable": true, - "_location": "/lodash.deburr", - "_nodeVersion": "0.12.2", - "_npmUser": { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" - }, - "_npmVersion": "2.7.6", - "_phantomChildren": {}, - "_requested": { - "name": "lodash.deburr", - "raw": "lodash.deburr@^3.0.0", - "rawSpec": "^3.0.0", - "scope": null, - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash._createcompounder" - ], - "_resolved": "https://registry.npmjs.org/lodash.deburr/-/lodash.deburr-3.0.2.tgz", - "_shasum": "86eb5700df1572279f22271257ae6af7ec5507c4", - "_shrinkwrap": null, - "_spec": "lodash.deburr@^3.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\lodash._createcompounder", - "author": { - "email": "john.david.dalton@gmail.com", - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": { - "lodash._basetostring": "^3.0.0" - }, - "description": "The modern build of lodash’s `_.deburr` as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "86eb5700df1572279f22271257ae6af7ec5507c4", - "tarball": "http://registry.npmjs.org/lodash.deburr/-/lodash.deburr-3.0.2.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash", - "lodash-modularized", - "stdlib", - "util" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash.deburr", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "3.0.2" -} diff --git a/node_modules/lodash.kebabcase/README.md b/node_modules/lodash.kebabcase/README.md index 091cd91..1b267b9 100644 --- a/node_modules/lodash.kebabcase/README.md +++ b/node_modules/lodash.kebabcase/README.md @@ -1,4 +1,4 @@ -# lodash.kebabcase v4.0.1 +# lodash.kebabcase v4.1.1 The [lodash](https://lodash.com/) method `_.kebabCase` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var kebabCase = require('lodash.kebabcase'); ``` -See the [documentation](https://lodash.com/docs#kebabCase) or [package source](https://github.com/lodash/lodash/blob/4.0.1-npm-packages/lodash.kebabcase) for more details. +See the [documentation](https://lodash.com/docs#kebabCase) or [package source](https://github.com/lodash/lodash/blob/4.1.1-npm-packages/lodash.kebabcase) for more details. diff --git a/node_modules/lodash.kebabcase/index.js b/node_modules/lodash.kebabcase/index.js index 62c505a..7eec004 100644 --- a/node_modules/lodash.kebabcase/index.js +++ b/node_modules/lodash.kebabcase/index.js @@ -1,26 +1,160 @@ /** - * lodash 4.0.1 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ -var deburr = require('lodash.deburr'), - words = require('lodash.words'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Used to match words composed of alphanumeric characters. */ +var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + +/** Used to match Latin Unicode letters (excluding mathematical operators). */ +var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', + rsComboSymbolsRange = '\\u20d0-\\u20f0', + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; /** Used to compose unicode capture groups. */ -var rsApos = "['\u2019]"; +var rsApos = "['\u2019]", + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')', + rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq; /** Used to match apostrophes. */ var reApos = RegExp(rsApos, 'g'); +/** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ +var reComboMark = RegExp(rsCombo, 'g'); + +/** Used to match complex or compound words. */ +var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')', + rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr, + rsUpper + '+' + rsOptUpperContr, + rsDigits, + rsEmoji +].join('|'), 'g'); + +/** Used to detect strings that need a more robust regexp to match words. */ +var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + +/** Used to map Latin Unicode letters to basic Latin letters. */ +var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 'ss' +}; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + /** * A specialized version of `_.reduce` for arrays without support for * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the first element of `array` as @@ -29,7 +163,7 @@ var reApos = RegExp(rsApos, 'g'); */ function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, - length = array.length; + length = array ? array.length : 0; if (initAccum && length) { accumulator = array[++index]; @@ -40,6 +174,99 @@ function arrayReduce(array, iteratee, accumulator, initAccum) { return accumulator; } +/** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ +function asciiWords(string) { + return string.match(reAsciiWord) || []; +} + +/** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; +} + +/** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ +var deburrLetter = basePropertyOf(deburredLetters); + +/** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ +function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); +} + +/** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ +function unicodeWords(string) { + return string.match(reUnicodeWord) || []; +} + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Built-in value references. */ +var Symbol = root.Symbol; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + /** * Creates a function like `_.camelCase`. * @@ -53,6 +280,104 @@ function createCompounder(callback) { }; } +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : baseToString(value); +} + +/** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ +function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); +} + /** * Converts `string` to * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). @@ -78,4 +403,33 @@ var kebabCase = createCompounder(function(result, word, index) { return result + (index ? '-' : '') + word.toLowerCase(); }); +/** + * Splits `string` into an array of its words. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {RegExp|string} [pattern] The pattern to match words. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the words of `string`. + * @example + * + * _.words('fred, barney, & pebbles'); + * // => ['fred', 'barney', 'pebbles'] + * + * _.words('fred, barney, & pebbles', /[^, ]+/g); + * // => ['fred', 'barney', '&', 'pebbles'] + */ +function words(string, pattern, guard) { + string = toString(string); + pattern = guard ? undefined : pattern; + + if (pattern === undefined) { + return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); + } + return string.match(pattern) || []; +} + module.exports = kebabCase; diff --git a/node_modules/lodash.kebabcase/node_modules/lodash.deburr/README.md b/node_modules/lodash.kebabcase/node_modules/lodash.deburr/README.md deleted file mode 100644 index 546eb34..0000000 --- a/node_modules/lodash.kebabcase/node_modules/lodash.deburr/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.deburr v4.0.0 - -The [lodash](https://lodash.com/) method `_.deburr` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.deburr -``` - -In Node.js: -```js -var deburr = require('lodash.deburr'); -``` - -See the [documentation](https://lodash.com/docs#deburr) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.deburr) for more details. diff --git a/node_modules/lodash.kebabcase/node_modules/lodash.deburr/index.js b/node_modules/lodash.kebabcase/node_modules/lodash.deburr/index.js deleted file mode 100644 index 1ca3142..0000000 --- a/node_modules/lodash.kebabcase/node_modules/lodash.deburr/index.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * lodash 4.0.0 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var toString = require('lodash.tostring'); - -/** Used to match latin-1 supplementary letters (excluding mathematical operators). */ -var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g; - -/** Used to compose unicode character classes. */ -var rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', - rsComboSymbolsRange = '\\u20d0-\\u20f0'; - -/** Used to compose unicode capture groups. */ -var rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']'; - -/** - * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and - * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). - */ -var reComboMark = RegExp(rsCombo, 'g'); - -/** Used to map latin-1 supplementary letters to basic latin letters. */ -var deburredLetters = { - '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', - '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', - '\xc7': 'C', '\xe7': 'c', - '\xd0': 'D', '\xf0': 'd', - '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', - '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', - '\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', - '\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', - '\xd1': 'N', '\xf1': 'n', - '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', - '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', - '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', - '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', - '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', - '\xc6': 'Ae', '\xe6': 'ae', - '\xde': 'Th', '\xfe': 'th', - '\xdf': 'ss' -}; - -/** - * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters. - * - * @private - * @param {string} letter The matched letter to deburr. - * @returns {string} Returns the deburred letter. - */ -function deburrLetter(letter) { - return deburredLetters[letter]; -} - -/** - * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) - * to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to deburr. - * @returns {string} Returns the deburred string. - * @example - * - * _.deburr('déjà vu'); - * // => 'deja vu' - */ -function deburr(string) { - string = toString(string); - return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, ''); -} - -module.exports = deburr; diff --git a/node_modules/lodash.kebabcase/node_modules/lodash.deburr/package.json b/node_modules/lodash.kebabcase/node_modules/lodash.deburr/package.json deleted file mode 100644 index 3542cc2..0000000 --- a/node_modules/lodash.kebabcase/node_modules/lodash.deburr/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "_args": [ - [ - "lodash.deburr@^4.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\lodash.kebabcase" - ] - ], - "_from": "lodash.deburr@>=4.0.0 <5.0.0", - "_id": "lodash.deburr@4.0.0", - "_inCache": true, - "_installable": true, - "_location": "/lodash.kebabcase/lodash.deburr", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-5-east.internal.npmjs.com", - "tmp": "tmp/lodash.deburr-4.0.0.tgz_1455602227540_0.9719030859414488" - }, - "_npmUser": { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" - }, - "_npmVersion": "2.14.18", - "_phantomChildren": {}, - "_requested": { - "name": "lodash.deburr", - "raw": "lodash.deburr@^4.0.0", - "rawSpec": "^4.0.0", - "scope": null, - "spec": ">=4.0.0 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash.kebabcase" - ], - "_resolved": "https://registry.npmjs.org/lodash.deburr/-/lodash.deburr-4.0.0.tgz", - "_shasum": "3ec856da3c4a89c5304838030906a0c020117d3d", - "_shrinkwrap": null, - "_spec": "lodash.deburr@^4.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\lodash.kebabcase", - "author": { - "email": "john.david.dalton@gmail.com", - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": { - "lodash.tostring": "^4.0.0" - }, - "description": "The lodash method `_.deburr` exported as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "3ec856da3c4a89c5304838030906a0c020117d3d", - "tarball": "https://registry.npmjs.org/lodash.deburr/-/lodash.deburr-4.0.0.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "deburr", - "lodash-modularized" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash.deburr", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.0.0" -} diff --git a/node_modules/lodash.kebabcase/node_modules/lodash.words/LICENSE b/node_modules/lodash.kebabcase/node_modules/lodash.words/LICENSE deleted file mode 100644 index e0c69d5..0000000 --- a/node_modules/lodash.kebabcase/node_modules/lodash.words/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/node_modules/lodash.kebabcase/node_modules/lodash.words/README.md b/node_modules/lodash.kebabcase/node_modules/lodash.words/README.md deleted file mode 100644 index 089b89d..0000000 --- a/node_modules/lodash.kebabcase/node_modules/lodash.words/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.words v4.1.0 - -The [lodash](https://lodash.com/) method `_.words` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.words -``` - -In Node.js: -```js -var words = require('lodash.words'); -``` - -See the [documentation](https://lodash.com/docs#words) or [package source](https://github.com/lodash/lodash/blob/4.1.0-npm-packages/lodash.words) for more details. diff --git a/node_modules/lodash.kebabcase/node_modules/lodash.words/index.js b/node_modules/lodash.kebabcase/node_modules/lodash.words/index.js deleted file mode 100644 index fb412d0..0000000 --- a/node_modules/lodash.kebabcase/node_modules/lodash.words/index.js +++ /dev/null @@ -1,97 +0,0 @@ -/** - * lodash 4.1.0 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ -var toString = require('lodash.tostring'); - -/** Used to match non-compound words composed of alphanumeric characters. */ -var reBasicWord = /[a-zA-Z0-9]+/g; - -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', - rsComboSymbolsRange = '\\u20d0-\\u20f0', - rsDingbatRange = '\\u2700-\\u27bf', - rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', - rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', - rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', - rsQuoteRange = '\\u2018\\u2019\\u201c\\u201d', - rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', - rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', - rsVarRange = '\\ufe0e\\ufe0f', - rsBreakRange = rsMathOpRange + rsNonCharRange + rsQuoteRange + rsSpaceRange; - -/** Used to compose unicode capture groups. */ -var rsApos = "['\u2019]", - rsBreak = '[' + rsBreakRange + ']', - rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', - rsDigits = '\\d+', - rsDingbat = '[' + rsDingbatRange + ']', - rsLower = '[' + rsLowerRange + ']', - rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsUpper = '[' + rsUpperRange + ']', - rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')', - rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')', - rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', - rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', - reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq; - -/** Used to match complex or compound words. */ -var reComplexWord = RegExp([ - rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', - rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')', - rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr, - rsUpper + '+' + rsOptUpperContr, - rsDigits, - rsEmoji -].join('|'), 'g'); - -/** Used to detect strings that need a more robust regexp to match words. */ -var reHasComplexWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; - -/** - * Splits `string` into an array of its words. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to inspect. - * @param {RegExp|string} [pattern] The pattern to match words. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the words of `string`. - * @example - * - * _.words('fred, barney, & pebbles'); - * // => ['fred', 'barney', 'pebbles'] - * - * _.words('fred, barney, & pebbles', /[^, ]+/g); - * // => ['fred', 'barney', '&', 'pebbles'] - */ -function words(string, pattern, guard) { - string = toString(string); - pattern = guard ? undefined : pattern; - - if (pattern === undefined) { - pattern = reHasComplexWord.test(string) ? reComplexWord : reBasicWord; - } - return string.match(pattern) || []; -} - -module.exports = words; diff --git a/node_modules/lodash.kebabcase/node_modules/lodash.words/package.json b/node_modules/lodash.kebabcase/node_modules/lodash.words/package.json deleted file mode 100644 index 9256487..0000000 --- a/node_modules/lodash.kebabcase/node_modules/lodash.words/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "_args": [ - [ - "lodash.words@^4.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\lodash.kebabcase" - ] - ], - "_from": "lodash.words@>=4.0.0 <5.0.0", - "_id": "lodash.words@4.1.0", - "_inCache": true, - "_installable": true, - "_location": "/lodash.kebabcase/lodash.words", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/lodash.words-4.1.0.tgz_1460562177806_0.7615183189045638" - }, - "_npmUser": { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" - }, - "_npmVersion": "2.15.3", - "_phantomChildren": {}, - "_requested": { - "name": "lodash.words", - "raw": "lodash.words@^4.0.0", - "rawSpec": "^4.0.0", - "scope": null, - "spec": ">=4.0.0 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash.kebabcase" - ], - "_resolved": "https://registry.npmjs.org/lodash.words/-/lodash.words-4.1.0.tgz", - "_shasum": "d92e846c4232534fbb8bcdc5b49c13d3e5179b7d", - "_shrinkwrap": null, - "_spec": "lodash.words@^4.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\lodash.kebabcase", - "author": { - "email": "john.david.dalton@gmail.com", - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": { - "lodash.tostring": "^4.0.0" - }, - "description": "The lodash method `_.words` exported as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "d92e846c4232534fbb8bcdc5b49c13d3e5179b7d", - "tarball": "https://registry.npmjs.org/lodash.words/-/lodash.words-4.1.0.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "words" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash.words", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.1.0" -} diff --git a/node_modules/lodash.kebabcase/package.json b/node_modules/lodash.kebabcase/package.json index c9ea210..966e154 100644 --- a/node_modules/lodash.kebabcase/package.json +++ b/node_modules/lodash.kebabcase/package.json @@ -1,110 +1,17 @@ { - "_args": [ - [ - "lodash.kebabcase@^4.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\sass-lint" - ] - ], - "_from": "lodash.kebabcase@>=4.0.0 <5.0.0", - "_id": "lodash.kebabcase@4.0.1", - "_inCache": true, - "_installable": true, - "_location": "/lodash.kebabcase", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/lodash.kebabcase-4.0.1.tgz_1460561977840_0.2460179638583213" - }, - "_npmUser": { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" - }, - "_npmVersion": "2.15.3", - "_phantomChildren": { - "lodash.tostring": "4.1.2" - }, - "_requested": { - "name": "lodash.kebabcase", - "raw": "lodash.kebabcase@^4.0.0", - "rawSpec": "^4.0.0", - "scope": null, - "spec": ">=4.0.0 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/sass-lint" - ], - "_resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.0.1.tgz", - "_shasum": "5e63bc9aa2a5562ff3b97ca7af2f803de1bcb90e", - "_shrinkwrap": null, - "_spec": "lodash.kebabcase@^4.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\sass-lint", - "author": { - "email": "john.david.dalton@gmail.com", - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": { - "lodash.deburr": "^4.0.0", - "lodash.words": "^4.0.0" - }, + "name": "lodash.kebabcase", + "version": "4.1.1", "description": "The lodash method `_.kebabCase` exported as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "5e63bc9aa2a5562ff3b97ca7af2f803de1bcb90e", - "tarball": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.0.1.tgz" - }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", - "keywords": [ - "kebabcase", - "lodash-modularized" - ], "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } + "keywords": "lodash-modularized, kebabcase", + "author": "John-David Dalton (http://allyoucanleet.com/)", + "contributors": [ + "John-David Dalton (http://allyoucanleet.com/)", + "Blaine Bublitz (https://github.com/phated)", + "Mathias Bynens (https://mathiasbynens.be/)" ], - "name": "lodash.kebabcase", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.0.1" + "repository": "lodash/lodash", + "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } } diff --git a/node_modules/lodash.tostring/README.md b/node_modules/lodash.tostring/README.md deleted file mode 100644 index b3858fd..0000000 --- a/node_modules/lodash.tostring/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.tostring v4.1.2 - -The [lodash](https://lodash.com/) method `_.toString` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.tostring -``` - -In Node.js: -```js -var toString = require('lodash.tostring'); -``` - -See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.tostring) for more details. diff --git a/node_modules/lodash.tostring/index.js b/node_modules/lodash.tostring/index.js deleted file mode 100644 index 5c0e3e2..0000000 --- a/node_modules/lodash.tostring/index.js +++ /dev/null @@ -1,164 +0,0 @@ -/** - * lodash 4.1.2 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** Used to determine if values are of the language type `Object`. */ -var objectTypes = { - 'function': true, - 'object': true -}; - -/** Detect free variable `exports`. */ -var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) - ? exports - : undefined; - -/** Detect free variable `module`. */ -var freeModule = (objectTypes[typeof module] && module && !module.nodeType) - ? module - : undefined; - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); - -/** Detect free variable `self`. */ -var freeSelf = checkGlobal(objectTypes[typeof self] && self); - -/** Detect free variable `window`. */ -var freeWindow = checkGlobal(objectTypes[typeof window] && window); - -/** Detect `this` as the global object. */ -var thisGlobal = checkGlobal(objectTypes[typeof this] && this); - -/** - * Used as a reference to the global object. - * - * The `this` value is used if it's the global object to avoid Greasemonkey's - * restricted `window` object, otherwise the `window` object is used. - */ -var root = freeGlobal || - ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || - freeSelf || thisGlobal || Function('return this')(); - -/** - * Checks if `value` is a global object. - * - * @private - * @param {*} value The value to check. - * @returns {null|Object} Returns `value` if it's a global object, else `null`. - */ -function checkGlobal(value) { - return (value && value.Object === Object) ? value : null; -} - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Built-in value references. */ -var Symbol = root.Symbol; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} - -/** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (value == null) { - return ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -module.exports = toString; diff --git a/node_modules/lodash.tostring/package.json b/node_modules/lodash.tostring/package.json deleted file mode 100644 index dbc69e9..0000000 --- a/node_modules/lodash.tostring/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_args": [ - [ - "lodash.tostring@^4.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\lodash.capitalize" - ] - ], - "_from": "lodash.tostring@>=4.0.0 <5.0.0", - "_id": "lodash.tostring@4.1.2", - "_inCache": true, - "_installable": true, - "_location": "/lodash.tostring", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-13-west.internal.npmjs.com", - "tmp": "tmp/lodash.tostring-4.1.2.tgz_1456896853027_0.8195764778647572" - }, - "_npmUser": { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" - }, - "_npmVersion": "2.14.17", - "_phantomChildren": {}, - "_requested": { - "name": "lodash.tostring", - "raw": "lodash.tostring@^4.0.0", - "rawSpec": "^4.0.0", - "scope": null, - "spec": ">=4.0.0 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash.capitalize", - "/lodash.kebabcase/lodash.deburr", - "/lodash.kebabcase/lodash.words", - "/lodash.upperfirst" - ], - "_resolved": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.2.tgz", - "_shasum": "7d326a5cf64da4298f2fd35b688d848267535288", - "_shrinkwrap": null, - "_spec": "lodash.tostring@^4.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\lodash.capitalize", - "author": { - "email": "john.david.dalton@gmail.com", - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The lodash method `_.toString` exported as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "7d326a5cf64da4298f2fd35b688d848267535288", - "tarball": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.2.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "tostring" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine.bublitz@gmail.com" - } - ], - "name": "lodash.tostring", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.1.2" -} diff --git a/node_modules/lodash.upperfirst/LICENSE b/node_modules/lodash.upperfirst/LICENSE deleted file mode 100644 index e0c69d5..0000000 --- a/node_modules/lodash.upperfirst/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/node_modules/lodash.upperfirst/README.md b/node_modules/lodash.upperfirst/README.md deleted file mode 100644 index fc594d0..0000000 --- a/node_modules/lodash.upperfirst/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.upperfirst v4.2.0 - -The [lodash](https://lodash.com/) method `_.upperFirst` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.upperfirst -``` - -In Node.js: -```js -var upperFirst = require('lodash.upperfirst'); -``` - -See the [documentation](https://lodash.com/docs#upperFirst) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.upperfirst) for more details. diff --git a/node_modules/lodash.upperfirst/index.js b/node_modules/lodash.upperfirst/index.js deleted file mode 100644 index 6b83309..0000000 --- a/node_modules/lodash.upperfirst/index.js +++ /dev/null @@ -1,113 +0,0 @@ -/** - * lodash 4.2.0 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ -var baseSlice = require('lodash._baseslice'), - toString = require('lodash.tostring'); - -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', - rsComboSymbolsRange = '\\u20d0-\\u20f0', - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + rsAstralRange + ']', - rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); - -/** - * Converts `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function stringToArray(string) { - return string.match(reComplexSymbol); -} - -/** - * Casts `array` to a slice if it's needed. - * - * @private - * @param {Array} array The array to inspect. - * @param {number} start The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the cast slice. - */ -function castSlice(array, start, end) { - var length = array.length; - end = end === undefined ? length : end; - return (!start && end >= length) ? array : baseSlice(array, start, end); -} - -/** - * Creates a function like `_.lowerFirst`. - * - * @private - * @param {string} methodName The name of the `String` case method to use. - * @returns {Function} Returns the new function. - */ -function createCaseFirst(methodName) { - return function(string) { - string = toString(string); - - var strSymbols = reHasComplexSymbol.test(string) - ? stringToArray(string) - : undefined; - - var chr = strSymbols - ? strSymbols[0] - : string.charAt(0); - - var trailing = strSymbols - ? castSlice(strSymbols, 1).join('') - : string.slice(1); - - return chr[methodName]() + trailing; - }; -} - -/** - * Converts the first character of `string` to upper case. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.upperFirst('fred'); - * // => 'Fred' - * - * _.upperFirst('FRED'); - * // => 'FRED' - */ -var upperFirst = createCaseFirst('toUpperCase'); - -module.exports = upperFirst; diff --git a/node_modules/lodash.upperfirst/package.json b/node_modules/lodash.upperfirst/package.json deleted file mode 100644 index c7e4a99..0000000 --- a/node_modules/lodash.upperfirst/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_args": [ - [ - "lodash.upperfirst@^4.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\lodash.capitalize" - ] - ], - "_from": "lodash.upperfirst@>=4.0.0 <5.0.0", - "_id": "lodash.upperfirst@4.2.0", - "_inCache": true, - "_installable": true, - "_location": "/lodash.upperfirst", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/lodash.upperfirst-4.2.0.tgz_1460393972503_0.4928056742064655" - }, - "_npmUser": { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" - }, - "_npmVersion": "2.15.3", - "_phantomChildren": {}, - "_requested": { - "name": "lodash.upperfirst", - "raw": "lodash.upperfirst@^4.0.0", - "rawSpec": "^4.0.0", - "scope": null, - "spec": ">=4.0.0 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash.capitalize" - ], - "_resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.2.0.tgz", - "_shasum": "d3cf06886e6c50ea74f551c6f6a37179a0351da0", - "_shrinkwrap": null, - "_spec": "lodash.upperfirst@^4.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\lodash.capitalize", - "author": { - "email": "john.david.dalton@gmail.com", - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": { - "lodash._baseslice": "~4.0.0", - "lodash.tostring": "^4.0.0" - }, - "description": "The lodash method `_.upperFirst` exported as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "d3cf06886e6c50ea74f551c6f6a37179a0351da0", - "tarball": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.2.0.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "upperfirst" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine.bublitz@gmail.com" - } - ], - "name": "lodash.upperfirst", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.2.0" -} diff --git a/node_modules/lodash.words/LICENSE b/node_modules/lodash.words/LICENSE deleted file mode 100644 index 9cd87e5..0000000 --- a/node_modules/lodash.words/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/lodash.words/README.md b/node_modules/lodash.words/README.md deleted file mode 100644 index 9b79fa1..0000000 --- a/node_modules/lodash.words/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash.words v3.0.2 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.words` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.words -``` - -In Node.js/io.js: - -```js -var words = require('lodash.words'); -``` - -See the [documentation](https://lodash.com/docs#words) or [package source](https://github.com/lodash/lodash/blob/3.0.2-npm-packages/lodash.words) for more details. diff --git a/node_modules/lodash.words/index.js b/node_modules/lodash.words/index.js deleted file mode 100644 index e593dc6..0000000 --- a/node_modules/lodash.words/index.js +++ /dev/null @@ -1,46 +0,0 @@ -/** - * lodash 3.0.2 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseToString = require('lodash._basetostring'), - isIterateeCall = require('lodash._isiterateecall'); - -/** Used to match words to create compound words. */ -var reWords = (function() { - var upper = '[A-Z\\xc0-\\xd6\\xd8-\\xde]', - lower = '[a-z\\xdf-\\xf6\\xf8-\\xff]+'; - - return RegExp(upper + '+(?=' + upper + lower + ')|' + upper + '?' + lower + '|' + upper + '+|[0-9]+', 'g'); -}()); - -/** - * Splits `string` into an array of its words. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to inspect. - * @param {RegExp|string} [pattern] The pattern to match words. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the words of `string`. - * @example - * - * _.words('fred, barney, & pebbles'); - * // => ['fred', 'barney', 'pebbles'] - * - * _.words('fred, barney, & pebbles', /[^, ]+/g); - * // => ['fred', 'barney', '&', 'pebbles'] - */ -function words(string, pattern, guard) { - if (guard && isIterateeCall(string, pattern, guard)) { - pattern = undefined; - } - string = baseToString(string); - return string.match(pattern || reWords) || []; -} - -module.exports = words; diff --git a/node_modules/lodash.words/package.json b/node_modules/lodash.words/package.json deleted file mode 100644 index e9324be..0000000 --- a/node_modules/lodash.words/package.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "_args": [ - [ - "lodash.words@^3.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\lodash._createcompounder" - ] - ], - "_from": "lodash.words@>=3.0.0 <4.0.0", - "_id": "lodash.words@3.0.2", - "_inCache": true, - "_installable": true, - "_location": "/lodash.words", - "_nodeVersion": "0.12.5", - "_npmUser": { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" - }, - "_npmVersion": "2.12.0", - "_phantomChildren": {}, - "_requested": { - "name": "lodash.words", - "raw": "lodash.words@^3.0.0", - "rawSpec": "^3.0.0", - "scope": null, - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash._createcompounder" - ], - "_resolved": "https://registry.npmjs.org/lodash.words/-/lodash.words-3.0.2.tgz", - "_shasum": "7b0cfd320f9b3d80e6ab579edc1358832b2afb14", - "_shrinkwrap": null, - "_spec": "lodash.words@^3.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\lodash._createcompounder", - "author": { - "email": "john.david.dalton@gmail.com", - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": { - "lodash._basetostring": "^3.0.0", - "lodash._isiterateecall": "^3.0.0" - }, - "description": "The modern build of lodash’s `_.words` as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "7b0cfd320f9b3d80e6ab579edc1358832b2afb14", - "tarball": "http://registry.npmjs.org/lodash.words/-/lodash.words-3.0.2.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash", - "lodash-modularized", - "stdlib", - "util" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash.words", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "3.0.2" -} diff --git a/node_modules/lodash/LICENSE b/node_modules/lodash/LICENSE index e0c69d5..c6f2f61 100644 --- a/node_modules/lodash/LICENSE +++ b/node_modules/lodash/LICENSE @@ -1,4 +1,4 @@ -Copyright jQuery Foundation and other contributors +Copyright JS Foundation and other contributors Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors diff --git a/node_modules/lodash/README.md b/node_modules/lodash/README.md new file mode 100644 index 0000000..382e740 --- /dev/null +++ b/node_modules/lodash/README.md @@ -0,0 +1,39 @@ +# lodash v4.17.2 + +The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. + +## Installation + +Using npm: +```shell +$ npm i -g npm +$ npm i --save lodash +``` + +In Node.js: +```js +// Load the full build. +var _ = require('lodash'); +// Load the core build. +var _ = require('lodash/core'); +// Load the FP build for immutable auto-curried iteratee-first data-last methods. +var fp = require('lodash/fp'); + +// Load method categories. +var array = require('lodash/array'); +var object = require('lodash/fp/object'); + +// Cherry-pick methods for smaller browserify/rollup/webpack bundles. +var at = require('lodash/at'); +var curryN = require('lodash/fp/curryN'); +``` + +See the [package source](https://github.com/lodash/lodash/tree/4.17.2-npm) for more details. + +**Note:**
+Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. + +## Support + +Tested in Chrome 53-54, Firefox 48-49, IE 11, Edge 14, Safari 9-10, Node.js 6-7, & PhantomJS 2.1.1.
+Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. diff --git a/node_modules/lodash/_Hash.js b/node_modules/lodash/_Hash.js index 7f4c3ba..b504fe3 100644 --- a/node_modules/lodash/_Hash.js +++ b/node_modules/lodash/_Hash.js @@ -1,18 +1,32 @@ -var nativeCreate = require('./_nativeCreate'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; +var hashClear = require('./_hashClear'), + hashDelete = require('./_hashDelete'), + hashGet = require('./_hashGet'), + hashHas = require('./_hashHas'), + hashSet = require('./_hashSet'); /** * Creates a hash object. * * @private * @constructor - * @returns {Object} Returns the new hash object. + * @param {Array} [entries] The key-value pairs to cache. */ -function Hash() {} +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} -// Avoid inheriting from `Object.prototype` when possible. -Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto; +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; module.exports = Hash; diff --git a/node_modules/lodash/_ListCache.js b/node_modules/lodash/_ListCache.js new file mode 100644 index 0000000..26895c3 --- /dev/null +++ b/node_modules/lodash/_ListCache.js @@ -0,0 +1,32 @@ +var listCacheClear = require('./_listCacheClear'), + listCacheDelete = require('./_listCacheDelete'), + listCacheGet = require('./_listCacheGet'), + listCacheHas = require('./_listCacheHas'), + listCacheSet = require('./_listCacheSet'); + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +module.exports = ListCache; diff --git a/node_modules/lodash/_MapCache.js b/node_modules/lodash/_MapCache.js index 4c6fa99..4a4eea7 100644 --- a/node_modules/lodash/_MapCache.js +++ b/node_modules/lodash/_MapCache.js @@ -1,32 +1,32 @@ -var mapClear = require('./_mapClear'), - mapDelete = require('./_mapDelete'), - mapGet = require('./_mapGet'), - mapHas = require('./_mapHas'), - mapSet = require('./_mapSet'); +var mapCacheClear = require('./_mapCacheClear'), + mapCacheDelete = require('./_mapCacheDelete'), + mapCacheGet = require('./_mapCacheGet'), + mapCacheHas = require('./_mapCacheHas'), + mapCacheSet = require('./_mapCacheSet'); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor - * @param {Array} [values] The values to cache. + * @param {Array} [entries] The key-value pairs to cache. */ -function MapCache(values) { +function MapCache(entries) { var index = -1, - length = values ? values.length : 0; + length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { - var entry = values[index]; + var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. -MapCache.prototype.clear = mapClear; -MapCache.prototype['delete'] = mapDelete; -MapCache.prototype.get = mapGet; -MapCache.prototype.has = mapHas; -MapCache.prototype.set = mapSet; +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; module.exports = MapCache; diff --git a/node_modules/lodash/_Reflect.js b/node_modules/lodash/_Reflect.js deleted file mode 100644 index 1de7475..0000000 --- a/node_modules/lodash/_Reflect.js +++ /dev/null @@ -1,6 +0,0 @@ -var root = require('./_root'); - -/** Built-in value references. */ -var Reflect = root.Reflect; - -module.exports = Reflect; diff --git a/node_modules/lodash/_SetCache.js b/node_modules/lodash/_SetCache.js index 6fd915b..6468b06 100644 --- a/node_modules/lodash/_SetCache.js +++ b/node_modules/lodash/_SetCache.js @@ -1,9 +1,10 @@ var MapCache = require('./_MapCache'), - cachePush = require('./_cachePush'); + setCacheAdd = require('./_setCacheAdd'), + setCacheHas = require('./_setCacheHas'); /** * - * Creates a set cache object to store unique values. + * Creates an array cache object to store unique values. * * @private * @constructor @@ -11,15 +12,16 @@ var MapCache = require('./_MapCache'), */ function SetCache(values) { var index = -1, - length = values ? values.length : 0; + length = values == null ? 0 : values.length; this.__data__ = new MapCache; while (++index < length) { - this.push(values[index]); + this.add(values[index]); } } // Add methods to `SetCache`. -SetCache.prototype.push = cachePush; +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; module.exports = SetCache; diff --git a/node_modules/lodash/_Stack.js b/node_modules/lodash/_Stack.js index 414cd52..80b2cf1 100644 --- a/node_modules/lodash/_Stack.js +++ b/node_modules/lodash/_Stack.js @@ -1,4 +1,5 @@ -var stackClear = require('./_stackClear'), +var ListCache = require('./_ListCache'), + stackClear = require('./_stackClear'), stackDelete = require('./_stackDelete'), stackGet = require('./_stackGet'), stackHas = require('./_stackHas'), @@ -9,17 +10,11 @@ var stackClear = require('./_stackClear'), * * @private * @constructor - * @param {Array} [values] The values to cache. + * @param {Array} [entries] The key-value pairs to cache. */ -function Stack(values) { - var index = -1, - length = values ? values.length : 0; - - this.clear(); - while (++index < length) { - var entry = values[index]; - this.set(entry[0], entry[1]); - } +function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; } // Add methods to `Stack`. diff --git a/node_modules/lodash/_addMapEntry.js b/node_modules/lodash/_addMapEntry.js index 0112ef7..5a69212 100644 --- a/node_modules/lodash/_addMapEntry.js +++ b/node_modules/lodash/_addMapEntry.js @@ -7,7 +7,7 @@ * @returns {Object} Returns `map`. */ function addMapEntry(map, pair) { - // Don't return `Map#set` because it doesn't return the map instance in IE 11. + // Don't return `map.set` because it's not chainable in IE 11. map.set(pair[0], pair[1]); return map; } diff --git a/node_modules/lodash/_addSetEntry.js b/node_modules/lodash/_addSetEntry.js index 7b75c13..1a07b70 100644 --- a/node_modules/lodash/_addSetEntry.js +++ b/node_modules/lodash/_addSetEntry.js @@ -7,6 +7,7 @@ * @returns {Object} Returns `set`. */ function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. set.add(value); return set; } diff --git a/node_modules/lodash/_apply.js b/node_modules/lodash/_apply.js index d000f04..36436dd 100644 --- a/node_modules/lodash/_apply.js +++ b/node_modules/lodash/_apply.js @@ -9,8 +9,7 @@ * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { - var length = args.length; - switch (length) { + switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); diff --git a/node_modules/lodash/_arrayAggregator.js b/node_modules/lodash/_arrayAggregator.js index 562eeb3..d96c3ca 100644 --- a/node_modules/lodash/_arrayAggregator.js +++ b/node_modules/lodash/_arrayAggregator.js @@ -2,7 +2,7 @@ * A specialized version of `baseAggregator` for arrays. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} setter The function to set `accumulator` values. * @param {Function} iteratee The iteratee to transform keys. * @param {Object} accumulator The initial aggregated object. @@ -10,7 +10,7 @@ */ function arrayAggregator(array, setter, iteratee, accumulator) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { var value = array[index]; diff --git a/node_modules/lodash/_arrayConcat.js b/node_modules/lodash/_arrayConcat.js deleted file mode 100644 index 96e7741..0000000 --- a/node_modules/lodash/_arrayConcat.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Creates a new array concatenating `array` with `other`. - * - * @private - * @param {Array} array The first array to concatenate. - * @param {Array} other The second array to concatenate. - * @returns {Array} Returns the new concatenated array. - */ -function arrayConcat(array, other) { - var index = -1, - length = array.length, - othIndex = -1, - othLength = other.length, - result = Array(length + othLength); - - while (++index < length) { - result[index] = array[index]; - } - while (++othIndex < othLength) { - result[index++] = other[othIndex]; - } - return result; -} - -module.exports = arrayConcat; diff --git a/node_modules/lodash/_arrayEach.js b/node_modules/lodash/_arrayEach.js index c302e63..2c5f579 100644 --- a/node_modules/lodash/_arrayEach.js +++ b/node_modules/lodash/_arrayEach.js @@ -3,13 +3,13 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { if (iteratee(array[index], index, array) === false) { diff --git a/node_modules/lodash/_arrayEachRight.js b/node_modules/lodash/_arrayEachRight.js index 5318585..976ca5c 100644 --- a/node_modules/lodash/_arrayEachRight.js +++ b/node_modules/lodash/_arrayEachRight.js @@ -3,12 +3,12 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEachRight(array, iteratee) { - var length = array.length; + var length = array == null ? 0 : array.length; while (length--) { if (iteratee(array[length], length, array) === false) { diff --git a/node_modules/lodash/_arrayEvery.js b/node_modules/lodash/_arrayEvery.js index 8d89fb1..e26a918 100644 --- a/node_modules/lodash/_arrayEvery.js +++ b/node_modules/lodash/_arrayEvery.js @@ -3,14 +3,14 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if all elements pass the predicate check, * else `false`. */ function arrayEvery(array, predicate) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { if (!predicate(array[index], index, array)) { diff --git a/node_modules/lodash/_arrayFilter.js b/node_modules/lodash/_arrayFilter.js index 7b61ba6..75ea254 100644 --- a/node_modules/lodash/_arrayFilter.js +++ b/node_modules/lodash/_arrayFilter.js @@ -3,13 +3,13 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, - length = array.length, + length = array == null ? 0 : array.length, resIndex = 0, result = []; diff --git a/node_modules/lodash/_arrayIncludes.js b/node_modules/lodash/_arrayIncludes.js index 9574f5d..3737a6d 100644 --- a/node_modules/lodash/_arrayIncludes.js +++ b/node_modules/lodash/_arrayIncludes.js @@ -5,12 +5,13 @@ var baseIndexOf = require('./_baseIndexOf'); * specifying an index to search from. * * @private - * @param {Array} array The array to search. + * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludes(array, value) { - return !!array.length && baseIndexOf(array, value, 0) > -1; + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; } module.exports = arrayIncludes; diff --git a/node_modules/lodash/_arrayIncludesWith.js b/node_modules/lodash/_arrayIncludesWith.js index 88ea237..235fd97 100644 --- a/node_modules/lodash/_arrayIncludesWith.js +++ b/node_modules/lodash/_arrayIncludesWith.js @@ -2,14 +2,14 @@ * This function is like `arrayIncludes` except that it accepts a comparator. * * @private - * @param {Array} array The array to search. + * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @param {Function} comparator The comparator invoked per element. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludesWith(array, value, comparator) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { if (comparator(value, array[index])) { diff --git a/node_modules/lodash/_arrayLikeKeys.js b/node_modules/lodash/_arrayLikeKeys.js new file mode 100644 index 0000000..b2ec9ce --- /dev/null +++ b/node_modules/lodash/_arrayLikeKeys.js @@ -0,0 +1,49 @@ +var baseTimes = require('./_baseTimes'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isIndex = require('./_isIndex'), + isTypedArray = require('./isTypedArray'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; +} + +module.exports = arrayLikeKeys; diff --git a/node_modules/lodash/_arrayMap.js b/node_modules/lodash/_arrayMap.js index 73b29cf..22b2246 100644 --- a/node_modules/lodash/_arrayMap.js +++ b/node_modules/lodash/_arrayMap.js @@ -3,13 +3,13 @@ * shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, - length = array.length, + length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { diff --git a/node_modules/lodash/_arrayReduce.js b/node_modules/lodash/_arrayReduce.js index 41bea2c..de8b79b 100644 --- a/node_modules/lodash/_arrayReduce.js +++ b/node_modules/lodash/_arrayReduce.js @@ -3,7 +3,7 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the first element of `array` as @@ -12,7 +12,7 @@ */ function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[++index]; diff --git a/node_modules/lodash/_arrayReduceRight.js b/node_modules/lodash/_arrayReduceRight.js index 038e0fa..22d8976 100644 --- a/node_modules/lodash/_arrayReduceRight.js +++ b/node_modules/lodash/_arrayReduceRight.js @@ -3,7 +3,7 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the last element of `array` as @@ -11,7 +11,7 @@ * @returns {*} Returns the accumulated value. */ function arrayReduceRight(array, iteratee, accumulator, initAccum) { - var length = array.length; + var length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[--length]; } diff --git a/node_modules/lodash/_arraySample.js b/node_modules/lodash/_arraySample.js new file mode 100644 index 0000000..fcab010 --- /dev/null +++ b/node_modules/lodash/_arraySample.js @@ -0,0 +1,15 @@ +var baseRandom = require('./_baseRandom'); + +/** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ +function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; +} + +module.exports = arraySample; diff --git a/node_modules/lodash/_arraySampleSize.js b/node_modules/lodash/_arraySampleSize.js new file mode 100644 index 0000000..8c7e364 --- /dev/null +++ b/node_modules/lodash/_arraySampleSize.js @@ -0,0 +1,17 @@ +var baseClamp = require('./_baseClamp'), + copyArray = require('./_copyArray'), + shuffleSelf = require('./_shuffleSelf'); + +/** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ +function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); +} + +module.exports = arraySampleSize; diff --git a/node_modules/lodash/_arrayShuffle.js b/node_modules/lodash/_arrayShuffle.js new file mode 100644 index 0000000..46313a3 --- /dev/null +++ b/node_modules/lodash/_arrayShuffle.js @@ -0,0 +1,15 @@ +var copyArray = require('./_copyArray'), + shuffleSelf = require('./_shuffleSelf'); + +/** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ +function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); +} + +module.exports = arrayShuffle; diff --git a/node_modules/lodash/_arraySome.js b/node_modules/lodash/_arraySome.js index e6e657b..6fd02fd 100644 --- a/node_modules/lodash/_arraySome.js +++ b/node_modules/lodash/_arraySome.js @@ -3,14 +3,14 @@ * shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { diff --git a/node_modules/lodash/_asciiSize.js b/node_modules/lodash/_asciiSize.js new file mode 100644 index 0000000..11d29c3 --- /dev/null +++ b/node_modules/lodash/_asciiSize.js @@ -0,0 +1,12 @@ +var baseProperty = require('./_baseProperty'); + +/** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +var asciiSize = baseProperty('length'); + +module.exports = asciiSize; diff --git a/node_modules/lodash/_asciiToArray.js b/node_modules/lodash/_asciiToArray.js new file mode 100644 index 0000000..8e3dd5b --- /dev/null +++ b/node_modules/lodash/_asciiToArray.js @@ -0,0 +1,12 @@ +/** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function asciiToArray(string) { + return string.split(''); +} + +module.exports = asciiToArray; diff --git a/node_modules/lodash/_asciiWords.js b/node_modules/lodash/_asciiWords.js new file mode 100644 index 0000000..d765f0f --- /dev/null +++ b/node_modules/lodash/_asciiWords.js @@ -0,0 +1,15 @@ +/** Used to match words composed of alphanumeric characters. */ +var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + +/** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ +function asciiWords(string) { + return string.match(reAsciiWord) || []; +} + +module.exports = asciiWords; diff --git a/node_modules/lodash/_assignMergeValue.js b/node_modules/lodash/_assignMergeValue.js index 61dd583..cb1185e 100644 --- a/node_modules/lodash/_assignMergeValue.js +++ b/node_modules/lodash/_assignMergeValue.js @@ -1,4 +1,5 @@ -var eq = require('./eq'); +var baseAssignValue = require('./_baseAssignValue'), + eq = require('./eq'); /** * This function is like `assignValue` except that it doesn't assign @@ -11,8 +12,8 @@ var eq = require('./eq'); */ function assignMergeValue(object, key, value) { if ((value !== undefined && !eq(object[key], value)) || - (typeof key == 'number' && value === undefined && !(key in object))) { - object[key] = value; + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); } } diff --git a/node_modules/lodash/_assignValue.js b/node_modules/lodash/_assignValue.js index 35d49f0..4083957 100644 --- a/node_modules/lodash/_assignValue.js +++ b/node_modules/lodash/_assignValue.js @@ -1,4 +1,5 @@ -var eq = require('./eq'); +var baseAssignValue = require('./_baseAssignValue'), + eq = require('./eq'); /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -8,7 +9,7 @@ var hasOwnProperty = objectProto.hasOwnProperty; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private @@ -20,7 +21,7 @@ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { - object[key] = value; + baseAssignValue(object, key, value); } } diff --git a/node_modules/lodash/_assocGet.js b/node_modules/lodash/_assocGet.js deleted file mode 100644 index e53d332..0000000 --- a/node_modules/lodash/_assocGet.js +++ /dev/null @@ -1,16 +0,0 @@ -var assocIndexOf = require('./_assocIndexOf'); - -/** - * Gets the associative array value for `key`. - * - * @private - * @param {Array} array The array to query. - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function assocGet(array, key) { - var index = assocIndexOf(array, key); - return index < 0 ? undefined : array[index][1]; -} - -module.exports = assocGet; diff --git a/node_modules/lodash/_assocIndexOf.js b/node_modules/lodash/_assocIndexOf.js index 8f2c41f..5b77a2b 100644 --- a/node_modules/lodash/_assocIndexOf.js +++ b/node_modules/lodash/_assocIndexOf.js @@ -4,7 +4,7 @@ var eq = require('./eq'); * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ diff --git a/node_modules/lodash/_assocSet.js b/node_modules/lodash/_assocSet.js deleted file mode 100644 index 524f341..0000000 --- a/node_modules/lodash/_assocSet.js +++ /dev/null @@ -1,20 +0,0 @@ -var assocIndexOf = require('./_assocIndexOf'); - -/** - * Sets the associative array `key` to `value`. - * - * @private - * @param {Array} array The array to modify. - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - */ -function assocSet(array, key, value) { - var index = assocIndexOf(array, key); - if (index < 0) { - array.push([key, value]); - } else { - array[index][1] = value; - } -} - -module.exports = assocSet; diff --git a/node_modules/lodash/_baseAssignIn.js b/node_modules/lodash/_baseAssignIn.js new file mode 100644 index 0000000..6624f90 --- /dev/null +++ b/node_modules/lodash/_baseAssignIn.js @@ -0,0 +1,17 @@ +var copyObject = require('./_copyObject'), + keysIn = require('./keysIn'); + +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); +} + +module.exports = baseAssignIn; diff --git a/node_modules/lodash/_baseAssignValue.js b/node_modules/lodash/_baseAssignValue.js new file mode 100644 index 0000000..d6f66ef --- /dev/null +++ b/node_modules/lodash/_baseAssignValue.js @@ -0,0 +1,25 @@ +var defineProperty = require('./_defineProperty'); + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +module.exports = baseAssignValue; diff --git a/node_modules/lodash/_baseAt.js b/node_modules/lodash/_baseAt.js index a077cb9..90e4237 100644 --- a/node_modules/lodash/_baseAt.js +++ b/node_modules/lodash/_baseAt.js @@ -5,17 +5,17 @@ var get = require('./get'); * * @private * @param {Object} object The object to iterate over. - * @param {string[]} paths The property paths of elements to pick. - * @returns {Array} Returns the new array of picked elements. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. */ function baseAt(object, paths) { var index = -1, - isNil = object == null, length = paths.length, - result = Array(length); + result = Array(length), + skip = object == null; while (++index < length) { - result[index] = isNil ? undefined : get(object, paths[index]); + result[index] = skip ? undefined : get(object, paths[index]); } return result; } diff --git a/node_modules/lodash/_baseClamp.js b/node_modules/lodash/_baseClamp.js index ceadeef..a1c5692 100644 --- a/node_modules/lodash/_baseClamp.js +++ b/node_modules/lodash/_baseClamp.js @@ -1,5 +1,5 @@ /** - * The base implementation of `_.clamp` which doesn't coerce arguments to numbers. + * The base implementation of `_.clamp` which doesn't coerce arguments. * * @private * @param {number} number The number to clamp. diff --git a/node_modules/lodash/_baseClone.js b/node_modules/lodash/_baseClone.js index b1079ed..7c27a37 100644 --- a/node_modules/lodash/_baseClone.js +++ b/node_modules/lodash/_baseClone.js @@ -2,20 +2,27 @@ var Stack = require('./_Stack'), arrayEach = require('./_arrayEach'), assignValue = require('./_assignValue'), baseAssign = require('./_baseAssign'), + baseAssignIn = require('./_baseAssignIn'), cloneBuffer = require('./_cloneBuffer'), copyArray = require('./_copyArray'), copySymbols = require('./_copySymbols'), + copySymbolsIn = require('./_copySymbolsIn'), getAllKeys = require('./_getAllKeys'), + getAllKeysIn = require('./_getAllKeysIn'), getTag = require('./_getTag'), initCloneArray = require('./_initCloneArray'), initCloneByTag = require('./_initCloneByTag'), initCloneObject = require('./_initCloneObject'), isArray = require('./isArray'), isBuffer = require('./isBuffer'), - isHostObject = require('./_isHostObject'), isObject = require('./isObject'), keys = require('./keys'); +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', @@ -67,16 +74,22 @@ cloneableTags[weakMapTag] = false; * * @private * @param {*} value The value to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @param {boolean} [isFull] Specify a clone including symbols. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols * @param {Function} [customizer] The function to customize cloning. * @param {string} [key] The key of `value`. * @param {Object} [object] The parent object of `value`. * @param {Object} [stack] Tracks traversed objects and their clone counterparts. * @returns {*} Returns the cloned value. */ -function baseClone(value, isDeep, isFull, customizer, key, object, stack) { - var result; +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + if (customizer) { result = object ? customizer(value, key, object, stack) : customizer(value); } @@ -100,12 +113,11 @@ function baseClone(value, isDeep, isFull, customizer, key, object, stack) { return cloneBuffer(value, isDeep); } if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - if (isHostObject(value)) { - return object ? value : {}; - } - result = initCloneObject(isFunc ? {} : value); + result = (isFlat || isFunc) ? {} : initCloneObject(value); if (!isDeep) { - return copySymbols(value, baseAssign(result, value)); + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); } } else { if (!cloneableTags[tag]) { @@ -122,16 +134,18 @@ function baseClone(value, isDeep, isFull, customizer, key, object, stack) { } stack.set(value, result); - if (!isArr) { - var props = isFull ? getAllKeys(value) : keys(value); - } - // Recursively populate clone (susceptible to call stack limits). + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); arrayEach(props || value, function(subValue, key) { if (props) { key = subValue; subValue = value[key]; } - assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); return result; } diff --git a/node_modules/lodash/_baseConforms.js b/node_modules/lodash/_baseConforms.js index 973aa6d..947e20d 100644 --- a/node_modules/lodash/_baseConforms.js +++ b/node_modules/lodash/_baseConforms.js @@ -1,32 +1,17 @@ -var keys = require('./keys'); +var baseConformsTo = require('./_baseConformsTo'), + keys = require('./keys'); /** * The base implementation of `_.conforms` which doesn't clone `source`. * * @private * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseConforms(source) { - var props = keys(source), - length = props.length; - + var props = keys(source); return function(object) { - if (object == null) { - return !length; - } - var index = length; - while (index--) { - var key = props[index], - predicate = source[key], - value = object[key]; - - if ((value === undefined && - !(key in Object(object))) || !predicate(value)) { - return false; - } - } - return true; + return baseConformsTo(object, source, props); }; } diff --git a/node_modules/lodash/_baseConformsTo.js b/node_modules/lodash/_baseConformsTo.js new file mode 100644 index 0000000..e449cb8 --- /dev/null +++ b/node_modules/lodash/_baseConformsTo.js @@ -0,0 +1,27 @@ +/** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ +function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; +} + +module.exports = baseConformsTo; diff --git a/node_modules/lodash/_baseCreate.js b/node_modules/lodash/_baseCreate.js index 4372cad..ffa6a52 100644 --- a/node_modules/lodash/_baseCreate.js +++ b/node_modules/lodash/_baseCreate.js @@ -8,11 +8,23 @@ var objectCreate = Object.create; * properties to the created object. * * @private - * @param {Object} prototype The object to inherit from. + * @param {Object} proto The object to inherit from. * @returns {Object} Returns the new object. */ -function baseCreate(proto) { - return isObject(proto) ? objectCreate(proto) : {}; -} +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); module.exports = baseCreate; diff --git a/node_modules/lodash/_baseDelay.js b/node_modules/lodash/_baseDelay.js index c397562..1486d69 100644 --- a/node_modules/lodash/_baseDelay.js +++ b/node_modules/lodash/_baseDelay.js @@ -1,15 +1,15 @@ -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** - * The base implementation of `_.delay` and `_.defer` which accepts an array - * of `func` arguments. + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. * * @private * @param {Function} func The function to delay. * @param {number} wait The number of milliseconds to delay invocation. - * @param {Object} args The arguments to provide to `func`. - * @returns {number} Returns the timer id. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. */ function baseDelay(func, wait, args) { if (typeof func != 'function') { diff --git a/node_modules/lodash/_baseDifference.js b/node_modules/lodash/_baseDifference.js index dcccad3..343ac19 100644 --- a/node_modules/lodash/_baseDifference.js +++ b/node_modules/lodash/_baseDifference.js @@ -45,7 +45,7 @@ function baseDifference(array, values, iteratee, comparator) { outer: while (++index < length) { var value = array[index], - computed = iteratee ? iteratee(value) : value; + computed = iteratee == null ? value : iteratee(value); value = (comparator || value !== 0) ? value : 0; if (isCommon && computed === computed) { diff --git a/node_modules/lodash/_baseFind.js b/node_modules/lodash/_baseFind.js deleted file mode 100644 index 338f932..0000000 --- a/node_modules/lodash/_baseFind.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * The base implementation of methods like `_.find` and `_.findKey`, without - * support for iteratee shorthands, which iterates over `collection` using - * `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to search. - * @param {Function} predicate The function invoked per iteration. - * @param {Function} eachFunc The function to iterate over `collection`. - * @param {boolean} [retKey] Specify returning the key of the found element - * instead of the element itself. - * @returns {*} Returns the found element or its key, else `undefined`. - */ -function baseFind(collection, predicate, eachFunc, retKey) { - var result; - eachFunc(collection, function(value, key, collection) { - if (predicate(value, key, collection)) { - result = retKey ? key : value; - return false; - } - }); - return result; -} - -module.exports = baseFind; diff --git a/node_modules/lodash/_baseFindIndex.js b/node_modules/lodash/_baseFindIndex.js index 61428f6..e3f5d8a 100644 --- a/node_modules/lodash/_baseFindIndex.js +++ b/node_modules/lodash/_baseFindIndex.js @@ -3,14 +3,15 @@ * support for iteratee shorthands. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {number} Returns the index of the matched value, else `-1`. */ -function baseFindIndex(array, predicate, fromRight) { +function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, - index = fromRight ? length : -1; + index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { if (predicate(array[index], index, array)) { diff --git a/node_modules/lodash/_baseFindKey.js b/node_modules/lodash/_baseFindKey.js new file mode 100644 index 0000000..2e430f3 --- /dev/null +++ b/node_modules/lodash/_baseFindKey.js @@ -0,0 +1,23 @@ +/** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ +function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; +} + +module.exports = baseFindKey; diff --git a/node_modules/lodash/_baseFunctions.js b/node_modules/lodash/_baseFunctions.js index 6e1090f..d23bc9b 100644 --- a/node_modules/lodash/_baseFunctions.js +++ b/node_modules/lodash/_baseFunctions.js @@ -8,7 +8,7 @@ var arrayFilter = require('./_arrayFilter'), * @private * @param {Object} object The object to inspect. * @param {Array} props The property names to filter. - * @returns {Array} Returns the new array of filtered property names. + * @returns {Array} Returns the function names. */ function baseFunctions(object, props) { return arrayFilter(props, function(key) { diff --git a/node_modules/lodash/_baseGet.js b/node_modules/lodash/_baseGet.js index 886720b..a194913 100644 --- a/node_modules/lodash/_baseGet.js +++ b/node_modules/lodash/_baseGet.js @@ -1,5 +1,4 @@ var castPath = require('./_castPath'), - isKey = require('./_isKey'), toKey = require('./_toKey'); /** @@ -11,7 +10,7 @@ var castPath = require('./_castPath'), * @returns {*} Returns the resolved value. */ function baseGet(object, path) { - path = isKey(path, object) ? [path] : castPath(path); + path = castPath(path, object); var index = 0, length = path.length; diff --git a/node_modules/lodash/_baseGetAllKeys.js b/node_modules/lodash/_baseGetAllKeys.js index 7f8b38b..8ad204e 100644 --- a/node_modules/lodash/_baseGetAllKeys.js +++ b/node_modules/lodash/_baseGetAllKeys.js @@ -14,9 +14,7 @@ var arrayPush = require('./_arrayPush'), */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); - return isArray(object) - ? result - : arrayPush(result, symbolsFunc(object)); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } module.exports = baseGetAllKeys; diff --git a/node_modules/lodash/_baseGetTag.js b/node_modules/lodash/_baseGetTag.js new file mode 100644 index 0000000..cf869ac --- /dev/null +++ b/node_modules/lodash/_baseGetTag.js @@ -0,0 +1,29 @@ +var Symbol = require('./_Symbol'), + getRawTag = require('./_getRawTag'), + objectToString = require('./_objectToString'); + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + value = Object(value); + return (symToStringTag && symToStringTag in value) + ? getRawTag(value) + : objectToString(value); +} + +module.exports = baseGetTag; diff --git a/node_modules/lodash/_baseGt.js b/node_modules/lodash/_baseGt.js index 813238b..502d273 100644 --- a/node_modules/lodash/_baseGt.js +++ b/node_modules/lodash/_baseGt.js @@ -1,5 +1,5 @@ /** - * The base implementation of `_.gt` which doesn't coerce arguments to numbers. + * The base implementation of `_.gt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. diff --git a/node_modules/lodash/_baseHas.js b/node_modules/lodash/_baseHas.js index 1de5d84..1b73032 100644 --- a/node_modules/lodash/_baseHas.js +++ b/node_modules/lodash/_baseHas.js @@ -1,5 +1,3 @@ -var getPrototype = require('./_getPrototype'); - /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -10,16 +8,12 @@ var hasOwnProperty = objectProto.hasOwnProperty; * The base implementation of `_.has` without support for deep paths. * * @private - * @param {Object} object The object to query. + * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHas(object, key) { - // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`, - // that are composed entirely of index properties, return `false` for - // `hasOwnProperty` checks of them. - return hasOwnProperty.call(object, key) || - (typeof object == 'object' && key in object && getPrototype(object) === null); + return object != null && hasOwnProperty.call(object, key); } module.exports = baseHas; diff --git a/node_modules/lodash/_baseHasIn.js b/node_modules/lodash/_baseHasIn.js index 4a36558..2e0d042 100644 --- a/node_modules/lodash/_baseHasIn.js +++ b/node_modules/lodash/_baseHasIn.js @@ -2,12 +2,12 @@ * The base implementation of `_.hasIn` without support for deep paths. * * @private - * @param {Object} object The object to query. + * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { - return key in Object(object); + return object != null && key in Object(object); } module.exports = baseHasIn; diff --git a/node_modules/lodash/_baseInRange.js b/node_modules/lodash/_baseInRange.js index 16d53f2..ec95666 100644 --- a/node_modules/lodash/_baseInRange.js +++ b/node_modules/lodash/_baseInRange.js @@ -3,7 +3,7 @@ var nativeMax = Math.max, nativeMin = Math.min; /** - * The base implementation of `_.inRange` which doesn't coerce arguments to numbers. + * The base implementation of `_.inRange` which doesn't coerce arguments. * * @private * @param {number} number The number to check. diff --git a/node_modules/lodash/_baseIndexOf.js b/node_modules/lodash/_baseIndexOf.js index 6cda802..167e706 100644 --- a/node_modules/lodash/_baseIndexOf.js +++ b/node_modules/lodash/_baseIndexOf.js @@ -1,27 +1,20 @@ -var indexOfNaN = require('./_indexOfNaN'); +var baseFindIndex = require('./_baseFindIndex'), + baseIsNaN = require('./_baseIsNaN'), + strictIndexOf = require('./_strictIndexOf'); /** * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseIndexOf(array, value, fromIndex) { - if (value !== value) { - return indexOfNaN(array, fromIndex); - } - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); } module.exports = baseIndexOf; diff --git a/node_modules/lodash/_baseIndexOfWith.js b/node_modules/lodash/_baseIndexOfWith.js index 8be568a..f815fe0 100644 --- a/node_modules/lodash/_baseIndexOfWith.js +++ b/node_modules/lodash/_baseIndexOfWith.js @@ -2,7 +2,7 @@ * This function is like `baseIndexOf` except that it accepts a comparator. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @param {Function} comparator The comparator invoked per element. diff --git a/node_modules/lodash/_baseInvoke.js b/node_modules/lodash/_baseInvoke.js index 3d6bca5..49bcf3c 100644 --- a/node_modules/lodash/_baseInvoke.js +++ b/node_modules/lodash/_baseInvoke.js @@ -1,6 +1,5 @@ var apply = require('./_apply'), castPath = require('./_castPath'), - isKey = require('./_isKey'), last = require('./last'), parent = require('./_parent'), toKey = require('./_toKey'); @@ -16,12 +15,9 @@ var apply = require('./_apply'), * @returns {*} Returns the result of the invoked method. */ function baseInvoke(object, path, args) { - if (!isKey(path, object)) { - path = castPath(path); - object = parent(object, path); - path = last(path); - } - var func = object == null ? object : object[toKey(path)]; + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; return func == null ? undefined : apply(func, object, args); } diff --git a/node_modules/lodash/_baseIsArguments.js b/node_modules/lodash/_baseIsArguments.js new file mode 100644 index 0000000..b3562cc --- /dev/null +++ b/node_modules/lodash/_baseIsArguments.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; +} + +module.exports = baseIsArguments; diff --git a/node_modules/lodash/_baseIsArrayBuffer.js b/node_modules/lodash/_baseIsArrayBuffer.js new file mode 100644 index 0000000..a2c4f30 --- /dev/null +++ b/node_modules/lodash/_baseIsArrayBuffer.js @@ -0,0 +1,17 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +var arrayBufferTag = '[object ArrayBuffer]'; + +/** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ +function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; +} + +module.exports = baseIsArrayBuffer; diff --git a/node_modules/lodash/_baseIsDate.js b/node_modules/lodash/_baseIsDate.js new file mode 100644 index 0000000..ba67c78 --- /dev/null +++ b/node_modules/lodash/_baseIsDate.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var dateTag = '[object Date]'; + +/** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ +function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; +} + +module.exports = baseIsDate; diff --git a/node_modules/lodash/_baseIsEqual.js b/node_modules/lodash/_baseIsEqual.js index 3772dab..0c4212e 100644 --- a/node_modules/lodash/_baseIsEqual.js +++ b/node_modules/lodash/_baseIsEqual.js @@ -9,22 +9,21 @@ var baseIsEqualDeep = require('./_baseIsEqualDeep'), * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. - * @param {boolean} [bitmask] The bitmask of comparison flags. - * The bitmask may be composed of the following flags: - * 1 - Unordered comparison - * 2 - Partial comparison * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ -function baseIsEqual(value, other, customizer, bitmask, stack) { +function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { return value !== value && other !== other; } - return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack); + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } module.exports = baseIsEqual; diff --git a/node_modules/lodash/_baseIsEqualDeep.js b/node_modules/lodash/_baseIsEqualDeep.js index c18d6d1..b32f1f3 100644 --- a/node_modules/lodash/_baseIsEqualDeep.js +++ b/node_modules/lodash/_baseIsEqualDeep.js @@ -4,11 +4,11 @@ var Stack = require('./_Stack'), equalObjects = require('./_equalObjects'), getTag = require('./_getTag'), isArray = require('./isArray'), - isHostObject = require('./_isHostObject'), + isBuffer = require('./isBuffer'), isTypedArray = require('./isTypedArray'); -/** Used to compose bitmasks for comparison styles. */ -var PARTIAL_COMPARE_FLAG = 2; +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', @@ -29,14 +29,13 @@ var hasOwnProperty = objectProto.hasOwnProperty; * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` - * for more details. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ -function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = arrayTag, @@ -50,17 +49,24 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { othTag = getTag(other); othTag = othTag == argsTag ? objectTag : othTag; } - var objIsObj = objTag == objectTag && !isHostObject(object), - othIsObj = othTag == objectTag && !isHostObject(other), + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, isSameTag = objTag == othTag; + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } if (isSameTag && !objIsObj) { stack || (stack = new Stack); return (objIsArr || isTypedArray(object)) - ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) - : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack); + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } - if (!(bitmask & PARTIAL_COMPARE_FLAG)) { + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); @@ -69,14 +75,14 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack); - return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack); - return equalObjects(object, other, equalFunc, customizer, bitmask, stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } module.exports = baseIsEqualDeep; diff --git a/node_modules/lodash/_baseIsMap.js b/node_modules/lodash/_baseIsMap.js new file mode 100644 index 0000000..02a4021 --- /dev/null +++ b/node_modules/lodash/_baseIsMap.js @@ -0,0 +1,18 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; +} + +module.exports = baseIsMap; diff --git a/node_modules/lodash/_baseIsMatch.js b/node_modules/lodash/_baseIsMatch.js index d36c878..72494be 100644 --- a/node_modules/lodash/_baseIsMatch.js +++ b/node_modules/lodash/_baseIsMatch.js @@ -1,9 +1,9 @@ var Stack = require('./_Stack'), baseIsEqual = require('./_baseIsEqual'); -/** Used to compose bitmasks for comparison styles. */ -var UNORDERED_COMPARE_FLAG = 1, - PARTIAL_COMPARE_FLAG = 2; +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.isMatch` without support for iteratee shorthands. @@ -49,7 +49,7 @@ function baseIsMatch(object, source, matchData, customizer) { var result = customizer(objValue, srcValue, key, object, source, stack); } if (!(result === undefined - ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result )) { return false; diff --git a/node_modules/lodash/_baseIsNaN.js b/node_modules/lodash/_baseIsNaN.js new file mode 100644 index 0000000..316f1eb --- /dev/null +++ b/node_modules/lodash/_baseIsNaN.js @@ -0,0 +1,12 @@ +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +module.exports = baseIsNaN; diff --git a/node_modules/lodash/_baseIsNative.js b/node_modules/lodash/_baseIsNative.js new file mode 100644 index 0000000..8702330 --- /dev/null +++ b/node_modules/lodash/_baseIsNative.js @@ -0,0 +1,47 @@ +var isFunction = require('./isFunction'), + isMasked = require('./_isMasked'), + isObject = require('./isObject'), + toSource = require('./_toSource'); + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +module.exports = baseIsNative; diff --git a/node_modules/lodash/_baseIsRegExp.js b/node_modules/lodash/_baseIsRegExp.js new file mode 100644 index 0000000..6cd7c1a --- /dev/null +++ b/node_modules/lodash/_baseIsRegExp.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var regexpTag = '[object RegExp]'; + +/** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ +function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; +} + +module.exports = baseIsRegExp; diff --git a/node_modules/lodash/_baseIsSet.js b/node_modules/lodash/_baseIsSet.js new file mode 100644 index 0000000..6dee367 --- /dev/null +++ b/node_modules/lodash/_baseIsSet.js @@ -0,0 +1,18 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; +} + +module.exports = baseIsSet; diff --git a/node_modules/lodash/_baseIsTypedArray.js b/node_modules/lodash/_baseIsTypedArray.js new file mode 100644 index 0000000..1edb32f --- /dev/null +++ b/node_modules/lodash/_baseIsTypedArray.js @@ -0,0 +1,60 @@ +var baseGetTag = require('./_baseGetTag'), + isLength = require('./isLength'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +} + +module.exports = baseIsTypedArray; diff --git a/node_modules/lodash/_baseKeys.js b/node_modules/lodash/_baseKeys.js index 2c8ccb9..45e9e6f 100644 --- a/node_modules/lodash/_baseKeys.js +++ b/node_modules/lodash/_baseKeys.js @@ -1,16 +1,30 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeKeys = Object.keys; +var isPrototype = require('./_isPrototype'), + nativeKeys = require('./_nativeKeys'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * The base implementation of `_.keys` which doesn't skip the constructor - * property of prototypes or treat sparse arrays as dense. + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { - return nativeKeys(Object(object)); + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; } module.exports = baseKeys; diff --git a/node_modules/lodash/_baseKeysIn.js b/node_modules/lodash/_baseKeysIn.js index 7455fd8..ea8a0a1 100644 --- a/node_modules/lodash/_baseKeysIn.js +++ b/node_modules/lodash/_baseKeysIn.js @@ -1,36 +1,33 @@ -var Reflect = require('./_Reflect'), - iteratorToArray = require('./_iteratorToArray'); +var isObject = require('./isObject'), + isPrototype = require('./_isPrototype'), + nativeKeysIn = require('./_nativeKeysIn'); /** Used for built-in method references. */ var objectProto = Object.prototype; -/** Built-in value references. */ -var enumerate = Reflect ? Reflect.enumerate : undefined, - propertyIsEnumerable = objectProto.propertyIsEnumerable; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * The base implementation of `_.keysIn` which doesn't skip the constructor - * property of prototypes or treat sparse arrays as dense. + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeysIn(object) { - object = object == null ? object : Object(object); + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; - var result = []; for (var key in object) { - result.push(key); + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } } return result; } -// Fallback for IE < 9 with es6-shim. -if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) { - baseKeysIn = function(object) { - return iteratorToArray(enumerate(object)); - }; -} - module.exports = baseKeysIn; diff --git a/node_modules/lodash/_baseLt.js b/node_modules/lodash/_baseLt.js index aa05efa..8674d29 100644 --- a/node_modules/lodash/_baseLt.js +++ b/node_modules/lodash/_baseLt.js @@ -1,5 +1,5 @@ /** - * The base implementation of `_.lt` which doesn't coerce arguments to numbers. + * The base implementation of `_.lt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. diff --git a/node_modules/lodash/_baseMatches.js b/node_modules/lodash/_baseMatches.js index ba9012f..e56582a 100644 --- a/node_modules/lodash/_baseMatches.js +++ b/node_modules/lodash/_baseMatches.js @@ -7,7 +7,7 @@ var baseIsMatch = require('./_baseIsMatch'), * * @private * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var matchData = getMatchData(source); diff --git a/node_modules/lodash/_baseMatchesProperty.js b/node_modules/lodash/_baseMatchesProperty.js index ec5097a..24afd89 100644 --- a/node_modules/lodash/_baseMatchesProperty.js +++ b/node_modules/lodash/_baseMatchesProperty.js @@ -6,9 +6,9 @@ var baseIsEqual = require('./_baseIsEqual'), matchesStrictComparable = require('./_matchesStrictComparable'), toKey = require('./_toKey'); -/** Used to compose bitmasks for comparison styles. */ -var UNORDERED_COMPARE_FLAG = 1, - PARTIAL_COMPARE_FLAG = 2; +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. @@ -16,7 +16,7 @@ var UNORDERED_COMPARE_FLAG = 1, * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { @@ -26,7 +26,7 @@ function baseMatchesProperty(path, srcValue) { var objValue = get(object, path); return (objValue === undefined && objValue === srcValue) ? hasIn(object, path) - : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG); + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); }; } diff --git a/node_modules/lodash/_baseMean.js b/node_modules/lodash/_baseMean.js index ac99a42..fa9e00a 100644 --- a/node_modules/lodash/_baseMean.js +++ b/node_modules/lodash/_baseMean.js @@ -13,7 +13,7 @@ var NAN = 0 / 0; * @returns {number} Returns the mean. */ function baseMean(array, iteratee) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? (baseSum(array, iteratee) / length) : NAN; } diff --git a/node_modules/lodash/_baseMerge.js b/node_modules/lodash/_baseMerge.js index e18d3bf..f4cb8c6 100644 --- a/node_modules/lodash/_baseMerge.js +++ b/node_modules/lodash/_baseMerge.js @@ -1,10 +1,8 @@ var Stack = require('./_Stack'), - arrayEach = require('./_arrayEach'), assignMergeValue = require('./_assignMergeValue'), + baseFor = require('./_baseFor'), baseMergeDeep = require('./_baseMergeDeep'), - isArray = require('./isArray'), isObject = require('./isObject'), - isTypedArray = require('./isTypedArray'), keysIn = require('./keysIn'); /** @@ -22,14 +20,7 @@ function baseMerge(object, source, srcIndex, customizer, stack) { if (object === source) { return; } - if (!(isArray(source) || isTypedArray(source))) { - var props = keysIn(source); - } - arrayEach(props || source, function(srcValue, key) { - if (props) { - key = srcValue; - srcValue = source[key]; - } + baseFor(source, function(srcValue, key) { if (isObject(srcValue)) { stack || (stack = new Stack); baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); @@ -44,7 +35,7 @@ function baseMerge(object, source, srcIndex, customizer, stack) { } assignMergeValue(object, key, newValue); } - }); + }, keysIn); } module.exports = baseMerge; diff --git a/node_modules/lodash/_baseMergeDeep.js b/node_modules/lodash/_baseMergeDeep.js index 062f004..42b405a 100644 --- a/node_modules/lodash/_baseMergeDeep.js +++ b/node_modules/lodash/_baseMergeDeep.js @@ -1,9 +1,12 @@ var assignMergeValue = require('./_assignMergeValue'), - baseClone = require('./_baseClone'), + cloneBuffer = require('./_cloneBuffer'), + cloneTypedArray = require('./_cloneTypedArray'), copyArray = require('./_copyArray'), + initCloneObject = require('./_initCloneObject'), isArguments = require('./isArguments'), isArray = require('./isArray'), isArrayLikeObject = require('./isArrayLikeObject'), + isBuffer = require('./isBuffer'), isFunction = require('./isFunction'), isObject = require('./isObject'), isPlainObject = require('./isPlainObject'), @@ -41,42 +44,49 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta var isCommon = newValue === undefined; if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + newValue = srcValue; - if (isArray(srcValue) || isTypedArray(srcValue)) { + if (isArr || isBuff || isTyped) { if (isArray(objValue)) { newValue = objValue; } else if (isArrayLikeObject(objValue)) { newValue = copyArray(objValue); } - else { + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { isCommon = false; - newValue = baseClone(srcValue, true); + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; if (isArguments(objValue)) { newValue = toPlainObject(objValue); } else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { - isCommon = false; - newValue = baseClone(srcValue, true); - } - else { - newValue = objValue; + newValue = initCloneObject(srcValue); } } else { isCommon = false; } } - stack.set(srcValue, newValue); - if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); } - stack['delete'](srcValue); assignMergeValue(object, key, newValue); } diff --git a/node_modules/lodash/_baseNth.js b/node_modules/lodash/_baseNth.js index 6978a65..0403c2a 100644 --- a/node_modules/lodash/_baseNth.js +++ b/node_modules/lodash/_baseNth.js @@ -1,7 +1,7 @@ var isIndex = require('./_isIndex'); /** - * The base implementation of `_.nth` which doesn't coerce `n` to an integer. + * The base implementation of `_.nth` which doesn't coerce arguments. * * @private * @param {Array} array The array to query. diff --git a/node_modules/lodash/_basePick.js b/node_modules/lodash/_basePick.js index 7272548..6afce40 100644 --- a/node_modules/lodash/_basePick.js +++ b/node_modules/lodash/_basePick.js @@ -1,4 +1,5 @@ -var arrayReduce = require('./_arrayReduce'); +var basePickBy = require('./_basePickBy'), + hasIn = require('./hasIn'); /** * The base implementation of `_.pick` without support for individual @@ -6,17 +7,14 @@ var arrayReduce = require('./_arrayReduce'); * * @private * @param {Object} object The source object. - * @param {string[]} props The property identifiers to pick. + * @param {string[]} paths The property paths to pick. * @returns {Object} Returns the new object. */ -function basePick(object, props) { +function basePick(object, paths) { object = Object(object); - return arrayReduce(props, function(result, key) { - if (key in object) { - result[key] = object[key]; - } - return result; - }, {}); + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); } module.exports = basePick; diff --git a/node_modules/lodash/_basePickBy.js b/node_modules/lodash/_basePickBy.js index 56ffa5f..85be68c 100644 --- a/node_modules/lodash/_basePickBy.js +++ b/node_modules/lodash/_basePickBy.js @@ -1,25 +1,27 @@ -var getAllKeysIn = require('./_getAllKeysIn'); +var baseGet = require('./_baseGet'), + baseSet = require('./_baseSet'), + castPath = require('./_castPath'); /** * The base implementation of `_.pickBy` without support for iteratee shorthands. * * @private * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. * @param {Function} predicate The function invoked per property. * @returns {Object} Returns the new object. */ -function basePickBy(object, predicate) { +function basePickBy(object, paths, predicate) { var index = -1, - props = getAllKeysIn(object), - length = props.length, + length = paths.length, result = {}; while (++index < length) { - var key = props[index], - value = object[key]; + var path = paths[index], + value = baseGet(object, path); - if (predicate(value, key)) { - result[key] = value; + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); } } return result; diff --git a/node_modules/lodash/_baseProperty.js b/node_modules/lodash/_baseProperty.js index e515941..496281e 100644 --- a/node_modules/lodash/_baseProperty.js +++ b/node_modules/lodash/_baseProperty.js @@ -3,7 +3,7 @@ * * @private * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { diff --git a/node_modules/lodash/_basePropertyDeep.js b/node_modules/lodash/_basePropertyDeep.js index acc2009..1e5aae5 100644 --- a/node_modules/lodash/_basePropertyDeep.js +++ b/node_modules/lodash/_basePropertyDeep.js @@ -5,7 +5,7 @@ var baseGet = require('./_baseGet'); * * @private * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. */ function basePropertyDeep(path) { return function(object) { diff --git a/node_modules/lodash/_basePropertyOf.js b/node_modules/lodash/_basePropertyOf.js new file mode 100644 index 0000000..4617399 --- /dev/null +++ b/node_modules/lodash/_basePropertyOf.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = basePropertyOf; diff --git a/node_modules/lodash/_basePullAll.js b/node_modules/lodash/_basePullAll.js index 3c07c99..305720e 100644 --- a/node_modules/lodash/_basePullAll.js +++ b/node_modules/lodash/_basePullAll.js @@ -1,7 +1,8 @@ var arrayMap = require('./_arrayMap'), baseIndexOf = require('./_baseIndexOf'), baseIndexOfWith = require('./_baseIndexOfWith'), - baseUnary = require('./_baseUnary'); + baseUnary = require('./_baseUnary'), + copyArray = require('./_copyArray'); /** Used for built-in method references. */ var arrayProto = Array.prototype; @@ -26,6 +27,9 @@ function basePullAll(array, values, iteratee, comparator) { length = values.length, seen = array; + if (array === values) { + values = copyArray(values); + } if (iteratee) { seen = arrayMap(array, baseUnary(iteratee)); } diff --git a/node_modules/lodash/_basePullAt.js b/node_modules/lodash/_basePullAt.js index 0dd1478..c3e9e71 100644 --- a/node_modules/lodash/_basePullAt.js +++ b/node_modules/lodash/_basePullAt.js @@ -1,9 +1,5 @@ -var castPath = require('./_castPath'), - isIndex = require('./_isIndex'), - isKey = require('./_isKey'), - last = require('./last'), - parent = require('./_parent'), - toKey = require('./_toKey'); +var baseUnset = require('./_baseUnset'), + isIndex = require('./_isIndex'); /** Used for built-in method references. */ var arrayProto = Array.prototype; @@ -30,17 +26,8 @@ function basePullAt(array, indexes) { var previous = index; if (isIndex(index)) { splice.call(array, index, 1); - } - else if (!isKey(index, array)) { - var path = castPath(index), - object = parent(array, path); - - if (object != null) { - delete object[toKey(last(path))]; - } - } - else { - delete array[toKey(index)]; + } else { + baseUnset(array, index); } } } diff --git a/node_modules/lodash/_baseRange.js b/node_modules/lodash/_baseRange.js index 2b39dd4..0fb8e41 100644 --- a/node_modules/lodash/_baseRange.js +++ b/node_modules/lodash/_baseRange.js @@ -4,14 +4,14 @@ var nativeCeil = Math.ceil, /** * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments to numbers. + * coerce arguments. * * @private * @param {number} start The start of the range. * @param {number} end The end of the range. * @param {number} step The value to increment or decrement by. * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. */ function baseRange(start, end, step, fromRight) { var index = -1, diff --git a/node_modules/lodash/_baseRest.js b/node_modules/lodash/_baseRest.js new file mode 100644 index 0000000..d0dc4bd --- /dev/null +++ b/node_modules/lodash/_baseRest.js @@ -0,0 +1,17 @@ +var identity = require('./identity'), + overRest = require('./_overRest'), + setToString = require('./_setToString'); + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); +} + +module.exports = baseRest; diff --git a/node_modules/lodash/_baseSample.js b/node_modules/lodash/_baseSample.js new file mode 100644 index 0000000..58582b9 --- /dev/null +++ b/node_modules/lodash/_baseSample.js @@ -0,0 +1,15 @@ +var arraySample = require('./_arraySample'), + values = require('./values'); + +/** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ +function baseSample(collection) { + return arraySample(values(collection)); +} + +module.exports = baseSample; diff --git a/node_modules/lodash/_baseSampleSize.js b/node_modules/lodash/_baseSampleSize.js new file mode 100644 index 0000000..5c90ec5 --- /dev/null +++ b/node_modules/lodash/_baseSampleSize.js @@ -0,0 +1,18 @@ +var baseClamp = require('./_baseClamp'), + shuffleSelf = require('./_shuffleSelf'), + values = require('./values'); + +/** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ +function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); +} + +module.exports = baseSampleSize; diff --git a/node_modules/lodash/_baseSet.js b/node_modules/lodash/_baseSet.js index 34d63e5..612a24c 100644 --- a/node_modules/lodash/_baseSet.js +++ b/node_modules/lodash/_baseSet.js @@ -1,7 +1,6 @@ var assignValue = require('./_assignValue'), castPath = require('./_castPath'), isIndex = require('./_isIndex'), - isKey = require('./_isKey'), isObject = require('./isObject'), toKey = require('./_toKey'); @@ -9,14 +8,17 @@ var assignValue = require('./_assignValue'), * The base implementation of `_.set`. * * @private - * @param {Object} object The object to query. + * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @param {Function} [customizer] The function to customize path creation. * @returns {Object} Returns `object`. */ function baseSet(object, path, value, customizer) { - path = isKey(path, object) ? [path] : castPath(path); + if (!isObject(object)) { + return object; + } + path = castPath(path, object); var index = -1, length = path.length, @@ -24,20 +26,19 @@ function baseSet(object, path, value, customizer) { nested = object; while (nested != null && ++index < length) { - var key = toKey(path[index]); - if (isObject(nested)) { - var newValue = value; - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = objValue == null - ? (isIndex(path[index + 1]) ? [] : {}) - : objValue; - } + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); } - assignValue(nested, key, newValue); } + assignValue(nested, key, newValue); nested = nested[key]; } return object; diff --git a/node_modules/lodash/_baseSetData.js b/node_modules/lodash/_baseSetData.js index e689df2..c409947 100644 --- a/node_modules/lodash/_baseSetData.js +++ b/node_modules/lodash/_baseSetData.js @@ -2,7 +2,7 @@ var identity = require('./identity'), metaMap = require('./_metaMap'); /** - * The base implementation of `setData` without support for hot loop detection. + * The base implementation of `setData` without support for hot loop shorting. * * @private * @param {Function} func The function to associate metadata with. diff --git a/node_modules/lodash/_baseSetToString.js b/node_modules/lodash/_baseSetToString.js new file mode 100644 index 0000000..89eaca3 --- /dev/null +++ b/node_modules/lodash/_baseSetToString.js @@ -0,0 +1,22 @@ +var constant = require('./constant'), + defineProperty = require('./_defineProperty'), + identity = require('./identity'); + +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); +}; + +module.exports = baseSetToString; diff --git a/node_modules/lodash/_baseShuffle.js b/node_modules/lodash/_baseShuffle.js new file mode 100644 index 0000000..023077a --- /dev/null +++ b/node_modules/lodash/_baseShuffle.js @@ -0,0 +1,15 @@ +var shuffleSelf = require('./_shuffleSelf'), + values = require('./values'); + +/** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ +function baseShuffle(collection) { + return shuffleSelf(values(collection)); +} + +module.exports = baseShuffle; diff --git a/node_modules/lodash/_baseSortedIndex.js b/node_modules/lodash/_baseSortedIndex.js index 0e82dc7..638c366 100644 --- a/node_modules/lodash/_baseSortedIndex.js +++ b/node_modules/lodash/_baseSortedIndex.js @@ -20,7 +20,7 @@ var MAX_ARRAY_LENGTH = 4294967295, */ function baseSortedIndex(array, value, retHighest) { var low = 0, - high = array ? array.length : low; + high = array == null ? low : array.length; if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { while (low < high) { diff --git a/node_modules/lodash/_baseSortedIndexBy.js b/node_modules/lodash/_baseSortedIndexBy.js index fde7928..bb22e36 100644 --- a/node_modules/lodash/_baseSortedIndexBy.js +++ b/node_modules/lodash/_baseSortedIndexBy.js @@ -25,7 +25,7 @@ function baseSortedIndexBy(array, value, iteratee, retHighest) { value = iteratee(value); var low = 0, - high = array ? array.length : 0, + high = array == null ? 0 : array.length, valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), diff --git a/node_modules/lodash/_baseToPairs.js b/node_modules/lodash/_baseToPairs.js index d80b402..bff1991 100644 --- a/node_modules/lodash/_baseToPairs.js +++ b/node_modules/lodash/_baseToPairs.js @@ -7,7 +7,7 @@ var arrayMap = require('./_arrayMap'); * @private * @param {Object} object The object to query. * @param {Array} props The property names to get values for. - * @returns {Object} Returns the new array of key-value pairs. + * @returns {Object} Returns the key-value pairs. */ function baseToPairs(object, props) { return arrayMap(props, function(key) { diff --git a/node_modules/lodash/_baseToString.js b/node_modules/lodash/_baseToString.js index 462e26f..ada6ad2 100644 --- a/node_modules/lodash/_baseToString.js +++ b/node_modules/lodash/_baseToString.js @@ -1,4 +1,6 @@ var Symbol = require('./_Symbol'), + arrayMap = require('./_arrayMap'), + isArray = require('./isArray'), isSymbol = require('./isSymbol'); /** Used as references for various `Number` constants. */ @@ -21,6 +23,10 @@ function baseToString(value) { if (typeof value == 'string') { return value; } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } diff --git a/node_modules/lodash/_baseUnary.js b/node_modules/lodash/_baseUnary.js index e584a99..98639e9 100644 --- a/node_modules/lodash/_baseUnary.js +++ b/node_modules/lodash/_baseUnary.js @@ -1,9 +1,9 @@ /** - * The base implementation of `_.unary` without support for storing wrapper metadata. + * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { diff --git a/node_modules/lodash/_baseUnset.js b/node_modules/lodash/_baseUnset.js index 754eb06..eefc6e3 100644 --- a/node_modules/lodash/_baseUnset.js +++ b/node_modules/lodash/_baseUnset.js @@ -1,6 +1,4 @@ -var baseHas = require('./_baseHas'), - castPath = require('./_castPath'), - isKey = require('./_isKey'), +var castPath = require('./_castPath'), last = require('./last'), parent = require('./_parent'), toKey = require('./_toKey'); @@ -10,15 +8,13 @@ var baseHas = require('./_baseHas'), * * @private * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to unset. + * @param {Array|string} path The property path to unset. * @returns {boolean} Returns `true` if the property is deleted, else `false`. */ function baseUnset(object, path) { - path = isKey(path, object) ? [path] : castPath(path); + path = castPath(path, object); object = parent(object, path); - - var key = toKey(last(path)); - return !(object != null && baseHas(object, key)) || delete object[key]; + return object == null || delete object[toKey(last(path))]; } module.exports = baseUnset; diff --git a/node_modules/lodash/_baseUpdate.js b/node_modules/lodash/_baseUpdate.js index ec1b338..92a6237 100644 --- a/node_modules/lodash/_baseUpdate.js +++ b/node_modules/lodash/_baseUpdate.js @@ -5,7 +5,7 @@ var baseGet = require('./_baseGet'), * The base implementation of `_.update`. * * @private - * @param {Object} object The object to query. + * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to update. * @param {Function} updater The function to produce the updated value. * @param {Function} [customizer] The function to customize path creation. diff --git a/node_modules/lodash/_baseXor.js b/node_modules/lodash/_baseXor.js index 7e62d1b..8e69338 100644 --- a/node_modules/lodash/_baseXor.js +++ b/node_modules/lodash/_baseXor.js @@ -1,5 +1,5 @@ -var arrayPush = require('./_arrayPush'), - baseDifference = require('./_baseDifference'), +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), baseUniq = require('./_baseUniq'); /** @@ -13,18 +13,24 @@ var arrayPush = require('./_arrayPush'), * @returns {Array} Returns the new array of values. */ function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } var index = -1, - length = arrays.length; + result = Array(length); while (++index < length) { - var result = result - ? arrayPush( - baseDifference(result, arrays[index], iteratee, comparator), - baseDifference(arrays[index], result, iteratee, comparator) - ) - : arrays[index]; + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } } - return (result && result.length) ? baseUniq(result, iteratee, comparator) : []; + return baseUniq(baseFlatten(result, 1), iteratee, comparator); } module.exports = baseXor; diff --git a/node_modules/lodash/_cacheHas.js b/node_modules/lodash/_cacheHas.js index 7f2ac48..2dec892 100644 --- a/node_modules/lodash/_cacheHas.js +++ b/node_modules/lodash/_cacheHas.js @@ -1,25 +1,13 @@ -var isKeyable = require('./_isKeyable'); - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - /** - * Checks if `value` is in `cache`. + * Checks if a `cache` value for `key` exists. * * @private - * @param {Object} cache The set cache to search. - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function cacheHas(cache, value) { - var map = cache.__data__; - if (isKeyable(value)) { - var data = map.__data__, - hash = typeof value == 'string' ? data.string : data.hash; - - return hash[value] === HASH_UNDEFINED; - } - return map.has(value); +function cacheHas(cache, key) { + return cache.has(key); } module.exports = cacheHas; diff --git a/node_modules/lodash/_cachePush.js b/node_modules/lodash/_cachePush.js deleted file mode 100644 index 638383b..0000000 --- a/node_modules/lodash/_cachePush.js +++ /dev/null @@ -1,27 +0,0 @@ -var isKeyable = require('./_isKeyable'); - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Adds `value` to the set cache. - * - * @private - * @name push - * @memberOf SetCache - * @param {*} value The value to cache. - */ -function cachePush(value) { - var map = this.__data__; - if (isKeyable(value)) { - var data = map.__data__, - hash = typeof value == 'string' ? data.string : data.hash; - - hash[value] = HASH_UNDEFINED; - } - else { - map.set(value, HASH_UNDEFINED); - } -} - -module.exports = cachePush; diff --git a/node_modules/lodash/_castPath.js b/node_modules/lodash/_castPath.js index 4f38f95..017e4c1 100644 --- a/node_modules/lodash/_castPath.js +++ b/node_modules/lodash/_castPath.js @@ -1,15 +1,21 @@ var isArray = require('./isArray'), - stringToPath = require('./_stringToPath'); + isKey = require('./_isKey'), + stringToPath = require('./_stringToPath'), + toString = require('./toString'); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ -function castPath(value) { - return isArray(value) ? value : stringToPath(value); +function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; diff --git a/node_modules/lodash/_castRest.js b/node_modules/lodash/_castRest.js new file mode 100644 index 0000000..213c66f --- /dev/null +++ b/node_modules/lodash/_castRest.js @@ -0,0 +1,14 @@ +var baseRest = require('./_baseRest'); + +/** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +var castRest = baseRest; + +module.exports = castRest; diff --git a/node_modules/lodash/_checkGlobal.js b/node_modules/lodash/_checkGlobal.js deleted file mode 100644 index b0ea47e..0000000 --- a/node_modules/lodash/_checkGlobal.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Checks if `value` is a global object. - * - * @private - * @param {*} value The value to check. - * @returns {null|Object} Returns `value` if it's a global object, else `null`. - */ -function checkGlobal(value) { - return (value && value.Object === Object) ? value : null; -} - -module.exports = checkGlobal; diff --git a/node_modules/lodash/_cloneBuffer.js b/node_modules/lodash/_cloneBuffer.js index 247d410..27c4810 100644 --- a/node_modules/lodash/_cloneBuffer.js +++ b/node_modules/lodash/_cloneBuffer.js @@ -1,3 +1,18 @@ +var root = require('./_root'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + /** * Creates a clone of `buffer`. * @@ -10,7 +25,9 @@ function cloneBuffer(buffer, isDeep) { if (isDeep) { return buffer.slice(); } - var result = new buffer.constructor(buffer.length); + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + buffer.copy(result); return result; } diff --git a/node_modules/lodash/_cloneMap.js b/node_modules/lodash/_cloneMap.js index b51983d..334b73e 100644 --- a/node_modules/lodash/_cloneMap.js +++ b/node_modules/lodash/_cloneMap.js @@ -2,6 +2,9 @@ var addMapEntry = require('./_addMapEntry'), arrayReduce = require('./_arrayReduce'), mapToArray = require('./_mapToArray'); +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + /** * Creates a clone of `map`. * @@ -12,7 +15,7 @@ var addMapEntry = require('./_addMapEntry'), * @returns {Object} Returns the cloned map. */ function cloneMap(map, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); + var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map); return arrayReduce(array, addMapEntry, new map.constructor); } diff --git a/node_modules/lodash/_cloneSet.js b/node_modules/lodash/_cloneSet.js index dc1db95..713a2f7 100644 --- a/node_modules/lodash/_cloneSet.js +++ b/node_modules/lodash/_cloneSet.js @@ -2,6 +2,9 @@ var addSetEntry = require('./_addSetEntry'), arrayReduce = require('./_arrayReduce'), setToArray = require('./_setToArray'); +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + /** * Creates a clone of `set`. * @@ -12,7 +15,7 @@ var addSetEntry = require('./_addSetEntry'), * @returns {Object} Returns the cloned set. */ function cloneSet(set, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); + var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set); return arrayReduce(array, addSetEntry, new set.constructor); } diff --git a/node_modules/lodash/_composeArgs.js b/node_modules/lodash/_composeArgs.js index 07398e7..1ce40f4 100644 --- a/node_modules/lodash/_composeArgs.js +++ b/node_modules/lodash/_composeArgs.js @@ -6,7 +6,7 @@ var nativeMax = Math.max; * placeholders, and provided arguments into a single array of arguments. * * @private - * @param {Array|Object} args The provided arguments. + * @param {Array} args The provided arguments. * @param {Array} partials The arguments to prepend to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. diff --git a/node_modules/lodash/_composeArgsRight.js b/node_modules/lodash/_composeArgsRight.js index 18cfae0..8dc588d 100644 --- a/node_modules/lodash/_composeArgsRight.js +++ b/node_modules/lodash/_composeArgsRight.js @@ -6,7 +6,7 @@ var nativeMax = Math.max; * is tailored for `_.partialRight`. * * @private - * @param {Array|Object} args The provided arguments. + * @param {Array} args The provided arguments. * @param {Array} partials The arguments to append to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. diff --git a/node_modules/lodash/_copyObject.js b/node_modules/lodash/_copyObject.js index 474d17b..2f2a5c2 100644 --- a/node_modules/lodash/_copyObject.js +++ b/node_modules/lodash/_copyObject.js @@ -1,4 +1,5 @@ -var assignValue = require('./_assignValue'); +var assignValue = require('./_assignValue'), + baseAssignValue = require('./_baseAssignValue'); /** * Copies properties of `source` to `object`. @@ -11,6 +12,7 @@ var assignValue = require('./_assignValue'); * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { + var isNew = !object; object || (object = {}); var index = -1, @@ -21,9 +23,16 @@ function copyObject(source, props, object, customizer) { var newValue = customizer ? customizer(object[key], source[key], key, object, source) - : source[key]; + : undefined; - assignValue(object, key, newValue); + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } } return object; } diff --git a/node_modules/lodash/_copySymbols.js b/node_modules/lodash/_copySymbols.js index 1fac3c8..c35944a 100644 --- a/node_modules/lodash/_copySymbols.js +++ b/node_modules/lodash/_copySymbols.js @@ -2,7 +2,7 @@ var copyObject = require('./_copyObject'), getSymbols = require('./_getSymbols'); /** - * Copies own symbol properties of `source` to `object`. + * Copies own symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. diff --git a/node_modules/lodash/_copySymbolsIn.js b/node_modules/lodash/_copySymbolsIn.js new file mode 100644 index 0000000..fdf20a7 --- /dev/null +++ b/node_modules/lodash/_copySymbolsIn.js @@ -0,0 +1,16 @@ +var copyObject = require('./_copyObject'), + getSymbolsIn = require('./_getSymbolsIn'); + +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); +} + +module.exports = copySymbolsIn; diff --git a/node_modules/lodash/_coreJsData.js b/node_modules/lodash/_coreJsData.js new file mode 100644 index 0000000..f8e5b4e --- /dev/null +++ b/node_modules/lodash/_coreJsData.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +module.exports = coreJsData; diff --git a/node_modules/lodash/_countHolders.js b/node_modules/lodash/_countHolders.js index 8cc95e6..718fcda 100644 --- a/node_modules/lodash/_countHolders.js +++ b/node_modules/lodash/_countHolders.js @@ -12,7 +12,7 @@ function countHolders(array, placeholder) { while (length--) { if (array[length] === placeholder) { - result++; + ++result; } } return result; diff --git a/node_modules/lodash/_createAggregator.js b/node_modules/lodash/_createAggregator.js index 7f7afd2..0be42c4 100644 --- a/node_modules/lodash/_createAggregator.js +++ b/node_modules/lodash/_createAggregator.js @@ -16,7 +16,7 @@ function createAggregator(setter, initializer) { var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {}; - return func(collection, setter, baseIteratee(iteratee), accumulator); + return func(collection, setter, baseIteratee(iteratee, 2), accumulator); }; } diff --git a/node_modules/lodash/_createAssigner.js b/node_modules/lodash/_createAssigner.js index 1e81db9..1f904c5 100644 --- a/node_modules/lodash/_createAssigner.js +++ b/node_modules/lodash/_createAssigner.js @@ -1,5 +1,5 @@ -var isIterateeCall = require('./_isIterateeCall'), - rest = require('./rest'); +var baseRest = require('./_baseRest'), + isIterateeCall = require('./_isIterateeCall'); /** * Creates a function like `_.assign`. @@ -9,13 +9,13 @@ var isIterateeCall = require('./_isIterateeCall'), * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { - return rest(function(object, sources) { + return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; - customizer = typeof customizer == 'function' + customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; diff --git a/node_modules/lodash/package/_createBaseWrapper.js b/node_modules/lodash/_createBind.js similarity index 56% rename from node_modules/lodash/package/_createBaseWrapper.js rename to node_modules/lodash/_createBind.js index c365621..07cb99f 100644 --- a/node_modules/lodash/package/_createBaseWrapper.js +++ b/node_modules/lodash/_createBind.js @@ -1,8 +1,8 @@ -var createCtorWrapper = require('./_createCtorWrapper'), +var createCtor = require('./_createCtor'), root = require('./_root'); -/** Used to compose bitmasks for wrapper metadata. */ -var BIND_FLAG = 1; +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1; /** * Creates a function that wraps `func` to invoke it with the optional `this` @@ -10,14 +10,13 @@ var BIND_FLAG = 1; * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @returns {Function} Returns the new wrapped function. */ -function createBaseWrapper(func, bitmask, thisArg) { - var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); +function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); function wrapper() { var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; @@ -26,4 +25,4 @@ function createBaseWrapper(func, bitmask, thisArg) { return wrapper; } -module.exports = createBaseWrapper; +module.exports = createBind; diff --git a/node_modules/lodash/_createCaseFirst.js b/node_modules/lodash/_createCaseFirst.js index 9296b1d..fe8ea48 100644 --- a/node_modules/lodash/_createCaseFirst.js +++ b/node_modules/lodash/_createCaseFirst.js @@ -1,5 +1,5 @@ var castSlice = require('./_castSlice'), - reHasComplexSymbol = require('./_reHasComplexSymbol'), + hasUnicode = require('./_hasUnicode'), stringToArray = require('./_stringToArray'), toString = require('./toString'); @@ -8,13 +8,13 @@ var castSlice = require('./_castSlice'), * * @private * @param {string} methodName The name of the `String` case method to use. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new case function. */ function createCaseFirst(methodName) { return function(string) { string = toString(string); - var strSymbols = reHasComplexSymbol.test(string) + var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined; diff --git a/node_modules/lodash/_createCtorWrapper.js b/node_modules/lodash/_createCtor.js similarity index 90% rename from node_modules/lodash/_createCtorWrapper.js rename to node_modules/lodash/_createCtor.js index 17e1bd8..9047aa5 100644 --- a/node_modules/lodash/_createCtorWrapper.js +++ b/node_modules/lodash/_createCtor.js @@ -9,10 +9,10 @@ var baseCreate = require('./_baseCreate'), * @param {Function} Ctor The constructor to wrap. * @returns {Function} Returns the new wrapped function. */ -function createCtorWrapper(Ctor) { +function createCtor(Ctor) { return function() { // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { @@ -34,4 +34,4 @@ function createCtorWrapper(Ctor) { }; } -module.exports = createCtorWrapper; +module.exports = createCtor; diff --git a/node_modules/lodash/package/_createCurryWrapper.js b/node_modules/lodash/_createCurry.js similarity index 60% rename from node_modules/lodash/package/_createCurryWrapper.js rename to node_modules/lodash/_createCurry.js index c48ba62..f06c2cd 100644 --- a/node_modules/lodash/package/_createCurryWrapper.js +++ b/node_modules/lodash/_createCurry.js @@ -1,8 +1,8 @@ var apply = require('./_apply'), - createCtorWrapper = require('./_createCtorWrapper'), - createHybridWrapper = require('./_createHybridWrapper'), - createRecurryWrapper = require('./_createRecurryWrapper'), - getPlaceholder = require('./_getPlaceholder'), + createCtor = require('./_createCtor'), + createHybrid = require('./_createHybrid'), + createRecurry = require('./_createRecurry'), + getHolder = require('./_getHolder'), replaceHolders = require('./_replaceHolders'), root = require('./_root'); @@ -11,19 +11,18 @@ var apply = require('./_apply'), * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {number} arity The arity of `func`. * @returns {Function} Returns the new wrapped function. */ -function createCurryWrapper(func, bitmask, arity) { - var Ctor = createCtorWrapper(func); +function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); function wrapper() { var length = arguments.length, args = Array(length), index = length, - placeholder = getPlaceholder(wrapper); + placeholder = getHolder(wrapper); while (index--) { args[index] = arguments[index]; @@ -34,8 +33,8 @@ function createCurryWrapper(func, bitmask, arity) { length -= holders.length; if (length < arity) { - return createRecurryWrapper( - func, bitmask, createHybridWrapper, wrapper.placeholder, undefined, + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length); } var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; @@ -44,4 +43,4 @@ function createCurryWrapper(func, bitmask, arity) { return wrapper; } -module.exports = createCurryWrapper; +module.exports = createCurry; diff --git a/node_modules/lodash/_createFind.js b/node_modules/lodash/_createFind.js new file mode 100644 index 0000000..8859ff8 --- /dev/null +++ b/node_modules/lodash/_createFind.js @@ -0,0 +1,25 @@ +var baseIteratee = require('./_baseIteratee'), + isArrayLike = require('./isArrayLike'), + keys = require('./keys'); + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; +} + +module.exports = createFind; diff --git a/node_modules/lodash/_createFlow.js b/node_modules/lodash/_createFlow.js index 6b5ee54..c6b43f7 100644 --- a/node_modules/lodash/_createFlow.js +++ b/node_modules/lodash/_createFlow.js @@ -1,22 +1,21 @@ var LodashWrapper = require('./_LodashWrapper'), - baseFlatten = require('./_baseFlatten'), + flatRest = require('./_flatRest'), getData = require('./_getData'), getFuncName = require('./_getFuncName'), isArray = require('./isArray'), - isLaziable = require('./_isLaziable'), - rest = require('./rest'); + isLaziable = require('./_isLaziable'); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; -/** Used to compose bitmasks for wrapper metadata. */ -var CURRY_FLAG = 8, - PARTIAL_FLAG = 32, - ARY_FLAG = 128, - REARG_FLAG = 256; +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_FLAG = 8, + WRAP_PARTIAL_FLAG = 32, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256; /** * Creates a `_.flow` or `_.flowRight` function. @@ -26,9 +25,7 @@ var CURRY_FLAG = 8, * @returns {Function} Returns the new flow function. */ function createFlow(fromRight) { - return rest(function(funcs) { - funcs = baseFlatten(funcs, 1); - + return flatRest(function(funcs) { var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru; @@ -53,7 +50,7 @@ function createFlow(fromRight) { data = funcName == 'wrapper' ? getData(func) : undefined; if (data && isLaziable(data[0]) && - data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1 ) { wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); diff --git a/node_modules/lodash/_createHybridWrapper.js b/node_modules/lodash/_createHybrid.js similarity index 65% rename from node_modules/lodash/_createHybridWrapper.js rename to node_modules/lodash/_createHybrid.js index 144a90d..b671bd1 100644 --- a/node_modules/lodash/_createHybridWrapper.js +++ b/node_modules/lodash/_createHybrid.js @@ -1,20 +1,20 @@ var composeArgs = require('./_composeArgs'), composeArgsRight = require('./_composeArgsRight'), countHolders = require('./_countHolders'), - createCtorWrapper = require('./_createCtorWrapper'), - createRecurryWrapper = require('./_createRecurryWrapper'), - getPlaceholder = require('./_getPlaceholder'), + createCtor = require('./_createCtor'), + createRecurry = require('./_createRecurry'), + getHolder = require('./_getHolder'), reorder = require('./_reorder'), replaceHolders = require('./_replaceHolders'), root = require('./_root'); -/** Used to compose bitmasks for wrapper metadata. */ -var BIND_FLAG = 1, - BIND_KEY_FLAG = 2, - CURRY_FLAG = 8, - CURRY_RIGHT_FLAG = 16, - ARY_FLAG = 128, - FLIP_FLAG = 512; +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_ARY_FLAG = 128, + WRAP_FLIP_FLAG = 512; /** * Creates a function that wraps `func` to invoke it with optional `this` @@ -22,8 +22,7 @@ var BIND_FLAG = 1, * * @private * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to * the new function. @@ -36,24 +35,24 @@ var BIND_FLAG = 1, * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ -function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { - var isAry = bitmask & ARY_FLAG, - isBind = bitmask & BIND_FLAG, - isBindKey = bitmask & BIND_KEY_FLAG, - isCurried = bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG), - isFlip = bitmask & FLIP_FLAG, - Ctor = isBindKey ? undefined : createCtorWrapper(func); +function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); function wrapper() { var length = arguments.length, - index = length, - args = Array(length); + args = Array(length), + index = length; while (index--) { args[index] = arguments[index]; } if (isCurried) { - var placeholder = getPlaceholder(wrapper), + var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder); } if (partials) { @@ -65,8 +64,8 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials length -= holdersCount; if (isCurried && length < arity) { var newHolders = replaceHolders(args, placeholder); - return createRecurryWrapper( - func, bitmask, createHybridWrapper, wrapper.placeholder, thisArg, + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, args, newHolders, argPos, ary, arity - length ); } @@ -83,11 +82,11 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials args.length = ary; } if (this && this !== root && this instanceof wrapper) { - fn = Ctor || createCtorWrapper(fn); + fn = Ctor || createCtor(fn); } return fn.apply(thisBinding, args); } return wrapper; } -module.exports = createHybridWrapper; +module.exports = createHybrid; diff --git a/node_modules/lodash/_createMathOperation.js b/node_modules/lodash/_createMathOperation.js index e750e98..f1e238a 100644 --- a/node_modules/lodash/_createMathOperation.js +++ b/node_modules/lodash/_createMathOperation.js @@ -6,13 +6,14 @@ var baseToNumber = require('./_baseToNumber'), * * @private * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. * @returns {Function} Returns the new mathematical operation function. */ -function createMathOperation(operator) { +function createMathOperation(operator, defaultValue) { return function(value, other) { var result; if (value === undefined && other === undefined) { - return 0; + return defaultValue; } if (value !== undefined) { result = value; diff --git a/node_modules/lodash/_createOver.js b/node_modules/lodash/_createOver.js index 0d42c27..3b94551 100644 --- a/node_modules/lodash/_createOver.js +++ b/node_modules/lodash/_createOver.js @@ -1,26 +1,21 @@ var apply = require('./_apply'), arrayMap = require('./_arrayMap'), - baseFlatten = require('./_baseFlatten'), baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), baseUnary = require('./_baseUnary'), - isArray = require('./isArray'), - isFlattenableIteratee = require('./_isFlattenableIteratee'), - rest = require('./rest'); + flatRest = require('./_flatRest'); /** * Creates a function like `_.over`. * * @private * @param {Function} arrayFunc The function to iterate over iteratees. - * @returns {Function} Returns the new invoker function. + * @returns {Function} Returns the new over function. */ function createOver(arrayFunc) { - return rest(function(iteratees) { - iteratees = (iteratees.length == 1 && isArray(iteratees[0])) - ? arrayMap(iteratees[0], baseUnary(baseIteratee)) - : arrayMap(baseFlatten(iteratees, 1, isFlattenableIteratee), baseUnary(baseIteratee)); - - return rest(function(args) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); + return baseRest(function(args) { var thisArg = this; return arrayFunc(iteratees, function(iteratee) { return apply(iteratee, thisArg, args); diff --git a/node_modules/lodash/_createPadding.js b/node_modules/lodash/_createPadding.js index cfc6225..2124612 100644 --- a/node_modules/lodash/_createPadding.js +++ b/node_modules/lodash/_createPadding.js @@ -1,7 +1,7 @@ var baseRepeat = require('./_baseRepeat'), baseToString = require('./_baseToString'), castSlice = require('./_castSlice'), - reHasComplexSymbol = require('./_reHasComplexSymbol'), + hasUnicode = require('./_hasUnicode'), stringSize = require('./_stringSize'), stringToArray = require('./_stringToArray'); @@ -25,7 +25,7 @@ function createPadding(length, chars) { return charsLength ? baseRepeat(chars, length) : chars; } var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); - return reHasComplexSymbol.test(chars) + return hasUnicode(chars) ? castSlice(stringToArray(result), 0, length).join('') : result.slice(0, length); } diff --git a/node_modules/lodash/_createPartialWrapper.js b/node_modules/lodash/_createPartial.js similarity index 71% rename from node_modules/lodash/_createPartialWrapper.js rename to node_modules/lodash/_createPartial.js index cc4314e..e16c248 100644 --- a/node_modules/lodash/_createPartialWrapper.js +++ b/node_modules/lodash/_createPartial.js @@ -1,9 +1,9 @@ var apply = require('./_apply'), - createCtorWrapper = require('./_createCtorWrapper'), + createCtor = require('./_createCtor'), root = require('./_root'); -/** Used to compose bitmasks for wrapper metadata. */ -var BIND_FLAG = 1; +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1; /** * Creates a function that wraps `func` to invoke it with the `this` binding @@ -11,16 +11,15 @@ var BIND_FLAG = 1; * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} thisArg The `this` binding of `func`. * @param {Array} partials The arguments to prepend to those provided to * the new function. * @returns {Function} Returns the new wrapped function. */ -function createPartialWrapper(func, bitmask, thisArg, partials) { - var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); +function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); function wrapper() { var argsIndex = -1, @@ -41,4 +40,4 @@ function createPartialWrapper(func, bitmask, thisArg, partials) { return wrapper; } -module.exports = createPartialWrapper; +module.exports = createPartial; diff --git a/node_modules/lodash/_createRange.js b/node_modules/lodash/_createRange.js index 9728563..9f52c77 100644 --- a/node_modules/lodash/_createRange.js +++ b/node_modules/lodash/_createRange.js @@ -1,6 +1,6 @@ var baseRange = require('./_baseRange'), isIterateeCall = require('./_isIterateeCall'), - toNumber = require('./toNumber'); + toFinite = require('./toFinite'); /** * Creates a `_.range` or `_.rangeRight` function. @@ -15,15 +15,14 @@ function createRange(fromRight) { end = step = undefined; } // Ensure the sign of `-0` is preserved. - start = toNumber(start); - start = start === start ? start : 0; + start = toFinite(start); if (end === undefined) { end = start; start = 0; } else { - end = toNumber(end) || 0; + end = toFinite(end); } - step = step === undefined ? (start < end ? 1 : -1) : (toNumber(step) || 0); + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); return baseRange(start, end, step, fromRight); }; } diff --git a/node_modules/lodash/package/_createRecurryWrapper.js b/node_modules/lodash/_createRecurry.js similarity index 58% rename from node_modules/lodash/package/_createRecurryWrapper.js rename to node_modules/lodash/_createRecurry.js index 63c096a..eb29fb2 100644 --- a/node_modules/lodash/package/_createRecurryWrapper.js +++ b/node_modules/lodash/_createRecurry.js @@ -1,21 +1,21 @@ var isLaziable = require('./_isLaziable'), - setData = require('./_setData'); + setData = require('./_setData'), + setWrapToString = require('./_setWrapToString'); -/** Used to compose bitmasks for wrapper metadata. */ -var BIND_FLAG = 1, - BIND_KEY_FLAG = 2, - CURRY_BOUND_FLAG = 4, - CURRY_FLAG = 8, - PARTIAL_FLAG = 32, - PARTIAL_RIGHT_FLAG = 64; +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64; /** * Creates a function that wraps `func` to continue currying. * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {Function} wrapFunc The function to create the `func` wrapper. * @param {*} placeholder The placeholder value. * @param {*} [thisArg] The `this` binding of `func`. @@ -27,18 +27,18 @@ var BIND_FLAG = 1, * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ -function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { - var isCurry = bitmask & CURRY_FLAG, +function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined, newHoldersRight = isCurry ? undefined : holders, newPartials = isCurry ? partials : undefined, newPartialsRight = isCurry ? undefined : partials; - bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG); - bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG); + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); - if (!(bitmask & CURRY_BOUND_FLAG)) { - bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG); + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); } var newData = [ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, @@ -50,7 +50,7 @@ function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, par setData(result, newData); } result.placeholder = placeholder; - return result; + return setWrapToString(result, func, bitmask); } -module.exports = createRecurryWrapper; +module.exports = createRecurry; diff --git a/node_modules/lodash/_createRound.js b/node_modules/lodash/_createRound.js index cb42ba2..74b20d4 100644 --- a/node_modules/lodash/_createRound.js +++ b/node_modules/lodash/_createRound.js @@ -2,6 +2,9 @@ var toInteger = require('./toInteger'), toNumber = require('./toNumber'), toString = require('./toString'); +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + /** * Creates a function like `_.round`. * @@ -13,7 +16,7 @@ function createRound(methodName) { var func = Math[methodName]; return function(number, precision) { number = toNumber(number); - precision = toInteger(precision); + precision = nativeMin(toInteger(precision), 292); if (precision) { // Shift with exponential notation to avoid floating-point issues. // See [MDN](https://mdn.io/round#Examples) for more details. diff --git a/node_modules/lodash/_createSet.js b/node_modules/lodash/_createSet.js index ae24d05..0f644ee 100644 --- a/node_modules/lodash/_createSet.js +++ b/node_modules/lodash/_createSet.js @@ -6,7 +6,7 @@ var Set = require('./_Set'), var INFINITY = 1 / 0; /** - * Creates a set of `values`. + * Creates a set object of `values`. * * @private * @param {Array} values The values to add to the set. diff --git a/node_modules/lodash/_createToPairs.js b/node_modules/lodash/_createToPairs.js new file mode 100644 index 0000000..568417a --- /dev/null +++ b/node_modules/lodash/_createToPairs.js @@ -0,0 +1,30 @@ +var baseToPairs = require('./_baseToPairs'), + getTag = require('./_getTag'), + mapToArray = require('./_mapToArray'), + setToPairs = require('./_setToPairs'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ +function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; +} + +module.exports = createToPairs; diff --git a/node_modules/lodash/package/_createWrapper.js b/node_modules/lodash/_createWrap.js similarity index 53% rename from node_modules/lodash/package/_createWrapper.js rename to node_modules/lodash/_createWrap.js index 7b573b2..f14b968 100644 --- a/node_modules/lodash/package/_createWrapper.js +++ b/node_modules/lodash/_createWrap.js @@ -1,23 +1,24 @@ var baseSetData = require('./_baseSetData'), - createBaseWrapper = require('./_createBaseWrapper'), - createCurryWrapper = require('./_createCurryWrapper'), - createHybridWrapper = require('./_createHybridWrapper'), - createPartialWrapper = require('./_createPartialWrapper'), + createBind = require('./_createBind'), + createCurry = require('./_createCurry'), + createHybrid = require('./_createHybrid'), + createPartial = require('./_createPartial'), getData = require('./_getData'), mergeData = require('./_mergeData'), setData = require('./_setData'), + setWrapToString = require('./_setWrapToString'), toInteger = require('./toInteger'); -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; -/** Used to compose bitmasks for wrapper metadata. */ -var BIND_FLAG = 1, - BIND_KEY_FLAG = 2, - CURRY_FLAG = 8, - CURRY_RIGHT_FLAG = 16, - PARTIAL_FLAG = 32, - PARTIAL_RIGHT_FLAG = 64; +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; @@ -28,17 +29,17 @@ var nativeMax = Math.max; * * @private * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask of wrapper flags. - * The bitmask may be composed of the following flags: - * 1 - `_.bind` - * 2 - `_.bindKey` - * 4 - `_.curry` or `_.curryRight` of a bound function - * 8 - `_.curry` - * 16 - `_.curryRight` - * 32 - `_.partial` - * 64 - `_.partialRight` - * 128 - `_.rearg` - * 256 - `_.ary` + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to be partially applied. * @param {Array} [holders] The `partials` placeholder indexes. @@ -47,21 +48,21 @@ var nativeMax = Math.max; * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ -function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { - var isBindKey = bitmask & BIND_KEY_FLAG; +function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; if (!isBindKey && typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } var length = partials ? partials.length : 0; if (!length) { - bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG); + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); partials = holders = undefined; } ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); arity = arity === undefined ? arity : toInteger(arity); length -= holders ? holders.length : 0; - if (bitmask & PARTIAL_RIGHT_FLAG) { + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { var partialsRight = partials, holdersRight = holders; @@ -86,20 +87,20 @@ function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, a ? (isBindKey ? 0 : func.length) : nativeMax(newData[9] - length, 0); - if (!arity && bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG)) { - bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG); + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); } - if (!bitmask || bitmask == BIND_FLAG) { - var result = createBaseWrapper(func, bitmask, thisArg); - } else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) { - result = createCurryWrapper(func, bitmask, arity); - } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) { - result = createPartialWrapper(func, bitmask, thisArg, partials); + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); } else { - result = createHybridWrapper.apply(undefined, newData); + result = createHybrid.apply(undefined, newData); } var setter = data ? baseSetData : setData; - return setter(result, newData); + return setWrapToString(setter(result, newData), func, bitmask); } -module.exports = createWrapper; +module.exports = createWrap; diff --git a/node_modules/lodash/_deburrLetter.js b/node_modules/lodash/_deburrLetter.js index e559dbe..3e531ed 100644 --- a/node_modules/lodash/_deburrLetter.js +++ b/node_modules/lodash/_deburrLetter.js @@ -1,13 +1,16 @@ -/** Used to map latin-1 supplementary letters to basic latin letters. */ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map Latin Unicode letters to basic Latin letters. */ var deburredLetters = { + // Latin-1 Supplement block. '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', '\xc7': 'C', '\xe7': 'c', '\xd0': 'D', '\xf0': 'd', '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', - '\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', - '\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', '\xd1': 'N', '\xf1': 'n', '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', @@ -16,18 +19,53 @@ var deburredLetters = { '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', '\xc6': 'Ae', '\xe6': 'ae', '\xde': 'Th', '\xfe': 'th', - '\xdf': 'ss' + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' }; /** - * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters. + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. * * @private * @param {string} letter The matched letter to deburr. * @returns {string} Returns the deburred letter. */ -function deburrLetter(letter) { - return deburredLetters[letter]; -} +var deburrLetter = basePropertyOf(deburredLetters); module.exports = deburrLetter; diff --git a/node_modules/lodash/_defineProperty.js b/node_modules/lodash/_defineProperty.js new file mode 100644 index 0000000..b6116d9 --- /dev/null +++ b/node_modules/lodash/_defineProperty.js @@ -0,0 +1,11 @@ +var getNative = require('./_getNative'); + +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); + +module.exports = defineProperty; diff --git a/node_modules/lodash/_equalArrays.js b/node_modules/lodash/_equalArrays.js index 323c67c..f6a3b7c 100644 --- a/node_modules/lodash/_equalArrays.js +++ b/node_modules/lodash/_equalArrays.js @@ -1,8 +1,10 @@ -var arraySome = require('./_arraySome'); +var SetCache = require('./_SetCache'), + arraySome = require('./_arraySome'), + cacheHas = require('./_cacheHas'); -/** Used to compose bitmasks for comparison styles. */ -var UNORDERED_COMPARE_FLAG = 1, - PARTIAL_COMPARE_FLAG = 2; +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; /** * A specialized version of `baseIsEqualDeep` for arrays with support for @@ -11,17 +13,14 @@ var UNORDERED_COMPARE_FLAG = 1, * @private * @param {Array} array The array to compare. * @param {Array} other The other array to compare. - * @param {Function} equalFunc The function to determine equivalents of values. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` - * for more details. + * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ -function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { - var index = -1, - isPartial = bitmask & PARTIAL_COMPARE_FLAG, - isUnordered = bitmask & UNORDERED_COMPARE_FLAG, +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; @@ -30,11 +29,15 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { } // Assume cyclic values are equal. var stacked = stack.get(array); - if (stacked) { + if (stacked && stack.get(other)) { return stacked == other; } - var result = true; + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + stack.set(array, other); + stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { @@ -54,23 +57,26 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { break; } // Recursively compare arrays (susceptible to call stack limits). - if (isUnordered) { - if (!arraySome(other, function(othValue) { - return arrValue === othValue || - equalFunc(arrValue, othValue, customizer, bitmask, stack); + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } })) { result = false; break; } } else if (!( arrValue === othValue || - equalFunc(arrValue, othValue, customizer, bitmask, stack) + equalFunc(arrValue, othValue, bitmask, customizer, stack) )) { result = false; break; } } stack['delete'](array); + stack['delete'](other); return result; } diff --git a/node_modules/lodash/_equalByTag.js b/node_modules/lodash/_equalByTag.js index b3e37bd..71919e8 100644 --- a/node_modules/lodash/_equalByTag.js +++ b/node_modules/lodash/_equalByTag.js @@ -1,12 +1,13 @@ var Symbol = require('./_Symbol'), Uint8Array = require('./_Uint8Array'), + eq = require('./eq'), equalArrays = require('./_equalArrays'), mapToArray = require('./_mapToArray'), setToArray = require('./_setToArray'); -/** Used to compose bitmasks for comparison styles. */ -var UNORDERED_COMPARE_FLAG = 1, - PARTIAL_COMPARE_FLAG = 2; +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; /** `Object#toString` result references. */ var boolTag = '[object Boolean]', @@ -37,14 +38,13 @@ var symbolProto = Symbol ? Symbol.prototype : undefined, * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. - * @param {Function} equalFunc The function to determine equivalents of values. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` - * for more details. + * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ -function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: if ((object.byteLength != other.byteLength) || @@ -63,22 +63,18 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { case boolTag: case dateTag: - // Coerce dates and booleans to numbers, dates to milliseconds and - // booleans to `1` or `0` treating invalid dates coerced to `NaN` as - // not equal. - return +object == +other; + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; - case numberTag: - // Treat `NaN` vs. `NaN` as equal. - return (object != +object) ? other != +other : object == +other; - case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); @@ -86,7 +82,7 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { var convert = mapToArray; case setTag: - var isPartial = bitmask & PARTIAL_COMPARE_FLAG; + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; convert || (convert = setToArray); if (object.size != other.size && !isPartial) { @@ -97,11 +93,13 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { if (stacked) { return stacked == other; } - bitmask |= UNORDERED_COMPARE_FLAG; - stack.set(object, other); + bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). - return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; case symbolTag: if (symbolValueOf) { diff --git a/node_modules/lodash/_equalObjects.js b/node_modules/lodash/_equalObjects.js index 9a5d17f..7044ae9 100644 --- a/node_modules/lodash/_equalObjects.js +++ b/node_modules/lodash/_equalObjects.js @@ -1,8 +1,13 @@ -var baseHas = require('./_baseHas'), - keys = require('./keys'); +var keys = require('./keys'); -/** Used to compose bitmasks for comparison styles. */ -var PARTIAL_COMPARE_FLAG = 2; +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqualDeep` for objects with support for @@ -11,15 +16,14 @@ var PARTIAL_COMPARE_FLAG = 2; * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. - * @param {Function} equalFunc The function to determine equivalents of values. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` - * for more details. + * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ -function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { - var isPartial = bitmask & PARTIAL_COMPARE_FLAG, +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = keys(object), objLength = objProps.length, othProps = keys(other), @@ -31,17 +35,18 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { var index = objLength; while (index--) { var key = objProps[index]; - if (!(isPartial ? key in other : baseHas(other, key))) { + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } // Assume cyclic values are equal. var stacked = stack.get(object); - if (stacked) { + if (stacked && stack.get(other)) { return stacked == other; } var result = true; stack.set(object, other); + stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { @@ -56,7 +61,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { } // Recursively compare objects (susceptible to call stack limits). if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack)) + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) : compared )) { result = false; @@ -77,6 +82,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { } } stack['delete'](object); + stack['delete'](other); return result; } diff --git a/node_modules/lodash/_escapeHtmlChar.js b/node_modules/lodash/_escapeHtmlChar.js index b21e452..7ca68ee 100644 --- a/node_modules/lodash/_escapeHtmlChar.js +++ b/node_modules/lodash/_escapeHtmlChar.js @@ -1,11 +1,12 @@ +var basePropertyOf = require('./_basePropertyOf'); + /** Used to map characters to HTML entities. */ var htmlEscapes = { '&': '&', '<': '<', '>': '>', '"': '"', - "'": ''', - '`': '`' + "'": ''' }; /** @@ -15,8 +16,6 @@ var htmlEscapes = { * @param {string} chr The matched character to escape. * @returns {string} Returns the escaped character. */ -function escapeHtmlChar(chr) { - return htmlEscapes[chr]; -} +var escapeHtmlChar = basePropertyOf(htmlEscapes); module.exports = escapeHtmlChar; diff --git a/node_modules/lodash/_flatRest.js b/node_modules/lodash/_flatRest.js new file mode 100644 index 0000000..94ab6cc --- /dev/null +++ b/node_modules/lodash/_flatRest.js @@ -0,0 +1,16 @@ +var flatten = require('./flatten'), + overRest = require('./_overRest'), + setToString = require('./_setToString'); + +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); +} + +module.exports = flatRest; diff --git a/node_modules/lodash/_freeGlobal.js b/node_modules/lodash/_freeGlobal.js new file mode 100644 index 0000000..bbec998 --- /dev/null +++ b/node_modules/lodash/_freeGlobal.js @@ -0,0 +1,4 @@ +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +module.exports = freeGlobal; diff --git a/node_modules/lodash/package/_getPlaceholder.js b/node_modules/lodash/_getHolder.js similarity index 77% rename from node_modules/lodash/package/_getPlaceholder.js rename to node_modules/lodash/_getHolder.js index 4bbcda2..65e94b5 100644 --- a/node_modules/lodash/package/_getPlaceholder.js +++ b/node_modules/lodash/_getHolder.js @@ -5,9 +5,9 @@ * @param {Function} func The function to inspect. * @returns {*} Returns the placeholder value. */ -function getPlaceholder(func) { +function getHolder(func) { var object = func; return object.placeholder; } -module.exports = getPlaceholder; +module.exports = getHolder; diff --git a/node_modules/lodash/_getLength.js b/node_modules/lodash/_getLength.js deleted file mode 100644 index 5407165..0000000 --- a/node_modules/lodash/_getLength.js +++ /dev/null @@ -1,16 +0,0 @@ -var baseProperty = require('./_baseProperty'); - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a - * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects - * Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -module.exports = getLength; diff --git a/node_modules/lodash/_getMapData.js b/node_modules/lodash/_getMapData.js new file mode 100644 index 0000000..17f6303 --- /dev/null +++ b/node_modules/lodash/_getMapData.js @@ -0,0 +1,18 @@ +var isKeyable = require('./_isKeyable'); + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +module.exports = getMapData; diff --git a/node_modules/lodash/_getMatchData.js b/node_modules/lodash/_getMatchData.js index a1456d2..2cc70f9 100644 --- a/node_modules/lodash/_getMatchData.js +++ b/node_modules/lodash/_getMatchData.js @@ -1,5 +1,5 @@ var isStrictComparable = require('./_isStrictComparable'), - toPairs = require('./toPairs'); + keys = require('./keys'); /** * Gets the property names, values, and compare flags of `object`. @@ -9,11 +9,14 @@ var isStrictComparable = require('./_isStrictComparable'), * @returns {Array} Returns the match data of `object`. */ function getMatchData(object) { - var result = toPairs(object), + var result = keys(object), length = result.length; while (length--) { - result[length][2] = isStrictComparable(result[length][1]); + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; } return result; } diff --git a/node_modules/lodash/_getNative.js b/node_modules/lodash/_getNative.js index f6ff7f1..97a622b 100644 --- a/node_modules/lodash/_getNative.js +++ b/node_modules/lodash/_getNative.js @@ -1,4 +1,5 @@ -var isNative = require('./isNative'); +var baseIsNative = require('./_baseIsNative'), + getValue = require('./_getValue'); /** * Gets the native function at `key` of `object`. @@ -9,8 +10,8 @@ var isNative = require('./isNative'); * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { - var value = object[key]; - return isNative(value) ? value : undefined; + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; } module.exports = getNative; diff --git a/node_modules/lodash/_getPrototype.js b/node_modules/lodash/_getPrototype.js index 1ef6d92..e808612 100644 --- a/node_modules/lodash/_getPrototype.js +++ b/node_modules/lodash/_getPrototype.js @@ -1,15 +1,6 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetPrototype = Object.getPrototypeOf; +var overArg = require('./_overArg'); -/** - * Gets the `[[Prototype]]` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {null|Object} Returns the `[[Prototype]]`. - */ -function getPrototype(value) { - return nativeGetPrototype(Object(value)); -} +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); module.exports = getPrototype; diff --git a/node_modules/lodash/_getRawTag.js b/node_modules/lodash/_getRawTag.js new file mode 100644 index 0000000..49a95c9 --- /dev/null +++ b/node_modules/lodash/_getRawTag.js @@ -0,0 +1,46 @@ +var Symbol = require('./_Symbol'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +module.exports = getRawTag; diff --git a/node_modules/lodash/_getSymbols.js b/node_modules/lodash/_getSymbols.js index 63df717..b53c127 100644 --- a/node_modules/lodash/_getSymbols.js +++ b/node_modules/lodash/_getSymbols.js @@ -1,24 +1,16 @@ -/** Built-in value references. */ -var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var overArg = require('./_overArg'), + stubArray = require('./stubArray'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; /** - * Creates an array of the own enumerable symbol properties of `object`. + * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ -function getSymbols(object) { - // Coerce `object` to an object to avoid non-object errors in V8. - // See https://bugs.chromium.org/p/v8/issues/detail?id=3443 for more details. - return getOwnPropertySymbols(Object(object)); -} - -// Fallback for IE < 11. -if (!getOwnPropertySymbols) { - getSymbols = function() { - return []; - }; -} +var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; module.exports = getSymbols; diff --git a/node_modules/lodash/_getSymbolsIn.js b/node_modules/lodash/_getSymbolsIn.js index 3a3729f..cec0855 100644 --- a/node_modules/lodash/_getSymbolsIn.js +++ b/node_modules/lodash/_getSymbolsIn.js @@ -1,19 +1,19 @@ var arrayPush = require('./_arrayPush'), getPrototype = require('./_getPrototype'), - getSymbols = require('./_getSymbols'); + getSymbols = require('./_getSymbols'), + stubArray = require('./stubArray'); -/** Built-in value references. */ -var getOwnPropertySymbols = Object.getOwnPropertySymbols; +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; /** - * Creates an array of the own and inherited enumerable symbol properties - * of `object`. + * Creates an array of the own and inherited enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ -var getSymbolsIn = !getOwnPropertySymbols ? getSymbols : function(object) { +var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { var result = []; while (object) { arrayPush(result, getSymbols(object)); diff --git a/node_modules/lodash/_getTag.js b/node_modules/lodash/_getTag.js index 0d1a455..deaf89d 100644 --- a/node_modules/lodash/_getTag.js +++ b/node_modules/lodash/_getTag.js @@ -3,6 +3,7 @@ var DataView = require('./_DataView'), Promise = require('./_Promise'), Set = require('./_Set'), WeakMap = require('./_WeakMap'), + baseGetTag = require('./_baseGetTag'), toSource = require('./_toSource'); /** `Object#toString` result references. */ @@ -14,16 +15,6 @@ var mapTag = '[object Map]', var dataViewTag = '[object DataView]'; -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), @@ -38,21 +29,18 @@ var dataViewCtorString = toSource(DataView), * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ -function getTag(value) { - return objectToString.call(value); -} +var getTag = baseGetTag; -// Fallback for data views, maps, sets, and weak maps in IE 11, -// for data views in Edge, and promises in Node.js. +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { - var result = objectToString.call(value), + var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : undefined; + ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { diff --git a/node_modules/lodash/_getValue.js b/node_modules/lodash/_getValue.js new file mode 100644 index 0000000..5f7d773 --- /dev/null +++ b/node_modules/lodash/_getValue.js @@ -0,0 +1,13 @@ +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +module.exports = getValue; diff --git a/node_modules/lodash/_getWrapDetails.js b/node_modules/lodash/_getWrapDetails.js new file mode 100644 index 0000000..3bcc6e4 --- /dev/null +++ b/node_modules/lodash/_getWrapDetails.js @@ -0,0 +1,17 @@ +/** Used to match wrap detail comments. */ +var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + +/** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ +function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; +} + +module.exports = getWrapDetails; diff --git a/node_modules/lodash/_hasPath.js b/node_modules/lodash/_hasPath.js index 4533c60..93dbde1 100644 --- a/node_modules/lodash/_hasPath.js +++ b/node_modules/lodash/_hasPath.js @@ -2,9 +2,7 @@ var castPath = require('./_castPath'), isArguments = require('./isArguments'), isArray = require('./isArray'), isIndex = require('./_isIndex'), - isKey = require('./_isKey'), isLength = require('./isLength'), - isString = require('./isString'), toKey = require('./_toKey'); /** @@ -17,11 +15,11 @@ var castPath = require('./_castPath'), * @returns {boolean} Returns `true` if `path` exists, else `false`. */ function hasPath(object, path, hasFunc) { - path = isKey(path, object) ? [path] : castPath(path); + path = castPath(path, object); - var result, - index = -1, - length = path.length; + var index = -1, + length = path.length, + result = false; while (++index < length) { var key = toKey(path[index]); @@ -30,12 +28,12 @@ function hasPath(object, path, hasFunc) { } object = object[key]; } - if (result) { + if (result || ++index != length) { return result; } - var length = object ? object.length : 0; + length = object == null ? 0 : object.length; return !!length && isLength(length) && isIndex(key, length) && - (isArray(object) || isString(object) || isArguments(object)); + (isArray(object) || isArguments(object)); } module.exports = hasPath; diff --git a/node_modules/lodash/_hasUnicode.js b/node_modules/lodash/_hasUnicode.js new file mode 100644 index 0000000..cb6ca15 --- /dev/null +++ b/node_modules/lodash/_hasUnicode.js @@ -0,0 +1,26 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +module.exports = hasUnicode; diff --git a/node_modules/lodash/_hasUnicodeWord.js b/node_modules/lodash/_hasUnicodeWord.js new file mode 100644 index 0000000..a35d6e5 --- /dev/null +++ b/node_modules/lodash/_hasUnicodeWord.js @@ -0,0 +1,15 @@ +/** Used to detect strings that need a more robust regexp to match words. */ +var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + +/** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ +function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); +} + +module.exports = hasUnicodeWord; diff --git a/node_modules/lodash/_hashClear.js b/node_modules/lodash/_hashClear.js new file mode 100644 index 0000000..5d4b70c --- /dev/null +++ b/node_modules/lodash/_hashClear.js @@ -0,0 +1,15 @@ +var nativeCreate = require('./_nativeCreate'); + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; +} + +module.exports = hashClear; diff --git a/node_modules/lodash/_hashDelete.js b/node_modules/lodash/_hashDelete.js index b562317..ea9dabf 100644 --- a/node_modules/lodash/_hashDelete.js +++ b/node_modules/lodash/_hashDelete.js @@ -1,15 +1,17 @@ -var hashHas = require('./_hashHas'); - /** * Removes `key` and its value from the hash. * * @private + * @name delete + * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function hashDelete(hash, key) { - return hashHas(hash, key) && delete hash[key]; +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; } module.exports = hashDelete; diff --git a/node_modules/lodash/_hashGet.js b/node_modules/lodash/_hashGet.js index ba509b6..1fc2f34 100644 --- a/node_modules/lodash/_hashGet.js +++ b/node_modules/lodash/_hashGet.js @@ -13,16 +13,18 @@ var hasOwnProperty = objectProto.hasOwnProperty; * Gets the hash value for `key`. * * @private - * @param {Object} hash The hash to query. + * @name get + * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ -function hashGet(hash, key) { +function hashGet(key) { + var data = this.__data__; if (nativeCreate) { - var result = hash[key]; + var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } - return hasOwnProperty.call(hash, key) ? hash[key] : undefined; + return hasOwnProperty.call(data, key) ? data[key] : undefined; } module.exports = hashGet; diff --git a/node_modules/lodash/_hashHas.js b/node_modules/lodash/_hashHas.js index 3bbff48..f30aac3 100644 --- a/node_modules/lodash/_hashHas.js +++ b/node_modules/lodash/_hashHas.js @@ -10,12 +10,14 @@ var hasOwnProperty = objectProto.hasOwnProperty; * Checks if a hash value for `key` exists. * * @private - * @param {Object} hash The hash to query. + * @name has + * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function hashHas(hash, key) { - return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key); +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); } module.exports = hashHas; diff --git a/node_modules/lodash/_hashSet.js b/node_modules/lodash/_hashSet.js index f7c3307..e105528 100644 --- a/node_modules/lodash/_hashSet.js +++ b/node_modules/lodash/_hashSet.js @@ -7,12 +7,17 @@ var HASH_UNDEFINED = '__lodash_hash_undefined__'; * Sets the hash `key` to `value`. * * @private - * @param {Object} hash The hash to modify. + * @name set + * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. */ -function hashSet(hash, key, value) { - hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; } module.exports = hashSet; diff --git a/node_modules/lodash/_indexKeys.js b/node_modules/lodash/_indexKeys.js deleted file mode 100644 index 0e2fc10..0000000 --- a/node_modules/lodash/_indexKeys.js +++ /dev/null @@ -1,24 +0,0 @@ -var baseTimes = require('./_baseTimes'), - isArguments = require('./isArguments'), - isArray = require('./isArray'), - isLength = require('./isLength'), - isString = require('./isString'); - -/** - * Creates an array of index keys for `object` values of arrays, - * `arguments` objects, and strings, otherwise `null` is returned. - * - * @private - * @param {Object} object The object to query. - * @returns {Array|null} Returns index keys, else `null`. - */ -function indexKeys(object) { - var length = object ? object.length : undefined; - if (isLength(length) && - (isArray(object) || isString(object) || isArguments(object))) { - return baseTimes(length, String); - } - return null; -} - -module.exports = indexKeys; diff --git a/node_modules/lodash/_indexOfNaN.js b/node_modules/lodash/_indexOfNaN.js deleted file mode 100644 index 05b8207..0000000 --- a/node_modules/lodash/_indexOfNaN.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Gets the index at which the first occurrence of `NaN` is found in `array`. - * - * @private - * @param {Array} array The array to search. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched `NaN`, else `-1`. - */ -function indexOfNaN(array, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 0 : -1); - - while ((fromRight ? index-- : ++index < length)) { - var other = array[index]; - if (other !== other) { - return index; - } - } - return -1; -} - -module.exports = indexOfNaN; diff --git a/node_modules/lodash/_insertWrapDetails.js b/node_modules/lodash/_insertWrapDetails.js new file mode 100644 index 0000000..e790808 --- /dev/null +++ b/node_modules/lodash/_insertWrapDetails.js @@ -0,0 +1,23 @@ +/** Used to match wrap detail comments. */ +var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; + +/** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ +function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); +} + +module.exports = insertWrapDetails; diff --git a/node_modules/lodash/_isFlattenable.js b/node_modules/lodash/_isFlattenable.js index 847ad1f..4cc2c24 100644 --- a/node_modules/lodash/_isFlattenable.js +++ b/node_modules/lodash/_isFlattenable.js @@ -1,6 +1,9 @@ -var isArguments = require('./isArguments'), - isArray = require('./isArray'), - isArrayLikeObject = require('./isArrayLikeObject'); +var Symbol = require('./_Symbol'), + isArguments = require('./isArguments'), + isArray = require('./isArray'); + +/** Built-in value references. */ +var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; /** * Checks if `value` is a flattenable `arguments` object or array. @@ -10,7 +13,8 @@ var isArguments = require('./isArguments'), * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenable(value) { - return isArrayLikeObject(value) && (isArray(value) || isArguments(value)); + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); } module.exports = isFlattenable; diff --git a/node_modules/lodash/_isFlattenableIteratee.js b/node_modules/lodash/_isFlattenableIteratee.js deleted file mode 100644 index f7ede3e..0000000 --- a/node_modules/lodash/_isFlattenableIteratee.js +++ /dev/null @@ -1,16 +0,0 @@ -var isArray = require('./isArray'), - isFunction = require('./isFunction'); - -/** - * Checks if `value` is a flattenable array and not a `_.matchesProperty` - * iteratee shorthand. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenableIteratee(value) { - return isArray(value) && !(value.length == 2 && !isFunction(value[0])); -} - -module.exports = isFlattenableIteratee; diff --git a/node_modules/lodash/_isHostObject.js b/node_modules/lodash/_isHostObject.js deleted file mode 100644 index e598c10..0000000 --- a/node_modules/lodash/_isHostObject.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ -function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; -} - -module.exports = isHostObject; diff --git a/node_modules/lodash/_isMaskable.js b/node_modules/lodash/_isMaskable.js new file mode 100644 index 0000000..eb98d09 --- /dev/null +++ b/node_modules/lodash/_isMaskable.js @@ -0,0 +1,14 @@ +var coreJsData = require('./_coreJsData'), + isFunction = require('./isFunction'), + stubFalse = require('./stubFalse'); + +/** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ +var isMaskable = coreJsData ? isFunction : stubFalse; + +module.exports = isMaskable; diff --git a/node_modules/lodash/_isMasked.js b/node_modules/lodash/_isMasked.js new file mode 100644 index 0000000..4b0f21b --- /dev/null +++ b/node_modules/lodash/_isMasked.js @@ -0,0 +1,20 @@ +var coreJsData = require('./_coreJsData'); + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +module.exports = isMasked; diff --git a/node_modules/lodash/_listCacheClear.js b/node_modules/lodash/_listCacheClear.js new file mode 100644 index 0000000..acbe39a --- /dev/null +++ b/node_modules/lodash/_listCacheClear.js @@ -0,0 +1,13 @@ +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +module.exports = listCacheClear; diff --git a/node_modules/lodash/_assocDelete.js b/node_modules/lodash/_listCacheDelete.js similarity index 58% rename from node_modules/lodash/_assocDelete.js rename to node_modules/lodash/_listCacheDelete.js index 49f61e8..b1384ad 100644 --- a/node_modules/lodash/_assocDelete.js +++ b/node_modules/lodash/_listCacheDelete.js @@ -7,25 +7,29 @@ var arrayProto = Array.prototype; var splice = arrayProto.splice; /** - * Removes `key` and its value from the associative array. + * Removes `key` and its value from the list cache. * * @private - * @param {Array} array The array to modify. + * @name delete + * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function assocDelete(array, key) { - var index = assocIndexOf(array, key); +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + if (index < 0) { return false; } - var lastIndex = array.length - 1; + var lastIndex = data.length - 1; if (index == lastIndex) { - array.pop(); + data.pop(); } else { - splice.call(array, index, 1); + splice.call(data, index, 1); } + --this.size; return true; } -module.exports = assocDelete; +module.exports = listCacheDelete; diff --git a/node_modules/lodash/_listCacheGet.js b/node_modules/lodash/_listCacheGet.js new file mode 100644 index 0000000..f8192fc --- /dev/null +++ b/node_modules/lodash/_listCacheGet.js @@ -0,0 +1,19 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +module.exports = listCacheGet; diff --git a/node_modules/lodash/_assocHas.js b/node_modules/lodash/_listCacheHas.js similarity index 50% rename from node_modules/lodash/_assocHas.js rename to node_modules/lodash/_listCacheHas.js index a74bd39..2adf671 100644 --- a/node_modules/lodash/_assocHas.js +++ b/node_modules/lodash/_listCacheHas.js @@ -1,15 +1,16 @@ var assocIndexOf = require('./_assocIndexOf'); /** - * Checks if an associative array value for `key` exists. + * Checks if a list cache value for `key` exists. * * @private - * @param {Array} array The array to query. + * @name has + * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function assocHas(array, key) { - return assocIndexOf(array, key) > -1; +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; } -module.exports = assocHas; +module.exports = listCacheHas; diff --git a/node_modules/lodash/_listCacheSet.js b/node_modules/lodash/_listCacheSet.js new file mode 100644 index 0000000..5855c95 --- /dev/null +++ b/node_modules/lodash/_listCacheSet.js @@ -0,0 +1,26 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +module.exports = listCacheSet; diff --git a/node_modules/lodash/package/_mapClear.js b/node_modules/lodash/_mapCacheClear.js similarity index 61% rename from node_modules/lodash/package/_mapClear.js rename to node_modules/lodash/_mapCacheClear.js index 296f417..bc9ca20 100644 --- a/node_modules/lodash/package/_mapClear.js +++ b/node_modules/lodash/_mapCacheClear.js @@ -1,4 +1,5 @@ var Hash = require('./_Hash'), + ListCache = require('./_ListCache'), Map = require('./_Map'); /** @@ -8,12 +9,13 @@ var Hash = require('./_Hash'), * @name clear * @memberOf MapCache */ -function mapClear() { +function mapCacheClear() { + this.size = 0; this.__data__ = { 'hash': new Hash, - 'map': Map ? new Map : [], + 'map': new (Map || ListCache), 'string': new Hash }; } -module.exports = mapClear; +module.exports = mapCacheClear; diff --git a/node_modules/lodash/_mapCacheDelete.js b/node_modules/lodash/_mapCacheDelete.js new file mode 100644 index 0000000..946ca3c --- /dev/null +++ b/node_modules/lodash/_mapCacheDelete.js @@ -0,0 +1,18 @@ +var getMapData = require('./_getMapData'); + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +module.exports = mapCacheDelete; diff --git a/node_modules/lodash/_mapCacheGet.js b/node_modules/lodash/_mapCacheGet.js new file mode 100644 index 0000000..f29f55c --- /dev/null +++ b/node_modules/lodash/_mapCacheGet.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +module.exports = mapCacheGet; diff --git a/node_modules/lodash/_mapCacheHas.js b/node_modules/lodash/_mapCacheHas.js new file mode 100644 index 0000000..a1214c0 --- /dev/null +++ b/node_modules/lodash/_mapCacheHas.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +module.exports = mapCacheHas; diff --git a/node_modules/lodash/_mapCacheSet.js b/node_modules/lodash/_mapCacheSet.js new file mode 100644 index 0000000..7346849 --- /dev/null +++ b/node_modules/lodash/_mapCacheSet.js @@ -0,0 +1,22 @@ +var getMapData = require('./_getMapData'); + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +module.exports = mapCacheSet; diff --git a/node_modules/lodash/_mapDelete.js b/node_modules/lodash/_mapDelete.js deleted file mode 100644 index 640eb0a..0000000 --- a/node_modules/lodash/_mapDelete.js +++ /dev/null @@ -1,23 +0,0 @@ -var Map = require('./_Map'), - assocDelete = require('./_assocDelete'), - hashDelete = require('./_hashDelete'), - isKeyable = require('./_isKeyable'); - -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function mapDelete(key) { - var data = this.__data__; - if (isKeyable(key)) { - return hashDelete(typeof key == 'string' ? data.string : data.hash, key); - } - return Map ? data.map['delete'](key) : assocDelete(data.map, key); -} - -module.exports = mapDelete; diff --git a/node_modules/lodash/_mapGet.js b/node_modules/lodash/_mapGet.js deleted file mode 100644 index 8f33854..0000000 --- a/node_modules/lodash/_mapGet.js +++ /dev/null @@ -1,23 +0,0 @@ -var Map = require('./_Map'), - assocGet = require('./_assocGet'), - hashGet = require('./_hashGet'), - isKeyable = require('./_isKeyable'); - -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapGet(key) { - var data = this.__data__; - if (isKeyable(key)) { - return hashGet(typeof key == 'string' ? data.string : data.hash, key); - } - return Map ? data.map.get(key) : assocGet(data.map, key); -} - -module.exports = mapGet; diff --git a/node_modules/lodash/_mapHas.js b/node_modules/lodash/_mapHas.js deleted file mode 100644 index 9225537..0000000 --- a/node_modules/lodash/_mapHas.js +++ /dev/null @@ -1,23 +0,0 @@ -var Map = require('./_Map'), - assocHas = require('./_assocHas'), - hashHas = require('./_hashHas'), - isKeyable = require('./_isKeyable'); - -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapHas(key) { - var data = this.__data__; - if (isKeyable(key)) { - return hashHas(typeof key == 'string' ? data.string : data.hash, key); - } - return Map ? data.map.has(key) : assocHas(data.map, key); -} - -module.exports = mapHas; diff --git a/node_modules/lodash/_mapSet.js b/node_modules/lodash/_mapSet.js deleted file mode 100644 index 23b075f..0000000 --- a/node_modules/lodash/_mapSet.js +++ /dev/null @@ -1,28 +0,0 @@ -var Map = require('./_Map'), - assocSet = require('./_assocSet'), - hashSet = require('./_hashSet'), - isKeyable = require('./_isKeyable'); - -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapSet(key, value) { - var data = this.__data__; - if (isKeyable(key)) { - hashSet(typeof key == 'string' ? data.string : data.hash, key, value); - } else if (Map) { - data.map.set(key, value); - } else { - assocSet(data.map, key, value); - } - return this; -} - -module.exports = mapSet; diff --git a/node_modules/lodash/_mapToArray.js b/node_modules/lodash/_mapToArray.js index e2e8a24..fe3dd53 100644 --- a/node_modules/lodash/_mapToArray.js +++ b/node_modules/lodash/_mapToArray.js @@ -1,9 +1,9 @@ /** - * Converts `map` to an array. + * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. - * @returns {Array} Returns the converted array. + * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, diff --git a/node_modules/lodash/_matchesStrictComparable.js b/node_modules/lodash/_matchesStrictComparable.js index 70375e0..f608af9 100644 --- a/node_modules/lodash/_matchesStrictComparable.js +++ b/node_modules/lodash/_matchesStrictComparable.js @@ -5,7 +5,7 @@ * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function matchesStrictComparable(key, srcValue) { return function(object) { diff --git a/node_modules/lodash/_memoizeCapped.js b/node_modules/lodash/_memoizeCapped.js new file mode 100644 index 0000000..7f71c8f --- /dev/null +++ b/node_modules/lodash/_memoizeCapped.js @@ -0,0 +1,26 @@ +var memoize = require('./memoize'); + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +module.exports = memoizeCapped; diff --git a/node_modules/lodash/_mergeData.js b/node_modules/lodash/_mergeData.js index 911e6ae..cb570f9 100644 --- a/node_modules/lodash/_mergeData.js +++ b/node_modules/lodash/_mergeData.js @@ -5,13 +5,13 @@ var composeArgs = require('./_composeArgs'), /** Used as the internal argument placeholder. */ var PLACEHOLDER = '__lodash_placeholder__'; -/** Used to compose bitmasks for wrapper metadata. */ -var BIND_FLAG = 1, - BIND_KEY_FLAG = 2, - CURRY_BOUND_FLAG = 4, - CURRY_FLAG = 8, - ARY_FLAG = 128, - REARG_FLAG = 256; +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMin = Math.min; @@ -36,22 +36,22 @@ function mergeData(data, source) { var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, - isCommon = newBitmask < (BIND_FLAG | BIND_KEY_FLAG | ARY_FLAG); + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); var isCombo = - ((srcBitmask == ARY_FLAG) && (bitmask == CURRY_FLAG)) || - ((srcBitmask == ARY_FLAG) && (bitmask == REARG_FLAG) && (data[7].length <= source[8])) || - ((srcBitmask == (ARY_FLAG | REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == CURRY_FLAG)); + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); // Exit early if metadata can't be merged. if (!(isCommon || isCombo)) { return data; } // Use source `thisArg` if available. - if (srcBitmask & BIND_FLAG) { + if (srcBitmask & WRAP_BIND_FLAG) { data[2] = source[2]; // Set when currying a bound function. - newBitmask |= bitmask & BIND_FLAG ? 0 : CURRY_BOUND_FLAG; + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; } // Compose partial arguments. var value = source[3]; @@ -73,7 +73,7 @@ function mergeData(data, source) { data[7] = value; } // Use source `ary` if it's smaller. - if (srcBitmask & ARY_FLAG) { + if (srcBitmask & WRAP_ARY_FLAG) { data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); } // Use source `arity` if one is not provided. diff --git a/node_modules/lodash/_mergeDefaults.js b/node_modules/lodash/_mergeDefaults.js index 33375cc..9888f0e 100644 --- a/node_modules/lodash/_mergeDefaults.js +++ b/node_modules/lodash/_mergeDefaults.js @@ -16,7 +16,10 @@ var baseMerge = require('./_baseMerge'), */ function mergeDefaults(objValue, srcValue, key, object, source, stack) { if (isObject(objValue) && isObject(srcValue)) { - baseMerge(objValue, srcValue, undefined, mergeDefaults, stack.set(srcValue, objValue)); + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, mergeDefaults, stack); + stack['delete'](srcValue); } return objValue; } diff --git a/node_modules/lodash/_nativeKeys.js b/node_modules/lodash/_nativeKeys.js new file mode 100644 index 0000000..479a104 --- /dev/null +++ b/node_modules/lodash/_nativeKeys.js @@ -0,0 +1,6 @@ +var overArg = require('./_overArg'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object); + +module.exports = nativeKeys; diff --git a/node_modules/lodash/_nativeKeysIn.js b/node_modules/lodash/_nativeKeysIn.js new file mode 100644 index 0000000..00ee505 --- /dev/null +++ b/node_modules/lodash/_nativeKeysIn.js @@ -0,0 +1,20 @@ +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +module.exports = nativeKeysIn; diff --git a/node_modules/lodash/_nodeUtil.js b/node_modules/lodash/_nodeUtil.js new file mode 100644 index 0000000..14e179f --- /dev/null +++ b/node_modules/lodash/_nodeUtil.js @@ -0,0 +1,22 @@ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +module.exports = nodeUtil; diff --git a/node_modules/lodash/_objectToString.js b/node_modules/lodash/_objectToString.js new file mode 100644 index 0000000..c614ec0 --- /dev/null +++ b/node_modules/lodash/_objectToString.js @@ -0,0 +1,22 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +module.exports = objectToString; diff --git a/node_modules/lodash/_overArg.js b/node_modules/lodash/_overArg.js new file mode 100644 index 0000000..651c5c5 --- /dev/null +++ b/node_modules/lodash/_overArg.js @@ -0,0 +1,15 @@ +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; diff --git a/node_modules/lodash/_overRest.js b/node_modules/lodash/_overRest.js new file mode 100644 index 0000000..c7cdef3 --- /dev/null +++ b/node_modules/lodash/_overRest.js @@ -0,0 +1,36 @@ +var apply = require('./_apply'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; +} + +module.exports = overRest; diff --git a/node_modules/lodash/_parent.js b/node_modules/lodash/_parent.js index 81d94d0..f174328 100644 --- a/node_modules/lodash/_parent.js +++ b/node_modules/lodash/_parent.js @@ -10,7 +10,7 @@ var baseGet = require('./_baseGet'), * @returns {*} Returns the parent value. */ function parent(object, path) { - return path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); } module.exports = parent; diff --git a/node_modules/lodash/_reHasComplexSymbol.js b/node_modules/lodash/_reHasComplexSymbol.js deleted file mode 100644 index be78c4b..0000000 --- a/node_modules/lodash/_reHasComplexSymbol.js +++ /dev/null @@ -1,13 +0,0 @@ -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', - rsComboSymbolsRange = '\\u20d0-\\u20f0', - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsZWJ = '\\u200d'; - -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); - -module.exports = reHasComplexSymbol; diff --git a/node_modules/lodash/_root.js b/node_modules/lodash/_root.js index d2cfd31..d2852be 100644 --- a/node_modules/lodash/_root.js +++ b/node_modules/lodash/_root.js @@ -1,41 +1,9 @@ -var checkGlobal = require('./_checkGlobal'); - -/** Used to determine if values are of the language type `Object`. */ -var objectTypes = { - 'function': true, - 'object': true -}; - -/** Detect free variable `exports`. */ -var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) - ? exports - : undefined; - -/** Detect free variable `module`. */ -var freeModule = (objectTypes[typeof module] && module && !module.nodeType) - ? module - : undefined; - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); +var freeGlobal = require('./_freeGlobal'); /** Detect free variable `self`. */ -var freeSelf = checkGlobal(objectTypes[typeof self] && self); - -/** Detect free variable `window`. */ -var freeWindow = checkGlobal(objectTypes[typeof window] && window); - -/** Detect `this` as the global object. */ -var thisGlobal = checkGlobal(objectTypes[typeof this] && this); +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; -/** - * Used as a reference to the global object. - * - * The `this` value is used if it's the global object to avoid Greasemonkey's - * restricted `window` object, otherwise the `window` object is used. - */ -var root = freeGlobal || - ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || - freeSelf || thisGlobal || Function('return this')(); +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; diff --git a/node_modules/lodash/_setCacheAdd.js b/node_modules/lodash/_setCacheAdd.js new file mode 100644 index 0000000..1081a74 --- /dev/null +++ b/node_modules/lodash/_setCacheAdd.js @@ -0,0 +1,19 @@ +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +module.exports = setCacheAdd; diff --git a/node_modules/lodash/_setCacheHas.js b/node_modules/lodash/_setCacheHas.js new file mode 100644 index 0000000..9a49255 --- /dev/null +++ b/node_modules/lodash/_setCacheHas.js @@ -0,0 +1,14 @@ +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +module.exports = setCacheHas; diff --git a/node_modules/lodash/_setData.js b/node_modules/lodash/_setData.js index d86c610..e5cf3eb 100644 --- a/node_modules/lodash/_setData.js +++ b/node_modules/lodash/_setData.js @@ -1,9 +1,5 @@ var baseSetData = require('./_baseSetData'), - now = require('./now'); - -/** Used to detect hot functions by number of calls within a span of milliseconds. */ -var HOT_COUNT = 150, - HOT_SPAN = 16; + shortOut = require('./_shortOut'); /** * Sets metadata for `func`. @@ -19,24 +15,6 @@ var HOT_COUNT = 150, * @param {*} data The metadata. * @returns {Function} Returns `func`. */ -var setData = (function() { - var count = 0, - lastCalled = 0; - - return function(key, value) { - var stamp = now(), - remaining = HOT_SPAN - (stamp - lastCalled); - - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return key; - } - } else { - count = 0; - } - return baseSetData(key, value); - }; -}()); +var setData = shortOut(baseSetData); module.exports = setData; diff --git a/node_modules/lodash/_setToArray.js b/node_modules/lodash/_setToArray.js index 6b24f30..b87f074 100644 --- a/node_modules/lodash/_setToArray.js +++ b/node_modules/lodash/_setToArray.js @@ -1,9 +1,9 @@ /** - * Converts `set` to an array. + * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. - * @returns {Array} Returns the converted array. + * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, diff --git a/node_modules/lodash/_setToPairs.js b/node_modules/lodash/_setToPairs.js new file mode 100644 index 0000000..36ad37a --- /dev/null +++ b/node_modules/lodash/_setToPairs.js @@ -0,0 +1,18 @@ +/** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ +function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; +} + +module.exports = setToPairs; diff --git a/node_modules/lodash/_setToString.js b/node_modules/lodash/_setToString.js new file mode 100644 index 0000000..6ca8419 --- /dev/null +++ b/node_modules/lodash/_setToString.js @@ -0,0 +1,14 @@ +var baseSetToString = require('./_baseSetToString'), + shortOut = require('./_shortOut'); + +/** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var setToString = shortOut(baseSetToString); + +module.exports = setToString; diff --git a/node_modules/lodash/_setWrapToString.js b/node_modules/lodash/_setWrapToString.js new file mode 100644 index 0000000..decdc44 --- /dev/null +++ b/node_modules/lodash/_setWrapToString.js @@ -0,0 +1,21 @@ +var getWrapDetails = require('./_getWrapDetails'), + insertWrapDetails = require('./_insertWrapDetails'), + setToString = require('./_setToString'), + updateWrapDetails = require('./_updateWrapDetails'); + +/** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ +function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); +} + +module.exports = setWrapToString; diff --git a/node_modules/lodash/_shortOut.js b/node_modules/lodash/_shortOut.js new file mode 100644 index 0000000..3300a07 --- /dev/null +++ b/node_modules/lodash/_shortOut.js @@ -0,0 +1,37 @@ +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeNow = Date.now; + +/** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; +} + +module.exports = shortOut; diff --git a/node_modules/lodash/_shuffleSelf.js b/node_modules/lodash/_shuffleSelf.js new file mode 100644 index 0000000..8bcc4f5 --- /dev/null +++ b/node_modules/lodash/_shuffleSelf.js @@ -0,0 +1,28 @@ +var baseRandom = require('./_baseRandom'); + +/** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ +function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; +} + +module.exports = shuffleSelf; diff --git a/node_modules/lodash/_stackClear.js b/node_modules/lodash/_stackClear.js index 8255536..ce8e5a9 100644 --- a/node_modules/lodash/_stackClear.js +++ b/node_modules/lodash/_stackClear.js @@ -1,3 +1,5 @@ +var ListCache = require('./_ListCache'); + /** * Removes all key-value entries from the stack. * @@ -6,7 +8,8 @@ * @memberOf Stack */ function stackClear() { - this.__data__ = { 'array': [], 'map': null }; + this.__data__ = new ListCache; + this.size = 0; } module.exports = stackClear; diff --git a/node_modules/lodash/_stackDelete.js b/node_modules/lodash/_stackDelete.js index 7e38a13..ff9887a 100644 --- a/node_modules/lodash/_stackDelete.js +++ b/node_modules/lodash/_stackDelete.js @@ -1,5 +1,3 @@ -var assocDelete = require('./_assocDelete'); - /** * Removes `key` and its value from the stack. * @@ -11,9 +9,10 @@ var assocDelete = require('./_assocDelete'); */ function stackDelete(key) { var data = this.__data__, - array = data.array; + result = data['delete'](key); - return array ? assocDelete(array, key) : data.map['delete'](key); + this.size = data.size; + return result; } module.exports = stackDelete; diff --git a/node_modules/lodash/_stackGet.js b/node_modules/lodash/_stackGet.js index 20b9d9a..1cdf004 100644 --- a/node_modules/lodash/_stackGet.js +++ b/node_modules/lodash/_stackGet.js @@ -1,5 +1,3 @@ -var assocGet = require('./_assocGet'); - /** * Gets the stack value for `key`. * @@ -10,10 +8,7 @@ var assocGet = require('./_assocGet'); * @returns {*} Returns the entry value. */ function stackGet(key) { - var data = this.__data__, - array = data.array; - - return array ? assocGet(array, key) : data.map.get(key); + return this.__data__.get(key); } module.exports = stackGet; diff --git a/node_modules/lodash/_stackHas.js b/node_modules/lodash/_stackHas.js index 7a3b0b9..16a3ad1 100644 --- a/node_modules/lodash/_stackHas.js +++ b/node_modules/lodash/_stackHas.js @@ -1,5 +1,3 @@ -var assocHas = require('./_assocHas'); - /** * Checks if a stack value for `key` exists. * @@ -10,10 +8,7 @@ var assocHas = require('./_assocHas'); * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { - var data = this.__data__, - array = data.array; - - return array ? assocHas(array, key) : data.map.has(key); + return this.__data__.has(key); } module.exports = stackHas; diff --git a/node_modules/lodash/_stackSet.js b/node_modules/lodash/_stackSet.js index 76ca89a..b790ac5 100644 --- a/node_modules/lodash/_stackSet.js +++ b/node_modules/lodash/_stackSet.js @@ -1,5 +1,6 @@ -var MapCache = require('./_MapCache'), - assocSet = require('./_assocSet'); +var ListCache = require('./_ListCache'), + Map = require('./_Map'), + MapCache = require('./_MapCache'); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; @@ -15,21 +16,18 @@ var LARGE_ARRAY_SIZE = 200; * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { - var data = this.__data__, - array = data.array; - - if (array) { - if (array.length < (LARGE_ARRAY_SIZE - 1)) { - assocSet(array, key, value); - } else { - data.array = null; - data.map = new MapCache(array); + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; } + data = this.__data__ = new MapCache(pairs); } - var map = data.map; - if (map) { - map.set(key, value); - } + data.set(key, value); + this.size = data.size; return this; } diff --git a/node_modules/lodash/_strictIndexOf.js b/node_modules/lodash/_strictIndexOf.js new file mode 100644 index 0000000..0486a49 --- /dev/null +++ b/node_modules/lodash/_strictIndexOf.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +module.exports = strictIndexOf; diff --git a/node_modules/lodash/_strictLastIndexOf.js b/node_modules/lodash/_strictLastIndexOf.js new file mode 100644 index 0000000..d7310dc --- /dev/null +++ b/node_modules/lodash/_strictLastIndexOf.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; +} + +module.exports = strictLastIndexOf; diff --git a/node_modules/lodash/_stringSize.js b/node_modules/lodash/_stringSize.js index c64c7ff..17ef462 100644 --- a/node_modules/lodash/_stringSize.js +++ b/node_modules/lodash/_stringSize.js @@ -1,30 +1,6 @@ -var reHasComplexSymbol = require('./_reHasComplexSymbol'); - -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', - rsComboSymbolsRange = '\\u20d0-\\u20f0', - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + rsAstralRange + ']', - rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); +var asciiSize = require('./_asciiSize'), + hasUnicode = require('./_hasUnicode'), + unicodeSize = require('./_unicodeSize'); /** * Gets the number of symbols in `string`. @@ -34,14 +10,9 @@ var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, * @returns {number} Returns the string size. */ function stringSize(string) { - if (!(string && reHasComplexSymbol.test(string))) { - return string.length; - } - var result = reComplexSymbol.lastIndex = 0; - while (reComplexSymbol.test(string)) { - result++; - } - return result; + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); } module.exports = stringSize; diff --git a/node_modules/lodash/_stringToArray.js b/node_modules/lodash/_stringToArray.js index 90986f0..d161158 100644 --- a/node_modules/lodash/_stringToArray.js +++ b/node_modules/lodash/_stringToArray.js @@ -1,28 +1,6 @@ -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', - rsComboSymbolsRange = '\\u20d0-\\u20f0', - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + rsAstralRange + ']', - rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); +var asciiToArray = require('./_asciiToArray'), + hasUnicode = require('./_hasUnicode'), + unicodeToArray = require('./_unicodeToArray'); /** * Converts `string` to an array. @@ -32,7 +10,9 @@ var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, * @returns {Array} Returns the converted array. */ function stringToArray(string) { - return string.match(reComplexSymbol); + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); } module.exports = stringToArray; diff --git a/node_modules/lodash/_stringToPath.js b/node_modules/lodash/_stringToPath.js index b6a1fc2..db7b0f7 100644 --- a/node_modules/lodash/_stringToPath.js +++ b/node_modules/lodash/_stringToPath.js @@ -1,8 +1,8 @@ -var memoize = require('./memoize'), - toString = require('./toString'); +var memoizeCapped = require('./_memoizeCapped'); /** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g; +var reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; @@ -14,9 +14,12 @@ var reEscapeChar = /\\(\\)?/g; * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ -var stringToPath = memoize(function(string) { +var stringToPath = memoizeCapped(function(string) { var result = []; - toString(string).replace(rePropName, function(match, number, quote, string) { + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); }); return result; diff --git a/node_modules/lodash/_toSource.js b/node_modules/lodash/_toSource.js index 43f3ff8..a020b38 100644 --- a/node_modules/lodash/_toSource.js +++ b/node_modules/lodash/_toSource.js @@ -1,11 +1,14 @@ +/** Used for built-in method references. */ +var funcProto = Function.prototype; + /** Used to resolve the decompiled source of functions. */ -var funcToString = Function.prototype.toString; +var funcToString = funcProto.toString; /** * Converts `func` to its source code. * * @private - * @param {Function} func The function to process. + * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { diff --git a/node_modules/lodash/_unescapeHtmlChar.js b/node_modules/lodash/_unescapeHtmlChar.js index 28b3454..a71fecb 100644 --- a/node_modules/lodash/_unescapeHtmlChar.js +++ b/node_modules/lodash/_unescapeHtmlChar.js @@ -1,11 +1,12 @@ +var basePropertyOf = require('./_basePropertyOf'); + /** Used to map HTML entities to characters. */ var htmlUnescapes = { '&': '&', '<': '<', '>': '>', '"': '"', - ''': "'", - '`': '`' + ''': "'" }; /** @@ -15,8 +16,6 @@ var htmlUnescapes = { * @param {string} chr The matched character to unescape. * @returns {string} Returns the unescaped character. */ -function unescapeHtmlChar(chr) { - return htmlUnescapes[chr]; -} +var unescapeHtmlChar = basePropertyOf(htmlUnescapes); module.exports = unescapeHtmlChar; diff --git a/node_modules/lodash/_unicodeSize.js b/node_modules/lodash/_unicodeSize.js new file mode 100644 index 0000000..68137ec --- /dev/null +++ b/node_modules/lodash/_unicodeSize.js @@ -0,0 +1,44 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; +} + +module.exports = unicodeSize; diff --git a/node_modules/lodash/_unicodeToArray.js b/node_modules/lodash/_unicodeToArray.js new file mode 100644 index 0000000..2a725c0 --- /dev/null +++ b/node_modules/lodash/_unicodeToArray.js @@ -0,0 +1,40 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function unicodeToArray(string) { + return string.match(reUnicode) || []; +} + +module.exports = unicodeToArray; diff --git a/node_modules/lodash/_unicodeWords.js b/node_modules/lodash/_unicodeWords.js new file mode 100644 index 0000000..d8b822a --- /dev/null +++ b/node_modules/lodash/_unicodeWords.js @@ -0,0 +1,69 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + +/** Used to compose unicode capture groups. */ +var rsApos = "['\u2019]", + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)', + rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq; + +/** Used to match complex or compound words. */ +var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji +].join('|'), 'g'); + +/** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ +function unicodeWords(string) { + return string.match(reUnicodeWord) || []; +} + +module.exports = unicodeWords; diff --git a/node_modules/lodash/_updateWrapDetails.js b/node_modules/lodash/_updateWrapDetails.js new file mode 100644 index 0000000..8759fbd --- /dev/null +++ b/node_modules/lodash/_updateWrapDetails.js @@ -0,0 +1,46 @@ +var arrayEach = require('./_arrayEach'), + arrayIncludes = require('./_arrayIncludes'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + +/** Used to associate wrap methods with their bit flags. */ +var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] +]; + +/** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ +function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); +} + +module.exports = updateWrapDetails; diff --git a/node_modules/lodash/add.js b/node_modules/lodash/add.js index d82c652..f069515 100644 --- a/node_modules/lodash/add.js +++ b/node_modules/lodash/add.js @@ -17,6 +17,6 @@ var createMathOperation = require('./_createMathOperation'); */ var add = createMathOperation(function(augend, addend) { return augend + addend; -}); +}, 0); module.exports = add; diff --git a/node_modules/lodash/after.js b/node_modules/lodash/after.js index 910923a..3900c97 100644 --- a/node_modules/lodash/after.js +++ b/node_modules/lodash/after.js @@ -1,6 +1,6 @@ var toInteger = require('./toInteger'); -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** diff --git a/node_modules/lodash/array.js b/node_modules/lodash/array.js index 06eda29..af688d3 100644 --- a/node_modules/lodash/array.js +++ b/node_modules/lodash/array.js @@ -12,6 +12,7 @@ module.exports = { 'fill': require('./fill'), 'findIndex': require('./findIndex'), 'findLastIndex': require('./findLastIndex'), + 'first': require('./first'), 'flatten': require('./flatten'), 'flattenDeep': require('./flattenDeep'), 'flattenDepth': require('./flattenDepth'), diff --git a/node_modules/lodash/ary.js b/node_modules/lodash/ary.js index e901f1b..70c87d0 100644 --- a/node_modules/lodash/ary.js +++ b/node_modules/lodash/ary.js @@ -1,7 +1,7 @@ -var createWrapper = require('./_createWrapper'); +var createWrap = require('./_createWrap'); -/** Used to compose bitmasks for wrapper metadata. */ -var ARY_FLAG = 128; +/** Used to compose bitmasks for function metadata. */ +var WRAP_ARY_FLAG = 128; /** * Creates a function that invokes `func`, with up to `n` arguments, @@ -14,7 +14,7 @@ var ARY_FLAG = 128; * @param {Function} func The function to cap arguments for. * @param {number} [n=func.length] The arity cap. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. * @example * * _.map(['6', '8', '10'], _.ary(parseInt, 1)); @@ -23,7 +23,7 @@ var ARY_FLAG = 128; function ary(func, n, guard) { n = guard ? undefined : n; n = (func && n == null) ? func.length : n; - return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n); + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); } module.exports = ary; diff --git a/node_modules/lodash/assign.js b/node_modules/lodash/assign.js index 2a60ff2..909db26 100644 --- a/node_modules/lodash/assign.js +++ b/node_modules/lodash/assign.js @@ -11,12 +11,6 @@ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */ -var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); - /** * Assigns own enumerable string keyed properties of source objects to the * destination object. Source objects are applied from left to right. @@ -36,21 +30,21 @@ var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); * @example * * function Foo() { - * this.c = 3; + * this.a = 1; * } * * function Bar() { - * this.e = 5; + * this.c = 3; * } * - * Foo.prototype.d = 4; - * Bar.prototype.f = 6; + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; * - * _.assign({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3, 'e': 5 } + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } */ var assign = createAssigner(function(object, source) { - if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { + if (isPrototype(source) || isArrayLike(source)) { copyObject(source, keys(source), object); return; } diff --git a/node_modules/lodash/assignIn.js b/node_modules/lodash/assignIn.js index b001c49..e663473 100644 --- a/node_modules/lodash/assignIn.js +++ b/node_modules/lodash/assignIn.js @@ -1,19 +1,7 @@ -var assignValue = require('./_assignValue'), - copyObject = require('./_copyObject'), +var copyObject = require('./_copyObject'), createAssigner = require('./_createAssigner'), - isArrayLike = require('./isArrayLike'), - isPrototype = require('./_isPrototype'), keysIn = require('./keysIn'); -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */ -var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); - /** * This method is like `_.assign` except that it iterates over own and * inherited source properties. @@ -32,27 +20,21 @@ var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); * @example * * function Foo() { - * this.b = 2; + * this.a = 1; * } * * function Bar() { - * this.d = 4; + * this.c = 3; * } * - * Foo.prototype.c = 3; - * Bar.prototype.e = 5; + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; * - * _.assignIn({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 } + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } */ var assignIn = createAssigner(function(object, source) { - if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { - copyObject(source, keysIn(source), object); - return; - } - for (var key in source) { - assignValue(object, key, source[key]); - } + copyObject(source, keysIn(source), object); }); module.exports = assignIn; diff --git a/node_modules/lodash/at.js b/node_modules/lodash/at.js index 59b197c..781ee9e 100644 --- a/node_modules/lodash/at.js +++ b/node_modules/lodash/at.js @@ -1,6 +1,5 @@ var baseAt = require('./_baseAt'), - baseFlatten = require('./_baseFlatten'), - rest = require('./rest'); + flatRest = require('./_flatRest'); /** * Creates an array of values corresponding to `paths` of `object`. @@ -10,20 +9,15 @@ var baseAt = require('./_baseAt'), * @since 1.0.0 * @category Object * @param {Object} object The object to iterate over. - * @param {...(string|string[])} [paths] The property paths of elements to pick. - * @returns {Array} Returns the new array of picked elements. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; * * _.at(object, ['a[0].b.c', 'a[1]']); * // => [3, 4] - * - * _.at(['a', 'b', 'c'], 0, 2); - * // => ['a', 'c'] */ -var at = rest(function(object, paths) { - return baseAt(object, baseFlatten(paths, 1)); -}); +var at = flatRest(baseAt); module.exports = at; diff --git a/node_modules/lodash/attempt.js b/node_modules/lodash/attempt.js index e65b2e6..624d015 100644 --- a/node_modules/lodash/attempt.js +++ b/node_modules/lodash/attempt.js @@ -1,6 +1,6 @@ var apply = require('./_apply'), - isError = require('./isError'), - rest = require('./rest'); + baseRest = require('./_baseRest'), + isError = require('./isError'); /** * Attempts to invoke `func`, returning either the result or the caught error @@ -24,7 +24,7 @@ var apply = require('./_apply'), * elements = []; * } */ -var attempt = rest(function(func, args) { +var attempt = baseRest(function(func, args) { try { return apply(func, undefined, args); } catch (e) { diff --git a/node_modules/lodash/before.js b/node_modules/lodash/before.js index a495adc..a3e0a16 100644 --- a/node_modules/lodash/before.js +++ b/node_modules/lodash/before.js @@ -1,6 +1,6 @@ var toInteger = require('./toInteger'); -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** @@ -18,7 +18,7 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * @example * * jQuery(element).on('click', _.before(5, addContactToList)); - * // => allows adding up to 4 contacts to the list + * // => Allows adding up to 4 contacts to the list. */ function before(n, func) { var result; diff --git a/node_modules/lodash/bind.js b/node_modules/lodash/bind.js index a41b946..b1076e9 100644 --- a/node_modules/lodash/bind.js +++ b/node_modules/lodash/bind.js @@ -1,11 +1,11 @@ -var createWrapper = require('./_createWrapper'), - getPlaceholder = require('./_getPlaceholder'), - replaceHolders = require('./_replaceHolders'), - rest = require('./rest'); +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); -/** Used to compose bitmasks for wrapper metadata. */ -var BIND_FLAG = 1, - PARTIAL_FLAG = 32; +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_PARTIAL_FLAG = 32; /** * Creates a function that invokes `func` with the `this` binding of `thisArg` @@ -14,7 +14,7 @@ var BIND_FLAG = 1, * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for partially applied arguments. * - * **Note:** Unlike native `Function#bind` this method doesn't set the "length" + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" * property of bound functions. * * @static @@ -27,9 +27,9 @@ var BIND_FLAG = 1, * @returns {Function} Returns the new bound function. * @example * - * var greet = function(greeting, punctuation) { + * function greet(greeting, punctuation) { * return greeting + ' ' + this.user + punctuation; - * }; + * } * * var object = { 'user': 'fred' }; * @@ -42,13 +42,13 @@ var BIND_FLAG = 1, * bound('hi'); * // => 'hi fred!' */ -var bind = rest(function(func, thisArg, partials) { - var bitmask = BIND_FLAG; +var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; if (partials.length) { - var holders = replaceHolders(partials, getPlaceholder(bind)); - bitmask |= PARTIAL_FLAG; + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; } - return createWrapper(func, bitmask, thisArg, partials, holders); + return createWrap(func, bitmask, thisArg, partials, holders); }); // Assign default placeholders. diff --git a/node_modules/lodash/bindAll.js b/node_modules/lodash/bindAll.js index d389fd7..a35706d 100644 --- a/node_modules/lodash/bindAll.js +++ b/node_modules/lodash/bindAll.js @@ -1,7 +1,7 @@ var arrayEach = require('./_arrayEach'), - baseFlatten = require('./_baseFlatten'), + baseAssignValue = require('./_baseAssignValue'), bind = require('./bind'), - rest = require('./rest'), + flatRest = require('./_flatRest'), toKey = require('./_toKey'); /** @@ -21,19 +21,19 @@ var arrayEach = require('./_arrayEach'), * * var view = { * 'label': 'docs', - * 'onClick': function() { + * 'click': function() { * console.log('clicked ' + this.label); * } * }; * - * _.bindAll(view, 'onClick'); - * jQuery(element).on('click', view.onClick); + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); * // => Logs 'clicked docs' when clicked. */ -var bindAll = rest(function(object, methodNames) { - arrayEach(baseFlatten(methodNames, 1), function(key) { +var bindAll = flatRest(function(object, methodNames) { + arrayEach(methodNames, function(key) { key = toKey(key); - object[key] = bind(object[key], object); + baseAssignValue(object, key, bind(object[key], object)); }); return object; }); diff --git a/node_modules/lodash/bindKey.js b/node_modules/lodash/bindKey.js index 364dd69..f7fd64c 100644 --- a/node_modules/lodash/bindKey.js +++ b/node_modules/lodash/bindKey.js @@ -1,12 +1,12 @@ -var createWrapper = require('./_createWrapper'), - getPlaceholder = require('./_getPlaceholder'), - replaceHolders = require('./_replaceHolders'), - rest = require('./rest'); +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); -/** Used to compose bitmasks for wrapper metadata. */ -var BIND_FLAG = 1, - BIND_KEY_FLAG = 2, - PARTIAL_FLAG = 32; +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_PARTIAL_FLAG = 32; /** * Creates a function that invokes the method at `object[key]` with `partials` @@ -53,13 +53,13 @@ var BIND_FLAG = 1, * bound('hi'); * // => 'hiya fred!' */ -var bindKey = rest(function(object, key, partials) { - var bitmask = BIND_FLAG | BIND_KEY_FLAG; +var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; if (partials.length) { - var holders = replaceHolders(partials, getPlaceholder(bindKey)); - bitmask |= PARTIAL_FLAG; + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; } - return createWrapper(key, bitmask, object, partials, holders); + return createWrap(key, bitmask, object, partials, holders); }); // Assign default placeholders. diff --git a/node_modules/lodash/chunk.js b/node_modules/lodash/chunk.js index f209474..5b562fe 100644 --- a/node_modules/lodash/chunk.js +++ b/node_modules/lodash/chunk.js @@ -18,7 +18,7 @@ var nativeCeil = Math.ceil, * @param {Array} array The array to process. * @param {number} [size=1] The length of each chunk * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the new array containing chunks. + * @returns {Array} Returns the new array of chunks. * @example * * _.chunk(['a', 'b', 'c', 'd'], 2); @@ -33,7 +33,7 @@ function chunk(array, size, guard) { } else { size = nativeMax(toInteger(size), 0); } - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length || size < 1) { return []; } diff --git a/node_modules/lodash/clone.js b/node_modules/lodash/clone.js index d02395e..dd439d6 100644 --- a/node_modules/lodash/clone.js +++ b/node_modules/lodash/clone.js @@ -1,5 +1,8 @@ var baseClone = require('./_baseClone'); +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + /** * Creates a shallow clone of `value`. * @@ -27,7 +30,7 @@ var baseClone = require('./_baseClone'); * // => true */ function clone(value) { - return baseClone(value, false, true); + return baseClone(value, CLONE_SYMBOLS_FLAG); } module.exports = clone; diff --git a/node_modules/lodash/cloneDeep.js b/node_modules/lodash/cloneDeep.js index 94efce1..4425fbe 100644 --- a/node_modules/lodash/cloneDeep.js +++ b/node_modules/lodash/cloneDeep.js @@ -1,5 +1,9 @@ var baseClone = require('./_baseClone'); +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + /** * This method is like `_.clone` except that it recursively clones `value`. * @@ -19,7 +23,7 @@ var baseClone = require('./_baseClone'); * // => false */ function cloneDeep(value) { - return baseClone(value, true, true); + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); } module.exports = cloneDeep; diff --git a/node_modules/lodash/cloneDeepWith.js b/node_modules/lodash/cloneDeepWith.js index 4a345fb..fd9c6c0 100644 --- a/node_modules/lodash/cloneDeepWith.js +++ b/node_modules/lodash/cloneDeepWith.js @@ -1,5 +1,9 @@ var baseClone = require('./_baseClone'); +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + /** * This method is like `_.cloneWith` except that it recursively clones `value`. * @@ -29,7 +33,8 @@ var baseClone = require('./_baseClone'); * // => 20 */ function cloneDeepWith(value, customizer) { - return baseClone(value, true, true, customizer); + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); } module.exports = cloneDeepWith; diff --git a/node_modules/lodash/cloneWith.js b/node_modules/lodash/cloneWith.js index c85f573..d2f4e75 100644 --- a/node_modules/lodash/cloneWith.js +++ b/node_modules/lodash/cloneWith.js @@ -1,5 +1,8 @@ var baseClone = require('./_baseClone'); +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + /** * This method is like `_.clone` except that it accepts `customizer` which * is invoked to produce the cloned value. If `customizer` returns `undefined`, @@ -32,7 +35,8 @@ var baseClone = require('./_baseClone'); * // => 0 */ function cloneWith(value, customizer) { - return baseClone(value, false, true, customizer); + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); } module.exports = cloneWith; diff --git a/node_modules/lodash/collection.js b/node_modules/lodash/collection.js index 22b0c8b..77fe837 100644 --- a/node_modules/lodash/collection.js +++ b/node_modules/lodash/collection.js @@ -1,5 +1,4 @@ module.exports = { - 'at': require('./at'), 'countBy': require('./countBy'), 'each': require('./each'), 'eachRight': require('./eachRight'), diff --git a/node_modules/lodash/compact.js b/node_modules/lodash/compact.js index 790f311..031fab4 100644 --- a/node_modules/lodash/compact.js +++ b/node_modules/lodash/compact.js @@ -15,7 +15,7 @@ */ function compact(array) { var index = -1, - length = array ? array.length : 0, + length = array == null ? 0 : array.length, resIndex = 0, result = []; diff --git a/node_modules/lodash/concat.js b/node_modules/lodash/concat.js index de9270b..1da48a4 100644 --- a/node_modules/lodash/concat.js +++ b/node_modules/lodash/concat.js @@ -1,7 +1,7 @@ -var arrayConcat = require('./_arrayConcat'), +var arrayPush = require('./_arrayPush'), baseFlatten = require('./_baseFlatten'), - castArray = require('./castArray'), - copyArray = require('./_copyArray'); + copyArray = require('./_copyArray'), + isArray = require('./isArray'); /** * Creates a new array concatenating `array` with any additional arrays @@ -26,17 +26,18 @@ var arrayConcat = require('./_arrayConcat'), * // => [1] */ function concat() { - var length = arguments.length, - array = castArray(arguments[0]); - - if (length < 2) { - return length ? copyArray(array) : []; + var length = arguments.length; + if (!length) { + return []; } - var args = Array(length - 1); - while (length--) { - args[length - 1] = arguments[length]; + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; } - return arrayConcat(array, baseFlatten(args, 1)); + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); } module.exports = concat; diff --git a/node_modules/lodash/cond.js b/node_modules/lodash/cond.js index 0ba36de..6455598 100644 --- a/node_modules/lodash/cond.js +++ b/node_modules/lodash/cond.js @@ -1,9 +1,9 @@ var apply = require('./_apply'), arrayMap = require('./_arrayMap'), baseIteratee = require('./_baseIteratee'), - rest = require('./rest'); + baseRest = require('./_baseRest'); -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** @@ -17,13 +17,13 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * @since 4.0.0 * @category Util * @param {Array} pairs The predicate-function pairs. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new composite function. * @example * * var func = _.cond([ * [_.matches({ 'a': 1 }), _.constant('matches A')], * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], - * [_.constant(true), _.constant('no match')] + * [_.stubTrue, _.constant('no match')] * ]); * * func({ 'a': 1, 'b': 2 }); @@ -36,7 +36,7 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * // => 'no match' */ function cond(pairs) { - var length = pairs ? pairs.length : 0, + var length = pairs == null ? 0 : pairs.length, toIteratee = baseIteratee; pairs = !length ? [] : arrayMap(pairs, function(pair) { @@ -46,7 +46,7 @@ function cond(pairs) { return [toIteratee(pair[0]), pair[1]]; }); - return rest(function(args) { + return baseRest(function(args) { var index = -1; while (++index < length) { var pair = pairs[index]; diff --git a/node_modules/lodash/conforms.js b/node_modules/lodash/conforms.js index 6ec590f..5501a94 100644 --- a/node_modules/lodash/conforms.js +++ b/node_modules/lodash/conforms.js @@ -1,29 +1,35 @@ var baseClone = require('./_baseClone'), baseConforms = require('./_baseConforms'); +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + /** * Creates a function that invokes the predicate properties of `source` with * the corresponding property values of a given object, returning `true` if * all predicates return truthy, else `false`. * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * * @static * @memberOf _ * @since 4.0.0 * @category Util * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } * ]; * - * _.filter(users, _.conforms({ 'age': _.partial(_.gt, _, 38) })); - * // => [{ 'user': 'fred', 'age': 40 }] + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] */ function conforms(source) { - return baseConforms(baseClone(source, true)); + return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); } module.exports = conforms; diff --git a/node_modules/lodash/conformsTo.js b/node_modules/lodash/conformsTo.js new file mode 100644 index 0000000..b8a93eb --- /dev/null +++ b/node_modules/lodash/conformsTo.js @@ -0,0 +1,32 @@ +var baseConformsTo = require('./_baseConformsTo'), + keys = require('./keys'); + +/** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ +function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); +} + +module.exports = conformsTo; diff --git a/node_modules/lodash/constant.js b/node_modules/lodash/constant.js index 59bcb42..655ece3 100644 --- a/node_modules/lodash/constant.js +++ b/node_modules/lodash/constant.js @@ -6,13 +6,15 @@ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new constant function. * @example * - * var object = { 'user': 'fred' }; - * var getter = _.constant(object); + * var objects = _.times(2, _.constant({ 'a': 1 })); * - * getter() === object; + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { diff --git a/node_modules/lodash/core.js b/node_modules/lodash/core.js index 73b541b..59cdc7b 100644 --- a/node_modules/lodash/core.js +++ b/node_modules/lodash/core.js @@ -1,8 +1,8 @@ /** * @license - * lodash 4.11.2 (Custom Build) + * Lodash (Custom Build) * Build: `lodash core -o ./dist/lodash.core.js` - * Copyright jQuery Foundation and other contributors + * Copyright JS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors @@ -13,18 +13,18 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.11.2'; + var VERSION = '4.17.2'; - /** Used as the `TypeError` message for "Functions" methods. */ + /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; - /** Used to compose bitmasks for wrapper metadata. */ - var BIND_FLAG = 1, - PARTIAL_FLAG = 32; + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; - /** Used to compose bitmasks for comparison styles. */ - var UNORDERED_COMPARE_FLAG = 1, - PARTIAL_COMPARE_FLAG = 2; + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_PARTIAL_FLAG = 32; /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, @@ -33,6 +33,7 @@ /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', @@ -40,83 +41,40 @@ genTag = '[object GeneratorFunction]', numberTag = '[object Number]', objectTag = '[object Object]', + proxyTag = '[object Proxy]', regexpTag = '[object RegExp]', stringTag = '[object String]'; /** Used to match HTML entities and HTML characters. */ - var reUnescapedHtml = /[&<>"'`]/g, + var reUnescapedHtml = /[&<>"']/g, reHasUnescapedHtml = RegExp(reUnescapedHtml.source); - /** Used to detect unsigned integer values. */ - var reIsUint = /^(?:0|[1-9]\d*)$/; - /** Used to map characters to HTML entities. */ var htmlEscapes = { '&': '&', '<': '<', '>': '>', '"': '"', - "'": ''', - '`': '`' - }; - - /** Used to determine if values are of the language type `Object`. */ - var objectTypes = { - 'function': true, - 'object': true + "'": ''' }; - /** Detect free variable `exports`. */ - var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) - ? exports - : undefined; - - /** Detect free variable `module`. */ - var freeModule = (objectTypes[typeof module] && module && !module.nodeType) - ? module - : undefined; - - /** Detect the popular CommonJS extension `module.exports`. */ - var moduleExports = (freeModule && freeModule.exports === freeExports) - ? freeExports - : undefined; - /** Detect free variable `global` from Node.js. */ - var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; /** Detect free variable `self`. */ - var freeSelf = checkGlobal(objectTypes[typeof self] && self); + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - /** Detect free variable `window`. */ - var freeWindow = checkGlobal(objectTypes[typeof window] && window); + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); - /** Detect `this` as the global object. */ - var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - /** - * Used as a reference to the global object. - * - * The `this` value is used if it's the global object to avoid Greasemonkey's - * restricted `window` object, otherwise the `window` object is used. - */ - var root = freeGlobal || - ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || - freeSelf || thisGlobal || Function('return this')(); + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /*--------------------------------------------------------------------------*/ - /** - * Creates a new array concatenating `array` with `other`. - * - * @private - * @param {Array} array The first array to concatenate. - * @param {Array} other The second array to concatenate. - * @returns {Array} Returns the new concatenated array. - */ - function arrayConcat(array, other) { - return arrayPush(copyArray(array), values); - } - /** * Appends the elements of `values` to `array`. * @@ -131,27 +89,52 @@ } /** - * The base implementation of methods like `_.find` and `_.findKey`, without - * support for iteratee shorthands, which iterates over `collection` using - * `eachFunc`. + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. * * @private - * @param {Array|Object} collection The collection to search. + * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. - * @param {Function} eachFunc The function to iterate over `collection`. - * @param {boolean} [retKey] Specify returning the key of the found element - * instead of the element itself. - * @returns {*} Returns the found element or its key, else `undefined`. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. */ - function baseFind(collection, predicate, eachFunc, retKey) { - var result; - eachFunc(collection, function(value, key, collection) { - if (predicate(value, key, collection)) { - result = retKey ? key : value; - return false; + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; } - }); - return result; + } + return -1; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; } /** @@ -176,25 +159,6 @@ return accumulator; } - /** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ - function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; - } - /** * The base implementation of `_.values` and `_.valuesIn` which creates an * array of `object` property values corresponding to the property names @@ -211,17 +175,6 @@ }); } - /** - * Checks if `value` is a global object. - * - * @private - * @param {*} value The value to check. - * @returns {null|Object} Returns `value` if it's a global object, else `null`. - */ - function checkGlobal(value) { - return (value && value.Object === Object) ? value : null; - } - /** * Used by `_.escape` to convert characters to HTML entities. * @@ -229,44 +182,20 @@ * @param {string} chr The matched character to escape. * @returns {string} Returns the escaped character. */ - function escapeHtmlChar(chr) { - return htmlEscapes[chr]; - } - - /** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ - function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; - } + var escapeHtmlChar = basePropertyOf(htmlEscapes); /** - * Converts `iterator` to an array. + * Creates a unary function that invokes `func` with its argument transformed. * * @private - * @param {Object} iterator The iterator to convert. - * @returns {Array} Returns the converted array. + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. */ - function iteratorToArray(iterator) { - var data, - result = []; - - while (!(data = iterator.next()).done) { - result.push(data.value); - } - return result; + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; } /*--------------------------------------------------------------------------*/ @@ -283,25 +212,21 @@ /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ - var objectToString = objectProto.toString; + var nativeObjectToString = objectProto.toString; /** Used to restore the original `_` reference in `_.noConflict`. */ var oldDash = root._; /** Built-in value references. */ - var Reflect = root.Reflect, - Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - enumerate = Reflect ? Reflect.enumerate : undefined, - objectCreate = Object.create, + var objectCreate = Object.create, propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsFinite = root.isFinite, - nativeKeys = Object.keys, + nativeKeys = overArg(Object.keys, Object), nativeMax = Math.max; /*------------------------------------------------------------------------*/ @@ -372,28 +297,30 @@ * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `divide`, `each`, - * `eachRight`, `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`, - * `findIndex`, `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`, - * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, - * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, - * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, - * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`, - * `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`, - * `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`, - * `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, - * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`, - * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, - * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, - * `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, `min`, `minBy`, `multiply`, - * `noConflict`, `noop`, `now`, `nth`, `pad`, `padEnd`, `padStart`, `parseInt`, - * `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`, - * `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, - * `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, - * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toInteger`, - * `toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`, `toString`, - * `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, - * `uniqueId`, `upperCase`, `upperFirst`, `value`, and `words` + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` * * @name _ * @constructor @@ -427,6 +354,30 @@ : new LodashWrapper(value); } + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + /** * The base constructor for creating `lodash` wrapper objects. * @@ -465,7 +416,7 @@ /** * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private @@ -477,31 +428,32 @@ var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { - object[key] = value; + baseAssignValue(object, key, value); } } /** - * The base implementation of `_.create` without support for assigning - * properties to the created object. + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. * * @private - * @param {Object} prototype The object to inherit from. - * @returns {Object} Returns the new object. + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. */ - function baseCreate(proto) { - return isObject(proto) ? objectCreate(proto) : {}; + function baseAssignValue(object, key, value) { + object[key] = value; } /** - * The base implementation of `_.delay` and `_.defer` which accepts an array - * of `func` arguments. + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. * * @private * @param {Function} func The function to delay. * @param {number} wait The number of milliseconds to delay invocation. - * @param {Object} args The arguments to provide to `func`. - * @returns {number} Returns the timer id. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. */ function baseDelay(func, wait, args) { if (typeof func != 'function') { @@ -651,7 +603,7 @@ * @private * @param {Object} object The object to inspect. * @param {Array} props The property names to filter. - * @returns {Array} Returns the new array of filtered property names. + * @returns {Array} Returns the function names. */ function baseFunctions(object, props) { return baseFilter(props, function(key) { @@ -660,7 +612,18 @@ } /** - * The base implementation of `_.gt` which doesn't coerce arguments to numbers. + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + return objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. @@ -672,6 +635,26 @@ return value > other; } + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + var baseIsArguments = noop; + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. @@ -679,22 +662,21 @@ * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. - * @param {boolean} [bitmask] The bitmask of comparison flags. - * The bitmask may be composed of the following flags: - * 1 - Unordered comparison - * 2 - Partial comparison * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ - function baseIsEqual(value, other, customizer, bitmask, stack) { + function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { return value !== value && other !== other; } - return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack); + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } /** @@ -705,47 +687,50 @@ * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` - * for more details. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = arrayTag, othTag = arrayTag; if (!objIsArr) { - objTag = objectToString.call(object); + objTag = baseGetTag(object); objTag = objTag == argsTag ? objectTag : objTag; } if (!othIsArr) { - othTag = objectToString.call(other); + othTag = baseGetTag(other); othTag = othTag == argsTag ? objectTag : othTag; } - var objIsObj = objTag == objectTag && !isHostObject(object), - othIsObj = othTag == objectTag && !isHostObject(other), + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, isSameTag = objTag == othTag; stack || (stack = []); - var stacked = find(stack, function(entry) { - return entry[0] === object; + var objStack = find(stack, function(entry) { + return entry[0] == object; + }); + var othStack = find(stack, function(entry) { + return entry[0] == other; }); - if (stacked && stacked[1]) { - return stacked[1] == other; + if (objStack && othStack) { + return objStack[1] == other; } stack.push([object, other]); + stack.push([other, object]); if (isSameTag && !objIsObj) { - var result = (objIsArr || isTypedArray(object)) - ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) - : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack); + var result = (objIsArr) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); stack.pop(); return result; } - if (!(bitmask & PARTIAL_COMPARE_FLAG)) { + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); @@ -753,7 +738,7 @@ var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; - var result = equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack); + var result = equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); stack.pop(); return result; } @@ -761,11 +746,22 @@ if (!isSameTag) { return false; } - var result = equalObjects(object, other, equalFunc, customizer, bitmask, stack); + var result = equalObjects(object, other, bitmask, customizer, equalFunc, stack); stack.pop(); return result; } + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + /** * The base implementation of `_.iteratee`. * @@ -784,44 +780,7 @@ } /** - * The base implementation of `_.keys` which doesn't skip the constructor - * property of prototypes or treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function baseKeys(object) { - return nativeKeys(Object(object)); - } - - /** - * The base implementation of `_.keysIn` which doesn't skip the constructor - * property of prototypes or treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function baseKeysIn(object) { - object = object == null ? object : Object(object); - - var result = []; - for (var key in object) { - result.push(key); - } - return result; - } - - // Fallback for IE < 9 with es6-shim. - if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) { - baseKeysIn = function(object) { - return iteratorToArray(enumerate(object)); - }; - } - - /** - * The base implementation of `_.lt` which doesn't coerce arguments to numbers. + * The base implementation of `_.lt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. @@ -856,10 +815,10 @@ * * @private * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseMatches(source) { - var props = keys(source); + var props = nativeKeys(source); return function(object) { var length = props.length; if (object == null) { @@ -869,7 +828,7 @@ while (length--) { var key = props[length]; if (!(key in object && - baseIsEqual(source[key], object[key], undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG) + baseIsEqual(source[key], object[key], COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG) )) { return false; } @@ -884,7 +843,7 @@ * * @private * @param {Object} object The source object. - * @param {string[]} props The property identifiers to pick. + * @param {string[]} paths The property paths to pick. * @returns {Object} Returns the new object. */ function basePick(object, props) { @@ -898,16 +857,15 @@ } /** - * The base implementation of `_.property` without support for deep paths. + * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private - * @param {string} key The key of the property to get. + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. * @returns {Function} Returns the new function. */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); } /** @@ -1037,6 +995,7 @@ * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { + var isNew = !object; object || (object = {}); var index = -1, @@ -1047,9 +1006,16 @@ var newValue = customizer ? customizer(object[key], source[key], key, object, source) - : source[key]; + : undefined; - assignValue(object, key, newValue); + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } } return object; } @@ -1062,12 +1028,12 @@ * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { - return rest(function(object, sources) { + return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined; - customizer = typeof customizer == 'function' + customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; @@ -1143,10 +1109,10 @@ * @param {Function} Ctor The constructor to wrap. * @returns {Function} Returns the new wrapped function. */ - function createCtorWrapper(Ctor) { + function createCtor(Ctor) { return function() { // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; var thisBinding = baseCreate(Ctor.prototype), @@ -1158,25 +1124,44 @@ }; } + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + /** * Creates a function that wraps `func` to invoke it with the `this` binding * of `thisArg` and `partials` prepended to the arguments it receives. * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} thisArg The `this` binding of `func`. * @param {Array} partials The arguments to prepend to those provided to * the new function. * @returns {Function} Returns the new wrapped function. */ - function createPartialWrapper(func, bitmask, thisArg, partials) { + function createPartial(func, bitmask, thisArg, partials) { if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } - var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); function wrapper() { var argsIndex = -1, @@ -1204,24 +1189,23 @@ * @private * @param {Array} array The array to compare. * @param {Array} other The other array to compare. - * @param {Function} equalFunc The function to determine equivalents of values. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` - * for more details. + * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ - function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { - var index = -1, - isPartial = bitmask & PARTIAL_COMPARE_FLAG, - isUnordered = bitmask & UNORDERED_COMPARE_FLAG, + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } - var result = true; + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? [] : undefined; // Ignore non-index properties. while (++index < arrLength) { @@ -1237,17 +1221,19 @@ break; } // Recursively compare arrays (susceptible to call stack limits). - if (isUnordered) { - if (!baseSome(other, function(othValue) { - return arrValue === othValue || - equalFunc(arrValue, othValue, customizer, bitmask, stack); + if (seen) { + if (!baseSome(other, function(othValue, othIndex) { + if (!indexOf(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } })) { result = false; break; } } else if (!( arrValue === othValue || - equalFunc(arrValue, othValue, customizer, bitmask, stack) + equalFunc(arrValue, othValue, bitmask, customizer, stack) )) { result = false; break; @@ -1267,34 +1253,29 @@ * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. - * @param {Function} equalFunc The function to determine equivalents of values. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` - * for more details. + * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case boolTag: case dateTag: - // Coerce dates and booleans to numbers, dates to milliseconds and - // booleans to `1` or `0` treating invalid dates coerced to `NaN` as - // not equal. - return +object == +other; + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; - case numberTag: - // Treat `NaN` vs. `NaN` as equal. - return (object != +object) ? other != +other : object == +other; - case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); @@ -1309,15 +1290,14 @@ * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. - * @param {Function} equalFunc The function to determine equivalents of values. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` - * for more details. + * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { - var isPartial = bitmask & PARTIAL_COMPARE_FLAG, + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = keys(object), objLength = objProps.length, othProps = keys(other), @@ -1344,7 +1324,7 @@ var compared; // Recursively compare objects (susceptible to call stack limits). if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack)) + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) : compared )) { result = false; @@ -1368,83 +1348,96 @@ } /** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a - * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects - * Safari on at least iOS 8.1-8.3 ARM64. + * A specialized version of `baseRest` which flattens the rest array. * * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. */ - var getLength = baseProperty('length'); + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } /** - * Creates an array of index keys for `object` values of arrays, - * `arguments` objects, and strings, otherwise `null` is returned. + * Checks if `value` is a flattenable `arguments` object or array. * * @private - * @param {Object} object The object to query. - * @returns {Array|null} Returns index keys, else `null`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ - function indexKeys(object) { - var length = object ? object.length : undefined; - if (isLength(length) && - (isArray(object) || isString(object) || isArguments(object))) { - return baseTimes(length, String); - } - return null; + function isFlattenable(value) { + return isArray(value) || isArguments(value); } /** - * Checks if `value` is a flattenable `arguments` object or array. + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. */ - function isFlattenable(value) { - return isArrayLikeObject(value) && (isArray(value) || isArguments(value)); + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; } /** - * Checks if `value` is a valid array-like index. + * Converts `value` to a string using `Object.prototype.toString`. * * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. */ - function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); + function objectToString(value) { + return nativeObjectToString.call(value); } /** - * Checks if `value` is likely a prototype object. + * A specialized version of `baseRest` which transforms the rest array. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. */ - function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); - return value === proto; + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return func.apply(this, otherArgs); + }; } /** - * Converts `value` to a string key if it's not a string or symbol. + * Sets the `toString` method of `func` to return `string`. * * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. */ - var toKey = String; + var setToString = identity; /*------------------------------------------------------------------------*/ @@ -1490,17 +1483,65 @@ * // => [1] */ function concat() { - var length = arguments.length, - array = castArray(arguments[0]); + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; - if (length < 2) { - return length ? copyArray(array) : []; + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; } - var args = Array(length - 1); - while (length--) { - args[length - 1] = arguments[length]; + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); } - return arrayConcat(array, baseFlatten(args, 1)); + return baseFindIndex(array, baseIteratee(predicate, 3), index); } /** @@ -1518,7 +1559,7 @@ * // => [1, 2, [3, [4]], 5] */ function flatten(array) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? baseFlatten(array, 1) : []; } @@ -1537,7 +1578,7 @@ * // => [1, 2, 3, 4, 5] */ function flattenDeep(array) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? baseFlatten(array, INFINITY) : []; } @@ -1565,7 +1606,7 @@ /** * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. If `fromIndex` is negative, it's used as the * offset from the end of `array`. * @@ -1573,7 +1614,7 @@ * @memberOf _ * @since 0.1.0 * @category Array - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. @@ -1587,7 +1628,7 @@ * // => 3 */ function indexOf(array, value, fromIndex) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (typeof fromIndex == 'number') { fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; } else { @@ -1620,7 +1661,7 @@ * // => 3 */ function last(array) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? array[length - 1] : undefined; } @@ -1641,7 +1682,7 @@ * @returns {Array} Returns the slice of `array`. */ function slice(array, start, end) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; start = start == null ? 0 : +start; end = end === undefined ? length : +end; return length ? baseSlice(array, start, end) : []; @@ -1795,13 +1836,17 @@ * Iteration is stopped once `predicate` returns falsey. The predicate is * invoked with three arguments: (value, index|key, collection). * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if all elements pass the predicate check, * else `false`. @@ -1837,13 +1882,14 @@ * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * + * **Note:** Unlike `_.remove`, this method returns a new array. + * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.reject * @example @@ -1881,9 +1927,9 @@ * @memberOf _ * @since 0.1.0 * @category Collection - * @param {Array|Object} collection The collection to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * @@ -1908,9 +1954,7 @@ * _.find(users, 'active'); * // => object for 'barney' */ - function find(collection, predicate) { - return baseFind(collection, baseIteratee(predicate), baseEach); - } + var find = createFind(findIndex); /** * Iterates over elements of `collection` and invokes `iteratee` for each element. @@ -1932,7 +1976,7 @@ * @see _.forEachRight * @example * - * _([1, 2]).forEach(function(value) { + * _.forEach([1, 2], function(value) { * console.log(value); * }); * // => Logs `1` then `2`. @@ -1965,8 +2009,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * @@ -2042,7 +2085,7 @@ * @memberOf _ * @since 0.1.0 * @category Collection - * @param {Array|Object} collection The collection to inspect. + * @param {Array|Object|string} collection The collection to inspect. * @returns {number} Returns the collection size. * @example * @@ -2059,7 +2102,7 @@ if (collection == null) { return 0; } - collection = isArrayLike(collection) ? collection : keys(collection); + collection = isArrayLike(collection) ? collection : nativeKeys(collection); return collection.length; } @@ -2073,8 +2116,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. @@ -2116,8 +2158,8 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [iteratees=[_.identity]] The iteratees to sort by. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. * @returns {Array} Returns the new sorted array. * @example * @@ -2128,16 +2170,11 @@ * { 'user': 'barney', 'age': 34 } * ]; * - * _.sortBy(users, function(o) { return o.user; }); + * _.sortBy(users, [function(o) { return o.user; }]); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] * * _.sortBy(users, ['user', 'age']); * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] - * - * _.sortBy(users, 'user', function(o) { - * return Math.floor(o.age / 10); - * }); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] */ function sortBy(collection, iteratee) { var index = 0; @@ -2167,7 +2204,7 @@ * @example * * jQuery(element).on('click', _.before(5, addContactToList)); - * // => allows adding up to 4 contacts to the list + * // => Allows adding up to 4 contacts to the list. */ function before(n, func) { var result; @@ -2193,7 +2230,7 @@ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for partially applied arguments. * - * **Note:** Unlike native `Function#bind` this method doesn't set the "length" + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" * property of bound functions. * * @static @@ -2206,9 +2243,9 @@ * @returns {Function} Returns the new bound function. * @example * - * var greet = function(greeting, punctuation) { + * function greet(greeting, punctuation) { * return greeting + ' ' + this.user + punctuation; - * }; + * } * * var object = { 'user': 'fred' }; * @@ -2221,8 +2258,8 @@ * bound('hi'); * // => 'hi fred!' */ - var bind = rest(function(func, thisArg, partials) { - return createPartialWrapper(func, BIND_FLAG | PARTIAL_FLAG, thisArg, partials); + var bind = baseRest(function(func, thisArg, partials) { + return createPartial(func, WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG, thisArg, partials); }); /** @@ -2241,9 +2278,9 @@ * _.defer(function(text) { * console.log(text); * }, 'deferred'); - * // => Logs 'deferred' after one or more milliseconds. + * // => Logs 'deferred' after one millisecond. */ - var defer = rest(function(func, args) { + var defer = baseRest(function(func, args) { return baseDelay(func, 1, args); }); @@ -2266,7 +2303,7 @@ * }, 1000, 'later'); * // => Logs 'later' after one second. */ - var delay = rest(function(func, wait, args) { + var delay = baseRest(function(func, wait, args) { return baseDelay(func, toNumber(wait) || 0, args); }); @@ -2280,7 +2317,7 @@ * @since 3.0.0 * @category Function * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new negated function. * @example * * function isEven(n) { @@ -2295,7 +2332,8 @@ throw new TypeError(FUNC_ERROR_TEXT); } return function() { - return !predicate.apply(this, arguments); + var args = arguments; + return !predicate.apply(this, args); }; } @@ -2315,104 +2353,14 @@ * var initialize = _.once(createApplication); * initialize(); * initialize(); - * // `initialize` invokes `createApplication` once + * // => `createApplication` is invoked once */ function once(func) { return before(2, func); } - /** - * Creates a function that invokes `func` with the `this` binding of the - * created function and arguments from `start` and beyond provided as - * an array. - * - * **Note:** This method is based on the - * [rest parameter](https://mdn.io/rest_parameters). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Function - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.rest(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); - * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' - */ - function rest(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = array; - return func.apply(this, otherArgs); - }; - } - /*------------------------------------------------------------------------*/ - /** - * Casts `value` as an array if it's not one. - * - * @static - * @memberOf _ - * @since 4.4.0 - * @category Lang - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast array. - * @example - * - * _.castArray(1); - * // => [1] - * - * _.castArray({ 'a': 1 }); - * // => [{ 'a': 1 }] - * - * _.castArray('abc'); - * // => ['abc'] - * - * _.castArray(null); - * // => [null] - * - * _.castArray(undefined); - * // => [undefined] - * - * _.castArray(); - * // => [] - * - * var array = [1, 2, 3]; - * console.log(_.castArray(array) === array); - * // => true - */ - function castArray() { - if (!arguments.length) { - return []; - } - var value = arguments[0]; - return isArray(value) ? value : [value]; - } - /** * Creates a shallow clone of `value`. * @@ -2443,12 +2391,12 @@ if (!isObject(value)) { return value; } - return isArray(value) ? copyArray(value) : copyObject(value, keys(value)); + return isArray(value) ? copyArray(value) : copyObject(value, nativeKeys(value)); } /** * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static @@ -2460,8 +2408,8 @@ * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.eq(object, object); * // => true @@ -2490,7 +2438,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, + * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * @@ -2500,11 +2448,10 @@ * _.isArguments([1, 2, 3]); * // => false */ - function isArguments(value) { - // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); - } + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; /** * Checks if `value` is classified as an `Array` object. @@ -2512,11 +2459,9 @@ * @static * @memberOf _ * @since 0.1.0 - * @type {Function} * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); @@ -2559,36 +2504,7 @@ * // => false */ function isArrayLike(value) { - return value != null && isLength(getLength(value)) && !isFunction(value); - } - - /** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ - function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); + return value != null && isLength(value.length) && !isFunction(value); } /** @@ -2599,8 +2515,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. * @example * * _.isBoolean(false); @@ -2611,7 +2526,7 @@ */ function isBoolean(value) { return value === true || value === false || - (isObjectLike(value) && objectToString.call(value) == boolTag); + (isObjectLike(value) && baseGetTag(value) == boolTag); } /** @@ -2622,8 +2537,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. * @example * * _.isDate(new Date); @@ -2632,9 +2546,7 @@ * _.isDate('Mon April 23 2012'); * // => false */ - function isDate(value) { - return isObjectLike(value) && objectToString.call(value) == dateTag; - } + var isDate = baseIsDate; /** * Checks if `value` is an empty object, collection, map, or set. @@ -2675,7 +2587,7 @@ isFunction(value.splice) || isArguments(value))) { return !value.length; } - return !keys(value).length; + return !nativeKeys(value).length; } /** @@ -2694,12 +2606,11 @@ * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, - * else `false`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.isEqual(object, other); * // => true @@ -2722,21 +2633,20 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. * @example * * _.isFinite(3); * // => true * - * _.isFinite(Number.MAX_VALUE); - * // => true - * - * _.isFinite(3.14); + * _.isFinite(Number.MIN_VALUE); * // => true * * _.isFinite(Infinity); * // => false + * + * _.isFinite('3'); + * // => false */ function isFinite(value) { return typeof value == 'number' && nativeIsFinite(value); @@ -2750,8 +2660,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); @@ -2761,26 +2670,27 @@ * // => false */ function isFunction(value) { + if (!isObject(value)) { + return false; + } // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); @@ -2802,7 +2712,7 @@ /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -2827,7 +2737,7 @@ */ function isObject(value) { var type = typeof value; - return !!value && (type == 'object' || type == 'function'); + return value != null && (type == 'object' || type == 'function'); } /** @@ -2855,7 +2765,7 @@ * // => false */ function isObjectLike(value) { - return !!value && typeof value == 'object'; + return value != null && typeof value == 'object'; } /** @@ -2925,8 +2835,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. * @example * * _.isNumber(3); @@ -2943,7 +2852,7 @@ */ function isNumber(value) { return typeof value == 'number' || - (isObjectLike(value) && objectToString.call(value) == numberTag); + (isObjectLike(value) && baseGetTag(value) == numberTag); } /** @@ -2954,8 +2863,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. * @example * * _.isRegExp(/abc/); @@ -2964,9 +2872,7 @@ * _.isRegExp('/abc/'); * // => false */ - function isRegExp(value) { - return isObject(value) && objectToString.call(value) == regexpTag; - } + var isRegExp = baseIsRegExp; /** * Checks if `value` is classified as a `String` primitive or object. @@ -2976,8 +2882,7 @@ * @memberOf _ * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. * @example * * _.isString('abc'); @@ -2988,7 +2893,7 @@ */ function isString(value) { return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); } /** @@ -3045,8 +2950,8 @@ /** * Converts `value` to an integer. * - * **Note:** This function is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ @@ -3056,7 +2961,7 @@ * @returns {number} Returns the converted integer. * @example * - * _.toInteger(3); + * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); @@ -3065,7 +2970,7 @@ * _.toInteger(Infinity); * // => 1.7976931348623157e+308 * - * _.toInteger('3'); + * _.toInteger('3.2'); * // => 3 */ var toInteger = Number; @@ -3081,8 +2986,8 @@ * @returns {number} Returns the number. * @example * - * _.toNumber(3); - * // => 3 + * _.toNumber(3.2); + * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 @@ -3090,8 +2995,8 @@ * _.toNumber(Infinity); * // => Infinity * - * _.toNumber('3'); - * // => 3 + * _.toNumber('3.2'); + * // => 3.2 */ var toNumber = Number; @@ -3103,8 +3008,8 @@ * @memberOf _ * @since 4.0.0 * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. * @example * * _.toString(null); @@ -3144,21 +3049,21 @@ * @example * * function Foo() { - * this.c = 3; + * this.a = 1; * } * * function Bar() { - * this.e = 5; + * this.c = 3; * } * - * Foo.prototype.d = 4; - * Bar.prototype.f = 6; + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; * - * _.assign({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3, 'e': 5 } + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } */ var assign = createAssigner(function(object, source) { - copyObject(source, keys(source), object); + copyObject(source, nativeKeys(source), object); }); /** @@ -3179,21 +3084,21 @@ * @example * * function Foo() { - * this.b = 2; + * this.a = 1; * } * * function Bar() { - * this.d = 4; + * this.c = 3; * } * - * Foo.prototype.c = 3; - * Bar.prototype.e = 5; + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; * - * _.assignIn({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 } + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } */ var assignIn = createAssigner(function(object, source) { - copyObject(source, keysIn(source), object); + copyObject(source, nativeKeysIn(source), object); }); /** @@ -3265,7 +3170,7 @@ */ function create(prototype, properties) { var result = baseCreate(prototype); - return properties ? assign(result, properties) : result; + return properties == null ? result : assign(result, properties); } /** @@ -3286,10 +3191,10 @@ * @see _.defaultsDeep * @example * - * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } */ - var defaults = rest(function(args) { + var defaults = baseRest(function(args) { args.push(undefined, assignInDefaults); return assignInWith.apply(undefined, args); }); @@ -3329,7 +3234,7 @@ * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static @@ -3353,25 +3258,7 @@ * _.keys('hi'); * // => ['0', '1'] */ - function keys(object) { - var isProto = isPrototype(object); - if (!(isProto || isArrayLike(object))) { - return baseKeys(object); - } - var indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; - - for (var key in object) { - if (hasOwnProperty.call(object, key) && - !(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(isProto && key == 'constructor')) { - result.push(key); - } - } - return result; - } + var keys = nativeKeys; /** * Creates an array of the own and inherited enumerable property names of `object`. @@ -3396,25 +3283,7 @@ * _.keysIn(new Foo); * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ - function keysIn(object) { - var index = -1, - isProto = isPrototype(object), - props = baseKeysIn(object), - propsLength = props.length, - indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; - - while (++index < propsLength) { - var key = props[index]; - if (!(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; - } + var keysIn = nativeKeysIn; /** * Creates an object composed of the picked `object` properties. @@ -3424,7 +3293,7 @@ * @memberOf _ * @category Object * @param {Object} object The source object. - * @param {...(string|string[])} [props] The property identifiers to pick. + * @param {...(string|string[])} [paths] The property paths to pick. * @returns {Object} Returns the new object. * @example * @@ -3433,8 +3302,8 @@ * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ - var pick = rest(function(object, props) { - return object == null ? {} : basePick(object, baseMap(baseFlatten(props, 1), toKey)); + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); }); /** @@ -3501,14 +3370,14 @@ * // => ['h', 'i'] */ function values(object) { - return object ? baseValues(object, keys(object)) : []; + return object == null ? [] : baseValues(object, keys(object)); } /*------------------------------------------------------------------------*/ /** - * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to - * their corresponding HTML entities. + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. * * **Note:** No other characters are escaped. To escape additional * characters use a third-party library like [_he_](https://mths.be/he). @@ -3519,12 +3388,6 @@ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) * (under "semi-related fun fact") for more details. * - * Backticks are escaped because in IE < 9, they can break out of - * attribute values or HTML comments. See [#59](https://html5sec.org/#59), - * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and - * [#133](https://html5sec.org/#133) of the - * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details. - * * When working with HTML you should always * [quote attribute values](http://wonko.com/post/html-escaping) to reduce * XSS vectors. @@ -3550,7 +3413,7 @@ /*------------------------------------------------------------------------*/ /** - * This method returns the first argument given to it. + * This method returns the first argument it receives. * * @static * @since 0.1.0 @@ -3560,9 +3423,9 @@ * @returns {*} Returns `value`. * @example * - * var object = { 'user': 'fred' }; + * var object = { 'a': 1 }; * - * _.identity(object) === object; + * console.log(_.identity(object) === object); * // => true */ function identity(value) { @@ -3616,26 +3479,30 @@ /** * Creates a function that performs a partial deep comparison between a given * object and `source`, returning `true` if the given object has equivalent - * property values, else `false`. The created function is equivalent to - * `_.isMatch` with a `source` partially applied. + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. * - * **Note:** This method supports comparing the same values as `_.isEqual`. + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. * * @static * @memberOf _ * @since 3.0.0 * @category Util * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } * ]; * - * _.filter(users, _.matches({ 'age': 40, 'active': false })); - * // => [{ 'user': 'fred', 'age': 40, 'active': false }] + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] */ function matches(source) { return baseMatches(assign({}, source)); @@ -3734,8 +3601,7 @@ } /** - * A no-operation function that returns `undefined` regardless of the - * arguments it receives. + * This method returns `undefined`. * * @static * @memberOf _ @@ -3743,10 +3609,8 @@ * @category Util * @example * - * var object = { 'user': 'fred' }; - * - * _.noop(object) === undefined; - * // => true + * _.times(2, _.noop); + * // => [undefined, undefined] */ function noop() { // No operation performed. @@ -3947,27 +3811,24 @@ /*--------------------------------------------------------------------------*/ - // Expose Lodash on the free variable `window` or `self` when available so it's - // globally accessible, even when bundled with Browserify, Webpack, etc. This - // also prevents errors in cases where Lodash is loaded by a script tag in the - // presence of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch - // for more details. Use `_.noConflict` to remove Lodash from the global object. - (freeWindow || freeSelf || {})._ = lodash; - - // Some AMD build optimizers like r.js check for condition patterns like the following: + // Some AMD build optimizers, like r.js, check for condition patterns like: if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = lodash; + // Define as an anonymous module so, through path mapping, it can be // referenced as the "underscore" module. define(function() { return lodash; }); } - // Check for `exports` after `define` in case a build optimizer adds an `exports` object. - else if (freeExports && freeModule) { + // Check for `exports` after `define` in case a build optimizer adds it. + else if (freeModule) { // Export for Node.js. - if (moduleExports) { - (freeModule.exports = lodash)._ = lodash; - } + (freeModule.exports = lodash)._ = lodash; // Export for CommonJS support. freeExports._ = lodash; } diff --git a/node_modules/lodash/core.min.js b/node_modules/lodash/core.min.js index af9a225..ee223b2 100644 --- a/node_modules/lodash/core.min.js +++ b/node_modules/lodash/core.min.js @@ -1,30 +1,29 @@ /** * @license - * lodash 4.11.2 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE * Build: `lodash core -o ./dist/lodash.core.js` */ -;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n,t,r){var e;return r(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e}function r(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function e(n,t){return O(t,function(t){return n[t]})}function u(n){return n&&n.Object===Object?n:null}function o(n){return gn[n]}function i(n){var t=false;if(null!=n&&typeof n.toString!="function")try{t=!!(n+"")}catch(r){}return t}function c(n){return n instanceof f?n:new f(n)}function f(n,t){ -this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function a(n,t,r,e){var u;return(u=n===pn)||(u=En[r],u=(n===u||n!==n&&u!==u)&&!kn.call(e,r)),u?t:n}function l(n){return nn(n)?Bn(n):{}}function p(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(pn,r)},t)}function s(n,t){var r=true;return zn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function h(n,t,r){for(var e=-1,u=n.length;++e0&&e(f)?r>1?y(f,r-1,e,u,o):n(o,f):u||(o[o.length]=f)}return o}function g(n,t){return n&&Cn(n,t,on)}function b(n,t){return v(t,function(t){return Y(n[t])})}function _(n,t){return n>t}function d(n,t,r,e,u){return n===t?true:null==n||null==t||!nn(n)&&!tn(t)?n!==n&&t!==t:j(n,t,d,r,e,u)}function j(n,t,r,e,u,o){var c=Vn(n),f=Vn(t),a="[object Array]",l="[object Array]"; -c||(a=Sn.call(n),a="[object Arguments]"==a?"[object Object]":a),f||(l=Sn.call(t),l="[object Arguments]"==l?"[object Object]":l);var p="[object Object]"==a&&!i(n),f="[object Object]"==l&&!i(t),l=a==l;o||(o=[]);var s=U(o,function(t){return t[0]===n});return s&&s[1]?s[1]==t:(o.push([n,t]),l&&!p?(r=c||isTypedArray(n)?$(n,t,r,e,u,o):q(n,t,a),o.pop(),r):2&u||(c=p&&kn.call(n,"__wrapped__"),a=f&&kn.call(t,"__wrapped__"),!c&&!a)?l?(r=z(n,t,r,e,u,o),o.pop(),r):false:(c=c?n.value():n,t=a?t.value():t,r=r(c,t,e,u,o), -o.pop(),r))}function m(n){return typeof n=="function"?n:null==n?an:(typeof n=="object"?A:k)(n)}function w(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function x(n,t){return t>n}function O(n,t){var r=-1,e=X(n)?Array(n.length):[];return zn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function A(n){var t=on(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&d(n[u],r[u],pn,3)))return false}return true}}function E(n,t){return n=Object(n),H(t,function(t,r){ -return r in n&&(t[r]=n[r]),t},{})}function k(n){return function(t){return null==t?pn:t[n]}}function N(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e1?r[u-1]:pn,o=typeof o=="function"?(u--,o):pn;for(t=Object(t);++ef))return false;for(a=true;++i-1&&0==n%1&&t>n}function M(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||En)}function P(n){return n&&n.length?n[0]:pn}function U(n,r){return t(n,m(r),zn)}function V(n,t){return zn(n,m(t))}function H(n,t,e){ -return r(n,m(t),e,3>arguments.length,zn)}function K(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Hn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=pn),r}}function L(n){var t;if(typeof n!="function")throw new TypeError("Expected a function");return t=qn(t===pn?n.length-1:Hn(t),0),function(){for(var r=arguments,e=-1,u=qn(r.length-t,0),o=Array(u);++e-1&&0==n%1&&9007199254740991>=n}function nn(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function tn(n){return!!n&&typeof n=="object"; -}function rn(n){return typeof n=="number"||tn(n)&&"[object Number]"==Sn.call(n)}function en(n){return typeof n=="string"||!Vn(n)&&tn(n)&&"[object String]"==Sn.call(n)}function un(n){return typeof n=="string"?n:null==n?"":n+""}function on(n){var t=M(n);if(!t&&!X(n))return $n(Object(n));var r,e=C(n),u=!!e,e=e||[],o=e.length;for(r in n)!kn.call(n,r)||u&&("length"==r||J(r,o))||t&&"constructor"==r||e.push(r);return e}function cn(n){for(var t=-1,r=M(n),e=w(n),u=e.length,o=C(n),i=!!o,o=o||[],c=o.length;++t"'`]/g,vn=RegExp(hn.source),yn=/^(?:0|[1-9]\d*)$/,gn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},bn={"function":true,object:true},_n=bn[typeof exports]&&exports&&!exports.nodeType?exports:pn,dn=bn[typeof module]&&module&&!module.nodeType?module:pn,jn=dn&&dn.exports===_n?_n:pn,mn=u(bn[typeof self]&&self),wn=u(bn[typeof window]&&window),xn=u(bn[typeof this]&&this),On=u(_n&&dn&&typeof global=="object"&&global)||wn!==(xn&&xn.window)&&wn||mn||xn||Function("return this")(),An=Array.prototype,En=Object.prototype,kn=En.hasOwnProperty,Nn=0,Sn=En.toString,Tn=On._,Fn=On.Reflect,Rn=Fn?Fn.a:pn,Bn=Object.create,Dn=En.propertyIsEnumerable,In=On.isFinite,$n=Object.keys,qn=Math.max; -f.prototype=l(c.prototype),f.prototype.constructor=f;var zn=function(n,t){return function(r,e){if(null==r)return r;if(!X(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++ot)return t?S(r):[];for(var e=Array(t-1);t--;)e[t-1]=arguments[t];return y(e,1),n(S(r),fn)},c.create=function(n,t){var r=l(n);return t?Ln(r,t):r},c.defaults=Xn,c.defer=Pn,c.delay=Un,c.filter=function(n,t){return v(n,m(t))},c.flatten=function(n){return n&&n.length?y(n,1):[]},c.flattenDeep=function(n){return n&&n.length?y(n,sn):[]},c.iteratee=Zn,c.keys=on,c.map=function(n,t){return O(n,m(t))},c.matches=function(n){return A(Ln({},n))},c.mixin=ln,c.negate=function(n){ -if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},c.once=function(n){return K(2,n)},c.pick=Yn,c.slice=function(n,t,r){var e=n?n.length:0;return r=r===pn?e:+r,e?N(n,null==t?0:+t,r):[]},c.sortBy=function(n,t){var r=0;return t=m(t),O(O(n,function(n,e,u){return{value:n,index:r++,criteria:t(n,e,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==pn,o=null===r,i=r===r,c=e!==pn,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){ -r=1;break n}if(!o&&e>r||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),k("value"))},c.tap=function(n,t){return t(n),n},c.thru=function(n,t){return t(n)},c.toArray=function(n){return X(n)?n.length?S(n):[]:fn(n)},c.values=fn,c.extend=Qn,ln(c,c),c.clone=function(n){return nn(n)?Vn(n)?S(n):R(n,on(n)):n},c.escape=function(n){return(n=un(n))&&vn.test(n)?n.replace(hn,o):n},c.every=function(n,t,r){return t=r?pn:t,s(n,m(t))},c.find=U,c.forEach=V,c.has=function(n,t){return null!=n&&kn.call(n,t); -},c.head=P,c.identity=an,c.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?qn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++rt}function b(n,t,r,e,u){return n===t||(null==n||null==t||!H(n)&&!K(t)?n!==n&&t!==t:g(n,t,r,e,b,u))}function g(n,t,r,e,u,o){var i=Nn(n),c=Nn(t),f="[object Array]",a="[object Array]";i||(f=hn.call(n),f="[object Arguments]"==f?"[object Object]":f),c||(a=hn.call(t),a="[object Arguments]"==a?"[object Object]":a);var l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]); +var p=An(o,function(t){return t[0]==n}),s=An(o,function(n){return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=B(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=M(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 1&r||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=R(n,t,r,e,u,o), +o.pop(),r):(i=i?n.value():n,f=f?t.value():t,r=u(i,f,r,e,o),o.pop(),r)}function _(n){return typeof n=="function"?n:null==n?Y:(typeof n=="object"?m:r)(n)}function j(n,t){return nt&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++ei))return false;for(var c=-1,f=true,a=2&r?[]:nn;++cr?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++rarguments.length,mn); +}function J(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=nn),r}}function M(n,t){return n===t||n!==n&&t!==t}function U(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1=t),t&&!V(n)}function V(n){return!!H(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function H(n){var t=typeof n; +return null!=n&&("object"==t||"function"==t)}function K(n){return null!=n&&typeof n=="object"}function L(n){return typeof n=="number"||K(n)&&"[object Number]"==hn.call(n)}function Q(n){return typeof n=="string"||!Nn(n)&&K(n)&&"[object String]"==hn.call(n)}function W(n){return typeof n=="string"?n:null==n?"":n+""}function X(n){return null==n?[]:u(n,In(n))}function Y(n){return n}function Z(n,r,e){var u=In(r),o=v(r,u);null!=e||H(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=v(r,In(r)));var i=!(H(e)&&"chain"in e&&!e.chain),c=V(n); +return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=E(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var nn,tn=1/0,rn=/[&<>"']/g,en=RegExp(rn.source),un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){ +return function(t){return null==n?nn:n[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,yn=Object.create,bn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return H(t)?yn?yn(t):(n.prototype=t,t=new n,n.prototype=nn,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i; +var mn=function(n,t){return function(r,e){if(null==r)return r;if(!U(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++or&&(r=jn(e+r,0));n:{for(t=_(t),e=n.length,r+=-1;++re||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r { '4': 1, '6': 2 } * + * // The `_.property` iteratee shorthand. * _.countBy(['one', 'two', 'three'], 'length'); * // => { '3': 2, '5': 1 } */ var countBy = createAggregator(function(result, value, key) { - hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1); + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } }); module.exports = countBy; diff --git a/node_modules/lodash/create.js b/node_modules/lodash/create.js index a99067f..919edb8 100644 --- a/node_modules/lodash/create.js +++ b/node_modules/lodash/create.js @@ -37,7 +37,7 @@ var baseAssign = require('./_baseAssign'), */ function create(prototype, properties) { var result = baseCreate(prototype); - return properties ? baseAssign(result, properties) : result; + return properties == null ? result : baseAssign(result, properties); } module.exports = create; diff --git a/node_modules/lodash/curry.js b/node_modules/lodash/curry.js index 2f85624..918db1a 100644 --- a/node_modules/lodash/curry.js +++ b/node_modules/lodash/curry.js @@ -1,7 +1,7 @@ -var createWrapper = require('./_createWrapper'); +var createWrap = require('./_createWrap'); -/** Used to compose bitmasks for wrapper metadata. */ -var CURRY_FLAG = 8; +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_FLAG = 8; /** * Creates a function that accepts arguments of `func` and either invokes @@ -46,7 +46,7 @@ var CURRY_FLAG = 8; */ function curry(func, arity, guard) { arity = guard ? undefined : arity; - var result = createWrapper(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); result.placeholder = curry.placeholder; return result; } diff --git a/node_modules/lodash/curryRight.js b/node_modules/lodash/curryRight.js index d00bfad..c85b6f3 100644 --- a/node_modules/lodash/curryRight.js +++ b/node_modules/lodash/curryRight.js @@ -1,7 +1,7 @@ -var createWrapper = require('./_createWrapper'); +var createWrap = require('./_createWrap'); -/** Used to compose bitmasks for wrapper metadata. */ -var CURRY_RIGHT_FLAG = 16; +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_RIGHT_FLAG = 16; /** * This method is like `_.curry` except that arguments are applied to `func` @@ -43,7 +43,7 @@ var CURRY_RIGHT_FLAG = 16; */ function curryRight(func, arity, guard) { arity = guard ? undefined : arity; - var result = createWrapper(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); result.placeholder = curryRight.placeholder; return result; } diff --git a/node_modules/lodash/debounce.js b/node_modules/lodash/debounce.js index 0fcd6e6..04d7dfd 100644 --- a/node_modules/lodash/debounce.js +++ b/node_modules/lodash/debounce.js @@ -2,7 +2,7 @@ var isObject = require('./isObject'), now = require('./now'), toNumber = require('./toNumber'); -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /* Built-in method references for those with the same name as other `lodash` methods. */ @@ -14,14 +14,18 @@ var nativeMax = Math.max, * milliseconds have elapsed since the last time the debounced function was * invoked. The debounced function comes with a `cancel` method to cancel * delayed `func` invocations and a `flush` method to immediately invoke them. - * Provide an options object to indicate whether `func` should be invoked on - * the leading and/or trailing edge of the `wait` timeout. The `func` is invoked - * with the last arguments provided to the debounced function. Subsequent calls - * to the debounced function return the result of the last `func` invocation. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. * - * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the debounced function is - * invoked more than once during the `wait` timeout. + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.debounce` and `_.throttle`. @@ -65,7 +69,7 @@ function debounce(func, wait, options) { maxWait, result, timerId, - lastCallTime = 0, + lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, @@ -116,7 +120,7 @@ function debounce(func, wait, options) { // Either this is the first call, activity has stopped and we're at the // trailing edge, the system time has gone backwards and we're treating // it as the trailing edge, or we've hit the `maxWait` limit. - return (!lastCallTime || (timeSinceLastCall >= wait) || + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); } @@ -130,7 +134,6 @@ function debounce(func, wait, options) { } function trailingEdge(time) { - clearTimeout(timerId); timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has been @@ -146,8 +149,8 @@ function debounce(func, wait, options) { if (timerId !== undefined) { clearTimeout(timerId); } - lastCallTime = lastInvokeTime = 0; - lastArgs = lastThis = timerId = undefined; + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; } function flush() { @@ -168,7 +171,6 @@ function debounce(func, wait, options) { } if (maxing) { // Handle invocations in a tight loop. - clearTimeout(timerId); timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } diff --git a/node_modules/lodash/deburr.js b/node_modules/lodash/deburr.js index 6862072..f85e314 100644 --- a/node_modules/lodash/deburr.js +++ b/node_modules/lodash/deburr.js @@ -1,15 +1,17 @@ var deburrLetter = require('./_deburrLetter'), toString = require('./toString'); -/** Used to match latin-1 supplementary letters (excluding mathematical operators). */ -var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g; +/** Used to match Latin Unicode letters (excluding mathematical operators). */ +var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; /** Used to compose unicode character classes. */ -var rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', - rsComboSymbolsRange = '\\u20d0-\\u20f0'; +var rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; /** Used to compose unicode capture groups. */ -var rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']'; +var rsCombo = '[' + rsComboRange + ']'; /** * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and @@ -19,8 +21,9 @@ var reComboMark = RegExp(rsCombo, 'g'); /** * Deburrs `string` by converting - * [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) - * to basic latin letters and removing + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). * * @static @@ -36,7 +39,7 @@ var reComboMark = RegExp(rsCombo, 'g'); */ function deburr(string) { string = toString(string); - return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, ''); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); } module.exports = deburr; diff --git a/node_modules/lodash/defaultTo.js b/node_modules/lodash/defaultTo.js new file mode 100644 index 0000000..5b33359 --- /dev/null +++ b/node_modules/lodash/defaultTo.js @@ -0,0 +1,25 @@ +/** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ +function defaultTo(value, defaultValue) { + return (value == null || value !== value) ? defaultValue : value; +} + +module.exports = defaultTo; diff --git a/node_modules/lodash/defaults.js b/node_modules/lodash/defaults.js index 099d2e9..5333b42 100644 --- a/node_modules/lodash/defaults.js +++ b/node_modules/lodash/defaults.js @@ -1,7 +1,7 @@ var apply = require('./_apply'), assignInDefaults = require('./_assignInDefaults'), assignInWith = require('./assignInWith'), - rest = require('./rest'); + baseRest = require('./_baseRest'); /** * Assigns own and inherited enumerable string keyed properties of source @@ -21,10 +21,10 @@ var apply = require('./_apply'), * @see _.defaultsDeep * @example * - * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } */ -var defaults = rest(function(args) { +var defaults = baseRest(function(args) { args.push(undefined, assignInDefaults); return apply(assignInWith, undefined, args); }); diff --git a/node_modules/lodash/defaultsDeep.js b/node_modules/lodash/defaultsDeep.js index b6447f7..41680ed 100644 --- a/node_modules/lodash/defaultsDeep.js +++ b/node_modules/lodash/defaultsDeep.js @@ -1,7 +1,7 @@ var apply = require('./_apply'), + baseRest = require('./_baseRest'), mergeDefaults = require('./_mergeDefaults'), - mergeWith = require('./mergeWith'), - rest = require('./rest'); + mergeWith = require('./mergeWith'); /** * This method is like `_.defaults` except that it recursively assigns @@ -19,11 +19,10 @@ var apply = require('./_apply'), * @see _.defaults * @example * - * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } }); - * // => { 'user': { 'name': 'barney', 'age': 36 } } - * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } */ -var defaultsDeep = rest(function(args) { +var defaultsDeep = baseRest(function(args) { args.push(undefined, mergeDefaults); return apply(mergeWith, undefined, args); }); diff --git a/node_modules/lodash/defer.js b/node_modules/lodash/defer.js index b096f71..f6d6c6f 100644 --- a/node_modules/lodash/defer.js +++ b/node_modules/lodash/defer.js @@ -1,5 +1,5 @@ var baseDelay = require('./_baseDelay'), - rest = require('./rest'); + baseRest = require('./_baseRest'); /** * Defers invoking the `func` until the current call stack has cleared. Any @@ -17,9 +17,9 @@ var baseDelay = require('./_baseDelay'), * _.defer(function(text) { * console.log(text); * }, 'deferred'); - * // => Logs 'deferred' after one or more milliseconds. + * // => Logs 'deferred' after one millisecond. */ -var defer = rest(function(func, args) { +var defer = baseRest(function(func, args) { return baseDelay(func, 1, args); }); diff --git a/node_modules/lodash/delay.js b/node_modules/lodash/delay.js index cac90a9..bd55479 100644 --- a/node_modules/lodash/delay.js +++ b/node_modules/lodash/delay.js @@ -1,5 +1,5 @@ var baseDelay = require('./_baseDelay'), - rest = require('./rest'), + baseRest = require('./_baseRest'), toNumber = require('./toNumber'); /** @@ -21,7 +21,7 @@ var baseDelay = require('./_baseDelay'), * }, 1000, 'later'); * // => Logs 'later' after one second. */ -var delay = rest(function(func, wait, args) { +var delay = baseRest(function(func, wait, args) { return baseDelay(func, toNumber(wait) || 0, args); }); diff --git a/node_modules/lodash/difference.js b/node_modules/lodash/difference.js index 65fdb1a..fa28bb3 100644 --- a/node_modules/lodash/difference.js +++ b/node_modules/lodash/difference.js @@ -1,13 +1,15 @@ var baseDifference = require('./_baseDifference'), baseFlatten = require('./_baseFlatten'), - isArrayLikeObject = require('./isArrayLikeObject'), - rest = require('./rest'); + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'); /** - * Creates an array of unique `array` values not included in the other given - * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. The order of result values is determined by the - * order they occur in the first array. + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. * * @static * @memberOf _ @@ -19,10 +21,10 @@ var baseDifference = require('./_baseDifference'), * @see _.without, _.xor * @example * - * _.difference([3, 2, 1], [4, 2]); - * // => [3, 1] + * _.difference([2, 1], [2, 3]); + * // => [1] */ -var difference = rest(function(array, values) { +var difference = baseRest(function(array, values) { return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : []; diff --git a/node_modules/lodash/differenceBy.js b/node_modules/lodash/differenceBy.js index 7ec2ae8..2cd63e7 100644 --- a/node_modules/lodash/differenceBy.js +++ b/node_modules/lodash/differenceBy.js @@ -1,15 +1,18 @@ var baseDifference = require('./_baseDifference'), baseFlatten = require('./_baseFlatten'), baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.difference` except that it accepts `iteratee` which * is invoked for each element of `array` and `values` to generate the criterion - * by which they're compared. Result values are chosen from the first array. - * The iteratee is invoked with one argument: (value). + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. * * @static * @memberOf _ @@ -17,25 +20,24 @@ var baseDifference = require('./_baseDifference'), * @category Array * @param {Array} array The array to inspect. * @param {...Array} [values] The values to exclude. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of filtered values. * @example * - * _.differenceBy([3.1, 2.2, 1.3], [4.4, 2.5], Math.floor); - * // => [3.1, 1.3] + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] * * // The `_.property` iteratee shorthand. * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); * // => [{ 'x': 2 }] */ -var differenceBy = rest(function(array, values) { +var differenceBy = baseRest(function(array, values) { var iteratee = last(values); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee)) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2)) : []; }); diff --git a/node_modules/lodash/differenceWith.js b/node_modules/lodash/differenceWith.js index 6ae8986..c0233f4 100644 --- a/node_modules/lodash/differenceWith.js +++ b/node_modules/lodash/differenceWith.js @@ -1,14 +1,16 @@ var baseDifference = require('./_baseDifference'), baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.difference` except that it accepts `comparator` - * which is invoked to compare elements of `array` to `values`. Result values - * are chosen from the first array. The comparator is invoked with two arguments: - * (arrVal, othVal). + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. * * @static * @memberOf _ @@ -25,7 +27,7 @@ var baseDifference = require('./_baseDifference'), * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); * // => [{ 'x': 2, 'y': 1 }] */ -var differenceWith = rest(function(array, values) { +var differenceWith = baseRest(function(array, values) { var comparator = last(values); if (isArrayLikeObject(comparator)) { comparator = undefined; diff --git a/node_modules/lodash/divide.js b/node_modules/lodash/divide.js index 2889d79..8cae0cd 100644 --- a/node_modules/lodash/divide.js +++ b/node_modules/lodash/divide.js @@ -17,6 +17,6 @@ var createMathOperation = require('./_createMathOperation'); */ var divide = createMathOperation(function(dividend, divisor) { return dividend / divisor; -}); +}, 1); module.exports = divide; diff --git a/node_modules/lodash/drop.js b/node_modules/lodash/drop.js index 6124ef7..d5c3cba 100644 --- a/node_modules/lodash/drop.js +++ b/node_modules/lodash/drop.js @@ -27,7 +27,7 @@ var baseSlice = require('./_baseSlice'), * // => [1, 2, 3] */ function drop(array, n, guard) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } diff --git a/node_modules/lodash/dropRight.js b/node_modules/lodash/dropRight.js index 8aa3576..441fe99 100644 --- a/node_modules/lodash/dropRight.js +++ b/node_modules/lodash/dropRight.js @@ -27,7 +27,7 @@ var baseSlice = require('./_baseSlice'), * // => [1, 2, 3] */ function dropRight(array, n, guard) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } diff --git a/node_modules/lodash/dropRightWhile.js b/node_modules/lodash/dropRightWhile.js index 98f457b..9ad36a0 100644 --- a/node_modules/lodash/dropRightWhile.js +++ b/node_modules/lodash/dropRightWhile.js @@ -11,8 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * diff --git a/node_modules/lodash/dropWhile.js b/node_modules/lodash/dropWhile.js index 94f76e0..903ef56 100644 --- a/node_modules/lodash/dropWhile.js +++ b/node_modules/lodash/dropWhile.js @@ -11,8 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * diff --git a/node_modules/lodash/endsWith.js b/node_modules/lodash/endsWith.js index f143f6e..76fc866 100644 --- a/node_modules/lodash/endsWith.js +++ b/node_modules/lodash/endsWith.js @@ -10,9 +10,9 @@ var baseClamp = require('./_baseClamp'), * @memberOf _ * @since 3.0.0 * @category String - * @param {string} [string=''] The string to search. + * @param {string} [string=''] The string to inspect. * @param {string} [target] The string to search for. - * @param {number} [position=string.length] The position to search from. + * @param {number} [position=string.length] The position to search up to. * @returns {boolean} Returns `true` if `string` ends with `target`, * else `false`. * @example @@ -35,8 +35,9 @@ function endsWith(string, target, position) { ? length : baseClamp(toInteger(position), 0, length); + var end = position; position -= target.length; - return position >= 0 && string.indexOf(target, position) == position; + return position >= 0 && string.slice(position, end) == target; } module.exports = endsWith; diff --git a/node_modules/lodash/eq.js b/node_modules/lodash/eq.js index e9445d4..a940688 100644 --- a/node_modules/lodash/eq.js +++ b/node_modules/lodash/eq.js @@ -1,6 +1,6 @@ /** * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static @@ -12,8 +12,8 @@ * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.eq(object, object); * // => true diff --git a/node_modules/lodash/escape.js b/node_modules/lodash/escape.js index 176417c..9247e00 100644 --- a/node_modules/lodash/escape.js +++ b/node_modules/lodash/escape.js @@ -2,12 +2,12 @@ var escapeHtmlChar = require('./_escapeHtmlChar'), toString = require('./toString'); /** Used to match HTML entities and HTML characters. */ -var reUnescapedHtml = /[&<>"'`]/g, +var reUnescapedHtml = /[&<>"']/g, reHasUnescapedHtml = RegExp(reUnescapedHtml.source); /** - * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to - * their corresponding HTML entities. + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. * * **Note:** No other characters are escaped. To escape additional * characters use a third-party library like [_he_](https://mths.be/he). @@ -18,12 +18,6 @@ var reUnescapedHtml = /[&<>"'`]/g, * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) * (under "semi-related fun fact") for more details. * - * Backticks are escaped because in IE < 9, they can break out of - * attribute values or HTML comments. See [#59](https://html5sec.org/#59), - * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and - * [#133](https://html5sec.org/#133) of the - * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details. - * * When working with HTML you should always * [quote attribute values](http://wonko.com/post/html-escaping) to reduce * XSS vectors. diff --git a/node_modules/lodash/escapeRegExp.js b/node_modules/lodash/escapeRegExp.js index fe51960..0a58c69 100644 --- a/node_modules/lodash/escapeRegExp.js +++ b/node_modules/lodash/escapeRegExp.js @@ -2,7 +2,7 @@ var toString = require('./toString'); /** * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source); diff --git a/node_modules/lodash/every.js b/node_modules/lodash/every.js index 14f68e7..25080da 100644 --- a/node_modules/lodash/every.js +++ b/node_modules/lodash/every.js @@ -9,13 +9,17 @@ var arrayEvery = require('./_arrayEvery'), * Iteration is stopped once `predicate` returns falsey. The predicate is * invoked with three arguments: (value, index|key, collection). * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if all elements pass the predicate check, * else `false`. diff --git a/node_modules/lodash/fill.js b/node_modules/lodash/fill.js index 5730b7d..ae13aa1 100644 --- a/node_modules/lodash/fill.js +++ b/node_modules/lodash/fill.js @@ -31,7 +31,7 @@ var baseFill = require('./_baseFill'), * // => [4, '*', '*', 10] */ function fill(array, value, start, end) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } diff --git a/node_modules/lodash/filter.js b/node_modules/lodash/filter.js index 98e3a96..52616be 100644 --- a/node_modules/lodash/filter.js +++ b/node_modules/lodash/filter.js @@ -8,13 +8,14 @@ var arrayFilter = require('./_arrayFilter'), * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * + * **Note:** Unlike `_.remove`, this method returns a new array. + * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.reject * @example diff --git a/node_modules/lodash/find.js b/node_modules/lodash/find.js index 83f0dba..de732cc 100644 --- a/node_modules/lodash/find.js +++ b/node_modules/lodash/find.js @@ -1,8 +1,5 @@ -var baseEach = require('./_baseEach'), - baseFind = require('./_baseFind'), - baseFindIndex = require('./_baseFindIndex'), - baseIteratee = require('./_baseIteratee'), - isArray = require('./isArray'); +var createFind = require('./_createFind'), + findIndex = require('./findIndex'); /** * Iterates over elements of `collection`, returning the first element @@ -13,9 +10,9 @@ var baseEach = require('./_baseEach'), * @memberOf _ * @since 0.1.0 * @category Collection - * @param {Array|Object} collection The collection to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * @@ -40,13 +37,6 @@ var baseEach = require('./_baseEach'), * _.find(users, 'active'); * // => object for 'barney' */ -function find(collection, predicate) { - predicate = baseIteratee(predicate, 3); - if (isArray(collection)) { - var index = baseFindIndex(collection, predicate); - return index > -1 ? collection[index] : undefined; - } - return baseFind(collection, predicate, baseEach); -} +var find = createFind(findIndex); module.exports = find; diff --git a/node_modules/lodash/findIndex.js b/node_modules/lodash/findIndex.js index 84acc74..4689069 100644 --- a/node_modules/lodash/findIndex.js +++ b/node_modules/lodash/findIndex.js @@ -1,5 +1,9 @@ var baseFindIndex = require('./_baseFindIndex'), - baseIteratee = require('./_baseIteratee'); + baseIteratee = require('./_baseIteratee'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; /** * This method is like `_.find` except that it returns the index of the first @@ -9,9 +13,9 @@ var baseFindIndex = require('./_baseFindIndex'), * @memberOf _ * @since 1.1.0 * @category Array - * @param {Array} array The array to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * @@ -36,10 +40,16 @@ var baseFindIndex = require('./_baseFindIndex'), * _.findIndex(users, 'active'); * // => 2 */ -function findIndex(array, predicate) { - return (array && array.length) - ? baseFindIndex(array, baseIteratee(predicate, 3)) - : -1; +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index); } module.exports = findIndex; diff --git a/node_modules/lodash/findKey.js b/node_modules/lodash/findKey.js index 16a9fd9..cac0248 100644 --- a/node_modules/lodash/findKey.js +++ b/node_modules/lodash/findKey.js @@ -1,4 +1,4 @@ -var baseFind = require('./_baseFind'), +var baseFindKey = require('./_baseFindKey'), baseForOwn = require('./_baseForOwn'), baseIteratee = require('./_baseIteratee'); @@ -10,9 +10,8 @@ var baseFind = require('./_baseFind'), * @memberOf _ * @since 1.1.0 * @category Object - * @param {Object} object The object to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {string|undefined} Returns the key of the matched element, * else `undefined`. * @example @@ -39,7 +38,7 @@ var baseFind = require('./_baseFind'), * // => 'barney' */ function findKey(object, predicate) { - return baseFind(object, baseIteratee(predicate, 3), baseForOwn, true); + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn); } module.exports = findKey; diff --git a/node_modules/lodash/findLast.js b/node_modules/lodash/findLast.js index d222a55..70b4271 100644 --- a/node_modules/lodash/findLast.js +++ b/node_modules/lodash/findLast.js @@ -1,8 +1,5 @@ -var baseEachRight = require('./_baseEachRight'), - baseFind = require('./_baseFind'), - baseFindIndex = require('./_baseFindIndex'), - baseIteratee = require('./_baseIteratee'), - isArray = require('./isArray'); +var createFind = require('./_createFind'), + findLastIndex = require('./findLastIndex'); /** * This method is like `_.find` except that it iterates over elements of @@ -12,9 +9,9 @@ var baseEachRight = require('./_baseEachRight'), * @memberOf _ * @since 2.0.0 * @category Collection - * @param {Array|Object} collection The collection to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * @@ -23,13 +20,6 @@ var baseEachRight = require('./_baseEachRight'), * }); * // => 3 */ -function findLast(collection, predicate) { - predicate = baseIteratee(predicate, 3); - if (isArray(collection)) { - var index = baseFindIndex(collection, predicate, true); - return index > -1 ? collection[index] : undefined; - } - return baseFind(collection, predicate, baseEachRight); -} +var findLast = createFind(findLastIndex); module.exports = findLast; diff --git a/node_modules/lodash/findLastIndex.js b/node_modules/lodash/findLastIndex.js index bf397d8..7da3431 100644 --- a/node_modules/lodash/findLastIndex.js +++ b/node_modules/lodash/findLastIndex.js @@ -1,5 +1,10 @@ var baseFindIndex = require('./_baseFindIndex'), - baseIteratee = require('./_baseIteratee'); + baseIteratee = require('./_baseIteratee'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; /** * This method is like `_.findIndex` except that it iterates over elements @@ -9,9 +14,9 @@ var baseFindIndex = require('./_baseFindIndex'), * @memberOf _ * @since 2.0.0 * @category Array - * @param {Array} array The array to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * @@ -36,10 +41,19 @@ var baseFindIndex = require('./_baseFindIndex'), * _.findLastIndex(users, 'active'); * // => 0 */ -function findLastIndex(array, predicate) { - return (array && array.length) - ? baseFindIndex(array, baseIteratee(predicate, 3), true) - : -1; +function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index, true); } module.exports = findLastIndex; diff --git a/node_modules/lodash/findLastKey.js b/node_modules/lodash/findLastKey.js index fb915df..66fb9fb 100644 --- a/node_modules/lodash/findLastKey.js +++ b/node_modules/lodash/findLastKey.js @@ -1,4 +1,4 @@ -var baseFind = require('./_baseFind'), +var baseFindKey = require('./_baseFindKey'), baseForOwnRight = require('./_baseForOwnRight'), baseIteratee = require('./_baseIteratee'); @@ -10,9 +10,8 @@ var baseFind = require('./_baseFind'), * @memberOf _ * @since 2.0.0 * @category Object - * @param {Object} object The object to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {string|undefined} Returns the key of the matched element, * else `undefined`. * @example @@ -39,7 +38,7 @@ var baseFind = require('./_baseFind'), * // => 'pebbles' */ function findLastKey(object, predicate) { - return baseFind(object, baseIteratee(predicate, 3), baseForOwnRight, true); + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight); } module.exports = findLastKey; diff --git a/node_modules/lodash/first.js b/node_modules/lodash/first.js new file mode 100644 index 0000000..53f4ad1 --- /dev/null +++ b/node_modules/lodash/first.js @@ -0,0 +1 @@ +module.exports = require('./head'); diff --git a/node_modules/lodash/flatMap.js b/node_modules/lodash/flatMap.js index f830749..e668506 100644 --- a/node_modules/lodash/flatMap.js +++ b/node_modules/lodash/flatMap.js @@ -11,8 +11,7 @@ var baseFlatten = require('./_baseFlatten'), * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new flattened array. * @example * diff --git a/node_modules/lodash/flatMapDeep.js b/node_modules/lodash/flatMapDeep.js index 3808262..4653d60 100644 --- a/node_modules/lodash/flatMapDeep.js +++ b/node_modules/lodash/flatMapDeep.js @@ -13,8 +13,7 @@ var INFINITY = 1 / 0; * @since 4.7.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new flattened array. * @example * diff --git a/node_modules/lodash/flatMapDepth.js b/node_modules/lodash/flatMapDepth.js index d528bff..6d72005 100644 --- a/node_modules/lodash/flatMapDepth.js +++ b/node_modules/lodash/flatMapDepth.js @@ -11,8 +11,7 @@ var baseFlatten = require('./_baseFlatten'), * @since 4.7.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {number} [depth=1] The maximum recursion depth. * @returns {Array} Returns the new flattened array. * @example diff --git a/node_modules/lodash/flatten.js b/node_modules/lodash/flatten.js index bd4f439..3f09f7f 100644 --- a/node_modules/lodash/flatten.js +++ b/node_modules/lodash/flatten.js @@ -15,7 +15,7 @@ var baseFlatten = require('./_baseFlatten'); * // => [1, 2, [3, [4]], 5] */ function flatten(array) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? baseFlatten(array, 1) : []; } diff --git a/node_modules/lodash/flattenDeep.js b/node_modules/lodash/flattenDeep.js index c20c781..8ad585c 100644 --- a/node_modules/lodash/flattenDeep.js +++ b/node_modules/lodash/flattenDeep.js @@ -18,7 +18,7 @@ var INFINITY = 1 / 0; * // => [1, 2, 3, 4, 5] */ function flattenDeep(array) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? baseFlatten(array, INFINITY) : []; } diff --git a/node_modules/lodash/flattenDepth.js b/node_modules/lodash/flattenDepth.js index a0f4b52..441fdcc 100644 --- a/node_modules/lodash/flattenDepth.js +++ b/node_modules/lodash/flattenDepth.js @@ -22,7 +22,7 @@ var baseFlatten = require('./_baseFlatten'), * // => [1, 2, 3, [4], 5] */ function flattenDepth(array, depth) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } diff --git a/node_modules/lodash/flip.js b/node_modules/lodash/flip.js index 82f796c..c28dd78 100644 --- a/node_modules/lodash/flip.js +++ b/node_modules/lodash/flip.js @@ -1,7 +1,7 @@ -var createWrapper = require('./_createWrapper'); +var createWrap = require('./_createWrap'); -/** Used to compose bitmasks for wrapper metadata. */ -var FLIP_FLAG = 512; +/** Used to compose bitmasks for function metadata. */ +var WRAP_FLIP_FLAG = 512; /** * Creates a function that invokes `func` with arguments reversed. @@ -11,7 +11,7 @@ var FLIP_FLAG = 512; * @since 4.0.0 * @category Function * @param {Function} func The function to flip arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new flipped function. * @example * * var flipped = _.flip(function() { @@ -22,7 +22,7 @@ var FLIP_FLAG = 512; * // => ['d', 'c', 'b', 'a'] */ function flip(func) { - return createWrapper(func, FLIP_FLAG); + return createWrap(func, WRAP_FLIP_FLAG); } module.exports = flip; diff --git a/node_modules/lodash/flow.js b/node_modules/lodash/flow.js index 2cfec17..74b6b62 100644 --- a/node_modules/lodash/flow.js +++ b/node_modules/lodash/flow.js @@ -9,8 +9,8 @@ var createFlow = require('./_createFlow'); * @memberOf _ * @since 3.0.0 * @category Util - * @param {...(Function|Function[])} [funcs] Functions to invoke. - * @returns {Function} Returns the new function. + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. * @see _.flowRight * @example * @@ -18,7 +18,7 @@ var createFlow = require('./_createFlow'); * return n * n; * } * - * var addSquare = _.flow(_.add, square); + * var addSquare = _.flow([_.add, square]); * addSquare(1, 2); * // => 9 */ diff --git a/node_modules/lodash/flowRight.js b/node_modules/lodash/flowRight.js index bd867c9..1146141 100644 --- a/node_modules/lodash/flowRight.js +++ b/node_modules/lodash/flowRight.js @@ -8,8 +8,8 @@ var createFlow = require('./_createFlow'); * @since 3.0.0 * @memberOf _ * @category Util - * @param {...(Function|Function[])} [funcs] Functions to invoke. - * @returns {Function} Returns the new function. + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. * @see _.flow * @example * @@ -17,7 +17,7 @@ var createFlow = require('./_createFlow'); * return n * n; * } * - * var addSquare = _.flowRight(square, _.add); + * var addSquare = _.flowRight([square, _.add]); * addSquare(1, 2); * // => 9 */ diff --git a/node_modules/lodash/forEach.js b/node_modules/lodash/forEach.js index 7430418..c64eaa7 100644 --- a/node_modules/lodash/forEach.js +++ b/node_modules/lodash/forEach.js @@ -1,6 +1,6 @@ var arrayEach = require('./_arrayEach'), baseEach = require('./_baseEach'), - baseIteratee = require('./_baseIteratee'), + castFunction = require('./_castFunction'), isArray = require('./isArray'); /** @@ -23,7 +23,7 @@ var arrayEach = require('./_arrayEach'), * @see _.forEachRight * @example * - * _([1, 2]).forEach(function(value) { + * _.forEach([1, 2], function(value) { * console.log(value); * }); * // => Logs `1` then `2`. @@ -34,9 +34,8 @@ var arrayEach = require('./_arrayEach'), * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forEach(collection, iteratee) { - return (typeof iteratee == 'function' && isArray(collection)) - ? arrayEach(collection, iteratee) - : baseEach(collection, baseIteratee(iteratee)); + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, castFunction(iteratee)); } module.exports = forEach; diff --git a/node_modules/lodash/forEachRight.js b/node_modules/lodash/forEachRight.js index bcac84c..7390eba 100644 --- a/node_modules/lodash/forEachRight.js +++ b/node_modules/lodash/forEachRight.js @@ -1,6 +1,6 @@ var arrayEachRight = require('./_arrayEachRight'), baseEachRight = require('./_baseEachRight'), - baseIteratee = require('./_baseIteratee'), + castFunction = require('./_castFunction'), isArray = require('./isArray'); /** @@ -24,9 +24,8 @@ var arrayEachRight = require('./_arrayEachRight'), * // => Logs `2` then `1`. */ function forEachRight(collection, iteratee) { - return (typeof iteratee == 'function' && isArray(collection)) - ? arrayEachRight(collection, iteratee) - : baseEachRight(collection, baseIteratee(iteratee)); + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, castFunction(iteratee)); } module.exports = forEachRight; diff --git a/node_modules/lodash/forIn.js b/node_modules/lodash/forIn.js index 8dd75dd..583a596 100644 --- a/node_modules/lodash/forIn.js +++ b/node_modules/lodash/forIn.js @@ -1,5 +1,5 @@ var baseFor = require('./_baseFor'), - baseIteratee = require('./_baseIteratee'), + castFunction = require('./_castFunction'), keysIn = require('./keysIn'); /** @@ -33,7 +33,7 @@ var baseFor = require('./_baseFor'), function forIn(object, iteratee) { return object == null ? object - : baseFor(object, baseIteratee(iteratee), keysIn); + : baseFor(object, castFunction(iteratee), keysIn); } module.exports = forIn; diff --git a/node_modules/lodash/forInRight.js b/node_modules/lodash/forInRight.js index e71f563..4aedf58 100644 --- a/node_modules/lodash/forInRight.js +++ b/node_modules/lodash/forInRight.js @@ -1,5 +1,5 @@ var baseForRight = require('./_baseForRight'), - baseIteratee = require('./_baseIteratee'), + castFunction = require('./_castFunction'), keysIn = require('./keysIn'); /** @@ -31,7 +31,7 @@ var baseForRight = require('./_baseForRight'), function forInRight(object, iteratee) { return object == null ? object - : baseForRight(object, baseIteratee(iteratee), keysIn); + : baseForRight(object, castFunction(iteratee), keysIn); } module.exports = forInRight; diff --git a/node_modules/lodash/forOwn.js b/node_modules/lodash/forOwn.js index 1a050ac..94eed84 100644 --- a/node_modules/lodash/forOwn.js +++ b/node_modules/lodash/forOwn.js @@ -1,5 +1,5 @@ var baseForOwn = require('./_baseForOwn'), - baseIteratee = require('./_baseIteratee'); + castFunction = require('./_castFunction'); /** * Iterates over own enumerable string keyed properties of an object and @@ -30,7 +30,7 @@ var baseForOwn = require('./_baseForOwn'), * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forOwn(object, iteratee) { - return object && baseForOwn(object, baseIteratee(iteratee)); + return object && baseForOwn(object, castFunction(iteratee)); } module.exports = forOwn; diff --git a/node_modules/lodash/forOwnRight.js b/node_modules/lodash/forOwnRight.js index 783d958..86f338f 100644 --- a/node_modules/lodash/forOwnRight.js +++ b/node_modules/lodash/forOwnRight.js @@ -1,5 +1,5 @@ var baseForOwnRight = require('./_baseForOwnRight'), - baseIteratee = require('./_baseIteratee'); + castFunction = require('./_castFunction'); /** * This method is like `_.forOwn` except that it iterates over properties of @@ -28,7 +28,7 @@ var baseForOwnRight = require('./_baseForOwnRight'), * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. */ function forOwnRight(object, iteratee) { - return object && baseForOwnRight(object, baseIteratee(iteratee)); + return object && baseForOwnRight(object, castFunction(iteratee)); } module.exports = forOwnRight; diff --git a/node_modules/lodash/fp/F.js b/node_modules/lodash/fp/F.js new file mode 100644 index 0000000..a05a63a --- /dev/null +++ b/node_modules/lodash/fp/F.js @@ -0,0 +1 @@ +module.exports = require('./stubFalse'); diff --git a/node_modules/lodash/fp/T.js b/node_modules/lodash/fp/T.js new file mode 100644 index 0000000..e2ba8ea --- /dev/null +++ b/node_modules/lodash/fp/T.js @@ -0,0 +1 @@ +module.exports = require('./stubTrue'); diff --git a/node_modules/lodash/fp/_baseConvert.js b/node_modules/lodash/fp/_baseConvert.js index e7e631c..c9d3247 100644 --- a/node_modules/lodash/fp/_baseConvert.js +++ b/node_modules/lodash/fp/_baseConvert.js @@ -1,7 +1,9 @@ var mapping = require('./_mapping'), - mutateMap = mapping.mutate, fallbackHolder = require('./placeholder'); +/** Built-in value reference. */ +var push = Array.prototype.push; + /** * Creates a function, with an arity of `n`, that invokes `func` with the * arguments it receives. @@ -62,6 +64,36 @@ function createCloner(func) { }; } +/** + * This function is like `_.spread` except that it includes arguments after those spread. + * + * @private + * @param {Function} func The function to spread arguments over. + * @param {number} start The start position of the spread. + * @returns {Function} Returns the new function. + */ +function spread(func, start) { + return function() { + var length = arguments.length, + args = Array(length); + + while (length--) { + args[length] = arguments[length]; + } + var array = args[start], + lastIndex = args.length - 1, + otherArgs = args.slice(0, start); + + if (array) { + push.apply(otherArgs, array); + } + if (start != lastIndex) { + push.apply(otherArgs, args.slice(start + 1)); + } + return func.apply(this, otherArgs); + }; +} + /** * Creates a function that wraps `func` and uses `cloner` to clone the first * argument it receives. @@ -71,11 +103,11 @@ function createCloner(func) { * @param {Function} cloner The function to clone arguments. * @returns {Function} Returns the new immutable function. */ -function immutWrap(func, cloner) { +function wrapImmutable(func, cloner) { return function() { var length = arguments.length; if (!length) { - return result; + return; } var args = Array(length); while (length--) { @@ -142,7 +174,7 @@ function baseConvert(util, name, func, options) { 'iteratee': util.iteratee, 'keys': util.keys, 'rearg': util.rearg, - 'spread': util.spread, + 'toInteger': util.toInteger, 'toPath': util.toPath }; @@ -155,7 +187,7 @@ function baseConvert(util, name, func, options) { isFunction = helpers.isFunction, keys = helpers.keys, rearg = helpers.rearg, - spread = helpers.spread, + toInteger = helpers.toInteger, toPath = helpers.toPath; var aryMethodKeys = keys(mapping.aryMethod); @@ -189,30 +221,38 @@ function baseConvert(util, name, func, options) { if (!isFunction(func)) { return mixin(func, Object(source)); } - var methods = [], - methodNames = []; - + var pairs = []; each(keys(source), function(key) { - var value = source[key]; - if (isFunction(value)) { - methodNames.push(key); - methods.push(func.prototype[key]); + if (isFunction(source[key])) { + pairs.push([key, func.prototype[key]]); } }); mixin(func, Object(source)); - each(methodNames, function(methodName, index) { - var method = methods[index]; - if (isFunction(method)) { - func.prototype[methodName] = method; + each(pairs, function(pair) { + var value = pair[1]; + if (isFunction(value)) { + func.prototype[pair[0]] = value; } else { - delete func.prototype[methodName]; + delete func.prototype[pair[0]]; } }); return func; }; }, + 'nthArg': function(nthArg) { + return function(n) { + var arity = n < 0 ? 1 : (toInteger(n) + 1); + return curry(nthArg(n), arity); + }; + }, + 'rearg': function(rearg) { + return function(func, indexes) { + var arity = indexes ? indexes.length : 0; + return curry(rearg(func, indexes), arity); + }; + }, 'runInContext': function(runInContext) { return function(context) { return baseConvert(util, runInContext(context), options); @@ -222,6 +262,77 @@ function baseConvert(util, name, func, options) { /*--------------------------------------------------------------------------*/ + /** + * Casts `func` to a function with an arity capped iteratee if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @returns {Function} Returns the cast function. + */ + function castCap(name, func) { + if (config.cap) { + var indexes = mapping.iterateeRearg[name]; + if (indexes) { + return iterateeRearg(func, indexes); + } + var n = !isLib && mapping.iterateeAry[name]; + if (n) { + return iterateeAry(func, n); + } + } + return func; + } + + /** + * Casts `func` to a curried function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castCurry(name, func, n) { + return (forceCurry || (config.curry && n > 1)) + ? curry(func, n) + : func; + } + + /** + * Casts `func` to a fixed arity function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity cap. + * @returns {Function} Returns the cast function. + */ + function castFixed(name, func, n) { + if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { + var data = mapping.methodSpread[name], + start = data && data.start; + + return start === undefined ? ary(func, n) : spread(func, start); + } + return func; + } + + /** + * Casts `func` to an rearged function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castRearg(name, func, n) { + return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name])) + ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n]) + : func; + } + /** * Creates a clone of `object` by `path`. * @@ -235,6 +346,7 @@ function baseConvert(util, name, func, options) { var index = -1, length = path.length, + lastIndex = length - 1, result = clone(Object(object)), nested = result; @@ -243,7 +355,7 @@ function baseConvert(util, name, func, options) { value = nested[key]; if (value != null) { - nested[key] = clone(Object(value)); + nested[path[index]] = clone(index == lastIndex ? value : Object(value)); } nested = nested[key]; } @@ -269,13 +381,16 @@ function baseConvert(util, name, func, options) { * @returns {Function} Returns the new converter function. */ function createConverter(name, func) { - var oldOptions = options; + var realName = mapping.aliasToReal[name] || name, + methodName = mapping.remap[realName] || realName, + oldOptions = options; + return function(options) { var newUtil = isLib ? pristine : helpers, - newFunc = isLib ? pristine[name] : func, + newFunc = isLib ? pristine[methodName] : func, newOptions = assign(assign({}, oldOptions), options); - return baseConvert(newUtil, name, newFunc, newOptions); + return baseConvert(newUtil, realName, newFunc, newOptions); }; } @@ -313,12 +428,11 @@ function baseConvert(util, name, func, options) { } /** - * Creates a function that invokes `func` with its first argument passed - * thru `transform`. + * Creates a function that invokes `func` with its first argument transformed. * * @private * @param {Function} func The function to wrap. - * @param {...Function} transform The functions to transform the first argument. + * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { @@ -347,53 +461,37 @@ function baseConvert(util, name, func, options) { * @returns {Function} Returns the converted function. */ function wrap(name, func) { - name = mapping.aliasToReal[name] || name; - var result, + realName = mapping.aliasToReal[name] || name, wrapped = func, - wrapper = wrappers[name]; + wrapper = wrappers[realName]; if (wrapper) { wrapped = wrapper(func); } else if (config.immutable) { - if (mutateMap.array[name]) { - wrapped = immutWrap(func, cloneArray); + if (mapping.mutate.array[realName]) { + wrapped = wrapImmutable(func, cloneArray); } - else if (mutateMap.object[name]) { - wrapped = immutWrap(func, createCloner(func)); + else if (mapping.mutate.object[realName]) { + wrapped = wrapImmutable(func, createCloner(func)); } - else if (mutateMap.set[name]) { - wrapped = immutWrap(func, cloneByPath); + else if (mapping.mutate.set[realName]) { + wrapped = wrapImmutable(func, cloneByPath); } } each(aryMethodKeys, function(aryKey) { each(mapping.aryMethod[aryKey], function(otherName) { - if (name == otherName) { - var aryN = !isLib && mapping.iterateeAry[name], - reargIndexes = mapping.iterateeRearg[name], - spreadStart = mapping.methodSpread[name]; - - result = wrapped; - if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { - result = spreadStart === undefined - ? ary(result, aryKey) - : spread(result, spreadStart); - } - if (config.rearg && aryKey > 1 && (forceRearg || !mapping.skipRearg[name])) { - result = rearg(result, mapping.methodRearg[name] || mapping.aryRearg[aryKey]); - } - if (config.cap) { - if (reargIndexes) { - result = iterateeRearg(result, reargIndexes); - } else if (aryN) { - result = iterateeAry(result, aryN); - } - } - if (forceCurry || (config.curry && aryKey > 1)) { - forceCurry && console.log(forceCurry, name); - result = curry(result, aryKey); - } + if (realName == otherName) { + var spreadData = mapping.methodSpread[realName], + afterRearg = spreadData && spreadData.afterRearg; + + result = afterRearg + ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) + : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey); + + result = castCap(realName, result); + result = castCurry(realName, result, aryKey); return false; } }); @@ -406,8 +504,8 @@ function baseConvert(util, name, func, options) { return func.apply(this, arguments); }; } - result.convert = createConverter(name, func); - if (mapping.placeholder[name]) { + result.convert = createConverter(realName, func); + if (mapping.placeholder[realName]) { setPlaceholder = true; result.placeholder = func.placeholder = placeholder; } diff --git a/node_modules/lodash/fp/_convertBrowser.js b/node_modules/lodash/fp/_convertBrowser.js index 1874a54..bde030d 100644 --- a/node_modules/lodash/fp/_convertBrowser.js +++ b/node_modules/lodash/fp/_convertBrowser.js @@ -12,7 +12,7 @@ function browserConvert(lodash, options) { return baseConvert(lodash, lodash, options); } -if (typeof _ == 'function') { +if (typeof _ == 'function' && typeof _.runInContext == 'function') { _ = browserConvert(_.runInContext()); } module.exports = browserConvert; diff --git a/node_modules/lodash/fp/_mapping.js b/node_modules/lodash/fp/_mapping.js index 18a3196..cbbcd99 100644 --- a/node_modules/lodash/fp/_mapping.js +++ b/node_modules/lodash/fp/_mapping.js @@ -7,11 +7,20 @@ exports.aliasToReal = { 'entries': 'toPairs', 'entriesIn': 'toPairsIn', 'extend': 'assignIn', + 'extendAll': 'assignInAll', + 'extendAllWith': 'assignInAllWith', 'extendWith': 'assignInWith', 'first': 'head', + // Methods that are curried variants of others. + 'conforms': 'conformsTo', + 'matches': 'isMatch', + 'property': 'get', + // Ramda aliases. '__': 'placeholder', + 'F': 'stubFalse', + 'T': 'stubTrue', 'all': 'every', 'allPass': 'overEvery', 'always': 'constant', @@ -25,8 +34,11 @@ exports.aliasToReal = { 'contains': 'includes', 'dissoc': 'unset', 'dissocPath': 'unset', + 'dropLast': 'dropRight', + 'dropLastWhile': 'dropRightWhile', 'equals': 'isEqual', 'identical': 'eq', + 'indexBy': 'keyBy', 'init': 'initial', 'invertObj': 'invert', 'juxt': 'over', @@ -43,36 +55,44 @@ exports.aliasToReal = { 'propEq': 'matchesProperty', 'propOr': 'getOr', 'props': 'at', + 'symmetricDifference': 'xor', + 'symmetricDifferenceBy': 'xorBy', + 'symmetricDifferenceWith': 'xorWith', + 'takeLast': 'takeRight', + 'takeLastWhile': 'takeRightWhile', 'unapply': 'rest', 'unnest': 'flatten', 'useWith': 'overArgs', - 'whereEq': 'filter', + 'where': 'conformsTo', + 'whereEq': 'isMatch', 'zipObj': 'zipObject' }; /** Used to map ary to method names. */ exports.aryMethod = { '1': [ - 'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor', - 'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', - 'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse', + 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create', + 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow', + 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll', + 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse', 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart', - 'uniqueId', 'words' + 'uniqueId', 'words', 'zipAll' ], '2': [ - 'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll', - 'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN', - 'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference', - 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', - 'eq', 'every', 'filter', 'find', 'find', 'findIndex', 'findKey', 'findLast', - 'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', - 'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', - 'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', - 'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', - 'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', - 'matchesProperty', 'maxBy', 'meanBy', 'merge', 'minBy', 'multiply', 'nth', - 'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', - 'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll', + 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith', + 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith', + 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN', + 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference', + 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', + 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex', + 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach', + 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get', + 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection', + 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', + 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', + 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit', + 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', + 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll', 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex', 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy', @@ -84,12 +104,14 @@ exports.aryMethod = { ], '3': [ 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith', - 'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs', - 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', 'mergeWith', - 'orderBy', 'padChars', 'padCharsEnd', 'padCharsStart', 'pullAllBy', - 'pullAllWith', 'reduce', 'reduceRight', 'replace', 'set', 'slice', - 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', - 'update', 'xorBy', 'xorWith', 'zipWith' + 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr', + 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith', + 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', + 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd', + 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight', + 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', + 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy', + 'xorWith', 'zipWith' ], '4': [ 'fill', 'setWith', 'updateWith' @@ -110,10 +132,14 @@ exports.iterateeAry = { 'every': 1, 'filter': 1, 'find': 1, + 'findFrom': 1, 'findIndex': 1, + 'findIndexFrom': 1, 'findKey': 1, 'findLast': 1, + 'findLastFrom': 1, 'findLastIndex': 1, + 'findLastIndexFrom': 1, 'findLastKey': 1, 'flatMap': 1, 'flatMapDeep': 1, @@ -146,31 +172,53 @@ exports.iterateeRearg = { /** Used to map method names to rearg configs. */ exports.methodRearg = { + 'assignInAllWith': [1, 0], 'assignInWith': [1, 2, 0], + 'assignAllWith': [1, 0], 'assignWith': [1, 2, 0], + 'differenceBy': [1, 2, 0], + 'differenceWith': [1, 2, 0], 'getOr': [2, 1, 0], + 'intersectionBy': [1, 2, 0], + 'intersectionWith': [1, 2, 0], 'isEqualWith': [1, 2, 0], 'isMatchWith': [2, 1, 0], + 'mergeAllWith': [1, 0], 'mergeWith': [1, 2, 0], 'padChars': [2, 1, 0], 'padCharsEnd': [2, 1, 0], 'padCharsStart': [2, 1, 0], 'pullAllBy': [2, 1, 0], 'pullAllWith': [2, 1, 0], + 'rangeStep': [1, 2, 0], + 'rangeStepRight': [1, 2, 0], 'setWith': [3, 1, 2, 0], 'sortedIndexBy': [2, 1, 0], 'sortedLastIndexBy': [2, 1, 0], + 'unionBy': [1, 2, 0], + 'unionWith': [1, 2, 0], 'updateWith': [3, 1, 2, 0], + 'xorBy': [1, 2, 0], + 'xorWith': [1, 2, 0], 'zipWith': [1, 2, 0] }; /** Used to map method names to spread configs. */ exports.methodSpread = { - 'invokeArgs': 2, - 'invokeArgsMap': 2, - 'partial': 1, - 'partialRight': 1, - 'without': 1 + 'assignAll': { 'start': 0 }, + 'assignAllWith': { 'start': 0 }, + 'assignInAll': { 'start': 0 }, + 'assignInAllWith': { 'start': 0 }, + 'defaultsAll': { 'start': 0 }, + 'defaultsDeepAll': { 'start': 0 }, + 'invokeArgs': { 'start': 2 }, + 'invokeArgsMap': { 'start': 2 }, + 'mergeAll': { 'start': 0 }, + 'mergeAllWith': { 'start': 0 }, + 'partial': { 'start': 1 }, + 'partialRight': { 'start': 1 }, + 'without': { 'start': 1 }, + 'zipAll': { 'start': 0 } }; /** Used to identify methods which mutate arrays or objects. */ @@ -187,13 +235,21 @@ exports.mutate = { }, 'object': { 'assign': true, + 'assignAll': true, + 'assignAllWith': true, 'assignIn': true, + 'assignInAll': true, + 'assignInAllWith': true, 'assignInWith': true, 'assignWith': true, 'defaults': true, + 'defaultsAll': true, 'defaultsDeep': true, + 'defaultsDeepAll': true, 'merge': true, - 'mergeWith': true + 'mergeAll': true, + 'mergeAllWith': true, + 'mergeWith': true, }, 'set': { 'set': true, @@ -233,19 +289,38 @@ exports.realToAlias = (function() { /** Used to map method names to other names. */ exports.remap = { + 'assignAll': 'assign', + 'assignAllWith': 'assignWith', + 'assignInAll': 'assignIn', + 'assignInAllWith': 'assignInWith', 'curryN': 'curry', 'curryRightN': 'curryRight', + 'defaultsAll': 'defaults', + 'defaultsDeepAll': 'defaultsDeep', + 'findFrom': 'find', + 'findIndexFrom': 'findIndex', + 'findLastFrom': 'findLast', + 'findLastIndexFrom': 'findLastIndex', 'getOr': 'get', + 'includesFrom': 'includes', + 'indexOfFrom': 'indexOf', 'invokeArgs': 'invoke', 'invokeArgsMap': 'invokeMap', + 'lastIndexOfFrom': 'lastIndexOf', + 'mergeAll': 'merge', + 'mergeAllWith': 'mergeWith', 'padChars': 'pad', 'padCharsEnd': 'padEnd', 'padCharsStart': 'padStart', + 'propertyOf': 'get', + 'rangeStep': 'range', + 'rangeStepRight': 'rangeRight', 'restFrom': 'rest', 'spreadFrom': 'spread', 'trimChars': 'trim', 'trimCharsEnd': 'trimEnd', - 'trimCharsStart': 'trimStart' + 'trimCharsStart': 'trimStart', + 'zipAll': 'zip' }; /** Used to track methods that skip fixing their arity. */ @@ -255,6 +330,7 @@ exports.skipFixed = { 'flowRight': true, 'iteratee': true, 'mixin': true, + 'rearg': true, 'runInContext': true }; @@ -280,11 +356,12 @@ exports.skipRearg = { 'overArgs': true, 'partial': true, 'partialRight': true, + 'propertyOf': true, 'random': true, 'range': true, 'rangeRight': true, 'subtract': true, - 'without': true, 'zip': true, - 'zipObject': true + 'zipObject': true, + 'zipObjectDeep': true }; diff --git a/node_modules/lodash/fp/_util.js b/node_modules/lodash/fp/_util.js index d450396..7084463 100644 --- a/node_modules/lodash/fp/_util.js +++ b/node_modules/lodash/fp/_util.js @@ -9,6 +9,6 @@ module.exports = { 'iteratee': require('../iteratee'), 'keys': require('../_baseKeys'), 'rearg': require('../rearg'), - 'spread': require('../spread'), + 'toInteger': require('../toInteger'), 'toPath': require('../toPath') }; diff --git a/node_modules/lodash/fp/assignAll.js b/node_modules/lodash/fp/assignAll.js new file mode 100644 index 0000000..b1d36c7 --- /dev/null +++ b/node_modules/lodash/fp/assignAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignAll', require('../assign')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assignAllWith.js b/node_modules/lodash/fp/assignAllWith.js new file mode 100644 index 0000000..21e836e --- /dev/null +++ b/node_modules/lodash/fp/assignAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignAllWith', require('../assignWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assignInAll.js b/node_modules/lodash/fp/assignInAll.js new file mode 100644 index 0000000..7ba75db --- /dev/null +++ b/node_modules/lodash/fp/assignInAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInAll', require('../assignIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assignInAllWith.js b/node_modules/lodash/fp/assignInAllWith.js new file mode 100644 index 0000000..e766903 --- /dev/null +++ b/node_modules/lodash/fp/assignInAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInAllWith', require('../assignInWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/conforms.js b/node_modules/lodash/fp/conforms.js index e193cd6..3247f64 100644 --- a/node_modules/lodash/fp/conforms.js +++ b/node_modules/lodash/fp/conforms.js @@ -1,5 +1 @@ -var convert = require('./convert'), - func = convert('conforms', require('../conforms'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; +module.exports = require('./conformsTo'); diff --git a/node_modules/lodash/fp/conformsTo.js b/node_modules/lodash/fp/conformsTo.js new file mode 100644 index 0000000..aa7f41e --- /dev/null +++ b/node_modules/lodash/fp/conformsTo.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('conformsTo', require('../conformsTo')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/defaultTo.js b/node_modules/lodash/fp/defaultTo.js new file mode 100644 index 0000000..d6b52a4 --- /dev/null +++ b/node_modules/lodash/fp/defaultTo.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultTo', require('../defaultTo')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/defaultsAll.js b/node_modules/lodash/fp/defaultsAll.js new file mode 100644 index 0000000..238fcc3 --- /dev/null +++ b/node_modules/lodash/fp/defaultsAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsAll', require('../defaults')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/defaultsDeepAll.js b/node_modules/lodash/fp/defaultsDeepAll.js new file mode 100644 index 0000000..6835f2f --- /dev/null +++ b/node_modules/lodash/fp/defaultsDeepAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsDeepAll', require('../defaultsDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/dropLast.js b/node_modules/lodash/fp/dropLast.js new file mode 100644 index 0000000..174e525 --- /dev/null +++ b/node_modules/lodash/fp/dropLast.js @@ -0,0 +1 @@ +module.exports = require('./dropRight'); diff --git a/node_modules/lodash/fp/dropLastWhile.js b/node_modules/lodash/fp/dropLastWhile.js new file mode 100644 index 0000000..be2a9d2 --- /dev/null +++ b/node_modules/lodash/fp/dropLastWhile.js @@ -0,0 +1 @@ +module.exports = require('./dropRightWhile'); diff --git a/node_modules/lodash/fp/extendAll.js b/node_modules/lodash/fp/extendAll.js new file mode 100644 index 0000000..cc55b64 --- /dev/null +++ b/node_modules/lodash/fp/extendAll.js @@ -0,0 +1 @@ +module.exports = require('./assignInAll'); diff --git a/node_modules/lodash/fp/extendAllWith.js b/node_modules/lodash/fp/extendAllWith.js new file mode 100644 index 0000000..6679d20 --- /dev/null +++ b/node_modules/lodash/fp/extendAllWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInAllWith'); diff --git a/node_modules/lodash/fp/findFrom.js b/node_modules/lodash/fp/findFrom.js new file mode 100644 index 0000000..da8275e --- /dev/null +++ b/node_modules/lodash/fp/findFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findFrom', require('../find')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findIndexFrom.js b/node_modules/lodash/fp/findIndexFrom.js new file mode 100644 index 0000000..32e98cb --- /dev/null +++ b/node_modules/lodash/fp/findIndexFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findIndexFrom', require('../findIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findLastFrom.js b/node_modules/lodash/fp/findLastFrom.js new file mode 100644 index 0000000..76c38fb --- /dev/null +++ b/node_modules/lodash/fp/findLastFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastFrom', require('../findLast')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findLastIndexFrom.js b/node_modules/lodash/fp/findLastIndexFrom.js new file mode 100644 index 0000000..34c8176 --- /dev/null +++ b/node_modules/lodash/fp/findLastIndexFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastIndexFrom', require('../findLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/includesFrom.js b/node_modules/lodash/fp/includesFrom.js new file mode 100644 index 0000000..683afdb --- /dev/null +++ b/node_modules/lodash/fp/includesFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('includesFrom', require('../includes')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/indexBy.js b/node_modules/lodash/fp/indexBy.js new file mode 100644 index 0000000..7e64bc0 --- /dev/null +++ b/node_modules/lodash/fp/indexBy.js @@ -0,0 +1 @@ +module.exports = require('./keyBy'); diff --git a/node_modules/lodash/fp/indexOfFrom.js b/node_modules/lodash/fp/indexOfFrom.js new file mode 100644 index 0000000..d99c822 --- /dev/null +++ b/node_modules/lodash/fp/indexOfFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('indexOfFrom', require('../indexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/lastIndexOfFrom.js b/node_modules/lodash/fp/lastIndexOfFrom.js new file mode 100644 index 0000000..1ff6a0b --- /dev/null +++ b/node_modules/lodash/fp/lastIndexOfFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lastIndexOfFrom', require('../lastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/matches.js b/node_modules/lodash/fp/matches.js index 629399c..29d1e1e 100644 --- a/node_modules/lodash/fp/matches.js +++ b/node_modules/lodash/fp/matches.js @@ -1,5 +1 @@ -var convert = require('./convert'), - func = convert('matches', require('../matches'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; +module.exports = require('./isMatch'); diff --git a/node_modules/lodash/fp/mergeAll.js b/node_modules/lodash/fp/mergeAll.js new file mode 100644 index 0000000..a3674d6 --- /dev/null +++ b/node_modules/lodash/fp/mergeAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeAll', require('../merge')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/mergeAllWith.js b/node_modules/lodash/fp/mergeAllWith.js new file mode 100644 index 0000000..4bd4206 --- /dev/null +++ b/node_modules/lodash/fp/mergeAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeAllWith', require('../mergeWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/nthArg.js b/node_modules/lodash/fp/nthArg.js index 8ccd8e6..fce3165 100644 --- a/node_modules/lodash/fp/nthArg.js +++ b/node_modules/lodash/fp/nthArg.js @@ -1,5 +1,5 @@ var convert = require('./convert'), - func = convert('nthArg', require('../nthArg'), require('./_falseOptions')); + func = convert('nthArg', require('../nthArg')); func.placeholder = require('./placeholder'); module.exports = func; diff --git a/node_modules/lodash/fp/property.js b/node_modules/lodash/fp/property.js index d832fbb..b29cfb2 100644 --- a/node_modules/lodash/fp/property.js +++ b/node_modules/lodash/fp/property.js @@ -1,5 +1 @@ -var convert = require('./convert'), - func = convert('property', require('../property'), require('./_falseOptions')); - -func.placeholder = require('./placeholder'); -module.exports = func; +module.exports = require('./get'); diff --git a/node_modules/lodash/fp/propertyOf.js b/node_modules/lodash/fp/propertyOf.js index 3cfdef7..f6273ee 100644 --- a/node_modules/lodash/fp/propertyOf.js +++ b/node_modules/lodash/fp/propertyOf.js @@ -1,5 +1,5 @@ var convert = require('./convert'), - func = convert('propertyOf', require('../propertyOf'), require('./_falseOptions')); + func = convert('propertyOf', require('../get')); func.placeholder = require('./placeholder'); module.exports = func; diff --git a/node_modules/lodash/fp/rangeStep.js b/node_modules/lodash/fp/rangeStep.js new file mode 100644 index 0000000..d72dfc2 --- /dev/null +++ b/node_modules/lodash/fp/rangeStep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeStep', require('../range')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/rangeStepRight.js b/node_modules/lodash/fp/rangeStepRight.js new file mode 100644 index 0000000..8b2a67b --- /dev/null +++ b/node_modules/lodash/fp/rangeStepRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeStepRight', require('../rangeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/stubArray.js b/node_modules/lodash/fp/stubArray.js new file mode 100644 index 0000000..cd604cb --- /dev/null +++ b/node_modules/lodash/fp/stubArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubArray', require('../stubArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/stubFalse.js b/node_modules/lodash/fp/stubFalse.js new file mode 100644 index 0000000..3296664 --- /dev/null +++ b/node_modules/lodash/fp/stubFalse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubFalse', require('../stubFalse'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/stubObject.js b/node_modules/lodash/fp/stubObject.js new file mode 100644 index 0000000..c6c8ec4 --- /dev/null +++ b/node_modules/lodash/fp/stubObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubObject', require('../stubObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/stubString.js b/node_modules/lodash/fp/stubString.js new file mode 100644 index 0000000..701051e --- /dev/null +++ b/node_modules/lodash/fp/stubString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubString', require('../stubString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/stubTrue.js b/node_modules/lodash/fp/stubTrue.js new file mode 100644 index 0000000..9249082 --- /dev/null +++ b/node_modules/lodash/fp/stubTrue.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubTrue', require('../stubTrue'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/symmetricDifference.js b/node_modules/lodash/fp/symmetricDifference.js new file mode 100644 index 0000000..78c16ad --- /dev/null +++ b/node_modules/lodash/fp/symmetricDifference.js @@ -0,0 +1 @@ +module.exports = require('./xor'); diff --git a/node_modules/lodash/fp/symmetricDifferenceBy.js b/node_modules/lodash/fp/symmetricDifferenceBy.js new file mode 100644 index 0000000..298fc7f --- /dev/null +++ b/node_modules/lodash/fp/symmetricDifferenceBy.js @@ -0,0 +1 @@ +module.exports = require('./xorBy'); diff --git a/node_modules/lodash/fp/symmetricDifferenceWith.js b/node_modules/lodash/fp/symmetricDifferenceWith.js new file mode 100644 index 0000000..70bc6fa --- /dev/null +++ b/node_modules/lodash/fp/symmetricDifferenceWith.js @@ -0,0 +1 @@ +module.exports = require('./xorWith'); diff --git a/node_modules/lodash/fp/takeLast.js b/node_modules/lodash/fp/takeLast.js new file mode 100644 index 0000000..e98c84a --- /dev/null +++ b/node_modules/lodash/fp/takeLast.js @@ -0,0 +1 @@ +module.exports = require('./takeRight'); diff --git a/node_modules/lodash/fp/takeLastWhile.js b/node_modules/lodash/fp/takeLastWhile.js new file mode 100644 index 0000000..5367968 --- /dev/null +++ b/node_modules/lodash/fp/takeLastWhile.js @@ -0,0 +1 @@ +module.exports = require('./takeRightWhile'); diff --git a/node_modules/lodash/fp/toFinite.js b/node_modules/lodash/fp/toFinite.js new file mode 100644 index 0000000..3a47687 --- /dev/null +++ b/node_modules/lodash/fp/toFinite.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toFinite', require('../toFinite'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/where.js b/node_modules/lodash/fp/where.js new file mode 100644 index 0000000..3247f64 --- /dev/null +++ b/node_modules/lodash/fp/where.js @@ -0,0 +1 @@ +module.exports = require('./conformsTo'); diff --git a/node_modules/lodash/fp/whereEq.js b/node_modules/lodash/fp/whereEq.js index ade80f6..29d1e1e 100644 --- a/node_modules/lodash/fp/whereEq.js +++ b/node_modules/lodash/fp/whereEq.js @@ -1 +1 @@ -module.exports = require('./filter'); +module.exports = require('./isMatch'); diff --git a/node_modules/lodash/fp/zipAll.js b/node_modules/lodash/fp/zipAll.js new file mode 100644 index 0000000..efa8ccb --- /dev/null +++ b/node_modules/lodash/fp/zipAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipAll', require('../zip')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fromPairs.js b/node_modules/lodash/fromPairs.js index a591488..ee7940d 100644 --- a/node_modules/lodash/fromPairs.js +++ b/node_modules/lodash/fromPairs.js @@ -10,12 +10,12 @@ * @returns {Object} Returns the new object. * @example * - * _.fromPairs([['fred', 30], ['barney', 40]]); - * // => { 'fred': 30, 'barney': 40 } + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } */ function fromPairs(pairs) { var index = -1, - length = pairs ? pairs.length : 0, + length = pairs == null ? 0 : pairs.length, result = {}; while (++index < length) { diff --git a/node_modules/lodash/functions.js b/node_modules/lodash/functions.js index 115d378..9722928 100644 --- a/node_modules/lodash/functions.js +++ b/node_modules/lodash/functions.js @@ -10,7 +10,7 @@ var baseFunctions = require('./_baseFunctions'), * @memberOf _ * @category Object * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. + * @returns {Array} Returns the function names. * @see _.functionsIn * @example * diff --git a/node_modules/lodash/functionsIn.js b/node_modules/lodash/functionsIn.js index 5aba98f..f00345d 100644 --- a/node_modules/lodash/functionsIn.js +++ b/node_modules/lodash/functionsIn.js @@ -10,7 +10,7 @@ var baseFunctions = require('./_baseFunctions'), * @since 4.0.0 * @category Object * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. + * @returns {Array} Returns the function names. * @see _.functions * @example * diff --git a/node_modules/lodash/get.js b/node_modules/lodash/get.js index 5a5837b..8805ff9 100644 --- a/node_modules/lodash/get.js +++ b/node_modules/lodash/get.js @@ -2,7 +2,7 @@ var baseGet = require('./_baseGet'); /** * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is used in its place. + * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ diff --git a/node_modules/lodash/groupBy.js b/node_modules/lodash/groupBy.js index ae7db5f..babf4f6 100644 --- a/node_modules/lodash/groupBy.js +++ b/node_modules/lodash/groupBy.js @@ -1,4 +1,5 @@ -var createAggregator = require('./_createAggregator'); +var baseAssignValue = require('./_baseAssignValue'), + createAggregator = require('./_createAggregator'); /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -18,8 +19,7 @@ var hasOwnProperty = objectProto.hasOwnProperty; * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee to transform keys. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example * @@ -34,7 +34,7 @@ var groupBy = createAggregator(function(result, value, key) { if (hasOwnProperty.call(result, key)) { result[key].push(value); } else { - result[key] = [value]; + baseAssignValue(result, key, [value]); } }); diff --git a/node_modules/lodash/identity.js b/node_modules/lodash/identity.js index 3732edb..2d5d963 100644 --- a/node_modules/lodash/identity.js +++ b/node_modules/lodash/identity.js @@ -1,5 +1,5 @@ /** - * This method returns the first argument given to it. + * This method returns the first argument it receives. * * @static * @since 0.1.0 @@ -9,9 +9,9 @@ * @returns {*} Returns `value`. * @example * - * var object = { 'user': 'fred' }; + * var object = { 'a': 1 }; * - * _.identity(object) === object; + * console.log(_.identity(object) === object); * // => true */ function identity(value) { diff --git a/node_modules/lodash/inRange.js b/node_modules/lodash/inRange.js index bf71a8d..f20728d 100644 --- a/node_modules/lodash/inRange.js +++ b/node_modules/lodash/inRange.js @@ -1,4 +1,5 @@ var baseInRange = require('./_baseInRange'), + toFinite = require('./toFinite'), toNumber = require('./toNumber'); /** @@ -40,12 +41,12 @@ var baseInRange = require('./_baseInRange'), * // => true */ function inRange(number, start, end) { - start = toNumber(start) || 0; + start = toFinite(start); if (end === undefined) { end = start; start = 0; } else { - end = toNumber(end) || 0; + end = toFinite(end); } number = toNumber(number); return baseInRange(number, start, end); diff --git a/node_modules/lodash/includes.js b/node_modules/lodash/includes.js index cefe3bf..ae0deed 100644 --- a/node_modules/lodash/includes.js +++ b/node_modules/lodash/includes.js @@ -10,7 +10,7 @@ var nativeMax = Math.max; /** * Checks if `value` is in `collection`. If `collection` is a string, it's * checked for a substring of `value`, otherwise - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * is used for equality comparisons. If `fromIndex` is negative, it's used as * the offset from the end of `collection`. * @@ -18,7 +18,7 @@ var nativeMax = Math.max; * @memberOf _ * @since 0.1.0 * @category Collection - * @param {Array|Object|string} collection The collection to search. + * @param {Array|Object|string} collection The collection to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. @@ -31,10 +31,10 @@ var nativeMax = Math.max; * _.includes([1, 2, 3], 1, 2); * // => false * - * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); + * _.includes({ 'a': 1, 'b': 2 }, 1); * // => true * - * _.includes('pebbles', 'eb'); + * _.includes('abcd', 'bc'); * // => true */ function includes(collection, value, fromIndex, guard) { diff --git a/node_modules/lodash/indexOf.js b/node_modules/lodash/indexOf.js index 65616d4..3c644af 100644 --- a/node_modules/lodash/indexOf.js +++ b/node_modules/lodash/indexOf.js @@ -6,7 +6,7 @@ var nativeMax = Math.max; /** * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. If `fromIndex` is negative, it's used as the * offset from the end of `array`. * @@ -14,7 +14,7 @@ var nativeMax = Math.max; * @memberOf _ * @since 0.1.0 * @category Array - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. @@ -28,15 +28,15 @@ var nativeMax = Math.max; * // => 3 */ function indexOf(array, value, fromIndex) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return -1; } - fromIndex = toInteger(fromIndex); - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); } - return baseIndexOf(array, value, fromIndex); + return baseIndexOf(array, value, index); } module.exports = indexOf; diff --git a/node_modules/lodash/initial.js b/node_modules/lodash/initial.js index f4441b5..f47fc50 100644 --- a/node_modules/lodash/initial.js +++ b/node_modules/lodash/initial.js @@ -1,4 +1,4 @@ -var dropRight = require('./dropRight'); +var baseSlice = require('./_baseSlice'); /** * Gets all but the last element of `array`. @@ -15,7 +15,8 @@ var dropRight = require('./dropRight'); * // => [1, 2] */ function initial(array) { - return dropRight(array, 1); + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; } module.exports = initial; diff --git a/node_modules/lodash/intersection.js b/node_modules/lodash/intersection.js index 1a7c770..a94c135 100644 --- a/node_modules/lodash/intersection.js +++ b/node_modules/lodash/intersection.js @@ -1,13 +1,13 @@ var arrayMap = require('./_arrayMap'), baseIntersection = require('./_baseIntersection'), - castArrayLikeObject = require('./_castArrayLikeObject'), - rest = require('./rest'); + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'); /** * Creates an array of unique values that are included in all given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. The order of result values is determined by the - * order they occur in the first array. + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. * * @static * @memberOf _ @@ -17,10 +17,10 @@ var arrayMap = require('./_arrayMap'), * @returns {Array} Returns the new array of intersecting values. * @example * - * _.intersection([2, 1], [4, 2], [1, 2]); + * _.intersection([2, 1], [2, 3]); * // => [2] */ -var intersection = rest(function(arrays) { +var intersection = baseRest(function(arrays) { var mapped = arrayMap(arrays, castArrayLikeObject); return (mapped.length && mapped[0] === arrays[0]) ? baseIntersection(mapped) diff --git a/node_modules/lodash/intersectionBy.js b/node_modules/lodash/intersectionBy.js index 6afb79d..31461aa 100644 --- a/node_modules/lodash/intersectionBy.js +++ b/node_modules/lodash/intersectionBy.js @@ -1,34 +1,34 @@ var arrayMap = require('./_arrayMap'), baseIntersection = require('./_baseIntersection'), baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), castArrayLikeObject = require('./_castArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.intersection` except that it accepts `iteratee` * which is invoked for each element of each `arrays` to generate the criterion - * by which they're compared. Result values are chosen from the first array. - * The iteratee is invoked with one argument: (value). + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of intersecting values. * @example * - * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor); + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); * // => [2.1] * * // The `_.property` iteratee shorthand. * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }] */ -var intersectionBy = rest(function(arrays) { +var intersectionBy = baseRest(function(arrays) { var iteratee = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); @@ -38,7 +38,7 @@ var intersectionBy = rest(function(arrays) { mapped.pop(); } return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, baseIteratee(iteratee)) + ? baseIntersection(mapped, baseIteratee(iteratee, 2)) : []; }); diff --git a/node_modules/lodash/intersectionWith.js b/node_modules/lodash/intersectionWith.js index bc195dc..63cabfa 100644 --- a/node_modules/lodash/intersectionWith.js +++ b/node_modules/lodash/intersectionWith.js @@ -1,14 +1,14 @@ var arrayMap = require('./_arrayMap'), baseIntersection = require('./_baseIntersection'), + baseRest = require('./_baseRest'), castArrayLikeObject = require('./_castArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.intersection` except that it accepts `comparator` - * which is invoked to compare elements of `arrays`. Result values are chosen - * from the first array. The comparator is invoked with two arguments: - * (arrVal, othVal). + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). * * @static * @memberOf _ @@ -25,13 +25,12 @@ var arrayMap = require('./_arrayMap'), * _.intersectionWith(objects, others, _.isEqual); * // => [{ 'x': 1, 'y': 2 }] */ -var intersectionWith = rest(function(arrays) { +var intersectionWith = baseRest(function(arrays) { var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); - if (comparator === last(mapped)) { - comparator = undefined; - } else { + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { mapped.pop(); } return (mapped.length && mapped[0] === arrays[0]) diff --git a/node_modules/lodash/invertBy.js b/node_modules/lodash/invertBy.js index 4298199..e5ba0f7 100644 --- a/node_modules/lodash/invertBy.js +++ b/node_modules/lodash/invertBy.js @@ -19,8 +19,7 @@ var hasOwnProperty = objectProto.hasOwnProperty; * @since 4.1.0 * @category Object * @param {Object} object The object to invert. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Object} Returns the new inverted object. * @example * diff --git a/node_modules/lodash/invoke.js b/node_modules/lodash/invoke.js index 7b6f56b..97d51eb 100644 --- a/node_modules/lodash/invoke.js +++ b/node_modules/lodash/invoke.js @@ -1,5 +1,5 @@ var baseInvoke = require('./_baseInvoke'), - rest = require('./rest'); + baseRest = require('./_baseRest'); /** * Invokes the method at `path` of `object`. @@ -19,6 +19,6 @@ var baseInvoke = require('./_baseInvoke'), * _.invoke(object, 'a[0].b.c.slice', 1, 3); * // => [2, 3] */ -var invoke = rest(baseInvoke); +var invoke = baseRest(baseInvoke); module.exports = invoke; diff --git a/node_modules/lodash/invokeMap.js b/node_modules/lodash/invokeMap.js index 4a6063e..8da5126 100644 --- a/node_modules/lodash/invokeMap.js +++ b/node_modules/lodash/invokeMap.js @@ -1,15 +1,14 @@ var apply = require('./_apply'), baseEach = require('./_baseEach'), baseInvoke = require('./_baseInvoke'), - isArrayLike = require('./isArrayLike'), - isKey = require('./_isKey'), - rest = require('./rest'); + baseRest = require('./_baseRest'), + isArrayLike = require('./isArrayLike'); /** * Invokes the method at `path` of each element in `collection`, returning * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `methodName` is a function, it's - * invoked for and `this` bound to, each element in `collection`. + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. * * @static * @memberOf _ @@ -28,15 +27,13 @@ var apply = require('./_apply'), * _.invokeMap([123, 456], String.prototype.split, ''); * // => [['1', '2', '3'], ['4', '5', '6']] */ -var invokeMap = rest(function(collection, path, args) { +var invokeMap = baseRest(function(collection, path, args) { var index = -1, isFunc = typeof path == 'function', - isProp = isKey(path), result = isArrayLike(collection) ? Array(collection.length) : []; baseEach(collection, function(value) { - var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined); - result[++index] = func ? apply(func, value, args) : baseInvoke(value, path, args); + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); }); return result; }); diff --git a/node_modules/lodash/isArguments.js b/node_modules/lodash/isArguments.js index 3ca0d3c..8b9ed66 100644 --- a/node_modules/lodash/isArguments.js +++ b/node_modules/lodash/isArguments.js @@ -1,7 +1,5 @@ -var isArrayLikeObject = require('./isArrayLikeObject'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]'; +var baseIsArguments = require('./_baseIsArguments'), + isObjectLike = require('./isObjectLike'); /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -9,13 +7,6 @@ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; @@ -27,7 +18,7 @@ var propertyIsEnumerable = objectProto.propertyIsEnumerable; * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, + * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * @@ -37,10 +28,9 @@ var propertyIsEnumerable = objectProto.propertyIsEnumerable; * _.isArguments([1, 2, 3]); * // => false */ -function isArguments(value) { - // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); -} +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; module.exports = isArguments; diff --git a/node_modules/lodash/isArray.js b/node_modules/lodash/isArray.js index 1901120..88ab55f 100644 --- a/node_modules/lodash/isArray.js +++ b/node_modules/lodash/isArray.js @@ -4,11 +4,9 @@ * @static * @memberOf _ * @since 0.1.0 - * @type {Function} * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); diff --git a/node_modules/lodash/isArrayBuffer.js b/node_modules/lodash/isArrayBuffer.js index 0a6a8e6..12904a6 100644 --- a/node_modules/lodash/isArrayBuffer.js +++ b/node_modules/lodash/isArrayBuffer.js @@ -1,16 +1,9 @@ -var isObjectLike = require('./isObjectLike'); +var baseIsArrayBuffer = require('./_baseIsArrayBuffer'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); -var arrayBufferTag = '[object ArrayBuffer]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; +/* Node.js helper references. */ +var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer; /** * Checks if `value` is classified as an `ArrayBuffer` object. @@ -20,8 +13,7 @@ var objectToString = objectProto.toString; * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. * @example * * _.isArrayBuffer(new ArrayBuffer(2)); @@ -30,8 +22,6 @@ var objectToString = objectProto.toString; * _.isArrayBuffer(new Array(2)); * // => false */ -function isArrayBuffer(value) { - return isObjectLike(value) && objectToString.call(value) == arrayBufferTag; -} +var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; module.exports = isArrayBuffer; diff --git a/node_modules/lodash/isArrayLike.js b/node_modules/lodash/isArrayLike.js index 189a611..0f96680 100644 --- a/node_modules/lodash/isArrayLike.js +++ b/node_modules/lodash/isArrayLike.js @@ -1,5 +1,4 @@ -var getLength = require('./_getLength'), - isFunction = require('./isFunction'), +var isFunction = require('./isFunction'), isLength = require('./isLength'); /** @@ -28,7 +27,7 @@ var getLength = require('./_getLength'), * // => false */ function isArrayLike(value) { - return value != null && isLength(getLength(value)) && !isFunction(value); + return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; diff --git a/node_modules/lodash/isBoolean.js b/node_modules/lodash/isBoolean.js index 242fad1..a43ed4b 100644 --- a/node_modules/lodash/isBoolean.js +++ b/node_modules/lodash/isBoolean.js @@ -1,18 +1,9 @@ -var isObjectLike = require('./isObjectLike'); +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); /** `Object#toString` result references. */ var boolTag = '[object Boolean]'; -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - /** * Checks if `value` is classified as a boolean primitive or object. * @@ -21,8 +12,7 @@ var objectToString = objectProto.toString; * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. * @example * * _.isBoolean(false); @@ -33,7 +23,7 @@ var objectToString = objectProto.toString; */ function isBoolean(value) { return value === true || value === false || - (isObjectLike(value) && objectToString.call(value) == boolTag); + (isObjectLike(value) && baseGetTag(value) == boolTag); } module.exports = isBoolean; diff --git a/node_modules/lodash/isBuffer.js b/node_modules/lodash/isBuffer.js index 404c222..c103cc7 100644 --- a/node_modules/lodash/isBuffer.js +++ b/node_modules/lodash/isBuffer.js @@ -1,30 +1,21 @@ -var constant = require('./constant'), - root = require('./_root'); - -/** Used to determine if values are of the language type `Object`. */ -var objectTypes = { - 'function': true, - 'object': true -}; +var root = require('./_root'), + stubFalse = require('./stubFalse'); /** Detect free variable `exports`. */ -var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) - ? exports - : undefined; +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ -var freeModule = (objectTypes[typeof module] && module && !module.nodeType) - ? module - : undefined; +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = (freeModule && freeModule.exports === freeExports) - ? freeExports - : undefined; +var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + /** * Checks if `value` is a buffer. * @@ -42,8 +33,6 @@ var Buffer = moduleExports ? root.Buffer : undefined; * _.isBuffer(new Uint8Array(2)); * // => false */ -var isBuffer = !Buffer ? constant(false) : function(value) { - return value instanceof Buffer; -}; +var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; diff --git a/node_modules/lodash/isDate.js b/node_modules/lodash/isDate.js index f85a801..7f0209f 100644 --- a/node_modules/lodash/isDate.js +++ b/node_modules/lodash/isDate.js @@ -1,17 +1,9 @@ -var isObjectLike = require('./isObjectLike'); +var baseIsDate = require('./_baseIsDate'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); -/** `Object#toString` result references. */ -var dateTag = '[object Date]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; +/* Node.js helper references. */ +var nodeIsDate = nodeUtil && nodeUtil.isDate; /** * Checks if `value` is classified as a `Date` object. @@ -21,8 +13,7 @@ var objectToString = objectProto.toString; * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. * @example * * _.isDate(new Date); @@ -31,8 +22,6 @@ var objectToString = objectProto.toString; * _.isDate('Mon April 23 2012'); * // => false */ -function isDate(value) { - return isObjectLike(value) && objectToString.call(value) == dateTag; -} +var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; module.exports = isDate; diff --git a/node_modules/lodash/isElement.js b/node_modules/lodash/isElement.js index 67aca5d..76ae29c 100644 --- a/node_modules/lodash/isElement.js +++ b/node_modules/lodash/isElement.js @@ -9,8 +9,7 @@ var isObjectLike = require('./isObjectLike'), * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a DOM element, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. * @example * * _.isElement(document.body); @@ -20,7 +19,7 @@ var isObjectLike = require('./isObjectLike'), * // => false */ function isElement(value) { - return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value); + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); } module.exports = isElement; diff --git a/node_modules/lodash/isEmpty.js b/node_modules/lodash/isEmpty.js index 9d46496..3597294 100644 --- a/node_modules/lodash/isEmpty.js +++ b/node_modules/lodash/isEmpty.js @@ -1,12 +1,11 @@ -var getTag = require('./_getTag'), +var baseKeys = require('./_baseKeys'), + getTag = require('./_getTag'), isArguments = require('./isArguments'), isArray = require('./isArray'), isArrayLike = require('./isArrayLike'), isBuffer = require('./isBuffer'), - isFunction = require('./isFunction'), - isObjectLike = require('./isObjectLike'), - isString = require('./isString'), - keys = require('./keys'); + isPrototype = require('./_isPrototype'), + isTypedArray = require('./isTypedArray'); /** `Object#toString` result references. */ var mapTag = '[object Map]', @@ -18,12 +17,6 @@ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */ -var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); - /** * Checks if `value` is an empty object, collection, map, or set. * @@ -58,23 +51,27 @@ var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); * // => false */ function isEmpty(value) { + if (value == null) { + return true; + } if (isArrayLike(value) && - (isArray(value) || isString(value) || isFunction(value.splice) || - isArguments(value) || isBuffer(value))) { + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { return !value.length; } - if (isObjectLike(value)) { - var tag = getTag(value); - if (tag == mapTag || tag == setTag) { - return !value.size; - } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; } for (var key in value) { if (hasOwnProperty.call(value, key)) { return false; } } - return !(nonEnumShadows && keys(value).length); + return true; } module.exports = isEmpty; diff --git a/node_modules/lodash/isEqual.js b/node_modules/lodash/isEqual.js index dd5d0cc..8a54126 100644 --- a/node_modules/lodash/isEqual.js +++ b/node_modules/lodash/isEqual.js @@ -16,12 +16,11 @@ var baseIsEqual = require('./_baseIsEqual'); * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, - * else `false`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.isEqual(object, other); * // => true diff --git a/node_modules/lodash/isEqualWith.js b/node_modules/lodash/isEqualWith.js index a442b24..21bdc7f 100644 --- a/node_modules/lodash/isEqualWith.js +++ b/node_modules/lodash/isEqualWith.js @@ -13,8 +13,7 @@ var baseIsEqual = require('./_baseIsEqual'); * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if the values are equivalent, - * else `false`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * function isGreeting(value) { @@ -36,7 +35,7 @@ var baseIsEqual = require('./_baseIsEqual'); function isEqualWith(value, other, customizer) { customizer = typeof customizer == 'function' ? customizer : undefined; var result = customizer ? customizer(value, other) : undefined; - return result === undefined ? baseIsEqual(value, other, customizer) : !!result; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; } module.exports = isEqualWith; diff --git a/node_modules/lodash/isError.js b/node_modules/lodash/isError.js index b4a93ae..b4f41e0 100644 --- a/node_modules/lodash/isError.js +++ b/node_modules/lodash/isError.js @@ -1,17 +1,10 @@ -var isObjectLike = require('./isObjectLike'); +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'), + isPlainObject = require('./isPlainObject'); /** `Object#toString` result references. */ -var errorTag = '[object Error]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; +var domExcTag = '[object DOMException]', + errorTag = '[object Error]'; /** * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, @@ -22,8 +15,7 @@ var objectToString = objectProto.toString; * @since 3.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an error object, - * else `false`. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. * @example * * _.isError(new Error); @@ -36,8 +28,9 @@ function isError(value) { if (!isObjectLike(value)) { return false; } - return (objectToString.call(value) == errorTag) || - (typeof value.message == 'string' && typeof value.name == 'string'); + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); } module.exports = isError; diff --git a/node_modules/lodash/isFinite.js b/node_modules/lodash/isFinite.js index 744e7a6..601842b 100644 --- a/node_modules/lodash/isFinite.js +++ b/node_modules/lodash/isFinite.js @@ -14,21 +14,20 @@ var nativeIsFinite = root.isFinite; * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. * @example * * _.isFinite(3); * // => true * - * _.isFinite(Number.MAX_VALUE); - * // => true - * - * _.isFinite(3.14); + * _.isFinite(Number.MIN_VALUE); * // => true * * _.isFinite(Infinity); * // => false + * + * _.isFinite('3'); + * // => false */ function isFinite(value) { return typeof value == 'number' && nativeIsFinite(value); diff --git a/node_modules/lodash/isFunction.js b/node_modules/lodash/isFunction.js index da02be0..907a8cd 100644 --- a/node_modules/lodash/isFunction.js +++ b/node_modules/lodash/isFunction.js @@ -1,18 +1,11 @@ -var isObject = require('./isObject'); +var baseGetTag = require('./_baseGetTag'), + isObject = require('./isObject'); /** `Object#toString` result references. */ -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; /** * Checks if `value` is classified as a `Function` object. @@ -22,8 +15,7 @@ var objectToString = objectProto.toString; * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); @@ -33,11 +25,13 @@ var objectToString = objectProto.toString; * // => false */ function isFunction(value) { + if (!isObject(value)) { + return false; + } // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } module.exports = isFunction; diff --git a/node_modules/lodash/isLength.js b/node_modules/lodash/isLength.js index cd9b257..3a95caa 100644 --- a/node_modules/lodash/isLength.js +++ b/node_modules/lodash/isLength.js @@ -4,16 +4,15 @@ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); diff --git a/node_modules/lodash/isMap.js b/node_modules/lodash/isMap.js index f83758e..44f8517 100644 --- a/node_modules/lodash/isMap.js +++ b/node_modules/lodash/isMap.js @@ -1,8 +1,9 @@ -var getTag = require('./_getTag'), - isObjectLike = require('./isObjectLike'); +var baseIsMap = require('./_baseIsMap'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); -/** `Object#toString` result references. */ -var mapTag = '[object Map]'; +/* Node.js helper references. */ +var nodeIsMap = nodeUtil && nodeUtil.isMap; /** * Checks if `value` is classified as a `Map` object. @@ -12,8 +13,7 @@ var mapTag = '[object Map]'; * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. * @example * * _.isMap(new Map); @@ -22,8 +22,6 @@ var mapTag = '[object Map]'; * _.isMap(new WeakMap); * // => false */ -function isMap(value) { - return isObjectLike(value) && getTag(value) == mapTag; -} +var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; module.exports = isMap; diff --git a/node_modules/lodash/isMatch.js b/node_modules/lodash/isMatch.js index 371e445..9773a18 100644 --- a/node_modules/lodash/isMatch.js +++ b/node_modules/lodash/isMatch.js @@ -3,10 +3,14 @@ var baseIsMatch = require('./_baseIsMatch'), /** * Performs a partial deep comparison between `object` and `source` to - * determine if `object` contains equivalent property values. This method is - * equivalent to a `_.matches` function when `source` is partially applied. + * determine if `object` contains equivalent property values. * - * **Note:** This method supports comparing the same values as `_.isEqual`. + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. * * @static * @memberOf _ @@ -17,12 +21,12 @@ var baseIsMatch = require('./_baseIsMatch'), * @returns {boolean} Returns `true` if `object` is a match, else `false`. * @example * - * var object = { 'user': 'fred', 'age': 40 }; + * var object = { 'a': 1, 'b': 2 }; * - * _.isMatch(object, { 'age': 40 }); + * _.isMatch(object, { 'b': 2 }); * // => true * - * _.isMatch(object, { 'age': 36 }); + * _.isMatch(object, { 'b': 1 }); * // => false */ function isMatch(object, source) { diff --git a/node_modules/lodash/isNative.js b/node_modules/lodash/isNative.js index 2d5149b..f0cb8d5 100644 --- a/node_modules/lodash/isNative.js +++ b/node_modules/lodash/isNative.js @@ -1,34 +1,19 @@ -var isFunction = require('./isFunction'), - isHostObject = require('./_isHostObject'), - isObject = require('./isObject'), - toSource = require('./_toSource'); +var baseIsNative = require('./_baseIsNative'), + isMaskable = require('./_isMaskable'); -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = Function.prototype.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); +/** Error message constants. */ +var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.'; /** - * Checks if `value` is a native function. + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. * * @static * @memberOf _ @@ -46,11 +31,10 @@ var reIsNative = RegExp('^' + * // => false */ function isNative(value) { - if (!isObject(value)) { - return false; + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); + return baseIsNative(value); } module.exports = isNative; diff --git a/node_modules/lodash/isNumber.js b/node_modules/lodash/isNumber.js index e427282..cd34ee4 100644 --- a/node_modules/lodash/isNumber.js +++ b/node_modules/lodash/isNumber.js @@ -1,18 +1,9 @@ -var isObjectLike = require('./isObjectLike'); +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); /** `Object#toString` result references. */ var numberTag = '[object Number]'; -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - /** * Checks if `value` is classified as a `Number` primitive or object. * @@ -24,8 +15,7 @@ var objectToString = objectProto.toString; * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. * @example * * _.isNumber(3); @@ -42,7 +32,7 @@ var objectToString = objectProto.toString; */ function isNumber(value) { return typeof value == 'number' || - (isObjectLike(value) && objectToString.call(value) == numberTag); + (isObjectLike(value) && baseGetTag(value) == numberTag); } module.exports = isNumber; diff --git a/node_modules/lodash/isObject.js b/node_modules/lodash/isObject.js index d16542f..1dc8939 100644 --- a/node_modules/lodash/isObject.js +++ b/node_modules/lodash/isObject.js @@ -1,6 +1,6 @@ /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -25,7 +25,7 @@ */ function isObject(value) { var type = typeof value; - return !!value && (type == 'object' || type == 'function'); + return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; diff --git a/node_modules/lodash/isObjectLike.js b/node_modules/lodash/isObjectLike.js index e34114b..301716b 100644 --- a/node_modules/lodash/isObjectLike.js +++ b/node_modules/lodash/isObjectLike.js @@ -23,7 +23,7 @@ * // => false */ function isObjectLike(value) { - return !!value && typeof value == 'object'; + return value != null && typeof value == 'object'; } module.exports = isObjectLike; diff --git a/node_modules/lodash/isPlainObject.js b/node_modules/lodash/isPlainObject.js index 13a90e7..2387373 100644 --- a/node_modules/lodash/isPlainObject.js +++ b/node_modules/lodash/isPlainObject.js @@ -1,15 +1,16 @@ -var getPrototype = require('./_getPrototype'), - isHostObject = require('./_isHostObject'), +var baseGetTag = require('./_baseGetTag'), + getPrototype = require('./_getPrototype'), isObjectLike = require('./isObjectLike'); /** `Object#toString` result references. */ var objectTag = '[object Object]'; /** Used for built-in method references. */ -var objectProto = Object.prototype; +var funcProto = Function.prototype, + objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ -var funcToString = Function.prototype.toString; +var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; @@ -17,13 +18,6 @@ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to infer the `Object` constructor. */ var objectCtorString = funcToString.call(Object); -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - /** * Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. @@ -33,8 +27,7 @@ var objectToString = objectProto.toString; * @since 0.8.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Foo() { @@ -54,8 +47,7 @@ var objectToString = objectProto.toString; * // => true */ function isPlainObject(value) { - if (!isObjectLike(value) || - objectToString.call(value) != objectTag || isHostObject(value)) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } var proto = getPrototype(value); @@ -63,8 +55,8 @@ function isPlainObject(value) { return true; } var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return (typeof Ctor == 'function' && - Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; } module.exports = isPlainObject; diff --git a/node_modules/lodash/isRegExp.js b/node_modules/lodash/isRegExp.js index 8eeb410..76c9b6e 100644 --- a/node_modules/lodash/isRegExp.js +++ b/node_modules/lodash/isRegExp.js @@ -1,17 +1,9 @@ -var isObject = require('./isObject'); +var baseIsRegExp = require('./_baseIsRegExp'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); -/** `Object#toString` result references. */ -var regexpTag = '[object RegExp]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; +/* Node.js helper references. */ +var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; /** * Checks if `value` is classified as a `RegExp` object. @@ -21,8 +13,7 @@ var objectToString = objectProto.toString; * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. * @example * * _.isRegExp(/abc/); @@ -31,8 +22,6 @@ var objectToString = objectProto.toString; * _.isRegExp('/abc/'); * // => false */ -function isRegExp(value) { - return isObject(value) && objectToString.call(value) == regexpTag; -} +var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; module.exports = isRegExp; diff --git a/node_modules/lodash/isSafeInteger.js b/node_modules/lodash/isSafeInteger.js index a780afb..2a48526 100644 --- a/node_modules/lodash/isSafeInteger.js +++ b/node_modules/lodash/isSafeInteger.js @@ -15,8 +15,7 @@ var MAX_SAFE_INTEGER = 9007199254740991; * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a safe integer, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. * @example * * _.isSafeInteger(3); diff --git a/node_modules/lodash/isSet.js b/node_modules/lodash/isSet.js index 9030dc4..ab88bdf 100644 --- a/node_modules/lodash/isSet.js +++ b/node_modules/lodash/isSet.js @@ -1,8 +1,9 @@ -var getTag = require('./_getTag'), - isObjectLike = require('./isObjectLike'); +var baseIsSet = require('./_baseIsSet'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); -/** `Object#toString` result references. */ -var setTag = '[object Set]'; +/* Node.js helper references. */ +var nodeIsSet = nodeUtil && nodeUtil.isSet; /** * Checks if `value` is classified as a `Set` object. @@ -12,8 +13,7 @@ var setTag = '[object Set]'; * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. * @example * * _.isSet(new Set); @@ -22,8 +22,6 @@ var setTag = '[object Set]'; * _.isSet(new WeakSet); * // => false */ -function isSet(value) { - return isObjectLike(value) && getTag(value) == setTag; -} +var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; module.exports = isSet; diff --git a/node_modules/lodash/isString.js b/node_modules/lodash/isString.js index 573de3b..627eb9c 100644 --- a/node_modules/lodash/isString.js +++ b/node_modules/lodash/isString.js @@ -1,19 +1,10 @@ -var isArray = require('./isArray'), +var baseGetTag = require('./_baseGetTag'), + isArray = require('./isArray'), isObjectLike = require('./isObjectLike'); /** `Object#toString` result references. */ var stringTag = '[object String]'; -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - /** * Checks if `value` is classified as a `String` primitive or object. * @@ -22,8 +13,7 @@ var objectToString = objectProto.toString; * @memberOf _ * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. * @example * * _.isString('abc'); @@ -34,7 +24,7 @@ var objectToString = objectProto.toString; */ function isString(value) { return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); } module.exports = isString; diff --git a/node_modules/lodash/isSymbol.js b/node_modules/lodash/isSymbol.js index 21dd559..dfb60b9 100644 --- a/node_modules/lodash/isSymbol.js +++ b/node_modules/lodash/isSymbol.js @@ -1,18 +1,9 @@ -var isObjectLike = require('./isObjectLike'); +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - /** * Checks if `value` is classified as a `Symbol` primitive or object. * @@ -21,8 +12,7 @@ var objectToString = objectProto.toString; * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); @@ -33,7 +23,7 @@ var objectToString = objectProto.toString; */ function isSymbol(value) { return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); + (isObjectLike(value) && baseGetTag(value) == symbolTag); } module.exports = isSymbol; diff --git a/node_modules/lodash/isTypedArray.js b/node_modules/lodash/isTypedArray.js index 0d86b90..da3f8dd 100644 --- a/node_modules/lodash/isTypedArray.js +++ b/node_modules/lodash/isTypedArray.js @@ -1,58 +1,9 @@ -var isLength = require('./isLength'), - isObjectLike = require('./isObjectLike'); +var baseIsTypedArray = require('./_baseIsTypedArray'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. @@ -62,8 +13,7 @@ var objectToString = objectProto.toString; * @since 3.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); @@ -72,9 +22,6 @@ var objectToString = objectProto.toString; * _.isTypedArray([]); * // => false */ -function isTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; -} +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; module.exports = isTypedArray; diff --git a/node_modules/lodash/isWeakMap.js b/node_modules/lodash/isWeakMap.js index cd7b9ed..8d36f66 100644 --- a/node_modules/lodash/isWeakMap.js +++ b/node_modules/lodash/isWeakMap.js @@ -12,8 +12,7 @@ var weakMapTag = '[object WeakMap]'; * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. * @example * * _.isWeakMap(new WeakMap); diff --git a/node_modules/lodash/isWeakSet.js b/node_modules/lodash/isWeakSet.js index 5395797..e628b26 100644 --- a/node_modules/lodash/isWeakSet.js +++ b/node_modules/lodash/isWeakSet.js @@ -1,18 +1,9 @@ -var isObjectLike = require('./isObjectLike'); +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); /** `Object#toString` result references. */ var weakSetTag = '[object WeakSet]'; -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - /** * Checks if `value` is classified as a `WeakSet` object. * @@ -21,8 +12,7 @@ var objectToString = objectProto.toString; * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. * @example * * _.isWeakSet(new WeakSet); @@ -32,7 +22,7 @@ var objectToString = objectProto.toString; * // => false */ function isWeakSet(value) { - return isObjectLike(value) && objectToString.call(value) == weakSetTag; + return isObjectLike(value) && baseGetTag(value) == weakSetTag; } module.exports = isWeakSet; diff --git a/node_modules/lodash/iteratee.js b/node_modules/lodash/iteratee.js index 8ec0588..61b73a8 100644 --- a/node_modules/lodash/iteratee.js +++ b/node_modules/lodash/iteratee.js @@ -1,6 +1,9 @@ var baseClone = require('./_baseClone'), baseIteratee = require('./_baseIteratee'); +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + /** * Creates a function that invokes `func` with the arguments of the created * function. If `func` is a property name, the created function returns the @@ -44,7 +47,7 @@ var baseClone = require('./_baseClone'), * // => ['def'] */ function iteratee(func) { - return baseIteratee(typeof func == 'function' ? func : baseClone(func, true)); + return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); } module.exports = iteratee; diff --git a/node_modules/lodash/join.js b/node_modules/lodash/join.js index fe31067..45de079 100644 --- a/node_modules/lodash/join.js +++ b/node_modules/lodash/join.js @@ -20,7 +20,7 @@ var nativeJoin = arrayProto.join; * // => 'a~b~c' */ function join(array, separator) { - return array ? nativeJoin.call(array, separator) : ''; + return array == null ? '' : nativeJoin.call(array, separator); } module.exports = join; diff --git a/node_modules/lodash/keyBy.js b/node_modules/lodash/keyBy.js index 97e6f4b..acc007a 100644 --- a/node_modules/lodash/keyBy.js +++ b/node_modules/lodash/keyBy.js @@ -1,4 +1,5 @@ -var createAggregator = require('./_createAggregator'); +var baseAssignValue = require('./_baseAssignValue'), + createAggregator = require('./_createAggregator'); /** * Creates an object composed of keys generated from the results of running @@ -11,8 +12,7 @@ var createAggregator = require('./_createAggregator'); * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee to transform keys. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example * @@ -30,7 +30,7 @@ var createAggregator = require('./_createAggregator'); * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } */ var keyBy = createAggregator(function(result, value, key) { - result[key] = value; + baseAssignValue(result, key, value); }); module.exports = keyBy; diff --git a/node_modules/lodash/keys.js b/node_modules/lodash/keys.js index 186a4fe..d143c71 100644 --- a/node_modules/lodash/keys.js +++ b/node_modules/lodash/keys.js @@ -1,15 +1,12 @@ -var baseHas = require('./_baseHas'), +var arrayLikeKeys = require('./_arrayLikeKeys'), baseKeys = require('./_baseKeys'), - indexKeys = require('./_indexKeys'), - isArrayLike = require('./isArrayLike'), - isIndex = require('./_isIndex'), - isPrototype = require('./_isPrototype'); + isArrayLike = require('./isArrayLike'); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static @@ -34,23 +31,7 @@ var baseHas = require('./_baseHas'), * // => ['0', '1'] */ function keys(object) { - var isProto = isPrototype(object); - if (!(isProto || isArrayLike(object))) { - return baseKeys(object); - } - var indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; - - for (var key in object) { - if (baseHas(object, key) && - !(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(isProto && key == 'constructor')) { - result.push(key); - } - } - return result; + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } module.exports = keys; diff --git a/node_modules/lodash/keysIn.js b/node_modules/lodash/keysIn.js index d2fb91c..a62308f 100644 --- a/node_modules/lodash/keysIn.js +++ b/node_modules/lodash/keysIn.js @@ -1,13 +1,6 @@ -var baseKeysIn = require('./_baseKeysIn'), - indexKeys = require('./_indexKeys'), - isIndex = require('./_isIndex'), - isPrototype = require('./_isPrototype'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +var arrayLikeKeys = require('./_arrayLikeKeys'), + baseKeysIn = require('./_baseKeysIn'), + isArrayLike = require('./isArrayLike'); /** * Creates an array of the own and inherited enumerable property names of `object`. @@ -33,23 +26,7 @@ var hasOwnProperty = objectProto.hasOwnProperty; * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ function keysIn(object) { - var index = -1, - isProto = isPrototype(object), - props = baseKeysIn(object), - propsLength = props.length, - indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; - - while (++index < propsLength) { - var key = props[index]; - if (!(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } module.exports = keysIn; diff --git a/node_modules/lodash/lang.js b/node_modules/lodash/lang.js index 665f5c6..a396216 100644 --- a/node_modules/lodash/lang.js +++ b/node_modules/lodash/lang.js @@ -4,6 +4,7 @@ module.exports = { 'cloneDeep': require('./cloneDeep'), 'cloneDeepWith': require('./cloneDeepWith'), 'cloneWith': require('./cloneWith'), + 'conformsTo': require('./conformsTo'), 'eq': require('./eq'), 'gt': require('./gt'), 'gte': require('./gte'), @@ -47,6 +48,7 @@ module.exports = { 'lt': require('./lt'), 'lte': require('./lte'), 'toArray': require('./toArray'), + 'toFinite': require('./toFinite'), 'toInteger': require('./toInteger'), 'toLength': require('./toLength'), 'toNumber': require('./toNumber'), diff --git a/node_modules/lodash/last.js b/node_modules/lodash/last.js index 6402a4c..cad1eaf 100644 --- a/node_modules/lodash/last.js +++ b/node_modules/lodash/last.js @@ -13,7 +13,7 @@ * // => 3 */ function last(array) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? array[length - 1] : undefined; } diff --git a/node_modules/lodash/lastIndexOf.js b/node_modules/lodash/lastIndexOf.js index 7e9d988..dabfb61 100644 --- a/node_modules/lodash/lastIndexOf.js +++ b/node_modules/lodash/lastIndexOf.js @@ -1,4 +1,6 @@ -var indexOfNaN = require('./_indexOfNaN'), +var baseFindIndex = require('./_baseFindIndex'), + baseIsNaN = require('./_baseIsNaN'), + strictLastIndexOf = require('./_strictLastIndexOf'), toInteger = require('./toInteger'); /* Built-in method references for those with the same name as other `lodash` methods. */ @@ -13,7 +15,7 @@ var nativeMax = Math.max, * @memberOf _ * @since 0.1.0 * @category Array - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=array.length-1] The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. @@ -27,28 +29,18 @@ var nativeMax = Math.max, * // => 1 */ function lastIndexOf(array, value, fromIndex) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = length; if (fromIndex !== undefined) { index = toInteger(fromIndex); - index = ( - index < 0 - ? nativeMax(length + index, 0) - : nativeMin(index, length - 1) - ) + 1; + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); } - if (value !== value) { - return indexOfNaN(array, index, true); - } - while (index--) { - if (array[index] === value) { - return index; - } - } - return -1; + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); } module.exports = lastIndexOf; diff --git a/node_modules/lodash/lodash-4.11.2.tgz b/node_modules/lodash/lodash-4.11.2.tgz deleted file mode 100644 index fa8285e6d7481ca1ee421aa327caa1530b452ba1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 291917 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�OTW`X>hn!7)kGZoU?r$JxKq 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�VIuBMnx(p`e z(!!|fYFGQ_8`EV~cfWN*Gv~dQmCMAKYc*@Z0kN|hZ34Nm2{cqMTZLbU5H?>X!-Y6U zFOu=4+^6}JBV0E;NbC6`2k3%S$k@0cgLVYF6cY7$I!Bl_k<_+V=f2HNKyQ!!o_ODU zj$V!8X4U%UmbPm9G9I@`qp0@pFIIB;dnBd*P5!tk_|KL1KleQOuf12r|K3dUK5p2~ zYVo|bZ^{vGX7N-o{D)FPsSVG>DPogQmMj)qW9l>^^N4^v{DOTvqavc4ByXK&Foz1K z<9OnfQWh0U_pD$i($`B;&f}>~HD?3G+Wc&`aLOP@7G|WL%VrLV&S%2^e)Y?9mk9HS zfGx26ks1;=QT=ja({Uz|$Xbv5_hXf8ef3`M+rIv1)Av7J{9GLUkNCU#{x^|8E_j9P zhpn5zJk~HE@A5bvx(HD!UlCqilcX4mkijsQt*87cr~TQ zKkl4OmPw#n*BkCSwH_a&zbL7KAZ@|NR6uyjhh>blg0WQyLaa^*-|V9RrKMv@>B+{F zzhz#lFgge=Ehgc1)mKOEg3uxlUs>g9QNeK?G+Yzqg7#$kB7KSJMMxr$E3xW!Nuohf zQEo0^{ryS_DBf4UN)4oli$tEFq_~fAY_N@mCf9aU+TCKVAjnf4s8ef4oX$)Ll}1$8(I6bT+^v zffnPS89hCT;s}-+pLs;XHet!zG@m!VLO{h@&LH?rLZc9S`7F`E_;4nsV%1Mh<=G=$ zxYHz;H`7wZ0?oNKL9;@LBHV_q-2~7RIE}@+hX{WI>tuq~CieW@!j|7c%a_eR&6al^laj;*V7$=Ci$ws#GGm`V!e9#p z)(gosAcZ^fUp)B;_#XlM-+Mci{%0de?f;9AO`pj1V!JqaPNIP{TZpg!xpW0*08@?I z^!)I-XuB2N1+&(&LQ*^-cqI9w08NmNk+lE?i|vb7`c-Nl%3@SOqEI11mU@)Kg9SyC zc)~Wuwhy3hYRsm<&7kS9@_DSwx9K-~R~Z%W!;4zRFvgQg+5dM-2LBIy&_}@k>$Lp% z51rjk#s6<4t;PQrAhPEkBKtgwhwxJz3tGHp=a3Y+b>1@pe`%H>_SF1LUzsYop&5Zd zVKu{hs)0xjEh2x*{5p&ej)Jl1;`mbTwlr{YJSDLZIA9C6+D#QcJTxaE3TH{8WB%+5 zNj}$#6(Mv>9mv)V$p-=Z@lRboxK@LtYY;YUfdV!;EmR1mzSr&p`yY${{GzbAn8W`I zBm|UD0D@i+fsEpD{Z^X>-)^d^==|2d!5D+0VVQYmOe{+^Wh<6GOq{TWRVZ4(LsiH9 z-#*#$A4R~v?l4d*&j0qVcmD5oD*w;TBtHM2=8yka#IB>3QNmYXr!J##nyAaPv)H>G z!>rPAVbUDJXAkF(5I6+`n&}VtVqvgMK3+cpv*rub#gWAt;NY$!s+Y4r$p|LeV3IHBbbOO7vQTv2w|`|N z57dJ7QP%-Mwu}y)_!|YW#T@(O(@?}{)ka-YT5&AJV^}3>3}5j*7Jg}V%U|)Ol<^%K zSA*KTSoPB=TB+}XOLSGVYv+Yk{KO}hl>C3TI61i?0H786-%iKJ|J?0X_|F?j6ttM# zAnl`1=dV%%qj(*^P0ttStaC(Yd$t!*F{=4I{Q2-dM~5$89{$hKv&YYW{Pic%@lNO4 zop1NBV0d8^Rr~O{Xf`#kYnNY*J2v#*1`U8BRd{5Ds5StG(8PmjXb3piR6O(76bZ>J#`6Ugtl zZqu@+3rZwUuL7@X_iYzRoz!@BN^CHNe569O6rmJhBqM7)J;o5cq!+`B%2d! zS_6Wtqv#a;feQD7nQnIMd ziVsYR|GyFBCrT^yf8Fk$$N#r>EBuFzBpLtl*Z9=m%thu^a6j2DI7F;VY?a^S)TN|c z)9~ImyXR6;S@{CYkuFdY%z%dQk9kHt3>eQR5bW$cp3=nBdU7ZGIiB`wvQwTlRro5I z_iGOR6b1_mAV|TbByEyt+$bpJ_N_n{w&8k}uCwsakz$qxcFNvNqD1^m=tQMwg_#0N z6m2I74a!^9k1EBa6M&p>jR-?#F-ASymclZO1^N^Y?u<0j+E7sb|LnbMdlN^}F#LYz zR}5q~l7l4c;6pHRxPU<7T>^Q5?B35~d|P8_Y|kRiD4G$*oABSCuBtwFj}EpxIAr?T z4c1Kcak{JPTxf0Br9jzw%vBAzHi=Fk`jwHwdDr5BO!h{J9kp?DjhuBIwsqHlg4nG_ zcqI{OO1*FCiG_vCki$t)XL4q?_((e;#>n^dJV19$v;KJl%W>lqiqK(HPymG37bl3_ z`uqW%8YiN;Ho*+TF-a44MQXr_*E^F-;pHX&%0Zo0C>H;>=EzS}7Rmp5ZvM}mc4hxr zN)h~@$GcBFUX2D=o@1M=B|r2!^JZMfzOz6aHwLfU;)EA=775qfb58uh;^^OYT*8*J z@jRrMd*b6>C5Hu%#m8d;LNq=zA%$B}qy*x2RFq4F0%i0{lB`M zoeKY#Ql$MSe1D$>C_KMbP~YVP_DXF}fV)wP!_8y#!l%l4c-}^E!Y+;^%^8LqjAlbd z-Zp}MlnndxO)+DPY%9$`StqC|;#rrmjI*FO--0HA07BH@sNP34qf=Qai>h7{Du*KWgoe8KWdur92cjwt(&bssPwQxef zF*Trr6}=k@gR0~0rdSymI%A5sp(Xsf%h+|AZ;jX`BfzdZF3~(K-#&F8U{fM=ujo*7 zJQmRWUum7$W)n~Wck%6p-XQ+hF#FI#!mElfFiQ+8kE&-51q>2EEB{|S>@RM{2Y5dI zZ*OnA`v0v;{#Q;}idG-x1&JM`VLYHBI#+Xvb-(F2PZMSvlacQ(YGUv&KfFXnCuus0 zLQVP7hxl=QKm>iPiU$6pC<8zTMM{gk# zQO_W2?~)SxV99KS}XioP%e>WSZtFuucJn zb__ChC4hP~;E@EuS&~saF(qsCP<=KHg`2BRD1~9FmuUbxN}@A)G_p*Ano6A-nCba(=O>5SMSbHnyl`-h1%u)}>2t(KMV%^l#-%zx6g`PmEm%y|&t$a@MEjn0bs0C*(ABDP zzc|U|ppH`HT1s4nmiHto71D3Y5a&v;=XNWE*=qmpn^6TUyI!L;9l_VNrh6Mj0%jcU z=f2;nGQSx7-#;-ehbfSHpU&ZOKUW7hpSC>vYk#Bp1pXd?MN*vAd@kZW4>wP0Z|(_^YMf zY7tc$94*piaF9JyR<-;3uv$KlWeuJvn6s@&$==5kZuFWka%ncmDX5)vIU)BGS_3iy z1_54>F@i|bJ!hngUNK;}iV~!y)}E)`l}?y)cu6>peBreTl^9+jG9*uN)Ebp+hywB4 zvFu<;y$k!P4$mPjb1b|}OzWi9WR{&n;AUG>s#zYf3;a2|G*2KvHMDu~Ech;XKva2@ z?KHFVc-*=}ie#~C*p++Nw+mX3$OmkVRg#7dqrcQ|e*3Dmf$T$booB2wr3N9u7x~Cg zKlATk#s5$9Cu@uNVwU;%f2+Oi+JE+TIu-seqX_$-=c6#sqr}6i^EWzE|7tpnrcdlU zKzp+qYtMUtV^knr@WNcfDv2Qh>$-y{URxy1^IT-F26we-jy6OL^A4h9h$$^$>LS)0 zVVR6u7fojgx_LxkWGfg-sBEy;=hGQM2wtS68!q9cz;kYbg;Y*XA1PRQP|&>$%twK^ zXUxh6&Z?%<_$*Gs5d!id(wHI)_ahT>Q+@~DF-74vq!i#sDP$BvL~%=H5v^9MPVL}- z508{wLj1v=aS;Xm!+w*jg8y@Pw1NC^a445#|4{657pe=a&&=dfO zfRAtiA0DcndOJtJ(W~EE_?wS+>s#Yj`{<}(Acr&uKJufbdfu{n-m&^J$5GU?=-5~a zT3NmxKZp5w>vWW+(|X!s!wWWpPMbz}Q%l74!8lMvfLX2-z&=CtYz6lwWqfB?^2w$& z-z8{|1AI^J%5wx6vH^5RR=+w&Qlz1dq977KsVtVVqpqi;;>Pt~-GZ+4+RF4$gQ(lH zm;Tv8=%Y8WK_QzS8B@NaVmR?zP}RXW9p2lKsAtVQkYCOIm1R5Ss90f-+oh7_e2K-8 z|CDb3)!ywn`5$|XEvV@KGRmeVQgK8xJhl^918`MU1R;JRB_ zfm~!Ca91gT4v0Zk5t;mz1SWP+&l8G7rSFbIdFD3R&`fro&PK!F1XxZ+GZSacni0-FAmT&L731!(S743=Arll+dmT=6vA2!R zt~sF$=9;!g@E7Z7iKqwu_3)4^+Kpfv2;8l<&RKN)&|3`nNak50 z(6+7QRPfy8#LaeOZ5h0ndplc||4%7J;C~)Z z%a?qY-Wa)hP4kT6N&-TPYPkT-5(x9Bt4NI}-o7WYzhy~G!2!<=4##l&AtEi^e987< zLRSL#Q?o%@DnOhLY!QXh;6lT#3?2WFA|=cyU%FxY4vAjoJMb z{Nvzla595riou)klmP?}TGZs5C<=t127}027tzW4I7c@Pb_HD=vxlw0S^Ov-?sv9# z+Py8ZuS(GkmfgrBAZjV}3%Of<;IXQ;lopn}=z~adD*QEN6_0R9th)~H^px`4&Q?_} zY58CV%=SeTM-Y?*(O;b-Gl;f`)+eqoL$x?DTA4$ii_dxsZa5G9zjig?eEi?-^xXKL zJKGiiUrLejKUX#D)waughT+NOGAX1Kd~qr%iL0R@kxNRdsQ?`bq8Wlu8_G5Q|^ya&fFL${;%um(k#C!bS!?8kDpx?<*DQ(d(znyD^dY?Rg1s8YX$<6cCNNHYXD>q zW5~&WzS-0xstzgAyNb3>vGr6y)w(gtufN6`V3)urK|C!!>>LGm_l245;gDjtA8BxV z!QDE4tl7^>04F*tekL;}E1wCE0T_H2nBkb_PDhyT?gxAj4cWDpCyNiC0c!7Mg0X!u zRs2M>L`5qkr^CNwL4K{fb<>_$)$=U`ErYZ(5uj*Z!|^FtdLbTtsP%7eTUAX(`;{Pa zv?}Qs53Xn*4D55m92yUlCBg$66V`TvkcG@k5T=H-Vumm=GNV5cc36A3>}s157r-%d z#4LnFDq3_-@yLH(ot7*A?`=Ere|kIHmH$sE%BU9x=qqmB?g8enwA5ou=BZiWaP(7}<*x*nW_k;$R|@>?AWO*lQvtjsizMRXC7yav&&1H_&Q0D5LY&>%#PoAo>Q%C&>A8iv~gwLAfJiD5o2eDde+dsh6DR55l@EV6fqjoTnK^%+8Z)-sY^x> zJfDUTd4~N19Ym@=TIr*|m}n5RN`rVhn2kbIMrro9Y%NZN)I|#^y{bgY7hqLZu%fKa zucahLctGK&BQ8?be{fXTRgM8-g`PfJvjoZxV$IJRwZVTt=i1RjiC7Cw9*j?pN+*w1 zgS%*l$kehv?5`|kU9bmugjqfN(sB~BTz)p)<5TnTXUAHpC4-Dow<7gEr6S9B|gKiLM)Hl#_@w3p(K zeTn@ZX(()uzt?R??uyaNj>MQmM>v&-<~#96VL$j@cZ0(Duzh0;QdI%DlYZ-X*O*tA zeb1|Ie1JH66OJQ$iNql9h=fl92wD^4)gqrWT>Qr$LERB+xtZ%}J1}7VYLo`+((*>5 z8m_iUrA>~aDeQ)5y300b?2NiV8(;gA-s`*%PWs(X!e=ou;U%wB?LjMm({jY`gxyTfGYZmr|ttuc9rAO?=?3o#ojUiP^$4l}y$Txmwo9SV(6G4{{TpEMRyx zkHe8J9)QN?Nn%RQQ?qV?hZG+yFY%C8yaH&)1%Kt}hzsd)w@&Q_omA!(?jfUi|=5{lmFTP3Fn^m~y z<(zO#{trKB+3{btJ^mlPZe{;hN>`bKp)=df`jnduys^Tp>E|FHHt%w zbGHKAHB|jbQ{PZ^Sxfl`?9nN~V42GL9;ZBq^}%Jj)tpZO{l8Wl@J06DJ0AMKUHSi& zQp&ae9;y9R*??ci23$L+^X$NTb1Bu&Wed)!*q|A7lvVgm+kk7czSRi1&(ko; zC>1Q^Qc&_9Y%q&*e9Hc1&*#SMn(v}rlsiDFXQ&HDF#{v$hl9avJR3oBmi~OJRw;@w z1ShN=IZt1GF?OvVY9NVGxk8I5Rapz8j2Q#=lk<4)mAf@gUWqOm`cPCN8`>MPmJB5S z!EscT)`Zw_U29Es!sTdYJ*4e*11qiST*4bCRAKr>#iaj#P2%6y9{_v-{%8Ml^S^bg z{6D1>lm3VAUr7GL%Oz<183VJ4`x=DX&f+uRq|upTlEVtgUUczxRuXA%h|m{h zY#GibBg&b1O6htFGPei<9TrPc=0@6)Lww>R%&`u(Y>0~K5h!wXGF)VeFuxD4euu21 zArnS1MGWv2g8YjYi~i5S3fl=a*4pREf2mr~IGGs>TagL7N=D;^7p52BWX zWH6cyoj}3HJ8y-5$BzEMd2dwwIkYX&#A96%{VRr^cdsmbuJjjd8b5{hpv7Z;soi)Y zjGtp*urTY>I8K&gsOGo3+FW6{G= z$-|-z^^xab?3vG;cvaNjVf)AmXvOy33lqi#5JFuEE8gM$hrvnTJ$f(wk;dUi+4@0p z3hd`)LyF_HoUC_bKq%3l8Qm)6&eMDv0!RyQCC3Swu?&T|LS_sP^Q^@|oUnz*{i8-IVvOmr#$d_y+VGn)G0U;qA;@3fD64aYPLA{8m55jr<03KSP<1|9e|*{wH=NRPi56DT4lg%L5B~$a(Qf_Xc>wC{vqPkk6Gr zfFSdph9f(3g!xicc^#cS`)Eo2#Zv(_1u4kW6lma&Z!X6tsol5>AgYqh{oB+N&hglI zr(6zv3zN$=(L)!8nX5B^3*ciso{a?_26jeX5JCpCZyaV4wkcy0(bxR2PqX|AyXYU)MOwr0Floi`;siOQf3BhnGk!`RQ^2a|MF+Mq`Zuy2oYcob> z04GUeG|<+psvV&zWYL-Qh4JvAFtU0rY@Rd+kVmUov+R)%Yau*8soDG{R-`@}YSxVa zXQP}-@F#GaJo6*{zPlgPX#O=+9~hXWxK(A7CKh?0H@NRg-^C05uaP_Ak$Y!aTXS{)^jHwRK9oq~;wTX~d;&+U?s@*b%h2wA{4g0}dAUOH35ITR$X za03(w8VECe?u)sk;^Y6zmj8P5e^vZ{DMfORuTEcvFKrr4zF5Wnn~MvCZ9-o%rR-Wy z8P?1wzVlpv%G)C>xJgF8h{?CZ%E)Lgc4A}seMC#D3Ee63=EMWKOaO01W0>oa3jAeo z@#iRt|DQ(T@MZ)63;6$D&(Z&Ndpi~XUrJfZ{~u5JFSE>Rzz5G)77Z{y#PalqCyM6= zb^aM<<1?6U{@CHV0sZzN;`FoW6nt{VQI@e?jqK|^A?MBRIsEDKUtc~we)jtHtJlYG zpZ(8U$aTPo;b?%WMJW%jm1G_mew5~c;YW4fK4m8}hgfEsBNEEsQ8vw(W_a9JJ@<3Q z9QVPAc8GZf@OFZR2H22l1tbxsA)tsNFrKkH5L5ufP>U7(3U>u(sToIoadFX#2IH`a zW{C-s0pX~XPR};+ad)S?xzlQIew9Uors!5lA6nSl#?suqn8zU@s{rD?pfRA$;?w(M z@qT$Ozt`&8T)vpQUvqHkOMt+Krh5MQg8M-YDrW4T`v`r%J4B#_0e7kJ zC?BR#melfKkVcSN+X#guu7Ej`25}YBzt}bZQzWAD-rR(P)ve7h>nWZeUxkPfTL2FK zy1+~2(Wa*Q6pm1}usEtMEm)oEa}?cxkr=jIeA?gZrt&)I*Ix^e@3f0XgP6z3;|MBz zeCvwj|KT$}WuNK>L;wr$e-C24TKK=+t?YkGDd?4ed?9FPKs;-6-N*K8!KKe8jK6vw zPi;({IvxDeMpd=&3$3;o&B7PrFqG22&I|;uwUtsVE5GF)ly~!^} zamJXr<8*o~^7%0~@puM||0*0`XB~Ro0nN@r=Axd?qp9f*dHn)isyLAKTC;hYrp=RZ z+H4weNNdm2G1m(Qd*@~uLAbCc1M{M@Jhe{SbIb9 z6vDCQBApH!Bmg#U8}2`LU*rRR#CXdZV_|BHHM+0utvWOSR}1VVm(CYssjil*6@&i& zDa;Pm>G;jdeEi?u-tyr8-OB&Fl(H1XeGdD=A2Jn_pF$YTn+uQnJ|Yz${A<$WOHs|N z8rUwg%OYDyDdPc<@r+na17*Pg7~yRuYAhytv9a5ZmkjzZTesyul?C+Q&aRvPrwcNH z>ipk)5%!-?M~wXN7=Pk(-ScY&L(#=*oK;LLk%&aY0X)`%ilmLJ|DAS4|CLez z|Fd2Ai_pnhXkCA0YTcK#KPM_l*q;;WWZ9qd1_fy+GoM2b=|vLo#2&HMs+kK}#(O8z za`WY~Qe{@_FGAtE^ew}tk3Xa_*gTxf&Va@}couZp%}yt{IA>o}eiFPU!r<^wZi=HL zTt6@Xu;$cG-~5n$ZZ^oJ=WyAHs`D~! z<0QEuv{1*Y>;N_T6YZ2adCy<62m0n0csF zd%IQsmr{zefdL=X2H`jwfmp4!r(Xx^F;eafY!c_;DE_YlC!Z7GFglq{rzQ}8MgUPV zqzG^ZhnEhXA(Vi1v91+Y!$m7d~;!g=^miUg8e9D1f z@a_jvk2NsQ0noKU2nh0gYr*N!#+^@pnrrimDF*-dbN>TP7V21Y!E#^t`>6(BT5V~0Y4c|OLe&M2l zD|psJM?N|D7~)WJJGxUeJmCguG3E#3qmah$w#gp8KNk&T(I91i&TV0?^WQK&<>Iaa z@i=d-zS9V{bg^|;nNo;_+xLA0WlX^*-q7Y?ARw_YO%0&XWP{IB+I<^Nksk>>u(xOc^wCu|CTxU7fpncQPMN0fSiHU>y$%(945M7?K^ zpQC#d!e$sgfInfB0Od!lnx5G(V_^boO%BNi^sqe&jdO<*GQmhCWsmkxYgM7jShgp_A|m z&UoN)dc%W8QcWHWQhAFAdoryzQE`qaRt^02kzTi=DEe=FL(#t$(|>Iz{sa4OW&c}B zk@=ryV_ziS*;wNKA!u=O8~O96rll{2`sU`YtX=Nzz%%?YN^8{=uD#aQA`)><)Ltjo z-(0E=4nhGrH?ALUVV>1*8^Mm@-q>whW(W-SN{O6Ay@p(G5f`^zU=T1HUkkI@^xtRD z|99Q|pWU76{FhTGD*@$U_c-mtV@3V3d(?^I$DS!WE*AiwEgwAw%#RAR@TVaV6e>N- zjcDRAw>(-{!5$K=YJgH*Tl{#=F9#2M;kJJnZR{kB2rIf4Ye<&sw7iN55Tdgpd zxR&pk=Zi);fC$44H$fD#$2=CdMobcNPKegab@jpt5_RK4nl`10(rN7R z=v&u{5qcdm)wrO9Xy6aJ-sFWPvrgitNs10_V-Tk>FA+OQ9lvff2O66PTBP%Zj-c?Jmi5!bXuGLggLSuHIXJ_Zsxm| zx35}KTR^{GKkzO-D5mU7$aG=Q|1wh2dM|P{&+E`5($Dfd7XKQ<%scp6FxUhb?Dhyk?}RO>pAOc1su z(Y5vb5?P5ENLxh>j7)>{^C-=O_;;v-Wuw=)N3XRMs!{j<`;gk=H$x9#Tt>$ba< z{ckBn>VG{^o8|LW<1(WbSVk?jZ(;6ip7aI%z%FaH`x0W_;P9M8XK|9O;SQ0D&BE#MD0r5DSyBcjO%O4WakdisfHaebOq9aW zaX4ARif38E=6zH^*mRBxpzMS_@Vppy+kxc-lOMcofIEcM`$$kwNh84JQ-O5v76{x5 zv+00%qK=I~Ci%n+mkX+>POzsobUo1xljO!1<7u-Y1>Xg25oWiLzCRKrUW!nQRNS25B|Ck#oiD)KHG zMosG>6`>OEsu?8nh)08RYy>h;R1pQaJoCPW;-UZ6egiC`|2mHSXRlku|0t(u^q-&f zTQAl3S0ngVr1h>!=3O0IIP~AY!9ui5`;YGSu5BWp2f7f;mndr*TXwY{Kr5>AuovepQK8aPvbfXFeR zu?Rjj99W(+EYM-`Gx~rh(Fsu07--Z223XCs&_ri-9BYAv;oY=FjahbvdKf~L+e{2W z(6-75kvW29|qFlMJc`Y3G> zV31Kb9bG~K%eYYe9f+4GZ%5ED#*ygL#Grw+FFRWvQa`e>cGTVOhlg zbsYU)uU+MTET`O7{!f{JNG=eXgRs&S7x<^;0t-32LN;(oE|Azu4->d9{!h+^hI&=@ zuZZ(g%`eaR@jBP#`>x9JEnJZ$Ile0~du8%@%dmF0jH_F|nEc-;%=2jN3ZMn|e|N{> z|9V?HRs6S7%8K#d_zuBHYjz|M?cEA$A*#fw0bMBsDe9;303vV)97?wc^)O|{mn*OD zRrC*|36J?P4nM}@*_ib_m`yVnBfc|g$tbhh{cBA9XjPU@wHRk_aK=aMCZ@T=*m>9_ zG^C$|S!U2YloG?|sdz{M)AkRKXhd-m=W#d^f!SnqlEuD?eDT;M2$6bpT?8ReDXyA^ zmKj0CXV&1|D#Tg34k&b-Qm%O9t7q7 zeSgps7#0N&;A5azCulA}1_iWbz7N`PyU20yZ~>wj6SSiqV{((%w8uU`RusO#)L9nP zvsnhd6EPez2zLyQR}4!H-Up+29OoI3q`c^>&xu#+u^Dvce}RX*jZYN#SPjk%xkvMo z74B%&(7Zylt)@sd`4;4#@Q5uZwnPnmGNZ;2=o~#KP4drp#op?o`2WdgivP!M{#_^j z-_A}Y|1G8XLbXU)Ym!5h_el=^Tp)!NHwBNU-r^UFgo2jlg;aScL#hySKAS>*C zgo>fm;P=?3gyz$GK`34h&ciqfGDdhn;APC$1m0qRCmG&|PcLaaW5^tyM;xszAB@`L zNAf26O}}3KA?z8i^MNtp@TakCMdDut;>d4l^@@XxiN*IB{%PiZ$Tl+uYoek^E3egW z_$~DFEJxW$GMVM-c9*w6Ym!dt#ELOSlv^LmjM9Eg<)VX(u zdQew4jUHLQi0ztGx52fG$^S7z2UAs+8vmv1`v3QKdlmjKr7Xv!iG9JtaMP0)BC)A7 z>VuZ9Vb@p8zj-q1DrBk{fh%)fAa+LW{88{`5)JSgp(?<9f=qgf&M|B#qv&**&{@P< z@Boq|kmDgCMT*8|$7?nymf8_+H3B)xA{%Hk{Qbp{{3tGB*+^lsx1=qZ24u9$cC-zC_Yk~$l+ga?Pu-l(YzBb1~uM&_t~ zp68Rj&CO^q4x7k}BuFWQqgFaSqsNRw-P~!lH^0iFK~pr+8)*{wg0QAD!1I`VeMV= zZu)N4ZFj%L|2}y4?nwV6$`rueTZ&TzG4}v`<+LL+4D-;98FNnqxu-2dBlzj<&o7!Z zK)s!z-4J_;as~o5+WAA`lx)WAY8;p>O2v8yuX1sRW&DXpLKyLFT&nLzIAL2r3*iAPfi55Tzhw zRCnC6F+<-9m;TK+FVj5QV;kXs`W-T6ew0oyh!-StAL_02gIOL!5?@^KLpuJyzJ8(3 z%*Dk;>pUNiwx=m*A=qc#jFQcK##s57?Uzm7JX;M$X=j_%!Z@5{n_uPWph>@H(-F!N z$eu5YBMA0>GCModv^`*kHcqGTH5u5L^Ck(d0q!N(gJRqnTR-G04oB%Q%+70BFkrVl zBjRz2SujioGs)u6WHL4zg2q`8e3Rfe7LDTRIU}AUwp(&`Trqqs+dL=fM{Oho!bT#2 z3Wp&Vtu??(w5+n)CU2b0_!;}UUh@=NmSu^$lxPbNug(%l>k|57zg8pdk-7vZPq@z( z@-UsC!Q}t|LI1w~@1Lj=|IPQXQHL@yt2!+@g8S|s=5Lf`3mk6GkzLR{KeFBq_&e2w z?}X2ta*MIez^(Y2=dY;s$BAwyif>TDX>ZrfX##znjV zcyqVrj=A92A(28it$w*)YB$fkL4SAh{da$Fayk0nzyEIY{r1TgLK)-$41zF*=xWW0uXAE{h#3Qr)McRsf#9*?C-uVI4dA=7B2uc zRli3&>0WRjXNfbLw;B0_yxWo9`8Fh@=hZi)V;zn-`ThYlF+|}|-k5p#ZsDQ&+wb(b zKFynjFiZ4KgTJ)r!RZnoEzb?)<{)z*x_@WP#JlX>o1^=WHa;Qyu*`gZ7xS4rp)rU? z2IrA~M&hkKrIV16f+I#qQBdq0@R>F*_)=^vK=(45X7QHV5AMBtr=f^<@4mn1KPVDO z#AiwBL2o*q@oc9)zo+}0Y|$?0{(t^|FwX76*!%zatuIFnQ(z;8o&TTTTG4e5{(=t& zJ)yxUA0?Y7`|+RO*uONm;FFkc8OWnAZ+LyVGA=p~#lBW_0Nk?%qqF*DhSQfV!iU~G zVeGKv-PIc6iUHQ1c=oAqFZPWzU2(!#LeJV|oZ<_?mhf~o;%y-? zPh1V_9-)wM%((XOOe9A|11!j#%&D5wtaUMEIPE#>;LT++z_eJc|D4xCHjKDc;vf#%x1itkj>3IU1IzD5JX+LMR`>Sik*zov(5i7 zVu>iO<~SZqQz02+eQ$11O<1@W;cOZPKcw&3=}13>HDG+-vV{pG$9u+(!0ZJ1Tz0Vy z(@h3|Hg1?ATggC+SgV$MPlDl}{S5V8ptzz?Kailz5at%Gn@onr+1Y(Pc^PT2G9d*M z(pKIUnlh+*x?H^e`zNg@G0TP{jMuWfjfF<6s2#B&sy+3@X;*3q3F4n5!Unl@oj}MfPtbQ3eVk|#aPT432|}K~_y<7ei*RiL%DYG!fq94~k*pa?tO~?1TZcKN7 z-_jR6GG)kn3p%UYB9G$n{f*u10mDwD8wdna4Xu0IBb1|)DWUfDiy3XQ_?Bn5eRK1x zK$9D=jvZ+N;y~1FD+}Q(k?{_t+PH zmmD8QbzuLrR@kq58}JTJrLrT&zVt6*^d?coocY5R z=PW=B#-G!0;*z)FG@Wt!TL@Q%)Z8E?^T}{XuXS0UkdLMlL33w=lnz;(2y`R`g6hT) zk7OV~@j!fUd1ch_7(neC4x3tgRxr%Cou zH@5R5p-oli*wv;o)Lh$O8;U^54b5MHG^z~#Z=KpaIH5^J$cGB;Kc9x59=V7g?|}g%yu2CiLWyGe3X~~@{nOnL8$m)Z8xkxHMKcA)- z(j8@K9~IH@pUpnavHvYU{`2;hlmDl?yIsZqE2S*9|FzX)VESv=0W*}+Z>(Sf-0;T) z8lF%rdT*?gMv*VSpAI4*wz4eySmymiF_;EQwVUV!W>y5?&{C*j9CXANlT~K7Z zTvszQY?sBlfd3&(Oqnn%R4ZVNHsr;|ji+%i3czoWTmWl3D59ktjD}tMu%dgqgQ7(H z7zjbLSl0bh7P>96CArmCf^GjRWoxD7|LAUSx$$4OdX@ceDFsd-mtz@bqnvV<7Oc-a zFvsGt1}20~4j_MV1)Er9LHOiS=yMyU!Hg!)K-CE&GRc|?0|w#E#cn6K-q7GrvemC= z46^?0^^=WO@RVInXA#GOqfvUH+mtCWG(+XA3ur~xHk*oD+aAlZzXD!DTB%4&QIFB@ z??_t1+yl*|br|Ky!UKogw+$|M!h6jEa){hLZ$lf3BQxg^G&*i%gwHnFe`|b0?8&{* zm^V1V&9k8h!OXhGAvV&Uw%z8ArFfy@gd3)l^0SVo~j zQ@;8jxnY$Wq^`I-nxk@7r*!vk*kkMZhN_KN~6uCU^FDC^H^Uc8bzNDc3-!( z3dA@TjYOzJBrJ_dl5hO^Ch^|Kq-B>opW{h#Tl(aSg6OK8J~w_}R4o1vGnki~|Dn_I z#Q*Dcy4C$(MiKGF|J$nKzm-w|2@Ru@be7oZ-^5ep7D?FH_MN1srh6e*BK6-g@(QKwePK+6cfmb@ znX`LByeNIkp8xvt>G8AIuV1}Be*5fyz*efp2yNB_G^_LpKDRQlhliFsS(=P4RaBc( z3M!rl<1~YJY~Bq2BU|_Z3@Q5;VVtw^#-mZ3MS~PBD)NDGn`b0(#8v2F&>w`Xu@Oc! z=Q<6H-USbVK@2ZhRo*>}W)PB*1c*{u?bFc=$XZzwnu*6ekd2%Gtn0WXl`UandD#$K z!!NswbJiHmjrYqg-`QwLb_jI$rNnHExC18}%qG}s3YW`hcoqpkBCQOxmdE3WUGTIn zVoFxvA8a+uaur}#M9CR)S{_?+7PS?;nVnF8pB!VKWm5m^egJ+y@y7UV%7=@cJL~Q7 zg=4e}pFWpsi`n<(;({2V4;BdhhMF&aA#)kM>&91$@59rAxnOH*4bjmI=p@>rLvsIA zpFw^DKA$&?v^xADWa}F|O{XV}h)8QN?mQlhBIR8+$g(B`Yvb;E{E)Mzn|ws@Cq%^$ zLCV|YE-cxmbkSo>HJc(A+9T&0pK=y0WBV$Ar1szBhA{t^lY09r5775Fi#)=(B{kCSjPsVUwBK6pwn(|Y&=v$I3O(BXB#@Yc+398 z6c!OT#U8PP1J?u^YBL^S3QF-4cC^9v#X7Ncn{2bal+1F?6H2YdzCJM3VI$}v4S^=x z;se+Lq4{*VriSK=!>ct^5BkKO(miB+R5cV6Kl&DPl1|W!M{mDHmz!gVEar5I3LiLP z(nM7cT_ZvUz%~>{oVoJ#Cxb7ptp`C3+kSY$?`lRUHB)a7+f5Q3b&HnR5c+&l|I>jL z_L7nse+80&yD4Nn@2Glp~;Ztc}Bu z|7LLPIfBzeZ7+#GIiu&bXy9M5;_ANSV$1(VpTYhEay>fs9~J*sO2HdxVOnnyVCIDg zH)ep*)0M=8BPAr%-LWy$F?wBGG0rz^U>(#StrNhEG$el75O#(n4)KR1LHre>WVo*f zVxyYusa3B?xTxjYaHWYO5fP3H_HaNAXnjFAIBrr8!{67^SmTooVGT#`zYE&ZG?rIr z(jVW8wkeNwo&UNYsAk~Gg1PPob^J%qq74?F@bG&XYg-FNr^W=65hDU{Z9MSvzDT)k zb|*#%zi4=3Ps#>)m^(2`xoAAlDShhu_l+3U+7*mIbH$&dKj}58$^T|I6##ls{Ld{n z{#$#y%KubK@x^~uwtjgy=_5Zj$w`zJ=Q0R1`BDjiiyQTLQH1B<9%eIujdxGz_&h8#E{%xMoKNGi{F^Oz-P9v2QvGUqSZf5G3ftiAM#x}}Ht-o}_zb2& zHVaN!vL1klzggY8VxJ0tjSa2dp0*|efYu4RQ;?cbgovy`;}Kmov__@T#?{l=h;R7W zuQy5m$Kz`7r-zy>v) zWkLTX3RwE!|Hr;ok}GS0pCA9v@teobpB*2(eEaOjXRldL57;j2Jb1vi)$UgN!Gq5H zK5{MZ8%K|L1^!WJo>&O4+_{FoAKfe8m^|;l2u=RjZEDyG^ui(in9_3BO zns7eF=@M8XsUy$8^%jB{!st@a*DD)W+c<)(&3|T1?*~6axEXd?s@wU1n>gh9Mb=M9 zRh%_67a}n$q0tlEReFkc5MT?aX@snsaejgyT)AsSCH*yzM?UddVkv2HR*IX_a>Ezg z(}w~;&zQRwi$J-UTD~ENNo(PN>%9h#yK3@MZHUg*f&X-6E>&4)3v`%b_t!x&wqevp z4O(FT*JjPIsYDSBbmt|8R4|e9w}jpQ9gy24!S~KNv%HMSdhwG*a@a@3AwcAIhEdtj zL^H$+FButHO? zPXsKo|Muj6?QB>1e@ZE9wf{zwhcCC4G^ z77aN19)=ET71&KVm>w!aa;)(J z1cjEwQNB>HzMMAVsf0r0olf7TzA;*FMWt~#@x!YZ0yJae_kyYy5|rXB`Jwf9qQVDH zzM~I3)e&c1`*aU}r9$R#?5!9}$sxkvas6wD+#vktaB@^r^Dtk&iSi?EORv~glJR*O z7b__@47bXwJ1_VjUw_U2Y6%F8mR8GXb3v{-v*w;2TT@#2L)ag=T#uYesBp7Xa2V7X z{xhh#6*>m6`yK?a4v5Y&ayX?Y6mitFpm`1tNamIDEL(Zeg%XgTVbS&@^XQ1jdkXbv zE^4wDbN8_AhA@Zb^CP=!6Cu>Sb?O@%I!~M9xgkWx2O`*6v`O73h<$MYAL;mIFR1gk z`~*JIQ3{Vb!o#MDpd%0mWv+6RYG0S2GWkD7PGSLQ^Gpe`Gzy_FOJx?Mf-vySG=6)XcOeFk=P3;9SxRk*s$P>w_Ll2#Zfx@C=%2pTA3 zG3(a%AW`3jFB*Z-PywP)^govXmTv#sZTH;#&+Y2`ms808mlQ0vnueaPK}&P+^7+Bb zgSY>ObV$U{JxRaZuxYODIbAX=ixO#+j0%iu0x9Y(oZW|R9hb(H7ex( zJ)I2fc>w6^wthZ%dHk=(FMfTd!?!)~2MMF%6E)SBUx<_1mQPgU}jtps&{jpES% zrQiSU-S)2Q|I@4N|4Jz){a;A>mqGRa6AJRCgs>S2$b9vtpkTeGq!k1e1D&lS5GG zNnah$6ArV{PW-2-f`l;Z*{8kUrs^&Uz9(ERGzj5kUti8KWa4&D1DJ_ z`)R!MR)Ab(^D4o6qvFru#0SqF>xQVmCgIf9v&rX@YJq9|6xxFpkG-+0viQFdC2GX% zCZlkAChhztc|4B)OJQK7kmJSU*FQev7HDq{{_iu^S-0K3lJA5HspHT@&=Mx)`UuMg zn$huWl*g<^8eA4!k!JF{Pf%LRmIs>aEv0-Sqddy^F&Eii9u@mqaD$qn7L+yrk?m_y z*vg_%j?#Ej#&lF}8kVJwLXd_tcDA|`My$?}aST+Ryr=1SoF-Oy6tC}wc&P=G6pv_l z(ruqlOmq1_sfp?4;hOmv+O{ZCk`AuA76-E~RzsdZRmafV*=tn19)K1e-mz9hM&w5y zaImeCk{U6&;QM{&M0)xXD4@6tZJMxI1X8R^ogIyW9nomIw-z57<$EGe$RpdIMx`oH zLj-}7b{?dZ>MlsWHf+(CP}A}mfBkh}IN?Ya8N)AzCVjwnv%a}R&ICSv4Y1i%ZD=C3 z>`;R_D(I8eBgx~04IG#Fp?t%GHOqhJ1vAxl$zAdFg)+VMfzC^ODwiMY5{aFJ7y?`(mR7o3Y2Z!z>SDlifwU?6m>6s2norzn(} zQT~=9gBsZ=u@g6yB#!4{@QKD(VB{vJQe8ebR22P3bbR^o-#ecCU)`OZc7^}TC_?}A zbQF$ld7FH`E{E=>HCzMCk7Q)&l~QIU#bWt$Sw z8B&%+D_9Y6F~OhGh=>QxeqE}3sL%% z)j%ezPAyWLmZOecnPKom1akiBk+FW_>0a>rr()vxDPP+we}9esOD}H3`g^hef7hk| zw!4-7x0FKm-##Zx@l?0tQiK*cYxNsIONER(XY@-0PR zVVC=qy>JL3tn1Q4;>+__E$zG13%$`0Aqkz_*Q%(hk!oOKN#A7(r~XewNOrdfKNs^caEa#2D*ACT^C2 zN-~bIp;wuPX^BKcdio)oO5<~=(-4&D2J{ZA14|-aI@TBnq?=V}Uc4v=rP=6-I{Eze zDGH{pZpNB-N19swlQbO=h9vr1u5yoUWjp`0Vt9_BL7>H|+2>1t$SN2h!m@ydi?6xO z0Zl{mk5R$?zy4Zl;cguU!Po|oZ-sI%ZT@?M#r8A|=e|zm+$Nsasvs>Z+QVQ|^0%h6~fag*zv|J8Q8MI}Ic+%JKCw=+& zWdPoMn?YM|i(LxiFlQH#mdsKm<6>x%-5hMcN3xx1^mZDLSyP+;`!2ix2mAluHqWdU zAtp7O@JTpCZ$0+#oKgD2Xb_LXkzgRW>6vQxAbS!He?nBf`M-zF`$z4MhwbKruz7mK z`iKkqh|!pJPMa~ecHR8n_Q_$pGpDU|kk1|7D}0YFrEFxodQ)@am&&9)te;855PmYa zgj|9BX`1GJ*~95Hihc>FS#*HGpeOv#1rmF%S-p7?IJ*xa#o!Vma5W+ygU2043+3MY z{XDt%cGT>3x7<2D;kS6^LN5}18=kGU5?I{eK`r49-yZ*2Gqwwlxa|$>!Vaf5&z=d4 z;zA5|yRYFN0-{_KuTG`SqIgi(>>hREMCI~>7NHvb72FSMHK>EX^idg82L*V>WgW}7 z4&OIcL=1vPN*PQbog<)@2K4_>7y+yEs}6IE;iO!%E94#5B`_nB(h3sh^a52nEXF5Y$e-&bvj*7 z{Etqz(*KlF(ElfAo4|JdfoFz4j>q9wK9_)~p!pZahz6*7qr2}s&UmN<+wOo~NCzI+ zm``S4L2di+s5dLeDuf4glR2J2>WvoI@bPH$Pe)X8tX`}V1Cib1c-p)H3yqgfl_!^O z>*hp`eQU2)V=m?kt5%AY2qtJ&JjBPsCQpP+ z#4YXsv1bAR0t8#{pHR$T0Rai8Er=i3Bk?){+dAt#+S>^LpyRCff?g6JXHjB7{1_$V zPilkC4G>8Lp!J?^djUcZEf89C0Wyuw7`0%5ypGPEeOwfY(ukpHy~l?V1P`YTLXrD8 z$VC*s|Jj-Bzv(Fky`(+Bz9ns2-&dwL+LsLf6-O8D*Tl#2gN@QK?{)2OMo*2+gOEF0 zKFFOd12RtXZ!IuJ@O^8;baq^z&W;V`jO`$?M>g|x_-kzUh)`%U6AgX9{FPJ38RoCC zGtQZBpufi2NG;BnQaYSo27Ph(S>?WP-{N)z4D{p@h1P)i6vv7`!AOkN0sI0=cjMV1 z#}<$x)P6xIg1vF7=$p%}sqH7XGDj@lT9LPg+IMaxwbR^s{8PJ?#Fz3`Dd>psi(5mY z7PpE-DQ+!^O59q6Lfk46dw8k{tl`$06)u9c$Ng2sGI{FCbs{;n2_TTa=YtW}ce_(~ z?MV44E~%)&JufWl@z)PgG!c56e9CCP44PqoeTb%+w56GAQD0zYh`fXjCqwBU#u;>b z6ug;4130iCO^PN9syv^KMtT*}E|E7M2)XFvW`&-^jL=WV@qeS~kz@2P-(jOtqi-7z zfbs+Dfu)bySg4~p+ocC0^yWT@I?|FcJrXT$qq;?LmoTRG>Lh`gOm>e*4fejSy7K0 zyg}Xflzdv1IBiad;(*K80vV=Q5S4%YA)XKosU_+YPL`$~xG;3_8w(^XjiIJ{9lf=8^543_s$8-eq+ zjPJ!cMzI)*jpe(OM+?~4FvnwjNZyZ$^4VG)t!t*pAc`Tfh8ybWd%hq1e{(Z<3aLy` zJ2Qx5L=i^2N1VPEq>*U&45L zGZ{b^`Tx51U)}9arT;Ib2>-9Q^!+`OSpH@?`5WqX(I!1Jl1!!-Nf0p>kYdRRy)>&C z4V!d(O|W~oV)}Hi^)ZSYGA0Ao)Cu|{WvmIo!Gm!=4y}I$jd3`N!;B4y4J67;9Wv1Z zKGK|DxTdebZ!<`mw_2njHgSF0KK-(!%%7(z1(W+G2r!UbD`e~6d8j=&fml=c;1jRS zDz&6@LksA>o(PNwYGYisIt+;c8nNvtqe$nd5gcM#k?zrv2>gS5Ww3RZAaAwg^$;&p!kY(j##C-71muW{U6(b<>!BFJNch`=o3=m z|C=vM%8l5*aIAaN2yAtYCi7G6{j^p`jU+|r|%R%a_xVdXz>vFQJUr1bdj zonF_)|Lt~_|FM*ECHns$aXEm4WEmcS!abmKEkm?Ra0GXFyi>sxl*ADnB!5kw;2>F& zD}cWS`0VQZ!9lVLhoGS6^9Tn?bssHX4Eq1^niK!=ve5tAjsLjStLXny3gG{<$g;U& z50>}-3yU)KCByhbJe-9ihS2i!xlF-aWLlV~gYJyOqfgWUsamD8AU8m!8#EIR#vGtu7`;{P2_{I_1OlK+=dqz&Za zbPG${RWD~jJl{vq%%%=|)9O`!rQ*~5GqOjA&-^h=bk{TE-Y8BjzN{bGuX#LL!bWP@ z)Z%a>6^zj5mj-K6uZ69X*0Slsd5y#NQBkF~rzR@S>C;$EH;5AnVC4Mc$!?&AOw$7# zT*_{dQF>PAu!~2mSEBy+_XAIDG>&sw4>JgymaW`x24rS8XwWXR??uZej@_;l-~PzR zV6Jc4x- z1{2%;bQI=!1h&@miQx@s*t+&2v?Bx zt|;0ioLm1rV6@a;(1DQa9vQEAjnvj&(3Nd_8$e=CAq*)rp4TFhaC<=yTQ*5DttB@c zorV^beK?4N7ZFgZ)k-E&R80Es>}(pHtvw0sLj3Ree{XfRtN5R#6f6I*t^BhSIg1^_ zFs+oU0zTIA8e=$^a4?vS!4ewshybxilw&>(lMEtpMMG!}w00t~8M!41XT2!Lm+W8m zdT!{r^(K6#4jl&}7>_w8l_GFa+GzO$q7;ky<8t`ZgQ#ApdJ^YxI0{0s@PEdY z2J9nE&@&op?GR!XJHx1VYQ%8irr-)dFxAw2U29Vsj9WSGjM|PBxz@lO zdRR`ex&iz}(f@D4(}+jCFPHw`a`k_V{;%Y}rIb?he=HH&4U#OpdHnp@@xjZt&whON zn)UR6ZJW-62i@(h-L3Y62c1QHM#eU>%vcdTHhwF^5yc0Qj@z;?Rz9abPkXXxXeBdL3VMGW#EkSI~O> zYuyx*{%1^HI(QS^gaybV`ESRS|Fk<*{HIb1>i^)=V;)|H*PO6T@|Dg9u#G}^2?1h; z9zTe*;eAHlA8To?7ykPW% z{(TsVMA{)qwwg3B5E%}H3(a;Pnm`I|`XL&At^l#VY#{S9fbcvT7~x&d%29J+nr$;T zNZSK**lBET{LDk0Eci%R-(i%I|S zTdh?7zrDNV>i>7TmHxk!0{B1r&BXfAZ#t^~QIL8>*Mzx<76sX&k=BcWyPu(FN6<$a zreEODusR)>Md5UCZqsx+2`GW!YFUDlmf1!r8)-f`7a@@vM2q#C9a~&lMDj`6P+IO1 zt*6p+aMN6Rpt5rSof!Q_O&!w9qr>(QwdzFLv2%fFc1O*QA5ZHeo``E|dRFewX6>Z@-df^5@>qRavc=^xse6O+)}%K>zJ{ z;=dCrUH3qIrNaMLk^f;pxD3dcF!9I$iR?pGA1TD>W1P(oB3euVYQD6K1%cqci?s$Y zKnt78XrfX>4k20ld=^yI9D=oXiFEVYn zlVd@?TFn`0-3id%UW%~iHl%uE*i|uPF=7)<2#bRD_%N#+=R)w7`wv+q2&gy)(VQ&<6#f8H}v!=hK;Hzttc+ zFKjDLKBNP*wuiPRX%3Ou!_nw67|(#72bvqi2cEIEOrt3_W@zj^8H`~Mr|E2}!Vc{P zURxq9gz!cyklRc84?t^U_H`JR&jS^|APT2!kSFkbGKvRr&VCUxhcRonz*4+Pr`5B0 z6E~2AX~4Fc2ecO7TCCXqaf<@s=a*KXYrc*FurG4Pwq)f{TTH4??iYq#nhYRa9BNvE z>+z;NOp@5m^+OPBH-fDr&5}%nB2A?IGd&?)S`vJ-A0!(O#TyD(6#PBtf^@r02GWh- z(2$lNZZ(1jN1px*td-H)*%^@9WO8Kuo$&gCIJf4LeHh6G4V|kCaeTjjvW%uXtXuB) z2A*_5t&0y%7|&{3PRr2?|B^XId%ghHBK!s$t&W-M($OSPCvo3E)OFRcnO#_~sCT4DTS#aFRRd*(3zKVHY2XXT>!|M(_Ye=PIQf7c`b>$brs zs5<{QUskgJ;c-C1EPn$jW^Hd#@mvC)htup?GCbhN#{kyf85Q2J?~xZ)QE%-SA->Qg z#ye%jzKptS{VBx(Grf++jETz@H3xq08D=_)!62PYJRC3*E(;*Sp;W$I$FcP)Ix@r& z-YWQM_SN_~=cvZ*)^2JUk04Os@F;kefV?3KW?6)4MMbw#d;k=HWT;XE@yIxw^q0`r zLBHcgx;h3^uQAg6WDo?V0*yVYS#ZtcCVR^M3oP1ka}GQkV*QY{dzz-KT?P%(t||NT zsKHw^gPkxq40jSvG1iH}>am__3Jp3Z4UDhIBmHJ#M@!uuJ<;-}Ai&pO2X(9lTo^Wk zu~SssU?;H(E?PlWYnexhx6azUTj#BsCS~|=!{54|VTnCa8Ci|fD<&kup$*OpA*nL~ z2>2c3br$-ltF9VaW3pP53`He@ri!Wr_aXGA=CCXfp-}hW|XQ<-R zcqxc9IWV|j69JBFklL}vt7^)Mrnr`|QG%*^n))>2GB(UWekxuHaF9dzx z7G%s4Bjkdrjvaf85^EMRRJ0zIaLQYB{*T>rpTYjG+v_;^zq_?t`G1sBZWaG`8(Fz$ zNC$2rBj?^WH_yAR$-eQ+=H1vwDq!F6Va)}e%fr!2+g_4ay(LT-8_KQV!xr&LKGtkW zj;Xygx5Rp`?)NJdo&OUlKuhNTwsu|nugdPrNPZE)kN5R%TINg5oC-Iy;hjo+A-IzYt0}=@ft@E{P2$sd?h;rH z_JFZp(B3QqfW!Wqa2(+g`M=RL?UMt;-sWaB7>7-W%Q2-8qv5EPPS5CZcc;6#(`s*i zl|_SQ#_D4?|7Gb zQ>GBs(zZBW^z5C;MND8a88O~qb@P)F|EIOL0k>!LTU|6Gb853okKagj;o+)XshCt8 z%x(f1bWz=c+BlYSxfk>N60RJb|3l$u>H7a}uh(()|2q}_FQwc#|Mw-R^WJb30_yZU zT%c&JVgf%W6Nq1_Sc}IV`M?(`^Wcrk2vX%+!V112&C)Gk2A9#bc^Seb)o07_g4pes za5a}wEdKB3XnGc{n+aUN|FwIL{C8_>xAOlfr7VvB@D`j;loNqK-x?hZzH) zv!^K#{U3dqpVqw( z8CuRVX*v@_nwV%hkbIa7)h9XS=U4%Br5E4my3)6N)GBHWT#<2JW28iyz}hjoA;H`F zEdCHBY#<-w@oX$QB8!q1(IOFAk?5Q$zv#u<$nk|!uq8r1X-JNv0G5tpcF~bvDhDLz zSia=Q>E2_jbFX~noMT`gC3MJl!v61{sGisvo@7=c=#{9$O>*{oZK_(lyv|@n3u4vw zao^Y@hfKdP@*s~s=0G7b@I0qDjj~PJR)086XAuBMZ&Udb5(|PrU0)jZ_fql#b0-u@ z3<#=TJCB>gcsLwgHqTRNU>ZS!ocQegBxTi8Qz9@27?$P=%{PPxX^p-FIG=9u{E0QW z9PDWg1sK7nMdP{Yacnjo1@||X8OpUsBK955{*X0ywA>P4bE<+Nyy2q|vKzh+J)zuu zxK#)`#K0Udfn%jhta5eb9SQ0jB`b2b@9S%f#5_OXj{@hU1beC?IgiRQi*IMPpkk$) zC;^;R_1JRStklw*O&J0t8$CdK;%^~9nj;BQ;-wd2{QShKLBSHbS9^=yCPMsXF6cs0 z)kAU7>wWS%TE9Yy##i?HeN|jtGwO1o#MA)vyP#t=X|EyOuRQ&?8ZK6O zw50I_0`G|h&Jdo%$i1pdJ>Lw=W_j^+QV##WQ}r% zb6SXT*U`Wj-~FI=R@*SW!?ng+x;brIfbkHLb)wJqHE?QQOlxC9A2BRJ5?zq_8dhzg z{jA-&+*kbj$ekf78{&pX_&N9Z%MHzSoositFBNn1VgqBS#h|Sh+})>t)e(-Ru88)F zSQ6Hhs{K&z3j&9LN_yDLf;l0uKI%L3cC}x^O!vo^A|A2izX!<=oDMEe{=3z4;(u;! z?N<8VQp%TU|AW0i0=eUs;Oo!`NTw1-=Mb5X_#o+n&T^he`kPP6a>Y(4ti`uc(AjjL zpm{Q37x3zmYmbZ^G8!ehc*0Gc{w0%e6uZSQBluRBL9@LPlQiQkNh!Fp^)W6HCF?c} zd9)9UGHW#Txx2_7$WdSNAz3~mqMJfL5o3y93U*&y1pc2T;q>x`0szd%|Lt8j{$ID- z+o|w>8HIfGELkUeUKg~Fz{2}?i`4AXZyb9J*^dB(EZ_@D% zXn+>!|99Q|kDc8r|3fK77)+D3S~y~~(J=TBO;HR4B*ZaeZ^uy|Ni^Ie84Ah z3G6?7B@De#u71v*o`=csiV=U82zNM{MqK8+Y>30%Cacql$huYsaBGS z&hx?*M@cxY$_89d+-66JC<;ru+`}c)g?#Pfs0i`8-sOy1-q{}Qmbn{A(D&J{~KfeetJS~I}2J>rtqV&0%LirgsID{5Kt^9TU(H^6`{ut$doaKM~HcRtA zzUn>rfVdVyyf#Bkc__asVv7#>zL;@7J7mT@}mD|^B zd=L8#_Qxovf6w^8FkJeJjT!#H%y(b2!9VO{-Xx(K&r@hgXxyjMD4V1ST9<2U#IMzF zzImDE(H>jmmyG@f)t9}#(@1`|VJmo>%3m5m4lSA0(0&`{JsmdL)tg@iqxfVBYy#T; z9Uh-Y$6EH5{5)%&M4RU;WNm4;cGjUYmso4DR#+~>T&=Kxs@G1Z5NqQkoF*XIzz@sF ziW9JJH#Nc*pailhd)_dY)i1UZ=U1_2DQ<6WQwzqmL5_vER-xe>VpAcam5 zi^>1J#)$K;phnI`y0SUa8zF+}2kCm(eBSSf>r5kh>QoKD6Sid*hNDSrHq&bHT(~a{YzT z$?avTZZV@M{twQ`=aBz*dfPtvf5rcmQiT2Y^AVU^dXx3g8$DakuSxuy2NE7zX?I>Q ze!*`9ZoO7^-kAjoPrTX)jsgMGvfcaJjO#J823o95hY>?1XucedM%=QP-&}~Yp{>sn z(P1%f)UkOZTrB-YYPDMY;yk1|9jUuBBb!{f(Cu*OypFBkkn6~Xdx9!j<)h`}ks#{? z900d-oxg%J5tVw1$d0pnOpg|i753!r-+6Lrs*rv068Ys&I z9Shio`gj<$==t2I?e-NP{a<$c*Ih^c*V}Ga`kzwD()52t`p+Z%PvhxlqWxDV`&Ust zU4aweYATx%DAHan&k%TZTGwC)s_WqYv*`aPH)8>`K>y>T|F^qU{MS;-mFWK!vUT1t zyMQ7W0~DSt&rH14bUU$%OoOMv32Pwiom9?CnOGBVKYsTh0|0s3wCezW)15$;sAo|^ zR~(@G!4z5q#D0QQKDA0rO%i1p3=KGmS&mv9e|}8zan!A__Mk11#Qhq!R@dY{j69d( z0_O=Yl|P^_e=5)3DoiFc=u{cjI8I#ju+(xH`49-@o$5@;eWT^Z(%+Fh=qm(=m z6vM-z8Pn71i6oQk9ZZ4kDq+#v_Yg`gtK;8;+DA%130?DFUCbA$zhQqGBTz3TAgg3? zU{5aR@?c0Ks1ptcO1ziCLHj()bdbttN3|d=f33^fpNVn-_xI#V_Hkc&G5Nn= zX4!e!_J8f29hd*>cB}j!r4+&cO(qfJ)+it<;Z^jkrvR#SWpS2fZ7DN2F!i7U@Zbd! z;&|qxc5OU1YXtjPFhJ0xyFB7rc=h|#uMEVK9hzK{wDe_l z=5Q`Bv9+QxgZ}?FqaezU|Jm)h_P_1zO8!$yxoz_Q&qL6Yn4Z$mBk_&&ydtf^djLT! z?8pgvqRCYwzO426MQSFkpHBZ3jv8RL#s0ko^tqNxUd`mlnOPYGxbh|h#3zYbM($o( zRB)F+18Vr8tO}NJzM48&thI(UHToOSAonrL8oV`d=!mmtpx5yd-1Eog^xAQVa_Dp+ zS+0GEWeIatMUv)5E9)oDWs421r}?xwOunMdKSwd?|DVH2>Gyx9-F5Rnuo~6FHj-kp4XfqV-VAzV5l@%)DrHoENacMZyunb2*H4h~xp|mAS zD@a7(lR^%I&9uVAf1RT7f4_a6{O_I4maG4%^1qi<1phaerSrLh4`+~|ll^F(P8lNB zt_)$A)%ZMiR%rf38k95{U25w2bTF7rF=&ZU$v`_oOT&1!_lz4{tC`lEOKuhWEVfG?kV~ypwn=@#-CUom7dIZ{j{rVCPCXz9rirj(Z@TkanB>t_sPi}89 z>HmXdFq#dcY`ucOMfkt##(!deRrtS*vLML6z9|aDXQ9UDUybCaP=2P*5KV*%*X ztT6qbt?2as4Vix}!v8z2{cpFoUB&+^r3m_eohDt&Xk&g`n{^d9&vRqjd3IGwuXBC7 zsv9w?T9Q||71mU%F(kSn6MBmVM}--sot3p0*&C+`?ji5z3HxNnrvx z0j$yZ({x-mJ8{FTfWZbBXyfi(9bEwW(AM7K9@-li?|KQEd@+j9>AxE?|5+IS*%$w* zQ=R`(%8K&eD-m?pvaXqDT!VN88Y|PdW;HtPhOKIrCB&{|QPT((8q54<+R9wVM#e*G z>5>y$WO5~P%Ws;p1hw_W3O7vp?|D38G-%2Gznv{7|6gyrQ~7_DQkJ0TPH|J*Hvivi zM1U>8r8LiZRv>gdt{>G^vjmaZUL5NXKu3#3z0fPq3u_2?Re}^18kUofg)w2#xI~QU z{(U29Y(c)1IW#CO))$F1zo4Si|Fh^|_!;Q`_KutXb!WTM|CLgfiT`Q^a+M-h9(Cv7 z2Nkq69zJCpagO;=+lp=Ykyim-p{&&k4%q#|(9>!B5t(U>(bGVDeDDK2ATJ>5HTGI& z*rpg3RWGUdU-NjR-y>2`O5MxQqEawG&&62azFR8BsF+%zEELXIy*5abJRIc5W+YMZ zwA0?Ixs?piPJ7!4Fv{U*KrmsL#q{~4pV z)~^Iyg#RJegGK-Mb}RW$DP;-zKY~s11(E;r5x}uVmqqgbEyw@2+wE2IpHhmF|C5uus{mlnbq&Dl zXw1;EK#V*^VVE;QKFrViBI{r@$Yr1am8C$}9*k!>G6XjCRb=#J{h(hIp6rPH&pELO zr1=C)g=bU*(+@WvBb}C|uN9*@TY@3GWAezOH!K$0vrqGTPz!5&C{90N|FVAu?4RA> zQ}F31`1DY)3v6UEL1HaDY#+5wS_6a8fN}8-7|W5dVYf!<8Ly-R+C8eCe4QOKVAf?D z{&NEV8Ptx}+^xay=zYV7GV}ss)%JsA#xC_o*n6<2_PSZMi0NT~U-l(u(f{G#eBIIi z7u$dAI`W^bPL=<$oU)AkKb^{baogB{wK;;$2__>aU+e+8kaV}h;G?g;>AhJH?;dmK z;tipQ_mgQ9zV}k?i{i(~xd^PL=)eEQH{tsYW&Zi^Zn^ef-EL+7RZgM&uTouOQGnVT zVf`zdgnf|gv2G-+CGED!O7Thue;bdZ%ma(huO3$hN!Q>>Vg7Q&XzUrI#3)b;WS9!a zQINoY!i*=@>W|W4m@x{M8c-r{a9sQl{Tu=_k5;YY@Z&;*8Ftu;-D$MI_Gi;{HlZjo zQZ50R!v=N`{Aq+NU3WZH|Npmz>`;mu3PnaqvTl-8c4d=Mc2;C$9N8lz*)y|@tgMV{ zgrw}ft}PkYc5&}{|Blc1_m>`S=X#&_`}KN`*Lk1UI}`Cb6qeQ>UxlgVX~pjS`cg80 zf0@@i_t@1ve+aR9?~+5s#qP6I?DgopL$z8JRBGS5U9mzo>g%^^jQ;V|_(7U^xya9c zuTeXsa4bonq%aQ7QE}9#P7ypHSNc%ajaPclV_s>%5o%;8?_pDji z29;P}c?-^$FTD)0?=52}xl_hWYXenHn@FxRw&jAZ9x&;)4ed!IJwfw7mdg@>?qy;L z*MWsTGkm?zXt;;o`%v)fRhRH);FFHeu>ZMd(E$o}F^gvw0Do-EpPbnWHc$CUMgG(B z21s{BZsnZXK>r>FPkIHr<&~gz#?8&}?pWy({+gd&pbQW|O3b4^;Ki9sKhyk8asLR@J*k zlWlOoPOTn1&Aw$p#>wz?t;5Ol;%1O)569}NCR;VqGHF1<>{Q`Pz&HX|S5JN20FT32 zN7OzYk~##RqLAuLdROLm%MxXgRhUbbdG_Up)+fcvU-@BHj_-FHgv~QsZ?kb28yE!L zZshv5*JkWDWinP0FeL9}TN)yI@A6CEq|(f0A8p(tp1bxLOniJP7na=(MAL(Ra!^qF z2>u&QqGLY_=q1zT=vu$}0i>Lsz2g&%M;q_=M}mqci_n$a2gjlWSe{(Wn@6u+A#u@v zz0_|{SH;Qu+&#_SL%GhiKAqJ4+Y{tpI4L9Y+U$QC&b;@p=W8J!3fHDui^!YDV`9V} zDjJ`AKzillJ8L*b28YZgRz9jp!cDxK_l)(OtM2`+c)eOD!wO!5n!@I#`qI(OU@KhDXZHT08VjjU4;~x%FE{dhPc1=x zL^p9;a`K-`X_xXq87Eh^73T`%4(|knc=L>MI`7&~zbSCfH5#N^o0l0Hr=54 zeE(bYPQa;NkKgYmc|ZDT>a*m!7UxVNov_a5)thfax3Wo)`s3?rqvL3YeBD{(L@=v) zVBPwMhLeA^<_nsks4XINM#ss5XJUj_tln?>-JJoSFRTjuOi6srms*&b9V~u)m-@88 zY`*p|UYTd)GUxhHIWg^tlnC1g;Z9gdD%My!@?z)Tf-i|(Y>6rwNLwj3*>UwN)Tb)e zK;^;4y8VReIDW@np0e(^j(g(E{J$56V=pSEE~#Pv$lDJHt;`aOS1WD8s>UAV+$=5kS@JHM)sou?EZd{ZqT}RmUET2JZj43;3Xr~ zJc&E*dFgJUo;W^D{Dg4K&wm>C9mcsJjUn&ocJG9{CWcGf(~{ zfldu=NSrn`S-E=^hsp9by5q|IJfCSnZrJ+nub}(TJKj$VN=}{MS;Tx#{XjY+maozo zwP;RSQ(T$zdA6+5ai%LCC9?btPq0ia#SpSmtERkK&X;h$4Xk4}*7c12$2s?{pyrPI zAJPZn1y)86ab$BZ>G7U|j=M}HMzvLI(zSEvcR1s^QHWL6Z-l!L@f9$n}9=DMJ`)va`dJsv?;yPs2`+6BLS`#`LbBJi}3dsvZKB=%dvOFu{8*RBGmpEi> zo3OSe%r`<0NBx;iV#5s6Q1_?(9YhlDe(x!djFf1a`mx=n8Msu{bXFve-CTddq{{jF z8phEqJkJq8%Rjil`T^Ao;Q7`Ph)3Ng{VWMyIOOi>Zj{M>H#0z!X^^>k25F75cWHdA zkDLm@nP-$N-TEW`;EV9_dPF`}&w{7z+r$D#>GTntZuxTkn&h|A&3p+25-mMuuO5i0XB!DU2@MH#9<`)k zz2k4C5#W$u%zoW;|DU`O8JDidMcHRrWIC3g{_r3#KfGjU14^=En)rNa&{Jv-ke2XZ zpIrHlg2jFda;!#$Ij+%x=I6as+EQxyUFFy?{d@e|yrm8uzdO#v(YTbp$|up#4sx0t zyz=9T=cmGlN5jH?S1kCcWL;D?Up!M4NxrG_<*C*Khd|`%S5?PUN^sj>{&H>=eom#Q zr;7@*Ed7e)MJ$OwDq&dS$v={Xj?kk#vUrK@hZ_4!cq5yF(zNN7dWOudOeC#nT6Q`Dt-y(o+afCIGl0jzVwdw z>++iMC8aZwjBCI49n7EGcCAd)zkJ1v(^t?{axPmoR9Z_exoPv%jz*z<;Wl-%&*>V2 zn>F2b0&fl}KJJ?|M^*L1jNjR|u+kDRj#)@T*SWl!8wUb% z$>3yO5xCnNFf7KXiadwPQ0VTR^8%X*4@Lx=%3G2sb?gIn4kHa>s}<;sPT{{tZtmjf?^myTSvlUX#Z3(|_p?-`AlxTU(i$X@M1EA~CNJwEd29mKV#bT!i0nbT1)7mlDO zR*Au_N1&S!&Ha^zmxz_kAs(oCU%vnP>dU6<6^D|)Ltg396bj}DS8`>$XLnv`-3$Ev zs3r<~ufOQjQmx);k2hP_Q(slgLRrEMQWKaf;bX*-#_;c32hdF}lH|oQ79cuVd0fVr%>wH1mpP!;p>`Q{#ccQ@=CnY0eJp z3QdNO=*hlzb#-+&i|sHOxK@2n>%IUcoQ+d7n%9y!YDhWclpF5ej-6=mnf3O@Qsz2S z{<)0wTDp-WgC)Ug2A|LtO{yHGKF7Ub{j=d44z04kg&z%$#N!S2OwY}Ve@&GZc33X4 zmHfAlbsL6WA8o*xsaT#d=vk@Z4yg4SNjests?)CeZKCZwLSX?ELi37$1N4ec5m=*t z02)ZXeSP4mNBN}Eq9B=S*QI-iU00CmVe;hpu$srRO&pvLubeRtR+37Z3j8}6p=_ZU z`l?-%U5;VLV^>Hf#(2MQU~?K3y+PDip2np491c~!R?rf4WmjI2>Ni(?$8VNyxAVT7 zz`QCP9LrHE9X(WcFyV-7QkG8h+C2F8&sO8x^TSxzH%Y!I%aT_Og4w*n<136MqZx&t zL(pT`Mo<2Xju)vDtMAI3N?eAtf-q({+;!o1uLKC34Y6I@ZjCC~`$<>ZrrR7b4d+eD z%yD0XH+#^VrNY2RZ&EhHW~h-)c`c($B-NeFLgVQes(*pT%j}I=eSo{%{yW?e&jkkQ zwTyWcsS7Q$G~Bkg@O*kUE)t*qgs?LXoQtpdEG%0e&n~kSnhi8VoE#ZwMM0;M^vl6EKzECtL~ZG^p5`9IP}BV7J}Yq zRTJ|TeCvyCvm>4e`2|!sqhnS;K*=7hM^U;3oA=Ia9ZudG%(e|MilPa-vkCbIl+1;G zG<1%)a(YWE-U$&{{^8&RO|PB%wLpFTM-4Upf=K~3KiQAVcH8B1XWLjGuIPi$emes` zrRB{JIdA=G(S@mNxmVvrYG`V!PbCQxT$5pLyK2vZ-K_zKaN}?N2BcR~?&16;=v1?n zZahfeyxwxjY{dJ>p$d8<&>OU5r-E;Mio45t&byAW?YU`yi{PqhS`u*VsoiUp$*bpN zv&;IHGq+up89d%K+B5g8%A0%jTY=2HlE?F3(OUu2eGYG@KG;2q$|my;@&2p3%MyF4 zYK1;eO!j?l!f*Ly`<5a?@_xc`iP$YP_js&T{=1(&@-rA{p8;(?9`dAAJgBzQH;i1B z=yZhnb(+4r@v6@UQL9+J2gP=ymB$;r96=E~*5x_@<335Tj+^<;f2>m(OIEi7U)6&OC^hsk09XQFVh4#E^H( zjHjS#(M)>Dt-?(KnUA7GrjE`IUZdQ#SDn7`f|1$iZ6Ub@D+-f@V`qv33lRo|Hr?jN ztHez+eRYQGaoS^VUOn{#+D384EiXxNtHu&SEOnt#A!L_Ie3`uQrB3D|jSSm^YZpI) z10~m+Z{vSJgoKT-I?z!na|uK<7FiJ!n7C_6R0&1fqXk9wXerW91k9MFIhxeA9fZia z!y3zpOTdd%-H+L9qe$GF56^X$<=n#!lp9nct?X4>ZwXULux4oKV zo2Pgf=iJ2=Q?xOV@0rDHCw7~wS$i%HL@ibEIp*VmkZTc)0nPfF8xg`IYo#OKpzj>%ZrxEL z(f4O=(VN*VRFF4rSYuO#XyZO}j@tZn3xe)DQ56=D52zHXFIp&jjlX;{_VxCT+7{7y zJ__?I*k(*n?xoBxsxbr6zqvWA02%HDFdvHX%y_+sp3yK-z?4C?83o!-c! zCe}(`2V{HnXEx_-xy>K8?yN6I%gJN7b9jB+nzLXvOD~wzH*cCD(yLO)W^}M zac2}zHN8*SXS7f?KcBMyw4kT+m;Xq&S5+J^5jX_A$Sy6r1JTj7u@%7O{)KozHVGKz zzmN5rKYo3qt`yruoKtO14C3G@KlmZkqdzpsdS>>;hq5u7mb)1XXA_8dd+shvNQcw1 zYUf`*14ZuSSAM@5%<~Pbu~3D6O3SKW5!br(K9`E?T@zDk=QC!B;(tM(7oGk!%+|e6 zVNA!(uV1(@b#Hd`@9N;>NQ>Q&Q7F2bd1<}NgfKTp?J9n7SZVQLg4G4b;MlqSt&7SE ztGCfnLN8qTLq$Y`XjeU5s8|i$ZHTCK@Q=D~5tx)7^tAXu);$^8W@FGKY57vH=@-~N z`qt)&aA} zJBuwtnPKi5(EZQ~YE zzklZr*KWS8ZwNE{aLY^Q`5b+9OMr*%*;UOrixLziR)vE^V%EvbE%)N$+eudq3*WQv z`e{@*$gQr8w`tzv^!5~^WwqYkBEvt{lYv+*hS~Ju^e>2u(2|F4h%;}ne`Z)pzOnM2 z!@^NCz5S=*WbKY*x~jj^vz#Z1R;=p$xG|Tg!_*7&Ultl{>WJN}vr!z+mS=8HPE1HC zQO=bDgsE$>kw)r#Z*20K z_mXOID*S!s&>n52FL-`^&3?5B~()YzCo4>I%YO~lpS-K&&V=!Hl@11phoL{ZHlMcB#sDXG|Zb;n@VvPEZvFRg|fFlJ~IO6kytj zs)in~4GMovy;)TBspgJIZIiCY)??viW{cOaKXjAnKYJv8!wi?5^{)TL8Fp0_QPUt+ zLR#((!VRlp(c={C58cF!id+7W0(7TjYkVh=F#x@(=(#6rxOWO zA*?Z!g#iq+T4EmrxSKhWn9rF?hy4STE7cU)Qw>GFLFrV>Nu~QP;~0i zWtm3Wh5LrvcZ`y2WuFZaGZL^U=2# z7(V>{enzXYQtDFv-R)UXsPSp&h2TuKhmJMgEhcX1-p96(a}xDL=yRbzR*SYF|6JxA z4=*>3UHRv)=qo;a%7vKxg+r5jCnWh#ty2qDx&6}-$y~MfZG1)VIg0ADy43&RMBW_^ zz7$Ob`X~F|vbWvGwRfE{XHWvsv|Gy0WH3o4#%c?N9L1&WMqfS(x0$U8vf2|q1RF>! zbdB5YljnY|G2=?Tdui&03qdH^NlT;Pqw0lMWs7y6BeH4iWIZ)bvyP^8eXe981>7fTZ+ddaP z6z03O5}!O{RzmKB%I`H2yM2z1EM*77}LLKN%CtuHL4JvUpzX`!oLs zh0>+I%Y0($*GogmYk4kAg(lBv+R*X6GfL-}6 zY>x_3(-gdn=Lpw-3|~vqlW+6V3Ay|!=Uf7XY;UaovdM4&`swt|krlfwQTb`L#0Ye~ zq{YXuMcQ!P-kR>)E~Nr9*Ytk3_I~vCR~8EkFR6_|t5C9GxO++h%QD;Szxl?$;#`g% z`1snDWlJ$t_$uMPwR$Rgk%-y~=p6TQJ|)Mot||T;mgwp)&vSh1pk(~Yf)4Dx+xk~o zKZ|qXr9{V5(3W|9bP6+BwD3Izy{DcDXX+@c$wyHzHZi*jX)HLR%)hs1wt8MUoCAjg$NCaFI+m#bsqGH3wnQfsJdBk~*6p+KxT38; zj$^&@*GQHBEdSm3wsz8_X$^)h|WpI;JJkKwK1$dv7ua%T^k z6U^Aj|8+4m^ab|zD*c^Hr!BL1Wq4=jV*XJ*+E+V!+{qD7=W?mzS%o!PiYDQT{~PgU zYs;cbS`6IrBRxX?*aDgtQ+QrhVu-gq8-!2l4b%v1VcU{md1^;%7y}=4Eu%M6AM1~b zd%y7&yv!9vZ_`G>^C|24X&(RE`m%9QTS9>1-U{u0xbg>O*0Erf>yTV@dgSf4?nll) zP5_UH1&R9$s)LkTUfEnZot$JV}jF5jEqSzT#zkSY3P0Gw@YIJy^t~67U+A}hLgV~h3WLl(4 zHgQl$^wZ^Q8R%jS1~&{L!}6aGQSArMa3oHD2$+qgBq09R)tWFu_ksY)`|F9{?YbdvBc^L| zpKbQa+pj;xTADhnOvSpEWW2KZeWLdBulZpXxFVvPuk4$l)cCJ|)SkMeWOv_vv4BZm z!12ZUWw}>NdjZ!qip}5F23Z*d>*=+8z~Ju=7g#*cI9(xQaMk^+X}Q5Y|34L9I^0sa zFiXDLJ6-Y<{w~Fqqk`H)oQ9ND*X9B*mo9<&8Fj^ybG~24i(M6QYm$;@Y>A1d!Npet@4{q->+e6clOs_yL-8d1-a!`1$*9^ z{*-olUEJ!P{BF;F{ad`ZUCyY@eodx)?k)FUO7>#eVgs*&VtKZ>v@h@eRp!6iTlt`# zP{U|NS-=)qX5=Fz(%?N_kALHzU~yd1PDdyKYkM*dgb;2-=TeS-o!JdC31nEM{~n)x zKmse%swfHES-fV`V39NWYT-gviT^oOZ+`(7v3lvYLb>aWkUtpvZQt2{D7Q1HsX>jrL zzzm(iG2?TJiBaI}vDOZxxqFW^L}y3`6DYg1V$c2Ny?V&LF8fjmkboOg~Oqt9Kvilglvq|{*Zd8wIP<8Qq>9alo z2Oy{sFKW$`(iF1vT*NU0+Wp;=X6j%C*y5Ms zG`ZjT@#mFcDbmTg6~q8V?Tx0QCk>}^Zy&#!3Y31XmCE7VLS@~z4KB(Y8w2d^6{&Ry z;1dbp*+nA2*kUm)1tS%ERN#t81XI)*yUP@IIf)y2vA47qY0tOzWewv8YxP?mo>n>K z#O^O9mSHj^WxA1kEwko}^WtdL6yAn>L7TMWg=KEW0>`sy$@o3@THFsZmtea1gC%Iz z_d`3@(}wh+0+`=@#{k@_q(dmQPiaI=x0lSF6J~5JZk`>{6kOtFFB7RlTV_ zXpr5`eYaYY3wZ&Aqasm={?YL0T1FO>l=Pl_;tFZxzszqGSQ<0K7nHWwgkqa~)Ly6@ z|B9~;2#RN~8#noNID?1GhAVsaK(@Mf%hg*k z<-5O4;V7x0(k*$PCVflPXhU>pe1lu!7;GIEuYu`R_emn=`x!9A$TIACBs)-9Yc}R; z=6&lR(U@G1;-dT}#>|M)gioz0TbjkKhK#VE(C&}l>lzm|1?~~UyQ^_9bIP*i0{y7?+Kg{t*TL`Z zU(BmNOU++BqgR1x$c-+18ERf6K4%I}5j%%Er~6`o5XE}a=n3H;&A5om=qKlu^2|QN zH-yGvyRXM>N$o$qZyR@L)%Yxa(up|ti}N(&vp1(>aa-F{mw@+D7G9EAnXT>bJ4j z43m01=)n*-`hXe7p)xV*?FW}GAJ{Zp;NvW_Q`TAXbIyPmT*+WM|?!{ra3DAbi2wBRrsQ&j8O}he#c0DMpG`uAFlmc zZd>ep(LW)FH@EiMWNwU?ILxZfb;UHc{`O}+eiGx09MFfdX8TFkd_NlBxUU~)+no1v z3dg;6z_5QDasT(btkT?`^@#EX3nl%3tj;0U>~^oZ?9uBCJ)cC}GWJ^E5EKsKIDBU$ z{ZuW}Q`~5j=PN!Q@w=P7FWr?IEY5rC4R6|nc!-x(&>KB;q?svjTg_Bcn-TbFksj^T zl1_VM)_5sB^{s4 zb&7`CUH$_*e z$GsKh@Oq+CZRQ+1|4rRVvhto?U@qV-PeA}-tv3z$^z*?7{@S}Hr&N?~Ty%Lb@6Pod z?$V4(AAxq&jfkjS8#shRVi>w2T(w{5T23)eVhF^I@V0SJO*_d&^{W}9tEq&*>A+k8Ank~%H=SQmzk+$#QTm4Az=+I?;_(E?@ zeHzZl+d`cWC4Jfj*j7RGL(qWSMs}$b6^X{>bw@f^xCe@C(G|_EWF#A0fwT!&hGMYg z-%bz>YLg^+D(y)&K@tEeRwM6`6fJ`AEyw^YQ~x;`dn^3@{`V<GlpI5Q zGGF10T^nKshr}{;SvZPPbLl;O>8cnWQ}b}7=qPj?hT8Dp{StVi-~v;dIsZhlKCGA^ z4*<{`bVPe}xv&vVIMV=j--UYD`;Snf*4-c%xkJBrCH5wV)>-h{5k9WIzXQEF0|pp% z<{_&clQ`AyQw(PbV4JvmJ4|NL24F5L$u<>Os{>@TF{#NX!7U=#%721z2qll4&i9_wmgO zVDsvm_%nU4KNeSTeeQ$SRt@LDS=P{9Xb1TM6*K2`l55dxZ;gYy!OlbG9{yE#(!nic z2^s%^V}<81M~it1$@L_OIxaChP;w>iPK_skn_J+(ni!2jCR#+8VK3r^InnLT09eqf zVm^S0i`u#$;9_7TmEn=VHgU3D z*>VcEbJ9S0#H=igzMHXrV zyrz->NTBZ^p~^tC(;sAClRS-_atfQo9fMvN>w7X0W0q+Cn8s>4HUfqfhQ`4Nqs}6r zoYYvqqk?2i@>gh$u{RLeoo9kZ)<#wDB^+|8|JV(gQPk2v*Pc32QDXMLtCDxn9PA-L z>3Svkx?eMJbhjj;k0>63ThU7dF#HKr=j;^+w1L{}^&JtPiu0QDG|2Avt`4EqShOy?lgH*#s< zXt`UW1L~aC)_~#;GLO%I&^L`LGOB|JXS9LX=v6%eX#Khi>T-~DqXj@y0Y)?JRMRHI z`6)@n31q(_F#}Z;37&}K67U#pWciLu&rTIV)SJ>UN{WC*ued(|J_rg3nK>8vT@S(g zj(pky64TvBn8sCrI&BRjc{l_yv8!x}he3%Zi5_-z}A zmJ}zgxesK>^8ps;_7fpCi!C7aDVD{zyA%)c(fOs|kU$cDji-Q<_+k3Y51n^~fk)%$!w8VpMhR$RLY; zef-`o)^ZE7CiF0J?x0!OQ;0layN$+Tc!=B!klG$%_W&amGBHT}aI6!RkKsxhX<)Tx z?ASuuYf31Y$irDi;rK9|Q4=xiO=uX2RzQM&hb7YcY@Gpd!-vGDQJ|N_gyn{Kz z-a(>y?gi!J!e^YjjS`2`s4g4X;B!+K=y2zQo;zq zjb#Y19#oUF1N5)2F1RDK(>mZTMzBR2j|$9fp=x^3zvb361M>Cb9Wv=OyMQ_Y=bO+D z2>(Oo-JU05#0jzpkWmgsAbQhPsxMj{DKV zP;${2qvk5W)viKOHiRBJokfUW_$v)bSk7EAlB3wb^NB==4lWr56)IcMNgM=}N-ac( z{UEF>Py);g+OlE!JJ$fCJrVUDU|EsNk^3i`>C9P^VGIDMo|3PUrBpTXpl}#4pXd&F zxn)j|gg5D>pIg%csB|YXSHg(wz#_5&dR9sXo{WGSex1NZI;`b&2(VcIIOHRsIDZQ|VJRcM3ou7#PT%^So4_j#4B%>ZfQBH9 zB+OgDaRcoPcegG8-s!kKj88bS(N$;@(FH0X@zM7w_8J719+FfNaDPGOt;{|2i8c~V zq{v*3p)c)nIs{7IJ{8YUcensbh6og@HI9Ktb2vg&kL@Woh5I+Bg1bOn8H`aO;3$Q* zp_@Cb%hgnpz|r)$`CI zY?6Mzd1OpSkPWWi$ssx z_kkY)@bi z)0154S_69DNOIm~h$1N|v4w##H=GW@>V;SYU*cEL0nqJn`hq8vP% zX^AJHOx_gx1=Y)ds6Wzm$0d-B$NH8&0@yy^mKyWM}dyC z5zlG##$K?l@w>vJSj-3>b<)WK1nz^afRc^r2G&V>-|u1m&aQ0T0!mEbn_O?desOH+ zl%@UJFPwP4O-;Hxdep{g31Y`tX>AH%7v}j?4u1_zqR}6wHw4)?fdSF)H33@N1=PPu zE+X3d^(NFN=oj;F5>toBCGr$NSZCkI)WOh+GWTzX5tNxAM%$d(DOA&I0uxbSYPI*s zL{yI&h?+tDc&?CUu=7Wl3ZsNGJ4 zKDu_%Z`6)Jt>Q8`cH4YM*Y`2D>qpE|_gsGW&IdUh$g!##e( zh|GLKq&6$tMa6!`Vo$6}BoQiT2S^2Kf>CD{D97cLd zcuEaah@HzH;F^WX5f}KMtQ{wbd9Z%R3y~!8-Bzn8qManj*Fdlov2}D2_7tH{ZAr(; zV!lUx~ed}1vvM`Q*-J`r7? zDUML(=wP%BA|`2);a0+UO!>~&N7hjf+fe;0P5r~K8KNusz|P1)&xoAl$rnm%I#n2|3fn-W zK1KpwrWV=+6-raUYVg>R{xsZktAgZ2Z0v*FEyO8ygW8GXo`=g5R4KsSf+%{3h_}md zNtUlIsR3mK!2FS9BE=67A);>x{(tg}9g#)!u^=NjJ7v#{>w@1ukUpuFU|8oNu5HA*g%eEFh=XL`sHi}N zMhfmH9v~rhB7qQPdYUBt(GiyYF9H1!>tK$@j2)p7)B8WWUxnEHN>Y2jZm=SI4!I0l zs{CI-Ba34Rsq!^AvI@i4q(d~K+7Ts-@jrTaY)GXBcATVBUOp#+utFf9xD7lJNLX$$ zuO#7(;f1QG`9c1~7(n{l<>Rp@IxBx4hGZip>eZa^z=F{6-QLdtWXQnioIM1BIg!YH zI!=6_2A(#s>0j9f zEc+EdVJ4^pKx+AbB(%(pk{Yl(!w$%|bB%-Jz$Jh@ z%7-x(z+L?qs%FwApo+)nHM2q7G1%`!-i#31ffl}#{<^S@$ZAy>+4d#p=KLMCj#wbP{!8}p^%gmB7*B768{;wOVd9#(2>L7!T^jUPa-nFm*gY^50)n= z5`eooq2$ITkik*(-|+13*dYMM(iol|xEf8Ow+h_%px#e-)X5kTX(s9SNI>JxdE~#O z+FO#BauPfAz!_jC$5n3t^e1GAkz_WZjaVn|ef9a~=igyDVF(#<*ckXo5Lp9vv*iwTrUBMOI9Fymb`c8i}t7zV&cY`? zE9%T3@d>l`Z^t*!f{a*?sR@#i6VKZXxcXs}|Ia@bw529R=2S=?=&R#>)P8=HtO#-V z$m5d?_&pxW7~ckHc4QmX(=U6gh(50DVU8nUmIO&&??a0)7OAh%=_~`vuTYGVEM~$9 zkHrAg!4VQt6V3Mcj2f^L)D0>g)<@zqw6{RWH&BB5PX?sm#UsyR)Orsye8$uQfo&cF z)g32gP+Fu6DjT_rQ4_I;&X|8a&miCByQQV3lJ-e0aWDn*~{}=2QrT}l!%7B1kvn@h&cO~zn%x(hq zHNff)V>|thz)2NT_d43yHzIQf{Up#_cOPUU&H-Uo6|=GxliVjly;Oe*;7xa9AA38P z!eiya!8%P>JD4Y238kP1Pz#P%5}tqMsnC zune4BcX%5c_3OxyVlXZW>^(#%Q6GS-f6^Z%T@+|qrcnbCV$(<=)WA3T#;mA;&&YG7bWU|Emo{7NW$~OLKTPg#q9k z-|gEFCNMn$7%l+RA0+hhj!FXCY$<-Z+R}_8hO>GW6b=IJlcF^(aOudjqc|19vjWkX zZlQg@zdld;`UpbI=y^mS<0ugvxFXDU-!J|lLQPrWz+K^g<+tlVcLfvo@CZ})c@7wt z0&3(TNAoWNCiLjxs^N+3ZU-ZmPw=+o|B5>Ac&gv`j~f{oS=kwtoskhjj!=;mvd2MW zZ-vNFl1-wFLRPY~Lgd&&b}6z)viCgW{@tg~_wo4seK_Ymuj_R^U$6K51~DJ9OwrdM z7IW-`dg&h%WB#sZJ}m{0Is1P34*(6E0=Yc=Kiz48J0D(+b{~YijVYm)0UGk4oEUB? zEX?|*Zq%WI|B*=^oiRt@(P@(J2jJ2i@au*E4wCz49kL|$QZ>W`*cq4^A3_7g*v8!s zu<-&?n#yCa%a`CZJG~SKF$_ENjklKN67;5V_``;HJdgj$SwN_haBr#Ch+gTelK3;7 z0iO3jRx}>GfF&dnfbqd&AfOdvhie0ICxDcY7>_%KS3(~~Doy?i0XDCQ^yJu|Exk%* zlYuws2L*(Ef^%={Tr4SD8q}}i+W4%^Z`dpX3+I77bV>YhK=Y@?^V@i&FWVq&1`yj4|Lh?T#OkHn}m#e+mERM1+UY|BXpZ}#NIRo1b~z=?nE{m&cSc)bc5g10CV(= zAgGo=_?n*Bb!ynTPK0_}Y1fFLi6ppjf|&R>KER@22@j%5-mnwO0{)H6*s}woit498C7)z1SX8k@gQC4m?r>KMPtI2Cw&6`{Rjn?TsU8917i5%Wra;Q#d) z!eBU6<8{uK%F%0Z0h3tZ4{y6&2+WYDV_eCT&GMESXu|-&Ebj7rq6hQs89*)%@{#|v z??#vU9FEW^{q1mi@RD-K}fc{}9_+LR21R9n!t!-#V~&t)M!vh;h(M_aFPiOTID>{R9D; zUlV?eaQ45PU;l@_VWD;<-m)LwA#hCsey3$4qCNSiQwh@qq-c^v>QZJz>rh?3iNw)< z7y{yJ`|e%f9RwS9$^rAZARK*<9lme6BN%24Ayb1hfIBaVN)jG&o?Yn5K#OG%p~rvV zNiBop>8o11wlVqnkETiu4rJ#-;YoOmRc9Z`#8ONvw{xkgz2OK}ifm z3qKK=DvS}itMCI)1fEU;-T%fE>O$t@tiR|!cw3TIf%HDW4rwAJTOfK2m8$V=n)?@= zY4;Hyf2K%-1VXQdGJfqODZ2Kw0MKid4-7dDk}-E>eRmUJxC)?99l}C+@Xwp+gWgOD z^k({iA|vqB_;1qG+nas_PYldK%F>g5JPi!NG#p6K0-|Ri&20w_G#Q}ENm`o7^%!jj zkURed!&|l$v_zR2=9ADjK-zozd|}!J4gZ{0I1zT_hh%D(5S*&4{v^9T3veESE(j9W z2@cIY2tDmMi7pVx0X*4DV{Rs+a4iO00%5W}%MyVP6sbU2*lZy}ET&JU*Y_v(!Q{PY zhy&h%6kG0Vg)XH1@R1<;Z!rOOub%P^jwm80zXS=^aYjn-%#fVjzo1e6G=}f(P1fs) z7H5`y~l{V{voG@R{2@{y7r0cR&0qN^GyJ8c=J-aHE=HmW@F8GUrhbAIlo zjOr2Q!eVL94f_83Ovb(XTiRA){j)B@XVfakcWpSB<(B0msHQuUG`-ln$>TD<8l0a; zINGx4h9P{{x`Jum70nd9iRAfsOZbC)rIDZA1EX| z<9-N~b*vn(#NSSdQ*L~sCK@8-xxsssq)CR(5x<4uWs11|gPm?8xUtGhQ@Ca&Gy6Bn zEOkLU?|sux6pbZjvrcOsZ9Vu4pVVq+5h{|g)+pOt4cKD%rsfg;@o;%-WIBYo@%_## z?1H)7!88`1pjNR z3cO?%QJLD%=DoWOM(o!ffS*sQ@IiywI3(7_0q@vqU`wJRQW!`L4TeYi);Um&!p$LG z2ODtYMVB6?sy9xH!++I!&#<~jGP;ab#LMvlv|!0Mm`Pw}A<`3kHSG;0Czae~Top`V z3`2MR2@Dj}u@LdS9ImBc0p$&=2_Jrd=zU~0XdpO4-}gNcH2AFk;b2l?UY9+zuVn@P zp2{w0v>C&q;Yt<8>OKNGSZ&*F@VNmWX%5he04}1iiXaH*f-)2aegORj*DPYwF2IaI z4B_cAAv{j{%h7f_x-emj&U#4@95d>xcOW>ZwOX#t{2Hm!QGi2$*2q-#| zcw7mgZasiUh@EJrP=@*)Oeml-RcL4dTz&x7?ht+#CIa4+L(CGp4_ zz{ z6wHous58!3LI(st#rM$y>z?d1c)9}DO$;eVEa1u_6kiBvn4nvGKCZe^2bN`~4e$t8 zaFk`yCW1vS;!!$Nz!>VuH-S4Yw~kQ1pd(2TMR3T)cgYOnWn1QeP95Ov0OtWjQmx>} z2Kc#v^JIWOGY=oBFWmw>Sudc4*Y_{N0AAeWZYKOs;GP?fli5yo?%=X9u4hF>G? z;2x0D?F6w8FXByLeC8Mu9XL2RqqX@b34xKUIJpXpXVpGR4el;%GO$5)X9>PMAl%%D zbT=C+8zy`K;S!;OG1wi) zCt;@s?r%#U)7r!lG$%j)@c(Bnf`u!Ci|EK486!6)y0QiQh4B$Q@U}cJ`g*7L?(oJZ z!U%b>0rj&SL{um{!rcI?WWA%HK>G)e!_TW^L`T8U;JVoe_Oa6tIZdAVA00l4+P9$0 z05R+BVCCS^#?iDS)aV2`V=iJroI8z-{EPe@a-p>Ve!Y_3EyQy;jQADJfxWL#t@N&; zV*gyH!kMX!0J&NFCTR@nsgBACI#8wtYWxy$BE5^{uwLu}mOb=SLdpTjiwCZ4f54In zz6*-AxIF3%YVyEGJ z%VU!NU|NG&1H9QqS>FIxD^M{I;iqF3p+)wPSw5k{Ps6#<8K1xdoe1i>EWbv6c=@dBB;U|OVzK~&&G-nw z%#qD99<`k}^SOS#fzOTV4A}g70-$tUBrD!V@nfJ_PN@L8pp!Hmw~xLCA?AOV+!Z1z zg5HEj&yBPKz=3SqcL`=UU%-uk8a|B+!(#w%6mqC{+!~{1!6SSD4psZS6W+XbRfzZc zoPz?8Fokng5W%kUyLb?Y!z-_4d=%vD4U)`!f>lIx;_Cr=9}DlSAQi}a;g`Y~$w>sC z9e4;o9doOs#h0^zRoWmz)WQ!pEgI7bS?Xg#xPiqXVHBG4T>yfNe-kt;Hn0QUB+@Hj z4<$g04y%R zoJ654kvg{-5kW-?dbS?XwnJSbQLhxSClpS+GiN{uJ!U^~#8 z2ZSsLFsPsnO}sII{tdl6Ej)BIP@4qu0bGJmRd~ z9^vp8Ul`Y*hCRq=6$RZk9vN!@&)h9&3Bl|joSk?)@8R@n@B}hSg$2LjiCRZAz;9?K zbKG`@lPiaxw(xF6d6pO=Wjt+QY^%fRXxT^MqKO}YHniQ2!YqSFaVSz<0O zmgxImu$6ZUgYu+~pTc#2=gP%Q`sZS}?6~Q6T<>Qgp9k(~JOdqexti(f#=@BbJ4v@}Dcp!)%{l4r7hky~P&rRaC&xAS$&x^_pXYre#al8I3a5Gwn_~wsK0wN<7COM1S zP1NJ;C1)DrIA^BRws|F5m*r(L=dtIgmP=V{p9?T)EE)3KQ)%ahfA=BD|N4YX_C>a_ z@z&m{wUld?9>Pp}BG#|j>2s)ieGIR2*e_Eu<*I5i{839&xLr`CDdQl)@G|LddYX)b zZu+ewNr7dHb*+z_Vy*Hm7EwtAL$$q@t!t-pSKaEVV9zC2_7WVOVB>47@VVWEfNvWD z+~HWRCYC5o%dORp8zr|dY$~C#8B4rZY&&5dGdx&di9e&W<09T{=7pd@!r=IVcky{! z0goN?sSA8ck7+eWU_MIy7%ri3FJ-6)G0@IFP$k8XC6fHAJ=bJz+)Iebab+?(x%;id zT>kwF;a1-oxn6%h-6gVSENqsQ|Abc{)>hDTjH>D%xT3u z&fYrJbdg>_x`{O_jORwK9o^cnqHfa5FI{aP>NLBIbTkj}L79S&c&v<Z*I6X^=nkgFO3@6#d)ir5EGwr+ltv%6cowde z^xc!VcY!?L-!o!r)r7Eh~O6#Qli+r9>GG!VE=;_}Zrw7)~*W!w5v*Z}n|w`ko-ezTIup?62c z_G-AJeSypmb}JMYUt3CQHd|coAj|*M%z)B7nRe`!eb;Az)<@${6@&|oPb-`25 z>W|u7#g|Fr$96-2uTV@2huhBi6I-ZrV^YqQ0f4EDnxf$?dL`Zu<|6!kNtOFHO3mXUW;oD@M zCx(mwV|sAppxq93wEF)fMPZAD z#qbL{hN-b5h4OQB&nZ?&Ceofz{MwlxO1>8D(wAd)mZh>DBg<5C~BNt7q;m#?w>m__&CI;XdDOhVG**ERxt0JECk4SHb|IP~zF|$99 zY7ACh^f!KH$vs=1O)ql&3jK>5oQl~ckIHHx^^F7$TtCGzSSnD^4w%(^|89)K;) z%dzp3WPIB^9)#~+nln32oVs~Bm*xzcXD@|V?QUY?;|?0c(9lnL>+iXYA3OA`hkrVC zOkA+UivJD~AiAH6{pFIk|C`15Of`u_p887Pb2rhRvw`QQ+=P4u1`WS;s%Nxto;^0K zDUrr=8d;&`ZkFf^oV|1|X266yCEYDVK07#HBl=X}q$tP0E&af}W$uS+cZ7~>zX^JG zJEy1rEz0v#)sP%ndRwz%$S-%>dbpiFb<9*F5LxKh$%qP03;c}xn@p0ma&R-LMb}F&>3P^~rqQr{ zPUdmVH?}|DxgP(Co36Z7&RCIKhV!8c^|r;!#Aw$vB%Le8v8am~-X2a8Rt?{%l0f2< zQ(id#DthI}8`YilRcj~WN7HJzF_rAnO3JXz!#<0sOvcY03cN9F(RZ41Ml7g~=cu<{ z-rT<#)^Ai+P_64axh^{O&^KT7$6Zgqb?H5pU&`ffA?sCl=UuaMYTILW0;<*)iew*M z*Ig9rAy24P=)9I5SLK^CV(^>4n!Gya;TVUj=O1IcX7_jeK3gwY>7TySFS>g%$l32>^j2S3{ohh}dd>~$T+U!!6FVi(mP+BwlIIj{>fcXYcwR?Y z`>3E(=aBTi(hUyGXW;}EzPSSLq>kUU(p1tqSEO!o_>*s`zdlG*tP;PmyI0_GH?5#( zBhaBJNb7l#%W@H&Rho#?_1@XX+;W=5X4fd#L{`op(XCe-*jB516sBuVuoP-kl`T^; zrf!$t7PiYLeHGKP>iHu6zz>x;CupQpB^6jjvyw^+R9fo)6R1k88i`R0c@gGss zJ*%wPVGbj%q}lx25)JSt@ZcO}RA{W6%Ad7UnZ7+e8P}S>9f|ys z^IUK`t1E!PGDcwANzGn0?gF6ICH?oRfGkzIGS+V|+ z$o;T~aV9Jl=FsHU8&u$EwrBKcty*UBEoPzf4a$7umbBrwVwaFBVn%_P)z!my3^Zpl zBvHyKsQbahCSSoodfk4RK_3{4k@4D3tR=FiMQ%ivp_C|<2DcM|5oyT=5zO2NWL# zg&-iWXvHG0ayt!>yp|>HBl95k!?W@ndcSV!`^kRVz8>%2zy+7!w9(iGSfV|i(K4lf zjP&ib+5OKjB&Tk`ZK>_mx=9uw)XH~9K;<6_HKp~IF>W(E^eS_|d?sd#Tf65;QS)-& zn$AYzB1t4#!oVZK`qbsH#2-HGx7$vG?$6`1GDn7G6US^@L6k6dw~)Q}pw<0!w({`6 zqS*JYnY)$?G;vGD{^ z5Z#V@i!*XkUoNnFU&qoRi&Y`Hwhfowdb)5jPQ)<<1r=z9;*2yIoyQ~Qw-j_dQb9Um zeyt~_IgclIFHX{hTlXh;B)Mg($NB!&cK|IK30-*PCJd*Le^Ks0?L2+8j*y(K9wu*B zswDMi|BNfBh(R9>;H*(I8{qqTB96e4?IyDvFj05Mh_=SgPS4NeTMB(0Q72{46-d!e z#TQ$nU$IBU$nEgnCI5ZCmNZQ`D%Xct8Y%uVMooFDgF+&0=ybkBfaZOh>pCtAF=Od# zt+_%WVZEQ8b)4QxsHq}fPY3#O z!N2c$OL8K5yzB6nHE32Ph_%WhJTb0DZ6N_{mX&su^q;EhRvb~8vAM`cf~?I%-c*%m&2z9<@fvW{zRC z;=NQ0lh535{uwfwh}|m=>10M+&}-;evO7(UrYie*{YvYx9&7IuU%VG;A*rYx6M8Wq z>Q2nQfx2^U0cl4kR%SKMh9$EyVQi5vSu@#EdMrSw?4U;8if@`up+A<{F%-|Ev(cdv}wO5OLQ;vf$x zV7=YA#V~mNo!s9yE(5(gb8%PK$)}QrNG4ZElf_?pd z6wJJ<`|?Ef?=#tkZhH5t#Ze|-SGuj-pH7gioShMVt`Ma-WON(-%)m^kf^=!CtJFT# z(lX>cSvN`lJ$4^TBqN8-!TS!MC3>Wi%+rg@-LoSaZ9_uo%)FJX^q9Y@D^iz4?vJa4 zx4vj`mah^DOPfe95UJ%d9IiigWv*}LiI>PS*)B=I=0#n`wxtbU*XM=YG>qlDTpy zxyTzGB+o^@ix0euH8r1mX)=#(IC|;)-itMdo`buslDEOi_)hYRksF7za!a;O&psx* zN#%KUi#Pt!46Ooc+O?N-!w)pI&+5U8qLAvk}@S8@4wrf|8*wKM`W=H zmgTfm*SEq2VjB&I?r)>&ceF=(+wvf&&=L7GakB+Hrs3=k9O`57B2{kIUvxx1c-V}Dq zAhUrHYbRdOdMT5jLSn~r*9=pvBMovF**#g()q+#ZiRafy4>}SkyMXprubHlZjSF1XXS1*~T zm52;gsB#q>n@9P~p`3LeKI1RU5Sv<8&RQ$?$!01QuP@)1>c}A~oxxSk7*IsWFXmpp zZ*}7id=S+Ge0Yl46TJ4_Ly}&c@{9UUk!&}Yzz0JK&C+z=DvJi1^$fVkjVOg)OJCSI z=V}nn%)1emMm%w&vH%ek@@DH0@st~`K#1-7@{U5x;jo1Zm$_XN$xUW?^BfK)4MH;{ zxYwF?GQaL~HL9CU-?EV1!^iE;F1Q8l>s+?o7VI6ldM}fVr>rh&m!k7GCg-lxRIV&C z`2$zEuyXRp^!5iLS=1Soc156V=KD*c%w5tlnJ1R(L8>t|3F)Fm2vHuI(Pp;8_p96z zWu+m)S$Bd|g7V{h5eF`uRgqu++`H}*$6!4oWZgtzTN|bD`it5wt&@M=mr$ww%gsc5 z8>^{3^6GQX^(rPRO9lJj_0JCnNjveQH@uFO>q57z zXTDIAc&jcyq7qRUZ4C&yejof0g z4nR5;d2zU4Pf33LXu)gYIl0d#g`VL;@Wx7@7ixDlpR6yujG;QlQO5nS&>rjDzI}sJ z(7n1iwAN+E{Iig&;IDy;=BoVF{v{DoWk#>Pu9>`7Ds#0q+KQ4cmLW!BXbNXoGDmu@ z8pQMMs+K^qRww)2^@`(VuI_rON-yV4uDgwo+^F91)7Kg(3~gsW0~{25X1{~<_lG&; z_nr!ffBD_0e~!kBJAb8gN0Qjg5532`JmolQ6;g&3o(t#b|K+pQjFrLqJ(NR)u~x6~ z7mFW09=kqd^!gQeZDINFc;u93vh=G5w*w;@De5HfGateq5rz3`TaRdJO;q|7Mky+M zFS}@RR)X<;dNzHeM`&)Ic7kty@4+46@{e|neq%Pyw8%-juiqamMOPSp$?V82sC_la z?^D?EQ?g6{$4^Er=^JH?Dpr0*W<#Zk8|}mO-RiyUrC-X~wRu=SF~=#Fr%v-Ci?E;T z$o**M8JuN1z11zp22PG<_Z+3-|`D&`Y?ia!xr+3Iz%!0%ArH!s_?%ajs2 z4Gby+y|Qz-CR@FlCO?#hbPf&a2fqBA?0sMSb#IKQ$;8jyp+3FBG80J`kHDuMlBo?g z@;}eT_{R<`hJDt0{=if5qpS7phqTW?Bt`^%Mxo?5IX*M!x``E+L`$6SUyrYcHRbs{ zrc&05^b^UCvIAQmJy>O;@D1c23vMk6<+cegHR1nS`w1(ee!`SIGitoYSRZ~O600Oh zS#Yk|L7mms`|%O)^R;9hA*}E1$hwFCQF6?hA6smqvb}Zw2P$-9W^mBmOmq?3U;eEvsZx7!LrIYHI zWE`sa;WkH$?R^^fs`vI`P}o3Q@88GGC%@RyU(FDI0{ z&AdmfVtT1v1kR&K-y`qFrYJGBgTbqG$Mq-L$`7B~+V35gny*Q#-CtaMR;c!t4>%S3sZ`9Px z<*LN&xjAOIy%Gi}KQBt}Jh8yA*Bqjc*z2!e^z6Yhnv>nB7l>54^>xggIbx*~qFW@94%S znbFaXk9b%H9h8?A{N?_;>&ePy-)ivWe2&9>)VP=y9dlz%hjr=>Ltdk+^f@amr% z|E=W|$!un*^!<-ZVQeZGKKM$&(;OE)#)amN3zax?Tf8ZxnUIh7baX?8!)Z5D6S7;b zMqtBd7+9`Voz6sOlVUQOjpk2H(D+zx#4Gy+G}(L~3?PwKnpQpRdFnxjVyx<|$_pY% zX*RS+omzT1_cpv}b~O66I`)PwvgE;Hak7zo`8l5f8O7@0hTuarzuy_ikGE*2n>m~0 zCAv1m*=!R$>I6y7VUjdYWNl6#iG7!A)^b4-h4dCEA;OVs%LDCNO6!@<(?^yl*+nrF zuV0TF=iOJmuR!j$*Z6ad{T;i%Q7mx=-I&5MQPT&>Rl+sH;jc=+en6qH!Lg{{uq?^ArF8 diff --git a/node_modules/lodash/lodash.js b/node_modules/lodash/lodash.js index 52b7325..ebd9671 100644 --- a/node_modules/lodash/lodash.js +++ b/node_modules/lodash/lodash.js @@ -1,8 +1,7 @@ /** * @license - * lodash 4.11.2 (Custom Build) - * Build: `lodash -d -o ./foo/lodash.js` - * Copyright jQuery Foundation and other contributors + * Lodash + * Copyright JS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors @@ -13,42 +12,51 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.11.2'; + var VERSION = '4.17.2'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; - /** Used as the `TypeError` message for "Functions" methods. */ - var FUNC_ERROR_TEXT = 'Expected a function'; + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function'; /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + /** Used as the internal argument placeholder. */ var PLACEHOLDER = '__lodash_placeholder__'; - /** Used to compose bitmasks for wrapper metadata. */ - var BIND_FLAG = 1, - BIND_KEY_FLAG = 2, - CURRY_BOUND_FLAG = 4, - CURRY_FLAG = 8, - CURRY_RIGHT_FLAG = 16, - PARTIAL_FLAG = 32, - PARTIAL_RIGHT_FLAG = 64, - ARY_FLAG = 128, - REARG_FLAG = 256, - FLIP_FLAG = 512; - - /** Used to compose bitmasks for comparison styles. */ - var UNORDERED_COMPARE_FLAG = 1, - PARTIAL_COMPARE_FLAG = 2; + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; /** Used as default options for `_.truncate`. */ var DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = '...'; /** Used to detect hot functions by number of calls within a span of milliseconds. */ - var HOT_COUNT = 150, + var HOT_COUNT = 800, HOT_SPAN = 16; /** Used to indicate the type of lazy iteratees. */ @@ -67,22 +75,40 @@ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] + ]; + /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', boolTag = '[object Boolean]', dateTag = '[object Date]', + domExcTag = '[object DOMException]', errorTag = '[object Error]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', mapTag = '[object Map]', numberTag = '[object Number]', + nullTag = '[object Null]', objectTag = '[object Object]', promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', weakMapTag = '[object WeakMap]', weakSetTag = '[object WeakSet]'; @@ -104,8 +130,8 @@ reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; /** Used to match HTML entities and HTML characters. */ - var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g, - reUnescapedHtml = /[&<>"'`]/g, + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source); @@ -117,11 +143,12 @@ /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g; + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source); @@ -131,24 +158,26 @@ reTrimStart = /^\s+/, reTrimEnd = /\s+$/; - /** Used to match non-compound words composed of alphanumeric characters. */ - var reBasicWord = /[a-zA-Z0-9]+/g; + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** * Used to match - * [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). */ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; /** Used to match `RegExp` flags from their coerced string values. */ var reFlags = /\w*$/; - /** Used to detect hexadecimal string values. */ - var reHasHexPrefix = /^0x/i; - /** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; @@ -164,8 +193,8 @@ /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; - /** Used to match latin-1 supplementary letters (excluding mathematical operators). */ - var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g; + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; /** Used to ensure capturing order of template delimiters. */ var reNoMatch = /($^)/; @@ -175,8 +204,10 @@ /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', - rsComboSymbolsRange = '\\u20d0-\\u20f0', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsDingbatRange = '\\u2700-\\u27bf', rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', @@ -191,7 +222,7 @@ var rsApos = "['\u2019]", rsAstral = '[' + rsAstralRange + ']', rsBreak = '[' + rsBreakRange + ']', - rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', + rsCombo = '[' + rsComboRange + ']', rsDigits = '\\d+', rsDingbat = '[' + rsDingbatRange + ']', rsLower = '[' + rsLowerRange + ']', @@ -205,13 +236,15 @@ rsZWJ = '\\u200d'; /** Used to compose unicode regexes. */ - var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')', - rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')', - rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', - rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', reOptMod = rsModifier + '?', rsOptVar = '[' + rsVarRange + ']?', rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)', + rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)', rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; @@ -226,30 +259,32 @@ var reComboMark = RegExp(rsCombo, 'g'); /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ - var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); /** Used to match complex or compound words. */ - var reComplexWord = RegExp([ - rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', - rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')', - rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr, - rsUpper + '+' + rsOptUpperContr, + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, rsDigits, rsEmoji ].join('|'), 'g'); /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ - var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); /** Used to detect strings that need a more robust regexp to match words. */ - var reHasComplexWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; /** Used to assign default `context` object properties. */ var contextProps = [ 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', - 'Promise', 'Reflect', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', - 'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', + 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' ]; @@ -288,16 +323,17 @@ cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; - /** Used to map latin-1 supplementary letters to basic latin letters. */ + /** Used to map Latin Unicode letters to basic Latin letters. */ var deburredLetters = { + // Latin-1 Supplement block. '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', '\xc7': 'C', '\xe7': 'c', '\xd0': 'D', '\xf0': 'd', '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', - '\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', - '\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', '\xd1': 'N', '\xf1': 'n', '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', @@ -306,7 +342,43 @@ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', '\xc6': 'Ae', '\xe6': 'ae', '\xde': 'Th', '\xfe': 'th', - '\xdf': 'ss' + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' }; /** Used to map characters to HTML entities. */ @@ -315,8 +387,7 @@ '<': '<', '>': '>', '"': '"', - "'": ''', - '`': '`' + "'": ''' }; /** Used to map HTML entities to characters. */ @@ -325,14 +396,7 @@ '<': '<', '>': '>', '"': '"', - ''': "'", - '`': '`' - }; - - /** Used to determine if values are of the language type `Object`. */ - var objectTypes = { - 'function': true, - 'object': true + ''': "'" }; /** Used to escape characters for inclusion in compiled string literals. */ @@ -349,42 +413,41 @@ var freeParseFloat = parseFloat, freeParseInt = parseInt; - /** Detect free variable `exports`. */ - var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) - ? exports - : undefined; - - /** Detect free variable `module`. */ - var freeModule = (objectTypes[typeof module] && module && !module.nodeType) - ? module - : undefined; - - /** Detect the popular CommonJS extension `module.exports`. */ - var moduleExports = (freeModule && freeModule.exports === freeExports) - ? freeExports - : undefined; - /** Detect free variable `global` from Node.js. */ - var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; /** Detect free variable `self`. */ - var freeSelf = checkGlobal(objectTypes[typeof self] && self); + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - /** Detect free variable `window`. */ - var freeWindow = checkGlobal(objectTypes[typeof window] && window); + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); - /** Detect `this` as the global object. */ - var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - /** - * Used as a reference to the global object. - * - * The `this` value is used if it's the global object to avoid Greasemonkey's - * restricted `window` object, otherwise the `window` object is used. - */ - var root = freeGlobal || - ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || - freeSelf || thisGlobal || Function('return this')(); + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /*--------------------------------------------------------------------------*/ @@ -397,7 +460,7 @@ * @returns {Object} Returns `map`. */ function addMapEntry(map, pair) { - // Don't return `Map#set` because it doesn't return the map instance in IE 11. + // Don't return `map.set` because it's not chainable in IE 11. map.set(pair[0], pair[1]); return map; } @@ -411,6 +474,7 @@ * @returns {Object} Returns `set`. */ function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. set.add(value); return set; } @@ -426,8 +490,7 @@ * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { - var length = args.length; - switch (length) { + switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); @@ -440,7 +503,7 @@ * A specialized version of `baseAggregator` for arrays. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} setter The function to set `accumulator` values. * @param {Function} iteratee The iteratee to transform keys. * @param {Object} accumulator The initial aggregated object. @@ -448,7 +511,7 @@ */ function arrayAggregator(array, setter, iteratee, accumulator) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { var value = array[index]; @@ -457,42 +520,18 @@ return accumulator; } - /** - * Creates a new array concatenating `array` with `other`. - * - * @private - * @param {Array} array The first array to concatenate. - * @param {Array} other The second array to concatenate. - * @returns {Array} Returns the new concatenated array. - */ - function arrayConcat(array, other) { - var index = -1, - length = array.length, - othIndex = -1, - othLength = other.length, - result = Array(length + othLength); - - while (++index < length) { - result[index] = array[index]; - } - while (++othIndex < othLength) { - result[index++] = other[othIndex]; - } - return result; - } - /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { if (iteratee(array[index], index, array) === false) { @@ -507,12 +546,12 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEachRight(array, iteratee) { - var length = array.length; + var length = array == null ? 0 : array.length; while (length--) { if (iteratee(array[length], length, array) === false) { @@ -527,14 +566,14 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if all elements pass the predicate check, * else `false`. */ function arrayEvery(array, predicate) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { if (!predicate(array[index], index, array)) { @@ -549,13 +588,13 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, - length = array.length, + length = array == null ? 0 : array.length, resIndex = 0, result = []; @@ -573,26 +612,27 @@ * specifying an index to search from. * * @private - * @param {Array} array The array to search. + * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludes(array, value) { - return !!array.length && baseIndexOf(array, value, 0) > -1; + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; } /** * This function is like `arrayIncludes` except that it accepts a comparator. * * @private - * @param {Array} array The array to search. + * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @param {Function} comparator The comparator invoked per element. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludesWith(array, value, comparator) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { if (comparator(value, array[index])) { @@ -607,13 +647,13 @@ * shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, - length = array.length, + length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { @@ -646,7 +686,7 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the first element of `array` as @@ -655,7 +695,7 @@ */ function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[++index]; @@ -671,7 +711,7 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the last element of `array` as @@ -679,7 +719,7 @@ * @returns {*} Returns the accumulated value. */ function arrayReduceRight(array, iteratee, accumulator, initAccum) { - var length = array.length; + var length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[--length]; } @@ -694,14 +734,14 @@ * shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, - length = array.length; + length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { @@ -712,23 +752,52 @@ } /** - * The base implementation of methods like `_.find` and `_.findKey`, without - * support for iteratee shorthands, which iterates over `collection` using - * `eachFunc`. + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. * * @private - * @param {Array|Object} collection The collection to search. + * @param {Array|Object} collection The collection to inspect. * @param {Function} predicate The function invoked per iteration. * @param {Function} eachFunc The function to iterate over `collection`. - * @param {boolean} [retKey] Specify returning the key of the found element - * instead of the element itself. * @returns {*} Returns the found element or its key, else `undefined`. */ - function baseFind(collection, predicate, eachFunc, retKey) { + function baseFindKey(collection, predicate, eachFunc) { var result; eachFunc(collection, function(value, key, collection) { if (predicate(value, key, collection)) { - result = retKey ? key : value; + result = key; return false; } }); @@ -740,14 +809,15 @@ * support for iteratee shorthands. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {number} Returns the index of the matched value, else `-1`. */ - function baseFindIndex(array, predicate, fromRight) { + function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, - index = fromRight ? length : -1; + index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { if (predicate(array[index], index, array)) { @@ -761,31 +831,22 @@ * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseIndexOf(array, value, fromIndex) { - if (value !== value) { - return indexOfNaN(array, fromIndex); - } - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); } /** * This function is like `baseIndexOf` except that it accepts a comparator. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @param {Function} comparator The comparator invoked per element. @@ -803,6 +864,17 @@ return -1; } + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + /** * The base implementation of `_.mean` and `_.meanBy` without support for * iteratee shorthands. @@ -813,10 +885,36 @@ * @returns {number} Returns the mean. */ function baseMean(array, iteratee) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? (baseSum(array, iteratee) / length) : NAN; } + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + /** * The base implementation of `_.reduce` and `_.reduceRight`, without support * for iteratee shorthands, which iterates over `collection` using `eachFunc`. @@ -908,7 +1006,7 @@ * @private * @param {Object} object The object to query. * @param {Array} props The property names to get values for. - * @returns {Object} Returns the new array of key-value pairs. + * @returns {Object} Returns the key-value pairs. */ function baseToPairs(object, props) { return arrayMap(props, function(key) { @@ -917,11 +1015,11 @@ } /** - * The base implementation of `_.unary` without support for storing wrapper metadata. + * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { @@ -945,6 +1043,18 @@ }); } + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + /** * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol * that is not found in the character symbols. @@ -978,17 +1088,6 @@ return index; } - /** - * Checks if `value` is a global object. - * - * @private - * @param {*} value The value to check. - * @returns {null|Object} Returns `value` if it's a global object, else `null`. - */ - function checkGlobal(value) { - return (value && value.Object === Object) ? value : null; - } - /** * Gets the number of `placeholder` occurrences in `array`. * @@ -1003,22 +1102,21 @@ while (length--) { if (array[length] === placeholder) { - result++; + ++result; } } return result; } /** - * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters. + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. * * @private * @param {string} letter The matched letter to deburr. * @returns {string} Returns the deburred letter. */ - function deburrLetter(letter) { - return deburredLetters[letter]; - } + var deburrLetter = basePropertyOf(deburredLetters); /** * Used by `_.escape` to convert characters to HTML entities. @@ -1027,9 +1125,7 @@ * @param {string} chr The matched character to escape. * @returns {string} Returns the escaped character. */ - function escapeHtmlChar(chr) { - return htmlEscapes[chr]; - } + var escapeHtmlChar = basePropertyOf(htmlEscapes); /** * Used by `_.template` to escape characters for inclusion in compiled string literals. @@ -1043,44 +1139,37 @@ } /** - * Gets the index at which the first occurrence of `NaN` is found in `array`. + * Gets the value at `key` of `object`. * * @private - * @param {Array} array The array to search. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched `NaN`, else `-1`. + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. */ - function indexOfNaN(array, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 0 : -1); + function getValue(object, key) { + return object == null ? undefined : object[key]; + } - while ((fromRight ? index-- : ++index < length)) { - var other = array[index]; - if (other !== other) { - return index; - } - } - return -1; + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); } /** - * Checks if `value` is a host object in IE < 9. + * Checks if `string` contains a word composed of Unicode symbols. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. */ - function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); } /** @@ -1101,11 +1190,11 @@ } /** - * Converts `map` to an array. + * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. - * @returns {Array} Returns the converted array. + * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, @@ -1117,6 +1206,20 @@ return result; } + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + /** * Replaces all `placeholder` elements in `array` with an internal placeholder * and returns an array of their indexes. @@ -1143,11 +1246,11 @@ } /** - * Converts `set` to an array. + * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. - * @returns {Array} Returns the converted array. + * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, @@ -1159,6 +1262,65 @@ return result; } + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + /** * Gets the number of symbols in `string`. * @@ -1167,14 +1329,9 @@ * @returns {number} Returns the string size. */ function stringSize(string) { - if (!(string && reHasComplexSymbol.test(string))) { - return string.length; - } - var result = reComplexSymbol.lastIndex = 0; - while (reComplexSymbol.test(string)) { - result++; - } - return result; + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); } /** @@ -1185,7 +1342,9 @@ * @returns {Array} Returns the converted array. */ function stringToArray(string) { - return string.match(reComplexSymbol); + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); } /** @@ -1195,8 +1354,43 @@ * @param {string} chr The matched character to unescape. * @returns {string} Returns the unescaped character. */ - function unescapeHtmlChar(chr) { - return htmlUnescapes[chr]; + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; } /*--------------------------------------------------------------------------*/ @@ -1227,33 +1421,33 @@ * lodash.isFunction(lodash.bar); * // => true * - * // Use `context` to mock `Date#getTime` use in `_.now`. - * var mock = _.runInContext({ - * 'Date': function() { - * return { 'getTime': getTimeMock }; - * } - * }); - * * // Create a suped-up `defer` in Node.js. * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; */ - function runInContext(context) { - context = context ? _.defaults({}, context, _.pick(root, contextProps)) : root; + var runInContext = (function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); /** Built-in constructor references. */ - var Date = context.Date, + var Array = context.Array, + Date = context.Date, Error = context.Error, + Function = context.Function, Math = context.Math, + Object = context.Object, RegExp = context.RegExp, + String = context.String, TypeError = context.TypeError; /** Used for built-in method references. */ - var arrayProto = context.Array.prototype, - objectProto = context.Object.prototype, - stringProto = context.String.prototype; + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; /** Used to resolve the decompiled source of functions. */ - var funcToString = context.Function.prototype.toString; + var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; @@ -1261,15 +1455,21 @@ /** Used to generate unique IDs. */ var idCounter = 0; - /** Used to infer the `Object` constructor. */ - var objectCtorString = funcToString.call(Object); + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ - var objectToString = objectProto.toString; + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); /** Used to restore the original `_` reference in `_.noConflict`. */ var oldDash = root._; @@ -1282,32 +1482,44 @@ /** Built-in value references. */ var Buffer = moduleExports ? context.Buffer : undefined, - Reflect = context.Reflect, Symbol = context.Symbol, Uint8Array = context.Uint8Array, - clearTimeout = context.clearTimeout, - enumerate = Reflect ? Reflect.enumerate : undefined, - getOwnPropertySymbols = Object.getOwnPropertySymbols, - iteratorSymbol = typeof (iteratorSymbol = Symbol && Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), objectCreate = Object.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, - setTimeout = context.setTimeout, - splice = arrayProto.splice; + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeCeil = Math.ceil, nativeFloor = Math.floor, - nativeGetPrototype = Object.getPrototypeOf, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, - nativeKeys = Object.keys, + nativeKeys = overArg(Object.keys, Object), nativeMax = Math.max, nativeMin = Math.min, + nativeNow = Date.now, nativeParseInt = context.parseInt, nativeRandom = Math.random, - nativeReplace = stringProto.replace, - nativeReverse = arrayProto.reverse, - nativeSplit = stringProto.split; + nativeReverse = arrayProto.reverse; /* Built-in method references that are verified to be native. */ var DataView = getNative(context, 'DataView'), @@ -1320,9 +1532,6 @@ /** Used to store function metadata. */ var metaMap = WeakMap && new WeakMap; - /** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */ - var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); - /** Used to lookup unminified function names. */ var realNames = {}; @@ -1406,28 +1615,30 @@ * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `divide`, `each`, - * `eachRight`, `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`, - * `findIndex`, `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`, - * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, - * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, - * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, - * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`, - * `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`, - * `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`, - * `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, - * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`, - * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, - * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, - * `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, `min`, `minBy`, `multiply`, - * `noConflict`, `noop`, `now`, `nth`, `pad`, `padEnd`, `padStart`, `parseInt`, - * `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`, - * `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, - * `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, - * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toInteger`, - * `toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`, `toString`, - * `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, - * `uniqueId`, `upperCase`, `upperFirst`, `value`, and `words` + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` * * @name _ * @constructor @@ -1467,6 +1678,30 @@ return new LodashWrapper(value); } + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + /** * The function whose prototype chain sequence wrappers inherit from. * @@ -1686,64 +1921,219 @@ * * @private * @constructor - * @returns {Object} Returns the new hash object. + * @param {Array} [entries] The key-value pairs to cache. */ - function Hash() {} + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; - /** - * Removes `key` and its value from the hash. + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. * * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function hashDelete(hash, key) { - return hashHas(hash, key) && delete hash[key]; + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; } /** * Gets the hash value for `key`. * * @private - * @param {Object} hash The hash to query. + * @name get + * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ - function hashGet(hash, key) { + function hashGet(key) { + var data = this.__data__; if (nativeCreate) { - var result = hash[key]; + var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } - return hasOwnProperty.call(hash, key) ? hash[key] : undefined; + return hasOwnProperty.call(data, key) ? data[key] : undefined; } /** * Checks if a hash value for `key` exists. * * @private - * @param {Object} hash The hash to query. + * @name has + * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function hashHas(hash, key) { - return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key); + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); } /** * Sets the hash `key` to `value`. * * @private - * @param {Object} hash The hash to modify. + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. */ - function hashSet(hash, key, value) { - hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; } - // Avoid inheriting from `Object.prototype` when possible. - Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto; + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; /*------------------------------------------------------------------------*/ @@ -1752,15 +2142,15 @@ * * @private * @constructor - * @param {Array} [values] The values to cache. + * @param {Array} [entries] The key-value pairs to cache. */ - function MapCache(values) { + function MapCache(entries) { var index = -1, - length = values ? values.length : 0; + length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { - var entry = values[index]; + var entry = entries[index]; this.set(entry[0], entry[1]); } } @@ -1772,10 +2162,11 @@ * @name clear * @memberOf MapCache */ - function mapClear() { + function mapCacheClear() { + this.size = 0; this.__data__ = { 'hash': new Hash, - 'map': Map ? new Map : [], + 'map': new (Map || ListCache), 'string': new Hash }; } @@ -1789,12 +2180,10 @@ * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function mapDelete(key) { - var data = this.__data__; - if (isKeyable(key)) { - return hashDelete(typeof key == 'string' ? data.string : data.hash, key); - } - return Map ? data.map['delete'](key) : assocDelete(data.map, key); + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; } /** @@ -1806,12 +2195,8 @@ * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ - function mapGet(key) { - var data = this.__data__; - if (isKeyable(key)) { - return hashGet(typeof key == 'string' ? data.string : data.hash, key); - } - return Map ? data.map.get(key) : assocGet(data.map, key); + function mapCacheGet(key) { + return getMapData(this, key).get(key); } /** @@ -1823,12 +2208,8 @@ * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function mapHas(key) { - var data = this.__data__; - if (isKeyable(key)) { - return hashHas(typeof key == 'string' ? data.string : data.hash, key); - } - return Map ? data.map.has(key) : assocHas(data.map, key); + function mapCacheHas(key) { + return getMapData(this, key).has(key); } /** @@ -1841,30 +2222,27 @@ * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ - function mapSet(key, value) { - var data = this.__data__; - if (isKeyable(key)) { - hashSet(typeof key == 'string' ? data.string : data.hash, key, value); - } else if (Map) { - data.map.set(key, value); - } else { - assocSet(data.map, key, value); - } + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; return this; } // Add methods to `MapCache`. - MapCache.prototype.clear = mapClear; - MapCache.prototype['delete'] = mapDelete; - MapCache.prototype.get = mapGet; - MapCache.prototype.has = mapHas; - MapCache.prototype.set = mapSet; + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; /*------------------------------------------------------------------------*/ /** * - * Creates a set cache object to store unique values. + * Creates an array cache object to store unique values. * * @private * @constructor @@ -1872,56 +2250,45 @@ */ function SetCache(values) { var index = -1, - length = values ? values.length : 0; + length = values == null ? 0 : values.length; this.__data__ = new MapCache; while (++index < length) { - this.push(values[index]); + this.add(values[index]); } } /** - * Checks if `value` is in `cache`. + * Adds `value` to the array cache. * * @private - * @param {Object} cache The set cache to search. - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. */ - function cacheHas(cache, value) { - var map = cache.__data__; - if (isKeyable(value)) { - var data = map.__data__, - hash = typeof value == 'string' ? data.string : data.hash; - - return hash[value] === HASH_UNDEFINED; - } - return map.has(value); + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; } /** - * Adds `value` to the set cache. + * Checks if `value` is in the array cache. * * @private - * @name push + * @name has * @memberOf SetCache - * @param {*} value The value to cache. + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. */ - function cachePush(value) { - var map = this.__data__; - if (isKeyable(value)) { - var data = map.__data__, - hash = typeof value == 'string' ? data.string : data.hash; - - hash[value] = HASH_UNDEFINED; - } - else { - map.set(value, HASH_UNDEFINED); - } + function setCacheHas(value) { + return this.__data__.has(value); } // Add methods to `SetCache`. - SetCache.prototype.push = cachePush; + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; /*------------------------------------------------------------------------*/ @@ -1930,17 +2297,11 @@ * * @private * @constructor - * @param {Array} [values] The values to cache. + * @param {Array} [entries] The key-value pairs to cache. */ - function Stack(values) { - var index = -1, - length = values ? values.length : 0; - - this.clear(); - while (++index < length) { - var entry = values[index]; - this.set(entry[0], entry[1]); - } + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; } /** @@ -1951,7 +2312,8 @@ * @memberOf Stack */ function stackClear() { - this.__data__ = { 'array': [], 'map': null }; + this.__data__ = new ListCache; + this.size = 0; } /** @@ -1965,9 +2327,10 @@ */ function stackDelete(key) { var data = this.__data__, - array = data.array; + result = data['delete'](key); - return array ? assocDelete(array, key) : data.map['delete'](key); + this.size = data.size; + return result; } /** @@ -1980,10 +2343,7 @@ * @returns {*} Returns the entry value. */ function stackGet(key) { - var data = this.__data__, - array = data.array; - - return array ? assocGet(array, key) : data.map.get(key); + return this.__data__.get(key); } /** @@ -1996,10 +2356,7 @@ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { - var data = this.__data__, - array = data.array; - - return array ? assocHas(array, key) : data.map.has(key); + return this.__data__.has(key); } /** @@ -2013,21 +2370,18 @@ * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { - var data = this.__data__, - array = data.array; - - if (array) { - if (array.length < (LARGE_ARRAY_SIZE - 1)) { - assocSet(array, key, value); - } else { - data.array = null; - data.map = new MapCache(array); + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; } + data = this.__data__ = new MapCache(pairs); } - var map = data.map; - if (map) { - map.set(key, value); - } + data.set(key, value); + this.size = data.size; return this; } @@ -2041,89 +2395,75 @@ /*------------------------------------------------------------------------*/ /** - * Removes `key` and its value from the associative array. + * Creates an array of the enumerable property names of the array-like `value`. * * @private - * @param {Array} array The array to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. */ - function assocDelete(array, key) { - var index = assocIndexOf(array, key); - if (index < 0) { - return false; - } - var lastIndex = array.length - 1; - if (index == lastIndex) { - array.pop(); - } else { - splice.call(array, index, 1); - } - return true; - } + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; - /** - * Gets the associative array value for `key`. - * - * @private - * @param {Array} array The array to query. - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function assocGet(array, key) { - var index = assocIndexOf(array, key); - return index < 0 ? undefined : array[index][1]; + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; } /** - * Checks if an associative array value for `key` exists. + * A specialized version of `_.sample` for arrays. * * @private - * @param {Array} array The array to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. */ - function assocHas(array, key) { - return assocIndexOf(array, key) > -1; + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; } /** - * Gets the index at which the `key` is found in `array` of key-value pairs. + * A specialized version of `_.sampleSize` for arrays. * * @private - * @param {Array} array The array to search. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. */ - function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); } /** - * Sets the associative array `key` to `value`. + * A specialized version of `_.shuffle` for arrays. * * @private - * @param {Array} array The array to modify. - * @param {string} key The key of the value to set. - * @param {*} value The value to set. + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. */ - function assocSet(array, key, value) { - var index = assocIndexOf(array, key); - if (index < 0) { - array.push([key, value]); - } else { - array[index][1] = value; - } + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); } - /*------------------------------------------------------------------------*/ - /** * Used by `_.defaults` to customize its `_.assignIn` use. * @@ -2153,14 +2493,14 @@ */ function assignMergeValue(object, key, value) { if ((value !== undefined && !eq(object[key], value)) || - (typeof key == 'number' && value === undefined && !(key in object))) { - object[key] = value; + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); } } /** * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private @@ -2172,8 +2512,26 @@ var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { - object[key] = value; + baseAssignValue(object, key, value); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } } + return -1; } /** @@ -2207,28 +2565,63 @@ return object && copyObject(source, keys(source), object); } + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + /** * The base implementation of `_.at` without support for individual paths. * * @private * @param {Object} object The object to iterate over. - * @param {string[]} paths The property paths of elements to pick. - * @returns {Array} Returns the new array of picked elements. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. */ function baseAt(object, paths) { var index = -1, - isNil = object == null, length = paths.length, - result = Array(length); + result = Array(length), + skip = object == null; while (++index < length) { - result[index] = isNil ? undefined : get(object, paths[index]); + result[index] = skip ? undefined : get(object, paths[index]); } return result; } /** - * The base implementation of `_.clamp` which doesn't coerce arguments to numbers. + * The base implementation of `_.clamp` which doesn't coerce arguments. * * @private * @param {number} number The number to clamp. @@ -2254,16 +2647,22 @@ * * @private * @param {*} value The value to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @param {boolean} [isFull] Specify a clone including symbols. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols * @param {Function} [customizer] The function to customize cloning. * @param {string} [key] The key of `value`. * @param {Object} [object] The parent object of `value`. * @param {Object} [stack] Tracks traversed objects and their clone counterparts. * @returns {*} Returns the cloned value. */ - function baseClone(value, isDeep, isFull, customizer, key, object, stack) { - var result; + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + if (customizer) { result = object ? customizer(value, key, object, stack) : customizer(value); } @@ -2287,12 +2686,11 @@ return cloneBuffer(value, isDeep); } if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - if (isHostObject(value)) { - return object ? value : {}; - } - result = initCloneObject(isFunc ? {} : value); + result = (isFlat || isFunc) ? {} : initCloneObject(value); if (!isDeep) { - return copySymbols(value, baseAssign(result, value)); + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); } } else { if (!cloneableTags[tag]) { @@ -2309,16 +2707,18 @@ } stack.set(value, result); - if (!isArr) { - var props = isFull ? getAllKeys(value) : keys(value); - } - // Recursively populate clone (susceptible to call stack limits). + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); arrayEach(props || value, function(subValue, key) { if (props) { key = subValue; subValue = value[key]; } - assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); return result; } @@ -2328,52 +2728,50 @@ * * @private * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseConforms(source) { - var props = keys(source), - length = props.length; - + var props = keys(source); return function(object) { - if (object == null) { - return !length; - } - var index = length; - while (index--) { - var key = props[index], - predicate = source[key], - value = object[key]; - - if ((value === undefined && - !(key in Object(object))) || !predicate(value)) { - return false; - } - } - return true; + return baseConformsTo(object, source, props); }; } /** - * The base implementation of `_.create` without support for assigning - * properties to the created object. + * The base implementation of `_.conformsTo` which accepts `props` to check. * * @private - * @param {Object} prototype The object to inherit from. - * @returns {Object} Returns the new object. + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. */ - function baseCreate(proto) { - return isObject(proto) ? objectCreate(proto) : {}; + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; } /** - * The base implementation of `_.delay` and `_.defer` which accepts an array - * of `func` arguments. + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. * * @private * @param {Function} func The function to delay. * @param {number} wait The number of milliseconds to delay invocation. - * @param {Object} args The arguments to provide to `func`. - * @returns {number} Returns the timer id. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. */ function baseDelay(func, wait, args) { if (typeof func != 'function') { @@ -2419,7 +2817,7 @@ outer: while (++index < length) { var value = array[index], - computed = iteratee ? iteratee(value) : value; + computed = iteratee == null ? value : iteratee(value); value = (comparator || value !== 0) ? value : 0; if (isCommon && computed === computed) { @@ -2641,7 +3039,7 @@ * @private * @param {Object} object The object to inspect. * @param {Array} props The property names to filter. - * @returns {Array} Returns the new array of filtered property names. + * @returns {Array} Returns the function names. */ function baseFunctions(object, props) { return arrayFilter(props, function(key) { @@ -2658,7 +3056,7 @@ * @returns {*} Returns the resolved value. */ function baseGet(object, path) { - path = isKey(path, object) ? [path] : castPath(path); + path = castPath(path, object); var index = 0, length = path.length; @@ -2682,13 +3080,28 @@ */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); - return isArray(object) - ? result - : arrayPush(result, symbolsFunc(object)); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + value = Object(value); + return (symToStringTag && symToStringTag in value) + ? getRawTag(value) + : objectToString(value); } /** - * The base implementation of `_.gt` which doesn't coerce arguments to numbers. + * The base implementation of `_.gt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. @@ -2704,32 +3117,28 @@ * The base implementation of `_.has` without support for deep paths. * * @private - * @param {Object} object The object to query. + * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHas(object, key) { - // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`, - // that are composed entirely of index properties, return `false` for - // `hasOwnProperty` checks of them. - return hasOwnProperty.call(object, key) || - (typeof object == 'object' && key in object && getPrototype(object) === null); + return object != null && hasOwnProperty.call(object, key); } /** * The base implementation of `_.hasIn` without support for deep paths. * * @private - * @param {Object} object The object to query. + * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { - return key in Object(object); + return object != null && key in Object(object); } /** - * The base implementation of `_.inRange` which doesn't coerce arguments to numbers. + * The base implementation of `_.inRange` which doesn't coerce arguments. * * @private * @param {number} number The number to check. @@ -2833,15 +3242,45 @@ * @returns {*} Returns the result of the invoked method. */ function baseInvoke(object, path, args) { - if (!isKey(path, object)) { - path = castPath(path); - object = parent(object, path); - path = last(path); - } - var func = object == null ? object : object[toKey(path)]; + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; return func == null ? undefined : apply(func, object, args); } + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. @@ -2849,22 +3288,21 @@ * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. - * @param {boolean} [bitmask] The bitmask of comparison flags. - * The bitmask may be composed of the following flags: - * 1 - Unordered comparison - * 2 - Partial comparison * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ - function baseIsEqual(value, other, customizer, bitmask, stack) { + function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { return value !== value && other !== other; } - return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack); + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } /** @@ -2875,14 +3313,13 @@ * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` - * for more details. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = arrayTag, @@ -2896,17 +3333,24 @@ othTag = getTag(other); othTag = othTag == argsTag ? objectTag : othTag; } - var objIsObj = objTag == objectTag && !isHostObject(object), - othIsObj = othTag == objectTag && !isHostObject(other), + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, isSameTag = objTag == othTag; + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } if (isSameTag && !objIsObj) { stack || (stack = new Stack); return (objIsArr || isTypedArray(object)) - ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) - : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack); + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } - if (!(bitmask & PARTIAL_COMPARE_FLAG)) { + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); @@ -2915,14 +3359,25 @@ othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack); - return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack); - return equalObjects(object, other, equalFunc, customizer, bitmask, stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; } /** @@ -2969,7 +3424,7 @@ var result = customizer(objValue, srcValue, key, object, source, stack); } if (!(result === undefined - ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result )) { return false; @@ -2979,6 +3434,56 @@ return true; } + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + /** * The base implementation of `_.iteratee`. * @@ -3004,44 +3509,49 @@ } /** - * The base implementation of `_.keys` which doesn't skip the constructor - * property of prototypes or treat sparse arrays as dense. + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { - return nativeKeys(Object(object)); + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; } /** - * The base implementation of `_.keysIn` which doesn't skip the constructor - * property of prototypes or treat sparse arrays as dense. + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeysIn(object) { - object = object == null ? object : Object(object); + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; - var result = []; for (var key in object) { - result.push(key); + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } } return result; } - // Fallback for IE < 9 with es6-shim. - if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) { - baseKeysIn = function(object) { - return iteratorToArray(enumerate(object)); - }; - } - /** - * The base implementation of `_.lt` which doesn't coerce arguments to numbers. + * The base implementation of `_.lt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. @@ -3076,7 +3586,7 @@ * * @private * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var matchData = getMatchData(source); @@ -3094,7 +3604,7 @@ * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { @@ -3104,7 +3614,7 @@ var objValue = get(object, path); return (objValue === undefined && objValue === srcValue) ? hasIn(object, path) - : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG); + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); }; } @@ -3123,14 +3633,7 @@ if (object === source) { return; } - if (!(isArray(source) || isTypedArray(source))) { - var props = keysIn(source); - } - arrayEach(props || source, function(srcValue, key) { - if (props) { - key = srcValue; - srcValue = source[key]; - } + baseFor(source, function(srcValue, key) { if (isObject(srcValue)) { stack || (stack = new Stack); baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); @@ -3145,7 +3648,7 @@ } assignMergeValue(object, key, newValue); } - }); + }, keysIn); } /** @@ -3179,47 +3682,54 @@ var isCommon = newValue === undefined; if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + newValue = srcValue; - if (isArray(srcValue) || isTypedArray(srcValue)) { + if (isArr || isBuff || isTyped) { if (isArray(objValue)) { newValue = objValue; } else if (isArrayLikeObject(objValue)) { newValue = copyArray(objValue); } - else { + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { isCommon = false; - newValue = baseClone(srcValue, true); + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; if (isArguments(objValue)) { newValue = toPlainObject(objValue); } else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { - isCommon = false; - newValue = baseClone(srcValue, true); - } - else { - newValue = objValue; + newValue = initCloneObject(srcValue); } } else { isCommon = false; } } - stack.set(srcValue, newValue); - if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); } - stack['delete'](srcValue); assignMergeValue(object, key, newValue); } /** - * The base implementation of `_.nth` which doesn't coerce `n` to an integer. + * The base implementation of `_.nth` which doesn't coerce arguments. * * @private * @param {Array} array The array to query. @@ -3266,17 +3776,14 @@ * * @private * @param {Object} object The source object. - * @param {string[]} props The property identifiers to pick. + * @param {string[]} paths The property paths to pick. * @returns {Object} Returns the new object. */ - function basePick(object, props) { + function basePick(object, paths) { object = Object(object); - return arrayReduce(props, function(result, key) { - if (key in object) { - result[key] = object[key]; - } - return result; - }, {}); + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); } /** @@ -3284,45 +3791,32 @@ * * @private * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. * @param {Function} predicate The function invoked per property. * @returns {Object} Returns the new object. */ - function basePickBy(object, predicate) { + function basePickBy(object, paths, predicate) { var index = -1, - props = getAllKeysIn(object), - length = props.length, + length = paths.length, result = {}; while (++index < length) { - var key = props[index], - value = object[key]; + var path = paths[index], + value = baseGet(object, path); - if (predicate(value, key)) { - result[key] = value; + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); } } return result; } - /** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; - } - /** * A specialized version of `baseProperty` which supports deep paths. * * @private * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. */ function basePropertyDeep(path) { return function(object) { @@ -3347,6 +3841,9 @@ length = values.length, seen = array; + if (array === values) { + values = copyArray(values); + } if (iteratee) { seen = arrayMap(array, baseUnary(iteratee)); } @@ -3384,17 +3881,8 @@ var previous = index; if (isIndex(index)) { splice.call(array, index, 1); - } - else if (!isKey(index, array)) { - var path = castPath(index), - object = parent(array, path); - - if (object != null) { - delete object[toKey(last(path))]; - } - } - else { - delete array[toKey(index)]; + } else { + baseUnset(array, index); } } } @@ -3416,14 +3904,14 @@ /** * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments to numbers. + * coerce arguments. * * @private * @param {number} start The start of the range. * @param {number} end The end of the range. * @param {number} step The value to increment or decrement by. * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. */ function baseRange(start, end, step, fromRight) { var index = -1, @@ -3465,18 +3953,57 @@ return result; } + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + /** * The base implementation of `_.set`. * * @private - * @param {Object} object The object to query. + * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @param {Function} [customizer] The function to customize path creation. * @returns {Object} Returns `object`. */ function baseSet(object, path, value, customizer) { - path = isKey(path, object) ? [path] : castPath(path); + if (!isObject(object)) { + return object; + } + path = castPath(path, object); var index = -1, length = path.length, @@ -3484,27 +4011,26 @@ nested = object; while (nested != null && ++index < length) { - var key = toKey(path[index]); - if (isObject(nested)) { - var newValue = value; - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = objValue == null - ? (isIndex(path[index + 1]) ? [] : {}) - : objValue; - } + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); } - assignValue(nested, key, newValue); } + assignValue(nested, key, newValue); nested = nested[key]; } return object; } /** - * The base implementation of `setData` without support for hot loop detection. + * The base implementation of `setData` without support for hot loop shorting. * * @private * @param {Function} func The function to associate metadata with. @@ -3516,6 +4042,34 @@ return func; }; + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + /** * The base implementation of `_.slice` without an iteratee call guard. * @@ -3579,7 +4133,7 @@ */ function baseSortedIndex(array, value, retHighest) { var low = 0, - high = array ? array.length : low; + high = array == null ? low : array.length; if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { while (low < high) { @@ -3615,7 +4169,7 @@ value = iteratee(value); var low = 0, - high = array ? array.length : 0, + high = array == null ? 0 : array.length, valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), @@ -3709,6 +4263,10 @@ if (typeof value == 'string') { return value; } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } @@ -3782,22 +4340,20 @@ * * @private * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to unset. + * @param {Array|string} path The property path to unset. * @returns {boolean} Returns `true` if the property is deleted, else `false`. */ function baseUnset(object, path) { - path = isKey(path, object) ? [path] : castPath(path); + path = castPath(path, object); object = parent(object, path); - - var key = toKey(last(path)); - return !(object != null && baseHas(object, key)) || delete object[key]; + return object == null || delete object[toKey(last(path))]; } /** * The base implementation of `_.update`. * * @private - * @param {Object} object The object to query. + * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to update. * @param {Function} updater The function to produce the updated value. * @param {Function} [customizer] The function to customize path creation. @@ -3861,18 +4417,24 @@ * @returns {Array} Returns the new array of values. */ function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } var index = -1, - length = arrays.length; + result = Array(length); while (++index < length) { - var result = result - ? arrayPush( - baseDifference(result, arrays[index], iteratee, comparator), - baseDifference(arrays[index], result, iteratee, comparator) - ) - : arrays[index]; + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } } - return (result && result.length) ? baseUniq(result, iteratee, comparator) : []; + return baseUniq(baseFlatten(result, 1), iteratee, comparator); } /** @@ -3924,12 +4486,27 @@ * * @private * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ - function castPath(value) { - return isArray(value) ? value : stringToPath(value); + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); } + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + /** * Casts `array` to a slice if it's needed. * @@ -3945,6 +4522,16 @@ return (!start && end >= length) ? array : baseSlice(array, start, end); } + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; + /** * Creates a clone of `buffer`. * @@ -3957,7 +4544,9 @@ if (isDeep) { return buffer.slice(); } - var result = new buffer.constructor(buffer.length); + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + buffer.copy(result); return result; } @@ -3998,7 +4587,7 @@ * @returns {Object} Returns the cloned map. */ function cloneMap(map, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); + var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map); return arrayReduce(array, addMapEntry, new map.constructor); } @@ -4025,7 +4614,7 @@ * @returns {Object} Returns the cloned set. */ function cloneSet(set, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); + var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set); return arrayReduce(array, addSetEntry, new set.constructor); } @@ -4137,7 +4726,7 @@ * placeholders, and provided arguments into a single array of arguments. * * @private - * @param {Array|Object} args The provided arguments. + * @param {Array} args The provided arguments. * @param {Array} partials The arguments to prepend to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. @@ -4172,7 +4761,7 @@ * is tailored for `_.partialRight`. * * @private - * @param {Array|Object} args The provided arguments. + * @param {Array} args The provided arguments. * @param {Array} partials The arguments to append to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. @@ -4234,6 +4823,7 @@ * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { + var isNew = !object; object || (object = {}); var index = -1, @@ -4244,15 +4834,22 @@ var newValue = customizer ? customizer(object[key], source[key], key, object, source) - : source[key]; + : undefined; - assignValue(object, key, newValue); + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } } return object; } /** - * Copies own symbol properties of `source` to `object`. + * Copies own symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. @@ -4263,6 +4860,18 @@ return copyObject(source, getSymbols(source), object); } + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + /** * Creates a function like `_.groupBy`. * @@ -4276,7 +4885,7 @@ var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {}; - return func(collection, setter, getIteratee(iteratee), accumulator); + return func(collection, setter, getIteratee(iteratee, 2), accumulator); }; } @@ -4288,13 +4897,13 @@ * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { - return rest(function(object, sources) { + return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; - customizer = typeof customizer == 'function' + customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; @@ -4372,14 +4981,13 @@ * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @returns {Function} Returns the new wrapped function. */ - function createBaseWrapper(func, bitmask, thisArg) { - var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); function wrapper() { var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; @@ -4393,13 +5001,13 @@ * * @private * @param {string} methodName The name of the `String` case method to use. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new case function. */ function createCaseFirst(methodName) { return function(string) { string = toString(string); - var strSymbols = reHasComplexSymbol.test(string) + var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined; @@ -4436,10 +5044,10 @@ * @param {Function} Ctor The constructor to wrap. * @returns {Function} Returns the new wrapped function. */ - function createCtorWrapper(Ctor) { + function createCtor(Ctor) { return function() { // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { @@ -4466,19 +5074,18 @@ * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {number} arity The arity of `func`. * @returns {Function} Returns the new wrapped function. */ - function createCurryWrapper(func, bitmask, arity) { - var Ctor = createCtorWrapper(func); + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); function wrapper() { var length = arguments.length, args = Array(length), index = length, - placeholder = getPlaceholder(wrapper); + placeholder = getHolder(wrapper); while (index--) { args[index] = arguments[index]; @@ -4489,8 +5096,8 @@ length -= holders.length; if (length < arity) { - return createRecurryWrapper( - func, bitmask, createHybridWrapper, wrapper.placeholder, undefined, + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length); } var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; @@ -4499,6 +5106,26 @@ return wrapper; } + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + /** * Creates a `_.flow` or `_.flowRight` function. * @@ -4507,9 +5134,7 @@ * @returns {Function} Returns the new flow function. */ function createFlow(fromRight) { - return rest(function(funcs) { - funcs = baseFlatten(funcs, 1); - + return flatRest(function(funcs) { var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru; @@ -4534,7 +5159,7 @@ data = funcName == 'wrapper' ? getData(func) : undefined; if (data && isLaziable(data[0]) && - data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1 ) { wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); @@ -4569,8 +5194,7 @@ * * @private * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to * the new function. @@ -4583,24 +5207,24 @@ * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ - function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { - var isAry = bitmask & ARY_FLAG, - isBind = bitmask & BIND_FLAG, - isBindKey = bitmask & BIND_KEY_FLAG, - isCurried = bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG), - isFlip = bitmask & FLIP_FLAG, - Ctor = isBindKey ? undefined : createCtorWrapper(func); + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); function wrapper() { var length = arguments.length, - index = length, - args = Array(length); + args = Array(length), + index = length; while (index--) { args[index] = arguments[index]; } if (isCurried) { - var placeholder = getPlaceholder(wrapper), + var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder); } if (partials) { @@ -4612,8 +5236,8 @@ length -= holdersCount; if (isCurried && length < arity) { var newHolders = replaceHolders(args, placeholder); - return createRecurryWrapper( - func, bitmask, createHybridWrapper, wrapper.placeholder, thisArg, + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, args, newHolders, argPos, ary, arity - length ); } @@ -4630,7 +5254,7 @@ args.length = ary; } if (this && this !== root && this instanceof wrapper) { - fn = Ctor || createCtorWrapper(fn); + fn = Ctor || createCtor(fn); } return fn.apply(thisBinding, args); } @@ -4656,13 +5280,14 @@ * * @private * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. * @returns {Function} Returns the new mathematical operation function. */ - function createMathOperation(operator) { + function createMathOperation(operator, defaultValue) { return function(value, other) { var result; if (value === undefined && other === undefined) { - return 0; + return defaultValue; } if (value !== undefined) { result = value; @@ -4689,15 +5314,12 @@ * * @private * @param {Function} arrayFunc The function to iterate over iteratees. - * @returns {Function} Returns the new invoker function. + * @returns {Function} Returns the new over function. */ function createOver(arrayFunc) { - return rest(function(iteratees) { - iteratees = (iteratees.length == 1 && isArray(iteratees[0])) - ? arrayMap(iteratees[0], baseUnary(getIteratee())) - : arrayMap(baseFlatten(iteratees, 1, isFlattenableIteratee), baseUnary(getIteratee())); - - return rest(function(args) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { var thisArg = this; return arrayFunc(iteratees, function(iteratee) { return apply(iteratee, thisArg, args); @@ -4723,7 +5345,7 @@ return charsLength ? baseRepeat(chars, length) : chars; } var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); - return reHasComplexSymbol.test(chars) + return hasUnicode(chars) ? castSlice(stringToArray(result), 0, length).join('') : result.slice(0, length); } @@ -4734,16 +5356,15 @@ * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} thisArg The `this` binding of `func`. * @param {Array} partials The arguments to prepend to those provided to * the new function. * @returns {Function} Returns the new wrapped function. */ - function createPartialWrapper(func, bitmask, thisArg, partials) { - var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); function wrapper() { var argsIndex = -1, @@ -4777,15 +5398,14 @@ end = step = undefined; } // Ensure the sign of `-0` is preserved. - start = toNumber(start); - start = start === start ? start : 0; + start = toFinite(start); if (end === undefined) { end = start; start = 0; } else { - end = toNumber(end) || 0; + end = toFinite(end); } - step = step === undefined ? (start < end ? 1 : -1) : (toNumber(step) || 0); + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); return baseRange(start, end, step, fromRight); }; } @@ -4812,8 +5432,7 @@ * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` - * for more details. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {Function} wrapFunc The function to create the `func` wrapper. * @param {*} placeholder The placeholder value. * @param {*} [thisArg] The `this` binding of `func`. @@ -4825,18 +5444,18 @@ * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ - function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { - var isCurry = bitmask & CURRY_FLAG, + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined, newHoldersRight = isCurry ? undefined : holders, newPartials = isCurry ? partials : undefined, newPartialsRight = isCurry ? undefined : partials; - bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG); - bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG); + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); - if (!(bitmask & CURRY_BOUND_FLAG)) { - bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG); + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); } var newData = [ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, @@ -4848,7 +5467,7 @@ setData(result, newData); } result.placeholder = placeholder; - return result; + return setWrapToString(result, func, bitmask); } /** @@ -4862,7 +5481,7 @@ var func = Math[methodName]; return function(number, precision) { number = toNumber(number); - precision = toInteger(precision); + precision = nativeMin(toInteger(precision), 292); if (precision) { // Shift with exponential notation to avoid floating-point issues. // See [MDN](https://mdn.io/round#Examples) for more details. @@ -4877,7 +5496,7 @@ } /** - * Creates a set of `values`. + * Creates a set object of `values`. * * @private * @param {Array} values The values to add to the set. @@ -4887,23 +5506,43 @@ return new Set(values); }; + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + /** * Creates a function that either curries or invokes `func` with optional * `this` binding and partially applied arguments. * * @private * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask of wrapper flags. - * The bitmask may be composed of the following flags: - * 1 - `_.bind` - * 2 - `_.bindKey` - * 4 - `_.curry` or `_.curryRight` of a bound function - * 8 - `_.curry` - * 16 - `_.curryRight` - * 32 - `_.partial` - * 64 - `_.partialRight` - * 128 - `_.rearg` - * 256 - `_.ary` + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to be partially applied. * @param {Array} [holders] The `partials` placeholder indexes. @@ -4912,21 +5551,21 @@ * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ - function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { - var isBindKey = bitmask & BIND_KEY_FLAG; + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; if (!isBindKey && typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } var length = partials ? partials.length : 0; if (!length) { - bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG); + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); partials = holders = undefined; } ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); arity = arity === undefined ? arity : toInteger(arity); length -= holders ? holders.length : 0; - if (bitmask & PARTIAL_RIGHT_FLAG) { + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { var partialsRight = partials, holdersRight = holders; @@ -4951,20 +5590,20 @@ ? (isBindKey ? 0 : func.length) : nativeMax(newData[9] - length, 0); - if (!arity && bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG)) { - bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG); + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); } - if (!bitmask || bitmask == BIND_FLAG) { - var result = createBaseWrapper(func, bitmask, thisArg); - } else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) { - result = createCurryWrapper(func, bitmask, arity); - } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) { - result = createPartialWrapper(func, bitmask, thisArg, partials); + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); } else { - result = createHybridWrapper.apply(undefined, newData); + result = createHybrid.apply(undefined, newData); } var setter = data ? baseSetData : setData; - return setter(result, newData); + return setWrapToString(setter(result, newData), func, bitmask); } /** @@ -4974,17 +5613,14 @@ * @private * @param {Array} array The array to compare. * @param {Array} other The other array to compare. - * @param {Function} equalFunc The function to determine equivalents of values. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` - * for more details. + * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ - function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { - var index = -1, - isPartial = bitmask & PARTIAL_COMPARE_FLAG, - isUnordered = bitmask & UNORDERED_COMPARE_FLAG, + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; @@ -4993,11 +5629,15 @@ } // Assume cyclic values are equal. var stacked = stack.get(array); - if (stacked) { + if (stacked && stack.get(other)) { return stacked == other; } - var result = true; + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + stack.set(array, other); + stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { @@ -5017,23 +5657,26 @@ break; } // Recursively compare arrays (susceptible to call stack limits). - if (isUnordered) { - if (!arraySome(other, function(othValue) { - return arrValue === othValue || - equalFunc(arrValue, othValue, customizer, bitmask, stack); + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } })) { result = false; break; } } else if (!( arrValue === othValue || - equalFunc(arrValue, othValue, customizer, bitmask, stack) + equalFunc(arrValue, othValue, bitmask, customizer, stack) )) { result = false; break; } } stack['delete'](array); + stack['delete'](other); return result; } @@ -5048,14 +5691,13 @@ * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. - * @param {Function} equalFunc The function to determine equivalents of values. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` - * for more details. + * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: if ((object.byteLength != other.byteLength) || @@ -5074,22 +5716,18 @@ case boolTag: case dateTag: - // Coerce dates and booleans to numbers, dates to milliseconds and - // booleans to `1` or `0` treating invalid dates coerced to `NaN` as - // not equal. - return +object == +other; + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; - case numberTag: - // Treat `NaN` vs. `NaN` as equal. - return (object != +object) ? other != +other : object == +other; - case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); @@ -5097,7 +5735,7 @@ var convert = mapToArray; case setTag: - var isPartial = bitmask & PARTIAL_COMPARE_FLAG; + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; convert || (convert = setToArray); if (object.size != other.size && !isPartial) { @@ -5108,11 +5746,13 @@ if (stacked) { return stacked == other; } - bitmask |= UNORDERED_COMPARE_FLAG; - stack.set(object, other); + bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). - return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; case symbolTag: if (symbolValueOf) { @@ -5129,15 +5769,14 @@ * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. - * @param {Function} equalFunc The function to determine equivalents of values. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` - * for more details. + * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { - var isPartial = bitmask & PARTIAL_COMPARE_FLAG, + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = keys(object), objLength = objProps.length, othProps = keys(other), @@ -5149,17 +5788,18 @@ var index = objLength; while (index--) { var key = objProps[index]; - if (!(isPartial ? key in other : baseHas(other, key))) { + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } // Assume cyclic values are equal. var stacked = stack.get(object); - if (stacked) { + if (stacked && stack.get(other)) { return stacked == other; } var result = true; stack.set(object, other); + stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { @@ -5174,7 +5814,7 @@ } // Recursively compare objects (susceptible to call stack limits). if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack)) + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) : compared )) { result = false; @@ -5195,9 +5835,21 @@ } } stack['delete'](object); + stack['delete'](other); return result; } + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + /** * Creates an array of own enumerable property names and symbols of `object`. * @@ -5254,6 +5906,18 @@ return result; } + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + /** * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, * this function returns the custom method, otherwise it returns `baseIteratee`. @@ -5272,17 +5936,19 @@ } /** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a - * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects - * Safari on at least iOS 8.1-8.3 ARM64. + * Gets the data for `map`. * * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. */ - var getLength = baseProperty('length'); + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } /** * Gets the property names, values, and compare flags of `object`. @@ -5292,11 +5958,14 @@ * @returns {Array} Returns the match data of `object`. */ function getMatchData(object) { - var result = toPairs(object), + var result = keys(object), length = result.length; while (length--) { - result[length][2] = isStrictComparable(result[length][1]); + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; } return result; } @@ -5310,62 +5979,54 @@ * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { - var value = object[key]; - return isNative(value) ? value : undefined; - } - - /** - * Gets the argument placeholder value for `func`. - * - * @private - * @param {Function} func The function to inspect. - * @returns {*} Returns the placeholder value. - */ - function getPlaceholder(func) { - var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; - return object.placeholder; + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; } /** - * Gets the `[[Prototype]]` of `value`. + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. - * @returns {null|Object} Returns the `[[Prototype]]`. + * @returns {string} Returns the raw `toStringTag`. */ - function getPrototype(value) { - return nativeGetPrototype(Object(value)); + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; } /** - * Creates an array of the own enumerable symbol properties of `object`. + * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ - function getSymbols(object) { - // Coerce `object` to an object to avoid non-object errors in V8. - // See https://bugs.chromium.org/p/v8/issues/detail?id=3443 for more details. - return getOwnPropertySymbols(Object(object)); - } - - // Fallback for IE < 11. - if (!getOwnPropertySymbols) { - getSymbols = function() { - return []; - }; - } + var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; /** - * Creates an array of the own and inherited enumerable symbol properties - * of `object`. + * Creates an array of the own and inherited enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ - var getSymbolsIn = !getOwnPropertySymbols ? getSymbols : function(object) { + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { var result = []; while (object) { arrayPush(result, getSymbols(object)); @@ -5381,21 +6042,18 @@ * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ - function getTag(value) { - return objectToString.call(value); - } + var getTag = baseGetTag; - // Fallback for data views, maps, sets, and weak maps in IE 11, - // for data views in Edge, and promises in Node.js. + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { - var result = objectToString.call(value), + var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : undefined; + ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { @@ -5438,6 +6096,18 @@ return { 'start': start, 'end': end }; } + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + /** * Checks if `path` exists on `object`. * @@ -5448,11 +6118,11 @@ * @returns {boolean} Returns `true` if `path` exists, else `false`. */ function hasPath(object, path, hasFunc) { - path = isKey(path, object) ? [path] : castPath(path); + path = castPath(path, object); - var result, - index = -1, - length = path.length; + var index = -1, + length = path.length, + result = false; while (++index < length) { var key = toKey(path[index]); @@ -5461,12 +6131,12 @@ } object = object[key]; } - if (result) { + if (result || ++index != length) { return result; } - var length = object ? object.length : 0; + length = object == null ? 0 : object.length; return !!length && isLength(length) && isIndex(key, length) && - (isArray(object) || isString(object) || isArguments(object)); + (isArray(object) || isArguments(object)); } /** @@ -5551,20 +6221,22 @@ } /** - * Creates an array of index keys for `object` values of arrays, - * `arguments` objects, and strings, otherwise `null` is returned. + * Inserts wrapper `details` in a comment at the top of the `source` body. * * @private - * @param {Object} object The object to query. - * @returns {Array|null} Returns index keys, else `null`. + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. */ - function indexKeys(object) { - var length = object ? object.length : undefined; - if (isLength(length) && - (isArray(object) || isString(object) || isArguments(object))) { - return baseTimes(length, String); + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; } - return null; + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); } /** @@ -5575,19 +6247,8 @@ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenable(value) { - return isArrayLikeObject(value) && (isArray(value) || isArguments(value)); - } - - /** - * Checks if `value` is a flattenable array and not a `_.matchesProperty` - * iteratee shorthand. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ - function isFlattenableIteratee(value) { - return isArray(value) && !(value.length == 2 && !isFunction(value[0])); + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); } /** @@ -5686,6 +6347,26 @@ return !!data && func === data[0]; } + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + /** * Checks if `value` is likely a prototype object. * @@ -5719,7 +6400,7 @@ * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function matchesStrictComparable(key, srcValue) { return function(object) { @@ -5731,6 +6412,26 @@ }; } + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + /** * Merges the function metadata of `source` into `data`. * @@ -5751,22 +6452,22 @@ var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, - isCommon = newBitmask < (BIND_FLAG | BIND_KEY_FLAG | ARY_FLAG); + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); var isCombo = - ((srcBitmask == ARY_FLAG) && (bitmask == CURRY_FLAG)) || - ((srcBitmask == ARY_FLAG) && (bitmask == REARG_FLAG) && (data[7].length <= source[8])) || - ((srcBitmask == (ARY_FLAG | REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == CURRY_FLAG)); + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); // Exit early if metadata can't be merged. if (!(isCommon || isCombo)) { return data; } // Use source `thisArg` if available. - if (srcBitmask & BIND_FLAG) { + if (srcBitmask & WRAP_BIND_FLAG) { data[2] = source[2]; // Set when currying a bound function. - newBitmask |= bitmask & BIND_FLAG ? 0 : CURRY_BOUND_FLAG; + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; } // Compose partial arguments. var value = source[3]; @@ -5788,7 +6489,7 @@ data[7] = value; } // Use source `ary` if it's smaller. - if (srcBitmask & ARY_FLAG) { + if (srcBitmask & WRAP_ARY_FLAG) { data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); } // Use source `arity` if one is not provided. @@ -5817,11 +6518,74 @@ */ function mergeDefaults(objValue, srcValue, key, object, source, stack) { if (isObject(objValue) && isObject(srcValue)) { - baseMerge(objValue, srcValue, undefined, mergeDefaults, stack.set(srcValue, objValue)); + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, mergeDefaults, stack); + stack['delete'](srcValue); } return objValue; } + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + /** * Gets the parent value at `path` of `object`. * @@ -5831,7 +6595,7 @@ * @returns {*} Returns the parent value. */ function parent(object, path) { - return path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); } /** @@ -5870,25 +6634,98 @@ * @param {*} data The metadata. * @returns {Function} Returns `func`. */ - var setData = (function() { + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { var count = 0, lastCalled = 0; - return function(key, value) { - var stamp = now(), + return function() { + var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); lastCalled = stamp; if (remaining > 0) { if (++count >= HOT_COUNT) { - return key; + return arguments[0]; } } else { count = 0; } - return baseSetData(key, value); + return func.apply(undefined, arguments); }; - }()); + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } /** * Converts `string` to a property path array. @@ -5897,9 +6734,12 @@ * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ - var stringToPath = memoize(function(string) { + var stringToPath = memoizeCapped(function(string) { var result = []; - toString(string).replace(rePropName, function(match, number, quote, string) { + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); }); return result; @@ -5924,7 +6764,7 @@ * Converts `func` to its source code. * * @private - * @param {Function} func The function to process. + * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { @@ -5939,6 +6779,24 @@ return ''; } + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + /** * Creates a clone of `wrapper`. * @@ -5971,7 +6829,7 @@ * @param {Array} array The array to process. * @param {number} [size=1] The length of each chunk * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the new array containing chunks. + * @returns {Array} Returns the new array of chunks. * @example * * _.chunk(['a', 'b', 'c', 'd'], 2); @@ -5986,7 +6844,7 @@ } else { size = nativeMax(toInteger(size), 0); } - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length || size < 1) { return []; } @@ -6017,7 +6875,7 @@ */ function compact(array) { var index = -1, - length = array ? array.length : 0, + length = array == null ? 0 : array.length, resIndex = 0, result = []; @@ -6053,24 +6911,27 @@ * // => [1] */ function concat() { - var length = arguments.length, - array = castArray(arguments[0]); - - if (length < 2) { - return length ? copyArray(array) : []; + var length = arguments.length; + if (!length) { + return []; } - var args = Array(length - 1); - while (length--) { - args[length - 1] = arguments[length]; + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; } - return arrayConcat(array, baseFlatten(args, 1)); + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); } /** - * Creates an array of unique `array` values not included in the other given - * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. The order of result values is determined by the - * order they occur in the first array. + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. * * @static * @memberOf _ @@ -6082,10 +6943,10 @@ * @see _.without, _.xor * @example * - * _.difference([3, 2, 1], [4, 2]); - * // => [3, 1] + * _.difference([2, 1], [2, 3]); + * // => [1] */ - var difference = rest(function(array, values) { + var difference = baseRest(function(array, values) { return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : []; @@ -6094,8 +6955,11 @@ /** * This method is like `_.difference` except that it accepts `iteratee` which * is invoked for each element of `array` and `values` to generate the criterion - * by which they're compared. Result values are chosen from the first array. - * The iteratee is invoked with one argument: (value). + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. * * @static * @memberOf _ @@ -6103,33 +6967,34 @@ * @category Array * @param {Array} array The array to inspect. * @param {...Array} [values] The values to exclude. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of filtered values. * @example * - * _.differenceBy([3.1, 2.2, 1.3], [4.4, 2.5], Math.floor); - * // => [3.1, 1.3] + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] * * // The `_.property` iteratee shorthand. * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); * // => [{ 'x': 2 }] */ - var differenceBy = rest(function(array, values) { + var differenceBy = baseRest(function(array, values) { var iteratee = last(values); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee)) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) : []; }); /** * This method is like `_.difference` except that it accepts `comparator` - * which is invoked to compare elements of `array` to `values`. Result values - * are chosen from the first array. The comparator is invoked with two arguments: - * (arrVal, othVal). + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. * * @static * @memberOf _ @@ -6146,7 +7011,7 @@ * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); * // => [{ 'x': 2, 'y': 1 }] */ - var differenceWith = rest(function(array, values) { + var differenceWith = baseRest(function(array, values) { var comparator = last(values); if (isArrayLikeObject(comparator)) { comparator = undefined; @@ -6182,7 +7047,7 @@ * // => [1, 2, 3] */ function drop(array, n, guard) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } @@ -6216,7 +7081,7 @@ * // => [1, 2, 3] */ function dropRight(array, n, guard) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } @@ -6235,8 +7100,7 @@ * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * @@ -6277,8 +7141,7 @@ * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * @@ -6339,7 +7202,7 @@ * // => [4, '*', '*', 10] */ function fill(array, value, start, end) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } @@ -6358,9 +7221,9 @@ * @memberOf _ * @since 1.1.0 * @category Array - * @param {Array} array The array to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * @@ -6385,10 +7248,16 @@ * _.findIndex(users, 'active'); * // => 2 */ - function findIndex(array, predicate) { - return (array && array.length) - ? baseFindIndex(array, getIteratee(predicate, 3)) - : -1; + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); } /** @@ -6399,9 +7268,9 @@ * @memberOf _ * @since 2.0.0 * @category Array - * @param {Array} array The array to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * @@ -6426,10 +7295,19 @@ * _.findLastIndex(users, 'active'); * // => 0 */ - function findLastIndex(array, predicate) { - return (array && array.length) - ? baseFindIndex(array, getIteratee(predicate, 3), true) - : -1; + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); } /** @@ -6447,7 +7325,7 @@ * // => [1, 2, [3, [4]], 5] */ function flatten(array) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? baseFlatten(array, 1) : []; } @@ -6466,7 +7344,7 @@ * // => [1, 2, 3, 4, 5] */ function flattenDeep(array) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? baseFlatten(array, INFINITY) : []; } @@ -6491,7 +7369,7 @@ * // => [1, 2, 3, [4], 5] */ function flattenDepth(array, depth) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } @@ -6511,12 +7389,12 @@ * @returns {Object} Returns the new object. * @example * - * _.fromPairs([['fred', 30], ['barney', 40]]); - * // => { 'fred': 30, 'barney': 40 } + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } */ function fromPairs(pairs) { var index = -1, - length = pairs ? pairs.length : 0, + length = pairs == null ? 0 : pairs.length, result = {}; while (++index < length) { @@ -6550,7 +7428,7 @@ /** * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. If `fromIndex` is negative, it's used as the * offset from the end of `array`. * @@ -6558,7 +7436,7 @@ * @memberOf _ * @since 0.1.0 * @category Array - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. @@ -6572,15 +7450,15 @@ * // => 3 */ function indexOf(array, value, fromIndex) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return -1; } - fromIndex = toInteger(fromIndex); - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); } - return baseIndexOf(array, value, fromIndex); + return baseIndexOf(array, value, index); } /** @@ -6598,14 +7476,15 @@ * // => [1, 2] */ function initial(array) { - return dropRight(array, 1); + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; } /** * Creates an array of unique values that are included in all given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. The order of result values is determined by the - * order they occur in the first array. + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. * * @static * @memberOf _ @@ -6615,10 +7494,10 @@ * @returns {Array} Returns the new array of intersecting values. * @example * - * _.intersection([2, 1], [4, 2], [1, 2]); + * _.intersection([2, 1], [2, 3]); * // => [2] */ - var intersection = rest(function(arrays) { + var intersection = baseRest(function(arrays) { var mapped = arrayMap(arrays, castArrayLikeObject); return (mapped.length && mapped[0] === arrays[0]) ? baseIntersection(mapped) @@ -6628,27 +7507,27 @@ /** * This method is like `_.intersection` except that it accepts `iteratee` * which is invoked for each element of each `arrays` to generate the criterion - * by which they're compared. Result values are chosen from the first array. - * The iteratee is invoked with one argument: (value). + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of intersecting values. * @example * - * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor); + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); * // => [2.1] * * // The `_.property` iteratee shorthand. * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }] */ - var intersectionBy = rest(function(arrays) { + var intersectionBy = baseRest(function(arrays) { var iteratee = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); @@ -6658,15 +7537,15 @@ mapped.pop(); } return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, getIteratee(iteratee)) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) : []; }); /** * This method is like `_.intersection` except that it accepts `comparator` - * which is invoked to compare elements of `arrays`. Result values are chosen - * from the first array. The comparator is invoked with two arguments: - * (arrVal, othVal). + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). * * @static * @memberOf _ @@ -6683,13 +7562,12 @@ * _.intersectionWith(objects, others, _.isEqual); * // => [{ 'x': 1, 'y': 2 }] */ - var intersectionWith = rest(function(arrays) { + var intersectionWith = baseRest(function(arrays) { var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); - if (comparator === last(mapped)) { - comparator = undefined; - } else { + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { mapped.pop(); } return (mapped.length && mapped[0] === arrays[0]) @@ -6713,7 +7591,7 @@ * // => 'a~b~c' */ function join(array, separator) { - return array ? nativeJoin.call(array, separator) : ''; + return array == null ? '' : nativeJoin.call(array, separator); } /** @@ -6731,7 +7609,7 @@ * // => 3 */ function last(array) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; return length ? array[length - 1] : undefined; } @@ -6743,7 +7621,7 @@ * @memberOf _ * @since 0.1.0 * @category Array - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=array.length-1] The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. @@ -6757,33 +7635,23 @@ * // => 1 */ function lastIndexOf(array, value, fromIndex) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = length; if (fromIndex !== undefined) { index = toInteger(fromIndex); - index = ( - index < 0 - ? nativeMax(length + index, 0) - : nativeMin(index, length - 1) - ) + 1; - } - if (value !== value) { - return indexOfNaN(array, index, true); - } - while (index--) { - if (array[index] === value) { - return index; - } + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); } - return -1; + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); } /** - * Gets the nth element of `array`. If `n` is negative, the nth element - * from the end is returned. + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. * * @static * @memberOf _ @@ -6808,7 +7676,7 @@ /** * Removes all given values from `array` using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` @@ -6823,13 +7691,13 @@ * @returns {Array} Returns `array`. * @example * - * var array = [1, 2, 3, 1, 2, 3]; + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; * - * _.pull(array, 2, 3); + * _.pull(array, 'a', 'c'); * console.log(array); - * // => [1, 1] + * // => ['b', 'b'] */ - var pull = rest(pullAll); + var pull = baseRest(pullAll); /** * This method is like `_.pull` except that it accepts an array of values to remove. @@ -6845,11 +7713,11 @@ * @returns {Array} Returns `array`. * @example * - * var array = [1, 2, 3, 1, 2, 3]; + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; * - * _.pullAll(array, [2, 3]); + * _.pullAll(array, ['a', 'c']); * console.log(array); - * // => [1, 1] + * // => ['b', 'b'] */ function pullAll(array, values) { return (array && array.length && values && values.length) @@ -6870,8 +7738,7 @@ * @category Array * @param {Array} array The array to modify. * @param {Array} values The values to remove. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns `array`. * @example * @@ -6883,7 +7750,7 @@ */ function pullAllBy(array, values, iteratee) { return (array && array.length && values && values.length) - ? basePullAll(array, values, getIteratee(iteratee)) + ? basePullAll(array, values, getIteratee(iteratee, 2)) : array; } @@ -6931,19 +7798,17 @@ * @returns {Array} Returns the new array of removed elements. * @example * - * var array = [5, 10, 15, 20]; - * var evens = _.pullAt(array, 1, 3); + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); * * console.log(array); - * // => [5, 15] + * // => ['a', 'c'] * - * console.log(evens); - * // => [10, 20] + * console.log(pulled); + * // => ['b', 'd'] */ - var pullAt = rest(function(array, indexes) { - indexes = baseFlatten(indexes, 1); - - var length = array ? array.length : 0, + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, result = baseAt(array, indexes); basePullAt(array, arrayMap(indexes, function(index) { @@ -6966,8 +7831,7 @@ * @since 2.0.0 * @category Array * @param {Array} array The array to modify. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new array of removed elements. * @example * @@ -7027,7 +7891,7 @@ * // => [3, 2, 1] */ function reverse(array) { - return array ? nativeReverse.call(array) : array; + return array == null ? array : nativeReverse.call(array); } /** @@ -7047,7 +7911,7 @@ * @returns {Array} Returns the slice of `array`. */ function slice(array, start, end) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } @@ -7078,9 +7942,6 @@ * * _.sortedIndex([30, 50], 40); * // => 1 - * - * _.sortedIndex([4, 5], 4); - * // => 0 */ function sortedIndex(array, value) { return baseSortedIndex(array, value); @@ -7097,23 +7958,22 @@ * @category Array * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the index at which `value` should be inserted * into `array`. * @example * - * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 }; + * var objects = [{ 'x': 4 }, { 'x': 5 }]; * - * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict)); - * // => 1 + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 * * // The `_.property` iteratee shorthand. - * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); * // => 0 */ function sortedIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, getIteratee(iteratee)); + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); } /** @@ -7124,16 +7984,16 @@ * @memberOf _ * @since 4.0.0 * @category Array - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @returns {number} Returns the index of the matched value, else `-1`. * @example * - * _.sortedIndexOf([1, 1, 2, 2], 2); - * // => 2 + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 */ function sortedIndexOf(array, value) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (length) { var index = baseSortedIndex(array, value); if (index < length && eq(array[index], value)) { @@ -7158,8 +8018,8 @@ * into `array`. * @example * - * _.sortedLastIndex([4, 5], 4); - * // => 1 + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 */ function sortedLastIndex(array, value) { return baseSortedIndex(array, value, true); @@ -7176,18 +8036,22 @@ * @category Array * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the index at which `value` should be inserted * into `array`. * @example * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * * // The `_.property` iteratee shorthand. - * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); * // => 1 */ function sortedLastIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, getIteratee(iteratee), true); + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); } /** @@ -7198,16 +8062,16 @@ * @memberOf _ * @since 4.0.0 * @category Array - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @returns {number} Returns the index of the matched value, else `-1`. * @example * - * _.sortedLastIndexOf([1, 1, 2, 2], 2); + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); * // => 3 */ function sortedLastIndexOf(array, value) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (length) { var index = baseSortedIndex(array, value, true) - 1; if (eq(array[index], value)) { @@ -7256,7 +8120,7 @@ */ function sortedUniqBy(array, iteratee) { return (array && array.length) - ? baseSortedUniq(array, getIteratee(iteratee)) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) : []; } @@ -7275,7 +8139,8 @@ * // => [2, 3] */ function tail(array) { - return drop(array, 1); + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; } /** @@ -7337,7 +8202,7 @@ * // => [] */ function takeRight(array, n, guard) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } @@ -7356,8 +8221,7 @@ * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * @@ -7398,8 +8262,7 @@ * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * @@ -7432,7 +8295,7 @@ /** * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @static @@ -7443,17 +8306,18 @@ * @returns {Array} Returns the new array of combined values. * @example * - * _.union([2, 1], [4, 2], [1, 2]); - * // => [2, 1, 4] + * _.union([2], [1, 2]); + * // => [2, 1] */ - var union = rest(function(arrays) { + var union = baseRest(function(arrays) { return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); }); /** * This method is like `_.union` except that it accepts `iteratee` which is * invoked for each element of each `arrays` to generate the criterion by - * which uniqueness is computed. The iteratee is invoked with one argument: + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: * (value). * * @static @@ -7461,29 +8325,29 @@ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of combined values. * @example * - * _.unionBy([2.1, 1.2], [4.3, 2.4], Math.floor); - * // => [2.1, 1.2, 4.3] + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] * * // The `_.property` iteratee shorthand. * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }, { 'x': 2 }] */ - var unionBy = rest(function(arrays) { + var unionBy = baseRest(function(arrays) { var iteratee = last(arrays); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee)); + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); }); /** * This method is like `_.union` except that it accepts `comparator` which - * is invoked to compare elements of `arrays`. The comparator is invoked + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked * with two arguments: (arrVal, othVal). * * @static @@ -7501,19 +8365,18 @@ * _.unionWith(objects, others, _.isEqual); * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ - var unionWith = rest(function(arrays) { + var unionWith = baseRest(function(arrays) { var comparator = last(arrays); - if (isArrayLikeObject(comparator)) { - comparator = undefined; - } + comparator = typeof comparator == 'function' ? comparator : undefined; return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); }); /** * Creates a duplicate-free version of an array, using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons, in which only the first occurrence of each - * element is kept. + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. * * @static * @memberOf _ @@ -7527,23 +8390,22 @@ * // => [2, 1] */ function uniq(array) { - return (array && array.length) - ? baseUniq(array) - : []; + return (array && array.length) ? baseUniq(array) : []; } /** * This method is like `_.uniq` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the criterion by which - * uniqueness is computed. The iteratee is invoked with one argument: (value). + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new duplicate free array. * @example * @@ -7555,15 +8417,14 @@ * // => [{ 'x': 1 }, { 'x': 2 }] */ function uniqBy(array, iteratee) { - return (array && array.length) - ? baseUniq(array, getIteratee(iteratee)) - : []; + return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; } /** * This method is like `_.uniq` except that it accepts `comparator` which - * is invoked to compare elements of `array`. The comparator is invoked with - * two arguments: (arrVal, othVal). + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). * * @static * @memberOf _ @@ -7574,15 +8435,14 @@ * @returns {Array} Returns the new duplicate free array. * @example * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; * * _.uniqWith(objects, _.isEqual); * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] */ function uniqWith(array, comparator) { - return (array && array.length) - ? baseUniq(array, undefined, comparator) - : []; + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; } /** @@ -7598,11 +8458,11 @@ * @returns {Array} Returns the new array of regrouped elements. * @example * - * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]); - * // => [['fred', 30, true], ['barney', 40, false]] + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] * * _.unzip(zipped); - * // => [['fred', 'barney'], [30, 40], [true, false]] + * // => [['a', 'b'], [1, 2], [true, false]] */ function unzip(array) { if (!(array && array.length)) { @@ -7656,23 +8516,25 @@ /** * Creates an array excluding all given values using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * + * **Note:** Unlike `_.pull`, this method returns a new array. + * * @static * @memberOf _ * @since 0.1.0 * @category Array - * @param {Array} array The array to filter. + * @param {Array} array The array to inspect. * @param {...*} [values] The values to exclude. * @returns {Array} Returns the new array of filtered values. * @see _.difference, _.xor * @example * - * _.without([1, 2, 1, 3], 1, 2); + * _.without([2, 1, 2, 3], 1, 2); * // => [3] */ - var without = rest(function(array, values) { + var without = baseRest(function(array, values) { return isArrayLikeObject(array) ? baseDifference(array, values) : []; @@ -7689,52 +8551,53 @@ * @since 2.4.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of values. + * @returns {Array} Returns the new array of filtered values. * @see _.difference, _.without * @example * - * _.xor([2, 1], [4, 2]); - * // => [1, 4] + * _.xor([2, 1], [2, 3]); + * // => [1, 3] */ - var xor = rest(function(arrays) { + var xor = baseRest(function(arrays) { return baseXor(arrayFilter(arrays, isArrayLikeObject)); }); /** * This method is like `_.xor` except that it accepts `iteratee` which is * invoked for each element of each `arrays` to generate the criterion by - * which by which they're compared. The iteratee is invoked with one argument: - * (value). + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. - * @returns {Array} Returns the new array of values. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. * @example * - * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor); - * // => [1.2, 4.3] + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] * * // The `_.property` iteratee shorthand. * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 2 }] */ - var xorBy = rest(function(arrays) { + var xorBy = baseRest(function(arrays) { var iteratee = last(arrays); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } - return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee)); + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); }); /** * This method is like `_.xor` except that it accepts `comparator` which is - * invoked to compare elements of `arrays`. The comparator is invoked with - * two arguments: (arrVal, othVal). + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). * * @static * @memberOf _ @@ -7742,7 +8605,7 @@ * @category Array * @param {...Array} [arrays] The arrays to inspect. * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of values. + * @returns {Array} Returns the new array of filtered values. * @example * * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; @@ -7751,11 +8614,9 @@ * _.xorWith(objects, others, _.isEqual); * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ - var xorWith = rest(function(arrays) { + var xorWith = baseRest(function(arrays) { var comparator = last(arrays); - if (isArrayLikeObject(comparator)) { - comparator = undefined; - } + comparator = typeof comparator == 'function' ? comparator : undefined; return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); }); @@ -7772,10 +8633,10 @@ * @returns {Array} Returns the new array of grouped elements. * @example * - * _.zip(['fred', 'barney'], [30, 40], [true, false]); - * // => [['fred', 30, true], ['barney', 40, false]] + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] */ - var zip = rest(unzip); + var zip = baseRest(unzip); /** * This method is like `_.fromPairs` except that it accepts two arrays, @@ -7826,7 +8687,8 @@ * @since 3.8.0 * @category Array * @param {...Array} [arrays] The arrays to process. - * @param {Function} [iteratee=_.identity] The function to combine grouped values. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. * @returns {Array} Returns the new array of grouped elements. * @example * @@ -7835,7 +8697,7 @@ * }); * // => [111, 222] */ - var zipWith = rest(function(arrays) { + var zipWith = baseRest(function(arrays) { var length = arrays.length, iteratee = length > 1 ? arrays[length - 1] : undefined; @@ -7942,7 +8804,7 @@ * @memberOf _ * @since 1.0.0 * @category Seq - * @param {...(string|string[])} [paths] The property paths of elements to pick. + * @param {...(string|string[])} [paths] The property paths to pick. * @returns {Object} Returns the new `lodash` wrapper instance. * @example * @@ -7950,12 +8812,8 @@ * * _(object).at(['a[0].b.c', 'a[1]']).value(); * // => [3, 4] - * - * _(['a', 'b', 'c']).at(0, 2).value(); - * // => ['a', 'c'] */ - var wrapperAt = rest(function(paths) { - paths = baseFlatten(paths, 1); + var wrapperAt = flatRest(function(paths) { var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, @@ -8207,19 +9065,23 @@ * @since 0.5.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee to transform keys. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example * * _.countBy([6.1, 4.2, 6.3], Math.floor); * // => { '4': 1, '6': 2 } * + * // The `_.property` iteratee shorthand. * _.countBy(['one', 'two', 'three'], 'length'); * // => { '3': 2, '5': 1 } */ var countBy = createAggregator(function(result, value, key) { - hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1); + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } }); /** @@ -8227,13 +9089,17 @@ * Iteration is stopped once `predicate` returns falsey. The predicate is * invoked with three arguments: (value, index|key, collection). * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if all elements pass the predicate check, * else `false`. @@ -8272,13 +9138,14 @@ * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * + * **Note:** Unlike `_.remove`, this method returns a new array. + * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.reject * @example @@ -8317,9 +9184,9 @@ * @memberOf _ * @since 0.1.0 * @category Collection - * @param {Array|Object} collection The collection to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * @@ -8344,14 +9211,7 @@ * _.find(users, 'active'); * // => object for 'barney' */ - function find(collection, predicate) { - predicate = getIteratee(predicate, 3); - if (isArray(collection)) { - var index = baseFindIndex(collection, predicate); - return index > -1 ? collection[index] : undefined; - } - return baseFind(collection, predicate, baseEach); - } + var find = createFind(findIndex); /** * This method is like `_.find` except that it iterates over elements of @@ -8361,9 +9221,9 @@ * @memberOf _ * @since 2.0.0 * @category Collection - * @param {Array|Object} collection The collection to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * @@ -8372,14 +9232,7 @@ * }); * // => 3 */ - function findLast(collection, predicate) { - predicate = getIteratee(predicate, 3); - if (isArray(collection)) { - var index = baseFindIndex(collection, predicate, true); - return index > -1 ? collection[index] : undefined; - } - return baseFind(collection, predicate, baseEachRight); - } + var findLast = createFind(findLastIndex); /** * Creates a flattened array of values by running each element in `collection` @@ -8391,8 +9244,7 @@ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new flattened array. * @example * @@ -8416,8 +9268,7 @@ * @since 4.7.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new flattened array. * @example * @@ -8441,8 +9292,7 @@ * @since 4.7.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {number} [depth=1] The maximum recursion depth. * @returns {Array} Returns the new flattened array. * @example @@ -8479,7 +9329,7 @@ * @see _.forEachRight * @example * - * _([1, 2]).forEach(function(value) { + * _.forEach([1, 2], function(value) { * console.log(value); * }); * // => Logs `1` then `2`. @@ -8490,9 +9340,8 @@ * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forEach(collection, iteratee) { - return (typeof iteratee == 'function' && isArray(collection)) - ? arrayEach(collection, iteratee) - : baseEach(collection, getIteratee(iteratee)); + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); } /** @@ -8516,9 +9365,8 @@ * // => Logs `2` then `1`. */ function forEachRight(collection, iteratee) { - return (typeof iteratee == 'function' && isArray(collection)) - ? arrayEachRight(collection, iteratee) - : baseEachRight(collection, getIteratee(iteratee)); + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); } /** @@ -8533,8 +9381,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee to transform keys. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example * @@ -8549,14 +9396,14 @@ if (hasOwnProperty.call(result, key)) { result[key].push(value); } else { - result[key] = [value]; + baseAssignValue(result, key, [value]); } }); /** * Checks if `value` is in `collection`. If `collection` is a string, it's * checked for a substring of `value`, otherwise - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * is used for equality comparisons. If `fromIndex` is negative, it's used as * the offset from the end of `collection`. * @@ -8564,7 +9411,7 @@ * @memberOf _ * @since 0.1.0 * @category Collection - * @param {Array|Object|string} collection The collection to search. + * @param {Array|Object|string} collection The collection to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. @@ -8577,10 +9424,10 @@ * _.includes([1, 2, 3], 1, 2); * // => false * - * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); + * _.includes({ 'a': 1, 'b': 2 }, 1); * // => true * - * _.includes('pebbles', 'eb'); + * _.includes('abcd', 'bc'); * // => true */ function includes(collection, value, fromIndex, guard) { @@ -8599,8 +9446,8 @@ /** * Invokes the method at `path` of each element in `collection`, returning * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `methodName` is a function, it's - * invoked for and `this` bound to, each element in `collection`. + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. * * @static * @memberOf _ @@ -8619,15 +9466,13 @@ * _.invokeMap([123, 456], String.prototype.split, ''); * // => [['1', '2', '3'], ['4', '5', '6']] */ - var invokeMap = rest(function(collection, path, args) { + var invokeMap = baseRest(function(collection, path, args) { var index = -1, isFunc = typeof path == 'function', - isProp = isKey(path), result = isArrayLike(collection) ? Array(collection.length) : []; baseEach(collection, function(value) { - var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined); - result[++index] = func ? apply(func, value, args) : baseInvoke(value, path, args); + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); }); return result; }); @@ -8643,8 +9488,7 @@ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee to transform keys. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example * @@ -8662,7 +9506,7 @@ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } */ var keyBy = createAggregator(function(result, value, key) { - result[key] = value; + baseAssignValue(result, key, value); }); /** @@ -8684,8 +9528,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * @@ -8767,8 +9610,7 @@ * @since 3.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the array of grouped elements. * @example * @@ -8879,8 +9721,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.filter * @example @@ -8907,10 +9748,7 @@ */ function reject(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; - predicate = getIteratee(predicate, 3); - return func(collection, function(value, index, collection) { - return !predicate(value, index, collection); - }); + return func(collection, negate(getIteratee(predicate, 3))); } /** @@ -8928,10 +9766,8 @@ * // => 2 */ function sample(collection) { - var array = isArrayLike(collection) ? collection : values(collection), - length = array.length; - - return length > 0 ? array[baseRandom(0, length - 1)] : undefined; + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); } /** @@ -8955,25 +9791,13 @@ * // => [2, 3, 1] */ function sampleSize(collection, n, guard) { - var index = -1, - result = toArray(collection), - length = result.length, - lastIndex = length - 1; - if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { n = 1; } else { - n = baseClamp(toInteger(n), 0, length); - } - while (++index < n) { - var rand = baseRandom(index, lastIndex), - value = result[rand]; - - result[rand] = result[index]; - result[index] = value; + n = toInteger(n); } - result.length = n; - return result; + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); } /** @@ -8992,7 +9816,8 @@ * // => [4, 1, 3, 2] */ function shuffle(collection) { - return sampleSize(collection, MAX_ARRAY_LENGTH); + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); } /** @@ -9003,7 +9828,7 @@ * @memberOf _ * @since 0.1.0 * @category Collection - * @param {Array|Object} collection The collection to inspect. + * @param {Array|Object|string} collection The collection to inspect. * @returns {number} Returns the collection size. * @example * @@ -9021,16 +9846,13 @@ return 0; } if (isArrayLike(collection)) { - var result = collection.length; - return (result && isString(collection)) ? stringSize(collection) : result; + return isString(collection) ? stringSize(collection) : collection.length; } - if (isObjectLike(collection)) { - var tag = getTag(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; } - return keys(collection).length; + return baseKeys(collection).length; } /** @@ -9043,8 +9865,7 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. @@ -9089,8 +9910,8 @@ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [iteratees=[_.identity]] The iteratees to sort by. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. * @returns {Array} Returns the new sorted array. * @example * @@ -9101,18 +9922,13 @@ * { 'user': 'barney', 'age': 34 } * ]; * - * _.sortBy(users, function(o) { return o.user; }); + * _.sortBy(users, [function(o) { return o.user; }]); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] * * _.sortBy(users, ['user', 'age']); * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] - * - * _.sortBy(users, 'user', function(o) { - * return Math.floor(o.age / 10); - * }); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] */ - var sortBy = rest(function(collection, iteratees) { + var sortBy = baseRest(function(collection, iteratees) { if (collection == null) { return []; } @@ -9122,11 +9938,7 @@ } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { iteratees = [iteratees[0]]; } - iteratees = (iteratees.length == 1 && isArray(iteratees[0])) - ? iteratees[0] - : baseFlatten(iteratees, 1, isFlattenableIteratee); - - return baseOrderBy(collection, iteratees, []); + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); }); /*------------------------------------------------------------------------*/ @@ -9138,7 +9950,6 @@ * @static * @memberOf _ * @since 2.4.0 - * @type {Function} * @category Date * @returns {number} Returns the timestamp. * @example @@ -9146,9 +9957,11 @@ * _.defer(function(stamp) { * console.log(_.now() - stamp); * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred function to be invoked. + * // => Logs the number of milliseconds it took for the deferred invocation. */ - var now = Date.now; + var now = ctxNow || function() { + return root.Date.now(); + }; /*------------------------------------------------------------------------*/ @@ -9199,7 +10012,7 @@ * @param {Function} func The function to cap arguments for. * @param {number} [n=func.length] The arity cap. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. * @example * * _.map(['6', '8', '10'], _.ary(parseInt, 1)); @@ -9208,7 +10021,7 @@ function ary(func, n, guard) { n = guard ? undefined : n; n = (func && n == null) ? func.length : n; - return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n); + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); } /** @@ -9226,7 +10039,7 @@ * @example * * jQuery(element).on('click', _.before(5, addContactToList)); - * // => allows adding up to 4 contacts to the list + * // => Allows adding up to 4 contacts to the list. */ function before(n, func) { var result; @@ -9252,7 +10065,7 @@ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for partially applied arguments. * - * **Note:** Unlike native `Function#bind` this method doesn't set the "length" + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" * property of bound functions. * * @static @@ -9265,9 +10078,9 @@ * @returns {Function} Returns the new bound function. * @example * - * var greet = function(greeting, punctuation) { + * function greet(greeting, punctuation) { * return greeting + ' ' + this.user + punctuation; - * }; + * } * * var object = { 'user': 'fred' }; * @@ -9280,13 +10093,13 @@ * bound('hi'); * // => 'hi fred!' */ - var bind = rest(function(func, thisArg, partials) { - var bitmask = BIND_FLAG; + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; if (partials.length) { - var holders = replaceHolders(partials, getPlaceholder(bind)); - bitmask |= PARTIAL_FLAG; + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; } - return createWrapper(func, bitmask, thisArg, partials, holders); + return createWrap(func, bitmask, thisArg, partials, holders); }); /** @@ -9334,13 +10147,13 @@ * bound('hi'); * // => 'hiya fred!' */ - var bindKey = rest(function(object, key, partials) { - var bitmask = BIND_FLAG | BIND_KEY_FLAG; + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; if (partials.length) { - var holders = replaceHolders(partials, getPlaceholder(bindKey)); - bitmask |= PARTIAL_FLAG; + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; } - return createWrapper(key, bitmask, object, partials, holders); + return createWrap(key, bitmask, object, partials, holders); }); /** @@ -9386,7 +10199,7 @@ */ function curry(func, arity, guard) { arity = guard ? undefined : arity; - var result = createWrapper(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); result.placeholder = curry.placeholder; return result; } @@ -9431,7 +10244,7 @@ */ function curryRight(func, arity, guard) { arity = guard ? undefined : arity; - var result = createWrapper(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); result.placeholder = curryRight.placeholder; return result; } @@ -9441,14 +10254,18 @@ * milliseconds have elapsed since the last time the debounced function was * invoked. The debounced function comes with a `cancel` method to cancel * delayed `func` invocations and a `flush` method to immediately invoke them. - * Provide an options object to indicate whether `func` should be invoked on - * the leading and/or trailing edge of the `wait` timeout. The `func` is invoked - * with the last arguments provided to the debounced function. Subsequent calls - * to the debounced function return the result of the last `func` invocation. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. * - * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the debounced function is - * invoked more than once during the `wait` timeout. + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.debounce` and `_.throttle`. @@ -9492,7 +10309,7 @@ maxWait, result, timerId, - lastCallTime = 0, + lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, @@ -9543,7 +10360,7 @@ // Either this is the first call, activity has stopped and we're at the // trailing edge, the system time has gone backwards and we're treating // it as the trailing edge, or we've hit the `maxWait` limit. - return (!lastCallTime || (timeSinceLastCall >= wait) || + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); } @@ -9557,7 +10374,6 @@ } function trailingEdge(time) { - clearTimeout(timerId); timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has been @@ -9573,8 +10389,8 @@ if (timerId !== undefined) { clearTimeout(timerId); } - lastCallTime = lastInvokeTime = 0; - lastArgs = lastThis = timerId = undefined; + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; } function flush() { @@ -9595,7 +10411,6 @@ } if (maxing) { // Handle invocations in a tight loop. - clearTimeout(timerId); timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } @@ -9626,9 +10441,9 @@ * _.defer(function(text) { * console.log(text); * }, 'deferred'); - * // => Logs 'deferred' after one or more milliseconds. + * // => Logs 'deferred' after one millisecond. */ - var defer = rest(function(func, args) { + var defer = baseRest(function(func, args) { return baseDelay(func, 1, args); }); @@ -9651,7 +10466,7 @@ * }, 1000, 'later'); * // => Logs 'later' after one second. */ - var delay = rest(function(func, wait, args) { + var delay = baseRest(function(func, wait, args) { return baseDelay(func, toNumber(wait) || 0, args); }); @@ -9663,7 +10478,7 @@ * @since 4.0.0 * @category Function * @param {Function} func The function to flip arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new flipped function. * @example * * var flipped = _.flip(function() { @@ -9674,7 +10489,7 @@ * // => ['d', 'c', 'b', 'a'] */ function flip(func) { - return createWrapper(func, FLIP_FLAG); + return createWrap(func, WRAP_FLIP_FLAG); } /** @@ -9687,8 +10502,8 @@ * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object) - * method interface of `delete`, `get`, `has`, and `set`. + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ @@ -9696,7 +10511,7 @@ * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoizing function. + * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; @@ -9722,7 +10537,7 @@ * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { - if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { @@ -9734,14 +10549,14 @@ return cache.get(key); } var result = func.apply(this, args); - memoized.cache = cache.set(key, result); + memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } - // Assign cache to `_.memoize`. + // Expose `MapCache`. memoize.Cache = MapCache; /** @@ -9754,7 +10569,7 @@ * @since 3.0.0 * @category Function * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new negated function. * @example * * function isEven(n) { @@ -9769,7 +10584,14 @@ throw new TypeError(FUNC_ERROR_TEXT); } return function() { - return !predicate.apply(this, arguments); + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); }; } @@ -9789,23 +10611,22 @@ * var initialize = _.once(createApplication); * initialize(); * initialize(); - * // `initialize` invokes `createApplication` once + * // => `createApplication` is invoked once */ function once(func) { return before(2, func); } /** - * Creates a function that invokes `func` with arguments transformed by - * corresponding `transforms`. + * Creates a function that invokes `func` with its arguments transformed. * * @static * @since 4.0.0 * @memberOf _ * @category Function * @param {Function} func The function to wrap. - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [transforms[_.identity]] The functions to transform. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. * @returns {Function} Returns the new function. * @example * @@ -9819,7 +10640,7 @@ * * var func = _.overArgs(function(x, y) { * return [x, y]; - * }, square, doubled); + * }, [square, doubled]); * * func(9, 3); * // => [81, 6] @@ -9827,13 +10648,13 @@ * func(10, 5); * // => [100, 10] */ - var overArgs = rest(function(func, transforms) { + var overArgs = castRest(function(func, transforms) { transforms = (transforms.length == 1 && isArray(transforms[0])) ? arrayMap(transforms[0], baseUnary(getIteratee())) - : arrayMap(baseFlatten(transforms, 1, isFlattenableIteratee), baseUnary(getIteratee())); + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); var funcsLength = transforms.length; - return rest(function(args) { + return baseRest(function(args) { var index = -1, length = nativeMin(args.length, funcsLength); @@ -9864,9 +10685,9 @@ * @returns {Function} Returns the new partially applied function. * @example * - * var greet = function(greeting, name) { + * function greet(greeting, name) { * return greeting + ' ' + name; - * }; + * } * * var sayHelloTo = _.partial(greet, 'hello'); * sayHelloTo('fred'); @@ -9877,9 +10698,9 @@ * greetFred('hi'); * // => 'hi fred' */ - var partial = rest(function(func, partials) { - var holders = replaceHolders(partials, getPlaceholder(partial)); - return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders); + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); }); /** @@ -9901,9 +10722,9 @@ * @returns {Function} Returns the new partially applied function. * @example * - * var greet = function(greeting, name) { + * function greet(greeting, name) { * return greeting + ' ' + name; - * }; + * } * * var greetFred = _.partialRight(greet, 'fred'); * greetFred('hi'); @@ -9914,9 +10735,9 @@ * sayHelloTo('fred'); * // => 'hello fred' */ - var partialRight = rest(function(func, partials) { - var holders = replaceHolders(partials, getPlaceholder(partialRight)); - return createWrapper(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders); + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); }); /** @@ -9936,13 +10757,13 @@ * * var rearged = _.rearg(function(a, b, c) { * return [a, b, c]; - * }, 2, 0, 1); + * }, [2, 0, 1]); * * rearged('b', 'c', 'a') * // => ['a', 'b', 'c'] */ - var rearg = rest(function(func, indexes) { - return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes, 1)); + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); }); /** @@ -9974,35 +10795,14 @@ if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } - start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - switch (start) { - case 0: return func.call(this, array); - case 1: return func.call(this, args[0], array); - case 2: return func.call(this, args[0], args[1], array); - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = array; - return apply(func, this, otherArgs); - }; + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); } /** * Creates a function that invokes `func` with the `this` binding of the * create function and an array of arguments much like - * [`Function#apply`](http://www.ecma-international.org/ecma-262/6.0/#sec-function.prototype.apply). + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). * * **Note:** This method is based on the * [spread operator](https://mdn.io/spread_operator). @@ -10038,7 +10838,7 @@ throw new TypeError(FUNC_ERROR_TEXT); } start = start === undefined ? 0 : nativeMax(toInteger(start), 0); - return rest(function(args) { + return baseRest(function(args) { var array = args[start], otherArgs = castSlice(args, 0, start); @@ -10053,8 +10853,8 @@ * Creates a throttled function that only invokes `func` at most once per * every `wait` milliseconds. The throttled function comes with a `cancel` * method to cancel delayed `func` invocations and a `flush` method to - * immediately invoke them. Provide an options object to indicate whether - * `func` should be invoked on the leading and/or trailing edge of the `wait` + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` * timeout. The `func` is invoked with the last arguments provided to the * throttled function. Subsequent calls to the throttled function return the * result of the last `func` invocation. @@ -10063,6 +10863,9 @@ * invoked on the trailing edge of the timeout only if the throttled function * is invoked more than once during the `wait` timeout. * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.throttle` and `_.debounce`. * @@ -10117,7 +10920,7 @@ * @since 4.0.0 * @category Function * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. * @example * * _.map(['6', '8', '10'], _.unary(parseInt)); @@ -10128,10 +10931,10 @@ } /** - * Creates a function that provides `value` to the wrapper function as its - * first argument. Any additional arguments provided to the function are - * appended to those provided to the wrapper function. The wrapper is invoked - * with the `this` binding of the created function. + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. * * @static * @memberOf _ @@ -10150,8 +10953,7 @@ * // => '

fred, barney, & pebbles

' */ function wrap(value, wrapper) { - wrapper = wrapper == null ? identity : wrapper; - return partial(wrapper, value); + return partial(castFunction(wrapper), value); } /*------------------------------------------------------------------------*/ @@ -10224,7 +11026,7 @@ * // => true */ function clone(value) { - return baseClone(value, false, true); + return baseClone(value, CLONE_SYMBOLS_FLAG); } /** @@ -10259,7 +11061,8 @@ * // => 0 */ function cloneWith(value, customizer) { - return baseClone(value, false, true, customizer); + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); } /** @@ -10281,7 +11084,7 @@ * // => false */ function cloneDeep(value) { - return baseClone(value, true, true); + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); } /** @@ -10313,12 +11116,41 @@ * // => 20 */ function cloneDeepWith(value, customizer) { - return baseClone(value, true, true, customizer); + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); } /** * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static @@ -10330,8 +11162,8 @@ * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.eq(object, object); * // => true @@ -10412,7 +11244,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, + * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * @@ -10422,11 +11254,10 @@ * _.isArguments([1, 2, 3]); * // => false */ - function isArguments(value) { - // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); - } + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; /** * Checks if `value` is classified as an `Array` object. @@ -10434,11 +11265,9 @@ * @static * @memberOf _ * @since 0.1.0 - * @type {Function} * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); @@ -10463,8 +11292,7 @@ * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. * @example * * _.isArrayBuffer(new ArrayBuffer(2)); @@ -10473,9 +11301,7 @@ * _.isArrayBuffer(new Array(2)); * // => false */ - function isArrayBuffer(value) { - return isObjectLike(value) && objectToString.call(value) == arrayBufferTag; - } + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; /** * Checks if `value` is array-like. A value is considered array-like if it's @@ -10503,7 +11329,7 @@ * // => false */ function isArrayLike(value) { - return value != null && isLength(getLength(value)) && !isFunction(value); + return value != null && isLength(value.length) && !isFunction(value); } /** @@ -10543,8 +11369,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. * @example * * _.isBoolean(false); @@ -10555,7 +11380,7 @@ */ function isBoolean(value) { return value === true || value === false || - (isObjectLike(value) && objectToString.call(value) == boolTag); + (isObjectLike(value) && baseGetTag(value) == boolTag); } /** @@ -10575,9 +11400,7 @@ * _.isBuffer(new Uint8Array(2)); * // => false */ - var isBuffer = !Buffer ? constant(false) : function(value) { - return value instanceof Buffer; - }; + var isBuffer = nativeIsBuffer || stubFalse; /** * Checks if `value` is classified as a `Date` object. @@ -10587,8 +11410,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. * @example * * _.isDate(new Date); @@ -10597,9 +11419,7 @@ * _.isDate('Mon April 23 2012'); * // => false */ - function isDate(value) { - return isObjectLike(value) && objectToString.call(value) == dateTag; - } + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; /** * Checks if `value` is likely a DOM element. @@ -10609,8 +11429,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a DOM element, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. * @example * * _.isElement(document.body); @@ -10620,7 +11439,7 @@ * // => false */ function isElement(value) { - return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value); + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); } /** @@ -10657,23 +11476,27 @@ * // => false */ function isEmpty(value) { + if (value == null) { + return true; + } if (isArrayLike(value) && - (isArray(value) || isString(value) || isFunction(value.splice) || - isArguments(value) || isBuffer(value))) { + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { return !value.length; } - if (isObjectLike(value)) { - var tag = getTag(value); - if (tag == mapTag || tag == setTag) { - return !value.size; - } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; } for (var key in value) { if (hasOwnProperty.call(value, key)) { return false; } } - return !(nonEnumShadows && keys(value).length); + return true; } /** @@ -10692,12 +11515,11 @@ * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, - * else `false`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * * _.isEqual(object, other); * // => true @@ -10722,8 +11544,7 @@ * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if the values are equivalent, - * else `false`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * function isGreeting(value) { @@ -10745,7 +11566,7 @@ function isEqualWith(value, other, customizer) { customizer = typeof customizer == 'function' ? customizer : undefined; var result = customizer ? customizer(value, other) : undefined; - return result === undefined ? baseIsEqual(value, other, customizer) : !!result; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; } /** @@ -10757,8 +11578,7 @@ * @since 3.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an error object, - * else `false`. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. * @example * * _.isError(new Error); @@ -10771,8 +11591,9 @@ if (!isObjectLike(value)) { return false; } - return (objectToString.call(value) == errorTag) || - (typeof value.message == 'string' && typeof value.name == 'string'); + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); } /** @@ -10786,21 +11607,20 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. * @example * * _.isFinite(3); * // => true * - * _.isFinite(Number.MAX_VALUE); - * // => true - * - * _.isFinite(3.14); + * _.isFinite(Number.MIN_VALUE); * // => true * * _.isFinite(Infinity); * // => false + * + * _.isFinite('3'); + * // => false */ function isFinite(value) { return typeof value == 'number' && nativeIsFinite(value); @@ -10814,8 +11634,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); @@ -10825,11 +11644,13 @@ * // => false */ function isFunction(value) { + if (!isObject(value)) { + return false; + } // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } /** @@ -10865,16 +11686,15 @@ /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); @@ -10896,7 +11716,7 @@ /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -10921,7 +11741,7 @@ */ function isObject(value) { var type = typeof value; - return !!value && (type == 'object' || type == 'function'); + return value != null && (type == 'object' || type == 'function'); } /** @@ -10949,7 +11769,7 @@ * // => false */ function isObjectLike(value) { - return !!value && typeof value == 'object'; + return value != null && typeof value == 'object'; } /** @@ -10960,8 +11780,7 @@ * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. * @example * * _.isMap(new Map); @@ -10970,16 +11789,18 @@ * _.isMap(new WeakMap); * // => false */ - function isMap(value) { - return isObjectLike(value) && getTag(value) == mapTag; - } + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; /** * Performs a partial deep comparison between `object` and `source` to - * determine if `object` contains equivalent property values. This method is - * equivalent to a `_.matches` function when `source` is partially applied. + * determine if `object` contains equivalent property values. * - * **Note:** This method supports comparing the same values as `_.isEqual`. + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. * * @static * @memberOf _ @@ -10990,12 +11811,12 @@ * @returns {boolean} Returns `true` if `object` is a match, else `false`. * @example * - * var object = { 'user': 'fred', 'age': 40 }; + * var object = { 'a': 1, 'b': 2 }; * - * _.isMatch(object, { 'age': 40 }); + * _.isMatch(object, { 'b': 2 }); * // => true * - * _.isMatch(object, { 'age': 36 }); + * _.isMatch(object, { 'b': 1 }); * // => false */ function isMatch(object, source) { @@ -11075,7 +11896,15 @@ } /** - * Checks if `value` is a native function. + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. * * @static * @memberOf _ @@ -11093,11 +11922,10 @@ * // => false */ function isNative(value) { - if (!isObject(value)) { - return false; + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); + return baseIsNative(value); } /** @@ -11156,8 +11984,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. * @example * * _.isNumber(3); @@ -11174,7 +12001,7 @@ */ function isNumber(value) { return typeof value == 'number' || - (isObjectLike(value) && objectToString.call(value) == numberTag); + (isObjectLike(value) && baseGetTag(value) == numberTag); } /** @@ -11186,8 +12013,7 @@ * @since 0.8.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Foo() { @@ -11207,8 +12033,7 @@ * // => true */ function isPlainObject(value) { - if (!isObjectLike(value) || - objectToString.call(value) != objectTag || isHostObject(value)) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } var proto = getPrototype(value); @@ -11216,8 +12041,8 @@ return true; } var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return (typeof Ctor == 'function' && - Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; } /** @@ -11228,8 +12053,7 @@ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. * @example * * _.isRegExp(/abc/); @@ -11238,9 +12062,7 @@ * _.isRegExp('/abc/'); * // => false */ - function isRegExp(value) { - return isObject(value) && objectToString.call(value) == regexpTag; - } + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; /** * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 @@ -11254,8 +12076,7 @@ * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a safe integer, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. * @example * * _.isSafeInteger(3); @@ -11282,8 +12103,7 @@ * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. * @example * * _.isSet(new Set); @@ -11292,9 +12112,7 @@ * _.isSet(new WeakSet); * // => false */ - function isSet(value) { - return isObjectLike(value) && getTag(value) == setTag; - } + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; /** * Checks if `value` is classified as a `String` primitive or object. @@ -11304,8 +12122,7 @@ * @memberOf _ * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. * @example * * _.isString('abc'); @@ -11316,7 +12133,7 @@ */ function isString(value) { return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); } /** @@ -11327,8 +12144,7 @@ * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); @@ -11339,7 +12155,7 @@ */ function isSymbol(value) { return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); + (isObjectLike(value) && baseGetTag(value) == symbolTag); } /** @@ -11350,8 +12166,7 @@ * @since 3.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); @@ -11360,10 +12175,7 @@ * _.isTypedArray([]); * // => false */ - function isTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; - } + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; /** * Checks if `value` is `undefined`. @@ -11394,8 +12206,7 @@ * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. * @example * * _.isWeakMap(new WeakMap); @@ -11416,8 +12227,7 @@ * @since 4.3.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. * @example * * _.isWeakSet(new WeakSet); @@ -11427,7 +12237,7 @@ * // => false */ function isWeakSet(value) { - return isObjectLike(value) && objectToString.call(value) == weakSetTag; + return isObjectLike(value) && baseGetTag(value) == weakSetTag; } /** @@ -11499,33 +12309,68 @@ * _.toArray('abc'); * // => ['a', 'b', 'c'] * - * _.toArray(1); - * // => [] + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); + + return func(value); + } + + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 * - * _.toArray(null); - * // => [] + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 */ - function toArray(value) { + function toFinite(value) { if (!value) { - return []; - } - if (isArrayLike(value)) { - return isString(value) ? stringToArray(value) : copyArray(value); + return value === 0 ? value : 0; } - if (iteratorSymbol && value[iteratorSymbol]) { - return iteratorToArray(value[iteratorSymbol]()); + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; } - var tag = getTag(value), - func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); - - return func(value); + return value === value ? value : 0; } /** * Converts `value` to an integer. * - * **Note:** This function is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ @@ -11535,7 +12380,7 @@ * @returns {number} Returns the converted integer. * @example * - * _.toInteger(3); + * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); @@ -11544,20 +12389,14 @@ * _.toInteger(Infinity); * // => 1.7976931348623157e+308 * - * _.toInteger('3'); + * _.toInteger('3.2'); * // => 3 */ function toInteger(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; } /** @@ -11565,7 +12404,7 @@ * array-like object. * * **Note:** This method is based on - * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ @@ -11575,7 +12414,7 @@ * @returns {number} Returns the converted integer. * @example * - * _.toLength(3); + * _.toLength(3.2); * // => 3 * * _.toLength(Number.MIN_VALUE); @@ -11584,7 +12423,7 @@ * _.toLength(Infinity); * // => 4294967295 * - * _.toLength('3'); + * _.toLength('3.2'); * // => 3 */ function toLength(value) { @@ -11602,8 +12441,8 @@ * @returns {number} Returns the number. * @example * - * _.toNumber(3); - * // => 3 + * _.toNumber(3.2); + * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 @@ -11611,8 +12450,8 @@ * _.toNumber(Infinity); * // => Infinity * - * _.toNumber('3'); - * // => 3 + * _.toNumber('3.2'); + * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { @@ -11622,7 +12461,7 @@ return NAN; } if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { @@ -11675,7 +12514,7 @@ * @returns {number} Returns the converted integer. * @example * - * _.toSafeInteger(3); + * _.toSafeInteger(3.2); * // => 3 * * _.toSafeInteger(Number.MIN_VALUE); @@ -11684,7 +12523,7 @@ * _.toSafeInteger(Infinity); * // => 9007199254740991 * - * _.toSafeInteger('3'); + * _.toSafeInteger('3.2'); * // => 3 */ function toSafeInteger(value) { @@ -11699,8 +12538,8 @@ * @memberOf _ * @since 4.0.0 * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. * @example * * _.toString(null); @@ -11737,21 +12576,21 @@ * @example * * function Foo() { - * this.c = 3; + * this.a = 1; * } * * function Bar() { - * this.e = 5; + * this.c = 3; * } * - * Foo.prototype.d = 4; - * Bar.prototype.f = 6; + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; * - * _.assign({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3, 'e': 5 } + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } */ var assign = createAssigner(function(object, source) { - if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { + if (isPrototype(source) || isArrayLike(source)) { copyObject(source, keys(source), object); return; } @@ -11780,27 +12619,21 @@ * @example * * function Foo() { - * this.b = 2; + * this.a = 1; * } * * function Bar() { - * this.d = 4; + * this.c = 3; * } * - * Foo.prototype.c = 3; - * Bar.prototype.e = 5; + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; * - * _.assignIn({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 } + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } */ var assignIn = createAssigner(function(object, source) { - if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { - copyObject(source, keysIn(source), object); - return; - } - for (var key in source) { - assignValue(object, key, source[key]); - } + copyObject(source, keysIn(source), object); }); /** @@ -11876,21 +12709,16 @@ * @since 1.0.0 * @category Object * @param {Object} object The object to iterate over. - * @param {...(string|string[])} [paths] The property paths of elements to pick. - * @returns {Array} Returns the new array of picked elements. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; * * _.at(object, ['a[0].b.c', 'a[1]']); * // => [3, 4] - * - * _.at(['a', 'b', 'c'], 0, 2); - * // => ['a', 'c'] */ - var at = rest(function(object, paths) { - return baseAt(object, baseFlatten(paths, 1)); - }); + var at = flatRest(baseAt); /** * Creates an object that inherits from the `prototype` object. If a @@ -11928,7 +12756,7 @@ */ function create(prototype, properties) { var result = baseCreate(prototype); - return properties ? baseAssign(result, properties) : result; + return properties == null ? result : baseAssign(result, properties); } /** @@ -11949,10 +12777,10 @@ * @see _.defaultsDeep * @example * - * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } */ - var defaults = rest(function(args) { + var defaults = baseRest(function(args) { args.push(undefined, assignInDefaults); return apply(assignInWith, undefined, args); }); @@ -11973,11 +12801,10 @@ * @see _.defaults * @example * - * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } }); - * // => { 'user': { 'name': 'barney', 'age': 36 } } - * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } */ - var defaultsDeep = rest(function(args) { + var defaultsDeep = baseRest(function(args) { args.push(undefined, mergeDefaults); return apply(mergeWith, undefined, args); }); @@ -11990,9 +12817,8 @@ * @memberOf _ * @since 1.1.0 * @category Object - * @param {Object} object The object to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {string|undefined} Returns the key of the matched element, * else `undefined`. * @example @@ -12019,7 +12845,7 @@ * // => 'barney' */ function findKey(object, predicate) { - return baseFind(object, getIteratee(predicate, 3), baseForOwn, true); + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); } /** @@ -12030,9 +12856,8 @@ * @memberOf _ * @since 2.0.0 * @category Object - * @param {Object} object The object to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {string|undefined} Returns the key of the matched element, * else `undefined`. * @example @@ -12059,7 +12884,7 @@ * // => 'pebbles' */ function findLastKey(object, predicate) { - return baseFind(object, getIteratee(predicate, 3), baseForOwnRight, true); + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); } /** @@ -12093,7 +12918,7 @@ function forIn(object, iteratee) { return object == null ? object - : baseFor(object, getIteratee(iteratee), keysIn); + : baseFor(object, getIteratee(iteratee, 3), keysIn); } /** @@ -12125,7 +12950,7 @@ function forInRight(object, iteratee) { return object == null ? object - : baseForRight(object, getIteratee(iteratee), keysIn); + : baseForRight(object, getIteratee(iteratee, 3), keysIn); } /** @@ -12157,7 +12982,7 @@ * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forOwn(object, iteratee) { - return object && baseForOwn(object, getIteratee(iteratee)); + return object && baseForOwn(object, getIteratee(iteratee, 3)); } /** @@ -12187,7 +13012,7 @@ * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. */ function forOwnRight(object, iteratee) { - return object && baseForOwnRight(object, getIteratee(iteratee)); + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); } /** @@ -12199,7 +13024,7 @@ * @memberOf _ * @category Object * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. + * @returns {Array} Returns the function names. * @see _.functionsIn * @example * @@ -12226,7 +13051,7 @@ * @since 4.0.0 * @category Object * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. + * @returns {Array} Returns the function names. * @see _.functions * @example * @@ -12246,7 +13071,7 @@ /** * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is used in its place. + * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ @@ -12369,8 +13194,7 @@ * @since 4.1.0 * @category Object * @param {Object} object The object to invert. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Object} Returns the new inverted object. * @example * @@ -12410,13 +13234,13 @@ * _.invoke(object, 'a[0].b.c.slice', 1, 3); * // => [2, 3] */ - var invoke = rest(baseInvoke); + var invoke = baseRest(baseInvoke); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static @@ -12441,23 +13265,7 @@ * // => ['0', '1'] */ function keys(object) { - var isProto = isPrototype(object); - if (!(isProto || isArrayLike(object))) { - return baseKeys(object); - } - var indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; - - for (var key in object) { - if (baseHas(object, key) && - !(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(isProto && key == 'constructor')) { - result.push(key); - } - } - return result; + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } /** @@ -12484,23 +13292,7 @@ * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ function keysIn(object) { - var index = -1, - isProto = isPrototype(object), - props = baseKeysIn(object), - propsLength = props.length, - indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; - - while (++index < propsLength) { - var key = props[index]; - if (!(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } /** @@ -12514,8 +13306,7 @@ * @since 3.8.0 * @category Object * @param {Object} object The object to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapValues * @example @@ -12530,7 +13321,7 @@ iteratee = getIteratee(iteratee, 3); baseForOwn(object, function(value, key, object) { - result[iteratee(value, key, object)] = value; + baseAssignValue(result, iteratee(value, key, object), value); }); return result; } @@ -12546,8 +13337,7 @@ * @since 2.4.0 * @category Object * @param {Object} object The object to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapKeys * @example @@ -12569,7 +13359,7 @@ iteratee = getIteratee(iteratee, 3); baseForOwn(object, function(value, key, object) { - result[key] = iteratee(value, key, object); + baseAssignValue(result, key, iteratee(value, key, object)); }); return result; } @@ -12579,7 +13369,7 @@ * inherited enumerable string keyed properties of source objects into the * destination object. Source properties that resolve to `undefined` are * skipped if a destination value exists. Array and plain object properties - * are merged recursively.Other objects and value types are overridden by + * are merged recursively. Other objects and value types are overridden by * assignment. Source objects are applied from left to right. Subsequent * sources overwrite property assignments of previous sources. * @@ -12594,16 +13384,16 @@ * @returns {Object} Returns `object`. * @example * - * var users = { - * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] * }; * - * var ages = { - * 'data': [{ 'age': 36 }, { 'age': 40 }] + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] * }; * - * _.merge(users, ages); - * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ var merge = createAssigner(function(object, source, srcIndex) { baseMerge(object, source, srcIndex); @@ -12613,7 +13403,7 @@ * This method is like `_.merge` except that it accepts `customizer` which * is invoked to produce the merged values of the destination and source * properties. If `customizer` returns `undefined`, merging is handled by the - * method instead. The `customizer` is invoked with seven arguments: + * method instead. The `customizer` is invoked with six arguments: * (objValue, srcValue, key, object, source, stack). * * **Note:** This method mutates `object`. @@ -12634,18 +13424,11 @@ * } * } * - * var object = { - * 'fruits': ['apple'], - * 'vegetables': ['beet'] - * }; - * - * var other = { - * 'fruits': ['banana'], - * 'vegetables': ['carrot'] - * }; + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; * * _.mergeWith(object, other, customizer); - * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } + * // => { 'a': [1, 3], 'b': [2, 4] } */ var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { baseMerge(object, source, srcIndex, customizer); @@ -12653,15 +13436,16 @@ /** * The opposite of `_.pick`; this method creates an object composed of the - * own and inherited enumerable string keyed properties of `object` that are - * not omitted. + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The source object. - * @param {...(string|string[])} [props] The property identifiers to omit. + * @param {...(string|string[])} [paths] The property paths to omit. * @returns {Object} Returns the new object. * @example * @@ -12670,12 +13454,26 @@ * _.omit(object, ['a', 'c']); * // => { 'b': '2' } */ - var omit = rest(function(object, props) { + var omit = flatRest(function(object, paths) { + var result = {}; if (object == null) { - return {}; + return result; + } + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); } - props = arrayMap(baseFlatten(props, 1), toKey); - return basePick(object, baseDifference(getAllKeysIn(object), props)); + return result; }); /** @@ -12689,8 +13487,7 @@ * @since 4.0.0 * @category Object * @param {Object} object The source object. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per property. + * @param {Function} [predicate=_.identity] The function invoked per property. * @returns {Object} Returns the new object. * @example * @@ -12700,10 +13497,7 @@ * // => { 'b': '2' } */ function omitBy(object, predicate) { - predicate = getIteratee(predicate); - return basePickBy(object, function(value, key) { - return !predicate(value, key); - }); + return pickBy(object, negate(getIteratee(predicate))); } /** @@ -12714,7 +13508,7 @@ * @memberOf _ * @category Object * @param {Object} object The source object. - * @param {...(string|string[])} [props] The property identifiers to pick. + * @param {...(string|string[])} [paths] The property paths to pick. * @returns {Object} Returns the new object. * @example * @@ -12723,8 +13517,8 @@ * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ - var pick = rest(function(object, props) { - return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey)); + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); }); /** @@ -12736,8 +13530,7 @@ * @since 4.0.0 * @category Object * @param {Object} object The source object. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per property. + * @param {Function} [predicate=_.identity] The function invoked per property. * @returns {Object} Returns the new object. * @example * @@ -12747,7 +13540,16 @@ * // => { 'a': 1, 'c': 3 } */ function pickBy(object, predicate) { - return object == null ? {} : basePickBy(object, getIteratee(predicate)); + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); } /** @@ -12780,15 +13582,15 @@ * // => 'default' */ function result(object, path, defaultValue) { - path = isKey(path, object) ? [path] : castPath(path); + path = castPath(path, object); var index = -1, length = path.length; // Ensure the loop is entered when path is empty. if (!length) { - object = undefined; length = 1; + object = undefined; } while (++index < length) { var value = object == null ? undefined : object[toKey(path[index])]; @@ -12864,7 +13666,8 @@ /** * Creates an array of own enumerable string keyed-value pairs for `object` - * which can be consumed by `_.fromPairs`. + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. * * @static * @memberOf _ @@ -12872,7 +13675,7 @@ * @alias entries * @category Object * @param {Object} object The object to query. - * @returns {Array} Returns the new array of key-value pairs. + * @returns {Array} Returns the key-value pairs. * @example * * function Foo() { @@ -12885,13 +13688,12 @@ * _.toPairs(new Foo); * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) */ - function toPairs(object) { - return baseToPairs(object, keys(object)); - } + var toPairs = createToPairs(keys); /** * Creates an array of own and inherited enumerable string keyed-value pairs - * for `object` which can be consumed by `_.fromPairs`. + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. * * @static * @memberOf _ @@ -12899,7 +13701,7 @@ * @alias entriesIn * @category Object * @param {Object} object The object to query. - * @returns {Array} Returns the new array of key-value pairs. + * @returns {Array} Returns the key-value pairs. * @example * * function Foo() { @@ -12910,25 +13712,24 @@ * Foo.prototype.c = 3; * * _.toPairsIn(new Foo); - * // => [['a', 1], ['b', 2], ['c', 1]] (iteration order is not guaranteed) + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) */ - function toPairsIn(object) { - return baseToPairs(object, keysIn(object)); - } + var toPairsIn = createToPairs(keysIn); /** * An alternative to `_.reduce`; this method transforms `object` to a new * `accumulator` object which is the result of running each of its own * enumerable string keyed properties thru `iteratee`, with each invocation - * potentially mutating the `accumulator` object. The iteratee is invoked - * with four arguments: (accumulator, value, key, object). Iteratee functions - * may exit iteration early by explicitly returning `false`. + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. * * @static * @memberOf _ * @since 1.3.0 * @category Object - * @param {Array|Object} object The object to iterate over. + * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The custom accumulator value. * @returns {*} Returns the accumulated value. @@ -12946,22 +13747,23 @@ * // => { '1': ['a', 'c'], '2': ['b'] } */ function transform(object, iteratee, accumulator) { - var isArr = isArray(object) || isTypedArray(object); - iteratee = getIteratee(iteratee, 4); + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + iteratee = getIteratee(iteratee, 4); if (accumulator == null) { - if (isArr || isObject(object)) { - var Ctor = object.constructor; - if (isArr) { - accumulator = isArray(object) ? new Ctor : []; - } else { - accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; - } - } else { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; + } + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } + else { accumulator = {}; } } - (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) { + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { return iteratee(accumulator, value, index, object); }); return accumulator; @@ -13085,7 +13887,7 @@ * // => ['h', 'i'] */ function values(object) { - return object ? baseValues(object, keys(object)) : []; + return object == null ? [] : baseValues(object, keys(object)); } /** @@ -13192,12 +13994,12 @@ * // => true */ function inRange(number, start, end) { - start = toNumber(start) || 0; + start = toFinite(start); if (end === undefined) { end = start; start = 0; } else { - end = toNumber(end) || 0; + end = toFinite(end); } number = toNumber(number); return baseInRange(number, start, end); @@ -13253,12 +14055,12 @@ upper = 1; } else { - lower = toNumber(lower) || 0; + lower = toFinite(lower); if (upper === undefined) { upper = lower; lower = 0; } else { - upper = toNumber(upper) || 0; + upper = toFinite(upper); } } if (lower > upper) { @@ -13321,8 +14123,9 @@ /** * Deburrs `string` by converting - * [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) - * to basic latin letters and removing + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). * * @static @@ -13338,7 +14141,7 @@ */ function deburr(string) { string = toString(string); - return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, ''); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); } /** @@ -13348,9 +14151,9 @@ * @memberOf _ * @since 3.0.0 * @category String - * @param {string} [string=''] The string to search. + * @param {string} [string=''] The string to inspect. * @param {string} [target] The string to search for. - * @param {number} [position=string.length] The position to search from. + * @param {number} [position=string.length] The position to search up to. * @returns {boolean} Returns `true` if `string` ends with `target`, * else `false`. * @example @@ -13373,13 +14176,14 @@ ? length : baseClamp(toInteger(position), 0, length); + var end = position; position -= target.length; - return position >= 0 && string.indexOf(target, position) == position; + return position >= 0 && string.slice(position, end) == target; } /** - * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to - * their corresponding HTML entities. + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. * * **Note:** No other characters are escaped. To escape additional * characters use a third-party library like [_he_](https://mths.be/he). @@ -13390,12 +14194,6 @@ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) * (under "semi-related fun fact") for more details. * - * Backticks are escaped because in IE < 9, they can break out of - * attribute values or HTML comments. See [#59](https://html5sec.org/#59), - * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and - * [#133](https://html5sec.org/#133) of the - * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details. - * * When working with HTML you should always * [quote attribute values](http://wonko.com/post/html-escaping) to reduce * XSS vectors. @@ -13638,15 +14436,12 @@ * // => [6, 8, 10] */ function parseInt(string, radix, guard) { - // Chrome fails to trim leading whitespace characters. - // See https://bugs.chromium.org/p/v8/issues/detail?id=3109 for more details. if (guard || radix == null) { radix = 0; } else if (radix) { radix = +radix; } - string = toString(string).replace(reTrim, ''); - return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10)); + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); } /** @@ -13703,7 +14498,7 @@ var args = arguments, string = toString(args[0]); - return args.length < 3 ? string : nativeReplace.call(string, args[1], args[2]); + return args.length < 3 ? string : string.replace(args[1], args[2]); } /** @@ -13744,7 +14539,7 @@ * @param {string} [string=''] The string to split. * @param {RegExp|string} separator The separator pattern to split by. * @param {number} [limit] The length to truncate results to. - * @returns {Array} Returns the new array of string segments. + * @returns {Array} Returns the string segments. * @example * * _.split('a-b-c', '-', 2); @@ -13764,11 +14559,11 @@ (separator != null && !isRegExp(separator)) )) { separator = baseToString(separator); - if (separator == '' && reHasComplexSymbol.test(string)) { + if (!separator && hasUnicode(string)) { return castSlice(stringToArray(string), 0, limit); } } - return nativeSplit.call(string, separator, limit); + return string.split(separator, limit); } /** @@ -13803,7 +14598,7 @@ * @memberOf _ * @since 3.0.0 * @category String - * @param {string} [string=''] The string to search. + * @param {string} [string=''] The string to inspect. * @param {string} [target] The string to search for. * @param {number} [position=0] The position to search from. * @returns {boolean} Returns `true` if `string` starts with `target`, @@ -13822,7 +14617,8 @@ function startsWith(string, target, position) { string = toString(string); position = baseClamp(toInteger(position), 0, string.length); - return string.lastIndexOf(baseToString(target), position) == position; + target = baseToString(target); + return string.slice(position, position + target.length) == target; } /** @@ -13884,17 +14680,12 @@ * compiled({ 'user': 'barney' }); * // => 'hello barney!' * - * // Use the ES delimiter as an alternative to the default "interpolate" delimiter. + * // Use the ES template literal delimiter as an "interpolate" delimiter. + * // Disable support by replacing the "interpolate" delimiter. * var compiled = _.template('hello ${ user }!'); * compiled({ 'user': 'pebbles' }); * // => 'hello pebbles!' * - * // Use custom template delimiters. - * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; - * var compiled = _.template('hello {{ user }}!'); - * compiled({ 'user': 'mustache' }); - * // => 'hello mustache!' - * * // Use backslashes to treat delimiters as plain text. * var compiled = _.template('<%= "\\<%- value %\\>" %>'); * compiled({ 'value': 'ignored' }); @@ -13920,9 +14711,15 @@ * // return __p; * // } * + * // Use custom template delimiters. + * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; + * var compiled = _.template('hello {{ user }}!'); + * compiled({ 'user': 'mustache' }); + * // => 'hello mustache!' + * * // Use the `source` property to inline compiled templates for meaningful * // line numbers in error messages and stack traces. - * fs.writeFileSync(path.join(cwd, 'jst.js'), '\ + * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\ * var JST = {\ * "main": ' + _.template(mainText).source + '\ * };\ @@ -14239,7 +15036,7 @@ string = toString(string); var strLength = string.length; - if (reHasComplexSymbol.test(string)) { + if (hasUnicode(string)) { var strSymbols = stringToArray(string); strLength = strSymbols.length; } @@ -14285,7 +15082,7 @@ /** * The inverse of `_.escape`; this method converts the HTML entities - * `&`, `<`, `>`, `"`, `'`, and ``` in `string` to + * `&`, `<`, `>`, `"`, and `'` in `string` to * their corresponding characters. * * **Note:** No other HTML entities are unescaped. To unescape additional @@ -14376,7 +15173,7 @@ pattern = guard ? undefined : pattern; if (pattern === undefined) { - pattern = reHasComplexWord.test(string) ? reComplexWord : reBasicWord; + return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); } return string.match(pattern) || []; } @@ -14405,7 +15202,7 @@ * elements = []; * } */ - var attempt = rest(function(func, args) { + var attempt = baseRest(function(func, args) { try { return apply(func, undefined, args); } catch (e) { @@ -14430,19 +15227,19 @@ * * var view = { * 'label': 'docs', - * 'onClick': function() { + * 'click': function() { * console.log('clicked ' + this.label); * } * }; * - * _.bindAll(view, 'onClick'); - * jQuery(element).on('click', view.onClick); + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); * // => Logs 'clicked docs' when clicked. */ - var bindAll = rest(function(object, methodNames) { - arrayEach(baseFlatten(methodNames, 1), function(key) { + var bindAll = flatRest(function(object, methodNames) { + arrayEach(methodNames, function(key) { key = toKey(key); - object[key] = bind(object[key], object); + baseAssignValue(object, key, bind(object[key], object)); }); return object; }); @@ -14458,13 +15255,13 @@ * @since 4.0.0 * @category Util * @param {Array} pairs The predicate-function pairs. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new composite function. * @example * * var func = _.cond([ * [_.matches({ 'a': 1 }), _.constant('matches A')], * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], - * [_.constant(true), _.constant('no match')] + * [_.stubTrue, _.constant('no match')] * ]); * * func({ 'a': 1, 'b': 2 }); @@ -14477,7 +15274,7 @@ * // => 'no match' */ function cond(pairs) { - var length = pairs ? pairs.length : 0, + var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee(); pairs = !length ? [] : arrayMap(pairs, function(pair) { @@ -14487,7 +15284,7 @@ return [toIteratee(pair[0]), pair[1]]; }); - return rest(function(args) { + return baseRest(function(args) { var index = -1; while (++index < length) { var pair = pairs[index]; @@ -14503,24 +15300,27 @@ * the corresponding property values of a given object, returning `true` if * all predicates return truthy, else `false`. * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * * @static * @memberOf _ * @since 4.0.0 * @category Util * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } * ]; * - * _.filter(users, _.conforms({ 'age': _.partial(_.gt, _, 38) })); - * // => [{ 'user': 'fred', 'age': 40 }] + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] */ function conforms(source) { - return baseConforms(baseClone(source, true)); + return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); } /** @@ -14531,13 +15331,15 @@ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new constant function. * @example * - * var object = { 'user': 'fred' }; - * var getter = _.constant(object); + * var objects = _.times(2, _.constant({ 'a': 1 })); * - * getter() === object; + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { @@ -14546,6 +15348,30 @@ }; } + /** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ + function defaultTo(value, defaultValue) { + return (value == null || value !== value) ? defaultValue : value; + } + /** * Creates a function that returns the result of invoking the given functions * with the `this` binding of the created function, where each successive @@ -14555,8 +15381,8 @@ * @memberOf _ * @since 3.0.0 * @category Util - * @param {...(Function|Function[])} [funcs] Functions to invoke. - * @returns {Function} Returns the new function. + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. * @see _.flowRight * @example * @@ -14564,7 +15390,7 @@ * return n * n; * } * - * var addSquare = _.flow(_.add, square); + * var addSquare = _.flow([_.add, square]); * addSquare(1, 2); * // => 9 */ @@ -14578,8 +15404,8 @@ * @since 3.0.0 * @memberOf _ * @category Util - * @param {...(Function|Function[])} [funcs] Functions to invoke. - * @returns {Function} Returns the new function. + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. * @see _.flow * @example * @@ -14587,14 +15413,14 @@ * return n * n; * } * - * var addSquare = _.flowRight(square, _.add); + * var addSquare = _.flowRight([square, _.add]); * addSquare(1, 2); * // => 9 */ var flowRight = createFlow(true); /** - * This method returns the first argument given to it. + * This method returns the first argument it receives. * * @static * @since 0.1.0 @@ -14604,9 +15430,9 @@ * @returns {*} Returns `value`. * @example * - * var object = { 'user': 'fred' }; + * var object = { 'a': 1 }; * - * _.identity(object) === object; + * console.log(_.identity(object) === object); * // => true */ function identity(value) { @@ -14656,35 +15482,39 @@ * // => ['def'] */ function iteratee(func) { - return baseIteratee(typeof func == 'function' ? func : baseClone(func, true)); + return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); } /** * Creates a function that performs a partial deep comparison between a given * object and `source`, returning `true` if the given object has equivalent - * property values, else `false`. The created function is equivalent to - * `_.isMatch` with a `source` partially applied. + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. * - * **Note:** This method supports comparing the same values as `_.isEqual`. + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. * * @static * @memberOf _ * @since 3.0.0 * @category Util * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } * ]; * - * _.filter(users, _.matches({ 'age': 40, 'active': false })); - * // => [{ 'user': 'fred', 'age': 40, 'active': false }] + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] */ function matches(source) { - return baseMatches(baseClone(source, true)); + return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); } /** @@ -14692,7 +15522,9 @@ * value at `path` of a given object to `srcValue`, returning `true` if the * object value is equivalent, else `false`. * - * **Note:** This method supports comparing the same values as `_.isEqual`. + * **Note:** Partial comparisons will match empty array and empty object + * `srcValue` values against any array or object value, respectively. See + * `_.isEqual` for a list of supported value comparisons. * * @static * @memberOf _ @@ -14700,19 +15532,19 @@ * @category Util * @param {Array|string} path The path of the property to get. * @param {*} srcValue The value to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } * ]; * - * _.find(users, _.matchesProperty('user', 'fred')); - * // => { 'user': 'fred' } + * _.find(objects, _.matchesProperty('a', 4)); + * // => { 'a': 4, 'b': 5, 'c': 6 } */ function matchesProperty(path, srcValue) { - return baseMatchesProperty(path, baseClone(srcValue, true)); + return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); } /** @@ -14725,7 +15557,7 @@ * @category Util * @param {Array|string} path The path of the method to invoke. * @param {...*} [args] The arguments to invoke the method with. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new invoker function. * @example * * var objects = [ @@ -14739,7 +15571,7 @@ * _.map(objects, _.method(['a', 'b'])); * // => [2, 1] */ - var method = rest(function(path, args) { + var method = baseRest(function(path, args) { return function(object) { return baseInvoke(object, path, args); }; @@ -14756,7 +15588,7 @@ * @category Util * @param {Object} object The object to query. * @param {...*} [args] The arguments to invoke the method with. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new invoker function. * @example * * var array = _.times(3, _.constant), @@ -14768,7 +15600,7 @@ * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); * // => [2, 0] */ - var methodOf = rest(function(object, args) { + var methodOf = baseRest(function(object, args) { return function(path) { return baseInvoke(object, path, args); }; @@ -14867,8 +15699,7 @@ } /** - * A no-operation function that returns `undefined` regardless of the - * arguments it receives. + * This method returns `undefined`. * * @static * @memberOf _ @@ -14876,17 +15707,15 @@ * @category Util * @example * - * var object = { 'user': 'fred' }; - * - * _.noop(object) === undefined; - * // => true + * _.times(2, _.noop); + * // => [undefined, undefined] */ function noop() { // No operation performed. } /** - * Creates a function that returns its nth argument. If `n` is negative, + * Creates a function that gets the argument at index `n`. If `n` is negative, * the nth argument from the end is returned. * * @static @@ -14894,7 +15723,7 @@ * @since 4.0.0 * @category Util * @param {number} [n=0] The index of the argument to return. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new pass-thru function. * @example * * var func = _.nthArg(1); @@ -14907,7 +15736,7 @@ */ function nthArg(n) { n = toInteger(n); - return rest(function(args) { + return baseRest(function(args) { return baseNth(args, n); }); } @@ -14920,12 +15749,12 @@ * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [iteratees=[_.identity]] The iteratees to invoke. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to invoke. * @returns {Function} Returns the new function. * @example * - * var func = _.over(Math.max, Math.min); + * var func = _.over([Math.max, Math.min]); * * func(1, 2, 3, 4); * // => [4, 1] @@ -14940,12 +15769,12 @@ * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [predicates=[_.identity]] The predicates to check. + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. * @returns {Function} Returns the new function. * @example * - * var func = _.overEvery(Boolean, isFinite); + * var func = _.overEvery([Boolean, isFinite]); * * func('1'); * // => true @@ -14966,12 +15795,12 @@ * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [predicates=[_.identity]] The predicates to check. + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. * @returns {Function} Returns the new function. * @example * - * var func = _.overSome(Boolean, isFinite); + * var func = _.overSome([Boolean, isFinite]); * * func('1'); * // => true @@ -14992,7 +15821,7 @@ * @since 2.4.0 * @category Util * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. * @example * * var objects = [ @@ -15019,7 +15848,7 @@ * @since 3.0.0 * @category Util * @param {Object} object The object to query. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. * @example * * var array = [0, 1, 2], @@ -15053,7 +15882,7 @@ * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. * @see _.inRange, _.rangeRight * @example * @@ -15091,7 +15920,7 @@ * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. * @see _.inRange, _.range * @example * @@ -15118,6 +15947,101 @@ */ var rangeRight = createRange(true); + /** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + function stubArray() { + return []; + } + + /** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + function stubFalse() { + return false; + } + + /** + * This method returns a new empty object. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Object} Returns the new empty object. + * @example + * + * var objects = _.times(2, _.stubObject); + * + * console.log(objects); + * // => [{}, {}] + * + * console.log(objects[0] === objects[1]); + * // => false + */ + function stubObject() { + return {}; + } + + /** + * This method returns an empty string. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {string} Returns the empty string. + * @example + * + * _.times(2, _.stubString); + * // => ['', ''] + */ + function stubString() { + return ''; + } + + /** + * This method returns `true`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `true`. + * @example + * + * _.times(2, _.stubTrue); + * // => [true, true] + */ + function stubTrue() { + return true; + } + /** * Invokes the iteratee `n` times, returning an array of the results of * each invocation. The iteratee is invoked with one argument; (index). @@ -15134,8 +16058,8 @@ * _.times(3, String); * // => ['0', '1', '2'] * - * _.times(4, _.constant(true)); - * // => [true, true, true, true] + * _.times(4, _.constant(0)); + * // => [0, 0, 0, 0] */ function times(n, iteratee) { n = toInteger(n); @@ -15171,21 +16095,12 @@ * * _.toPath('a[0].b.c'); * // => ['a', '0', 'b', 'c'] - * - * var path = ['a', 'b', 'c'], - * newPath = _.toPath(path); - * - * console.log(newPath); - * // => ['a', 'b', 'c'] - * - * console.log(path === newPath); - * // => false */ function toPath(value) { if (isArray(value)) { return arrayMap(value, toKey); } - return isSymbol(value) ? [value] : copyArray(stringToPath(value)); + return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); } /** @@ -15229,7 +16144,7 @@ */ var add = createMathOperation(function(augend, addend) { return augend + addend; - }); + }, 0); /** * Computes `number` rounded up to `precision`. @@ -15271,7 +16186,7 @@ */ var divide = createMathOperation(function(dividend, divisor) { return dividend / divisor; - }); + }, 1); /** * Computes `number` rounded down to `precision`. @@ -15330,8 +16245,7 @@ * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {*} Returns the maximum value. * @example * @@ -15346,7 +16260,7 @@ */ function maxBy(array, iteratee) { return (array && array.length) - ? baseExtremum(array, getIteratee(iteratee), baseGt) + ? baseExtremum(array, getIteratee(iteratee, 2), baseGt) : undefined; } @@ -15378,8 +16292,7 @@ * @since 4.7.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the mean. * @example * @@ -15393,7 +16306,7 @@ * // => 5 */ function meanBy(array, iteratee) { - return baseMean(array, getIteratee(iteratee)); + return baseMean(array, getIteratee(iteratee, 2)); } /** @@ -15430,8 +16343,7 @@ * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {*} Returns the minimum value. * @example * @@ -15446,7 +16358,7 @@ */ function minBy(array, iteratee) { return (array && array.length) - ? baseExtremum(array, getIteratee(iteratee), baseLt) + ? baseExtremum(array, getIteratee(iteratee, 2), baseLt) : undefined; } @@ -15467,7 +16379,7 @@ */ var multiply = createMathOperation(function(multiplier, multiplicand) { return multiplier * multiplicand; - }); + }, 1); /** * Computes `number` rounded to `precision`. @@ -15509,7 +16421,7 @@ */ var subtract = createMathOperation(function(minuend, subtrahend) { return minuend - subtrahend; - }); + }, 0); /** * Computes the sum of the values in `array`. @@ -15541,8 +16453,7 @@ * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the sum. * @example * @@ -15557,7 +16468,7 @@ */ function sumBy(array, iteratee) { return (array && array.length) - ? baseSum(array, getIteratee(iteratee)) + ? baseSum(array, getIteratee(iteratee, 2)) : 0; } @@ -15736,7 +16647,9 @@ lodash.cloneDeep = cloneDeep; lodash.cloneDeepWith = cloneDeepWith; lodash.cloneWith = cloneWith; + lodash.conformsTo = conformsTo; lodash.deburr = deburr; + lodash.defaultTo = defaultTo; lodash.divide = divide; lodash.endsWith = endsWith; lodash.eq = eq; @@ -15818,6 +16731,11 @@ lodash.meanBy = meanBy; lodash.min = min; lodash.minBy = minBy; + lodash.stubArray = stubArray; + lodash.stubFalse = stubFalse; + lodash.stubObject = stubObject; + lodash.stubString = stubString; + lodash.stubTrue = stubTrue; lodash.multiply = multiply; lodash.nth = nth; lodash.noConflict = noConflict; @@ -15852,6 +16770,7 @@ lodash.sumBy = sumBy; lodash.template = template; lodash.times = times; + lodash.toFinite = toFinite; lodash.toInteger = toInteger; lodash.toLength = toLength; lodash.toLower = toLower; @@ -15971,7 +16890,7 @@ return this.reverse().find(predicate); }; - LazyWrapper.prototype.invokeMap = rest(function(path, args) { + LazyWrapper.prototype.invokeMap = baseRest(function(path, args) { if (typeof path == 'function') { return new LazyWrapper(this); } @@ -15981,10 +16900,7 @@ }); LazyWrapper.prototype.reject = function(predicate) { - predicate = getIteratee(predicate, 3); - return this.filter(function(value) { - return !predicate(value); - }); + return this.filter(negate(getIteratee(predicate))); }; LazyWrapper.prototype.slice = function(start, end) { @@ -16088,7 +17004,7 @@ } }); - realNames[createHybridWrapper(undefined, BIND_KEY_FLAG).name] = [{ + realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{ 'name': 'wrapper', 'func': undefined }]; @@ -16107,38 +17023,38 @@ lodash.prototype.reverse = wrapperReverse; lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; - if (iteratorSymbol) { - lodash.prototype[iteratorSymbol] = wrapperToIterator; + // Add lazy aliases. + lodash.prototype.first = lodash.prototype.head; + + if (symIterator) { + lodash.prototype[symIterator] = wrapperToIterator; } return lodash; - } + }); /*--------------------------------------------------------------------------*/ // Export lodash. var _ = runInContext(); - // Expose Lodash on the free variable `window` or `self` when available so it's - // globally accessible, even when bundled with Browserify, Webpack, etc. This - // also prevents errors in cases where Lodash is loaded by a script tag in the - // presence of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch - // for more details. Use `_.noConflict` to remove Lodash from the global object. - (freeWindow || freeSelf || {})._ = _; - - // Some AMD build optimizers like r.js check for condition patterns like the following: + // Some AMD build optimizers, like r.js, check for condition patterns like: if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = _; + // Define as an anonymous module so, through path mapping, it can be // referenced as the "underscore" module. define(function() { return _; }); } - // Check for `exports` after `define` in case a build optimizer adds an `exports` object. - else if (freeExports && freeModule) { + // Check for `exports` after `define` in case a build optimizer adds it. + else if (freeModule) { // Export for Node.js. - if (moduleExports) { - (freeModule.exports = _)._ = _; - } + (freeModule.exports = _)._ = _; // Export for CommonJS support. freeExports._ = _; } diff --git a/node_modules/lodash/lodash.min.js b/node_modules/lodash/lodash.min.js index 4994229..cf2fd3d 100644 --- a/node_modules/lodash/lodash.min.js +++ b/node_modules/lodash/lodash.min.js @@ -1,126 +1,136 @@ /** * @license - * lodash 4.11.2 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE - * Build: `lodash -o ./dist/lodash.js` + * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE */ -;(function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function r(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function e(t,n,r,e){for(var u=-1,o=t.length;++ur?false:(r==t.length-1?t.pop():Fu.call(t,r,1),true)}function Zt(t,n){var r=Tt(t,n);return 0>r?N:t[r][1]}function Tt(t,n){for(var r=t.length;r--;)if(Se(t[r][0],n))return r;return-1}function qt(t,n,r){ -var e=Tt(t,n);0>e?t.push([n,r]):t[e][1]=r}function Gt(t,n,r,e){return t===N||Se(t,xu[r])&&!wu.call(e,r)?n:t}function Jt(t,n,r){(r===N||Se(t[n],r))&&(typeof n!="number"||r!==N||n in t)||(t[n]=r)}function Yt(t,n,r){var e=t[n];wu.call(t,n)&&Se(e,r)&&(r!==N||n in t)||(t[n]=r)}function Ht(t,n,r,e){return yo(t,function(t,u,o){n(e,t,r(t),o)}),e}function Qt(t,n){return t&&ar(n,tu(n),t)}function Xt(t,n){for(var r=-1,e=null==t,u=n.length,o=Array(u);++r=t?t:r), -n!==N&&(t=t>=n?t:n)),t}function nn(t,n,r,e,o,i,f){var c;if(e&&(c=i?e(t,o,i,f):e(t)),c!==N)return c;if(!ze(t))return t;if(o=li(t)){if(c=Pr(t),!n)return cr(t,c)}else{var a=Fr(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(si(t))return er(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!i){if(L(t))return i?t:{};if(c=Zr(l?{}:t),!n)return lr(t,Qt(c,t))}else{if(!Bt[a])return i?t:{};c=Tr(t,a,nn,n)}}if(f||(f=new Ft),i=f.get(t))return i;if(f.set(t,c),!o)var s=r?vn(t,tu,$r):tu(t); -return u(s||t,function(u,o){s&&(o=u,u=t[o]),Yt(c,o,nn(u,n,r,e,o,t,f))}),c}function rn(t){var n=tu(t),r=n.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=n[u],i=t[o],f=e[o];if(f===N&&!(o in Object(e))||!i(f))return false}return true}}function en(t){return ze(t)?zu(t):{}}function un(t,n,r){if(typeof t!="function")throw new yu("Expected a function");return $u(function(){t.apply(N,r)},n)}function on(t,n,r,e){var u=-1,o=f,i=true,l=t.length,s=[],h=n.length;if(!l)return s;r&&(n=a(n,A(r))),e?(o=c, -i=false):n.length>=200&&(o=zt,i=false,n=new Ut(n));t:for(;++u0&&r(f)?n>1?ln(f,n-1,r,e,u):l(u,f):e||(u[u.length]=f)}return u}function sn(t,n){return t&&xo(t,n,tu)}function hn(t,n){return t&&jo(t,n,tu)}function pn(t,n){return i(n,function(n){return Ce(t[n])})}function _n(t,n){n=Yr(n,t)?[n]:nr(n);for(var r=0,e=n.length;null!=t&&e>r;)t=t[ee(n[r++])];return r&&r==e?t:N}function vn(t,n,r){return n=n(t),li(t)?n:l(n,r(t))}function gn(t,n){return t>n}function dn(t,n){return wu.call(t,n)||typeof t=="object"&&n in t&&null===Zu(Object(t)); -}function yn(t,n){return n in Object(t)}function bn(t,n,r){for(var e=r?c:f,u=t[0].length,o=t.length,i=o,l=Array(o),s=1/0,h=[];i--;){var p=t[i];i&&n&&(p=a(p,A(n))),s=Gu(p.length,s),l[i]=!r&&(n||u>=120&&p.length>=120)?new Ut(i&&p):N}var p=t[0],_=-1,v=l[0];t:for(;++_h.length;){var g=p[_],d=n?n(g):g,g=r||0!==g?g:0;if(v?!zt(v,d):!e(h,d,r)){for(i=o;--i;){var y=l[i];if(y?!zt(y,d):!e(t[i],d,r))continue t}v&&v.push(d),h.push(g)}}return h}function xn(t,n,r){var e={};return sn(t,function(t,u,o){n(e,r(t),u,o); -}),e}function jn(t,n,e){return Yr(n,t)||(n=nr(n),t=re(t,n),n=ae(n)),n=null==t?t:t[ee(n)],null==n?N:r(n,t,e)}function mn(t,n,r,e,u){if(t===n)n=true;else if(null==t||null==n||!ze(t)&&!De(n))n=t!==t&&n!==n;else t:{var o=li(t),i=li(n),f="[object Array]",c="[object Array]";o||(f=Fr(t),f="[object Arguments]"==f?"[object Object]":f),i||(c=Fr(n),c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f&&!L(t),i="[object Object]"==c&&!L(n);if((c=f==c)&&!a)u||(u=new Ft),n=o||qe(t)?Br(t,n,mn,r,e,u):Lr(t,n,f,mn,r,e,u);else{ -if(!(2&e)&&(o=a&&wu.call(t,"__wrapped__"),f=i&&wu.call(n,"__wrapped__"),o||f)){t=o?t.value():t,n=f?n.value():n,u||(u=new Ft),n=mn(t,n,r,e,u);break t}if(c)n:if(u||(u=new Ft),o=2&e,f=tu(t),i=f.length,c=tu(n).length,i==c||o){for(a=i;a--;){var l=f[a];if(!(o?l in n:dn(n,l))){n=false;break n}}if(c=u.get(t))n=c==n;else{c=true,u.set(t,n);for(var s=o;++at}function En(t,n){var r=-1,e=We(t)?Array(t.length):[];return yo(t,function(t,u,o){e[++r]=n(t,u,o)}),e}function In(t){var n=Ur(t);return 1==n.length&&n[0][2]?te(n[0][0],n[0][1]):function(r){return r===t||wn(r,t,n)}}function Sn(t,n){return Yr(t)&&n===n&&!ze(n)?te(ee(t),n):function(r){ -var e=Qe(r,t);return e===N&&e===n?Xe(r,t):mn(n,e,N,3)}}function Rn(t,n,r,e,o){if(t!==n){if(!li(n)&&!qe(n))var i=nu(n);u(i||n,function(u,f){if(i&&(f=u,u=n[f]),ze(u)){o||(o=new Ft);var c=f,a=o,l=t[c],s=n[c],h=a.get(s);if(h)Jt(t,c,h);else{var h=e?e(l,s,c+"",t,n,a):N,p=h===N;p&&(h=s,li(s)||qe(s)?li(l)?h=l:Be(l)?h=cr(l):(p=false,h=nn(s,true)):Ne(s)||Re(s)?Re(l)?h=Ye(l):!ze(l)||r&&Ce(l)?(p=false,h=nn(s,true)):h=l:p=false),a.set(s,h),p&&Rn(h,s,r,e,a),a["delete"](s),Jt(t,c,h)}}else c=e?e(t[f],u,f+"",t,n,o):N,c===N&&(c=u), -Jt(t,f,c)})}}function Wn(t,n){var r=t.length;return r?(n+=0>n?r:0,Gr(n,r)?t[n]:N):void 0}function Bn(t,n,r){var e=-1;return n=a(n.length?n:[au],A(Mr())),t=En(t,function(t){return{a:a(n,function(n){return n(t)}),b:++e,c:t}}),x(t,function(t,n){var e;t:{e=-1;for(var u=t.a,o=n.a,i=u.length,f=r.length;++e=f?c:c*("desc"==r[e]?-1:1);break t}}e=t.b-n.b}return e})}function Ln(t,n){return t=Object(t),s(n,function(n,r){return r in t&&(n[r]=t[r]),n},{})}function Cn(t,n){for(var r=-1,e=vn(t,nu,ko),u=e.length,o={};++rn||n>9007199254740991)return r;do n%2&&(r+=t),(n=Pu(n/2))&&(t+=t);while(n);return r}function Nn(t,n,r,e){n=Yr(n,t)?[n]:nr(n);for(var u=-1,o=n.length,i=o-1,f=t;null!=f&&++un&&(n=-n>u?0:u+n),r=r>u?u:r,0>r&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0,r=Array(u);++e=u){for(;u>e;){var o=e+u>>>1,i=t[o];null!==i&&!Te(i)&&(r?n>=i:n>i)?e=o+1:u=o}return u}return qn(t,n,au,r)}function qn(t,n,r,e){n=r(n);for(var u=0,o=t?t.length:0,i=n!==n,f=null===n,c=Te(n),a=n===N;o>u;){var l=Pu((u+o)/2),s=r(t[l]),h=s!==N,p=null===s,_=s===s,v=Te(s);(i?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?n>=s:n>s)?u=l+1:o=l; -}return Gu(o,4294967294)}function Vn(t,n){for(var r=-1,e=t.length,u=0,o=[];++r=200){if(u=n?null:wo(t))return z(u);i=false,u=zt,l=new Ut}else l=n?[]:a;t:for(;++ee?n[e]:N);return i}function tr(t){return Be(t)?t:[]}function nr(t){return li(t)?t:Io(t)}function rr(t,n,r){var e=t.length;return r=r===N?e:r,!n&&r>=e?t:Pn(t,n,r)}function er(t,n){if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function ur(t){var n=new t.constructor(t.byteLength);return new Bu(n).set(new Bu(t)),n}function or(t,n){if(t!==n){var r=t!==N,e=null===t,u=t===t,o=Te(t),i=n!==N,f=null===n,c=n===n,a=Te(n); -if(!f&&!a&&!o&&t>n||o&&i&&c&&!f&&!a||e&&i&&c||!r&&c||!u)return 1;if(!e&&!o&&!a&&n>t||a&&r&&u&&!e&&!o||f&&r&&u||!i&&u||!c)return-1}return 0}function ir(t,n,r,e){var u=-1,o=t.length,i=r.length,f=-1,c=n.length,a=Ku(o-i,0),l=Array(c+a);for(e=!e;++fu)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];return l}function fr(t,n,r,e){var u=-1,o=t.length,i=-1,f=r.length,c=-1,a=n.length,l=Ku(o-f,0),s=Array(l+a);for(e=!e;++uu)&&(s[l+r[i]]=t[u++]); -return s}function cr(t,n){var r=-1,e=t.length;for(n||(n=Array(e));++r1?r[u-1]:N,i=u>2?r[2]:N,o=typeof o=="function"?(u--,o):N;for(i&&Jr(r[0],r[1],i)&&(o=3>u?N:o,u=1),n=Object(n);++ei&&f[0]!==a&&f[i-1]!==a?[]:U(f,a),i-=c.length,e>i?Sr(t,n,jr,u.placeholder,N,f,c,N,N,e-i):r(this&&this!==Vt&&this instanceof u?o:t,this,f)}var o=yr(t);return u}function xr(t){return Ee(function(n){n=ln(n,1);var r=n.length,e=r,u=wt.prototype.thru;for(t&&n.reverse();e--;){var o=n[e];if(typeof o!="function")throw new yu("Expected a function");if(u&&!i&&"wrapper"==Cr(o))var i=new wt([],true); -}for(e=i?e:r;++e=200)return i.plant(e).value();for(var u=0,t=r?n[u].apply(this,t):e;++ud)return j=U(b,j),Sr(t,n,jr,l.placeholder,r,b,j,f,c,a-d);if(j=h?r:this,y=p?j[t]:t,d=b.length,f){x=b.length;for(var m=Gu(f.length,x),w=cr(b);m--;){var A=f[m];b[m]=Gr(A,x)?w[A]:N}}else v&&d>1&&b.reverse();return s&&d>c&&(b.length=c),this&&this!==Vt&&this instanceof l&&(y=g||yr(y)),y.apply(j,b)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?N:yr(t);return l}function mr(t,n){return function(r,e){return xn(r,t,n(e))}}function wr(t){return function(n,r){var e; -if(n===N&&r===N)return 0;if(n!==N&&(e=n),r!==N){if(e===N)return r;typeof n=="string"||typeof r=="string"?(n=Gn(n),r=Gn(r)):(n=Kn(n),r=Kn(r)),e=t(n,r)}return e}}function Ar(t){return Ee(function(n){return n=1==n.length&&li(n[0])?a(n[0],A(Mr())):a(ln(n,1,Kr),A(Mr())),Ee(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function Or(t,n){n=n===N?" ":Gn(n);var r=n.length;return 2>r?r?Fn(n,t):n:(r=Fn(n,Nu(t/D(n))),It.test(n)?rr(r.match(kt),0,t).join(""):r.slice(0,t))}function kr(t,n,e,u){ -function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Vt&&this instanceof o?f:t;++an?1:-1:Je(e)||0;var u=-1;r=Ku(Nu((r-n)/(e||1)),0);for(var o=Array(r);r--;)o[t?r:++u]=n,n+=e;return o}}function Ir(t){return function(n,r){return typeof n=="string"&&typeof r=="string"||(n=Je(n), -r=Je(r)),t(n,r)}}function Sr(t,n,r,e,u,o,i,f,c,a){var l=8&n,s=l?i:N;i=l?N:i;var h=l?o:N;return o=l?N:o,n=(n|(l?32:64))&~(l?64:32),4&n||(n&=-4),n=[t,n,u,h,s,o,i,f,c,a],r=r.apply(N,n),Qr(t)&&Eo(r,n),r.placeholder=e,r}function Rr(t){var n=gu[t];return function(t,r){if(t=Je(t),r=Ke(r)){var e=(He(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(He(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return n(t)}}function Wr(t,n,r,e,u,o,i,f){var c=2&n;if(!c&&typeof t!="function")throw new yu("Expected a function"); -var a=e?e.length:0;if(a||(n&=-97,e=u=N),i=i===N?i:Ku(Ke(i),0),f=f===N?f:Ke(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=N}var h=c?N:Ao(t);return o=[t,n,r,e,u,l,s,o,i,f],h&&(r=o[1],t=h[1],n=r|t,e=128==t&&8==r||128==t&&256==r&&h[8]>=o[7].length||384==t&&h[8]>=h[7].length&&8==r,131>n||e)&&(1&t&&(o[2]=h[2],n|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?ir(e,r,h[4]):r,o[4]=e?U(o[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=o[5],o[5]=e?fr(e,r,h[6]):r,o[6]=e?U(o[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(o[7]=r), -128&t&&(o[8]=null==o[8]?h[8]:Gu(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=n),t=o[0],n=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:t.length:Ku(o[9]-a,0),!f&&24&n&&(n&=-25),(h?mo:Eo)(n&&1!=n?8==n||16==n?br(t,n,f):32!=n&&33!=n||u.length?jr.apply(N,o):kr(t,n,r,e):vr(t,n,r),o)}function Br(t,n,r,e,u,o){var i=-1,f=2&u,c=1&u,a=t.length,l=n.length;if(a!=l&&!(f&&l>a))return false;if(l=o.get(t))return l==n;for(l=true,o.set(t,n);++i-1&&0==t%1&&n>t}function Jr(t,n,r){if(!ze(r))return false;var e=typeof n;return("number"==e?We(r)&&Gr(n,r.length):"string"==e&&n in r)?Se(r[n],t):false; -}function Yr(t,n){if(li(t))return false;var r=typeof t;return"number"==r||"symbol"==r||"boolean"==r||null==t||Te(t)?true:nt.test(t)||!tt.test(t)||null!=n&&t in Object(n)}function Hr(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}function Qr(t){var n=Cr(t),r=jt[n];return typeof r=="function"&&n in Lt.prototype?t===r?true:(n=Ao(r),!!n&&t===n[0]):false}function Xr(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||xu)}function te(t,n){return function(r){ -return null==r?false:r[t]===n&&(n!==N||t in Object(r))}}function ne(t,n,r,e,u,o){return ze(t)&&ze(n)&&Rn(t,n,N,ne,o.set(n,t)),t}function re(t,n){return 1==n.length?t:_n(t,Pn(n,0,-1))}function ee(t){if(typeof t=="string"||Te(t))return t;var n=t+"";return"0"==n&&1/t==-P?"-0":n}function ue(t){if(null!=t){try{return mu.call(t)}catch(n){}return t+""}return""}function oe(t){if(t instanceof Lt)return t.clone();var n=new wt(t.__wrapped__,t.__chain__);return n.__actions__=cr(t.__actions__),n.__index__=t.__index__, -n.__values__=t.__values__,n}function ie(t,n,r){var e=t?t.length:0;return e?(n=r||n===N?1:Ke(n),Pn(t,0>n?0:n,e)):[]}function fe(t,n,r){var e=t?t.length:0;return e?(n=r||n===N?1:Ke(n),n=e-n,Pn(t,0,0>n?0:n)):[]}function ce(t){return t&&t.length?t[0]:N}function ae(t){var n=t?t.length:0;return n?t[n-1]:N}function le(t,n){return t&&t.length&&n&&n.length?zn(t,n):t}function se(t){return t?Qu.call(t):t}function he(t){if(!t||!t.length)return[];var n=0;return t=i(t,function(t){return Be(t)?(n=Ku(t.length,n), -!0):void 0}),m(n,function(n){return a(t,Mn(n))})}function pe(t,n){if(!t||!t.length)return[];var e=he(t);return null==n?e:a(e,function(t){return r(n,N,t)})}function _e(t){return t=jt(t),t.__chain__=true,t}function ve(t,n){return n(t)}function ge(){return this}function de(t,n){return typeof n=="function"&&li(t)?u(t,n):yo(t,Mr(n))}function ye(t,n){var r;if(typeof n=="function"&&li(t)){for(r=t.length;r--&&false!==n(t[r],r,t););r=t}else r=bo(t,Mr(n));return r}function be(t,n){return(li(t)?a:En)(t,Mr(n,3))}function xe(t,n,r){ -var e=-1,u=Ve(t),o=u.length,i=o-1;for(n=(r?Jr(t,n,r):n===N)?1:tn(Ke(n),0,o);++e=t&&(n=N),r}}function we(t,n,r){return n=r?N:n,t=Wr(t,8,N,N,N,N,N,n),t.placeholder=we.placeholder,t}function Ae(t,n,r){return n=r?N:n, -t=Wr(t,16,N,N,N,N,N,n),t.placeholder=Ae.placeholder,t}function Oe(t,n,r){function e(n){var r=c,e=a;return c=a=N,_=n,s=t.apply(e,r)}function u(t){var r=t-p;return t-=_,!p||r>=n||0>r||g&&t>=l}function o(){var t=Xo();if(u(t))return i(t);var r;r=t-_,t=n-(t-p),r=g?Gu(t,l-r):t,h=$u(o,r)}function i(t){return Lu(h),h=N,d&&c?e(t):(c=a=N,s)}function f(){var t=Xo(),r=u(t);if(c=arguments,a=this,p=t,r){if(h===N)return _=t=p,h=$u(o,n),v?e(t):s;if(g)return Lu(h),h=$u(o,n),e(p)}return h===N&&(h=$u(o,n)),s}var c,a,l,s,h,p=0,_=0,v=false,g=false,d=true; -if(typeof t!="function")throw new yu("Expected a function");return n=Je(n)||0,ze(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Ku(Je(r.maxWait)||0,n):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==N&&Lu(h),p=_=0,c=a=h=N},f.flush=function(){return h===N?s:i(Xo())},f}function ke(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=t.apply(this,e),r.cache=o.set(u,e),e)}if(typeof t!="function"||n&&typeof n!="function")throw new yu("Expected a function"); -return r.cache=new(ke.Cache||Mt),r}function Ee(t,n){if(typeof t!="function")throw new yu("Expected a function");return n=Ku(n===N?t.length-1:Ke(n),0),function(){for(var e=arguments,u=-1,o=Ku(e.length-n,0),i=Array(o);++u-1&&0==t%1&&9007199254740991>=t; -}function ze(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function De(t){return!!t&&typeof t=="object"}function $e(t){return ze(t)?(Ce(t)||L(t)?Iu:vt).test(ue(t)):false}function Fe(t){return typeof t=="number"||De(t)&&"[object Number]"==ku.call(t)}function Ne(t){return!De(t)||"[object Object]"!=ku.call(t)||L(t)?false:(t=Zu(Object(t)),null===t?true:(t=wu.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&mu.call(t)==Ou))}function Pe(t){return ze(t)&&"[object RegExp]"==ku.call(t); -}function Ze(t){return typeof t=="string"||!li(t)&&De(t)&&"[object String]"==ku.call(t)}function Te(t){return typeof t=="symbol"||De(t)&&"[object Symbol]"==ku.call(t)}function qe(t){return De(t)&&Ue(t.length)&&!!Wt[ku.call(t)]}function Ve(t){if(!t)return[];if(We(t))return Ze(t)?t.match(kt):cr(t);if(Uu&&t[Uu])return C(t[Uu]());var n=Fr(t);return("[object Map]"==n?M:"[object Set]"==n?z:uu)(t)}function Ke(t){if(!t)return 0===t?t:0;if(t=Je(t),t===P||t===-P)return 1.7976931348623157e308*(0>t?-1:1);var n=t%1; -return t===t?n?t-n:t:0}function Ge(t){return t?tn(Ke(t),0,4294967295):0}function Je(t){if(typeof t=="number")return t;if(Te(t))return Z;if(ze(t)&&(t=Ce(t.valueOf)?t.valueOf():t,t=ze(t)?t+"":t),typeof t!="string")return 0===t?t:+t;t=t.replace(ot,"");var n=_t.test(t);return n||gt.test(t)?$t(t.slice(2),n?2:8):pt.test(t)?Z:+t}function Ye(t){return ar(t,nu(t))}function He(t){return null==t?"":Gn(t)}function Qe(t,n,r){return t=null==t?N:_n(t,n),t===N?r:t}function Xe(t,n){return null!=t&&Nr(t,n,yn)}function tu(t){ -var n=Xr(t);if(!n&&!We(t))return Vu(Object(t));var r,e=qr(t),u=!!e,e=e||[],o=e.length;for(r in t)!dn(t,r)||u&&("length"==r||Gr(r,o))||n&&"constructor"==r||e.push(r);return e}function nu(t){for(var n=-1,r=Xr(t),e=On(t),u=e.length,o=qr(t),i=!!o,o=o||[],f=o.length;++ne.length?qt(e,t,n):(r.array=null,r.map=new Mt(e))),(r=r.map)&&r.set(t,n),this};var yo=pr(sn),bo=pr(hn,true),xo=_r(),jo=_r(true);Cu&&!Du.call({valueOf:1},"valueOf")&&(On=function(t){return C(Cu(t))});var mo=io?function(t,n){return io.set(t,n),t}:au,wo=eo&&1/z(new eo([,-0]))[1]==P?function(t){ -return new eo(t)}:hu,Ao=io?function(t){return io.get(t)}:hu,Oo=Mn("length");Mu||($r=function(){return[]});var ko=Mu?function(t){for(var n=[];t;)l(n,$r(t)),t=Zu(Object(t));return n}:$r;(to&&"[object DataView]"!=Fr(new to(new ArrayBuffer(1)))||no&&"[object Map]"!=Fr(new no)||ro&&"[object Promise]"!=Fr(ro.resolve())||eo&&"[object Set]"!=Fr(new eo)||uo&&"[object WeakMap]"!=Fr(new uo))&&(Fr=function(t){var n=ku.call(t);if(t=(t="[object Object]"==n?t.constructor:N)?ue(t):N)switch(t){case ao:return"[object DataView]"; -case lo:return"[object Map]";case so:return"[object Promise]";case ho:return"[object Set]";case po:return"[object WeakMap]"}return n});var Eo=function(){var t=0,n=0;return function(r,e){var u=Xo(),o=16-(u-n);if(n=u,o>0){if(150<=++t)return r}else t=0;return mo(r,e)}}(),Io=ke(function(t){var n=[];return He(t).replace(rt,function(t,r,e,u){n.push(e?u.replace(at,"$1"):r||t)}),n}),So=Ee(function(t,n){return Be(t)?on(t,ln(n,1,Be,true)):[]}),Ro=Ee(function(t,n){var r=ae(n);return Be(r)&&(r=N),Be(t)?on(t,ln(n,1,Be,true),Mr(r)):[]; -}),Wo=Ee(function(t,n){var r=ae(n);return Be(r)&&(r=N),Be(t)?on(t,ln(n,1,Be,true),N,r):[]}),Bo=Ee(function(t){var n=a(t,tr);return n.length&&n[0]===t[0]?bn(n):[]}),Lo=Ee(function(t){var n=ae(t),r=a(t,tr);return n===ae(r)?n=N:r.pop(),r.length&&r[0]===t[0]?bn(r,Mr(n)):[]}),Co=Ee(function(t){var n=ae(t),r=a(t,tr);return n===ae(r)?n=N:r.pop(),r.length&&r[0]===t[0]?bn(r,N,n):[]}),Mo=Ee(le),Uo=Ee(function(t,n){n=ln(n,1);var r=t?t.length:0,e=Xt(t,n);return Dn(t,a(n,function(t){return Gr(t,r)?+t:t}).sort(or)), -e}),zo=Ee(function(t){return Jn(ln(t,1,Be,true))}),Do=Ee(function(t){var n=ae(t);return Be(n)&&(n=N),Jn(ln(t,1,Be,true),Mr(n))}),$o=Ee(function(t){var n=ae(t);return Be(n)&&(n=N),Jn(ln(t,1,Be,true),N,n)}),Fo=Ee(function(t,n){return Be(t)?on(t,n):[]}),No=Ee(function(t){return Qn(i(t,Be))}),Po=Ee(function(t){var n=ae(t);return Be(n)&&(n=N),Qn(i(t,Be),Mr(n))}),Zo=Ee(function(t){var n=ae(t);return Be(n)&&(n=N),Qn(i(t,Be),N,n)}),To=Ee(he),qo=Ee(function(t){var n=t.length,n=n>1?t[n-1]:N,n=typeof n=="function"?(t.pop(), -n):N;return pe(t,n)}),Vo=Ee(function(t){function n(n){return Xt(n,t)}t=ln(t,1);var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return!(r>1||this.__actions__.length)&&u instanceof Lt&&Gr(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:ve,args:[n],thisArg:N}),new wt(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(N),t})):this.thru(n)}),Ko=sr(function(t,n,r){wu.call(t,r)?++t[r]:t[r]=1}),Go=sr(function(t,n,r){wu.call(t,r)?t[r].push(n):t[r]=[n]}),Jo=Ee(function(t,n,e){var u=-1,o=typeof n=="function",i=Yr(n),f=We(t)?Array(t.length):[]; -return yo(t,function(t){var c=o?n:i&&null!=t?t[n]:N;f[++u]=c?r(c,t,e):jn(t,n,e)}),f}),Yo=sr(function(t,n,r){t[r]=n}),Ho=sr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),Qo=Ee(function(t,n){if(null==t)return[];var r=n.length;return r>1&&Jr(t,n[0],n[1])?n=[]:r>2&&Jr(n[0],n[1],n[2])&&(n=[n[0]]),n=1==n.length&&li(n[0])?n[0]:ln(n,1,Kr),Bn(t,n,[])}),Xo=_u.now,ti=Ee(function(t,n,r){var e=1;if(r.length)var u=U(r,Dr(ti)),e=32|e;return Wr(t,e,n,r,u)}),ni=Ee(function(t,n,r){var e=3;if(r.length)var u=U(r,Dr(ni)),e=32|e; -return Wr(n,e,t,r,u)}),ri=Ee(function(t,n){return un(t,1,n)}),ei=Ee(function(t,n,r){return un(t,Je(n)||0,r)});ke.Cache=Mt;var ui=Ee(function(t,n){n=1==n.length&&li(n[0])?a(n[0],A(Mr())):a(ln(n,1,Kr),A(Mr()));var e=n.length;return Ee(function(u){for(var o=-1,i=Gu(u.length,e);++o=n}),li=Array.isArray,si=Su?function(t){return t instanceof Su}:cu(false),hi=Ir(kn),pi=Ir(function(t,n){return n>=t}),_i=hr(function(t,n){if(fo||Xr(n)||We(n))ar(n,tu(n),t);else for(var r in n)wu.call(n,r)&&Yt(t,r,n[r])}),vi=hr(function(t,n){if(fo||Xr(n)||We(n))ar(n,nu(n),t);else for(var r in n)Yt(t,r,n[r])}),gi=hr(function(t,n,r,e){ar(n,nu(n),t,e)}),di=hr(function(t,n,r,e){ar(n,tu(n),t,e)}),yi=Ee(function(t,n){return Xt(t,ln(n,1))}),bi=Ee(function(t){return t.push(N,Gt), -r(gi,N,t)}),xi=Ee(function(t){return t.push(N,ne),r(Oi,N,t)}),ji=mr(function(t,n,r){t[n]=r},cu(au)),mi=mr(function(t,n,r){wu.call(t,n)?t[n].push(r):t[n]=[r]},Mr),wi=Ee(jn),Ai=hr(function(t,n,r){Rn(t,n,r)}),Oi=hr(function(t,n,r,e){Rn(t,n,r,e)}),ki=Ee(function(t,n){return null==t?{}:(n=a(ln(n,1),ee),Ln(t,on(vn(t,nu,ko),n)))}),Ei=Ee(function(t,n){return null==t?{}:Ln(t,a(ln(n,1),ee))}),Ii=dr(function(t,n,r){return n=n.toLowerCase(),t+(r?ou(n):n)}),Si=dr(function(t,n,r){return t+(r?"-":"")+n.toLowerCase(); -}),Ri=dr(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),Wi=gr("toLowerCase"),Bi=dr(function(t,n,r){return t+(r?"_":"")+n.toLowerCase()}),Li=dr(function(t,n,r){return t+(r?" ":"")+Mi(n)}),Ci=dr(function(t,n,r){return t+(r?" ":"")+n.toUpperCase()}),Mi=gr("toUpperCase"),Ui=Ee(function(t,n){try{return r(t,N,n)}catch(e){return Le(e)?e:new vu(e)}}),zi=Ee(function(t,n){return u(ln(n,1),function(n){n=ee(n),t[n]=ti(t[n],t)}),t}),Di=xr(),$i=xr(true),Fi=Ee(function(t,n){return function(r){return jn(r,t,n); -}}),Ni=Ee(function(t,n){return function(r){return jn(t,r,n)}}),Pi=Ar(a),Zi=Ar(o),Ti=Ar(p),qi=Er(),Vi=Er(true),Ki=wr(function(t,n){return t+n}),Gi=Rr("ceil"),Ji=wr(function(t,n){return t/n}),Yi=Rr("floor"),Hi=wr(function(t,n){return t*n}),Qi=Rr("round"),Xi=wr(function(t,n){return t-n});return jt.after=function(t,n){if(typeof n!="function")throw new yu("Expected a function");return t=Ke(t),function(){return 1>--t?n.apply(this,arguments):void 0}},jt.ary=je,jt.assign=_i,jt.assignIn=vi,jt.assignInWith=gi, -jt.assignWith=di,jt.at=yi,jt.before=me,jt.bind=ti,jt.bindAll=zi,jt.bindKey=ni,jt.castArray=Ie,jt.chain=_e,jt.chunk=function(t,n,r){if(n=(r?Jr(t,n,r):n===N)?1:Ku(Ke(n),0),r=t?t.length:0,!r||1>n)return[];for(var e=0,u=0,o=Array(Nu(r/n));r>e;)o[u++]=Pn(t,e,e+=n);return o},jt.compact=function(t){for(var n=-1,r=t?t.length:0,e=0,u=[];++nt)return t?cr(n):[];for(var r=Array(t-1);t--;)r[t-1]=arguments[t]; -for(var t=ln(r,1),r=-1,e=n.length,u=-1,o=t.length,i=Array(e+o);++rr&&(r=-r>u?0:u+r),e=e===N||e>u?u:Ke(e),0>e&&(e+=u),e=r>e?0:Ge(e);e>r;)t[r++]=n; -return t},jt.filter=function(t,n){return(li(t)?i:an)(t,Mr(n,3))},jt.flatMap=function(t,n){return ln(be(t,n),1)},jt.flatMapDeep=function(t,n){return ln(be(t,n),P)},jt.flatMapDepth=function(t,n,r){return r=r===N?1:Ke(r),ln(be(t,n),r)},jt.flatten=function(t){return t&&t.length?ln(t,1):[]},jt.flattenDeep=function(t){return t&&t.length?ln(t,P):[]},jt.flattenDepth=function(t,n){return t&&t.length?(n=n===N?1:Ke(n),ln(t,n)):[]},jt.flip=function(t){return Wr(t,512)},jt.flow=Di,jt.flowRight=$i,jt.fromPairs=function(t){ -for(var n=-1,r=t?t.length:0,e={};++n>>0,r?(t=He(t))&&(typeof n=="string"||null!=n&&!Pe(n))&&(n=Gn(n),""==n&&It.test(t))?rr(t.match(kt),0,r):Xu.call(t,n,r):[]},jt.spread=function(t,n){if(typeof t!="function")throw new yu("Expected a function");return n=n===N?0:Ku(Ke(n),0),Ee(function(e){var u=e[n];return e=rr(e,0,n),u&&l(e,u),r(t,this,e)})},jt.tail=function(t){return ie(t,1)},jt.take=function(t,n,r){return t&&t.length?(n=r||n===N?1:Ke(n),Pn(t,0,0>n?0:n)):[]},jt.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===N?1:Ke(n), -n=e-n,Pn(t,0>n?0:n,e)):[]},jt.takeRightWhile=function(t,n){return t&&t.length?Yn(t,Mr(n,3),false,true):[]},jt.takeWhile=function(t,n){return t&&t.length?Yn(t,Mr(n,3)):[]},jt.tap=function(t,n){return n(t),t},jt.throttle=function(t,n,r){var e=true,u=true;if(typeof t!="function")throw new yu("Expected a function");return ze(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),Oe(t,n,{leading:e,maxWait:n,trailing:u})},jt.thru=ve,jt.toArray=Ve,jt.toPairs=ru,jt.toPairsIn=eu,jt.toPath=function(t){ -return li(t)?a(t,ee):Te(t)?[t]:cr(Io(t))},jt.toPlainObject=Ye,jt.transform=function(t,n,r){var e=li(t)||qe(t);if(n=Mr(n,4),null==r)if(e||ze(t)){var o=t.constructor;r=e?li(t)?new o:[]:Ce(o)?en(Zu(Object(t))):{}}else r={};return(e?u:sn)(t,function(t,e,u){return n(r,t,e,u)}),r},jt.unary=function(t){return je(t,1)},jt.union=zo,jt.unionBy=Do,jt.unionWith=$o,jt.uniq=function(t){return t&&t.length?Jn(t):[]},jt.uniqBy=function(t,n){return t&&t.length?Jn(t,Mr(n)):[]},jt.uniqWith=function(t,n){return t&&t.length?Jn(t,N,n):[]; -},jt.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=Yr(e,r)?[e]:nr(e);r=re(r,e),e=ee(ae(e)),r=!(null!=r&&dn(r,e))||delete r[e]}return r},jt.unzip=he,jt.unzipWith=pe,jt.update=function(t,n,r){return null==t?t:Nn(t,n,(typeof r=="function"?r:au)(_n(t,n)),void 0)},jt.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:N,null!=t&&(t=Nn(t,n,(typeof r=="function"?r:au)(_n(t,n)),e)),t},jt.values=uu,jt.valuesIn=function(t){return null==t?[]:O(t,nu(t))},jt.without=Fo,jt.words=fu,jt.wrap=function(t,n){ -return n=null==n?au:n,oi(n,t)},jt.xor=No,jt.xorBy=Po,jt.xorWith=Zo,jt.zip=To,jt.zipObject=function(t,n){return Xn(t||[],n||[],Yt)},jt.zipObjectDeep=function(t,n){return Xn(t||[],n||[],Nn)},jt.zipWith=qo,jt.entries=ru,jt.entriesIn=eu,jt.extend=vi,jt.extendWith=gi,su(jt,jt),jt.add=Ki,jt.attempt=Ui,jt.camelCase=Ii,jt.capitalize=ou,jt.ceil=Gi,jt.clamp=function(t,n,r){return r===N&&(r=n,n=N),r!==N&&(r=Je(r),r=r===r?r:0),n!==N&&(n=Je(n),n=n===n?n:0),tn(Je(t),n,r)},jt.clone=function(t){return nn(t,false,true); -},jt.cloneDeep=function(t){return nn(t,true,true)},jt.cloneDeepWith=function(t,n){return nn(t,true,true,n)},jt.cloneWith=function(t,n){return nn(t,false,true,n)},jt.deburr=iu,jt.divide=Ji,jt.endsWith=function(t,n,r){t=He(t),n=Gn(n);var e=t.length;return r=r===N?e:tn(Ke(r),0,e),r-=n.length,r>=0&&t.indexOf(n,r)==r},jt.eq=Se,jt.escape=function(t){return(t=He(t))&&Y.test(t)?t.replace(G,R):t},jt.escapeRegExp=function(t){return(t=He(t))&&ut.test(t)?t.replace(et,"\\$&"):t},jt.every=function(t,n,r){var e=li(t)?o:fn;return r&&Jr(t,n,r)&&(n=N), -e(t,Mr(n,3))},jt.find=function(t,n){if(n=Mr(n,3),li(t)){var r=v(t,n);return r>-1?t[r]:N}return _(t,n,yo)},jt.findIndex=function(t,n){return t&&t.length?v(t,Mr(n,3)):-1},jt.findKey=function(t,n){return _(t,Mr(n,3),sn,true)},jt.findLast=function(t,n){if(n=Mr(n,3),li(t)){var r=v(t,n,true);return r>-1?t[r]:N}return _(t,n,bo)},jt.findLastIndex=function(t,n){return t&&t.length?v(t,Mr(n,3),true):-1},jt.findLastKey=function(t,n){return _(t,Mr(n,3),hn,true)},jt.floor=Yi,jt.forEach=de,jt.forEachRight=ye,jt.forIn=function(t,n){ -return null==t?t:xo(t,Mr(n),nu)},jt.forInRight=function(t,n){return null==t?t:jo(t,Mr(n),nu)},jt.forOwn=function(t,n){return t&&sn(t,Mr(n))},jt.forOwnRight=function(t,n){return t&&hn(t,Mr(n))},jt.get=Qe,jt.gt=ci,jt.gte=ai,jt.has=function(t,n){return null!=t&&Nr(t,n,dn)},jt.hasIn=Xe,jt.head=ce,jt.identity=au,jt.includes=function(t,n,r,e){return t=We(t)?t:uu(t),r=r&&!e?Ke(r):0,e=t.length,0>r&&(r=Ku(e+r,0)),Ze(t)?e>=r&&-1r&&(r=Ku(e+r,0)),g(t,n,r)):-1},jt.inRange=function(t,n,r){return n=Je(n)||0,r===N?(r=n,n=0):r=Je(r)||0,t=Je(t),t>=Gu(n,r)&&t=-9007199254740991&&9007199254740991>=t; -},jt.isSet=function(t){return De(t)&&"[object Set]"==Fr(t)},jt.isString=Ze,jt.isSymbol=Te,jt.isTypedArray=qe,jt.isUndefined=function(t){return t===N},jt.isWeakMap=function(t){return De(t)&&"[object WeakMap]"==Fr(t)},jt.isWeakSet=function(t){return De(t)&&"[object WeakSet]"==ku.call(t)},jt.join=function(t,n){return t?qu.call(t,n):""},jt.kebabCase=Si,jt.last=ae,jt.lastIndexOf=function(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e;if(r!==N&&(u=Ke(r),u=(0>u?Ku(e+u,0):Gu(u,e-1))+1),n!==n)return B(t,u,true); -for(;u--;)if(t[u]===n)return u;return-1},jt.lowerCase=Ri,jt.lowerFirst=Wi,jt.lt=hi,jt.lte=pi,jt.max=function(t){return t&&t.length?cn(t,au,gn):N},jt.maxBy=function(t,n){return t&&t.length?cn(t,Mr(n),gn):N},jt.mean=function(t){return y(t,au)},jt.meanBy=function(t,n){return y(t,Mr(n))},jt.min=function(t){return t&&t.length?cn(t,au,kn):N},jt.minBy=function(t,n){return t&&t.length?cn(t,Mr(n),kn):N},jt.multiply=Hi,jt.nth=function(t,n){return t&&t.length?Wn(t,Ke(n)):N},jt.noConflict=function(){return Vt._===this&&(Vt._=Eu), -this},jt.noop=hu,jt.now=Xo,jt.pad=function(t,n,r){t=He(t);var e=(n=Ke(n))?D(t):0;return!n||e>=n?t:(n=(n-e)/2,Or(Pu(n),r)+t+Or(Nu(n),r))},jt.padEnd=function(t,n,r){t=He(t);var e=(n=Ke(n))?D(t):0;return n&&n>e?t+Or(n-e,r):t},jt.padStart=function(t,n,r){t=He(t);var e=(n=Ke(n))?D(t):0;return n&&n>e?Or(n-e,r)+t:t},jt.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n),t=He(t).replace(ot,""),Ju(t,n||(ht.test(t)?16:10))},jt.random=function(t,n,r){if(r&&typeof r!="boolean"&&Jr(t,n,r)&&(n=r=N),r===N&&(typeof n=="boolean"?(r=n, -n=N):typeof t=="boolean"&&(r=t,t=N)),t===N&&n===N?(t=0,n=1):(t=Je(t)||0,n===N?(n=t,t=0):n=Je(n)||0),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=Yu(),Gu(t+r*(n-t+Dt("1e-"+((r+"").length-1))),n)):$n(t,n)},jt.reduce=function(t,n,r){var e=li(t)?s:b,u=3>arguments.length;return e(t,Mr(n,4),r,u,yo)},jt.reduceRight=function(t,n,r){var e=li(t)?h:b,u=3>arguments.length;return e(t,Mr(n,4),r,u,bo)},jt.repeat=function(t,n,r){return n=(r?Jr(t,n,r):n===N)?1:Ke(n),Fn(He(t),n)},jt.replace=function(){var t=arguments,n=He(t[0]); -return 3>t.length?n:Hu.call(n,t[1],t[2])},jt.result=function(t,n,r){n=Yr(n,t)?[n]:nr(n);var e=-1,u=n.length;for(u||(t=N,u=1);++e0?t[$n(0,n-1)]:N},jt.size=function(t){if(null==t)return 0;if(We(t)){var n=t.length;return n&&Ze(t)?D(t):n}return De(t)&&(n=Fr(t),"[object Map]"==n||"[object Set]"==n)?t.size:tu(t).length},jt.snakeCase=Bi, -jt.some=function(t,n,r){var e=li(t)?p:Zn;return r&&Jr(t,n,r)&&(n=N),e(t,Mr(n,3))},jt.sortedIndex=function(t,n){return Tn(t,n)},jt.sortedIndexBy=function(t,n,r){return qn(t,n,Mr(r))},jt.sortedIndexOf=function(t,n){var r=t?t.length:0;if(r){var e=Tn(t,n);if(r>e&&Se(t[e],n))return e}return-1},jt.sortedLastIndex=function(t,n){return Tn(t,n,true)},jt.sortedLastIndexBy=function(t,n,r){return qn(t,n,Mr(r),true)},jt.sortedLastIndexOf=function(t,n){if(t&&t.length){var r=Tn(t,n,true)-1;if(Se(t[r],n))return r}return-1; -},jt.startCase=Li,jt.startsWith=function(t,n,r){return t=He(t),r=tn(Ke(r),0,t.length),t.lastIndexOf(Gn(n),r)==r},jt.subtract=Xi,jt.sum=function(t){return t&&t.length?j(t,au):0},jt.sumBy=function(t,n){return t&&t.length?j(t,Mr(n)):0},jt.template=function(t,n,r){var e=jt.templateSettings;r&&Jr(t,n,r)&&(n=N),t=He(t),n=gi({},n,e,Gt),r=gi({},n.imports,e.imports,Gt);var u,o,i=tu(r),f=O(r,i),c=0;r=n.interpolate||bt;var a="__p+='";r=du((n.escape||bt).source+"|"+r.source+"|"+(r===X?lt:bt).source+"|"+(n.evaluate||bt).source+"|$","g"); -var l="sourceURL"in n?"//# sourceURL="+n.sourceURL+"\n":"";if(t.replace(r,function(n,r,e,i,f,l){return e||(e=i),a+=t.slice(c,l).replace(xt,W),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+n.length,n}),a+="';",(n=n.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(T,""):a).replace(q,"$1").replace(V,"$1;"),a="function("+(n||"obj")+"){"+(n?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}", -n=Ui(function(){return Function(i,l+"return "+a).apply(N,f)}),n.source=a,Le(n))throw n;return n},jt.times=function(t,n){if(t=Ke(t),1>t||t>9007199254740991)return[];var r=4294967295,e=Gu(t,4294967295);for(n=Mr(n),t-=4294967295,e=m(e,n);++r=o)return t;if(o=r-D(e),1>o)return e;if(r=i?rr(i,0,o).join(""):t.slice(0,o),u===N)return r+e;if(i&&(o+=r.length-o),Pe(u)){if(t.slice(o).search(u)){var f=r;for(u.global||(u=du(u.source,He(st.exec(u))+"g")),u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===N?o:c)}}else t.indexOf(Gn(u),o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},jt.unescape=function(t){return(t=He(t))&&J.test(t)?t.replace(K,$):t},jt.uniqueId=function(t){ -var n=++Au;return He(t)+n},jt.upperCase=Ci,jt.upperFirst=Mi,jt.each=de,jt.eachRight=ye,jt.first=ce,su(jt,function(){var t={};return sn(jt,function(n,r){wu.call(jt.prototype,r)||(t[r]=n)}),t}(),{chain:false}),jt.VERSION="4.11.2",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){jt[t].placeholder=jt}),u(["drop","take"],function(t,n){Lt.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new Lt(this);r=r===N?1:Ku(Ke(r),0);var u=this.clone();return e?u.__takeCount__=Gu(r,u.__takeCount__):u.__views__.push({ -size:Gu(r,4294967295),type:t+(0>u.__dir__?"Right":"")}),u},Lt.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){var r=n+1,e=1==r||3==r;Lt.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:Mr(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");Lt.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right"); -Lt.prototype[t]=function(){return this.__filtered__?new Lt(this):this[r](1)}}),Lt.prototype.compact=function(){return this.filter(au)},Lt.prototype.find=function(t){return this.filter(t).head()},Lt.prototype.findLast=function(t){return this.reverse().find(t)},Lt.prototype.invokeMap=Ee(function(t,n){return typeof t=="function"?new Lt(this):this.map(function(r){return jn(r,t,n)})}),Lt.prototype.reject=function(t){return t=Mr(t,3),this.filter(function(n){return!t(n)})},Lt.prototype.slice=function(t,n){ -t=Ke(t);var r=this;return r.__filtered__&&(t>0||0>n)?new Lt(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==N&&(n=Ke(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},Lt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Lt.prototype.toArray=function(){return this.take(4294967295)},sn(Lt.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=jt[e?"take"+("last"==n?"Right":""):n],o=e||/^find/.test(n);u&&(jt.prototype[n]=function(){ -function n(t){return t=u.apply(jt,l([t],f)),e&&h?t[0]:t}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof Lt,a=f[0],s=c||li(i);s&&r&&typeof a=="function"&&1!=a.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,a=o&&!h,c=c&&!p;return!o&&s?(i=c?i:new Lt(this),i=t.apply(i,f),i.__actions__.push({func:ve,args:[n],thisArg:N}),new wt(i,h)):a&&c?t.apply(this,f):(i=this.thru(n),a?e?i.value()[0]:i.value():i)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=bu[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t); -jt.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){var u=this.value();return n.apply(li(u)?u:[],t)}return this[r](function(r){return n.apply(li(r)?r:[],t)})}}),sn(Lt.prototype,function(t,n){var r=jt[n];if(r){var e=r.name+"";(co[e]||(co[e]=[])).push({name:n,func:r})}}),co[jr(N,2).name]=[{name:"wrapper",func:N}],Lt.prototype.clone=function(){var t=new Lt(this.__wrapped__);return t.__actions__=cr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=cr(this.__iteratees__), -t.__takeCount__=this.__takeCount__,t.__views__=cr(this.__views__),t},Lt.prototype.reverse=function(){if(this.__filtered__){var t=new Lt(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(),t.__dir__*=-1;return t},Lt.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=li(n),u=0>r,o=e?n.length:0;t=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++co||o==t&&a==t)return Hn(n,this.__actions__);e=[];t:for(;t--&&a>c;){for(u+=r,o=-1,l=n[u];++o=this.__values__.length,n=t?N:this.__values__[this.__index__++];return{done:t,value:n}},jt.prototype.plant=function(t){for(var n,r=this;r instanceof mt;){var e=oe(r);e.__index__=0,e.__values__=N,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},jt.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof Lt?(this.__actions__.length&&(t=new Lt(this)),t=t.reverse(),t.__actions__.push({func:ve, -args:[se],thisArg:N}),new wt(t,this.__chain__)):this.thru(se)},jt.prototype.toJSON=jt.prototype.valueOf=jt.prototype.value=function(){return Hn(this.__wrapped__,this.__actions__)},Uu&&(jt.prototype[Uu]=ge),jt}var N,P=1/0,Z=NaN,T=/\b__p\+='';/g,q=/\b(__p\+=)''\+/g,V=/(__e\(.*?\)|\b__t\))\+'';/g,K=/&(?:amp|lt|gt|quot|#39|#96);/g,G=/[&<>"'`]/g,J=RegExp(K.source),Y=RegExp(G.source),H=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/,rt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,et=/[\\^$.*+?()[\]{}|]/g,ut=RegExp(et.source),ot=/^\s+|\s+$/g,it=/^\s+/,ft=/\s+$/,ct=/[a-zA-Z0-9]+/g,at=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,st=/\w*$/,ht=/^0x/i,pt=/^[-+]0x[0-9a-f]+$/i,_t=/^0b[01]+$/i,vt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,dt=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,bt=/($^)/,xt=/['\n\r\u2028\u2029\\]/g,jt="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",mt="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+jt,wt="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",At=RegExp("['\u2019]","g"),Ot=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),kt=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+wt+jt,"g"),Et=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d+",mt].join("|"),"g"),It=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),St=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rt="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Wt={}; -Wt["[object Float32Array]"]=Wt["[object Float64Array]"]=Wt["[object Int8Array]"]=Wt["[object Int16Array]"]=Wt["[object Int32Array]"]=Wt["[object Uint8Array]"]=Wt["[object Uint8ClampedArray]"]=Wt["[object Uint16Array]"]=Wt["[object Uint32Array]"]=true,Wt["[object Arguments]"]=Wt["[object Array]"]=Wt["[object ArrayBuffer]"]=Wt["[object Boolean]"]=Wt["[object DataView]"]=Wt["[object Date]"]=Wt["[object Error]"]=Wt["[object Function]"]=Wt["[object Map]"]=Wt["[object Number]"]=Wt["[object Object]"]=Wt["[object RegExp]"]=Wt["[object Set]"]=Wt["[object String]"]=Wt["[object WeakMap]"]=false; -var Bt={};Bt["[object Arguments]"]=Bt["[object Array]"]=Bt["[object ArrayBuffer]"]=Bt["[object DataView]"]=Bt["[object Boolean]"]=Bt["[object Date]"]=Bt["[object Float32Array]"]=Bt["[object Float64Array]"]=Bt["[object Int8Array]"]=Bt["[object Int16Array]"]=Bt["[object Int32Array]"]=Bt["[object Map]"]=Bt["[object Number]"]=Bt["[object Object]"]=Bt["[object RegExp]"]=Bt["[object Set]"]=Bt["[object String]"]=Bt["[object Symbol]"]=Bt["[object Uint8Array]"]=Bt["[object Uint8ClampedArray]"]=Bt["[object Uint16Array]"]=Bt["[object Uint32Array]"]=true, -Bt["[object Error]"]=Bt["[object Function]"]=Bt["[object WeakMap]"]=false;var Lt={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O", -"\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Ct={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Mt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Ut={"function":true,object:true},zt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029" -},Dt=parseFloat,$t=parseInt,Ft=Ut[typeof exports]&&exports&&!exports.nodeType?exports:N,Nt=Ut[typeof module]&&module&&!module.nodeType?module:N,Pt=Nt&&Nt.exports===Ft?Ft:N,Zt=I(Ut[typeof self]&&self),Tt=I(Ut[typeof window]&&window),qt=I(Ut[typeof this]&&this),Vt=I(Ft&&Nt&&typeof global=="object"&&global)||Tt!==(qt&&qt.window)&&Tt||Zt||qt||Function("return this")(),Kt=F();(Tt||Zt||{})._=Kt,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return Kt}):Ft&&Nt?(Pt&&((Nt.exports=Kt)._=Kt), -Ft._=Kt):Vt._=Kt}).call(this); \ No newline at end of file +;(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u"']/g,J=RegExp(G.source),Y=RegExp(H.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,nn=/<%=([\s\S]+?)%>/g,tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rn=/^\w*$/,en=/^\./,un=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,on=/[\\^$.*+?()[\]{}|]/g,fn=RegExp(on.source),cn=/^\s+|\s+$/g,an=/^\s+/,ln=/\s+$/,sn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,hn=/\{\n\/\* \[wrapped with (.+)\] \*/,pn=/,? & /,_n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vn=/\\(\\)?/g,gn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dn=/\w*$/,yn=/^[-+]0x[0-9a-f]+$/i,bn=/^0b[01]+$/i,xn=/^\[object .+?Constructor\]$/,jn=/^0o[0-7]+$/i,wn=/^(?:0|[1-9]\d*)$/,mn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,An=/($^)/,kn=/['\n\r\u2028\u2029\\]/g,En="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",On="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+En,Sn="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",In=RegExp("['\u2019]","g"),Rn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),zn=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+Sn+En,"g"),Wn=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)|\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)|\\d+",On].join("|"),"g"),Bn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Ln=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Un="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Cn={}; +Cn["[object Float32Array]"]=Cn["[object Float64Array]"]=Cn["[object Int8Array]"]=Cn["[object Int16Array]"]=Cn["[object Int32Array]"]=Cn["[object Uint8Array]"]=Cn["[object Uint8ClampedArray]"]=Cn["[object Uint16Array]"]=Cn["[object Uint32Array]"]=true,Cn["[object Arguments]"]=Cn["[object Array]"]=Cn["[object ArrayBuffer]"]=Cn["[object Boolean]"]=Cn["[object DataView]"]=Cn["[object Date]"]=Cn["[object Error]"]=Cn["[object Function]"]=Cn["[object Map]"]=Cn["[object Number]"]=Cn["[object Object]"]=Cn["[object RegExp]"]=Cn["[object Set]"]=Cn["[object String]"]=Cn["[object WeakMap]"]=false; +var Dn={};Dn["[object Arguments]"]=Dn["[object Array]"]=Dn["[object ArrayBuffer]"]=Dn["[object DataView]"]=Dn["[object Boolean]"]=Dn["[object Date]"]=Dn["[object Float32Array]"]=Dn["[object Float64Array]"]=Dn["[object Int8Array]"]=Dn["[object Int16Array]"]=Dn["[object Int32Array]"]=Dn["[object Map]"]=Dn["[object Number]"]=Dn["[object Object]"]=Dn["[object RegExp]"]=Dn["[object Set]"]=Dn["[object String]"]=Dn["[object Symbol]"]=Dn["[object Uint8Array]"]=Dn["[object Uint8ClampedArray]"]=Dn["[object Uint16Array]"]=Dn["[object Uint32Array]"]=true, +Dn["[object Error]"]=Dn["[object Function]"]=Dn["[object WeakMap]"]=false;var Mn,Tn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$n=parseFloat,Fn=parseInt,Nn=typeof global=="object"&&global&&global.Object===Object&&global,Pn=typeof self=="object"&&self&&self.Object===Object&&self,Zn=Nn||Pn||Function("return this")(),qn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vn=qn&&typeof module=="object"&&module&&!module.nodeType&&module,Kn=Vn&&Vn.exports===qn,Gn=Kn&&Nn.process; +n:{try{Mn=Gn&&Gn.binding&&Gn.binding("util");break n}catch(n){}Mn=void 0}var Hn=Mn&&Mn.isArrayBuffer,Jn=Mn&&Mn.isDate,Yn=Mn&&Mn.isMap,Qn=Mn&&Mn.isRegExp,Xn=Mn&&Mn.isSet,nt=Mn&&Mn.isTypedArray,tt=j("length"),rt=w({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I", +"\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C", +"\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i", +"\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S", +"\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe", +"\u0149":"'n","\u017f":"s"}),et=w({"&":"&","<":"<",">":">",'"':""","'":"'"}),ut=w({"&":"&","<":"<",">":">",""":'"',"'":"'"}),it=function w(En){function On(n){if(bu(n)&&!cf(n)&&!(n instanceof Mn)){if(n instanceof zn)return n;if(fi.call(n,"__wrapped__"))return Ne(n)}return new zn(n)}function Sn(){}function zn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=F}function Mn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1, +this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Tn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function yt(n,t,r,e,i,o){var f,c=1&t,a=2&t,l=4&t;if(r&&(f=i?r(n,e,i,o):r(n)),f!==F)return f;if(!yu(n))return n;if(e=cf(n)){if(f=Ae(n),!c)return Tr(n,f)}else{var s=go(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(lf(n))return Br(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:ke(n),!c)return a?Nr(n,_t(f,n)):Fr(n,pt(f,n))}else{if(!Dn[s])return i?n:{};f=Ee(n,s,yt,c)}}if(o||(o=new Vn), +i=o.get(n))return i;o.set(n,f);var a=l?a?ge:ve:a?Lu:Bu,p=e?F:a(n);return u(p||n,function(e,u){p&&(u=e,e=n[u]),lt(f,u,yt(e,t,r,u,n,o))}),f}function bt(n){var t=Bu(n);return function(r){return xt(r,n,t)}}function xt(n,t,r){var e=r.length;if(null==n)return!e;for(n=Xu(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===F&&!(u in n)||!i(o))return false}return true}function jt(n,t,r){if(typeof n!="function")throw new ri("Expected a function");return xo(function(){n.apply(F,r)},t)}function wt(n,t,r,e){var u=-1,i=c,o=true,f=n.length,s=[],h=t.length; +if(!f)return s;r&&(t=l(t,S(r))),e?(i=a,o=false):200<=t.length&&(i=R,o=false,t=new qn(t));n:for(;++ut}function Lt(n,t){return null!=n&&fi.call(n,t)}function Ut(n,t){return null!=n&&t in Xu(n)}function Ct(n,t,r){for(var e=r?a:c,u=n[0].length,i=n.length,o=i,f=Gu(i),s=1/0,h=[];o--;){var p=n[o];o&&t&&(p=l(p,S(t))),s=Di(p.length,s),f[o]=!r&&(t||120<=u&&120<=p.length)?new qn(o&&p):F}var p=n[0],_=-1,v=f[0];n:for(;++_t.length?n:Rt(n,gr(t,0,-1)),t=null==n?n:n[Te(Ke(t))],null==t?F:r(t,n,e)}function Tt(n){return bu(n)&&"[object Arguments]"==Wt(n)}function $t(n){return bu(n)&&"[object ArrayBuffer]"==Wt(n)}function Ft(n){return bu(n)&&"[object Date]"==Wt(n); +}function Nt(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!yu(n)&&!bu(t))t=n!==n&&t!==t;else n:{var i=cf(n),o=cf(t),f="[object Array]",c="[object Array]";i||(f=go(n),f="[object Arguments]"==f?"[object Object]":f),o||(c=go(t),c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&lf(n)){if(!lf(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Vn),t=i||vf(n)?he(n,t,r,e,Nt,u):pe(n,t,f,r,e,Nt,u);else{if(!(1&r)&&(i=a&&fi.call(n,"__wrapped__"),f=o&&fi.call(t,"__wrapped__"), +i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Vn),t=Nt(n,t,r,e,u);break n}if(c)t:if(u||(u=new Vn),i=1&r,f=Bu(n),o=f.length,c=Bu(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:fi.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++at?r:0,Se(t,r)?n[t]:F}function er(n,t,r){var e=-1;return t=l(t.length?t:[Fu],S(be())),n=Qt(n,function(n){return{a:l(t,function(t){return t(n)}),b:++e,c:n}}),A(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e=f?c:c*("desc"==r[e]?-1:1); +break n}}e=n.b-t.b}return e})}function ur(n,t){return n=Xu(n),ir(n,t,function(t,r){return Wu(n,r)})}function ir(n,t,r){for(var e=-1,u=t.length,i={};++et||9007199254740991t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Gu(u);++e=u){for(;e>>1,o=n[i];null!==o&&!mu(o)&&(r?o<=t:ot.length?n:Rt(n,gr(t,0,-1)), +null==n||delete n[Te(Ke(t))]}function kr(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++ie)return e?mr(n[0]):[];for(var u=-1,i=Gu(e);++u=e?n:gr(n,t,r)}function Br(n,t){if(t)return n.slice();var r=n.length,r=di?di(r):new n.constructor(r);return n.copy(r),r}function Lr(n){var t=new n.constructor(n.byteLength);return new gi(t).set(new gi(n)),t}function Ur(n,t){return new n.constructor(t?Lr(n.buffer):n.buffer,n.byteOffset,n.length)}function Cr(n,t){ +if(n!==t){var r=n!==F,e=null===n,u=n===n,i=mu(n),o=t!==F,f=null===t,c=t===t,a=mu(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&nu?F:i,u=1),t=Xu(t);++eo&&f[0]!==a&&f[o-1]!==a?[]:C(f,a),o-=c.length,or?r?lr(t,n):t:(r=lr(t,Ii(n/T(t))),Bn.test(t)?Wr($(r),0,n).join(""):r.slice(0,n))}function ie(n,t,e,u){function i(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Gu(l+c),h=this&&this!==Zn&&this instanceof i?f:n;++at||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Dr(e,r,h[4]):r,i[4]=e?C(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Mr(e,r,h[6]):r,i[6]=e?C(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Di(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0], +i[1]=t),n=i[0],t=i[1],r=i[2],e=i[3],u=i[4],f=i[9]=null==i[9]?c?0:n.length:Ci(i[9]-a,0),!f&&24&t&&(t&=-25),Ce((h?ao:bo)(t&&1!=t?8==t||16==t?Yr(n,t,f):32!=t&&33!=t||u.length?ne.apply(F,i):ie(n,t,r,e):Kr(n,t,r),i),n,t)}function he(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t;var c=-1,a=true,l=2&r?new qn:F;for(i.set(n,t),i.set(t,n);++cr&&(r=Ci(e+r,0)),g(n,be(t,3),r)):-1}function Ze(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==F&&(u=Eu(r),u=0>r?Ci(e+u,0):Di(u,e-1)),g(n,be(t,3),u,true)}function qe(n){return(null==n?0:n.length)?Et(n,1):[]; +}function Ve(n){return n&&n.length?n[0]:F}function Ke(n){var t=null==n?0:n.length;return t?n[t-1]:F}function Ge(n,t){return n&&n.length&&t&&t.length?fr(n,t):n}function He(n){return null==n?n:Fi.call(n)}function Je(n){if(!n||!n.length)return[];var t=0;return n=f(n,function(n){if(pu(n))return t=Ci(n.length,t),true}),E(t,function(t){return l(n,j(t))})}function Ye(n,t){if(!n||!n.length)return[];var e=Je(n);return null==t?e:l(e,function(n){return r(t,F,n)})}function Qe(n){return n=On(n),n.__chain__=true,n; +}function Xe(n,t){return t(n)}function nu(){return this}function tu(n,t){return(cf(n)?u:io)(n,be(t,3))}function ru(n,t){return(cf(n)?i:oo)(n,be(t,3))}function eu(n,t){return(cf(n)?l:Qt)(n,be(t,3))}function uu(n,t,r){return t=r?F:t,t=n&&null==t?n.length:t,se(n,128,F,F,F,F,t)}function iu(n,t){var r;if(typeof t!="function")throw new ri("Expected a function");return n=Eu(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=F),r}}function ou(n,t,r){return t=r?F:t,n=se(n,8,F,F,F,F,F,t),n.placeholder=ou.placeholder, +n}function fu(n,t,r){return t=r?F:t,n=se(n,16,F,F,F,F,F,t),n.placeholder=fu.placeholder,n}function cu(n,t,r){function e(t){var r=c,e=a;return c=a=F,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===F||r>=t||0>r||g&&n>=l}function i(){var n=Ho();if(u(n))return o(n);var r,e=xo;r=n-_,n=t-(n-p),r=g?Di(n,l-r):n,h=e(i,r)}function o(n){return h=F,d&&c?e(n):(c=a=F,s)}function f(){var n=Ho(),r=u(n);if(c=arguments,a=this,p=n,r){if(h===F)return _=n=p,h=xo(i,t),v?e(n):s;if(g)return h=xo(i,t),e(p)}return h===F&&(h=xo(i,t)), +s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ri("Expected a function");return t=Su(t)||0,yu(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Ci(Su(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==F&&so(h),_=0,c=p=a=h=F},f.flush=function(){return h===F?s:o(Ho())},f}function au(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=n.apply(this,e),r.cache=i.set(u,e)||i,e)}if(typeof n!="function"||null!=t&&typeof t!="function")throw new ri("Expected a function"); +return r.cache=new(au.Cache||Pn),r}function lu(n){if(typeof n!="function")throw new ri("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function su(n,t){return n===t||n!==n&&t!==t}function hu(n){return null!=n&&du(n.length)&&!vu(n)}function pu(n){return bu(n)&&hu(n)}function _u(n){if(!bu(n))return false;var t=Wt(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!ju(n); +}function vu(n){return!!yu(n)&&(n=Wt(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function gu(n){return typeof n=="number"&&n==Eu(n)}function du(n){return typeof n=="number"&&-1=n}function yu(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function bu(n){return null!=n&&typeof n=="object"}function xu(n){return typeof n=="number"||bu(n)&&"[object Number]"==Wt(n)}function ju(n){return!(!bu(n)||"[object Object]"!=Wt(n))&&(n=yi(n), +null===n||(n=fi.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&oi.call(n)==si))}function wu(n){return typeof n=="string"||!cf(n)&&bu(n)&&"[object String]"==Wt(n)}function mu(n){return typeof n=="symbol"||bu(n)&&"[object Symbol]"==Wt(n)}function Au(n){if(!n)return[];if(hu(n))return wu(n)?$(n):Tr(n);if(mi&&n[mi]){n=n[mi]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=go(n),("[object Map]"==t?L:"[object Set]"==t?D:Cu)(n)}function ku(n){return n?(n=Su(n), +n===N||n===-N?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Eu(n){n=ku(n);var t=n%1;return n===n?t?n-t:n:0}function Ou(n){return n?dt(Eu(n),0,4294967295):0}function Su(n){if(typeof n=="number")return n;if(mu(n))return P;if(yu(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,n=yu(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(cn,"");var t=bn.test(n);return t||jn.test(n)?Fn(n.slice(2),t?2:8):yn.test(n)?P:+n}function Iu(n){return $r(n,Lu(n))}function Ru(n){return null==n?"":wr(n); +}function zu(n,t,r){return n=null==n?F:Rt(n,t),n===F?r:n}function Wu(n,t){return null!=n&&me(n,t,Ut)}function Bu(n){return hu(n)?Gn(n):Jt(n)}function Lu(n){if(hu(n))n=Gn(n,true);else if(yu(n)){var t,r=We(n),e=[];for(t in n)("constructor"!=t||!r&&fi.call(n,t))&&e.push(t);n=e}else{if(t=[],null!=n)for(r in Xu(n))t.push(r);n=t}return n}function Uu(n,t){if(null==n)return{};var r=l(ge(n),function(n){return[n]});return t=be(t),ir(n,r,function(n,r){return t(n,r[0])})}function Cu(n){return null==n?[]:I(n,Bu(n)); +}function Du(n){return Ff(Ru(n).toLowerCase())}function Mu(n){return(n=Ru(n))&&n.replace(mn,rt).replace(Rn,"")}function Tu(n,t,r){return n=Ru(n),t=r?F:t,t===F?Ln.test(n)?n.match(Wn)||[]:n.match(_n)||[]:n.match(t)||[]}function $u(n){return function(){return n}}function Fu(n){return n}function Nu(n){return Ht(typeof n=="function"?n:yt(n,1))}function Pu(n,t,r){var e=Bu(t),i=It(t,e);null!=r||yu(t)&&(i.length||!e.length)||(r=t,t=n,n=this,i=It(t,Bu(t)));var o=!(yu(r)&&"chain"in r&&!r.chain),f=vu(n);return u(i,function(r){ +var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Tr(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,s([this.value()],arguments))})}),n}function Zu(){}function qu(n){return Re(n)?j(Te(n)):or(n)}function Vu(){return[]}function Ku(){return false}En=null==En?Zn:it.defaults(Zn.Object(),En,it.pick(Zn,Un));var Gu=En.Array,Hu=En.Date,Ju=En.Error,Yu=En.Function,Qu=En.Math,Xu=En.Object,ni=En.RegExp,ti=En.String,ri=En.TypeError,ei=Gu.prototype,ui=Xu.prototype,ii=En["__core-js_shared__"],oi=Yu.prototype.toString,fi=ui.hasOwnProperty,ci=0,ai=function(){ +var n=/[^.]+$/.exec(ii&&ii.keys&&ii.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),li=ui.toString,si=oi.call(Xu),hi=Zn._,pi=ni("^"+oi.call(fi).replace(on,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_i=Kn?En.Buffer:F,vi=En.Symbol,gi=En.Uint8Array,di=_i?_i.f:F,yi=U(Xu.getPrototypeOf,Xu),bi=Xu.create,xi=ui.propertyIsEnumerable,ji=ei.splice,wi=vi?vi.isConcatSpreadable:F,mi=vi?vi.iterator:F,Ai=vi?vi.toStringTag:F,ki=function(){try{var n=we(Xu,"defineProperty"); +return n({},"",{}),n}catch(n){}}(),Ei=En.clearTimeout!==Zn.clearTimeout&&En.clearTimeout,Oi=Hu&&Hu.now!==Zn.Date.now&&Hu.now,Si=En.setTimeout!==Zn.setTimeout&&En.setTimeout,Ii=Qu.ceil,Ri=Qu.floor,zi=Xu.getOwnPropertySymbols,Wi=_i?_i.isBuffer:F,Bi=En.isFinite,Li=ei.join,Ui=U(Xu.keys,Xu),Ci=Qu.max,Di=Qu.min,Mi=Hu.now,Ti=En.parseInt,$i=Qu.random,Fi=ei.reverse,Ni=we(En,"DataView"),Pi=we(En,"Map"),Zi=we(En,"Promise"),qi=we(En,"Set"),Vi=we(En,"WeakMap"),Ki=we(Xu,"create"),Gi=Vi&&new Vi,Hi={},Ji=$e(Ni),Yi=$e(Pi),Qi=$e(Zi),Xi=$e(qi),no=$e(Vi),to=vi?vi.prototype:F,ro=to?to.valueOf:F,eo=to?to.toString:F,uo=function(){ +function n(){}return function(t){return yu(t)?bi?bi(t):(n.prototype=t,t=new n,n.prototype=F,t):{}}}();On.templateSettings={escape:Q,evaluate:X,interpolate:nn,variable:"",imports:{_:On}},On.prototype=Sn.prototype,On.prototype.constructor=On,zn.prototype=uo(Sn.prototype),zn.prototype.constructor=zn,Mn.prototype=uo(Sn.prototype),Mn.prototype.constructor=Mn,Tn.prototype.clear=function(){this.__data__=Ki?Ki(null):{},this.size=0},Tn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n], +this.size-=n?1:0,n},Tn.prototype.get=function(n){var t=this.__data__;return Ki?(n=t[n],"__lodash_hash_undefined__"===n?F:n):fi.call(t,n)?t[n]:F},Tn.prototype.has=function(n){var t=this.__data__;return Ki?t[n]!==F:fi.call(t,n)},Tn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Ki&&t===F?"__lodash_hash_undefined__":t,this},Nn.prototype.clear=function(){this.__data__=[],this.size=0},Nn.prototype.delete=function(n){var t=this.__data__;return n=st(t,n),!(0>n)&&(n==t.length-1?t.pop():ji.call(t,n,1), +--this.size,true)},Nn.prototype.get=function(n){var t=this.__data__;return n=st(t,n),0>n?F:t[n][1]},Nn.prototype.has=function(n){return-1e?(++this.size,r.push([n,t])):r[e][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Tn,map:new(Pi||Nn),string:new Tn}},Pn.prototype.delete=function(n){return n=xe(this,n).delete(n),this.size-=n?1:0,n},Pn.prototype.get=function(n){return xe(this,n).get(n); +},Pn.prototype.has=function(n){return xe(this,n).has(n)},Pn.prototype.set=function(n,t){var r=xe(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},qn.prototype.add=qn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},qn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.clear=function(){this.__data__=new Nn,this.size=0},Vn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Vn.prototype.get=function(n){ +return this.__data__.get(n)},Vn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Nn){var e=r.__data__;if(!Pi||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Pn(e)}return r.set(n,t),this.size=r.size,this};var io=qr(Ot),oo=qr(St,true),fo=Vr(),co=Vr(true),ao=Gi?function(n,t){return Gi.set(n,t),n}:Fu,lo=ki?function(n,t){return ki(n,"toString",{configurable:true,enumerable:false,value:$u(t),writable:true})}:Fu,so=Ei||function(n){ +return Zn.clearTimeout(n)},ho=qi&&1/D(new qi([,-0]))[1]==N?function(n){return new qi(n)}:Zu,po=Gi?function(n){return Gi.get(n)}:Zu,_o=zi?U(zi,Xu):Vu,vo=zi?function(n){for(var t=[];n;)s(t,_o(n)),n=yi(n);return t}:Vu,go=Wt;(Ni&&"[object DataView]"!=go(new Ni(new ArrayBuffer(1)))||Pi&&"[object Map]"!=go(new Pi)||Zi&&"[object Promise]"!=go(Zi.resolve())||qi&&"[object Set]"!=go(new qi)||Vi&&"[object WeakMap]"!=go(new Vi))&&(go=function(n){var t=Wt(n);if(n=(n="[object Object]"==t?n.constructor:F)?$e(n):"")switch(n){ +case Ji:return"[object DataView]";case Yi:return"[object Map]";case Qi:return"[object Promise]";case Xi:return"[object Set]";case no:return"[object WeakMap]"}return t});var yo=ii?vu:Ku,bo=De(ao),xo=Si||function(n,t){return Zn.setTimeout(n,t)},jo=De(lo),wo=function(n){n=au(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return en.test(n)&&t.push(""),n.replace(un,function(n,r,e,u){t.push(e?u.replace(vn,"$1"):r||n)}),t}),mo=sr(function(n,t){return pu(n)?wt(n,Et(t,1,pu,true)):[]; +}),Ao=sr(function(n,t){var r=Ke(t);return pu(r)&&(r=F),pu(n)?wt(n,Et(t,1,pu,true),be(r,2)):[]}),ko=sr(function(n,t){var r=Ke(t);return pu(r)&&(r=F),pu(n)?wt(n,Et(t,1,pu,true),F,r):[]}),Eo=sr(function(n){var t=l(n,Ir);return t.length&&t[0]===n[0]?Ct(t):[]}),Oo=sr(function(n){var t=Ke(n),r=l(n,Ir);return t===Ke(r)?t=F:r.pop(),r.length&&r[0]===n[0]?Ct(r,be(t,2)):[]}),So=sr(function(n){var t=Ke(n),r=l(n,Ir);return(t=typeof t=="function"?t:F)&&r.pop(),r.length&&r[0]===n[0]?Ct(r,F,t):[]}),Io=sr(Ge),Ro=_e(function(n,t){ +var r=null==n?0:n.length,e=gt(n,t);return cr(n,l(t,function(n){return Se(n,r)?+n:n}).sort(Cr)),e}),zo=sr(function(n){return mr(Et(n,1,pu,true))}),Wo=sr(function(n){var t=Ke(n);return pu(t)&&(t=F),mr(Et(n,1,pu,true),be(t,2))}),Bo=sr(function(n){var t=Ke(n),t=typeof t=="function"?t:F;return mr(Et(n,1,pu,true),F,t)}),Lo=sr(function(n,t){return pu(n)?wt(n,t):[]}),Uo=sr(function(n){return Or(f(n,pu))}),Co=sr(function(n){var t=Ke(n);return pu(t)&&(t=F),Or(f(n,pu),be(t,2))}),Do=sr(function(n){var t=Ke(n),t=typeof t=="function"?t:F; +return Or(f(n,pu),F,t)}),Mo=sr(Je),To=sr(function(n){var t=n.length,t=1=t}),ff=Tt(function(){return arguments}())?Tt:function(n){return bu(n)&&fi.call(n,"callee")&&!xi.call(n,"callee")},cf=Gu.isArray,af=Hn?S(Hn):$t,lf=Wi||Ku,sf=Jn?S(Jn):Ft,hf=Yn?S(Yn):Pt,pf=Qn?S(Qn):Vt,_f=Xn?S(Xn):Kt,vf=nt?S(nt):Gt,gf=fe(Yt),df=fe(function(n,t){return n<=t}),yf=Zr(function(n,t){if(We(t)||hu(t))$r(t,Bu(t),n);else for(var r in t)fi.call(t,r)&<(n,r,t[r]); +}),bf=Zr(function(n,t){$r(t,Lu(t),n)}),xf=Zr(function(n,t,r,e){$r(t,Lu(t),n,e)}),jf=Zr(function(n,t,r,e){$r(t,Bu(t),n,e)}),wf=_e(gt),mf=sr(function(n){return n.push(F,ct),r(xf,F,n)}),Af=sr(function(n){return n.push(F,Le),r(If,F,n)}),kf=te(function(n,t,r){n[t]=r},$u(Fu)),Ef=te(function(n,t,r){fi.call(n,t)?n[t].push(r):n[t]=[r]},be),Of=sr(Mt),Sf=Zr(function(n,t,r){tr(n,t,r)}),If=Zr(function(n,t,r,e){tr(n,t,r,e)}),Rf=_e(function(n,t){var r={};if(null==n)return r;var e=false;t=l(t,function(t){return t=zr(t,n), +e||(e=1--n)return t.apply(this,arguments)}},On.ary=uu,On.assign=yf,On.assignIn=bf,On.assignInWith=xf,On.assignWith=jf,On.at=wf,On.before=iu,On.bind=Jo,On.bindAll=Pf,On.bindKey=Yo,On.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return cf(n)?n:[n]},On.chain=Qe,On.chunk=function(n,t,r){if(t=(r?Ie(n,t,r):t===F)?1:Ci(Eu(t),0), +r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Gu(Ii(r/t));et?0:t,e)):[]; +},On.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Eu(t),t=e-t,gr(n,0,0>t?0:t)):[]},On.dropRightWhile=function(n,t){return n&&n.length?kr(n,be(t,3),true,true):[]},On.dropWhile=function(n,t){return n&&n.length?kr(n,be(t,3),true):[]},On.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&Ie(n,t,r)&&(r=0,e=u),u=n.length,r=Eu(r),0>r&&(r=-r>u?0:u+r),e=e===F||e>u?u:Eu(e),0>e&&(e+=u),e=r>e?0:Ou(e);r>>0,r?(n=Ru(n))&&(typeof t=="string"||null!=t&&!pf(t))&&(t=wr(t), +!t&&Bn.test(n))?Wr($(n),0,r):n.split(t,r):[]},On.spread=function(n,t){if(typeof n!="function")throw new ri("Expected a function");return t=t===F?0:Ci(Eu(t),0),sr(function(e){var u=e[t];return e=Wr(e,0,t),u&&s(e,u),r(n,this,e)})},On.tail=function(n){var t=null==n?0:n.length;return t?gr(n,1,t):[]},On.take=function(n,t,r){return n&&n.length?(t=r||t===F?1:Eu(t),gr(n,0,0>t?0:t)):[]},On.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Eu(t),t=e-t,gr(n,0>t?0:t,e)):[]},On.takeRightWhile=function(n,t){ +return n&&n.length?kr(n,be(t,3),false,true):[]},On.takeWhile=function(n,t){return n&&n.length?kr(n,be(t,3)):[]},On.tap=function(n,t){return t(n),n},On.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ri("Expected a function");return yu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),cu(n,t,{leading:e,maxWait:t,trailing:u})},On.thru=Xe,On.toArray=Au,On.toPairs=Wf,On.toPairsIn=Bf,On.toPath=function(n){return cf(n)?l(n,Te):mu(n)?[n]:Tr(wo(Ru(n)))},On.toPlainObject=Iu, +On.transform=function(n,t,r){var e=cf(n),i=e||lf(n)||vf(n);if(t=be(t,4),null==r){var o=n&&n.constructor;r=i?e?new o:[]:yu(n)&&vu(o)?uo(yi(n)):{}}return(i?u:Ot)(n,function(n,e,u){return t(r,n,e,u)}),r},On.unary=function(n){return uu(n,1)},On.union=zo,On.unionBy=Wo,On.unionWith=Bo,On.uniq=function(n){return n&&n.length?mr(n):[]},On.uniqBy=function(n,t){return n&&n.length?mr(n,be(t,2)):[]},On.uniqWith=function(n,t){return t=typeof t=="function"?t:F,n&&n.length?mr(n,F,t):[]},On.unset=function(n,t){return null==n||Ar(n,t); +},On.unzip=Je,On.unzipWith=Ye,On.update=function(n,t,r){return null==n?n:_r(n,t,Rr(r)(Rt(n,t)),void 0)},On.updateWith=function(n,t,r,e){return e=typeof e=="function"?e:F,null!=n&&(n=_r(n,t,Rr(r)(Rt(n,t)),e)),n},On.values=Cu,On.valuesIn=function(n){return null==n?[]:I(n,Lu(n))},On.without=Lo,On.words=Tu,On.wrap=function(n,t){return tf(Rr(t),n)},On.xor=Uo,On.xorBy=Co,On.xorWith=Do,On.zip=Mo,On.zipObject=function(n,t){return Sr(n||[],t||[],lt)},On.zipObjectDeep=function(n,t){return Sr(n||[],t||[],_r); +},On.zipWith=To,On.entries=Wf,On.entriesIn=Bf,On.extend=bf,On.extendWith=xf,Pu(On,On),On.add=Xf,On.attempt=Nf,On.camelCase=Lf,On.capitalize=Du,On.ceil=nc,On.clamp=function(n,t,r){return r===F&&(r=t,t=F),r!==F&&(r=Su(r),r=r===r?r:0),t!==F&&(t=Su(t),t=t===t?t:0),dt(Su(n),t,r)},On.clone=function(n){return yt(n,4)},On.cloneDeep=function(n){return yt(n,5)},On.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:F,yt(n,5,t)},On.cloneWith=function(n,t){return t=typeof t=="function"?t:F,yt(n,4,t)}, +On.conformsTo=function(n,t){return null==t||xt(n,t,Bu(t))},On.deburr=Mu,On.defaultTo=function(n,t){return null==n||n!==n?t:n},On.divide=tc,On.endsWith=function(n,t,r){n=Ru(n),t=wr(t);var e=n.length,e=r=r===F?e:dt(Eu(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},On.eq=su,On.escape=function(n){return(n=Ru(n))&&Y.test(n)?n.replace(H,et):n},On.escapeRegExp=function(n){return(n=Ru(n))&&fn.test(n)?n.replace(on,"\\$&"):n},On.every=function(n,t,r){var e=cf(n)?o:mt;return r&&Ie(n,t,r)&&(t=F),e(n,be(t,3)); +},On.find=No,On.findIndex=Pe,On.findKey=function(n,t){return v(n,be(t,3),Ot)},On.findLast=Po,On.findLastIndex=Ze,On.findLastKey=function(n,t){return v(n,be(t,3),St)},On.floor=rc,On.forEach=tu,On.forEachRight=ru,On.forIn=function(n,t){return null==n?n:fo(n,be(t,3),Lu)},On.forInRight=function(n,t){return null==n?n:co(n,be(t,3),Lu)},On.forOwn=function(n,t){return n&&Ot(n,be(t,3))},On.forOwnRight=function(n,t){return n&&St(n,be(t,3))},On.get=zu,On.gt=uf,On.gte=of,On.has=function(n,t){return null!=n&&me(n,t,Lt); +},On.hasIn=Wu,On.head=Ve,On.identity=Fu,On.includes=function(n,t,r,e){return n=hu(n)?n:Cu(n),r=r&&!e?Eu(r):0,e=n.length,0>r&&(r=Ci(e+r,0)),wu(n)?r<=e&&-1r&&(r=Ci(e+r,0)),d(n,t,r)):-1},On.inRange=function(n,t,r){return t=ku(t),r===F?(r=t,t=0):r=ku(r),n=Su(n),n>=Di(t,r)&&n=n},On.isSet=_f,On.isString=wu,On.isSymbol=mu,On.isTypedArray=vf,On.isUndefined=function(n){return n===F},On.isWeakMap=function(n){return bu(n)&&"[object WeakMap]"==go(n)},On.isWeakSet=function(n){return bu(n)&&"[object WeakSet]"==Wt(n)},On.join=function(n,t){ +return null==n?"":Li.call(n,t)},On.kebabCase=Uf,On.last=Ke,On.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==F&&(u=Eu(r),u=0>u?Ci(e+u,0):Di(u,e-1)),t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=g(n,b,u,true);return n},On.lowerCase=Cf,On.lowerFirst=Df,On.lt=gf,On.lte=df,On.max=function(n){return n&&n.length?At(n,Fu,Bt):F},On.maxBy=function(n,t){return n&&n.length?At(n,be(t,2),Bt):F},On.mean=function(n){return x(n,Fu)},On.meanBy=function(n,t){return x(n,be(t,2))},On.min=function(n){ +return n&&n.length?At(n,Fu,Yt):F},On.minBy=function(n,t){return n&&n.length?At(n,be(t,2),Yt):F},On.stubArray=Vu,On.stubFalse=Ku,On.stubObject=function(){return{}},On.stubString=function(){return""},On.stubTrue=function(){return true},On.multiply=ec,On.nth=function(n,t){return n&&n.length?rr(n,Eu(t)):F},On.noConflict=function(){return Zn._===this&&(Zn._=hi),this},On.noop=Zu,On.now=Ho,On.pad=function(n,t,r){n=Ru(n);var e=(t=Eu(t))?T(n):0;return!t||e>=t?n:(t=(t-e)/2,ue(Ri(t),r)+n+ue(Ii(t),r))},On.padEnd=function(n,t,r){ +n=Ru(n);var e=(t=Eu(t))?T(n):0;return t&&et){var e=n;n=t,t=e}return r||n%1||t%1?(r=$i(),Di(n+r*(t-n+$n("1e-"+((r+"").length-1))),t)):ar(n,t); +},On.reduce=function(n,t,r){var e=cf(n)?h:m,u=3>arguments.length;return e(n,be(t,4),r,u,io)},On.reduceRight=function(n,t,r){var e=cf(n)?p:m,u=3>arguments.length;return e(n,be(t,4),r,u,oo)},On.repeat=function(n,t,r){return t=(r?Ie(n,t,r):t===F)?1:Eu(t),lr(Ru(n),t)},On.replace=function(){var n=arguments,t=Ru(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},On.result=function(n,t,r){t=zr(t,n);var e=-1,u=t.length;for(u||(u=1,n=F);++en||9007199254740991=i)return n;if(i=r-T(e),1>i)return e;if(r=o?Wr(o,0,i).join(""):n.slice(0,i), +u===F)return r+e;if(o&&(i+=r.length-i),pf(u)){if(n.slice(i).search(u)){var f=r;for(u.global||(u=ni(u.source,Ru(dn.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===F?i:c)}}else n.indexOf(wr(u),i)!=i&&(u=r.lastIndexOf(u),-1u.__dir__?"Right":"")}),u},Mn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse(); +}}),u(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;Mn.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:be(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u(["head","last"],function(n,t){var r="take"+(t?"Right":"");Mn.prototype[n]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Mn.prototype[n]=function(){return this.__filtered__?new Mn(this):this[r](1)}}),Mn.prototype.compact=function(){ +return this.filter(Fu)},Mn.prototype.find=function(n){return this.filter(n).head()},Mn.prototype.findLast=function(n){return this.reverse().find(n)},Mn.prototype.invokeMap=sr(function(n,t){return typeof n=="function"?new Mn(this):this.map(function(r){return Mt(r,n,t)})}),Mn.prototype.reject=function(n){return this.filter(lu(be(n)))},Mn.prototype.slice=function(n,t){n=Eu(n);var r=this;return r.__filtered__&&(0t)?new Mn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==F&&(t=Eu(t),r=0>t?r.dropRight(-t):r.take(t-n)), +r)},Mn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Mn.prototype.toArray=function(){return this.take(4294967295)},Ot(Mn.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=On[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(On.prototype[t]=function(){function t(n){return n=u.apply(On,s([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Mn,a=f[0],l=c||cf(o);l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false); +var h=this.__chain__,p=!!this.__actions__.length,a=i&&!h,c=c&&!p;return!i&&l?(o=c?o:new Mn(this),o=n.apply(o,f),o.__actions__.push({func:Xe,args:[t],thisArg:F}),new zn(o,h)):a&&c?n.apply(this,f):(o=this.thru(t),a?e?o.value()[0]:o.value():o)})}),u("pop push shift sort splice unshift".split(" "),function(n){var t=ei[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);On.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(cf(u)?u:[],n); +}return this[r](function(r){return t.apply(cf(r)?r:[],n)})}}),Ot(Mn.prototype,function(n,t){var r=On[t];if(r){var e=r.name+"";(Hi[e]||(Hi[e]=[])).push({name:t,func:r})}}),Hi[ne(F,2).name]=[{name:"wrapper",func:F}],Mn.prototype.clone=function(){var n=new Mn(this.__wrapped__);return n.__actions__=Tr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Tr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Tr(this.__views__),n},Mn.prototype.reverse=function(){ +if(this.__filtered__){var n=new Mn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Mn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=cf(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++ci||i==n&&a==n)return Er(t,this.__actions__);e=[];n:for(;n--&&c=this.__values__.length; +return{done:n,value:n?F:this.__values__[this.__index__++]}},On.prototype.plant=function(n){for(var t,r=this;r instanceof Sn;){var e=Ne(r);e.__index__=0,e.__values__=F,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},On.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Mn?(this.__actions__.length&&(n=new Mn(this)),n=n.reverse(),n.__actions__.push({func:Xe,args:[He],thisArg:F}),new zn(n,this.__chain__)):this.thru(He)},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){ +return Er(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,mi&&(On.prototype[mi]=nu),On}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Zn._=it, define(function(){return it})):Vn?((Vn.exports=it)._=it,qn._=it):Zn._=it}).call(this); \ No newline at end of file diff --git a/node_modules/lodash/map.js b/node_modules/lodash/map.js index e9f9f22..22efee7 100644 --- a/node_modules/lodash/map.js +++ b/node_modules/lodash/map.js @@ -22,8 +22,7 @@ var arrayMap = require('./_arrayMap'), * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * diff --git a/node_modules/lodash/mapKeys.js b/node_modules/lodash/mapKeys.js index 8af3ac5..3b68797 100644 --- a/node_modules/lodash/mapKeys.js +++ b/node_modules/lodash/mapKeys.js @@ -1,4 +1,5 @@ -var baseForOwn = require('./_baseForOwn'), +var baseAssignValue = require('./_baseAssignValue'), + baseForOwn = require('./_baseForOwn'), baseIteratee = require('./_baseIteratee'); /** @@ -12,8 +13,7 @@ var baseForOwn = require('./_baseForOwn'), * @since 3.8.0 * @category Object * @param {Object} object The object to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapValues * @example @@ -28,7 +28,7 @@ function mapKeys(object, iteratee) { iteratee = baseIteratee(iteratee, 3); baseForOwn(object, function(value, key, object) { - result[iteratee(value, key, object)] = value; + baseAssignValue(result, iteratee(value, key, object), value); }); return result; } diff --git a/node_modules/lodash/mapValues.js b/node_modules/lodash/mapValues.js index 610f458..4ec0825 100644 --- a/node_modules/lodash/mapValues.js +++ b/node_modules/lodash/mapValues.js @@ -1,4 +1,5 @@ -var baseForOwn = require('./_baseForOwn'), +var baseAssignValue = require('./_baseAssignValue'), + baseForOwn = require('./_baseForOwn'), baseIteratee = require('./_baseIteratee'); /** @@ -12,8 +13,7 @@ var baseForOwn = require('./_baseForOwn'), * @since 2.4.0 * @category Object * @param {Object} object The object to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The function invoked per iteration. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapKeys * @example @@ -35,7 +35,7 @@ function mapValues(object, iteratee) { iteratee = baseIteratee(iteratee, 3); baseForOwn(object, function(value, key, object) { - result[key] = iteratee(value, key, object); + baseAssignValue(result, key, iteratee(value, key, object)); }); return result; } diff --git a/node_modules/lodash/matches.js b/node_modules/lodash/matches.js index 16fe16d..11145db 100644 --- a/node_modules/lodash/matches.js +++ b/node_modules/lodash/matches.js @@ -1,32 +1,39 @@ var baseClone = require('./_baseClone'), baseMatches = require('./_baseMatches'); +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + /** * Creates a function that performs a partial deep comparison between a given * object and `source`, returning `true` if the given object has equivalent - * property values, else `false`. The created function is equivalent to - * `_.isMatch` with a `source` partially applied. + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. * - * **Note:** This method supports comparing the same values as `_.isEqual`. + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. * * @static * @memberOf _ * @since 3.0.0 * @category Util * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } * ]; * - * _.filter(users, _.matches({ 'age': 40, 'active': false })); - * // => [{ 'user': 'fred', 'age': 40, 'active': false }] + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] */ function matches(source) { - return baseMatches(baseClone(source, true)); + return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); } module.exports = matches; diff --git a/node_modules/lodash/matchesProperty.js b/node_modules/lodash/matchesProperty.js index 3dd59d5..cc062ac 100644 --- a/node_modules/lodash/matchesProperty.js +++ b/node_modules/lodash/matchesProperty.js @@ -1,12 +1,17 @@ var baseClone = require('./_baseClone'), baseMatchesProperty = require('./_baseMatchesProperty'); +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + /** * Creates a function that performs a partial deep comparison between the * value at `path` of a given object to `srcValue`, returning `true` if the * object value is equivalent, else `false`. * - * **Note:** This method supports comparing the same values as `_.isEqual`. + * **Note:** Partial comparisons will match empty array and empty object + * `srcValue` values against any array or object value, respectively. See + * `_.isEqual` for a list of supported value comparisons. * * @static * @memberOf _ @@ -14,19 +19,19 @@ var baseClone = require('./_baseClone'), * @category Util * @param {Array|string} path The path of the property to get. * @param {*} srcValue The value to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } * ]; * - * _.find(users, _.matchesProperty('user', 'fred')); - * // => { 'user': 'fred' } + * _.find(objects, _.matchesProperty('a', 4)); + * // => { 'a': 4, 'b': 5, 'c': 6 } */ function matchesProperty(path, srcValue) { - return baseMatchesProperty(path, baseClone(srcValue, true)); + return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); } module.exports = matchesProperty; diff --git a/node_modules/lodash/maxBy.js b/node_modules/lodash/maxBy.js index 4627bac..2eba9c0 100644 --- a/node_modules/lodash/maxBy.js +++ b/node_modules/lodash/maxBy.js @@ -12,8 +12,7 @@ var baseExtremum = require('./_baseExtremum'), * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {*} Returns the maximum value. * @example * @@ -28,7 +27,7 @@ var baseExtremum = require('./_baseExtremum'), */ function maxBy(array, iteratee) { return (array && array.length) - ? baseExtremum(array, baseIteratee(iteratee), baseGt) + ? baseExtremum(array, baseIteratee(iteratee, 2), baseGt) : undefined; } diff --git a/node_modules/lodash/meanBy.js b/node_modules/lodash/meanBy.js index 970d798..b031671 100644 --- a/node_modules/lodash/meanBy.js +++ b/node_modules/lodash/meanBy.js @@ -11,8 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 4.7.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the mean. * @example * @@ -26,7 +25,7 @@ var baseIteratee = require('./_baseIteratee'), * // => 5 */ function meanBy(array, iteratee) { - return baseMean(array, baseIteratee(iteratee)); + return baseMean(array, baseIteratee(iteratee, 2)); } module.exports = meanBy; diff --git a/node_modules/lodash/memoize.js b/node_modules/lodash/memoize.js index b657bbe..d6035af 100644 --- a/node_modules/lodash/memoize.js +++ b/node_modules/lodash/memoize.js @@ -1,6 +1,6 @@ var MapCache = require('./_MapCache'); -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** @@ -13,8 +13,8 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object) - * method interface of `delete`, `get`, `has`, and `set`. + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ @@ -22,7 +22,7 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoizing function. + * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; @@ -48,7 +48,7 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { - if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { @@ -60,14 +60,14 @@ function memoize(func, resolver) { return cache.get(key); } var result = func.apply(this, args); - memoized.cache = cache.set(key, result); + memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } -// Assign cache to `_.memoize`. +// Expose `MapCache`. memoize.Cache = MapCache; module.exports = memoize; diff --git a/node_modules/lodash/merge.js b/node_modules/lodash/merge.js index 61c6e01..4bbc3a1 100644 --- a/node_modules/lodash/merge.js +++ b/node_modules/lodash/merge.js @@ -6,7 +6,7 @@ var baseMerge = require('./_baseMerge'), * inherited enumerable string keyed properties of source objects into the * destination object. Source properties that resolve to `undefined` are * skipped if a destination value exists. Array and plain object properties - * are merged recursively.Other objects and value types are overridden by + * are merged recursively. Other objects and value types are overridden by * assignment. Source objects are applied from left to right. Subsequent * sources overwrite property assignments of previous sources. * @@ -21,16 +21,16 @@ var baseMerge = require('./_baseMerge'), * @returns {Object} Returns `object`. * @example * - * var users = { - * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] * }; * - * var ages = { - * 'data': [{ 'age': 36 }, { 'age': 40 }] + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] * }; * - * _.merge(users, ages); - * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ var merge = createAssigner(function(object, source, srcIndex) { baseMerge(object, source, srcIndex); diff --git a/node_modules/lodash/mergeWith.js b/node_modules/lodash/mergeWith.js index 8fada62..1b43a2c 100644 --- a/node_modules/lodash/mergeWith.js +++ b/node_modules/lodash/mergeWith.js @@ -5,7 +5,7 @@ var baseMerge = require('./_baseMerge'), * This method is like `_.merge` except that it accepts `customizer` which * is invoked to produce the merged values of the destination and source * properties. If `customizer` returns `undefined`, merging is handled by the - * method instead. The `customizer` is invoked with seven arguments: + * method instead. The `customizer` is invoked with six arguments: * (objValue, srcValue, key, object, source, stack). * * **Note:** This method mutates `object`. @@ -26,18 +26,11 @@ var baseMerge = require('./_baseMerge'), * } * } * - * var object = { - * 'fruits': ['apple'], - * 'vegetables': ['beet'] - * }; - * - * var other = { - * 'fruits': ['banana'], - * 'vegetables': ['carrot'] - * }; + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; * * _.mergeWith(object, other, customizer); - * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } + * // => { 'a': [1, 3], 'b': [2, 4] } */ var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { baseMerge(object, source, srcIndex, customizer); diff --git a/node_modules/lodash/method.js b/node_modules/lodash/method.js index 12bc4bf..23ec32d 100644 --- a/node_modules/lodash/method.js +++ b/node_modules/lodash/method.js @@ -1,5 +1,5 @@ var baseInvoke = require('./_baseInvoke'), - rest = require('./rest'); + baseRest = require('./_baseRest'); /** * Creates a function that invokes the method at `path` of a given object. @@ -11,7 +11,7 @@ var baseInvoke = require('./_baseInvoke'), * @category Util * @param {Array|string} path The path of the method to invoke. * @param {...*} [args] The arguments to invoke the method with. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new invoker function. * @example * * var objects = [ @@ -25,7 +25,7 @@ var baseInvoke = require('./_baseInvoke'), * _.map(objects, _.method(['a', 'b'])); * // => [2, 1] */ -var method = rest(function(path, args) { +var method = baseRest(function(path, args) { return function(object) { return baseInvoke(object, path, args); }; diff --git a/node_modules/lodash/methodOf.js b/node_modules/lodash/methodOf.js index edac32f..df59b57 100644 --- a/node_modules/lodash/methodOf.js +++ b/node_modules/lodash/methodOf.js @@ -1,5 +1,5 @@ var baseInvoke = require('./_baseInvoke'), - rest = require('./rest'); + baseRest = require('./_baseRest'); /** * The opposite of `_.method`; this method creates a function that invokes @@ -12,7 +12,7 @@ var baseInvoke = require('./_baseInvoke'), * @category Util * @param {Object} object The object to query. * @param {...*} [args] The arguments to invoke the method with. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new invoker function. * @example * * var array = _.times(3, _.constant), @@ -24,7 +24,7 @@ var baseInvoke = require('./_baseInvoke'), * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); * // => [2, 0] */ -var methodOf = rest(function(object, args) { +var methodOf = baseRest(function(object, args) { return function(path) { return baseInvoke(object, path, args); }; diff --git a/node_modules/lodash/minBy.js b/node_modules/lodash/minBy.js index d580846..b2697e4 100644 --- a/node_modules/lodash/minBy.js +++ b/node_modules/lodash/minBy.js @@ -12,8 +12,7 @@ var baseExtremum = require('./_baseExtremum'), * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {*} Returns the minimum value. * @example * @@ -28,7 +27,7 @@ var baseExtremum = require('./_baseExtremum'), */ function minBy(array, iteratee) { return (array && array.length) - ? baseExtremum(array, baseIteratee(iteratee), baseLt) + ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt) : undefined; } diff --git a/node_modules/lodash/multiply.js b/node_modules/lodash/multiply.js index 57ba939..d7876e1 100644 --- a/node_modules/lodash/multiply.js +++ b/node_modules/lodash/multiply.js @@ -17,6 +17,6 @@ var createMathOperation = require('./_createMathOperation'); */ var multiply = createMathOperation(function(multiplier, multiplicand) { return multiplier * multiplicand; -}); +}, 1); module.exports = multiply; diff --git a/node_modules/lodash/negate.js b/node_modules/lodash/negate.js index 2ad58d6..5a65cd1 100644 --- a/node_modules/lodash/negate.js +++ b/node_modules/lodash/negate.js @@ -1,4 +1,4 @@ -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** @@ -11,7 +11,7 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * @since 3.0.0 * @category Function * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new negated function. * @example * * function isEven(n) { @@ -26,7 +26,14 @@ function negate(predicate) { throw new TypeError(FUNC_ERROR_TEXT); } return function() { - return !predicate.apply(this, arguments); + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); }; } diff --git a/node_modules/lodash/noop.js b/node_modules/lodash/noop.js index 26e19c3..3c0862e 100644 --- a/node_modules/lodash/noop.js +++ b/node_modules/lodash/noop.js @@ -1,6 +1,5 @@ /** - * A no-operation function that returns `undefined` regardless of the - * arguments it receives. + * This method returns `undefined`. * * @static * @memberOf _ @@ -8,10 +7,8 @@ * @category Util * @example * - * var object = { 'user': 'fred' }; - * - * _.noop(object) === undefined; - * // => true + * _.times(2, _.noop); + * // => [undefined, undefined] */ function noop() { // No operation performed. diff --git a/node_modules/lodash/now.js b/node_modules/lodash/now.js index c065672..44a0562 100644 --- a/node_modules/lodash/now.js +++ b/node_modules/lodash/now.js @@ -1,3 +1,5 @@ +var root = require('./_root'); + /** * Gets the timestamp of the number of milliseconds that have elapsed since * the Unix epoch (1 January 1970 00:00:00 UTC). @@ -5,7 +7,6 @@ * @static * @memberOf _ * @since 2.4.0 - * @type {Function} * @category Date * @returns {number} Returns the timestamp. * @example @@ -13,8 +14,10 @@ * _.defer(function(stamp) { * console.log(_.now() - stamp); * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred function to be invoked. + * // => Logs the number of milliseconds it took for the deferred invocation. */ -var now = Date.now; +var now = function() { + return root.Date.now(); +}; module.exports = now; diff --git a/node_modules/lodash/nth.js b/node_modules/lodash/nth.js index eed69e2..8a344de 100644 --- a/node_modules/lodash/nth.js +++ b/node_modules/lodash/nth.js @@ -2,8 +2,8 @@ var baseNth = require('./_baseNth'), toInteger = require('./toInteger'); /** - * Gets the nth element of `array`. If `n` is negative, the nth element - * from the end is returned. + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. * * @static * @memberOf _ diff --git a/node_modules/lodash/nthArg.js b/node_modules/lodash/nthArg.js index 533747a..09406dd 100644 --- a/node_modules/lodash/nthArg.js +++ b/node_modules/lodash/nthArg.js @@ -1,9 +1,9 @@ var baseNth = require('./_baseNth'), - rest = require('./rest'), + baseRest = require('./_baseRest'), toInteger = require('./toInteger'); /** - * Creates a function that returns its nth argument. If `n` is negative, + * Creates a function that gets the argument at index `n`. If `n` is negative, * the nth argument from the end is returned. * * @static @@ -11,7 +11,7 @@ var baseNth = require('./_baseNth'), * @since 4.0.0 * @category Util * @param {number} [n=0] The index of the argument to return. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new pass-thru function. * @example * * var func = _.nthArg(1); @@ -24,7 +24,7 @@ var baseNth = require('./_baseNth'), */ function nthArg(n) { n = toInteger(n); - return rest(function(args) { + return baseRest(function(args) { return baseNth(args, n); }); } diff --git a/node_modules/lodash/object.js b/node_modules/lodash/object.js index d6f51c8..f046b05 100644 --- a/node_modules/lodash/object.js +++ b/node_modules/lodash/object.js @@ -3,6 +3,7 @@ module.exports = { 'assignIn': require('./assignIn'), 'assignInWith': require('./assignInWith'), 'assignWith': require('./assignWith'), + 'at': require('./at'), 'create': require('./create'), 'defaults': require('./defaults'), 'defaultsDeep': require('./defaultsDeep'), diff --git a/node_modules/lodash/omit.js b/node_modules/lodash/omit.js index a19974d..75d40aa 100644 --- a/node_modules/lodash/omit.js +++ b/node_modules/lodash/omit.js @@ -1,22 +1,28 @@ var arrayMap = require('./_arrayMap'), - baseDifference = require('./_baseDifference'), - baseFlatten = require('./_baseFlatten'), - basePick = require('./_basePick'), - getAllKeysIn = require('./_getAllKeysIn'), - rest = require('./rest'), - toKey = require('./_toKey'); + baseClone = require('./_baseClone'), + baseUnset = require('./_baseUnset'), + castPath = require('./_castPath'), + copyObject = require('./_copyObject'), + flatRest = require('./_flatRest'), + getAllKeysIn = require('./_getAllKeysIn'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; /** * The opposite of `_.pick`; this method creates an object composed of the - * own and inherited enumerable string keyed properties of `object` that are - * not omitted. + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The source object. - * @param {...(string|string[])} [props] The property identifiers to omit. + * @param {...(string|string[])} [paths] The property paths to omit. * @returns {Object} Returns the new object. * @example * @@ -25,12 +31,26 @@ var arrayMap = require('./_arrayMap'), * _.omit(object, ['a', 'c']); * // => { 'b': '2' } */ -var omit = rest(function(object, props) { +var omit = flatRest(function(object, paths) { + var result = {}; if (object == null) { - return {}; + return result; + } + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); } - props = arrayMap(baseFlatten(props, 1), toKey); - return basePick(object, baseDifference(getAllKeysIn(object), props)); + return result; }); module.exports = omit; diff --git a/node_modules/lodash/omitBy.js b/node_modules/lodash/omitBy.js index 79505de..a064036 100644 --- a/node_modules/lodash/omitBy.js +++ b/node_modules/lodash/omitBy.js @@ -1,5 +1,6 @@ var baseIteratee = require('./_baseIteratee'), - basePickBy = require('./_basePickBy'); + negate = require('./negate'), + pickBy = require('./pickBy'); /** * The opposite of `_.pickBy`; this method creates an object composed of @@ -12,8 +13,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 4.0.0 * @category Object * @param {Object} object The source object. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per property. + * @param {Function} [predicate=_.identity] The function invoked per property. * @returns {Object} Returns the new object. * @example * @@ -23,10 +23,7 @@ var baseIteratee = require('./_baseIteratee'), * // => { 'b': '2' } */ function omitBy(object, predicate) { - predicate = baseIteratee(predicate); - return basePickBy(object, function(value, key) { - return !predicate(value, key); - }); + return pickBy(object, negate(baseIteratee(predicate))); } module.exports = omitBy; diff --git a/node_modules/lodash/once.js b/node_modules/lodash/once.js index 4f66808..0706fc3 100644 --- a/node_modules/lodash/once.js +++ b/node_modules/lodash/once.js @@ -16,7 +16,7 @@ var before = require('./before'); * var initialize = _.once(createApplication); * initialize(); * initialize(); - * // `initialize` invokes `createApplication` once + * // => `createApplication` is invoked once */ function once(func) { return before(2, func); diff --git a/node_modules/lodash/over.js b/node_modules/lodash/over.js index 2275bf7..bea2f91 100644 --- a/node_modules/lodash/over.js +++ b/node_modules/lodash/over.js @@ -9,12 +9,12 @@ var arrayMap = require('./_arrayMap'), * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [iteratees=[_.identity]] The iteratees to invoke. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to invoke. * @returns {Function} Returns the new function. * @example * - * var func = _.over(Math.max, Math.min); + * var func = _.over([Math.max, Math.min]); * * func(1, 2, 3, 4); * // => [4, 1] diff --git a/node_modules/lodash/overArgs.js b/node_modules/lodash/overArgs.js index d6a7467..f0067db 100644 --- a/node_modules/lodash/overArgs.js +++ b/node_modules/lodash/overArgs.js @@ -2,25 +2,24 @@ var apply = require('./_apply'), arrayMap = require('./_arrayMap'), baseFlatten = require('./_baseFlatten'), baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), baseUnary = require('./_baseUnary'), - isArray = require('./isArray'), - isFlattenableIteratee = require('./_isFlattenableIteratee'), - rest = require('./rest'); + castRest = require('./_castRest'), + isArray = require('./isArray'); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMin = Math.min; /** - * Creates a function that invokes `func` with arguments transformed by - * corresponding `transforms`. + * Creates a function that invokes `func` with its arguments transformed. * * @static * @since 4.0.0 * @memberOf _ * @category Function * @param {Function} func The function to wrap. - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [transforms[_.identity]] The functions to transform. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. * @returns {Function} Returns the new function. * @example * @@ -34,7 +33,7 @@ var nativeMin = Math.min; * * var func = _.overArgs(function(x, y) { * return [x, y]; - * }, square, doubled); + * }, [square, doubled]); * * func(9, 3); * // => [81, 6] @@ -42,13 +41,13 @@ var nativeMin = Math.min; * func(10, 5); * // => [100, 10] */ -var overArgs = rest(function(func, transforms) { +var overArgs = castRest(function(func, transforms) { transforms = (transforms.length == 1 && isArray(transforms[0])) ? arrayMap(transforms[0], baseUnary(baseIteratee)) - : arrayMap(baseFlatten(transforms, 1, isFlattenableIteratee), baseUnary(baseIteratee)); + : arrayMap(baseFlatten(transforms, 1), baseUnary(baseIteratee)); var funcsLength = transforms.length; - return rest(function(args) { + return baseRest(function(args) { var index = -1, length = nativeMin(args.length, funcsLength); diff --git a/node_modules/lodash/overEvery.js b/node_modules/lodash/overEvery.js index 4ea596a..c115d15 100644 --- a/node_modules/lodash/overEvery.js +++ b/node_modules/lodash/overEvery.js @@ -9,12 +9,12 @@ var arrayEvery = require('./_arrayEvery'), * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [predicates=[_.identity]] The predicates to check. + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. * @returns {Function} Returns the new function. * @example * - * var func = _.overEvery(Boolean, isFinite); + * var func = _.overEvery([Boolean, isFinite]); * * func('1'); * // => true diff --git a/node_modules/lodash/overSome.js b/node_modules/lodash/overSome.js index 55ff733..f902907 100644 --- a/node_modules/lodash/overSome.js +++ b/node_modules/lodash/overSome.js @@ -9,12 +9,12 @@ var arraySome = require('./_arraySome'), * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [predicates=[_.identity]] The predicates to check. + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. * @returns {Function} Returns the new function. * @example * - * var func = _.overSome(Boolean, isFinite); + * var func = _.overSome([Boolean, isFinite]); * * func('1'); * // => true diff --git a/node_modules/lodash/package.json b/node_modules/lodash/package.json index c40ba38..c6fac96 100644 --- a/node_modules/lodash/package.json +++ b/node_modules/lodash/package.json @@ -1,110 +1,17 @@ { - "_args": [ - [ - "lodash@^4.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "lodash@>=4.0.0 <5.0.0", - "_id": "lodash@4.11.2", - "_inCache": true, - "_installable": true, - "_location": "/lodash", - "_nodeVersion": "6.0.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/lodash-4.11.2.tgz_1462201261706_0.9612307662609965" - }, - "_npmUser": { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" - }, - "_npmVersion": "2.15.4", - "_phantomChildren": {}, - "_requested": { - "name": "lodash", - "raw": "lodash@^4.0.0", - "rawSpec": "^4.0.0", - "scope": null, - "spec": ">=4.0.0 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint", - "/inquirer", - "/table" - ], - "_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.11.2.tgz", - "_shasum": "d6b4338b110a58e21dae5cebcfdbbfd2bc4cdb3b", - "_shrinkwrap": null, - "_spec": "lodash@^4.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint", - "author": { - "email": "john.david.dalton@gmail.com", - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, + "name": "lodash", + "version": "4.17.2", "description": "Lodash modular utilities.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "d6b4338b110a58e21dae5cebcfdbbfd2bc4cdb3b", - "tarball": "https://registry.npmjs.org/lodash/-/lodash-4.11.2.tgz" - }, - "gitHead": "ddde027fd9bd5d25416b6a788e273babc959f307", + "keywords": "modules, stdlib, util", "homepage": "https://lodash.com/", + "repository": "lodash/lodash", "icon": "https://lodash.com/icon.svg", - "keywords": [ - "modules", - "stdlib", - "util" - ], "license": "MIT", "main": "lodash.js", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine.bublitz@gmail.com" - } + "author": "John-David Dalton (http://allyoucanleet.com/)", + "contributors": [ + "John-David Dalton (http://allyoucanleet.com/)", + "Mathias Bynens (https://mathiasbynens.be/)" ], - "name": "lodash", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.11.2" + "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } } diff --git a/node_modules/lodash/package/_Hash.js b/node_modules/lodash/package/_Hash.js deleted file mode 100644 index 7f4c3ba..0000000 --- a/node_modules/lodash/package/_Hash.js +++ /dev/null @@ -1,18 +0,0 @@ -var nativeCreate = require('./_nativeCreate'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Creates a hash object. - * - * @private - * @constructor - * @returns {Object} Returns the new hash object. - */ -function Hash() {} - -// Avoid inheriting from `Object.prototype` when possible. -Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto; - -module.exports = Hash; diff --git a/node_modules/lodash/package/_MapCache.js b/node_modules/lodash/package/_MapCache.js deleted file mode 100644 index 4c6fa99..0000000 --- a/node_modules/lodash/package/_MapCache.js +++ /dev/null @@ -1,32 +0,0 @@ -var mapClear = require('./_mapClear'), - mapDelete = require('./_mapDelete'), - mapGet = require('./_mapGet'), - mapHas = require('./_mapHas'), - mapSet = require('./_mapSet'); - -/** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ -function MapCache(values) { - var index = -1, - length = values ? values.length : 0; - - this.clear(); - while (++index < length) { - var entry = values[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `MapCache`. -MapCache.prototype.clear = mapClear; -MapCache.prototype['delete'] = mapDelete; -MapCache.prototype.get = mapGet; -MapCache.prototype.has = mapHas; -MapCache.prototype.set = mapSet; - -module.exports = MapCache; diff --git a/node_modules/lodash/package/_Reflect.js b/node_modules/lodash/package/_Reflect.js deleted file mode 100644 index 1de7475..0000000 --- a/node_modules/lodash/package/_Reflect.js +++ /dev/null @@ -1,6 +0,0 @@ -var root = require('./_root'); - -/** Built-in value references. */ -var Reflect = root.Reflect; - -module.exports = Reflect; diff --git a/node_modules/lodash/package/_SetCache.js b/node_modules/lodash/package/_SetCache.js deleted file mode 100644 index 6fd915b..0000000 --- a/node_modules/lodash/package/_SetCache.js +++ /dev/null @@ -1,25 +0,0 @@ -var MapCache = require('./_MapCache'), - cachePush = require('./_cachePush'); - -/** - * - * Creates a set cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var index = -1, - length = values ? values.length : 0; - - this.__data__ = new MapCache; - while (++index < length) { - this.push(values[index]); - } -} - -// Add methods to `SetCache`. -SetCache.prototype.push = cachePush; - -module.exports = SetCache; diff --git a/node_modules/lodash/package/_arrayConcat.js b/node_modules/lodash/package/_arrayConcat.js deleted file mode 100644 index 96e7741..0000000 --- a/node_modules/lodash/package/_arrayConcat.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Creates a new array concatenating `array` with `other`. - * - * @private - * @param {Array} array The first array to concatenate. - * @param {Array} other The second array to concatenate. - * @returns {Array} Returns the new concatenated array. - */ -function arrayConcat(array, other) { - var index = -1, - length = array.length, - othIndex = -1, - othLength = other.length, - result = Array(length + othLength); - - while (++index < length) { - result[index] = array[index]; - } - while (++othIndex < othLength) { - result[index++] = other[othIndex]; - } - return result; -} - -module.exports = arrayConcat; diff --git a/node_modules/lodash/package/_assocGet.js b/node_modules/lodash/package/_assocGet.js deleted file mode 100644 index e53d332..0000000 --- a/node_modules/lodash/package/_assocGet.js +++ /dev/null @@ -1,16 +0,0 @@ -var assocIndexOf = require('./_assocIndexOf'); - -/** - * Gets the associative array value for `key`. - * - * @private - * @param {Array} array The array to query. - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function assocGet(array, key) { - var index = assocIndexOf(array, key); - return index < 0 ? undefined : array[index][1]; -} - -module.exports = assocGet; diff --git a/node_modules/lodash/package/_assocSet.js b/node_modules/lodash/package/_assocSet.js deleted file mode 100644 index 524f341..0000000 --- a/node_modules/lodash/package/_assocSet.js +++ /dev/null @@ -1,20 +0,0 @@ -var assocIndexOf = require('./_assocIndexOf'); - -/** - * Sets the associative array `key` to `value`. - * - * @private - * @param {Array} array The array to modify. - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - */ -function assocSet(array, key, value) { - var index = assocIndexOf(array, key); - if (index < 0) { - array.push([key, value]); - } else { - array[index][1] = value; - } -} - -module.exports = assocSet; diff --git a/node_modules/lodash/package/_baseConforms.js b/node_modules/lodash/package/_baseConforms.js deleted file mode 100644 index 973aa6d..0000000 --- a/node_modules/lodash/package/_baseConforms.js +++ /dev/null @@ -1,33 +0,0 @@ -var keys = require('./keys'); - -/** - * The base implementation of `_.conforms` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new function. - */ -function baseConforms(source) { - var props = keys(source), - length = props.length; - - return function(object) { - if (object == null) { - return !length; - } - var index = length; - while (index--) { - var key = props[index], - predicate = source[key], - value = object[key]; - - if ((value === undefined && - !(key in Object(object))) || !predicate(value)) { - return false; - } - } - return true; - }; -} - -module.exports = baseConforms; diff --git a/node_modules/lodash/package/_baseCreate.js b/node_modules/lodash/package/_baseCreate.js deleted file mode 100644 index 4372cad..0000000 --- a/node_modules/lodash/package/_baseCreate.js +++ /dev/null @@ -1,18 +0,0 @@ -var isObject = require('./isObject'); - -/** Built-in value references. */ -var objectCreate = Object.create; - -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} prototype The object to inherit from. - * @returns {Object} Returns the new object. - */ -function baseCreate(proto) { - return isObject(proto) ? objectCreate(proto) : {}; -} - -module.exports = baseCreate; diff --git a/node_modules/lodash/package/_baseFind.js b/node_modules/lodash/package/_baseFind.js deleted file mode 100644 index 338f932..0000000 --- a/node_modules/lodash/package/_baseFind.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * The base implementation of methods like `_.find` and `_.findKey`, without - * support for iteratee shorthands, which iterates over `collection` using - * `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to search. - * @param {Function} predicate The function invoked per iteration. - * @param {Function} eachFunc The function to iterate over `collection`. - * @param {boolean} [retKey] Specify returning the key of the found element - * instead of the element itself. - * @returns {*} Returns the found element or its key, else `undefined`. - */ -function baseFind(collection, predicate, eachFunc, retKey) { - var result; - eachFunc(collection, function(value, key, collection) { - if (predicate(value, key, collection)) { - result = retKey ? key : value; - return false; - } - }); - return result; -} - -module.exports = baseFind; diff --git a/node_modules/lodash/package/_baseKeys.js b/node_modules/lodash/package/_baseKeys.js deleted file mode 100644 index 2c8ccb9..0000000 --- a/node_modules/lodash/package/_baseKeys.js +++ /dev/null @@ -1,16 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeKeys = Object.keys; - -/** - * The base implementation of `_.keys` which doesn't skip the constructor - * property of prototypes or treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - return nativeKeys(Object(object)); -} - -module.exports = baseKeys; diff --git a/node_modules/lodash/package/_baseKeysIn.js b/node_modules/lodash/package/_baseKeysIn.js deleted file mode 100644 index 7455fd8..0000000 --- a/node_modules/lodash/package/_baseKeysIn.js +++ /dev/null @@ -1,36 +0,0 @@ -var Reflect = require('./_Reflect'), - iteratorToArray = require('./_iteratorToArray'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Built-in value references. */ -var enumerate = Reflect ? Reflect.enumerate : undefined, - propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** - * The base implementation of `_.keysIn` which doesn't skip the constructor - * property of prototypes or treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeysIn(object) { - object = object == null ? object : Object(object); - - var result = []; - for (var key in object) { - result.push(key); - } - return result; -} - -// Fallback for IE < 9 with es6-shim. -if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) { - baseKeysIn = function(object) { - return iteratorToArray(enumerate(object)); - }; -} - -module.exports = baseKeysIn; diff --git a/node_modules/lodash/package/_cacheHas.js b/node_modules/lodash/package/_cacheHas.js deleted file mode 100644 index 7f2ac48..0000000 --- a/node_modules/lodash/package/_cacheHas.js +++ /dev/null @@ -1,25 +0,0 @@ -var isKeyable = require('./_isKeyable'); - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Checks if `value` is in `cache`. - * - * @private - * @param {Object} cache The set cache to search. - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ -function cacheHas(cache, value) { - var map = cache.__data__; - if (isKeyable(value)) { - var data = map.__data__, - hash = typeof value == 'string' ? data.string : data.hash; - - return hash[value] === HASH_UNDEFINED; - } - return map.has(value); -} - -module.exports = cacheHas; diff --git a/node_modules/lodash/package/_cachePush.js b/node_modules/lodash/package/_cachePush.js deleted file mode 100644 index 638383b..0000000 --- a/node_modules/lodash/package/_cachePush.js +++ /dev/null @@ -1,27 +0,0 @@ -var isKeyable = require('./_isKeyable'); - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Adds `value` to the set cache. - * - * @private - * @name push - * @memberOf SetCache - * @param {*} value The value to cache. - */ -function cachePush(value) { - var map = this.__data__; - if (isKeyable(value)) { - var data = map.__data__, - hash = typeof value == 'string' ? data.string : data.hash; - - hash[value] = HASH_UNDEFINED; - } - else { - map.set(value, HASH_UNDEFINED); - } -} - -module.exports = cachePush; diff --git a/node_modules/lodash/package/_checkGlobal.js b/node_modules/lodash/package/_checkGlobal.js deleted file mode 100644 index b0ea47e..0000000 --- a/node_modules/lodash/package/_checkGlobal.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Checks if `value` is a global object. - * - * @private - * @param {*} value The value to check. - * @returns {null|Object} Returns `value` if it's a global object, else `null`. - */ -function checkGlobal(value) { - return (value && value.Object === Object) ? value : null; -} - -module.exports = checkGlobal; diff --git a/node_modules/lodash/package/_cloneBuffer.js b/node_modules/lodash/package/_cloneBuffer.js deleted file mode 100644 index 247d410..0000000 --- a/node_modules/lodash/package/_cloneBuffer.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Creates a clone of `buffer`. - * - * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. - */ -function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var result = new buffer.constructor(buffer.length); - buffer.copy(result); - return result; -} - -module.exports = cloneBuffer; diff --git a/node_modules/lodash/package/_createOver.js b/node_modules/lodash/package/_createOver.js deleted file mode 100644 index 0d42c27..0000000 --- a/node_modules/lodash/package/_createOver.js +++ /dev/null @@ -1,32 +0,0 @@ -var apply = require('./_apply'), - arrayMap = require('./_arrayMap'), - baseFlatten = require('./_baseFlatten'), - baseIteratee = require('./_baseIteratee'), - baseUnary = require('./_baseUnary'), - isArray = require('./isArray'), - isFlattenableIteratee = require('./_isFlattenableIteratee'), - rest = require('./rest'); - -/** - * Creates a function like `_.over`. - * - * @private - * @param {Function} arrayFunc The function to iterate over iteratees. - * @returns {Function} Returns the new invoker function. - */ -function createOver(arrayFunc) { - return rest(function(iteratees) { - iteratees = (iteratees.length == 1 && isArray(iteratees[0])) - ? arrayMap(iteratees[0], baseUnary(baseIteratee)) - : arrayMap(baseFlatten(iteratees, 1, isFlattenableIteratee), baseUnary(baseIteratee)); - - return rest(function(args) { - var thisArg = this; - return arrayFunc(iteratees, function(iteratee) { - return apply(iteratee, thisArg, args); - }); - }); - }); -} - -module.exports = createOver; diff --git a/node_modules/lodash/package/_deburrLetter.js b/node_modules/lodash/package/_deburrLetter.js deleted file mode 100644 index e559dbe..0000000 --- a/node_modules/lodash/package/_deburrLetter.js +++ /dev/null @@ -1,33 +0,0 @@ -/** Used to map latin-1 supplementary letters to basic latin letters. */ -var deburredLetters = { - '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', - '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', - '\xc7': 'C', '\xe7': 'c', - '\xd0': 'D', '\xf0': 'd', - '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', - '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', - '\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', - '\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', - '\xd1': 'N', '\xf1': 'n', - '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', - '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', - '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', - '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', - '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', - '\xc6': 'Ae', '\xe6': 'ae', - '\xde': 'Th', '\xfe': 'th', - '\xdf': 'ss' -}; - -/** - * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters. - * - * @private - * @param {string} letter The matched letter to deburr. - * @returns {string} Returns the deburred letter. - */ -function deburrLetter(letter) { - return deburredLetters[letter]; -} - -module.exports = deburrLetter; diff --git a/node_modules/lodash/package/_getLength.js b/node_modules/lodash/package/_getLength.js deleted file mode 100644 index 5407165..0000000 --- a/node_modules/lodash/package/_getLength.js +++ /dev/null @@ -1,16 +0,0 @@ -var baseProperty = require('./_baseProperty'); - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a - * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects - * Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -module.exports = getLength; diff --git a/node_modules/lodash/package/_getPrototype.js b/node_modules/lodash/package/_getPrototype.js deleted file mode 100644 index 1ef6d92..0000000 --- a/node_modules/lodash/package/_getPrototype.js +++ /dev/null @@ -1,15 +0,0 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetPrototype = Object.getPrototypeOf; - -/** - * Gets the `[[Prototype]]` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {null|Object} Returns the `[[Prototype]]`. - */ -function getPrototype(value) { - return nativeGetPrototype(Object(value)); -} - -module.exports = getPrototype; diff --git a/node_modules/lodash/package/_getSymbols.js b/node_modules/lodash/package/_getSymbols.js deleted file mode 100644 index 63df717..0000000 --- a/node_modules/lodash/package/_getSymbols.js +++ /dev/null @@ -1,24 +0,0 @@ -/** Built-in value references. */ -var getOwnPropertySymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own enumerable symbol properties of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -function getSymbols(object) { - // Coerce `object` to an object to avoid non-object errors in V8. - // See https://bugs.chromium.org/p/v8/issues/detail?id=3443 for more details. - return getOwnPropertySymbols(Object(object)); -} - -// Fallback for IE < 11. -if (!getOwnPropertySymbols) { - getSymbols = function() { - return []; - }; -} - -module.exports = getSymbols; diff --git a/node_modules/lodash/package/_indexKeys.js b/node_modules/lodash/package/_indexKeys.js deleted file mode 100644 index 0e2fc10..0000000 --- a/node_modules/lodash/package/_indexKeys.js +++ /dev/null @@ -1,24 +0,0 @@ -var baseTimes = require('./_baseTimes'), - isArguments = require('./isArguments'), - isArray = require('./isArray'), - isLength = require('./isLength'), - isString = require('./isString'); - -/** - * Creates an array of index keys for `object` values of arrays, - * `arguments` objects, and strings, otherwise `null` is returned. - * - * @private - * @param {Object} object The object to query. - * @returns {Array|null} Returns index keys, else `null`. - */ -function indexKeys(object) { - var length = object ? object.length : undefined; - if (isLength(length) && - (isArray(object) || isString(object) || isArguments(object))) { - return baseTimes(length, String); - } - return null; -} - -module.exports = indexKeys; diff --git a/node_modules/lodash/package/_indexOfNaN.js b/node_modules/lodash/package/_indexOfNaN.js deleted file mode 100644 index 05b8207..0000000 --- a/node_modules/lodash/package/_indexOfNaN.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Gets the index at which the first occurrence of `NaN` is found in `array`. - * - * @private - * @param {Array} array The array to search. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched `NaN`, else `-1`. - */ -function indexOfNaN(array, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 0 : -1); - - while ((fromRight ? index-- : ++index < length)) { - var other = array[index]; - if (other !== other) { - return index; - } - } - return -1; -} - -module.exports = indexOfNaN; diff --git a/node_modules/lodash/package/_isFlattenable.js b/node_modules/lodash/package/_isFlattenable.js deleted file mode 100644 index 847ad1f..0000000 --- a/node_modules/lodash/package/_isFlattenable.js +++ /dev/null @@ -1,16 +0,0 @@ -var isArguments = require('./isArguments'), - isArray = require('./isArray'), - isArrayLikeObject = require('./isArrayLikeObject'); - -/** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenable(value) { - return isArrayLikeObject(value) && (isArray(value) || isArguments(value)); -} - -module.exports = isFlattenable; diff --git a/node_modules/lodash/package/_isFlattenableIteratee.js b/node_modules/lodash/package/_isFlattenableIteratee.js deleted file mode 100644 index f7ede3e..0000000 --- a/node_modules/lodash/package/_isFlattenableIteratee.js +++ /dev/null @@ -1,16 +0,0 @@ -var isArray = require('./isArray'), - isFunction = require('./isFunction'); - -/** - * Checks if `value` is a flattenable array and not a `_.matchesProperty` - * iteratee shorthand. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenableIteratee(value) { - return isArray(value) && !(value.length == 2 && !isFunction(value[0])); -} - -module.exports = isFlattenableIteratee; diff --git a/node_modules/lodash/package/_isHostObject.js b/node_modules/lodash/package/_isHostObject.js deleted file mode 100644 index e598c10..0000000 --- a/node_modules/lodash/package/_isHostObject.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ -function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; -} - -module.exports = isHostObject; diff --git a/node_modules/lodash/package/_mapDelete.js b/node_modules/lodash/package/_mapDelete.js deleted file mode 100644 index 640eb0a..0000000 --- a/node_modules/lodash/package/_mapDelete.js +++ /dev/null @@ -1,23 +0,0 @@ -var Map = require('./_Map'), - assocDelete = require('./_assocDelete'), - hashDelete = require('./_hashDelete'), - isKeyable = require('./_isKeyable'); - -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function mapDelete(key) { - var data = this.__data__; - if (isKeyable(key)) { - return hashDelete(typeof key == 'string' ? data.string : data.hash, key); - } - return Map ? data.map['delete'](key) : assocDelete(data.map, key); -} - -module.exports = mapDelete; diff --git a/node_modules/lodash/package/_mapGet.js b/node_modules/lodash/package/_mapGet.js deleted file mode 100644 index 8f33854..0000000 --- a/node_modules/lodash/package/_mapGet.js +++ /dev/null @@ -1,23 +0,0 @@ -var Map = require('./_Map'), - assocGet = require('./_assocGet'), - hashGet = require('./_hashGet'), - isKeyable = require('./_isKeyable'); - -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapGet(key) { - var data = this.__data__; - if (isKeyable(key)) { - return hashGet(typeof key == 'string' ? data.string : data.hash, key); - } - return Map ? data.map.get(key) : assocGet(data.map, key); -} - -module.exports = mapGet; diff --git a/node_modules/lodash/package/_mapHas.js b/node_modules/lodash/package/_mapHas.js deleted file mode 100644 index 9225537..0000000 --- a/node_modules/lodash/package/_mapHas.js +++ /dev/null @@ -1,23 +0,0 @@ -var Map = require('./_Map'), - assocHas = require('./_assocHas'), - hashHas = require('./_hashHas'), - isKeyable = require('./_isKeyable'); - -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapHas(key) { - var data = this.__data__; - if (isKeyable(key)) { - return hashHas(typeof key == 'string' ? data.string : data.hash, key); - } - return Map ? data.map.has(key) : assocHas(data.map, key); -} - -module.exports = mapHas; diff --git a/node_modules/lodash/package/_mapSet.js b/node_modules/lodash/package/_mapSet.js deleted file mode 100644 index 23b075f..0000000 --- a/node_modules/lodash/package/_mapSet.js +++ /dev/null @@ -1,28 +0,0 @@ -var Map = require('./_Map'), - assocSet = require('./_assocSet'), - hashSet = require('./_hashSet'), - isKeyable = require('./_isKeyable'); - -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapSet(key, value) { - var data = this.__data__; - if (isKeyable(key)) { - hashSet(typeof key == 'string' ? data.string : data.hash, key, value); - } else if (Map) { - data.map.set(key, value); - } else { - assocSet(data.map, key, value); - } - return this; -} - -module.exports = mapSet; diff --git a/node_modules/lodash/package/_root.js b/node_modules/lodash/package/_root.js deleted file mode 100644 index d2cfd31..0000000 --- a/node_modules/lodash/package/_root.js +++ /dev/null @@ -1,41 +0,0 @@ -var checkGlobal = require('./_checkGlobal'); - -/** Used to determine if values are of the language type `Object`. */ -var objectTypes = { - 'function': true, - 'object': true -}; - -/** Detect free variable `exports`. */ -var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) - ? exports - : undefined; - -/** Detect free variable `module`. */ -var freeModule = (objectTypes[typeof module] && module && !module.nodeType) - ? module - : undefined; - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); - -/** Detect free variable `self`. */ -var freeSelf = checkGlobal(objectTypes[typeof self] && self); - -/** Detect free variable `window`. */ -var freeWindow = checkGlobal(objectTypes[typeof window] && window); - -/** Detect `this` as the global object. */ -var thisGlobal = checkGlobal(objectTypes[typeof this] && this); - -/** - * Used as a reference to the global object. - * - * The `this` value is used if it's the global object to avoid Greasemonkey's - * restricted `window` object, otherwise the `window` object is used. - */ -var root = freeGlobal || - ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || - freeSelf || thisGlobal || Function('return this')(); - -module.exports = root; diff --git a/node_modules/lodash/package/_stackSet.js b/node_modules/lodash/package/_stackSet.js deleted file mode 100644 index 76ca89a..0000000 --- a/node_modules/lodash/package/_stackSet.js +++ /dev/null @@ -1,36 +0,0 @@ -var MapCache = require('./_MapCache'), - assocSet = require('./_assocSet'); - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * Sets the stack `key` to `value`. - * - * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. - */ -function stackSet(key, value) { - var data = this.__data__, - array = data.array; - - if (array) { - if (array.length < (LARGE_ARRAY_SIZE - 1)) { - assocSet(array, key, value); - } else { - data.array = null; - data.map = new MapCache(array); - } - } - var map = data.map; - if (map) { - map.set(key, value); - } - return this; -} - -module.exports = stackSet; diff --git a/node_modules/lodash/package/assignIn.js b/node_modules/lodash/package/assignIn.js deleted file mode 100644 index b001c49..0000000 --- a/node_modules/lodash/package/assignIn.js +++ /dev/null @@ -1,58 +0,0 @@ -var assignValue = require('./_assignValue'), - copyObject = require('./_copyObject'), - createAssigner = require('./_createAssigner'), - isArrayLike = require('./isArrayLike'), - isPrototype = require('./_isPrototype'), - keysIn = require('./keysIn'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */ -var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); - -/** - * This method is like `_.assign` except that it iterates over own and - * inherited source properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assign - * @example - * - * function Foo() { - * this.b = 2; - * } - * - * function Bar() { - * this.d = 4; - * } - * - * Foo.prototype.c = 3; - * Bar.prototype.e = 5; - * - * _.assignIn({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 } - */ -var assignIn = createAssigner(function(object, source) { - if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { - copyObject(source, keysIn(source), object); - return; - } - for (var key in source) { - assignValue(object, key, source[key]); - } -}); - -module.exports = assignIn; diff --git a/node_modules/lodash/package/core.min.js b/node_modules/lodash/package/core.min.js deleted file mode 100644 index af9a225..0000000 --- a/node_modules/lodash/package/core.min.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @license - * lodash 4.11.2 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE - * Build: `lodash core -o ./dist/lodash.core.js` - */ -;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n,t,r){var e;return r(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e}function r(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function e(n,t){return O(t,function(t){return n[t]})}function u(n){return n&&n.Object===Object?n:null}function o(n){return gn[n]}function i(n){var t=false;if(null!=n&&typeof n.toString!="function")try{t=!!(n+"")}catch(r){}return t}function c(n){return n instanceof f?n:new f(n)}function f(n,t){ -this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function a(n,t,r,e){var u;return(u=n===pn)||(u=En[r],u=(n===u||n!==n&&u!==u)&&!kn.call(e,r)),u?t:n}function l(n){return nn(n)?Bn(n):{}}function p(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(pn,r)},t)}function s(n,t){var r=true;return zn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function h(n,t,r){for(var e=-1,u=n.length;++e0&&e(f)?r>1?y(f,r-1,e,u,o):n(o,f):u||(o[o.length]=f)}return o}function g(n,t){return n&&Cn(n,t,on)}function b(n,t){return v(t,function(t){return Y(n[t])})}function _(n,t){return n>t}function d(n,t,r,e,u){return n===t?true:null==n||null==t||!nn(n)&&!tn(t)?n!==n&&t!==t:j(n,t,d,r,e,u)}function j(n,t,r,e,u,o){var c=Vn(n),f=Vn(t),a="[object Array]",l="[object Array]"; -c||(a=Sn.call(n),a="[object Arguments]"==a?"[object Object]":a),f||(l=Sn.call(t),l="[object Arguments]"==l?"[object Object]":l);var p="[object Object]"==a&&!i(n),f="[object Object]"==l&&!i(t),l=a==l;o||(o=[]);var s=U(o,function(t){return t[0]===n});return s&&s[1]?s[1]==t:(o.push([n,t]),l&&!p?(r=c||isTypedArray(n)?$(n,t,r,e,u,o):q(n,t,a),o.pop(),r):2&u||(c=p&&kn.call(n,"__wrapped__"),a=f&&kn.call(t,"__wrapped__"),!c&&!a)?l?(r=z(n,t,r,e,u,o),o.pop(),r):false:(c=c?n.value():n,t=a?t.value():t,r=r(c,t,e,u,o), -o.pop(),r))}function m(n){return typeof n=="function"?n:null==n?an:(typeof n=="object"?A:k)(n)}function w(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function x(n,t){return t>n}function O(n,t){var r=-1,e=X(n)?Array(n.length):[];return zn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function A(n){var t=on(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&d(n[u],r[u],pn,3)))return false}return true}}function E(n,t){return n=Object(n),H(t,function(t,r){ -return r in n&&(t[r]=n[r]),t},{})}function k(n){return function(t){return null==t?pn:t[n]}}function N(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e1?r[u-1]:pn,o=typeof o=="function"?(u--,o):pn;for(t=Object(t);++ef))return false;for(a=true;++i-1&&0==n%1&&t>n}function M(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||En)}function P(n){return n&&n.length?n[0]:pn}function U(n,r){return t(n,m(r),zn)}function V(n,t){return zn(n,m(t))}function H(n,t,e){ -return r(n,m(t),e,3>arguments.length,zn)}function K(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Hn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=pn),r}}function L(n){var t;if(typeof n!="function")throw new TypeError("Expected a function");return t=qn(t===pn?n.length-1:Hn(t),0),function(){for(var r=arguments,e=-1,u=qn(r.length-t,0),o=Array(u);++e-1&&0==n%1&&9007199254740991>=n}function nn(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function tn(n){return!!n&&typeof n=="object"; -}function rn(n){return typeof n=="number"||tn(n)&&"[object Number]"==Sn.call(n)}function en(n){return typeof n=="string"||!Vn(n)&&tn(n)&&"[object String]"==Sn.call(n)}function un(n){return typeof n=="string"?n:null==n?"":n+""}function on(n){var t=M(n);if(!t&&!X(n))return $n(Object(n));var r,e=C(n),u=!!e,e=e||[],o=e.length;for(r in n)!kn.call(n,r)||u&&("length"==r||J(r,o))||t&&"constructor"==r||e.push(r);return e}function cn(n){for(var t=-1,r=M(n),e=w(n),u=e.length,o=C(n),i=!!o,o=o||[],c=o.length;++t"'`]/g,vn=RegExp(hn.source),yn=/^(?:0|[1-9]\d*)$/,gn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},bn={"function":true,object:true},_n=bn[typeof exports]&&exports&&!exports.nodeType?exports:pn,dn=bn[typeof module]&&module&&!module.nodeType?module:pn,jn=dn&&dn.exports===_n?_n:pn,mn=u(bn[typeof self]&&self),wn=u(bn[typeof window]&&window),xn=u(bn[typeof this]&&this),On=u(_n&&dn&&typeof global=="object"&&global)||wn!==(xn&&xn.window)&&wn||mn||xn||Function("return this")(),An=Array.prototype,En=Object.prototype,kn=En.hasOwnProperty,Nn=0,Sn=En.toString,Tn=On._,Fn=On.Reflect,Rn=Fn?Fn.a:pn,Bn=Object.create,Dn=En.propertyIsEnumerable,In=On.isFinite,$n=Object.keys,qn=Math.max; -f.prototype=l(c.prototype),f.prototype.constructor=f;var zn=function(n,t){return function(r,e){if(null==r)return r;if(!X(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++ot)return t?S(r):[];for(var e=Array(t-1);t--;)e[t-1]=arguments[t];return y(e,1),n(S(r),fn)},c.create=function(n,t){var r=l(n);return t?Ln(r,t):r},c.defaults=Xn,c.defer=Pn,c.delay=Un,c.filter=function(n,t){return v(n,m(t))},c.flatten=function(n){return n&&n.length?y(n,1):[]},c.flattenDeep=function(n){return n&&n.length?y(n,sn):[]},c.iteratee=Zn,c.keys=on,c.map=function(n,t){return O(n,m(t))},c.matches=function(n){return A(Ln({},n))},c.mixin=ln,c.negate=function(n){ -if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},c.once=function(n){return K(2,n)},c.pick=Yn,c.slice=function(n,t,r){var e=n?n.length:0;return r=r===pn?e:+r,e?N(n,null==t?0:+t,r):[]},c.sortBy=function(n,t){var r=0;return t=m(t),O(O(n,function(n,e,u){return{value:n,index:r++,criteria:t(n,e,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==pn,o=null===r,i=r===r,c=e!==pn,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){ -r=1;break n}if(!o&&e>r||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),k("value"))},c.tap=function(n,t){return t(n),n},c.thru=function(n,t){return t(n)},c.toArray=function(n){return X(n)?n.length?S(n):[]:fn(n)},c.values=fn,c.extend=Qn,ln(c,c),c.clone=function(n){return nn(n)?Vn(n)?S(n):R(n,on(n)):n},c.escape=function(n){return(n=un(n))&&vn.test(n)?n.replace(hn,o):n},c.every=function(n,t,r){return t=r?pn:t,s(n,m(t))},c.find=U,c.forEach=V,c.has=function(n,t){return null!=n&&kn.call(n,t); -},c.head=P,c.identity=an,c.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?qn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r [3, 1] - */ -var difference = rest(function(array, values) { - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) - : []; -}); - -module.exports = difference; diff --git a/node_modules/lodash/package/findLast.js b/node_modules/lodash/package/findLast.js deleted file mode 100644 index d222a55..0000000 --- a/node_modules/lodash/package/findLast.js +++ /dev/null @@ -1,35 +0,0 @@ -var baseEachRight = require('./_baseEachRight'), - baseFind = require('./_baseFind'), - baseFindIndex = require('./_baseFindIndex'), - baseIteratee = require('./_baseIteratee'), - isArray = require('./isArray'); - -/** - * This method is like `_.find` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Collection - * @param {Array|Object} collection The collection to search. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * _.findLast([1, 2, 3, 4], function(n) { - * return n % 2 == 1; - * }); - * // => 3 - */ -function findLast(collection, predicate) { - predicate = baseIteratee(predicate, 3); - if (isArray(collection)) { - var index = baseFindIndex(collection, predicate, true); - return index > -1 ? collection[index] : undefined; - } - return baseFind(collection, predicate, baseEachRight); -} - -module.exports = findLast; diff --git a/node_modules/lodash/package/fp/whereEq.js b/node_modules/lodash/package/fp/whereEq.js deleted file mode 100644 index ade80f6..0000000 --- a/node_modules/lodash/package/fp/whereEq.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./filter'); diff --git a/node_modules/lodash/package/isArguments.js b/node_modules/lodash/package/isArguments.js deleted file mode 100644 index 3ca0d3c..0000000 --- a/node_modules/lodash/package/isArguments.js +++ /dev/null @@ -1,46 +0,0 @@ -var isArrayLikeObject = require('./isArrayLikeObject'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); -} - -module.exports = isArguments; diff --git a/node_modules/lodash/package/isArrayBuffer.js b/node_modules/lodash/package/isArrayBuffer.js deleted file mode 100644 index 0a6a8e6..0000000 --- a/node_modules/lodash/package/isArrayBuffer.js +++ /dev/null @@ -1,37 +0,0 @@ -var isObjectLike = require('./isObjectLike'); - -var arrayBufferTag = '[object ArrayBuffer]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is classified as an `ArrayBuffer` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isArrayBuffer(new ArrayBuffer(2)); - * // => true - * - * _.isArrayBuffer(new Array(2)); - * // => false - */ -function isArrayBuffer(value) { - return isObjectLike(value) && objectToString.call(value) == arrayBufferTag; -} - -module.exports = isArrayBuffer; diff --git a/node_modules/lodash/package/isBoolean.js b/node_modules/lodash/package/isBoolean.js deleted file mode 100644 index 242fad1..0000000 --- a/node_modules/lodash/package/isBoolean.js +++ /dev/null @@ -1,39 +0,0 @@ -var isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is classified as a boolean primitive or object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isBoolean(false); - * // => true - * - * _.isBoolean(null); - * // => false - */ -function isBoolean(value) { - return value === true || value === false || - (isObjectLike(value) && objectToString.call(value) == boolTag); -} - -module.exports = isBoolean; diff --git a/node_modules/lodash/package/isBuffer.js b/node_modules/lodash/package/isBuffer.js deleted file mode 100644 index 404c222..0000000 --- a/node_modules/lodash/package/isBuffer.js +++ /dev/null @@ -1,49 +0,0 @@ -var constant = require('./constant'), - root = require('./_root'); - -/** Used to determine if values are of the language type `Object`. */ -var objectTypes = { - 'function': true, - 'object': true -}; - -/** Detect free variable `exports`. */ -var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) - ? exports - : undefined; - -/** Detect free variable `module`. */ -var freeModule = (objectTypes[typeof module] && module && !module.nodeType) - ? module - : undefined; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = (freeModule && freeModule.exports === freeExports) - ? freeExports - : undefined; - -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined; - -/** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ -var isBuffer = !Buffer ? constant(false) : function(value) { - return value instanceof Buffer; -}; - -module.exports = isBuffer; diff --git a/node_modules/lodash/package/isDate.js b/node_modules/lodash/package/isDate.js deleted file mode 100644 index f85a801..0000000 --- a/node_modules/lodash/package/isDate.js +++ /dev/null @@ -1,38 +0,0 @@ -var isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var dateTag = '[object Date]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is classified as a `Date` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isDate(new Date); - * // => true - * - * _.isDate('Mon April 23 2012'); - * // => false - */ -function isDate(value) { - return isObjectLike(value) && objectToString.call(value) == dateTag; -} - -module.exports = isDate; diff --git a/node_modules/lodash/package/isFunction.js b/node_modules/lodash/package/isFunction.js deleted file mode 100644 index da02be0..0000000 --- a/node_modules/lodash/package/isFunction.js +++ /dev/null @@ -1,43 +0,0 @@ -var isObject = require('./isObject'); - -/** `Object#toString` result references. */ -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -module.exports = isFunction; diff --git a/node_modules/lodash/package/isMap.js b/node_modules/lodash/package/isMap.js deleted file mode 100644 index f83758e..0000000 --- a/node_modules/lodash/package/isMap.js +++ /dev/null @@ -1,29 +0,0 @@ -var getTag = require('./_getTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var mapTag = '[object Map]'; - -/** - * Checks if `value` is classified as a `Map` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isMap(new Map); - * // => true - * - * _.isMap(new WeakMap); - * // => false - */ -function isMap(value) { - return isObjectLike(value) && getTag(value) == mapTag; -} - -module.exports = isMap; diff --git a/node_modules/lodash/package/isRegExp.js b/node_modules/lodash/package/isRegExp.js deleted file mode 100644 index 8eeb410..0000000 --- a/node_modules/lodash/package/isRegExp.js +++ /dev/null @@ -1,38 +0,0 @@ -var isObject = require('./isObject'); - -/** `Object#toString` result references. */ -var regexpTag = '[object RegExp]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is classified as a `RegExp` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isRegExp(/abc/); - * // => true - * - * _.isRegExp('/abc/'); - * // => false - */ -function isRegExp(value) { - return isObject(value) && objectToString.call(value) == regexpTag; -} - -module.exports = isRegExp; diff --git a/node_modules/lodash/package/isSet.js b/node_modules/lodash/package/isSet.js deleted file mode 100644 index 9030dc4..0000000 --- a/node_modules/lodash/package/isSet.js +++ /dev/null @@ -1,29 +0,0 @@ -var getTag = require('./_getTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var setTag = '[object Set]'; - -/** - * Checks if `value` is classified as a `Set` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false - */ -function isSet(value) { - return isObjectLike(value) && getTag(value) == setTag; -} - -module.exports = isSet; diff --git a/node_modules/lodash/package/isSymbol.js b/node_modules/lodash/package/isSymbol.js deleted file mode 100644 index 21dd559..0000000 --- a/node_modules/lodash/package/isSymbol.js +++ /dev/null @@ -1,39 +0,0 @@ -var isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} - -module.exports = isSymbol; diff --git a/node_modules/lodash/package/isWeakSet.js b/node_modules/lodash/package/isWeakSet.js deleted file mode 100644 index 5395797..0000000 --- a/node_modules/lodash/package/isWeakSet.js +++ /dev/null @@ -1,38 +0,0 @@ -var isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var weakSetTag = '[object WeakSet]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is classified as a `WeakSet` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isWeakSet(new WeakSet); - * // => true - * - * _.isWeakSet(new Set); - * // => false - */ -function isWeakSet(value) { - return isObjectLike(value) && objectToString.call(value) == weakSetTag; -} - -module.exports = isWeakSet; diff --git a/node_modules/lodash/package/keys.js b/node_modules/lodash/package/keys.js deleted file mode 100644 index 186a4fe..0000000 --- a/node_modules/lodash/package/keys.js +++ /dev/null @@ -1,56 +0,0 @@ -var baseHas = require('./_baseHas'), - baseKeys = require('./_baseKeys'), - indexKeys = require('./_indexKeys'), - isArrayLike = require('./isArrayLike'), - isIndex = require('./_isIndex'), - isPrototype = require('./_isPrototype'); - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - var isProto = isPrototype(object); - if (!(isProto || isArrayLike(object))) { - return baseKeys(object); - } - var indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; - - for (var key in object) { - if (baseHas(object, key) && - !(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(isProto && key == 'constructor')) { - result.push(key); - } - } - return result; -} - -module.exports = keys; diff --git a/node_modules/lodash/package/keysIn.js b/node_modules/lodash/package/keysIn.js deleted file mode 100644 index d2fb91c..0000000 --- a/node_modules/lodash/package/keysIn.js +++ /dev/null @@ -1,55 +0,0 @@ -var baseKeysIn = require('./_baseKeysIn'), - indexKeys = require('./_indexKeys'), - isIndex = require('./_isIndex'), - isPrototype = require('./_isPrototype'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - var index = -1, - isProto = isPrototype(object), - props = baseKeysIn(object), - propsLength = props.length, - indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; - - while (++index < propsLength) { - var key = props[index]; - if (!(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; -} - -module.exports = keysIn; diff --git a/node_modules/lodash/package/lodash.min.js b/node_modules/lodash/package/lodash.min.js deleted file mode 100644 index 4994229..0000000 --- a/node_modules/lodash/package/lodash.min.js +++ /dev/null @@ -1,126 +0,0 @@ -/** - * @license - * lodash 4.11.2 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE - * Build: `lodash -o ./dist/lodash.js` - */ -;(function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function r(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function e(t,n,r,e){for(var u=-1,o=t.length;++ur?false:(r==t.length-1?t.pop():Fu.call(t,r,1),true)}function Zt(t,n){var r=Tt(t,n);return 0>r?N:t[r][1]}function Tt(t,n){for(var r=t.length;r--;)if(Se(t[r][0],n))return r;return-1}function qt(t,n,r){ -var e=Tt(t,n);0>e?t.push([n,r]):t[e][1]=r}function Gt(t,n,r,e){return t===N||Se(t,xu[r])&&!wu.call(e,r)?n:t}function Jt(t,n,r){(r===N||Se(t[n],r))&&(typeof n!="number"||r!==N||n in t)||(t[n]=r)}function Yt(t,n,r){var e=t[n];wu.call(t,n)&&Se(e,r)&&(r!==N||n in t)||(t[n]=r)}function Ht(t,n,r,e){return yo(t,function(t,u,o){n(e,t,r(t),o)}),e}function Qt(t,n){return t&&ar(n,tu(n),t)}function Xt(t,n){for(var r=-1,e=null==t,u=n.length,o=Array(u);++r=t?t:r), -n!==N&&(t=t>=n?t:n)),t}function nn(t,n,r,e,o,i,f){var c;if(e&&(c=i?e(t,o,i,f):e(t)),c!==N)return c;if(!ze(t))return t;if(o=li(t)){if(c=Pr(t),!n)return cr(t,c)}else{var a=Fr(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(si(t))return er(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!i){if(L(t))return i?t:{};if(c=Zr(l?{}:t),!n)return lr(t,Qt(c,t))}else{if(!Bt[a])return i?t:{};c=Tr(t,a,nn,n)}}if(f||(f=new Ft),i=f.get(t))return i;if(f.set(t,c),!o)var s=r?vn(t,tu,$r):tu(t); -return u(s||t,function(u,o){s&&(o=u,u=t[o]),Yt(c,o,nn(u,n,r,e,o,t,f))}),c}function rn(t){var n=tu(t),r=n.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=n[u],i=t[o],f=e[o];if(f===N&&!(o in Object(e))||!i(f))return false}return true}}function en(t){return ze(t)?zu(t):{}}function un(t,n,r){if(typeof t!="function")throw new yu("Expected a function");return $u(function(){t.apply(N,r)},n)}function on(t,n,r,e){var u=-1,o=f,i=true,l=t.length,s=[],h=n.length;if(!l)return s;r&&(n=a(n,A(r))),e?(o=c, -i=false):n.length>=200&&(o=zt,i=false,n=new Ut(n));t:for(;++u0&&r(f)?n>1?ln(f,n-1,r,e,u):l(u,f):e||(u[u.length]=f)}return u}function sn(t,n){return t&&xo(t,n,tu)}function hn(t,n){return t&&jo(t,n,tu)}function pn(t,n){return i(n,function(n){return Ce(t[n])})}function _n(t,n){n=Yr(n,t)?[n]:nr(n);for(var r=0,e=n.length;null!=t&&e>r;)t=t[ee(n[r++])];return r&&r==e?t:N}function vn(t,n,r){return n=n(t),li(t)?n:l(n,r(t))}function gn(t,n){return t>n}function dn(t,n){return wu.call(t,n)||typeof t=="object"&&n in t&&null===Zu(Object(t)); -}function yn(t,n){return n in Object(t)}function bn(t,n,r){for(var e=r?c:f,u=t[0].length,o=t.length,i=o,l=Array(o),s=1/0,h=[];i--;){var p=t[i];i&&n&&(p=a(p,A(n))),s=Gu(p.length,s),l[i]=!r&&(n||u>=120&&p.length>=120)?new Ut(i&&p):N}var p=t[0],_=-1,v=l[0];t:for(;++_h.length;){var g=p[_],d=n?n(g):g,g=r||0!==g?g:0;if(v?!zt(v,d):!e(h,d,r)){for(i=o;--i;){var y=l[i];if(y?!zt(y,d):!e(t[i],d,r))continue t}v&&v.push(d),h.push(g)}}return h}function xn(t,n,r){var e={};return sn(t,function(t,u,o){n(e,r(t),u,o); -}),e}function jn(t,n,e){return Yr(n,t)||(n=nr(n),t=re(t,n),n=ae(n)),n=null==t?t:t[ee(n)],null==n?N:r(n,t,e)}function mn(t,n,r,e,u){if(t===n)n=true;else if(null==t||null==n||!ze(t)&&!De(n))n=t!==t&&n!==n;else t:{var o=li(t),i=li(n),f="[object Array]",c="[object Array]";o||(f=Fr(t),f="[object Arguments]"==f?"[object Object]":f),i||(c=Fr(n),c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f&&!L(t),i="[object Object]"==c&&!L(n);if((c=f==c)&&!a)u||(u=new Ft),n=o||qe(t)?Br(t,n,mn,r,e,u):Lr(t,n,f,mn,r,e,u);else{ -if(!(2&e)&&(o=a&&wu.call(t,"__wrapped__"),f=i&&wu.call(n,"__wrapped__"),o||f)){t=o?t.value():t,n=f?n.value():n,u||(u=new Ft),n=mn(t,n,r,e,u);break t}if(c)n:if(u||(u=new Ft),o=2&e,f=tu(t),i=f.length,c=tu(n).length,i==c||o){for(a=i;a--;){var l=f[a];if(!(o?l in n:dn(n,l))){n=false;break n}}if(c=u.get(t))n=c==n;else{c=true,u.set(t,n);for(var s=o;++at}function En(t,n){var r=-1,e=We(t)?Array(t.length):[];return yo(t,function(t,u,o){e[++r]=n(t,u,o)}),e}function In(t){var n=Ur(t);return 1==n.length&&n[0][2]?te(n[0][0],n[0][1]):function(r){return r===t||wn(r,t,n)}}function Sn(t,n){return Yr(t)&&n===n&&!ze(n)?te(ee(t),n):function(r){ -var e=Qe(r,t);return e===N&&e===n?Xe(r,t):mn(n,e,N,3)}}function Rn(t,n,r,e,o){if(t!==n){if(!li(n)&&!qe(n))var i=nu(n);u(i||n,function(u,f){if(i&&(f=u,u=n[f]),ze(u)){o||(o=new Ft);var c=f,a=o,l=t[c],s=n[c],h=a.get(s);if(h)Jt(t,c,h);else{var h=e?e(l,s,c+"",t,n,a):N,p=h===N;p&&(h=s,li(s)||qe(s)?li(l)?h=l:Be(l)?h=cr(l):(p=false,h=nn(s,true)):Ne(s)||Re(s)?Re(l)?h=Ye(l):!ze(l)||r&&Ce(l)?(p=false,h=nn(s,true)):h=l:p=false),a.set(s,h),p&&Rn(h,s,r,e,a),a["delete"](s),Jt(t,c,h)}}else c=e?e(t[f],u,f+"",t,n,o):N,c===N&&(c=u), -Jt(t,f,c)})}}function Wn(t,n){var r=t.length;return r?(n+=0>n?r:0,Gr(n,r)?t[n]:N):void 0}function Bn(t,n,r){var e=-1;return n=a(n.length?n:[au],A(Mr())),t=En(t,function(t){return{a:a(n,function(n){return n(t)}),b:++e,c:t}}),x(t,function(t,n){var e;t:{e=-1;for(var u=t.a,o=n.a,i=u.length,f=r.length;++e=f?c:c*("desc"==r[e]?-1:1);break t}}e=t.b-n.b}return e})}function Ln(t,n){return t=Object(t),s(n,function(n,r){return r in t&&(n[r]=t[r]),n},{})}function Cn(t,n){for(var r=-1,e=vn(t,nu,ko),u=e.length,o={};++rn||n>9007199254740991)return r;do n%2&&(r+=t),(n=Pu(n/2))&&(t+=t);while(n);return r}function Nn(t,n,r,e){n=Yr(n,t)?[n]:nr(n);for(var u=-1,o=n.length,i=o-1,f=t;null!=f&&++un&&(n=-n>u?0:u+n),r=r>u?u:r,0>r&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0,r=Array(u);++e=u){for(;u>e;){var o=e+u>>>1,i=t[o];null!==i&&!Te(i)&&(r?n>=i:n>i)?e=o+1:u=o}return u}return qn(t,n,au,r)}function qn(t,n,r,e){n=r(n);for(var u=0,o=t?t.length:0,i=n!==n,f=null===n,c=Te(n),a=n===N;o>u;){var l=Pu((u+o)/2),s=r(t[l]),h=s!==N,p=null===s,_=s===s,v=Te(s);(i?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?n>=s:n>s)?u=l+1:o=l; -}return Gu(o,4294967294)}function Vn(t,n){for(var r=-1,e=t.length,u=0,o=[];++r=200){if(u=n?null:wo(t))return z(u);i=false,u=zt,l=new Ut}else l=n?[]:a;t:for(;++ee?n[e]:N);return i}function tr(t){return Be(t)?t:[]}function nr(t){return li(t)?t:Io(t)}function rr(t,n,r){var e=t.length;return r=r===N?e:r,!n&&r>=e?t:Pn(t,n,r)}function er(t,n){if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function ur(t){var n=new t.constructor(t.byteLength);return new Bu(n).set(new Bu(t)),n}function or(t,n){if(t!==n){var r=t!==N,e=null===t,u=t===t,o=Te(t),i=n!==N,f=null===n,c=n===n,a=Te(n); -if(!f&&!a&&!o&&t>n||o&&i&&c&&!f&&!a||e&&i&&c||!r&&c||!u)return 1;if(!e&&!o&&!a&&n>t||a&&r&&u&&!e&&!o||f&&r&&u||!i&&u||!c)return-1}return 0}function ir(t,n,r,e){var u=-1,o=t.length,i=r.length,f=-1,c=n.length,a=Ku(o-i,0),l=Array(c+a);for(e=!e;++fu)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];return l}function fr(t,n,r,e){var u=-1,o=t.length,i=-1,f=r.length,c=-1,a=n.length,l=Ku(o-f,0),s=Array(l+a);for(e=!e;++uu)&&(s[l+r[i]]=t[u++]); -return s}function cr(t,n){var r=-1,e=t.length;for(n||(n=Array(e));++r1?r[u-1]:N,i=u>2?r[2]:N,o=typeof o=="function"?(u--,o):N;for(i&&Jr(r[0],r[1],i)&&(o=3>u?N:o,u=1),n=Object(n);++ei&&f[0]!==a&&f[i-1]!==a?[]:U(f,a),i-=c.length,e>i?Sr(t,n,jr,u.placeholder,N,f,c,N,N,e-i):r(this&&this!==Vt&&this instanceof u?o:t,this,f)}var o=yr(t);return u}function xr(t){return Ee(function(n){n=ln(n,1);var r=n.length,e=r,u=wt.prototype.thru;for(t&&n.reverse();e--;){var o=n[e];if(typeof o!="function")throw new yu("Expected a function");if(u&&!i&&"wrapper"==Cr(o))var i=new wt([],true); -}for(e=i?e:r;++e=200)return i.plant(e).value();for(var u=0,t=r?n[u].apply(this,t):e;++ud)return j=U(b,j),Sr(t,n,jr,l.placeholder,r,b,j,f,c,a-d);if(j=h?r:this,y=p?j[t]:t,d=b.length,f){x=b.length;for(var m=Gu(f.length,x),w=cr(b);m--;){var A=f[m];b[m]=Gr(A,x)?w[A]:N}}else v&&d>1&&b.reverse();return s&&d>c&&(b.length=c),this&&this!==Vt&&this instanceof l&&(y=g||yr(y)),y.apply(j,b)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?N:yr(t);return l}function mr(t,n){return function(r,e){return xn(r,t,n(e))}}function wr(t){return function(n,r){var e; -if(n===N&&r===N)return 0;if(n!==N&&(e=n),r!==N){if(e===N)return r;typeof n=="string"||typeof r=="string"?(n=Gn(n),r=Gn(r)):(n=Kn(n),r=Kn(r)),e=t(n,r)}return e}}function Ar(t){return Ee(function(n){return n=1==n.length&&li(n[0])?a(n[0],A(Mr())):a(ln(n,1,Kr),A(Mr())),Ee(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function Or(t,n){n=n===N?" ":Gn(n);var r=n.length;return 2>r?r?Fn(n,t):n:(r=Fn(n,Nu(t/D(n))),It.test(n)?rr(r.match(kt),0,t).join(""):r.slice(0,t))}function kr(t,n,e,u){ -function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Vt&&this instanceof o?f:t;++an?1:-1:Je(e)||0;var u=-1;r=Ku(Nu((r-n)/(e||1)),0);for(var o=Array(r);r--;)o[t?r:++u]=n,n+=e;return o}}function Ir(t){return function(n,r){return typeof n=="string"&&typeof r=="string"||(n=Je(n), -r=Je(r)),t(n,r)}}function Sr(t,n,r,e,u,o,i,f,c,a){var l=8&n,s=l?i:N;i=l?N:i;var h=l?o:N;return o=l?N:o,n=(n|(l?32:64))&~(l?64:32),4&n||(n&=-4),n=[t,n,u,h,s,o,i,f,c,a],r=r.apply(N,n),Qr(t)&&Eo(r,n),r.placeholder=e,r}function Rr(t){var n=gu[t];return function(t,r){if(t=Je(t),r=Ke(r)){var e=(He(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(He(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return n(t)}}function Wr(t,n,r,e,u,o,i,f){var c=2&n;if(!c&&typeof t!="function")throw new yu("Expected a function"); -var a=e?e.length:0;if(a||(n&=-97,e=u=N),i=i===N?i:Ku(Ke(i),0),f=f===N?f:Ke(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=N}var h=c?N:Ao(t);return o=[t,n,r,e,u,l,s,o,i,f],h&&(r=o[1],t=h[1],n=r|t,e=128==t&&8==r||128==t&&256==r&&h[8]>=o[7].length||384==t&&h[8]>=h[7].length&&8==r,131>n||e)&&(1&t&&(o[2]=h[2],n|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?ir(e,r,h[4]):r,o[4]=e?U(o[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=o[5],o[5]=e?fr(e,r,h[6]):r,o[6]=e?U(o[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(o[7]=r), -128&t&&(o[8]=null==o[8]?h[8]:Gu(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=n),t=o[0],n=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:t.length:Ku(o[9]-a,0),!f&&24&n&&(n&=-25),(h?mo:Eo)(n&&1!=n?8==n||16==n?br(t,n,f):32!=n&&33!=n||u.length?jr.apply(N,o):kr(t,n,r,e):vr(t,n,r),o)}function Br(t,n,r,e,u,o){var i=-1,f=2&u,c=1&u,a=t.length,l=n.length;if(a!=l&&!(f&&l>a))return false;if(l=o.get(t))return l==n;for(l=true,o.set(t,n);++i-1&&0==t%1&&n>t}function Jr(t,n,r){if(!ze(r))return false;var e=typeof n;return("number"==e?We(r)&&Gr(n,r.length):"string"==e&&n in r)?Se(r[n],t):false; -}function Yr(t,n){if(li(t))return false;var r=typeof t;return"number"==r||"symbol"==r||"boolean"==r||null==t||Te(t)?true:nt.test(t)||!tt.test(t)||null!=n&&t in Object(n)}function Hr(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}function Qr(t){var n=Cr(t),r=jt[n];return typeof r=="function"&&n in Lt.prototype?t===r?true:(n=Ao(r),!!n&&t===n[0]):false}function Xr(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||xu)}function te(t,n){return function(r){ -return null==r?false:r[t]===n&&(n!==N||t in Object(r))}}function ne(t,n,r,e,u,o){return ze(t)&&ze(n)&&Rn(t,n,N,ne,o.set(n,t)),t}function re(t,n){return 1==n.length?t:_n(t,Pn(n,0,-1))}function ee(t){if(typeof t=="string"||Te(t))return t;var n=t+"";return"0"==n&&1/t==-P?"-0":n}function ue(t){if(null!=t){try{return mu.call(t)}catch(n){}return t+""}return""}function oe(t){if(t instanceof Lt)return t.clone();var n=new wt(t.__wrapped__,t.__chain__);return n.__actions__=cr(t.__actions__),n.__index__=t.__index__, -n.__values__=t.__values__,n}function ie(t,n,r){var e=t?t.length:0;return e?(n=r||n===N?1:Ke(n),Pn(t,0>n?0:n,e)):[]}function fe(t,n,r){var e=t?t.length:0;return e?(n=r||n===N?1:Ke(n),n=e-n,Pn(t,0,0>n?0:n)):[]}function ce(t){return t&&t.length?t[0]:N}function ae(t){var n=t?t.length:0;return n?t[n-1]:N}function le(t,n){return t&&t.length&&n&&n.length?zn(t,n):t}function se(t){return t?Qu.call(t):t}function he(t){if(!t||!t.length)return[];var n=0;return t=i(t,function(t){return Be(t)?(n=Ku(t.length,n), -!0):void 0}),m(n,function(n){return a(t,Mn(n))})}function pe(t,n){if(!t||!t.length)return[];var e=he(t);return null==n?e:a(e,function(t){return r(n,N,t)})}function _e(t){return t=jt(t),t.__chain__=true,t}function ve(t,n){return n(t)}function ge(){return this}function de(t,n){return typeof n=="function"&&li(t)?u(t,n):yo(t,Mr(n))}function ye(t,n){var r;if(typeof n=="function"&&li(t)){for(r=t.length;r--&&false!==n(t[r],r,t););r=t}else r=bo(t,Mr(n));return r}function be(t,n){return(li(t)?a:En)(t,Mr(n,3))}function xe(t,n,r){ -var e=-1,u=Ve(t),o=u.length,i=o-1;for(n=(r?Jr(t,n,r):n===N)?1:tn(Ke(n),0,o);++e=t&&(n=N),r}}function we(t,n,r){return n=r?N:n,t=Wr(t,8,N,N,N,N,N,n),t.placeholder=we.placeholder,t}function Ae(t,n,r){return n=r?N:n, -t=Wr(t,16,N,N,N,N,N,n),t.placeholder=Ae.placeholder,t}function Oe(t,n,r){function e(n){var r=c,e=a;return c=a=N,_=n,s=t.apply(e,r)}function u(t){var r=t-p;return t-=_,!p||r>=n||0>r||g&&t>=l}function o(){var t=Xo();if(u(t))return i(t);var r;r=t-_,t=n-(t-p),r=g?Gu(t,l-r):t,h=$u(o,r)}function i(t){return Lu(h),h=N,d&&c?e(t):(c=a=N,s)}function f(){var t=Xo(),r=u(t);if(c=arguments,a=this,p=t,r){if(h===N)return _=t=p,h=$u(o,n),v?e(t):s;if(g)return Lu(h),h=$u(o,n),e(p)}return h===N&&(h=$u(o,n)),s}var c,a,l,s,h,p=0,_=0,v=false,g=false,d=true; -if(typeof t!="function")throw new yu("Expected a function");return n=Je(n)||0,ze(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Ku(Je(r.maxWait)||0,n):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==N&&Lu(h),p=_=0,c=a=h=N},f.flush=function(){return h===N?s:i(Xo())},f}function ke(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=t.apply(this,e),r.cache=o.set(u,e),e)}if(typeof t!="function"||n&&typeof n!="function")throw new yu("Expected a function"); -return r.cache=new(ke.Cache||Mt),r}function Ee(t,n){if(typeof t!="function")throw new yu("Expected a function");return n=Ku(n===N?t.length-1:Ke(n),0),function(){for(var e=arguments,u=-1,o=Ku(e.length-n,0),i=Array(o);++u-1&&0==t%1&&9007199254740991>=t; -}function ze(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function De(t){return!!t&&typeof t=="object"}function $e(t){return ze(t)?(Ce(t)||L(t)?Iu:vt).test(ue(t)):false}function Fe(t){return typeof t=="number"||De(t)&&"[object Number]"==ku.call(t)}function Ne(t){return!De(t)||"[object Object]"!=ku.call(t)||L(t)?false:(t=Zu(Object(t)),null===t?true:(t=wu.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&mu.call(t)==Ou))}function Pe(t){return ze(t)&&"[object RegExp]"==ku.call(t); -}function Ze(t){return typeof t=="string"||!li(t)&&De(t)&&"[object String]"==ku.call(t)}function Te(t){return typeof t=="symbol"||De(t)&&"[object Symbol]"==ku.call(t)}function qe(t){return De(t)&&Ue(t.length)&&!!Wt[ku.call(t)]}function Ve(t){if(!t)return[];if(We(t))return Ze(t)?t.match(kt):cr(t);if(Uu&&t[Uu])return C(t[Uu]());var n=Fr(t);return("[object Map]"==n?M:"[object Set]"==n?z:uu)(t)}function Ke(t){if(!t)return 0===t?t:0;if(t=Je(t),t===P||t===-P)return 1.7976931348623157e308*(0>t?-1:1);var n=t%1; -return t===t?n?t-n:t:0}function Ge(t){return t?tn(Ke(t),0,4294967295):0}function Je(t){if(typeof t=="number")return t;if(Te(t))return Z;if(ze(t)&&(t=Ce(t.valueOf)?t.valueOf():t,t=ze(t)?t+"":t),typeof t!="string")return 0===t?t:+t;t=t.replace(ot,"");var n=_t.test(t);return n||gt.test(t)?$t(t.slice(2),n?2:8):pt.test(t)?Z:+t}function Ye(t){return ar(t,nu(t))}function He(t){return null==t?"":Gn(t)}function Qe(t,n,r){return t=null==t?N:_n(t,n),t===N?r:t}function Xe(t,n){return null!=t&&Nr(t,n,yn)}function tu(t){ -var n=Xr(t);if(!n&&!We(t))return Vu(Object(t));var r,e=qr(t),u=!!e,e=e||[],o=e.length;for(r in t)!dn(t,r)||u&&("length"==r||Gr(r,o))||n&&"constructor"==r||e.push(r);return e}function nu(t){for(var n=-1,r=Xr(t),e=On(t),u=e.length,o=qr(t),i=!!o,o=o||[],f=o.length;++ne.length?qt(e,t,n):(r.array=null,r.map=new Mt(e))),(r=r.map)&&r.set(t,n),this};var yo=pr(sn),bo=pr(hn,true),xo=_r(),jo=_r(true);Cu&&!Du.call({valueOf:1},"valueOf")&&(On=function(t){return C(Cu(t))});var mo=io?function(t,n){return io.set(t,n),t}:au,wo=eo&&1/z(new eo([,-0]))[1]==P?function(t){ -return new eo(t)}:hu,Ao=io?function(t){return io.get(t)}:hu,Oo=Mn("length");Mu||($r=function(){return[]});var ko=Mu?function(t){for(var n=[];t;)l(n,$r(t)),t=Zu(Object(t));return n}:$r;(to&&"[object DataView]"!=Fr(new to(new ArrayBuffer(1)))||no&&"[object Map]"!=Fr(new no)||ro&&"[object Promise]"!=Fr(ro.resolve())||eo&&"[object Set]"!=Fr(new eo)||uo&&"[object WeakMap]"!=Fr(new uo))&&(Fr=function(t){var n=ku.call(t);if(t=(t="[object Object]"==n?t.constructor:N)?ue(t):N)switch(t){case ao:return"[object DataView]"; -case lo:return"[object Map]";case so:return"[object Promise]";case ho:return"[object Set]";case po:return"[object WeakMap]"}return n});var Eo=function(){var t=0,n=0;return function(r,e){var u=Xo(),o=16-(u-n);if(n=u,o>0){if(150<=++t)return r}else t=0;return mo(r,e)}}(),Io=ke(function(t){var n=[];return He(t).replace(rt,function(t,r,e,u){n.push(e?u.replace(at,"$1"):r||t)}),n}),So=Ee(function(t,n){return Be(t)?on(t,ln(n,1,Be,true)):[]}),Ro=Ee(function(t,n){var r=ae(n);return Be(r)&&(r=N),Be(t)?on(t,ln(n,1,Be,true),Mr(r)):[]; -}),Wo=Ee(function(t,n){var r=ae(n);return Be(r)&&(r=N),Be(t)?on(t,ln(n,1,Be,true),N,r):[]}),Bo=Ee(function(t){var n=a(t,tr);return n.length&&n[0]===t[0]?bn(n):[]}),Lo=Ee(function(t){var n=ae(t),r=a(t,tr);return n===ae(r)?n=N:r.pop(),r.length&&r[0]===t[0]?bn(r,Mr(n)):[]}),Co=Ee(function(t){var n=ae(t),r=a(t,tr);return n===ae(r)?n=N:r.pop(),r.length&&r[0]===t[0]?bn(r,N,n):[]}),Mo=Ee(le),Uo=Ee(function(t,n){n=ln(n,1);var r=t?t.length:0,e=Xt(t,n);return Dn(t,a(n,function(t){return Gr(t,r)?+t:t}).sort(or)), -e}),zo=Ee(function(t){return Jn(ln(t,1,Be,true))}),Do=Ee(function(t){var n=ae(t);return Be(n)&&(n=N),Jn(ln(t,1,Be,true),Mr(n))}),$o=Ee(function(t){var n=ae(t);return Be(n)&&(n=N),Jn(ln(t,1,Be,true),N,n)}),Fo=Ee(function(t,n){return Be(t)?on(t,n):[]}),No=Ee(function(t){return Qn(i(t,Be))}),Po=Ee(function(t){var n=ae(t);return Be(n)&&(n=N),Qn(i(t,Be),Mr(n))}),Zo=Ee(function(t){var n=ae(t);return Be(n)&&(n=N),Qn(i(t,Be),N,n)}),To=Ee(he),qo=Ee(function(t){var n=t.length,n=n>1?t[n-1]:N,n=typeof n=="function"?(t.pop(), -n):N;return pe(t,n)}),Vo=Ee(function(t){function n(n){return Xt(n,t)}t=ln(t,1);var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return!(r>1||this.__actions__.length)&&u instanceof Lt&&Gr(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:ve,args:[n],thisArg:N}),new wt(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(N),t})):this.thru(n)}),Ko=sr(function(t,n,r){wu.call(t,r)?++t[r]:t[r]=1}),Go=sr(function(t,n,r){wu.call(t,r)?t[r].push(n):t[r]=[n]}),Jo=Ee(function(t,n,e){var u=-1,o=typeof n=="function",i=Yr(n),f=We(t)?Array(t.length):[]; -return yo(t,function(t){var c=o?n:i&&null!=t?t[n]:N;f[++u]=c?r(c,t,e):jn(t,n,e)}),f}),Yo=sr(function(t,n,r){t[r]=n}),Ho=sr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),Qo=Ee(function(t,n){if(null==t)return[];var r=n.length;return r>1&&Jr(t,n[0],n[1])?n=[]:r>2&&Jr(n[0],n[1],n[2])&&(n=[n[0]]),n=1==n.length&&li(n[0])?n[0]:ln(n,1,Kr),Bn(t,n,[])}),Xo=_u.now,ti=Ee(function(t,n,r){var e=1;if(r.length)var u=U(r,Dr(ti)),e=32|e;return Wr(t,e,n,r,u)}),ni=Ee(function(t,n,r){var e=3;if(r.length)var u=U(r,Dr(ni)),e=32|e; -return Wr(n,e,t,r,u)}),ri=Ee(function(t,n){return un(t,1,n)}),ei=Ee(function(t,n,r){return un(t,Je(n)||0,r)});ke.Cache=Mt;var ui=Ee(function(t,n){n=1==n.length&&li(n[0])?a(n[0],A(Mr())):a(ln(n,1,Kr),A(Mr()));var e=n.length;return Ee(function(u){for(var o=-1,i=Gu(u.length,e);++o=n}),li=Array.isArray,si=Su?function(t){return t instanceof Su}:cu(false),hi=Ir(kn),pi=Ir(function(t,n){return n>=t}),_i=hr(function(t,n){if(fo||Xr(n)||We(n))ar(n,tu(n),t);else for(var r in n)wu.call(n,r)&&Yt(t,r,n[r])}),vi=hr(function(t,n){if(fo||Xr(n)||We(n))ar(n,nu(n),t);else for(var r in n)Yt(t,r,n[r])}),gi=hr(function(t,n,r,e){ar(n,nu(n),t,e)}),di=hr(function(t,n,r,e){ar(n,tu(n),t,e)}),yi=Ee(function(t,n){return Xt(t,ln(n,1))}),bi=Ee(function(t){return t.push(N,Gt), -r(gi,N,t)}),xi=Ee(function(t){return t.push(N,ne),r(Oi,N,t)}),ji=mr(function(t,n,r){t[n]=r},cu(au)),mi=mr(function(t,n,r){wu.call(t,n)?t[n].push(r):t[n]=[r]},Mr),wi=Ee(jn),Ai=hr(function(t,n,r){Rn(t,n,r)}),Oi=hr(function(t,n,r,e){Rn(t,n,r,e)}),ki=Ee(function(t,n){return null==t?{}:(n=a(ln(n,1),ee),Ln(t,on(vn(t,nu,ko),n)))}),Ei=Ee(function(t,n){return null==t?{}:Ln(t,a(ln(n,1),ee))}),Ii=dr(function(t,n,r){return n=n.toLowerCase(),t+(r?ou(n):n)}),Si=dr(function(t,n,r){return t+(r?"-":"")+n.toLowerCase(); -}),Ri=dr(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),Wi=gr("toLowerCase"),Bi=dr(function(t,n,r){return t+(r?"_":"")+n.toLowerCase()}),Li=dr(function(t,n,r){return t+(r?" ":"")+Mi(n)}),Ci=dr(function(t,n,r){return t+(r?" ":"")+n.toUpperCase()}),Mi=gr("toUpperCase"),Ui=Ee(function(t,n){try{return r(t,N,n)}catch(e){return Le(e)?e:new vu(e)}}),zi=Ee(function(t,n){return u(ln(n,1),function(n){n=ee(n),t[n]=ti(t[n],t)}),t}),Di=xr(),$i=xr(true),Fi=Ee(function(t,n){return function(r){return jn(r,t,n); -}}),Ni=Ee(function(t,n){return function(r){return jn(t,r,n)}}),Pi=Ar(a),Zi=Ar(o),Ti=Ar(p),qi=Er(),Vi=Er(true),Ki=wr(function(t,n){return t+n}),Gi=Rr("ceil"),Ji=wr(function(t,n){return t/n}),Yi=Rr("floor"),Hi=wr(function(t,n){return t*n}),Qi=Rr("round"),Xi=wr(function(t,n){return t-n});return jt.after=function(t,n){if(typeof n!="function")throw new yu("Expected a function");return t=Ke(t),function(){return 1>--t?n.apply(this,arguments):void 0}},jt.ary=je,jt.assign=_i,jt.assignIn=vi,jt.assignInWith=gi, -jt.assignWith=di,jt.at=yi,jt.before=me,jt.bind=ti,jt.bindAll=zi,jt.bindKey=ni,jt.castArray=Ie,jt.chain=_e,jt.chunk=function(t,n,r){if(n=(r?Jr(t,n,r):n===N)?1:Ku(Ke(n),0),r=t?t.length:0,!r||1>n)return[];for(var e=0,u=0,o=Array(Nu(r/n));r>e;)o[u++]=Pn(t,e,e+=n);return o},jt.compact=function(t){for(var n=-1,r=t?t.length:0,e=0,u=[];++nt)return t?cr(n):[];for(var r=Array(t-1);t--;)r[t-1]=arguments[t]; -for(var t=ln(r,1),r=-1,e=n.length,u=-1,o=t.length,i=Array(e+o);++rr&&(r=-r>u?0:u+r),e=e===N||e>u?u:Ke(e),0>e&&(e+=u),e=r>e?0:Ge(e);e>r;)t[r++]=n; -return t},jt.filter=function(t,n){return(li(t)?i:an)(t,Mr(n,3))},jt.flatMap=function(t,n){return ln(be(t,n),1)},jt.flatMapDeep=function(t,n){return ln(be(t,n),P)},jt.flatMapDepth=function(t,n,r){return r=r===N?1:Ke(r),ln(be(t,n),r)},jt.flatten=function(t){return t&&t.length?ln(t,1):[]},jt.flattenDeep=function(t){return t&&t.length?ln(t,P):[]},jt.flattenDepth=function(t,n){return t&&t.length?(n=n===N?1:Ke(n),ln(t,n)):[]},jt.flip=function(t){return Wr(t,512)},jt.flow=Di,jt.flowRight=$i,jt.fromPairs=function(t){ -for(var n=-1,r=t?t.length:0,e={};++n>>0,r?(t=He(t))&&(typeof n=="string"||null!=n&&!Pe(n))&&(n=Gn(n),""==n&&It.test(t))?rr(t.match(kt),0,r):Xu.call(t,n,r):[]},jt.spread=function(t,n){if(typeof t!="function")throw new yu("Expected a function");return n=n===N?0:Ku(Ke(n),0),Ee(function(e){var u=e[n];return e=rr(e,0,n),u&&l(e,u),r(t,this,e)})},jt.tail=function(t){return ie(t,1)},jt.take=function(t,n,r){return t&&t.length?(n=r||n===N?1:Ke(n),Pn(t,0,0>n?0:n)):[]},jt.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===N?1:Ke(n), -n=e-n,Pn(t,0>n?0:n,e)):[]},jt.takeRightWhile=function(t,n){return t&&t.length?Yn(t,Mr(n,3),false,true):[]},jt.takeWhile=function(t,n){return t&&t.length?Yn(t,Mr(n,3)):[]},jt.tap=function(t,n){return n(t),t},jt.throttle=function(t,n,r){var e=true,u=true;if(typeof t!="function")throw new yu("Expected a function");return ze(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),Oe(t,n,{leading:e,maxWait:n,trailing:u})},jt.thru=ve,jt.toArray=Ve,jt.toPairs=ru,jt.toPairsIn=eu,jt.toPath=function(t){ -return li(t)?a(t,ee):Te(t)?[t]:cr(Io(t))},jt.toPlainObject=Ye,jt.transform=function(t,n,r){var e=li(t)||qe(t);if(n=Mr(n,4),null==r)if(e||ze(t)){var o=t.constructor;r=e?li(t)?new o:[]:Ce(o)?en(Zu(Object(t))):{}}else r={};return(e?u:sn)(t,function(t,e,u){return n(r,t,e,u)}),r},jt.unary=function(t){return je(t,1)},jt.union=zo,jt.unionBy=Do,jt.unionWith=$o,jt.uniq=function(t){return t&&t.length?Jn(t):[]},jt.uniqBy=function(t,n){return t&&t.length?Jn(t,Mr(n)):[]},jt.uniqWith=function(t,n){return t&&t.length?Jn(t,N,n):[]; -},jt.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=Yr(e,r)?[e]:nr(e);r=re(r,e),e=ee(ae(e)),r=!(null!=r&&dn(r,e))||delete r[e]}return r},jt.unzip=he,jt.unzipWith=pe,jt.update=function(t,n,r){return null==t?t:Nn(t,n,(typeof r=="function"?r:au)(_n(t,n)),void 0)},jt.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:N,null!=t&&(t=Nn(t,n,(typeof r=="function"?r:au)(_n(t,n)),e)),t},jt.values=uu,jt.valuesIn=function(t){return null==t?[]:O(t,nu(t))},jt.without=Fo,jt.words=fu,jt.wrap=function(t,n){ -return n=null==n?au:n,oi(n,t)},jt.xor=No,jt.xorBy=Po,jt.xorWith=Zo,jt.zip=To,jt.zipObject=function(t,n){return Xn(t||[],n||[],Yt)},jt.zipObjectDeep=function(t,n){return Xn(t||[],n||[],Nn)},jt.zipWith=qo,jt.entries=ru,jt.entriesIn=eu,jt.extend=vi,jt.extendWith=gi,su(jt,jt),jt.add=Ki,jt.attempt=Ui,jt.camelCase=Ii,jt.capitalize=ou,jt.ceil=Gi,jt.clamp=function(t,n,r){return r===N&&(r=n,n=N),r!==N&&(r=Je(r),r=r===r?r:0),n!==N&&(n=Je(n),n=n===n?n:0),tn(Je(t),n,r)},jt.clone=function(t){return nn(t,false,true); -},jt.cloneDeep=function(t){return nn(t,true,true)},jt.cloneDeepWith=function(t,n){return nn(t,true,true,n)},jt.cloneWith=function(t,n){return nn(t,false,true,n)},jt.deburr=iu,jt.divide=Ji,jt.endsWith=function(t,n,r){t=He(t),n=Gn(n);var e=t.length;return r=r===N?e:tn(Ke(r),0,e),r-=n.length,r>=0&&t.indexOf(n,r)==r},jt.eq=Se,jt.escape=function(t){return(t=He(t))&&Y.test(t)?t.replace(G,R):t},jt.escapeRegExp=function(t){return(t=He(t))&&ut.test(t)?t.replace(et,"\\$&"):t},jt.every=function(t,n,r){var e=li(t)?o:fn;return r&&Jr(t,n,r)&&(n=N), -e(t,Mr(n,3))},jt.find=function(t,n){if(n=Mr(n,3),li(t)){var r=v(t,n);return r>-1?t[r]:N}return _(t,n,yo)},jt.findIndex=function(t,n){return t&&t.length?v(t,Mr(n,3)):-1},jt.findKey=function(t,n){return _(t,Mr(n,3),sn,true)},jt.findLast=function(t,n){if(n=Mr(n,3),li(t)){var r=v(t,n,true);return r>-1?t[r]:N}return _(t,n,bo)},jt.findLastIndex=function(t,n){return t&&t.length?v(t,Mr(n,3),true):-1},jt.findLastKey=function(t,n){return _(t,Mr(n,3),hn,true)},jt.floor=Yi,jt.forEach=de,jt.forEachRight=ye,jt.forIn=function(t,n){ -return null==t?t:xo(t,Mr(n),nu)},jt.forInRight=function(t,n){return null==t?t:jo(t,Mr(n),nu)},jt.forOwn=function(t,n){return t&&sn(t,Mr(n))},jt.forOwnRight=function(t,n){return t&&hn(t,Mr(n))},jt.get=Qe,jt.gt=ci,jt.gte=ai,jt.has=function(t,n){return null!=t&&Nr(t,n,dn)},jt.hasIn=Xe,jt.head=ce,jt.identity=au,jt.includes=function(t,n,r,e){return t=We(t)?t:uu(t),r=r&&!e?Ke(r):0,e=t.length,0>r&&(r=Ku(e+r,0)),Ze(t)?e>=r&&-1r&&(r=Ku(e+r,0)),g(t,n,r)):-1},jt.inRange=function(t,n,r){return n=Je(n)||0,r===N?(r=n,n=0):r=Je(r)||0,t=Je(t),t>=Gu(n,r)&&t=-9007199254740991&&9007199254740991>=t; -},jt.isSet=function(t){return De(t)&&"[object Set]"==Fr(t)},jt.isString=Ze,jt.isSymbol=Te,jt.isTypedArray=qe,jt.isUndefined=function(t){return t===N},jt.isWeakMap=function(t){return De(t)&&"[object WeakMap]"==Fr(t)},jt.isWeakSet=function(t){return De(t)&&"[object WeakSet]"==ku.call(t)},jt.join=function(t,n){return t?qu.call(t,n):""},jt.kebabCase=Si,jt.last=ae,jt.lastIndexOf=function(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e;if(r!==N&&(u=Ke(r),u=(0>u?Ku(e+u,0):Gu(u,e-1))+1),n!==n)return B(t,u,true); -for(;u--;)if(t[u]===n)return u;return-1},jt.lowerCase=Ri,jt.lowerFirst=Wi,jt.lt=hi,jt.lte=pi,jt.max=function(t){return t&&t.length?cn(t,au,gn):N},jt.maxBy=function(t,n){return t&&t.length?cn(t,Mr(n),gn):N},jt.mean=function(t){return y(t,au)},jt.meanBy=function(t,n){return y(t,Mr(n))},jt.min=function(t){return t&&t.length?cn(t,au,kn):N},jt.minBy=function(t,n){return t&&t.length?cn(t,Mr(n),kn):N},jt.multiply=Hi,jt.nth=function(t,n){return t&&t.length?Wn(t,Ke(n)):N},jt.noConflict=function(){return Vt._===this&&(Vt._=Eu), -this},jt.noop=hu,jt.now=Xo,jt.pad=function(t,n,r){t=He(t);var e=(n=Ke(n))?D(t):0;return!n||e>=n?t:(n=(n-e)/2,Or(Pu(n),r)+t+Or(Nu(n),r))},jt.padEnd=function(t,n,r){t=He(t);var e=(n=Ke(n))?D(t):0;return n&&n>e?t+Or(n-e,r):t},jt.padStart=function(t,n,r){t=He(t);var e=(n=Ke(n))?D(t):0;return n&&n>e?Or(n-e,r)+t:t},jt.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n),t=He(t).replace(ot,""),Ju(t,n||(ht.test(t)?16:10))},jt.random=function(t,n,r){if(r&&typeof r!="boolean"&&Jr(t,n,r)&&(n=r=N),r===N&&(typeof n=="boolean"?(r=n, -n=N):typeof t=="boolean"&&(r=t,t=N)),t===N&&n===N?(t=0,n=1):(t=Je(t)||0,n===N?(n=t,t=0):n=Je(n)||0),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=Yu(),Gu(t+r*(n-t+Dt("1e-"+((r+"").length-1))),n)):$n(t,n)},jt.reduce=function(t,n,r){var e=li(t)?s:b,u=3>arguments.length;return e(t,Mr(n,4),r,u,yo)},jt.reduceRight=function(t,n,r){var e=li(t)?h:b,u=3>arguments.length;return e(t,Mr(n,4),r,u,bo)},jt.repeat=function(t,n,r){return n=(r?Jr(t,n,r):n===N)?1:Ke(n),Fn(He(t),n)},jt.replace=function(){var t=arguments,n=He(t[0]); -return 3>t.length?n:Hu.call(n,t[1],t[2])},jt.result=function(t,n,r){n=Yr(n,t)?[n]:nr(n);var e=-1,u=n.length;for(u||(t=N,u=1);++e0?t[$n(0,n-1)]:N},jt.size=function(t){if(null==t)return 0;if(We(t)){var n=t.length;return n&&Ze(t)?D(t):n}return De(t)&&(n=Fr(t),"[object Map]"==n||"[object Set]"==n)?t.size:tu(t).length},jt.snakeCase=Bi, -jt.some=function(t,n,r){var e=li(t)?p:Zn;return r&&Jr(t,n,r)&&(n=N),e(t,Mr(n,3))},jt.sortedIndex=function(t,n){return Tn(t,n)},jt.sortedIndexBy=function(t,n,r){return qn(t,n,Mr(r))},jt.sortedIndexOf=function(t,n){var r=t?t.length:0;if(r){var e=Tn(t,n);if(r>e&&Se(t[e],n))return e}return-1},jt.sortedLastIndex=function(t,n){return Tn(t,n,true)},jt.sortedLastIndexBy=function(t,n,r){return qn(t,n,Mr(r),true)},jt.sortedLastIndexOf=function(t,n){if(t&&t.length){var r=Tn(t,n,true)-1;if(Se(t[r],n))return r}return-1; -},jt.startCase=Li,jt.startsWith=function(t,n,r){return t=He(t),r=tn(Ke(r),0,t.length),t.lastIndexOf(Gn(n),r)==r},jt.subtract=Xi,jt.sum=function(t){return t&&t.length?j(t,au):0},jt.sumBy=function(t,n){return t&&t.length?j(t,Mr(n)):0},jt.template=function(t,n,r){var e=jt.templateSettings;r&&Jr(t,n,r)&&(n=N),t=He(t),n=gi({},n,e,Gt),r=gi({},n.imports,e.imports,Gt);var u,o,i=tu(r),f=O(r,i),c=0;r=n.interpolate||bt;var a="__p+='";r=du((n.escape||bt).source+"|"+r.source+"|"+(r===X?lt:bt).source+"|"+(n.evaluate||bt).source+"|$","g"); -var l="sourceURL"in n?"//# sourceURL="+n.sourceURL+"\n":"";if(t.replace(r,function(n,r,e,i,f,l){return e||(e=i),a+=t.slice(c,l).replace(xt,W),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+n.length,n}),a+="';",(n=n.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(T,""):a).replace(q,"$1").replace(V,"$1;"),a="function("+(n||"obj")+"){"+(n?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}", -n=Ui(function(){return Function(i,l+"return "+a).apply(N,f)}),n.source=a,Le(n))throw n;return n},jt.times=function(t,n){if(t=Ke(t),1>t||t>9007199254740991)return[];var r=4294967295,e=Gu(t,4294967295);for(n=Mr(n),t-=4294967295,e=m(e,n);++r=o)return t;if(o=r-D(e),1>o)return e;if(r=i?rr(i,0,o).join(""):t.slice(0,o),u===N)return r+e;if(i&&(o+=r.length-o),Pe(u)){if(t.slice(o).search(u)){var f=r;for(u.global||(u=du(u.source,He(st.exec(u))+"g")),u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===N?o:c)}}else t.indexOf(Gn(u),o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},jt.unescape=function(t){return(t=He(t))&&J.test(t)?t.replace(K,$):t},jt.uniqueId=function(t){ -var n=++Au;return He(t)+n},jt.upperCase=Ci,jt.upperFirst=Mi,jt.each=de,jt.eachRight=ye,jt.first=ce,su(jt,function(){var t={};return sn(jt,function(n,r){wu.call(jt.prototype,r)||(t[r]=n)}),t}(),{chain:false}),jt.VERSION="4.11.2",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){jt[t].placeholder=jt}),u(["drop","take"],function(t,n){Lt.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new Lt(this);r=r===N?1:Ku(Ke(r),0);var u=this.clone();return e?u.__takeCount__=Gu(r,u.__takeCount__):u.__views__.push({ -size:Gu(r,4294967295),type:t+(0>u.__dir__?"Right":"")}),u},Lt.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){var r=n+1,e=1==r||3==r;Lt.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:Mr(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");Lt.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right"); -Lt.prototype[t]=function(){return this.__filtered__?new Lt(this):this[r](1)}}),Lt.prototype.compact=function(){return this.filter(au)},Lt.prototype.find=function(t){return this.filter(t).head()},Lt.prototype.findLast=function(t){return this.reverse().find(t)},Lt.prototype.invokeMap=Ee(function(t,n){return typeof t=="function"?new Lt(this):this.map(function(r){return jn(r,t,n)})}),Lt.prototype.reject=function(t){return t=Mr(t,3),this.filter(function(n){return!t(n)})},Lt.prototype.slice=function(t,n){ -t=Ke(t);var r=this;return r.__filtered__&&(t>0||0>n)?new Lt(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==N&&(n=Ke(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},Lt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Lt.prototype.toArray=function(){return this.take(4294967295)},sn(Lt.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=jt[e?"take"+("last"==n?"Right":""):n],o=e||/^find/.test(n);u&&(jt.prototype[n]=function(){ -function n(t){return t=u.apply(jt,l([t],f)),e&&h?t[0]:t}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof Lt,a=f[0],s=c||li(i);s&&r&&typeof a=="function"&&1!=a.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,a=o&&!h,c=c&&!p;return!o&&s?(i=c?i:new Lt(this),i=t.apply(i,f),i.__actions__.push({func:ve,args:[n],thisArg:N}),new wt(i,h)):a&&c?t.apply(this,f):(i=this.thru(n),a?e?i.value()[0]:i.value():i)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=bu[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t); -jt.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){var u=this.value();return n.apply(li(u)?u:[],t)}return this[r](function(r){return n.apply(li(r)?r:[],t)})}}),sn(Lt.prototype,function(t,n){var r=jt[n];if(r){var e=r.name+"";(co[e]||(co[e]=[])).push({name:n,func:r})}}),co[jr(N,2).name]=[{name:"wrapper",func:N}],Lt.prototype.clone=function(){var t=new Lt(this.__wrapped__);return t.__actions__=cr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=cr(this.__iteratees__), -t.__takeCount__=this.__takeCount__,t.__views__=cr(this.__views__),t},Lt.prototype.reverse=function(){if(this.__filtered__){var t=new Lt(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(),t.__dir__*=-1;return t},Lt.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=li(n),u=0>r,o=e?n.length:0;t=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++co||o==t&&a==t)return Hn(n,this.__actions__);e=[];t:for(;t--&&a>c;){for(u+=r,o=-1,l=n[u];++o=this.__values__.length,n=t?N:this.__values__[this.__index__++];return{done:t,value:n}},jt.prototype.plant=function(t){for(var n,r=this;r instanceof mt;){var e=oe(r);e.__index__=0,e.__values__=N,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},jt.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof Lt?(this.__actions__.length&&(t=new Lt(this)),t=t.reverse(),t.__actions__.push({func:ve, -args:[se],thisArg:N}),new wt(t,this.__chain__)):this.thru(se)},jt.prototype.toJSON=jt.prototype.valueOf=jt.prototype.value=function(){return Hn(this.__wrapped__,this.__actions__)},Uu&&(jt.prototype[Uu]=ge),jt}var N,P=1/0,Z=NaN,T=/\b__p\+='';/g,q=/\b(__p\+=)''\+/g,V=/(__e\(.*?\)|\b__t\))\+'';/g,K=/&(?:amp|lt|gt|quot|#39|#96);/g,G=/[&<>"'`]/g,J=RegExp(K.source),Y=RegExp(G.source),H=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/,rt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,et=/[\\^$.*+?()[\]{}|]/g,ut=RegExp(et.source),ot=/^\s+|\s+$/g,it=/^\s+/,ft=/\s+$/,ct=/[a-zA-Z0-9]+/g,at=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,st=/\w*$/,ht=/^0x/i,pt=/^[-+]0x[0-9a-f]+$/i,_t=/^0b[01]+$/i,vt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,dt=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,bt=/($^)/,xt=/['\n\r\u2028\u2029\\]/g,jt="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",mt="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+jt,wt="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",At=RegExp("['\u2019]","g"),Ot=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),kt=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+wt+jt,"g"),Et=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d+",mt].join("|"),"g"),It=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),St=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rt="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Wt={}; -Wt["[object Float32Array]"]=Wt["[object Float64Array]"]=Wt["[object Int8Array]"]=Wt["[object Int16Array]"]=Wt["[object Int32Array]"]=Wt["[object Uint8Array]"]=Wt["[object Uint8ClampedArray]"]=Wt["[object Uint16Array]"]=Wt["[object Uint32Array]"]=true,Wt["[object Arguments]"]=Wt["[object Array]"]=Wt["[object ArrayBuffer]"]=Wt["[object Boolean]"]=Wt["[object DataView]"]=Wt["[object Date]"]=Wt["[object Error]"]=Wt["[object Function]"]=Wt["[object Map]"]=Wt["[object Number]"]=Wt["[object Object]"]=Wt["[object RegExp]"]=Wt["[object Set]"]=Wt["[object String]"]=Wt["[object WeakMap]"]=false; -var Bt={};Bt["[object Arguments]"]=Bt["[object Array]"]=Bt["[object ArrayBuffer]"]=Bt["[object DataView]"]=Bt["[object Boolean]"]=Bt["[object Date]"]=Bt["[object Float32Array]"]=Bt["[object Float64Array]"]=Bt["[object Int8Array]"]=Bt["[object Int16Array]"]=Bt["[object Int32Array]"]=Bt["[object Map]"]=Bt["[object Number]"]=Bt["[object Object]"]=Bt["[object RegExp]"]=Bt["[object Set]"]=Bt["[object String]"]=Bt["[object Symbol]"]=Bt["[object Uint8Array]"]=Bt["[object Uint8ClampedArray]"]=Bt["[object Uint16Array]"]=Bt["[object Uint32Array]"]=true, -Bt["[object Error]"]=Bt["[object Function]"]=Bt["[object WeakMap]"]=false;var Lt={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O", -"\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Ct={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Mt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Ut={"function":true,object:true},zt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029" -},Dt=parseFloat,$t=parseInt,Ft=Ut[typeof exports]&&exports&&!exports.nodeType?exports:N,Nt=Ut[typeof module]&&module&&!module.nodeType?module:N,Pt=Nt&&Nt.exports===Ft?Ft:N,Zt=I(Ut[typeof self]&&self),Tt=I(Ut[typeof window]&&window),qt=I(Ut[typeof this]&&this),Vt=I(Ft&&Nt&&typeof global=="object"&&global)||Tt!==(qt&&qt.window)&&Tt||Zt||qt||Function("return this")(),Kt=F();(Tt||Zt||{})._=Kt,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return Kt}):Ft&&Nt?(Pt&&((Nt.exports=Kt)._=Kt), -Ft._=Kt):Vt._=Kt}).call(this); \ No newline at end of file diff --git a/node_modules/lodash/package/matches.js b/node_modules/lodash/package/matches.js deleted file mode 100644 index 16fe16d..0000000 --- a/node_modules/lodash/package/matches.js +++ /dev/null @@ -1,32 +0,0 @@ -var baseClone = require('./_baseClone'), - baseMatches = require('./_baseMatches'); - -/** - * Creates a function that performs a partial deep comparison between a given - * object and `source`, returning `true` if the given object has equivalent - * property values, else `false`. The created function is equivalent to - * `_.isMatch` with a `source` partially applied. - * - * **Note:** This method supports comparing the same values as `_.isEqual`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Util - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, _.matches({ 'age': 40, 'active': false })); - * // => [{ 'user': 'fred', 'age': 40, 'active': false }] - */ -function matches(source) { - return baseMatches(baseClone(source, true)); -} - -module.exports = matches; diff --git a/node_modules/lodash/package/noop.js b/node_modules/lodash/package/noop.js deleted file mode 100644 index 26e19c3..0000000 --- a/node_modules/lodash/package/noop.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * A no-operation function that returns `undefined` regardless of the - * arguments it receives. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * var object = { 'user': 'fred' }; - * - * _.noop(object) === undefined; - * // => true - */ -function noop() { - // No operation performed. -} - -module.exports = noop; diff --git a/node_modules/lodash/parseInt.js b/node_modules/lodash/parseInt.js index fe140f6..82badf0 100644 --- a/node_modules/lodash/parseInt.js +++ b/node_modules/lodash/parseInt.js @@ -2,10 +2,7 @@ var root = require('./_root'), toString = require('./toString'); /** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect hexadecimal string values. */ -var reHasHexPrefix = /^0x/i; +var reTrimStart = /^\s+/; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeParseInt = root.parseInt; @@ -35,15 +32,12 @@ var nativeParseInt = root.parseInt; * // => [6, 8, 10] */ function parseInt(string, radix, guard) { - // Chrome fails to trim leading whitespace characters. - // See https://bugs.chromium.org/p/v8/issues/detail?id=3109 for more details. if (guard || radix == null) { radix = 0; } else if (radix) { radix = +radix; } - string = toString(string).replace(reTrim, ''); - return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10)); + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); } module.exports = parseInt; diff --git a/node_modules/lodash/partial.js b/node_modules/lodash/partial.js index 149060e..05fe8d3 100644 --- a/node_modules/lodash/partial.js +++ b/node_modules/lodash/partial.js @@ -1,10 +1,10 @@ -var createWrapper = require('./_createWrapper'), - getPlaceholder = require('./_getPlaceholder'), - replaceHolders = require('./_replaceHolders'), - rest = require('./rest'); +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); -/** Used to compose bitmasks for wrapper metadata. */ -var PARTIAL_FLAG = 32; +/** Used to compose bitmasks for function metadata. */ +var WRAP_PARTIAL_FLAG = 32; /** * Creates a function that invokes `func` with `partials` prepended to the @@ -26,9 +26,9 @@ var PARTIAL_FLAG = 32; * @returns {Function} Returns the new partially applied function. * @example * - * var greet = function(greeting, name) { + * function greet(greeting, name) { * return greeting + ' ' + name; - * }; + * } * * var sayHelloTo = _.partial(greet, 'hello'); * sayHelloTo('fred'); @@ -39,9 +39,9 @@ var PARTIAL_FLAG = 32; * greetFred('hi'); * // => 'hi fred' */ -var partial = rest(function(func, partials) { - var holders = replaceHolders(partials, getPlaceholder(partial)); - return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders); +var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); }); // Assign default placeholders. diff --git a/node_modules/lodash/partialRight.js b/node_modules/lodash/partialRight.js index 02d14b9..eee031f 100644 --- a/node_modules/lodash/partialRight.js +++ b/node_modules/lodash/partialRight.js @@ -1,10 +1,10 @@ -var createWrapper = require('./_createWrapper'), - getPlaceholder = require('./_getPlaceholder'), - replaceHolders = require('./_replaceHolders'), - rest = require('./rest'); +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); -/** Used to compose bitmasks for wrapper metadata. */ -var PARTIAL_RIGHT_FLAG = 64; +/** Used to compose bitmasks for function metadata. */ +var WRAP_PARTIAL_RIGHT_FLAG = 64; /** * This method is like `_.partial` except that partially applied arguments @@ -25,9 +25,9 @@ var PARTIAL_RIGHT_FLAG = 64; * @returns {Function} Returns the new partially applied function. * @example * - * var greet = function(greeting, name) { + * function greet(greeting, name) { * return greeting + ' ' + name; - * }; + * } * * var greetFred = _.partialRight(greet, 'fred'); * greetFred('hi'); @@ -38,9 +38,9 @@ var PARTIAL_RIGHT_FLAG = 64; * sayHelloTo('fred'); * // => 'hello fred' */ -var partialRight = rest(function(func, partials) { - var holders = replaceHolders(partials, getPlaceholder(partialRight)); - return createWrapper(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders); +var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); }); // Assign default placeholders. diff --git a/node_modules/lodash/partition.js b/node_modules/lodash/partition.js index 2e30e8b..6b814a9 100644 --- a/node_modules/lodash/partition.js +++ b/node_modules/lodash/partition.js @@ -11,8 +11,7 @@ var createAggregator = require('./_createAggregator'); * @since 3.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the array of grouped elements. * @example * diff --git a/node_modules/lodash/pick.js b/node_modules/lodash/pick.js index 2812586..3160199 100644 --- a/node_modules/lodash/pick.js +++ b/node_modules/lodash/pick.js @@ -1,8 +1,5 @@ -var arrayMap = require('./_arrayMap'), - baseFlatten = require('./_baseFlatten'), - basePick = require('./_basePick'), - rest = require('./rest'), - toKey = require('./_toKey'); +var basePick = require('./_basePick'), + flatRest = require('./_flatRest'); /** * Creates an object composed of the picked `object` properties. @@ -12,7 +9,7 @@ var arrayMap = require('./_arrayMap'), * @memberOf _ * @category Object * @param {Object} object The source object. - * @param {...(string|string[])} [props] The property identifiers to pick. + * @param {...(string|string[])} [paths] The property paths to pick. * @returns {Object} Returns the new object. * @example * @@ -21,8 +18,8 @@ var arrayMap = require('./_arrayMap'), * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ -var pick = rest(function(object, props) { - return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey)); +var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); }); module.exports = pick; diff --git a/node_modules/lodash/pickBy.js b/node_modules/lodash/pickBy.js index d355442..ae7c271 100644 --- a/node_modules/lodash/pickBy.js +++ b/node_modules/lodash/pickBy.js @@ -1,5 +1,7 @@ -var baseIteratee = require('./_baseIteratee'), - basePickBy = require('./_basePickBy'); +var arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + basePickBy = require('./_basePickBy'), + getAllKeysIn = require('./_getAllKeysIn'); /** * Creates an object composed of the `object` properties `predicate` returns @@ -10,8 +12,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 4.0.0 * @category Object * @param {Object} object The source object. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per property. + * @param {Function} [predicate=_.identity] The function invoked per property. * @returns {Object} Returns the new object. * @example * @@ -21,7 +22,16 @@ var baseIteratee = require('./_baseIteratee'), * // => { 'a': 1, 'c': 3 } */ function pickBy(object, predicate) { - return object == null ? {} : basePickBy(object, baseIteratee(predicate)); + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = baseIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); } module.exports = pickBy; diff --git a/node_modules/lodash/property.js b/node_modules/lodash/property.js index 9843dc0..ca8202f 100644 --- a/node_modules/lodash/property.js +++ b/node_modules/lodash/property.js @@ -11,7 +11,7 @@ var baseProperty = require('./_baseProperty'), * @since 2.4.0 * @category Util * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. * @example * * var objects = [ diff --git a/node_modules/lodash/propertyOf.js b/node_modules/lodash/propertyOf.js index 13bdbbb..384044d 100644 --- a/node_modules/lodash/propertyOf.js +++ b/node_modules/lodash/propertyOf.js @@ -9,7 +9,7 @@ var baseGet = require('./_baseGet'); * @since 3.0.0 * @category Util * @param {Object} object The object to query. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. * @example * * var array = [0, 1, 2], diff --git a/node_modules/lodash/pull.js b/node_modules/lodash/pull.js index f5846fb..a2efcb5 100644 --- a/node_modules/lodash/pull.js +++ b/node_modules/lodash/pull.js @@ -1,9 +1,9 @@ -var pullAll = require('./pullAll'), - rest = require('./rest'); +var baseRest = require('./_baseRest'), + pullAll = require('./pullAll'); /** * Removes all given values from `array` using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` @@ -18,12 +18,12 @@ var pullAll = require('./pullAll'), * @returns {Array} Returns `array`. * @example * - * var array = [1, 2, 3, 1, 2, 3]; + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; * - * _.pull(array, 2, 3); + * _.pull(array, 'a', 'c'); * console.log(array); - * // => [1, 1] + * // => ['b', 'b'] */ -var pull = rest(pullAll); +var pull = baseRest(pullAll); module.exports = pull; diff --git a/node_modules/lodash/pullAll.js b/node_modules/lodash/pullAll.js index d6ce1bf..f4605c2 100644 --- a/node_modules/lodash/pullAll.js +++ b/node_modules/lodash/pullAll.js @@ -14,11 +14,11 @@ var basePullAll = require('./_basePullAll'); * @returns {Array} Returns `array`. * @example * - * var array = [1, 2, 3, 1, 2, 3]; + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; * - * _.pullAll(array, [2, 3]); + * _.pullAll(array, ['a', 'c']); * console.log(array); - * // => [1, 1] + * // => ['b', 'b'] */ function pullAll(array, values) { return (array && array.length && values && values.length) diff --git a/node_modules/lodash/pullAllBy.js b/node_modules/lodash/pullAllBy.js index 7192650..74025e8 100644 --- a/node_modules/lodash/pullAllBy.js +++ b/node_modules/lodash/pullAllBy.js @@ -14,8 +14,7 @@ var baseIteratee = require('./_baseIteratee'), * @category Array * @param {Array} array The array to modify. * @param {Array} values The values to remove. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns `array`. * @example * @@ -27,7 +26,7 @@ var baseIteratee = require('./_baseIteratee'), */ function pullAllBy(array, values, iteratee) { return (array && array.length && values && values.length) - ? basePullAll(array, values, baseIteratee(iteratee)) + ? basePullAll(array, values, baseIteratee(iteratee, 2)) : array; } diff --git a/node_modules/lodash/pullAt.js b/node_modules/lodash/pullAt.js index 565d2b1..6ed84e0 100644 --- a/node_modules/lodash/pullAt.js +++ b/node_modules/lodash/pullAt.js @@ -1,10 +1,9 @@ var arrayMap = require('./_arrayMap'), baseAt = require('./_baseAt'), - baseFlatten = require('./_baseFlatten'), basePullAt = require('./_basePullAt'), compareAscending = require('./_compareAscending'), - isIndex = require('./_isIndex'), - rest = require('./rest'); + flatRest = require('./_flatRest'), + isIndex = require('./_isIndex'); /** * Removes elements from `array` corresponding to `indexes` and returns an @@ -21,19 +20,17 @@ var arrayMap = require('./_arrayMap'), * @returns {Array} Returns the new array of removed elements. * @example * - * var array = [5, 10, 15, 20]; - * var evens = _.pullAt(array, 1, 3); + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); * * console.log(array); - * // => [5, 15] + * // => ['a', 'c'] * - * console.log(evens); - * // => [10, 20] + * console.log(pulled); + * // => ['b', 'd'] */ -var pullAt = rest(function(array, indexes) { - indexes = baseFlatten(indexes, 1); - - var length = array ? array.length : 0, +var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, result = baseAt(array, indexes); basePullAt(array, arrayMap(indexes, function(index) { diff --git a/node_modules/lodash/random.js b/node_modules/lodash/random.js index 22e9259..8067711 100644 --- a/node_modules/lodash/random.js +++ b/node_modules/lodash/random.js @@ -1,6 +1,6 @@ var baseRandom = require('./_baseRandom'), isIterateeCall = require('./_isIterateeCall'), - toNumber = require('./toNumber'); + toFinite = require('./toFinite'); /** Built-in method references without a dependency on `root`. */ var freeParseFloat = parseFloat; @@ -59,12 +59,12 @@ function random(lower, upper, floating) { upper = 1; } else { - lower = toNumber(lower) || 0; + lower = toFinite(lower); if (upper === undefined) { upper = lower; lower = 0; } else { - upper = toNumber(upper) || 0; + upper = toFinite(upper); } } if (lower > upper) { diff --git a/node_modules/lodash/range.js b/node_modules/lodash/range.js index 2d6b1bb..fa63b09 100644 --- a/node_modules/lodash/range.js +++ b/node_modules/lodash/range.js @@ -16,7 +16,7 @@ var createRange = require('./_createRange'); * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. * @see _.inRange, _.rangeRight * @example * diff --git a/node_modules/lodash/rangeRight.js b/node_modules/lodash/rangeRight.js index ba6fc99..271fafc 100644 --- a/node_modules/lodash/rangeRight.js +++ b/node_modules/lodash/rangeRight.js @@ -11,7 +11,7 @@ var createRange = require('./_createRange'); * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. * @see _.inRange, _.range * @example * diff --git a/node_modules/lodash/rearg.js b/node_modules/lodash/rearg.js index 6648ec8..a3e1970 100644 --- a/node_modules/lodash/rearg.js +++ b/node_modules/lodash/rearg.js @@ -1,9 +1,8 @@ -var baseFlatten = require('./_baseFlatten'), - createWrapper = require('./_createWrapper'), - rest = require('./rest'); +var createWrap = require('./_createWrap'), + flatRest = require('./_flatRest'); -/** Used to compose bitmasks for wrapper metadata. */ -var REARG_FLAG = 256; +/** Used to compose bitmasks for function metadata. */ +var WRAP_REARG_FLAG = 256; /** * Creates a function that invokes `func` with arguments arranged according @@ -22,13 +21,13 @@ var REARG_FLAG = 256; * * var rearged = _.rearg(function(a, b, c) { * return [a, b, c]; - * }, 2, 0, 1); + * }, [2, 0, 1]); * * rearged('b', 'c', 'a') * // => ['a', 'b', 'c'] */ -var rearg = rest(function(func, indexes) { - return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes, 1)); +var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); }); module.exports = rearg; diff --git a/node_modules/lodash/reject.js b/node_modules/lodash/reject.js index 4ed47b3..a13e554 100644 --- a/node_modules/lodash/reject.js +++ b/node_modules/lodash/reject.js @@ -1,7 +1,8 @@ var arrayFilter = require('./_arrayFilter'), baseFilter = require('./_baseFilter'), baseIteratee = require('./_baseIteratee'), - isArray = require('./isArray'); + isArray = require('./isArray'), + negate = require('./negate'); /** * The opposite of `_.filter`; this method returns the elements of `collection` @@ -12,8 +13,7 @@ var arrayFilter = require('./_arrayFilter'), * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.filter * @example @@ -40,10 +40,7 @@ var arrayFilter = require('./_arrayFilter'), */ function reject(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; - predicate = baseIteratee(predicate, 3); - return func(collection, function(value, index, collection) { - return !predicate(value, index, collection); - }); + return func(collection, negate(baseIteratee(predicate, 3))); } module.exports = reject; diff --git a/node_modules/lodash/remove.js b/node_modules/lodash/remove.js index ef3d681..87b1898 100644 --- a/node_modules/lodash/remove.js +++ b/node_modules/lodash/remove.js @@ -14,8 +14,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 2.0.0 * @category Array * @param {Array} array The array to modify. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new array of removed elements. * @example * diff --git a/node_modules/lodash/replace.js b/node_modules/lodash/replace.js index 1d113e7..6e26ecd 100644 --- a/node_modules/lodash/replace.js +++ b/node_modules/lodash/replace.js @@ -1,11 +1,5 @@ var toString = require('./toString'); -/** Used for built-in method references. */ -var stringProto = String.prototype; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeReplace = stringProto.replace; - /** * Replaces matches for `pattern` in `string` with `replacement`. * @@ -29,7 +23,7 @@ function replace() { var args = arguments, string = toString(args[0]); - return args.length < 3 ? string : nativeReplace.call(string, args[1], args[2]); + return args.length < 3 ? string : string.replace(args[1], args[2]); } module.exports = replace; diff --git a/node_modules/lodash/rest.js b/node_modules/lodash/rest.js index ddb7326..eaaad00 100644 --- a/node_modules/lodash/rest.js +++ b/node_modules/lodash/rest.js @@ -1,12 +1,9 @@ -var apply = require('./_apply'), +var baseRest = require('./_baseRest'), toInteger = require('./toInteger'); -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - /** * Creates a function that invokes `func` with the `this` binding of the * created function and arguments from `start` and beyond provided as @@ -36,29 +33,8 @@ function rest(func, start) { if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } - start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - switch (start) { - case 0: return func.call(this, array); - case 1: return func.call(this, args[0], array); - case 2: return func.call(this, args[0], args[1], array); - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = array; - return apply(func, this, otherArgs); - }; + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); } module.exports = rest; diff --git a/node_modules/lodash/result.js b/node_modules/lodash/result.js index 146eb57..eae1250 100644 --- a/node_modules/lodash/result.js +++ b/node_modules/lodash/result.js @@ -1,6 +1,5 @@ var castPath = require('./_castPath'), isFunction = require('./isFunction'), - isKey = require('./_isKey'), toKey = require('./_toKey'); /** @@ -33,15 +32,15 @@ var castPath = require('./_castPath'), * // => 'default' */ function result(object, path, defaultValue) { - path = isKey(path, object) ? [path] : castPath(path); + path = castPath(path, object); var index = -1, length = path.length; // Ensure the loop is entered when path is empty. if (!length) { - object = undefined; length = 1; + object = undefined; } while (++index < length) { var value = object == null ? undefined : object[toKey(path[index])]; diff --git a/node_modules/lodash/reverse.js b/node_modules/lodash/reverse.js index d566997..21764af 100644 --- a/node_modules/lodash/reverse.js +++ b/node_modules/lodash/reverse.js @@ -28,7 +28,7 @@ var nativeReverse = arrayProto.reverse; * // => [3, 2, 1] */ function reverse(array) { - return array ? nativeReverse.call(array) : array; + return array == null ? array : nativeReverse.call(array); } module.exports = reverse; diff --git a/node_modules/lodash/sample.js b/node_modules/lodash/sample.js index aff8e77..39c3560 100644 --- a/node_modules/lodash/sample.js +++ b/node_modules/lodash/sample.js @@ -1,6 +1,6 @@ -var baseRandom = require('./_baseRandom'), - isArrayLike = require('./isArrayLike'), - values = require('./values'); +var arraySample = require('./_arraySample'), + baseSample = require('./_baseSample'), + isArray = require('./isArray'); /** * Gets a random element from `collection`. @@ -17,10 +17,8 @@ var baseRandom = require('./_baseRandom'), * // => 2 */ function sample(collection) { - var array = isArrayLike(collection) ? collection : values(collection), - length = array.length; - - return length > 0 ? array[baseRandom(0, length - 1)] : undefined; + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); } module.exports = sample; diff --git a/node_modules/lodash/sampleSize.js b/node_modules/lodash/sampleSize.js index 29df2e6..a303686 100644 --- a/node_modules/lodash/sampleSize.js +++ b/node_modules/lodash/sampleSize.js @@ -1,7 +1,7 @@ -var baseClamp = require('./_baseClamp'), - baseRandom = require('./_baseRandom'), +var arraySampleSize = require('./_arraySampleSize'), + baseSampleSize = require('./_baseSampleSize'), + isArray = require('./isArray'), isIterateeCall = require('./_isIterateeCall'), - toArray = require('./toArray'), toInteger = require('./toInteger'); /** @@ -25,25 +25,13 @@ var baseClamp = require('./_baseClamp'), * // => [2, 3, 1] */ function sampleSize(collection, n, guard) { - var index = -1, - result = toArray(collection), - length = result.length, - lastIndex = length - 1; - if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { n = 1; } else { - n = baseClamp(toInteger(n), 0, length); - } - while (++index < n) { - var rand = baseRandom(index, lastIndex), - value = result[rand]; - - result[rand] = result[index]; - result[index] = value; + n = toInteger(n); } - result.length = n; - return result; + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); } module.exports = sampleSize; diff --git a/node_modules/lodash/shuffle.js b/node_modules/lodash/shuffle.js index 88d00ce..2b72da7 100644 --- a/node_modules/lodash/shuffle.js +++ b/node_modules/lodash/shuffle.js @@ -1,7 +1,6 @@ -var sampleSize = require('./sampleSize'); - -/** Used as references for the maximum length and index of an array. */ -var MAX_ARRAY_LENGTH = 4294967295; +var arrayShuffle = require('./_arrayShuffle'), + baseShuffle = require('./_baseShuffle'), + isArray = require('./isArray'); /** * Creates an array of shuffled values, using a version of the @@ -19,7 +18,8 @@ var MAX_ARRAY_LENGTH = 4294967295; * // => [4, 1, 3, 2] */ function shuffle(collection) { - return sampleSize(collection, MAX_ARRAY_LENGTH); + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); } module.exports = shuffle; diff --git a/node_modules/lodash/size.js b/node_modules/lodash/size.js index 2e414ab..3561fc1 100644 --- a/node_modules/lodash/size.js +++ b/node_modules/lodash/size.js @@ -1,8 +1,7 @@ -var getTag = require('./_getTag'), +var baseKeys = require('./_baseKeys'), + getTag = require('./_getTag'), isArrayLike = require('./isArrayLike'), - isObjectLike = require('./isObjectLike'), isString = require('./isString'), - keys = require('./keys'), stringSize = require('./_stringSize'); /** `Object#toString` result references. */ @@ -17,7 +16,7 @@ var mapTag = '[object Map]', * @memberOf _ * @since 0.1.0 * @category Collection - * @param {Array|Object} collection The collection to inspect. + * @param {Array|Object|string} collection The collection to inspect. * @returns {number} Returns the collection size. * @example * @@ -35,16 +34,13 @@ function size(collection) { return 0; } if (isArrayLike(collection)) { - var result = collection.length; - return (result && isString(collection)) ? stringSize(collection) : result; + return isString(collection) ? stringSize(collection) : collection.length; } - if (isObjectLike(collection)) { - var tag = getTag(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; } - return keys(collection).length; + return baseKeys(collection).length; } module.exports = size; diff --git a/node_modules/lodash/slice.js b/node_modules/lodash/slice.js index ac8cb75..f732442 100644 --- a/node_modules/lodash/slice.js +++ b/node_modules/lodash/slice.js @@ -19,7 +19,7 @@ var baseSlice = require('./_baseSlice'), * @returns {Array} Returns the slice of `array`. */ function slice(array, start, end) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } diff --git a/node_modules/lodash/some.js b/node_modules/lodash/some.js index eeb7c18..9c1d08c 100644 --- a/node_modules/lodash/some.js +++ b/node_modules/lodash/some.js @@ -14,8 +14,7 @@ var arraySome = require('./_arraySome'), * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. diff --git a/node_modules/lodash/sortBy.js b/node_modules/lodash/sortBy.js index c6d40bb..4ba8f7a 100644 --- a/node_modules/lodash/sortBy.js +++ b/node_modules/lodash/sortBy.js @@ -1,9 +1,7 @@ var baseFlatten = require('./_baseFlatten'), baseOrderBy = require('./_baseOrderBy'), - isArray = require('./isArray'), - isFlattenableIteratee = require('./_isFlattenableIteratee'), - isIterateeCall = require('./_isIterateeCall'), - rest = require('./rest'); + baseRest = require('./_baseRest'), + isIterateeCall = require('./_isIterateeCall'); /** * Creates an array of elements, sorted in ascending order by the results of @@ -16,8 +14,8 @@ var baseFlatten = require('./_baseFlatten'), * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])} - * [iteratees=[_.identity]] The iteratees to sort by. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. * @returns {Array} Returns the new sorted array. * @example * @@ -28,18 +26,13 @@ var baseFlatten = require('./_baseFlatten'), * { 'user': 'barney', 'age': 34 } * ]; * - * _.sortBy(users, function(o) { return o.user; }); + * _.sortBy(users, [function(o) { return o.user; }]); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] * * _.sortBy(users, ['user', 'age']); * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] - * - * _.sortBy(users, 'user', function(o) { - * return Math.floor(o.age / 10); - * }); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] */ -var sortBy = rest(function(collection, iteratees) { +var sortBy = baseRest(function(collection, iteratees) { if (collection == null) { return []; } @@ -49,11 +42,7 @@ var sortBy = rest(function(collection, iteratees) { } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { iteratees = [iteratees[0]]; } - iteratees = (iteratees.length == 1 && isArray(iteratees[0])) - ? iteratees[0] - : baseFlatten(iteratees, 1, isFlattenableIteratee); - - return baseOrderBy(collection, iteratees, []); + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); }); module.exports = sortBy; diff --git a/node_modules/lodash/sortedIndex.js b/node_modules/lodash/sortedIndex.js index 044a57e..e763473 100644 --- a/node_modules/lodash/sortedIndex.js +++ b/node_modules/lodash/sortedIndex.js @@ -16,9 +16,6 @@ var baseSortedIndex = require('./_baseSortedIndex'); * * _.sortedIndex([30, 50], 40); * // => 1 - * - * _.sortedIndex([4, 5], 4); - * // => 0 */ function sortedIndex(array, value) { return baseSortedIndex(array, value); diff --git a/node_modules/lodash/sortedIndexBy.js b/node_modules/lodash/sortedIndexBy.js index df05972..945f23c 100644 --- a/node_modules/lodash/sortedIndexBy.js +++ b/node_modules/lodash/sortedIndexBy.js @@ -12,23 +12,22 @@ var baseIteratee = require('./_baseIteratee'), * @category Array * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the index at which `value` should be inserted * into `array`. * @example * - * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 }; + * var objects = [{ 'x': 4 }, { 'x': 5 }]; * - * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict)); - * // => 1 + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 * * // The `_.property` iteratee shorthand. - * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); * // => 0 */ function sortedIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, baseIteratee(iteratee)); + return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2)); } module.exports = sortedIndexBy; diff --git a/node_modules/lodash/sortedIndexOf.js b/node_modules/lodash/sortedIndexOf.js index 2c534d3..e2d3b7a 100644 --- a/node_modules/lodash/sortedIndexOf.js +++ b/node_modules/lodash/sortedIndexOf.js @@ -9,16 +9,16 @@ var baseSortedIndex = require('./_baseSortedIndex'), * @memberOf _ * @since 4.0.0 * @category Array - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @returns {number} Returns the index of the matched value, else `-1`. * @example * - * _.sortedIndexOf([1, 1, 2, 2], 2); - * // => 2 + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 */ function sortedIndexOf(array, value) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (length) { var index = baseSortedIndex(array, value); if (index < length && eq(array[index], value)) { diff --git a/node_modules/lodash/sortedLastIndex.js b/node_modules/lodash/sortedLastIndex.js index 919089f..9380cb9 100644 --- a/node_modules/lodash/sortedLastIndex.js +++ b/node_modules/lodash/sortedLastIndex.js @@ -15,8 +15,8 @@ var baseSortedIndex = require('./_baseSortedIndex'); * into `array`. * @example * - * _.sortedLastIndex([4, 5], 4); - * // => 1 + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 */ function sortedLastIndex(array, value) { return baseSortedIndex(array, value, true); diff --git a/node_modules/lodash/sortedLastIndexBy.js b/node_modules/lodash/sortedLastIndexBy.js index 74e8d7a..9225eeb 100644 --- a/node_modules/lodash/sortedLastIndexBy.js +++ b/node_modules/lodash/sortedLastIndexBy.js @@ -12,18 +12,22 @@ var baseIteratee = require('./_baseIteratee'), * @category Array * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the index at which `value` should be inserted * into `array`. * @example * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * * // The `_.property` iteratee shorthand. - * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); * // => 1 */ function sortedLastIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, baseIteratee(iteratee), true); + return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2), true); } module.exports = sortedLastIndexBy; diff --git a/node_modules/lodash/sortedLastIndexOf.js b/node_modules/lodash/sortedLastIndexOf.js index 80234de..18bc4c5 100644 --- a/node_modules/lodash/sortedLastIndexOf.js +++ b/node_modules/lodash/sortedLastIndexOf.js @@ -9,16 +9,16 @@ var baseSortedIndex = require('./_baseSortedIndex'), * @memberOf _ * @since 4.0.0 * @category Array - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @returns {number} Returns the index of the matched value, else `-1`. * @example * - * _.sortedLastIndexOf([1, 1, 2, 2], 2); + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); * // => 3 */ function sortedLastIndexOf(array, value) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (length) { var index = baseSortedIndex(array, value, true) - 1; if (eq(array[index], value)) { diff --git a/node_modules/lodash/sortedUniqBy.js b/node_modules/lodash/sortedUniqBy.js index 1cbdeaf..4f05ebe 100644 --- a/node_modules/lodash/sortedUniqBy.js +++ b/node_modules/lodash/sortedUniqBy.js @@ -19,7 +19,7 @@ var baseIteratee = require('./_baseIteratee'), */ function sortedUniqBy(array, iteratee) { return (array && array.length) - ? baseSortedUniq(array, baseIteratee(iteratee)) + ? baseSortedUniq(array, baseIteratee(iteratee, 2)) : []; } diff --git a/node_modules/lodash/split.js b/node_modules/lodash/split.js index 2ed4015..956b48a 100644 --- a/node_modules/lodash/split.js +++ b/node_modules/lodash/split.js @@ -1,20 +1,14 @@ var baseToString = require('./_baseToString'), castSlice = require('./_castSlice'), + hasUnicode = require('./_hasUnicode'), isIterateeCall = require('./_isIterateeCall'), isRegExp = require('./isRegExp'), - reHasComplexSymbol = require('./_reHasComplexSymbol'), stringToArray = require('./_stringToArray'), toString = require('./toString'); /** Used as references for the maximum length and index of an array. */ var MAX_ARRAY_LENGTH = 4294967295; -/** Used for built-in method references. */ -var stringProto = String.prototype; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeSplit = stringProto.split; - /** * Splits `string` by `separator`. * @@ -28,7 +22,7 @@ var nativeSplit = stringProto.split; * @param {string} [string=''] The string to split. * @param {RegExp|string} separator The separator pattern to split by. * @param {number} [limit] The length to truncate results to. - * @returns {Array} Returns the new array of string segments. + * @returns {Array} Returns the string segments. * @example * * _.split('a-b-c', '-', 2); @@ -48,11 +42,11 @@ function split(string, separator, limit) { (separator != null && !isRegExp(separator)) )) { separator = baseToString(separator); - if (separator == '' && reHasComplexSymbol.test(string)) { + if (!separator && hasUnicode(string)) { return castSlice(stringToArray(string), 0, limit); } } - return nativeSplit.call(string, separator, limit); + return string.split(separator, limit); } module.exports = split; diff --git a/node_modules/lodash/spread.js b/node_modules/lodash/spread.js index 9d32bb9..ee44c8d 100644 --- a/node_modules/lodash/spread.js +++ b/node_modules/lodash/spread.js @@ -1,10 +1,10 @@ var apply = require('./_apply'), arrayPush = require('./_arrayPush'), + baseRest = require('./_baseRest'), castSlice = require('./_castSlice'), - rest = require('./rest'), toInteger = require('./toInteger'); -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /* Built-in method references for those with the same name as other `lodash` methods. */ @@ -13,7 +13,7 @@ var nativeMax = Math.max; /** * Creates a function that invokes `func` with the `this` binding of the * create function and an array of arguments much like - * [`Function#apply`](http://www.ecma-international.org/ecma-262/6.0/#sec-function.prototype.apply). + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). * * **Note:** This method is based on the * [spread operator](https://mdn.io/spread_operator). @@ -49,7 +49,7 @@ function spread(func, start) { throw new TypeError(FUNC_ERROR_TEXT); } start = start === undefined ? 0 : nativeMax(toInteger(start), 0); - return rest(function(args) { + return baseRest(function(args) { var array = args[start], otherArgs = castSlice(args, 0, start); diff --git a/node_modules/lodash/startsWith.js b/node_modules/lodash/startsWith.js index 8881855..359e5ad 100644 --- a/node_modules/lodash/startsWith.js +++ b/node_modules/lodash/startsWith.js @@ -10,7 +10,7 @@ var baseClamp = require('./_baseClamp'), * @memberOf _ * @since 3.0.0 * @category String - * @param {string} [string=''] The string to search. + * @param {string} [string=''] The string to inspect. * @param {string} [target] The string to search for. * @param {number} [position=0] The position to search from. * @returns {boolean} Returns `true` if `string` starts with `target`, @@ -29,7 +29,8 @@ var baseClamp = require('./_baseClamp'), function startsWith(string, target, position) { string = toString(string); position = baseClamp(toInteger(position), 0, string.length); - return string.lastIndexOf(baseToString(target), position) == position; + target = baseToString(target); + return string.slice(position, position + target.length) == target; } module.exports = startsWith; diff --git a/node_modules/lodash/stubArray.js b/node_modules/lodash/stubArray.js new file mode 100644 index 0000000..f460c15 --- /dev/null +++ b/node_modules/lodash/stubArray.js @@ -0,0 +1,23 @@ +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +module.exports = stubArray; diff --git a/node_modules/lodash/stubFalse.js b/node_modules/lodash/stubFalse.js new file mode 100644 index 0000000..9b346fc --- /dev/null +++ b/node_modules/lodash/stubFalse.js @@ -0,0 +1,18 @@ +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = stubFalse; diff --git a/node_modules/lodash/stubObject.js b/node_modules/lodash/stubObject.js new file mode 100644 index 0000000..1d190a1 --- /dev/null +++ b/node_modules/lodash/stubObject.js @@ -0,0 +1,23 @@ +/** + * This method returns a new empty object. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Object} Returns the new empty object. + * @example + * + * var objects = _.times(2, _.stubObject); + * + * console.log(objects); + * // => [{}, {}] + * + * console.log(objects[0] === objects[1]); + * // => false + */ +function stubObject() { + return {}; +} + +module.exports = stubObject; diff --git a/node_modules/lodash/stubString.js b/node_modules/lodash/stubString.js new file mode 100644 index 0000000..2db0bed --- /dev/null +++ b/node_modules/lodash/stubString.js @@ -0,0 +1,18 @@ +/** + * This method returns an empty string. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {string} Returns the empty string. + * @example + * + * _.times(2, _.stubString); + * // => ['', ''] + */ +function stubString() { + return ''; +} + +module.exports = stubString; diff --git a/node_modules/lodash/stubTrue.js b/node_modules/lodash/stubTrue.js new file mode 100644 index 0000000..af3cc9e --- /dev/null +++ b/node_modules/lodash/stubTrue.js @@ -0,0 +1,18 @@ +/** + * This method returns `true`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `true`. + * @example + * + * _.times(2, _.stubTrue); + * // => [true, true] + */ +function stubTrue() { + return true; +} + +module.exports = stubTrue; diff --git a/node_modules/lodash/subtract.js b/node_modules/lodash/subtract.js index bd4086a..6720778 100644 --- a/node_modules/lodash/subtract.js +++ b/node_modules/lodash/subtract.js @@ -17,6 +17,6 @@ var createMathOperation = require('./_createMathOperation'); */ var subtract = createMathOperation(function(minuend, subtrahend) { return minuend - subtrahend; -}); +}, 0); module.exports = subtract; diff --git a/node_modules/lodash/sumBy.js b/node_modules/lodash/sumBy.js index ce73c84..00e36d0 100644 --- a/node_modules/lodash/sumBy.js +++ b/node_modules/lodash/sumBy.js @@ -11,8 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the sum. * @example * @@ -27,7 +26,7 @@ var baseIteratee = require('./_baseIteratee'), */ function sumBy(array, iteratee) { return (array && array.length) - ? baseSum(array, baseIteratee(iteratee)) + ? baseSum(array, baseIteratee(iteratee, 2)) : 0; } diff --git a/node_modules/lodash/tail.js b/node_modules/lodash/tail.js index 459a8a3..001c22d 100644 --- a/node_modules/lodash/tail.js +++ b/node_modules/lodash/tail.js @@ -1,4 +1,4 @@ -var drop = require('./drop'); +var baseSlice = require('./_baseSlice'); /** * Gets all but the first element of `array`. @@ -15,7 +15,8 @@ var drop = require('./drop'); * // => [2, 3] */ function tail(array) { - return drop(array, 1); + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; } module.exports = tail; diff --git a/node_modules/lodash/takeRight.js b/node_modules/lodash/takeRight.js index b11fb34..6c37506 100644 --- a/node_modules/lodash/takeRight.js +++ b/node_modules/lodash/takeRight.js @@ -27,7 +27,7 @@ var baseSlice = require('./_baseSlice'), * // => [] */ function takeRight(array, n, guard) { - var length = array ? array.length : 0; + var length = array == null ? 0 : array.length; if (!length) { return []; } diff --git a/node_modules/lodash/takeRightWhile.js b/node_modules/lodash/takeRightWhile.js index 1d49750..94ab783 100644 --- a/node_modules/lodash/takeRightWhile.js +++ b/node_modules/lodash/takeRightWhile.js @@ -11,8 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * diff --git a/node_modules/lodash/takeWhile.js b/node_modules/lodash/takeWhile.js index 1283755..dc84d69 100644 --- a/node_modules/lodash/takeWhile.js +++ b/node_modules/lodash/takeWhile.js @@ -11,8 +11,7 @@ var baseIteratee = require('./_baseIteratee'), * @since 3.0.0 * @category Array * @param {Array} array The array to query. - * @param {Array|Function|Object|string} [predicate=_.identity] - * The function invoked per iteration. + * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * diff --git a/node_modules/lodash/template.js b/node_modules/lodash/template.js index 304d287..2df417f 100644 --- a/node_modules/lodash/template.js +++ b/node_modules/lodash/template.js @@ -17,7 +17,7 @@ var reEmptyStringLeading = /\b__p \+= '';/g, /** * Used to match - * [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). */ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; @@ -86,17 +86,12 @@ var reUnescapedString = /['\n\r\u2028\u2029\\]/g; * compiled({ 'user': 'barney' }); * // => 'hello barney!' * - * // Use the ES delimiter as an alternative to the default "interpolate" delimiter. + * // Use the ES template literal delimiter as an "interpolate" delimiter. + * // Disable support by replacing the "interpolate" delimiter. * var compiled = _.template('hello ${ user }!'); * compiled({ 'user': 'pebbles' }); * // => 'hello pebbles!' * - * // Use custom template delimiters. - * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; - * var compiled = _.template('hello {{ user }}!'); - * compiled({ 'user': 'mustache' }); - * // => 'hello mustache!' - * * // Use backslashes to treat delimiters as plain text. * var compiled = _.template('<%= "\\<%- value %\\>" %>'); * compiled({ 'value': 'ignored' }); @@ -122,9 +117,15 @@ var reUnescapedString = /['\n\r\u2028\u2029\\]/g; * // return __p; * // } * + * // Use custom template delimiters. + * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; + * var compiled = _.template('hello {{ user }}!'); + * compiled({ 'user': 'mustache' }); + * // => 'hello mustache!' + * * // Use the `source` property to inline compiled templates for meaningful * // line numbers in error messages and stack traces. - * fs.writeFileSync(path.join(cwd, 'jst.js'), '\ + * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\ * var JST = {\ * "main": ' + _.template(mainText).source + '\ * };\ diff --git a/node_modules/lodash/throttle.js b/node_modules/lodash/throttle.js index d201885..e2bb806 100644 --- a/node_modules/lodash/throttle.js +++ b/node_modules/lodash/throttle.js @@ -1,15 +1,15 @@ var debounce = require('./debounce'), isObject = require('./isObject'); -/** Used as the `TypeError` message for "Functions" methods. */ +/** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a throttled function that only invokes `func` at most once per * every `wait` milliseconds. The throttled function comes with a `cancel` * method to cancel delayed `func` invocations and a `flush` method to - * immediately invoke them. Provide an options object to indicate whether - * `func` should be invoked on the leading and/or trailing edge of the `wait` + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` * timeout. The `func` is invoked with the last arguments provided to the * throttled function. Subsequent calls to the throttled function return the * result of the last `func` invocation. @@ -18,6 +18,9 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * invoked on the trailing edge of the timeout only if the throttled function * is invoked more than once during the `wait` timeout. * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.throttle` and `_.debounce`. * diff --git a/node_modules/lodash/times.js b/node_modules/lodash/times.js index d0bff57..266c90c 100644 --- a/node_modules/lodash/times.js +++ b/node_modules/lodash/times.js @@ -1,5 +1,5 @@ -var baseIteratee = require('./_baseIteratee'), - baseTimes = require('./_baseTimes'), +var baseTimes = require('./_baseTimes'), + castFunction = require('./_castFunction'), toInteger = require('./toInteger'); /** Used as references for various `Number` constants. */ @@ -27,8 +27,8 @@ var nativeMin = Math.min; * _.times(3, String); * // => ['0', '1', '2'] * - * _.times(4, _.constant(true)); - * // => [true, true, true, true] + * _.times(4, _.constant(0)); + * // => [0, 0, 0, 0] */ function times(n, iteratee) { n = toInteger(n); @@ -38,7 +38,7 @@ function times(n, iteratee) { var index = MAX_ARRAY_LENGTH, length = nativeMin(n, MAX_ARRAY_LENGTH); - iteratee = baseIteratee(iteratee); + iteratee = castFunction(iteratee); n -= MAX_ARRAY_LENGTH; var result = baseTimes(length, iteratee); diff --git a/node_modules/lodash/toArray.js b/node_modules/lodash/toArray.js index 6675806..9809584 100644 --- a/node_modules/lodash/toArray.js +++ b/node_modules/lodash/toArray.js @@ -14,7 +14,7 @@ var mapTag = '[object Map]', setTag = '[object Set]'; /** Built-in value references. */ -var iteratorSymbol = typeof (iteratorSymbol = Symbol && Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined; +var symIterator = Symbol ? Symbol.iterator : undefined; /** * Converts `value` to an array. @@ -46,8 +46,8 @@ function toArray(value) { if (isArrayLike(value)) { return isString(value) ? stringToArray(value) : copyArray(value); } - if (iteratorSymbol && value[iteratorSymbol]) { - return iteratorToArray(value[iteratorSymbol]()); + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); } var tag = getTag(value), func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); diff --git a/node_modules/lodash/toFinite.js b/node_modules/lodash/toFinite.js new file mode 100644 index 0000000..3b5bba6 --- /dev/null +++ b/node_modules/lodash/toFinite.js @@ -0,0 +1,42 @@ +var toNumber = require('./toNumber'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ +function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; +} + +module.exports = toFinite; diff --git a/node_modules/lodash/toInteger.js b/node_modules/lodash/toInteger.js index 459f0c3..c6aadf8 100644 --- a/node_modules/lodash/toInteger.js +++ b/node_modules/lodash/toInteger.js @@ -1,14 +1,10 @@ -var toNumber = require('./toNumber'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308; +var toFinite = require('./toFinite'); /** * Converts `value` to an integer. * - * **Note:** This function is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ @@ -18,7 +14,7 @@ var INFINITY = 1 / 0, * @returns {number} Returns the converted integer. * @example * - * _.toInteger(3); + * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); @@ -27,20 +23,14 @@ var INFINITY = 1 / 0, * _.toInteger(Infinity); * // => 1.7976931348623157e+308 * - * _.toInteger('3'); + * _.toInteger('3.2'); * // => 3 */ function toInteger(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; } module.exports = toInteger; diff --git a/node_modules/lodash/toLength.js b/node_modules/lodash/toLength.js index 9d41514..be8f2a7 100644 --- a/node_modules/lodash/toLength.js +++ b/node_modules/lodash/toLength.js @@ -9,7 +9,7 @@ var MAX_ARRAY_LENGTH = 4294967295; * array-like object. * * **Note:** This method is based on - * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ @@ -19,7 +19,7 @@ var MAX_ARRAY_LENGTH = 4294967295; * @returns {number} Returns the converted integer. * @example * - * _.toLength(3); + * _.toLength(3.2); * // => 3 * * _.toLength(Number.MIN_VALUE); @@ -28,7 +28,7 @@ var MAX_ARRAY_LENGTH = 4294967295; * _.toLength(Infinity); * // => 4294967295 * - * _.toLength('3'); + * _.toLength('3.2'); * // => 3 */ function toLength(value) { diff --git a/node_modules/lodash/toNumber.js b/node_modules/lodash/toNumber.js index 9baba70..b0f72de 100644 --- a/node_modules/lodash/toNumber.js +++ b/node_modules/lodash/toNumber.js @@ -1,5 +1,4 @@ -var isFunction = require('./isFunction'), - isObject = require('./isObject'), +var isObject = require('./isObject'), isSymbol = require('./isSymbol'); /** Used as references for various `Number` constants. */ @@ -31,8 +30,8 @@ var freeParseInt = parseInt; * @returns {number} Returns the number. * @example * - * _.toNumber(3); - * // => 3 + * _.toNumber(3.2); + * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 @@ -40,8 +39,8 @@ var freeParseInt = parseInt; * _.toNumber(Infinity); * // => Infinity * - * _.toNumber('3'); - * // => 3 + * _.toNumber('3.2'); + * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { @@ -51,7 +50,7 @@ function toNumber(value) { return NAN; } if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { diff --git a/node_modules/lodash/toPairs.js b/node_modules/lodash/toPairs.js index 417ac8c..c4f52ae 100644 --- a/node_modules/lodash/toPairs.js +++ b/node_modules/lodash/toPairs.js @@ -1,9 +1,10 @@ -var baseToPairs = require('./_baseToPairs'), +var createToPairs = require('./_createToPairs'), keys = require('./keys'); /** * Creates an array of own enumerable string keyed-value pairs for `object` - * which can be consumed by `_.fromPairs`. + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. * * @static * @memberOf _ @@ -11,7 +12,7 @@ var baseToPairs = require('./_baseToPairs'), * @alias entries * @category Object * @param {Object} object The object to query. - * @returns {Array} Returns the new array of key-value pairs. + * @returns {Array} Returns the key-value pairs. * @example * * function Foo() { @@ -24,8 +25,6 @@ var baseToPairs = require('./_baseToPairs'), * _.toPairs(new Foo); * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) */ -function toPairs(object) { - return baseToPairs(object, keys(object)); -} +var toPairs = createToPairs(keys); module.exports = toPairs; diff --git a/node_modules/lodash/toPairsIn.js b/node_modules/lodash/toPairsIn.js index b84ef7e..32c562c 100644 --- a/node_modules/lodash/toPairsIn.js +++ b/node_modules/lodash/toPairsIn.js @@ -1,9 +1,10 @@ -var baseToPairs = require('./_baseToPairs'), +var createToPairs = require('./_createToPairs'), keysIn = require('./keysIn'); /** * Creates an array of own and inherited enumerable string keyed-value pairs - * for `object` which can be consumed by `_.fromPairs`. + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. * * @static * @memberOf _ @@ -11,7 +12,7 @@ var baseToPairs = require('./_baseToPairs'), * @alias entriesIn * @category Object * @param {Object} object The object to query. - * @returns {Array} Returns the new array of key-value pairs. + * @returns {Array} Returns the key-value pairs. * @example * * function Foo() { @@ -22,10 +23,8 @@ var baseToPairs = require('./_baseToPairs'), * Foo.prototype.c = 3; * * _.toPairsIn(new Foo); - * // => [['a', 1], ['b', 2], ['c', 1]] (iteration order is not guaranteed) + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) */ -function toPairsIn(object) { - return baseToPairs(object, keysIn(object)); -} +var toPairsIn = createToPairs(keysIn); module.exports = toPairsIn; diff --git a/node_modules/lodash/toPath.js b/node_modules/lodash/toPath.js index e2dc7ae..d3e96ee 100644 --- a/node_modules/lodash/toPath.js +++ b/node_modules/lodash/toPath.js @@ -3,7 +3,8 @@ var arrayMap = require('./_arrayMap'), isArray = require('./isArray'), isSymbol = require('./isSymbol'), stringToPath = require('./_stringToPath'), - toKey = require('./_toKey'); + toKey = require('./_toKey'), + toString = require('./toString'); /** * Converts `value` to a property path array. @@ -21,21 +22,12 @@ var arrayMap = require('./_arrayMap'), * * _.toPath('a[0].b.c'); * // => ['a', '0', 'b', 'c'] - * - * var path = ['a', 'b', 'c'], - * newPath = _.toPath(path); - * - * console.log(newPath); - * // => ['a', 'b', 'c'] - * - * console.log(path === newPath); - * // => false */ function toPath(value) { if (isArray(value)) { return arrayMap(value, toKey); } - return isSymbol(value) ? [value] : copyArray(stringToPath(value)); + return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); } module.exports = toPath; diff --git a/node_modules/lodash/toSafeInteger.js b/node_modules/lodash/toSafeInteger.js index 475874f..885c5fb 100644 --- a/node_modules/lodash/toSafeInteger.js +++ b/node_modules/lodash/toSafeInteger.js @@ -16,7 +16,7 @@ var MAX_SAFE_INTEGER = 9007199254740991; * @returns {number} Returns the converted integer. * @example * - * _.toSafeInteger(3); + * _.toSafeInteger(3.2); * // => 3 * * _.toSafeInteger(Number.MIN_VALUE); @@ -25,7 +25,7 @@ var MAX_SAFE_INTEGER = 9007199254740991; * _.toSafeInteger(Infinity); * // => 9007199254740991 * - * _.toSafeInteger('3'); + * _.toSafeInteger('3.2'); * // => 3 */ function toSafeInteger(value) { diff --git a/node_modules/lodash/toString.js b/node_modules/lodash/toString.js index f20d65a..daaf681 100644 --- a/node_modules/lodash/toString.js +++ b/node_modules/lodash/toString.js @@ -8,8 +8,8 @@ var baseToString = require('./_baseToString'); * @memberOf _ * @since 4.0.0 * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. * @example * * _.toString(null); diff --git a/node_modules/lodash/transform.js b/node_modules/lodash/transform.js index 3013a83..d755a15 100644 --- a/node_modules/lodash/transform.js +++ b/node_modules/lodash/transform.js @@ -4,6 +4,7 @@ var arrayEach = require('./_arrayEach'), baseIteratee = require('./_baseIteratee'), getPrototype = require('./_getPrototype'), isArray = require('./isArray'), + isBuffer = require('./isBuffer'), isFunction = require('./isFunction'), isObject = require('./isObject'), isTypedArray = require('./isTypedArray'); @@ -12,15 +13,16 @@ var arrayEach = require('./_arrayEach'), * An alternative to `_.reduce`; this method transforms `object` to a new * `accumulator` object which is the result of running each of its own * enumerable string keyed properties thru `iteratee`, with each invocation - * potentially mutating the `accumulator` object. The iteratee is invoked - * with four arguments: (accumulator, value, key, object). Iteratee functions - * may exit iteration early by explicitly returning `false`. + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. * * @static * @memberOf _ * @since 1.3.0 * @category Object - * @param {Array|Object} object The object to iterate over. + * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The custom accumulator value. * @returns {*} Returns the accumulated value. @@ -38,22 +40,23 @@ var arrayEach = require('./_arrayEach'), * // => { '1': ['a', 'c'], '2': ['b'] } */ function transform(object, iteratee, accumulator) { - var isArr = isArray(object) || isTypedArray(object); - iteratee = baseIteratee(iteratee, 4); + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + iteratee = baseIteratee(iteratee, 4); if (accumulator == null) { - if (isArr || isObject(object)) { - var Ctor = object.constructor; - if (isArr) { - accumulator = isArray(object) ? new Ctor : []; - } else { - accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; - } - } else { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; + } + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } + else { accumulator = {}; } } - (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) { + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { return iteratee(accumulator, value, index, object); }); return accumulator; diff --git a/node_modules/lodash/truncate.js b/node_modules/lodash/truncate.js index 4290315..21fcdfe 100644 --- a/node_modules/lodash/truncate.js +++ b/node_modules/lodash/truncate.js @@ -1,8 +1,8 @@ var baseToString = require('./_baseToString'), castSlice = require('./_castSlice'), + hasUnicode = require('./_hasUnicode'), isObject = require('./isObject'), isRegExp = require('./isRegExp'), - reHasComplexSymbol = require('./_reHasComplexSymbol'), stringSize = require('./_stringSize'), stringToArray = require('./_stringToArray'), toInteger = require('./toInteger'), @@ -64,7 +64,7 @@ function truncate(string, options) { string = toString(string); var strLength = string.length; - if (reHasComplexSymbol.test(string)) { + if (hasUnicode(string)) { var strSymbols = stringToArray(string); strLength = strSymbols.length; } diff --git a/node_modules/lodash/unary.js b/node_modules/lodash/unary.js index 34c144c..76f48f6 100644 --- a/node_modules/lodash/unary.js +++ b/node_modules/lodash/unary.js @@ -9,7 +9,7 @@ var ary = require('./ary'); * @since 4.0.0 * @category Function * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. * @example * * _.map(['6', '8', '10'], _.unary(parseInt)); diff --git a/node_modules/lodash/unescape.js b/node_modules/lodash/unescape.js index 929bb16..3b6efd5 100644 --- a/node_modules/lodash/unescape.js +++ b/node_modules/lodash/unescape.js @@ -2,12 +2,12 @@ var toString = require('./toString'), unescapeHtmlChar = require('./_unescapeHtmlChar'); /** Used to match HTML entities and HTML characters. */ -var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g, +var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reHasEscapedHtml = RegExp(reEscapedHtml.source); /** * The inverse of `_.escape`; this method converts the HTML entities - * `&`, `<`, `>`, `"`, `'`, and ``` in `string` to + * `&`, `<`, `>`, `"`, and `'` in `string` to * their corresponding characters. * * **Note:** No other HTML entities are unescaped. To unescape additional diff --git a/node_modules/lodash/union.js b/node_modules/lodash/union.js index 1276c88..e676dfe 100644 --- a/node_modules/lodash/union.js +++ b/node_modules/lodash/union.js @@ -1,11 +1,11 @@ var baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), baseUniq = require('./_baseUniq'), - isArrayLikeObject = require('./isArrayLikeObject'), - rest = require('./rest'); + isArrayLikeObject = require('./isArrayLikeObject'); /** * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @static @@ -16,10 +16,10 @@ var baseFlatten = require('./_baseFlatten'), * @returns {Array} Returns the new array of combined values. * @example * - * _.union([2, 1], [4, 2], [1, 2]); - * // => [2, 1, 4] + * _.union([2], [1, 2]); + * // => [2, 1] */ -var union = rest(function(arrays) { +var union = baseRest(function(arrays) { return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); }); diff --git a/node_modules/lodash/unionBy.js b/node_modules/lodash/unionBy.js index f44340c..6ae8ccd 100644 --- a/node_modules/lodash/unionBy.js +++ b/node_modules/lodash/unionBy.js @@ -1,14 +1,15 @@ var baseFlatten = require('./_baseFlatten'), baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), baseUniq = require('./_baseUniq'), isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.union` except that it accepts `iteratee` which is * invoked for each element of each `arrays` to generate the criterion by - * which uniqueness is computed. The iteratee is invoked with one argument: + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: * (value). * * @static @@ -16,24 +17,23 @@ var baseFlatten = require('./_baseFlatten'), * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of combined values. * @example * - * _.unionBy([2.1, 1.2], [4.3, 2.4], Math.floor); - * // => [2.1, 1.2, 4.3] + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] * * // The `_.property` iteratee shorthand. * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }, { 'x': 2 }] */ -var unionBy = rest(function(arrays) { +var unionBy = baseRest(function(arrays) { var iteratee = last(arrays); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), baseIteratee(iteratee)); + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2)); }); module.exports = unionBy; diff --git a/node_modules/lodash/unionWith.js b/node_modules/lodash/unionWith.js index dad71f9..78736b2 100644 --- a/node_modules/lodash/unionWith.js +++ b/node_modules/lodash/unionWith.js @@ -1,12 +1,13 @@ var baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), baseUniq = require('./_baseUniq'), isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.union` except that it accepts `comparator` which - * is invoked to compare elements of `arrays`. The comparator is invoked + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked * with two arguments: (arrVal, othVal). * * @static @@ -24,11 +25,9 @@ var baseFlatten = require('./_baseFlatten'), * _.unionWith(objects, others, _.isEqual); * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ -var unionWith = rest(function(arrays) { +var unionWith = baseRest(function(arrays) { var comparator = last(arrays); - if (isArrayLikeObject(comparator)) { - comparator = undefined; - } + comparator = typeof comparator == 'function' ? comparator : undefined; return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); }); diff --git a/node_modules/lodash/uniq.js b/node_modules/lodash/uniq.js index 0e99ee9..157d1cd 100644 --- a/node_modules/lodash/uniq.js +++ b/node_modules/lodash/uniq.js @@ -2,9 +2,10 @@ var baseUniq = require('./_baseUniq'); /** * Creates a duplicate-free version of an array, using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons, in which only the first occurrence of each - * element is kept. + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. * * @static * @memberOf _ @@ -18,9 +19,7 @@ var baseUniq = require('./_baseUniq'); * // => [2, 1] */ function uniq(array) { - return (array && array.length) - ? baseUniq(array) - : []; + return (array && array.length) ? baseUniq(array) : []; } module.exports = uniq; diff --git a/node_modules/lodash/uniqBy.js b/node_modules/lodash/uniqBy.js index 91cf9e0..53402a9 100644 --- a/node_modules/lodash/uniqBy.js +++ b/node_modules/lodash/uniqBy.js @@ -4,15 +4,16 @@ var baseIteratee = require('./_baseIteratee'), /** * This method is like `_.uniq` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the criterion by which - * uniqueness is computed. The iteratee is invoked with one argument: (value). + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new duplicate free array. * @example * @@ -24,9 +25,7 @@ var baseIteratee = require('./_baseIteratee'), * // => [{ 'x': 1 }, { 'x': 2 }] */ function uniqBy(array, iteratee) { - return (array && array.length) - ? baseUniq(array, baseIteratee(iteratee)) - : []; + return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : []; } module.exports = uniqBy; diff --git a/node_modules/lodash/uniqWith.js b/node_modules/lodash/uniqWith.js index 957c17d..18d72aa 100644 --- a/node_modules/lodash/uniqWith.js +++ b/node_modules/lodash/uniqWith.js @@ -2,8 +2,9 @@ var baseUniq = require('./_baseUniq'); /** * This method is like `_.uniq` except that it accepts `comparator` which - * is invoked to compare elements of `array`. The comparator is invoked with - * two arguments: (arrVal, othVal). + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). * * @static * @memberOf _ @@ -14,15 +15,14 @@ var baseUniq = require('./_baseUniq'); * @returns {Array} Returns the new duplicate free array. * @example * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; * * _.uniqWith(objects, _.isEqual); * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] */ function uniqWith(array, comparator) { - return (array && array.length) - ? baseUniq(array, undefined, comparator) - : []; + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; } module.exports = uniqWith; diff --git a/node_modules/lodash/unzip.js b/node_modules/lodash/unzip.js index 7990d26..fce0ec7 100644 --- a/node_modules/lodash/unzip.js +++ b/node_modules/lodash/unzip.js @@ -20,11 +20,11 @@ var nativeMax = Math.max; * @returns {Array} Returns the new array of regrouped elements. * @example * - * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]); - * // => [['fred', 30, true], ['barney', 40, false]] + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] * * _.unzip(zipped); - * // => [['fred', 'barney'], [30, 40], [true, false]] + * // => [['a', 'b'], [1, 2], [true, false]] */ function unzip(array) { if (!(array && array.length)) { diff --git a/node_modules/lodash/util.js b/node_modules/lodash/util.js index 11b0372..d244dc2 100644 --- a/node_modules/lodash/util.js +++ b/node_modules/lodash/util.js @@ -4,6 +4,7 @@ module.exports = { 'cond': require('./cond'), 'conforms': require('./conforms'), 'constant': require('./constant'), + 'defaultTo': require('./defaultTo'), 'flow': require('./flow'), 'flowRight': require('./flowRight'), 'identity': require('./identity'), @@ -22,6 +23,11 @@ module.exports = { 'propertyOf': require('./propertyOf'), 'range': require('./range'), 'rangeRight': require('./rangeRight'), + 'stubArray': require('./stubArray'), + 'stubFalse': require('./stubFalse'), + 'stubObject': require('./stubObject'), + 'stubString': require('./stubString'), + 'stubTrue': require('./stubTrue'), 'times': require('./times'), 'toPath': require('./toPath'), 'uniqueId': require('./uniqueId') diff --git a/node_modules/lodash/values.js b/node_modules/lodash/values.js index 738260b..b069654 100644 --- a/node_modules/lodash/values.js +++ b/node_modules/lodash/values.js @@ -28,7 +28,7 @@ var baseValues = require('./_baseValues'), * // => ['h', 'i'] */ function values(object) { - return object ? baseValues(object, keys(object)) : []; + return object == null ? [] : baseValues(object, keys(object)); } module.exports = values; diff --git a/node_modules/lodash/without.js b/node_modules/lodash/without.js index 4ce45c1..3a28e8a 100644 --- a/node_modules/lodash/without.js +++ b/node_modules/lodash/without.js @@ -1,26 +1,28 @@ var baseDifference = require('./_baseDifference'), - isArrayLikeObject = require('./isArrayLikeObject'), - rest = require('./rest'); + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'); /** * Creates an array excluding all given values using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * + * **Note:** Unlike `_.pull`, this method returns a new array. + * * @static * @memberOf _ * @since 0.1.0 * @category Array - * @param {Array} array The array to filter. + * @param {Array} array The array to inspect. * @param {...*} [values] The values to exclude. * @returns {Array} Returns the new array of filtered values. * @see _.difference, _.xor * @example * - * _.without([1, 2, 1, 3], 1, 2); + * _.without([2, 1, 2, 3], 1, 2); * // => [3] */ -var without = rest(function(array, values) { +var without = baseRest(function(array, values) { return isArrayLikeObject(array) ? baseDifference(array, values) : []; diff --git a/node_modules/lodash/words.js b/node_modules/lodash/words.js index 786d14d..6d7cdd1 100644 --- a/node_modules/lodash/words.js +++ b/node_modules/lodash/words.js @@ -1,61 +1,7 @@ -var toString = require('./toString'); - -/** Used to match non-compound words composed of alphanumeric characters. */ -var reBasicWord = /[a-zA-Z0-9]+/g; - -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', - rsComboSymbolsRange = '\\u20d0-\\u20f0', - rsDingbatRange = '\\u2700-\\u27bf', - rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', - rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', - rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', - rsPunctuationRange = '\\u2000-\\u206f', - rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', - rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', - rsVarRange = '\\ufe0e\\ufe0f', - rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; - -/** Used to compose unicode capture groups. */ -var rsApos = "['\u2019]", - rsBreak = '[' + rsBreakRange + ']', - rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', - rsDigits = '\\d+', - rsDingbat = '[' + rsDingbatRange + ']', - rsLower = '[' + rsLowerRange + ']', - rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsUpper = '[' + rsUpperRange + ']', - rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')', - rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')', - rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', - rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', - reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq; - -/** Used to match complex or compound words. */ -var reComplexWord = RegExp([ - rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', - rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')', - rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr, - rsUpper + '+' + rsOptUpperContr, - rsDigits, - rsEmoji -].join('|'), 'g'); - -/** Used to detect strings that need a more robust regexp to match words. */ -var reHasComplexWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; +var asciiWords = require('./_asciiWords'), + hasUnicodeWord = require('./_hasUnicodeWord'), + toString = require('./toString'), + unicodeWords = require('./_unicodeWords'); /** * Splits `string` into an array of its words. @@ -81,7 +27,7 @@ function words(string, pattern, guard) { pattern = guard ? undefined : pattern; if (pattern === undefined) { - pattern = reHasComplexWord.test(string) ? reComplexWord : reBasicWord; + return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); } return string.match(pattern) || []; } diff --git a/node_modules/lodash/wrap.js b/node_modules/lodash/wrap.js index 9a4542d..cad3c50 100644 --- a/node_modules/lodash/wrap.js +++ b/node_modules/lodash/wrap.js @@ -1,11 +1,11 @@ -var identity = require('./identity'), +var castFunction = require('./_castFunction'), partial = require('./partial'); /** - * Creates a function that provides `value` to the wrapper function as its - * first argument. Any additional arguments provided to the function are - * appended to those provided to the wrapper function. The wrapper is invoked - * with the `this` binding of the created function. + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. * * @static * @memberOf _ @@ -24,8 +24,7 @@ var identity = require('./identity'), * // => '

fred, barney, & pebbles

' */ function wrap(value, wrapper) { - wrapper = wrapper == null ? identity : wrapper; - return partial(wrapper, value); + return partial(castFunction(wrapper), value); } module.exports = wrap; diff --git a/node_modules/lodash/wrapperAt.js b/node_modules/lodash/wrapperAt.js index 1190894..6f6a1d0 100644 --- a/node_modules/lodash/wrapperAt.js +++ b/node_modules/lodash/wrapperAt.js @@ -1,9 +1,8 @@ var LazyWrapper = require('./_LazyWrapper'), LodashWrapper = require('./_LodashWrapper'), baseAt = require('./_baseAt'), - baseFlatten = require('./_baseFlatten'), + flatRest = require('./_flatRest'), isIndex = require('./_isIndex'), - rest = require('./rest'), thru = require('./thru'); /** @@ -13,7 +12,7 @@ var LazyWrapper = require('./_LazyWrapper'), * @memberOf _ * @since 1.0.0 * @category Seq - * @param {...(string|string[])} [paths] The property paths of elements to pick. + * @param {...(string|string[])} [paths] The property paths to pick. * @returns {Object} Returns the new `lodash` wrapper instance. * @example * @@ -21,12 +20,8 @@ var LazyWrapper = require('./_LazyWrapper'), * * _(object).at(['a[0].b.c', 'a[1]']).value(); * // => [3, 4] - * - * _(['a', 'b', 'c']).at(0, 2).value(); - * // => ['a', 'c'] */ -var wrapperAt = rest(function(paths) { - paths = baseFlatten(paths, 1); +var wrapperAt = flatRest(function(paths) { var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, diff --git a/node_modules/lodash/wrapperLodash.js b/node_modules/lodash/wrapperLodash.js index 717ff8e..bf27a3c 100644 --- a/node_modules/lodash/wrapperLodash.js +++ b/node_modules/lodash/wrapperLodash.js @@ -77,28 +77,30 @@ var hasOwnProperty = objectProto.hasOwnProperty; * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `divide`, `each`, - * `eachRight`, `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`, - * `findIndex`, `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`, - * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, - * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, - * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, - * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`, - * `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`, - * `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`, - * `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, - * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`, - * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, - * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, - * `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, `min`, `minBy`, `multiply`, - * `noConflict`, `noop`, `now`, `nth`, `pad`, `padEnd`, `padStart`, `parseInt`, - * `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`, - * `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, - * `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, - * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toInteger`, - * `toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`, `toString`, - * `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, - * `uniqueId`, `upperCase`, `upperFirst`, `value`, and `words` + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` * * @name _ * @constructor diff --git a/node_modules/lodash/xor.js b/node_modules/lodash/xor.js index 6d4d4b1..d4d2860 100644 --- a/node_modules/lodash/xor.js +++ b/node_modules/lodash/xor.js @@ -1,7 +1,7 @@ var arrayFilter = require('./_arrayFilter'), + baseRest = require('./_baseRest'), baseXor = require('./_baseXor'), - isArrayLikeObject = require('./isArrayLikeObject'), - rest = require('./rest'); + isArrayLikeObject = require('./isArrayLikeObject'); /** * Creates an array of unique values that is the @@ -14,14 +14,14 @@ var arrayFilter = require('./_arrayFilter'), * @since 2.4.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of values. + * @returns {Array} Returns the new array of filtered values. * @see _.difference, _.without * @example * - * _.xor([2, 1], [4, 2]); - * // => [1, 4] + * _.xor([2, 1], [2, 3]); + * // => [1, 3] */ -var xor = rest(function(arrays) { +var xor = baseRest(function(arrays) { return baseXor(arrayFilter(arrays, isArrayLikeObject)); }); diff --git a/node_modules/lodash/xorBy.js b/node_modules/lodash/xorBy.js index efb977d..e047895 100644 --- a/node_modules/lodash/xorBy.js +++ b/node_modules/lodash/xorBy.js @@ -1,39 +1,39 @@ var arrayFilter = require('./_arrayFilter'), baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), baseXor = require('./_baseXor'), isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.xor` except that it accepts `iteratee` which is * invoked for each element of each `arrays` to generate the criterion by - * which by which they're compared. The iteratee is invoked with one argument: - * (value). + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @param {Array|Function|Object|string} [iteratee=_.identity] - * The iteratee invoked per element. - * @returns {Array} Returns the new array of values. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. * @example * - * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor); - * // => [1.2, 4.3] + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] * * // The `_.property` iteratee shorthand. * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 2 }] */ -var xorBy = rest(function(arrays) { +var xorBy = baseRest(function(arrays) { var iteratee = last(arrays); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } - return baseXor(arrayFilter(arrays, isArrayLikeObject), baseIteratee(iteratee)); + return baseXor(arrayFilter(arrays, isArrayLikeObject), baseIteratee(iteratee, 2)); }); module.exports = xorBy; diff --git a/node_modules/lodash/xorWith.js b/node_modules/lodash/xorWith.js index d1335b8..e3a8ac6 100644 --- a/node_modules/lodash/xorWith.js +++ b/node_modules/lodash/xorWith.js @@ -1,13 +1,14 @@ var arrayFilter = require('./_arrayFilter'), + baseRest = require('./_baseRest'), baseXor = require('./_baseXor'), isArrayLikeObject = require('./isArrayLikeObject'), - last = require('./last'), - rest = require('./rest'); + last = require('./last'); /** * This method is like `_.xor` except that it accepts `comparator` which is - * invoked to compare elements of `arrays`. The comparator is invoked with - * two arguments: (arrVal, othVal). + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). * * @static * @memberOf _ @@ -15,7 +16,7 @@ var arrayFilter = require('./_arrayFilter'), * @category Array * @param {...Array} [arrays] The arrays to inspect. * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of values. + * @returns {Array} Returns the new array of filtered values. * @example * * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; @@ -24,11 +25,9 @@ var arrayFilter = require('./_arrayFilter'), * _.xorWith(objects, others, _.isEqual); * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ -var xorWith = rest(function(arrays) { +var xorWith = baseRest(function(arrays) { var comparator = last(arrays); - if (isArrayLikeObject(comparator)) { - comparator = undefined; - } + comparator = typeof comparator == 'function' ? comparator : undefined; return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); }); diff --git a/node_modules/lodash/zip.js b/node_modules/lodash/zip.js index e1cbbbb..c800ab3 100644 --- a/node_modules/lodash/zip.js +++ b/node_modules/lodash/zip.js @@ -1,4 +1,4 @@ -var rest = require('./rest'), +var baseRest = require('./_baseRest'), unzip = require('./unzip'); /** @@ -14,9 +14,9 @@ var rest = require('./rest'), * @returns {Array} Returns the new array of grouped elements. * @example * - * _.zip(['fred', 'barney'], [30, 40], [true, false]); - * // => [['fred', 30, true], ['barney', 40, false]] + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] */ -var zip = rest(unzip); +var zip = baseRest(unzip); module.exports = zip; diff --git a/node_modules/lodash/zipWith.js b/node_modules/lodash/zipWith.js index d01b638..d7a1f91 100644 --- a/node_modules/lodash/zipWith.js +++ b/node_modules/lodash/zipWith.js @@ -1,4 +1,4 @@ -var rest = require('./rest'), +var baseRest = require('./_baseRest'), unzipWith = require('./unzipWith'); /** @@ -11,7 +11,8 @@ var rest = require('./rest'), * @since 3.8.0 * @category Array * @param {...Array} [arrays] The arrays to process. - * @param {Function} [iteratee=_.identity] The function to combine grouped values. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. * @returns {Array} Returns the new array of grouped elements. * @example * @@ -20,7 +21,7 @@ var rest = require('./rest'), * }); * // => [111, 222] */ -var zipWith = rest(function(arrays) { +var zipWith = baseRest(function(arrays) { var length = arrays.length, iteratee = length > 1 ? arrays[length - 1] : undefined; diff --git a/node_modules/merge/package.json b/node_modules/merge/package.json index 1ae9673..1db8020 100644 --- a/node_modules/merge/package.json +++ b/node_modules/merge/package.json @@ -1,79 +1,24 @@ { - "_args": [ - [ - "merge@^1.2.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\sass-lint" - ] - ], - "_from": "merge@>=1.2.0 <2.0.0", - "_id": "merge@1.2.0", - "_inCache": true, - "_installable": true, - "_location": "/merge", - "_npmUser": { - "email": "yeikos@gmail.com", - "name": "yeikos" - }, - "_npmVersion": "1.4.21", - "_phantomChildren": {}, - "_requested": { - "name": "merge", - "raw": "merge@^1.2.0", - "rawSpec": "^1.2.0", - "scope": null, - "spec": ">=1.2.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/sass-lint" - ], - "_resolved": "https://registry.npmjs.org/merge/-/merge-1.2.0.tgz", - "_shasum": "7531e39d4949c281a66b8c5a6e0265e8b05894da", - "_shrinkwrap": null, - "_spec": "merge@^1.2.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\sass-lint", - "author": { - "name": "yeikos", - "url": "http://www.yeikos.com" - }, - "bugs": { - "url": "https://github.com/yeikos/js.merge/issues" - }, - "dependencies": {}, + "name": "merge", + "version": "1.2.0", + "author": "yeikos (http://www.yeikos.com)", "description": "Merge multiple objects into one, optionally creating a new cloned object. Similar to the jQuery.extend but more flexible. Works in Node.js and the browser.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "7531e39d4949c281a66b8c5a6e0265e8b05894da", - "tarball": "http://registry.npmjs.org/merge/-/merge-1.2.0.tgz" - }, - "gitHead": "6fc27c23e1ebf54a4f6ba8a7224dd48dfd9faf7c", + "main": "merge.js", + "license": "MIT", "homepage": "https://github.com/yeikos/js.merge", + "repository": { + "type": "git", + "url": "https://github.com/yeikos/js.merge.git" + }, "keywords": [ - "browser", - "clone", - "extend", "merge", + "recursive", + "extend", + "clone", "object", - "recursive" - ], - "license": "MIT", - "main": "merge.js", - "maintainers": [ - { - "name": "yeikos", - "email": "yeikos@gmail.com" - } + "browser" ], - "name": "merge", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/yeikos/js.merge.git" - }, "scripts": { "test": "cd tests; node index.js" - }, - "version": "1.2.0" -} + } +} \ No newline at end of file diff --git a/node_modules/minimatch/README.md b/node_modules/minimatch/README.md index d458bc2..ad72b81 100644 --- a/node_modules/minimatch/README.md +++ b/node_modules/minimatch/README.md @@ -2,7 +2,7 @@ A minimal matching utility. -[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch) +[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](http://travis-ci.org/isaacs/minimatch) This is the matching library used internally by npm. @@ -37,7 +37,7 @@ See: ## Minimatch Class -Create a minimatch object by instanting the `minimatch.Minimatch` class. +Create a minimatch object by instantiating the `minimatch.Minimatch` class. ```javascript var Minimatch = require("minimatch").Minimatch @@ -82,13 +82,6 @@ var mm = new Minimatch(pattern, options) All other methods are internal, and will be called as necessary. -## Functions - -The top-level exported function has a `cache` property, which is an LRU -cache set to store 100 items. So, calling these methods repeatedly -with the same pattern and options will use the same Minimatch object, -saving the cost of parsing it multiple times. - ### minimatch(path, pattern, options) Main export. Tests a path against the pattern using the options. diff --git a/node_modules/minimatch/minimatch.js b/node_modules/minimatch/minimatch.js index ec4c05c..5b5f8cf 100644 --- a/node_modules/minimatch/minimatch.js +++ b/node_modules/minimatch/minimatch.js @@ -9,6 +9,14 @@ try { var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} var expand = require('brace-expansion') +var plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' } +} + // any single thing other than / // don't need to escape / when using new RegExp() var qmark = '[^/]' @@ -235,7 +243,7 @@ function braceExpand (pattern, options) { ? this.pattern : pattern if (typeof pattern === 'undefined') { - throw new Error('undefined pattern') + throw new TypeError('undefined pattern') } if (options.nobrace || @@ -261,6 +269,10 @@ function braceExpand (pattern, options) { Minimatch.prototype.parse = parse var SUBPARSE = {} function parse (pattern, isSub) { + if (pattern.length > 1024 * 64) { + throw new TypeError('pattern is too long') + } + var options = this.options // shortcuts @@ -273,7 +285,6 @@ function parse (pattern, isSub) { // ? => one single character var patternListStack = [] var negativeLists = [] - var plType var stateChar var inClass = false var reClassStart = -1 @@ -372,11 +383,12 @@ function parse (pattern, isSub) { continue } - plType = stateChar patternListStack.push({ - type: plType, + type: stateChar, start: i - 1, - reStart: re.length + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close }) // negation is (?:(?!js)[^/]*) re += stateChar === '!' ? '(?:(?!(?:' : '(?:' @@ -392,24 +404,14 @@ function parse (pattern, isSub) { clearStateChar() hasMagic = true - re += ')' var pl = patternListStack.pop() - plType = pl.type // negation is (?:(?!js)[^/]*) // The others are (?:) - switch (plType) { - case '!': - negativeLists.push(pl) - re += ')[^/]*?)' - pl.reEnd = re.length - break - case '?': - case '+': - case '*': - re += plType - break - case '@': break // the default anyway + re += pl.close + if (pl.type === '!') { + negativeLists.push(pl) } + pl.reEnd = re.length continue case '|': @@ -516,9 +518,10 @@ function parse (pattern, isSub) { // Go through and escape them, taking care not to double-escape any // | chars that were already escaped. for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) + var tail = re.slice(pl.reStart + pl.open.length) + this.debug('setting tail', re, pl) // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { if (!$2) { // the | isn't already escaped, so escape it. $2 = '\\' @@ -533,7 +536,7 @@ function parse (pattern, isSub) { return $1 + $1 + $2 + '|' }) - this.debug('tail=%j\n %s', tail, tail) + this.debug('tail=%j\n %s', tail, tail, pl, re) var t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type @@ -615,7 +618,15 @@ function parse (pattern, isSub) { } var flags = options.nocase ? 'i' : '' - var regExp = new RegExp('^' + re + '$', flags) + try { + var regExp = new RegExp('^' + re + '$', flags) + } catch (er) { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } regExp._glob = pattern regExp._src = re diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json index 9958fd2..ec4b9fd 100644 --- a/node_modules/minimatch/package.json +++ b/node_modules/minimatch/package.json @@ -1,87 +1,29 @@ { - "_args": [ - [ - "minimatch@^3.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "minimatch@>=3.0.0 <4.0.0", - "_id": "minimatch@3.0.0", - "_inCache": true, - "_installable": true, - "_location": "/minimatch", - "_nodeVersion": "4.0.0", - "_npmUser": { - "email": "isaacs@npmjs.com", - "name": "isaacs" - }, - "_npmVersion": "3.3.2", - "_phantomChildren": {}, - "_requested": { - "name": "minimatch", - "raw": "minimatch@^3.0.0", - "rawSpec": "^3.0.0", - "scope": null, - "spec": ">=3.0.0 <4.0.0", - "type": "range" + "author": "Isaac Z. Schlueter (http://blog.izs.me)", + "name": "minimatch", + "description": "a glob matcher in javascript", + "version": "3.0.3", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" }, - "_requiredBy": [ - "/eslint", - "/eslint/glob", - "/glob" - ], - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz", - "_shasum": "5236157a51e4f004c177fb3c527ff7dd78f0ef83", - "_shrinkwrap": null, - "_spec": "minimatch@^3.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me" + "main": "minimatch.js", + "scripts": { + "posttest": "standard minimatch.js test/*.js", + "test": "tap test/*.js" }, - "bugs": { - "url": "https://github.com/isaacs/minimatch/issues" + "engines": { + "node": "*" }, "dependencies": { "brace-expansion": "^1.0.0" }, - "description": "a glob matcher in javascript", "devDependencies": { "standard": "^3.7.2", - "tap": "^1.2.0" - }, - "directories": {}, - "dist": { - "shasum": "5236157a51e4f004c177fb3c527ff7dd78f0ef83", - "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz" - }, - "engines": { - "node": "*" + "tap": "^5.6.0" }, + "license": "ISC", "files": [ "minimatch.js" - ], - "gitHead": "270dbea567f0af6918cb18103e98c612aa717a20", - "homepage": "https://github.com/isaacs/minimatch#readme", - "license": "ISC", - "main": "minimatch.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "minimatch", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "scripts": { - "posttest": "standard minimatch.js test/*.js", - "test": "tap test/*.js" - }, - "version": "3.0.0" + ] } diff --git a/node_modules/minimist/.travis.yml b/node_modules/minimist/.travis.yml index cc4dba2..74c57bf 100644 --- a/node_modules/minimist/.travis.yml +++ b/node_modules/minimist/.travis.yml @@ -2,3 +2,7 @@ language: node_js node_js: - "0.8" - "0.10" + - "0.12" + - "iojs" +before_install: + - npm install -g npm@~1.4.6 diff --git a/node_modules/minimist/index.js b/node_modules/minimist/index.js index 584f551..de61285 100644 --- a/node_modules/minimist/index.js +++ b/node_modules/minimist/index.js @@ -1,15 +1,19 @@ module.exports = function (args, opts) { if (!opts) opts = {}; - var flags = { bools : {}, strings : {} }; - - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - }); + var flags = { bools : {}, strings : {}, unknownFn: null }; + + if (typeof opts['unknown'] === 'function') { + flags.unknownFn = opts['unknown']; + } + + if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { + flags.allBools = true; + } else { + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + } var aliases = {}; Object.keys(opts.alias || {}).forEach(function (key) { @@ -20,7 +24,14 @@ module.exports = function (args, opts) { })); }); }); - + + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + if (aliases[key]) { + flags.strings[aliases[key]] = true; + } + }); + var defaults = opts['default'] || {}; var argv = { _ : [] }; @@ -35,7 +46,16 @@ module.exports = function (args, opts) { args = args.slice(0, args.indexOf('--')); } - function setArg (key, val) { + function argDefined(key, arg) { + return (flags.allBools && /^--[^=]+$/.test(arg)) || + flags.strings[key] || flags.bools[key] || aliases[key]; + } + + function setArg (key, val, arg) { + if (arg && flags.unknownFn && !argDefined(key, arg)) { + if (flags.unknownFn(arg) === false) return; + } + var value = !flags.strings[key] && isNumber(val) ? Number(val) : val ; @@ -45,7 +65,32 @@ module.exports = function (args, opts) { setKey(argv, x.split('.'), value); }); } + + function setKey (obj, keys, value) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + if (o[key] === undefined) o[key] = {}; + o = o[key]; + }); + + var key = keys[keys.length - 1]; + if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') { + o[key] = value; + } + else if (Array.isArray(o[key])) { + o[key].push(value); + } + else { + o[key] = [ o[key], value ]; + } + } + function aliasIsBoolean(key) { + return aliases[key].some(function (x) { + return flags.bools[x]; + }); + } + for (var i = 0; i < args.length; i++) { var arg = args[i]; @@ -54,27 +99,33 @@ module.exports = function (args, opts) { // 'dotall' regex modifier. See: // http://stackoverflow.com/a/1068308/13216 var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - setArg(m[1], m[2]); + var key = m[1]; + var value = m[2]; + if (flags.bools[key]) { + value = value !== 'false'; + } + setArg(key, value, arg); } else if (/^--no-.+/.test(arg)) { var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false); + setArg(key, false, arg); } else if (/^--.+/.test(arg)) { var key = arg.match(/^--(.+)/)[1]; var next = args[i + 1]; if (next !== undefined && !/^-/.test(next) && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, next); + && !flags.allBools + && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, next, arg); i++; } else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true'); + setArg(key, next === 'true', arg); i++; } else { - setArg(key, flags.strings[key] ? '' : true); + setArg(key, flags.strings[key] ? '' : true, arg); } } else if (/^-[^-]+/.test(arg)) { @@ -85,24 +136,24 @@ module.exports = function (args, opts) { var next = arg.slice(j+2); if (next === '-') { - setArg(letters[j], next) + setArg(letters[j], next, arg) continue; } if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next); + setArg(letters[j], next, arg); broken = true; break; } if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2)); + setArg(letters[j], arg.slice(j+2), arg); broken = true; break; } else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true); + setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); } } @@ -110,23 +161,29 @@ module.exports = function (args, opts) { if (!broken && key !== '-') { if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, args[i+1]); + && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, args[i+1], arg); i++; } else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true'); + setArg(key, args[i+1] === 'true', arg); i++; } else { - setArg(key, flags.strings[key] ? '' : true); + setArg(key, flags.strings[key] ? '' : true, arg); } } } else { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); + if (!flags.unknownFn || flags.unknownFn(arg) !== false) { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); + } + if (opts.stopEarly) { + argv._.push.apply(argv._, args.slice(i + 1)); + break; + } } } @@ -140,9 +197,17 @@ module.exports = function (args, opts) { } }); - notFlags.forEach(function(key) { - argv._.push(key); - }); + if (opts['--']) { + argv['--'] = new Array(); + notFlags.forEach(function(key) { + argv['--'].push(key); + }); + } + else { + notFlags.forEach(function(key) { + argv._.push(key); + }); + } return argv; }; @@ -157,31 +222,9 @@ function hasKey (obj, keys) { return key in o; } -function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } -} - function isNumber (x) { if (typeof x === 'number') return true; if (/^0x[0-9a-f]+$/i.test(x)) return true; return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); } -function longest (xs) { - return Math.max.apply(null, xs.map(function (x) { return x.length })); -} diff --git a/node_modules/minimist/package.json b/node_modules/minimist/package.json index f21d074..1271939 100644 --- a/node_modules/minimist/package.json +++ b/node_modules/minimist/package.json @@ -1,94 +1,45 @@ { - "_args": [ - [ - "minimist@0.0.8", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\mkdirp" - ] - ], - "_from": "minimist@0.0.8", - "_id": "minimist@0.0.8", - "_inCache": true, - "_installable": true, - "_location": "/minimist", - "_npmUser": { - "email": "mail@substack.net", - "name": "substack" - }, - "_npmVersion": "1.4.3", - "_phantomChildren": {}, - "_requested": { - "name": "minimist", - "raw": "minimist@0.0.8", - "rawSpec": "0.0.8", - "scope": null, - "spec": "0.0.8", - "type": "version" - }, - "_requiredBy": [ - "/mkdirp", - "/optimist" - ], - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d", - "_shrinkwrap": null, - "_spec": "minimist@0.0.8", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\mkdirp", - "author": { - "email": "mail@substack.net", - "name": "James Halliday", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "dependencies": {}, + "name": "minimist", + "version": "1.1.3", "description": "parse argument options", + "main": "index.js", "devDependencies": { + "covert": "^1.0.0", "tap": "~0.4.0", - "tape": "~1.0.4" - }, - "directories": {}, - "dist": { - "shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d", - "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" - }, - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "optimist", - "parser" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "name": "minimist", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" + "tape": "^3.5.0" }, "scripts": { - "test": "tap test/*.js" + "test": "tap test/*.js", + "coverage": "covert test/*.js" }, "testling": { + "files": "test/*.js", "browsers": [ - "chrome/10", - "chrome/latest", + "ie/6..latest", "ff/5", "firefox/latest", - "ie/6..latest", - "opera/12", + "chrome/10", + "chrome/latest", "safari/5.1", - "safari/latest" - ], - "files": "test/*.js" + "safari/latest", + "opera/12" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/minimist.git" + }, + "homepage": "https://github.com/substack/minimist", + "keywords": [ + "argv", + "getopt", + "parser", + "optimist" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" }, - "version": "0.0.8" + "license": "MIT" } diff --git a/node_modules/minimist/readme.markdown b/node_modules/minimist/readme.markdown index c256353..30a74cf 100644 --- a/node_modules/minimist/readme.markdown +++ b/node_modules/minimist/readme.markdown @@ -55,10 +55,28 @@ options can be: * `opts.string` - a string or array of strings argument names to always treat as strings -* `opts.boolean` - a string or array of strings to always treat as booleans +* `opts.boolean` - a boolean, string or array of strings to always treat as +booleans. if `true` will treat all double hyphenated arguments without equal signs +as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) * `opts.alias` - an object mapping string names to strings or arrays of string argument names to use as aliases * `opts.default` - an object mapping string argument names to default values +* `opts.stopEarly` - when true, populate `argv._` with everything after the +first non-option +* `opts['--']` - when true, populate `argv._` with everything before the `--` +and `argv['--']` with everything after the `--`. Here's an example: +* `opts.unknown` - a function which is invoked with a command line parameter not +defined in the `opts` configuration object. If the function returns `false`, the +unknown option is not added to `argv`. + +``` +> require('./')('one two three -- four five --six'.split(' '), { '--': true }) +{ _: [ 'one', 'two', 'three' ], + '--': [ 'four', 'five', '--six' ] } +``` + +Note that with `opts['--']` set, parsing for arguments still stops after the +`--`. # install diff --git a/node_modules/sass-lint/node_modules/minimist/test/all_bool.js b/node_modules/minimist/test/all_bool.js similarity index 100% rename from node_modules/sass-lint/node_modules/minimist/test/all_bool.js rename to node_modules/minimist/test/all_bool.js diff --git a/node_modules/sass-lint/node_modules/minimist/test/bool.js b/node_modules/minimist/test/bool.js similarity index 100% rename from node_modules/sass-lint/node_modules/minimist/test/bool.js rename to node_modules/minimist/test/bool.js diff --git a/node_modules/minimist/test/dash.js b/node_modules/minimist/test/dash.js index 8b034b9..5a4fa5b 100644 --- a/node_modules/minimist/test/dash.js +++ b/node_modules/minimist/test/dash.js @@ -22,3 +22,10 @@ test('-a -- b', function (t) { t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); }); + +test('move arguments after the -- into their own `--` array', function(t) { + t.plan(1); + t.deepEqual( + parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }), + { name: 'John', _: [ 'before' ], '--': [ 'after' ] }); +}); diff --git a/node_modules/minimist/test/default_bool.js b/node_modules/minimist/test/default_bool.js index f0041ee..780a311 100644 --- a/node_modules/minimist/test/default_bool.js +++ b/node_modules/minimist/test/default_bool.js @@ -18,3 +18,18 @@ test('boolean default false', function (t) { t.equal(argv.somefalse, false); t.end(); }); + +test('boolean default to null', function (t) { + var argv = parse([], { + boolean: 'maybe', + default: { maybe: null } + }); + t.equal(argv.maybe, null); + var argv = parse(['--maybe'], { + boolean: 'maybe', + default: { maybe: null } + }); + t.equal(argv.maybe, true); + t.end(); + +}) diff --git a/node_modules/minimist/test/dotted.js b/node_modules/minimist/test/dotted.js index ef0ae34..d8b3e85 100644 --- a/node_modules/minimist/test/dotted.js +++ b/node_modules/minimist/test/dotted.js @@ -14,3 +14,9 @@ test('dotted default', function (t) { t.equal(argv.aa.bb, 11); t.end(); }); + +test('dotted default with no alias', function (t) { + var argv = parse('', {default: {'a.b': 11}}); + t.equal(argv.a.b, 11); + t.end(); +}); diff --git a/node_modules/sass-lint/node_modules/minimist/test/num.js b/node_modules/minimist/test/num.js similarity index 100% rename from node_modules/sass-lint/node_modules/minimist/test/num.js rename to node_modules/minimist/test/num.js diff --git a/node_modules/minimist/test/parse.js b/node_modules/minimist/test/parse.js index 8a90646..7b4a2a1 100644 --- a/node_modules/minimist/test/parse.js +++ b/node_modules/minimist/test/parse.js @@ -42,32 +42,6 @@ test('comprehensive', function (t) { t.end(); }); -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789' - ]); - t.deepEqual(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ] - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - test('flag boolean', function (t) { var argv = parse([ '-t', 'moo' ], { boolean: 't' }); t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); @@ -92,42 +66,6 @@ test('flag boolean value', function (t) { t.end(); }); -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false } - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { - boolean: ['x','y','z'] - }); - - t.deepEqual(argv, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ] - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); - test('newlines in params' , function (t) { var args = parse([ '-s', "X\nX" ]) t.deepEqual(args, { _ : [], s : "X\nX" }); @@ -183,6 +121,29 @@ test('empty strings', function(t) { }); +test('string and alias', function(t) { + var x = parse([ '--str', '000123' ], { + string: 's', + alias: { s: 'str' } + }); + + t.equal(x.str, '000123'); + t.equal(typeof x.str, 'string'); + t.equal(x.s, '000123'); + t.equal(typeof x.s, 'string'); + + var y = parse([ '-s', '000123' ], { + string: 'str', + alias: { str: 's' } + }); + + t.equal(y.str, '000123'); + t.equal(typeof y.str, 'string'); + t.equal(y.s, '000123'); + t.equal(typeof y.s, 'string'); + t.end(); +}); + test('slashBreak', function (t) { t.same( parse([ '-I/foo/bar/baz' ]), @@ -234,85 +195,3 @@ test('nested dotted objects', function (t) { t.same(argv.beep, { boop : true }); t.end(); }); - -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - alias: { 'h': 'herp' }, - boolean: 'herp' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); diff --git a/node_modules/minimist/test/parse_modified.js b/node_modules/minimist/test/parse_modified.js index 21851b0..ab620dc 100644 --- a/node_modules/minimist/test/parse_modified.js +++ b/node_modules/minimist/test/parse_modified.js @@ -5,5 +5,5 @@ test('parse with modifier functions' , function (t) { t.plan(1); var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: ['123'] }); + t.deepEqual(argv, { b: true, _: [123] }); }); diff --git a/node_modules/sass-lint/node_modules/minimist/test/stop_early.js b/node_modules/minimist/test/stop_early.js similarity index 100% rename from node_modules/sass-lint/node_modules/minimist/test/stop_early.js rename to node_modules/minimist/test/stop_early.js diff --git a/node_modules/sass-lint/node_modules/minimist/test/unknown.js b/node_modules/minimist/test/unknown.js similarity index 100% rename from node_modules/sass-lint/node_modules/minimist/test/unknown.js rename to node_modules/minimist/test/unknown.js diff --git a/node_modules/mkdirp/node_modules/minimist/.travis.yml b/node_modules/mkdirp/node_modules/minimist/.travis.yml new file mode 100644 index 0000000..cc4dba2 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/node_modules/sass-lint/node_modules/minimist/LICENSE b/node_modules/mkdirp/node_modules/minimist/LICENSE similarity index 100% rename from node_modules/sass-lint/node_modules/minimist/LICENSE rename to node_modules/mkdirp/node_modules/minimist/LICENSE diff --git a/node_modules/sass-lint/node_modules/minimist/example/parse.js b/node_modules/mkdirp/node_modules/minimist/example/parse.js similarity index 100% rename from node_modules/sass-lint/node_modules/minimist/example/parse.js rename to node_modules/mkdirp/node_modules/minimist/example/parse.js diff --git a/node_modules/sass-lint/node_modules/minimist/index.js b/node_modules/mkdirp/node_modules/minimist/index.js similarity index 57% rename from node_modules/sass-lint/node_modules/minimist/index.js rename to node_modules/mkdirp/node_modules/minimist/index.js index de61285..584f551 100644 --- a/node_modules/sass-lint/node_modules/minimist/index.js +++ b/node_modules/mkdirp/node_modules/minimist/index.js @@ -1,19 +1,15 @@ module.exports = function (args, opts) { if (!opts) opts = {}; - var flags = { bools : {}, strings : {}, unknownFn: null }; - - if (typeof opts['unknown'] === 'function') { - flags.unknownFn = opts['unknown']; - } - - if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { - flags.allBools = true; - } else { - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - } + var flags = { bools : {}, strings : {} }; + + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + }); var aliases = {}; Object.keys(opts.alias || {}).forEach(function (key) { @@ -24,14 +20,7 @@ module.exports = function (args, opts) { })); }); }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - if (aliases[key]) { - flags.strings[aliases[key]] = true; - } - }); - + var defaults = opts['default'] || {}; var argv = { _ : [] }; @@ -46,16 +35,7 @@ module.exports = function (args, opts) { args = args.slice(0, args.indexOf('--')); } - function argDefined(key, arg) { - return (flags.allBools && /^--[^=]+$/.test(arg)) || - flags.strings[key] || flags.bools[key] || aliases[key]; - } - - function setArg (key, val, arg) { - if (arg && flags.unknownFn && !argDefined(key, arg)) { - if (flags.unknownFn(arg) === false) return; - } - + function setArg (key, val) { var value = !flags.strings[key] && isNumber(val) ? Number(val) : val ; @@ -65,32 +45,7 @@ module.exports = function (args, opts) { setKey(argv, x.split('.'), value); }); } - - function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } - } - function aliasIsBoolean(key) { - return aliases[key].some(function (x) { - return flags.bools[x]; - }); - } - for (var i = 0; i < args.length; i++) { var arg = args[i]; @@ -99,33 +54,27 @@ module.exports = function (args, opts) { // 'dotall' regex modifier. See: // http://stackoverflow.com/a/1068308/13216 var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - var key = m[1]; - var value = m[2]; - if (flags.bools[key]) { - value = value !== 'false'; - } - setArg(key, value, arg); + setArg(m[1], m[2]); } else if (/^--no-.+/.test(arg)) { var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false, arg); + setArg(key, false); } else if (/^--.+/.test(arg)) { var key = arg.match(/^--(.+)/)[1]; var next = args[i + 1]; if (next !== undefined && !/^-/.test(next) && !flags.bools[key] - && !flags.allBools - && (aliases[key] ? !aliasIsBoolean(key) : true)) { - setArg(key, next, arg); + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, next); i++; } else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true', arg); + setArg(key, next === 'true'); i++; } else { - setArg(key, flags.strings[key] ? '' : true, arg); + setArg(key, flags.strings[key] ? '' : true); } } else if (/^-[^-]+/.test(arg)) { @@ -136,24 +85,24 @@ module.exports = function (args, opts) { var next = arg.slice(j+2); if (next === '-') { - setArg(letters[j], next, arg) + setArg(letters[j], next) continue; } if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next, arg); + setArg(letters[j], next); broken = true; break; } if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2), arg); + setArg(letters[j], arg.slice(j+2)); broken = true; break; } else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); + setArg(letters[j], flags.strings[letters[j]] ? '' : true); } } @@ -161,29 +110,23 @@ module.exports = function (args, opts) { if (!broken && key !== '-') { if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) && !flags.bools[key] - && (aliases[key] ? !aliasIsBoolean(key) : true)) { - setArg(key, args[i+1], arg); + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, args[i+1]); i++; } else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true', arg); + setArg(key, args[i+1] === 'true'); i++; } else { - setArg(key, flags.strings[key] ? '' : true, arg); + setArg(key, flags.strings[key] ? '' : true); } } } else { - if (!flags.unknownFn || flags.unknownFn(arg) !== false) { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - if (opts.stopEarly) { - argv._.push.apply(argv._, args.slice(i + 1)); - break; - } + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); } } @@ -197,17 +140,9 @@ module.exports = function (args, opts) { } }); - if (opts['--']) { - argv['--'] = new Array(); - notFlags.forEach(function(key) { - argv['--'].push(key); - }); - } - else { - notFlags.forEach(function(key) { - argv._.push(key); - }); - } + notFlags.forEach(function(key) { + argv._.push(key); + }); return argv; }; @@ -222,9 +157,31 @@ function hasKey (obj, keys) { return key in o; } +function setKey (obj, keys, value) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + if (o[key] === undefined) o[key] = {}; + o = o[key]; + }); + + var key = keys[keys.length - 1]; + if (o[key] === undefined || typeof o[key] === 'boolean') { + o[key] = value; + } + else if (Array.isArray(o[key])) { + o[key].push(value); + } + else { + o[key] = [ o[key], value ]; + } +} + function isNumber (x) { if (typeof x === 'number') return true; if (/^0x[0-9a-f]+$/i.test(x)) return true; return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); } +function longest (xs) { + return Math.max.apply(null, xs.map(function (x) { return x.length })); +} diff --git a/node_modules/mkdirp/node_modules/minimist/package.json b/node_modules/mkdirp/node_modules/minimist/package.json new file mode 100644 index 0000000..af6250b --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/package.json @@ -0,0 +1,40 @@ +{ + "name": "minimist", + "version": "0.0.8", + "description": "parse argument options", + "main": "index.js", + "devDependencies": { + "tape": "~1.0.4", + "tap": "~0.4.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "testling" : { + "files" : "test/*.js", + "browsers" : [ + "ie/6..latest", + "ff/5", "firefox/latest", + "chrome/10", "chrome/latest", + "safari/5.1", "safari/latest", + "opera/12" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/minimist.git" + }, + "homepage": "https://github.com/substack/minimist", + "keywords": [ + "argv", + "getopt", + "parser", + "optimist" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT" +} diff --git a/node_modules/sass-lint/node_modules/minimist/readme.markdown b/node_modules/mkdirp/node_modules/minimist/readme.markdown similarity index 63% rename from node_modules/sass-lint/node_modules/minimist/readme.markdown rename to node_modules/mkdirp/node_modules/minimist/readme.markdown index 30a74cf..c256353 100644 --- a/node_modules/sass-lint/node_modules/minimist/readme.markdown +++ b/node_modules/mkdirp/node_modules/minimist/readme.markdown @@ -55,28 +55,10 @@ options can be: * `opts.string` - a string or array of strings argument names to always treat as strings -* `opts.boolean` - a boolean, string or array of strings to always treat as -booleans. if `true` will treat all double hyphenated arguments without equal signs -as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) +* `opts.boolean` - a string or array of strings to always treat as booleans * `opts.alias` - an object mapping string names to strings or arrays of string argument names to use as aliases * `opts.default` - an object mapping string argument names to default values -* `opts.stopEarly` - when true, populate `argv._` with everything after the -first non-option -* `opts['--']` - when true, populate `argv._` with everything before the `--` -and `argv['--']` with everything after the `--`. Here's an example: -* `opts.unknown` - a function which is invoked with a command line parameter not -defined in the `opts` configuration object. If the function returns `false`, the -unknown option is not added to `argv`. - -``` -> require('./')('one two three -- four five --six'.split(' '), { '--': true }) -{ _: [ 'one', 'two', 'three' ], - '--': [ 'four', 'five', '--six' ] } -``` - -Note that with `opts['--']` set, parsing for arguments still stops after the -`--`. # install diff --git a/node_modules/sass-lint/node_modules/minimist/test/dash.js b/node_modules/mkdirp/node_modules/minimist/test/dash.js similarity index 74% rename from node_modules/sass-lint/node_modules/minimist/test/dash.js rename to node_modules/mkdirp/node_modules/minimist/test/dash.js index 5a4fa5b..8b034b9 100644 --- a/node_modules/sass-lint/node_modules/minimist/test/dash.js +++ b/node_modules/mkdirp/node_modules/minimist/test/dash.js @@ -22,10 +22,3 @@ test('-a -- b', function (t) { t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); }); - -test('move arguments after the -- into their own `--` array', function(t) { - t.plan(1); - t.deepEqual( - parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }), - { name: 'John', _: [ 'before' ], '--': [ 'after' ] }); -}); diff --git a/node_modules/sass-lint/node_modules/minimist/test/default_bool.js b/node_modules/mkdirp/node_modules/minimist/test/default_bool.js similarity index 58% rename from node_modules/sass-lint/node_modules/minimist/test/default_bool.js rename to node_modules/mkdirp/node_modules/minimist/test/default_bool.js index 780a311..f0041ee 100644 --- a/node_modules/sass-lint/node_modules/minimist/test/default_bool.js +++ b/node_modules/mkdirp/node_modules/minimist/test/default_bool.js @@ -18,18 +18,3 @@ test('boolean default false', function (t) { t.equal(argv.somefalse, false); t.end(); }); - -test('boolean default to null', function (t) { - var argv = parse([], { - boolean: 'maybe', - default: { maybe: null } - }); - t.equal(argv.maybe, null); - var argv = parse(['--maybe'], { - boolean: 'maybe', - default: { maybe: null } - }); - t.equal(argv.maybe, true); - t.end(); - -}) diff --git a/node_modules/sass-lint/node_modules/minimist/test/dotted.js b/node_modules/mkdirp/node_modules/minimist/test/dotted.js similarity index 75% rename from node_modules/sass-lint/node_modules/minimist/test/dotted.js rename to node_modules/mkdirp/node_modules/minimist/test/dotted.js index d8b3e85..ef0ae34 100644 --- a/node_modules/sass-lint/node_modules/minimist/test/dotted.js +++ b/node_modules/mkdirp/node_modules/minimist/test/dotted.js @@ -14,9 +14,3 @@ test('dotted default', function (t) { t.equal(argv.aa.bb, 11); t.end(); }); - -test('dotted default with no alias', function (t) { - var argv = parse('', {default: {'a.b': 11}}); - t.equal(argv.a.b, 11); - t.end(); -}); diff --git a/node_modules/sass-lint/node_modules/minimist/test/long.js b/node_modules/mkdirp/node_modules/minimist/test/long.js similarity index 100% rename from node_modules/sass-lint/node_modules/minimist/test/long.js rename to node_modules/mkdirp/node_modules/minimist/test/long.js diff --git a/node_modules/sass-lint/node_modules/minimist/test/parse.js b/node_modules/mkdirp/node_modules/minimist/test/parse.js similarity index 54% rename from node_modules/sass-lint/node_modules/minimist/test/parse.js rename to node_modules/mkdirp/node_modules/minimist/test/parse.js index 7b4a2a1..8a90646 100644 --- a/node_modules/sass-lint/node_modules/minimist/test/parse.js +++ b/node_modules/mkdirp/node_modules/minimist/test/parse.js @@ -42,6 +42,32 @@ test('comprehensive', function (t) { t.end(); }); +test('nums', function (t) { + var argv = parse([ + '-x', '1234', + '-y', '5.67', + '-z', '1e7', + '-w', '10f', + '--hex', '0xdeadbeef', + '789' + ]); + t.deepEqual(argv, { + x : 1234, + y : 5.67, + z : 1e7, + w : '10f', + hex : 0xdeadbeef, + _ : [ 789 ] + }); + t.deepEqual(typeof argv.x, 'number'); + t.deepEqual(typeof argv.y, 'number'); + t.deepEqual(typeof argv.z, 'number'); + t.deepEqual(typeof argv.w, 'string'); + t.deepEqual(typeof argv.hex, 'number'); + t.deepEqual(typeof argv._[0], 'number'); + t.end(); +}); + test('flag boolean', function (t) { var argv = parse([ '-t', 'moo' ], { boolean: 't' }); t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); @@ -66,6 +92,42 @@ test('flag boolean value', function (t) { t.end(); }); +test('flag boolean default false', function (t) { + var argv = parse(['moo'], { + boolean: ['t', 'verbose'], + default: { verbose: false, t: false } + }); + + t.deepEqual(argv, { + verbose: false, + t: false, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); + +}); + +test('boolean groups', function (t) { + var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { + boolean: ['x','y','z'] + }); + + t.deepEqual(argv, { + x : true, + y : false, + z : true, + _ : [ 'one', 'two', 'three' ] + }); + + t.deepEqual(typeof argv.x, 'boolean'); + t.deepEqual(typeof argv.y, 'boolean'); + t.deepEqual(typeof argv.z, 'boolean'); + t.end(); +}); + test('newlines in params' , function (t) { var args = parse([ '-s', "X\nX" ]) t.deepEqual(args, { _ : [], s : "X\nX" }); @@ -121,29 +183,6 @@ test('empty strings', function(t) { }); -test('string and alias', function(t) { - var x = parse([ '--str', '000123' ], { - string: 's', - alias: { s: 'str' } - }); - - t.equal(x.str, '000123'); - t.equal(typeof x.str, 'string'); - t.equal(x.s, '000123'); - t.equal(typeof x.s, 'string'); - - var y = parse([ '-s', '000123' ], { - string: 'str', - alias: { str: 's' } - }); - - t.equal(y.str, '000123'); - t.equal(typeof y.str, 'string'); - t.equal(y.s, '000123'); - t.equal(typeof y.s, 'string'); - t.end(); -}); - test('slashBreak', function (t) { t.same( parse([ '-I/foo/bar/baz' ]), @@ -195,3 +234,85 @@ test('nested dotted objects', function (t) { t.same(argv.beep, { boop : true }); t.end(); }); + +test('boolean and alias with chainable api', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + herp: { alias: 'h', boolean: true } + }; + var aliasedArgv = parse(aliased, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var propertyArgv = parse(regular, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias with options hash', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + alias: { 'h': 'herp' }, + boolean: 'herp' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias using explicit true', function (t) { + var aliased = [ '-h', 'true' ]; + var regular = [ '--herp', 'true' ]; + var opts = { + alias: { h: 'herp' }, + boolean: 'h' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +// regression, see https://github.com/substack/node-optimist/issues/71 +test('boolean and --x=true', function(t) { + var parsed = parse(['--boool', '--other=true'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'true'); + + parsed = parse(['--boool', '--other=false'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'false'); + t.end(); +}); diff --git a/node_modules/sass-lint/node_modules/minimist/test/parse_modified.js b/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js similarity index 80% rename from node_modules/sass-lint/node_modules/minimist/test/parse_modified.js rename to node_modules/mkdirp/node_modules/minimist/test/parse_modified.js index ab620dc..21851b0 100644 --- a/node_modules/sass-lint/node_modules/minimist/test/parse_modified.js +++ b/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js @@ -5,5 +5,5 @@ test('parse with modifier functions' , function (t) { t.plan(1); var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: [123] }); + t.deepEqual(argv, { b: true, _: ['123'] }); }); diff --git a/node_modules/sass-lint/node_modules/minimist/test/short.js b/node_modules/mkdirp/node_modules/minimist/test/short.js similarity index 100% rename from node_modules/sass-lint/node_modules/minimist/test/short.js rename to node_modules/mkdirp/node_modules/minimist/test/short.js diff --git a/node_modules/sass-lint/node_modules/minimist/test/whitespace.js b/node_modules/mkdirp/node_modules/minimist/test/whitespace.js similarity index 100% rename from node_modules/sass-lint/node_modules/minimist/test/whitespace.js rename to node_modules/mkdirp/node_modules/minimist/test/whitespace.js diff --git a/node_modules/mkdirp/package.json b/node_modules/mkdirp/package.json index 775f73a..863e860 100644 --- a/node_modules/mkdirp/package.json +++ b/node_modules/mkdirp/package.json @@ -1,86 +1,27 @@ { - "_args": [ - [ - "mkdirp@^0.5.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "mkdirp@>=0.5.0 <0.6.0", - "_id": "mkdirp@0.5.1", - "_inCache": true, - "_installable": true, - "_location": "/mkdirp", - "_nodeVersion": "2.0.0", - "_npmUser": { - "email": "substack@gmail.com", - "name": "substack" - }, - "_npmVersion": "2.9.0", - "_phantomChildren": {}, - "_requested": { - "name": "mkdirp", - "raw": "mkdirp@^0.5.0", - "rawSpec": "^0.5.0", - "scope": null, - "spec": ">=0.5.0 <0.6.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint", - "/write" - ], - "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "_shasum": "30057438eac6cf7f8c4767f38648d6697d75c903", - "_shrinkwrap": null, - "_spec": "mkdirp@^0.5.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint", - "author": { - "email": "mail@substack.net", - "name": "James Halliday", - "url": "http://substack.net" - }, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "bugs": { - "url": "https://github.com/substack/node-mkdirp/issues" - }, - "dependencies": { - "minimist": "0.0.8" - }, + "name": "mkdirp", "description": "Recursively mkdir, like `mkdir -p`", - "devDependencies": { - "mock-fs": "2 >=2.7.0", - "tap": "1" - }, - "directories": {}, - "dist": { - "shasum": "30057438eac6cf7f8c4767f38648d6697d75c903", - "tarball": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" - }, - "gitHead": "d4eff0f06093aed4f387e88e9fc301cb76beedc7", - "homepage": "https://github.com/substack/node-mkdirp#readme", - "keywords": [ - "directory", - "mkdir" - ], - "license": "MIT", + "version": "0.5.1", + "author": "James Halliday (http://substack.net)", "main": "index.js", - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } + "keywords": [ + "mkdir", + "directory" ], - "name": "mkdirp", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", "repository": { "type": "git", - "url": "git+https://github.com/substack/node-mkdirp.git" + "url": "https://github.com/substack/node-mkdirp.git" }, "scripts": { "test": "tap test/*.js" }, - "version": "0.5.1" + "dependencies": { + "minimist": "0.0.8" + }, + "devDependencies": { + "tap": "1", + "mock-fs": "2 >=2.7.0" + }, + "bin": "bin/cmd.js", + "license": "MIT" } diff --git a/node_modules/ms/.npmignore b/node_modules/ms/.npmignore deleted file mode 100644 index d1aa0ce..0000000 --- a/node_modules/ms/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules -test -History.md -Makefile -component.json diff --git a/node_modules/ms/History.md b/node_modules/ms/History.md deleted file mode 100644 index 32fdfc1..0000000 --- a/node_modules/ms/History.md +++ /dev/null @@ -1,66 +0,0 @@ - -0.7.1 / 2015-04-20 -================== - - * prevent extraordinary long inputs (@evilpacket) - * Fixed broken readme link - -0.7.0 / 2014-11-24 -================== - - * add time abbreviations, updated tests and readme for the new units - * fix example in the readme. - * add LICENSE file - -0.6.2 / 2013-12-05 -================== - - * Adding repository section to package.json to suppress warning from NPM. - -0.6.1 / 2013-05-10 -================== - - * fix singularization [visionmedia] - -0.6.0 / 2013-03-15 -================== - - * fix minutes - -0.5.1 / 2013-02-24 -================== - - * add component namespace - -0.5.0 / 2012-11-09 -================== - - * add short formatting as default and .long option - * add .license property to component.json - * add version to component.json - -0.4.0 / 2012-10-22 -================== - - * add rounding to fix crazy decimals - -0.3.0 / 2012-09-07 -================== - - * fix `ms()` [visionmedia] - -0.2.0 / 2012-09-03 -================== - - * add component.json [visionmedia] - * add days support [visionmedia] - * add hours support [visionmedia] - * add minutes support [visionmedia] - * add seconds support [visionmedia] - * add ms string support [visionmedia] - * refactor tests to facilitate ms(number) [visionmedia] - -0.1.0 / 2012-03-07 -================== - - * Initial release diff --git a/node_modules/ms/LICENSE b/node_modules/ms/LICENSE deleted file mode 100644 index 6c07561..0000000 --- a/node_modules/ms/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Guillermo Rauch - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/ms/LICENSE.md b/node_modules/ms/LICENSE.md new file mode 100644 index 0000000..69b6125 --- /dev/null +++ b/node_modules/ms/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Zeit, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/ms/README.md b/node_modules/ms/README.md index 9b4fd03..5b47570 100644 --- a/node_modules/ms/README.md +++ b/node_modules/ms/README.md @@ -1,4 +1,12 @@ -# ms.js: miliseconds conversion utility +# ms + +[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) +[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo) +[![Slack Channel](https://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) + +Use this package to easily convert various time formats to milliseconds. + +## Examples ```js ms('2 days') // 172800000 @@ -8,28 +16,37 @@ ms('2.5 hrs') // 9000000 ms('2h') // 7200000 ms('1m') // 60000 ms('5s') // 5000 +ms('1y') // 31557600000 ms('100') // 100 ``` +### Convert from milliseconds + ```js ms(60000) // "1m" ms(2 * 60000) // "2m" ms(ms('10 hours')) // "10h" ``` +### Time format written-out + ```js ms(60000, { long: true }) // "1 minute" ms(2 * 60000, { long: true }) // "2 minutes" ms(ms('10 hours'), { long: true }) // "10 hours" ``` -- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](http://nodejs.org/download). +## Features + +- Works both in [node](https://nodejs.org) and in the browser. - If a number is supplied to `ms`, a string with a unit is returned. -- If a string that contains the number is supplied, it returns it as -a number (e.g: it returns `100` for `'100'`). -- If you pass a string with a number and a valid unit, the number of -equivalent ms is returned. +- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). +- If you pass a string with a number and a valid unit, the number of equivalent ms is returned. + +## Caught a bug? -## License +1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device +2. Link the package to the global module directory: `npm link` +3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! -MIT +As always, you can run the tests using: `npm test` diff --git a/node_modules/ms/index.js b/node_modules/ms/index.js index 4f92771..824b37e 100644 --- a/node_modules/ms/index.js +++ b/node_modules/ms/index.js @@ -2,11 +2,11 @@ * Helpers. */ -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; +var s = 1000 +var m = s * 60 +var h = m * 60 +var d = h * 24 +var y = d * 365.25 /** * Parse or format the given `val`. @@ -17,17 +17,23 @@ var y = d * 365.25; * * @param {String|Number} val * @param {Object} options + * @throws {Error} throw an error if val is not a non-empty string or a number * @return {String|Number} * @api public */ -module.exports = function(val, options){ - options = options || {}; - if ('string' == typeof val) return parse(val); - return options.long - ? long(val) - : short(val); -}; +module.exports = function (val, options) { + options = options || {} + var type = typeof val + if (type === 'string' && val.length > 0) { + return parse(val) + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? + fmtLong(val) : + fmtShort(val) + } + throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val)) +} /** * Parse the given `str` and return milliseconds. @@ -38,47 +44,53 @@ module.exports = function(val, options){ */ function parse(str) { - str = '' + str; - if (str.length > 10000) return; - var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str); - if (!match) return; - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); + str = String(str) + if (str.length > 10000) { + return + } + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str) + if (!match) { + return + } + var n = parseFloat(match[1]) + var type = (match[2] || 'ms').toLowerCase() switch (type) { case 'years': case 'year': case 'yrs': case 'yr': case 'y': - return n * y; + return n * y case 'days': case 'day': case 'd': - return n * d; + return n * d case 'hours': case 'hour': case 'hrs': case 'hr': case 'h': - return n * h; + return n * h case 'minutes': case 'minute': case 'mins': case 'min': case 'm': - return n * m; + return n * m case 'seconds': case 'second': case 'secs': case 'sec': case 's': - return n * s; + return n * s case 'milliseconds': case 'millisecond': case 'msecs': case 'msec': case 'ms': - return n; + return n + default: + return undefined } } @@ -90,12 +102,20 @@ function parse(str) { * @api private */ -function short(ms) { - if (ms >= d) return Math.round(ms / d) + 'd'; - if (ms >= h) return Math.round(ms / h) + 'h'; - if (ms >= m) return Math.round(ms / m) + 'm'; - if (ms >= s) return Math.round(ms / s) + 's'; - return ms + 'ms'; +function fmtShort(ms) { + if (ms >= d) { + return Math.round(ms / d) + 'd' + } + if (ms >= h) { + return Math.round(ms / h) + 'h' + } + if (ms >= m) { + return Math.round(ms / m) + 'm' + } + if (ms >= s) { + return Math.round(ms / s) + 's' + } + return ms + 'ms' } /** @@ -106,12 +126,12 @@ function short(ms) { * @api private */ -function long(ms) { - return plural(ms, d, 'day') - || plural(ms, h, 'hour') - || plural(ms, m, 'minute') - || plural(ms, s, 'second') - || ms + ' ms'; +function fmtLong(ms) { + return plural(ms, d, 'day') || + plural(ms, h, 'hour') || + plural(ms, m, 'minute') || + plural(ms, s, 'second') || + ms + ' ms' } /** @@ -119,7 +139,11 @@ function long(ms) { */ function plural(ms, n, name) { - if (ms < n) return; - if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; - return Math.ceil(ms / n) + ' ' + name + 's'; + if (ms < n) { + return + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + ' ' + name + } + return Math.ceil(ms / n) + ' ' + name + 's' } diff --git a/node_modules/ms/package.json b/node_modules/ms/package.json index 05a6a11..58060aa 100644 --- a/node_modules/ms/package.json +++ b/node_modules/ms/package.json @@ -1,74 +1,36 @@ { - "_args": [ - [ - "ms@0.7.1", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\debug" - ] + "name": "ms", + "version": "0.7.2", + "description": "Tiny milisecond conversion utility", + "repository": "zeit/ms", + "main": "./index", + "files": [ + "index.js" ], - "_from": "ms@0.7.1", - "_id": "ms@0.7.1", - "_inCache": true, - "_installable": true, - "_location": "/ms", - "_nodeVersion": "0.12.2", - "_npmUser": { - "email": "rauchg@gmail.com", - "name": "rauchg" - }, - "_npmVersion": "2.7.5", - "_phantomChildren": {}, - "_requested": { - "name": "ms", - "raw": "ms@0.7.1", - "rawSpec": "0.7.1", - "scope": null, - "spec": "0.7.1", - "type": "version" + "scripts": { + "test": "xo && mocha test/index.js", + "test-browser": "serve ./test" }, - "_requiredBy": [ - "/debug" - ], - "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", - "_shasum": "9cd13c03adbff25b65effde7ce864ee952017098", - "_shrinkwrap": null, - "_spec": "ms@0.7.1", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\debug", - "bugs": { - "url": "https://github.com/guille/ms.js/issues" + "license": "MIT", + "devDependencies": { + "expect.js": "^0.3.1", + "mocha": "^3.0.2", + "serve": "^1.4.0", + "xo": "^0.17.0" }, "component": { "scripts": { "ms/index.js": "index.js" } }, - "dependencies": {}, - "description": "Tiny ms conversion utility", - "devDependencies": { - "expect.js": "*", - "mocha": "*", - "serve": "*" - }, - "directories": {}, - "dist": { - "shasum": "9cd13c03adbff25b65effde7ce864ee952017098", - "tarball": "http://registry.npmjs.org/ms/-/ms-0.7.1.tgz" - }, - "gitHead": "713dcf26d9e6fd9dbc95affe7eff9783b7f1b909", - "homepage": "https://github.com/guille/ms.js", - "main": "./index", - "maintainers": [ - { - "name": "rauchg", - "email": "rauchg@gmail.com" + "xo": { + "space": true, + "semicolon": false, + "envs": [ + "mocha" + ], + "rules": { + "complexity": 0 } - ], - "name": "ms", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/guille/ms.js.git" - }, - "scripts": {}, - "version": "0.7.1" + } } diff --git a/node_modules/mute-stream/package.json b/node_modules/mute-stream/package.json index c44308a..fe09040 100644 --- a/node_modules/mute-stream/package.json +++ b/node_modules/mute-stream/package.json @@ -1,82 +1,26 @@ { - "_args": [ - [ - "mute-stream@0.0.5", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\readline2" - ] - ], - "_from": "mute-stream@0.0.5", - "_id": "mute-stream@0.0.5", - "_inCache": true, - "_installable": true, - "_location": "/mute-stream", - "_nodeVersion": "2.0.1", - "_npmUser": { - "email": "isaacs@npmjs.com", - "name": "isaacs" - }, - "_npmVersion": "2.10.0", - "_phantomChildren": {}, - "_requested": { - "name": "mute-stream", - "raw": "mute-stream@0.0.5", - "rawSpec": "0.0.5", - "scope": null, - "spec": "0.0.5", - "type": "version" - }, - "_requiredBy": [ - "/readline2" - ], - "_resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", - "_shasum": "8fbfabb0a98a253d3184331f9e8deb7372fac6c0", - "_shrinkwrap": null, - "_spec": "mute-stream@0.0.5", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\readline2", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/mute-stream/issues" + "name": "mute-stream", + "version": "0.0.5", + "main": "mute.js", + "directories": { + "test": "test" }, - "dependencies": {}, - "description": "Bytes go in, but they don't come out (when muted).", "devDependencies": { "tap": "~0.2.5" }, - "directories": { - "test": "test" + "scripts": { + "test": "tap test/*.js" }, - "dist": { - "shasum": "8fbfabb0a98a253d3184331f9e8deb7372fac6c0", - "tarball": "http://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz" + "repository": { + "type": "git", + "url": "git://github.com/isaacs/mute-stream" }, - "gitHead": "17d9854a315f56088d039534f87b740e470a9af0", - "homepage": "https://github.com/isaacs/mute-stream#readme", "keywords": [ "mute", - "pipe", - "stream" + "stream", + "pipe" ], + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", "license": "ISC", - "main": "mute.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "mute-stream", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/mute-stream.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "0.0.5" + "description": "Bytes go in, but they don't come out (when muted)." } diff --git a/node_modules/number-is-nan/package.json b/node_modules/number-is-nan/package.json index c242b70..d2f51d4 100644 --- a/node_modules/number-is-nan/package.json +++ b/node_modules/number-is-nan/package.json @@ -1,94 +1,35 @@ { - "_args": [ - [ - "number-is-nan@^1.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\code-point-at" - ] - ], - "_from": "number-is-nan@>=1.0.0 <2.0.0", - "_id": "number-is-nan@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/number-is-nan", - "_nodeVersion": "0.12.3", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.10.0", - "_phantomChildren": {}, - "_requested": { - "name": "number-is-nan", - "raw": "number-is-nan@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/code-point-at", - "/is-fullwidth-code-point" - ], - "_resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz", - "_shasum": "c020f529c5282adfdd233d91d4b181c3d686dc4b", - "_shrinkwrap": null, - "_spec": "number-is-nan@^1.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\code-point-at", + "name": "number-is-nan", + "version": "1.0.1", + "description": "ES2015 Number.isNaN() ponyfill", + "license": "MIT", + "repository": "sindresorhus/number-is-nan", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/number-is-nan/issues" - }, - "dependencies": {}, - "description": "ES6 Number.isNaN() ponyfill", - "devDependencies": { - "ava": "0.0.4" - }, - "directories": {}, - "dist": { - "shasum": "c020f529c5282adfdd233d91d4b181c3d686dc4b", - "tarball": "http://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "ava" + }, "files": [ "index.js" ], - "gitHead": "0f394b1bc33185c40304363b209e3f0588dbeeb3", - "homepage": "https://github.com/sindresorhus/number-is-nan#readme", "keywords": [ - "ecmascript", "es2015", - "es6", - "harmony", + "ecmascript", + "ponyfill", + "polyfill", + "shim", + "number", "is", "nan", - "not", - "number", - "polyfill", - "ponyfill", - "shim" + "not" ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "number-is-nan", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/number-is-nan.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.0" + "devDependencies": { + "ava": "*" + } } diff --git a/node_modules/number-is-nan/readme.md b/node_modules/number-is-nan/readme.md index 93d851a..2463508 100644 --- a/node_modules/number-is-nan/readme.md +++ b/node_modules/number-is-nan/readme.md @@ -1,8 +1,6 @@ # number-is-nan [![Build Status](https://travis-ci.org/sindresorhus/number-is-nan.svg?branch=master)](https://travis-ci.org/sindresorhus/number-is-nan) -> ES6 [`Number.isNaN()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) ponyfill - -> Ponyfill: A polyfill that doesn't overwrite the native method +> ES2015 [`Number.isNaN()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) [ponyfill](https://ponyfill.com) ## Install diff --git a/node_modules/object-assign/package.json b/node_modules/object-assign/package.json index 9423c23..a25d428 100644 --- a/node_modules/object-assign/package.json +++ b/node_modules/object-assign/package.json @@ -1,109 +1,42 @@ { - "_args": [ - [ - "object-assign@^4.0.1", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\esrecurse" - ] - ], - "_from": "object-assign@>=4.0.1 <5.0.0", - "_id": "object-assign@4.1.0", - "_inCache": true, - "_installable": true, - "_location": "/object-assign", - "_nodeVersion": "4.1.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/object-assign-4.1.0.tgz_1462212593641_0.3332549517508596" - }, - "_npmUser": { - "email": "ben@benalpert.com", - "name": "spicyj" - }, - "_npmVersion": "2.14.19", - "_phantomChildren": {}, - "_requested": { - "name": "object-assign", - "raw": "object-assign@^4.0.1", - "rawSpec": "^4.0.1", - "scope": null, - "spec": ">=4.0.1 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/del", - "/esrecurse", - "/file-entry-cache", - "/globby" - ], - "_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", - "_shasum": "7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0", - "_shrinkwrap": null, - "_spec": "object-assign@^4.0.1", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\esrecurse", + "name": "object-assign", + "version": "4.1.0", + "description": "ES2015 Object.assign() ponyfill", + "license": "MIT", + "repository": "sindresorhus/object-assign", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/object-assign/issues" - }, - "dependencies": {}, - "description": "ES2015 Object.assign() ponyfill", - "devDependencies": { - "lodash": "^4.8.2", - "matcha": "^0.7.0", - "mocha": "*", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0", - "tarball": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "xo && mocha", + "bench": "matcha bench.js" + }, "files": [ "index.js" ], - "gitHead": "72fe21c86911758f3342fdf41c2a57860d5829bc", - "homepage": "https://github.com/sindresorhus/object-assign#readme", "keywords": [ + "object", "assign", - "browser", - "ecmascript", - "es2015", "extend", + "properties", + "es2015", + "ecmascript", "harmony", - "object", - "polyfill", "ponyfill", "prollyfill", - "properties", - "shim" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "spicyj", - "email": "ben@benalpert.com" - } + "polyfill", + "shim", + "browser" ], - "name": "object-assign", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/object-assign.git" - }, - "scripts": { - "bench": "matcha bench.js", - "test": "xo && mocha" - }, - "version": "4.1.0" + "devDependencies": { + "lodash": "^4.8.2", + "matcha": "^0.7.0", + "mocha": "*", + "xo": "*" + } } diff --git a/node_modules/once/README.md b/node_modules/once/README.md index a2981ea..1f1ffca 100644 --- a/node_modules/once/README.md +++ b/node_modules/once/README.md @@ -49,3 +49,31 @@ function load (cb) { }) } ``` + +## `once.strict(func)` + +Throw an error if the function is called twice. + +Some functions are expected to be called only once. Using `once` for them would +potentially hide logical errors. + +In the example below, the `greet` function has to call the callback only once: + +```javascript +function greet (name, cb) { + // return is missing from the if statement + // when no name is passed, the callback is called twice + if (!name) cb('Hello anonymous') + cb('Hello ' + name) +} + +function log (msg) { + console.log(msg) +} + +// this will print 'Hello anonymous' but the logical error will be missed +greet(null, once(msg)) + +// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time +greet(null, once.strict(msg)) +``` diff --git a/node_modules/once/once.js b/node_modules/once/once.js index 2e1e721..2354067 100644 --- a/node_modules/once/once.js +++ b/node_modules/once/once.js @@ -1,5 +1,6 @@ var wrappy = require('wrappy') module.exports = wrappy(once) +module.exports.strict = wrappy(onceStrict) once.proto = once(function () { Object.defineProperty(Function.prototype, 'once', { @@ -8,6 +9,13 @@ once.proto = once(function () { }, configurable: true }) + + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }) }) function once (fn) { @@ -19,3 +27,16 @@ function once (fn) { f.called = false return f } + +function onceStrict (fn) { + var f = function () { + if (f.called) + throw new Error(f.onceError) + f.called = true + return f.value = fn.apply(this, arguments) + } + var name = fn.name || 'Function wrapped with `once`' + f.onceError = name + " shouldn't be called more than once" + f.called = false + return f +} diff --git a/node_modules/once/package.json b/node_modules/once/package.json index 0803bf7..16815b2 100644 --- a/node_modules/once/package.json +++ b/node_modules/once/package.json @@ -1,91 +1,33 @@ { - "_args": [ - [ - "once@^1.3.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\glob" - ] - ], - "_from": "once@>=1.3.0 <2.0.0", - "_id": "once@1.3.3", - "_inCache": true, - "_installable": true, - "_location": "/once", - "_nodeVersion": "4.0.0", - "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" - }, - "_npmVersion": "3.3.2", - "_phantomChildren": {}, - "_requested": { - "name": "once", - "raw": "once@^1.3.0", - "rawSpec": "^1.3.0", - "scope": null, - "spec": ">=1.3.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint/glob", - "/glob", - "/inflight", - "/run-async" - ], - "_resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", - "_shasum": "b2e261557ce4c314ec8304f3fa82663e4297ca20", - "_shrinkwrap": null, - "_spec": "once@^1.3.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\glob", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/once/issues" + "name": "once", + "version": "1.4.0", + "description": "Run a function exactly one time", + "main": "once.js", + "directories": { + "test": "test" }, "dependencies": { "wrappy": "1" }, - "description": "Run a function exactly one time", "devDependencies": { - "tap": "^1.2.0" + "tap": "^7.0.1" }, - "directories": { - "test": "test" - }, - "dist": { - "shasum": "b2e261557ce4c314ec8304f3fa82663e4297ca20", - "tarball": "http://registry.npmjs.org/once/-/once-1.3.3.tgz" + "scripts": { + "test": "tap test/*.js" }, "files": [ "once.js" ], - "gitHead": "2ad558657e17fafd24803217ba854762842e4178", - "homepage": "https://github.com/isaacs/once#readme", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/once" + }, "keywords": [ - "function", "once", + "function", "one", "single" ], - "license": "ISC", - "main": "once.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "once", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/once.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "1.3.3" + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC" } diff --git a/node_modules/onetime/package.json b/node_modules/onetime/package.json index 3d6f878..ccaebd7 100644 --- a/node_modules/onetime/package.json +++ b/node_modules/onetime/package.json @@ -1,89 +1,33 @@ { - "_args": [ - [ - "onetime@^1.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\restore-cursor" - ] - ], - "_from": "onetime@>=1.0.0 <2.0.0", - "_id": "onetime@1.1.0", - "_inCache": true, - "_installable": true, - "_location": "/onetime", - "_nodeVersion": "4.2.1", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.14.7", - "_phantomChildren": {}, - "_requested": { - "name": "onetime", - "raw": "onetime@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/restore-cursor" - ], - "_resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "_shasum": "a1f7838f8314c516f05ecefcbc4ccfe04b4ed789", - "_shrinkwrap": null, - "_spec": "onetime@^1.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\restore-cursor", + "name": "onetime", + "version": "1.1.0", + "description": "Only call a function once", + "license": "MIT", + "repository": "sindresorhus/onetime", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/onetime/issues" - }, - "dependencies": {}, - "description": "Only call a function once", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "a1f7838f8314c516f05ecefcbc4ccfe04b4ed789", - "tarball": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "xo && ava" + }, "files": [ "index.js" ], - "gitHead": "6fae2fb77b95b49719d1c270d8ba07d9515bdfe8", - "homepage": "https://github.com/sindresorhus/onetime", "keywords": [ - "call", - "function", "once", "one", - "prevent", - "single" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } + "single", + "call", + "function", + "prevent" ], - "name": "onetime", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/onetime.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.1.0" + "devDependencies": { + "ava": "*", + "xo": "*" + } } diff --git a/node_modules/optionator/CHANGELOG.md b/node_modules/optionator/CHANGELOG.md index 050df2a..c0e0cf2 100644 --- a/node_modules/optionator/CHANGELOG.md +++ b/node_modules/optionator/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.8.2 +- fix bug #18 - detect missing value when flag is last item +- update dependencies + # 0.8.1 - update `fast-levenshtein` dependency diff --git a/node_modules/optionator/README.md b/node_modules/optionator/README.md index 8138fd0..91c59d3 100644 --- a/node_modules/optionator/README.md +++ b/node_modules/optionator/README.md @@ -23,7 +23,7 @@ Other helpful features include reformatting the help text based on the size of t ## About Optionator uses [type-check](https://github.com/gkz/type-check) and [levn](https://github.com/gkz/levn) behind the scenes to cast and verify input according the specified types. -MIT license. Version 0.8.1 +MIT license. Version 0.8.2 npm install optionator diff --git a/node_modules/optionator/lib/coerce.js b/node_modules/optionator/lib/coerce.js deleted file mode 100644 index 6fb60aa..0000000 --- a/node_modules/optionator/lib/coerce.js +++ /dev/null @@ -1,367 +0,0 @@ -// Generated by LiveScript 1.2.0 -(function(){ - var ref$, id, reject, parsedTypeCheck, types, tokenRegex, toString$ = {}.toString; - ref$ = require('prelude-ls'), id = ref$.id, reject = ref$.reject; - parsedTypeCheck = require('type-check').parsedTypeCheck; - types = { - '*': function(it){ - switch (toString$.call(it).slice(8, -1)) { - case 'Array': - return coerceType(it, { - type: 'Array' - }); - case 'Object': - return coerceType(it, { - type: 'Object' - }); - default: - return { - type: 'Just', - value: coerceTypes(it, [ - { - type: 'Undefined' - }, { - type: 'Null' - }, { - type: 'Boolean' - }, { - type: 'Number' - }, { - type: 'Date' - }, { - type: 'RegExp' - }, { - type: 'Array' - }, { - type: 'Object' - }, { - type: 'String' - } - ], { - explicit: true - }) - }; - } - }, - Undefined: function(it){ - if (it === 'undefined') { - return { - type: 'Just', - value: void 8 - }; - } else { - return { - type: 'Nothing' - }; - } - }, - Null: function(it){ - if (it === 'null') { - return { - type: 'Just', - value: null - }; - } else { - return { - type: 'Nothing' - }; - } - }, - Boolean: function(it){ - if (it === 'true') { - return { - type: 'Just', - value: true - }; - } else if (it === 'false') { - return { - type: 'Just', - value: false - }; - } else { - return { - type: 'Nothing' - }; - } - }, - Number: function(it){ - return { - type: 'Just', - value: +it - }; - }, - Int: function(it){ - return { - type: 'Just', - value: parseInt(it) - }; - }, - Float: function(it){ - return { - type: 'Just', - value: parseFloat(it) - }; - }, - Date: function(value, options){ - var that; - if (that = /^\#(.*)\#$/.exec(value)) { - return { - type: 'Just', - value: new Date(+that[1] || that[1]) - }; - } else if (options.explicit) { - return { - type: 'Nothing' - }; - } else { - return { - type: 'Just', - value: new Date(+value || value) - }; - } - }, - RegExp: function(value, options){ - var that; - if (that = /^\/(.*)\/([gimy]*)$/.exec(value)) { - return { - type: 'Just', - value: new RegExp(that[1], that[2]) - }; - } else if (options.explicit) { - return { - type: 'Nothing' - }; - } else { - return { - type: 'Just', - value: new RegExp(value) - }; - } - }, - Array: function(it){ - return coerceArray(it, { - of: [{ - type: '*' - }] - }); - }, - Object: function(it){ - return coerceFields(it, { - of: {} - }); - }, - String: function(it){ - var that; - if (that = it.match(/^'(.*)'$/)) { - return { - type: 'Just', - value: that[1] - }; - } else if (that = it.match(/^"(.*)"$/)) { - return { - type: 'Just', - value: that[1] - }; - } else { - return { - type: 'Just', - value: it - }; - } - } - }; - function coerceArray(node, type){ - var typeOf, element; - if (toString$.call(node).slice(8, -1) !== 'Array') { - return { - type: 'Nothing' - }; - } - typeOf = type.of; - return { - type: 'Just', - value: (function(){ - var i$, ref$, len$, results$ = []; - for (i$ = 0, len$ = (ref$ = node).length; i$ < len$; ++i$) { - element = ref$[i$]; - results$.push(coerceTypes(element, typeOf)); - } - return results$; - }()) - }; - } - function coerceTuple(node, type){ - var i, types; - if (toString$.call(node).slice(8, -1) !== 'Array') { - return { - type: 'Nothing' - }; - } - return { - type: 'Just', - value: (function(){ - var i$, ref$, len$, results$ = []; - for (i$ = 0, len$ = (ref$ = type.of).length; i$ < len$; ++i$) { - i = i$; - types = ref$[i$]; - results$.push(coerceTypes(node[i], types)); - } - return results$; - }()) - }; - } - function coerceFields(node, type){ - var typeOf, key, value; - if (toString$.call(node).slice(8, -1) !== 'Object') { - return { - type: 'Nothing' - }; - } - typeOf = type.of; - return { - type: 'Just', - value: (function(){ - var ref$, results$ = {}; - for (key in ref$ = node) { - value = ref$[key]; - results$[key] = coerceTypes(value, typeOf[key] || [{ - type: '*' - }]); - } - return results$; - }()) - }; - } - function coerceType(node, typeObj, options){ - var type, structure, coerceFunc; - type = typeObj.type, structure = typeObj.structure; - if (type) { - coerceFunc = types[type]; - return coerceFunc(node, options); - } else { - switch (structure) { - case 'array': - return coerceArray(node, typeObj); - case 'tuple': - return coerceTuple(node, typeObj); - case 'fields': - return coerceFields(node, typeObj); - } - } - } - function coerceTypes(node, types, options){ - var i$, len$, type, ref$, valueType, value; - options == null && (options = {}); - for (i$ = 0, len$ = types.length; i$ < len$; ++i$) { - type = types[i$]; - ref$ = coerceType(node, type, options), valueType = ref$.type, value = ref$.value; - if (valueType === 'Nothing') { - continue; - } - if (parsedTypeCheck([type], value)) { - return value; - } - } - throw new Error("Value '" + node + "' does not type check against " + JSON.stringify(types) + "."); - } - function consumeOp(tokens, op){ - if (tokens[0] === op) { - return tokens.shift(); - } else { - throw new Error("Expected '" + op + "', but got " + tokens[0] + " instead."); - } - } - function maybeConsumeOp(tokens, op){ - if (tokens[0] === op) { - return tokens.shift(); - } - } - function consumeList(tokens, delimiters, hasDelimiters){ - var result; - if (hasDelimiters) { - consumeOp(tokens, delimiters[0]); - } - result = []; - while (tokens.length && tokens[0] !== delimiters[1]) { - result.push(consumeElement(tokens)); - maybeConsumeOp(tokens, ','); - } - if (hasDelimiters) { - consumeOp(tokens, delimiters[1]); - } - return result; - } - function consumeArray(tokens, hasDelimiters){ - return consumeList(tokens, ['[', ']'], hasDelimiters); - } - function consumeTuple(tokens, hasDelimiters){ - return consumeList(tokens, ['(', ')'], hasDelimiters); - } - function consumeFields(tokens, hasDelimiters){ - var result, key; - if (hasDelimiters) { - consumeOp(tokens, '{'); - } - result = {}; - while (tokens.length && (!hasDelimiters || tokens[0] !== '}')) { - key = tokens.shift(); - consumeOp(tokens, ':'); - result[key] = consumeElement(tokens); - maybeConsumeOp(tokens, ','); - } - if (hasDelimiters) { - consumeOp(tokens, '}'); - } - return result; - } - function consumeElement(tokens){ - switch (tokens[0]) { - case '[': - return consumeArray(tokens, true); - case '(': - return consumeTuple(tokens, true); - case '{': - return consumeFields(tokens, true); - default: - return tokens.shift(); - } - } - function consumeTopLevel(tokens, types){ - var structure, origTokens, result; - structure = types[0].structure; - if (types.length === 1 && structure) { - origTokens = tokens.slice(); - result = structure === 'array' - ? consumeArray(tokens, tokens[0] === '[') - : structure === 'tuple' - ? consumeTuple(tokens, tokens[0] === '(') - : consumeFields(tokens, tokens[0] === '{'); - if (tokens.length) { - return consumeElement(structure === 'array' - ? ['['].concat(origTokens, [']']) - : ['('].concat(origTokens, [')'])); - } else { - return result; - } - } else { - return consumeElement(tokens); - } - } - tokenRegex = /("(?:[^"]|\\")*")|('(?:[^']|\\')*')|(#.*#)|(\/(?:\\\/|[^\/])*\/[gimy]*)|([\[\]\(\)}{:,])|([-\.\$\w]+)|\s*/; - function coerce(types, string){ - var tokens, node; - tokens = reject(function(it){ - return !it || /^\s+$/.test(it); - }, string.split(tokenRegex)); - node = consumeTopLevel(tokens, types); - if (!node) { - throw new Error("Error parsing " + string); - } - return coerceTypes(node, types); - } - module.exports = coerce; - /* - function log - console.log it; it - */ -}).call(this); diff --git a/node_modules/optionator/lib/help.js b/node_modules/optionator/lib/help.js index c61fff7..a459c02 100644 --- a/node_modules/optionator/lib/help.js +++ b/node_modules/optionator/lib/help.js @@ -1,4 +1,4 @@ -// Generated by LiveScript 1.4.0 +// Generated by LiveScript 1.5.0 (function(){ var ref$, id, find, sort, min, max, map, unlines, nameToRaw, dasherize, naturalJoin, wordwrap, getPreText, setHelpStyleDefaults, generateHelpForOption, generateHelp; ref$ = require('prelude-ls'), id = ref$.id, find = ref$.find, sort = ref$.sort, min = ref$.min, max = ref$.max, map = ref$.map, unlines = ref$.unlines; diff --git a/node_modules/optionator/lib/index.js b/node_modules/optionator/lib/index.js index 29e05cb..d947286 100644 --- a/node_modules/optionator/lib/index.js +++ b/node_modules/optionator/lib/index.js @@ -1,7 +1,7 @@ -// Generated by LiveScript 1.4.0 +// Generated by LiveScript 1.5.0 (function(){ var VERSION, ref$, id, map, compact, any, groupBy, partition, chars, isItNaN, keys, Obj, camelize, deepIs, closestString, nameToRaw, dasherize, naturalJoin, generateHelp, generateHelpForOption, parsedTypeCheck, parseType, parseLevn, camelizeKeys, parseString, main, toString$ = {}.toString, slice$ = [].slice; - VERSION = '0.8.1'; + VERSION = '0.8.2'; ref$ = require('prelude-ls'), id = ref$.id, map = ref$.map, compact = ref$.compact, any = ref$.any, groupBy = ref$.groupBy, partition = ref$.partition, chars = ref$.chars, isItNaN = ref$.isItNaN, keys = ref$.keys, Obj = ref$.Obj, camelize = ref$.camelize; deepIs = require('deep-is'); ref$ = require('./util'), closestString = ref$.closestString, nameToRaw = ref$.nameToRaw, dasherize = ref$.dasherize, naturalJoin = ref$.naturalJoin; @@ -17,7 +17,7 @@ return resultObj$; }; parseString = function(string){ - var assignOpt, regex, replaceRegex, result; + var assignOpt, regex, replaceRegex, result, this$ = this; assignOpt = '--?[a-zA-Z][-a-z-A-Z0-9]*='; regex = RegExp('(?:' + assignOpt + ')?(?:\'(?:\\\\\'|[^\'])+\'|"(?:\\\\"|[^"])+")|[^\'"\\s]+', 'g'); replaceRegex = RegExp('^(' + assignOpt + ')?[\'"]([\\s\\S]*)[\'"]$'); @@ -44,7 +44,7 @@ libOptions.defaults.mergeRepeatedObjects = libOptions.mergeRepeatedObjects; } traverse = function(options){ - var i$, len$, option, name, k, ref$, v, type, that, e, parsedPossibilities, parsedType, j$, len1$, possibility, rawDependsType, dependsOpts, dependsType, cra, alias, shortNames, longNames; + var i$, len$, option, name, k, ref$, v, type, that, e, parsedPossibilities, parsedType, j$, len1$, possibility, rawDependsType, dependsOpts, dependsType, cra, alias, shortNames, longNames, this$ = this; if (toString$.call(options).slice(8, -1) !== 'Array') { throw new Error('No options defined.'); } @@ -171,7 +171,7 @@ return opt; }; parse = function(input, arg$){ - var slice, obj, positional, restPositional, overrideRequired, prop, setValue, setDefaults, checkRequired, mutuallyExclusiveError, checkMutuallyExclusive, checkDependency, checkDependencies, args, key, value, option, ref$, i$, len$, arg, that, result, short, argName, usingAssign, val, flags, len, j$, len1$, i, flag, opt, name, valPrime, negated, noedName; + var slice, obj, positional, restPositional, overrideRequired, prop, setValue, setDefaults, checkRequired, mutuallyExclusiveError, checkMutuallyExclusive, checkDependency, checkDependencies, checkProp, args, key, value, option, ref$, i$, len$, arg, that, result, short, argName, usingAssign, val, flags, len, j$, len1$, i, flag, opt, name, valPrime, negated, noedName; slice = (arg$ != null ? arg$ : {}).slice; @@ -311,6 +311,11 @@ checkDependency(opts[name]); } }; + checkProp = function(){ + if (prop) { + throw new Error("Value for '" + prop + "' of type '" + getOption(prop).type + "' required."); + } + }; switch (toString$.call(input).slice(8, -1)) { case 'String': args = parseString(input.slice(slice != null ? slice : 0)); @@ -348,9 +353,7 @@ } else { if (that = arg.match(/^(--?)([a-zA-Z][-a-zA-Z0-9]*)(=)?(.*)?$/)) { result = that; - if (prop) { - throw new Error("Value for '" + prop + "' of type '" + getOption(prop).type + "' required."); - } + checkProp(); short = result[1].length === 1; argName = result[2]; usingAssign = result[3] != null; @@ -434,6 +437,7 @@ } } } + checkProp(); checkMutuallyExclusive(); checkDependencies(); setDefaults(); diff --git a/node_modules/optionator/lib/parse-type.js b/node_modules/optionator/lib/parse-type.js deleted file mode 100644 index e648723..0000000 --- a/node_modules/optionator/lib/parse-type.js +++ /dev/null @@ -1,143 +0,0 @@ -// Generated by LiveScript 1.2.0 -(function(){ - var reject, tokenRegex; - reject = require('prelude-ls').reject; - function consumeWord(tokens){ - var token; - token = tokens[0]; - if (!(token != null && /^[a-zA-Z]+$/.test(token))) { - throw new Error("Exected textual string."); - } - return tokens.shift(); - } - function consumeOp(tokens, op){ - var token; - token = tokens[0]; - if (token !== op) { - throw new Error("Expected " + op); - } - return tokens.shift(); - } - function maybeConsumeOp(tokens, op){ - var token; - token = tokens[0]; - if (token === op) { - return tokens.shift(); - } else { - return null; - } - } - function consumeArray(tokens){ - var contentType; - consumeOp(tokens, '['); - contentType = consumeTypes(tokens); - if (!contentType) { - throw new Error("Must specify content type for Array."); - } - consumeOp(tokens, ']'); - return { - type: 'Array', - contentType: contentType - }; - } - function consumeTuple(tokens){ - var contentTypes, that; - contentTypes = []; - consumeOp(tokens, '('); - while (that = consumeTypes(tokens)) { - contentTypes.push(that); - if (!maybeConsumeOp(tokens, ',')) { - break; - } - } - consumeOp(tokens, ')'); - return { - type: 'Tuple', - contentTypes: contentTypes - }; - } - function consumeProperty(tokens){ - var key, type; - key = consumeWord(tokens); - consumeOp(tokens, ':'); - type = consumeTypes(tokens); - return { - key: key, - type: type - }; - } - function consumeObject(tokens){ - var properties, that; - properties = []; - consumeOp(tokens, '{'); - while (that = consumeProperty(tokens)) { - properties.push(that); - if (!maybeConsumeOp(tokens, ',')) { - break; - } - } - consumeOp(tokens, '}'); - return { - type: 'Object', - properties: properties - }; - } - function consumeType(tokens){ - switch (tokens[0]) { - case '[': - return consumeArray(tokens); - case '{': - return consumeObject(tokens); - case '(': - return consumeTuple(tokens); - default: - return { - type: consumeWord(tokens) - }; - } - } - function consumeMaybe(tokens){ - var maybe, type; - if (tokens[0] === 'Maybe') { - tokens.shift(); - maybe = true; - } - type = consumeType(tokens); - if (maybe) { - return { - type: 'Maybe', - contentType: type - }; - } else { - return type; - } - } - function consumeTypes(tokens){ - var types; - types = []; - for (;;) { - types.push(consumeMaybe(tokens)); - if (!maybeConsumeOp('|')) { - break; - } - } - if (!types.length) { - throw new Error("Expected type(s)."); - } - return types; - } - tokenRegex = /[:,\[\]\(\)}{]|[a-zA-Z]+/g; - module.exports = function(input){ - var tokens, e; - tokens = reject(function(it){ - return /^\s*$/.test(it); - })( - input.match(tokenRegex)); - try { - return consumeTypes(tokens); - } catch (e$) { - e = e$; - throw new Error(e.message + " - '" + tokens.join('#') + "' - '" + input + "'"); - } - }; -}).call(this); diff --git a/node_modules/optionator/lib/util.js b/node_modules/optionator/lib/util.js index 9c67435..d5c972d 100644 --- a/node_modules/optionator/lib/util.js +++ b/node_modules/optionator/lib/util.js @@ -1,10 +1,10 @@ -// Generated by LiveScript 1.4.0 +// Generated by LiveScript 1.5.0 (function(){ var prelude, map, sortBy, fl, closestString, nameToRaw, dasherize, naturalJoin; prelude = require('prelude-ls'), map = prelude.map, sortBy = prelude.sortBy; fl = require('fast-levenshtein'); closestString = function(possibilities, input){ - var distances, ref$, string, distance; + var distances, ref$, string, distance, this$ = this; if (!possibilities.length) { return; } diff --git a/node_modules/optionator/package.json b/node_modules/optionator/package.json index 2182604..5a44924 100644 --- a/node_modules/optionator/package.json +++ b/node_modules/optionator/package.json @@ -1,91 +1,26 @@ { - "_args": [ - [ - "optionator@^0.8.1", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "optionator@>=0.8.1 <0.9.0", - "_id": "optionator@0.8.1", - "_inCache": true, - "_installable": true, - "_location": "/optionator", - "_nodeVersion": "5.3.0", - "_npmUser": { - "email": "z@georgezahariev.com", - "name": "gkz" - }, - "_npmVersion": "3.5.3", - "_phantomChildren": {}, - "_requested": { - "name": "optionator", - "raw": "optionator@^0.8.1", - "rawSpec": "^0.8.1", - "scope": null, - "spec": ">=0.8.1 <0.9.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.1.tgz", - "_shasum": "e31b4932cdd5fb862a8b0d10bc63d3ee1ec7d78b", - "_shrinkwrap": null, - "_spec": "optionator@^0.8.1", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint", - "author": { - "email": "z@georgezahariev.com", - "name": "George Zahariev" - }, - "bugs": { - "url": "https://github.com/gkz/optionator/issues" - }, - "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "^1.1.0", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - }, + "name": "optionator", + "version": "0.8.2", + "author": "George Zahariev ", "description": "option parsing and help generation", - "devDependencies": { - "istanbul": "~0.4.1", - "livescript": "~1.4.0", - "mocha": "~2.3.4" - }, - "directories": {}, - "dist": { - "shasum": "e31b4932cdd5fb862a8b0d10bc63d3ee1ec7d78b", - "tarball": "http://registry.npmjs.org/optionator/-/optionator-0.8.1.tgz" - }, - "engines": { - "node": ">= 0.8.0" - }, - "files": [ - "LICENSE", - "README.md", - "lib" - ], - "gitHead": "88e905d2546df814bc20ff88af93eec8c47c216c", "homepage": "https://github.com/gkz/optionator", "keywords": [ - "cli", + "options", "flags", "option parsing", - "options" + "cli" ], - "license": "MIT", - "main": "./lib/", - "maintainers": [ - { - "name": "gkz", - "email": "z@georgezahariev.com" - } + "files": [ + "lib", + "README.md", + "LICENSE" ], - "name": "optionator", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", + "main": "./lib/", + "bugs": "https://github.com/gkz/optionator/issues", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + }, "repository": { "type": "git", "url": "git://github.com/gkz/optionator.git" @@ -93,5 +28,17 @@ "scripts": { "test": "make test" }, - "version": "0.8.1" + "dependencies": { + "prelude-ls": "~1.1.2", + "deep-is": "~0.1.3", + "wordwrap": "~1.0.0", + "type-check": "~0.3.2", + "levn": "~0.3.0", + "fast-levenshtein": "~2.0.4" + }, + "devDependencies": { + "livescript": "~1.5.0", + "mocha": "~3.0.2", + "istanbul": "~0.4.1" + } } diff --git a/node_modules/os-homedir/package.json b/node_modules/os-homedir/package.json index 18ad9dd..525b225 100644 --- a/node_modules/os-homedir/package.json +++ b/node_modules/os-homedir/package.json @@ -1,96 +1,41 @@ { - "_args": [ - [ - "os-homedir@^1.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\user-home" - ] - ], - "_from": "os-homedir@>=1.0.0 <2.0.0", - "_id": "os-homedir@1.0.1", - "_inCache": true, - "_installable": true, - "_location": "/os-homedir", - "_nodeVersion": "0.12.5", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.11.2", - "_phantomChildren": {}, - "_requested": { - "name": "os-homedir", - "raw": "os-homedir@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/user-home" - ], - "_resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.1.tgz", - "_shasum": "0d62bdf44b916fd3bbdcf2cab191948fb094f007", - "_shrinkwrap": null, - "_spec": "os-homedir@^1.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\user-home", + "name": "os-homedir", + "version": "1.0.2", + "description": "Node.js 4 `os.homedir()` ponyfill", + "license": "MIT", + "repository": "sindresorhus/os-homedir", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/os-homedir/issues" - }, - "dependencies": {}, - "description": "io.js 2.3.0 os.homedir() ponyfill", - "devDependencies": { - "ava": "0.0.4", - "path-exists": "^1.0.0" - }, - "directories": {}, - "dist": { - "shasum": "0d62bdf44b916fd3bbdcf2cab191948fb094f007", - "tarball": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.1.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "xo && ava" + }, "files": [ "index.js" ], - "gitHead": "13ff83fbd13ebe286a6092286b2c634ab4534c5f", - "homepage": "https://github.com/sindresorhus/os-homedir", "keywords": [ - "built-in", + "builtin", "core", + "ponyfill", + "polyfill", + "shim", + "os", + "homedir", + "home", "dir", "directory", "folder", - "home", - "homedir", - "os", - "path", - "polyfill", - "ponyfill", - "shim", - "user" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } + "user", + "path" ], - "name": "os-homedir", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/os-homedir.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.1" + "devDependencies": { + "ava": "*", + "path-exists": "^2.0.0", + "xo": "^0.16.0" + } } diff --git a/node_modules/os-homedir/readme.md b/node_modules/os-homedir/readme.md index 4851f10..856ae61 100644 --- a/node_modules/os-homedir/readme.md +++ b/node_modules/os-homedir/readme.md @@ -1,8 +1,6 @@ # os-homedir [![Build Status](https://travis-ci.org/sindresorhus/os-homedir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-homedir) -> io.js 2.3.0 [`os.homedir()`](https://iojs.org/api/os.html#os_os_homedir) ponyfill - -> Ponyfill: A polyfill that doesn't overwrite the native method +> Node.js 4 [`os.homedir()`](https://nodejs.org/api/os.html#os_os_homedir) [ponyfill](https://ponyfill.com) ## Install @@ -15,10 +13,10 @@ $ npm install --save os-homedir ## Usage ```js -var osHomedir = require('os-homedir'); +const osHomedir = require('os-homedir'); console.log(osHomedir()); -//=> /Users/sindresorhus +//=> '/Users/sindresorhus' ``` @@ -30,4 +28,4 @@ console.log(osHomedir()); ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/path-is-absolute/index.js b/node_modules/path-is-absolute/index.js index 19f103f..22aa6c3 100644 --- a/node_modules/path-is-absolute/index.js +++ b/node_modules/path-is-absolute/index.js @@ -2,18 +2,18 @@ function posix(path) { return path.charAt(0) === '/'; -}; +} function win32(path) { - // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; var result = splitDeviceRe.exec(path); var device = result[1] || ''; - var isUnc = !!device && device.charAt(1) !== ':'; + var isUnc = Boolean(device && device.charAt(1) !== ':'); // UNC paths are always absolute - return !!result[2] || isUnc; -}; + return Boolean(result[2] || isUnc); +} module.exports = process.platform === 'win32' ? win32 : posix; module.exports.posix = posix; diff --git a/node_modules/path-is-absolute/package.json b/node_modules/path-is-absolute/package.json index f82c42c..91196d5 100644 --- a/node_modules/path-is-absolute/package.json +++ b/node_modules/path-is-absolute/package.json @@ -1,100 +1,43 @@ { - "_args": [ - [ - "path-is-absolute@^1.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "path-is-absolute@>=1.0.0 <2.0.0", - "_id": "path-is-absolute@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/path-is-absolute", - "_nodeVersion": "0.12.0", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.5.1", - "_phantomChildren": {}, - "_requested": { - "name": "path-is-absolute", - "raw": "path-is-absolute@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint", - "/eslint/glob", - "/fs-extra", - "/glob" - ], - "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", - "_shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", - "_shrinkwrap": null, - "_spec": "path-is-absolute@^1.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint", + "name": "path-is-absolute", + "version": "1.0.1", + "description": "Node.js 0.12 path.isAbsolute() ponyfill", + "license": "MIT", + "repository": "sindresorhus/path-is-absolute", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/path-is-absolute/issues" - }, - "dependencies": {}, - "description": "Node.js 0.12 path.isAbsolute() ponyfill", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", - "tarball": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "xo && node test.js" + }, "files": [ "index.js" ], - "gitHead": "7a76a0c9f2263192beedbe0a820e4d0baee5b7a1", - "homepage": "https://github.com/sindresorhus/path-is-absolute", "keywords": [ + "path", + "paths", + "file", + "dir", "absolute", + "isabsolute", + "is-absolute", "built-in", - "check", + "util", + "utils", "core", - "detect", - "dir", - "file", - "is", - "is-absolute", - "isabsolute", - "path", - "paths", - "polyfill", "ponyfill", + "polyfill", "shim", - "util", - "utils" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } + "is", + "detect", + "check" ], - "name": "path-is-absolute", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/path-is-absolute.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.0" + "devDependencies": { + "xo": "^0.16.0" + } } diff --git a/node_modules/path-is-absolute/readme.md b/node_modules/path-is-absolute/readme.md index cdf94f4..8dbdf5f 100644 --- a/node_modules/path-is-absolute/readme.md +++ b/node_modules/path-is-absolute/readme.md @@ -1,8 +1,6 @@ # path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) -> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) ponyfill - -> Ponyfill: A polyfill that doesn't overwrite the native method +> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com) ## Install @@ -15,19 +13,29 @@ $ npm install --save path-is-absolute ## Usage ```js -var pathIsAbsolute = require('path-is-absolute'); +const pathIsAbsolute = require('path-is-absolute'); -// Linux +// Running on Linux pathIsAbsolute('/home/foo'); //=> true +pathIsAbsolute('C:/Users/foo'); +//=> false -// Windows -pathIsAbsolute('C:/Users/'); +// Running on Windows +pathIsAbsolute('C:/Users/foo'); //=> true +pathIsAbsolute('/home/foo'); +//=> false -// Any OS +// Running on any OS pathIsAbsolute.posix('/home/foo'); //=> true +pathIsAbsolute.posix('C:/Users/foo'); +//=> false +pathIsAbsolute.win32('C:/Users/foo'); +//=> true +pathIsAbsolute.win32('/home/foo'); +//=> false ``` @@ -39,13 +47,13 @@ See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isa ### pathIsAbsolute.posix(path) -The Posix specific version. +POSIX specific version. ### pathIsAbsolute.win32(path) -The Windows specific version. +Windows specific version. ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/path-is-inside/LICENSE.txt b/node_modules/path-is-inside/LICENSE.txt index ae20051..0bdbb61 100644 --- a/node_modules/path-is-inside/LICENSE.txt +++ b/node_modules/path-is-inside/LICENSE.txt @@ -1,4 +1,8 @@ -Copyright © 2013–2014 Domenic Denicola +Dual licensed under WTFPL and MIT: + +--- + +Copyright © 2013–2016 Domenic Denicola This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, @@ -17,3 +21,27 @@ as published by Sam Hocevar. See below for more details. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO. + +--- + +The MIT License (MIT) + +Copyright © 2013–2016 Domenic Denicola + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/path-is-inside/README.md b/node_modules/path-is-inside/README.md deleted file mode 100644 index d42e6aa..0000000 --- a/node_modules/path-is-inside/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Is This Path Inside This Other Path? - -It turns out this question isn't trivial to answer using Node's built-in path APIs. A naive `indexOf`-based solution will fail sometimes on Windows, which is case-insensitive (see e.g. [isaacs/npm#4214][]). You might then think to be clever with `path.resolve`, but you have to be careful to account for situations whether the paths have different drive letters, or else you'll cause bugs like [isaacs/npm#4313][]. And let's not even get started on trailing slashes. - -The **path-is-inside** package will give you a robust, cross-platform way of detecting whether a given path is inside another path. - -## Usage - -Pretty simple. First the path being tested; then the potential parent. Like so: - -```js -var pathIsInside = require("path-is-inside"); - -pathIsInside("/x/y/z", "/x/y") // true -pathIsInside("/x/y", "/x/y/z") // false -``` - -## OS-Specific Behavior - -Like Node's built-in path module, path-is-inside treats all file paths on Windows as case-insensitive, whereas it treats all file paths on *-nix operating systems as case-sensitive. Keep this in mind especially when working on a Mac, where, despite Node's defaults, the OS usually treats paths case-insensitively. - -In practice, this means: - -```js -// On Windows - -pathIsInside("C:\\X\\Y\\Z", "C:\\x\\y") // true - -// On *-nix, including Mac OS X - -pathIsInside("/X/Y/Z", "/x/y") // false -``` - -[isaacs/npm#4214]: https://github.com/isaacs/npm/pull/4214 -[isaacs/npm#4313]: https://github.com/isaacs/npm/issues/4313 diff --git a/node_modules/path-is-inside/package.json b/node_modules/path-is-inside/package.json index 643e2cd..74c56e6 100644 --- a/node_modules/path-is-inside/package.json +++ b/node_modules/path-is-inside/package.json @@ -1,83 +1,21 @@ { - "_args": [ - [ - "path-is-inside@^1.0.1", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "path-is-inside@>=1.0.1 <2.0.0", - "_id": "path-is-inside@1.0.1", - "_inCache": true, - "_installable": true, - "_location": "/path-is-inside", - "_npmUser": { - "email": "domenic@domenicdenicola.com", - "name": "domenic" - }, - "_npmVersion": "1.3.25", - "_phantomChildren": {}, - "_requested": { "name": "path-is-inside", - "raw": "path-is-inside@^1.0.1", - "rawSpec": "^1.0.1", - "scope": null, - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint", - "/is-path-inside" - ], - "_resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz", - "_shasum": "98d8f1d030bf04bd7aeee4a1ba5485d40318fd89", - "_shrinkwrap": null, - "_spec": "path-is-inside@^1.0.1", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint", - "author": { - "email": "domenic@domenicdenicola.com", - "name": "Domenic Denicola", - "url": "http://domenic.me" - }, - "bugs": { - "url": "http://github.com/domenic/path-is-inside/issues" - }, - "dependencies": {}, - "description": "Tests whether one path is inside another path", - "devDependencies": { - "jshint": "~2.3.0", - "mocha": "~1.15.1" - }, - "directories": {}, - "dist": { - "shasum": "98d8f1d030bf04bd7aeee4a1ba5485d40318fd89", - "tarball": "http://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz" - }, - "homepage": "https://github.com/domenic/path-is-inside", - "keywords": [ - "directory", - "folder", - "inside", - "path", - "relative" - ], - "license": "WTFPL", - "main": "lib/path-is-inside.js", - "maintainers": [ - { - "name": "domenic", - "email": "domenic@domenicdenicola.com" + "description": "Tests whether one path is inside another path", + "keywords": ["path", "directory", "folder", "inside", "relative"], + "version": "1.0.2", + "author": "Domenic Denicola (https://domenic.me)", + "license": "(WTFPL OR MIT)", + "repository": "domenic/path-is-inside", + "main": "lib/path-is-inside.js", + "files": [ + "lib" + ], + "scripts": { + "test": "mocha", + "lint": "jshint lib" + }, + "devDependencies": { + "jshint": "~2.3.0", + "mocha": "~1.15.1" } - ], - "name": "path-is-inside", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/domenic/path-is-inside.git" - }, - "scripts": { - "lint": "jshint lib", - "test": "mocha" - }, - "version": "1.0.1" } diff --git a/node_modules/pify/package.json b/node_modules/pify/package.json index 8a95bbb..311d198 100644 --- a/node_modules/pify/package.json +++ b/node_modules/pify/package.json @@ -1,105 +1,48 @@ { - "_args": [ - [ - "pify@^2.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\del" - ] - ], - "_from": "pify@>=2.0.0 <3.0.0", - "_id": "pify@2.3.0", - "_inCache": true, - "_installable": true, - "_location": "/pify", - "_nodeVersion": "4.2.1", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.14.7", - "_phantomChildren": {}, - "_requested": { - "name": "pify", - "raw": "pify@^2.0.0", - "rawSpec": "^2.0.0", - "scope": null, - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/del", - "/globby" - ], - "_resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "_shasum": "ed141a6ac043a849ea588498e7dca8b15330e90c", - "_shrinkwrap": null, - "_spec": "pify@^2.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\del", + "name": "pify", + "version": "2.3.0", + "description": "Promisify a callback-style function", + "license": "MIT", + "repository": "sindresorhus/pify", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/pify/issues" - }, - "dependencies": {}, - "description": "Promisify a callback-style function", - "devDependencies": { - "ava": "*", - "pinkie-promise": "^1.0.0", - "v8-natives": "0.0.2", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "ed141a6ac043a849ea588498e7dca8b15330e90c", - "tarball": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "xo && ava && npm run optimization-test", + "optimization-test": "node --allow-natives-syntax optimization-test.js" + }, "files": [ "index.js" ], - "gitHead": "2dd0d8b880e4ebcc5cc33ae126b02647418e4440", - "homepage": "https://github.com/sindresorhus/pify", "keywords": [ - "async", - "bind", - "callback", - "cb", - "convert", - "denodeify", - "denodify", - "es2015", - "node", "promise", "promises", "promisify", + "denodify", + "denodeify", + "callback", + "cb", + "node", "then", "thenify", - "to", + "convert", "transform", "wrap", - "wrapper" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } + "wrapper", + "bind", + "to", + "async", + "es2015" ], - "name": "pify", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/pify.git" - }, - "scripts": { - "optimization-test": "node --allow-natives-syntax optimization-test.js", - "test": "xo && ava && npm run optimization-test" - }, - "version": "2.3.0" + "devDependencies": { + "ava": "*", + "pinkie-promise": "^1.0.0", + "v8-natives": "0.0.2", + "xo": "*" + } } diff --git a/node_modules/pinkie-promise/package.json b/node_modules/pinkie-promise/package.json index 25c8a56..3515f8f 100644 --- a/node_modules/pinkie-promise/package.json +++ b/node_modules/pinkie-promise/package.json @@ -1,95 +1,35 @@ { - "_args": [ - [ - "pinkie-promise@^2.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\del" - ] - ], - "_from": "pinkie-promise@>=2.0.0 <3.0.0", - "_id": "pinkie-promise@2.0.1", - "_inCache": true, - "_installable": true, - "_location": "/pinkie-promise", - "_nodeVersion": "4.4.1", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/pinkie-promise-2.0.1.tgz_1460309839126_0.3422858319245279" - }, - "_npmUser": { - "email": "floatdrop@gmail.com", - "name": "floatdrop" - }, - "_npmVersion": "2.14.20", - "_phantomChildren": {}, - "_requested": { - "name": "pinkie-promise", - "raw": "pinkie-promise@^2.0.0", - "rawSpec": "^2.0.0", - "scope": null, - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/del", - "/globby" - ], - "_resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "_shasum": "2135d6dfa7a358c069ac9b178776288228450ffa", - "_shrinkwrap": null, - "_spec": "pinkie-promise@^2.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\del", + "name": "pinkie-promise", + "version": "2.0.1", + "description": "ES2015 Promise ponyfill", + "license": "MIT", + "repository": "floatdrop/pinkie-promise", "author": { - "email": "floatdrop@gmail.com", "name": "Vsevolod Strukchinsky", + "email": "floatdrop@gmail.com", "url": "github.com/floatdrop" }, - "bugs": { - "url": "https://github.com/floatdrop/pinkie-promise/issues" - }, - "dependencies": { - "pinkie": "^2.0.0" - }, - "description": "ES2015 Promise ponyfill", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "2135d6dfa7a358c069ac9b178776288228450ffa", - "tarball": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "mocha" + }, "files": [ "index.js" ], - "gitHead": "4a936c09c34ad591a25db93f1216d242de0d6184", - "homepage": "https://github.com/floatdrop/pinkie-promise", "keywords": [ + "promise", + "promises", "es2015", "es6", "polyfill", - "ponyfill", - "promise", - "promises" - ], - "license": "MIT", - "maintainers": [ - { - "name": "floatdrop", - "email": "floatdrop@gmail.com" - } + "ponyfill" ], - "name": "pinkie-promise", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/floatdrop/pinkie-promise.git" - }, - "scripts": { - "test": "mocha" + "dependencies": { + "pinkie": "^2.0.0" }, - "version": "2.0.1" + "devDependencies": { + "mocha": "*" + } } diff --git a/node_modules/pinkie/package.json b/node_modules/pinkie/package.json index d44c2ec..cb9057b 100644 --- a/node_modules/pinkie/package.json +++ b/node_modules/pinkie/package.json @@ -1,92 +1,36 @@ { - "_args": [ - [ - "pinkie@^2.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\pinkie-promise" - ] - ], - "_from": "pinkie@>=2.0.0 <3.0.0", - "_id": "pinkie@2.0.4", - "_inCache": true, - "_installable": true, - "_location": "/pinkie", - "_nodeVersion": "4.2.4", - "_npmUser": { - "email": "floatdrop@gmail.com", - "name": "floatdrop" - }, - "_npmVersion": "2.14.12", - "_phantomChildren": {}, - "_requested": { - "name": "pinkie", - "raw": "pinkie@^2.0.0", - "rawSpec": "^2.0.0", - "scope": null, - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/pinkie-promise" - ], - "_resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "_shasum": "72556b80cfa0d48a974e80e77248e80ed4f7f870", - "_shrinkwrap": null, - "_spec": "pinkie@^2.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\pinkie-promise", + "name": "pinkie", + "version": "2.0.4", + "description": "Itty bitty little widdle twinkie pinkie ES2015 Promise implementation", + "license": "MIT", + "repository": "floatdrop/pinkie", "author": { - "email": "floatdrop@gmail.com", "name": "Vsevolod Strukchinsky", + "email": "floatdrop@gmail.com", "url": "github.com/floatdrop" }, - "bugs": { - "url": "https://github.com/floatdrop/pinkie/issues" - }, - "dependencies": {}, - "description": "Itty bitty little widdle twinkie pinkie ES2015 Promise implementation", - "devDependencies": { - "core-assert": "^0.1.1", - "coveralls": "^2.11.4", - "mocha": "*", - "nyc": "^3.2.2", - "promises-aplus-tests": "*", - "xo": "^0.10.1" - }, - "directories": {}, - "dist": { - "shasum": "72556b80cfa0d48a974e80e77248e80ed4f7f870", - "tarball": "http://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "xo && nyc mocha", + "coverage": "nyc report --reporter=text-lcov | coveralls" + }, "files": [ "index.js" ], - "gitHead": "8d4a92447a5c62bff9f89756caeb4c9c8770579b", - "homepage": "https://github.com/floatdrop/pinkie", "keywords": [ - "es2015", - "es6", "promise", - "promises" - ], - "license": "MIT", - "maintainers": [ - { - "name": "floatdrop", - "email": "floatdrop@gmail.com" - } + "promises", + "es2015", + "es6" ], - "name": "pinkie", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/floatdrop/pinkie.git" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "test": "xo && nyc mocha" - }, - "version": "2.0.4" + "devDependencies": { + "core-assert": "^0.1.1", + "coveralls": "^2.11.4", + "mocha": "*", + "nyc": "^3.2.2", + "promises-aplus-tests": "*", + "xo": "^0.10.1" + } } diff --git a/node_modules/pluralize/package.json b/node_modules/pluralize/package.json index 80b9c8f..110ec0d 100644 --- a/node_modules/pluralize/package.json +++ b/node_modules/pluralize/package.json @@ -1,93 +1,38 @@ { - "_args": [ - [ - "pluralize@^1.2.1", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint" - ] + "name": "pluralize", + "version": "1.2.1", + "description": "Pluralize and singularize any word", + "main": "pluralize.js", + "files": [ + "pluralize.js", + "LICENSE" ], - "_from": "pluralize@>=1.2.1 <2.0.0", - "_id": "pluralize@1.2.1", - "_inCache": true, - "_installable": true, - "_location": "/pluralize", - "_nodeVersion": "4.0.0", - "_npmUser": { - "email": "hello@blakeembrey.com", - "name": "blakeembrey" - }, - "_npmVersion": "2.14.2", - "_phantomChildren": {}, - "_requested": { - "name": "pluralize", - "raw": "pluralize@^1.2.1", - "rawSpec": "^1.2.1", - "scope": null, - "spec": ">=1.2.1 <2.0.0", - "type": "range" + "scripts": { + "lint": "semistandard", + "test-spec": "mocha -R spec --bail", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- -R spec --bail", + "test": "npm run lint && npm run test-cov" }, - "_requiredBy": [ - "/eslint" + "repository": "https://github.com/blakeembrey/pluralize.git", + "keywords": [ + "plural", + "plurals", + "pluralize", + "singular", + "singularize" ], - "_resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", - "_shasum": "d1a21483fd22bb41e58a12fa3421823140897c45", - "_shrinkwrap": null, - "_spec": "pluralize@^1.2.1", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint", "author": { - "email": "hello@blakeembrey.com", "name": "Blake Embrey", + "email": "hello@blakeembrey.com", "url": "http://blakeembrey.me" }, - "bugs": { - "url": "https://github.com/blakeembrey/pluralize/issues" - }, - "dependencies": {}, - "description": "Pluralize and singularize any word", + "license": "MIT", + "readmeFilename": "Readme.md", "devDependencies": { "chai": "^1.9.1", "istanbul": "^0.3.0", "mocha": "^1.21.4", "pre-commit": "^1.0.10", "semistandard": "^7.0.2" - }, - "directories": {}, - "dist": { - "shasum": "d1a21483fd22bb41e58a12fa3421823140897c45", - "tarball": "http://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz" - }, - "files": [ - "LICENSE", - "pluralize.js" - ], - "gitHead": "a956c0dbca8782b588f8cd3229f16e8436d1ee73", - "homepage": "https://github.com/blakeembrey/pluralize", - "keywords": [ - "plural", - "pluralize", - "plurals", - "singular", - "singularize" - ], - "license": "MIT", - "main": "pluralize.js", - "maintainers": [ - { - "name": "blakeembrey", - "email": "me@blakeembrey.com" - } - ], - "name": "pluralize", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/blakeembrey/pluralize.git" - }, - "scripts": { - "lint": "semistandard", - "test": "npm run lint && npm run test-cov", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- -R spec --bail", - "test-spec": "mocha -R spec --bail" - }, - "version": "1.2.1" + } } diff --git a/node_modules/prelude-ls/package.json b/node_modules/prelude-ls/package.json index e7ebe69..5507d3c 100644 --- a/node_modules/prelude-ls/package.json +++ b/node_modules/prelude-ls/package.json @@ -1,102 +1,39 @@ { - "_args": [ - [ - "prelude-ls@~1.1.1", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\optionator" - ] - ], - "_from": "prelude-ls@>=1.1.1 <1.2.0", - "_id": "prelude-ls@1.1.2", - "_inCache": true, - "_installable": true, - "_location": "/prelude-ls", - "_nodeVersion": "0.11.15", - "_npmUser": { - "email": "z@georgezahariev.com", - "name": "gkz" - }, - "_npmVersion": "2.7.6", - "_phantomChildren": {}, - "_requested": { - "name": "prelude-ls", - "raw": "prelude-ls@~1.1.1", - "rawSpec": "~1.1.1", - "scope": null, - "spec": ">=1.1.1 <1.2.0", - "type": "range" - }, - "_requiredBy": [ - "/levn", - "/optionator", - "/type-check" - ], - "_resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "_shasum": "21932a549f5e52ffd9a827f570e04be62a97da54", - "_shrinkwrap": null, - "_spec": "prelude-ls@~1.1.1", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\optionator", - "author": { - "email": "z@georgezahariev.com", - "name": "George Zahariev" - }, - "bugs": { - "url": "https://github.com/gkz/prelude-ls/issues" - }, - "dependencies": {}, + "name": "prelude-ls", + "version": "1.1.2", + "author": "George Zahariev ", "description": "prelude.ls is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript.", - "devDependencies": { - "browserify": "~3.24.13", - "istanbul": "~0.2.4", - "livescript": "~1.4.0", - "mocha": "~2.2.4", - "sinon": "~1.10.2", - "uglify-js": "~2.4.12" - }, - "directories": {}, - "dist": { - "shasum": "21932a549f5e52ffd9a827f570e04be62a97da54", - "tarball": "http://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz" - }, - "engines": { - "node": ">= 0.8.0" - }, - "files": [ - "LICENSE", - "README.md", - "lib/" - ], - "gitHead": "d69be8fd8a682321ba24eced17caf3a1b8ca73b8", - "homepage": "http://preludels.com", "keywords": [ - "array", + "prelude", + "livescript", + "utility", + "ls", "coffeescript", - "functional", "javascript", "library", + "functional", + "array", "list", - "livescript", - "ls", "object", - "prelude", - "string", - "utility" + "string" ], + "main": "lib/", + "files": [ + "lib/", + "README.md", + "LICENSE" + ], + "homepage": "http://preludels.com", + "bugs": "https://github.com/gkz/prelude-ls/issues", "licenses": [ { "type": "MIT", "url": "https://raw.github.com/gkz/prelude-ls/master/LICENSE" } ], - "main": "lib/", - "maintainers": [ - { - "name": "gkz", - "email": "z@georgezahariev.com" - } - ], - "name": "prelude-ls", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", + "engines": { + "node": ">= 0.8.0" + }, "repository": { "type": "git", "url": "git://github.com/gkz/prelude-ls.git" @@ -104,5 +41,12 @@ "scripts": { "test": "make test" }, - "version": "1.1.2" + "devDependencies": { + "livescript": "~1.4.0", + "uglify-js": "~2.4.12", + "mocha": "~2.2.4", + "istanbul": "~0.2.4", + "browserify": "~3.24.13", + "sinon": "~1.10.2" + } } diff --git a/node_modules/process-nextick-args/package.json b/node_modules/process-nextick-args/package.json index 9cd4c07..e5c6c56 100644 --- a/node_modules/process-nextick-args/package.json +++ b/node_modules/process-nextick-args/package.json @@ -1,75 +1,22 @@ { - "_args": [ - [ - "process-nextick-args@~1.0.6", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\readable-stream" - ] - ], - "_from": "process-nextick-args@>=1.0.6 <1.1.0", - "_id": "process-nextick-args@1.0.7", - "_inCache": true, - "_installable": true, - "_location": "/process-nextick-args", - "_nodeVersion": "5.11.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/process-nextick-args-1.0.7.tgz_1462394251778_0.36989671061746776" - }, - "_npmUser": { - "email": "calvin.metcalf@gmail.com", - "name": "cwmma" + "name": "process-nextick-args", + "version": "1.0.7", + "description": "process.nextTick but always with args", + "main": "index.js", + "scripts": { + "test": "node test.js" }, - "_npmVersion": "3.8.6", - "_phantomChildren": {}, - "_requested": { - "name": "process-nextick-args", - "raw": "process-nextick-args@~1.0.6", - "rawSpec": "~1.0.6", - "scope": null, - "spec": ">=1.0.6 <1.1.0", - "type": "range" + "repository": { + "type": "git", + "url": "https://github.com/calvinmetcalf/process-nextick-args.git" }, - "_requiredBy": [ - "/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", - "_shrinkwrap": null, - "_spec": "process-nextick-args@~1.0.6", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\readable-stream", "author": "", + "license": "MIT", "bugs": { "url": "https://github.com/calvinmetcalf/process-nextick-args/issues" }, - "dependencies": {}, - "description": "process.nextTick but always with args", + "homepage": "https://github.com/calvinmetcalf/process-nextick-args", "devDependencies": { "tap": "~0.2.6" - }, - "directories": {}, - "dist": { - "shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", - "tarball": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" - }, - "gitHead": "5c00899ab01dd32f93ad4b5743da33da91404f39", - "homepage": "https://github.com/calvinmetcalf/process-nextick-args", - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "name": "process-nextick-args", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/calvinmetcalf/process-nextick-args.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.7" + } } diff --git a/node_modules/progress/package.json b/node_modules/progress/package.json index dcbb5e4..5ec55a5 100644 --- a/node_modules/progress/package.json +++ b/node_modules/progress/package.json @@ -1,93 +1,21 @@ { - "_args": [ - [ - "progress@^1.1.8", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "progress@>=1.1.8 <2.0.0", - "_id": "progress@1.1.8", - "_inCache": true, - "_installable": true, - "_location": "/progress", - "_npmUser": { - "email": "scalesjordan@gmail.com", - "name": "prezjordan" - }, - "_npmVersion": "1.4.14", - "_phantomChildren": {}, - "_requested": { - "name": "progress", - "raw": "progress@^1.1.8", - "rawSpec": "^1.1.8", - "scope": null, - "spec": ">=1.1.8 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", - "_shasum": "e260c78f6161cdd9b0e56cc3e0a85de17c7a57be", - "_shrinkwrap": null, - "_spec": "progress@^1.1.8", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint", - "author": { - "email": "tj@vision-media.ca", - "name": "TJ Holowaychuk" - }, - "bugs": { - "url": "https://github.com/visionmedia/node-progress/issues" - }, - "contributors": [ - { - "name": "Christoffer Hallas", - "email": "christoffer.hallas@gmail.com" - }, - { - "name": "Jordan Scales", - "email": "scalesjordan@gmail.com" - } - ], - "dependencies": {}, - "description": "Flexible ascii progress bar", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "e260c78f6161cdd9b0e56cc3e0a85de17c7a57be", - "tarball": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz" - }, - "engines": { - "node": ">=0.4.0" - }, - "gitHead": "6b9524c0d07df9555d20ae95c65918020c50e3e2", - "homepage": "https://github.com/visionmedia/node-progress", - "keywords": [ - "cli", - "progress" - ], - "main": "index", - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "hallas", - "email": "christoffer.hallas@forsvikgroup.com" - }, - { - "name": "prezjordan", - "email": "scalesjordan@gmail.com" - } - ], - "name": "progress", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/node-progress.git" - }, - "scripts": {}, - "version": "1.1.8" + "name": "progress" + , "version": "1.1.8" + , "description": "Flexible ascii progress bar" + , "keywords": ["cli", "progress"] + , "author": "TJ Holowaychuk " + , "contributors": [ + { + "name": "Christoffer Hallas" + , "email": "christoffer.hallas@gmail.com" + } + , { + "name": "Jordan Scales" + , "email": "scalesjordan@gmail.com" + } + ] + , "dependencies": {} + , "main": "index" + , "engines": { "node": ">=0.4.0" } + , "repository": "git://github.com/visionmedia/node-progress" } diff --git a/node_modules/read-json-sync/LICENSE b/node_modules/read-json-sync/LICENSE deleted file mode 100644 index d9ef73f..0000000 --- a/node_modules/read-json-sync/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 - 2015 Shinnosuke Watanabe - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/read-json-sync/README.md b/node_modules/read-json-sync/README.md deleted file mode 100644 index 822c694..0000000 --- a/node_modules/read-json-sync/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# read-json-sync - -[![NPM version](https://img.shields.io/npm/v/read-json-sync.svg)](https://www.npmjs.com/package/read-json-sync) -[![Build Status](https://travis-ci.org/shinnn/read-json-sync.svg?branch=master)](https://travis-ci.org/shinnn/read-json-sync) -[![Build status](https://ci.appveyor.com/api/projects/status/t7sjgpku9on12d32?svg=true)](https://ci.appveyor.com/project/ShinnosukeWatanabe/read-json-sync) -[![Coverage Status](https://img.shields.io/coveralls/shinnn/read-json-sync.svg)](https://david-dm.org/shinnn/read-json-sync) -[![Dependency Status](https://david-dm.org/shinnn/read-json-sync.svg)](https://david-dm.org/shinnn/read-json-sync) -[![devDependency Status](https://david-dm.org/shinnn/read-json-sync/dev-status.svg)](https://david-dm.org/shinnn/read-json-sync#info=devDependencies) - -A [Node](https://nodejs.org/) module to read and parse a [JSON](http://www.json.org/) file synchronously - -```javascript -const readJsonSync = require('read-json-sync'); - -readJsonSync('package.json'); //=> {name: 'read-json-sync', version: '1.0.0', ...} -``` - -Node's built-in [`require`](https://nodejs.org/api/globals.html#globals_require) can do almost the same thing, but this module doesn't [cache](https://nodejs.org/api/modules.html#modules_caching) results. - -## Installation - -[Use npm](https://docs.npmjs.com/cli/install). - -``` -npm install read-json-sync -``` - -## API - -```javascript -const readJsonSync = require('read-json-sync'); -``` - -### readJsonSync(*filePath* [, *options*]) - -*filePath*: `String` (path to a JSON file) -*options*: `Object` ([`fs.readFile`](https://nodejs.org/api/fs.html#fs_fs_readfile_filename_options_callback) options) -Return: `Object` (parsed [JSON](https://tools.ietf.org/html/rfc7159) data) - -## License - -Copyright (c) 2014 - 2015 [Shinnosuke Watanabe](https://github.com/shinnn) - -Licensed under [the MIT License](./LICENSE). diff --git a/node_modules/read-json-sync/index.js b/node_modules/read-json-sync/index.js deleted file mode 100644 index 0abc7a7..0000000 --- a/node_modules/read-json-sync/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * read-json-sync | MIT (c) Shinnosuke Watanabe - * https://github.com/shinnn/read-json-sync -*/ -'use strict'; - -var fs = require('graceful-fs'); - -module.exports = function readJsonSync(filePath, options) { - return JSON.parse(String(fs.readFileSync(filePath, options)).replace(/^\ufeff/g, '')); -}; diff --git a/node_modules/read-json-sync/package.json b/node_modules/read-json-sync/package.json deleted file mode 100644 index fb3aa56..0000000 --- a/node_modules/read-json-sync/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "_args": [ - [ - "read-json-sync@^1.1.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\flat-cache" - ] - ], - "_from": "read-json-sync@>=1.1.0 <2.0.0", - "_id": "read-json-sync@1.1.1", - "_inCache": true, - "_installable": true, - "_location": "/read-json-sync", - "_nodeVersion": "5.1.0", - "_npmUser": { - "email": "snnskwtnb@gmail.com", - "name": "shinnn" - }, - "_npmVersion": "3.3.12", - "_phantomChildren": {}, - "_requested": { - "name": "read-json-sync", - "raw": "read-json-sync@^1.1.0", - "rawSpec": "^1.1.0", - "scope": null, - "spec": ">=1.1.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/flat-cache" - ], - "_resolved": "https://registry.npmjs.org/read-json-sync/-/read-json-sync-1.1.1.tgz", - "_shasum": "43c669ae864aae308dfbbb2721a67e295ec8fff6", - "_shrinkwrap": null, - "_spec": "read-json-sync@^1.1.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\flat-cache", - "author": { - "name": "Shinnosuke Watanabe", - "url": "https://github.com/shinnn" - }, - "bugs": { - "url": "https://github.com/shinnn/read-json-sync/issues" - }, - "dependencies": { - "graceful-fs": "^4.1.2" - }, - "description": "Read and parse a JSON file synchronously", - "devDependencies": { - "@shinnn/eslint-config-node-legacy": "^1.0.0", - "eslint": "^1.7.3", - "istanbul": "^0.4.0", - "tap-spec": "^4.1.0", - "tape": "^4.2.2" - }, - "directories": {}, - "dist": { - "shasum": "43c669ae864aae308dfbbb2721a67e295ec8fff6", - "tarball": "http://registry.npmjs.org/read-json-sync/-/read-json-sync-1.1.1.tgz" - }, - "files": [ - "index.js" - ], - "gitHead": "0999728ef395e327129fa5754c3f9d8d6040188b", - "homepage": "https://github.com/shinnn/read-json-sync#readme", - "keywords": [ - "data", - "file", - "json", - "load", - "parse", - "read", - "sync", - "synchronous", - "synchronously" - ], - "license": "MIT", - "maintainers": [ - { - "name": "shinnn", - "email": "snnskwtnb@gmail.com" - } - ], - "name": "read-json-sync", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/shinnn/read-json-sync.git" - }, - "scripts": { - "coverage": "node --strong_mode node_modules/.bin/istanbul cover test/test.js", - "pretest": "eslint --config @shinnn/node-legacy index.js test/test.js", - "test": "node --strong_mode --throw-deprecation --track-heap-objects test/test.js | tap-spec" - }, - "version": "1.1.1" -} diff --git a/node_modules/readable-stream/package.json b/node_modules/readable-stream/package.json index d5334d3..d77b090 100644 --- a/node_modules/readable-stream/package.json +++ b/node_modules/readable-stream/package.json @@ -1,48 +1,8 @@ { - "_args": [ - [ - "readable-stream@~2.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\concat-stream" - ] - ], - "_from": "readable-stream@>=2.0.0 <2.1.0", - "_id": "readable-stream@2.0.6", - "_inCache": true, - "_installable": true, - "_location": "/readable-stream", - "_nodeVersion": "5.7.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/readable-stream-2.0.6.tgz_1457893507709_0.369257491780445" - }, - "_npmUser": { - "email": "calvin.metcalf@gmail.com", - "name": "cwmma" - }, - "_npmVersion": "3.6.0", - "_phantomChildren": {}, - "_requested": { - "name": "readable-stream", - "raw": "readable-stream@~2.0.0", - "rawSpec": "~2.0.0", - "scope": null, - "spec": ">=2.0.0 <2.1.0", - "type": "range" - }, - "_requiredBy": [ - "/concat-stream" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "_shasum": "8f90341e68a53ccc928788dacfcd11b36eb9b78e", - "_shrinkwrap": null, - "_spec": "readable-stream@~2.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\concat-stream", - "browser": { - "util": false - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, + "name": "readable-stream", + "version": "2.0.6", + "description": "Streams3, a user-land copy of the stream library from Node.js", + "main": "readable.js", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", @@ -51,55 +11,27 @@ "string_decoder": "~0.10.x", "util-deprecate": "~1.0.1" }, - "description": "Streams3, a user-land copy of the stream library from Node.js", "devDependencies": { "tap": "~0.2.6", "tape": "~4.5.1", "zuul": "~3.9.0" }, - "directories": {}, - "dist": { - "shasum": "8f90341e68a53ccc928788dacfcd11b36eb9b78e", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz" + "scripts": { + "test": "tap test/parallel/*.js test/ours/*.js", + "browser": "npm run write-zuul && zuul -- test/browser.js", + "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" + }, + "repository": { + "type": "git", + "url": "git://github.com/nodejs/readable-stream" }, - "gitHead": "01fb5608a970b42c900b96746cadc13d27dd9d7e", - "homepage": "https://github.com/nodejs/readable-stream#readme", "keywords": [ - "pipe", "readable", - "stream" + "stream", + "pipe" ], - "license": "MIT", - "main": "readable.js", - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "name": "readable-stream", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "browser": "npm run write-zuul && zuul -- test/browser.js", - "test": "tap test/parallel/*.js test/ours/*.js", - "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" + "browser": { + "util": false }, - "version": "2.0.6" + "license": "MIT" } diff --git a/node_modules/readline2/package.json b/node_modules/readline2/package.json index a6e638c..1d1ea19 100644 --- a/node_modules/readline2/package.json +++ b/node_modules/readline2/package.json @@ -1,89 +1,31 @@ { - "_args": [ - [ - "readline2@^1.0.1", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\inquirer" - ] - ], - "_from": "readline2@>=1.0.1 <2.0.0", - "_id": "readline2@1.0.1", - "_inCache": true, - "_installable": true, - "_location": "/readline2", - "_nodeVersion": "0.12.5", - "_npmUser": { - "email": "admin@simonboudrias.com", - "name": "sboudrias" - }, - "_npmVersion": "2.11.2", - "_phantomChildren": {}, - "_requested": { - "name": "readline2", - "raw": "readline2@^1.0.1", - "rawSpec": "^1.0.1", - "scope": null, - "spec": ">=1.0.1 <2.0.0", - "type": "range" + "name": "readline2", + "version": "1.0.1", + "description": "Readline Façade fixing bugs and issues found in releases 0.8 and 0.10", + "scripts": { + "test": "mocha -R spec" }, - "_requiredBy": [ - "/inquirer" + "repository": "SBoudrias/readline2", + "keywords": [ + "cli", + "terminal", + "readline", + "tty", + "ansi" + ], + "author": "Simon Boudrias ", + "license": "MIT", + "files": [ + "index.js" ], - "_resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz", - "_shasum": "41059608ffc154757b715d9989d199ffbf372e35", - "_shrinkwrap": null, - "_spec": "readline2@^1.0.1", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\inquirer", - "author": { - "email": "admin@simonboudrias.com", - "name": "Simon Boudrias" - }, - "bugs": { - "url": "https://github.com/sboudrias/readline2/issues" - }, "dependencies": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", "mute-stream": "0.0.5" }, - "description": "Readline Façade fixing bugs and issues found in releases 0.8 and 0.10", "devDependencies": { "chalk": "^1.1.0", "mocha": "^2.1.0", "sinon": "^1.7.3" - }, - "directories": {}, - "dist": { - "shasum": "41059608ffc154757b715d9989d199ffbf372e35", - "tarball": "http://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz" - }, - "files": [ - "index.js" - ], - "gitHead": "32aa9851e2cbb0610364d5009165be6fb2fed4ef", - "homepage": "https://github.com/sboudrias/readline2#readme", - "keywords": [ - "ansi", - "cli", - "readline", - "terminal", - "tty" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sboudrias", - "email": "admin@simonboudrias.com" - } - ], - "name": "readline2", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sboudrias/readline2.git" - }, - "scripts": { - "test": "mocha -R spec" - }, - "version": "1.0.1" + } } diff --git a/node_modules/require-uncached/index.js b/node_modules/require-uncached/index.js index eaabd49..63dfada 100644 --- a/node_modules/require-uncached/index.js +++ b/node_modules/require-uncached/index.js @@ -9,10 +9,21 @@ module.exports = function (moduleId) { } var filePath = resolveFrom(path.dirname(callerPath()), moduleId); - var tmp = require.cache[filePath]; + + // delete itself from module parent + if (require.cache[filePath] && require.cache[filePath].parent) { + var i = require.cache[filePath].parent.children.length; + + while (i--) { + if (require.cache[filePath].parent.children[i].id === filePath) { + require.cache[filePath].parent.children.splice(i, 1); + } + } + } + + // delete module from cache delete require.cache[filePath]; - var ret = require(filePath); - require.cache[filePath] = tmp; - return ret; + // return fresh module + return require(filePath); }; diff --git a/node_modules/require-uncached/license b/node_modules/require-uncached/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/require-uncached/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/require-uncached/package.json b/node_modules/require-uncached/package.json index e028aee..1d1933a 100644 --- a/node_modules/require-uncached/package.json +++ b/node_modules/require-uncached/package.json @@ -1,90 +1,45 @@ { - "_args": [ - [ - "require-uncached@^1.0.2", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "require-uncached@>=1.0.2 <2.0.0", - "_id": "require-uncached@1.0.2", - "_inCache": true, - "_installable": true, - "_location": "/require-uncached", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "1.4.9", - "_phantomChildren": {}, - "_requested": { - "name": "require-uncached", - "raw": "require-uncached@^1.0.2", - "rawSpec": "^1.0.2", - "scope": null, - "spec": ">=1.0.2 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.2.tgz", - "_shasum": "67dad3b733089e77030124678a459589faf6a7ec", - "_shrinkwrap": null, - "_spec": "require-uncached@^1.0.2", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint", + "name": "require-uncached", + "version": "1.0.3", + "description": "Require a module bypassing the cache", + "license": "MIT", + "repository": "sindresorhus/require-uncached", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", - "url": "http://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/require-uncached/issues" - }, - "dependencies": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" - }, - "description": "Require a module bypassing the cache", - "devDependencies": { - "ava": "0.0.3" - }, - "directories": {}, - "dist": { - "shasum": "67dad3b733089e77030124678a459589faf6a7ec", - "tarball": "http://registry.npmjs.org/require-uncached/-/require-uncached-1.0.2.tgz" + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "xo && ava", + "heapdump": "node heapdump.js" + }, "files": [ "index.js" ], - "homepage": "https://github.com/sindresorhus/require-uncached", "keywords": [ - "bypass", - "cache", - "fresh", - "module", "require", + "cache", "uncache", - "uncached" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } + "uncached", + "module", + "fresh", + "bypass" ], - "name": "require-uncached", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/require-uncached.git" + "dependencies": { + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" }, - "scripts": { - "test": "node test.js" + "devDependencies": { + "ava": "*", + "xo": "^0.16.0", + "heapdump": "^0.3.7" }, - "version": "1.0.2" + "xo": { + "rules": { + "import/no-dynamic-require": "off" + } + } } diff --git a/node_modules/require-uncached/readme.md b/node_modules/require-uncached/readme.md index 13104be..baa6cc2 100644 --- a/node_modules/require-uncached/readme.md +++ b/node_modules/require-uncached/readme.md @@ -1,13 +1,13 @@ # require-uncached [![Build Status](https://travis-ci.org/sindresorhus/require-uncached.svg?branch=master)](https://travis-ci.org/sindresorhus/require-uncached) -> Require a module bypassing the [cache](http://nodejs.org/api/modules.html#modules_caching) +> Require a module bypassing the [cache](https://nodejs.org/api/modules.html#modules_caching) Useful for testing purposes when you need to freshly require a module. ## Install -```sh +``` $ npm install --save require-uncached ``` @@ -16,14 +16,12 @@ $ npm install --save require-uncached ```js // foo.js -var i = 0; -module.exports = function () { - return ++i; -}; +let i = 0; +module.exports = () => ++i; ``` ```js -var requireUncached = require('require-uncached'); +const requireUncached = require('require-uncached'); require('./foo')(); //=> 1 @@ -39,6 +37,11 @@ requireUncached('./foo')(); ``` +## Related + +- [clear-require](https://github.com/sindresorhus/clear-require) - Clear a module from the require cache + + ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/resolve-from/package.json b/node_modules/resolve-from/package.json index 92ffa71..2bdfd14 100644 --- a/node_modules/resolve-from/package.json +++ b/node_modules/resolve-from/package.json @@ -1,90 +1,34 @@ { - "_args": [ - [ - "resolve-from@^1.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\require-uncached" - ] - ], - "_from": "resolve-from@>=1.0.0 <2.0.0", - "_id": "resolve-from@1.0.1", - "_inCache": true, - "_installable": true, - "_location": "/resolve-from", - "_nodeVersion": "4.1.1", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.14.4", - "_phantomChildren": {}, - "_requested": { - "name": "resolve-from", - "raw": "resolve-from@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/require-uncached" - ], - "_resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "_shasum": "26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226", - "_shrinkwrap": null, - "_spec": "resolve-from@^1.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\require-uncached", + "name": "resolve-from", + "version": "1.0.1", + "description": "Resolve the path of a module like require.resolve() but from a given path", + "license": "MIT", + "repository": "sindresorhus/resolve-from", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/resolve-from/issues" - }, - "dependencies": {}, - "description": "Resolve the path of a module like require.resolve() but from a given path", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226", - "tarball": "http://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "xo && ava" + }, "files": [ "index.js" ], - "gitHead": "bae2cf1d66c616ad2eb27e0fe85a10ff0f2dfc92", - "homepage": "https://github.com/sindresorhus/resolve-from", "keywords": [ + "require", + "resolve", + "path", + "module", "from", "like", - "module", - "path", - "path", - "require", - "resolve" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } + "path" ], - "name": "resolve-from", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/resolve-from.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.0.1" + "devDependencies": { + "ava": "*", + "xo": "*" + } } diff --git a/node_modules/restore-cursor/package.json b/node_modules/restore-cursor/package.json index f6d3f0a..71af3ec 100644 --- a/node_modules/restore-cursor/package.json +++ b/node_modules/restore-cursor/package.json @@ -1,101 +1,44 @@ { - "_args": [ - [ - "restore-cursor@^1.0.1", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\cli-cursor" - ] - ], - "_from": "restore-cursor@>=1.0.1 <2.0.0", - "_id": "restore-cursor@1.0.1", - "_inCache": true, - "_installable": true, - "_location": "/restore-cursor", - "_nodeVersion": "4.1.0", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.14.3", - "_phantomChildren": {}, - "_requested": { - "name": "restore-cursor", - "raw": "restore-cursor@^1.0.1", - "rawSpec": "^1.0.1", - "scope": null, - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/cli-cursor" - ], - "_resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "_shasum": "34661f46886327fed2991479152252df92daa541", - "_shrinkwrap": null, - "_spec": "restore-cursor@^1.0.1", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\cli-cursor", + "name": "restore-cursor", + "version": "1.0.1", + "description": "Gracefully restore the CLI cursor on exit", + "license": "MIT", + "repository": "sindresorhus/restore-cursor", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/restore-cursor/issues" - }, - "dependencies": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" - }, - "description": "Gracefully restore the CLI cursor on exit", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "34661f46886327fed2991479152252df92daa541", - "tarball": "http://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz" - }, "engines": { "node": ">=0.10.0" }, "files": [ "index.js" ], - "gitHead": "91542e5be16d7ccda8e42a63d56cc783d2cfaba2", - "homepage": "https://github.com/sindresorhus/restore-cursor#readme", "keywords": [ - "ansi", - "cli", - "command-line", - "console", - "cursor", "exit", - "graceful", - "kill", - "process", "quit", - "shell", - "show", + "process", + "graceful", "shutdown", - "sigint", "sigterm", + "sigint", + "terminate", + "kill", "stop", + "cli", + "cursor", + "ansi", + "show", "term", "terminal", - "terminate", - "tty" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } + "console", + "tty", + "shell", + "command-line" ], - "name": "restore-cursor", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/restore-cursor.git" - }, - "scripts": {}, - "version": "1.0.1" + "dependencies": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } } diff --git a/node_modules/rimraf/package.json b/node_modules/rimraf/package.json index 7f10883..c2cc045 100644 --- a/node_modules/rimraf/package.json +++ b/node_modules/rimraf/package.json @@ -1,66 +1,17 @@ { - "_args": [ - [ - "rimraf@^2.2.8", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\del" - ] - ], - "_from": "rimraf@>=2.2.8 <3.0.0", - "_id": "rimraf@2.5.2", - "_inCache": true, - "_installable": true, - "_location": "/rimraf", - "_nodeVersion": "5.6.0", - "_npmOperationalInternal": { - "host": "packages-6-west.internal.npmjs.com", - "tmp": "tmp/rimraf-2.5.2.tgz_1455346499772_0.9326622514054179" - }, - "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" - }, - "_npmVersion": "3.7.0", - "_phantomChildren": {}, - "_requested": { - "name": "rimraf", - "raw": "rimraf@^2.2.8", - "rawSpec": "^2.2.8", - "scope": null, - "spec": ">=2.2.8 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/del", - "/fs-extra" - ], - "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.2.tgz", - "_shasum": "62ba947fa4c0b4363839aefecd4f0fbad6059726", - "_shrinkwrap": null, - "_spec": "rimraf@^2.2.8", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\del", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me/" - }, - "bin": { - "rimraf": "./bin.js" - }, - "bugs": { - "url": "https://github.com/isaacs/rimraf/issues" - }, - "dependencies": { - "glob": "^7.0.0" - }, + "name": "rimraf", + "version": "2.5.4", + "main": "rimraf.js", "description": "A deep deletion module for node (like `rm -rf`)", - "devDependencies": { - "mkdirp": "^0.5.1", - "tap": "^5.1.1" + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "repository": "git://github.com/isaacs/rimraf.git", + "scripts": { + "test": "tap test/*.js" }, - "directories": {}, - "dist": { - "shasum": "62ba947fa4c0b4363839aefecd4f0fbad6059726", - "tarball": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.2.tgz" + "bin": "./bin.js", + "dependencies": { + "glob": "^7.0.5" }, "files": [ "LICENSE", @@ -68,25 +19,8 @@ "bin.js", "rimraf.js" ], - "gitHead": "f414f87021f88d004ac487eebc8d07ce6a152721", - "homepage": "https://github.com/isaacs/rimraf#readme", - "license": "ISC", - "main": "rimraf.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "rimraf", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/rimraf.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "2.5.2" + "devDependencies": { + "mkdirp": "^0.5.1", + "tap": "^6.1.1" + } } diff --git a/node_modules/rimraf/rimraf.js b/node_modules/rimraf/rimraf.js index c01d13b..5d9a576 100644 --- a/node_modules/rimraf/rimraf.js +++ b/node_modules/rimraf/rimraf.js @@ -48,9 +48,9 @@ function rimraf (p, options, cb) { assert(p, 'rimraf: missing path') assert.equal(typeof p, 'string', 'rimraf: path should be a string') - assert(options, 'rimraf: missing options') - assert.equal(typeof options, 'object', 'rimraf: options should be object') assert.equal(typeof cb, 'function', 'rimraf: callback function required') + assert(options, 'rimraf: invalid options argument provided') + assert.equal(typeof options, 'object', 'rimraf: options should be object') defaults(options) @@ -61,7 +61,7 @@ function rimraf (p, options, cb) { if (options.disableGlob || !glob.hasMagic(p)) return afterGlob(null, [p]) - fs.lstat(p, function (er, stat) { + options.lstat(p, function (er, stat) { if (!er) return afterGlob(null, [p]) @@ -135,6 +135,10 @@ function rimraf_ (p, options, cb) { if (er && er.code === "ENOENT") return cb(null) + // Windows can EPERM on stat. Life is suffering. + if (er && er.code === "EPERM" && isWindows) + fixWinEPERM(p, options, er, cb) + if (st && st.isDirectory()) return rmdir(p, options, er, cb) @@ -269,7 +273,7 @@ function rimrafSync (p, options) { results = [p] } else { try { - fs.lstatSync(p) + options.lstatSync(p) results = [p] } catch (er) { results = glob.sync(p, options.glob) @@ -287,6 +291,10 @@ function rimrafSync (p, options) { } catch (er) { if (er.code === "ENOENT") return + + // Windows can EPERM on stat. Life is suffering. + if (er.code === "EPERM" && isWindows) + fixWinEPERMSync(p, options, er) } try { diff --git a/node_modules/run-async/package.json b/node_modules/run-async/package.json index 2a74e8a..472a619 100644 --- a/node_modules/run-async/package.json +++ b/node_modules/run-async/package.json @@ -1,79 +1,30 @@ { - "_args": [ - [ - "run-async@^0.1.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\inquirer" - ] - ], - "_from": "run-async@>=0.1.0 <0.2.0", - "_id": "run-async@0.1.0", - "_inCache": true, - "_installable": true, - "_location": "/run-async", - "_npmUser": { - "email": "admin@simonboudrias.com", - "name": "sboudrias" + "name": "run-async", + "version": "0.1.0", + "description": "Utility method to run function either synchronously or asynchronously using the common `this.async()` style.", + "main": "index.js", + "scripts": { + "test": "mocha -R spec" }, - "_npmVersion": "1.4.6", - "_phantomChildren": {}, - "_requested": { - "name": "run-async", - "raw": "run-async@^0.1.0", - "rawSpec": "^0.1.0", - "scope": null, - "spec": ">=0.1.0 <0.2.0", - "type": "range" + "repository": { + "type": "git", + "url": "git://github.com/SBoudrias/run-async" }, - "_requiredBy": [ - "/inquirer" + "keywords": [ + "flow", + "flow-control", + "async" ], - "_resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", - "_shasum": "c8ad4a5e110661e402a7d21b530e009f25f8e389", - "_shrinkwrap": null, - "_spec": "run-async@^0.1.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\inquirer", - "author": { - "email": "admin@simonboudrias.com", - "name": "Simon Boudrias" - }, + "author": "Simon Boudrias ", + "license": "MIT", "bugs": { "url": "https://github.com/SBoudrias/run-async/issues" }, + "homepage": "https://github.com/SBoudrias/run-async", "dependencies": { "once": "^1.3.0" }, - "description": "Utility method to run function either synchronously or asynchronously using the common `this.async()` style.", "devDependencies": { "mocha": "^1.21.4" - }, - "directories": {}, - "dist": { - "shasum": "c8ad4a5e110661e402a7d21b530e009f25f8e389", - "tarball": "http://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz" - }, - "homepage": "https://github.com/SBoudrias/run-async", - "keywords": [ - "async", - "flow", - "flow-control" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "sboudrias", - "email": "admin@simonboudrias.com" - } - ], - "name": "run-async", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/SBoudrias/run-async.git" - }, - "scripts": { - "test": "mocha -R spec" - }, - "version": "0.1.0" + } } diff --git a/node_modules/rx-lite/package.json b/node_modules/rx-lite/package.json index b082225..491ae6f 100644 --- a/node_modules/rx-lite/package.json +++ b/node_modules/rx-lite/package.json @@ -1,88 +1,38 @@ { - "_args": [ - [ - "rx-lite@^3.1.2", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\inquirer" - ] - ], - "_from": "rx-lite@>=3.1.2 <4.0.0", - "_id": "rx-lite@3.1.2", - "_inCache": true, - "_installable": true, - "_location": "/rx-lite", - "_nodeVersion": "0.12.7", - "_npmUser": { - "email": "matthew.podwysocki@gmail.com", - "name": "mattpodwysocki" - }, - "_npmVersion": "3.1.1", - "_phantomChildren": {}, - "_requested": { - "name": "rx-lite", - "raw": "rx-lite@^3.1.2", - "rawSpec": "^3.1.2", - "scope": null, - "spec": ">=3.1.2 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/inquirer" - ], - "_resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", - "_shasum": "19ce502ca572665f3b647b10939f97fd1615f102", - "_shrinkwrap": null, - "_spec": "rx-lite@^3.1.2", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\inquirer", + "name": "rx-lite", + "title": "Reactive Extensions for JavaScript (RxJS) Lite", + "description": "Lightweight library for composing asynchronous and event-based operations in JavaScript", + "version": "3.1.2", + "homepage": "https://github.com/Reactive-Extensions/RxJS", "author": { "name": "Cloud Programmability Team", "url": "https://github.com/Reactive-Extensions/RxJS/blob/master/authors.txt" }, + "repository": { + "type": "git", + "url": "https://github.com/Reactive-Extensions/RxJS.git" + }, + "licenses": [ + { + "type": "Apache License, Version 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + } + ], + "bugs": "https://github.com/Reactive-Extensions/RxJS/issues", + "jam": { + "main": "rx.lite.js" + }, "browser": { "index.js": "rx.lite.js" }, - "bugs": { - "url": "https://github.com/Reactive-Extensions/RxJS/issues" - }, "dependencies": {}, - "description": "Lightweight library for composing asynchronous and event-based operations in JavaScript", "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "19ce502ca572665f3b647b10939f97fd1615f102", - "tarball": "http://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz" - }, - "homepage": "https://github.com/Reactive-Extensions/RxJS", - "jam": { - "main": "rx.lite.js" - }, "keywords": [ - "Events", "React", "Reactive", + "Events", "Rx", "RxJS" ], - "licenses": [ - { - "type": "Apache License, Version 2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0.html" - } - ], - "main": "rx.lite.js", - "maintainers": [ - { - "name": "mattpodwysocki", - "email": "matthew.podwysocki@gmail.com" - } - ], - "name": "rx-lite", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/Reactive-Extensions/RxJS.git" - }, - "scripts": {}, - "title": "Reactive Extensions for JavaScript (RxJS) Lite", - "version": "3.1.2" + "main": "rx.lite.js" } diff --git a/node_modules/sass-lint/.eslintrc b/node_modules/sass-lint/.eslintrc index 1353aff..236fef8 100644 --- a/node_modules/sass-lint/.eslintrc +++ b/node_modules/sass-lint/.eslintrc @@ -135,8 +135,12 @@ rules: - global valid-jsdoc: - 2 - - prefer: - return: returns + - + requireParamDescription: true + requireReturnDescription: true + requireReturn: false + prefer: + return: "returns" wrap-iife: 2 yoda: - 2 diff --git a/node_modules/sass-lint/.github/ISSUE_TEMPLATE.md b/node_modules/sass-lint/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..c3c2dd5 --- /dev/null +++ b/node_modules/sass-lint/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,21 @@ + + + +What version of Sass Lint are you using? + +Please include any relevant parts of your configuration + +What did you do? Please include the actual source code causing the issue. + +What did you expect to happen? + +What actually happened? Please include any error messages given to you by Sass Lint. + +If you're using a IDE plugin have you tried the CLI too? diff --git a/node_modules/sass-lint/.github/PULL_REQUEST_TEMPLATE.md b/node_modules/sass-lint/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..cff9734 --- /dev/null +++ b/node_modules/sass-lint/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,24 @@ + + +**What do the changes you have made achieve?** + +**Are there any new warning messages?** + +**Have you written tests?** + +**Have you included relevant documentation** + +**Which issues does this resolve?** + +`` diff --git a/node_modules/sass-lint/.travis.yml b/node_modules/sass-lint/.travis.yml index 420d2ed..a2cd1c3 100644 --- a/node_modules/sass-lint/.travis.yml +++ b/node_modules/sass-lint/.travis.yml @@ -1,11 +1,8 @@ language: node_js node_js: - - '0.12' - '4' - '5' - node - - iojs -before_script: npm link after_success: npm run coveralls notifications: slack: diff --git a/node_modules/sass-lint/CHANGELOG.md b/node_modules/sass-lint/CHANGELOG.md index be70a87..d2af72b 100644 --- a/node_modules/sass-lint/CHANGELOG.md +++ b/node_modules/sass-lint/CHANGELOG.md @@ -1,5 +1,187 @@ # Sass Lint Changelog +## v1.10.2 + +**November 9th, 2016** + +**Changes** +* Reverted back to ESlint v2.x to prevent a breaking change in Node < v4 + +**Fixes** +* Fixed an exception for partial idents in `space-around-operator` [#940](https://github.com/sasstools/sass-lint/pull/940) +* Fixed an issue with negative numbers in `space-around-operator` [#945](https://github.com/sasstools/sass-lint/pull/945) + + +## v1.10.1 + +**November 7th, 2016** + +**Fixes** + +* Fixed an issue with the `--no-exit` `-q` flag not being respected and unhandled errors/exceptions being thrown by the CLI +* Fixed an issue with variable declarations showing as properties in the `no-duplicate-properties` rule [#937](https://github.com/sasstools/sass-lint/pull/936) +* Fixed an issue with variable declarations showing as properties in the `declarations-before-nesting` rule [#937](https://github.com/sasstools/sass-lint/pull/936) + +## v1.10.0 + +**November 6th, 2016** + +The 'you can ignore those bad habits again' update + +** :tada: DISABLE LINTERS :tada: ** +The ability to enable and disable linters on the fly has finally(!) been added [#677](https://github.com/sasstools/sass-lint/pull/677) [docs](https://github.com/sasstools/sass-lint/blob/master/docs/toggle-rules-in-src.md) + +A massive thank you to everyone who commented/contributed/reported and tested this feature this was very much a community effort here. An extra special thank you to +* [@donabrams](https://github.com/donabrams) + +For his initial hard work in getting this off the ground. There were lots of others who have fixed everything from test issues to AST issues to make this possible afterwards, so thanks to you too! + +**New Features** +* `max-warnings` which is available with the sass-lint CLI is now available as an option in your config file too [#857](https://github.com/sasstools/sass-lint/pull/857) +* **New Rule** `no-url-domains` rule [#846](https://github.com/sasstools/sass-lint/pull/846) [docs](https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-url-domains.md) +* **New Rule** `max-line-length` rule was added [#840](https://github.com/sasstools/sass-lint/pull/840) [docs](https://github.com/sasstools/sass-lint/blob/master/docs/rules/max-line-length.md) +* **New Rule** `max-file-line-count` rule was added [#842](https://github.com/sasstools/sass-lint/pull/842) [docs](https://github.com/sasstools/sass-lint/blob/master/docs/rules/max-file-line-count.md) +* **New Rule** `declarations-before-nesting` rule was added [#866](https://github.com/sasstools/sass-lint/pull/866) [docs](https://github.com/sasstools/sass-lint/blob/master/docs/rules/declarations-before-nesting.md) + +**Fixes** +* Fixed an issue with an un handled error being thrown in certain circumstances for the `space-before-colon` rule [#894](https://github.com/sasstools/sass-lint/pull/894) +* Operators in variable names are now handled correctly for the `variable-name-format` rule [#903](https://github.com/sasstools/sass-lint/pull/903) +* Fixed an issue with string values in the `shorthand-values` rule [#848](https://github.com/sasstools/sass-lint/pull/848) +* Fixed an issue with valid strict BEM producing an error in the `*-name-format` rules [#892](https://github.com/sasstools/sass-lint/pull/892) +* Fixed an issue with non-string user conventions in the `border-zero` rule [#913](https://github.com/sasstools/sass-lint/pull/913) +* Fixed an issue where BOM markers in files were causing parse errors or random errors/warnings [#893](https://github.com/sasstools/sass-lint/pull/893) +* Fixed an issue with interpolates properties in the `no-duplicate-properties` rule [#915](https://github.com/sasstools/sass-lint/pull/915) +* Fixed a possible error with invalid user conventions in the `border-zero` rule [#926](https://github.com/sasstools/sass-lint/pull/926) + +**Changes** +* Node 0.10 and 0.12 are no longer officially supported by sass-lint. We've not deliberately broken these builds but we will no longer be testing against them either [#896](https://github.com/sasstools/sass-lint/issues/896) & [#924](https://github.com/sasstools/sass-lint/pull/924) +* In future the `no-url-protocols` rule will not lint domains in URL's for now a new flag is added to mimic this behaviour. The new `no-url-domains` rule can be used instead [#813](https://github.com/sasstools/sass-lint/issues/813) +* Front matter such as those present in Jekyll templates will now be ignored in all files before passing to the AST / Linting [897](https://github.com/sasstools/sass-lint/pull/897) +* Running the tests no longer required sass-lint development to be `npm-link`ed or globally installed. [#911](https://github.com/sasstools/sass-lint/pull/911) +* The concentric property list in `property-sort-order` was updated to reflect the latest release [#922](https://github.com/sasstools/sass-lint/pull/922) + +**Updates** +* AST fixes have arrived with version 3.4.7 of gonzales-pe [#906](https://github.com/sasstools/sass-lint/pull/906) +* Updated to the latest versions of many other packages + +**Documentation** +* The documentation around configuring a rule was tidied up and made clearer [#910](https://github.com/sasstools/sass-lint/pull/910) + +**Special thanks to** + +* [bgriffith](https://github.com/bgriffith) +* [donabrams](https://github.com/donabrams) +* [danpurdy](https://github.com/DanPurdy) +* [danwaz](https://github.com/danwaz) +* [lucasjahn](https://github.com/lucasjahn) +* [mrjamesriley](https://github.com/mrjamesriley) +* [notrobin](https://github.com/nottrobin) +* [onishiweb](https://github.com/onishiweb) +* [richarddewit](https://github.com/richarddewit) + +## v1.9.1 + +**August 25, 2016** + +**Fixes** +* Fixed an issue with nth selectors in the `no-mergeable-selectors` rule [#834](https://github.com/sasstools/sass-lint/issues/834) +* Fixed an issue with atrule arguments containing functions in the `no-mergeable-selectors` rule [#826](https://github.com/sasstools/sass-lint/issues/826) +* Fixed an issue with hex colors being ignored in the `shorthand-values` rule [#836](https://github.com/sasstools/sass-lint/pull/836) + +## v1.9.0 + +**August 18, 2016** + +**Fixes** +* Fixed an issue with the indentation rule when it encountered at-rules with no block immediately preceding a map [#779](https://github.com/sasstools/sass-lint/issues/779) [#783](https://github.com/sasstools/sass-lint/issues/783) +* Fixed an issue in `single-lint-per-selector` where inline comments were seen as selectors [#789](https://github.com/sasstools/sass-lint/issues/789) +* Fixed an issue with interpolation in placeholders within the `bem-depth` rule [#782](https://github.com/sasstools/sass-lint/issues/782) +* Removed duplicated code from `no-mergeable-selectors` to helper methods + +**Documentation** +* Fixed typos in no-vendor-prefixes rule documentation [#787](https://github.com/sasstools/sass-lint/issues/787) +* Added link to Visual Studio extension [#815](https://github.com/sasstools/sass-lint/pull/815) + +**New Rules** +* Added the `no-color-hex` rule to disallow all hexadecimal colour definitions [#754](https://github.com/sasstools/sass-lint/issues/754) + +**Updates** +* Gonzales-pe updated to version 3.4.4 which fixes a lot of longstanding issues see the [Changelog](https://github.com/tonyganch/gonzales-pe/blob/dev/CHANGELOG.md) + +## v1.8.2 + +**June 23, 2016** + +Unfortunately it seems a reversion snuck into gonzales-pe's latest version so we're pinning it back where it was until it's fixed. Sorry.. + +## v1.8.1 + +**June 23, 2016** + +Parser patching + +Gonzales-pe had a few important updates so we chose to do a patch release to make sure everyone gets to benefit from less parse errors as soon as possible! + +**Fixes** +* Fixed an issue in `shorthand-values` where values within parenthesis would be ignored [#748](https://github.com/sasstools/sass-lint/issues/748) +* Corrected the documentation for `property-units` [#740](https://github.com/sasstools/sass-lint/issues/740) +* Fixed an issue where config files were not being recursively searched for [#756](https://github.com/sasstools/sass-lint/issues/756) + +**Updates** +* Gonzales-pe updated to version 3.3.5 [see changelog](https://github.com/tonyganch/gonzales-pe/blob/v3.3.5/CHANGELOG.md#21062016-version-335) [#746](https://github.com/sasstools/sass-lint/pull/746) + +## v1.8.0 + +**June 17, 2016** + +We're gonna need a bigger boat + +**Indentation** + +A lot of work on the indentation rule is present in 1.8 including the following: + +* Tabs are now supported and can be used as a valid option in your config [#592](https://github.com/sasstools/sass-lint/issues/592) +* LF and CRLF are now supported for both spaces and tabs. +* `.sass` support is now included (Could be a little buggy due to some discrepancies in the AST) [#611](https://github.com/sasstools/sass-lint/issues/611) +* Mixed spaces and tabs warnings are now correctly informing you if you've specified that you'll use spaces and it detects tabs. [#382](https://github.com/sasstools/sass-lint/issues/382) +* Indenting of multiline properties in media queries etc is now supported [#426](https://github.com/sasstools/sass-lint/issues/426) + +**Fixes** +* Fixed an issue with interpolated properties in the `shorthand-values` rule [#669](https://github.com/sasstools/sass-lint/issues/669) +* Corrected the name of the `pseudo-element` rule [#682](https://github.com/sasstools/sass-lint/pull/682) +* Corrected the name of the `no-empty-rulesets` rule [#684](https://github.com/sasstools/sass-lint/issues/684) +* Corrected the name of the `no-trailing-zero` rule [#685](https://github.com/sasstools/sass-lint/issues/685) +* Fixed an issue where partially matching rules affected each others severity levels [#687](https://github.com/sasstools/sass-lint/issues/687) +* Fixed an issue with nested properties in the `no-misspelled-properties` [#352](https://github.com/sasstools/sass-lint/issues/352) +* Fixed an issue with interpolated properties in the `no-misspelled-properties` [#679](https://github.com/sasstools/sass-lint/issues/679) +* Fixed an issue with interpolated selectors in the `no-mergeable-selectors` [#703](https://github.com/sasstools/sass-lint/issues/703) +* Added the absolute path module to fix an issue with Node 0.10 [#706](https://github.com/sasstools/sass-lint/pull/706) +* Added a new method and updated gulp-sass-lint to fix an config files and ignored files not working correctly [#452](https://github.com/sasstools/sass-lint/issues/452) +* Fixed an issue with the `!important` flag raising a lint warning within the `variable-for-property` rule [#714](https://github.com/sasstools/sass-lint/issues/714) +* Fixed an issue where sass-lint would try to lint a directory with a .scss or .sass extension, now sass-lint will only attempt to lint files :tada: [#719](https://github.com/sasstools/sass-lint/pull/719) & [#555](https://github.com/sasstools/sass-lint/issues/555) +* Fixed an issue where Sass color functions would raise lint warnings in the `no-color-keywords` rule [#717](https://github.com/sasstools/sass-lint/issues/717) +* Fixed an unhandled error with the `pseudo-element` rule [#671](https://github.com/sasstools/sass-lint/pull/671) + +**Changes** +* Added flexbox and outline properties to the recess order preset [#666](https://github.com/sasstools/sass-lint/issues/666) +* Added missing pseudo classes to our pseudo class master list [#675](https://github.com/sasstools/sass-lint/issues/675) +* Added pascal case format to all name format rules [#678](https://github.com/sasstools/sass-lint/issues/678) +* Included files in your config file can now be an array similar to the ignored files option [#668](https://github.com/sasstools/sass-lint/issues/668) +* Added PR and issue templates [#692](https://github.com/sasstools/sass-lint/pulls/692) +* Now testing on Node v6 [#699](https://github.com/sasstools/sass-lint/issues/699) +* Added the `ignore-non-standard` option to the `no-vendor-prefixes` rule. This allows you to blanket ignore the vendor prefixes on any non standard properties [#702](https://github.com/sasstools/sass-lint/issues/702) +* The `url-quotes` rule now highlights the beginning of the detect rather than the end [#712](https://github.com/sasstools/sass-lint/issues/712) +* All helper tests have been split and rearranged for ease of use when developing [#322](https://github.com/sasstools/sass-lint/pull/322) +* Moved away from our Gonzales-pe-sl fork back to gonzales-pe as we've made changes to the main AST now [#722](https://github.com/sasstools/sass-lint/pull/722) + +**New Rules** +* Added `pseudo-element` rule to enforce the use of single colons in pseudo classes and double colons in pseudo elements. [#662](https://github.com/sasstools/sass-lint/issues/662) +* Added `no-universal-selectors` rule to warn against the use of universal selectors (*) [#694](https://github.com/sasstools/sass-lint/issues/694) +* Added `no-attribute-selectors` rule to warn against the use of attribute selectors [#694](https://github.com/sasstools/sass-lint/issues/694) +* Added `no-combinators` rule to warn against the use of combinators [#694](https://github.com/sasstools/sass-lint/issues/694) +* Added `attribute-quotes` rule to enforce the use of the use of quotes in attribute values [#707](https://github.com/sasstools/sass-lint/issues/707) +* Added `no-disallowed-properties` rule to warn against the use of certain properties. [#546](https://github.com/sasstools/sass-lint/issues/546) + ## v1.7.0 **April 27, 2016** diff --git a/node_modules/sass-lint/README.md b/node_modules/sass-lint/README.md index 691d989..0d3cad3 100644 --- a/node_modules/sass-lint/README.md +++ b/node_modules/sass-lint/README.md @@ -7,6 +7,12 @@ A Node-only Sass linter for both `sass` and `scss` syntax! ## Install You can get `sass-lint` from [NPM](https://www.npmjs.com/package/sass-lint): +Install globally +``` +npm install -g sass-lint +``` + +To save to a project as a dev dependency ``` npm install sass-lint --save-dev ``` @@ -45,13 +51,26 @@ The following are options that you can use to config the Sass Linter. #### Files -The `files` option can either be set to a [glob](https://github.com/isaacs/node-glob) or it can be set to an object, where the key `include` is set to the glob you want to include, and `ignore` set to either a glob string or an array of glob strings that you would like to ignore. +The `files` option contains two properties, `include` and `ignore`. Both can be set to either a [glob](https://github.com/isaacs/node-glob) or an array of glob strings/file paths depending on your projects' needs and setup. +For example below we are providing a singular glob string to our include property and an array of patterns to our ignore property: ```yml files: include: 'sass/**/*.s+(a|c)ss' ignore: - - 'sass/vendor/**/*.*' + - 'sass/vendor/**/*.scss' + - 'sass/tests/**/*.scss' +``` + +As mentioned you can also provide an array to the include property like so +```yml +files: + include: + - 'sass/blocks/*.s+(a|c)ss' + - 'sass/elements/*.s+(a|c)ss' + ignore: + - 'sass/vendor/**/*.scss' + - 'sass/tests/**/*.scss' ``` #### Rules @@ -60,19 +79,97 @@ For all [rules](https://github.com/sasstools/sass-lint/tree/master/docs/rules), If you want to configure options, set the rule to an array, where the first item in the array is the severity, and the second item in the array is an object including the options you would like to set. -An example configuration of a rule with options look like the following: +Here is an example configuration of a rule, where we are specifying that breaking the [indentation rule](https://github.com/sasstools/sass-lint/blob/master/docs/rules/indentation.md) should be treated as an error (its severity set to two), and setting the `size` option of the rule to 2 spaces: ```yml -indentation: - - 2 - - - size: 2 +rules: + indentation: + - 2 + - + size: 2 ``` ### [Rules Documentation](https://github.com/sasstools/sass-lint/tree/master/docs/rules) --- +## Disabling Linters via Source + +Special comments can be used to disable and enable certain rules throughout your source files in a variety of scenarios. These can be useful when dealing with legacy code or with certain necessary code smells. You can read the documentation for this feature [here](https://github.com/sasstools/sass-lint/tree/master/docs/toggle-rules-in-src.md). + +Below are examples of how to use this feature: + + +### Disable a rule for the entire file + +```scss +// sass-lint:disable border-zero +p { + border: none; // No lint reported +} +``` + +### Disable more than 1 rule + +```scss +// sass-lint:disable border-zero, quotes +p { + border: none; // No lint reported + content: "hello"; // No lint reported +} +``` + +### Disable a rule for a single line + +```scss +p { + border: none; // sass-lint:disable-line border-zero +} +``` + +### Disable all lints within a block (and all contained blocks) + +```scss +p { + // sass-lint:disable-block border-zero + border: none; // No result reported +} + +a { + border: none; // Failing result reported +} +``` + +### Disable and enable again + +```scss +// sass-lint:disable border-zero +p { + border: none; // No result reported +} +// sass-lint:enable border-zero + +a { + border: none; // Failing result reported +} +``` + +### Disable/enable all linters + +```scss +// sass-lint:disable-all +p { + border: none; // No result reported +} +// sass-lint:enable-all + +a { + border: none; // Failing result reported +} +``` + +--- + ## CLI Sass Lint [`v1.1.0`](https://github.com/sasstools/sass-lint/releases/tag/v1.1.0) introduced the ability to run Sass Lint through a command line interface. See the [CLI Docs](https://github.com/sasstools/sass-lint/tree/master/docs/cli) for full documentation on how to use the CLI. @@ -102,6 +199,33 @@ or with long form flags sass-lint --config app/config/.sass-lint.yml '**/*.scss' --verbose --no-exit ``` +#### Including multiple source destinations +By default when specifying a directory/file to lint from the CLI you would do something similar to the following + +``` +sass-lint 'myapp/**/*.scss' -v -q +``` + +or with long form flags + +``` +sass-lint 'myapp/**/*.scss' --verbose --no-exit +``` +> Notice that you need to wrap glob patterns in quotation marks + +If you want to specify multiple input sources then you need to include a single comma and a space `, ` to separate each pattern as shown in the following +``` +sass-lint 'myapp/dir1/**.*.scss, myapp/dir2/**/*.scss' -v -q +``` + +or with long form flags + +``` +sass-lint 'myapp/dir1/**.*.scss, myapp/dir2/**/*.scss' --verbose --no-exit +``` + +If you don't include the extra space after the comma then the multiple patterns will not be interpreted correctly and you could see `sass-lint` fail. + #### Ignore files/patterns To add a list of files to ignore `tests/**/*.scss, dist/other.scss` into the mix you could do the following: ``` @@ -113,7 +237,7 @@ sass-lint --config app/config/.sass-lint.yml '**/*.scss' --verbose --no-exit --i ``` -> Notice that glob patterns need to be wrapped in quotation or single quote marks in order to be passed to sass-lint correctly and if you want to ignore multiple paths you also need to wrap it in quotation marks and seperate each pattern/file with a comma and a space `, `. +> Notice that glob patterns need to be wrapped in quotation or single quote marks in order to be passed to sass-lint correctly and if you want to ignore multiple paths you also need to wrap it in quotation marks and separate each pattern/file with a comma and a space `, `. This will be revisited and updated in `sass-lint` v2.0.0. @@ -123,6 +247,24 @@ For further information you can visit our CLI documentation linked below. --- +## Front matter + +Certain static site generators such as [Jekyll](http://jekyllrb.com/docs/frontmatter/) include the YAML front matter block at the top of their scss file. Sass-lint by default checks a file for this block and attempts to parse your Sass without this front matter. You can see an example of a front matter block below. + +```scss + +--- +# Only the main Sass file needs front matter (the dashes are enough) +--- + +.test { + color: red; +} + +``` + +--- + ## Contributions We welcome all contributions to this project but please do read our [contribution guidelines](https://github.com/sasstools/sass-lint/blob/master/CONTRIBUTING.md) first, especially before opening a pull request. It would also be good to read our [code of conduct](https://github.com/sasstools/sass-lint/blob/master/CODE_OF_CONDUCT.md). @@ -148,3 +290,5 @@ Our AST is [Gonzales-PE](https://github.com/tonyganch/gonzales-pe/tree/dev). Eac * [Sublime Text](https://github.com/skovhus/SublimeLinter-contrib-sass-lint) * [Brackets](https://github.com/petetnt/brackets-sass-lint) * [IntelliJ IDEA, RubyMine, WebStorm, PhpStorm, PyCharm](https://github.com/idok/sass-lint-plugin) +* [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=glen-84.sass-lint) +* [Vim](https://github.com/gcorne/vim-sass-lint) diff --git a/node_modules/sass-lint/appveyor.yml b/node_modules/sass-lint/appveyor.yml index 871df02..6b46be8 100644 --- a/node_modules/sass-lint/appveyor.yml +++ b/node_modules/sass-lint/appveyor.yml @@ -5,11 +5,10 @@ init: # Test against this version of Node.js environment: matrix: - - nodejs_version: '0.12' - nodejs_version: '4' - # Latest version of Node - nodejs_version: '5' - - nodejs_version: '1' + # Latest stable version of Node + - nodejs_version: 'stable' # Install scripts. (runs after repo cloning) install: @@ -17,8 +16,6 @@ install: - ps: Install-Product node $env:nodejs_version # install modules - npm install - # link - - npm link # Post-install test scripts. test_script: diff --git a/node_modules/sass-lint/bin/sass-lint.js b/node_modules/sass-lint/bin/sass-lint.js index 787e933..c4ee7b5 100644 --- a/node_modules/sass-lint/bin/sass-lint.js +++ b/node_modules/sass-lint/bin/sass-lint.js @@ -6,31 +6,29 @@ var program = require('commander'), lint = require('../index'); var configPath, - ignores, + config, configOptions = {}, exitCode = 0; -var tooManyWarnings = function (detects) { +var tooManyWarnings = function (detects, userConfig) { var warningCount = lint.warningCount(detects).count; - return warningCount > 0 && warningCount > program.maxWarnings; + return warningCount > 0 && warningCount > userConfig.options['max-warnings']; }; -var detectPattern = function (pattern) { - var detects; - - detects = lint.lintFiles(pattern, configOptions, configPath); +var detectPattern = function (pattern, userConfig) { + var detects = lint.lintFiles(pattern, configOptions, configPath); if (program.verbose) { lint.outputResults(detects, configOptions, configPath); } - if (lint.errorCount(detects).count || tooManyWarnings(detects)) { + if (lint.errorCount(detects).count || tooManyWarnings(detects, userConfig)) { exitCode = 1; } if (program.exit) { - lint.failOnError(detects); + lint.failOnError(detects, configOptions, configPath); } }; @@ -47,21 +45,15 @@ program .option('--max-warnings [integer]', 'Number of warnings to trigger nonzero exit code') .parse(process.argv); +configOptions.files = configOptions.files || {}; +configOptions.options = configOptions.options || {}; if (program.config && program.config !== true) { configPath = program.config; } if (program.ignore && program.ignore !== true) { - ignores = program.ignore.split(', '); - if (configOptions.hasOwnProperty('files')) { - configOptions.files.ignore = ignores; - } - else { - configOptions.files = { - 'ignore': ignores - }; - } + configOptions.files.ignore = program.ignore.split(', '); } if (program.syntax && ['sass', 'scss'].indexOf(program.syntax) > -1) { @@ -69,33 +61,26 @@ if (program.syntax && ['sass', 'scss'].indexOf(program.syntax) > -1) { } if (program.format && program.format !== true) { - if (configOptions.hasOwnProperty('options')) { - configOptions.options.formatter = program.format; - } - else { - configOptions.options = { - 'formatter': program.format - }; - } + configOptions.options.formatter = program.format; } if (program.output && program.output !== true) { - if (configOptions.hasOwnProperty('options')) { - configOptions.options['output-file'] = program.output; - } - else { - configOptions.options = { - 'output-file': program.output - }; - } + configOptions.options['output-file'] = program.output; } +if (program.maxWarnings && program.maxWarnings !== true) { + configOptions.options['max-warnings'] = program.maxWarnings; +} + +// load our config here so we only load it once for each file +config = lint.getConfig(configOptions, configPath); + if (program.args.length === 0) { - detectPattern(null); + detectPattern(null, config); } else { program.args.forEach(function (path) { - detectPattern(path); + detectPattern(path, config); }); } diff --git a/node_modules/sass-lint/data/properties.yml b/node_modules/sass-lint/data/properties.yml index e7b6aca..e817c78 100644 --- a/node_modules/sass-lint/data/properties.yml +++ b/node_modules/sass-lint/data/properties.yml @@ -270,6 +270,7 @@ justify-items justify-self kerning @keyframes +keyframes left letter-spacing lighting-color diff --git a/node_modules/sass-lint/data/pseudoClasses.yml b/node_modules/sass-lint/data/pseudoClasses.yml new file mode 100644 index 0000000..9326270 --- /dev/null +++ b/node_modules/sass-lint/data/pseudoClasses.yml @@ -0,0 +1,36 @@ +active +checked +default +disabled +empty +enabled +first +first-child +first-of-type +focus +hover +indeterminate +in-range +invalid +lang +last-child +last-of-type +left +link +not +nth-child +nth-last-child +nth-last-of-type +nth-of-type +only-child +only-of-type +optional +out-of-range +read-only +read-write +required +right +root +target +valid +visited diff --git a/node_modules/sass-lint/data/pseudoElements.yml b/node_modules/sass-lint/data/pseudoElements.yml new file mode 100644 index 0000000..47982a9 --- /dev/null +++ b/node_modules/sass-lint/data/pseudoElements.yml @@ -0,0 +1,6 @@ +after +before +first-letter +first-line +selection +backdrop diff --git a/node_modules/sass-lint/docs/cli/readme.md b/node_modules/sass-lint/docs/cli/readme.md index 739124d..9c1511a 100644 --- a/node_modules/sass-lint/docs/cli/readme.md +++ b/node_modules/sass-lint/docs/cli/readme.md @@ -2,7 +2,7 @@ Sass Lint can be run via its Command Line Interface (CLI). To do so, run `sass-lint` from the command line. -By default, the command will run against the glob defined by a user's `file.include` option in their config, or a glob (or single file) can be passed as the last argument to the CLI to be explicitly run against. +By default, the command will run against the glob / array of globs defined by a user's `file.include` option in their config, or a glob / array of globs (or single files) can be passed as the last argument to the CLI to be explicitly run against. > Please note that when using glob patterns such as `folder/**/*.scss` as a command line argument (files to be linted or ignored) you will need to wrap the pattern in quotes or escape the `*` characters to prevent bash/zsh from automatically expanding the glob pattern. @@ -22,3 +22,5 @@ Command Line Flag | Description `-s`,`--syntax` | Syntax to evaluate the given file(s) with, either sass or scss. Use with care: overrides filename extension-based syntax detection. `-v`,`--verbose` | Verbose output (fully formatted output) `-V`,`--version` | Outputs the version number of Sass Lint + +To see more on how to use the CLI you can view the examples included within sass-lint's [readme](https://github.com/sasstools/sass-lint/blob/develop/README.md#cli) diff --git a/node_modules/sass-lint/docs/options/config-file.md b/node_modules/sass-lint/docs/options/config-file.md index 4b8f2eb..c42aa76 100644 --- a/node_modules/sass-lint/docs/options/config-file.md +++ b/node_modules/sass-lint/docs/options/config-file.md @@ -1,5 +1,71 @@ # Config File -Option `config-file` will tell Sass Lint the path to a custom config file. `config-file` should be set to a path plus file name relative to where Sass Lint is being run from. If not included, Sass Lint will attempt to find the closest config file, or fall back to the default one. +### Configuration Options +When passing options directly to `Sass-lint` option `config-file` will tell Sass Lint the path to a custom config file. `config-file` should be set to a path plus file name relative to where Sass Lint is being run from OR an absolute path. If not included, Sass Lint will attempt to find the closest config file, or fall back to the default one. -Config File will only be respected if passed in as an option directly, not if it is already in a config file. +### Config File Options + +You may specify a config file in your current config file as follows: + +```yaml +options: + config-file: my-folder/my-other-config.yml +rules: + no-ids: 2 +``` + +The config file loaded from the `config-file` option will be treated as a base config file and as such will be extended with the rules and options in your main config. The path of this must be either an absolute path or a path relative to your main config file. + +**Absolute path** + +`/root/my/projects/config/extend/.sass-lint.yml` + +**Relative path** + +`extra-config/.sass-lint.yml` + +## Example + +**Project Structure** +``` +my-project/ + - .sass-lint-A.yml + - sub-folder/ + - .sass-lint-B.yml +``` + +**.sass-lint-A.yml** +```yml +options: + config-file: sub-folder/.sass-lint-B.yml +rules: + no-ids: 1 +``` + +**.sass-lint-B.yml** +```yml +rules: + no-ids: 2 + no-important: 1 +``` + +**start Sass-lint from the my-project directory** + +`sass-lint -c .sass-lint-A.yml` + + +In the scenario above the first config would load and merge the second config recursively. + +The resulting config you could expect would be: + +```yml +options: + config-file: sub-folder/.sass-lint-B.yml +rules: + no-ids: 1 + no-important: 1 +``` + +Notice how the B config's `no-ids` rule is ignored as we are 'extending' A from B. + +There is no limit to how many config files can be loaded, but please do be aware of circular dependencies. diff --git a/node_modules/sass-lint/docs/options/max-warnings.md b/node_modules/sass-lint/docs/options/max-warnings.md new file mode 100644 index 0000000..6467168 --- /dev/null +++ b/node_modules/sass-lint/docs/options/max-warnings.md @@ -0,0 +1,30 @@ +# Max warnings + +An error will be thrown if the total number of warnings exceeds the `max-warnings` setting. + +> Please note, if you're using this option with the sass-lint CLI and you're specifying the `--no-exit / -q` option too, you will not see an error but an error code of 1 will still be thrown. + +## Examples + +This can be set as a command-line option: + +``` bash +$ sass-lint --max-warnings 50 +``` + +In `.sass-lint.yml`: + +``` yaml +options: + max-warnings: 50 +``` + +Or inside a script: + +``` javascript +var sassLint = require('sass-lint'), + config = {options: {'max-warnings': 50}}; + +results = sassLint.lintFiles('sass/**/*.scss', config) +sassLint.failOnError(results, config); +``` diff --git a/node_modules/sass-lint/docs/rules/attribute-quotes.md b/node_modules/sass-lint/docs/rules/attribute-quotes.md new file mode 100644 index 0000000..290831d --- /dev/null +++ b/node_modules/sass-lint/docs/rules/attribute-quotes.md @@ -0,0 +1,61 @@ +# Attribute Quotes + +Rule `attribute-quotes` will enforce the use of the use of quotes in attribute values. + +## Options + +* `include`: `true`/`false` (defaults to `true`) + +## Examples + +### `include` + +When `include: true`, the following are allowed. When `include: false`, the following are disallowed: + +```scss + +span[lang="pt"] { + color: green; +} + +span[lang~="en-us"] { + color: blue; +} + +span[class^="main"] { + background-color: yellow; +} + +a[href*="example"] { + background-color: #CCCCCC; +} + +input[type="email" i] { + border-color: blue; +} +``` + +When `include: false`, the following are allowed. When `include: true`, the following are disallowed: + +```scss + +span[lang=pt] { + color: green; +} + +span[lang~=en-us] { + color: blue; +} + +span[class^=main] { + background-color: yellow; +} + +a[href*=example] { + background-color: #CCCCCC; +} + +input[type=email i] { + border-color: blue; +} +``` diff --git a/node_modules/sass-lint/docs/rules/border-zero.md b/node_modules/sass-lint/docs/rules/border-zero.md index a1377b7..dcd9e04 100644 --- a/node_modules/sass-lint/docs/rules/border-zero.md +++ b/node_modules/sass-lint/docs/rules/border-zero.md @@ -6,6 +6,8 @@ Rule `border-zero` will enforce whether one should use `0` or `none` when specif * `convention`: `'0'`/`'none'` (defaults to `0`) +> If an invalid convention is provided the rule will default back to `convention: '0'`. An extra warning/error will also be thrown on `line 1` `column 1` of a file with a lint issue to inform you of this fact. + ## Examples When `convention: '0'`, the following are allowed. When `convention: 'none'`, the following are disallowed: @@ -31,3 +33,17 @@ When `convention: 'none'`, the following are allowed. When `convention: '0'`, th border-left: none; } ``` + +### Invalid conventions + +When the invalid convention `convention: 'zero'` is supplied, the following are allowed as the rule defaults to `convention: '0'`. + +```scss +.foo { + border: none; +} + +.bar { + border-left: 0; +} +``` diff --git a/node_modules/sass-lint/docs/rules/class-name-format.md b/node_modules/sass-lint/docs/rules/class-name-format.md index f63b5c5..0a3fb28 100644 --- a/node_modules/sass-lint/docs/rules/class-name-format.md +++ b/node_modules/sass-lint/docs/rules/class-name-format.md @@ -120,6 +120,35 @@ When enabled, the following are disallowed: ## Example 4 +Settings: +- `convention: pascalcase` + +When enabled, the following are allowed: + +```scss +.PascalCase { + content: ''; +} + +.Foo { + @extend .AnotherPascalCase; +} +``` + +When enabled, the following are disallowed: + +```scss +.HYPHENATED-UPPERCASE { + content: ''; +} + +.foo { + @extend .snake_case; +} +``` + +## Example 5 + Settings: - `convention: snakecase` @@ -147,7 +176,7 @@ When enabled, the following are disallowed: } ``` -## Example 5 +## Example 6 Settings: - `convention: strictbem` @@ -162,6 +191,10 @@ When enabled, the following are allowed: .owner-name_mod-name_mod-val { content: ''; } + +.block-name__elem-name_mod-bool { + content: ''; +} ``` When enabled, the following are disallowed: @@ -176,7 +209,7 @@ When enabled, the following are disallowed: } ``` -## Example 6 +## Example 7 Settings: - `convention: hyphenatedbem` @@ -211,7 +244,7 @@ When enabled, the following are disallowed: } ``` -## Example 7 +## Example 8 Settings: - `convention: ^[_A-Z]+$` diff --git a/node_modules/sass-lint/docs/rules/declarations-before-nesting.md b/node_modules/sass-lint/docs/rules/declarations-before-nesting.md new file mode 100644 index 0000000..d68aebc --- /dev/null +++ b/node_modules/sass-lint/docs/rules/declarations-before-nesting.md @@ -0,0 +1,29 @@ +# Declarations Before Nesting + +Rule `declarations-before-nesting` will enforce that declarations should be written before nesting in a ruleset. + +## Examples + +When enabled, the following are allowed: + +```scss +.foo { + content: 'baz'; + + .bar { + content: 'qux'; + } +} +``` + +When enabled, the following are disallowed: + +```scss +.foo { + .bar { + content: 'qux'; + } + + content: 'baz'; +} +``` diff --git a/node_modules/sass-lint/docs/rules/function-name-format.md b/node_modules/sass-lint/docs/rules/function-name-format.md index 054dfaa..3648c62 100644 --- a/node_modules/sass-lint/docs/rules/function-name-format.md +++ b/node_modules/sass-lint/docs/rules/function-name-format.md @@ -83,6 +83,40 @@ When enabled, the following are disallowed: ## Example 3 +Settings: +- `allow-leading-underscore: false` +- `convention: pascalcase` + +When enabled, the following are allowed: + +```scss +@function PascalCase() { + @return "foo"; +} + +.foo { + content: AnotherPascalCase(); +} +``` + +When enabled, the following are disallowed: + +```scss +@function HYPHENATED-UPPERCASE() { + @return "foo"; +} + +@function _camelCaseWithLeadingUnderscore() { + @return "foo"; +} + +.foo { + content: snake_case(); +} +``` + +## Example 4 + Settings: - `allow-leading-underscore: false` - `convention: snakecase` @@ -115,7 +149,7 @@ When enabled, the following are disallowed: } ``` -## Example 4 +## Example 5 Settings: - `convention: strictbem` @@ -148,7 +182,7 @@ When enabled, the following are disallowed: } ``` -## Example 5 +## Example 6 Settings: - `convention: hyphenatedbem` @@ -181,7 +215,7 @@ When enabled, the following are disallowed: } ``` -## Example 6 +## Example 7 Settings: - `allow-leading-underscore: true` diff --git a/node_modules/sass-lint/docs/rules/id-name-format.md b/node_modules/sass-lint/docs/rules/id-name-format.md index 7b2517c..071a8c8 100644 --- a/node_modules/sass-lint/docs/rules/id-name-format.md +++ b/node_modules/sass-lint/docs/rules/id-name-format.md @@ -110,6 +110,23 @@ When enabled, the following are allowed: } ``` +## Example 4 + +Settings: +- `convention: pascalcase` + +When enabled, the following are allowed: + +```scss +#PascalCase { + content: ''; +} + +#Foo { + @extend #AnotherPascalCase; +} +``` + When enabled, the following are disallowed: ```scss @@ -122,7 +139,7 @@ When enabled, the following are disallowed: } ``` -## Example 4 +## Example 5 Settings: - `convention: snakecase` @@ -151,7 +168,7 @@ When enabled, the following are disallowed: } ``` -## Example 5 +## Example 6 Settings: - `convention: ^[_A-Z]+$` diff --git a/node_modules/sass-lint/docs/rules/indentation.md b/node_modules/sass-lint/docs/rules/indentation.md index 795b8ab..dbf76d2 100644 --- a/node_modules/sass-lint/docs/rules/indentation.md +++ b/node_modules/sass-lint/docs/rules/indentation.md @@ -1,10 +1,12 @@ # Indentation -Rule `indentation` will enforce an indentation size (in spaces) and ensure that tabs and spaces are not mixed. +Rule `indentation` will enforce an indentation size (tabs and spaces) and it will also ensure that tabs and spaces are not mixed. + +The mixed spaces and tabs warnings check will take into account what you have set in your config file whether it should expect to see spaces or tabs. If it encounters a tab anywhere in a file when your rule config doesn't specify tabs it will flag a lint warning, Similarly for any whitespace using spaces when tabs are specified. Obviously spaces between properties and values etc are ignored. ## Options -* `size`: `number` (defaults to `2`) +* `size`: `number` or `'tab'` (defaults to `2` spaces) ## Examples diff --git a/node_modules/sass-lint/docs/rules/max-file-line-count.md b/node_modules/sass-lint/docs/rules/max-file-line-count.md new file mode 100644 index 0000000..c588a46 --- /dev/null +++ b/node_modules/sass-lint/docs/rules/max-file-line-count.md @@ -0,0 +1,27 @@ +# Max File Line Count + +Rule `max-file-line-count` will enforce that a file's length doesn't exceed a certain number of lines + +## Options + +* `length`: `number`, (defaults to 300) + +## Examples + +When enabled, the following are disallowed: + +```scss +/* +* line count is represented along the +* left hand side of the following example +*/ + 1| .test { + 2| color: red + 3| } +===== +~ snip ~ +===== +299| .bar { +300| color: blue; +301| } +``` diff --git a/node_modules/sass-lint/docs/rules/max-line-length.md b/node_modules/sass-lint/docs/rules/max-line-length.md new file mode 100644 index 0000000..9e0b3aa --- /dev/null +++ b/node_modules/sass-lint/docs/rules/max-line-length.md @@ -0,0 +1,24 @@ +# Max Line Length + +Rule `max-line-length` will enforce that lines do not exceed a max length / limit. + +## Options + +* `length`: `number`, (defaults to 80) + +## Examples + +When enabled, the following are disallowed: + +```scss +.really--long--class-name--that-unfortunately--isnt--very--succint--and-looks-stupid { + color: red; +} + +// ============================================================================== +// +// This comment is too long clearly, we should probably make sure we have a rule to +// determine when we breach this length +// +// ============================================================================== +``` diff --git a/node_modules/sass-lint/docs/rules/mixin-name-format.md b/node_modules/sass-lint/docs/rules/mixin-name-format.md index 2bbbbe3..82d59d6 100644 --- a/node_modules/sass-lint/docs/rules/mixin-name-format.md +++ b/node_modules/sass-lint/docs/rules/mixin-name-format.md @@ -84,6 +84,40 @@ When enabled, the following are disallowed: ## Example 3 +Settings: +- `allow-leading-underscore: false` +- `convention: pascalcase` + +When enabled, the following are allowed: + +```scss +@mixin PascalCase() { + content: ''; +} + +.foo { + @include AnotherPascalCase(); +} +``` + +When enabled, the following are disallowed: + +```scss +@mixin HYPHENATED-UPPERCASE() { + content: ''; +} + +@mixin _camelCaseWithLeadingUnderscore() { + content: ''; +} + +.foo { + @include snake_case(); +} +``` + +## Example 4 + Settings: - `allow-leading-underscore: false` - `convention: snakecase` @@ -116,7 +150,7 @@ When enabled, the following are disallowed: } ``` -## Example 4 +## Example 5 Settings: - `convention: strictbem` @@ -149,7 +183,7 @@ When enabled, the following are disallowed: } ``` -## Example 5 +## Example 6 Settings: - `convention: hyphenatedbem` @@ -183,7 +217,7 @@ When enabled, the following are disallowed: ``` -## Example 6 +## Example 7 Settings: - `allow-leading-underscore: true` diff --git a/node_modules/sass-lint/docs/rules/no-attribute-selectors.md b/node_modules/sass-lint/docs/rules/no-attribute-selectors.md new file mode 100644 index 0000000..3d390dd --- /dev/null +++ b/node_modules/sass-lint/docs/rules/no-attribute-selectors.md @@ -0,0 +1,37 @@ +# No Attribute Selectors + +Rule `no-attribute-selectors` will warn against the use of attribute selectors. + +## Examples + +When enabled, the following are disallowed: + +```scss +[autoplay] { + content: 'foo'; +} + +[lang=en] { + content: 'bar'; +} + +[lang~=en-us] { + content: 'baz'; +} + +[lang|=us] { + content: 'qux'; +} + +[href^="#"] { + content: 'norf'; +} + +[href$=".com"] { + content: 'foo'; +} + +[href*=news] { + content: 'bar'; +} +``` diff --git a/node_modules/sass-lint/docs/rules/no-color-hex.md b/node_modules/sass-lint/docs/rules/no-color-hex.md new file mode 100644 index 0000000..9d55d95 --- /dev/null +++ b/node_modules/sass-lint/docs/rules/no-color-hex.md @@ -0,0 +1,33 @@ +# No Color Hex + +Rule `no-color-hex` will disallow the use of hexadecimal colors + +## Examples + +When enabled the following are disallowed. + +```scss +$foo-color: #456; + +.bar { + background: linear-gradient(top, #3ff, #ddd); +} + +.baz { + color: #fff; +} +``` + +When enabled the following are allowed: + +```scss +$foo-color: red; + +.bar { + background: linear-gradient(top, blue, green); +} + +.baz { + color: white; +} +``` diff --git a/node_modules/sass-lint/docs/rules/no-combinators.md b/node_modules/sass-lint/docs/rules/no-combinators.md new file mode 100644 index 0000000..d706031 --- /dev/null +++ b/node_modules/sass-lint/docs/rules/no-combinators.md @@ -0,0 +1,25 @@ +# No Combinators + +Rule `no-combinators` will warn against the use of combinators. + +## Examples + +When enabled, the following are disallowed: + +```scss +.foo > .bar { + content: 'foo'; +} + +.foo ~ .bar { + content: 'bar'; +} + +.foo + .bar { + content: 'baz'; +} + +.foo .bar { + content: 'qux'; +} +``` diff --git a/node_modules/sass-lint/docs/rules/no-disallowed-properties.md b/node_modules/sass-lint/docs/rules/no-disallowed-properties.md new file mode 100644 index 0000000..f1309ed --- /dev/null +++ b/node_modules/sass-lint/docs/rules/no-disallowed-properties.md @@ -0,0 +1,30 @@ +# No Disallowed Properties + +Rule `no-disallowed-properties` will warn against the use of certain properties. + +## Options + +* `properties`: `[array of disallowed properties]` (defaults to empty array `[]`). + +## Examples + +When `properties` contains a property value of `z-index` as shown below: + +```yaml +no-disallowed-properties: + - 1 + - + 'properties': + - 'z-index' +``` + +The following would not be allowed: + +```scss + +// z-index property is not allowed +.foo { + z-index: 10; +} + +``` diff --git a/node_modules/sass-lint/docs/rules/no-mergeable-selectors.md b/node_modules/sass-lint/docs/rules/no-mergeable-selectors.md index 506b196..c66d341 100644 --- a/node_modules/sass-lint/docs/rules/no-mergeable-selectors.md +++ b/node_modules/sass-lint/docs/rules/no-mergeable-selectors.md @@ -66,3 +66,7 @@ div a { content: ''; } ``` + +### Note for Sass syntax users + +Due to a bug in the current version of the AST we use, gonzales-pe, we are currently unable to enforce this rule within media queries, SCSS syntax is unaffected. We hope to rectify this soon. diff --git a/node_modules/sass-lint/docs/rules/no-universal-selectors.md b/node_modules/sass-lint/docs/rules/no-universal-selectors.md new file mode 100644 index 0000000..e7411c0 --- /dev/null +++ b/node_modules/sass-lint/docs/rules/no-universal-selectors.md @@ -0,0 +1,30 @@ +# No Universal Selectors + +Rule `no-universal-selectors` will warn against the use of `*` (universal) selectors. + +## Examples + +When enabled, the following are disallowed: + +```scss +* { + content: 'foo'; +} + +* [lang^=en] { + content: 'bar'; +} + +*.warning { + content: 'baz'; +} + +*#maincontent { + content: 'qux'; +} + +*:before, +*:after { + content: 'norf'; +} +``` diff --git a/node_modules/sass-lint/docs/rules/no-url-domains.md b/node_modules/sass-lint/docs/rules/no-url-domains.md new file mode 100644 index 0000000..8c536b1 --- /dev/null +++ b/node_modules/sass-lint/docs/rules/no-url-domains.md @@ -0,0 +1,37 @@ +# No Url Domains + +Rule `no-url-domains` will enforce that domains are not used within urls. + +## Examples + +When enabled, the following are allowed: + +```scss +.foo { + background-image: url('/img/bar.png'); +} + +.foo { + background-image: url('img/bar.png'); +} + +.foo { + background-image: url('bar.png'); +} +``` + +When enabled, the following are disallowed: + +```scss +.foo { + background-image: url('https://foo.com/img/bar.png'); +} + +.foo { + background-image: url('http://foo.com/img/bar.png'); +} + +.foo { + background-image: url('//foo.com/img/bar.png'); +} +``` diff --git a/node_modules/sass-lint/docs/rules/no-url-protocols.md b/node_modules/sass-lint/docs/rules/no-url-protocols.md index ebf620b..50baa5f 100644 --- a/node_modules/sass-lint/docs/rules/no-url-protocols.md +++ b/node_modules/sass-lint/docs/rules/no-url-protocols.md @@ -2,9 +2,17 @@ Rule `no-url-protocols` will enforce that protocols and domains are not used within urls. +## Options + +* `allow-protocol-relative-urls`: `true`/`false` (defaults to `false`) +> This option is scheduled to be deprecated in favour of the [no-url-domains](https://github.com/sasstools/sass-lint/blob/develop/docs/rules/no-url-domains.md) rule in sass-lint 2.0. + ## Examples -When enabled, the following are allowed: +### `allow-protocol-relative-urls` + + +When `allow-protocol-relative-urls: false`, the following are allowed: ```scss .foo { @@ -20,7 +28,7 @@ When enabled, the following are allowed: } ``` -When enabled, the following are disallowed: +When `allow-protocol-relative-urls: false`, the following are disallowed: ```scss .foo { @@ -35,3 +43,35 @@ When enabled, the following are disallowed: background-image: url('//foo.com/img/bar.png'); } ``` + +When `allow-protocol-relative-urls: true`, the following are allowed: + +```scss +.foo { + background-image: url('//foo.com/img/bar.png'); +} + +.foo { + background-image: url('/img/bar.png'); +} + +.foo { + background-image: url('img/bar.png'); +} + +.foo { + background-image: url('bar.png'); +} +``` + +When `allow-protocol-relative-urls: true`, the following are disallowed: + +```scss +.foo { + background-image: url('https://foo.com/img/bar.png'); +} + +.foo { + background-image: url('http://foo.com/img/bar.png'); +} +``` diff --git a/node_modules/sass-lint/docs/rules/no-vendor-prefixes.md b/node_modules/sass-lint/docs/rules/no-vendor-prefixes.md index cc8a9e8..957f9cf 100644 --- a/node_modules/sass-lint/docs/rules/no-vendor-prefixes.md +++ b/node_modules/sass-lint/docs/rules/no-vendor-prefixes.md @@ -11,6 +11,7 @@ List of prefixes affected by default: * `additional-identifiers`: `[array of additional prefixes to check for]` (defaults to empty array `[]`) * `excluded-identifiers`: `[array of prefixes to exclude checking for]` (defaults to empty array `[]`) +* `ignore-non-standard`: `true`:`false` (defaults to `false`) ## Examples @@ -38,14 +39,16 @@ When enabled, the following are disallowed: } ``` -When `additional-identifiers` contains a custom prefix value of `test` as show below +### Additional Identifiers + +When `additional-identifiers` contains a custom prefix value of `khtml` as show below ```yaml -no-vendor-prefix: +no-vendor-prefixes: - 1 - - 'additional-identifiers': - - 'khtml' + additional-identifiers: + - khtml ``` The following would now also be disallowed @@ -56,15 +59,17 @@ The following would now also be disallowed } ``` +### Excluded Identifiers + When `excluded-identifiers` contains currently disallowed prefix values such as `webkit` and `moz` as show below ```yaml -no-vendor-prefix: +no-vendor-prefixes: - 1 - - 'excluded-identifiers': - - 'webkit' - - 'moz' + excluded-identifiers: + - webkit + - moz ``` The following would now be allowed @@ -95,3 +100,27 @@ While the following would remain disallowed -ms-hyphenate-limit-lines: no-limit; } ``` + +### Ignore Non Standard + +`ignore-non-standard` is an option that allows you to specify whether only standard properties from our [properties list](https://github.com/sasstools/sass-lint/blob/master/data/properties.yml) should be affected by this rule or if any prefixed property / element should be affected. + +When `ignore-non-standard` is set to `false` the following are disallowed, when `ignore-non-standard` is set to `true` the following are allowed: + +```scss + +html { + -webkit-tap-highlight-color: $link-color-hover; +} + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} +``` diff --git a/node_modules/sass-lint/docs/rules/placeholder-name-format.md b/node_modules/sass-lint/docs/rules/placeholder-name-format.md index 9cb3a68..a9f9866 100644 --- a/node_modules/sass-lint/docs/rules/placeholder-name-format.md +++ b/node_modules/sass-lint/docs/rules/placeholder-name-format.md @@ -84,6 +84,40 @@ When enabled, the following are disallowed: ## Example 3 +Settings: +- `allow-leading-underscore: false` +- `convention: pascalcase` + +When enabled, the following are allowed: + +```scss +%PascalCase { + content: ''; +} + +.foo { + @extend %AnotherPascalCase; +} +``` + +When enabled, the following are disallowed: + +```scss +%HYPHENATED-UPPERCASE { + content: ''; +} + +%_camelCaseWithLeadingUnderscore { + content: ''; +} + +.foo { + @extend %snake_case; +} +``` + +## Example 4 + Settings: - `allow-leading-underscore: false` - `convention: snakecase` @@ -116,7 +150,7 @@ When enabled, the following are disallowed: } ``` -## Example 4 +## Example 5 Settings: - `convention: strictbem` @@ -149,7 +183,7 @@ When enabled, the following are disallowed: } ``` -## Example 5 +## Example 6 Settings: - `convention: hyphenatedbem` @@ -182,7 +216,7 @@ When enabled, the following are disallowed: } ``` -## Example 6 +## Example 7 Settings: - `allow-leading-underscore: true` diff --git a/node_modules/sass-lint/docs/rules/property-units.md b/node_modules/sass-lint/docs/rules/property-units.md index 5335d54..fc9df8c 100644 --- a/node_modules/sass-lint/docs/rules/property-units.md +++ b/node_modules/sass-lint/docs/rules/property-units.md @@ -30,7 +30,7 @@ When enabled, `global` is set to `['px']`, and `per-property` is set to `{ width ``` -When enabled, `globally-allowed-units` is set to `['em']`, and `units-allowed-for-properties` is set to `{ width: ['rem'] }` the following are allowed. +When enabled, `global` is set to `['em']`, and `per-property` is set to `{ width: ['rem'] }` the following are allowed. ```scss @@ -47,4 +47,3 @@ $sizes: ( small: 2px ); ``` - diff --git a/node_modules/sass-lint/docs/rules/pseudo-element.md b/node_modules/sass-lint/docs/rules/pseudo-element.md new file mode 100644 index 0000000..83d7544 --- /dev/null +++ b/node_modules/sass-lint/docs/rules/pseudo-element.md @@ -0,0 +1,32 @@ +# Pseudo-element + +Rule `pseudo-element` will enforce that: + +* Pseudo-**elements** must start with **double colons**. +* Pseudo-**classes** must start with **single colon**. + +## Examples + +When enabled, the following are allowed: + +```scss +.foo::before { + content: "bar"; +} + +.foo:hover { + content: "bar"; +} +``` + +When enabled, the following are disallowed: + +```scss +.foo:before { + content: "bar"; +} + +.foo::hover { + content: "bar"; +} +``` diff --git a/node_modules/sass-lint/docs/rules/variable-for-property.md b/node_modules/sass-lint/docs/rules/variable-for-property.md index 850667a..07a4e9f 100644 --- a/node_modules/sass-lint/docs/rules/variable-for-property.md +++ b/node_modules/sass-lint/docs/rules/variable-for-property.md @@ -8,6 +8,8 @@ There are no properties by default, except for reserved words listed below which * none * currentColor +The `!important` flag will also be excluded when used. + ## Options * `properties`: `[array of property names]` (defaults to empty array `[]`) @@ -62,3 +64,21 @@ When `properties` contains the values shown in the options section example the f } ``` + +The `!important` flag will be excluded from any lint warnings. + +For example if `properties` contains the value `color` the following would be disallowed + +```scss +.foo { + color: red !important; +} +``` + +The following would be allowed + +```scss +.foo { + color: $red-var !important; +} +``` diff --git a/node_modules/sass-lint/docs/rules/variable-name-format.md b/node_modules/sass-lint/docs/rules/variable-name-format.md index df819ef..5d6e1f5 100644 --- a/node_modules/sass-lint/docs/rules/variable-name-format.md +++ b/node_modules/sass-lint/docs/rules/variable-name-format.md @@ -67,6 +67,33 @@ $_camelCaseWithLeadingUnderscore: 1px; ## Example 3 +Settings: +- `allow-leading-underscore: false` +- `convention: pascalcase` + +When enabled, the following are allowed: + +```scss +$PascalCase: 1px; + +.foo { + width: $AnotherPascalCase; +} +``` + +When enabled, the following are disallowed: + +```scss +$HYPHENATED-UPPERCASE: 1px; +$_camelCaseWithLeadingUnderscore: 1px; + +.foo { + width: $snake_case; +} +``` + +## Example 4 + Settings: - `allow-leading-underscore: false` - `convention: snakecase` @@ -92,7 +119,7 @@ $_snake_case_with_leading_underscore: 1px; } ``` -## Example 4 +## Example 5 Settings: - `convention: strictbem` @@ -119,7 +146,7 @@ $HYPHENATED-UPPERCASE: 1px; } ``` -## Example 5 +## Example 6 Settings: - `convention: hyphenatedbem` @@ -146,7 +173,7 @@ $HYPHENATED-UPPERCASE: 1px; } ``` -## Example 6 +## Example 7 Settings: - `allow-leading-underscore: true` diff --git a/node_modules/sass-lint/docs/sass-lint.yml b/node_modules/sass-lint/docs/sass-lint.yml index 3de8a76..682ec6c 100644 --- a/node_modules/sass-lint/docs/sass-lint.yml +++ b/node_modules/sass-lint/docs/sass-lint.yml @@ -9,6 +9,8 @@ options: formatter: html # Output file instead of logging results output-file: 'linters/sass-lint.html' + # Raise an error if more than 50 warnings are generated + max-warnings: 50 # File Options files: include: 'sass/**/*.s+(a|c)ss' diff --git a/node_modules/sass-lint/docs/toggle-rules-in-src.md b/node_modules/sass-lint/docs/toggle-rules-in-src.md new file mode 100644 index 0000000..05e5ba7 --- /dev/null +++ b/node_modules/sass-lint/docs/toggle-rules-in-src.md @@ -0,0 +1,71 @@ +# Toggling Rules Inside Source Files + +For special cases where a particular lint doesn't make sense in a specific area of a file, special inline comments can be used to enable/disable linters. Some examples are provided below: + +## Disable a rule for the entire file + +```scss +// sass-lint:disable border-zero +p { + border: none; // No lint reported +} +``` + +## Disable more than 1 rule + +```scss +// sass-lint:disable border-zero, quotes +p { + border: none; // No lint reported + content: "hello"; // No lint reported +} +``` + +## Disable a rule for a single line + +```scss +p { + border: none; // sass-lint:disable-line border-zero +} +``` + +## Disable all lints within a block (and all contained blocks) + +```scss +p { + // sass-lint:disable-block border-zero + border: none; // No result reported +} + +a { + border: none; // Failing result reported +} +``` + +## Disable and enable again + +```scss +// sass-lint:disable border-zero +p { + border: none; // No result reported +} +// sass-lint:enable border-zero + +a { + border: none; // Failing result reported +} +``` + +## Disable/enable all linters + +```scss +// sass-lint:disable-all +p { + border: none; // No result reported +} +// sass-lint:enable-all + +a { + border: none; // Failing result reported +} +``` diff --git a/node_modules/sass-lint/index.js b/node_modules/sass-lint/index.js index 252646f..f3ff5b5 100644 --- a/node_modules/sass-lint/index.js +++ b/node_modules/sass-lint/index.js @@ -2,13 +2,19 @@ var slConfig = require('./lib/config'), groot = require('./lib/groot'), + exceptions = require('./lib/exceptions'), helpers = require('./lib/helpers'), slRules = require('./lib/rules'), + ruleToggler = require('./lib/ruleToggler'), glob = require('glob'), path = require('path'), - fs = require('fs-extra'); + fs = require('fs-extra'), + globule = require('globule'); -var sassLint = function (config) { +var getToggledRules = ruleToggler.getToggledRules, + isResultEnabled = ruleToggler.isResultEnabled; + +var sassLint = function (config) { // eslint-disable-line no-unused-vars config = require('./lib/config')(config); return; }; @@ -100,7 +106,9 @@ sassLint.lintText = function (file, options, configPath) { detects, results = [], errors = 0, - warnings = 0; + warnings = 0, + ruleToggles = null, + isEnabledFilter = null; try { ast = groot(file.text, file.format, file.filename); @@ -119,8 +127,12 @@ sassLint.lintText = function (file, options, configPath) { } if (ast.content && ast.content.length > 0) { + ruleToggles = getToggledRules(ast); + isEnabledFilter = isResultEnabled(ruleToggles); + rules.forEach(function (rule) { - detects = rule.rule.detect(ast, rule); + detects = rule.rule.detect(ast, rule) + .filter(isEnabledFilter); results = results.concat(detects); if (detects.length) { if (rule.severity === 1) { @@ -143,6 +155,31 @@ sassLint.lintText = function (file, options, configPath) { }; }; +/** + * Handles ignored files for plugins such as the gulp plugin. Checks every file passed to it against + * the ignores as specified in our users config or passed in options. + * + * @param {object} file - The file/text to be linted + * @param {object} options - The user defined options directly passed in + * @param {object} configPath - Path to a config file + * @returns {object} Return the results of lintText - a results object + */ +sassLint.lintFileText = function (file, options, configPath) { + var config = this.getConfig(options, configPath), + ignores = config.files ? config.files.ignore : []; + + if (!globule.isMatch(ignores, file.filename)) { + return this.lintText(file, options, configPath); + } + + return { + 'filePath': file.filename, + 'warningCount': 0, + 'errorCount': 0, + 'messages': [] + }; +}; + /** * Takes a glob pattern or target string and creates an array of files as targets for * linting taking into account any user specified ignores. For each resulting file sassLint.lintText @@ -156,31 +193,50 @@ sassLint.lintText = function (file, options, configPath) { sassLint.lintFiles = function (files, options, configPath) { var that = this, results = [], + includes = [], ignores = ''; + // Files passed as a string on the command line if (files) { ignores = this.getConfig(options, configPath).files.ignore || ''; - files = glob.sync(files, {ignore: ignores}); + if (files.indexOf(', ') !== -1) { + files.split(', ').forEach(function (pattern) { + includes = includes.concat(glob.sync(pattern, {ignore: ignores, nodir: true})); + }); + } + else { + includes = glob.sync(files, {ignore: ignores, nodir: true}); + } } + // If not passed in then we look in the config file else { files = this.getConfig(options, configPath).files; + // A glob pattern of files can be just a string if (typeof files === 'string') { - files = glob.sync(files); + includes = glob.sync(files, {nodir: true}); } - else { - files = glob.sync(files.include, { - 'ignore': files.ignore + // Look into the include property of files and check if there's an array of files + else if (files.include && files.include instanceof Array) { + files.include.forEach(function (pattern) { + includes = includes.concat(glob.sync(pattern, {ignore: files.ignore, nodir: true})); }); } + // Or there is only one pattern in the include property of files + else { + includes = glob.sync(files.include, {ignore: files.ignore, nodir: true}); + } } - files.forEach(function (file) { - var lint = that.lintText({ - 'text': fs.readFileSync(file), - 'format': options.syntax ? options.syntax : path.extname(file).replace('.', ''), - 'filename': file - }, options, configPath); - results.push(lint); + includes.forEach(function (file, index) { + // Only lint non duplicate files from our glob results + if (includes.indexOf(file) === index) { + var lint = that.lintText({ + 'text': fs.readFileSync(file), + 'format': options.syntax ? options.syntax : path.extname(file).replace('.', ''), + 'filename': file + }, options, configPath); + results.push(lint); + } }); return results; @@ -239,14 +295,30 @@ sassLint.outputResults = function (results, options, configPath) { * Throws an error if there are any errors detected. The error includes a count of all errors * and a list of all files that include errors. * - * @param {object} results our results object + * @param {object} results - our results object + * @param {object} [options] - extra options to use when running failOnError, e.g. max-warnings + * @param {string} [configPath] - path to the config file * @returns {void} */ -sassLint.failOnError = function (results) { - var errorCount = this.errorCount(results); +sassLint.failOnError = function (results, options, configPath) { + // Default parameters + options = typeof options !== 'undefined' ? options : {}; + configPath = typeof configPath !== 'undefined' ? configPath : null; + + var errorCount = this.errorCount(results), + warningCount = this.warningCount(results), + configOptions = this.getConfig(options, configPath).options; if (errorCount.count > 0) { - throw new Error(errorCount.count + ' errors were detected in \n- ' + errorCount.files.join('\n- ')); + throw new exceptions.SassLintFailureError(errorCount.count + ' errors were detected in \n- ' + errorCount.files.join('\n- ')); + } + + if (!isNaN(configOptions['max-warnings']) && warningCount.count > configOptions['max-warnings']) { + throw new exceptions.MaxWarningsExceededError( + 'Number of warnings (' + warningCount.count + + ') exceeds the allowed maximum of ' + configOptions['max-warnings'] + + '.\n' + ); } }; diff --git a/node_modules/sass-lint/lib/config-helpers.js b/node_modules/sass-lint/lib/config-helpers.js new file mode 100644 index 0000000..6ef11aa --- /dev/null +++ b/node_modules/sass-lint/lib/config-helpers.js @@ -0,0 +1,107 @@ +var yaml = require('js-yaml'), + fs = require('fs'), + path = require('path'), + merge = require('merge'), + pathIsAbsolute = require('path-is-absolute'); + +/** + * Loads the default sass-lint configuration file + * + * @returns {Object} The default sass-lint configuration + */ +var loadDefaults = function loadDefaults () { + return yaml.safeLoad(fs.readFileSync(path.join(__dirname, 'config', 'sass-lint.yml'), 'utf8')); +}; + +/** + * Attempts to traverse the tree looking for the specified file + * + * @param {String} configPath - The path to look for the file. + * @param {String} filename - The name of the file. + * @returns {String} The resolved path + */ +var findFile = function findFile (configPath, filename) { + var HOME = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE, + dirname = null, + parentDirname = null; + + configPath = configPath || path.join(process.cwd(), filename); + + if (configPath && fs.existsSync(configPath)) { + return fs.realpathSync(configPath); + } + dirname = path.dirname(configPath); + parentDirname = path.dirname(dirname); + + if (dirname === null || dirname === HOME || dirname === parentDirname) { + return null; + } + configPath = path.join(parentDirname, filename); + + return findFile(configPath, filename); +}; + +/** + * Loads a config file from a specified path if it exists. The resolved config will be returned + * or a blank config will be in it's place. + * + * @param {String} cPath - The path to the config file + * @returns {Object} The configuration object + */ +var loadConfig = function (cPath) { + var configPath = cPath, + resolvedConfig = {}; + + if (configPath) { + if (fs.existsSync(configPath)) { + resolvedConfig = yaml.safeLoad(fs.readFileSync(configPath, 'utf8')) || {}; + } + } + + return { + options: resolvedConfig.options || {}, + files: resolvedConfig.files || {}, + rules: resolvedConfig.rules || {} + }; +}; + +/** + * Checks a config file to see if another config file is specified, if it is, the file is laoded + * and merged with the current configuration object. + * + * @param {Object} config - The current configuration + * @param {String} curConfPath - The current path(incl filename) to the configuration object passed as 'config' + * @returns {Object} The merged configuration object + */ +var checkForConfigExtend = function (config, curConfPath) { + var mergedConfig = config, + subConfig = config.options['config-file'] || false, + confPath, + resolvedSubConfig; + + if (subConfig) { + if (!pathIsAbsolute(subConfig)) { + // Process.cwd() in most IDE's will be / so therefore we need to pass the current directory + // of the config from which you are 'extending' or we resort to process.cwd() which on the CLI + // will be correct + confPath = curConfPath ? path.dirname(curConfPath) : process.cwd(); + subConfig = path.resolve(confPath, subConfig); + } + // Attempt to load the new found config file + resolvedSubConfig = loadConfig(subConfig, curConfPath); + // Check the new config file to see if it too is extending + resolvedSubConfig = checkForConfigExtend(resolvedSubConfig, subConfig); + // Merge our configs with the first encountered being the most important, down to the last config + // being the least. + mergedConfig = merge.recursive(resolvedSubConfig, config); + } + + return mergedConfig; +}; + +module.exports = { + loadDefaults: loadDefaults, + findFile: findFile, + loadConfig: loadConfig, + checkForConfigExtend: checkForConfigExtend +}; diff --git a/node_modules/sass-lint/lib/config.js b/node_modules/sass-lint/lib/config.js index 84ced30..6f4f559 100644 --- a/node_modules/sass-lint/lib/config.js +++ b/node_modules/sass-lint/lib/config.js @@ -1,38 +1,13 @@ 'use strict'; -var yaml = require('js-yaml'), - fs = require('fs'), - path = require('path'), - merge = require('merge'); +var path = require('path'), + merge = require('merge'), + confHelpers = require('./config-helpers'), + pathIsAbsolute = require('path-is-absolute'); var cacheConfig = {}, cacheEnabled = false; -var loadDefaults = function loadDefaults () { - return yaml.safeLoad(fs.readFileSync(path.join(__dirname, 'config', 'sass-lint.yml'), 'utf8')); -}; - -var findFile = function findFile (configPath, filename) { - var HOME = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE, - dirname = null, - parentDirname = null; - - configPath = configPath || path.join(process.cwd(), filename); - - if (configPath && fs.existsSync(configPath)) { - dirname = path.dirname(configPath); - parentDirname = path.dirname(dirname); - return fs.realpathSync(configPath); - } - - if (dirname === null || dirname === HOME || dirname === parentDirname) { - return null; - } - configPath = path.join(parentDirname, filename); - - return findFile(configPath, filename); -}; - module.exports = function (options, configPath) { var meta = null, metaPath, @@ -67,7 +42,7 @@ module.exports = function (options, configPath) { } if (!configPath) { - metaPath = findFile(false, 'package.json'); + metaPath = confHelpers.findFile(false, 'package.json'); if (metaPath) { meta = require(metaPath); } @@ -76,19 +51,16 @@ module.exports = function (options, configPath) { configPath = path.resolve(path.dirname(metaPath), meta.sasslintConfig); } else { - configPath = findFile(false, '.sass-lint.yml'); + configPath = confHelpers.findFile(false, '.sass-lint.yml'); } } - else if (!path.isAbsolute(configPath)) { + else if (!pathIsAbsolute(configPath)) { configPath = path.resolve(process.cwd(), configPath); } - if (configPath) { - if (fs.existsSync(configPath)) { - config = yaml.safeLoad(fs.readFileSync(configPath, 'utf8')) || {}; - config.rules = config.rules ? config.rules : {}; - } - } + config = confHelpers.loadConfig(configPath); + config = confHelpers.checkForConfigExtend(config, configPath); + // check to see if user config contains an options property and whether property has a property called merge-default-rules configMergeExists = (config.options && typeof config.options['merge-default-rules'] !== 'undefined'); @@ -105,7 +77,7 @@ module.exports = function (options, configPath) { // order of preference is inline options > user config > default config // merge-default-rules defaults to true so each step above should merge with the previous. If at any step merge-default-rules is set to // false it should skip that steps merge. - defaults = loadDefaults(); + defaults = confHelpers.loadDefaults(); finalConfig = merge.recursive(defaults, config, options); // if merge-default-rules is set to false in user config file then we essentially skip the merging with default rules by overwriting our diff --git a/node_modules/sass-lint/lib/config/property-sort-orders/concentric.yml b/node_modules/sass-lint/lib/config/property-sort-orders/concentric.yml index 5fb6fae..b66cfa3 100644 --- a/node_modules/sass-lint/lib/config/property-sort-orders/concentric.yml +++ b/node_modules/sass-lint/lib/config/property-sort-orders/concentric.yml @@ -11,6 +11,19 @@ order: - 'bottom' - 'left' + - 'flex' + - 'flex-basis' + - 'flex-direction' + - 'flex-flow' + - 'flex-grow' + - 'flex-shrink' + - 'flex-wrap' + - 'align-content' + - 'align-items' + - 'align-self' + - 'justify-content' + - 'order' + - 'columns' - 'column-gap' - 'column-fill' @@ -46,6 +59,10 @@ order: - 'margin-left' - 'outline' + - 'outline-offset' + - 'outline-width' + - 'outline-style' + - 'outline-color' - 'border' - 'border-top' @@ -79,6 +96,8 @@ order: - 'box-shadow' - 'background' + - 'background-attachment' + - 'background-clip' - 'background-color' - 'background-image' - 'background-repeat' diff --git a/node_modules/sass-lint/lib/config/property-sort-orders/recess.yml b/node_modules/sass-lint/lib/config/property-sort-orders/recess.yml index de7ed1c..9fed822 100644 --- a/node_modules/sass-lint/lib/config/property-sort-orders/recess.yml +++ b/node_modules/sass-lint/lib/config/property-sort-orders/recess.yml @@ -8,6 +8,18 @@ order: - 'left' - 'z-index' - 'display' + - 'align-content' + - 'align-items' + - 'align-self' + - 'flex' + - 'flex-basis' + - 'flex-direction' + - 'flex-flow' + - 'flex-grow' + - 'flex-shrink' + - 'flex-wrap' + - 'justify-content' + - 'order' - 'float' - 'width' - 'height' @@ -108,7 +120,10 @@ order: - 'content' - 'quotes' - 'outline' + - 'outline-color' - 'outline-offset' + - 'outline-style' + - 'outline-width' - 'opacity' - 'filter' - 'visibility' diff --git a/node_modules/sass-lint/lib/config/sass-lint.yml b/node_modules/sass-lint/lib/config/sass-lint.yml index 85441fe..3298df5 100644 --- a/node_modules/sass-lint/lib/config/sass-lint.yml +++ b/node_modules/sass-lint/lib/config/sass-lint.yml @@ -17,10 +17,14 @@ rules: single-line-per-selector: 1 # Disallows + no-attribute-selectors: 0 + no-color-hex: 0 no-color-keywords: 1 no-color-literals: 1 + no-combinators: 0 no-css-comments: 1 no-debug: 1 + no-disallowed-properties: 0 no-duplicate-properties: 1 no-empty-rulesets: 1 no-extends: 0 @@ -33,12 +37,15 @@ rules: no-trailing-whitespace: 1 no-trailing-zero: 1 no-transition-all: 1 + no-universal-selectors: 0 + no-url-domains: 1 no-url-protocols: 1 no-vendor-prefixes: 1 no-warn: 1 property-units: 0 # Nesting + declarations-before-nesting: 1 force-attribute-nesting: 1 force-element-nesting: 1 force-pseudo-nesting: 1 @@ -52,6 +59,7 @@ rules: variable-name-format: 1 # Style Guide + attribute-quotes: 1 bem-depth: 0 border-zero: 1 brace-style: 1 @@ -61,8 +69,11 @@ rules: hex-notation: 1 indentation: 1 leading-zero: 1 + max-line-length: 0 + max-file-line-count: 0 nesting-depth: 1 property-sort-order: 1 + pseudo-element: 1 quotes: 1 shorthand-values: 1 url-quotes: 1 diff --git a/node_modules/sass-lint/lib/exceptions.js b/node_modules/sass-lint/lib/exceptions.js new file mode 100644 index 0000000..77e1568 --- /dev/null +++ b/node_modules/sass-lint/lib/exceptions.js @@ -0,0 +1,19 @@ +'use strict'; + +var util = require('util'); + +module.exports = { + SassLintFailureError: function (message) { + Error.captureStackTrace(this, this.constructor); + this.name = 'SassLintFailureError'; + this.message = message; + }, + MaxWarningsExceededError: function (message) { + Error.captureStackTrace(this, this.constructor); + this.name = 'MaxWarningsExceededError'; + this.message = message; + } +}; + +util.inherits(module.exports.SassLintFailureError, Error); +util.inherits(module.exports.MaxWarningsExceededError, Error); diff --git a/node_modules/sass-lint/lib/groot.js b/node_modules/sass-lint/lib/groot.js index 1f99c46..1d2ee52 100644 --- a/node_modules/sass-lint/lib/groot.js +++ b/node_modules/sass-lint/lib/groot.js @@ -3,13 +3,20 @@ ////////////////////////////// 'use strict'; -var gonzales = require('gonzales-pe-sl'); +var gonzales = require('gonzales-pe'); +var fm = require('front-matter'); +var helpers = require('./helpers'); module.exports = function (text, syntax, filename) { var tree; // Run `.toString()` to allow Buffers to be passed in - text = text.toString(); + text = helpers.stripBom(text.toString()); + + // if we're skipping front matter do it here, fall back to just our text in case it fails + if (fm.test(text)) { + text = fm(text).body || text; + } try { tree = gonzales.parse(text, { diff --git a/node_modules/sass-lint/lib/helpers.js b/node_modules/sass-lint/lib/helpers.js index 8183ba0..0b9af3c 100644 --- a/node_modules/sass-lint/lib/helpers.js +++ b/node_modules/sass-lint/lib/helpers.js @@ -4,7 +4,7 @@ var util = require('util'), fs = require('fs'), path = require('path'), yaml = require('js-yaml'), - gonzales = require('gonzales-pe-sl'); + gonzales = require('gonzales-pe'); var helpers = {}; @@ -136,6 +136,15 @@ helpers.isCamelCase = function (str) { return /^[a-z][a-zA-Z0-9]*$/.test(str); }; +/** + * Determines if a given string adheres to pascal-case format + * @param {string} str String to test + * @returns {boolean} Whether str adheres to pascal-case format + */ +helpers.isPascalCase = function (str) { + return /^[A-Z][a-zA-Z0-9]*$/.test(str); +}; + /** * Determines if a given string adheres to hyphenated-lowercase format * @param {string} str String to test @@ -160,7 +169,7 @@ helpers.isSnakeCase = function (str) { * @returns {boolean} Whether str adheres to strict-BEM format */ helpers.isStrictBEM = function (str) { - return /^[a-z](\-?[a-z0-9]+)*(__[a-z0-9](\-?[a-z0-9]+)*)?((_[a-z0-9](\-?[a-z0-9]+)*){2})?$/.test(str); + return /^[a-z](\-?[a-z0-9]+)*(__[a-z0-9](\-?[a-z0-9]+)*)?((_[a-z0-9](\-?[a-z0-9]+)*){0,2})?$/.test(str); }; /** @@ -179,6 +188,27 @@ helpers.isValidHex = function (str) { return false; }; +/** + * Check if a node is a newline character or not + * + * @param {Object} node - The node to test + * @returns {boolean} Whether the node is a newline or not + */ +helpers.isNewLine = function (node) { + // using type === instead of is just in case node happens to be a string + return !!(node && node.type === 'space' && node.content.match('\n')); +}; + +/** + * Check if a node is a non newline space character or not + * + * @param {Object} node - The node to test + * @returns {boolean} Whether the node is a non newline space or not + */ +helpers.isSpace = function (node) { + return !!(node && node.type === 'space' && !node.content.match('\n')); +}; + helpers.loadConfigFile = function (configPath) { var fileDir = path.dirname(configPath), fileName = path.basename(configPath), @@ -214,14 +244,20 @@ helpers.stripQuotes = function (str) { * @returns {string} The string without vendor prefixes */ helpers.stripPrefix = function (str) { - var modProperty = str.slice(1), - prefixLength = modProperty.indexOf('-'); + var modPropertyArr = str.split('-'), + modProperty = '', + prefLength = modPropertyArr[2] === 'osx' ? 2 : 1; - // check for the -osx- vendor prefix too as well as the original -moz- etc - if (modProperty.slice(prefixLength + 1).slice(0, 3) === 'osx') { - return modProperty.slice(prefixLength + 5); - } - return modProperty.slice(prefixLength + 1); + modPropertyArr.splice(1, prefLength); + + modPropertyArr.forEach(function (item, index) { + modProperty = modProperty + item; + if (index > 0 && index < modPropertyArr.length - 1) { + modProperty = modProperty + '-'; + } + }); + + return modProperty; }; /** @@ -341,4 +377,41 @@ helpers.collectSuffixExtensions = function (ruleset, selectorType) { return parentSelectors.concat(selectorList); }; +/** + * Check for the partial match of a string in an array + * + * @param {string} needle - The value to match + * @param {Array} haystack - The array of values to try and match to + * @returns {Boolean} Whether there is a partial match or not + */ +helpers.isPartialStringMatch = function (needle, haystack) { + for (var i = 0; i < haystack.length; i++) { + if (haystack[i].indexOf(needle) >= 0) { + return true; + } + } + + return false; +}; + +/** + * A copy of the the stripBom module from https://github.com/sindresorhus/strip-bom/blob/master/index.js + * The module requires node > 4 whereas we support earlier versions. + * This function strips the BOM marker from the beginning of a file + * + * @param {string} str - The string we wish to strip the BOM marker from + * @returns {string} The string without a BOM marker + */ +helpers.stripBom = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string, got ' + typeof str); + } + + if (str.charCodeAt(0) === 0xFEFF) { + return str.slice(1); + } + + return str; +}; + module.exports = helpers; diff --git a/node_modules/sass-lint/lib/ruleToggler.js b/node_modules/sass-lint/lib/ruleToggler.js new file mode 100644 index 0000000..f4bbd52 --- /dev/null +++ b/node_modules/sass-lint/lib/ruleToggler.js @@ -0,0 +1,249 @@ +'use strict'; + +/** + * Adds each rule in our array of rules in a disable comment into the toggledRules object + * under the correct rule name along with the line and column number where the disable comment + * was encountered + * + * @param {Object} toggledRules - Contains the information about each rule disable/enable + encountered and and what line/column it occurred on + * @param {Array} rules - An array of rule names + * @param {number} line - The line number the disable appeared on + * @param {number} column - The column number the disable appeared on + */ +var addDisable = function (toggledRules, rules, line, column) { + rules.map(function (rule) { + toggledRules.ruleEnable[rule] = toggledRules.ruleEnable[rule] || []; + toggledRules.ruleEnable[rule].push([false, line, column]); + }); +}; + +/** + * Adds each rule in our array of rules in a enable comment into the toggledRules object + * under the correct rule name along with the line and column number where the enable comment + * was encountered + * + * @param {Object} toggledRules - Contains the information about each rule enable + encountered and and what line/column it occurred on + * @param {Array} rules - An array of rule names + * @param {number} line - The line number the enable appeared on + * @param {number} column - The column number the enable appeared on + */ +var addEnable = function (toggledRules, rules, line, column) { + rules.map(function (rule) { + toggledRules.ruleEnable[rule] = toggledRules.ruleEnable[rule] || []; + toggledRules.ruleEnable[rule].push([true, line, column]); + }); +}; + +/** + * Adds each rule in our array of rules in a disable block comment into the toggledRules object + * under the correct rule name along with the line and column number where the disable block comment + * was encountered + * + * @param {Object} toggledRules - Contains the information about each rule enable + encountered and and what line/column that block occurred on + * @param {Array} rules - An array of rule names + * @param {Object} block - The block that is to be disabled + */ +var addDisableBlock = function (toggledRules, rules, block) { + rules.map(function (rule) { + toggledRules.ruleEnable[rule] = toggledRules.ruleEnable[rule] || []; + toggledRules.ruleEnable[rule].push([false, block.start.line, block.start.column]); + toggledRules.ruleEnable[rule].push([true, block.end.line, block.end.column]); + }); +}; + +/** + * Adds a globally disabled flag to the toggled rules globalEnable property including the line and column + * that this comment was encountered on. + * + * @param {Object} toggledRules - Contains the information about the global disable comment + encountered and and what line/column it occurred on + * @param {number} line - The line number the disable appeared on + * @param {number} column - The column number the disable appeared on + */ +var addDisableAll = function (toggledRules, line, column) { + toggledRules.globalEnable + .push([false, line, column]); +}; + +/** + * Adds a globally enabled flag to the toggled rules globalEnable property including the line and column + * that this comment was encountered on. + * + * @param {Object} toggledRules - Contains the information about the global enable comment + encountered and and what line/column it occurred on + * @param {number} line - The line number the enable appeared on + * @param {number} column - The column number the enable appeared on + */ +var addEnableAll = function (toggledRules, line, column) { + toggledRules.globalEnable + .push([true, line, column]); +}; + +/** + * Adds a line disabled flag to the ruleEnable property of the toggledRules object for each rule name + * encountered in the comment and which line this comment was discovered on / refers to + * + * @param {Object} toggledRules - Contains the information about the line disable comment encountered, the rules + * it relates to and which line it was encountered on + * @param {Array} rules - An array of rule names to apply + * @param {number} line - The line number that this disable should refer to + */ +var addDisableLine = function (toggledRules, rules, line) { + rules.map(function (rule) { + toggledRules.ruleEnable[rule] = toggledRules.ruleEnable[rule] || []; + // NOTE: corner case not handled here: a 2nd disable inside an ignored line, which is unrealistically pathological. + toggledRules.ruleEnable[rule].push([false, line, 1]); + toggledRules.ruleEnable[rule].push([true, line + 1, 1]); + }); +}; + +/** + * This is the sorting function we use to sort the toggle stacks in our getToggledRules method + * First sorts by line and then by column if the lines are identical + * + * @param {Array} toggleRangeA - The first rule to sort + * @param {Array} toggleRangeB - The second rule to sort + * + * @returns {number} A pointer to signify to the sort method how the currently in focus value should be sorted + */ +var sortRange = function (toggleRangeA, toggleRangeB) { + var aLine = toggleRangeA[1], + aCol = toggleRangeA[2], + bLine = toggleRangeB[1], + bCol = toggleRangeB[2]; + if (aLine < bLine) { + return -1; + } + if (aLine > bLine) { + return 1; + } + if (aCol < bCol) { + return -1; + } + if (aCol > bCol) { + return 1; + } + return 0; +}; + +/** + * Checks if line number A is before line number B, if it's the same then it checks if the column of A + * is before the column of B + * + * @param {number} x - The line number of A + * @param {number} y - The column number of A + * @param {number} x2 - The line number of B + * @param {number} y2 - The column number of B + * + * @returns {Boolean} Whether the current line/column A is before or the same as B + */ +var isBeforeOrSame = function (x, y, x2, y2) { + return x < x2 || (x === x2 && y < y2); +}; + +/** + * Traverses the AST looking for sass-lint disable/enable comments and then builds an Object/node representation + * of any it encounters + * + * @param {Object} ast - Gonzales PE abstract syntax tree + * + * @returns {Object} The toggledRules object containing all of our rule enable/disable information + */ +module.exports.getToggledRules = function (ast) { + var toggledRules = { + ruleEnable: { + // Format in here is [isEnabled, line, column] + }, + globalEnable: [] + }; + if (!ast.traverseByTypes) { + return toggledRules; + } + ast.traverseByTypes(['multilineComment', 'singlelineComment'], function (comment, i, parent) { + var content = comment.content; + if (!content) { + return; + } + var tokens = content.split(/[\s,]+/) + .filter(function (s) { + return s.trim().length > 0; + }); + if (!tokens.length) { + return; + } + var first = tokens[0], + rules = tokens.slice(1); + switch (first) { + case 'sass-lint:disable': + addDisable(toggledRules, rules, comment.start.line, comment.start.column); + break; + case 'sass-lint:enable': + addEnable(toggledRules, rules, comment.start.line, comment.start.column); + break; + case 'sass-lint:disable-block': + // future ref: not sure what the appropriate behavior is if there is no parent block; currently NPEs + addDisableBlock(toggledRules, rules, parent); + break; + case 'sass-lint:disable-all': + addDisableAll(toggledRules, comment.start.line, comment.start.column); + break; + case 'sass-lint:enable-all': + addEnableAll(toggledRules, comment.start.line, comment.start.column); + break; + case 'sass-lint:disable-line': + addDisableLine(toggledRules, rules, comment.start.line); + break; + default: + return; + } + }); + // Sort these toggle stacks so reading them is easier (algorithmically). + // Usually already sorted but since it's not guaranteed by the contract with gonzales-pe, ensuring it is. + toggledRules.globalEnable.sort(sortRange); + Object.keys(toggledRules.ruleEnable).map(function (ruleId) { + toggledRules.ruleEnable[ruleId].sort(sortRange); + }); + return toggledRules; +}; + +/** + * Filters our rule results by checking the lint result and its line/column against our + * toggledRules object to see whether we should still be reporting this lint. + * + * @param {Object} toggledRules - The toggledRules object containing all of our rule enable/disable information + * + * @returns {Boolean} Whether the current rule is disabled for this lint report + */ +module.exports.isResultEnabled = function (toggledRules) { + return function (ruleResult) { + var ruleId = ruleResult.ruleId; + // Convention: if no column or line, assume rule is targetting 1. + var line = ruleResult.line || 1; + var column = ruleResult.column || 1; + var isGloballyEnabled = toggledRules.globalEnable + .reduce(function (acc, toggleRange) { + return isBeforeOrSame(line, column, toggleRange[1], toggleRange[2]) + ? acc + : toggleRange[0]; + }, true); + if (!isGloballyEnabled) { + return false; + } + if (!toggledRules.ruleEnable[ruleId]) { + return true; + } + var isRuleEnabled = toggledRules.ruleEnable[ruleId] + .reduce(function (acc, toggleRange) { + return isBeforeOrSame(line, column, toggleRange[1], toggleRange[2]) + ? acc + : toggleRange[0]; + }, true); + if (!isRuleEnabled) { + return false; + } + return true; + }; +}; diff --git a/node_modules/sass-lint/lib/rules.js b/node_modules/sass-lint/lib/rules.js index b4427ac..910460e 100644 --- a/node_modules/sass-lint/lib/rules.js +++ b/node_modules/sass-lint/lib/rules.js @@ -42,7 +42,10 @@ module.exports = function (config) { // Only seek out rules that are enabled if (severity !== 0) { - ruleSearch = searchArray(rules, rule); + var fileName = path.normalize(path.join('/', rule + '.js')); + + ruleSearch = searchArray(rules, fileName); + if (ruleSearch >= 0) { loadRule = require(rules[ruleSearch]); diff --git a/node_modules/sass-lint/lib/rules/attribute-quotes.js b/node_modules/sass-lint/lib/rules/attribute-quotes.js new file mode 100644 index 0000000..2458264 --- /dev/null +++ b/node_modules/sass-lint/lib/rules/attribute-quotes.js @@ -0,0 +1,36 @@ +'use strict'; + +var helpers = require('../helpers'); + +module.exports = { + 'name': 'attribute-quotes', + 'defaults': { + 'include': true + }, + 'detect': function (ast, parser) { + var result = []; + + ast.traverseByType('attributeValue', function (item) { + if (item.content[0].is('string') && !parser.options.include) { + result = helpers.addUnique(result, { + 'ruleId': parser.rule.name, + 'line': item.start.line, + 'column': item.start.column, + 'message': 'Attribute values should not be surrounded by quotes', + 'severity': parser.severity + }); + } + else if (item.content[0].is('ident') && parser.options.include) { + result = helpers.addUnique(result, { + 'ruleId': parser.rule.name, + 'line': item.start.line, + 'column': item.start.column, + 'message': 'Attribute values should be surrounded by quotes', + 'severity': parser.severity + }); + } + }); + + return result; + } +}; diff --git a/node_modules/sass-lint/lib/rules/bem-depth.js b/node_modules/sass-lint/lib/rules/bem-depth.js index 9910b76..356efa2 100644 --- a/node_modules/sass-lint/lib/rules/bem-depth.js +++ b/node_modules/sass-lint/lib/rules/bem-depth.js @@ -1,6 +1,7 @@ 'use strict'; var helpers = require('../helpers'); +var selectorHelpers = require('../selector-helpers'); /** * Get number of BEM elements in @@ -32,18 +33,19 @@ module.exports = { maxDepth = parser.options['max-depth']; if (node.is('placeholder')) { - name = node.first('ident') && node.first('ident').content; - depth = bemDepth(name); - - if (name && depth > maxDepth) { - result = helpers.addUnique(result, { - 'ruleId': parser.rule.name, - 'line': node.start.line, - 'column': node.start.column, - 'message': ['Placeholder \'%', name, '\' should have ', maxDepth, ' or fewer BEM elements, but ', - depth, ' were found.'].join(''), - 'severity': parser.severity - }); + name = selectorHelpers.constructSelector(node); + if (name) { + depth = bemDepth(name); + if (depth > maxDepth) { + result = helpers.addUnique(result, { + 'ruleId': parser.rule.name, + 'line': node.start.line, + 'column': node.start.column, + 'message': ['Placeholder \'%', name, '\' should have ', maxDepth, ' or fewer BEM elements, but ', + depth, ' were found.'].join(''), + 'severity': parser.severity + }); + } } } else { diff --git a/node_modules/sass-lint/lib/rules/border-zero.js b/node_modules/sass-lint/lib/rules/border-zero.js index 9fdc9d7..ab20890 100644 --- a/node_modules/sass-lint/lib/rules/border-zero.js +++ b/node_modules/sass-lint/lib/rules/border-zero.js @@ -3,6 +3,7 @@ var helpers = require('../helpers'); var borders = ['border', 'border-top', 'border-right', 'border-bottom', 'border-left']; +var allowedConventions = ['0', 'none']; module.exports = { 'name': 'border-zero', @@ -11,6 +12,11 @@ module.exports = { }, 'detect': function (ast, parser) { var result = []; + var userConvention = parser.options.convention.toString(); + var convention = allowedConventions.indexOf(userConvention) !== -1 + ? userConvention + : allowedConventions[0]; + var invalidConvention = convention !== userConvention; ast.traverseByType('declaration', function (declaration) { var isBorder = false; @@ -29,12 +35,22 @@ module.exports = { var node = item.content[0]; if (node.type === 'number' || node.type === 'ident') { if (node.content === '0' || node.content === 'none') { - if (parser.options.convention !== node.content) { + if (convention !== node.content) { + if (invalidConvention) { + invalidConvention = false; + result = helpers.addUnique(result, { + 'ruleId': parser.rule.name, + 'line': 1, + 'column': 1, + 'message': 'The border-zero convention `' + userConvention + ' in your config file is not valid. Defaulted to convention \'0\'', + 'severity': parser.severity + }); + } result = helpers.addUnique(result, { 'ruleId': parser.rule.name, 'line': node.start.line, 'column': node.start.column, - 'message': 'A value of `' + node.content + '` is not allowed. `' + parser.options.convention + '` must be used.', + 'message': 'A value of `' + node.content + '` is not allowed. `' + convention + '` must be used.', 'severity': parser.severity }); } diff --git a/node_modules/sass-lint/lib/rules/class-name-format.js b/node_modules/sass-lint/lib/rules/class-name-format.js index 8ecfe2f..983998d 100644 --- a/node_modules/sass-lint/lib/rules/class-name-format.js +++ b/node_modules/sass-lint/lib/rules/class-name-format.js @@ -42,6 +42,11 @@ module.exports = { violationMessage = 'Class \'.' + name + '\' should be written in camelCase'; } break; + case 'pascalcase': + if (!helpers.isPascalCase(strippedName)) { + violationMessage = 'Class \'.' + name + '\' should be written in PascalCase'; + } + break; case 'snakecase': if (!helpers.isSnakeCase(strippedName)) { violationMessage = 'Class \'.' + name + '\' should be written in snake_case'; diff --git a/node_modules/sass-lint/lib/rules/declarations-before-nesting.js b/node_modules/sass-lint/lib/rules/declarations-before-nesting.js new file mode 100644 index 0000000..d8eb5be --- /dev/null +++ b/node_modules/sass-lint/lib/rules/declarations-before-nesting.js @@ -0,0 +1,55 @@ +'use strict'; + +var helpers = require('../helpers'); + +module.exports = { + 'name': 'declarations-before-nesting', + 'defaults': {}, + 'detect': function (ast, parser) { + var result = [], + error; + + ast.traverseByType('block', function (block) { + if (block.contains('ruleset') && block.contains('declaration')) { + var rulesetIndex; + + block.forEach(function (item, j) { + var declarationIndex; + var declaration; + + if (item.is('ruleset') && rulesetIndex === void 0) { + rulesetIndex = j; + } + + if (item.is('declaration')) { + var property = item.content[0]; + + if (property && property.is('property')) { + if (property.content[0] && property.content[0].is('variable')) { + return; + } + } + + declarationIndex = j; + declaration = item; + } + + if (rulesetIndex < declarationIndex && declaration) { + error = { + 'ruleId': parser.rule.name, + 'line': declaration.start.line, + 'column': declaration.start.column, + 'message': 'Declarations should come before nestings', + 'severity': parser.severity + }; + result = helpers.addUnique(result, error); + } + }); + + rulesetIndex = null; + } + }); + + return result; + } +}; diff --git a/node_modules/sass-lint/lib/rules/function-name-format.js b/node_modules/sass-lint/lib/rules/function-name-format.js index 2bdccb9..8c2ea35 100644 --- a/node_modules/sass-lint/lib/rules/function-name-format.js +++ b/node_modules/sass-lint/lib/rules/function-name-format.js @@ -45,6 +45,11 @@ module.exports = { violationMessage = 'Function \'' + name + '\' should be written in camelCase'; } break; + case 'pascalcase': + if (!helpers.isPascalCase(strippedName)) { + violationMessage = 'Function \'' + name + '\' should be written in PascalCase'; + } + break; case 'snakecase': if (!helpers.isSnakeCase(strippedName)) { violationMessage = 'Function \'' + name + '\' should be written in snake_case'; @@ -52,12 +57,12 @@ module.exports = { break; case 'strictbem': if (!helpers.isStrictBEM(strippedName)) { - violationMessage = 'Function \'.' + name + '\' should be written in BEM (Block Element Modifier) format'; + violationMessage = 'Function \'' + name + '\' should be written in BEM (Block Element Modifier) format'; } break; case 'hyphenatedbem': if (!helpers.isHyphenatedBEM(strippedName)) { - violationMessage = 'Function \'.' + name + '\' should be written in hyphenated BEM (Block Element Modifier) format'; + violationMessage = 'Function \'' + name + '\' should be written in hyphenated BEM (Block Element Modifier) format'; } break; default: diff --git a/node_modules/sass-lint/lib/rules/id-name-format.js b/node_modules/sass-lint/lib/rules/id-name-format.js index 6a7801f..4186212 100644 --- a/node_modules/sass-lint/lib/rules/id-name-format.js +++ b/node_modules/sass-lint/lib/rules/id-name-format.js @@ -42,6 +42,11 @@ module.exports = { violationMessage = 'ID \'#' + name + '\' should be written in camelCase'; } break; + case 'pascalcase': + if (!helpers.isPascalCase(strippedName)) { + violationMessage = 'ID \'#' + name + '\' should be written in PascalCase'; + } + break; case 'snakecase': if (!helpers.isSnakeCase(strippedName)) { violationMessage = 'ID \'#' + name + '\' should be written in snake_case'; diff --git a/node_modules/sass-lint/lib/rules/indentation.js b/node_modules/sass-lint/lib/rules/indentation.js index f199199..83b688b 100644 --- a/node_modules/sass-lint/lib/rules/indentation.js +++ b/node_modules/sass-lint/lib/rules/indentation.js @@ -8,16 +8,36 @@ module.exports = { 'size': 2 }, 'detect': function (ast, parser) { - var result = []; + var result = [], + inAtRule = false, + inProps = false, + inBlock = false, + lintSize = parser.options.size, + lintType = 'space', + plural = '', + detected = [lintType]; + + // Prepare to check for mixed spaces or tabs depending on what the user has specified + if (parser.options.size === 'tab') { + lintSize = 1; + lintType = 'tab'; + detected[0] = lintType; + } var processNode = function (node, level) { var i, n, prevNode, + nextNode, + sassNextNode, + reportNode, + reportCondition, space, spaceLength, - count, - newlineLength; + newlineLength, + spaceCount, + tabCount, + mixedWarning; level = level || 0; @@ -28,63 +48,140 @@ module.exports = { for (i = 0; i < node.length; i++) { n = node.get(i); prevNode = node.get(i - 1); + nextNode = node.get(i + 1) || false; + // Due to the Sass structure in gonzales we sometimes need to check 2 ahead + sassNextNode = node.get(i + 2) || false; + reportNode = null; if (!n) { continue; } - if (n.type === 'space') { - // Test for CRLF first, since it includes LF - space = n.content.lastIndexOf('\r\n'); - newlineLength = 2; + if (n.syntax === 'scss') { + if (n.type === 'space') { - if (space === -1) { - space = n.content.lastIndexOf('\n'); - newlineLength = 1; - } - - if (space >= 0) { - spaceLength = n.content.slice(space + newlineLength).length; + // Test for CRLF first, since it includes LF + space = n.content.lastIndexOf('\r\n'); + newlineLength = 2; - try { - count = n.content.slice(space + newlineLength).match(/ /g).length; - } - catch (e) { - count = 0; + if (space === -1) { + // Test for LF + space = n.content.lastIndexOf('\n'); + newlineLength = 1; } - if (spaceLength / parser.options.size !== level) { - var next = node.content[i + 1] || false; - - if (next) { - if (count !== spaceLength) { - result = helpers.addUnique(result, { - 'ruleId': parser.rule.name, - 'line': next.start.line, - 'column': next.start.column, - 'message': 'Mixed tabs and spaces', - 'severity': parser.severity - }); - } - if (i !== node.length - 1) { - result = helpers.addUnique(result, { - 'ruleId': parser.rule.name, - 'line': next.start.line, - 'column': next.start.column, - 'message': 'Indentation of ' + spaceLength + ', expected ' + level * parser.options.size, - 'severity': parser.severity - }); - } + if (space >= 0) { + // Check how many spaces or tabs we have and set our plural character if necessary for + // our lint reporting message + spaceLength = n.content.slice(space + newlineLength).length; + spaceCount = n.content.slice(space + newlineLength).match(/ /g); + tabCount = n.content.slice(space + newlineLength).match(/\t/g); + plural = level > 1 ? 's' : ''; + reportNode = nextNode; + reportCondition = i !== node.length - 1; + } + } + } + else if (n.syntax === 'sass') { + if (n.is('declarationDelimiter') || (helpers.isNewLine(n))) { + // Due to the way gonzales handles line endings in Sass we don't care if it's CRLF or just LF + if (nextNode && nextNode.is('space') && nextNode.content.indexOf('\n') === -1) { + spaceLength = nextNode.content.length; + spaceCount = nextNode.content.match(/ /g); + tabCount = nextNode.content.match(/\t/g); + plural = level > 1 ? 's' : ''; + + // if we're at the end of a block we want to drop the level here for Sass + if (!node.get(i + 2)) { + level--; } + + reportNode = sassNextNode; + reportCondition = true; + } + } + // Check all the spaces in Sass that aren't newlines + else if (helpers.isSpace(n)) { + // This is a special condition for the first property in a block with Sass as it usually + // doesn't have a previous node before the space appears so we need to check this is + // valid and then we can rely on the declarationDelimiter check above. + if (inBlock && (!prevNode || prevNode.is('space'))) { + inBlock = false; + spaceLength = n.content.length; + spaceCount = n.content.match(/ /g); + tabCount = n.content.match(/\t/g); + plural = level > 1 ? 's' : ''; + reportNode = nextNode; + reportCondition = true; } + // A extra check for tabs when using spaces as single tab characters aren't highlighted + // as mixed spaces and tabs without this. Spaces on the other hand are fine. Gonzales + // reports them a little differently. + else if (n.type === 'space' && lintType === 'space') { + tabCount = n.content.match(/\t/g); + reportNode = nextNode; + // we dont want to check the lint levels here as it could be a tab between a prop and + // value, totally unrealistic I know but we still want to report it. + reportCondition = false; + } + } + } + if (reportNode) { + // if we've encountered a space check if we have before if not save a reference + if (spaceCount !== null && detected.indexOf('space') === -1) { + detected.push('space'); + } + + // if we've encountered a tab check if we have before if not save a reference + if (tabCount !== null && detected.indexOf('tab') === -1) { + detected.push('tab'); + } + + if (detected.length > 1) { + // Indicates we've told the user about mixed tabs and spaces in their file + mixedWarning = true; + // Remove the last detected type from our detected array, + // if we encounter a mix again we'll output again but all the while keep a reference + // to the first space character (tab or space) that we encountered so as to be + // consistent with our warnings + detected.pop(); + result = helpers.addUnique(result, { + 'ruleId': parser.rule.name, + 'line': reportNode.start.line, + 'column': reportNode.start.column, + 'message': 'Mixed tabs and spaces', + 'severity': parser.severity + }); + } + if (reportCondition && !mixedWarning && spaceLength / lintSize !== level) { + // Check if expected indentation matches what it should be + result = helpers.addUnique(result, { + 'ruleId': parser.rule.name, + 'line': reportNode.start.line, + 'column': reportNode.start.column, + 'message': 'Expected indentation of ' + level * lintSize + ' ' + lintType + plural + ' but found ' + spaceLength + '.', + 'severity': parser.severity + }); } + mixedWarning = false; + } + // if we're in an atrule make we need to possibly handle multiline arguments + if (n.is('atrule') && n.contains('block')) { + inAtRule = true; + inBlock = false; } // if a delimeter is encountered we check if it's directly after a parenthesis node // if it is we know next node will be the same level of indentation if (n.is('operator')) { - if (n.content === ',' && prevNode.is('parentheses')) { - level--; + if (n.content === ',' && prevNode.is('parentheses') && helpers.isNewLine(nextNode)) { + if (inAtRule && !inProps) { + level++; + inProps = true; + } + else if (!inProps) { + level--; + } } } @@ -99,12 +196,16 @@ module.exports = { level++; } + if (n.is('block')) { + inAtRule = false; + inProps = false; + inBlock = true; + } processNode(n, level); } }; processNode(ast); - return result; } }; diff --git a/node_modules/sass-lint/lib/rules/max-file-line-count.js b/node_modules/sass-lint/lib/rules/max-file-line-count.js new file mode 100644 index 0000000..5cc0812 --- /dev/null +++ b/node_modules/sass-lint/lib/rules/max-file-line-count.js @@ -0,0 +1,25 @@ +'use strict'; + +var helpers = require('../helpers'); + +module.exports = { + 'name': 'max-file-line-count', + 'defaults': { + length: 300 + }, + 'detect': function (ast, parser) { + var result = []; + + if (ast.end.line > parser.options.length) { + result = helpers.addUnique(result, { + 'ruleId': parser.rule.name, + 'line': ast.end.line, + 'column': 0, + 'message': 'This file has ' + ast.end.line + ' lines, which exceeds the maximum of ' + parser.options.length + ' lines allowed.', + 'severity': parser.severity + }); + } + + return result; + } +}; diff --git a/node_modules/sass-lint/lib/rules/max-line-length.js b/node_modules/sass-lint/lib/rules/max-line-length.js new file mode 100644 index 0000000..2c44729 --- /dev/null +++ b/node_modules/sass-lint/lib/rules/max-line-length.js @@ -0,0 +1,32 @@ +'use strict'; + +var helpers = require('../helpers'); + +module.exports = { + 'name': 'max-line-length', + 'defaults': { + length: 80 + }, + 'detect': function (ast, parser) { + var result = []; + + ast.traverseByType('space', function (space) { + var lineLength = 0; + if (helpers.hasEOL(space.content)) { + lineLength = space.start.column - 1; + } + + if (lineLength > parser.options.length) { + result = helpers.addUnique(result, { + 'ruleId': parser.rule.name, + 'severity': parser.severity, + 'line': space.start.line, + 'column': 0, + 'message': 'line ' + space.start.line + ' exceeds the maximum line length of ' + parser.options.length + }); + } + }); + + return result; + } +}; diff --git a/node_modules/sass-lint/lib/rules/mixin-name-format.js b/node_modules/sass-lint/lib/rules/mixin-name-format.js index 3f10ef5..441badb 100644 --- a/node_modules/sass-lint/lib/rules/mixin-name-format.js +++ b/node_modules/sass-lint/lib/rules/mixin-name-format.js @@ -55,6 +55,11 @@ module.exports = { violationMessage = 'Mixin \'' + name + '\' should be written in camelCase'; } break; + case 'pascalcase': + if (!helpers.isPascalCase(strippedName)) { + violationMessage = 'Mixin \'' + name + '\' should be written in PascalCase'; + } + break; case 'snakecase': if (!helpers.isSnakeCase(strippedName)) { violationMessage = 'Mixin \'' + name + '\' should be written in snake_case'; @@ -62,12 +67,12 @@ module.exports = { break; case 'strictbem': if (!helpers.isStrictBEM(strippedName)) { - violationMessage = 'Mixin \'.' + name + '\' should be written in BEM (Block Element Modifier) format'; + violationMessage = 'Mixin \'' + name + '\' should be written in BEM (Block Element Modifier) format'; } break; case 'hyphenatedbem': if (!helpers.isHyphenatedBEM(strippedName)) { - violationMessage = 'Mixin \'.' + name + '\' should be written in hyphenated BEM (Block Element Modifier) format'; + violationMessage = 'Mixin \'' + name + '\' should be written in hyphenated BEM (Block Element Modifier) format'; } break; default: diff --git a/node_modules/sass-lint/lib/rules/no-attribute-selectors.js b/node_modules/sass-lint/lib/rules/no-attribute-selectors.js new file mode 100644 index 0000000..19ab91c --- /dev/null +++ b/node_modules/sass-lint/lib/rules/no-attribute-selectors.js @@ -0,0 +1,23 @@ +'use strict'; + +var helpers = require('../helpers'); + +module.exports = { + 'name': 'no-attribute-selectors', + 'defaults': {}, + 'detect': function (ast, parser) { + var result = []; + + ast.traverseByType('attributeSelector', function (item) { + result = helpers.addUnique(result, { + 'ruleId': parser.rule.name, + 'line': item.start.line, + 'column': item.start.column, + 'message': 'Attribute selectors are not allowed', + 'severity': parser.severity + }); + }); + + return result; + } +}; diff --git a/node_modules/sass-lint/lib/rules/no-color-hex.js b/node_modules/sass-lint/lib/rules/no-color-hex.js new file mode 100644 index 0000000..d519005 --- /dev/null +++ b/node_modules/sass-lint/lib/rules/no-color-hex.js @@ -0,0 +1,22 @@ +'use strict'; + +var helpers = require('../helpers'); + +module.exports = { + 'name': 'no-color-hex', + 'defaults': {}, + 'detect': function (ast, parser) { + var result = []; + + ast.traverseByType('color', function (value) { + result = helpers.addUnique(result, { + 'ruleId': parser.rule.name, + 'line': value.start.line, + 'column': value.start.column, + 'message': 'Hexadecimal colors should not be used', + 'severity': parser.severity + }); + }); + return result; + } +}; diff --git a/node_modules/sass-lint/lib/rules/no-color-keywords.js b/node_modules/sass-lint/lib/rules/no-color-keywords.js index dbc70d8..dcf21d1 100644 --- a/node_modules/sass-lint/lib/rules/no-color-keywords.js +++ b/node_modules/sass-lint/lib/rules/no-color-keywords.js @@ -7,6 +7,21 @@ var helpers = require('../helpers'), var cssColors = yaml.safeLoad(fs.readFileSync(path.join(__dirname, '../../data', 'literals.yml'), 'utf8')).split(' '); +/** + * Checks if a node's parent is a valid type as we dont want to apply + * this rule to function names or variable names + * + * @param {Object} node - The parent node to test + * @returns {boolean} Whether the node is a valid type or not + */ +var checkValidParentType = function (node) { + if (node) { + return node.type === 'function' || node.type === 'variable'; + } + + return false; +}; + module.exports = { 'name': 'no-color-keywords', 'defaults': {}, @@ -15,15 +30,7 @@ module.exports = { ast.traverseByType('value', function (node) { node.traverse(function (elem, i, parent) { - var isVariable = false; - - if (parent) { - if (parent.type === 'variable') { - isVariable = true; - } - } - - if (elem.type === 'ident' && !isVariable) { + if (elem.type === 'ident' && !checkValidParentType(parent)) { var index = cssColors.indexOf(elem.content.toLowerCase()); if (index !== -1) { diff --git a/node_modules/sass-lint/lib/rules/no-combinators.js b/node_modules/sass-lint/lib/rules/no-combinators.js new file mode 100644 index 0000000..57b23c7 --- /dev/null +++ b/node_modules/sass-lint/lib/rules/no-combinators.js @@ -0,0 +1,57 @@ +'use strict'; + +var helpers = require('../helpers'); + +/** + * Check if it's an exception (combinator or a parent selector before or after a space) + * + * @param {Object} node - The node to check + * @param {Object} next - The next node + * @param {Object} previous - The previous node + * @returns {Boolean} True if exception + */ +var isException = function (node, next, previous) { + if (node.is('space')) { + if (next && next.is('combinator') || next.is('parentSelector')) { + return true; + } + + if (previous && previous.is('combinator') || previous.is('parentSelector')) { + return true; + } + } + + return false; +}; + +module.exports = { + 'name': 'no-combinators', + 'defaults': {}, + 'detect': function (ast, parser) { + var result = []; + + ast.traverseByType('selector', function (selector) { + selector.forEach(function (item, i) { + var previous = selector.content[i - 1] || false, + next = selector.content[i + 1] || false; + + if (isException(item, next, previous)) { + return false; + } + + if (item.is('combinator') || item.is('space')) { + result = helpers.addUnique(result, { + 'ruleId': parser.rule.name, + 'line': item.start.line, + 'column': item.start.column, + 'message': 'Combinators are not allowed', + 'severity': parser.severity + }); + } + return false; + }); + }); + + return result; + } +}; diff --git a/node_modules/sass-lint/lib/rules/no-disallowed-properties.js b/node_modules/sass-lint/lib/rules/no-disallowed-properties.js new file mode 100644 index 0000000..5d53bee --- /dev/null +++ b/node_modules/sass-lint/lib/rules/no-disallowed-properties.js @@ -0,0 +1,28 @@ +'use strict'; + +var helpers = require('../helpers'); + +module.exports = { + 'name': 'no-disallowed-properties', + 'defaults': { + 'properties': [] + }, + 'detect': function (ast, parser) { + var result = []; + + ast.traverseByType('property', function (node) { + var first = node.first(); + if (!first.is('ident') || parser.options.properties.indexOf(first.content) === -1) { + return; + } + result = helpers.addUnique(result, { + 'ruleId': parser.rule.name, + 'line': node.start.line, + 'column': node.start.column, + 'message': 'Property `' + first.content + '` should not be used', + 'severity': parser.severity + }); + }); + return result; + } +}; diff --git a/node_modules/sass-lint/lib/rules/no-duplicate-properties.js b/node_modules/sass-lint/lib/rules/no-duplicate-properties.js index 1302a77..cd02274 100644 --- a/node_modules/sass-lint/lib/rules/no-duplicate-properties.js +++ b/node_modules/sass-lint/lib/rules/no-duplicate-properties.js @@ -1,6 +1,7 @@ 'use strict'; var helpers = require('../helpers'); +var selectorHelpers = require('../selector-helpers'); module.exports = { 'name': 'no-duplicate-properties', @@ -25,7 +26,18 @@ module.exports = { warnMessage = false; declaration.eachFor('property', function (item) { - var property = item.content[0].content; + var property = ''; + + // Check if declaration is actually a variable declaration + if (item.content[0] && item.content[0].is('variable')) { + return; + } + + item.forEach(function (subItem) { + // Although not a selector the method here helps us construct the proper property name + // taking into account any interpolation etc + property += selectorHelpers.constructSelector(subItem); + }); if (properties.indexOf(property) !== -1 && properties.length >= 1) { if (parser.options.exclude.indexOf(property) !== -1 && properties[properties.length - 1] !== property) { diff --git a/node_modules/sass-lint/lib/rules/no-mergeable-selectors.js b/node_modules/sass-lint/lib/rules/no-mergeable-selectors.js index 248be2d..d5752e0 100644 --- a/node_modules/sass-lint/lib/rules/no-mergeable-selectors.js +++ b/node_modules/sass-lint/lib/rules/no-mergeable-selectors.js @@ -1,10 +1,10 @@ 'use strict'; -var helpers = require('../helpers'); +var helpers = require('../helpers'), + selectorHelpers = require('../selector-helpers'); var mergeableNodes = ['atrule', 'include', 'ruleset'], validAtRules = ['media'], - simpleIdents = ['ident', 'number', 'operator', 'combinator', 'string', 'parentSelector', 'delimiter', 'typeSelector', 'attributeMatch'], curLevel = 0, curSelector = [], parentSelector = [], @@ -12,107 +12,6 @@ var mergeableNodes = ['atrule', 'include', 'ruleset'], syntax = ''; -/** - * Adds grammar around our content blocks to construct selectors with - * more readable formats. - * - * @param {object} val - The current value node - * @param {string} prefix - The grammar to prefix the value with - * @param {string} suffix - The grammar to add after the value - * @returns {string} The correct readable format - */ -var addGrammar = function (val, prefix, suffix) { - return prefix + val.content + suffix; -}; - -/** - * Adds grammar around our content blocks to construct selectors with - * more readable formats and loops the content as they're within sub blocks. - * - * @param {object} val - The current value node - * @param {string} prefix - The grammar to prefix the value with - * @param {string} suffix - The grammar to add after the value - * @param {function} constructSelector - The callback we wish to use which means constructSelector in this instance - * @returns {string} The correct readable format - */ -var constructSubSelector = function (val, prefix, suffix, constructSelector) { - var content = prefix; - val.forEach(function (subItem) { - content += constructSelector(subItem); - }); - - return content + suffix; -}; - -/** - * Constructs a syntax complete selector for our selector matching and warning output - * - * @param {object} val - The current node / part of our selector - * @returns {string} - Content: The current node with correct syntax e.g. class my-class = '.my-class' - */ -var constructSelector = function (val) { - var content = null; - - if (val.is('id')) { - content = addGrammar(val, '#', ''); - } - - else if (val.is('class')) { - content = addGrammar(val, '.', ''); - } - - else if (simpleIdents.indexOf(val.type) !== -1) { - content = val.content; - } - - else if (val.is('attributeSelector')) { - content = constructSubSelector(val, '[', ']', constructSelector); - } - - else if (val.is('atkeyword')) { - content = constructSubSelector(val, '@', '', constructSelector); - } - - else if (val.is('placeholder')) { - content = constructSubSelector(val, '%', '', constructSelector); - } - - else if (val.is('variable')) { - content = constructSubSelector(val, '$', '', constructSelector); - - } - - else if (val.is('pseudoClass')) { - content = addGrammar(val, ':', ''); - } - - else if (val.is('pseudoElement')) { - content = addGrammar(val, '::', ''); - } - - else if (val.is('nth')) { - content = addGrammar(val, '(', ')'); - } - - else if (val.is('nthSelector')) { - content = constructSubSelector(val, ':', '', constructSelector); - } - - else if (val.is('parentheses')) { - content = constructSubSelector(val, '(', ')', constructSelector); - } - - else if (val.is('space')) { - content = ' '; - } - - else if (val.is('parentSelectorExtension') || val.is('attributeName') || val.is('attributeValue') || val.is('dimension')) { - content = constructSubSelector(val, '', '', constructSelector); - } - - return content; -}; - /** * Traverses a block and calls our callback function for each block encountered * @@ -159,11 +58,11 @@ var checkRuleset = function (ruleNode) { if (!ruleNodeItem.is('block')) { if (ruleNodeItem.is('selector')) { ruleNodeItem.forEach(function (selectorContent) { - ruleSet += constructSelector(selectorContent); + ruleSet += selectorHelpers.constructSelector(selectorContent); }); } else if (ruleNodeItem.is('delimiter') || ruleNodeItem.is('space')) { - ruleSet += constructSelector(ruleNodeItem); + ruleSet += selectorHelpers.constructSelector(ruleNodeItem); } } }); @@ -182,7 +81,7 @@ var checkAtRule = function (atRule) { var test = ''; atRule.forEach(function (atRuleItem) { if (!atRuleItem.is('block')) { - test += constructSelector(atRuleItem); + test += selectorHelpers.constructSelector(atRuleItem); } }); updateList(test, true, atRule.start.line, atRule.start.column); diff --git a/node_modules/sass-lint/lib/rules/no-misspelled-properties.js b/node_modules/sass-lint/lib/rules/no-misspelled-properties.js index 00988a5..99a23ab 100644 --- a/node_modules/sass-lint/lib/rules/no-misspelled-properties.js +++ b/node_modules/sass-lint/lib/rules/no-misspelled-properties.js @@ -7,6 +7,17 @@ var helpers = require('../helpers'), var properties = yaml.safeLoad(fs.readFileSync(path.join(__dirname, '../../data', 'properties.yml'), 'utf8')).split(' '); +/** + * Combine the valid property array and the array of extras into a new array + * + * @param {Array} props - The list of default valid properties + * @param {Array} extras - The user specified list of valid properties + * @returns {Array} Combined list + */ +var getCombinedList = function (props, extras) { + return props.concat(extras); +}; + module.exports = { 'name': 'no-misspelled-properties', 'defaults': { @@ -17,13 +28,18 @@ module.exports = { ast.traverseByType('property', function (node) { if (node.first().is('ident')) { - var curProperty = node.first().content; + var curProperty = node.first().content, + propertyList = getCombinedList(properties, parser.options['extra-properties']); if (curProperty.charAt(0) === '-') { curProperty = helpers.stripPrefix(curProperty); } - if (curProperty.length > 0 && properties.indexOf(curProperty) === -1 && parser.options['extra-properties'].indexOf(curProperty) === -1) { + if (helpers.isPartialStringMatch(curProperty, propertyList)) { + return false; + } + + if (curProperty.length > 0) { result = helpers.addUnique(result, { 'ruleId': parser.rule.name, 'line': node.start.line, @@ -33,7 +49,10 @@ module.exports = { }); } } + + return false; }); + return result; } }; diff --git a/node_modules/sass-lint/lib/rules/no-universal-selectors.js b/node_modules/sass-lint/lib/rules/no-universal-selectors.js new file mode 100644 index 0000000..059bfbc --- /dev/null +++ b/node_modules/sass-lint/lib/rules/no-universal-selectors.js @@ -0,0 +1,27 @@ +'use strict'; + +var helpers = require('../helpers'); + +module.exports = { + 'name': 'no-universal-selectors', + 'defaults': {}, + 'detect': function (ast, parser) { + var result = []; + + ast.traverseByType('typeSelector', function (typeSelector) { + typeSelector.traverse(function (item) { + if (item.is('ident') && item.content === '*') { + result = helpers.addUnique(result, { + 'ruleId': parser.rule.name, + 'line': item.start.line, + 'column': item.start.column, + 'message': '* (universal) selectors are not allowed', + 'severity': parser.severity + }); + } + }); + }); + + return result; + } +}; diff --git a/node_modules/sass-lint/lib/rules/no-url-domains.js b/node_modules/sass-lint/lib/rules/no-url-domains.js new file mode 100644 index 0000000..73b491f --- /dev/null +++ b/node_modules/sass-lint/lib/rules/no-url-domains.js @@ -0,0 +1,33 @@ +'use strict'; + +var helpers = require('../helpers'), + url = require('url'); + +module.exports = { + 'name': 'no-url-domains', + 'defaults': {}, + 'detect': function (ast, parser) { + var result = []; + + ast.traverseByType('uri', function (uri) { + uri.traverse(function (item) { + if (item.is('string')) { + var stripped = helpers.stripQuotes(item.content), + parsedUrl = url.parse(stripped, false, true); + + if (parsedUrl.host && parsedUrl.protocol !== 'data:') { + result = helpers.addUnique(result, { + 'ruleId': parser.rule.name, + 'severity': parser.severity, + 'line': item.end.line, + 'column': item.end.column, + 'message': 'Domains in URLs are disallowed' + }); + } + } + }); + }); + + return result; + } +}; diff --git a/node_modules/sass-lint/lib/rules/no-url-protocols.js b/node_modules/sass-lint/lib/rules/no-url-protocols.js index 389b4e7..9008047 100644 --- a/node_modules/sass-lint/lib/rules/no-url-protocols.js +++ b/node_modules/sass-lint/lib/rules/no-url-protocols.js @@ -2,30 +2,34 @@ var helpers = require('../helpers'); -var isUrlRegex = /^(https?:)?\/\//; - -var stripQuotes = function (str) { - return str.substring(1, str.length - 1); -}; +var isUrlRegex = /^(https?:)?\/\//, + protocolRelativeRegex = /^(https?:)\/\//; module.exports = { 'name': 'no-url-protocols', - 'defaults': {}, + 'defaults': { + 'allow-protocol-relative-urls': false + }, 'detect': function (ast, parser) { var result = []; ast.traverseByType('uri', function (uri) { uri.traverse(function (item) { if (item.is('string')) { - var stripped = stripQuotes(item.content); + var stripped = helpers.stripQuotes(item.content), + regexSelector = !parser.options['allow-protocol-relative-urls'] ? + isUrlRegex : protocolRelativeRegex, + message = !parser.options['allow-protocol-relative-urls'] ? + 'Protocols and domains in URLs are disallowed' : + 'Protocols in URLS are disallowed'; - if (stripped.match(isUrlRegex)) { + if (stripped.match(regexSelector)) { result = helpers.addUnique(result, { 'ruleId': parser.rule.name, 'severity': parser.severity, 'line': item.end.line, 'column': item.end.column, - 'message': 'Protocols and domains in URLs are disallowed' + 'message': message }); } } diff --git a/node_modules/sass-lint/lib/rules/no-vendor-prefixes.js b/node_modules/sass-lint/lib/rules/no-vendor-prefixes.js index 79ea1cc..529d8bb 100644 --- a/node_modules/sass-lint/lib/rules/no-vendor-prefixes.js +++ b/node_modules/sass-lint/lib/rules/no-vendor-prefixes.js @@ -1,13 +1,30 @@ 'use strict'; -var helpers = require('../helpers'); +var helpers = require('../helpers'), + yaml = require('js-yaml'), + fs = require('fs'), + path = require('path'); -var prefixes = ['webkit', 'moz', 'ms']; +var properties = yaml.safeLoad(fs.readFileSync(path.join(__dirname, '../../data', 'properties.yml'), 'utf8')).split(' '), + prefixes = ['webkit', 'moz', 'ms']; +/** + * Returns a copy of the prefixes array so that it can be safely modified + * + * @param {Array} prefixArr - The array of prefixes + * @returns {Array} A copy of the prefixes array + */ var getPrefixCopy = function (prefixArr) { return prefixArr.slice(); }; +/** + * Removes specified vendor prefixes from the prefixes array + * + * @param {Array} prefixArr - The array of prefixes + * @param {Array} excludes - An array of prefixes to exclude + * @returns {Array} The prefixes array minus any excluded prefixes + */ var handleExcludes = function (prefixArr, excludes) { excludes.forEach(function (item) { var index = prefixArr.indexOf(item); @@ -20,6 +37,13 @@ var handleExcludes = function (prefixArr, excludes) { return prefixArr; }; +/** + * Adds specified vendor prefixes to the prefixes array + * + * @param {Array} prefixArr - The array of prefixes + * @param {Array} includes - An array of prefixes to include + * @returns {Array} The prefixes array plus any extra included prefixes + */ var handleIncludes = function (prefixArr, includes) { includes.forEach(function (item) { if (prefixArr.indexOf(item) === -1) { @@ -30,6 +54,15 @@ var handleIncludes = function (prefixArr, includes) { return prefixArr; }; +/** + * Creates and returns a regex pattern based on all the included prefixes so that + * we can test our values against it. + * + * @param {Array} prefixArr - The array of prefixes + * @param {Array} includes - An array of prefixes to include + * @param {Array} excludes - An array of prefixes to exclude + * @returns {RegExp} The regex pattern for us to test values against + */ var precompileRegEx = function (prefixArr, includes, excludes) { if (includes.length) { prefixArr = handleIncludes(prefixArr, includes); @@ -42,11 +75,22 @@ var precompileRegEx = function (prefixArr, includes, excludes) { return new RegExp('-(' + prefixArr.join('|') + ')-'); }; +/** + * Checks to see if the property is a standard property or a browser specific one + * + * @param {string} property - The property string we want to test + * @returns {boolean} Whether the property is standard or not + */ +var isStandardProperty = function (property) { + return properties.indexOf(helpers.stripPrefix(property)) !== -1; +}; + module.exports = { 'name': 'no-vendor-prefixes', 'defaults': { 'additional-identifiers': [], - 'excluded-identifiers': [] + 'excluded-identifiers': [], + 'ignore-non-standard': false }, 'detect': function (ast, parser) { @@ -56,6 +100,9 @@ module.exports = { ast.traverseByType('ident', function (value) { if (statement.test(value.content)) { + if (!isStandardProperty(value.content) && parser.options['ignore-non-standard']) { + return; + } result = helpers.addUnique(result, { 'ruleId': parser.rule.name, 'line': value.start.line, diff --git a/node_modules/sass-lint/lib/rules/placeholder-name-format.js b/node_modules/sass-lint/lib/rules/placeholder-name-format.js index 9b5e372..5024488 100644 --- a/node_modules/sass-lint/lib/rules/placeholder-name-format.js +++ b/node_modules/sass-lint/lib/rules/placeholder-name-format.js @@ -35,6 +35,11 @@ module.exports = { violationMessage = 'Placeholder \'%' + name + '\' should be written in camelCase'; } break; + case 'pascalcase': + if (!helpers.isPascalCase(strippedName)) { + violationMessage = 'Placeholder \'%' + name + '\' should be written in PascalCase'; + } + break; case 'snakecase': if (!helpers.isSnakeCase(strippedName)) { violationMessage = 'Placeholder \'%' + name + '\' should be written in snake_case'; @@ -42,12 +47,12 @@ module.exports = { break; case 'strictbem': if (!helpers.isStrictBEM(strippedName)) { - violationMessage = 'Placeholder \'.' + name + '\' should be written in BEM (Block Element Modifier) format'; + violationMessage = 'Placeholder \'%' + name + '\' should be written in BEM (Block Element Modifier) format'; } break; case 'hyphenatedbem': if (!helpers.isHyphenatedBEM(strippedName)) { - violationMessage = 'Placeholder \'.' + name + '\' should be written in hyphenated BEM (Block Element Modifier) format'; + violationMessage = 'Placeholder \'%' + name + '\' should be written in hyphenated BEM (Block Element Modifier) format'; } break; default: diff --git a/node_modules/sass-lint/lib/rules/pseudo-element.js b/node_modules/sass-lint/lib/rules/pseudo-element.js new file mode 100644 index 0000000..ede81fe --- /dev/null +++ b/node_modules/sass-lint/lib/rules/pseudo-element.js @@ -0,0 +1,77 @@ +'use strict'; + +var helpers = require('../helpers'), + yaml = require('js-yaml'), + fs = require('fs'), + path = require('path'); + +var pseudoElements = yaml.safeLoad( + fs.readFileSync(path.join(__dirname, '../../data', 'pseudoElements.yml'), 'utf8') + ).split(' '), + pseudoClasses = yaml.safeLoad( + fs.readFileSync(path.join(__dirname, '../../data', 'pseudoClasses.yml'), 'utf8') + ).split(' '); + +/** + * Check if the given argument is a prefixed string. If it is we return an unprefixed + * version, else return it unmodified + * + * @param {Object|string} name - The value to test + * @returns {string} A prefix free version of the string + */ +var prefixFree = function prefixFree (name) { + return typeof name === 'string' && name.charAt(0) === '-' ? helpers.stripPrefix(name) : name; +}; + +/** + * Determine if the given string matches a pseudo-element + * + * @param {string} name - The name to check + * @returns {Boolean} Whether or not name is pseudo-element + */ +var isPseudoElement = function isPseudoElement (name) { + return pseudoElements.indexOf(prefixFree(name)) !== -1; +}; + +/** + * Determine if the given string matches a pseudo-class + * + * @param {string} name - The name to check + * @returns {Boolean} Whether or not name is pseudo-class + */ +var isPseudoClass = function isPseudoClass (name) { + return pseudoClasses.indexOf(prefixFree(name)) !== -1; +}; + +module.exports = { + 'name': 'pseudo-element', + 'detect': function (ast, parser) { + var result = []; + + ast.traverseByType('pseudoClass', function (node) { + if (isPseudoElement(node.content[0].content)) { + result = helpers.addUnique(result, { + 'ruleId': parser.rule.name, + 'line': node.start.line, + 'column': node.start.column, + 'message': 'Pseudo-elements must start with double colons', + 'severity': parser.severity + }); + } + }); + + ast.traverseByType('pseudoElement', function (node) { + if (isPseudoClass(node.content[0].content)) { + result = helpers.addUnique(result, { + 'ruleId': parser.rule.name, + 'line': node.start.line, + 'column': node.start.column, + 'message': 'Pseudo-classes must start with a single colon', + 'severity': parser.severity + }); + } + }); + + return result; + } +}; diff --git a/node_modules/sass-lint/lib/rules/shorthand-values.js b/node_modules/sass-lint/lib/rules/shorthand-values.js index 25fd704..3df76a4 100644 --- a/node_modules/sass-lint/lib/rules/shorthand-values.js +++ b/node_modules/sass-lint/lib/rules/shorthand-values.js @@ -11,6 +11,13 @@ var shortVals = [ 'padding' ]; +/** + * Checks to see if a series of values can be condensed down to a singular value + * + * @param {array} value - The array of values to check + * @param {array} allowed - The parser options to specify the levels allowed to condense to + * @returns {boolean} Whether the values can be condensed to a singular value + */ var condenseToOne = function (value, allowed) { if (allowed.indexOf(1) !== -1 && value.length > 1) { for (var i = 1; i < value.length; i++) { @@ -23,6 +30,13 @@ var condenseToOne = function (value, allowed) { return false; }; +/** + * Checks to see if a series of values can be condensed down to two values + * + * @param {array} value - The array of values to check + * @param {array} allowed - The parser options to specify the levels allowed to condense to + * @returns {boolean} Whether the values can be condensed to two values + */ var condenseToTwo = function (value, allowed) { if (allowed.indexOf(2) !== -1 && value.length > 2) { if ((value[0] === value[2] && value[1] === value[3]) || (value[0] === value[2] && !value[3] && value[0] !== value[1])) { @@ -32,6 +46,13 @@ var condenseToTwo = function (value, allowed) { return false; }; +/** + * Checks to see if a series of values can be condensed down to three values + * + * @param {array} value - The array of values to check + * @param {array} allowed - The parser options to specify the levels allowed to condense to + * @returns {boolean} Whether the values can be condensed to three values + */ var condenseToThree = function (value, allowed) { if (allowed.indexOf(3) !== -1 && value.length > 3) { if (value[1] === value[3] ) { @@ -41,6 +62,86 @@ var condenseToThree = function (value, allowed) { return false; }; +/** + * Used to scan property values and create a string representation of the values to display + * + * @param {Object} node - The current node + * @returns {string} A string reconstruction of the current properties value + */ +var scanValue = function (node) { + var curValue = []; + var fullVal = ''; + node.forEach(function (val) { + // add to our value string depending on node type + if (val.is('dimension')) { + val.forEach(function (el) { + fullVal += el.content; + }); + } + + else if (val.is('percentage')) { + val.forEach(function (el) { + fullVal += el.content + '%'; + }); + } + + else if (val.is('interpolation')) { + fullVal += '#{' + scanValue(val.content) + '}'; + } + + else if (val.is('color')) { + fullVal += '#' + val.content + ''; + } + + else if ( + val.is('operator') || + val.is('ident') || + val.is('number') || + val.is('unaryOperator') || + val.is('string') + ) { + fullVal += val.content; + } + + else if (val.is('variable')) { + val.forEach(function (el) { + fullVal += '$' + el.content; + }); + } + + else if (val.is('function')) { + + var func = val.first('ident'), + args = ''; + + val.forEach('arguments', function (arg) { + args = scanValue(arg).join(' '); + }); + + fullVal = func + '(' + args + ')'; + } + + else if (val.is('parentheses')) { + fullVal += '(' + scanValue(val).join(' ') + ')'; + } + + else if (val.is('space')) { + // This is a non value character such as a space + // We want to start another value here + curValue.push(fullVal); + + // reset the value string for the next iteration + fullVal = ''; + } + }); + + if (fullVal !== '') { + // The last dimension in a value will not be followed by a character so we push here + curValue.push(fullVal); + } + return curValue; +}; + module.exports = { 'name': 'shorthand-values', 'defaults': { @@ -71,70 +172,33 @@ module.exports = { var value = []; if (item.is('value')) { - var node = item.content, - fullVal = ''; + var node = item.content; // Build each value into an array of strings with value and type - node.forEach(function (val) { - // add to our value string depending on node type - if (val.is('dimension')) { - val.forEach(function (el) { - fullVal += el.content; - }); - } + value = scanValue(node); - else if (val.is('percentage')) { - val.forEach(function (el) { - fullVal += el.content + '%'; - }); - } + if (value.length <= 4 && value.length >= 1) { + var output = []; - else if (val.is('operator') || val.is('ident') || val.is('number') || val.is('unaryOperator')) { - fullVal += val.content; + // check which values can condense + if (condenseToOne(value, parser.options['allowed-shorthands'])) { + output = [value[0]]; } - - else if (val.is('variable')) { - val.forEach(function (el) { - fullVal += '$' + el.content; - }); + else if (condenseToTwo(value, parser.options['allowed-shorthands'])) { + output = [value[0], value[1]]; } - - else if (val.is('space')) { - // This is a non value character such as a space - // We want to start another value here - value.push(fullVal); - - // reset the value string for the next iteration - fullVal = ''; + else if (condenseToThree(value, parser.options['allowed-shorthands'])) { + output = [value[0], value[1], value[2]]; } - }); - if (fullVal !== '') { - // The last dimension in a value will not be followed by a character so we push here - value.push(fullVal); - - if (value.length <= 4 && value.length >= 1) { - var output = []; - - // check which values can condense - if (condenseToOne(value, parser.options['allowed-shorthands'])) { - output = [value[0]]; - } - else if (condenseToTwo(value, parser.options['allowed-shorthands'])) { - output = [value[0], value[1]]; - } - else if (condenseToThree(value, parser.options['allowed-shorthands'])) { - output = [value[0], value[1], value[2]]; - } - - if (output.length) { - result = helpers.addUnique(result, { - 'ruleId': parser.rule.name, - 'line': item.start.line, - 'column': item.start.column, - 'message': 'Property `' + property + '` should be written more concisely as `' + output.join(' ') + '` instead of `' + value.join(' ') + '`', - 'severity': parser.severity - }); - } + + if (output.length) { + result = helpers.addUnique(result, { + 'ruleId': parser.rule.name, + 'line': item.start.line, + 'column': item.start.column, + 'message': 'Property `' + property + '` should be written more concisely as `' + output.join(' ') + '` instead of `' + value.join(' ') + '`', + 'severity': parser.severity + }); } } } diff --git a/node_modules/sass-lint/lib/rules/single-line-per-selector.js b/node_modules/sass-lint/lib/rules/single-line-per-selector.js index 9ba9c7c..53cdf90 100644 --- a/node_modules/sass-lint/lib/rules/single-line-per-selector.js +++ b/node_modules/sass-lint/lib/rules/single-line-per-selector.js @@ -2,6 +2,31 @@ var helpers = require('../helpers'); +/** + * Checks a ruleset for selectors or EOL characters. If a selector is found before an EOL + * then it returns the selector node for reporting or returns false + * + * @param {Object} ruleset - The ruleset node + * @param {number} index - The current index of the delimiter + * @returns {Object|boolean} Either the selector node or false + */ +var checkLineForSelector = function (ruleset, index) { + var curIndex = index += 1; + if (ruleset.content[curIndex]) { + for (; curIndex < ruleset.content.length; curIndex++) { + var curType = ruleset.content[curIndex].type; + if (curType === 'space' && helpers.hasEOL(ruleset.content[curIndex])) { + return false; + } + if (curType === 'selector' || curType === 'typeSelector') { + return ruleset.content[curIndex]; + } + } + } + + return false; +}; + module.exports = { 'name': 'single-line-per-selector', 'defaults': {}, @@ -10,22 +35,16 @@ module.exports = { ast.traverseByType('ruleset', function (ruleset) { ruleset.forEach('delimiter', function (delimiter, j) { - var next = ruleset.content[j + 1] || false; + var next = checkLineForSelector(ruleset, j); if (next) { - if (next.is('selector')) { - next = next.content[0]; - } - - if (!(next.is('space') && helpers.hasEOL(next.content))) { - result = helpers.addUnique(result, { - 'ruleId': parser.rule.name, - 'line': next.start.line, - 'column': next.start.column, - 'message': 'Selectors must be placed on new lines', - 'severity': parser.severity - }); - } + result = helpers.addUnique(result, { + 'ruleId': parser.rule.name, + 'line': next.start.line, + 'column': next.start.column, + 'message': 'Selectors must be placed on new lines', + 'severity': parser.severity + }); } }); }); diff --git a/node_modules/sass-lint/lib/rules/space-around-operator.js b/node_modules/sass-lint/lib/rules/space-around-operator.js index 8a4bc9c..fd7cb8f 100644 --- a/node_modules/sass-lint/lib/rules/space-around-operator.js +++ b/node_modules/sass-lint/lib/rules/space-around-operator.js @@ -35,15 +35,27 @@ var isNegativeNumber = function (operator, next, previous, doublePrevious) { // Catch the following: // $foo: -20; - if (!previous && !next.is('space')) { - return true; + // $foo: -#{$foo} + // $foo: -($foo * 2) + // $foo: -$foo + if (next) { + if (!previous || (previous.is('space') && doublePrevious && !doublePrevious.is('number'))) { + if ( + next.is('number') || + next.is('interpolation') || + next.is('variable') || + next.is('parentheses') + ) { + return true; + } + } } // Catch the following: // .foo { // property: -16px; // } - if (next.is('dimension') || next.is('percentage')) { + if (next && (next.is('dimension') || next.is('percentage'))) { return true; } @@ -106,7 +118,7 @@ var isUnicode = function (operator, previous) { // @font-face { // unicode-range: U+26; // } - if (previous.is('ident') && previous.content === 'U') { + if (previous && previous.is('ident') && previous.content === 'U') { return true; } } @@ -124,7 +136,7 @@ var isUnicode = function (operator, previous) { var isImport = function (operator, parent) { if (operator === '/') { - if (parent.is('atrule') && parent.contains('atkeyword')) { + if (parent && parent.is('atrule') && parent.contains('atkeyword')) { var keyword = parent.first('atkeyword'); if (keyword.contains('ident')) { @@ -140,6 +152,21 @@ var isImport = function (operator, parent) { return false; }; +/** + * Determine if operator is part an ident + * + * @param {string} operator - The operator + * @param {Object} next - The next node + * @param {Object} previous - The previous node + * @returns {bool} true / false + */ +var isPartialIdent = function (operator, next, previous) { + if (operator === '-') { + return next && previous && previous.is('interpolation'); + } + return false; +}; + /** * Determine if operator is exception * @@ -169,6 +196,10 @@ var isException = function (operator, parent, i) { return true; } + if (isPartialIdent(operator, next, previous)) { + return true; + } + return false; }; @@ -262,7 +293,7 @@ var checkSpacing = function (node, i, parent, parser, result) { } } } - return true; + return result; }; module.exports = { diff --git a/node_modules/sass-lint/lib/rules/space-before-colon.js b/node_modules/sass-lint/lib/rules/space-before-colon.js index 0d82b46..f61791f 100644 --- a/node_modules/sass-lint/lib/rules/space-before-colon.js +++ b/node_modules/sass-lint/lib/rules/space-before-colon.js @@ -14,7 +14,7 @@ module.exports = { if (delimiter.content === ':') { var previous = parent.content[i - 1]; - if (previous.is('space')) { + if (previous && previous.is('space')) { if (!parser.options.include) { result = helpers.addUnique(result, { 'ruleId': parser.rule.name, diff --git a/node_modules/sass-lint/lib/rules/url-quotes.js b/node_modules/sass-lint/lib/rules/url-quotes.js index 37c1d84..ef852bf 100644 --- a/node_modules/sass-lint/lib/rules/url-quotes.js +++ b/node_modules/sass-lint/lib/rules/url-quotes.js @@ -17,8 +17,8 @@ module.exports = { result = helpers.addUnique(result, { 'ruleId': parser.rule.name, 'severity': parser.severity, - 'line': item.end.line, - 'column': item.end.column, + 'line': item.start.line, + 'column': item.start.column, 'message': 'Quotes around URLs are required' }); } diff --git a/node_modules/sass-lint/lib/rules/variable-for-property.js b/node_modules/sass-lint/lib/rules/variable-for-property.js index 2990cf4..b006595 100644 --- a/node_modules/sass-lint/lib/rules/variable-for-property.js +++ b/node_modules/sass-lint/lib/rules/variable-for-property.js @@ -3,7 +3,8 @@ var helpers = require('../helpers'); // The whitelisted ident values -var whitelistedValues = ['inherit', 'initial', 'transparent', 'none', 'currentColor']; +var whitelistedValues = ['inherit', 'initial', 'transparent', 'none', 'currentColor'], + ignoredValueTypes = ['important', 'space']; /** * Checks If the property is of a valid type, either its a variable or it's a whitelisted ident value @@ -23,6 +24,19 @@ var isValidProperty = function (propertyElem) { return false; }; +/** + * Checks If the property type is an ignored value type + * + * @param {Object} propertyElem - The property element + * @returns {boolean} Whether the property is an ignored type or not + */ +var isIgnoredType = function (propertyElem) { + if (propertyElem) { + return ignoredValueTypes.indexOf(propertyElem.type) !== -1; + } + return false; +}; + module.exports = { 'name': 'variable-for-property', 'defaults': { @@ -40,7 +54,7 @@ module.exports = { if (declarationType === 'ident') { if (parser.options.properties.indexOf(declarationIdent) !== -1) { node.forEach(function (valElem) { - if (!isValidProperty(valElem)) { + if (!isValidProperty(valElem) && !isIgnoredType(valElem)) { result = helpers.addUnique(result, { 'ruleId': parser.rule.name, 'line': declaration.start.line, diff --git a/node_modules/sass-lint/lib/rules/variable-name-format.js b/node_modules/sass-lint/lib/rules/variable-name-format.js index 9ab4d6c..2ea0577 100644 --- a/node_modules/sass-lint/lib/rules/variable-name-format.js +++ b/node_modules/sass-lint/lib/rules/variable-name-format.js @@ -18,6 +18,7 @@ module.exports = { violationMessage = false, name = variable.first().content; + strippedName = name; if (parser.options['allow-leading-underscore'] && name[0] === '_') { @@ -35,6 +36,11 @@ module.exports = { violationMessage = 'Variable \'' + name + '\' should be written in camelCase'; } break; + case 'pascalcase': + if (!helpers.isPascalCase(strippedName)) { + violationMessage = 'Variable \'' + name + '\' should be written in PascalCase'; + } + break; case 'snakecase': if (!helpers.isSnakeCase(strippedName)) { violationMessage = 'Variable \'' + name + '\' should be written in snake_case'; @@ -42,12 +48,12 @@ module.exports = { break; case 'strictbem': if (!helpers.isStrictBEM(strippedName)) { - violationMessage = 'Variable \'.' + name + '\' should be written in BEM (Block Element Modifier) format'; + violationMessage = 'Variable \'' + name + '\' should be written in BEM (Block Element Modifier) format'; } break; case 'hyphenatedbem': if (!helpers.isHyphenatedBEM(strippedName)) { - violationMessage = 'Variable \'.' + name + '\' should be written in hyphenated BEM (Block Element Modifier) format'; + violationMessage = 'Variable \'' + name + '\' should be written in hyphenated BEM (Block Element Modifier) format'; } break; default: diff --git a/node_modules/sass-lint/lib/rules/zero-unit.js b/node_modules/sass-lint/lib/rules/zero-unit.js index 3505d35..ac19296 100644 --- a/node_modules/sass-lint/lib/rules/zero-unit.js +++ b/node_modules/sass-lint/lib/rules/zero-unit.js @@ -2,8 +2,22 @@ var helpers = require('../helpers'); -var units = ['em', 'ex', 'ch', 'rem', 'vh', 'vw', 'vmin', 'vmax', - 'px', 'mm', 'cm', 'in', 'pt', 'pc']; +var units = [ + 'em', + 'ex', + 'ch', + 'rem', + 'vh', + 'vw', + 'vmin', + 'vmax', + 'px', + 'mm', + 'cm', + 'in', + 'pt', + 'pc' +]; module.exports = { 'name': 'zero-unit', diff --git a/node_modules/sass-lint/lib/selector-helpers.js b/node_modules/sass-lint/lib/selector-helpers.js new file mode 100644 index 0000000..86b79b9 --- /dev/null +++ b/node_modules/sass-lint/lib/selector-helpers.js @@ -0,0 +1,142 @@ +'use strict'; + +// ============================================================================== +// Helpers +// ============================================================================== + +var simpleIdents = [ + 'ident', + 'number', + 'operator', + 'combinator', + 'string', + 'parentSelector', + 'delimiter', + 'typeSelector', + 'attributeMatch' +]; + +var subSelectors = [ + 'parentSelectorExtension', + 'attributeName', + 'attributeValue', + 'dimension', + 'selector', + 'function' +]; + +/** + * Adds grammar around our content blocks to construct selectors with + * more readable formats. + * + * @param {object} val - The current value node + * @param {string} prefix - The grammar to prefix the value with + * @param {string} suffix - The grammar to add after the value + * @returns {string} The correct readable format + */ +var addGrammar = function (val, prefix, suffix) { + return prefix + val.content + suffix; +}; + +/** + * Adds grammar around our content blocks to construct selectors with + * more readable formats and loops the content as they're within sub blocks. + * + * @param {object} val - The current value node + * @param {string} prefix - The grammar to prefix the value with + * @param {string} suffix - The grammar to add after the value + * @param {function} constructSelector - The callback we wish to use which means constructSelector in this instance + * @returns {string} The correct readable format + */ +var constructSubSelector = function (val, prefix, suffix, constructSelector) { + var content = prefix; + val.forEach(function (subItem) { + content += constructSelector(subItem); + }); + + return content + suffix; +}; + +// ============================================================================== +// Public Methods +// ============================================================================== + +/** + * Constructs a syntax complete selector for our selector matching and warning output + * + * @param {object} val - The current node / part of our selector + * @returns {string} - Content: The current node with correct syntax e.g. class my-class = '.my-class' + */ +var constructSelector = function (val) { + var content = null; + + if (val.is('arguments')) { + content = constructSubSelector(val, '(', ')', constructSelector); + } + + else if (val.is('atkeyword')) { + content = constructSubSelector(val, '@', '', constructSelector); + } + + else if (val.is('attributeSelector')) { + content = constructSubSelector(val, '[', ']', constructSelector); + } + + else if (val.is('class')) { + content = addGrammar(val, '.', ''); + } + + else if (val.is('id')) { + content = addGrammar(val, '#', ''); + } + + else if (val.is('interpolation')) { + content = constructSubSelector(val, '#{', '}', constructSelector); + } + + else if (val.is('nth')) { + content = addGrammar(val, '(', ')'); + } + + else if (val.is('nthSelector')) { + content = constructSubSelector(val, ':', '', constructSelector); + } + + else if (val.is('parentheses')) { + content = constructSubSelector(val, '(', ')', constructSelector); + } + + else if (val.is('placeholder')) { + content = constructSubSelector(val, '%', '', constructSelector); + } + + else if (val.is('pseudoClass')) { + content = constructSubSelector(val, ':', '', constructSelector); + } + + else if (val.is('pseudoElement')) { + content = addGrammar(val, '::', ''); + } + + else if (val.is('space')) { + content = ' '; + } + + else if (val.is('variable')) { + content = constructSubSelector(val, '$', '', constructSelector); + } + + else if (simpleIdents.indexOf(val.type) !== -1) { + content = val.content; + } + + else if (subSelectors.indexOf(val.type) !== -1) { + content = constructSubSelector(val, '', '', constructSelector); + } + + return content; +}; + +module.exports = { + constructSelector: constructSelector +}; diff --git a/node_modules/sass-lint/node_modules/.bin/eslint b/node_modules/sass-lint/node_modules/.bin/eslint new file mode 100644 index 0000000..7beec73 --- /dev/null +++ b/node_modules/sass-lint/node_modules/.bin/eslint @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../../../eslint/bin/eslint.js" "$@" + ret=$? +else + node "$basedir/../../../eslint/bin/eslint.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/sass-lint/node_modules/.bin/eslint.cmd b/node_modules/sass-lint/node_modules/.bin/eslint.cmd new file mode 100644 index 0000000..f8ce142 --- /dev/null +++ b/node_modules/sass-lint/node_modules/.bin/eslint.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\..\..\eslint\bin\eslint.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\..\..\eslint\bin\eslint.js" %* +) \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/.bin/gonzales b/node_modules/sass-lint/node_modules/.bin/gonzales index 9081977..98284f3 100644 --- a/node_modules/sass-lint/node_modules/.bin/gonzales +++ b/node_modules/sass-lint/node_modules/.bin/gonzales @@ -1,15 +1,15 @@ #!/bin/sh -basedir=`dirname "$0"` +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") case `uname` in *CYGWIN*) basedir=`cygpath -w "$basedir"`;; esac if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../gonzales-pe-sl/bin/gonzales.js" "$@" + "$basedir/node" "$basedir/../../../gonzales-pe/bin/gonzales.js" "$@" ret=$? else - node "$basedir/../gonzales-pe-sl/bin/gonzales.js" "$@" + node "$basedir/../../../gonzales-pe/bin/gonzales.js" "$@" ret=$? fi exit $ret diff --git a/node_modules/sass-lint/node_modules/.bin/gonzales.cmd b/node_modules/sass-lint/node_modules/.bin/gonzales.cmd index 3198536..c56cbbe 100644 --- a/node_modules/sass-lint/node_modules/.bin/gonzales.cmd +++ b/node_modules/sass-lint/node_modules/.bin/gonzales.cmd @@ -1,7 +1,7 @@ @IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\gonzales-pe-sl\bin\gonzales.js" %* + "%~dp0\node.exe" "%~dp0\..\..\..\gonzales-pe\bin\gonzales.js" %* ) ELSE ( @SETLOCAL @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\gonzales-pe-sl\bin\gonzales.js" %* + node "%~dp0\..\..\..\gonzales-pe\bin\gonzales.js" %* ) \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/.bin/js-yaml b/node_modules/sass-lint/node_modules/.bin/js-yaml new file mode 100644 index 0000000..e633943 --- /dev/null +++ b/node_modules/sass-lint/node_modules/.bin/js-yaml @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../../../js-yaml/bin/js-yaml.js" "$@" + ret=$? +else + node "$basedir/../../../js-yaml/bin/js-yaml.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/sass-lint/node_modules/.bin/js-yaml.cmd b/node_modules/sass-lint/node_modules/.bin/js-yaml.cmd new file mode 100644 index 0000000..4a4f7b4 --- /dev/null +++ b/node_modules/sass-lint/node_modules/.bin/js-yaml.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\..\..\js-yaml\bin\js-yaml.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\..\..\js-yaml\bin\js-yaml.js" %* +) \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/.travis.yml b/node_modules/sass-lint/node_modules/gonzales-pe-sl/.travis.yml deleted file mode 100644 index e02248a..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -sudo: false - -language: node_js - -node_js: - - "5.0" - - "4.2" - - "4.1" - - "4.0" - - "0.12" - - "0.11" - - "0.10" - -matrix: - allow_failures: - - node_js: "0.11" - -compiler: clang-3.6 - -env: - - CXX=clang-3.6 - -addons: - apt: - sources: - - llvm-toolchain-precise-3.6 - - ubuntu-toolchain-r-test - packages: - - clang-3.6 - - g++-4.8 diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/bin/gonzales.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/bin/gonzales.js deleted file mode 100644 index 670117a..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/bin/gonzales.js +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/env node - -'use strict'; - -var parseArgs = require('minimist'); -var gonzales = require('..'); -var fs = require('fs'); -var path = require('path'); - -var options = getOptions(); - -if (options.help) { - return displayHelp(); -} - -if (isSTDIN()) { - processSTDIN(); -} else { - processFile(options._[0]); -} - -function getOptions() { - var parserOptions = { - boolean: ['silent', 'simple'], - alias: { - help: 'h', - syntax: 's', - context: 'c' - } - }; - return parseArgs(process.argv.slice(2), parserOptions); -} - -function isSTDIN() { - return options._.indexOf('-') !== -1; -} - -function processSTDIN() { - var input = ''; - process.stdin.resume(); - process.stdin.setEncoding('utf8'); - process.stdin.on('data', function (data) { - input += data; - }); - process.stdin.on('end', function () { - processInputData(input); - }); -} - -function processFile(file) { - if (!file) process.exit(0); - if (!options.syntax) options.syntax = path.extname(file).substring(1); - var css = fs.readFileSync(file, 'utf-8').trim(); - processInputData(css); -} - -function processInputData(input) { - try { - var ast = gonzales.parse(input, { - syntax: options.syntax, - context: options.context - }); - printTree(ast); - process.exit(0); - } catch (e) { - if (!options.silent) process.stderr.write(e.toString()); - process.exit(1); - } -} - -function printTree(ast) { - if (!options.simple) { - var tree = ast.toJson(); - process.stdout.write(tree); - } else { - var lastLevel; - - ast.traverse(function(node, i, parent, lastLevel) { - var type = node.type; - var spaces = new Array(lastLevel).join(' |'); - if (typeof node.content === 'string') { - var content = JSON.stringify(node.content); - console.log(spaces, '->', type); - console.log(spaces, ' ', content); - } else { - console.log(spaces, '->', type); - } - }); - - var spaces = new Array(lastLevel).join(' -'); - console.log(spaces); - } -} - -function displayHelp() { - var help = [ - 'NAME', - ' gonzlaes-pe — Parse a css file and print its parse tree in JSON', - '', - 'SYNOPSIS', - ' gonzales-pe [options] file.js', - ' cat file.js | gonzales-pe [options] -', - '', - 'OPTIONS', - ' -s, --syntax', - ' Syntax name: css, less, sass or scss.', - ' -c, --context', - ' Context of code part. See docs on node types for more info.', - ' --simple', - ' Print a simplified parse tree structure instead of JSON.', - ' --silent', - ' Don\'t print any error messages.' - ]; - console.log(help.join('\n')); -} diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/css/mark.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/css/mark.js deleted file mode 100644 index 5d4ce03..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/css/mark.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict';var TokenType=require('../token-types'); /** - * Mark whitespaces and comments - * @param {Array} tokens - */function markSpacesAndComments(tokens){var tokensLength=tokens.length;var spaces=[-1,-1];var type; // Current token's type -// For every token in the token list, mark spaces and line breaks -// as spaces (set both `ws` and `sc` flags). Mark multiline comments -// with `sc` flag. -// If there are several spaces or tabs or line breaks or multiline -// comments in a row, group them: take the last one's index number -// and save it to the first token in the group as a reference: -// e.g., `ws_last = 7` for a group of whitespaces or `sc_last = 9` -// for a group of whitespaces and comments. -for(var i=0;i < tokensLength;i++) {type = tokens[i].type;if(type === TokenType.Space || type === TokenType.Tab || type === TokenType.Newline){markSpace(tokens,i,spaces);}else if(type === TokenType.CommentML){markComment(tokens,i,spaces);}else {markEndOfSpacesAndComments(tokens,i,spaces);}}markEndOfSpacesAndComments(tokens,i,spaces);}function markSpace(tokens,i,spaces){var token=tokens[i];token.ws = true;token.sc = true;if(spaces[0] === -1)spaces[0] = i;if(spaces[1] === -1)spaces[1] = i;}function markComment(tokens,i,spaces){var ws=spaces[0];tokens[i].sc = true;if(ws !== -1){tokens[ws].ws_last = i - 1;spaces[0] = -1;}}function markEndOfSpacesAndComments(tokens,i,spaces){var ws=spaces[0];var sc=spaces[1];if(ws !== -1){tokens[ws].ws_last = i - 1;spaces[0] = -1;}if(sc !== -1){tokens[sc].sc_last = i - 1;spaces[1] = -1;}} /** - * Pair brackets - * @param {Array} tokens - */function markBrackets(tokens){var tokensLength=tokens.length;var ps=[]; // Parentheses -var sbs=[]; // Square brackets -var cbs=[]; // Curly brackets -var t=undefined; // Current token -// For every token in the token list, if we meet an opening (left) -// bracket, push its index number to a corresponding array. -// If we then meet a closing (right) bracket, look at the corresponding -// array. If there are any elements (records about previously met -// left brackets), take a token of the last left bracket (take -// the last index number from the array and find a token with -// this index number) and save right bracket's index as a reference: -for(var i=0;i < tokensLength;i++) {t = tokens[i];var type=t.type;if(type === TokenType.LeftParenthesis){ps.push(i);}else if(type === TokenType.RightParenthesis){if(ps.length){t.left = ps.pop();tokens[t.left].right = i;}}else if(type === TokenType.LeftSquareBracket){sbs.push(i);}else if(type === TokenType.RightSquareBracket){if(sbs.length){t.left = sbs.pop();tokens[t.left].right = i;}}else if(type === TokenType.LeftCurlyBracket){cbs.push(i);}else if(type === TokenType.RightCurlyBracket){if(cbs.length){t.left = cbs.pop();tokens[t.left].right = i;}}}} /** - * @param {Array} tokens - */function markTokens(tokens){ // Mark paired brackets: -markBrackets(tokens); // Mark whitespaces and comments: -markSpacesAndComments(tokens);}module.exports = markTokens; \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/css/parse.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/css/parse.js deleted file mode 100644 index 57e294d..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/css/parse.js +++ /dev/null @@ -1,459 +0,0 @@ -// jscs:disable maximumLineLength -'use strict';var Node=require('../node/basic-node');var NodeType=require('../node/node-types');var TokenType=require('../token-types'); /** - * @type {Array} - */var tokens; /** - * @type {Number} - */var tokensLength; /** - * @type {Number} - */var pos;var contexts={'atkeyword':function(){return checkAtkeyword(pos) && getAtkeyword();},'atrule':function(){return checkAtrule(pos) && getAtrule();},'block':function(){return checkBlock(pos) && getBlock();},'brackets':function(){return checkBrackets(pos) && getBrackets();},'class':function(){return checkClass(pos) && getClass();},'combinator':function(){return checkCombinator(pos) && getCombinator();},'commentML':function(){return checkCommentML(pos) && getCommentML();},'declaration':function(){return checkDeclaration(pos) && getDeclaration();},'declDelim':function(){return checkDeclDelim(pos) && getDeclDelim();},'delim':function(){return checkDelim(pos) && getDelim();},'dimension':function(){return checkDimension(pos) && getDimension();},'expression':function(){return checkExpression(pos) && getExpression();},'function':function(){return checkFunction(pos) && getFunction();},'ident':function(){return checkIdent(pos) && getIdent();},'important':function(){return checkImportant(pos) && getImportant();},'namespace':function(){return checkNamespace(pos) && getNamespace();},'number':function(){return checkNumber(pos) && getNumber();},'operator':function(){return checkOperator(pos) && getOperator();},'parentheses':function(){return checkParentheses(pos) && getParentheses();},'percentage':function(){return checkPercentage(pos) && getPercentage();},'progid':function(){return checkProgid(pos) && getProgid();},'property':function(){return checkProperty(pos) && getProperty();},'propertyDelim':function(){return checkPropertyDelim(pos) && getPropertyDelim();},'pseudoc':function(){return checkPseudoc(pos) && getPseudoc();},'pseudoe':function(){return checkPseudoe(pos) && getPseudoe();},'ruleset':function(){return checkRuleset(pos) && getRuleset();},'s':function(){return checkS(pos) && getS();},'selector':function(){return checkSelector(pos) && getSelector();},'shash':function(){return checkShash(pos) && getShash();},'string':function(){return checkString(pos) && getString();},'stylesheet':function(){return checkStylesheet(pos) && getStylesheet();},'unary':function(){return checkUnary(pos) && getUnary();},'uri':function(){return checkUri(pos) && getUri();},'value':function(){return checkValue(pos) && getValue();},'vhash':function(){return checkVhash(pos) && getVhash();}}; /** - * Stop parsing and display error. - * @param {Number=} i Token's index number - */function throwError(i){var ln=tokens[i].ln;throw {line:ln,syntax:'css'};} /** - * @param {Object} exclude - * @param {Number} i Token's index number - * @return {Number} - */function checkExcluding(exclude,i){var start=i;while(i < tokensLength) {if(exclude[tokens[i++].type])break;}return i - start - 2;} /** - * @param {Number} start - * @param {Number} finish - * @return {String} - */function joinValues(start,finish){var s='';for(var i=start;i < finish + 1;i++) {s += tokens[i].value;}return s;} /** - * @param {Number} start - * @param {Number} num - * @return {String} - */function joinValues2(start,num){if(start + num - 1 >= tokensLength)return;var s='';for(var i=0;i < num;i++) {s += tokens[start + i].value;}return s;}function getLastPosition(content,line,column,colOffset){return typeof content === 'string'?getLastPositionForString(content,line,column,colOffset):getLastPositionForArray(content,line,column,colOffset);}function getLastPositionForString(content,line,column,colOffset){var position=[];if(!content){position = [line,column];if(colOffset)position[1] += colOffset - 1;return position;}var lastLinebreak=content.lastIndexOf('\n');var endsWithLinebreak=lastLinebreak === content.length - 1;var splitContent=content.split('\n');var linebreaksCount=splitContent.length - 1;var prevLinebreak=linebreaksCount === 0 || linebreaksCount === 1?-1:content.length - splitContent[linebreaksCount - 1].length - 2; // Line: -var offset=endsWithLinebreak?linebreaksCount - 1:linebreaksCount;position[0] = line + offset; // Column: -if(endsWithLinebreak){offset = prevLinebreak !== -1?content.length - prevLinebreak:content.length - 1;}else {offset = linebreaksCount !== 0?content.length - lastLinebreak - column - 1:content.length - 1;}position[1] = column + offset;if(!colOffset)return position;if(endsWithLinebreak){position[0]++;position[1] = colOffset;}else {position[1] += colOffset;}return position;}function getLastPositionForArray(content,line,column,colOffset){var position;if(content.length === 0){position = [line,column];}else {var c=content[content.length - 1];if(c.hasOwnProperty('end')){position = [c.end.line,c.end.column];}else {position = getLastPosition(c.content,line,column);}}if(!colOffset)return position;if(tokens[pos - 1].type !== 'Newline'){position[1] += colOffset;}else {position[0]++;position[1] = 1;}return position;}function newNode(type,content,line,column,end){if(!end)end = getLastPosition(content,line,column);return new Node({type:type,content:content,start:{line:line,column:column},end:{line:end[0],column:end[1]},syntax:'css'});} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkAny(i){var l;if(l = checkBrackets(i))tokens[i].any_child = 1;else if(l = checkParentheses(i))tokens[i].any_child = 2;else if(l = checkString(i))tokens[i].any_child = 3;else if(l = checkPercentage(i))tokens[i].any_child = 4;else if(l = checkDimension(i))tokens[i].any_child = 5;else if(l = checkNumber(i))tokens[i].any_child = 6;else if(l = checkUri(i))tokens[i].any_child = 7;else if(l = checkExpression(i))tokens[i].any_child = 8;else if(l = checkFunction(i))tokens[i].any_child = 9;else if(l = checkIdent(i))tokens[i].any_child = 10;else if(l = checkClass(i))tokens[i].any_child = 11;else if(l = checkUnary(i))tokens[i].any_child = 12;return l;} /** - * @return {Node} - */function getAny(){var childType=tokens[pos].any_child;if(childType === 1)return getBrackets();else if(childType === 2)return getParentheses();else if(childType === 3)return getString();else if(childType === 4)return getPercentage();else if(childType === 5)return getDimension();else if(childType === 6)return getNumber();else if(childType === 7)return getUri();else if(childType === 8)return getExpression();else if(childType === 9)return getFunction();else if(childType === 10)return getIdent();else if(childType === 11)return getClass();else if(childType === 12)return getUnary();} /** - * Check if token is part of an @-word (e.g. `@import`, `@include`) - * @param {Number} i Token's index number - * @return {Number} - */function checkAtkeyword(i){var l; // Check that token is `@`: -if(i >= tokensLength || tokens[i++].type !== TokenType.CommercialAt)return 0;return (l = checkIdent(i))?l + 1:0;} /** - * Get node with @-word - * @return {Node} - */function getAtkeyword(){var type=NodeType.AtkeywordType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];pos++;content.push(getIdent());return newNode(type,content,line,column);} /** - * Check if token is a part of an @-rule - * @param {Number} i Token's index number - * @return {Number} Length of @-rule - */function checkAtrule(i){var l;if(i >= tokensLength)return 0; // If token already has a record of being part of an @-rule, -// return the @-rule's length: -if(tokens[i].atrule_l !== undefined)return tokens[i].atrule_l; // If token is part of an @-rule, save the rule's type to token: -if(l = checkKeyframesRule(i))tokens[i].atrule_type = 4;else if(l = checkAtruler(i))tokens[i].atrule_type = 1; // @-rule with ruleset -else if(l = checkAtruleb(i))tokens[i].atrule_type = 2; // Block @-rule -else if(l = checkAtrules(i))tokens[i].atrule_type = 3; // Single-line @-rule -else return 0; // If token is part of an @-rule, save the rule's length to token: -tokens[i].atrule_l = l;return l;} /** - * Get node with @-rule - * @return {Node} - */function getAtrule(){switch(tokens[pos].atrule_type){case 1:return getAtruler(); // @-rule with ruleset -case 2:return getAtruleb(); // Block @-rule -case 3:return getAtrules(); // Single-line @-rule -case 4:return getKeyframesRule();}} /** - * Check if token is part of a block @-rule - * @param {Number} i Token's index number - * @return {Number} Length of the @-rule - */function checkAtruleb(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(l = checkTsets(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** - * Get node with a block @-rule - * @return {Node} - */function getAtruleb(){var type=NodeType.AtruleType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[getAtkeyword()].concat(getTsets()).concat([getBlock()]);return newNode(type,content,line,column);} /** - * Check if token is part of an @-rule with ruleset - * @param {Number} i Token's index number - * @return {Number} Length of the @-rule - */function checkAtruler(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(l = checkTsets(i))i += l;if(i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket)i++;else return 0;if(l = checkAtrulers(i))i += l;if(i < tokensLength && tokens[i].type === TokenType.RightCurlyBracket)i++;else return 0;return i - start;} /** - * Get node with an @-rule with ruleset - * @return {Node} - */function getAtruler(){var type=NodeType.AtruleType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[getAtkeyword()];content = content.concat(getTsets());content.push(getAtrulers());return newNode(type,content,line,column);} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkAtrulers(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkSC(i))i += l;while(i < tokensLength) {if(l = checkSC(i))tokens[i].atrulers_child = 1;else if(l = checkAtrule(i))tokens[i].atrulers_child = 2;else if(l = checkRuleset(i))tokens[i].atrulers_child = 3;else break;i += l;}tokens[i].atrulers_end = 1;if(l = checkSC(i))i += l;return i - start;} /** - * @return {Node} - */function getAtrulers(){var type=NodeType.BlockType;var token=tokens[pos++];var line=token.ln;var column=token.col;var content=getSC();while(!tokens[pos].atrulers_end) {var childType=tokens[pos].atrulers_child;if(childType === 1)content = content.concat(getSC());else if(childType === 2)content.push(getAtrule());else if(childType === 3)content.push(getRuleset());}content = content.concat(getSC());var end=getLastPosition(content,line,column,1);pos++;return newNode(type,content,line,column,end);} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkAtrules(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(l = checkTsets(i))i += l;return i - start;} /** - * @return {Node} - */function getAtrules(){var type=NodeType.AtruleType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[getAtkeyword()].concat(getTsets());return newNode(type,content,line,column);} /** - * Check if token is part of a block (e.g. `{...}`). - * @param {Number} i Token's index number - * @return {Number} Length of the block - */function checkBlock(i){return i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket?tokens[i].right - i + 1:0;} /** - * Get node with a block - * @return {Node} - */function getBlock(){var type=NodeType.BlockType;var token=tokens[pos];var line=token.ln;var column=token.col;var end=tokens[pos++].right;var content=[];while(pos < end) {if(checkBlockdecl(pos))content = content.concat(getBlockdecl());else throwError(pos);}var end_=getLastPosition(content,line,column,1);pos = end + 1;return newNode(type,content,line,column,end_);} /** - * Check if token is part of a declaration (property-value pair) - * @param {Number} i Token's index number - * @return {Number} Length of the declaration - */function checkBlockdecl(i){var l;if(i >= tokensLength)return 0;if(l = checkBlockdecl1(i))tokens[i].bd_type = 1;else if(l = checkBlockdecl2(i))tokens[i].bd_type = 2;else if(l = checkBlockdecl3(i))tokens[i].bd_type = 3;else if(l = checkBlockdecl4(i))tokens[i].bd_type = 4;else return 0;return l;} /** - * @return {Array} - */function getBlockdecl(){switch(tokens[pos].bd_type){case 1:return getBlockdecl1();case 2:return getBlockdecl2();case 3:return getBlockdecl3();case 4:return getBlockdecl4();}} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkBlockdecl1(i){var start=i;var l=undefined;if(l = checkSC(i))i += l;if(l = checkDeclaration(i))tokens[i].bd_kind = 1;else if(l = checkAtrule(i))tokens[i].bd_kind = 2;else return 0;i += l;if(l = checkSC(i))i += l;if(i < tokensLength && (l = checkDeclDelim(i)))i += l;else return 0;if(l = checkSC(i))i += l;else return 0;return i - start;} /** - * @return {Array} - */function getBlockdecl1(){var sc=getSC();var x=undefined;switch(tokens[pos].bd_kind){case 1:x = getDeclaration();break;case 2:x = getAtrule();break;}return sc.concat([x]).concat(getSC()).concat([getDeclDelim()]).concat(getSC());} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkBlockdecl2(i){var start=i;var l=undefined;if(l = checkSC(i))i += l;if(l = checkDeclaration(i))tokens[i].bd_kind = 1;else if(l = checkAtrule(i))tokens[i].bd_kind = 2;else return 0;i += l;if(l = checkSC(i))i += l;return i - start;} /** - * @return {Array} - */function getBlockdecl2(){var sc=getSC();var x=undefined;switch(tokens[pos].bd_kind){case 1:x = getDeclaration();break;case 2:x = getAtrule();break;}return sc.concat([x]).concat(getSC());} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkBlockdecl3(i){var start=i;var l=undefined;if(l = checkSC(i))i += l;if(l = checkDeclDelim(i))i += l;else return 0;if(l = checkSC(i))i += l;return i - start;} /** - * @return {Array} - */function getBlockdecl3(){return getSC().concat([getDeclDelim()]).concat(getSC());} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkBlockdecl4(i){return checkSC(i);} /** - * @return {Array} - */function getBlockdecl4(){return getSC();} /** - * Check if token is part of text inside square brackets, e.g. `[1]` - * @param {Number} i Token's index number - * @return {Number} - */function checkBrackets(i){if(i >= tokensLength || tokens[i].type !== TokenType.LeftSquareBracket)return 0;return tokens[i].right - i + 1;} /** - * Get node with text inside square brackets, e.g. `[1]` - * @return {Node} - */function getBrackets(){var type=NodeType.BracketsType;var token=tokens[pos];var line=token.ln;var column=token.col;pos++;var tsets=getTsets();var end=getLastPosition(tsets,line,column,1);pos++;return newNode(type,tsets,line,column,end);} /** - * Check if token is part of a class selector (e.g. `.abc`) - * @param {Number} i Token's index number - * @return {Number} Length of the class selector - */function checkClass(i){var l;if(i >= tokensLength)return 0;if(tokens[i].class_l)return tokens[i].class_l;if(tokens[i++].type === TokenType.FullStop && (l = checkIdent(i))){tokens[i].class_l = l + 1;return l + 1;}return 0;} /** - * Get node with a class selector - * @return {Node} - */function getClass(){var type=NodeType.ClassType;var token=tokens[pos++];var line=token.ln;var column=token.col;var content=[getIdent()];return newNode(type,content,line,column);}function checkCombinator(i){if(i >= tokensLength)return 0;var l=undefined;if(l = checkCombinator1(i))tokens[i].combinatorType = 1;else if(l = checkCombinator2(i))tokens[i].combinatorType = 2;else if(l = checkCombinator3(i))tokens[i].combinatorType = 3;return l;}function getCombinator(){var type=tokens[pos].combinatorType;if(type === 1)return getCombinator1();if(type === 2)return getCombinator2();if(type === 3)return getCombinator3();} /** - * (1) `||` - */function checkCombinator1(i){if(tokens[i].type === TokenType.VerticalLine && tokens[i + 1].type === TokenType.VerticalLine)return 2;else return 0;}function getCombinator1(){var type=NodeType.CombinatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='||';pos += 2;return newNode(type,content,line,column);} /** - * (1) `>` - * (2) `+` - * (3) `~` - */function checkCombinator2(i){var type=tokens[i].type;if(type === TokenType.PlusSign || type === TokenType.GreaterThanSign || type === TokenType.Tilde)return 1;else return 0;}function getCombinator2(){var type=NodeType.CombinatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=tokens[pos++].value;return newNode(type,content,line,column);} /** - * (1) `/panda/` - */function checkCombinator3(i){var start=i;if(tokens[i].type === TokenType.Solidus)i++;else return 0;var l=undefined;if(l = checkIdent(i))i += l;else return 0;if(tokens[i].type === TokenType.Solidus)i++;else return 0;return i - start;}function getCombinator3(){var type=NodeType.CombinatorType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `/`. -pos++;var ident=getIdent(); // Skip `/`. -pos++;var content='/' + ident.content + '/';return newNode(type,content,line,column);} /** - * Check if token is a multiline comment. - * @param {Number} i Token's index number - * @return {Number} `1` if token is a multiline comment, otherwise `0` - */function checkCommentML(i){return i < tokensLength && tokens[i].type === TokenType.CommentML?1:0;} /** - * Get node with a multiline comment - * @return {Node} - */function getCommentML(){var type=NodeType.CommentMLType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=tokens[pos].value.substring(2);var l=content.length;if(content.charAt(l - 2) === '*' && content.charAt(l - 1) === '/')content = content.substring(0,l - 2);var end=getLastPosition(content,line,column,2);if(end[0] === line)end[1] += 2;pos++;return newNode(type,content,line,column,end);} /** - * Check if token is part of a declaration (property-value pair) - * @param {Number} i Token's index number - * @return {Number} Length of the declaration - */function checkDeclaration(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkProperty(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkPropertyDelim(i))i++;else return 0;if(l = checkSC(i))i += l;if(l = checkValue(i))i += l;else return 0;return i - start;} /** - * Get node with a declaration - * @return {Node} - */function getDeclaration(){var type=NodeType.DeclarationType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[getProperty()].concat(getSC()).concat([getPropertyDelim()]).concat(getSC()).concat([getValue()]);return newNode(type,content,line,column);} /** - * Check if token is a semicolon - * @param {Number} i Token's index number - * @return {Number} `1` if token is a semicolon, otherwise `0` - */function checkDeclDelim(i){return i < tokensLength && tokens[i].type === TokenType.Semicolon?1:0;} /** - * Get node with a semicolon - * @return {Node} - */function getDeclDelim(){var type=NodeType.DeclDelimType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=';';pos++;return newNode(type,content,line,column);} /** - * Check if token is a comma - * @param {Number} i Token's index number - * @return {Number} `1` if token is a comma, otherwise `0` - */function checkDelim(i){return i < tokensLength && tokens[i].type === TokenType.Comma?1:0;} /** - * Get node with a comma - * @return {Node} - */function getDelim(){var type=NodeType.DelimType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=',';pos++;return newNode(type,content,line,column);} /** - * Check if token is part of a number with dimension unit (e.g. `10px`) - * @param {Number} i Token's index number - * @return {Number} - */function checkDimension(i){var ln=checkNumber(i);var li=undefined;if(i >= tokensLength || !ln || i + ln >= tokensLength)return 0;return (li = checkNmName2(i + ln))?ln + li:0;} /** - * Get node of a number with dimension unit - * @return {Node} - */function getDimension(){var type=NodeType.DimensionType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[getNumber()];token = tokens[pos];var ident=newNode(NodeType.IdentType,getNmName2(),token.ln,token.col);content.push(ident);return newNode(type,content,line,column);} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkExpression(i){var start=i;if(i >= tokensLength || tokens[i++].value !== 'expression' || i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;return tokens[i].right - start + 1;} /** - * @return {Node} - */function getExpression(){var type=NodeType.ExpressionType;var token=tokens[pos];var line=token.ln;var column=token.col;pos++;var content=joinValues(pos + 1,tokens[pos].right - 1);var end=getLastPosition(content,line,column,1);if(end[0] === line)end[1] += 11;pos = tokens[pos].right + 1;return newNode(type,content,line,column,end);} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkFunction(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkIdent(i))i += l;else return 0;return i < tokensLength && tokens[i].type === TokenType.LeftParenthesis?tokens[i].right - start + 1:0;} /** - * @return {Node} - */function getFunction(){var type=NodeType.FunctionType;var token=tokens[pos];var line=token.ln;var column=token.col;var ident=getIdent();var content=[ident];content.push(getArguments());return newNode(type,content,line,column);} /** - * @return {Node} - */function getArguments(){var type=NodeType.ArgumentsType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];var body=undefined;pos++;while(pos < tokensLength && tokens[pos].type !== TokenType.RightParenthesis) {if(checkDeclaration(pos))content.push(getDeclaration());else if(checkArgument(pos)){body = getArgument();if(typeof body.content === 'string')content.push(body);else content = content.concat(body);}else if(checkClass(pos))content.push(getClass());else throwError(pos);}var end=getLastPosition(content,line,column,1);pos++;return newNode(type,content,line,column,end);} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkArgument(i){var l;if(l = checkVhash(i))tokens[i].argument_child = 1;else if(l = checkAny(i))tokens[i].argument_child = 2;else if(l = checkSC(i))tokens[i].argument_child = 3;else if(l = checkOperator(i))tokens[i].argument_child = 4;return l;} /** - * @return {Node} - */function getArgument(){var childType=tokens[pos].argument_child;if(childType === 1)return getVhash();else if(childType === 2)return getAny();else if(childType === 3)return getSC();else if(childType === 4)return getOperator();} /** - * Check if token is part of an identifier - * @param {Number} i Token's index number - * @return {Number} Length of the identifier - */function checkIdent(i){var start=i;var wasIdent=undefined;if(i >= tokensLength)return 0; // Check if token is part of an identifier starting with `_`: -if(tokens[i].type === TokenType.LowLine)return checkIdentLowLine(i); // If token is a character, `-`, `$` or `*`, skip it & continue: -if(tokens[i].type === TokenType.HyphenMinus || tokens[i].type === TokenType.Identifier || tokens[i].type === TokenType.DollarSign || tokens[i].type === TokenType.Asterisk)i++;else return 0; // Remember if previous token's type was identifier: -wasIdent = tokens[i - 1].type === TokenType.Identifier;for(;i < tokensLength;i++) {if(i >= tokensLength)break;if(tokens[i].type !== TokenType.HyphenMinus && tokens[i].type !== TokenType.LowLine){if(tokens[i].type !== TokenType.Identifier && (tokens[i].type !== TokenType.DecimalNumber || !wasIdent))break;else wasIdent = true;}}if(!wasIdent && tokens[start].type !== TokenType.Asterisk)return 0;tokens[start].ident_last = i - 1;return i - start;} /** - * Check if token is part of an identifier starting with `_` - * @param {Number} i Token's index number - * @return {Number} Length of the identifier - */function checkIdentLowLine(i){var start=i;if(i++ >= tokensLength)return 0;for(;i < tokensLength;i++) {if(tokens[i].type !== TokenType.HyphenMinus && tokens[i].type !== TokenType.DecimalNumber && tokens[i].type !== TokenType.LowLine && tokens[i].type !== TokenType.Identifier)break;} // Save index number of the last token of the identifier: -tokens[start].ident_last = i - 1;return i - start;} /** - * Get node with an identifier - * @return {Node} - */function getIdent(){var type=NodeType.IdentType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,tokens[pos].ident_last);pos = tokens[pos].ident_last + 1;return newNode(type,content,line,column);} /** - * Check if token is part of `!important` word - * @param {Number} i Token's index number - * @return {Number} - */function checkImportant(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark)return 0;if(l = checkSC(i))i += l;if(tokens[i].value === 'important'){tokens[start].importantEnd = i;return i - start + 1;}else {return 0;}} /** - * Get node with `!important` word - * @return {Node} - */function getImportant(){var type=NodeType.ImportantType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,token.importantEnd);pos = token.importantEnd + 1;return newNode(type,content,line,column);}function checkKeyframesBlock(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkKeyframesSelector(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;}function getKeyframesBlock(){var type=NodeType.RulesetType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[].concat([getKeyframesSelector()],getSC(),[getBlock()]);return newNode(type,content,line,column);}function checkKeyframesBlocks(i){var start=i;var l=undefined;if(i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket)i++;else return 0;if(l = checkSC(i))i += l;if(l = checkKeyframesBlock(i))i += l;else return 0;while(tokens[i].type !== TokenType.RightCurlyBracket) {if(l = checkSC(i))i += l;else if(l = checkKeyframesBlock(i))i += l;else break;}if(i < tokensLength && tokens[i].type === TokenType.RightCurlyBracket)i++;else return 0;return i - start;}function getKeyframesBlocks(){var type=NodeType.BlockType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];var keyframesBlocksEnd=token.right; // Skip `{`. -pos++;while(pos < keyframesBlocksEnd) {if(checkSC(pos))content = content.concat(getSC());else if(checkKeyframesBlock(pos))content.push(getKeyframesBlock());}var end=getLastPosition(content,line,column,1); // Skip `}`. -pos++;return newNode(type,content,line,column,end);} /** - * Check if token is part of a @keyframes rule. - * @param {Number} i Token's index number - * @return {Number} Length of the @keyframes rule - */function checkKeyframesRule(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;var atruleName=joinValues2(i - l,l);if(atruleName.indexOf('keyframes') === -1)return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdent(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkKeyframesBlocks(i))i += l;else return 0;return i - start;} /** - * @return {Node} - */function getKeyframesRule(){var type=NodeType.AtruleType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[].concat([getAtkeyword()],getSC(),[getIdent()],getSC(),[getKeyframesBlocks()]);return newNode(type,content,line,column);}function checkKeyframesSelector(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkIdent(i)){ // Valid selectors are only `from` and `to`. -var selector=joinValues2(i,l);if(selector !== 'from' && selector !== 'to')return 0;i += l;tokens[start].keyframesSelectorType = 1;}else if(l = checkPercentage(i)){i += l;tokens[start].keyframesSelectorType = 2;}else {return 0;}return i - start;}function getKeyframesSelector(){var keyframesSelectorType=NodeType.KeyframesSelectorType;var selectorType=NodeType.SelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(token.keyframesSelectorType === 1){content.push(getIdent());}else {content.push(getPercentage());}var keyframesSelector=newNode(keyframesSelectorType,content,line,column);return newNode(selectorType,[keyframesSelector],line,column);} /** - * Check if token is a namespace sign (`|`) - * @param {Number} i Token's index number - * @return {Number} `1` if token is `|`, `0` if not - */function checkNamespace(i){return i < tokensLength && tokens[i].type === TokenType.VerticalLine?1:0;} /** - * Get node with a namespace sign - * @return {Node} - */function getNamespace(){var type=NodeType.NamespaceType;var token=tokens[pos++];var line=token.ln;var column=token.col;var content='|';return newNode(type,content,line,column);} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkNmName2(i){if(tokens[i].type === TokenType.Identifier)return 1;else if(tokens[i].type !== TokenType.DecimalNumber)return 0;i++;return i < tokensLength && tokens[i].type === TokenType.Identifier?2:1;} /** - * @return {String} - */function getNmName2(){var s=tokens[pos].value;if(tokens[pos++].type === TokenType.DecimalNumber && pos < tokensLength && tokens[pos].type === TokenType.Identifier)s += tokens[pos++].value;return s;} /** - * Check if token is part of a number - * @param {Number} i Token's index number - * @return {Number} Length of number - */function checkNumber(i){if(i >= tokensLength)return 0;if(tokens[i].number_l)return tokens[i].number_l; // `10`: -if(i < tokensLength && tokens[i].type === TokenType.DecimalNumber && (!tokens[i + 1] || tokens[i + 1] && tokens[i + 1].type !== TokenType.FullStop))return tokens[i].number_l = 1,tokens[i].number_l; // `10.`: -if(i < tokensLength && tokens[i].type === TokenType.DecimalNumber && tokens[i + 1] && tokens[i + 1].type === TokenType.FullStop && (!tokens[i + 2] || tokens[i + 2].type !== TokenType.DecimalNumber))return tokens[i].number_l = 2,tokens[i].number_l; // `.10`: -if(i < tokensLength && tokens[i].type === TokenType.FullStop && tokens[i + 1].type === TokenType.DecimalNumber)return tokens[i].number_l = 2,tokens[i].number_l; // `10.10`: -if(i < tokensLength && tokens[i].type === TokenType.DecimalNumber && tokens[i + 1] && tokens[i + 1].type === TokenType.FullStop && tokens[i + 2] && tokens[i + 2].type === TokenType.DecimalNumber)return tokens[i].number_l = 3,tokens[i].number_l;return 0;} /** - * Get node with number - * @return {Node} - */function getNumber(){var type=NodeType.NumberType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='';var l=tokens[pos].number_l;for(var j=0;j < l;j++) {content += tokens[pos + j].value;}pos += l;return newNode(type,content,line,column);} /** - * Check if token is an operator (`/`, `,`, `:` or `=`). - * @param {Number} i Token's index number - * @return {Number} `1` if token is an operator, otherwise `0` - */function checkOperator(i){if(i >= tokensLength)return 0;switch(tokens[i].type){case TokenType.Solidus:case TokenType.Comma:case TokenType.Colon:case TokenType.EqualsSign:return 1;}return 0;} /** - * Get node with an operator - * @return {Node} - */function getOperator(){var type=NodeType.OperatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=token.value;pos++;return newNode(type,content,line,column);} /** - * Check if token is part of text inside parentheses, e.g. `(1)` - * @param {Number} i Token's index number - * @return {Number} - */function checkParentheses(i){if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;return tokens[i].right - i + 1;} /** - * Get node with text inside parentheses, e.g. `(1)` - * @return {Node} - */function getParentheses(){var type=NodeType.ParenthesesType;var token=tokens[pos];var line=token.ln;var column=token.col;pos++;var tsets=getTsets();var end=getLastPosition(tsets,line,column,1);pos++;return newNode(type,tsets,line,column,end);} /** - * Check if token is part of a number with percent sign (e.g. `10%`) - * @param {Number} i Token's index number - * @return {Number} - */function checkPercentage(i){var x;if(i >= tokensLength)return 0;x = checkNumber(i);if(!x || i + x >= tokensLength)return 0;return tokens[i + x].type === TokenType.PercentSign?x + 1:0;} /** - * Get node of number with percent sign - * @return {Node} - */function getPercentage(){var type=NodeType.PercentageType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[getNumber()];var end=getLastPosition(content,line,column,1);pos++;return newNode(type,content,line,column,end);} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkProgid(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(joinValues2(i,6) === 'progid:DXImageTransform.Microsoft.')i += 6;else return 0;if(l = checkIdent(i))i += l;else return 0;if(l = checkSC(i))i += l;if(tokens[i].type === TokenType.LeftParenthesis){tokens[start].progid_end = tokens[i].right;i = tokens[i].right + 1;}else return 0;return i - start;} /** - * @return {Node} - */function getProgid(){var type=NodeType.ProgidType;var token=tokens[pos];var line=token.ln;var column=token.col;var progid_end=token.progid_end;var content=joinValues(pos,progid_end);pos = progid_end + 1;return newNode(type,content,line,column);} /** - * Check if token is part of a property - * @param {Number} i Token's index number - * @return {Number} Length of the property - */function checkProperty(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkIdent(i))i += l;else return 0;return i - start;} /** - * Get node with a property - * @return {Node} - */function getProperty(){var type=NodeType.PropertyType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[getIdent()];return newNode(type,content,line,column);} /** - * Check if token is a colon - * @param {Number} i Token's index number - * @return {Number} `1` if token is a colon, otherwise `0` - */function checkPropertyDelim(i){return i < tokensLength && tokens[i].type === TokenType.Colon?1:0;} /** - * Get node with a colon - * @return {Node} - */function getPropertyDelim(){var type=NodeType.PropertyDelimType;var token=tokens[pos++];var line=token.ln;var column=token.col;var content=':';return newNode(type,content,line,column);} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkPseudo(i){return checkPseudoe(i) || checkPseudoc(i);} /** - * @return {Node} - */function getPseudo(){if(checkPseudoe(pos))return getPseudoe();if(checkPseudoc(pos))return getPseudoc();} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkPseudoe(i){var l;if(i >= tokensLength || tokens[i++].type !== TokenType.Colon || i >= tokensLength || tokens[i++].type !== TokenType.Colon)return 0;return (l = checkIdent(i))?l + 2:0;} /** - * @return {Node} - */function getPseudoe(){var type=NodeType.PseudoeType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];pos += 2;content.push(getIdent());return newNode(type,content,line,column);} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkPseudoc(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.Colon)return 0;if(l = checkPseudoClass1(i))tokens[i].pseudoClassType = 1;else if(l = checkPseudoClass2(i))tokens[i].pseudoClassType = 2;else if(l = checkPseudoClass3(i))tokens[i].pseudoClassType = 3;else if(l = checkPseudoClass4(i))tokens[i].pseudoClassType = 4;else if(l = checkPseudoClass5(i))tokens[i].pseudoClassType = 5;else if(l = checkPseudoClass6(i))tokens[i].pseudoClassType = 6;else return 0;return l;} /** - * @return {Node} - */function getPseudoc(){var childType=tokens[pos].pseudoClassType;if(childType === 1)return getPseudoClass1();if(childType === 2)return getPseudoClass2();if(childType === 3)return getPseudoClass3();if(childType === 4)return getPseudoClass4();if(childType === 5)return getPseudoClass5();if(childType === 6)return getPseudoClass6();} /** - * (1) `:panda(selector)` - * (2) `:panda(selector, selector)` - */function checkPseudoClass1(i){var start=i; // Skip `:`. -i++;var l=undefined;if(l = checkIdent(i))i += l;else return 0;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSelectorsGroup(i))i += l;else return 0;if(i !== right)return 0;return i - start + 1;} /** - * (-) `:not(panda)` - */function getPseudoClass1(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. -pos++;content.push(getIdent());{var _type=NodeType.ArgumentsType;var _token=tokens[pos];var _line=_token.ln;var _column=_token.col; // Skip `(`. -pos++;var selectors=getSelectorsGroup();var end=getLastPosition(selectors,_line,_column,1);var args=newNode(_type,selectors,_line,_column,end);content.push(args); // Skip `)`. -pos++;}return newNode(type,content,line,column);} /** - * (1) `:nth-child(odd)` - * (2) `:nth-child(even)` - * (3) `:lang(de-DE)` - */function checkPseudoClass2(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdent(i))i += l;else return 0;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSC(i))i += l;if(l = checkIdent(i))i += l;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass2(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. -pos++;var ident=getIdent();content.push(ident); // Skip `(`. -pos++;var l=tokens[pos].ln;var c=tokens[pos].col;var value=[];value = value.concat(getSC());value.push(getIdent());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. -pos++;return newNode(type,content,line,column);} /** - * (-) `:nth-child(-3n + 2)` - */function checkPseudoClass3(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdent(i))i += l;else return 0;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSC(i))i += l;if(l = checkUnary(i))i += l;if(i >= tokensLength)return 0;if(tokens[i].type === TokenType.DecimalNumber)i++;if(i >= tokensLength)return 0;if(tokens[i].value === 'n')i++;else return 0;if(l = checkSC(i))i += l;if(i >= tokensLength)return 0;if(tokens[i].value === '+' || tokens[i].value === '-')i++;else return 0;if(l = checkSC(i))i += l;if(tokens[i].type === TokenType.DecimalNumber)i++;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass3(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. -pos++;var ident=getIdent();content.push(ident);var l=tokens[pos].ln;var c=tokens[pos].col;var value=[]; // Skip `(`. -pos++;if(checkUnary(pos))value.push(getUnary());if(checkNumber(pos))value.push(getNumber());{var _l=tokens[pos].ln;var _c=tokens[pos].col;var _content=tokens[pos].value;var _ident=newNode(NodeType.IdentType,_content,_l,_c);value.push(_ident);pos++;}value = value.concat(getSC());if(checkUnary(pos))value.push(getUnary());value = value.concat(getSC());if(checkNumber(pos))value.push(getNumber());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. -pos++;return newNode(type,content,line,column);} /** - * (-) `:nth-child(-3n)` - */function checkPseudoClass4(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdent(i))i += l;else return 0;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSC(i))i += l;if(l = checkUnary(i))i += l;if(tokens[i].type === TokenType.DecimalNumber)i++;if(tokens[i].value === 'n')i++;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass4(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. -pos++;var ident=getIdent();content.push(ident); // Skip `(`. -pos++;var l=tokens[pos].ln;var c=tokens[pos].col;var value=[];if(checkUnary(pos))value.push(getUnary());if(checkNumber(pos))value.push(getNumber());if(checkIdent(pos))value.push(getIdent());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. -pos++;return newNode(type,content,line,column);} /** - * (-) `:nth-child(+8)` - */function checkPseudoClass5(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdent(i))i += l;else return 0;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSC(i))i += l;if(l = checkUnary(i))i += l;if(tokens[i].type === TokenType.DecimalNumber)i++;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass5(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. -pos++;var ident=getIdent();content.push(ident); // Skip `(`. -pos++;var l=tokens[pos].ln;var c=tokens[pos].col;var value=[];if(checkUnary(pos))value.push(getUnary());if(checkNumber(pos))value.push(getNumber());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. -pos++;return newNode(type,content,line,column);} /** - * (-) `:checked` - */function checkPseudoClass6(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdent(i))i += l;else return 0;return i - start;}function getPseudoClass6(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. -pos++;var ident=getIdent();content.push(ident);return newNode(type,content,line,column);} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkRuleset(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkSelectorsGroup(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** - * @return {Node} - */function getRuleset(){var type=NodeType.RulesetType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];content = content.concat(getSelectorsGroup());content = content.concat(getSC());content.push(getBlock());return newNode(type,content,line,column);} /** - * Check if token is marked as a space (if it's a space or a tab - * or a line break). - * @param {Number} i - * @return {Number} Number of spaces in a row starting with the given token. - */function checkS(i){return i < tokensLength && tokens[i].ws?tokens[i].ws_last - i + 1:0;} /** - * Get node with spaces - * @return {Node} - */function getS(){var type=NodeType.SType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,tokens[pos].ws_last);pos = tokens[pos].ws_last + 1;return newNode(type,content,line,column);} /** - * Check if token is a space or a comment. - * @param {Number} i Token's index number - * @return {Number} Number of similar (space or comment) tokens - * in a row starting with the given token. - */function checkSC(i){var l=undefined;var lsc=0;while(i < tokensLength) {if(l = checkS(i))tokens[i].sc_child = 1;else if(l = checkCommentML(i))tokens[i].sc_child = 2;else break;i += l;lsc += l;}return lsc || 0;} /** - * Get node with spaces and comments - * @return {Array} - */function getSC(){var sc=[];if(pos >= tokensLength)return sc;while(pos < tokensLength) {var childType=tokens[pos].sc_child;if(childType === 1)sc.push(getS());else if(childType === 2)sc.push(getCommentML());else break;}return sc;} /** - * Check if token is part of a hexadecimal number (e.g. `#fff`) inside - * a simple selector - * @param {Number} i Token's index number - * @return {Number} - */function checkShash(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.NumberSign)return 0;return (l = checkIdent(i + 1))?l + 1:0;} /** - * Get node with a hexadecimal number (e.g. `#fff`) inside a simple - * selector - * @return {Node} - */function getShash(){var type=NodeType.ShashType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];pos++;var ident=getIdent();content.push(ident);return newNode(type,content,line,column);} /** - * Check if token is part of a string (text wrapped in quotes) - * @param {Number} i Token's index number - * @return {Number} `1` if token is part of a string, `0` if not - */function checkString(i){return i < tokensLength && (tokens[i].type === TokenType.StringSQ || tokens[i].type === TokenType.StringDQ)?1:0;} /** - * Get string's node - * @return {Array} `['string', x]` where `x` is a string (including - * quotes). - */function getString(){var type=NodeType.StringType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=token.value;pos++;return newNode(type,content,line,column);} /** - * Validate stylesheet: it should consist of any number (0 or more) of - * rulesets (sets of rules with selectors), @-rules, whitespaces or - * comments. - * @param {Number} i Token's index number - * @return {Number} - */function checkStylesheet(i){var start=i;var l=undefined; // Check every token: -while(i < tokensLength) {if(l = checkSC(i))tokens[i].stylesheet_child = 1;else if(l = checkRuleset(i))tokens[i].stylesheet_child = 2;else if(l = checkAtrule(i))tokens[i].stylesheet_child = 3;else if(l = checkDeclDelim(i))tokens[i].stylesheet_child = 4;else throwError(i);i += l;}return i - start;} /** - * @return {Array} `['stylesheet', x]` where `x` is all stylesheet's - * nodes. - */function getStylesheet(){var type=NodeType.StylesheetType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];var childType=undefined;while(pos < tokensLength) {childType = tokens[pos].stylesheet_child;if(childType === 1)content = content.concat(getSC());else if(childType === 2)content.push(getRuleset());else if(childType === 3)content.push(getAtrule());else if(childType === 4)content.push(getDeclDelim());}return newNode(type,content,line,column);} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkTset(i){var l;if(l = checkVhash(i))tokens[i].tset_child = 1;else if(l = checkAny(i))tokens[i].tset_child = 2;else if(l = checkSC(i))tokens[i].tset_child = 3;else if(l = checkOperator(i))tokens[i].tset_child = 4;return l;} /** - * @return {Array} - */function getTset(){var childType=tokens[pos].tset_child;if(childType === 1)return getVhash();else if(childType === 2)return getAny();else if(childType === 3)return getSC();else if(childType === 4)return getOperator();} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkTsets(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;while(l = checkTset(i)) {i += l;}return i - start;} /** - * @return {Array} - */function getTsets(){var x=[];var t=undefined;while(checkTset(pos)) {t = getTset();if(typeof t.content === 'string')x.push(t);else x = x.concat(t);}return x;} /** - * Check if token is an unary (arithmetical) sign (`+` or `-`) - * @param {Number} i Token's index number - * @return {Number} `1` if token is an unary sign, `0` if not - */function checkUnary(i){return i < tokensLength && (tokens[i].type === TokenType.HyphenMinus || tokens[i].type === TokenType.PlusSign)?1:0;} /** - * Get node with an unary (arithmetical) sign (`+` or `-`) - * @return {Array} `['unary', x]` where `x` is an unary sign - * converted to string. - */function getUnary(){var type=NodeType.OperatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=token.value;pos++;return newNode(type,content,line,column);} /** - * Check if token is part of URI (e.g. `url('/css/styles.css')`) - * @param {Number} i Token's index number - * @return {Number} Length of URI - */function checkUri(i){var start=i;if(i >= tokensLength || tokens[i].value !== 'url')return 0;i += 1;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;return tokens[i].right - start + 1;} /** - * Get node with URI - * @return {Array} `['uri', x]` where `x` is URI's nodes (without `url` - * and braces, e.g. `['string', ''/css/styles.css'']`). - */function getUri(){var startPos=pos;var uriExcluding={};var uri=undefined;var l=undefined;var raw=undefined;var rawContent=undefined;var t=undefined;pos += 2;uriExcluding[TokenType.Space] = 1;uriExcluding[TokenType.Tab] = 1;uriExcluding[TokenType.Newline] = 1;uriExcluding[TokenType.LeftParenthesis] = 1;uriExcluding[TokenType.RightParenthesis] = 1;if(checkUri1(pos)){uri = [].concat(getSC()).concat([getString()]).concat(getSC());}else {uri = checkSC(pos)?getSC():[];l = checkExcluding(uriExcluding,pos);rawContent = joinValues(pos,pos + l);t = tokens[pos];raw = newNode(NodeType.RawType,rawContent,t.ln,t.col);uri.push(raw);pos += l + 1;if(checkSC(pos))uri = uri.concat(getSC());}t = tokens[startPos];var line=t.ln;var column=t.col;var end=getLastPosition(uri,line,column,1);pos++;return newNode(NodeType.UriType,uri,line,column,end);} /** - * @param {Number} i Token's index number - * @return {Number} - */function checkUri1(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkSC(i))i += l;if(tokens[i].type !== TokenType.StringDQ && tokens[i].type !== TokenType.StringSQ)return 0;i++;if(l = checkSC(i))i += l;return i - start;} /** - * Check if token is part of a value - * @param {Number} i Token's index number - * @return {Number} Length of the value - */function checkValue(i){var start=i;var l=undefined;var s=undefined;var _i=undefined;while(i < tokensLength) {s = checkSC(i);_i = i + s;if(l = _checkValue(_i))i += l + s;else break;}tokens[start].value_end = i;return i - start;} /** - * @return {Array} - */function getValue(){var startPos=pos;var end=tokens[pos].value_end;var x=[];while(pos < end) {if(tokens[pos].value_child)x.push(_getValue());else x = x.concat(getSC());}var t=tokens[startPos];return newNode(NodeType.ValueType,x,t.ln,t.col);} /** - * @param {Number} i Token's index number - * @return {Number} - */function _checkValue(i){var l;if(l = checkProgid(i))tokens[i].value_child = 1;else if(l = checkVhash(i))tokens[i].value_child = 2;else if(l = checkAny(i))tokens[i].value_child = 3;else if(l = checkOperator(i))tokens[i].value_child = 4;else if(l = checkImportant(i))tokens[i].value_child = 5;return l;} /** - * @return {Array} - */function _getValue(){var childType=tokens[pos].value_child;if(childType === 1)return getProgid();else if(childType === 2)return getVhash();else if(childType === 3)return getAny();else if(childType === 4)return getOperator();else if(childType === 5)return getImportant();} /** - * Check if token is part of a hexadecimal number (e.g. `#fff`) inside - * some value - * @param {Number} i Token's index number - * @return {Number} - */function checkVhash(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.NumberSign)return 0;return (l = checkNmName2(i + 1))?l + 1:0;} /** - * Get node with a hexadecimal number (e.g. `#fff`) inside some value - * @return {Array} `['vhash', x]` where `x` is a hexadecimal number - * converted to string (without `#`, e.g. `'fff'`). - */function getVhash(){var type=NodeType.VhashType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=undefined;pos++;content = getNmName2();var end=getLastPosition(content,line,column + 1);return newNode(type,content,line,column,end);}module.exports = function(_tokens,context){tokens = _tokens;tokensLength = tokens.length;pos = 0;return contexts[context]();};function checkSelectorsGroup(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkSelector(i))i += l;else return 0;while(i < tokensLength) {var sb=checkSC(i);var c=checkDelim(i + sb);if(!c)break;var sa=checkSC(i + sb + c);if(l = checkSelector(i + sb + c + sa))i += sb + c + sa + l;else break;}tokens[start].selectorsGroupEnd = i;return i - start;}function getSelectorsGroup(){var selectorsGroup=[];var selectorsGroupEnd=tokens[pos].selectorsGroupEnd;selectorsGroup.push(getSelector());while(pos < selectorsGroupEnd) {selectorsGroup = selectorsGroup.concat(getSC());selectorsGroup.push(getDelim());selectorsGroup = selectorsGroup.concat(getSC());selectorsGroup.push(getSelector());}return selectorsGroup;}function checkSelector(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkCompoundSelector(i))i += l;else return 0;while(i < tokensLength) {var sb=checkSC(i);var c=checkCombinator(i + sb);if(!sb && !c)break;var sa=checkSC(i + sb + c);if(l = checkCompoundSelector(i + sb + c + sa))i += sb + c + sa + l;else break;}tokens[start].selectorEnd = i;return i - start;}function getSelector(){var type=NodeType.SelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var selectorEnd=token.selectorEnd;var content=undefined;content = getCompoundSelector();while(pos < selectorEnd) {content = content.concat(getSC());if(checkCombinator(pos))content.push(getCombinator());content = content.concat(getSC());content = content.concat(getCompoundSelector());}return newNode(type,content,line,column);}function checkCompoundSelector(i){var l=undefined;if(l = checkCompoundSelector1(i)){tokens[i].compoundSelectorType = 1;}else if(l = checkCompoundSelector2(i)){tokens[i].compoundSelectorType = 2;}return l;}function getCompoundSelector(){var type=tokens[pos].compoundSelectorType;if(type === 1)return getCompoundSelector1();if(type === 2)return getCompoundSelector2();}function checkCompoundSelector1(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkTypeSelector(i))i += l;else return 0;while(i < tokensLength) {var _l2=checkShash(i) || checkClass(i) || checkAttributeSelector(i) || checkPseudo(i);if(_l2)i += _l2;else break;}tokens[start].compoundSelectorEnd = i;return i - start;}function getCompoundSelector1(){var sequence=[];var compoundSelectorEnd=tokens[pos].compoundSelectorEnd;sequence.push(getTypeSelector());while(pos < compoundSelectorEnd) {if(checkShash(pos))sequence.push(getShash());else if(checkClass(pos))sequence.push(getClass());else if(checkAttributeSelector(pos))sequence.push(getAttributeSelector());else if(checkPseudo(pos))sequence.push(getPseudo());}return sequence;}function checkCompoundSelector2(i){if(i >= tokensLength)return 0;var start=i;while(i < tokensLength) {var l=checkShash(i) || checkClass(i) || checkAttributeSelector(i) || checkPseudo(i);if(l)i += l;else break;}tokens[start].compoundSelectorEnd = i;return i - start;}function getCompoundSelector2(){var sequence=[];var compoundSelectorEnd=tokens[pos].compoundSelectorEnd;while(pos < compoundSelectorEnd) {if(checkShash(pos))sequence.push(getShash());else if(checkClass(pos))sequence.push(getClass());else if(checkAttributeSelector(pos))sequence.push(getAttributeSelector());else if(checkPseudo(pos))sequence.push(getPseudo());}return sequence;}function checkTypeSelector(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkNamePrefix(i))i += l;if(tokens[i].type === TokenType.Asterisk)i++;else if(l = checkIdent(i))i += l;else return 0;return i - start;}function getTypeSelector(){var type=NodeType.TypeSelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkNamePrefix(pos))content.push(getNamePrefix());if(checkIdent(pos))content.push(getIdent());return newNode(type,content,line,column);}function checkAttributeSelector(i){var l=undefined;if(l = checkAttributeSelector1(i))tokens[i].attributeSelectorType = 1;else if(l = checkAttributeSelector2(i))tokens[i].attributeSelectorType = 2;return l;}function getAttributeSelector(){var type=tokens[pos].attributeSelectorType;if(type === 1)return getAttributeSelector1();else return getAttributeSelector2();} /** - * (1) `[panda=nani]` - * (2) `[panda='nani']` - * (3) `[panda='nani' i]` - * - */function checkAttributeSelector1(i){var start=i;if(tokens[i].type === TokenType.LeftSquareBracket)i++;else return 0;var l=undefined;if(l = checkSC(i))i += l;if(l = checkAttributeName(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkAttributeMatch(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkAttributeValue(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkAttributeFlags(i)){i += l;if(l = checkSC(i))i += l;}if(tokens[i].type === TokenType.RightSquareBracket)i++;else return 0;return i - start;}function getAttributeSelector1(){var type=NodeType.AttributeSelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `[`. -pos++;content = content.concat(getSC());content.push(getAttributeName());content = content.concat(getSC());content.push(getAttributeMatch());content = content.concat(getSC());content.push(getAttributeValue());content = content.concat(getSC());if(checkAttributeFlags(pos)){content.push(getAttributeFlags());content = content.concat(getSC());} // Skip `]`. -pos++;var end=getLastPosition(content,line,column,1);return newNode(type,content,line,column,end);} /** - * (1) `[panda]` - */function checkAttributeSelector2(i){var start=i;if(tokens[i].type === TokenType.LeftSquareBracket)i++;else return 0;var l=undefined;if(l = checkSC(i))i += l;if(l = checkAttributeName(i))i += l;else return 0;if(l = checkSC(i))i += l;if(tokens[i].type === TokenType.RightSquareBracket)i++;else return 0;return i - start;}function getAttributeSelector2(){var type=NodeType.AttributeSelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `[`. -pos++;content = content.concat(getSC());content.push(getAttributeName());content = content.concat(getSC()); // Skip `]`. -pos++;var end=getLastPosition(content,line,column,1);return newNode(type,content,line,column,end);}function checkAttributeName(i){var start=i;var l=undefined;if(l = checkNamePrefix(i))i += l;if(l = checkIdent(i))i += l;else return 0;return i - start;}function getAttributeName(){var type=NodeType.AttributeNameType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkNamePrefix(pos))content.push(getNamePrefix());content.push(getIdent());return newNode(type,content,line,column);}function checkAttributeMatch(i){var l=undefined;if(l = checkAttributeMatch1(i))tokens[i].attributeMatchType = 1;else if(l = checkAttributeMatch2(i))tokens[i].attributeMatchType = 2;return l;}function getAttributeMatch(){var type=tokens[pos].attributeMatchType;if(type === 1)return getAttributeMatch1();else return getAttributeMatch2();}function checkAttributeMatch1(i){var start=i;var type=tokens[i].type;if(type === TokenType.Tilde || type === TokenType.VerticalLine || type === TokenType.CircumflexAccent || type === TokenType.DollarSign || type === TokenType.Asterisk)i++;else return 0;if(tokens[i].type === TokenType.EqualsSign)i++;else return 0;return i - start;}function getAttributeMatch1(){var type=NodeType.AttributeMatchType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=tokens[pos].value + tokens[pos + 1].value;pos += 2;return newNode(type,content,line,column);}function checkAttributeMatch2(i){if(tokens[i].type === TokenType.EqualsSign)return 1;else return 0;}function getAttributeMatch2(){var type=NodeType.AttributeMatchType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='=';pos++;return newNode(type,content,line,column);}function checkAttributeValue(i){return checkString(i) || checkIdent(i);}function getAttributeValue(){var type=NodeType.AttributeValueType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkString(pos))content.push(getString());else content.push(getIdent());return newNode(type,content,line,column);}function checkAttributeFlags(i){return checkIdent(i);}function getAttributeFlags(){var type=NodeType.AttributeFlagsType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[getIdent()];return newNode(type,content,line,column);}function checkNamePrefix(i){if(i >= tokensLength)return 0;var l=undefined;if(l = checkNamePrefix1(i))tokens[i].namePrefixType = 1;else if(l = checkNamePrefix2(i))tokens[i].namePrefixType = 2;return l;}function getNamePrefix(){var type=tokens[pos].namePrefixType;if(type === 1)return getNamePrefix1();else return getNamePrefix2();} /** - * (1) `panda|` - * (2) `panda|` - */function checkNamePrefix1(i){var start=i;var l=undefined;if(l = checkNamespacePrefix(i))i += l;else return 0;if(l = checkCommentML(i))i += l;if(l = checkNamespaceSeparator(i))i += l;else return 0;return i - start;}function getNamePrefix1(){var type=NodeType.NamePrefixType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];content.push(getNamespacePrefix());if(checkCommentML(pos))content.push(getCommentML());content.push(getNamespaceSeparator());return newNode(type,content,line,column);} /** - * (1) `|` - */function checkNamePrefix2(i){return checkNamespaceSeparator(i);}function getNamePrefix2(){var type=NodeType.NamePrefixType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[getNamespaceSeparator()];return newNode(type,content,line,column);} /** - * (1) `*` - * (2) `panda` - */function checkNamespacePrefix(i){if(i >= tokensLength)return 0;var l=undefined;if(tokens[i].type === TokenType.Asterisk)return 1;else if(l = checkIdent(i))return l;else return 0;}function getNamespacePrefix(){var type=NodeType.NamespacePrefixType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkIdent(pos))content.push(getIdent());return newNode(type,content,line,column);} /** - * (1) `|` - */function checkNamespaceSeparator(i){if(i >= tokensLength)return 0;if(tokens[i].type === TokenType.VerticalLine)return 1;else return 0;}function getNamespaceSeparator(){var type=NodeType.NamespaceSeparatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='|';pos++;return newNode(type,content,line,column);} \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/css/stringify.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/css/stringify.js deleted file mode 100644 index e7ae54f..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/css/stringify.js +++ /dev/null @@ -1,3 +0,0 @@ -// jscs:disable maximumLineLength -'use strict';module.exports = function stringify(tree){ // TODO: Better error message -if(!tree)throw new Error('We need tree to translate');function _t(tree){var type=tree.type;if(_unique[type])return _unique[type](tree);if(typeof tree.content === 'string')return tree.content;if(Array.isArray(tree.content))return _composite(tree.content);return '';}function _composite(t,i){if(!t)return '';var s='';i = i || 0;for(;i < t.length;i++) s += _t(t[i]);return s;}var _unique={'arguments':function(t){return '(' + _composite(t.content) + ')';},'atkeyword':function(t){return '@' + _composite(t.content);},'attributeSelector':function(t){return '[' + _composite(t.content) + ']';},'block':function(t){return '{' + _composite(t.content) + '}';},'brackets':function(t){return '[' + _composite(t.content) + ']';},'class':function(t){return '.' + _composite(t.content);},'color':function(t){return '#' + t.content;},'expression':function(t){return 'expression(' + t.content + ')';},'id':function(t){return '#' + _composite(t.content);},'multilineComment':function(t){return '/*' + t.content + '*/';},'nthSelector':function(t){return ':' + _t(t.content[0]) + '(' + _composite(t.content.slice(1)) + ')';},'parentheses':function(t){return '(' + _composite(t.content) + ')';},'percentage':function(t){return _composite(t.content) + '%';},'pseudoClass':function(t){return ':' + _composite(t.content);},'pseudoElement':function(t){return '::' + _composite(t.content);},'uri':function(t){return 'url(' + _composite(t.content) + ')';}};return _t(tree);}; \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/css/tokenizer.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/css/tokenizer.js deleted file mode 100644 index 6226af4..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/css/tokenizer.js +++ /dev/null @@ -1,71 +0,0 @@ -// jscs:disable maximumLineLength -'use strict';module.exports = function(css,tabSize){var TokenType=require('../token-types');var tokens=[];var urlMode=false;var blockMode=0;var pos=0;var tn=0;var ln=1;var col=1;var cssLength=0;var Punctuation={' ':TokenType.Space,'\n':TokenType.Newline,'\r':TokenType.Newline,'\t':TokenType.Tab,'!':TokenType.ExclamationMark,'"':TokenType.QuotationMark,'#':TokenType.NumberSign,'$':TokenType.DollarSign,'%':TokenType.PercentSign,'&':TokenType.Ampersand,'\'':TokenType.Apostrophe,'(':TokenType.LeftParenthesis,')':TokenType.RightParenthesis,'*':TokenType.Asterisk,'+':TokenType.PlusSign,',':TokenType.Comma,'-':TokenType.HyphenMinus,'.':TokenType.FullStop,'/':TokenType.Solidus,':':TokenType.Colon,';':TokenType.Semicolon,'<':TokenType.LessThanSign,'=':TokenType.EqualsSign,'>':TokenType.GreaterThanSign,'?':TokenType.QuestionMark,'@':TokenType.CommercialAt,'[':TokenType.LeftSquareBracket,']':TokenType.RightSquareBracket,'^':TokenType.CircumflexAccent,'_':TokenType.LowLine,'{':TokenType.LeftCurlyBracket,'|':TokenType.VerticalLine,'}':TokenType.RightCurlyBracket,'~':TokenType.Tilde}; /** - * Add a token to the token list - * @param {string} type - * @param {string} value - */function pushToken(type,value,column){tokens.push({tn:tn++,ln:ln,col:column,type:type,value:value});} /** - * Check if a character is a decimal digit - * @param {string} c Character - * @returns {boolean} - */function isDecimalDigit(c){return '0123456789'.indexOf(c) >= 0;} /** - * Parse spaces - * @param {string} css Unparsed part of CSS string - */function parseSpaces(css){var start=pos; // Read the string until we meet a non-space character: -for(;pos < cssLength;pos++) {if(css.charAt(pos) !== ' ')break;} // Add a substring containing only spaces to tokens: -pushToken(TokenType.Space,css.substring(start,pos--),col);col += pos - start;} /** - * Parse a string within quotes - * @param {string} css Unparsed part of CSS string - * @param {string} q Quote (either `'` or `"`) - */function parseString(css,q){var start=pos; // Read the string until we meet a matching quote: -for(pos++;pos < cssLength;pos++) { // Skip escaped quotes: -if(css.charAt(pos) === '\\')pos++;else if(css.charAt(pos) === q)break;} // Add the string (including quotes) to tokens: -pushToken(q === '"'?TokenType.StringDQ:TokenType.StringSQ,css.substring(start,pos + 1),col);col += pos - start;} /** - * Parse numbers - * @param {string} css Unparsed part of CSS string - */function parseDecimalNumber(css){var start=pos; // Read the string until we meet a character that's not a digit: -for(;pos < cssLength;pos++) {if(!isDecimalDigit(css.charAt(pos)))break;} // Add the number to tokens: -pushToken(TokenType.DecimalNumber,css.substring(start,pos--),col);col += pos - start;} /** - * Parse identifier - * @param {string} css Unparsed part of CSS string - */function parseIdentifier(css){var start=pos; // Skip all opening slashes: -while(css.charAt(pos) === '/') pos++; // Read the string until we meet a punctuation mark: -for(;pos < cssLength;pos++) { // Skip all '\': -if(css.charAt(pos) === '\\')pos++;else if(Punctuation[css.charAt(pos)])break;}var ident=css.substring(start,pos--); // Enter url mode if parsed substring is `url`: -urlMode = urlMode || ident === 'url'; // Add identifier to tokens: -pushToken(TokenType.Identifier,ident,col);col += pos - start;} /** - * Parse a multiline comment - * @param {string} css Unparsed part of CSS string - */function parseMLComment(css){var start=pos; // Read the string until we meet `*/`. -// Since we already know first 2 characters (`/*`), start reading -// from `pos + 2`: -for(pos = pos + 2;pos < cssLength;pos++) {if(css.charAt(pos) === '*' && css.charAt(pos + 1) === '/'){pos++;break;}} // Add full comment (including `/*` and `*/`) to the list of tokens: -var comment=css.substring(start,pos + 1);pushToken(TokenType.CommentML,comment,col);var newlines=comment.split('\n');if(newlines.length > 1){ln += newlines.length - 1;col = newlines[newlines.length - 1].length;}else {col += pos - start;}}function parseSLComment(css){var start=pos; // Read the string until we meet line break. -// Since we already know first 2 characters (`//`), start reading -// from `pos + 2`: -for(pos += 2;pos < cssLength;pos++) {if(css.charAt(pos) === '\n' || css.charAt(pos) === '\r'){break;}} // Add comment (including `//` and line break) to the list of tokens: -pushToken(TokenType.CommentSL,css.substring(start,pos--),col);col += pos - start;} /** - * Convert a CSS string to a list of tokens - * @param {string} css CSS string - * @returns {Array} List of tokens - * @private - */function getTokens(css){var c; // Current character -var cn; // Next character -cssLength = css.length; // Parse string, character by character: -for(pos = 0;pos < cssLength;col++,pos++) {c = css.charAt(pos);cn = css.charAt(pos + 1); // If we meet `/*`, it's a start of a multiline comment. -// Parse following characters as a multiline comment: -if(c === '/' && cn === '*'){parseMLComment(css);} // If we meet `//` and it is not a part of url: -else if(!urlMode && c === '/' && cn === '/'){ // If we're currently inside a block, treat `//` as a start -// of identifier. Else treat `//` as a start of a single-line -// comment: -if(blockMode > 0)parseIdentifier(css);else parseSLComment(css);} // If current character is a double or single quote, it's a start -// of a string: -else if(c === '"' || c === "'"){parseString(css,c);} // If current character is a space: -else if(c === ' '){parseSpaces(css);} // If current character is a punctuation mark: -else if(Punctuation[c]){ // Add it to the list of tokens: -pushToken(Punctuation[c],c,col);if(c === '\n' || c === '\r'){ln++;col = 0;} // Go to next line -else if(c === ')')urlMode = false; // Exit url mode -else if(c === '{')blockMode++; // Enter a block -else if(c === '}')blockMode--; // Exit a block -else if(c === '\t' && tabSize > 1)col += tabSize - 1;} // If current character is a decimal digit: -else if(isDecimalDigit(c)){parseDecimalNumber(css);} // If current character is anything else: -else {parseIdentifier(css);}}return tokens;}return getTokens(css);}; \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/gonzales.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/gonzales.js deleted file mode 100644 index 1376112..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/gonzales.js +++ /dev/null @@ -1 +0,0 @@ -'use strict';var Node=require('./node/basic-node');var parse=require('./parse');module.exports = {createNode:function(options){return new Node(options);},parse:parse}; \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/less/mark.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/less/mark.js deleted file mode 100644 index 823e51d..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/less/mark.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict';var TokenType=require('../token-types');module.exports = (function(){ /** - * Mark whitespaces and comments - */function markSC(tokens){var tokensLength=tokens.length;var ws=-1; // Flag for whitespaces -var sc=-1; // Flag for whitespaces and comments -var t=undefined; // Current token -// For every token in the token list, mark spaces and line breaks -// as spaces (set both `ws` and `sc` flags). Mark multiline comments -// with `sc` flag. -// If there are several spaces or tabs or line breaks or multiline -// comments in a row, group them: take the last one's index number -// and save it to the first token in the group as a reference: -// e.g., `ws_last = 7` for a group of whitespaces or `sc_last = 9` -// for a group of whitespaces and comments. -for(var i=0;i < tokensLength;i++) {t = tokens[i];switch(t.type){case TokenType.Space:case TokenType.Tab:case TokenType.Newline:t.ws = true;t.sc = true;if(ws === -1)ws = i;if(sc === -1)sc = i;break;case TokenType.CommentML:case TokenType.CommentSL:if(ws !== -1){tokens[ws].ws_last = i - 1;ws = -1;}t.sc = true;break;default:if(ws !== -1){tokens[ws].ws_last = i - 1;ws = -1;}if(sc !== -1){tokens[sc].sc_last = i - 1;sc = -1;}}}if(ws !== -1)tokens[ws].ws_last = i - 1;if(sc !== -1)tokens[sc].sc_last = i - 1;} /** - * Pair brackets - */function markBrackets(tokens){var tokensLength=tokens.length;var ps=[]; // Parentheses -var sbs=[]; // Square brackets -var cbs=[]; // Curly brackets -var t=undefined; // Current token -// For every token in the token list, if we meet an opening (left) -// bracket, push its index number to a corresponding array. -// If we then meet a closing (right) bracket, look at the corresponding -// array. If there are any elements (records about previously met -// left brackets), take a token of the last left bracket (take -// the last index number from the array and find a token with -// this index number) and save right bracket's index as a reference: -for(var i=0;i < tokensLength;i++) {t = tokens[i];switch(t.type){case TokenType.LeftParenthesis:ps.push(i);break;case TokenType.RightParenthesis:if(ps.length){t.left = ps.pop();tokens[t.left].right = i;}break;case TokenType.LeftSquareBracket:sbs.push(i);break;case TokenType.RightSquareBracket:if(sbs.length){t.left = sbs.pop();tokens[t.left].right = i;}break;case TokenType.LeftCurlyBracket:cbs.push(i);break;case TokenType.RightCurlyBracket:if(cbs.length){t.left = cbs.pop();tokens[t.left].right = i;}break;}}}return function(tokens){markBrackets(tokens);markSC(tokens);};})(); \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/less/parse.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/less/parse.js deleted file mode 100644 index be27da2..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/less/parse.js +++ /dev/null @@ -1,565 +0,0 @@ -// jscs:disable maximumLineLength -'use strict';var Node=require('../node/basic-node');var NodeType=require('../node/node-types');var TokenType=require('../token-types');var tokens=undefined;var tokensLength=undefined;var pos=undefined;var contexts={'arguments':function(){return checkArguments(pos) && getArguments();},'atkeyword':function(){return checkAtkeyword(pos) && getAtkeyword();},'atrule':function(){return checkAtrule(pos) && getAtrule();},'block':function(){return checkBlock(pos) && getBlock();},'brackets':function(){return checkBrackets(pos) && getBrackets();},'class':function(){return checkClass(pos) && getClass();},'combinator':function(){return checkCombinator(pos) && getCombinator();},'commentML':function(){return checkCommentML(pos) && getCommentML();},'commentSL':function(){return checkCommentSL(pos) && getCommentSL();},'condition':function(){return checkCondition(pos) && getCondition();},'declaration':function(){return checkDeclaration(pos) && getDeclaration();},'declDelim':function(){return checkDeclDelim(pos) && getDeclDelim();},'delim':function(){return checkDelim(pos) && getDelim();},'dimension':function(){return checkDimension(pos) && getDimension();},'escapedString':function(){return checkEscapedString(pos) && getEscapedString();},'expression':function(){return checkExpression(pos) && getExpression();},'extend':function(){return checkExtend(pos) && getExtend();},'function':function(){return checkFunction(pos) && getFunction();},'ident':function(){return checkIdent(pos) && getIdent();},'important':function(){return checkImportant(pos) && getImportant();},'include':function(){return checkInclude(pos) && getInclude();},'interpolatedVariable':function(){return checkInterpolatedVariable(pos) && getInterpolatedVariable();},'mixin':function(){return checkMixin(pos) && getMixin();},'namespace':function(){return checkNamespace(pos) && getNamespace();},'number':function(){return checkNumber(pos) && getNumber();},'operator':function(){return checkOperator(pos) && getOperator();},'parentheses':function(){return checkParentheses(pos) && getParentheses();},'parentselector':function(){return checkParentSelector(pos) && getParentSelector();},'percentage':function(){return checkPercentage(pos) && getPercentage();},'progid':function(){return checkProgid(pos) && getProgid();},'property':function(){return checkProperty(pos) && getProperty();},'propertyDelim':function(){return checkPropertyDelim(pos) && getPropertyDelim();},'pseudoc':function(){return checkPseudoc(pos) && getPseudoc();},'pseudoe':function(){return checkPseudoe(pos) && getPseudoe();},'ruleset':function(){return checkRuleset(pos) && getRuleset();},'s':function(){return checkS(pos) && getS();},'selector':function(){return checkSelector(pos) && getSelector();},'shash':function(){return checkShash(pos) && getShash();},'string':function(){return checkString(pos) && getString();},'stylesheet':function(){return checkStylesheet(pos) && getStylesheet();},'unary':function(){return checkUnary(pos) && getUnary();},'uri':function(){return checkUri(pos) && getUri();},'value':function(){return checkValue(pos) && getValue();},'variable':function(){return checkVariable(pos) && getVariable();},'variableslist':function(){return checkVariablesList(pos) && getVariablesList();},'vhash':function(){return checkVhash(pos) && getVhash();}}; /** - * Stop parsing and display error - * @param {Number=} i Token's index number - */function throwError(i){var ln=tokens[i].ln;throw {line:ln,syntax:'less'};} /** - * @param {Object} exclude - * @param {Number} i Token's index number - * @returns {Number} - */function checkExcluding(exclude,i){var start=i;while(i < tokensLength) {if(exclude[tokens[i++].type])break;}return i - start - 2;} /** - * @param {Number} start - * @param {Number} finish - * @returns {String} - */function joinValues(start,finish){var s='';for(var i=start;i < finish + 1;i++) {s += tokens[i].value;}return s;} /** - * @param {Number} start - * @param {Number} num - * @returns {String} - */function joinValues2(start,num){if(start + num - 1 >= tokensLength)return;var s='';for(var i=0;i < num;i++) {s += tokens[start + i].value;}return s;}function getLastPosition(content,line,column,colOffset){return typeof content === 'string'?getLastPositionForString(content,line,column,colOffset):getLastPositionForArray(content,line,column,colOffset);}function getLastPositionForString(content,line,column,colOffset){var position=[];if(!content){position = [line,column];if(colOffset)position[1] += colOffset - 1;return position;}var lastLinebreak=content.lastIndexOf('\n');var endsWithLinebreak=lastLinebreak === content.length - 1;var splitContent=content.split('\n');var linebreaksCount=splitContent.length - 1;var prevLinebreak=linebreaksCount === 0 || linebreaksCount === 1?-1:content.length - splitContent[linebreaksCount - 1].length - 2; // Line: -var offset=endsWithLinebreak?linebreaksCount - 1:linebreaksCount;position[0] = line + offset; // Column: -if(endsWithLinebreak){offset = prevLinebreak !== -1?content.length - prevLinebreak:content.length - 1;}else {offset = linebreaksCount !== 0?content.length - lastLinebreak - column - 1:content.length - 1;}position[1] = column + offset;if(!colOffset)return position;if(endsWithLinebreak){position[0]++;position[1] = colOffset;}else {position[1] += colOffset;}return position;}function getLastPositionForArray(content,line,column,colOffset){var position;if(content.length === 0){position = [line,column];}else {var c=content[content.length - 1];if(c.hasOwnProperty('end')){position = [c.end.line,c.end.column];}else {position = getLastPosition(c.content,line,column);}}if(!colOffset)return position;if(tokens[pos - 1].type !== 'Newline'){position[1] += colOffset;}else {position[0]++;position[1] = 1;}return position;}function newNode(type,content,line,column,end){if(!end)end = getLastPosition(content,line,column);return new Node({type:type,content:content,start:{line:line,column:column},end:{line:end[0],column:end[1]},syntax:'less'});} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkAny(i){var l;if(l = checkBrackets(i))tokens[i].any_child = 1;else if(l = checkParentheses(i))tokens[i].any_child = 2;else if(l = checkString(i))tokens[i].any_child = 3;else if(l = checkVariablesList(i))tokens[i].any_child = 4;else if(l = checkVariable(i))tokens[i].any_child = 5;else if(l = checkPercentage(i))tokens[i].any_child = 6;else if(l = checkDimension(i))tokens[i].any_child = 7;else if(l = checkNumber(i))tokens[i].any_child = 8;else if(l = checkUri(i))tokens[i].any_child = 9;else if(l = checkExpression(i))tokens[i].any_child = 10;else if(l = checkFunction(i))tokens[i].any_child = 11;else if(l = checkIdent(i))tokens[i].any_child = 12;else if(l = checkClass(i))tokens[i].any_child = 13;else if(l = checkUnary(i))tokens[i].any_child = 14;return l;} /** - * @returns {Array} - */function getAny(){var childType=tokens[pos].any_child;if(childType === 1)return getBrackets();if(childType === 2)return getParentheses();if(childType === 3)return getString();if(childType === 4)return getVariablesList();if(childType === 5)return getVariable();if(childType === 6)return getPercentage();if(childType === 7)return getDimension();if(childType === 8)return getNumber();if(childType === 9)return getUri();if(childType === 10)return getExpression();if(childType === 11)return getFunction();if(childType === 12)return getIdent();if(childType === 13)return getClass();if(childType === 14)return getUnary();} /** - * Check if token is part of mixin's arguments. - * @param {Number} i Token's index number - * @returns {Number} - */function checkArguments(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.LeftParenthesis)return 0;while(i < tokens[start].right) {if(l = checkArgument(i))i += l;else return 0;}return tokens[start].right - start + 1;} /** - * Check if token is valid to be part of arguments list. - * @param {Number} i Token's index number - * @returns {Number} - */function checkArgument(i){var l;if(l = checkEscapedString(i))tokens[i].argument_child = 1;else if(l = checkDeclaration(i))tokens[i].argument_child = 2;else if(l = checkVariablesList(i))tokens[i].argument_child = 3;else if(l = checkVariable(i))tokens[i].argument_child = 4;else if(l = checkSC(i))tokens[i].argument_child = 5;else if(l = checkUnary(i))tokens[i].argument_child = 6;else if(l = checkOperator(i))tokens[i].argument_child = 7;else if(l = checkDelim(i))tokens[i].argument_child = 8;else if(l = checkDeclDelim(i))tokens[i].argument_child = 9;else if(l = checkString(i))tokens[i].argument_child = 10;else if(l = checkPercentage(i))tokens[i].argument_child = 11;else if(l = checkDimension(i))tokens[i].argument_child = 12;else if(l = checkNumber(i))tokens[i].argument_child = 13;else if(l = checkUri(i))tokens[i].argument_child = 14;else if(l = checkFunction(i))tokens[i].argument_child = 15;else if(l = checkIdent(i))tokens[i].argument_child = 16;else if(l = checkVhash(i))tokens[i].argument_child = 17;else if(l = checkBlock(i))tokens[i].argument_child = 18;else if(l = checkParentheses(i))tokens[i].argument_child = 19;return l;} /** - * @returns {Array} Node that is part of arguments list. - */function getArgument(){var childType=tokens[pos].argument_child;if(childType === 1)return getEscapedString();if(childType === 2)return getDeclaration();if(childType === 3)return getVariablesList();if(childType === 4)return getVariable();if(childType === 5)return getSC();if(childType === 6)return getUnary();if(childType === 7)return getOperator();if(childType === 8)return getDelim();if(childType === 9)return getDeclDelim();if(childType === 10)return getString();if(childType === 11)return getPercentage();if(childType === 12)return getDimension();if(childType === 13)return getNumber();if(childType === 14)return getUri();if(childType === 15)return getFunction();if(childType === 16)return getIdent();if(childType === 17)return getVhash();if(childType === 18)return getBlock();if(childType === 19)return getParentheses();} /** - * Check if token is part of an @-word (e.g. `@import`, `@include`) - * @param {Number} i Token's index number - * @returns {Number} - */function checkAtkeyword(i){var l; // Check that token is `@`: -if(i >= tokensLength || tokens[i++].type !== TokenType.CommercialAt)return 0;return (l = checkIdent(i))?l + 1:0;} /** - * Get node with @-word - * @returns {Array} `['atkeyword', ['ident', x]]` where `x` is - * an identifier without - * `@` (e.g. `import`, `include`) - */function getAtkeyword(){var token=tokens[pos++];var content=[getIdent()];return newNode(NodeType.AtkeywordType,content,token.ln,token.col);} /** - * Check if token is a part of an @-rule - * @param {Number} i Token's index number - * @returns {Number} Length of @-rule - */function checkAtrule(i){var l;if(i >= tokensLength)return 0; // If token already has a record of being part of an @-rule, -// return the @-rule's length: -if(tokens[i].atrule_l !== undefined)return tokens[i].atrule_l; // If token is part of an @-rule, save the rule's type to token: -if(l = checkKeyframesRule(i))tokens[i].atrule_type = 4;else if(l = checkAtruler(i))tokens[i].atrule_type = 1; // @-rule with ruleset -else if(l = checkAtruleb(i))tokens[i].atrule_type = 2; // Block @-rule -else if(l = checkAtrules(i))tokens[i].atrule_type = 3; // Single-line @-rule -else return 0; // If token is part of an @-rule, save the rule's length to token: -tokens[i].atrule_l = l;return l;} /** - * Get node with @-rule - * @returns {Array} - */function getAtrule(){switch(tokens[pos].atrule_type){case 1:return getAtruler(); // @-rule with ruleset -case 2:return getAtruleb(); // Block @-rule -case 3:return getAtrules(); // Single-line @-rule -case 4:return getKeyframesRule();}} /** - * Check if token is part of a block @-rule - * @param {Number} i Token's index number - * @returns {Number} Length of the @-rule - */function checkAtruleb(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(l = checkTsets(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** - * Get node with a block @-rule - * @returns {Array} `['atruleb', ['atkeyword', x], y, ['block', z]]` - */function getAtruleb(){var startPos=pos;var content=[getAtkeyword()].concat(getTsets()).concat([getBlock()]);var token=tokens[startPos];return newNode(NodeType.AtruleType,content,token.ln,token.col);} /** - * Check if token is part of an @-rule with ruleset - * @param {Number} i Token's index number - * @returns {Number} Length of the @-rule - */function checkAtruler(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(l = checkTsets(i))i += l;if(i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket)i++;else return 0;if(l = checkAtrulers(i))i += l;if(i < tokensLength && tokens[i].type === TokenType.RightCurlyBracket)i++;else return 0;return i - start;} /** - * Get node with an @-rule with ruleset - * @returns {Array} ['atruler', ['atkeyword', x], y, z] - */function getAtruler(){var startPos=pos;var content=[getAtkeyword()];content = content.concat(getTsets());content.push(getAtrulers());var token=tokens[startPos];return newNode(NodeType.AtruleType,content,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkAtrulers(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkSC(i))i += l;while(i < tokensLength) {if(l = checkSC(i))tokens[i].atrulers_child = 1;else if(l = checkAtrule(i))tokens[i].atrulers_child = 2;else if(l = checkRuleset(i))tokens[i].atrulers_child = 3;else break;i += l;}tokens[i].atrulers_end = 1;if(l = checkSC(i))i += l;return i - start;} /** - * @returns {Array} `['atrulers', x]` - */function getAtrulers(){var token=tokens[pos++];var line=token.ln;var column=token.col;var content=getSC();while(!tokens[pos].atrulers_end) {var childType=tokens[pos].atrulers_child;if(childType === 1)content = content.concat(getSC());else if(childType === 2)content.push(getAtrule());else if(childType === 3)content.push(getRuleset());}content = content.concat(getSC());var end=getLastPosition(content,line,column,1);pos++;return newNode(NodeType.BlockType,content,line,column,end);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkAtrules(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(l = checkTsets(i))i += l;return i - start;} /** - * @returns {Array} `['atrules', ['atkeyword', x], y]` - */function getAtrules(){var startPos=pos;var content=[getAtkeyword()].concat(getTsets());var token=tokens[startPos];return newNode(NodeType.AtruleType,content,token.ln,token.col);} /** - * Check if token is part of a block (e.g. `{...}`). - * @param {Number} i Token's index number - * @returns {Number} Length of the block - */function checkBlock(i){return i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket?tokens[i].right - i + 1:0;} /** - * Get node with a block - * @returns {Array} `['block', x]` - */function getBlock(){var startPos=pos;var end=tokens[pos++].right;var content=[];var token=tokens[startPos];var line=token.ln;var column=token.col;while(pos < end) {if(checkBlockdecl(pos))content = content.concat(getBlockdecl());else throwError(pos);}var end_=getLastPosition(content,line,column,1);pos = end + 1;return newNode(NodeType.BlockType,content,line,column,end_);} /** - * Check if token is part of a declaration (property-value pair) - * @param {Number} i Token's index number - * @returns {Number} Length of the declaration - */function checkBlockdecl(i){var l;if(i >= tokensLength)return 0;if(l = checkBlockdecl1(i))tokens[i].bd_type = 1;else if(l = checkBlockdecl2(i))tokens[i].bd_type = 2;else if(l = checkBlockdecl3(i))tokens[i].bd_type = 3;else if(l = checkBlockdecl4(i))tokens[i].bd_type = 4;else return 0;return l;} /** - * @returns {Array} - */function getBlockdecl(){switch(tokens[pos].bd_type){case 1:return getBlockdecl1();case 2:return getBlockdecl2();case 3:return getBlockdecl3();case 4:return getBlockdecl4();}} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkBlockdecl1(i){var start=i;var l=undefined;if(l = checkSC(i))i += l;if(l = checkCondition(i))tokens[i].bd_kind = 1;else if(l = checkExtend(i))tokens[i].bd_kind = 6;else if(l = checkRuleset(i))tokens[i].bd_kind = 2;else if(l = checkDeclaration(i))tokens[i].bd_kind = 3;else if(l = checkAtrule(i))tokens[i].bd_kind = 4;else if(l = checkInclude(i))tokens[i].bd_kind = 5;else return 0;i += l;if(i < tokensLength && (l = checkDeclDelim(i)))i += l;else return 0;if(l = checkSC(i))i += l;else return 0;return i - start;} /** - * @returns {Array} - */function getBlockdecl1(){var sc=getSC();var x=undefined;switch(tokens[pos].bd_kind){case 1:x = getCondition();break;case 2:x = getRuleset();break;case 3:x = getDeclaration();break;case 4:x = getAtrule();break;case 5:x = getInclude();break;case 6:x = getExtend();break;}return sc.concat([x]).concat([getDeclDelim()]).concat(getSC());} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkBlockdecl2(i){var start=i;var l=undefined;if(l = checkSC(i))i += l;if(l = checkCondition(i))tokens[i].bd_kind = 1;else if(l = checkExtend(i))tokens[i].bd_kind = 3;else if(l = checkRuleset(i))tokens[i].bd_kind = 6;else if(l = checkDeclaration(i))tokens[i].bd_kind = 4;else if(l = checkAtrule(i))tokens[i].bd_kind = 5;else if(l = checkInclude(i))tokens[i].bd_kind = 2;else return 0;i += l;if(l = checkSC(i))i += l;return i - start;} /** - * @returns {Array} - */function getBlockdecl2(){var sc=getSC();var x=undefined;switch(tokens[pos].bd_kind){case 1:x = getCondition();break;case 2:x = getInclude();break;case 3:x = getExtend();break;case 4:x = getDeclaration();break;case 5:x = getAtrule();break;case 6:x = getRuleset();break;}return sc.concat([x]).concat(getSC());} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkBlockdecl3(i){var start=i;var l=undefined;if(l = checkSC(i))i += l;if(l = checkDeclDelim(i))i += l;else return 0;if(l = checkSC(i))i += l;return i - start;} /** - * @returns {Array} `[s0, ['declDelim'], s1]` where `s0` and `s1` are - * are optional whitespaces. - */function getBlockdecl3(){return getSC().concat([getDeclDelim()]).concat(getSC());} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkBlockdecl4(i){return checkSC(i);} /** - * @returns {Array} - */function getBlockdecl4(){return getSC();} /** - * Check if token is part of text inside square brackets, e.g. `[1]` - * @param {Number} i Token's index number - * @returns {Number} - */function checkBrackets(i){if(i >= tokensLength || tokens[i].type !== TokenType.LeftSquareBracket)return 0;return tokens[i].right - i + 1;} /** - * Get node with text inside square brackets, e.g. `[1]` - * @returns {Node} - */function getBrackets(){var startPos=pos++;var token=tokens[startPos];var line=token.ln;var column=token.col;var tsets=getTsets();var end=getLastPosition(tsets,line,column,1);pos++;return newNode(NodeType.BracketsType,tsets,line,column,end);} /** - * Check if token is part of a class selector (e.g. `.abc`) - * @param {Number} i Token's index number - * @returns {Number} Length of the class selector - */function checkClass(i){var l;if(i >= tokensLength)return 0;if(tokens[i].class_l)return tokens[i].class_l;if(tokens[i++].type === TokenType.FullStop){if(l = checkInterpolatedVariable(i))tokens[i].class_child = 1;else if(l = checkIdent(i))tokens[i].class_child = 2;else return 0;tokens[i].class_l = l + 1;return l + 1;}return 0;} /** - * Get node with a class selector - * @returns {Array} `['class', ['ident', x]]` where x is a class's - * identifier (without `.`, e.g. `abc`). - */function getClass(){var startPos=pos++;var content=[];var childType=tokens[pos].class_child;if(childType === 1)content.push(getInterpolatedVariable());else content.push(getIdent());var token=tokens[startPos];return newNode(NodeType.ClassType,content,token.ln,token.col);}function checkCombinator(i){if(i >= tokensLength)return 0;var l=undefined;if(l = checkCombinator1(i))tokens[i].combinatorType = 1;else if(l = checkCombinator2(i))tokens[i].combinatorType = 2;else if(l = checkCombinator3(i))tokens[i].combinatorType = 3;return l;}function getCombinator(){var type=tokens[pos].combinatorType;if(type === 1)return getCombinator1();if(type === 2)return getCombinator2();if(type === 3)return getCombinator3();} /** - * (1) `||` - */function checkCombinator1(i){if(tokens[i].type === TokenType.VerticalLine && tokens[i + 1].type === TokenType.VerticalLine)return 2;else return 0;}function getCombinator1(){var type=NodeType.CombinatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='||';pos += 2;return newNode(type,content,line,column);} /** - * (1) `>` - * (2) `+` - * (3) `~` - */function checkCombinator2(i){var type=tokens[i].type;if(type === TokenType.PlusSign || type === TokenType.GreaterThanSign || type === TokenType.Tilde)return 1;else return 0;}function getCombinator2(){var type=NodeType.CombinatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=tokens[pos++].value;return newNode(type,content,line,column);} /** - * (1) `/panda/` - */function checkCombinator3(i){var start=i;if(tokens[i].type === TokenType.Solidus)i++;else return 0;var l=undefined;if(l = checkIdent(i))i += l;else return 0;if(tokens[i].type === TokenType.Solidus)i++;else return 0;return i - start;}function getCombinator3(){var type=NodeType.CombinatorType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `/`. -pos++;var ident=getIdent(); // Skip `/`. -pos++;var content='/' + ident.content + '/';return newNode(type,content,line,column);} /** - * Check if token is a multiline comment. - * @param {Number} i Token's index number - * @returns {Number} `1` if token is a multiline comment, otherwise `0` - */function checkCommentML(i){return i < tokensLength && tokens[i].type === TokenType.CommentML?1:0;} /** - * Get node with a multiline comment - * @returns {Array} `['commentML', x]` where `x` - * is the comment's text (without `/*` and `* /`). - */function getCommentML(){var startPos=pos;var s=tokens[pos].value.substring(2);var l=s.length;var token=tokens[startPos];var line=token.ln;var column=token.col;if(s.charAt(l - 2) === '*' && s.charAt(l - 1) === '/')s = s.substring(0,l - 2);var end=getLastPosition(s,line,column,2);if(end[0] === line)end[1] += 2;pos++;return newNode(NodeType.CommentMLType,s,line,column,end);} /** - * Check if token is part of a single-line comment. - * @param {Number} i Token's index number - * @returns {Number} `1` if token is a single-line comment, otherwise `0` - */function checkCommentSL(i){return i < tokensLength && tokens[i].type === TokenType.CommentSL?1:0;} /** - * Get node with a single-line comment. - * @returns {Array} - */function getCommentSL(){var startPos=pos;var x=tokens[pos++].value.substring(2);var token=tokens[startPos];var line=token.ln;var column=token.col;var end=getLastPosition(x,line,column + 2);return newNode(NodeType.CommentSLType,x,line,column,end);} /** - * Check if token is part of a condition. - * @param {Number} i Token's index number - * @return {Number} Length of the condition - */function checkCondition(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if((l = checkIdent(i)) && tokens[i].value === 'when')i += l;else return 0;while(i < tokensLength) {if(l = checkBlock(i)){tokens[i].condition_child = 0;break;}else if(l = checkFunction(i))tokens[i].condition_child = 1;else if(l = checkBrackets(i))tokens[i].condition_child = 2;else if(l = checkParentheses(i))tokens[i].condition_child = 3;else if(l = checkVariable(i))tokens[i].condition_child = 4;else if(l = checkIdent(i))tokens[i].condition_child = 5;else if(l = checkNumber(i))tokens[i].condition_child = 6;else if(l = checkDelim(i))tokens[i].condition_child = 7;else if(l = checkOperator(i))tokens[i].condition_child = 8;else if(l = checkCombinator(i))tokens[i].condition_child = 9;else if(l = checkSC(i))tokens[i].condition_child = 10;else if(l = checkString(i))tokens[i].condition_child = 11;else return 0;i += l;}return i - start;} /** - * Get node with a condition. - * @returns {Array} `['condition', x]` - */function getCondition(){var startPos=pos;var x=[];x.push(getIdent());while(pos < tokensLength) {var childType=tokens[pos].condition_child;if(childType === 0)break;else if(childType === 1)x.push(getFunction());else if(childType === 2)x.push(getBrackets());else if(childType === 3)x.push(getParentheses());else if(childType === 4)x.push(getVariable());else if(childType === 5)x.push(getIdent());else if(childType === 6)x.push(getNumber());else if(childType === 7)x.push(getDelim());else if(childType === 8)x.push(getOperator());else if(childType === 9)x.push(getCombinator());else if(childType === 10)x = x.concat(getSC());else if(childType === 11)x.push(getString());}var token=tokens[startPos];return newNode(NodeType.ConditionType,x,token.ln,token.col);} /** - * Check if token is part of a declaration (property-value pair) - * @param {Number} i Token's index number - * @returns {Number} Length of the declaration - */function checkDeclaration(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkProperty(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkPropertyDelim(i))i++;else return 0;if(l = checkSC(i))i += l;if(l = checkValue(i))i += l;else return 0;return i - start;} /** - * Get node with a declaration - * @returns {Array} `['declaration', ['property', x], ['propertyDelim'], - * ['value', y]]` - */function getDeclaration(){var startPos=pos;var x=[getProperty()].concat(getSC()).concat([getPropertyDelim()]).concat(getSC()).concat([getValue()]);var token=tokens[startPos];return newNode(NodeType.DeclarationType,x,token.ln,token.col);} /** - * Check if token is a semicolon - * @param {Number} i Token's index number - * @returns {Number} `1` if token is a semicolon, otherwise `0` - */function checkDeclDelim(i){return i < tokensLength && tokens[i].type === TokenType.Semicolon?1:0;} /** - * Get node with a semicolon - * @returns {Array} `['declDelim']` - */function getDeclDelim(){var startPos=pos++;var token=tokens[startPos];return newNode(NodeType.DeclDelimType,';',token.ln,token.col);} /** - * Check if token is a comma - * @param {Number} i Token's index number - * @returns {Number} `1` if token is a comma, otherwise `0` - */function checkDelim(i){return i < tokensLength && tokens[i].type === TokenType.Comma?1:0;} /** - * Get node with a comma - * @returns {Array} `['delim']` - */function getDelim(){var startPos=pos++;var token=tokens[startPos];return newNode(NodeType.DelimType,',',token.ln,token.col);} /** - * Check if token is part of a number with dimension unit (e.g. `10px`) - * @param {Number} i Token's index number - * @returns {Number} - */function checkDimension(i){var ln=checkNumber(i);var li=undefined;if(i >= tokensLength || !ln || i + ln >= tokensLength)return 0;return (li = checkNmName2(i + ln))?ln + li:0;} /** - * Get node of a number with dimension unit - * @returns {Array} `['dimension', ['number', x], ['ident', y]]` where - * `x` is a number converted to string (e.g. `'10'`) and `y` is - * a dimension unit (e.g. `'px'`). - */function getDimension(){var startPos=pos;var x=[getNumber()];var token=tokens[pos];var ident=newNode(NodeType.IdentType,getNmName2(),token.ln,token.col);x.push(ident);token = tokens[startPos];return newNode(NodeType.DimensionType,x,token.ln,token.col);} /** - * Check if token is part of an escaped string (e.g. `~"ms:something"`). - * @param {Number} i Token's index number - * @returns {Number} Length of the string (including `~` and quotes) - */function checkEscapedString(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(tokens[i].type === TokenType.Tilde && (l = checkString(i + 1)))return i + l - start;else return 0;} /** - * Get node with an escaped string - * @returns {Array} `['escapedString', ['string', x]]` where `x` is a string - * without `~` but with quotes - */function getEscapedString(){var startPos=pos++;var x=tokens[pos++].value;var token=tokens[startPos];var line=token.ln;var column=token.col;var end=getLastPosition(x,line,column + 1);return newNode(NodeType.EscapedStringType,x,line,column,end);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkExpression(i){var start=i;if(i >= tokensLength || tokens[i++].value !== 'expression' || i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;return tokens[i].right - start + 1;} /** - * @returns {Array} - */function getExpression(){var startPos=pos++;var x=undefined;var token=tokens[startPos];var line=token.ln;var column=token.col;x = joinValues(pos + 1,tokens[pos].right - 1);var end=getLastPosition(x,line,column,1);if(end[0] === line)end[1] += 11;pos = tokens[pos].right + 1;return newNode(NodeType.ExpressionType,x,token.ln,token.col,end);}function checkExtend(i){if(i >= tokensLength)return 0;var l;if(l = checkExtend1(i))tokens[i].extendType = 1;else if(l = checkExtend2(i))tokens[i].extendType = 2;else return 0;return l;}function getExtend(){var childType=tokens[pos].extendType;if(childType === 1)return getExtend1();if(childType === 2)return getExtend2();} /** - * (1) `selector:extend(selector) {...}` - */function checkExtend1(i){var start=i;var l;if(i >= tokensLength)return 0;if(l = checkExtendSelector(i))i += l;else return 0;if(tokens[i + 1] && tokens[i + 1].value === 'extend' && (l = checkPseudoc(i)))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;}function getExtend1(){var startPos=pos;var x=[].concat(getExtendSelector(),[getPseudoc()],getSC(),[getBlock()]);var token=tokens[startPos];return newNode(NodeType.ExtendType,x,token.ln,token.col);} /** - * (1) `selector:extend(selector)` - */function checkExtend2(i){var start=i;var l;if(i >= tokensLength)return 0;if(l = checkExtendSelector(i))i += l;else return 0;if(tokens[i + 1] && tokens[i + 1].value === 'extend' && (l = checkPseudoc(i)))i += l;else return 0;return i - start;}function getExtend2(){var startPos=pos;var x=[].concat(getExtendSelector(),[getPseudoc()]);var token=tokens[startPos];return newNode(NodeType.ExtendType,x,token.ln,token.col);}function checkExtendSelector(i){var l;if(l = checkParentSelectorWithExtension(i))tokens[i].extend_type = 1;else if(l = checkIdent(i))tokens[i].extend_type = 2;else if(l = checkClass(i))tokens[i].extend_type = 3;else if(l = checkShash(i))tokens[i].extend_type = 4;return l;}function getExtendSelector(){var childType=tokens[pos].extend_type;if(childType === 1)return getParentSelectorWithExtension();if(childType === 2)return [getIdent()];if(childType === 3)return [getClass()];if(childType === 4)return [getShash()];} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkFunction(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkIdent(i))i += l;else return 0;return i < tokensLength && tokens[i].type === TokenType.LeftParenthesis?tokens[i].right - start + 1:0;} /** - * @returns {Array} - */function getFunction(){var token=tokens[pos];var ident=getIdent();var x=[ident];var body;body = getArguments();x.push(body);return newNode(NodeType.FunctionType,x,token.ln,token.col);} /** - * @returns {Array} - */function getArguments(){var startPos=pos;var x=[];var body=undefined;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;while(pos < tokensLength && tokens[pos].type !== TokenType.RightParenthesis) {if(checkDeclaration(pos))x.push(getDeclaration());else if(checkArgument(pos)){body = getArgument();if(typeof body.content === 'string')x.push(body);else x = x.concat(body);}else if(checkClass(pos))x.push(getClass());else throwError(pos);}var end=getLastPosition(x,line,column,1);pos++;return newNode(NodeType.ArgumentsType,x,line,column,end);} /** - * Check if token is part of an identifier - * @param {Number} i Token's index number - * @returns {Number} Length of the identifier - */function checkIdent(i){var start=i;var wasIdent=undefined;var l=undefined;if(i >= tokensLength)return 0; // Check if token is part of an identifier starting with `_`: -if(tokens[i].type === TokenType.LowLine)return checkIdentLowLine(i); // If token is a character, `-`, `$` or `*`, skip it & continue: -if(tokens[i].type === TokenType.HyphenMinus || tokens[i].type === TokenType.Identifier || tokens[i].type === TokenType.DollarSign || tokens[i].type === TokenType.Asterisk)i++;else return 0; // Remember if previous token's type was identifier: -wasIdent = tokens[i - 1].type === TokenType.Identifier;for(;i < tokensLength;i++) {if(l = checkInterpolatedVariable(i))i += l;if(i >= tokensLength)break;if(tokens[i].type !== TokenType.HyphenMinus && tokens[i].type !== TokenType.LowLine){if(tokens[i].type !== TokenType.Identifier && (tokens[i].type !== TokenType.DecimalNumber || !wasIdent))break;else wasIdent = true;}}if(!wasIdent && tokens[start].type !== TokenType.Asterisk)return 0;tokens[start].ident_last = i - 1;return i - start;} /** - * Check if token is part of an identifier starting with `_` - * @param {Number} i Token's index number - * @returns {Number} Length of the identifier - */function checkIdentLowLine(i){var start=i;if(i++ >= tokensLength)return 0;for(;i < tokensLength;i++) {if(tokens[i].type !== TokenType.HyphenMinus && tokens[i].type !== TokenType.DecimalNumber && tokens[i].type !== TokenType.LowLine && tokens[i].type !== TokenType.Identifier)break;} // Save index number of the last token of the identifier: -tokens[start].ident_last = i - 1;return i - start;} /** - * Get node with an identifier - * @returns {Array} `['ident', x]` where `x` is identifier's name - */function getIdent(){var startPos=pos;var x=joinValues(pos,tokens[pos].ident_last);pos = tokens[pos].ident_last + 1;var token=tokens[startPos];return newNode(NodeType.IdentType,x,token.ln,token.col);} /** - * Check if token is part of `!important` word - * @param {Number} i Token's index number - * @returns {Number} - */function checkImportant(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark)return 0;if(l = checkSC(i))i += l;if(tokens[i].value === 'important'){tokens[start].importantEnd = i;return i - start + 1;}else {return 0;}} /** - * Get node with `!important` word - * @returns {Array} `['important', sc]` where `sc` is optional whitespace - */function getImportant(){var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,token.importantEnd);pos = token.importantEnd + 1;return newNode(NodeType.ImportantType,content,line,column);} /** - * Check if token is part of an include (`@include` or `@extend` directive). - * @param {Number} i Token's index number - * @returns {Number} - */function checkInclude(i){var l;if(i >= tokensLength)return 0;if(l = checkInclude1(i))tokens[i].include_type = 1;else if(l = checkInclude2(i))tokens[i].include_type = 2;return l;} /** - * Get node with included mixin - * @returns {Array} `['include', x]` - */function getInclude(){switch(tokens[pos].include_type){case 1:return getInclude1();case 2:return getInclude2();}} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkInclude1(i){var start=i;var l=undefined;if(l = checkClass(i) || checkShash(i))i += l;else return 0;while(i < tokensLength) {if(l = checkClass(i) || checkShash(i) || checkSC(i))i += l;else if(tokens[i].type === TokenType.GreaterThanSign)i++;else break;}if(l = checkArguments(i))i += l;else return 0;if(i < tokensLength && (l = checkSC(i)))i += l;if(i < tokensLength && (l = checkImportant(i)))i += l;return i - start;} /** - * @returns {Array} `['include', x]` - */function getInclude1(){var startPos=pos;var x=[];x.push(checkClass(pos)?getClass():getShash());while(pos < tokensLength) {if(checkClass(pos))x.push(getClass());else if(checkShash(pos))x.push(getShash());else if(checkSC(pos))x = x.concat(getSC());else if(checkOperator(pos))x.push(getOperator());else break;}x.push(getArguments());x = x.concat(getSC());if(checkImportant(pos))x.push(getImportant());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkInclude2(i){var start=i;var l=undefined;if(l = checkClass(i) || checkShash(i))i += l;else return 0;while(i < tokensLength) {if(l = checkClass(i) || checkShash(i) || checkSC(i))i += l;else if(tokens[i].type === TokenType.GreaterThanSign)i++;else break;}return i - start;} /** - * @returns {Array} `['include', x]` - */function getInclude2(){var startPos=pos;var x=[];x.push(checkClass(pos)?getClass():getShash());while(pos < tokensLength) {if(checkClass(pos))x.push(getClass());else if(checkShash(pos))x.push(getShash());else if(checkSC(pos))x = x.concat(getSC());else if(checkOperator(pos))x.push(getOperator());else break;}var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** - * Check if token is part of LESS interpolated variable - * @param {Number} i Token's index number - * @returns {Number} - */function checkInterpolatedVariable(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.CommercialAt || !tokens[i + 1] || tokens[i + 1].type !== TokenType.LeftCurlyBracket)return 0;i += 2;if(l = checkIdent(i))i += l;else return 0;return tokens[i].type === TokenType.RightCurlyBracket?i - start + 1:0;} /** - * Get node with LESS interpolated variable - * @returns {Array} `['interpolatedVariable', x]` - */function getInterpolatedVariable(){var startPos=pos;var x=[];var token=tokens[startPos];var line=token.ln;var column=token.col; // Skip `@{`: -pos += 2;x.push(getIdent()); // Skip `}`: -var end=getLastPosition(x,line,column,1);pos++;return newNode(NodeType.InterpolatedVariableType,x,line,column,end);}function checkKeyframesBlock(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkKeyframesSelector(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;}function getKeyframesBlock(){var type=NodeType.RulesetType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[].concat([getKeyframesSelector()],getSC(),[getBlock()]);return newNode(type,content,line,column);}function checkKeyframesBlocks(i){var start=i;var l=undefined;if(i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket)i++;else return 0;if(l = checkSC(i))i += l;if(l = checkKeyframesBlock(i))i += l;else return 0;while(tokens[i].type !== TokenType.RightCurlyBracket) {if(l = checkSC(i))i += l;else if(l = checkKeyframesBlock(i))i += l;else break;}if(i < tokensLength && tokens[i].type === TokenType.RightCurlyBracket)i++;else return 0;return i - start;}function getKeyframesBlocks(){var type=NodeType.BlockType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];var keyframesBlocksEnd=token.right; // Skip `{`. -pos++;while(pos < keyframesBlocksEnd) {if(checkSC(pos))content = content.concat(getSC());else if(checkKeyframesBlock(pos))content.push(getKeyframesBlock());}var end=getLastPosition(content,line,column,1); // Skip `}`. -pos++;return newNode(type,content,line,column,end);} /** - * Check if token is part of a @keyframes rule. - * @param {Number} i Token's index number - * @return {Number} Length of the @keyframes rule - */function checkKeyframesRule(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;var atruleName=joinValues2(i - l,l);if(atruleName.indexOf('keyframes') === -1)return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdent(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkKeyframesBlocks(i))i += l;else return 0;return i - start;} /** - * @return {Node} - */function getKeyframesRule(){var type=NodeType.AtruleType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[].concat([getAtkeyword()],getSC(),[getIdent()],getSC(),[getKeyframesBlocks()]);return newNode(type,content,line,column);}function checkKeyframesSelector(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkIdent(i)){ // Valid selectors are only `from` and `to`. -var selector=joinValues2(i,l);if(selector !== 'from' && selector !== 'to')return 0;i += l;tokens[start].keyframesSelectorType = 1;}else if(l = checkPercentage(i)){i += l;tokens[start].keyframesSelectorType = 2;}else {return 0;}return i - start;}function getKeyframesSelector(){var keyframesSelectorType=NodeType.KeyframesSelectorType;var selectorType=NodeType.SelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(token.keyframesSelectorType === 1){content.push(getIdent());}else {content.push(getPercentage());}var keyframesSelector=newNode(keyframesSelectorType,content,line,column);return newNode(selectorType,[keyframesSelector],line,column);} /** - * Check if token is part of a LESS mixin - * @param {Number} i Token's index number - * @returns {Number} Length of the mixin - */function checkMixin(i){var l;if(i >= tokensLength)return 0;if(l = checkMixin1(i))tokens[i].mixin_type = 1;else if(l = checkMixin2(i))tokens[i].mixin_type = 2;else return 0;return l;} /** - * @returns {Array} - */function getMixin(){switch(tokens[pos].mixin_type){case 1:return getMixin1();case 2:return getMixin2();}}function checkMixin1(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkClass(i) || checkShash(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkArguments(i))i += l;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** - * Get node with a mixin - * @returns {Array} `['mixin', x]` - */function getMixin1(){var startPos=pos;var x=[];x.push(checkClass(pos)?getClass():getShash());x = x.concat(getSC());if(checkArguments(pos))x.push(getArguments());x = x.concat(getSC());if(checkBlock(pos))x.push(getBlock());var token=tokens[startPos];return newNode(NodeType.MixinType,x,token.ln,token.col);} /** - * Check if token is part of a LESS mixin - * @param {Number} i Token's index number - * @returns {Number} Length of the mixin - */function checkMixin2(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkClass(i) || checkShash(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkArguments(i))i += l;return i - start;} /** - * Get node with a mixin - * @returns {Array} `['mixin', x]` - */function getMixin2(){var startPos=pos;var x=[];x.push(checkClass(pos)?getClass():getShash());x = x.concat(getSC());if(checkArguments(pos))x.push(getArguments());var token=tokens[startPos];return newNode(NodeType.MixinType,x,token.ln,token.col);} /** - * Check if token is a namespace sign (`|`) - * @param {Number} i Token's index number - * @returns {Number} `1` if token is `|`, `0` if not - */function checkNamespace(i){return i < tokensLength && tokens[i].type === TokenType.VerticalLine?1:0;} /** - * Get node with a namespace sign - * @returns {Array} `['namespace']` - */function getNamespace(){var startPos=pos++;var token=tokens[startPos];return newNode(NodeType.NamespaceType,'|',token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkNmName2(i){if(tokens[i].type === TokenType.Identifier)return 1;else if(tokens[i].type !== TokenType.DecimalNumber)return 0;i++;return i < tokensLength && tokens[i].type === TokenType.Identifier?2:1;} /** - * @returns {String} - */function getNmName2(){var s=tokens[pos].value;if(tokens[pos++].type === TokenType.DecimalNumber && pos < tokensLength && tokens[pos].type === TokenType.Identifier)s += tokens[pos++].value;return s;} /** - * Check if token is part of a number - * @param {Number} i Token's index number - * @returns {Number} Length of number - */function checkNumber(i){if(i >= tokensLength)return 0;if(tokens[i].number_l)return tokens[i].number_l; // `10`: -if(i < tokensLength && tokens[i].type === TokenType.DecimalNumber && (!tokens[i + 1] || tokens[i + 1] && tokens[i + 1].type !== TokenType.FullStop))return tokens[i].number_l = 1,tokens[i].number_l; // `10.`: -if(i < tokensLength && tokens[i].type === TokenType.DecimalNumber && tokens[i + 1] && tokens[i + 1].type === TokenType.FullStop && (!tokens[i + 2] || tokens[i + 2].type !== TokenType.DecimalNumber))return tokens[i].number_l = 2,tokens[i].number_l; // `.10`: -if(i < tokensLength && tokens[i].type === TokenType.FullStop && tokens[i + 1].type === TokenType.DecimalNumber)return tokens[i].number_l = 2,tokens[i].number_l; // `10.10`: -if(i < tokensLength && tokens[i].type === TokenType.DecimalNumber && tokens[i + 1] && tokens[i + 1].type === TokenType.FullStop && tokens[i + 2] && tokens[i + 2].type === TokenType.DecimalNumber)return tokens[i].number_l = 3,tokens[i].number_l;return 0;} /** - * Get node with number - * @returns {Array} `['number', x]` where `x` is a number converted - * to string. - */function getNumber(){var x='';var startPos=pos;var l=tokens[pos].number_l;for(var j=0;j < l;j++) {x += tokens[pos + j].value;}pos += l;var token=tokens[startPos];return newNode(NodeType.NumberType,x,token.ln,token.col);} /** - * Check if token is an operator (`/`, `,`, `:`, `=`, `>`, `<` or `*`) - * @param {Number} i Token's index number - * @returns {Number} `1` if token is an operator, otherwise `0` - */function checkOperator(i){if(i >= tokensLength)return 0;switch(tokens[i].type){case TokenType.Solidus:case TokenType.Comma:case TokenType.Colon:case TokenType.EqualsSign:case TokenType.LessThanSign:case TokenType.GreaterThanSign:case TokenType.Asterisk:return 1;}return 0;} /** - * Get node with an operator - * @returns {Array} `['operator', x]` where `x` is an operator converted - * to string. - */function getOperator(){var startPos=pos;var x=tokens[pos++].value;var token=tokens[startPos];return newNode(NodeType.OperatorType,x,token.ln,token.col);} /** - * Check if token is part of text inside parentheses, e.g. `(1)` - * @param {Number} i Token's index number - * @return {Number} - */function checkParentheses(i){if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;return tokens[i].right - i + 1;} /** - * Get node with text inside parentheses, e.g. `(1)` - * @return {Node} - */function getParentheses(){var type=NodeType.ParenthesesType;var token=tokens[pos];var line=token.ln;var column=token.col;pos++;var tsets=getTsets();var end=getLastPosition(tsets,line,column,1);pos++;return newNode(type,tsets,line,column,end);} /** - * Check if token is a parent selector (`&`). - * @param {Number} i Token's index number - * @returns {Number} - */function checkParentSelector(i){return i < tokensLength && tokens[i].type === TokenType.Ampersand?1:0;} /** - * Get node with a parent selector - * @returns {Array} `['parentSelector']` - */function getParentSelector(){var startPos=pos++;var token=tokens[startPos];return newNode(NodeType.ParentSelectorType,'&',token.ln,token.col);}function checkParentSelectorExtension(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;while(i < tokensLength) {if(l = checkNumber(i) || checkIdent(i))i += l;else break;}return i - start;}function getParentSelectorExtension(){var type=NodeType.ParentSelectorExtensionType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];while(pos < tokensLength) {if(checkNumber(pos))content.push(getNumber());else if(checkIdent(pos))content.push(getIdent());else break;}return newNode(type,content,line,column);}function checkParentSelectorWithExtension(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkParentSelector(i))i += l;else return 0;if(l = checkParentSelectorExtension(i))i += l;return i - start;}function getParentSelectorWithExtension(){var content=[getParentSelector()];if(checkParentSelectorExtension(pos))content.push(getParentSelectorExtension());return content;} /** - * Check if token is part of a number with percent sign (e.g. `10%`) - * @param {Number} i Token's index number - * @returns {Number} - */function checkPercentage(i){var x;if(i >= tokensLength)return 0;x = checkNumber(i);if(!x || i + x >= tokensLength)return 0;return tokens[i + x].type === TokenType.PercentSign?x + 1:0;} /** - * Get node of number with percent sign - * @returns {Array} `['percentage', ['number', x]]` where `x` is a number - * (without percent sign) converted to string. - */function getPercentage(){var startPos=pos;var x=[getNumber()];var token=tokens[startPos];var line=token.ln;var column=token.col;var end=getLastPosition(x,line,column,1);pos++;return newNode(NodeType.PercentageType,x,line,column,end);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkProgid(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(joinValues2(i,6) === 'progid:DXImageTransform.Microsoft.')i += 6;else return 0;if(l = checkIdent(i))i += l;else return 0;if(l = checkSC(i))i += l;if(tokens[i].type === TokenType.LeftParenthesis){tokens[start].progid_end = tokens[i].right;i = tokens[i].right + 1;}else return 0;return i - start;} /** - * @returns {Array} - */function getProgid(){var startPos=pos;var progid_end=tokens[pos].progid_end;var x=joinValues(pos,progid_end);pos = progid_end + 1;var token=tokens[startPos];return newNode(NodeType.ProgidType,x,token.ln,token.col);} /** - * Check if token is part of a property - * @param {Number} i Token's index number - * @returns {Number} Length of the property - */function checkProperty(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkVariable(i) || checkIdent(i))i += l;else return 0;return i - start;} /** - * Get node with a property - * @returns {Array} `['property', x]` - */function getProperty(){var startPos=pos;var x=[];if(checkVariable(pos))x.push(getVariable());else x.push(getIdent());var token=tokens[startPos];return newNode(NodeType.PropertyType,x,token.ln,token.col);} /** - * Check if token is a colon - * @param {Number} i Token's index number - * @returns {Number} `1` if token is a colon, otherwise `0` - */function checkPropertyDelim(i){return i < tokensLength && tokens[i].type === TokenType.Colon?1:0;} /** - * Get node with a colon - * @returns {Array} `['propertyDelim']` - */function getPropertyDelim(){var startPos=pos++;var token=tokens[startPos];return newNode(NodeType.PropertyDelimType,':',token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkPseudo(i){return checkPseudoe(i) || checkPseudoc(i);} /** - * @returns {Array} - */function getPseudo(){if(checkPseudoe(pos))return getPseudoe();if(checkPseudoc(pos))return getPseudoc();} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkPseudoe(i){var l;if(i >= tokensLength || tokens[i++].type !== TokenType.Colon || i >= tokensLength || tokens[i++].type !== TokenType.Colon)return 0;return (l = checkInterpolatedVariable(i) || checkIdent(i))?l + 2:0;} /** - * @returns {Array} - */function getPseudoe(){var startPos=pos;var x=[];pos += 2;x.push(checkInterpolatedVariable(pos)?getInterpolatedVariable():getIdent());var token=tokens[startPos];return newNode(NodeType.PseudoeType,x,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkPseudoc(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.Colon)return 0;if(l = checkPseudoClass3(i))tokens[i].pseudoClassType = 3;else if(l = checkPseudoClass4(i))tokens[i].pseudoClassType = 4;else if(l = checkPseudoClass5(i))tokens[i].pseudoClassType = 5;else if(l = checkPseudoClass1(i))tokens[i].pseudoClassType = 1;else if(l = checkPseudoClass2(i))tokens[i].pseudoClassType = 2;else if(l = checkPseudoClass6(i))tokens[i].pseudoClassType = 6;else return 0;return l;}function getPseudoc(){var childType=tokens[pos].pseudoClassType;if(childType === 1)return getPseudoClass1();if(childType === 2)return getPseudoClass2();if(childType === 3)return getPseudoClass3();if(childType === 4)return getPseudoClass4();if(childType === 5)return getPseudoClass5();if(childType === 6)return getPseudoClass6();} /** - * (1) `:not(selector)` - * (2) `:extend(selector, selector)` - */function checkPseudoClass1(i){var start=i; // Skip `:`. -i++;var l=undefined;if(l = checkIdent(i))i += l;else return 0;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSelectorsGroup(i))i += l;else return 0;if(i !== right)return 0;return right - start + 1;} /** - * (-) `:not(panda)` - */function getPseudoClass1(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. -pos++;content.push(getIdent());{var _type=NodeType.ArgumentsType;var _token=tokens[pos];var _line=_token.ln;var _column=_token.col; // Skip `(`. -pos++;var selectors=getSelectorsGroup();var end=getLastPosition(selectors,_line,_column,1);var args=newNode(_type,selectors,_line,_column,end);content.push(args); // Skip `)`. -pos++;}return newNode(type,content,line,column);} /** - * (1) `:nth-child(odd)` - * (2) `:nth-child(even)` - * (3) `:lang(de-DE)` - */function checkPseudoClass2(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdent(i))i += l;else return 0;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSC(i))i += l;if(l = checkIdent(i))i += l;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass2(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. -pos++;var ident=getIdent();content.push(ident);{ // Skip `(`. -pos++;var l=tokens[pos].ln;var c=tokens[pos].col;var value=[];value = value.concat(getSC());value.push(getIdent());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. -pos++;}return newNode(type,content,line,column);} /** - * (-) `:nth-child(-3n + 2)` - */function checkPseudoClass3(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdent(i))i += l;else return 0;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSC(i))i += l;if(l = checkUnary(i))i += l;if(i >= tokensLength)return 0;if(tokens[i].type === TokenType.DecimalNumber)i++;if(i >= tokensLength)return 0;if(tokens[i].value === 'n')i++;else return 0;if(l = checkSC(i))i += l;if(i >= tokensLength)return 0;if(tokens[i].value === '+' || tokens[i].value === '-')i++;else return 0;if(l = checkSC(i))i += l;if(tokens[i].type === TokenType.DecimalNumber)i++;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass3(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. -pos++;var ident=getIdent();content.push(ident);var l=tokens[pos].ln;var c=tokens[pos].col;var value=[]; // Skip `(`. -pos++;if(checkUnary(pos))value.push(getUnary());if(checkNumber(pos))value.push(getNumber());{var _l=tokens[pos].ln;var _c=tokens[pos].col;var _content=tokens[pos].value;var _ident=newNode(NodeType.IdentType,_content,_l,_c);value.push(_ident);pos++;}value = value.concat(getSC());if(checkUnary(pos))value.push(getUnary());value = value.concat(getSC());if(checkNumber(pos))value.push(getNumber());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. -pos++;return newNode(type,content,line,column);} /** - * (-) `:nth-child(-3n)` - */function checkPseudoClass4(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdent(i))i += l;else return 0;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSC(i))i += l;if(l = checkUnary(i))i += l;if(tokens[i].type === TokenType.DecimalNumber)i++;if(tokens[i].value === 'n')i++;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass4(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. -pos++;var ident=getIdent();content.push(ident); // Skip `(`. -pos++;var l=tokens[pos].ln;var c=tokens[pos].col;var value=[];if(checkUnary(pos))value.push(getUnary());if(checkNumber(pos))value.push(getNumber());if(checkIdent(pos))value.push(getIdent());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. -pos++;return newNode(type,content,line,column);} /** - * (-) `:nth-child(+8)` - */function checkPseudoClass5(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdent(i))i += l;else return 0;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSC(i))i += l;if(l = checkUnary(i))i += l;if(tokens[i].type === TokenType.DecimalNumber)i++;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass5(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. -pos++;var ident=getIdent();content.push(ident); // Skip `(`. -pos++;var l=tokens[pos].ln;var c=tokens[pos].col;var value=[];if(checkUnary(pos))value.push(getUnary());if(checkNumber(pos))value.push(getNumber());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. -pos++;return newNode(type,content,line,column);} /** - * (-) `:checked` - */function checkPseudoClass6(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkInterpolatedVariable(i))i += l;else if(l = checkIdent(i))i += l;else return 0;return i - start;}function getPseudoClass6(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. -pos++;var ident=checkInterpolatedVariable(pos)?getInterpolatedVariable():getIdent();content.push(ident);return newNode(type,content,line,column);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkRuleset(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkSelectorsGroup(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;}function getRuleset(){var type=NodeType.RulesetType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];content = content.concat(getSelectorsGroup());content = content.concat(getSC());content.push(getBlock());return newNode(type,content,line,column);} /** - * Check if token is marked as a space (if it's a space or a tab - * or a line break). - * @param {Number} i - * @returns {Number} Number of spaces in a row starting with the given token. - */function checkS(i){return i < tokensLength && tokens[i].ws?tokens[i].ws_last - i + 1:0;} /** - * Get node with spaces - * @returns {Array} `['s', x]` where `x` is a string containing spaces - */function getS(){var startPos=pos;var x=joinValues(pos,tokens[pos].ws_last);pos = tokens[pos].ws_last + 1;var token=tokens[startPos];return newNode(NodeType.SType,x,token.ln,token.col);} /** - * Check if token is a space or a comment. - * @param {Number} i Token's index number - * @returns {Number} Number of similar (space or comment) tokens - * in a row starting with the given token. - */function checkSC(i){if(i >= tokensLength)return 0;var l=undefined;var lsc=0;while(i < tokensLength) {if(!(l = checkS(i)) && !(l = checkCommentML(i)) && !(l = checkCommentSL(i)))break;i += l;lsc += l;}return lsc || 0;} /** - * Get node with spaces and comments - * @returns {Array} Array containing nodes with spaces (if there are any) - * and nodes with comments (if there are any): - * `[['s', x]*, ['comment', y]*]` where `x` is a string of spaces - * and `y` is a comment's text (without `/*` and `* /`). - */function getSC(){var sc=[];var ln=undefined;if(pos >= tokensLength)return sc;ln = tokens[pos].ln;while(pos < tokensLength) {if(checkS(pos))sc.push(getS());else if(checkCommentML(pos))sc.push(getCommentML());else if(checkCommentSL(pos))sc.push(getCommentSL());else break;}return sc;} /** - * Check if token is part of a hexadecimal number (e.g. `#fff`) inside - * a simple selector - * @param {Number} i Token's index number - * @returns {Number} - */function checkShash(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.NumberSign)return 0;if(l = checkInterpolatedVariable(i + 1) || checkIdent(i + 1))return l + 1;else return 0;} /** - * Get node with a hexadecimal number (e.g. `#fff`) inside a simple - * selector - * @returns {Array} `['shash', x]` where `x` is a hexadecimal number - * converted to string (without `#`, e.g. `fff`) - */function getShash(){var startPos=pos;var x=[];pos++;if(checkInterpolatedVariable(pos))x.push(getInterpolatedVariable());else x.push(getIdent());var token=tokens[startPos];return newNode(NodeType.ShashType,x,token.ln,token.col);} /** - * Check if token is part of a string (text wrapped in quotes) - * @param {Number} i Token's index number - * @returns {Number} `1` if token is part of a string, `0` if not - */function checkString(i){return i < tokensLength && (tokens[i].type === TokenType.StringSQ || tokens[i].type === TokenType.StringDQ)?1:0;} /** - * Get string's node - * @returns {Array} `['string', x]` where `x` is a string (including - * quotes). - */function getString(){var startPos=pos;var x=tokens[pos++].value;var token=tokens[startPos];return newNode(NodeType.StringType,x,token.ln,token.col);} /** - * Validate stylesheet: it should consist of any number (0 or more) of - * rulesets (sets of rules with selectors), @-rules, whitespaces or - * comments. - * @param {Number} i Token's index number - * @returns {Number} - */function checkStylesheet(i){var start=i;var l=undefined; // Check every token: -while(i < tokensLength) {if(l = checkSC(i) || checkAtrule(i) || checkRuleset(i) || checkMixin(i) || checkDeclaration(i) || checkDeclDelim(i))i += l;else throwError(i);}return i - start;} /** - * @returns {Array} `['stylesheet', x]` where `x` is all stylesheet's - * nodes. - */function getStylesheet(){var startPos=pos;var x=[];while(pos < tokensLength) {if(checkSC(pos))x = x.concat(getSC());else if(checkAtrule(pos))x.push(getAtrule());else if(checkRuleset(pos))x.push(getRuleset());else if(checkMixin(pos))x.push(getMixin());else if(checkDeclaration(pos))x.push(getDeclaration());else if(checkDeclDelim(pos))x.push(getDeclDelim());else throwError(pos);}var token=tokens[startPos];return newNode(NodeType.StylesheetType,x,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkTset(i){var l;if(l = checkVhash(i))tokens[i].tset_child = 1;else if(l = checkAny(i))tokens[i].tset_child = 2;else if(l = checkSC(i))tokens[i].tset_child = 3;else if(l = checkOperator(i))tokens[i].tset_child = 4;return l;} /** - * @returns {Array} - */function getTset(){var childType=tokens[pos].tset_child;if(childType === 1)return getVhash();else if(childType === 2)return getAny();else if(childType === 3)return getSC();else if(childType === 4)return getOperator();} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkTsets(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;while(l = checkTset(i)) {i += l;}return i - start;} /** - * @returns {Array} - */function getTsets(){var x=[];var t=undefined;while(checkTset(pos)) {t = getTset();if(typeof t.content === 'string')x.push(t);else x = x.concat(t);}return x;} /** - * Check if token is an unary (arithmetical) sign (`+` or `-`) - * @param {Number} i Token's index number - * @returns {Number} `1` if token is an unary sign, `0` if not - */function checkUnary(i){return i < tokensLength && (tokens[i].type === TokenType.HyphenMinus || tokens[i].type === TokenType.PlusSign)?1:0;} /** - * Get node with an unary (arithmetical) sign (`+` or `-`) - * @returns {Array} `['unary', x]` where `x` is an unary sign - * converted to string. - */function getUnary(){var startPos=pos;var x=tokens[pos++].value;var token=tokens[startPos];return newNode(NodeType.OperatorType,x,token.ln,token.col);} /** - * Check if token is part of URI (e.g. `url('/css/styles.css')`) - * @param {Number} i Token's index number - * @returns {Number} Length of URI - */function checkUri(i){var start=i;if(i >= tokensLength || tokens[i++].value !== 'url' || i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;return tokens[i].right - start + 1;} /** - * Get node with URI - * @returns {Array} `['uri', x]` where `x` is URI's nodes (without `url` - * and braces, e.g. `['string', ''/css/styles.css'']`). - */function getUri(){var startPos=pos;var uriExcluding={};var uri=undefined;var token=undefined;var l=undefined;var raw=undefined;pos += 2;uriExcluding[TokenType.Space] = 1;uriExcluding[TokenType.Tab] = 1;uriExcluding[TokenType.Newline] = 1;uriExcluding[TokenType.LeftParenthesis] = 1;uriExcluding[TokenType.RightParenthesis] = 1;if(checkUri1(pos)){uri = [].concat(getSC()).concat([getString()]).concat(getSC());}else {uri = getSC();l = checkExcluding(uriExcluding,pos);token = tokens[pos];raw = newNode(NodeType.RawType,joinValues(pos,pos + l),token.ln,token.col);uri.push(raw);pos += l + 1;uri = uri.concat(getSC());}token = tokens[startPos];var line=token.ln;var column=token.col;var end=getLastPosition(uri,line,column,1);pos++;return newNode(NodeType.UriType,uri,line,column,end);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkUri1(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkSC(i))i += l;if(tokens[i].type !== TokenType.StringDQ && tokens[i].type !== TokenType.StringSQ)return 0;i++;if(l = checkSC(i))i += l;return i - start;} /** - * Check if token is part of a value - * @param {Number} i Token's index number - * @returns {Number} Length of the value - */function checkValue(i){var start=i;var l=undefined;var s=undefined;var _i=undefined;while(i < tokensLength) {s = checkSC(i);_i = i + s;if(l = _checkValue(_i))i += l + s;if(!l || checkBlock(_i))break;}return i - start;} /** - * @param {Number} i Token's index number - * @returns {Number} - */function _checkValue(i){return checkEscapedString(i) || checkInterpolatedVariable(i) || checkVariable(i) || checkVhash(i) || checkBlock(i) || checkProgid(i) || checkAny(i) || checkAtkeyword(i) || checkOperator(i) || checkImportant(i);} /** - * @returns {Array} - */function getValue(){var startPos=pos;var x=[];var s=undefined;var _pos=undefined;while(pos < tokensLength) {s = checkSC(pos);_pos = pos + s;if(!_checkValue(_pos))break;if(s)x = x.concat(getSC());x.push(_getValue());}var token=tokens[startPos];return newNode(NodeType.ValueType,x,token.ln,token.col);} /** - * @returns {Array} - */function _getValue(){if(checkEscapedString(pos))return getEscapedString();else if(checkInterpolatedVariable(pos))return getInterpolatedVariable();else if(checkVariable(pos))return getVariable();else if(checkVhash(pos))return getVhash();else if(checkBlock(pos))return getBlock();else if(checkProgid(pos))return getProgid();else if(checkAny(pos))return getAny();else if(checkAtkeyword(pos))return getAtkeyword();else if(checkOperator(pos))return getOperator();else if(checkImportant(pos))return getImportant();} /** - * Check if token is part of LESS variable - * @param {Number} i Token's index number - * @returns {Number} Length of the variable - */function checkVariable(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.CommercialAt)return 0;if(tokens[i - 1] && tokens[i - 1].type === TokenType.CommercialAt && tokens[i - 2] && tokens[i - 2].type === TokenType.CommercialAt)return 0;return (l = checkVariable(i + 1) || checkIdent(i + 1))?l + 1:0;} /** - * Get node with a variable - * @returns {Array} `['variable', ['ident', x]]` where `x` is - * a variable name. - */function getVariable(){var startPos=pos;var x=[];pos++;if(checkVariable(pos))x.push(getVariable());else x.push(getIdent());var token=tokens[startPos];return newNode(NodeType.VariableType,x,token.ln,token.col);} /** - * Check if token is part of a variables list (e.g. `@rest...`). - * @param {Number} i Token's index number - * @returns {Number} - */function checkVariablesList(i){var d=0; // Number of dots -var l=undefined;if(i >= tokensLength)return 0;if(l = checkVariable(i))i += l;else return 0;while(tokens[i] && tokens[i].type === TokenType.FullStop) {d++;i++;}return d === 3?l + d:0;} /** - * Get node with a variables list - * @returns {Array} `['variableslist', ['variable', ['ident', x]]]` where - * `x` is a variable name. - */function getVariablesList(){var startPos=pos;var x=[getVariable()];var token=tokens[startPos];var line=token.ln;var column=token.col;var end=getLastPosition(x,line,column,3);pos += 3;return newNode(NodeType.VariablesListType,x,line,column,end);} /** - * Check if token is part of a hexadecimal number (e.g. `#fff`) inside - * some value - * @param {Number} i Token's index number - * @returns {Number} - */function checkVhash(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.NumberSign)return 0;return (l = checkNmName2(i + 1))?l + 1:0;} /** - * Get node with a hexadecimal number (e.g. `#fff`) inside some value - * @returns {Array} `['vhash', x]` where `x` is a hexadecimal number - * converted to string (without `#`, e.g. `'fff'`). - */function getVhash(){var startPos=pos;var x=undefined;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;x = getNmName2();var end=getLastPosition(x,line,column + 1);return newNode(NodeType.VhashType,x,line,column,end);}module.exports = function(_tokens,context){tokens = _tokens;tokensLength = tokens.length;pos = 0;return contexts[context]();};function checkSelectorsGroup(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkSelector(i))i += l;else return 0;while(i < tokensLength) {var sb=checkSC(i);var c=checkDelim(i + sb);if(!c)break;var sa=checkSC(i + sb + c);if(l = checkSelector(i + sb + c + sa))i += sb + c + sa + l;else break;}tokens[start].selectorsGroupEnd = i;return i - start;}function getSelectorsGroup(){var selectorsGroup=[];var selectorsGroupEnd=tokens[pos].selectorsGroupEnd;selectorsGroup.push(getSelector());while(pos < selectorsGroupEnd) {selectorsGroup = selectorsGroup.concat(getSC());selectorsGroup.push(getDelim());selectorsGroup = selectorsGroup.concat(getSC());selectorsGroup.push(getSelector());}return selectorsGroup;}function checkSelector(i){var l;if(l = checkSelector1(i))tokens[i].selectorType = 1;else if(l = checkSelector2(i))tokens[i].selectorType = 2;return l;}function getSelector(){var selectorType=tokens[pos].selectorType;if(selectorType === 1)return getSelector1();else return getSelector2();} /** - * Checks for selector which starts with a compound selector. - */function checkSelector1(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkCompoundSelector(i))i += l;else return 0;while(i < tokensLength) {var s=checkSC(i);var c=checkCombinator(i + s);if(!s && !c)break;if(c){i += s + c;s = checkSC(i);}if(l = checkCompoundSelector(i + s))i += s + l;else break;}tokens[start].selectorEnd = i;return i - start;}function getSelector1(){var type=NodeType.SelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var selectorEnd=token.selectorEnd;var content=getCompoundSelector();while(pos < selectorEnd) {if(checkSC(pos))content = content.concat(getSC());else if(checkCombinator(pos))content.push(getCombinator());else if(checkCompoundSelector(pos))content = content.concat(getCompoundSelector());}return newNode(type,content,line,column);} /** - * Checks for a selector that starts with a combinator. - */function checkSelector2(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkCombinator(i))i += l;else return 0;while(i < tokensLength) {var sb=checkSC(i);if(l = checkCompoundSelector(i + sb))i += sb + l;else break;var sa=checkSC(i);var c=checkCombinator(i + sa);if(!sa && !c)break;if(c){i += sa + c;}}tokens[start].selectorEnd = i;return i - start;}function getSelector2(){var type=NodeType.SelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var selectorEnd=token.selectorEnd;var content=[getCombinator()];while(pos < selectorEnd) {if(checkSC(pos))content = content.concat(getSC());else if(checkCombinator(pos))content.push(getCombinator());else if(checkCompoundSelector(pos))content = content.concat(getCompoundSelector());}return newNode(type,content,line,column);}function checkCompoundSelector(i){var l=undefined;if(l = checkCompoundSelector1(i)){tokens[i].compoundSelectorType = 1;}else if(l = checkCompoundSelector2(i)){tokens[i].compoundSelectorType = 2;}return l;}function getCompoundSelector(){var type=tokens[pos].compoundSelectorType;if(type === 1)return getCompoundSelector1();if(type === 2)return getCompoundSelector2();}function checkCompoundSelector1(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkTypeSelector(i) || checkParentSelectorWithExtension(i))i += l;else return 0;while(i < tokensLength) {var _l2=checkShash(i) || checkClass(i) || checkAttributeSelector(i) || checkPseudo(i);if(_l2)i += _l2;else break;}tokens[start].compoundSelectorEnd = i;return i - start;}function getCompoundSelector1(){var sequence=[];var compoundSelectorEnd=tokens[pos].compoundSelectorEnd;if(checkTypeSelector(pos))sequence.push(getTypeSelector());else if(checkParentSelectorWithExtension(pos))sequence = sequence.concat(getParentSelectorWithExtension());while(pos < compoundSelectorEnd) {if(checkShash(pos))sequence.push(getShash());else if(checkClass(pos))sequence.push(getClass());else if(checkAttributeSelector(pos))sequence.push(getAttributeSelector());else if(checkPseudo(pos))sequence.push(getPseudo());}return sequence;}function checkCompoundSelector2(i){if(i >= tokensLength)return 0;var start=i;while(i < tokensLength) {var l=checkShash(i) || checkClass(i) || checkAttributeSelector(i) || checkPseudo(i);if(l)i += l;else break;}tokens[start].compoundSelectorEnd = i;return i - start;}function getCompoundSelector2(){var sequence=[];var compoundSelectorEnd=tokens[pos].compoundSelectorEnd;while(pos < compoundSelectorEnd) {if(checkShash(pos))sequence.push(getShash());else if(checkClass(pos))sequence.push(getClass());else if(checkAttributeSelector(pos))sequence.push(getAttributeSelector());else if(checkPseudo(pos))sequence.push(getPseudo());}return sequence;}function checkTypeSelector(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkNamePrefix(i))i += l;if(tokens[i].type === TokenType.Asterisk)i++;else if(l = checkIdent(i))i += l;else return 0;return i - start;}function getTypeSelector(){var type=NodeType.TypeSelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkNamePrefix(pos))content.push(getNamePrefix());if(checkIdent(pos))content.push(getIdent());return newNode(type,content,line,column);}function checkAttributeSelector(i){var l=undefined;if(l = checkAttributeSelector1(i))tokens[i].attributeSelectorType = 1;else if(l = checkAttributeSelector2(i))tokens[i].attributeSelectorType = 2;return l;}function getAttributeSelector(){var type=tokens[pos].attributeSelectorType;if(type === 1)return getAttributeSelector1();else return getAttributeSelector2();} /** - * (1) `[panda=nani]` - * (2) `[panda='nani']` - * (3) `[panda='nani' i]` - * - */function checkAttributeSelector1(i){var start=i;if(tokens[i].type === TokenType.LeftSquareBracket)i++;else return 0;var l=undefined;if(l = checkSC(i))i += l;if(l = checkAttributeName(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkAttributeMatch(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkAttributeValue(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkAttributeFlags(i)){i += l;if(l = checkSC(i))i += l;}if(tokens[i].type === TokenType.RightSquareBracket)i++;else return 0;return i - start;}function getAttributeSelector1(){var type=NodeType.AttributeSelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `[`. -pos++;content = content.concat(getSC());content.push(getAttributeName());content = content.concat(getSC());content.push(getAttributeMatch());content = content.concat(getSC());content.push(getAttributeValue());content = content.concat(getSC());if(checkAttributeFlags(pos)){content.push(getAttributeFlags());content = content.concat(getSC());} // Skip `]`. -pos++;var end=getLastPosition(content,line,column,1);return newNode(type,content,line,column,end);} /** - * (1) `[panda]` - */function checkAttributeSelector2(i){var start=i;if(tokens[i].type === TokenType.LeftSquareBracket)i++;else return 0;var l=undefined;if(l = checkSC(i))i += l;if(l = checkAttributeName(i))i += l;else return 0;if(l = checkSC(i))i += l;if(tokens[i].type === TokenType.RightSquareBracket)i++;else return 0;return i - start;}function getAttributeSelector2(){var type=NodeType.AttributeSelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `[`. -pos++;content = content.concat(getSC());content.push(getAttributeName());content = content.concat(getSC()); // Skip `]`. -pos++;var end=getLastPosition(content,line,column,1);return newNode(type,content,line,column,end);}function checkAttributeName(i){var start=i;var l=undefined;if(l = checkNamePrefix(i))i += l;if(l = checkIdent(i))i += l;else return 0;return i - start;}function getAttributeName(){var type=NodeType.AttributeNameType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkNamePrefix(pos))content.push(getNamePrefix());content.push(getIdent());return newNode(type,content,line,column);}function checkAttributeMatch(i){var l=undefined;if(l = checkAttributeMatch1(i))tokens[i].attributeMatchType = 1;else if(l = checkAttributeMatch2(i))tokens[i].attributeMatchType = 2;return l;}function getAttributeMatch(){var type=tokens[pos].attributeMatchType;if(type === 1)return getAttributeMatch1();else return getAttributeMatch2();}function checkAttributeMatch1(i){var start=i;var type=tokens[i].type;if(type === TokenType.Tilde || type === TokenType.VerticalLine || type === TokenType.CircumflexAccent || type === TokenType.DollarSign || type === TokenType.Asterisk)i++;else return 0;if(tokens[i].type === TokenType.EqualsSign)i++;else return 0;return i - start;}function getAttributeMatch1(){var type=NodeType.AttributeMatchType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=tokens[pos].value + tokens[pos + 1].value;pos += 2;return newNode(type,content,line,column);}function checkAttributeMatch2(i){if(tokens[i].type === TokenType.EqualsSign)return 1;else return 0;}function getAttributeMatch2(){var type=NodeType.AttributeMatchType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='=';pos++;return newNode(type,content,line,column);}function checkAttributeValue(i){return checkString(i) || checkIdent(i);}function getAttributeValue(){var type=NodeType.AttributeValueType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkString(pos))content.push(getString());else content.push(getIdent());return newNode(type,content,line,column);}function checkAttributeFlags(i){return checkIdent(i);}function getAttributeFlags(){var type=NodeType.AttributeFlagsType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[getIdent()];return newNode(type,content,line,column);}function checkNamePrefix(i){if(i >= tokensLength)return 0;var l=undefined;if(l = checkNamePrefix1(i))tokens[i].namePrefixType = 1;else if(l = checkNamePrefix2(i))tokens[i].namePrefixType = 2;return l;}function getNamePrefix(){var type=tokens[pos].namePrefixType;if(type === 1)return getNamePrefix1();else return getNamePrefix2();} /** - * (1) `panda|` - * (2) `panda|` - */function checkNamePrefix1(i){var start=i;var l=undefined;if(l = checkNamespacePrefix(i))i += l;else return 0;if(l = checkCommentML(i))i += l;if(l = checkNamespaceSeparator(i))i += l;else return 0;return i - start;}function getNamePrefix1(){var type=NodeType.NamePrefixType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];content.push(getNamespacePrefix());if(checkCommentML(pos))content.push(getCommentML());content.push(getNamespaceSeparator());return newNode(type,content,line,column);} /** - * (1) `|` - */function checkNamePrefix2(i){return checkNamespaceSeparator(i);}function getNamePrefix2(){var type=NodeType.NamePrefixType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[getNamespaceSeparator()];return newNode(type,content,line,column);} /** - * (1) `*` - * (2) `panda` - */function checkNamespacePrefix(i){if(i >= tokensLength)return 0;var l=undefined;if(tokens[i].type === TokenType.Asterisk)return 1;else if(l = checkIdent(i))return l;else return 0;}function getNamespacePrefix(){var type=NodeType.NamespacePrefixType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkIdent(pos))content.push(getIdent());return newNode(type,content,line,column);} /** - * (1) `|` - */function checkNamespaceSeparator(i){if(i >= tokensLength)return 0;if(tokens[i].type === TokenType.VerticalLine)return 1;else return 0;}function getNamespaceSeparator(){var type=NodeType.NamespaceSeparatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='|';pos++;return newNode(type,content,line,column);} \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/less/stringify.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/less/stringify.js deleted file mode 100644 index 75b1d0d..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/less/stringify.js +++ /dev/null @@ -1,3 +0,0 @@ -// jscs:disable maximumLineLength -'use strict';module.exports = function stringify(tree){ // TODO: Better error message -if(!tree)throw new Error('We need tree to translate');function _t(tree){var type=tree.type;if(_unique[type])return _unique[type](tree);if(typeof tree.content === 'string')return tree.content;if(Array.isArray(tree.content))return _composite(tree.content);return '';}function _composite(t,i){if(!t)return '';var s='';i = i || 0;for(;i < t.length;i++) s += _t(t[i]);return s;}var _unique={'arguments':function(t){return '(' + _composite(t.content) + ')';},'atkeyword':function(t){return '@' + _composite(t.content);},'attributeSelector':function(t){return '[' + _composite(t.content) + ']';},'block':function(t){return '{' + _composite(t.content) + '}';},'brackets':function(t){return '[' + _composite(t.content) + ']';},'class':function(t){return '.' + _composite(t.content);},'color':function(t){return '#' + t.content;},'escapedString':function(t){return '~' + t.content;},'expression':function(t){return 'expression(' + t.content + ')';},'id':function(t){return '#' + _composite(t.content);},'interpolatedVariable':function(t){return '@{' + _composite(t.content) + '}';},'multilineComment':function(t){return '/*' + t.content + '*/';},'nthSelector':function(t){return ':' + _t(t.content[0]) + '(' + _composite(t.content.slice(1)) + ')';},'parentheses':function(t){return '(' + _composite(t.content) + ')';},'percentage':function(t){return _composite(t.content) + '%';},'pseudoClass':function(t){return ':' + _composite(t.content);},'pseudoElement':function(t){return '::' + _composite(t.content);},'singlelineComment':function(t){return '/' + '/' + t.content;},'uri':function(t){return 'url(' + _composite(t.content) + ')';},'variable':function(t){return '@' + _composite(t.content);},'variablesList':function(t){return _composite(t.content) + '...';}};return _t(tree);}; \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/less/tokenizer.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/less/tokenizer.js deleted file mode 100644 index 3690f2a..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/less/tokenizer.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict';module.exports = function(css,tabSize){var TokenType=require('../token-types');var tokens=[];var urlMode=false;var blockMode=0;var c=undefined; // Current character -var cn=undefined; // Next character -var pos=0;var tn=0;var ln=1;var col=1;var Punctuation={' ':TokenType.Space,'\n':TokenType.Newline,'\r':TokenType.Newline,'\t':TokenType.Tab,'!':TokenType.ExclamationMark,'"':TokenType.QuotationMark,'#':TokenType.NumberSign,'$':TokenType.DollarSign,'%':TokenType.PercentSign,'&':TokenType.Ampersand,'\'':TokenType.Apostrophe,'(':TokenType.LeftParenthesis,')':TokenType.RightParenthesis,'*':TokenType.Asterisk,'+':TokenType.PlusSign,',':TokenType.Comma,'-':TokenType.HyphenMinus,'.':TokenType.FullStop,'/':TokenType.Solidus,':':TokenType.Colon,';':TokenType.Semicolon,'<':TokenType.LessThanSign,'=':TokenType.EqualsSign,'>':TokenType.GreaterThanSign,'?':TokenType.QuestionMark,'@':TokenType.CommercialAt,'[':TokenType.LeftSquareBracket,']':TokenType.RightSquareBracket,'^':TokenType.CircumflexAccent,'_':TokenType.LowLine,'{':TokenType.LeftCurlyBracket,'|':TokenType.VerticalLine,'}':TokenType.RightCurlyBracket,'~':TokenType.Tilde}; /** - * Add a token to the token list - * @param {string} type - * @param {string} value - */function pushToken(type,value,column){tokens.push({tn:tn++,ln:ln,col:column,type:type,value:value});} /** - * Check if a character is a decimal digit - * @param {string} c Character - * @returns {boolean} - */function isDecimalDigit(c){return '0123456789'.indexOf(c) >= 0;} /** - * Parse spaces - * @param {string} css Unparsed part of CSS string - */function parseSpaces(css){var start=pos; // Read the string until we meet a non-space character: -for(;pos < css.length;pos++) {if(css.charAt(pos) !== ' ')break;} // Add a substring containing only spaces to tokens: -pushToken(TokenType.Space,css.substring(start,pos--),col);col += pos - start;} /** - * Parse a string within quotes - * @param {string} css Unparsed part of CSS string - * @param {string} q Quote (either `'` or `"`) - */function parseString(css,q){var start=pos; // Read the string until we meet a matching quote: -for(pos++;pos < css.length;pos++) { // Skip escaped quotes: -if(css.charAt(pos) === '\\')pos++;else if(css.charAt(pos) === q)break;} // Add the string (including quotes) to tokens: -var type=q === '"'?TokenType.StringDQ:TokenType.StringSQ;pushToken(type,css.substring(start,pos + 1),col);col += pos - start;} /** - * Parse numbers - * @param {string} css Unparsed part of CSS string - */function parseDecimalNumber(css){var start=pos; // Read the string until we meet a character that's not a digit: -for(;pos < css.length;pos++) {if(!isDecimalDigit(css.charAt(pos)))break;} // Add the number to tokens: -pushToken(TokenType.DecimalNumber,css.substring(start,pos--),col);col += pos - start;} /** - * Parse identifier - * @param {string} css Unparsed part of CSS string - */function parseIdentifier(css){var start=pos; // Skip all opening slashes: -while(css.charAt(pos) === '/') pos++; // Read the string until we meet a punctuation mark: -for(;pos < css.length;pos++) { // Skip all '\': -if(css.charAt(pos) === '\\')pos++;else if(css.charAt(pos) in Punctuation)break;}var ident=css.substring(start,pos--); // Enter url mode if parsed substring is `url`: -if(!urlMode && ident === 'url' && css.charAt(pos + 1) === '('){urlMode = true;} // Add identifier to tokens: -pushToken(TokenType.Identifier,ident,col);col += pos - start;} /** - * Parse a multiline comment - * @param {string} css Unparsed part of CSS string - */function parseMLComment(css){var start=pos; // Read the string until we meet `*/`. -// Since we already know first 2 characters (`/*`), start reading -// from `pos + 2`: -for(pos = pos + 2;pos < css.length;pos++) {if(css.charAt(pos) === '*' && css.charAt(pos + 1) === '/'){pos++;break;}} // Add full comment (including `/*` and `*/`) to the list of tokens: -var comment=css.substring(start,pos + 1);pushToken(TokenType.CommentML,comment,col);var newlines=comment.split('\n');if(newlines.length > 1){ln += newlines.length - 1;col = newlines[newlines.length - 1].length;}else {col += pos - start;}} /** - * Parse a single line comment - * @param {string} css Unparsed part of CSS string - */function parseSLComment(css){var start=pos; // Read the string until we meet line break. -// Since we already know first 2 characters (`//`), start reading -// from `pos + 2`: -for(pos += 2;pos < css.length;pos++) {if(css.charAt(pos) === '\n' || css.charAt(pos) === '\r'){break;}} // Add comment (including `//` and line break) to the list of tokens: -pushToken(TokenType.CommentSL,css.substring(start,pos--),col);col += pos - start;} /** - * Convert a CSS string to a list of tokens - * @param {string} css CSS string - * @returns {Array} List of tokens - * @private - */function getTokens(css){ // Parse string, character by character: -for(pos = 0;pos < css.length;col++,pos++) {c = css.charAt(pos);cn = css.charAt(pos + 1); // If we meet `/*`, it's a start of a multiline comment. -// Parse following characters as a multiline comment: -if(c === '/' && cn === '*'){parseMLComment(css);} // If we meet `//` and it is not a part of url: -else if(!urlMode && c === '/' && cn === '/'){ // If we're currently inside a block, treat `//` as a start -// of identifier. Else treat `//` as a start of a single-line -// comment: -parseSLComment(css);} // If current character is a double or single quote, it's a start -// of a string: -else if(c === '"' || c === "'"){parseString(css,c);} // If current character is a space: -else if(c === ' '){parseSpaces(css);} // If current character is a punctuation mark: -else if(c in Punctuation){ // Add it to the list of tokens: -pushToken(Punctuation[c],c,col);if(c === '\n' || c === '\r'){ln++;col = 0;} // Go to next line -if(c === ')')urlMode = false; // Exit url mode -if(c === '{')blockMode++; // Enter a block -if(c === '}')blockMode--; // Exit a block -else if(c === '\t' && tabSize > 1)col += tabSize - 1;} // If current character is a decimal digit: -else if(isDecimalDigit(c)){parseDecimalNumber(css);} // If current character is anything else: -else {parseIdentifier(css);}}return tokens;}return getTokens(css);}; \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/node/basic-node.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/node/basic-node.js deleted file mode 100644 index dbd8150..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/node/basic-node.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; /** - * @param {string} type - * @param {array|string} content - * @param {number} line - * @param {number} column - * @constructor - */var _createClass=(function(){function defineProperties(target,props){for(var i=0;i < props.length;i++) {var descriptor=props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if('value' in descriptor)descriptor.writable = true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}var Node=(function(){function Node(options){_classCallCheck(this,Node);this.type = options.type;this.content = options.content;this.syntax = options.syntax;if(options.start)this.start = options.start;if(options.end)this.end = options.end;} /** - * @param {String} type Node type - * @return {Boolean} Whether there is a child node of given type - */Node.prototype.contains = function contains(type){return this.content.some(function(node){return node.type === type;});}; /** - * @param {String} type Node type - * @param {Function} callback Function to call for every found node - */Node.prototype.eachFor = function eachFor(type,callback){if(!Array.isArray(this.content))return;if(typeof type !== 'string'){callback = type;type = null;}var l=this.content.length;var breakLoop;for(var i=l;i--;) {if(breakLoop === null)break;if(!type || this.content[i] && this.content[i].type === type)breakLoop = callback(this.content[i],i,this);}if(breakLoop === null)return null;}; /** - * @param {String} type - * @return {?Node} First child node or `null` if nothing's been found. - */Node.prototype.first = function first(type){if(!Array.isArray(this.content))return null;if(!type)return this.content[0];var i=0;var l=this.content.length;for(;i < l;i++) {if(this.content[i].type === type)return this.content[i];}return null;}; /** - * @param {String} type Node type - * @param {Function} callback Function to call for every found node - */Node.prototype.forEach = function forEach(type,callback){if(!Array.isArray(this.content))return;if(typeof type !== 'string'){callback = type;type = null;}var i=0;var l=this.content.length;var breakLoop;for(;i < l;i++) {if(breakLoop === null)break;if(!type || this.content[i] && this.content[i].type === type)breakLoop = callback(this.content[i],i,this);}if(breakLoop === null)return null;}; /** - * @param {Number} index - * @return {?Node} - */Node.prototype.get = function get(index){if(!Array.isArray(this.content))return null;var node=this.content[index];return node?node:null;}; /** - * @param {Number} index - * @param {Node} node - */Node.prototype.insert = function insert(index,node){if(!Array.isArray(this.content))return;this.content.splice(index,0,node);}; /** - * @param {String} type - * @return {Boolean} Whether the node is of given type - */Node.prototype.is = function is(type){return this.type === type;}; /** - * @param {String} type - * @return {?Node} Last child node or `null` if nothing's been found. - */Node.prototype.last = function last(type){if(!Array.isArray(this.content))return null;var i=this.content.length - 1;if(!type)return this.content[i];for(;;i--) {if(this.content[i].type === type)return this.content[i];}return null;}; /** - * Number of child nodes. - * @type {number} - */ /** - * @param {Number} index - * @return {Node} - */Node.prototype.removeChild = function removeChild(index){if(!Array.isArray(this.content))return;var removedChild=this.content.splice(index,1);return removedChild;};Node.prototype.toJson = function toJson(){return JSON.stringify(this,false,2);};Node.prototype.toString = function toString(){var stringify=undefined;try{stringify = require('../' + this.syntax + '/stringify');}catch(e) {var message='Syntax "' + this.syntax + '" is not supported yet, sorry';return console.error(message);}return stringify(this);}; /** - * @param {Function} callback - */Node.prototype.traverse = function traverse(callback,index){var level=arguments.length <= 2 || arguments[2] === undefined?0:arguments[2];var parent=arguments.length <= 3 || arguments[3] === undefined?null:arguments[3];var breakLoop;var x;level++;callback(this,index,parent,level);if(!Array.isArray(this.content))return;for(var i=0,l=this.content.length;i < l;i++) {breakLoop = this.content[i].traverse(callback,i,level,this);if(breakLoop === null)break; // If some nodes were removed or added: -if(x = this.content.length - l){l += x;i += x;}}if(breakLoop === null)return null;};Node.prototype.traverseByType = function traverseByType(type,callback){this.traverse(function(node){if(node.type === type)callback.apply(node,arguments);});};Node.prototype.traverseByTypes = function traverseByTypes(types,callback){this.traverse(function(node){if(types.indexOf(node.type) !== -1)callback.apply(node,arguments);});};_createClass(Node,[{key:'length',get:function(){if(!Array.isArray(this.content))return 0;return this.content.length;}}]);return Node;})();module.exports = Node; \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/node/empty-node.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/node/empty-node.js deleted file mode 100644 index c59d34a..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/node/empty-node.js +++ /dev/null @@ -1 +0,0 @@ -'use strict';var Node=require('./basic-node');var NodeTypes=require('./node-types');module.exports = function(){return new Node({type:NodeTypes.StylesheetType,content:[],start:[0,0],end:[0,0]});}; \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/node/node-types.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/node/node-types.js deleted file mode 100644 index 4e21b99..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/node/node-types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict';module.exports = {ArgumentsType:'arguments',AtkeywordType:'atkeyword',AtruleType:'atrule',AttributeSelectorType:'attributeSelector',AttributeNameType:'attributeName',AttributeFlagsType:'attributeFlags',AttributeMatchType:'attributeMatch',AttributeValueType:'attributeValue',BlockType:'block',BracketsType:'brackets',ClassType:'class',CombinatorType:'combinator',CommentMLType:'multilineComment',CommentSLType:'singlelineComment',ConditionType:'condition',ConditionalStatementType:'conditionalStatement',DeclarationType:'declaration',DeclDelimType:'declarationDelimiter',DefaultType:'default',DelimType:'delimiter',DimensionType:'dimension',EscapedStringType:'escapedString',ExtendType:'extend',ExpressionType:'expression',FunctionType:'function',GlobalType:'global',IdentType:'ident',ImportantType:'important',IncludeType:'include',InterpolationType:'interpolation',InterpolatedVariableType:'interpolatedVariable',KeyframesSelectorType:'keyframesSelector',LoopType:'loop',MixinType:'mixin',NamePrefixType:'namePrefix',NamespacePrefixType:'namespacePrefix',NamespaceSeparatorType:'namespaceSeparator',NumberType:'number',OperatorType:'operator',OptionalType:'optional',ParenthesesType:'parentheses',ParentSelectorType:'parentSelector',ParentSelectorExtensionType:'parentSelectorExtension',PercentageType:'percentage',PlaceholderType:'placeholder',ProgidType:'progid',PropertyType:'property',PropertyDelimType:'propertyDelimiter',PseudocType:'pseudoClass',PseudoeType:'pseudoElement',RawType:'raw',RulesetType:'ruleset',SType:'space',SelectorType:'selector',ShashType:'id',StringType:'string',StylesheetType:'stylesheet',TypeSelectorType:'typeSelector',UriType:'uri',ValueType:'value',VariableType:'variable',VariablesListType:'variablesList',VhashType:'color'}; \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/parse.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/parse.js deleted file mode 100644 index 4db8136..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/parse.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict';var fs=require('fs');var ParsingError=require('./parsing-error');var isInteger=Number.isInteger || function(value){return typeof value === 'number' && Math.floor(value) === value;}; /** - * @param {String} css - * @param {Object} options - * @return {Object} AST - */function parser(css,options){if(typeof css !== 'string')throw new Error('Please, pass a string to parse');else if(!css)return require('./node/empty-node')();var syntax=options && options.syntax || 'css';var context=options && options.context || 'stylesheet';var tabSize=options && options.tabSize;if(!isInteger(tabSize) || tabSize < 1)tabSize = 1;if(!fs.existsSync(__dirname + '/' + syntax)){var message='Syntax "' + syntax + '" is not supported yet, sorry';return console.error(message);}var getTokens=require('./' + syntax + '/tokenizer');var mark=require('./' + syntax + '/mark');var parse=require('./' + syntax + '/parse');var tokens=getTokens(css,tabSize);mark(tokens);var ast;try{ast = parse(tokens,context);}catch(e) {if(!e.syntax)throw e;throw new ParsingError(e,css);}return ast;}module.exports = parser; \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/parsing-error.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/parsing-error.js deleted file mode 100644 index 9ea8ee0..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/parsing-error.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict';var parserPackage=require('../package.json'); /** - * @param {Error} e - * @param {String} css - */function ParsingError(e,css){this.line = e.line;this.syntax = e.syntax;this.css_ = css;}ParsingError.prototype = Object.defineProperties({ /** - * @type {String} - * @private - */customMessage_:'', /** - * @type {Number} - */line:null, /** - * @type {String} - */name:'Parsing error', /** - * @type {String} - */syntax:null, /** - * @type {String} - */version:parserPackage.version, /** - * @return {String} - */toString:function(){return [this.name + ': ' + this.message,'',this.context,'','Syntax: ' + this.syntax,'Gonzales PE version: ' + this.version].join('\n');}},{context:{ /** - * @type {String} - */get:function(){var LINES_AROUND=2;var result=[];var currentLineNumber=this.line;var start=currentLineNumber - 1 - LINES_AROUND;var end=currentLineNumber + LINES_AROUND;var lines=this.css_.split(/\r\n|\r|\n/);for(var i=start;i < end;i++) {var line=lines[i];if(!line)continue;var ln=i + 1;var mark=ln === currentLineNumber?'*':' ';result.push(ln + mark + '| ' + line);}return result.join('\n');},configurable:true,enumerable:true},message:{ /** - * @type {String} - */get:function(){if(this.customMessage_){return this.customMessage_;}else {var message='Please check validity of the block';if(typeof this.line === 'number')message += ' starting from line #' + this.line;return message;}},set:function(message){this.customMessage_ = message;},configurable:true,enumerable:true}});module.exports = ParsingError; \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/sass/mark.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/sass/mark.js deleted file mode 100644 index 498b375..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/sass/mark.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict';var TokenType=require('../token-types');module.exports = (function(){ /** - * Mark whitespaces and comments - */function markSC(tokens){var tokensLength=tokens.length;var ws=-1; // Flag for whitespaces -var sc=-1; // Flag for whitespaces and comments -var t=undefined; // Current token -// For every token in the token list, mark spaces and line breaks -// as spaces (set both `ws` and `sc` flags). Mark multiline comments -// with `sc` flag. -// If there are several spaces or tabs or line breaks or multiline -// comments in a row, group them: take the last one's index number -// and save it to the first token in the group as a reference: -// e.g., `ws_last = 7` for a group of whitespaces or `sc_last = 9` -// for a group of whitespaces and comments. -for(var i=0;i < tokensLength;i++) {t = tokens[i];switch(t.type){case TokenType.Space:case TokenType.Tab:t.ws = true;t.sc = true;if(ws === -1)ws = i;if(sc === -1)sc = i;break;case TokenType.Newline:t.ws = true;t.sc = true;ws = ws === -1?i:ws;sc = sc === -1?i:ws;tokens[ws].ws_last = i - 1;tokens[sc].sc_last = i - 1;tokens[i].ws_last = i;tokens[i].sc_last = i;ws = -1;sc = -1;break;case TokenType.CommentML:case TokenType.CommentSL:if(ws !== -1){tokens[ws].ws_last = i - 1;ws = -1;}t.sc = true;break;default:if(ws !== -1){tokens[ws].ws_last = i - 1;ws = -1;}if(sc !== -1){tokens[sc].sc_last = i - 1;sc = -1;}}}if(ws !== -1)tokens[ws].ws_last = i - 1;if(sc !== -1)tokens[sc].sc_last = i - 1;} /** - * Pair brackets - */function markBrackets(tokens){var tokensLength=tokens.length;var ps=[]; // Parentheses -var sbs=[]; // Square brackets -var cbs=[]; // Curly brackets -var t=undefined; // Current token -// For every token in the token list, if we meet an opening (left) -// bracket, push its index number to a corresponding array. -// If we then meet a closing (right) bracket, look at the corresponding -// array. If there are any elements (records about previously met -// left brackets), take a token of the last left bracket (take -// the last index number from the array and find a token with -// this index number) and save right bracket's index as a reference: -for(var i=0;i < tokensLength;i++) {t = tokens[i];switch(t.type){case TokenType.LeftParenthesis:ps.push(i);break;case TokenType.RightParenthesis:if(ps.length){t.left = ps.pop();tokens[t.left].right = i;}break;case TokenType.LeftSquareBracket:sbs.push(i);break;case TokenType.RightSquareBracket:if(sbs.length){t.left = sbs.pop();tokens[t.left].right = i;}break;case TokenType.LeftCurlyBracket:cbs.push(i);break;case TokenType.RightCurlyBracket:if(cbs.length){t.left = cbs.pop();tokens[t.left].right = i;}break;}}}function markBlocks(tokens){var blocks={};var currentIL=0;var i=0;var l=tokens.length;var iw=undefined;for(;i !== l;i++) {if(!tokens[i - 1])continue; // Skip all tokens on current line: -if(tokens[i].type !== TokenType.Newline)continue;var end=getBlockEnd(tokens,i + 1,currentIL,iw);if(!iw)iw = end.iw;if(end.indent && end.indent === currentIL)continue; // Not found nested block. -if(end.end !== null){markBlocksWithIndent(tokens,blocks,end);for(var z=end.end + 1;z < l;z++) {if(tokens[z].type === TokenType.Space || tokens[z].type === TokenType.Tab || tokens[z].type === TokenType.CommentSL || tokens[z].type === TokenType.CommentML)continue;if(tokens[z].type === TokenType.Newline)i = z;break;}}if(!blocks[end.indent])blocks[end.indent] = [];blocks[end.indent].push(i + 1);currentIL = end.indent;}markBlocksWithIndent(tokens,blocks,{end:i - 1,indent:0});}function getBlockEnd(tokens,i,indent,iw,maybeEnd){var spaces='';if(!maybeEnd)maybeEnd = i - 1;if(!tokens[i])return {end:maybeEnd,indent:0};for(var l=tokens.length;i < l;i++) {if(tokens[i].type === TokenType.Space || tokens[i].type === TokenType.Tab || tokens[i].type === TokenType.CommentML || tokens[i].type === TokenType.CommentSL || tokens[i].type === TokenType.Newline){spaces += tokens[i].value;continue;} // Got all spaces. -// Find trailing spaces. -var lastNewline=spaces.lastIndexOf('\n');spaces = spaces.slice(lastNewline + 1); // Mark previous node as block end. -if(!spaces)return {end:maybeEnd,indent:0};if(!iw)iw = spaces.length;var newIndent=spaces.length / iw;if(newIndent < indent)return {end:maybeEnd,indent:newIndent,iw:iw};if(newIndent === indent){ // Look for line end -for(;i < l;i++) {if(tokens[i].type !== TokenType.Newline)continue;var end=getBlockEnd(tokens,i + 1,indent,iw,maybeEnd);return {end:end.end,indent:indent,iw:iw};}return {end:i - 1,indent:newIndent,iw:iw};}else { // If newIndent > indent -return {end:null,indent:newIndent,iw:iw};}}return {end:i - 1};}function markBlocksWithIndent(tokens,blocks,end){for(var indent in blocks) {if(indent < end.indent + 1)continue;var block=blocks[indent];if(!block)continue;for(var x=0;x < block.length;x++) {var y=block[x];tokens[y].block_end = end.end;}blocks[indent] = null;}}return function(tokens){markBrackets(tokens);markSC(tokens);markBlocks(tokens);};})(); \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/sass/parse.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/sass/parse.js deleted file mode 100644 index 564d4ea..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/sass/parse.js +++ /dev/null @@ -1,696 +0,0 @@ -// jscs:disable maximumLineLength -'use strict';var Node=require('../node/basic-node');var NodeType=require('../node/node-types');var TokenType=require('../token-types');var tokens=undefined;var tokensLength=undefined;var pos=undefined;var contexts={'arguments':function(){return checkArguments(pos) && getArguments();},'atkeyword':function(){return checkAtkeyword(pos) && getAtkeyword();},'atrule':function(){return checkAtrule(pos) && getAtrule();},'block':function(){return checkBlock(pos) && getBlock();},'brackets':function(){return checkBrackets(pos) && getBrackets();},'class':function(){return checkClass(pos) && getClass();},'combinator':function(){return checkCombinator(pos) && getCombinator();},'commentML':function(){return checkCommentML(pos) && getCommentML();},'commentSL':function(){return checkCommentSL(pos) && getCommentSL();},'condition':function(){return checkCondition(pos) && getCondition();},'conditionalStatement':function(){return checkConditionalStatement(pos) && getConditionalStatement();},'declaration':function(){return checkDeclaration(pos) && getDeclaration();},'declDelim':function(){return checkDeclDelim(pos) && getDeclDelim();},'default':function(){return checkDefault(pos) && getDefault();},'delim':function(){return checkDelim(pos) && getDelim();},'dimension':function(){return checkDimension(pos) && getDimension();},'expression':function(){return checkExpression(pos) && getExpression();},'extend':function(){return checkExtend(pos) && getExtend();},'function':function(){return checkFunction(pos) && getFunction();},'global':function(){return checkGlobal(pos) && getGlobal();},'ident':function(){return checkIdent(pos) && getIdent();},'important':function(){return checkImportant(pos) && getImportant();},'include':function(){return checkInclude(pos) && getInclude();},'interpolation':function(){return checkInterpolation(pos) && getInterpolation();},'loop':function(){return checkLoop(pos) && getLoop();},'mixin':function(){return checkMixin(pos) && getMixin();},'namespace':function(){return checkNamespace(pos) && getNamespace();},'number':function(){return checkNumber(pos) && getNumber();},'operator':function(){return checkOperator(pos) && getOperator();},'optional':function(){return checkOptional(pos) && getOptional();},'parentheses':function(){return checkParentheses(pos) && getParentheses();},'parentselector':function(){return checkParentSelector(pos) && getParentSelector();},'percentage':function(){return checkPercentage(pos) && getPercentage();},'placeholder':function(){return checkPlaceholder(pos) && getPlaceholder();},'progid':function(){return checkProgid(pos) && getProgid();},'property':function(){return checkProperty(pos) && getProperty();},'propertyDelim':function(){return checkPropertyDelim(pos) && getPropertyDelim();},'pseudoc':function(){return checkPseudoc(pos) && getPseudoc();},'pseudoe':function(){return checkPseudoe(pos) && getPseudoe();},'ruleset':function(){return checkRuleset(pos) && getRuleset();},'s':function(){return checkS(pos) && getS();},'selector':function(){return checkSelector(pos) && getSelector();},'shash':function(){return checkShash(pos) && getShash();},'string':function(){return checkString(pos) && getString();},'stylesheet':function(){return checkStylesheet(pos) && getStylesheet();},'unary':function(){return checkUnary(pos) && getUnary();},'uri':function(){return checkUri(pos) && getUri();},'value':function(){return checkValue(pos) && getValue();},'variable':function(){return checkVariable(pos) && getVariable();},'variableslist':function(){return checkVariablesList(pos) && getVariablesList();},'vhash':function(){return checkVhash(pos) && getVhash();}}; /** - * Stop parsing and display error - * @param {Number=} i Token's index number - */function throwError(i){var ln=i?tokens[i].ln:tokens[pos].ln;throw {line:ln,syntax:'sass'};} /** - * @param {Object} exclude - * @param {Number} i Token's index number - * @returns {Number} - */function checkExcluding(exclude,i){var start=i;while(i < tokensLength) {if(exclude[tokens[i++].type])break;}return i - start - 2;} /** - * @param {Number} start - * @param {Number} finish - * @returns {String} - */function joinValues(start,finish){var s='';for(var i=start;i < finish + 1;i++) {s += tokens[i].value;}return s;} /** - * @param {Number} start - * @param {Number} num - * @returns {String} - */function joinValues2(start,num){if(start + num - 1 >= tokensLength)return;var s='';for(var i=0;i < num;i++) {s += tokens[start + i].value;}return s;}function getLastPosition(content,line,column,colOffset){return typeof content === 'string'?getLastPositionForString(content,line,column,colOffset):getLastPositionForArray(content,line,column,colOffset);}function getLastPositionForString(content,line,column,colOffset){var position=[];if(!content){position = [line,column];if(colOffset)position[1] += colOffset - 1;return position;}var lastLinebreak=content.lastIndexOf('\n');var endsWithLinebreak=lastLinebreak === content.length - 1;var splitContent=content.split('\n');var linebreaksCount=splitContent.length - 1;var prevLinebreak=linebreaksCount === 0 || linebreaksCount === 1?-1:content.length - splitContent[linebreaksCount - 1].length - 2; // Line: -var offset=endsWithLinebreak?linebreaksCount - 1:linebreaksCount;position[0] = line + offset; // Column: -if(endsWithLinebreak){offset = prevLinebreak !== -1?content.length - prevLinebreak:content.length - 1;}else {offset = linebreaksCount !== 0?content.length - lastLinebreak - column - 1:content.length - 1;}position[1] = column + offset;if(!colOffset)return position;if(endsWithLinebreak){position[0]++;position[1] = colOffset;}else {position[1] += colOffset;}return position;}function getLastPositionForArray(content,line,column,colOffset){var position;if(content.length === 0){position = [line,column];}else {var c=content[content.length - 1];if(c.hasOwnProperty('end')){position = [c.end.line,c.end.column];}else {position = getLastPosition(c.content,line,column);}}if(!colOffset)return position;if(tokens[pos - 1].type !== 'Newline'){position[1] += colOffset;}else {position[0]++;position[1] = 1;}return position;}function newNode(type,content,line,column,end){if(!end)end = getLastPosition(content,line,column);return new Node({type:type,content:content,start:{line:line,column:column},end:{line:end[0],column:end[1]},syntax:'sass'});} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkAny(i){var l;if(l = checkBrackets(i))tokens[i].any_child = 1;else if(l = checkParentheses(i))tokens[i].any_child = 2;else if(l = checkString(i))tokens[i].any_child = 3;else if(l = checkVariablesList(i))tokens[i].any_child = 4;else if(l = checkVariable(i))tokens[i].any_child = 5;else if(l = checkPlaceholder(i))tokens[i].any_child = 6;else if(l = checkPercentage(i))tokens[i].any_child = 7;else if(l = checkDimension(i))tokens[i].any_child = 8;else if(l = checkNumber(i))tokens[i].any_child = 9;else if(l = checkUri(i))tokens[i].any_child = 10;else if(l = checkExpression(i))tokens[i].any_child = 11;else if(l = checkFunction(i))tokens[i].any_child = 12;else if(l = checkInterpolation(i))tokens[i].any_child = 13;else if(l = checkIdent(i))tokens[i].any_child = 14;else if(l = checkClass(i))tokens[i].any_child = 15;else if(l = checkUnary(i))tokens[i].any_child = 16;return l;} /** - * @returns {Array} - */function getAny(){var childType=tokens[pos].any_child;if(childType === 1)return getBrackets();else if(childType === 2)return getParentheses();else if(childType === 3)return getString();else if(childType === 4)return getVariablesList();else if(childType === 5)return getVariable();else if(childType === 6)return getPlaceholder();else if(childType === 7)return getPercentage();else if(childType === 8)return getDimension();else if(childType === 9)return getNumber();else if(childType === 10)return getUri();else if(childType === 11)return getExpression();else if(childType === 12)return getFunction();else if(childType === 13)return getInterpolation();else if(childType === 14)return getIdent();else if(childType === 15)return getClass();else if(childType === 16)return getUnary();} /** - * Check if token is part of mixin's arguments. - * @param {Number} i Token's index number - * @returns {Number} Length of arguments - */function checkArguments(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;i++;while(i < tokens[start].right) {if(l = checkArgument(i))i += l;else return 0;}return tokens[start].right - start + 1;} /** - * Check if token is valid to be part of arguments list - * @param {Number} i Token's index number - * @returns {Number} Length of argument - */function checkArgument(i){var l;if(l = checkBrackets(i))tokens[i].argument_child = 1;else if(l = checkParentheses(i))tokens[i].argument_child = 2;else if(l = checkDeclaration(i))tokens[i].argument_child = 3;else if(l = checkFunction(i))tokens[i].argument_child = 4;else if(l = checkVariablesList(i))tokens[i].argument_child = 5;else if(l = checkVariable(i))tokens[i].argument_child = 6;else if(l = checkSC(i))tokens[i].argument_child = 7;else if(l = checkDelim(i))tokens[i].argument_child = 8;else if(l = checkDeclDelim(i))tokens[i].argument_child = 9;else if(l = checkString(i))tokens[i].argument_child = 10;else if(l = checkPercentage(i))tokens[i].argument_child = 11;else if(l = checkDimension(i))tokens[i].argument_child = 12;else if(l = checkNumber(i))tokens[i].argument_child = 13;else if(l = checkUri(i))tokens[i].argument_child = 14;else if(l = checkInterpolation(i))tokens[i].argument_child = 15;else if(l = checkIdent(i))tokens[i].argument_child = 16;else if(l = checkVhash(i))tokens[i].argument_child = 17;else if(l = checkOperator(i))tokens[i].argument_child = 18;else if(l = checkUnary(i))tokens[i].argument_child = 19;return l;} /** - * @returns {Array} Node that is part of arguments list - */function getArgument(){var childType=tokens[pos].argument_child;if(childType === 1)return getBrackets();else if(childType === 2)return getParentheses();else if(childType === 3)return getDeclaration();else if(childType === 4)return getFunction();else if(childType === 5)return getVariablesList();else if(childType === 6)return getVariable();else if(childType === 7)return getSC();else if(childType === 8)return getDelim();else if(childType === 9)return getDeclDelim();else if(childType === 10)return getString();else if(childType === 11)return getPercentage();else if(childType === 12)return getDimension();else if(childType === 13)return getNumber();else if(childType === 14)return getUri();else if(childType === 15)return getInterpolation();else if(childType === 16)return getIdent();else if(childType === 17)return getVhash();else if(childType === 18)return getOperator();else if(childType === 19)return getUnary();} /** - * Check if token is part of an @-word (e.g. `@import`, `@include`) - * @param {Number} i Token's index number - * @returns {Number} - */function checkAtkeyword(i){var l; // Check that token is `@`: -if(i >= tokensLength || tokens[i++].type !== TokenType.CommercialAt)return 0;return (l = checkIdentOrInterpolation(i))?l + 1:0;} /** - * Get node with @-word - * @returns {Array} `['atkeyword', ['ident', x]]` where `x` is - * an identifier without - * `@` (e.g. `import`, `include`) - */function getAtkeyword(){var startPos=pos++;var x=getIdentOrInterpolation();var token=tokens[startPos];return newNode(NodeType.AtkeywordType,x,token.ln,token.col);} /** - * Check if token is a part of an @-rule - * @param {Number} i Token's index number - * @returns {Number} Length of @-rule - */function checkAtrule(i){var l;if(i >= tokensLength)return 0; // If token already has a record of being part of an @-rule, -// return the @-rule's length: -if(tokens[i].atrule_l !== undefined)return tokens[i].atrule_l; // If token is part of an @-rule, save the rule's type to token: -if(l = checkKeyframesRule(i))tokens[i].atrule_type = 4;else if(l = checkAtruler(i))tokens[i].atrule_type = 1; // @-rule with ruleset -else if(l = checkAtruleb(i))tokens[i].atrule_type = 2; // Block @-rule -else if(l = checkAtrules(i))tokens[i].atrule_type = 3; // Single-line @-rule -else return 0; // If token is part of an @-rule, save the rule's length to token: -tokens[i].atrule_l = l;return l;} /** - * Get node with @-rule - * @returns {Array} - */function getAtrule(){switch(tokens[pos].atrule_type){case 1:return getAtruler(); // @-rule with ruleset -case 2:return getAtruleb(); // Block @-rule -case 3:return getAtrules(); // Single-line @-rule -case 4:return getKeyframesRule();}} /** - * Check if token is part of a block @-rule - * @param {Number} i Token's index number - * @returns {Number} Length of the @-rule - */function checkAtruleb(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(l = checkTsets(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** - * Get node with a block @-rule - * @returns {Array} `['atruleb', ['atkeyword', x], y, ['block', z]]` - */function getAtruleb(){var startPos=pos;var x=undefined;x = [getAtkeyword()].concat(getTsets()).concat([getBlock()]);var token=tokens[startPos];return newNode(NodeType.AtruleType,x,token.ln,token.col);} /** - * Check if token is part of an @-rule with ruleset - * @param {Number} i Token's index number - * @returns {Number} Length of the @-rule - */function checkAtruler(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(l = checkTsets(i))i += l;if(l = checkAtrulers(i))i += l;else return 0;return i - start;} /** - * Get node with an @-rule with ruleset - * @returns {Array} ['atruler', ['atkeyword', x], y, z] - */function getAtruler(){var startPos=pos;var x=undefined;x = [getAtkeyword()].concat(getTsets());x.push(getAtrulers());var token=tokens[startPos];return newNode(NodeType.AtruleType,x,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkAtrulers(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(!tokens[i].block_end)return 0;if(l = checkSC(i))i += l;if(l = checkRuleset(i) || checkAtrule(i))i += l;else return 0;while(l = checkRuleset(i) || checkAtrule(i) || checkSC(i)) {i += l;}if(i < tokensLength)tokens[i].atrulers_end = 1;return i - start;} /** - * @returns {Array} `['atrulers', x]` - */function getAtrulers(){var startPos=pos;var token=tokens[startPos];var line=token.ln;var column=token.col;var x=getSC();while(pos < tokensLength && !tokens[pos].atrulers_end) {if(checkSC(pos))x = x.concat(getSC());else if(checkAtrule(pos))x.push(getAtrule());else if(checkRuleset(pos))x.push(getRuleset());}var end=getLastPosition(x,line,column);return newNode(NodeType.BlockType,x,token.ln,token.col,end);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkAtrules(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(l = checkTsets(i))i += l;return i - start;} /** - * @returns {Array} `['atrules', ['atkeyword', x], y]` - */function getAtrules(){var startPos=pos;var x=undefined;x = [getAtkeyword()].concat(getTsets());var token=tokens[startPos];return newNode(NodeType.AtruleType,x,token.ln,token.col);} /** - * Check if token is part of a block (e.g. `{...}`). - * @param {Number} i Token's index number - * @returns {Number} Length of the block - */function checkBlock(i){return i < tokensLength && tokens[i].block_end?tokens[i].block_end - i + 1:0;} /** - * Get node with a block - * @returns {Array} `['block', x]` - */function getBlock(){var startPos=pos;var end=tokens[pos].block_end;var x=[];var token=tokens[startPos];while(pos < end) {if(checkBlockdecl(pos))x = x.concat(getBlockdecl());else throwError();}return newNode(NodeType.BlockType,x,token.ln,token.col);} /** - * Check if token is part of a declaration (property-value pair) - * @param {Number} i Token's index number - * @returns {Number} Length of the declaration - */function checkBlockdecl(i){var l;if(i >= tokensLength)return 0;if(l = checkBlockdecl7(i))tokens[i].bd_type = 7;else if(l = checkBlockdecl5(i))tokens[i].bd_type = 5;else if(l = checkBlockdecl6(i))tokens[i].bd_type = 6;else if(l = checkBlockdecl1(i))tokens[i].bd_type = 1;else if(l = checkBlockdecl2(i))tokens[i].bd_type = 2;else if(l = checkBlockdecl3(i))tokens[i].bd_type = 3;else if(l = checkBlockdecl4(i))tokens[i].bd_type = 4;else return 0;return l;} /** - * @returns {Array} - */function getBlockdecl(){switch(tokens[pos].bd_type){case 1:return getBlockdecl1();case 2:return getBlockdecl2();case 3:return getBlockdecl3();case 4:return getBlockdecl4();case 5:return getBlockdecl5();case 6:return getBlockdecl6();case 7:return getBlockdecl7();}} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkBlockdecl1(i){var start=i;var l=undefined;if(l = checkInclude(i))tokens[i].bd_kind = 2;else if(l = checkDeclaration(i))tokens[i].bd_kind = 5;else if(l = checkAtrule(i))tokens[i].bd_kind = 6;else return 0;i += l;if(tokens[start].bd_kind === 2 && [2,4,6,8].indexOf(tokens[start].include_type) === -1)return 0;if(tokens[start].bd_kind === 6 && tokens[start].atrule_type === 3)return 0;while(i < tokensLength) {if(l = checkDeclDelim(i))return i + l - start;if(l = checkS(i))i += l;else if(l = checkCommentSL(i))i += l;else break;}return 0;} /** - * @returns {Array} - */function getBlockdecl1(){var x=[];var _x=[];var kind=tokens[pos].bd_kind;switch(kind){case 2:x.push(getInclude());break;case 5:x.push(getDeclaration());break;case 6:x.push(getAtrule());break;}while(pos < tokensLength) {var _pos=pos;if(checkDeclDelim(pos)){_x.push(getDeclDelim());x = x.concat(_x);break;}if(checkS(pos))_x.push(getS());else if(checkCommentSL(pos))_x.push(getCommentSL());else {pos = _pos;break;}}return x;} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkBlockdecl2(i){var start=i;var l=undefined;if(l = checkConditionalStatement(i))tokens[i].bd_kind = 1;else if(l = checkInclude(i))tokens[i].bd_kind = 2;else if(l = checkExtend(i))tokens[i].bd_kind = 4;else if(l = checkLoop(i))tokens[i].bd_kind = 3;else if(l = checkRuleset(i))tokens[i].bd_kind = 7;else if(l = checkDeclaration(i))tokens[i].bd_kind = 5;else if(l = checkAtrule(i))tokens[i].bd_kind = 6;else return 0;i += l;while(i < tokensLength) {if(l = checkS(i))i += l;else if(l = checkCommentSL(i))i += l;else break;}return i - start;} /** - * @returns {Array} - */function getBlockdecl2(){var x=[];switch(tokens[pos].bd_kind){case 1:x.push(getConditionalStatement());break;case 2:x.push(getInclude());break;case 3:x.push(getLoop());break;case 4:x.push(getExtend());break;case 5:x.push(getDeclaration());break;case 6:x.push(getAtrule());break;case 7:x.push(getRuleset());break;}while(pos < tokensLength) {if(checkS(pos))x.push(getS());else if(checkCommentSL(pos))x.push(getCommentSL());else break;}return x;} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkBlockdecl3(i){var start=i;var l=undefined;if(l = checkConditionalStatement(i))tokens[i].bd_kind = 1;else if(l = checkInclude(i))tokens[i].bd_kind = 2;else if(l = checkExtend(i))tokens[i].bd_kind = 4;else if(l = checkLoop(i))tokens[i].bd_kind = 3;else if(l = checkRuleset(i))tokens[i].bd_kind = 7;else if(l = checkDeclaration(i))tokens[i].bd_kind = 5;else if(l = checkAtrule(i))tokens[i].bd_kind = 6;else return 0;i += l;return i - start;} /** - * @returns {Array} - */function getBlockdecl3(){var x=undefined;switch(tokens[pos].bd_kind){case 1:x = getConditionalStatement();break;case 2:x = getInclude();break;case 3:x = getLoop();break;case 4:x = getExtend();break;case 5:x = getDeclaration();break;case 6:x = getAtrule();break;case 7:x = getRuleset();break;}return [x];} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkBlockdecl4(i){return checkSC(i);} /** - * @returns {Array} - */function getBlockdecl4(){return getSC();} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkBlockdecl5(i){var start=i;var l=undefined;if(l = checkInclude(i))i += l;else if(l = checkRuleset(i))i += l;else return 0;while(i < tokensLength) {if(l = checkS(i))i += l;else if(l = checkCommentSL(i))i += l;else break;}return i - start;} /** - * @returns {Array} - */function getBlockdecl5(){var x=[];if(checkInclude(pos))x.push(getInclude());else x.push(getRuleset());while(pos < tokensLength) {if(checkS(pos))x.push(getS());else if(checkCommentSL(pos))x.push(getCommentSL());else break;}return x;} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkBlockdecl6(i){var start=i;var l=undefined;if(l = checkInclude(i))i += l;else if(l = checkRuleset(i))i += l;else return 0;return i - start;} /** - * @returns {Array} - */function getBlockdecl6(){var x=undefined;if(checkInclude(pos))x = getInclude();else x = getRuleset();return [x];} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkBlockdecl7(i){var start=i;var l=undefined;if(l = checkInclude(i))i += l;else return 0;if([2,4,6,8].indexOf(tokens[start].include_type) === -1)return 0;while(i < tokensLength) {if(l = checkDeclDelim(i))return i + l - start;if(l = checkS(i))i += l;else if(l = checkCommentSL(i))i += l;else break;}return 0;} /** - * @returns {Array} - */function getBlockdecl7(){var x=[];var _x=[];x.push(getInclude());while(pos < tokensLength) {var _pos=pos;if(checkDeclDelim(pos)){_x.push(getDeclDelim());x = x.concat(_x);break;}if(checkS(pos))_x.push(getS());else if(checkCommentSL(pos))_x.push(getCommentSL());else {pos = _pos;break;}}return x;} /** - * Check if token is part of text inside square brackets, e.g. `[1]` - * @param {Number} i Token's index number - * @returns {Number} - */function checkBrackets(i){if(i >= tokensLength || tokens[i].type !== TokenType.LeftSquareBracket)return 0;return tokens[i].right - i + 1;} /** - * Get node with text inside square brackets, e.g. `[1]` - * @returns {Node} - */function getBrackets(){var startPos=pos;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;var tsets=getTsets();var end=getLastPosition(tsets,line,column,1);pos++;return newNode(NodeType.BracketsType,tsets,token.ln,token.col,end);} /** - * Check if token is part of a class selector (e.g. `.abc`) - * @param {Number} i Token's index number - * @returns {Number} Length of the class selector - */function checkClass(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(tokens[i].class_l)return tokens[i].class_l;if(tokens[i++].type !== TokenType.FullStop)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;} /** - * Get node with a class selector - * @returns {Array} `['class', ['ident', x]]` where x is a class's - * identifier (without `.`, e.g. `abc`). - */function getClass(){var startPos=pos++;var x=getIdentOrInterpolation();var token=tokens[startPos];return newNode(NodeType.ClassType,x,token.ln,token.col);}function checkCombinator(i){if(i >= tokensLength)return 0;var l=undefined;if(l = checkCombinator1(i))tokens[i].combinatorType = 1;else if(l = checkCombinator2(i))tokens[i].combinatorType = 2;else if(l = checkCombinator3(i))tokens[i].combinatorType = 3;return l;}function getCombinator(){var type=tokens[pos].combinatorType;if(type === 1)return getCombinator1();if(type === 2)return getCombinator2();if(type === 3)return getCombinator3();} /** - * (1) `||` - */function checkCombinator1(i){if(tokens[i].type === TokenType.VerticalLine && tokens[i + 1].type === TokenType.VerticalLine)return 2;else return 0;}function getCombinator1(){var type=NodeType.CombinatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='||';pos += 2;return newNode(type,content,line,column);} /** - * (1) `>` - * (2) `+` - * (3) `~` - */function checkCombinator2(i){var type=tokens[i].type;if(type === TokenType.PlusSign || type === TokenType.GreaterThanSign || type === TokenType.Tilde)return 1;else return 0;}function getCombinator2(){var type=NodeType.CombinatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=tokens[pos++].value;return newNode(type,content,line,column);} /** - * (1) `/panda/` - */function checkCombinator3(i){var start=i;if(tokens[i].type === TokenType.Solidus)i++;else return 0;var l=undefined;if(l = checkIdent(i))i += l;else return 0;if(tokens[i].type === TokenType.Solidus)i++;else return 0;return i - start;}function getCombinator3(){var type=NodeType.CombinatorType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `/`. -pos++;var ident=getIdent(); // Skip `/`. -pos++;var content='/' + ident.content + '/';return newNode(type,content,line,column);} /** - * Check if token is a multiline comment. - * @param {Number} i Token's index number - * @returns {Number} `1` if token is a multiline comment, otherwise `0` - */function checkCommentML(i){return i < tokensLength && tokens[i].type === TokenType.CommentML?1:0;} /** - * Get node with a multiline comment - * @returns {Array} `['commentML', x]` where `x` - * is the comment's text (without `/*` and `* /`). - */function getCommentML(){var startPos=pos;var x=tokens[pos].value.substring(2);var token=tokens[startPos];var line=token.ln;var column=token.col;var end=getLastPosition(x,line,column + 2);pos++;return newNode(NodeType.CommentMLType,x,token.ln,token.col,end);} /** - * Check if token is part of a single-line comment. - * @param {Number} i Token's index number - * @returns {Number} `1` if token is a single-line comment, otherwise `0` - */function checkCommentSL(i){return i < tokensLength && tokens[i].type === TokenType.CommentSL?1:0;} /** - * Get node with a single-line comment. - * @returns {Array} `['commentSL', x]` where `x` is comment's message - * (without `//`) - */function getCommentSL(){var startPos=pos;var token=tokens[startPos];var line=token.ln;var column=token.col;var x=tokens[pos++].value.substring(2);var end=!x?[line,column + 1]:getLastPosition(x,line,column + 2);return newNode(NodeType.CommentSLType,x,token.ln,token.col,end);} /** - * Check if token is part of a condition - * (e.g. `@if ...`, `@else if ...` or `@else ...`). - * @param {Number} i Token's index number - * @returns {Number} Length of the condition - */function checkCondition(i){var start=i;var l=undefined;var _i=undefined;var s=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(['if','else'].indexOf(tokens[start + 1].value) < 0)return 0;while(i < tokensLength) {if(l = checkBlock(i))break;s = checkSC(i);_i = i + s;if(l = _checkCondition(_i))i += l + s;else break;}return i - start;}function _checkCondition(i){return checkVariable(i) || checkNumber(i) || checkInterpolation(i) || checkIdent(i) || checkOperator(i) || checkCombinator(i) || checkString(i);} /** - * Get node with a condition. - * @returns {Array} `['condition', x]` - */function getCondition(){var startPos=pos;var x=[getAtkeyword()];while(pos < tokensLength) {if(checkBlock(pos))break;var s=checkSC(pos);var _pos=pos + s;if(!_checkCondition(_pos))break;if(s)x = x.concat(getSC());x.push(_getCondition());}var token=tokens[startPos];return newNode(NodeType.ConditionType,x,token.ln,token.col);}function _getCondition(){if(checkVariable(pos))return getVariable();if(checkNumber(pos))return getNumber();if(checkInterpolation(pos))return getInterpolation();if(checkIdent(pos))return getIdent();if(checkOperator(pos))return getOperator();if(checkCombinator(pos))return getCombinator();if(checkString(pos))return getString();} /** - * Check if token is part of a conditional statement - * (e.g. `@if ... {} @else if ... {} @else ... {}`). - * @param {Number} i Token's index number - * @returns {Number} Length of the condition - */function checkConditionalStatement(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkCondition(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** - * Get node with a condition. - * @returns {Array} `['condition', x]` - */function getConditionalStatement(){var startPos=pos;var x=[];x.push(getCondition());x = x.concat(getSC());x.push(getBlock());var token=tokens[startPos];return newNode(NodeType.ConditionalStatementType,x,token.ln,token.col);} /** - * Check if token is part of a declaration (property-value pair) - * @param {Number} i Token's index number - * @returns {Number} Length of the declaration - */function checkDeclaration(i){return checkDeclaration1(i) || checkDeclaration2(i);} /** - * Get node with a declaration - * @returns {Array} `['declaration', ['property', x], ['propertyDelim'], - * ['value', y]]` - */function getDeclaration(){return checkDeclaration1(pos)?getDeclaration1():getDeclaration2();} /** - * Check if token is part of a declaration (property-value pair) - * @param {Number} i Token's index number - * @returns {Number} Length of the declaration - */function checkDeclaration1(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkProperty(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkPropertyDelim(i))i++;else return 0;if(l = checkValue(i))return i + l - start;if(l = checkS(i))i += l;if(l = checkValue(i))i += l;else return 0;return i - start;} /** - * Get node with a declaration - * @returns {Array} `['declaration', ['property', x], ['propertyDelim'], - * ['value', y]]` - */function getDeclaration1(){var startPos=pos;var x=[];x.push(getProperty());if(checkS(pos))x.push(getS());x.push(getPropertyDelim());if(checkS(pos))x.push(getS());x.push(getValue());var token=tokens[startPos];return newNode(NodeType.DeclarationType,x,token.ln,token.col);} /** - * Check if token is part of a declaration (property-value pair) - * @param {Number} i Token's index number - * @returns {Number} Length of the declaration - */function checkDeclaration2(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkPropertyDelim(i))i++;else return 0;if(l = checkProperty(i))i += l;else return 0;if(l = checkValue(i))return i + l - start;if(l = checkSC(i))i += l;if(l = checkValue(i))i += l;else return 0;return i - start;} /** - * Get node with a declaration - * @returns {Array} `['declaration', ['propertyDelim'], ['property', x], - * ['value', y]]` - */function getDeclaration2(){var startPos=pos;var x=[];x.push(getPropertyDelim());x.push(getProperty());x = x.concat(getSC());x.push(getValue());var token=tokens[startPos];return newNode(NodeType.DeclarationType,x,token.ln,token.col);} /** - * Check if token is a semicolon - * @param {Number} i Token's index number - * @returns {Number} `1` if token is a semicolon, otherwise `0` - */function checkDeclDelim(i){if(i >= tokensLength)return 0;return tokens[i].type === TokenType.Newline || tokens[i].type === TokenType.Semicolon?1:0;} /** - * Get node with a semicolon - * @returns {Array} `['declDelim']` - */function getDeclDelim(){var startPos=pos++;var token=tokens[startPos];return newNode(NodeType.DeclDelimType,'\n',token.ln,token.col);} /** - * Check if token if part of `!default` word. - * @param {Number} i Token's index number - * @returns {Number} Length of the `!default` word - */function checkDefault(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark)return 0;if(l = checkSC(i))i += l;if(tokens[i].value === 'default'){tokens[start].defaultEnd = i;return i - start + 1;}else {return 0;}} /** - * Get node with a `!default` word - * @returns {Array} `['default', sc]` where `sc` is optional whitespace - */function getDefault(){var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,token.defaultEnd);pos = token.defaultEnd + 1;return newNode(NodeType.DefaultType,content,line,column);} /** - * Check if token is a comma - * @param {Number} i Token's index number - * @returns {Number} `1` if token is a comma, otherwise `0` - */function checkDelim(i){return i < tokensLength && tokens[i].type === TokenType.Comma?1:0;} /** - * Get node with a comma - * @returns {Array} `['delim']` - */function getDelim(){var startPos=pos++;var token=tokens[startPos];return newNode(NodeType.DelimType,',',token.ln,token.col);} /** - * Check if token is part of a number with dimension unit (e.g. `10px`) - * @param {Number} i Token's index number - * @returns {Number} - */function checkDimension(i){var ln=checkNumber(i);var li=undefined;if(i >= tokensLength || !ln || i + ln >= tokensLength)return 0;return (li = checkNmName2(i + ln))?ln + li:0;} /** - * Get node of a number with dimension unit - * @returns {Array} `['dimension', ['number', x], ['ident', y]]` where - * `x` is a number converted to string (e.g. `'10'`) and `y` is - * a dimension unit (e.g. `'px'`). - */function getDimension(){var startPos=pos;var x=[getNumber()];var token=tokens[pos];var ident=newNode(NodeType.IdentType,getNmName2(),token.ln,token.col);x.push(ident);token = tokens[startPos];return newNode(NodeType.DimensionType,x,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkExpression(i){var start=i;if(i >= tokensLength || tokens[i++].value !== 'expression' || i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;return tokens[i].right - start + 1;} /** - * @returns {Array} - */function getExpression(){var startPos=pos;var x=undefined;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;x = joinValues(pos + 1,tokens[pos].right - 1);var end=getLastPosition(x,line,column,1);if(end[0] === line)end[1] += 11;pos = tokens[pos].right + 1;return newNode(NodeType.ExpressionType,x,token.ln,token.col,end);}function checkExtend(i){var l=0;if(l = checkExtend1(i))tokens[i].extend_child = 1;else if(l = checkExtend2(i))tokens[i].extend_child = 2;return l;}function getExtend(){var type=tokens[pos].extend_child;if(type === 1)return getExtend1();else if(type === 2)return getExtend2();} /** - * Checks if token is part of an extend with `!optional` flag. - * @param {Number} i - */function checkExtend1(i){var start=i;var l;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'extend')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkSelectorsGroup(i))i += l;else return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkOptional(i))i += l;else return 0;return i - start;}function getExtend1(){var startPos=pos;var x=[].concat([getAtkeyword()],getSC(),getSelectorsGroup(),getSC(),getOptional());var token=tokens[startPos];return newNode(NodeType.ExtendType,x,token.ln,token.col);} /** - * Checks if token is part of an extend without `!optional` flag. - * @param {Number} i - */function checkExtend2(i){var start=i;var l;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'extend')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkSelectorsGroup(i))i += l;else return 0;return i - start;}function getExtend2(){var startPos=pos;var x=[].concat([getAtkeyword()],getSC(),getSelectorsGroup());var token=tokens[startPos];return newNode(NodeType.ExtendType,x,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkFunction(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i < tokensLength && tokens[i].type === TokenType.LeftParenthesis?tokens[i].right - start + 1:0;} /** - * @returns {Array} - */function getFunction(){var startPos=pos;var x=getIdentOrInterpolation();var body=undefined;body = getArguments();x.push(body);var token=tokens[startPos];return newNode(NodeType.FunctionType,x,token.ln,token.col);} /** - * @returns {Array} - */function getArguments(){var startPos=pos;var x=[];var body=undefined;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;while(pos < tokensLength && tokens[pos].type !== TokenType.RightParenthesis) {if(checkDeclaration(pos))x.push(getDeclaration());else if(checkArgument(pos)){body = getArgument();if(typeof body.content === 'string')x.push(body);else x = x.concat(body);}else if(checkClass(pos))x.push(getClass());else throwError();}var end=getLastPosition(x,line,column,1);pos++;return newNode(NodeType.ArgumentsType,x,token.ln,token.col,end);} /** - * Check if token is part of `!global` word - * @param {Number} i Token's index number - * @returns {Number} - */function checkGlobal(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark)return 0;if(l = checkSC(i))i += l;if(tokens[i].value === 'global'){tokens[start].globalEnd = i;return i - start + 1;}else {return 0;}} /** - * Get node with `!global` word - */function getGlobal(){var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,token.globalEnd);pos = token.globalEnd + 1;return newNode(NodeType.GlobalType,content,line,column);} /** - * Check if token is part of an identifier - * @param {Number} i Token's index number - * @returns {Number} Length of the identifier - */function checkIdent(i){var start=i;var wasIdent=undefined;var wasInt=false;var l=undefined;if(i >= tokensLength)return 0; // Check if token is part of an identifier starting with `_`: -if(tokens[i].type === TokenType.LowLine)return checkIdentLowLine(i);if(tokens[i].type === TokenType.HyphenMinus && tokens[i + 1].type === TokenType.DecimalNumber)return 0; // If token is a character, `-`, `$` or `*`, skip it & continue: -if(l = _checkIdent(i))i += l;else return 0; // Remember if previous token's type was identifier: -wasIdent = tokens[i - 1].type === TokenType.Identifier;while(i < tokensLength) {l = _checkIdent(i);if(!l)break;wasIdent = true;i += l;}if(!wasIdent && !wasInt && tokens[start].type !== TokenType.Asterisk)return 0;tokens[start].ident_last = i - 1;return i - start;}function _checkIdent(i){if(tokens[i].type === TokenType.HyphenMinus || tokens[i].type === TokenType.Identifier || tokens[i].type === TokenType.DollarSign || tokens[i].type === TokenType.LowLine || tokens[i].type === TokenType.DecimalNumber || tokens[i].type === TokenType.Asterisk)return 1;return 0;} /** - * Check if token is part of an identifier starting with `_` - * @param {Number} i Token's index number - * @returns {Number} Length of the identifier - */function checkIdentLowLine(i){var start=i;if(i++ >= tokensLength)return 0;for(;i < tokensLength;i++) {if(tokens[i].type !== TokenType.HyphenMinus && tokens[i].type !== TokenType.DecimalNumber && tokens[i].type !== TokenType.LowLine && tokens[i].type !== TokenType.Identifier)break;} // Save index number of the last token of the identifier: -tokens[start].ident_last = i - 1;return i - start;} /** - * Get node with an identifier - * @returns {Array} `['ident', x]` where `x` is identifier's name - */function getIdent(){var startPos=pos;var x=joinValues(pos,tokens[pos].ident_last);pos = tokens[pos].ident_last + 1;var token=tokens[startPos];return newNode(NodeType.IdentType,x,token.ln,token.col);}function checkIdentOrInterpolation(i){var start=i;var l=undefined;while(i < tokensLength) {if(l = checkInterpolation(i) || checkIdent(i))i += l;else break;}return i - start;}function getIdentOrInterpolation(){var x=[];while(pos < tokensLength) {if(checkInterpolation(pos))x.push(getInterpolation());else if(checkIdent(pos))x.push(getIdent());else break;}return x;} /** - * Check if token is part of `!important` word - * @param {Number} i Token's index number - * @returns {Number} - */function checkImportant(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark)return 0;if(l = checkSC(i))i += l;if(tokens[i].value === 'important'){tokens[start].importantEnd = i;return i - start + 1;}else {return 0;}} /** - * Get node with `!important` word - * @returns {Array} `['important', sc]` where `sc` is optional whitespace - */function getImportant(){var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,token.importantEnd);pos = token.importantEnd + 1;return newNode(NodeType.ImportantType,content,line,column);} /** - * Check if token is part of an included mixin (`@include` or `@extend` - * directive). - * @param {Number} i Token's index number - * @returns {Number} Length of the included mixin - */function checkInclude(i){var l;if(i >= tokensLength)return 0;if(l = checkInclude1(i))tokens[i].include_type = 1;else if(l = checkInclude2(i))tokens[i].include_type = 2;else if(l = checkInclude3(i))tokens[i].include_type = 3;else if(l = checkInclude4(i))tokens[i].include_type = 4;else if(l = checkInclude5(i))tokens[i].include_type = 5;else if(l = checkInclude6(i))tokens[i].include_type = 6;else if(l = checkInclude7(i))tokens[i].include_type = 7;else if(l = checkInclude8(i))tokens[i].include_type = 8;return l;} /** - * Get node with included mixin - * @returns {Array} `['include', x]` - */function getInclude(){switch(tokens[pos].include_type){case 1:return getInclude1();case 2:return getInclude2();case 3:return getInclude3();case 4:return getInclude4();case 5:return getInclude5();case 6:return getInclude6();case 7:return getInclude7();case 8:return getInclude8();}} /** - * Check if token is part of an included mixin like `@include nani(foo) {...}` - * @param {Number} i Token's index number - * @returns {Number} Length of the include - */function checkInclude1(i){var start=i;var l=undefined;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'include')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkArguments(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** - * Get node with included mixin like `@include nani(foo) {...}` - * @returns {Array} `['include', ['atkeyword', x], sc, ['selector', y], sc, - * ['arguments', z], sc, ['block', q], sc` where `x` is `include` or - * `extend`, `y` is mixin's identifier (selector), `z` are arguments - * passed to the mixin, `q` is block passed to the mixin and `sc` - * are optional whitespaces - */function getInclude1(){var startPos=pos;var x=[].concat(getAtkeyword(),getSC(),getIdentOrInterpolation(),getSC(),getArguments(),getSC(),getBlock());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** - * Check if token is part of an included mixin like `@include nani(foo)` - * @param {Number} i Token's index number - * @returns {Number} Length of the include - */function checkInclude2(i){var start=i;var l=undefined;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'include')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkArguments(i))i += l;else return 0;return i - start;} /** - * Get node with included mixin like `@include nani(foo)` - * @returns {Array} `['include', ['atkeyword', x], sc, ['selector', y], sc, - * ['arguments', z], sc]` where `x` is `include` or `extend`, `y` is - * mixin's identifier (selector), `z` are arguments passed to the - * mixin and `sc` are optional whitespaces - */function getInclude2(){var startPos=pos;var x=[].concat(getAtkeyword(),getSC(),getIdentOrInterpolation(),getSC(),getArguments());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** - * Check if token is part of an included mixin with a content block passed - * as an argument (e.g. `@include nani {...}`) - * @param {Number} i Token's index number - * @returns {Number} Length of the mixin - */function checkInclude3(i){var start=i;var l=undefined;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'include')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** - * Get node with an included mixin with a content block passed - * as an argument (e.g. `@include nani {...}`) - * @returns {Array} `['include', x]` - */function getInclude3(){var startPos=pos;var x=[].concat(getAtkeyword(),getSC(),getIdentOrInterpolation(),getSC(),getBlock());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkInclude4(i){var start=i;var l=undefined;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'include')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;} /** - * @returns {Array} `['include', x]` - */function getInclude4(){var startPos=pos;var x=[].concat(getAtkeyword(),getSC(),getIdentOrInterpolation());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** - * Check if token is part of an included mixin like `+nani(foo) {...}` - * @param {Number} i Token's index number - * @returns {Number} Length of the include - */function checkInclude5(i){var start=i;var l=undefined;if(tokens[i].type === TokenType.PlusSign)i++;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkArguments(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** - * Get node with included mixin like `+nani(foo) {...}` - * @returns {Array} `['include', ['operator', '+'], ['selector', x], sc, - * ['arguments', y], sc, ['block', z], sc` where `x` is - * mixin's identifier (selector), `y` are arguments passed to the - * mixin, `z` is block passed to mixin and `sc` are optional whitespaces - */function getInclude5(){var startPos=pos;var x=[].concat(getOperator(),getIdentOrInterpolation(),getSC(),getArguments(),getSC(),getBlock());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** - * Check if token is part of an included mixin like `+nani(foo)` - * @param {Number} i Token's index number - * @returns {Number} Length of the include - */function checkInclude6(i){var start=i;var l=undefined;if(tokens[i].type === TokenType.PlusSign)i++;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkArguments(i))i += l;else return 0;return i - start;} /** - * Get node with included mixin like `+nani(foo)` - * @returns {Array} `['include', ['operator', '+'], ['selector', y], sc, - * ['arguments', z], sc]` where `y` is - * mixin's identifier (selector), `z` are arguments passed to the - * mixin and `sc` are optional whitespaces - */function getInclude6(){var startPos=pos;var x=[].concat(getOperator(),getIdentOrInterpolation(),getSC(),getArguments());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** - * Check if token is part of an included mixin with a content block passed - * as an argument (e.g. `+nani {...}`) - * @param {Number} i Token's index number - * @returns {Number} Length of the mixin - */function checkInclude7(i){var start=i;var l=undefined;if(tokens[i].type === TokenType.PlusSign)i++;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** - * Get node with an included mixin with a content block passed - * as an argument (e.g. `+nani {...}`) - * @returns {Array} `['include', x]` - */function getInclude7(){var startPos=pos;var x=[].concat(getOperator(),getIdentOrInterpolation(),getSC(),getBlock());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkInclude8(i){var start=i;var l=undefined;if(tokens[i].type === TokenType.PlusSign)i++;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;} /** - * @returns {Array} `['include', x]` - */function getInclude8(){var startPos=pos;var x=[].concat(getOperator(),getIdentOrInterpolation());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** - * Check if token is part of an interpolated variable (e.g. `#{$nani}`). - * @param {Number} i Token's index number - * @returns {Number} - */function checkInterpolation(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.NumberSign || !tokens[i + 1] || tokens[i + 1].type !== TokenType.LeftCurlyBracket)return 0;i += 2;while(tokens[i].type !== TokenType.RightCurlyBracket) {if(l = checkArgument(i))i += l;else return 0;}return tokens[i].type === TokenType.RightCurlyBracket?i - start + 1:0;} /** - * Get node with an interpolated variable - * @returns {Array} `['interpolation', x]` - */function getInterpolation(){var startPos=pos;var x=[];var token=tokens[startPos];var line=token.ln;var column=token.col; // Skip `#{`: -pos += 2;while(pos < tokensLength && tokens[pos].type !== TokenType.RightCurlyBracket) {var body=getArgument();if(typeof body.content === 'string')x.push(body);else x = x.concat(body);}var end=getLastPosition(x,line,column,1); // Skip `}`: -pos++;return newNode(NodeType.InterpolationType,x,token.ln,token.col,end);}function checkKeyframesBlock(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkKeyframesSelector(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;}function getKeyframesBlock(){var type=NodeType.RulesetType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[].concat([getKeyframesSelector()],getSC(),[getBlock()]);return newNode(type,content,line,column);}function checkKeyframesBlocks(i){return i < tokensLength && tokens[i].block_end?tokens[i].block_end - i + 1:0;}function getKeyframesBlocks(){var type=NodeType.BlockType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];var keyframesBlocksEnd=token.block_end;while(pos < keyframesBlocksEnd) {if(checkSC(pos))content = content.concat(getSC());else if(checkKeyframesBlock(pos))content.push(getKeyframesBlock());}return newNode(type,content,line,column);} /** - * Check if token is part of a @keyframes rule. - * @param {Number} i Token's index number - * @return {Number} Length of the @keyframes rule - */function checkKeyframesRule(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;var atruleName=joinValues2(i - l,l);if(atruleName.indexOf('keyframes') === -1)return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkKeyframesBlocks(i))i += l;else return 0;return i - start;} /** - * @return {Node} - */function getKeyframesRule(){var type=NodeType.AtruleType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[].concat([getAtkeyword()],getSC(),getIdentOrInterpolation(),getSC(),[getKeyframesBlocks()]);return newNode(type,content,line,column);}function checkKeyframesSelector(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkIdent(i)){ // Valid selectors are only `from` and `to`. -var selector=joinValues2(i,l);if(selector !== 'from' && selector !== 'to')return 0;i += l;tokens[start].keyframesSelectorType = 1;}else if(l = checkPercentage(i)){i += l;tokens[start].keyframesSelectorType = 2;}else if(l = checkInterpolation(i)){i += l;tokens[start].keyframesSelectorType = 3;}else {return 0;}return i - start;}function getKeyframesSelector(){var keyframesSelectorType=NodeType.KeyframesSelectorType;var selectorType=NodeType.SelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(token.keyframesSelectorType === 1){content.push(getIdent());}else if(token.keyframesSelectorType === 2){content.push(getPercentage());}else {content.push(getInterpolation());}var keyframesSelector=newNode(keyframesSelectorType,content,line,column);return newNode(selectorType,[keyframesSelector],line,column);} /** - * Check if token is part of a loop. - * @param {Number} i Token's index number - * @returns {Number} Length of the loop - */function checkLoop(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(['for','each','while'].indexOf(tokens[start + 1].value) < 0)return 0;while(i < tokensLength) {if(l = checkBlock(i)){i += l;break;}else if(l = checkVariable(i) || checkNumber(i) || checkInterpolation(i) || checkIdent(i) || checkSC(i) || checkOperator(i) || checkCombinator(i) || checkString(i))i += l;else return 0;}return i - start;} /** - * Get node with a loop. - * @returns {Array} `['loop', x]` - */function getLoop(){var startPos=pos;var x=[];x.push(getAtkeyword());while(pos < tokensLength) {if(checkBlock(pos)){x.push(getBlock());break;}else if(checkVariable(pos))x.push(getVariable());else if(checkNumber(pos))x.push(getNumber());else if(checkInterpolation(pos))x.push(getInterpolation());else if(checkIdent(pos))x.push(getIdent());else if(checkOperator(pos))x.push(getOperator());else if(checkCombinator(pos))x.push(getCombinator());else if(checkSC(pos))x = x.concat(getSC());else if(checkString(pos))x.push(getString());}var token=tokens[startPos];return newNode(NodeType.LoopType,x,token.ln,token.col);} /** - * Check if token is part of a mixin - * @param {Number} i Token's index number - * @returns {Number} Length of the mixin - */function checkMixin(i){return checkMixin1(i) || checkMixin2(i);} /** - * Get node with a mixin - * @returns {Array} `['mixin', x]` - */function getMixin(){return checkMixin1(pos)?getMixin1():getMixin2();} /** - * Check if token is part of a mixin - * @param {Number} i Token's index number - * @returns {Number} Length of the mixin - */function checkMixin1(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if((l = checkAtkeyword(i)) && tokens[i + 1].value === 'mixin')i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else {if(l = checkArguments(i))i += l;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;}return i - start;} /** - * Get node with a mixin - * @returns {Array} `['mixin', x]` - */function getMixin1(){var startPos=pos;var x=[getAtkeyword()];x = x.concat(getSC());if(checkIdentOrInterpolation(pos))x = x.concat(getIdentOrInterpolation());x = x.concat(getSC());if(checkBlock(pos))x.push(getBlock());else {if(checkArguments(pos))x.push(getArguments());x = x.concat(getSC());x.push(getBlock());}var token=tokens[startPos];return newNode(NodeType.MixinType,x,token.ln,token.col);} /** - * Check if token is part of a mixin - * @param {Number} i Token's index number - * @returns {Number} Length of the mixin - */function checkMixin2(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(tokens[i].type === TokenType.EqualsSign)i++;else return 0;if(l = checkSC(i))i += l;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else {if(l = checkArguments(i))i += l;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;}return i - start;} /** -* Get node with a mixin -* @returns {Array} `['mixin', x]` -*/function getMixin2(){var startPos=pos;var x=[getOperator()];x = x.concat(getSC());if(checkIdentOrInterpolation(pos))x = x.concat(getIdentOrInterpolation());x = x.concat(getSC());if(checkBlock(pos))x.push(getBlock());else {if(checkArguments(pos))x.push(getArguments());x = x.concat(getSC());x.push(getBlock());}var token=tokens[startPos];return newNode(NodeType.MixinType,x,token.ln,token.col);} /** - * Check if token is a namespace sign (`|`) - * @param {Number} i Token's index number - * @returns {Number} `1` if token is `|`, `0` if not - */function checkNamespace(i){return i < tokensLength && tokens[i].type === TokenType.VerticalLine?1:0;} /** - * Get node with a namespace sign - * @returns {Array} `['namespace']` - */function getNamespace(){var startPos=pos++;var token=tokens[startPos];return newNode(NodeType.NamespaceType,'|',token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkNmName2(i){if(tokens[i].type === TokenType.Identifier)return 1;else if(tokens[i].type !== TokenType.DecimalNumber)return 0;i++;return i < tokensLength && tokens[i].type === TokenType.Identifier?2:1;} /** - * @returns {String} - */function getNmName2(){var s=tokens[pos].value;if(tokens[pos++].type === TokenType.DecimalNumber && pos < tokensLength && tokens[pos].type === TokenType.Identifier)s += tokens[pos++].value;return s;} /** - * Check if token is part of a number - * @param {Number} i Token's index number - * @returns {Number} Length of number - */function checkNumber(i){if(i >= tokensLength)return 0;if(tokens[i].number_l)return tokens[i].number_l; // `10`: -if(i < tokensLength && tokens[i].type === TokenType.DecimalNumber && (!tokens[i + 1] || tokens[i + 1] && tokens[i + 1].type !== TokenType.FullStop))return tokens[i].number_l = 1,tokens[i].number_l; // `10.`: -if(i < tokensLength && tokens[i].type === TokenType.DecimalNumber && tokens[i + 1] && tokens[i + 1].type === TokenType.FullStop && (!tokens[i + 2] || tokens[i + 2].type !== TokenType.DecimalNumber))return tokens[i].number_l = 2,tokens[i].number_l; // `.10`: -if(i < tokensLength && tokens[i].type === TokenType.FullStop && tokens[i + 1].type === TokenType.DecimalNumber)return tokens[i].number_l = 2,tokens[i].number_l; // `10.10`: -if(i < tokensLength && tokens[i].type === TokenType.DecimalNumber && tokens[i + 1] && tokens[i + 1].type === TokenType.FullStop && tokens[i + 2] && tokens[i + 2].type === TokenType.DecimalNumber)return tokens[i].number_l = 3,tokens[i].number_l;return 0;} /** - * Get node with number - * @returns {Array} `['number', x]` where `x` is a number converted - * to string. - */function getNumber(){var s='';var startPos=pos;var l=tokens[pos].number_l;for(var j=0;j < l;j++) {s += tokens[pos + j].value;}pos += l;var token=tokens[startPos];return newNode(NodeType.NumberType,s,token.ln,token.col);} /** - * Check if token is an operator (`/`, `,`, `:` or `=`). - * @param {Number} i Token's index number - * @returns {Number} `1` if token is an operator, otherwise `0` - */function checkOperator(i){if(i >= tokensLength)return 0;switch(tokens[i].type){case TokenType.Solidus:case TokenType.Comma:case TokenType.Colon:case TokenType.EqualsSign:case TokenType.EqualitySign:case TokenType.InequalitySign:case TokenType.LessThanSign:case TokenType.GreaterThanSign:case TokenType.Asterisk:return 1;}return 0;} /** - * Get node with an operator - * @returns {Array} `['operator', x]` where `x` is an operator converted - * to string. - */function getOperator(){var startPos=pos;var x=tokens[pos++].value;var token=tokens[startPos];return newNode(NodeType.OperatorType,x,token.ln,token.col);} /** - * Check if token is part of `!optional` word - * @param {Number} i Token's index number - * @returns {Number} - */function checkOptional(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark)return 0;if(l = checkSC(i))i += l;if(tokens[i].value === 'optional'){tokens[start].optionalEnd = i;return i - start + 1;}else {return 0;}} /** - * Get node with `!optional` word - */function getOptional(){var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,token.optionalEnd);pos = token.optionalEnd + 1;return newNode(NodeType.OptionalType,content,line,column);} /** - * Check if token is part of text inside parentheses, e.g. `(1)` - * @param {Number} i Token's index number - * @return {Number} - */function checkParentheses(i){if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;return tokens[i].right - i + 1;} /** - * Get node with text inside parentheses, e.g. `(1)` - * @return {Node} - */function getParentheses(){var type=NodeType.ParenthesesType;var token=tokens[pos];var line=token.ln;var column=token.col;pos++;var tsets=getTsets();var end=getLastPosition(tsets,line,column,1);pos++;return newNode(type,tsets,line,column,end);} /** - * Check if token is a parent selector (`&`). - * @param {Number} i Token's index number - * @returns {Number} - */function checkParentSelector(i){return i < tokensLength && tokens[i].type === TokenType.Ampersand?1:0;} /** - * Get node with a parent selector - * @returns {Array} `['parentSelector']` - */function getParentSelector(){var startPos=pos++;var token=tokens[startPos];return newNode(NodeType.ParentSelectorType,'&',token.ln,token.col);}function checkParentSelectorExtension(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;while(i < tokensLength) {if(l = checkNumber(i) || checkIdentOrInterpolation(i))i += l;else break;}return i - start;}function getParentSelectorExtension(){var type=NodeType.ParentSelectorExtensionType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];while(pos < tokensLength) {if(checkNumber(pos))content.push(getNumber());else if(checkIdentOrInterpolation(pos))content = content.concat(getIdentOrInterpolation());else break;}return newNode(type,content,line,column);}function checkParentSelectorWithExtension(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkParentSelector(i))i += l;else return 0;if(l = checkParentSelectorExtension(i))i += l;return i - start;}function getParentSelectorWithExtension(){var content=[getParentSelector()];if(checkParentSelectorExtension(pos))content.push(getParentSelectorExtension());return content;} /** - * Check if token is part of a number with percent sign (e.g. `10%`) - * @param {Number} i Token's index number - * @returns {Number} - */function checkPercentage(i){var x;if(i >= tokensLength)return 0;x = checkNumber(i);if(!x || i + x >= tokensLength)return 0;return tokens[i + x].type === TokenType.PercentSign?x + 1:0;} /** - * Get node of number with percent sign - * @returns {Array} `['percentage', ['number', x]]` where `x` is a number - * (without percent sign) converted to string. - */function getPercentage(){var startPos=pos;var x=[getNumber()];var token=tokens[startPos];var line=token.ln;var column=token.col;var end=getLastPosition(x,line,column,1);pos++;return newNode(NodeType.PercentageType,x,token.ln,token.col,end);} /** - * Check if token is part of a placeholder selector (e.g. `%abc`). - * @param {Number} i Token's index number - * @returns {Number} Length of the selector - */function checkPlaceholder(i){var l;if(i >= tokensLength)return 0;if(tokens[i].placeholder_l)return tokens[i].placeholder_l;if(tokens[i].type === TokenType.PercentSign && (l = checkIdentOrInterpolation(i + 1))){tokens[i].placeholder_l = l + 1;return l + 1;}else return 0;} /** - * Get node with a placeholder selector - * @returns {Array} `['placeholder', ['ident', x]]` where x is a placeholder's - * identifier (without `%`, e.g. `abc`). - */function getPlaceholder(){var startPos=pos;pos++;var x=getIdentOrInterpolation();var token=tokens[startPos];return newNode(NodeType.PlaceholderType,x,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkProgid(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(joinValues2(i,6) === 'progid:DXImageTransform.Microsoft.')i += 6;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(tokens[i].type === TokenType.LeftParenthesis){tokens[start].progid_end = tokens[i].right;i = tokens[i].right + 1;}else return 0;return i - start;} /** - * @returns {Array} - */function getProgid(){var startPos=pos;var progid_end=tokens[pos].progid_end;var x=joinValues(pos,progid_end);pos = progid_end + 1;var token=tokens[startPos];return newNode(NodeType.ProgidType,x,token.ln,token.col);} /** - * Check if token is part of a property - * @param {Number} i Token's index number - * @returns {Number} Length of the property - */function checkProperty(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkVariable(i) || checkIdentOrInterpolation(i))i += l;else return 0;return i - start;} /** - * Get node with a property - * @returns {Array} `['property', x]` - */function getProperty(){var startPos=pos;var x=[];if(checkVariable(pos)){x.push(getVariable());}else {x = x.concat(getIdentOrInterpolation());}var token=tokens[startPos];return newNode(NodeType.PropertyType,x,token.ln,token.col);} /** - * Check if token is a colon - * @param {Number} i Token's index number - * @returns {Number} `1` if token is a colon, otherwise `0` - */function checkPropertyDelim(i){return i < tokensLength && tokens[i].type === TokenType.Colon?1:0;} /** - * Get node with a colon - * @returns {Array} `['propertyDelim']` - */function getPropertyDelim(){var startPos=pos++;var token=tokens[startPos];return newNode(NodeType.PropertyDelimType,':',token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkPseudo(i){return checkPseudoe(i) || checkPseudoc(i);} /** - * @returns {Array} - */function getPseudo(){if(checkPseudoe(pos))return getPseudoe();if(checkPseudoc(pos))return getPseudoc();} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkPseudoe(i){var l;if(i >= tokensLength || tokens[i++].type !== TokenType.Colon || i >= tokensLength || tokens[i++].type !== TokenType.Colon)return 0;return (l = checkIdentOrInterpolation(i))?l + 2:0;} /** - * @returns {Array} - */function getPseudoe(){var startPos=pos;pos += 2;var x=getIdentOrInterpolation();var token=tokens[startPos];return newNode(NodeType.PseudoeType,x,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkPseudoc(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.Colon)return 0;if(l = checkPseudoClass3(i))tokens[i].pseudoClassType = 3;else if(l = checkPseudoClass4(i))tokens[i].pseudoClassType = 4;else if(l = checkPseudoClass5(i))tokens[i].pseudoClassType = 5;else if(l = checkPseudoClass1(i))tokens[i].pseudoClassType = 1;else if(l = checkPseudoClass2(i))tokens[i].pseudoClassType = 2;else if(l = checkPseudoClass6(i))tokens[i].pseudoClassType = 6;else return 0;return l;} /** - * @returns {Array} - */function getPseudoc(){var childType=tokens[pos].pseudoClassType;if(childType === 1)return getPseudoClass1();if(childType === 2)return getPseudoClass2();if(childType === 3)return getPseudoClass3();if(childType === 4)return getPseudoClass4();if(childType === 5)return getPseudoClass5();if(childType === 6)return getPseudoClass6();} /** - * (-) `:not(panda)` - */function checkPseudoClass1(i){var start=i; // Skip `:`. -i++;if(i >= tokensLength)return 0;var l=undefined;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSelectorsGroup(i))i += l;else return 0;if(i !== right)return 0;return right - start + 1;} /** - * (-) `:not(panda)` - */function getPseudoClass1(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. -pos++;content = content.concat(getIdentOrInterpolation());{var _type=NodeType.ArgumentsType;var _token=tokens[pos];var _line=_token.ln;var _column=_token.col; // Skip `(`. -pos++;var selectors=getSelectorsGroup();var end=getLastPosition(selectors,_line,_column,1);var args=newNode(_type,selectors,_line,_column,end);content.push(args); // Skip `)`. -pos++;}return newNode(type,content,line,column);} /** - * (1) `:nth-child(odd)` - * (2) `:nth-child(even)` - * (3) `:lang(de-DE)` - */function checkPseudoClass2(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSC(i))i += l;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass2(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. -pos++;content = content.concat(getIdentOrInterpolation());var l=tokens[pos].ln;var c=tokens[pos].col;var value=[]; // Skip `(`. -pos++;value = value.concat(getSC()).concat(getIdentOrInterpolation()).concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. -pos++;return newNode(type,content,line,column);} /** - * (-) `:nth-child(-3n + 2)` - */function checkPseudoClass3(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSC(i))i += l;if(l = checkUnary(i))i += l;if(i >= tokensLength)return 0;if(tokens[i].type === TokenType.DecimalNumber)i++;if(i >= tokensLength)return 0;if(tokens[i].value === 'n')i++;else return 0;if(l = checkSC(i))i += l;if(i >= tokensLength)return 0;if(tokens[i].value === '+' || tokens[i].value === '-')i++;else return 0;if(l = checkSC(i))i += l;if(tokens[i].type === TokenType.DecimalNumber)i++;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass3(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `:`. -pos++;var content=getIdentOrInterpolation();var l=tokens[pos].ln;var c=tokens[pos].col;var value=[]; // Skip `(`. -pos++;if(checkUnary(pos))value.push(getUnary());if(checkNumber(pos))value.push(getNumber());{var _l=tokens[pos].ln;var _c=tokens[pos].col;var _content=tokens[pos].value;var ident=newNode(NodeType.IdentType,_content,_l,_c);value.push(ident);pos++;}value = value.concat(getSC());if(checkUnary(pos))value.push(getUnary());value = value.concat(getSC());if(checkNumber(pos))value.push(getNumber());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. -pos++;return newNode(type,content,line,column);} /** - * (-) `:nth-child(-3n)` - */function checkPseudoClass4(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSC(i))i += l;if(l = checkUnary(i))i += l;if(tokens[i].type === TokenType.DecimalNumber)i++;if(tokens[i].value === 'n')i++;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass4(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `:`. -pos++;var content=getIdentOrInterpolation();var l=tokens[pos].ln;var c=tokens[pos].col;var value=[]; // Skip `(`. -pos++;if(checkUnary(pos))value.push(getUnary());if(checkNumber(pos))value.push(getNumber());if(checkIdent(pos))value.push(getIdent());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. -pos++;return newNode(type,content,line,column);} /** - * (-) `:nth-child(+8)` - */function checkPseudoClass5(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSC(i))i += l;if(l = checkUnary(i))i += l;if(tokens[i].type === TokenType.DecimalNumber)i++;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass5(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `:`. -pos++;var content=getIdentOrInterpolation();var l=tokens[pos].ln;var c=tokens[pos].col;var value=[]; // Skip `(`. -pos++;if(checkUnary(pos))value.push(getUnary());if(checkNumber(pos))value.push(getNumber());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. -pos++;return newNode(type,content,line,column);} /** - * (-) `:checked` - */function checkPseudoClass6(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;}function getPseudoClass6(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `:`. -pos++;var content=getIdentOrInterpolation();return newNode(type,content,line,column);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkRuleset(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkSelectorsGroup(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i)){i += l;}else if(l = checkSC(i)){i += l;if(l = checkBlock(i))i += l;else return 0;}else return 0;return i - start;}function getRuleset(){var type=NodeType.RulesetType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];content = content.concat(getSelectorsGroup());content = content.concat(getSC());if(checkBlock(pos)){content.push(getBlock());}else {content = content.concat(getSC(),getBlock());}return newNode(type,content,line,column);} /** - * Check if token is marked as a space (if it's a space or a tab - * or a line break). - * @param {Number} i - * @returns {Number} Number of spaces in a row starting with the given token. - */function checkS(i){return i < tokensLength && tokens[i].ws?tokens[i].ws_last - i + 1:0;} /** - * Get node with spaces - * @returns {Array} `['s', x]` where `x` is a string containing spaces - */function getS(){var startPos=pos;var x=joinValues(pos,tokens[pos].ws_last);pos = tokens[pos].ws_last + 1;var token=tokens[startPos];return newNode(NodeType.SType,x,token.ln,token.col);} /** - * Check if token is a space or a comment. - * @param {Number} i Token's index number - * @returns {Number} Number of similar (space or comment) tokens - * in a row starting with the given token. - */function checkSC(i){if(!tokens[i])return 0;var l=undefined;var lsc=0;var ln=tokens[i].ln;while(i < tokensLength) {if(tokens[i].ln !== ln)break;if(!(l = checkS(i)) && !(l = checkCommentML(i)) && !(l = checkCommentSL(i)))break;i += l;lsc += l;if(tokens[i] && tokens[i].type === TokenType.Newline)break;}return lsc || 0;} /** - * Get node with spaces and comments - * @returns {Array} Array containing nodes with spaces (if there are any) - * and nodes with comments (if there are any): - * `[['s', x]*, ['comment', y]*]` where `x` is a string of spaces - * and `y` is a comment's text (without `/*` and `* /`). - */function getSC(){var sc=[];var ln=undefined;if(pos >= tokensLength)return sc;ln = tokens[pos].ln;while(pos < tokensLength) {if(tokens[pos].ln !== ln)break;else if(checkS(pos))sc.push(getS());else if(checkCommentML(pos))sc.push(getCommentML());else if(checkCommentSL(pos))sc.push(getCommentSL());else break;if(tokens[pos] && tokens[pos].type === TokenType.Newline)break;}return sc;} /** - * Check if token is part of a hexadecimal number (e.g. `#fff`) inside - * a simple selector - * @param {Number} i Token's index number - * @returns {Number} - */function checkShash(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.NumberSign)return 0;return (l = checkIdentOrInterpolation(i + 1))?l + 1:0;} /** - * Get node with a hexadecimal number (e.g. `#fff`) inside a simple - * selector - * @returns {Array} `['shash', x]` where `x` is a hexadecimal number - * converted to string (without `#`, e.g. `fff`) - */function getShash(){var startPos=pos;var token=tokens[startPos];pos++;var x=getIdentOrInterpolation();return newNode(NodeType.ShashType,x,token.ln,token.col);} /** - * Check if token is part of a string (text wrapped in quotes) - * @param {Number} i Token's index number - * @returns {Number} `1` if token is part of a string, `0` if not - */function checkString(i){return i < tokensLength && (tokens[i].type === TokenType.StringSQ || tokens[i].type === TokenType.StringDQ)?1:0;} /** - * Get string's node - * @returns {Array} `['string', x]` where `x` is a string (including - * quotes). - */function getString(){var startPos=pos;var x=tokens[pos++].value;var token=tokens[startPos];return newNode(NodeType.StringType,x,token.ln,token.col);} /** - * Validate stylesheet: it should consist of any number (0 or more) of - * rulesets (sets of rules with selectors), @-rules, whitespaces or - * comments. - * @param {Number} i Token's index number - * @returns {Number} - */function checkStylesheet(i){var start=i;var l=undefined;while(i < tokensLength) {if(l = checkSC(i) || checkDeclaration(i) || checkDeclDelim(i) || checkInclude(i) || checkExtend(i) || checkMixin(i) || checkLoop(i) || checkConditionalStatement(i) || checkAtrule(i) || checkRuleset(i))i += l;else throwError(i);}return i - start;} /** - * @returns {Array} `['stylesheet', x]` where `x` is all stylesheet's - * nodes. - */function getStylesheet(){var startPos=pos;var x=[];var node;var wasDeclaration=false;while(pos < tokensLength) {if(wasDeclaration && checkDeclDelim(pos))node = getDeclDelim();else if(checkSC(pos))node = getSC();else if(checkRuleset(pos))node = getRuleset();else if(checkInclude(pos))node = getInclude();else if(checkExtend(pos))node = getExtend();else if(checkMixin(pos))node = getMixin();else if(checkLoop(pos))node = getLoop();else if(checkConditionalStatement(pos))node = getConditionalStatement();else if(checkAtrule(pos))node = getAtrule();else if(checkDeclaration(pos))node = getDeclaration();else throwError();wasDeclaration = node.type === NodeType.DeclarationType;if(Array.isArray(node))x = x.concat(node);else x.push(node);}var token=tokens[startPos];return newNode(NodeType.StylesheetType,x,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkTset(i){return checkVhash(i) || checkOperator(i) || checkAny(i) || checkSC(i) || checkInterpolation(i);} /** - * @returns {Array} - */function getTset(){if(checkVhash(pos))return getVhash();else if(checkOperator(pos))return getOperator();else if(checkAny(pos))return getAny();else if(checkSC(pos))return getSC();else if(checkInterpolation(pos))return getInterpolation();} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkTsets(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;while(tokens[i - 1].type !== TokenType.Newline && (l = checkTset(i))) {i += l;}return i - start;} /** - * @returns {Array} - */function getTsets(){var x=[];var t=undefined;while(tokens[pos - 1].type !== TokenType.Newline && (t = getTset())) {if(typeof t.content === 'string')x.push(t);else x = x.concat(t);}return x;} /** - * Check if token is an unary (arithmetical) sign (`+` or `-`) - * @param {Number} i Token's index number - * @returns {Number} `1` if token is an unary sign, `0` if not - */function checkUnary(i){return i < tokensLength && (tokens[i].type === TokenType.HyphenMinus || tokens[i].type === TokenType.PlusSign)?1:0;} /** - * Get node with an unary (arithmetical) sign (`+` or `-`) - * @returns {Array} `['unary', x]` where `x` is an unary sign - * converted to string. - */function getUnary(){var startPos=pos;var x=tokens[pos++].value;var token=tokens[startPos];return newNode(NodeType.OperatorType,x,token.ln,token.col);} /** - * Check if token is part of URI (e.g. `url('/css/styles.css')`) - * @param {Number} i Token's index number - * @returns {Number} Length of URI - */function checkUri(i){var start=i;if(i >= tokensLength || tokens[i++].value !== 'url' || i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;return tokens[i].right - start + 1;} /** - * Get node with URI - * @returns {Array} `['uri', x]` where `x` is URI's nodes (without `url` - * and braces, e.g. `['string', ''/css/styles.css'']`). - */function getUri(){var startPos=pos;var uriExcluding={};var uri=undefined;var token=undefined;var l=undefined;var raw=undefined;pos += 2;uriExcluding[TokenType.Space] = 1;uriExcluding[TokenType.Tab] = 1;uriExcluding[TokenType.Newline] = 1;uriExcluding[TokenType.LeftParenthesis] = 1;uriExcluding[TokenType.RightParenthesis] = 1;if(checkUri1(pos)){uri = [].concat(getSC()).concat([getString()]).concat(getSC());}else {uri = [].concat(getSC());l = checkExcluding(uriExcluding,pos);token = tokens[pos];raw = newNode(NodeType.RawType,joinValues(pos,pos + l),token.ln,token.col);uri.push(raw);pos += l + 1;uri = uri.concat(getSC());}token = tokens[startPos];var line=token.ln;var column=token.col;var end=getLastPosition(uri,line,column,1);pos++;return newNode(NodeType.UriType,uri,token.ln,token.col,end);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkUri1(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkSC(i))i += l;if(tokens[i].type !== TokenType.StringDQ && tokens[i].type !== TokenType.StringSQ)return 0;i++;if(l = checkSC(i))i += l;return i - start;} /** - * Check if token is part of a value - * @param {Number} i Token's index number - * @returns {Number} Length of the value - */function checkValue(i){var start=i;var l=undefined;var s=undefined;var _i=undefined;while(i < tokensLength) {if(checkDeclDelim(i))break;if(l = checkBlock(i)){i += l;break;}s = checkS(i);_i = i + s;if(l = _checkValue(_i))i += l + s;if(!l || checkBlock(i - l))break;}return i - start;} /** - * @param {Number} i Token's index number - * @returns {Number} - */function _checkValue(i){return checkVhash(i) || checkOperator(i) || checkImportant(i) || checkGlobal(i) || checkDefault(i) || checkProgid(i) || checkAny(i) || checkInterpolation(i);} /** - * @returns {Array} - */function getValue(){var startPos=pos;var x=[];var _pos=undefined;var s=undefined;while(pos < tokensLength) {if(checkDeclDelim(pos))break;s = checkS(pos);_pos = pos + s;if(checkDeclDelim(_pos))break;if(checkBlock(pos)){x.push(getBlock());break;}if(!_checkValue(_pos))break;if(s)x.push(getS());x.push(_getValue());if(checkBlock(_pos))break;}var token=tokens[startPos];return newNode(NodeType.ValueType,x,token.ln,token.col);} /** - * @returns {Array} - */function _getValue(){if(checkVhash(pos))return getVhash();if(checkOperator(pos))return getOperator();if(checkImportant(pos))return getImportant();if(checkGlobal(pos))return getGlobal();if(checkDefault(pos))return getDefault();if(checkProgid(pos))return getProgid();if(checkAny(pos))return getAny();if(checkInterpolation(pos))return getInterpolation();} /** - * Check if token is part of a variable - * @param {Number} i Token's index number - * @returns {Number} Length of the variable - */function checkVariable(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.DollarSign)return 0;return (l = checkIdent(i + 1))?l + 1:0;} /** - * Get node with a variable - * @returns {Array} `['variable', ['ident', x]]` where `x` is - * a variable name. - */function getVariable(){var startPos=pos;var x=[];pos++;x.push(getIdent());var token=tokens[startPos];return newNode(NodeType.VariableType,x,token.ln,token.col);} /** - * Check if token is part of a variables list (e.g. `$values...`). - * @param {Number} i Token's index number - * @returns {Number} - */function checkVariablesList(i){var d=0; // Number of dots -var l=undefined;if(i >= tokensLength)return 0;if(l = checkVariable(i))i += l;else return 0;while(i < tokensLength && tokens[i].type === TokenType.FullStop) {d++;i++;}return d === 3?l + d:0;} /** - * Get node with a variables list - * @returns {Array} `['variableslist', ['variable', ['ident', x]]]` where - * `x` is a variable name. - */function getVariablesList(){var startPos=pos;var x=[getVariable()];var token=tokens[startPos];var line=token.ln;var column=token.col;var end=getLastPosition(x,line,column,3);pos += 3;return newNode(NodeType.VariablesListType,x,token.ln,token.col,end);} /** - * Check if token is part of a hexadecimal number (e.g. `#fff`) inside - * some value - * @param {Number} i Token's index number - * @returns {Number} - */function checkVhash(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.NumberSign)return 0;return (l = checkNmName2(i + 1))?l + 1:0;} /** - * Get node with a hexadecimal number (e.g. `#fff`) inside some value - * @returns {Array} `['vhash', x]` where `x` is a hexadecimal number - * converted to string (without `#`, e.g. `'fff'`). - */function getVhash(){var startPos=pos;var x=undefined;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;x = getNmName2();var end=getLastPosition(x,line,column + 1);return newNode(NodeType.VhashType,x,token.ln,token.col,end);}module.exports = function(_tokens,context){tokens = _tokens;tokensLength = tokens.length;pos = 0;return contexts[context]();};function checkSelectorsGroup(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkSelector(i))i += l;else return 0;while(i < tokensLength) {var sb=checkSC(i);var c=checkDelim(i + sb);if(!c)break;var sa=checkSC(i + sb + c);var saa=sa?checkSC(i + sb + c + sa):0;if(l = checkSelector(i + sb + c + sa + saa))i += sb + c + sa + saa + l;else break;}tokens[start].selectorsGroupEnd = i;return i - start;}function getSelectorsGroup(){var selectorsGroup=[];var selectorsGroupEnd=tokens[pos].selectorsGroupEnd;selectorsGroup.push(getSelector());while(pos < selectorsGroupEnd) {selectorsGroup = selectorsGroup.concat(getSC());selectorsGroup.push(getDelim());selectorsGroup = selectorsGroup.concat(getSC());selectorsGroup = selectorsGroup.concat(getSC());selectorsGroup.push(getSelector());}return selectorsGroup;}function checkSelector(i){var l;if(l = checkSelector1(i))tokens[i].selectorType = 1;else if(l = checkSelector2(i))tokens[i].selectorType = 2;return l;}function getSelector(){var selectorType=tokens[pos].selectorType;if(selectorType === 1)return getSelector1();else return getSelector2();} /** - * Checks for selector which starts with a compound selector. - */function checkSelector1(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkCompoundSelector(i))i += l;else return 0;while(i < tokensLength) {var s=checkSC(i);var c=checkCombinator(i + s);if(!s && !c)break;if(c){i += s + c;s = checkSC(i);}if(l = checkCompoundSelector(i + s))i += s + l;else break;}tokens[start].selectorEnd = i;return i - start;}function getSelector1(){var type=NodeType.SelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var selectorEnd=token.selectorEnd;var content=getCompoundSelector();while(pos < selectorEnd) {if(checkSC(pos))content = content.concat(getSC());else if(checkCombinator(pos))content.push(getCombinator());else if(checkCompoundSelector(pos))content = content.concat(getCompoundSelector());}return newNode(type,content,line,column);} /** - * Checks for a selector that starts with a combinator. - */function checkSelector2(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkCombinator(i))i += l;else return 0;while(i < tokensLength) {var sb=checkSC(i);if(l = checkCompoundSelector(i + sb))i += sb + l;else break;var sa=checkSC(i);var c=checkCombinator(i + sa);if(!sa && !c)break;if(c){i += sa + c;}}tokens[start].selectorEnd = i;return i - start;}function getSelector2(){var type=NodeType.SelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var selectorEnd=token.selectorEnd;var content=[getCombinator()];while(pos < selectorEnd) {if(checkSC(pos))content = content.concat(getSC());else if(checkCombinator(pos))content.push(getCombinator());else if(checkCompoundSelector(pos))content = content.concat(getCompoundSelector());}return newNode(type,content,line,column);}function checkCompoundSelector(i){var l=undefined;if(l = checkCompoundSelector1(i)){tokens[i].compoundSelectorType = 1;}else if(l = checkCompoundSelector2(i)){tokens[i].compoundSelectorType = 2;}return l;}function getCompoundSelector(){var type=tokens[pos].compoundSelectorType;if(type === 1)return getCompoundSelector1();if(type === 2)return getCompoundSelector2();}function checkCompoundSelector1(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkTypeSelector(i) || checkPlaceholder(i) || checkParentSelectorWithExtension(i))i += l;else return 0;while(i < tokensLength) {var _l2=checkShash(i) || checkClass(i) || checkAttributeSelector(i) || checkPseudo(i) || checkPlaceholder(i);if(_l2)i += _l2;else break;}tokens[start].compoundSelectorEnd = i;return i - start;}function getCompoundSelector1(){var sequence=[];var compoundSelectorEnd=tokens[pos].compoundSelectorEnd;if(checkTypeSelector(pos))sequence.push(getTypeSelector());else if(checkPlaceholder(pos))sequence.push(getPlaceholder());else if(checkParentSelectorWithExtension(pos))sequence = sequence.concat(getParentSelectorWithExtension());while(pos < compoundSelectorEnd) {if(checkShash(pos))sequence.push(getShash());else if(checkClass(pos))sequence.push(getClass());else if(checkAttributeSelector(pos))sequence.push(getAttributeSelector());else if(checkPseudo(pos))sequence.push(getPseudo());else if(checkPlaceholder(pos))sequence.push(getPlaceholder());}return sequence;}function checkCompoundSelector2(i){if(i >= tokensLength)return 0;var start=i;while(i < tokensLength) {var l=checkShash(i) || checkClass(i) || checkAttributeSelector(i) || checkPseudo(i) || checkPlaceholder(i);if(l)i += l;else break;}if(i !== start)tokens[start].compoundSelectorEnd = i;return i - start;}function getCompoundSelector2(){var sequence=[];var compoundSelectorEnd=tokens[pos].compoundSelectorEnd;while(pos < compoundSelectorEnd) {if(checkShash(pos))sequence.push(getShash());else if(checkClass(pos))sequence.push(getClass());else if(checkAttributeSelector(pos))sequence.push(getAttributeSelector());else if(checkPseudo(pos))sequence.push(getPseudo());else if(checkPlaceholder(pos))sequence.push(getPlaceholder());}return sequence;}function checkTypeSelector(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkNamePrefix(i))i += l;if(tokens[i].type === TokenType.Asterisk)i++;else if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;}function getTypeSelector(){var type=NodeType.TypeSelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkNamePrefix(pos))content.push(getNamePrefix());if(checkIdentOrInterpolation(pos))content = content.concat(getIdentOrInterpolation());return newNode(type,content,line,column);}function checkAttributeSelector(i){var l=undefined;if(l = checkAttributeSelector1(i))tokens[i].attributeSelectorType = 1;else if(l = checkAttributeSelector2(i))tokens[i].attributeSelectorType = 2;return l;}function getAttributeSelector(){var type=tokens[pos].attributeSelectorType;if(type === 1)return getAttributeSelector1();else return getAttributeSelector2();} /** - * (1) `[panda=nani]` - * (2) `[panda='nani']` - * (3) `[panda='nani' i]` - * - */function checkAttributeSelector1(i){var start=i;if(tokens[i].type === TokenType.LeftSquareBracket)i++;else return 0;var l=undefined;if(l = checkSC(i))i += l;if(l = checkAttributeName(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkAttributeMatch(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkAttributeValue(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkAttributeFlags(i)){i += l;if(l = checkSC(i))i += l;}if(tokens[i].type === TokenType.RightSquareBracket)i++;else return 0;return i - start;}function getAttributeSelector1(){var type=NodeType.AttributeSelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `[`. -pos++;content = content.concat(getSC());content.push(getAttributeName());content = content.concat(getSC());content.push(getAttributeMatch());content = content.concat(getSC());content.push(getAttributeValue());content = content.concat(getSC());if(checkAttributeFlags(pos)){content.push(getAttributeFlags());content = content.concat(getSC());} // Skip `]`. -pos++;var end=getLastPosition(content,line,column,1);return newNode(type,content,line,column,end);} /** - * (1) `[panda]` - */function checkAttributeSelector2(i){var start=i;if(tokens[i].type === TokenType.LeftSquareBracket)i++;else return 0;var l=undefined;if(l = checkSC(i))i += l;if(l = checkAttributeName(i))i += l;else return 0;if(l = checkSC(i))i += l;if(tokens[i].type === TokenType.RightSquareBracket)i++;else return 0;return i - start;}function getAttributeSelector2(){var type=NodeType.AttributeSelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `[`. -pos++;content = content.concat(getSC());content.push(getAttributeName());content = content.concat(getSC()); // Skip `]`. -pos++;var end=getLastPosition(content,line,column,1);return newNode(type,content,line,column,end);}function checkAttributeName(i){var start=i;var l=undefined;if(l = checkNamePrefix(i))i += l;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;}function getAttributeName(){var type=NodeType.AttributeNameType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkNamePrefix(pos))content.push(getNamePrefix());content = content.concat(getIdentOrInterpolation());return newNode(type,content,line,column);}function checkAttributeMatch(i){var l=undefined;if(l = checkAttributeMatch1(i))tokens[i].attributeMatchType = 1;else if(l = checkAttributeMatch2(i))tokens[i].attributeMatchType = 2;return l;}function getAttributeMatch(){var type=tokens[pos].attributeMatchType;if(type === 1)return getAttributeMatch1();else return getAttributeMatch2();}function checkAttributeMatch1(i){var start=i;var type=tokens[i].type;if(type === TokenType.Tilde || type === TokenType.VerticalLine || type === TokenType.CircumflexAccent || type === TokenType.DollarSign || type === TokenType.Asterisk)i++;else return 0;if(tokens[i].type === TokenType.EqualsSign)i++;else return 0;return i - start;}function getAttributeMatch1(){var type=NodeType.AttributeMatchType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=tokens[pos].value + tokens[pos + 1].value;pos += 2;return newNode(type,content,line,column);}function checkAttributeMatch2(i){if(tokens[i].type === TokenType.EqualsSign)return 1;else return 0;}function getAttributeMatch2(){var type=NodeType.AttributeMatchType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='=';pos++;return newNode(type,content,line,column);}function checkAttributeValue(i){return checkString(i) || checkIdentOrInterpolation(i);}function getAttributeValue(){var type=NodeType.AttributeValueType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkString(pos))content.push(getString());else content = content.concat(getIdentOrInterpolation());return newNode(type,content,line,column);}function checkAttributeFlags(i){return checkIdentOrInterpolation(i);}function getAttributeFlags(){var type=NodeType.AttributeFlagsType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=getIdentOrInterpolation();return newNode(type,content,line,column);}function checkNamePrefix(i){if(i >= tokensLength)return 0;var l=undefined;if(l = checkNamePrefix1(i))tokens[i].namePrefixType = 1;else if(l = checkNamePrefix2(i))tokens[i].namePrefixType = 2;return l;}function getNamePrefix(){var type=tokens[pos].namePrefixType;if(type === 1)return getNamePrefix1();else return getNamePrefix2();} /** - * (1) `panda|` - * (2) `panda|` - */function checkNamePrefix1(i){var start=i;var l=undefined;if(l = checkNamespacePrefix(i))i += l;else return 0;if(l = checkCommentML(i))i += l;if(l = checkNamespaceSeparator(i))i += l;else return 0;return i - start;}function getNamePrefix1(){var type=NodeType.NamePrefixType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];content.push(getNamespacePrefix());if(checkCommentML(pos))content.push(getCommentML());content.push(getNamespaceSeparator());return newNode(type,content,line,column);} /** - * (1) `|` - */function checkNamePrefix2(i){return checkNamespaceSeparator(i);}function getNamePrefix2(){var type=NodeType.NamePrefixType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[getNamespaceSeparator()];return newNode(type,content,line,column);} /** - * (1) `*` - * (2) `panda` - */function checkNamespacePrefix(i){if(i >= tokensLength)return 0;var l=undefined;if(tokens[i].type === TokenType.Asterisk)return 1;else if(l = checkIdentOrInterpolation(i))return l;else return 0;}function getNamespacePrefix(){var type=NodeType.NamespacePrefixType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkIdentOrInterpolation(pos))content = content.concat(getIdentOrInterpolation());return newNode(type,content,line,column);} /** - * (1) `|` - */function checkNamespaceSeparator(i){if(i >= tokensLength)return 0;if(tokens[i].type === TokenType.VerticalLine)return 1;else return 0;}function getNamespaceSeparator(){var type=NodeType.NamespaceSeparatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='|';pos++;return newNode(type,content,line,column);} \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/sass/stringify.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/sass/stringify.js deleted file mode 100644 index 9b0ae75..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/sass/stringify.js +++ /dev/null @@ -1,3 +0,0 @@ -// jscs:disable maximumLineLength -'use strict';module.exports = function stringify(tree){ // TODO: Better error message -if(!tree)throw new Error('We need tree to translate');function _t(tree){var type=tree.type;if(_unique[type])return _unique[type](tree);if(typeof tree.content === 'string')return tree.content;if(Array.isArray(tree.content))return _composite(tree.content);return '';}function _composite(t,i){if(!t)return '';var s='';i = i || 0;for(;i < t.length;i++) s += _t(t[i]);return s;}var _unique={'arguments':function(t){return '(' + _composite(t.content) + ')';},'atkeyword':function(t){return '@' + _composite(t.content);},'attributeSelector':function(t){return '[' + _composite(t.content) + ']';},'block':function(t){return _composite(t.content);},'brackets':function(t){return '[' + _composite(t.content) + ']';},'class':function(t){return '.' + _composite(t.content);},'color':function(t){return '#' + t.content;},'expression':function(t){return 'expression(' + t.content + ')';},'id':function(t){return '#' + _composite(t.content);},'interpolation':function(t){return '#{' + _composite(t.content) + '}';},'multilineComment':function(t){return '/*' + t.content;},'nthSelector':function(t){return ':' + _t(t.content[0]) + '(' + _composite(t.content.slice(1)) + ')';},'parentheses':function(t){return '(' + _composite(t.content) + ')';},'percentage':function(t){return _composite(t.content) + '%';},'placeholder':function(t){return '%' + _composite(t.content);},'pseudoClass':function(t){return ':' + _composite(t.content);},'pseudoElement':function(t){return '::' + _composite(t.content);},'singlelineComment':function(t){return '/' + '/' + t.content;},'uri':function(t){return 'url(' + _composite(t.content) + ')';},'variable':function(t){return '$' + _composite(t.content);},'variablesList':function(t){return _composite(t.content) + '...';}};return _t(tree);}; \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/sass/tokenizer.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/sass/tokenizer.js deleted file mode 100644 index 1ac3b80..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/sass/tokenizer.js +++ /dev/null @@ -1,95 +0,0 @@ -'use strict';module.exports = function(css,tabSize){var TokenType=require('../token-types');var tokens=[];var urlMode=false;var blockMode=0;var c=undefined; // Current character -var cn=undefined; // Next character -var pos=0;var tn=0;var ln=1;var col=1;var Punctuation={' ':TokenType.Space,'\n':TokenType.Newline,'\r':TokenType.Newline,'\t':TokenType.Tab,'!':TokenType.ExclamationMark,'"':TokenType.QuotationMark,'#':TokenType.NumberSign,'$':TokenType.DollarSign,'%':TokenType.PercentSign,'&':TokenType.Ampersand,'\'':TokenType.Apostrophe,'(':TokenType.LeftParenthesis,')':TokenType.RightParenthesis,'*':TokenType.Asterisk,'+':TokenType.PlusSign,',':TokenType.Comma,'-':TokenType.HyphenMinus,'.':TokenType.FullStop,'/':TokenType.Solidus,':':TokenType.Colon,';':TokenType.Semicolon,'<':TokenType.LessThanSign,'=':TokenType.EqualsSign,'==':TokenType.EqualitySign,'!=':TokenType.InequalitySign,'>':TokenType.GreaterThanSign,'?':TokenType.QuestionMark,'@':TokenType.CommercialAt,'[':TokenType.LeftSquareBracket,']':TokenType.RightSquareBracket,'^':TokenType.CircumflexAccent,'_':TokenType.LowLine,'{':TokenType.LeftCurlyBracket,'|':TokenType.VerticalLine,'}':TokenType.RightCurlyBracket,'~':TokenType.Tilde}; /** - * Add a token to the token list - * @param {string} type - * @param {string} value - */function pushToken(type,value,column){tokens.push({tn:tn++,ln:ln,col:column,type:type,value:value});} /** - * Check if a character is a decimal digit - * @param {string} c Character - * @returns {boolean} - */function isDecimalDigit(c){return '0123456789'.indexOf(c) >= 0;} /** - * Parse spaces - * @param {string} css Unparsed part of CSS string - */function parseSpaces(css){var start=pos; // Read the string until we meet a non-space character: -for(;pos < css.length;pos++) {if(css.charAt(pos) !== ' ')break;} // Add a substring containing only spaces to tokens: -pushToken(TokenType.Space,css.substring(start,pos--),col);col += pos - start;} /** - * Parse a string within quotes - * @param {string} css Unparsed part of CSS string - * @param {string} q Quote (either `'` or `"`) - */function parseString(css,q){var start=pos; // Read the string until we meet a matching quote: -for(pos++;pos < css.length;pos++) { // Skip escaped quotes: -if(css.charAt(pos) === '\\')pos++;else if(css.charAt(pos) === q)break;} // Add the string (including quotes) to tokens: -var type=q === '"'?TokenType.StringDQ:TokenType.StringSQ;pushToken(type,css.substring(start,pos + 1),col);col += pos - start;} /** - * Parse numbers - * @param {string} css Unparsed part of CSS string - */function parseDecimalNumber(css){var start=pos; // Read the string until we meet a character that's not a digit: -for(;pos < css.length;pos++) {if(!isDecimalDigit(css.charAt(pos)))break;} // Add the number to tokens: -pushToken(TokenType.DecimalNumber,css.substring(start,pos--),col);col += pos - start;} /** - * Parse identifier - * @param {string} css Unparsed part of CSS string - */function parseIdentifier(css){var start=pos; // Skip all opening slashes: -while(css.charAt(pos) === '/') pos++; // Read the string until we meet a punctuation mark: -for(;pos < css.length;pos++) { // Skip all '\': -if(css.charAt(pos) === '\\')pos++;else if(css.charAt(pos) in Punctuation)break;}var ident=css.substring(start,pos--); // Enter url mode if parsed substring is `url`: -if(!urlMode && ident === 'url' && css.charAt(pos + 1) === '('){urlMode = true;} // Add identifier to tokens: -pushToken(TokenType.Identifier,ident,col);col += pos - start;} /** - * Parse equality sign - */function parseEquality(){pushToken(TokenType.EqualitySign,'==',col);pos++;col++;} /** - * Parse inequality sign - */function parseInequality(){pushToken(TokenType.InequalitySign,'!=',col);pos++;col++;} /** - * Parse a multiline comment - * @param {string} css Unparsed part of CSS string - */function parseMLComment(css){var start=pos;var col_=col; // Get current indent level: -var il=0;for(var _pos=pos - 1;_pos > -1;_pos--) { // TODO: Can be tabs: -if(css.charAt(_pos) === ' ')il++;else break;}for(pos += 2;pos < css.length;pos++) {if(css.charAt(pos) === '\n'){var _pos=undefined; // Get new line's indent level: -var _il=0;for(_pos = pos + 1;_pos < css.length;_pos++) {if(css.charAt(_pos) === ' ')_il++;else break;}if(_il > il){col = 0;pos += _pos - pos;}else {pos--;break;}}} // Add full comment (including `/*`) to the list of tokens: -var comment=css.substring(start,pos + 1);pushToken(TokenType.CommentML,comment,col_);var newlines=comment.split('\n');if(newlines.length > 1){ln += newlines.length - 1;col = newlines[newlines.length - 1].length;}else {col += pos - start;}} /** - * Parse a single line comment - * @param {string} css Unparsed part of CSS string - */function parseSLComment(css){var start=pos;var col_=col;var _pos; // Check if comment is the only token on the line, and if so, -// get current indent level: -var il=0;var onlyToken=false;for(_pos = pos - 1;_pos > -1;_pos--) { // TODO: Can be tabs: -if(css.charAt(_pos) === ' ')il++;else if(css.charAt(_pos) === '\n'){onlyToken = true;break;}else break;}if(_pos === -1)onlyToken = true; // Read the string until we meet comment end. -// Since we already know first 2 characters (`//`), start reading -// from `pos + 2`: -if(!onlyToken){for(pos += 2;pos < css.length;pos++) {if(css.charAt(pos) === '\n' || css.charAt(pos) === '\r'){break;}}}else {for(pos += 2;pos < css.length;pos++) {if(css.charAt(pos) === '\n'){ // Get new line's indent level: -var _il=0;for(_pos = pos + 1;_pos < css.length;_pos++) {if(css.charAt(_pos) === ' ')_il++;else break;}if(_il > il){col = 0;pos += _pos - pos;}else {break;}}}} // Add comment (including `//` and line break) to the list of tokens: -var comment=css.substring(start,pos--);pushToken(TokenType.CommentSL,comment,col_);var newlines=comment.split('\n');if(newlines.length > 1){ln += newlines.length - 1;col = newlines[newlines.length - 1].length;}else {col += pos - start;}} /** - * Convert a CSS string to a list of tokens - * @param {string} css CSS string - * @returns {Array} List of tokens - * @private - */function getTokens(css){ // Parse string, character by character: -for(pos = 0;pos < css.length;col++,pos++) {c = css.charAt(pos);cn = css.charAt(pos + 1); // If we meet `/*`, it's a start of a multiline comment. -// Parse following characters as a multiline comment: -if(c === '/' && cn === '*'){parseMLComment(css);} // If we meet `//` and it is not a part of url: -else if(!urlMode && c === '/' && cn === '/'){ // If we're currently inside a block, treat `//` as a start -// of identifier. Else treat `//` as a start of a single-line -// comment: -parseSLComment(css);} // If current character is a double or single quote, it's a start -// of a string: -else if(c === '"' || c === "'"){parseString(css,c);} // If current character is a space: -else if(c === ' '){parseSpaces(css);} // If current character is `=`, it must be combined with next `=` -else if(c === '=' && cn === '='){parseEquality(css);} // If we meet `!=`, this must be inequality -else if(c === '!' && cn === '='){parseInequality(css);} // If current character is a punctuation mark: -else if(c in Punctuation){ // Check for CRLF here or just LF -if(c === '\r' && cn === '\n' || c === '\n'){ /* - * If \r we know the next character is \n due to statement above - * so we push a CRLF token type to the token list and importantly - * skip the next character so as not to double count newlines or - * columns etc - */if(c === '\r'){pushToken(TokenType.Newline,'\r\n',col);pos++; // If crlf skip the next character and push crlf token -}else if(c === '\n'){ /* - * If just a Lf newline and not part of CRLF newline we can just - * push punctuation as usual - */pushToken(Punctuation[c],c,col);}ln++; // Go to next line -col = 0; // Reset the column count -}else if(c !== '\r' && c !== '\n'){ // Handle all other punctuation and add to list of tokens -pushToken(Punctuation[c],c,col);} // Go to next line -if(c === ')')urlMode = false; // Exit url mode -if(c === '{')blockMode++; // Enter a block -if(c === '}')blockMode--; // Exit a block -else if(c === '\t' && tabSize > 1)col += tabSize - 1;} // If current character is a decimal digit: -else if(isDecimalDigit(c)){parseDecimalNumber(css);} // If current character is anything else: -else {parseIdentifier(css);}}return tokens;}return getTokens(css);}; \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/scss/mark.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/scss/mark.js deleted file mode 100644 index 823e51d..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/scss/mark.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict';var TokenType=require('../token-types');module.exports = (function(){ /** - * Mark whitespaces and comments - */function markSC(tokens){var tokensLength=tokens.length;var ws=-1; // Flag for whitespaces -var sc=-1; // Flag for whitespaces and comments -var t=undefined; // Current token -// For every token in the token list, mark spaces and line breaks -// as spaces (set both `ws` and `sc` flags). Mark multiline comments -// with `sc` flag. -// If there are several spaces or tabs or line breaks or multiline -// comments in a row, group them: take the last one's index number -// and save it to the first token in the group as a reference: -// e.g., `ws_last = 7` for a group of whitespaces or `sc_last = 9` -// for a group of whitespaces and comments. -for(var i=0;i < tokensLength;i++) {t = tokens[i];switch(t.type){case TokenType.Space:case TokenType.Tab:case TokenType.Newline:t.ws = true;t.sc = true;if(ws === -1)ws = i;if(sc === -1)sc = i;break;case TokenType.CommentML:case TokenType.CommentSL:if(ws !== -1){tokens[ws].ws_last = i - 1;ws = -1;}t.sc = true;break;default:if(ws !== -1){tokens[ws].ws_last = i - 1;ws = -1;}if(sc !== -1){tokens[sc].sc_last = i - 1;sc = -1;}}}if(ws !== -1)tokens[ws].ws_last = i - 1;if(sc !== -1)tokens[sc].sc_last = i - 1;} /** - * Pair brackets - */function markBrackets(tokens){var tokensLength=tokens.length;var ps=[]; // Parentheses -var sbs=[]; // Square brackets -var cbs=[]; // Curly brackets -var t=undefined; // Current token -// For every token in the token list, if we meet an opening (left) -// bracket, push its index number to a corresponding array. -// If we then meet a closing (right) bracket, look at the corresponding -// array. If there are any elements (records about previously met -// left brackets), take a token of the last left bracket (take -// the last index number from the array and find a token with -// this index number) and save right bracket's index as a reference: -for(var i=0;i < tokensLength;i++) {t = tokens[i];switch(t.type){case TokenType.LeftParenthesis:ps.push(i);break;case TokenType.RightParenthesis:if(ps.length){t.left = ps.pop();tokens[t.left].right = i;}break;case TokenType.LeftSquareBracket:sbs.push(i);break;case TokenType.RightSquareBracket:if(sbs.length){t.left = sbs.pop();tokens[t.left].right = i;}break;case TokenType.LeftCurlyBracket:cbs.push(i);break;case TokenType.RightCurlyBracket:if(cbs.length){t.left = cbs.pop();tokens[t.left].right = i;}break;}}}return function(tokens){markBrackets(tokens);markSC(tokens);};})(); \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/scss/parse.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/scss/parse.js deleted file mode 100644 index b5a50fc..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/scss/parse.js +++ /dev/null @@ -1,638 +0,0 @@ -// jscs:disable maximumLineLength -'use strict';var Node=require('../node/basic-node');var NodeType=require('../node/node-types');var TokenType=require('../token-types');var tokens=undefined;var tokensLength=undefined;var pos=undefined;var contexts={'arguments':function(){return checkArguments(pos) && getArguments();},'atkeyword':function(){return checkAtkeyword(pos) && getAtkeyword();},'atrule':function(){return checkAtrule(pos) && getAtrule();},'block':function(){return checkBlock(pos) && getBlock();},'brackets':function(){return checkBrackets(pos) && getBrackets();},'class':function(){return checkClass(pos) && getClass();},'combinator':function(){return checkCombinator(pos) && getCombinator();},'commentML':function(){return checkCommentML(pos) && getCommentML();},'commentSL':function(){return checkCommentSL(pos) && getCommentSL();},'condition':function(){return checkCondition(pos) && getCondition();},'conditionalStatement':function(){return checkConditionalStatement(pos) && getConditionalStatement();},'declaration':function(){return checkDeclaration(pos) && getDeclaration();},'declDelim':function(){return checkDeclDelim(pos) && getDeclDelim();},'default':function(){return checkDefault(pos) && getDefault();},'delim':function(){return checkDelim(pos) && getDelim();},'dimension':function(){return checkDimension(pos) && getDimension();},'expression':function(){return checkExpression(pos) && getExpression();},'extend':function(){return checkExtend(pos) && getExtend();},'function':function(){return checkFunction(pos) && getFunction();},'global':function(){return checkGlobal(pos) && getGlobal();},'ident':function(){return checkIdent(pos) && getIdent();},'important':function(){return checkImportant(pos) && getImportant();},'include':function(){return checkInclude(pos) && getInclude();},'interpolation':function(){return checkInterpolation(pos) && getInterpolation();},'loop':function(){return checkLoop(pos) && getLoop();},'mixin':function(){return checkMixin(pos) && getMixin();},'namespace':function(){return checkNamespace(pos) && getNamespace();},'number':function(){return checkNumber(pos) && getNumber();},'operator':function(){return checkOperator(pos) && getOperator();},'optional':function(){return checkOptional(pos) && getOptional();},'parentheses':function(){return checkParentheses(pos) && getParentheses();},'parentselector':function(){return checkParentSelector(pos) && getParentSelector();},'percentage':function(){return checkPercentage(pos) && getPercentage();},'placeholder':function(){return checkPlaceholder(pos) && getPlaceholder();},'progid':function(){return checkProgid(pos) && getProgid();},'property':function(){return checkProperty(pos) && getProperty();},'propertyDelim':function(){return checkPropertyDelim(pos) && getPropertyDelim();},'pseudoc':function(){return checkPseudoc(pos) && getPseudoc();},'pseudoe':function(){return checkPseudoe(pos) && getPseudoe();},'ruleset':function(){return checkRuleset(pos) && getRuleset();},'s':function(){return checkS(pos) && getS();},'selector':function(){return checkSelector(pos) && getSelector();},'shash':function(){return checkShash(pos) && getShash();},'string':function(){return checkString(pos) && getString();},'stylesheet':function(){return checkStylesheet(pos) && getStylesheet();},'unary':function(){return checkUnary(pos) && getUnary();},'uri':function(){return checkUri(pos) && getUri();},'value':function(){return checkValue(pos) && getValue();},'variable':function(){return checkVariable(pos) && getVariable();},'variableslist':function(){return checkVariablesList(pos) && getVariablesList();},'vhash':function(){return checkVhash(pos) && getVhash();}}; /** - * Stop parsing and display error - * @param {Number=} i Token's index number - */function throwError(i){var ln=i?tokens[i].ln:tokens[pos].ln;throw {line:ln,syntax:'scss'};} /** - * @param {Object} exclude - * @param {Number} i Token's index number - * @returns {Number} - */function checkExcluding(exclude,i){var start=i;while(i < tokensLength) {if(exclude[tokens[i++].type])break;}return i - start - 2;} /** - * @param {Number} start - * @param {Number} finish - * @returns {String} - */function joinValues(start,finish){var s='';for(var i=start;i < finish + 1;i++) {s += tokens[i].value;}return s;} /** - * @param {Number} start - * @param {Number} num - * @returns {String} - */function joinValues2(start,num){if(start + num - 1 >= tokensLength)return;var s='';for(var i=0;i < num;i++) {s += tokens[start + i].value;}return s;}function getLastPosition(content,line,column,colOffset){return typeof content === 'string'?getLastPositionForString(content,line,column,colOffset):getLastPositionForArray(content,line,column,colOffset);}function getLastPositionForString(content,line,column,colOffset){var position=[];if(!content){position = [line,column];if(colOffset)position[1] += colOffset - 1;return position;}var lastLinebreak=content.lastIndexOf('\n');var endsWithLinebreak=lastLinebreak === content.length - 1;var splitContent=content.split('\n');var linebreaksCount=splitContent.length - 1;var prevLinebreak=linebreaksCount === 0 || linebreaksCount === 1?-1:content.length - splitContent[linebreaksCount - 1].length - 2; // Line: -var offset=endsWithLinebreak?linebreaksCount - 1:linebreaksCount;position[0] = line + offset; // Column: -if(endsWithLinebreak){offset = prevLinebreak !== -1?content.length - prevLinebreak:content.length - 1;}else {offset = linebreaksCount !== 0?content.length - lastLinebreak - column - 1:content.length - 1;}position[1] = column + offset;if(!colOffset)return position;if(endsWithLinebreak){position[0]++;position[1] = colOffset;}else {position[1] += colOffset;}return position;}function getLastPositionForArray(content,line,column,colOffset){var position;if(content.length === 0){position = [line,column];}else {var c=content[content.length - 1];if(c.hasOwnProperty('end')){position = [c.end.line,c.end.column];}else {position = getLastPosition(c.content,line,column);}}if(!colOffset)return position;if(tokens[pos - 1].type !== 'Newline'){position[1] += colOffset;}else {position[0]++;position[1] = 1;}return position;}function newNode(type,content,line,column,end){if(!end)end = getLastPosition(content,line,column);return new Node({type:type,content:content,start:{line:line,column:column},end:{line:end[0],column:end[1]},syntax:'scss'});} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkAny(i){return checkBrackets(i) || checkParentheses(i) || checkString(i) || checkVariablesList(i) || checkVariable(i) || checkPlaceholder(i) || checkPercentage(i) || checkDimension(i) || checkNumber(i) || checkUri(i) || checkExpression(i) || checkFunction(i) || checkInterpolation(i) || checkIdent(i) || checkClass(i) || checkUnary(i);} /** - * @returns {Array} - */function getAny(){if(checkBrackets(pos))return getBrackets();else if(checkParentheses(pos))return getParentheses();else if(checkString(pos))return getString();else if(checkVariablesList(pos))return getVariablesList();else if(checkVariable(pos))return getVariable();else if(checkPlaceholder(pos))return getPlaceholder();else if(checkPercentage(pos))return getPercentage();else if(checkDimension(pos))return getDimension();else if(checkNumber(pos))return getNumber();else if(checkUri(pos))return getUri();else if(checkExpression(pos))return getExpression();else if(checkFunction(pos))return getFunction();else if(checkInterpolation(pos))return getInterpolation();else if(checkIdent(pos))return getIdent();else if(checkClass(pos))return getClass();else if(checkUnary(pos))return getUnary();} /** - * Check if token is part of mixin's arguments. - * @param {Number} i Token's index number - * @returns {Number} Length of arguments - */function checkArguments(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;i++;while(i < tokens[start].right) {if(l = checkArgument(i))i += l;else return 0;}return tokens[start].right - start + 1;} /** - * Check if token is valid to be part of arguments list - * @param {Number} i Token's index number - * @returns {Number} Length of argument - */function checkArgument(i){return checkBrackets(i) || checkParentheses(i) || checkDeclaration(i) || checkFunction(i) || checkVariablesList(i) || checkVariable(i) || checkSC(i) || checkDelim(i) || checkDeclDelim(i) || checkString(i) || checkPercentage(i) || checkDimension(i) || checkNumber(i) || checkUri(i) || checkInterpolation(i) || checkIdent(i) || checkVhash(i) || checkOperator(i) || checkUnary(i);} /** - * @returns {Array} Node that is part of arguments list - */function getArgument(){if(checkBrackets(pos))return getBrackets();else if(checkParentheses(pos))return getParentheses();else if(checkDeclaration(pos))return getDeclaration();else if(checkFunction(pos))return getFunction();else if(checkVariablesList(pos))return getVariablesList();else if(checkVariable(pos))return getVariable();else if(checkSC(pos))return getSC();else if(checkDelim(pos))return getDelim();else if(checkDeclDelim(pos))return getDeclDelim();else if(checkString(pos))return getString();else if(checkPercentage(pos))return getPercentage();else if(checkDimension(pos))return getDimension();else if(checkNumber(pos))return getNumber();else if(checkUri(pos))return getUri();else if(checkInterpolation(pos))return getInterpolation();else if(checkIdent(pos))return getIdent();else if(checkVhash(pos))return getVhash();else if(checkOperator(pos))return getOperator();else if(checkUnary(pos))return getUnary();} /** - * Check if token is part of an @-word (e.g. `@import`, `@include`) - * @param {Number} i Token's index number - * @returns {Number} - */function checkAtkeyword(i){var l; // Check that token is `@`: -if(i >= tokensLength || tokens[i++].type !== TokenType.CommercialAt)return 0;return (l = checkIdentOrInterpolation(i))?l + 1:0;} /** - * Get node with @-word - * @returns {Array} `['atkeyword', ['ident', x]]` where `x` is - * an identifier without - * `@` (e.g. `import`, `include`) - */function getAtkeyword(){var startPos=pos;var x=undefined;pos++;x = getIdentOrInterpolation();var token=tokens[startPos];return newNode(NodeType.AtkeywordType,x,token.ln,token.col);} /** - * Check if token is a part of an @-rule - * @param {Number} i Token's index number - * @returns {Number} Length of @-rule - */function checkAtrule(i){var l;if(i >= tokensLength)return 0; // If token already has a record of being part of an @-rule, -// return the @-rule's length: -if(tokens[i].atrule_l !== undefined)return tokens[i].atrule_l; // If token is part of an @-rule, save the rule's type to token: -if(l = checkKeyframesRule(i))tokens[i].atrule_type = 4;else if(l = checkAtruler(i))tokens[i].atrule_type = 1; // @-rule with ruleset -else if(l = checkAtruleb(i))tokens[i].atrule_type = 2; // Block @-rule -else if(l = checkAtrules(i))tokens[i].atrule_type = 3; // Single-line @-rule -else return 0; // If token is part of an @-rule, save the rule's length to token: -tokens[i].atrule_l = l;return l;} /** - * Get node with @-rule - * @returns {Array} - */function getAtrule(){switch(tokens[pos].atrule_type){case 1:return getAtruler(); // @-rule with ruleset -case 2:return getAtruleb(); // Block @-rule -case 3:return getAtrules(); // Single-line @-rule -case 4:return getKeyframesRule();}} /** - * Check if token is part of a block @-rule - * @param {Number} i Token's index number - * @returns {Number} Length of the @-rule - */function checkAtruleb(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(l = checkTsets(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** - * Get node with a block @-rule - * @returns {Array} `['atruleb', ['atkeyword', x], y, ['block', z]]` - */function getAtruleb(){var startPos=pos;var x=undefined;x = [getAtkeyword()].concat(getTsets()).concat([getBlock()]);var token=tokens[startPos];return newNode(NodeType.AtruleType,x,token.ln,token.col);} /** - * Check if token is part of an @-rule with ruleset - * @param {Number} i Token's index number - * @returns {Number} Length of the @-rule - */function checkAtruler(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(l = checkTsets(i))i += l;if(i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket)i++;else return 0;if(l = checkAtrulers(i))i += l;if(i < tokensLength && tokens[i].type === TokenType.RightCurlyBracket)i++;else return 0;return i - start;} /** - * Get node with an @-rule with ruleset - * @returns {Array} ['atruler', ['atkeyword', x], y, z] - */function getAtruler(){var startPos=pos;var x=undefined;x = [getAtkeyword()].concat(getTsets());x.push(getAtrulers());var token=tokens[startPos];return newNode(NodeType.AtruleType,x,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkAtrulers(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;while(l = checkRuleset(i) || checkAtrule(i) || checkSC(i)) {i += l;}if(i < tokensLength)tokens[i].atrulers_end = 1;return i - start;} /** - * @returns {Array} `['atrulers', x]` - */function getAtrulers(){var startPos=pos;var x=undefined;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;x = getSC();while(!tokens[pos].atrulers_end) {if(checkSC(pos))x = x.concat(getSC());else if(checkAtrule(pos))x.push(getAtrule());else if(checkRuleset(pos))x.push(getRuleset());}x = x.concat(getSC());var end=getLastPosition(x,line,column,1);pos++;return newNode(NodeType.BlockType,x,token.ln,token.col,end);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkAtrules(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(l = checkTsets(i))i += l;return i - start;} /** - * @returns {Array} `['atrules', ['atkeyword', x], y]` - */function getAtrules(){var startPos=pos;var x=undefined;x = [getAtkeyword()].concat(getTsets());var token=tokens[startPos];return newNode(NodeType.AtruleType,x,token.ln,token.col);} /** - * Check if token is part of a block (e.g. `{...}`). - * @param {Number} i Token's index number - * @returns {Number} Length of the block - */function checkBlock(i){return i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket?tokens[i].right - i + 1:0;} /** - * Get node with a block - * @returns {Array} `['block', x]` - */function getBlock(){var startPos=pos;var end=tokens[pos].right;var x=[];var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;while(pos < end) {if(checkBlockdecl(pos))x = x.concat(getBlockdecl());else throwError();}var end_=getLastPosition(x,line,column,1);pos = end + 1;return newNode(NodeType.BlockType,x,token.ln,token.col,end_);} /** - * Check if token is part of a declaration (property-value pair) - * @param {Number} i Token's index number - * @returns {Number} Length of the declaration - */function checkBlockdecl(i){var l;if(i >= tokensLength)return 0;if(l = checkBlockdecl1(i))tokens[i].bd_type = 1;else if(l = checkBlockdecl2(i))tokens[i].bd_type = 2;else if(l = checkBlockdecl3(i))tokens[i].bd_type = 3;else if(l = checkBlockdecl4(i))tokens[i].bd_type = 4;else return 0;return l;} /** - * @returns {Array} - */function getBlockdecl(){switch(tokens[pos].bd_type){case 1:return getBlockdecl1();case 2:return getBlockdecl2();case 3:return getBlockdecl3();case 4:return getBlockdecl4();}} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkBlockdecl1(i){var start=i;var l=undefined;if(l = checkSC(i))i += l;if(l = checkConditionalStatement(i))tokens[i].bd_kind = 1;else if(l = checkInclude(i))tokens[i].bd_kind = 2;else if(l = checkExtend(i))tokens[i].bd_kind = 4;else if(l = checkLoop(i))tokens[i].bd_kind = 3;else if(l = checkAtrule(i))tokens[i].bd_kind = 6;else if(l = checkRuleset(i))tokens[i].bd_kind = 7;else if(l = checkDeclaration(i))tokens[i].bd_kind = 5;else return 0;i += l;if(i < tokensLength && (l = checkDeclDelim(i)))i += l;else return 0;if(l = checkSC(i))i += l;return i - start;} /** - * @returns {Array} - */function getBlockdecl1(){var sc=getSC();var x=undefined;switch(tokens[pos].bd_kind){case 1:x = getConditionalStatement();break;case 2:x = getInclude();break;case 3:x = getLoop();break;case 4:x = getExtend();break;case 5:x = getDeclaration();break;case 6:x = getAtrule();break;case 7:x = getRuleset();break;}return sc.concat([x]).concat([getDeclDelim()]).concat(getSC());} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkBlockdecl2(i){var start=i;var l=undefined;if(l = checkSC(i))i += l;if(l = checkConditionalStatement(i))tokens[i].bd_kind = 1;else if(l = checkInclude(i))tokens[i].bd_kind = 2;else if(l = checkExtend(i))tokens[i].bd_kind = 4;else if(l = checkLoop(i))tokens[i].bd_kind = 3;else if(l = checkAtrule(i))tokens[i].bd_kind = 6;else if(l = checkRuleset(i))tokens[i].bd_kind = 7;else if(l = checkDeclaration(i))tokens[i].bd_kind = 5;else return 0;i += l;if(l = checkSC(i))i += l;return i - start;} /** - * @returns {Array} - */function getBlockdecl2(){var sc=getSC();var x=undefined;switch(tokens[pos].bd_kind){case 1:x = getConditionalStatement();break;case 2:x = getInclude();break;case 3:x = getLoop();break;case 4:x = getExtend();break;case 5:x = getDeclaration();break;case 6:x = getAtrule();break;case 7:x = getRuleset();break;}return sc.concat([x]).concat(getSC());} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkBlockdecl3(i){var start=i;var l=undefined;if(l = checkSC(i))i += l;if(l = checkDeclDelim(i))i += l;else return 0;if(l = checkSC(i))i += l;return i - start;} /** - * @returns {Array} `[s0, ['declDelim'], s1]` where `s0` and `s1` are - * are optional whitespaces. - */function getBlockdecl3(){return getSC().concat([getDeclDelim()]).concat(getSC());} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkBlockdecl4(i){return checkSC(i);} /** - * @returns {Array} - */function getBlockdecl4(){return getSC();} /** - * Check if token is part of text inside square brackets, e.g. `[1]` - * @param {Number} i Token's index number - * @returns {Number} - */function checkBrackets(i){if(i >= tokensLength || tokens[i].type !== TokenType.LeftSquareBracket)return 0;return tokens[i].right - i + 1;} /** - * Get node with text inside parentheses or square brackets (e.g. `(1)`) - * @return {Node} - */function getBrackets(){var startPos=pos;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;var tsets=getTsets();var end=getLastPosition(tsets,line,column,1);pos++;return newNode(NodeType.BracketsType,tsets,token.ln,token.col,end);} /** - * Check if token is part of a class selector (e.g. `.abc`) - * @param {Number} i Token's index number - * @returns {Number} Length of the class selector - */function checkClass(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(tokens[i].class_l)return tokens[i].class_l;if(tokens[i++].type !== TokenType.FullStop)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;} /** - * Get node with a class selector - * @returns {Array} `['class', ['ident', x]]` where x is a class's - * identifier (without `.`, e.g. `abc`). - */function getClass(){var startPos=pos;var x=[];pos++;x = x.concat(getIdentOrInterpolation());var token=tokens[startPos];return newNode(NodeType.ClassType,x,token.ln,token.col);}function checkCombinator(i){if(i >= tokensLength)return 0;var l=undefined;if(l = checkCombinator1(i))tokens[i].combinatorType = 1;else if(l = checkCombinator2(i))tokens[i].combinatorType = 2;else if(l = checkCombinator3(i))tokens[i].combinatorType = 3;return l;}function getCombinator(){var type=tokens[pos].combinatorType;if(type === 1)return getCombinator1();if(type === 2)return getCombinator2();if(type === 3)return getCombinator3();} /** - * (1) `||` - */function checkCombinator1(i){if(tokens[i].type === TokenType.VerticalLine && tokens[i + 1].type === TokenType.VerticalLine)return 2;else return 0;}function getCombinator1(){var type=NodeType.CombinatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='||';pos += 2;return newNode(type,content,line,column);} /** - * (1) `>` - * (2) `+` - * (3) `~` - */function checkCombinator2(i){var type=tokens[i].type;if(type === TokenType.PlusSign || type === TokenType.GreaterThanSign || type === TokenType.Tilde)return 1;else return 0;}function getCombinator2(){var type=NodeType.CombinatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=tokens[pos++].value;return newNode(type,content,line,column);} /** - * (1) `/panda/` - */function checkCombinator3(i){var start=i;if(tokens[i].type === TokenType.Solidus)i++;else return 0;var l=undefined;if(l = checkIdent(i))i += l;else return 0;if(tokens[i].type === TokenType.Solidus)i++;else return 0;return i - start;}function getCombinator3(){var type=NodeType.CombinatorType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `/`. -pos++;var ident=getIdent(); // Skip `/`. -pos++;var content='/' + ident.content + '/';return newNode(type,content,line,column);} /** - * Check if token is a multiline comment. - * @param {Number} i Token's index number - * @returns {Number} `1` if token is a multiline comment, otherwise `0` - */function checkCommentML(i){return i < tokensLength && tokens[i].type === TokenType.CommentML?1:0;} /** - * Get node with a multiline comment - * @returns {Array} `['commentML', x]` where `x` - * is the comment's text (without `/*` and `* /`). - */function getCommentML(){var startPos=pos;var s=tokens[pos].value.substring(2);var l=s.length;var token=tokens[startPos];var line=token.ln;var column=token.col;if(s.charAt(l - 2) === '*' && s.charAt(l - 1) === '/')s = s.substring(0,l - 2);var end=getLastPosition(s,line,column,2);if(end[0] === line)end[1] += 2;pos++;return newNode(NodeType.CommentMLType,s,token.ln,token.col,end);} /** - * Check if token is part of a single-line comment. - * @param {Number} i Token's index number - * @returns {Number} `1` if token is a single-line comment, otherwise `0` - */function checkCommentSL(i){return i < tokensLength && tokens[i].type === TokenType.CommentSL?1:0;} /** - * Get node with a single-line comment. - * @returns {Array} `['commentSL', x]` where `x` is comment's message - * (without `//`) - */function getCommentSL(){var startPos=pos;var x=undefined;var token=tokens[startPos];var line=token.ln;var column=token.col;x = tokens[pos++].value.substring(2);var end=getLastPosition(x,line,column + 2);return newNode(NodeType.CommentSLType,x,token.ln,token.col,end);} /** - * Check if token is part of a condition - * (e.g. `@if ...`, `@else if ...` or `@else ...`). - * @param {Number} i Token's index number - * @returns {Number} Length of the condition - */function checkCondition(i){var start=i;var l=undefined;var _i=undefined;var s=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(['if','else'].indexOf(tokens[start + 1].value) < 0)return 0;while(i < tokensLength) {if(l = checkBlock(i))break;s = checkSC(i);_i = i + s;if(l = _checkCondition(_i))i += l + s;else break;}return i - start;}function _checkCondition(i){return checkVariable(i) || checkNumber(i) || checkInterpolation(i) || checkIdent(i) || checkOperator(i) || checkCombinator(i) || checkString(i);} /** - * Get node with a condition. - * @returns {Array} `['condition', x]` - */function getCondition(){var startPos=pos;var x=[];var s;var _pos;x.push(getAtkeyword());while(pos < tokensLength) {if(checkBlock(pos))break;s = checkSC(pos);_pos = pos + s;if(!_checkCondition(_pos))break;if(s)x = x.concat(getSC());x.push(_getCondition());}var token=tokens[startPos];return newNode(NodeType.ConditionType,x,token.ln,token.col);}function _getCondition(){if(checkVariable(pos))return getVariable();if(checkNumber(pos))return getNumber();if(checkInterpolation(pos))return getInterpolation();if(checkIdent(pos))return getIdent();if(checkOperator(pos))return getOperator();if(checkCombinator(pos))return getCombinator();if(checkString(pos))return getString();} /** - * Check if token is part of a conditional statement - * (e.g. `@if ... {} @else if ... {} @else ... {}`). - * @param {Number} i Token's index number - * @returns {Number} Length of the condition - */function checkConditionalStatement(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkCondition(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** - * Get node with a condition. - * @returns {Array} `['condition', x]` - */function getConditionalStatement(){var startPos=pos;var x=[];x.push(getCondition());x = x.concat(getSC());x.push(getBlock());var token=tokens[startPos];return newNode(NodeType.ConditionalStatementType,x,token.ln,token.col);} /** - * Check if token is part of a declaration (property-value pair) - * @param {Number} i Token's index number - * @returns {Number} Length of the declaration - */function checkDeclaration(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkProperty(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkPropertyDelim(i))i++;else return 0;if(l = checkSC(i))i += l;if(l = checkValue(i))i += l;else return 0;return i - start;} /** - * Get node with a declaration - * @returns {Array} `['declaration', ['property', x], ['propertyDelim'], - * ['value', y]]` - */function getDeclaration(){var startPos=pos;var x=[];x.push(getProperty());x = x.concat(getSC());x.push(getPropertyDelim());x = x.concat(getSC());x.push(getValue());var token=tokens[startPos];return newNode(NodeType.DeclarationType,x,token.ln,token.col);} /** - * Check if token is a semicolon - * @param {Number} i Token's index number - * @returns {Number} `1` if token is a semicolon, otherwise `0` - */function checkDeclDelim(i){return i < tokensLength && tokens[i].type === TokenType.Semicolon?1:0;} /** - * Get node with a semicolon - * @returns {Array} `['declDelim']` - */function getDeclDelim(){var startPos=pos++;var token=tokens[startPos];return newNode(NodeType.DeclDelimType,';',token.ln,token.col);} /** - * Check if token if part of `!default` word. - * @param {Number} i Token's index number - * @returns {Number} Length of the `!default` word - */function checkDefault(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark)return 0;if(l = checkSC(i))i += l;if(tokens[i].value === 'default'){tokens[start].defaultEnd = i;return i - start + 1;}else {return 0;}} /** - * Get node with a `!default` word - * @returns {Array} `['default', sc]` where `sc` is optional whitespace - */function getDefault(){var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,token.defaultEnd);pos = token.defaultEnd + 1;return newNode(NodeType.DefaultType,content,line,column);} /** - * Check if token is a comma - * @param {Number} i Token's index number - * @returns {Number} `1` if token is a comma, otherwise `0` - */function checkDelim(i){return i < tokensLength && tokens[i].type === TokenType.Comma?1:0;} /** - * Get node with a comma - * @returns {Array} `['delim']` - */function getDelim(){var startPos=pos;pos++;var token=tokens[startPos];return newNode(NodeType.DelimType,',',token.ln,token.col);} /** - * Check if token is part of a number with dimension unit (e.g. `10px`) - * @param {Number} i Token's index number - * @returns {Number} - */function checkDimension(i){var ln=checkNumber(i);var li=undefined;if(i >= tokensLength || !ln || i + ln >= tokensLength)return 0;return (li = checkNmName2(i + ln))?ln + li:0;} /** - * Get node of a number with dimension unit - * @returns {Array} `['dimension', ['number', x], ['ident', y]]` where - * `x` is a number converted to string (e.g. `'10'`) and `y` is - * a dimension unit (e.g. `'px'`). - */function getDimension(){var startPos=pos;var x=[getNumber()];var token=tokens[pos];var ident=newNode(NodeType.IdentType,getNmName2(),token.ln,token.col);x.push(ident);token = tokens[startPos];return newNode(NodeType.DimensionType,x,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkExpression(i){var start=i;if(i >= tokensLength || tokens[i++].value !== 'expression' || i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;return tokens[i].right - start + 1;} /** - * @returns {Array} - */function getExpression(){var startPos=pos;var e;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;e = joinValues(pos + 1,tokens[pos].right - 1);var end=getLastPosition(e,line,column,1);if(end[0] === line)end[1] += 11;pos = tokens[pos].right + 1;return newNode(NodeType.ExpressionType,e,token.ln,token.col,end);}function checkExtend(i){var l=0;if(l = checkExtend1(i))tokens[i].extend_child = 1;else if(l = checkExtend2(i))tokens[i].extend_child = 2;return l;}function getExtend(){var type=tokens[pos].extend_child;if(type === 1)return getExtend1();else if(type === 2)return getExtend2();} /** - * Checks if token is part of an extend with `!optional` flag. - * @param {Number} i - */function checkExtend1(i){var start=i;var l;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'extend')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkSelectorsGroup(i))i += l;else return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkOptional(i))i += l;else return 0;return i - start;}function getExtend1(){var startPos=pos;var x=[].concat([getAtkeyword()],getSC(),getSelectorsGroup(),getSC(),[getOptional()]);var token=tokens[startPos];return newNode(NodeType.ExtendType,x,token.ln,token.col);} /** - * Checks if token is part of an extend without `!optional` flag. - * @param {Number} i - */function checkExtend2(i){var start=i;var l;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'extend')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkSelectorsGroup(i))i += l;else return 0;return i - start;}function getExtend2(){var startPos=pos;var x=[].concat([getAtkeyword()],getSC(),getSelectorsGroup());var token=tokens[startPos];return newNode(NodeType.ExtendType,x,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkFunction(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i < tokensLength && tokens[i].type === TokenType.LeftParenthesis?tokens[i].right - start + 1:0;} /** - * @returns {Array} - */function getFunction(){var startPos=pos;var x=getIdentOrInterpolation();var body=undefined;body = getArguments();x.push(body);var token=tokens[startPos];return newNode(NodeType.FunctionType,x,token.ln,token.col);} /** - * @returns {Array} - */function getArguments(){var startPos=pos;var x=[];var body=undefined;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;while(pos < tokensLength && tokens[pos].type !== TokenType.RightParenthesis) {if(checkDeclaration(pos))x.push(getDeclaration());else if(checkArgument(pos)){body = getArgument();if(typeof body.content === 'string')x.push(body);else x = x.concat(body);}else if(checkClass(pos))x.push(getClass());else throwError();}var end=getLastPosition(x,line,column,1);pos++;return newNode(NodeType.ArgumentsType,x,token.ln,token.col,end);} /** - * Check if token is part of an identifier - * @param {Number} i Token's index number - * @returns {Number} Length of the identifier - */function checkIdent(i){var start=i;var interpolations=[];var wasIdent=undefined;var wasInt=false;var l=undefined;if(i >= tokensLength)return 0; // Check if token is part of an identifier starting with `_`: -if(tokens[i].type === TokenType.LowLine)return checkIdentLowLine(i);if(tokens[i].type === TokenType.HyphenMinus && tokens[i + 1].type === TokenType.DecimalNumber)return 0; // If token is a character, `-`, `$` or `*`, skip it & continue: -if(l = _checkIdent(i))i += l;else return 0; // Remember if previous token's type was identifier: -wasIdent = tokens[i - 1].type === TokenType.Identifier;while(i < tokensLength) {l = _checkIdent(i);if(!l)break;wasIdent = true;i += l;}if(!wasIdent && !wasInt && tokens[start].type !== TokenType.Asterisk)return 0;tokens[start].ident_last = i - 1;if(interpolations.length)tokens[start].interpolations = interpolations;return i - start;}function _checkIdent(i){if(tokens[i].type === TokenType.HyphenMinus || tokens[i].type === TokenType.Identifier || tokens[i].type === TokenType.DollarSign || tokens[i].type === TokenType.LowLine || tokens[i].type === TokenType.DecimalNumber || tokens[i].type === TokenType.Asterisk)return 1;return 0;} /** - * Check if token is part of an identifier starting with `_` - * @param {Number} i Token's index number - * @returns {Number} Length of the identifier - */function checkIdentLowLine(i){var start=i;if(i++ >= tokensLength)return 0;for(;i < tokensLength;i++) {if(tokens[i].type !== TokenType.HyphenMinus && tokens[i].type !== TokenType.DecimalNumber && tokens[i].type !== TokenType.LowLine && tokens[i].type !== TokenType.Identifier)break;} // Save index number of the last token of the identifier: -tokens[start].ident_last = i - 1;return i - start;} /** - * Get node with an identifier - * @returns {Array} `['ident', x]` where `x` is identifier's name - */function getIdent(){var startPos=pos;var x=joinValues(pos,tokens[pos].ident_last);pos = tokens[pos].ident_last + 1;var token=tokens[startPos];return newNode(NodeType.IdentType,x,token.ln,token.col);}function checkIdentOrInterpolation(i){var start=i;var l=undefined;while(i < tokensLength) {if(l = checkInterpolation(i) || checkIdent(i))i += l;else break;}return i - start;}function getIdentOrInterpolation(){var x=[];while(pos < tokensLength) {if(checkInterpolation(pos))x.push(getInterpolation());else if(checkIdent(pos))x.push(getIdent());else break;}return x;} /** - * Check if token is part of `!important` word - * @param {Number} i Token's index number - * @returns {Number} - */function checkImportant(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark)return 0;if(l = checkSC(i))i += l;if(tokens[i].value === 'important'){tokens[start].importantEnd = i;return i - start + 1;}else {return 0;}} /** - * Get node with `!important` word - * @returns {Array} `['important', sc]` where `sc` is optional whitespace - */function getImportant(){var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,token.importantEnd);pos = token.importantEnd + 1;return newNode(NodeType.ImportantType,content,line,column);} /** - * Check if token is part of an included mixin (`@include` or `@extend` - * directive). - * @param {Number} i Token's index number - * @returns {Number} Length of the included mixin - */function checkInclude(i){var l;if(i >= tokensLength)return 0;if(l = checkInclude1(i))tokens[i].include_type = 1;else if(l = checkInclude2(i))tokens[i].include_type = 2;else if(l = checkInclude3(i))tokens[i].include_type = 3;else if(l = checkInclude4(i))tokens[i].include_type = 4;else if(l = checkInclude5(i))tokens[i].include_type = 5;return l;} /** - * Check if token is part of `!global` word - * @param {Number} i Token's index number - * @returns {Number} - */function checkGlobal(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark)return 0;if(l = checkSC(i))i += l;if(tokens[i].value === 'global'){tokens[start].globalEnd = i;return i - start + 1;}else {return 0;}} /** - * Get node with `!global` word - */function getGlobal(){var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,token.globalEnd);pos = token.globalEnd + 1;return newNode(NodeType.GlobalType,content,line,column);} /** - * Get node with included mixin - * @returns {Array} `['include', x]` - */function getInclude(){switch(tokens[pos].include_type){case 1:return getInclude1();case 2:return getInclude2();case 3:return getInclude3();case 4:return getInclude4();case 5:return getInclude5();}} /** - * Get node with included mixin with keyfames selector like - * `@include nani(foo) { 0% {}}` - * @param {Number} i Token's index number - * @returns {Number} Length of the include - */function checkInclude1(i){var start=i;var l=undefined;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'include')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkArguments(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkKeyframesBlocks(i))i += l;else return 0;return i - start;} /** - * Get node with included mixin with keyfames selector like - * `@include nani(foo) { 0% {}}` - * @returns {Array} `['include', ['atkeyword', x], sc, ['selector', y], sc, - * ['arguments', z], sc, ['block', q], sc` where `x` is `include` or - * `extend`, `y` is mixin's identifier (selector), `z` are arguments - * passed to the mixin, `q` is block passed to the mixin containing a - * ruleset > selector > keyframesSelector, and `sc` are optional - * whitespaces - */function getInclude1(){var startPos=pos;var x=[].concat(getAtkeyword(),getSC(),getIdentOrInterpolation(),getSC(),getArguments(),getSC(),getKeyframesBlocks());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** - * Check if token is part of an included mixin like `@include nani(foo) {...}` - * @param {Number} i Token's index number - * @returns {Number} Length of the include - */function checkInclude2(i){var start=i;var l=undefined;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'include')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkArguments(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** - * Get node with included mixin like `@include nani(foo) {...}` - * @returns {Array} `['include', ['atkeyword', x], sc, ['selector', y], sc, - * ['arguments', z], sc, ['block', q], sc` where `x` is `include` or - * `extend`, `y` is mixin's identifier (selector), `z` are arguments - * passed to the mixin, `q` is block passed to the mixin and `sc` - * are optional whitespaces - */function getInclude2(){var startPos=pos;var x=[].concat(getAtkeyword(),getSC(),getIdentOrInterpolation(),getSC(),getArguments(),getSC(),getBlock());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** - * Check if token is part of an included mixin like `@include nani(foo)` - * @param {Number} i Token's index number - * @returns {Number} Length of the include - */function checkInclude3(i){var start=i;var l=undefined;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'include')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkArguments(i))i += l;else return 0;return i - start;} /** - * Get node with included mixin like `@include nani(foo)` - * @returns {Array} `['include', ['atkeyword', x], sc, ['selector', y], sc, - * ['arguments', z], sc]` where `x` is `include` or `extend`, `y` is - * mixin's identifier (selector), `z` are arguments passed to the - * mixin and `sc` are optional whitespaces - */function getInclude3(){var startPos=pos;var x=[].concat(getAtkeyword(),getSC(),getIdentOrInterpolation(),getSC(),getArguments());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** - * Check if token is part of an included mixin with a content block passed - * as an argument (e.g. `@include nani {...}`) - * @param {Number} i Token's index number - * @returns {Number} Length of the mixin - */function checkInclude4(i){var start=i;var l=undefined;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'include')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** - * Get node with an included mixin with a content block passed - * as an argument (e.g. `@include nani {...}`) - * @returns {Array} `['include', x]` - */function getInclude4(){var startPos=pos;var x=[].concat(getAtkeyword(),getSC(),getIdentOrInterpolation(),getSC(),getBlock());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkInclude5(i){var start=i;var l=undefined;if(l = checkAtkeyword(i))i += l;else return 0;if(tokens[start + 1].value !== 'include')return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;} /** - * @returns {Array} `['include', x]` - */function getInclude5(){var startPos=pos;var x=[].concat(getAtkeyword(),getSC(),getIdentOrInterpolation());var token=tokens[startPos];return newNode(NodeType.IncludeType,x,token.ln,token.col);} /** - * Check if token is part of an interpolated variable (e.g. `#{$nani}`). - * @param {Number} i Token's index number - * @returns {Number} - */function checkInterpolation(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.NumberSign || !tokens[i + 1] || tokens[i + 1].type !== TokenType.LeftCurlyBracket)return 0;i += 2;while(tokens[i].type !== TokenType.RightCurlyBracket) {if(l = checkArgument(i))i += l;else return 0;}return tokens[i].type === TokenType.RightCurlyBracket?i - start + 1:0;} /** - * Get node with an interpolated variable - * @returns {Array} `['interpolation', x]` - */function getInterpolation(){var startPos=pos;var x=[];var token=tokens[startPos];var line=token.ln;var column=token.col; // Skip `#{`: -pos += 2;while(pos < tokensLength && tokens[pos].type !== TokenType.RightCurlyBracket) {var body=getArgument();if(typeof body.content === 'string')x.push(body);else x = x.concat(body);}var end=getLastPosition(x,line,column,1); // Skip `}`: -pos++;return newNode(NodeType.InterpolationType,x,token.ln,token.col,end);}function checkKeyframesBlock(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkKeyframesSelector(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;}function getKeyframesBlock(){var type=NodeType.RulesetType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[].concat([getKeyframesSelector()],getSC(),[getBlock()]);return newNode(type,content,line,column);}function checkKeyframesBlocks(i){var start=i;var l=undefined;if(i < tokensLength && tokens[i].type === TokenType.LeftCurlyBracket)i++;else return 0;if(l = checkSC(i))i += l;if(l = checkKeyframesBlock(i))i += l;else return 0;while(tokens[i].type !== TokenType.RightCurlyBracket) {if(l = checkSC(i))i += l;else if(l = checkKeyframesBlock(i))i += l;else break;}if(i < tokensLength && tokens[i].type === TokenType.RightCurlyBracket)i++;else return 0;return i - start;}function getKeyframesBlocks(){var type=NodeType.BlockType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];var keyframesBlocksEnd=token.right; // Skip `{`. -pos++;while(pos < keyframesBlocksEnd) {if(checkSC(pos))content = content.concat(getSC());else if(checkKeyframesBlock(pos))content.push(getKeyframesBlock());}var end=getLastPosition(content,line,column,1); // Skip `}`. -pos++;return newNode(type,content,line,column,end);} /** - * Check if token is part of a @keyframes rule. - * @param {Number} i Token's index number - * @return {Number} Length of the @keyframes rule - */function checkKeyframesRule(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;var atruleName=joinValues2(i - l,l);if(atruleName.indexOf('keyframes') === -1)return 0;if(l = checkSC(i))i += l;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkKeyframesBlocks(i))i += l;else return 0;return i - start;} /** - * @return {Node} - */function getKeyframesRule(){var type=NodeType.AtruleType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[].concat([getAtkeyword()],getSC(),getIdentOrInterpolation(),getSC(),[getKeyframesBlocks()]);return newNode(type,content,line,column);}function checkKeyframesSelector(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkIdent(i)){ // Valid selectors are only `from` and `to`. -var selector=joinValues2(i,l);if(selector !== 'from' && selector !== 'to')return 0;i += l;tokens[start].keyframesSelectorType = 1;}else if(l = checkPercentage(i)){i += l;tokens[start].keyframesSelectorType = 2;}else if(l = checkInterpolation(i)){i += l;tokens[start].keyframesSelectorType = 3;}else {return 0;}return i - start;}function getKeyframesSelector(){var keyframesSelectorType=NodeType.KeyframesSelectorType;var selectorType=NodeType.SelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(token.keyframesSelectorType === 1){content.push(getIdent());}else if(token.keyframesSelectorType === 2){content.push(getPercentage());}else {content.push(getInterpolation());}var keyframesSelector=newNode(keyframesSelectorType,content,line,column);return newNode(selectorType,[keyframesSelector],line,column);} /** - * Check if token is part of a loop. - * @param {Number} i Token's index number - * @returns {Number} Length of the loop - */function checkLoop(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkAtkeyword(i))i += l;else return 0;if(['for','each','while'].indexOf(tokens[start + 1].value) < 0)return 0;while(i < tokensLength) {if(l = checkBlock(i)){i += l;break;}else if(l = checkVariable(i) || checkNumber(i) || checkInterpolation(i) || checkIdent(i) || checkSC(i) || checkOperator(i) || checkCombinator(i) || checkString(i))i += l;else return 0;}return i - start;} /** - * Get node with a loop. - * @returns {Array} `['loop', x]` - */function getLoop(){var startPos=pos;var x=[];x.push(getAtkeyword());while(pos < tokensLength) {if(checkBlock(pos)){x.push(getBlock());break;}else if(checkVariable(pos))x.push(getVariable());else if(checkNumber(pos))x.push(getNumber());else if(checkInterpolation(pos))x.push(getInterpolation());else if(checkIdent(pos))x.push(getIdent());else if(checkOperator(pos))x.push(getOperator());else if(checkCombinator(pos))x.push(getCombinator());else if(checkSC(pos))x = x.concat(getSC());else if(checkString(pos))x.push(getString());}var token=tokens[startPos];return newNode(NodeType.LoopType,x,token.ln,token.col);} /** - * Check if token is part of a mixin - * @param {Number} i Token's index number - * @returns {Number} Length of the mixin - */function checkMixin(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if((l = checkAtkeyword(i)) && tokens[i + 1].value === 'mixin')i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkArguments(i))i += l;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;} /** - * Get node with a mixin - * @returns {Array} `['mixin', x]` - */function getMixin(){var startPos=pos;var x=[getAtkeyword()];x = x.concat(getSC());if(checkIdentOrInterpolation(pos))x = x.concat(getIdentOrInterpolation());x = x.concat(getSC());if(checkArguments(pos))x.push(getArguments());x = x.concat(getSC());if(checkBlock(pos))x.push(getBlock());var token=tokens[startPos];return newNode(NodeType.MixinType,x,token.ln,token.col);} /** - * Check if token is a namespace sign (`|`) - * @param {Number} i Token's index number - * @returns {Number} `1` if token is `|`, `0` if not - */function checkNamespace(i){return i < tokensLength && tokens[i].type === TokenType.VerticalLine?1:0;} /** - * Get node with a namespace sign - * @returns {Array} `['namespace']` - */function getNamespace(){var startPos=pos;pos++;var token=tokens[startPos];return newNode(NodeType.NamespaceType,'|',token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkNmName2(i){if(tokens[i].type === TokenType.Identifier)return 1;else if(tokens[i].type !== TokenType.DecimalNumber)return 0;i++;return i < tokensLength && tokens[i].type === TokenType.Identifier?2:1;} /** - * @returns {String} - */function getNmName2(){var s=tokens[pos].value;if(tokens[pos++].type === TokenType.DecimalNumber && pos < tokensLength && tokens[pos].type === TokenType.Identifier)s += tokens[pos++].value;return s;} /** - * Check if token is part of a number - * @param {Number} i Token's index number - * @returns {Number} Length of number - */function checkNumber(i){if(i >= tokensLength)return 0;if(tokens[i].number_l)return tokens[i].number_l; // `10`: -if(i < tokensLength && tokens[i].type === TokenType.DecimalNumber && (!tokens[i + 1] || tokens[i + 1] && tokens[i + 1].type !== TokenType.FullStop))return tokens[i].number_l = 1,tokens[i].number_l; // `10.`: -if(i < tokensLength && tokens[i].type === TokenType.DecimalNumber && tokens[i + 1] && tokens[i + 1].type === TokenType.FullStop && (!tokens[i + 2] || tokens[i + 2].type !== TokenType.DecimalNumber))return tokens[i].number_l = 2,tokens[i].number_l; // `.10`: -if(i < tokensLength && tokens[i].type === TokenType.FullStop && tokens[i + 1].type === TokenType.DecimalNumber)return tokens[i].number_l = 2,tokens[i].number_l; // `10.10`: -if(i < tokensLength && tokens[i].type === TokenType.DecimalNumber && tokens[i + 1] && tokens[i + 1].type === TokenType.FullStop && tokens[i + 2] && tokens[i + 2].type === TokenType.DecimalNumber)return tokens[i].number_l = 3,tokens[i].number_l;return 0;} /** - * Get node with number - * @returns {Array} `['number', x]` where `x` is a number converted - * to string. - */function getNumber(){var s='';var startPos=pos;var l=tokens[pos].number_l;for(var j=0;j < l;j++) {s += tokens[pos + j].value;}pos += l;var token=tokens[startPos];return newNode(NodeType.NumberType,s,token.ln,token.col);} /** - * Check if token is an operator (`/`, `%`, `,`, `:` or `=`). - * @param {Number} i Token's index number - * @returns {Number} `1` if token is an operator, otherwise `0` - */function checkOperator(i){if(i >= tokensLength)return 0;switch(tokens[i].type){case TokenType.Solidus:case TokenType.PercentSign:case TokenType.Comma:case TokenType.Colon:case TokenType.EqualsSign:case TokenType.EqualitySign:case TokenType.InequalitySign:case TokenType.LessThanSign:case TokenType.GreaterThanSign:case TokenType.Asterisk:return 1;}return 0;} /** - * Get node with an operator - * @returns {Array} `['operator', x]` where `x` is an operator converted - * to string. - */function getOperator(){var startPos=pos;var x=tokens[pos++].value;var token=tokens[startPos];return newNode(NodeType.OperatorType,x,token.ln,token.col);} /** - * Check if token is part of `!optional` word - * @param {Number} i Token's index number - * @returns {Number} - */function checkOptional(i){var start=i;var l=undefined;if(i >= tokensLength || tokens[i++].type !== TokenType.ExclamationMark)return 0;if(l = checkSC(i))i += l;if(tokens[i].value === 'optional'){tokens[start].optionalEnd = i;return i - start + 1;}else {return 0;}} /** - * Get node with `!optional` word - */function getOptional(){var token=tokens[pos];var line=token.ln;var column=token.col;var content=joinValues(pos,token.optionalEnd);pos = token.optionalEnd + 1;return newNode(NodeType.OptionalType,content,line,column);} /** - * Check if token is part of text inside parentheses, e.g. `(1)` - * @param {Number} i Token's index number - * @return {Number} - */function checkParentheses(i){if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;return tokens[i].right - i + 1;} /** - * Get node with text inside parentheses, e.g. `(1)` - * @return {Node} - */function getParentheses(){var type=NodeType.ParenthesesType;var token=tokens[pos];var line=token.ln;var column=token.col;pos++;var tsets=getTsets();var end=getLastPosition(tsets,line,column,1);pos++;return newNode(type,tsets,line,column,end);} /** - * Check if token is a parent selector (`&`). - * @param {Number} i Token's index number - * @returns {Number} - */function checkParentSelector(i){return i < tokensLength && tokens[i].type === TokenType.Ampersand?1:0;} /** - * Get node with a parent selector - */function getParentSelector(){var startPos=pos;pos++;var token=tokens[startPos];return newNode(NodeType.ParentSelectorType,'&',token.ln,token.col);}function checkParentSelectorExtension(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;while(i < tokensLength) {if(l = checkNumber(i) || checkIdentOrInterpolation(i))i += l;else break;}return i - start;}function getParentSelectorExtension(){var type=NodeType.ParentSelectorExtensionType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];while(pos < tokensLength) {if(checkNumber(pos))content.push(getNumber());else if(checkIdentOrInterpolation(pos))content = content.concat(getIdentOrInterpolation());else break;}return newNode(type,content,line,column);}function checkParentSelectorWithExtension(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkParentSelector(i))i += l;else return 0;if(l = checkParentSelectorExtension(i))i += l;return i - start;}function getParentSelectorWithExtension(){var content=[getParentSelector()];if(checkParentSelectorExtension(pos))content.push(getParentSelectorExtension());return content;} /** - * Check if token is part of a number with percent sign (e.g. `10%`) - * @param {Number} i Token's index number - * @returns {Number} - */function checkPercentage(i){var x;if(i >= tokensLength)return 0;x = checkNumber(i);if(!x || i + x >= tokensLength)return 0;return tokens[i + x].type === TokenType.PercentSign?x + 1:0;} /** - * Get node of number with percent sign - * @returns {Array} `['percentage', ['number', x]]` where `x` is a number - * (without percent sign) converted to string. - */function getPercentage(){var startPos=pos;var x=[getNumber()];var token=tokens[startPos];var line=token.ln;var column=token.col;var end=getLastPosition(x,line,column,1);pos++;return newNode(NodeType.PercentageType,x,token.ln,token.col,end);} /** - * Check if token is part of a placeholder selector (e.g. `%abc`). - * @param {Number} i Token's index number - * @returns {Number} Length of the selector - */function checkPlaceholder(i){var l;if(i >= tokensLength)return 0;if(tokens[i].placeholder_l)return tokens[i].placeholder_l;if(tokens[i].type === TokenType.PercentSign && (l = checkIdentOrInterpolation(i + 1))){tokens[i].placeholder_l = l + 1;return l + 1;}else return 0;} /** - * Get node with a placeholder selector - * @returns {Array} `['placeholder', ['ident', x]]` where x is a placeholder's - * identifier (without `%`, e.g. `abc`). - */function getPlaceholder(){var startPos=pos;pos++;var x=getIdentOrInterpolation();var token=tokens[startPos];return newNode(NodeType.PlaceholderType,x,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkProgid(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(joinValues2(i,6) === 'progid:DXImageTransform.Microsoft.')i += 6;else return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(tokens[i].type === TokenType.LeftParenthesis){tokens[start].progid_end = tokens[i].right;i = tokens[i].right + 1;}else return 0;return i - start;} /** - * @returns {Array} - */function getProgid(){var startPos=pos;var progid_end=tokens[pos].progid_end;var x=joinValues(pos,progid_end);pos = progid_end + 1;var token=tokens[startPos];return newNode(NodeType.ProgidType,x,token.ln,token.col);} /** - * Check if token is part of a property - * @param {Number} i Token's index number - * @returns {Number} Length of the property - */function checkProperty(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkVariable(i) || checkIdentOrInterpolation(i))i += l;else return 0;return i - start;} /** - * Get node with a property - * @returns {Array} `['property', x]` - */function getProperty(){var startPos=pos;var x=[];if(checkVariable(pos)){x.push(getVariable());}else {x = x.concat(getIdentOrInterpolation());}var token=tokens[startPos];return newNode(NodeType.PropertyType,x,token.ln,token.col);} /** - * Check if token is a colon - * @param {Number} i Token's index number - * @returns {Number} `1` if token is a colon, otherwise `0` - */function checkPropertyDelim(i){return i < tokensLength && tokens[i].type === TokenType.Colon?1:0;} /** - * Get node with a colon - * @returns {Array} `['propertyDelim']` - */function getPropertyDelim(){var startPos=pos;pos++;var token=tokens[startPos];return newNode(NodeType.PropertyDelimType,':',token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkPseudo(i){return checkPseudoe(i) || checkPseudoc(i);} /** - * @returns {Array} - */function getPseudo(){if(checkPseudoe(pos))return getPseudoe();if(checkPseudoc(pos))return getPseudoc();} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkPseudoe(i){var l;if(i >= tokensLength || tokens[i++].type !== TokenType.Colon || i >= tokensLength || tokens[i++].type !== TokenType.Colon)return 0;return (l = checkIdentOrInterpolation(i))?l + 2:0;} /** - * @returns {Array} - */function getPseudoe(){var startPos=pos;pos += 2;var x=getIdentOrInterpolation();var token=tokens[startPos];return newNode(NodeType.PseudoeType,x,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkPseudoc(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.Colon)return 0;if(l = checkPseudoClass3(i))tokens[i].pseudoClassType = 3;else if(l = checkPseudoClass4(i))tokens[i].pseudoClassType = 4;else if(l = checkPseudoClass5(i))tokens[i].pseudoClassType = 5;else if(l = checkPseudoClass1(i))tokens[i].pseudoClassType = 1;else if(l = checkPseudoClass2(i))tokens[i].pseudoClassType = 2;else if(l = checkPseudoClass6(i))tokens[i].pseudoClassType = 6;else return 0;return l;} /** - * @returns {Array} - */function getPseudoc(){var childType=tokens[pos].pseudoClassType;if(childType === 1)return getPseudoClass1();if(childType === 2)return getPseudoClass2();if(childType === 3)return getPseudoClass3();if(childType === 4)return getPseudoClass4();if(childType === 5)return getPseudoClass5();if(childType === 6)return getPseudoClass6();} /** - * (-) `:not(panda)` - */function checkPseudoClass1(i){var start=i; // Skip `:`. -i++;if(i >= tokensLength)return 0;var l=undefined;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSelectorsGroup(i))i += l;else return 0;if(i !== right)return 0;return right - start + 1;} /** - * (-) `:not(panda)` - */function getPseudoClass1(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. -pos++;content = content.concat(getIdentOrInterpolation());{var _type=NodeType.ArgumentsType;var _token=tokens[pos];var _line=_token.ln;var _column=_token.col; // Skip `(`. -pos++;var selectors=getSelectorsGroup();var end=getLastPosition(selectors,_line,_column,1);var args=newNode(_type,selectors,_line,_column,end);content.push(args); // Skip `)`. -pos++;}return newNode(type,content,line,column);} /** - * (1) `:nth-child(odd)` - * (2) `:nth-child(even)` - * (3) `:lang(de-DE)` - */function checkPseudoClass2(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSC(i))i += l;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass2(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `:`. -pos++;content = content.concat(getIdentOrInterpolation());var l=tokens[pos].ln;var c=tokens[pos].col;var value=[]; // Skip `(`. -pos++;value = value.concat(getSC()).concat(getIdentOrInterpolation()).concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. -pos++;return newNode(type,content,line,column);} /** - * (-) `:nth-child(-3n + 2)` - */function checkPseudoClass3(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSC(i))i += l;if(l = checkUnary(i))i += l;if(i >= tokensLength)return 0;if(tokens[i].type === TokenType.DecimalNumber)i++;if(i >= tokensLength)return 0;if(tokens[i].value === 'n')i++;else return 0;if(l = checkSC(i))i += l;if(i >= tokensLength)return 0;if(tokens[i].value === '+' || tokens[i].value === '-')i++;else return 0;if(l = checkSC(i))i += l;if(tokens[i].type === TokenType.DecimalNumber)i++;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass3(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `:`. -pos++;var content=getIdentOrInterpolation();var l=tokens[pos].ln;var c=tokens[pos].col;var value=[]; // Skip `(`. -pos++;if(checkUnary(pos))value.push(getUnary());if(checkNumber(pos))value.push(getNumber());{var _l=tokens[pos].ln;var _c=tokens[pos].col;var _content=tokens[pos].value;var ident=newNode(NodeType.IdentType,_content,_l,_c);value.push(ident);pos++;}value = value.concat(getSC());if(checkUnary(pos))value.push(getUnary());value = value.concat(getSC());if(checkNumber(pos))value.push(getNumber());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. -pos++;return newNode(type,content,line,column);} /** - * (-) `:nth-child(-3n)` - */function checkPseudoClass4(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSC(i))i += l;if(l = checkUnary(i))i += l;if(tokens[i].type === TokenType.DecimalNumber)i++;if(tokens[i].value === 'n')i++;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass4(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `:`. -pos++;var content=getIdentOrInterpolation();var l=tokens[pos].ln;var c=tokens[pos].col;var value=[]; // Skip `(`. -pos++;value = value.concat(getSC());if(checkUnary(pos))value.push(getUnary());if(checkNumber(pos))value.push(getNumber());if(checkIdent(pos))value.push(getIdent());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. -pos++;return newNode(type,content,line,column);} /** - * (-) `:nth-child(+8)` - */function checkPseudoClass5(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;if(i >= tokensLength)return 0;if(tokens[i].type !== TokenType.LeftParenthesis)return 0;var right=tokens[i].right; // Skip `(`. -i++;if(l = checkSC(i))i += l;if(l = checkUnary(i))i += l;if(tokens[i].type === TokenType.DecimalNumber)i++;else return 0;if(l = checkSC(i))i += l;if(i !== right)return 0;return i - start + 1;}function getPseudoClass5(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `:`. -pos++;var content=getIdentOrInterpolation();var l=tokens[pos].ln;var c=tokens[pos].col;var value=[]; // Skip `(`. -pos++;if(checkUnary(pos))value.push(getUnary());if(checkNumber(pos))value.push(getNumber());value = value.concat(getSC());var end=getLastPosition(value,l,c,1);var args=newNode(NodeType.ArgumentsType,value,l,c,end);content.push(args); // Skip `)`. -pos++;return newNode(type,content,line,column);} /** - * (-) `:checked` - */function checkPseudoClass6(i){var start=i;var l=0; // Skip `:`. -i++;if(i >= tokensLength)return 0;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;}function getPseudoClass6(){var type=NodeType.PseudocType;var token=tokens[pos];var line=token.ln;var column=token.col; // Skip `:`. -pos++;var content=getIdentOrInterpolation();return newNode(type,content,line,column);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkRuleset(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkSelectorsGroup(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkBlock(i))i += l;else return 0;return i - start;}function getRuleset(){var type=NodeType.RulesetType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];content = content.concat(getSelectorsGroup());content = content.concat(getSC());content.push(getBlock());return newNode(type,content,line,column);} /** - * Check if token is marked as a space (if it's a space or a tab - * or a line break). - * @param {Number} i - * @returns {Number} Number of spaces in a row starting with the given token. - */function checkS(i){return i < tokensLength && tokens[i].ws?tokens[i].ws_last - i + 1:0;} /** - * Get node with spaces - * @returns {Array} `['s', x]` where `x` is a string containing spaces - */function getS(){var startPos=pos;var x=joinValues(pos,tokens[pos].ws_last);pos = tokens[pos].ws_last + 1;var token=tokens[startPos];return newNode(NodeType.SType,x,token.ln,token.col);} /** - * Check if token is a space or a comment. - * @param {Number} i Token's index number - * @returns {Number} Number of similar (space or comment) tokens - * in a row starting with the given token. - */function checkSC(i){if(i >= tokensLength)return 0;var l=undefined;var lsc=0;while(i < tokensLength) {if(!(l = checkS(i)) && !(l = checkCommentML(i)) && !(l = checkCommentSL(i)))break;i += l;lsc += l;}return lsc || 0;} /** - * Get node with spaces and comments - * @returns {Array} Array containing nodes with spaces (if there are any) - * and nodes with comments (if there are any): - * `[['s', x]*, ['comment', y]*]` where `x` is a string of spaces - * and `y` is a comment's text (without `/*` and `* /`). - */function getSC(){var sc=[];if(pos >= tokensLength)return sc;while(pos < tokensLength) {if(checkS(pos))sc.push(getS());else if(checkCommentML(pos))sc.push(getCommentML());else if(checkCommentSL(pos))sc.push(getCommentSL());else break;}return sc;} /** - * Check if token is part of a hexadecimal number (e.g. `#fff`) inside - * a simple selector - * @param {Number} i Token's index number - * @returns {Number} - */function checkShash(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.NumberSign)return 0;return (l = checkIdentOrInterpolation(i + 1))?l + 1:0;} /** - * Get node with a hexadecimal number (e.g. `#fff`) inside a simple - * selector - * @returns {Array} `['shash', x]` where `x` is a hexadecimal number - * converted to string (without `#`, e.g. `fff`) - */function getShash(){var startPos=pos;var token=tokens[startPos];pos++;var x=getIdentOrInterpolation();return newNode(NodeType.ShashType,x,token.ln,token.col);} /** - * Check if token is part of a string (text wrapped in quotes) - * @param {Number} i Token's index number - * @returns {Number} `1` if token is part of a string, `0` if not - */function checkString(i){return i < tokensLength && (tokens[i].type === TokenType.StringSQ || tokens[i].type === TokenType.StringDQ)?1:0;} /** - * Get string's node - * @returns {Array} `['string', x]` where `x` is a string (including - * quotes). - */function getString(){var startPos=pos;var x=tokens[pos++].value;var token=tokens[startPos];return newNode(NodeType.StringType,x,token.ln,token.col);} /** - * Validate stylesheet: it should consist of any number (0 or more) of - * rulesets (sets of rules with selectors), @-rules, whitespaces or - * comments. - * @param {Number} i Token's index number - * @returns {Number} - */function checkStylesheet(i){var start=i;var l=undefined;while(i < tokensLength) {if(l = checkSC(i) || checkDeclaration(i) || checkDeclDelim(i) || checkInclude(i) || checkExtend(i) || checkMixin(i) || checkLoop(i) || checkConditionalStatement(i) || checkAtrule(i) || checkRuleset(i))i += l;else throwError(i);}return i - start;} /** - * @returns {Array} `['stylesheet', x]` where `x` is all stylesheet's - * nodes. - */function getStylesheet(){var startPos=pos;var x=[];while(pos < tokensLength) {if(checkSC(pos))x = x.concat(getSC());else if(checkRuleset(pos))x.push(getRuleset());else if(checkInclude(pos))x.push(getInclude());else if(checkExtend(pos))x.push(getExtend());else if(checkMixin(pos))x.push(getMixin());else if(checkLoop(pos))x.push(getLoop());else if(checkConditionalStatement(pos))x.push(getConditionalStatement());else if(checkAtrule(pos))x.push(getAtrule());else if(checkDeclaration(pos))x.push(getDeclaration());else if(checkDeclDelim(pos))x.push(getDeclDelim());else throwError();}var token=tokens[startPos];return newNode(NodeType.StylesheetType,x,token.ln,token.col);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkTset(i){return checkVhash(i) || checkOperator(i) || checkAny(i) || checkSC(i) || checkInterpolation(i);} /** - * @returns {Array} - */function getTset(){if(checkVhash(pos))return getVhash();else if(checkOperator(pos))return getOperator();else if(checkAny(pos))return getAny();else if(checkSC(pos))return getSC();else if(checkInterpolation(pos))return getInterpolation();} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkTsets(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;while(l = checkTset(i)) {i += l;}return i - start;} /** - * @returns {Array} - */function getTsets(){var x=[];var t=undefined;while(t = getTset()) {if(typeof t.content === 'string')x.push(t);else x = x.concat(t);}return x;} /** - * Check if token is an unary (arithmetical) sign (`+` or `-`) - * @param {Number} i Token's index number - * @returns {Number} `1` if token is an unary sign, `0` if not - */function checkUnary(i){return i < tokensLength && (tokens[i].type === TokenType.HyphenMinus || tokens[i].type === TokenType.PlusSign)?1:0;} /** - * Get node with an unary (arithmetical) sign (`+` or `-`) - * @returns {Array} `['unary', x]` where `x` is an unary sign - * converted to string. - */function getUnary(){var startPos=pos;var x=tokens[pos++].value;var token=tokens[startPos];return newNode(NodeType.OperatorType,x,token.ln,token.col);} /** - * Check if token is part of URI (e.g. `url('/css/styles.css')`) - * @param {Number} i Token's index number - * @returns {Number} Length of URI - */function checkUri(i){var start=i;if(i >= tokensLength || tokens[i++].value !== 'url' || i >= tokensLength || tokens[i].type !== TokenType.LeftParenthesis)return 0;return tokens[i].right - start + 1;} /** - * Get node with URI - * @returns {Array} `['uri', x]` where `x` is URI's nodes (without `url` - * and braces, e.g. `['string', ''/css/styles.css'']`). - */function getUri(){var startPos=pos;var uriExcluding={};var uri=undefined;var token=undefined;var l=undefined;var raw=undefined;pos += 2;uriExcluding[TokenType.Space] = 1;uriExcluding[TokenType.Tab] = 1;uriExcluding[TokenType.Newline] = 1;uriExcluding[TokenType.LeftParenthesis] = 1;uriExcluding[TokenType.RightParenthesis] = 1;if(checkUriContent(pos)){uri = [].concat(getSC()).concat(getUriContent()).concat(getSC());}else {uri = [].concat(getSC());l = checkExcluding(uriExcluding,pos);token = tokens[pos];raw = newNode(NodeType.RawType,joinValues(pos,pos + l),token.ln,token.col);uri.push(raw);pos += l + 1;uri = uri.concat(getSC());}token = tokens[startPos];var line=token.ln;var column=token.col;var end=getLastPosition(uri,line,column,1);pos++;return newNode(NodeType.UriType,uri,token.ln,token.col,end);} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkUriContent(i){return checkUri1(i) || checkFunction(i);} /** - * @returns {Array} - */function getUriContent(){if(checkUri1(pos))return getString();else if(checkFunction(pos))return getFunction();} /** - * @param {Number} i Token's index number - * @returns {Number} - */function checkUri1(i){var start=i;var l=undefined;if(i >= tokensLength)return 0;if(l = checkSC(i))i += l;if(tokens[i].type !== TokenType.StringDQ && tokens[i].type !== TokenType.StringSQ)return 0;i++;if(l = checkSC(i))i += l;return i - start;} /** - * Check if token is part of a value - * @param {Number} i Token's index number - * @returns {Number} Length of the value - */function checkValue(i){var start=i;var l=undefined;var s=undefined;var _i=undefined;while(i < tokensLength) {if(checkDeclDelim(i))break;s = checkSC(i);_i = i + s;if(l = _checkValue(_i))i += l + s;if(!l || checkBlock(i - l))break;}return i - start;} /** - * @param {Number} i Token's index number - * @returns {Number} - */function _checkValue(i){return checkInterpolation(i) || checkVariable(i) || checkVhash(i) || checkBlock(i) || checkAtkeyword(i) || checkOperator(i) || checkImportant(i) || checkGlobal(i) || checkDefault(i) || checkProgid(i) || checkAny(i);} /** - * @returns {Array} - */function getValue(){var startPos=pos;var x=[];var _pos=undefined;var s=undefined;while(pos < tokensLength) {s = checkSC(pos);_pos = pos + s;if(checkDeclDelim(_pos))break;if(!_checkValue(_pos))break;if(s)x = x.concat(getSC());x.push(_getValue());if(checkBlock(_pos))break;}var token=tokens[startPos];return newNode(NodeType.ValueType,x,token.ln,token.col);} /** - * @returns {Array} - */function _getValue(){if(checkInterpolation(pos))return getInterpolation();else if(checkVariable(pos))return getVariable();else if(checkVhash(pos))return getVhash();else if(checkBlock(pos))return getBlock();else if(checkAtkeyword(pos))return getAtkeyword();else if(checkOperator(pos))return getOperator();else if(checkImportant(pos))return getImportant();else if(checkGlobal(pos))return getGlobal();else if(checkDefault(pos))return getDefault();else if(checkProgid(pos))return getProgid();else if(checkAny(pos))return getAny();} /** - * Check if token is part of a variable - * @param {Number} i Token's index number - * @returns {Number} Length of the variable - */function checkVariable(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.DollarSign)return 0;return (l = checkIdent(i + 1))?l + 1:0;} /** - * Get node with a variable - * @returns {Array} `['variable', ['ident', x]]` where `x` is - * a variable name. - */function getVariable(){var startPos=pos;var x=[];pos++;x.push(getIdent());var token=tokens[startPos];return newNode(NodeType.VariableType,x,token.ln,token.col);} /** - * Check if token is part of a variables list (e.g. `$values...`). - * @param {Number} i Token's index number - * @returns {Number} - */function checkVariablesList(i){var d=0; // Number of dots -var l=undefined;if(i >= tokensLength)return 0;if(l = checkVariable(i))i += l;else return 0;while(i < tokensLength && tokens[i].type === TokenType.FullStop) {d++;i++;}return d === 3?l + d:0;} /** - * Get node with a variables list - * @returns {Array} `['variableslist', ['variable', ['ident', x]]]` where - * `x` is a variable name. - */function getVariablesList(){var startPos=pos;var x=getVariable();var token=tokens[startPos];var line=token.ln;var column=token.col;var end=getLastPosition([x],line,column,3);pos += 3;return newNode(NodeType.VariablesListType,[x],token.ln,token.col,end);} /** - * Check if token is part of a hexadecimal number (e.g. `#fff`) inside - * some value - * @param {Number} i Token's index number - * @returns {Number} - */function checkVhash(i){var l;if(i >= tokensLength || tokens[i].type !== TokenType.NumberSign)return 0;return (l = checkNmName2(i + 1))?l + 1:0;} /** - * Get node with a hexadecimal number (e.g. `#fff`) inside some value - * @returns {Array} `['vhash', x]` where `x` is a hexadecimal number - * converted to string (without `#`, e.g. `'fff'`). - */function getVhash(){var startPos=pos;var x=undefined;var token=tokens[startPos];var line=token.ln;var column=token.col;pos++;x = getNmName2();var end=getLastPosition(x,line,column + 1);return newNode(NodeType.VhashType,x,token.ln,token.col,end);}module.exports = function(_tokens,context){tokens = _tokens;tokensLength = tokens.length;pos = 0;return contexts[context]();};function checkSelectorsGroup(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkSelector(i))i += l;else return 0;while(i < tokensLength) {var sb=checkSC(i);var c=checkDelim(i + sb);if(!c)break;var sa=checkSC(i + sb + c);if(l = checkSelector(i + sb + c + sa))i += sb + c + sa + l;else break;}tokens[start].selectorsGroupEnd = i;return i - start;}function getSelectorsGroup(){var selectorsGroup=[];var selectorsGroupEnd=tokens[pos].selectorsGroupEnd;selectorsGroup.push(getSelector());while(pos < selectorsGroupEnd) {selectorsGroup = selectorsGroup.concat(getSC());selectorsGroup.push(getDelim());selectorsGroup = selectorsGroup.concat(getSC());selectorsGroup.push(getSelector());}return selectorsGroup;}function checkSelector(i){var l;if(l = checkSelector1(i))tokens[i].selectorType = 1;else if(l = checkSelector2(i))tokens[i].selectorType = 2;return l;}function getSelector(){var selectorType=tokens[pos].selectorType;if(selectorType === 1)return getSelector1();else return getSelector2();} /** - * Checks for selector which starts with a compound selector. - */function checkSelector1(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkCompoundSelector(i))i += l;else return 0;while(i < tokensLength) {var s=checkSC(i);var c=checkCombinator(i + s);if(!s && !c)break;if(c){i += s + c;s = checkSC(i);}if(l = checkCompoundSelector(i + s))i += s + l;else break;}tokens[start].selectorEnd = i;return i - start;}function getSelector1(){var type=NodeType.SelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var selectorEnd=token.selectorEnd;var content=getCompoundSelector();while(pos < selectorEnd) {if(checkSC(pos))content = content.concat(getSC());else if(checkCombinator(pos))content.push(getCombinator());else if(checkCompoundSelector(pos))content = content.concat(getCompoundSelector());}return newNode(type,content,line,column);} /** - * Checks for a selector that starts with a combinator. - */function checkSelector2(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkCombinator(i))i += l;else return 0;while(i < tokensLength) {var sb=checkSC(i);if(l = checkCompoundSelector(i + sb))i += sb + l;else break;var sa=checkSC(i);var c=checkCombinator(i + sa);if(!sa && !c)break;if(c){i += sa + c;}}tokens[start].selectorEnd = i;return i - start;}function getSelector2(){var type=NodeType.SelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var selectorEnd=token.selectorEnd;var content=[getCombinator()];while(pos < selectorEnd) {if(checkSC(pos))content = content.concat(getSC());else if(checkCombinator(pos))content.push(getCombinator());else if(checkCompoundSelector(pos))content = content.concat(getCompoundSelector());}return newNode(type,content,line,column);}function checkCompoundSelector(i){var l=undefined;if(l = checkCompoundSelector1(i)){tokens[i].compoundSelectorType = 1;}else if(l = checkCompoundSelector2(i)){tokens[i].compoundSelectorType = 2;}return l;}function getCompoundSelector(){var type=tokens[pos].compoundSelectorType;if(type === 1)return getCompoundSelector1();if(type === 2)return getCompoundSelector2();}function checkCompoundSelector1(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkTypeSelector(i) || checkPlaceholder(i) || checkParentSelectorWithExtension(i))i += l;else return 0;while(i < tokensLength) {var _l2=checkShash(i) || checkClass(i) || checkAttributeSelector(i) || checkPseudo(i) || checkPlaceholder(i);if(_l2)i += _l2;else break;}tokens[start].compoundSelectorEnd = i;return i - start;}function getCompoundSelector1(){var sequence=[];var compoundSelectorEnd=tokens[pos].compoundSelectorEnd;if(checkTypeSelector(pos))sequence.push(getTypeSelector());else if(checkPlaceholder(pos))sequence.push(getPlaceholder());else if(checkParentSelectorWithExtension(pos))sequence = sequence.concat(getParentSelectorWithExtension());while(pos < compoundSelectorEnd) {if(checkShash(pos))sequence.push(getShash());else if(checkClass(pos))sequence.push(getClass());else if(checkAttributeSelector(pos))sequence.push(getAttributeSelector());else if(checkPseudo(pos))sequence.push(getPseudo());else if(checkPlaceholder(pos))sequence.push(getPlaceholder());}return sequence;}function checkCompoundSelector2(i){if(i >= tokensLength)return 0;var start=i;while(i < tokensLength) {var l=checkShash(i) || checkClass(i) || checkAttributeSelector(i) || checkPseudo(i) || checkPlaceholder(i);if(l)i += l;else break;}tokens[start].compoundSelectorEnd = i;return i - start;}function getCompoundSelector2(){var sequence=[];var compoundSelectorEnd=tokens[pos].compoundSelectorEnd;while(pos < compoundSelectorEnd) {if(checkShash(pos))sequence.push(getShash());else if(checkClass(pos))sequence.push(getClass());else if(checkAttributeSelector(pos))sequence.push(getAttributeSelector());else if(checkPseudo(pos))sequence.push(getPseudo());else if(checkPlaceholder(pos))sequence.push(getPlaceholder());}return sequence;}function checkTypeSelector(i){if(i >= tokensLength)return 0;var start=i;var l=undefined;if(l = checkNamePrefix(i))i += l;if(tokens[i].type === TokenType.Asterisk)i++;else if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;}function getTypeSelector(){var type=NodeType.TypeSelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkNamePrefix(pos))content.push(getNamePrefix());if(checkIdentOrInterpolation(pos))content = content.concat(getIdentOrInterpolation());return newNode(type,content,line,column);}function checkAttributeSelector(i){var l=undefined;if(l = checkAttributeSelector1(i))tokens[i].attributeSelectorType = 1;else if(l = checkAttributeSelector2(i))tokens[i].attributeSelectorType = 2;return l;}function getAttributeSelector(){var type=tokens[pos].attributeSelectorType;if(type === 1)return getAttributeSelector1();else return getAttributeSelector2();} /** - * (1) `[panda=nani]` - * (2) `[panda='nani']` - * (3) `[panda='nani' i]` - * - */function checkAttributeSelector1(i){var start=i;if(tokens[i].type === TokenType.LeftSquareBracket)i++;else return 0;var l=undefined;if(l = checkSC(i))i += l;if(l = checkAttributeName(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkAttributeMatch(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkAttributeValue(i))i += l;else return 0;if(l = checkSC(i))i += l;if(l = checkAttributeFlags(i)){i += l;if(l = checkSC(i))i += l;}if(tokens[i].type === TokenType.RightSquareBracket)i++;else return 0;return i - start;}function getAttributeSelector1(){var type=NodeType.AttributeSelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `[`. -pos++;content = content.concat(getSC());content.push(getAttributeName());content = content.concat(getSC());content.push(getAttributeMatch());content = content.concat(getSC());content.push(getAttributeValue());content = content.concat(getSC());if(checkAttributeFlags(pos)){content.push(getAttributeFlags());content = content.concat(getSC());} // Skip `]`. -pos++;var end=getLastPosition(content,line,column,1);return newNode(type,content,line,column,end);} /** - * (1) `[panda]` - */function checkAttributeSelector2(i){var start=i;if(tokens[i].type === TokenType.LeftSquareBracket)i++;else return 0;var l=undefined;if(l = checkSC(i))i += l;if(l = checkAttributeName(i))i += l;else return 0;if(l = checkSC(i))i += l;if(tokens[i].type === TokenType.RightSquareBracket)i++;else return 0;return i - start;}function getAttributeSelector2(){var type=NodeType.AttributeSelectorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[]; // Skip `[`. -pos++;content = content.concat(getSC());content.push(getAttributeName());content = content.concat(getSC()); // Skip `]`. -pos++;var end=getLastPosition(content,line,column,1);return newNode(type,content,line,column,end);}function checkAttributeName(i){var start=i;var l=undefined;if(l = checkNamePrefix(i))i += l;if(l = checkIdentOrInterpolation(i))i += l;else return 0;return i - start;}function getAttributeName(){var type=NodeType.AttributeNameType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkNamePrefix(pos))content.push(getNamePrefix());content = content.concat(getIdentOrInterpolation());return newNode(type,content,line,column);}function checkAttributeMatch(i){var l=undefined;if(l = checkAttributeMatch1(i))tokens[i].attributeMatchType = 1;else if(l = checkAttributeMatch2(i))tokens[i].attributeMatchType = 2;return l;}function getAttributeMatch(){var type=tokens[pos].attributeMatchType;if(type === 1)return getAttributeMatch1();else return getAttributeMatch2();}function checkAttributeMatch1(i){var start=i;var type=tokens[i].type;if(type === TokenType.Tilde || type === TokenType.VerticalLine || type === TokenType.CircumflexAccent || type === TokenType.DollarSign || type === TokenType.Asterisk)i++;else return 0;if(tokens[i].type === TokenType.EqualsSign)i++;else return 0;return i - start;}function getAttributeMatch1(){var type=NodeType.AttributeMatchType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=tokens[pos].value + tokens[pos + 1].value;pos += 2;return newNode(type,content,line,column);}function checkAttributeMatch2(i){if(tokens[i].type === TokenType.EqualsSign)return 1;else return 0;}function getAttributeMatch2(){var type=NodeType.AttributeMatchType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='=';pos++;return newNode(type,content,line,column);}function checkAttributeValue(i){return checkString(i) || checkIdentOrInterpolation(i);}function getAttributeValue(){var type=NodeType.AttributeValueType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkString(pos))content.push(getString());else content = content.concat(getIdentOrInterpolation());return newNode(type,content,line,column);}function checkAttributeFlags(i){return checkIdentOrInterpolation(i);}function getAttributeFlags(){var type=NodeType.AttributeFlagsType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=getIdentOrInterpolation();return newNode(type,content,line,column);}function checkNamePrefix(i){if(i >= tokensLength)return 0;var l=undefined;if(l = checkNamePrefix1(i))tokens[i].namePrefixType = 1;else if(l = checkNamePrefix2(i))tokens[i].namePrefixType = 2;return l;}function getNamePrefix(){var type=tokens[pos].namePrefixType;if(type === 1)return getNamePrefix1();else return getNamePrefix2();} /** - * (1) `panda|` - * (2) `panda|` - */function checkNamePrefix1(i){var start=i;var l=undefined;if(l = checkNamespacePrefix(i))i += l;else return 0;if(l = checkCommentML(i))i += l;if(l = checkNamespaceSeparator(i))i += l;else return 0;return i - start;}function getNamePrefix1(){var type=NodeType.NamePrefixType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];content.push(getNamespacePrefix());if(checkCommentML(pos))content.push(getCommentML());content.push(getNamespaceSeparator());return newNode(type,content,line,column);} /** - * (1) `|` - */function checkNamePrefix2(i){return checkNamespaceSeparator(i);}function getNamePrefix2(){var type=NodeType.NamePrefixType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[getNamespaceSeparator()];return newNode(type,content,line,column);} /** - * (1) `*` - * (2) `panda` - */function checkNamespacePrefix(i){if(i >= tokensLength)return 0;var l=undefined;if(tokens[i].type === TokenType.Asterisk)return 1;else if(l = checkIdentOrInterpolation(i))return l;else return 0;}function getNamespacePrefix(){var type=NodeType.NamespacePrefixType;var token=tokens[pos];var line=token.ln;var column=token.col;var content=[];if(checkIdentOrInterpolation(pos))content = content.concat(getIdentOrInterpolation());return newNode(type,content,line,column);} /** - * (1) `|` - */function checkNamespaceSeparator(i){if(i >= tokensLength)return 0;if(tokens[i].type === TokenType.VerticalLine)return 1;else return 0;}function getNamespaceSeparator(){var type=NodeType.NamespaceSeparatorType;var token=tokens[pos];var line=token.ln;var column=token.col;var content='|';pos++;return newNode(type,content,line,column);} \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/scss/stringify.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/scss/stringify.js deleted file mode 100644 index 242cb15..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/scss/stringify.js +++ /dev/null @@ -1,3 +0,0 @@ -// jscs:disable maximumLineLength -'use strict';module.exports = function stringify(tree){ // TODO: Better error message -if(!tree)throw new Error('We need tree to translate');function _t(tree){var type=tree.type;if(_unique[type])return _unique[type](tree);if(typeof tree.content === 'string')return tree.content;if(Array.isArray(tree.content))return _composite(tree.content);return '';}function _composite(t,i){if(!t)return '';var s='';i = i || 0;for(;i < t.length;i++) s += _t(t[i]);return s;}var _unique={'arguments':function(t){return '(' + _composite(t.content) + ')';},'atkeyword':function(t){return '@' + _composite(t.content);},'attributeSelector':function(t){return '[' + _composite(t.content) + ']';},'block':function(t){return '{' + _composite(t.content) + '}';},'brackets':function(t){return '[' + _composite(t.content) + ']';},'class':function(t){return '.' + _composite(t.content);},'color':function(t){return '#' + t.content;},'expression':function(t){return 'expression(' + t.content + ')';},'id':function(t){return '#' + _composite(t.content);},'interpolation':function(t){return '#{' + _composite(t.content) + '}';},'multilineComment':function(t){return '/*' + t.content + '*/';},'nthSelector':function(t){return ':' + _t(t.content[0]) + '(' + _composite(t.content.slice(1)) + ')';},'parentheses':function(t){return '(' + _composite(t.content) + ')';},'percentage':function(t){return _composite(t.content) + '%';},'placeholder':function(t){return '%' + _composite(t.content);},'pseudoClass':function(t){return ':' + _composite(t.content);},'pseudoElement':function(t){return '::' + _composite(t.content);},'singlelineComment':function(t){return '/' + '/' + t.content;},'uri':function(t){return 'url(' + _composite(t.content) + ')';},'variable':function(t){return '$' + _composite(t.content);},'variablesList':function(t){return _composite(t.content) + '...';}};return _t(tree);}; \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/scss/tokenizer.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/scss/tokenizer.js deleted file mode 100644 index ad6015e..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/scss/tokenizer.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict';module.exports = function(css,tabSize){var TokenType=require('../token-types');var tokens=[];var urlMode=false;var blockMode=0;var c=undefined; // Current character -var cn=undefined; // Next character -var pos=0;var tn=0;var ln=1;var col=1;var Punctuation={' ':TokenType.Space,'\n':TokenType.Newline,'\r':TokenType.Newline,'\t':TokenType.Tab,'!':TokenType.ExclamationMark,'"':TokenType.QuotationMark,'#':TokenType.NumberSign,'$':TokenType.DollarSign,'%':TokenType.PercentSign,'&':TokenType.Ampersand,'\'':TokenType.Apostrophe,'(':TokenType.LeftParenthesis,')':TokenType.RightParenthesis,'*':TokenType.Asterisk,'+':TokenType.PlusSign,',':TokenType.Comma,'-':TokenType.HyphenMinus,'.':TokenType.FullStop,'/':TokenType.Solidus,':':TokenType.Colon,';':TokenType.Semicolon,'<':TokenType.LessThanSign,'=':TokenType.EqualsSign,'==':TokenType.EqualitySign,'!=':TokenType.InequalitySign,'>':TokenType.GreaterThanSign,'?':TokenType.QuestionMark,'@':TokenType.CommercialAt,'[':TokenType.LeftSquareBracket,']':TokenType.RightSquareBracket,'^':TokenType.CircumflexAccent,'_':TokenType.LowLine,'{':TokenType.LeftCurlyBracket,'|':TokenType.VerticalLine,'}':TokenType.RightCurlyBracket,'~':TokenType.Tilde}; /** - * Add a token to the token list - * @param {string} type - * @param {string} value - */function pushToken(type,value,column){tokens.push({tn:tn++,ln:ln,col:column,type:type,value:value});} /** - * Check if a character is a decimal digit - * @param {string} c Character - * @returns {boolean} - */function isDecimalDigit(c){return '0123456789'.indexOf(c) >= 0;} /** - * Parse spaces - * @param {string} css Unparsed part of CSS string - */function parseSpaces(css){var start=pos; // Read the string until we meet a non-space character: -for(;pos < css.length;pos++) {if(css.charAt(pos) !== ' ')break;} // Add a substring containing only spaces to tokens: -pushToken(TokenType.Space,css.substring(start,pos--),col);col += pos - start;} /** - * Parse a string within quotes - * @param {string} css Unparsed part of CSS string - * @param {string} q Quote (either `'` or `"`) - */function parseString(css,q){var start=pos; // Read the string until we meet a matching quote: -for(pos++;pos < css.length;pos++) { // Skip escaped quotes: -if(css.charAt(pos) === '\\')pos++;else if(css.charAt(pos) === q)break;} // Add the string (including quotes) to tokens: -var type=q === '"'?TokenType.StringDQ:TokenType.StringSQ;pushToken(type,css.substring(start,pos + 1),col);col += pos - start;} /** - * Parse numbers - * @param {string} css Unparsed part of CSS string - */function parseDecimalNumber(css){var start=pos; // Read the string until we meet a character that's not a digit: -for(;pos < css.length;pos++) {if(!isDecimalDigit(css.charAt(pos)))break;} // Add the number to tokens: -pushToken(TokenType.DecimalNumber,css.substring(start,pos--),col);col += pos - start;} /** - * Parse identifier - * @param {string} css Unparsed part of CSS string - */function parseIdentifier(css){var start=pos; // Skip all opening slashes: -while(css.charAt(pos) === '/') pos++; // Read the string until we meet a punctuation mark: -for(;pos < css.length;pos++) { // Skip all '\': -if(css.charAt(pos) === '\\')pos++;else if(css.charAt(pos) in Punctuation)break;}var ident=css.substring(start,pos--); // Enter url mode if parsed substring is `url`: -if(!urlMode && ident === 'url' && css.charAt(pos + 1) === '('){urlMode = true;} // Add identifier to tokens: -pushToken(TokenType.Identifier,ident,col);col += pos - start;} /** - * Parse equality sign - */function parseEquality(){pushToken(TokenType.EqualitySign,'==',col);pos++;col++;} /** - * Parse inequality sign - */function parseInequality(){pushToken(TokenType.InequalitySign,'!=',col);pos++;col++;} /** - * Parse a multiline comment - * @param {string} css Unparsed part of CSS string - */function parseMLComment(css){var start=pos; // Read the string until we meet `*/`. -// Since we already know first 2 characters (`/*`), start reading -// from `pos + 2`: -for(pos += 2;pos < css.length;pos++) {if(css.charAt(pos) === '*' && css.charAt(pos + 1) === '/'){pos++;break;}} // Add full comment (including `/*` and `*/`) to the list of tokens: -var comment=css.substring(start,pos + 1);pushToken(TokenType.CommentML,comment,col);var newlines=comment.split('\n');if(newlines.length > 1){ln += newlines.length - 1;col = newlines[newlines.length - 1].length;}else {col += pos - start;}} /** - * Parse a single line comment - * @param {string} css Unparsed part of CSS string - */function parseSLComment(css){var start=pos; // Read the string until we meet line break. -// Since we already know first 2 characters (`//`), start reading -// from `pos + 2`: -for(pos += 2;pos < css.length;pos++) {if(css.charAt(pos) === '\n' || css.charAt(pos) === '\r'){break;}} // Add comment (including `//` and line break) to the list of tokens: -pushToken(TokenType.CommentSL,css.substring(start,pos--),col);col += pos - start;} /** - * Convert a CSS string to a list of tokens - * @param {string} css CSS string - * @returns {Array} List of tokens - * @private - */function getTokens(css){ // Parse string, character by character: -for(pos = 0;pos < css.length;col++,pos++) {c = css.charAt(pos);cn = css.charAt(pos + 1); // If we meet `/*`, it's a start of a multiline comment. -// Parse following characters as a multiline comment: -if(c === '/' && cn === '*'){parseMLComment(css);} // If we meet `//` and it is not a part of url: -else if(!urlMode && c === '/' && cn === '/'){ // If we're currently inside a block, treat `//` as a start -// of identifier. Else treat `//` as a start of a single-line -// comment: -parseSLComment(css);} // If current character is a double or single quote, it's a start -// of a string: -else if(c === '"' || c === "'"){parseString(css,c);} // If current character is a space: -else if(c === ' '){parseSpaces(css);} // If current character is `=`, it must be combined with next `=` -else if(c === '=' && cn === '='){parseEquality(css);} // If we meet `!=`, this must be inequality -else if(c === '!' && cn === '='){parseInequality(css);} // If current character is a punctuation mark: -else if(c in Punctuation){ // Check for CRLF here or just LF -if(c === '\r' && cn === '\n' || c === '\n'){ /* - * If \r we know the next character is \n due to statement above - * so we push a CRLF token type to the token list and importantly - * skip the next character so as not to double count newlines or - * columns etc - */if(c === '\r'){pushToken(TokenType.Newline,'\r\n',col);pos++; // If crlf skip the next character and push crlf token -}else if(c === '\n'){ /* - * If just a Lf newline and not part of CRLF newline we can just - * push punctuation as usual - */pushToken(Punctuation[c],c,col);}ln++; // Go to next line -col = 0; // Reset the column count -}else if(c !== '\r' && c !== '\n'){ // Handle all other punctuation and add to list of tokens -pushToken(Punctuation[c],c,col);} // Go to next line -if(c === ')')urlMode = false; // Exit url mode -if(c === '{')blockMode++; // Enter a block -if(c === '}')blockMode--; // Exit a block -else if(c === '\t' && tabSize > 1)col += tabSize - 1;} // If current character is a decimal digit: -else if(isDecimalDigit(c)){parseDecimalNumber(css);} // If current character is anything else: -else {parseIdentifier(css);}}return tokens;}return getTokens(css);}; \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/token-types.js b/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/token-types.js deleted file mode 100644 index 7bc1ce9..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/lib/token-types.js +++ /dev/null @@ -1,35 +0,0 @@ -// jscs:disable -'use strict';module.exports = {StringSQ:'StringSQ',StringDQ:'StringDQ',CommentML:'CommentML',CommentSL:'CommentSL',Newline:'Newline',Space:'Space',Tab:'Tab',ExclamationMark:'ExclamationMark', // ! -QuotationMark:'QuotationMark', // " -NumberSign:'NumberSign', // # -DollarSign:'DollarSign', // $ -PercentSign:'PercentSign', // % -Ampersand:'Ampersand', // & -Apostrophe:'Apostrophe', // ' -LeftParenthesis:'LeftParenthesis', // ( -RightParenthesis:'RightParenthesis', // ) -Asterisk:'Asterisk', // * -PlusSign:'PlusSign', // + -Comma:'Comma', // , -HyphenMinus:'HyphenMinus', // - -FullStop:'FullStop', // . -Solidus:'Solidus', // / -Colon:'Colon', // : -Semicolon:'Semicolon', // ; -LessThanSign:'LessThanSign', // < -EqualsSign:'EqualsSign', // = -EqualitySign:'EqualitySign', // == -InequalitySign:'InequalitySign', // != -GreaterThanSign:'GreaterThanSign', // > -QuestionMark:'QuestionMark', // ? -CommercialAt:'CommercialAt', // @ -LeftSquareBracket:'LeftSquareBracket', // [ -ReverseSolidus:'ReverseSolidus', // \ -RightSquareBracket:'RightSquareBracket', // ] -CircumflexAccent:'CircumflexAccent', // ^ -LowLine:'LowLine', // _ -LeftCurlyBracket:'LeftCurlyBracket', // { -VerticalLine:'VerticalLine', // | -RightCurlyBracket:'RightCurlyBracket', // } -Tilde:'Tilde', // ~ -Identifier:'Identifier',DecimalNumber:'DecimalNumber'}; \ No newline at end of file diff --git a/node_modules/sass-lint/node_modules/gonzales-pe-sl/package.json b/node_modules/sass-lint/node_modules/gonzales-pe-sl/package.json deleted file mode 100644 index e80d17e..0000000 --- a/node_modules/sass-lint/node_modules/gonzales-pe-sl/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - "gonzales-pe-sl@3.2.8", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\sass-lint" - ] - ], - "_from": "gonzales-pe-sl@3.2.8", - "_id": "gonzales-pe-sl@3.2.8", - "_inCache": true, - "_installable": true, - "_location": "/sass-lint/gonzales-pe-sl", - "_nodeVersion": "5.10.1", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/gonzales-pe-sl-3.2.8.tgz_1461753391378_0.8766945661045611" - }, - "_npmUser": { - "email": "danjpurdy@gmail.com", - "name": "danpurdy" - }, - "_npmVersion": "3.8.3", - "_phantomChildren": {}, - "_requested": { - "name": "gonzales-pe-sl", - "raw": "gonzales-pe-sl@3.2.8", - "rawSpec": "3.2.8", - "scope": null, - "spec": "3.2.8", - "type": "version" - }, - "_requiredBy": [ - "/sass-lint" - ], - "_resolved": "https://registry.npmjs.org/gonzales-pe-sl/-/gonzales-pe-sl-3.2.8.tgz", - "_shasum": "5021cbb20cc5df74de604dc83eab2cc4bb0eea48", - "_shrinkwrap": null, - "_spec": "gonzales-pe-sl@3.2.8", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\sass-lint", - "author": { - "email": "dan@danpurdy.co.uk", - "name": "Dan Purdy", - "url": "danpurdy.co.uk" - }, - "bin": { - "gonzales": "./bin/gonzales.js" - }, - "bugs": { - "url": "https://github.com/DanPurdy/gonzales-pe/issues" - }, - "dependencies": { - "minimist": "1.1.x" - }, - "description": "Temporary gonzales-pe fork for sass-lint", - "devDependencies": { - "babel": "^5.5.3", - "coffee-script": "~1.7.1", - "jscs": "2.1.0", - "jshint": "2.8.0", - "mocha": "2.2.x" - }, - "directories": {}, - "dist": { - "shasum": "5021cbb20cc5df74de604dc83eab2cc4bb0eea48", - "tarball": "https://registry.npmjs.org/gonzales-pe-sl/-/gonzales-pe-sl-3.2.8.tgz" - }, - "engines": { - "node": ">=0.6.0" - }, - "gitHead": "122ff86da8d0727250dae754bd3cdba045e80b45", - "homepage": "https://github.com/DanPurdy/gonzales-pe", - "license": "MIT", - "main": "./lib/gonzales", - "maintainers": [ - { - "name": "danpurdy", - "email": "danjpurdy@gmail.com" - } - ], - "name": "gonzales-pe-sl", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/DanPurdy/gonzales-pe.git" - }, - "scripts": { - "autofix-tests": "./scripts/build.sh && ./scripts/autofix-tests.sh", - "build": "./scripts/build.sh", - "init": "./scripts/init.sh", - "log": "./scripts/log.sh", - "postpublish": "./scripts/postpublish.sh", - "prepublish": "./scripts/prepublish.sh", - "test": "./scripts/build.sh && ./scripts/test.sh" - }, - "version": "3.2.8" -} diff --git a/node_modules/sass-lint/node_modules/minimist/.travis.yml b/node_modules/sass-lint/node_modules/minimist/.travis.yml deleted file mode 100644 index 74c57bf..0000000 --- a/node_modules/sass-lint/node_modules/minimist/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.12" - - "iojs" -before_install: - - npm install -g npm@~1.4.6 diff --git a/node_modules/sass-lint/node_modules/minimist/package.json b/node_modules/sass-lint/node_modules/minimist/package.json deleted file mode 100644 index 1d154d5..0000000 --- a/node_modules/sass-lint/node_modules/minimist/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - "minimist@1.1.x", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\sass-lint\\node_modules\\gonzales-pe-sl" - ] - ], - "_from": "minimist@>=1.1.0 <1.2.0", - "_id": "minimist@1.1.3", - "_inCache": true, - "_installable": true, - "_location": "/sass-lint/minimist", - "_nodeVersion": "2.4.0", - "_npmUser": { - "email": "substack@gmail.com", - "name": "substack" - }, - "_npmVersion": "3.2.0", - "_phantomChildren": {}, - "_requested": { - "name": "minimist", - "raw": "minimist@1.1.x", - "rawSpec": "1.1.x", - "scope": null, - "spec": ">=1.1.0 <1.2.0", - "type": "range" - }, - "_requiredBy": [ - "/sass-lint/gonzales-pe-sl" - ], - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.3.tgz", - "_shasum": "3bedfd91a92d39016fcfaa1c681e8faa1a1efda8", - "_shrinkwrap": null, - "_spec": "minimist@1.1.x", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\sass-lint\\node_modules\\gonzales-pe-sl", - "author": { - "email": "mail@substack.net", - "name": "James Halliday", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "dependencies": {}, - "description": "parse argument options", - "devDependencies": { - "covert": "^1.0.0", - "tap": "~0.4.0", - "tape": "^3.5.0" - }, - "directories": {}, - "dist": { - "shasum": "3bedfd91a92d39016fcfaa1c681e8faa1a1efda8", - "tarball": "https://registry.npmjs.org/minimist/-/minimist-1.1.3.tgz" - }, - "gitHead": "8a5d94cf17fb8b126cf6c8fbf2a7713df76d16cd", - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "optimist", - "parser" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "name": "minimist", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "scripts": { - "coverage": "covert test/*.js", - "test": "tap test/*.js" - }, - "testling": { - "browsers": [ - "chrome/10", - "chrome/latest", - "ff/5", - "firefox/latest", - "ie/6..latest", - "opera/12", - "safari/5.1", - "safari/latest" - ], - "files": "test/*.js" - }, - "version": "1.1.3" -} diff --git a/node_modules/sass-lint/package.json b/node_modules/sass-lint/package.json index e4706cd..bb191a1 100644 --- a/node_modules/sass-lint/package.json +++ b/node_modules/sass-lint/package.json @@ -1,111 +1,52 @@ { - "_args": [ - [ - "sass-lint@^1.7.0", - "D:\\Koodaus\\brackets-sass-lint" - ] - ], - "_from": "sass-lint@>=1.7.0 <2.0.0", - "_id": "sass-lint@1.7.0", - "_inCache": true, - "_installable": true, - "_location": "/sass-lint", - "_nodeVersion": "5.10.1", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/sass-lint-1.7.0.tgz_1461784428234_0.2875847073737532" - }, - "_npmUser": { - "email": "danjpurdy@gmail.com", - "name": "danpurdy" - }, - "_npmVersion": "3.8.3", - "_phantomChildren": {}, - "_requested": { - "name": "sass-lint", - "raw": "sass-lint@^1.7.0", - "rawSpec": "^1.7.0", - "scope": null, - "spec": ">=1.7.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/sass-lint/-/sass-lint-1.7.0.tgz", - "_shasum": "fc2b323a256fde85dd3f2c99f9232f9e0cc43cab", - "_shrinkwrap": null, - "_spec": "sass-lint@^1.7.0", - "_where": "D:\\Koodaus\\brackets-sass-lint", - "author": { - "name": "Sam Richard" + "name": "sass-lint", + "version": "1.10.2", + "description": "All Node Sass linter!", + "main": "index.js", + "scripts": { + "preversion": "npm test", + "pretest": "eslint .", + "test": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec -t 3000 tests tests/rules tests/helpers", + "coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" }, "bin": { "sass-lint": "./bin/sass-lint.js" }, + "repository": { + "type": "git", + "url": "https://github.com/sasstools/sass-lint.git" + }, + "keywords": [ + "Sass", + "SCSS", + "lint" + ], + "author": "Sam Richard", + "license": "MIT", "bugs": { "url": "https://github.com/sasstools/sass-lint/issues" }, + "homepage": "https://github.com/sasstools/sass-lint", "dependencies": { "commander": "^2.8.1", "eslint": "^2.7.0", - "fs-extra": "^0.29.0", + "front-matter": "2.1.0", + "fs-extra": "^1.0.0", "glob": "^7.0.0", - "gonzales-pe-sl": "3.2.8", + "globule": "^1.0.0", + "gonzales-pe": "3.4.7", "js-yaml": "^3.5.4", "lodash.capitalize": "^4.1.0", "lodash.kebabcase": "^4.0.0", "merge": "^1.2.0", + "path-is-absolute": "^1.0.0", "util": "^0.10.3" }, - "description": "All Node Sass linter!", "devDependencies": { "coveralls": "^2.11.4", "deep-equal": "^1.0.1", "istanbul": "^0.4.0", - "mocha": "^2.2.5", - "should": "^8.2.2" - }, - "directories": {}, - "dist": { - "shasum": "fc2b323a256fde85dd3f2c99f9232f9e0cc43cab", - "tarball": "https://registry.npmjs.org/sass-lint/-/sass-lint-1.7.0.tgz" - }, - "gitHead": "e364a25c1ebc0dcc662b10743bbc8c118fa139a5", - "homepage": "https://github.com/sasstools/sass-lint", - "keywords": [ - "SCSS", - "Sass", - "lint" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "bgriffith", - "email": "gt11687@gmail.com" - }, - { - "name": "danpurdy", - "email": "danjpurdy@gmail.com" - }, - { - "name": "snugug", - "email": "sam@snug.ug" - } - ], - "name": "sass-lint", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sasstools/sass-lint.git" - }, - "scripts": { - "coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", - "pretest": "eslint .", - "preversion": "npm test", - "test": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec tests tests/rules" - }, - "version": "1.7.0" + "mocha": "^3.0.1", + "sinon": "^1.17.4" + } } diff --git a/node_modules/sass-lint/tests/bom-utf8/starts-with-mixin-utf8-bom.scss b/node_modules/sass-lint/tests/bom-utf8/starts-with-mixin-utf8-bom.scss new file mode 100644 index 0000000..4f12e18 --- /dev/null +++ b/node_modules/sass-lint/tests/bom-utf8/starts-with-mixin-utf8-bom.scss @@ -0,0 +1,5 @@ +@mixin foo( + $param: 'def' +) { + color: red; +} diff --git a/node_modules/sass-lint/tests/bom-utf8/var-utf8-bom.scss b/node_modules/sass-lint/tests/bom-utf8/var-utf8-bom.scss new file mode 100644 index 0000000..bc5580d --- /dev/null +++ b/node_modules/sass-lint/tests/bom-utf8/var-utf8-bom.scss @@ -0,0 +1,5 @@ +$my-color: red; + +body { + color: $my-color; +} \ No newline at end of file diff --git a/node_modules/sass-lint/tests/cli.js b/node_modules/sass-lint/tests/cli.js index ecb4a05..df7c7fe 100644 --- a/node_modules/sass-lint/tests/cli.js +++ b/node_modules/sass-lint/tests/cli.js @@ -1,5 +1,4 @@ var assert = require('assert'), - should = require('should'), fs = require('fs-extra'), path = require('path'), exec = require('child_process').exec; @@ -7,7 +6,7 @@ var assert = require('assert'), describe('cli', function () { it('should return help instructions', function (done) { - var command = 'sass-lint -h'; + var command = 'node bin/sass-lint -h'; exec(command, function (err, stdout) { if (err) { @@ -21,21 +20,118 @@ describe('cli', function () { }); it('should return a version', function (done) { - var command = 'sass-lint -V'; + var command = 'node bin/sass-lint --version'; exec(command, function (err, stdout) { if (err) { return done(err); } - should(stdout).match(/^[0-9]+.[0-9]+(.[0-9]+)?/); + assert(stdout.match(/^[0-9]+.[0-9]+(.[0-9]+)?/)); + + return done(); + }); + }); + + it('should not try to read and lint a directory', function (done) { + var command = 'node bin/sass-lint "tests/dir-test/**/*.scss" --no-exit --verbose --format json'; + + exec(command, function (err, stdout) { + var result = JSON.parse(stdout); + if (err) { + return done(err); + } + + assert(stdout.indexOf('.scss') !== -1); + assert(stdout.indexOf('.sass') === -1); + assert.equal(result.length, 1); + assert.equal(result[0].filePath, 'tests/dir-test/dir.scss/test.scss'); + + return done(); + }); + }); + + it('Should accept multiple input paths', function (done) { + var command = 'node bin/sass-lint "tests/cli/cli-error.scss, tests/cli/cli-error.sass" --no-exit --verbose'; + + exec(command, function (err, stdout) { + + if (err) { + return done(err); + } + + assert(stdout.indexOf('.scss') !== -1); + assert(stdout.indexOf('.sass') !== -1); + + return done(); + }); + }); + + it('Should accept multiple input globs', function (done) { + var command = 'node bin/sass-lint "tests/cli/*.scss, tests/cli/*.sass" --no-exit --verbose'; + + exec(command, function (err, stdout) { + + if (err) { + return done(err); + } + + assert(stdout.indexOf('.scss') !== -1); + assert(stdout.indexOf('.sass') !== -1); + + return done(); + }); + }); + + it('Should accept multiple input paths from a config file', function (done) { + var command = 'node bin/sass-lint -c tests/yml/.multiple-inputs.yml --no-exit --verbose'; + + exec(command, function (err, stdout) { + + if (err) { + return done(err); + } + + assert(stdout.indexOf('.scss') !== -1); + assert(stdout.indexOf('.sass') !== -1); + + return done(); + }); + }); + + it('Should accept multiple input paths and multiple ignore paths', function (done) { + var command = 'node bin/sass-lint "tests/cli/cli-error.scss, tests/cli/cli-error.sass" -i "tests/cli/cli-error.scss, tests/cli/cli-error.sass" --no-exit --verbose'; + + exec(command, function (err, stdout) { + + if (err) { + return done(err); + } + + assert(stdout.indexOf('.scss') === -1); + assert(stdout.indexOf('.sass') === -1); + + return done(); + }); + }); + + it('Should accept multiple input paths and multiple ignores from a config file', function (done) { + var command = 'node bin/sass-lint -c tests/yml/.multiple-ignores.yml --no-exit --verbose'; + + exec(command, function (err, stdout) { + + if (err) { + return done(err); + } + assert(stdout.indexOf('.scss') === -1); + assert(stdout.indexOf('.sass') === -1); return done(); }); }); it('CLI format option should output JSON', function (done) { - var command = 'sass-lint -c tests/yml/.stylish-output.yml tests/cli/cli.scss --verbose --format json'; + var command = 'node bin/sass-lint -c tests/yml/.stylish-output.yml tests/cli/cli.scss --verbose --format json'; exec(command, function (err, stdout) { @@ -55,7 +151,7 @@ describe('cli', function () { }); it('CLI output option should write to test file', function (done) { - var command = 'sass-lint -c tests/yml/.stylish-output.yml tests/cli/cli.scss --verbose --format json --output tests/cli-output.json', + var command = 'node bin/sass-lint -c tests/yml/.stylish-output.yml tests/cli/cli.scss --verbose --format json --output tests/cli-output.json', outputFile = path.resolve(process.cwd(), 'tests/cli-output.json'); exec(command, function (err) { @@ -78,7 +174,7 @@ describe('cli', function () { }); it('CLI output option should write JSON to test file', function (done) { - var command = 'sass-lint -c tests/yml/.stylish-output.yml tests/cli/cli.scss --verbose --format json --output tests/cli-output.json', + var command = 'node bin/sass-lint -c tests/yml/.stylish-output.yml tests/cli/cli.scss --verbose --format json --output tests/cli-output.json', outputFile = path.resolve(process.cwd(), 'tests/cli-output.json'); exec(command, function (err) { @@ -111,7 +207,7 @@ describe('cli', function () { }); it('CLI output option should write JSON to test file when upper case format is used', function (done) { - var command = 'sass-lint -c tests/yml/.stylish-output.yml tests/cli/cli.scss --verbose --format JSON --output tests/cli-output.json', + var command = 'node bin/sass-lint -c tests/yml/.stylish-output.yml tests/cli/cli.scss --verbose --format JSON --output tests/cli-output.json', outputFile = path.resolve(process.cwd(), 'tests/cli-output.json'); exec(command, function (err) { @@ -146,7 +242,7 @@ describe('cli', function () { // Test custom config path it('should return JSON from a custom config', function (done) { - var command = 'sass-lint -c tests/yml/.color-keyword-errors.yml tests/cli/cli.scss --verbose'; + var command = 'node bin/sass-lint -c tests/yml/.color-keyword-errors.yml tests/cli/cli.scss --verbose'; exec(command, function (err, stdout) { @@ -168,7 +264,7 @@ describe('cli', function () { // Test 0 errors/warnings when rules set to 0 in config it('output should return no errors/warnings', function (done) { - var command = 'sass-lint -c tests/yml/.json-lint.yml tests/cli/cli.scss --verbose'; + var command = 'node bin/sass-lint -c tests/yml/.json-lint.yml tests/cli/cli.scss --verbose'; exec(command, function (err, stdout) { @@ -190,7 +286,7 @@ describe('cli', function () { // Test 1 warning when rules set to 0 in config it('should return a warning', function (done) { - var command = 'sass-lint -c tests/yml/.color-keyword-errors.yml tests/cli/cli.scss --verbose'; + var command = 'node bin/sass-lint -c tests/yml/.color-keyword-errors.yml tests/cli/cli.scss --verbose'; exec(command, function (err, stdout) { @@ -219,7 +315,7 @@ describe('cli', function () { }); it('should return a warning - stylish', function (done) { - var command = 'sass-lint -c tests/yml/.stylish-errors.yml tests/cli/cli.scss --verbose', + var command = 'node bin/sass-lint -c tests/yml/.stylish-errors.yml tests/cli/cli.scss --verbose', expectedOutputLength = 154; exec(command, function (err, stdout) { @@ -236,7 +332,7 @@ describe('cli', function () { }); it('should not include ignored paths', function (done) { - var command = 'sass-lint -i **/*.scss -v -q --format json **/cli/*.scss'; + var command = 'node bin/sass-lint -i "**/*.scss" -v -q --format json "**/cli/*.scss"'; exec(command, function (err, stdout) { @@ -251,7 +347,7 @@ describe('cli', function () { }); it('should not include multiple ignored paths', function (done) { - var command = 'sass-lint -i \'**/*.scss, **/*.sass\' -q -v --format json'; + var command = 'node bin/sass-lint -i "**/*.scss, **/*.sass" -q -v --format json'; exec(command, function (err, stdout) { @@ -267,7 +363,7 @@ describe('cli', function () { }); it('should override filename convention if a valid --syntax is provided', function (done) { - var command = 'sass-lint --syntax scss tests/cli/cli.txt --verbose --format json'; + var command = 'node bin/sass-lint --syntax scss tests/cli/cli.txt --verbose --format json'; exec(command, function (err, stdout) { @@ -287,32 +383,32 @@ describe('cli', function () { }); - it('should exit with exit code 1 when quiet', function (done) { - var command = 'sass-lint -c tests/yml/.error-output.yml tests/cli/cli-error.scss --verbose --no-exit'; + it('should exit with error when quiet', function (done) { + var command = 'node bin/sass-lint -c tests/yml/.error-output.yml tests/cli/cli-error.scss --verbose --no-exit'; exec(command, function (err) { - if (err.code === 1) { + if (err) { return done(); } - return done(new Error('Error code not 1')); + return done(new Error('No error on exit')); }); }); - it('should exit with exit code 1 when more warnings than --max-warnings', function (done) { - var command = 'sass-lint -c tests/yml/.color-keyword-errors.yml tests/cli/cli.scss --max-warnings 0'; + it('should exit with error when more warnings than --max-warnings', function (done) { + var command = 'node bin/sass-lint -c tests/yml/.color-keyword-errors.yml tests/cli/cli.scss --max-warnings 0'; exec(command, function (err) { - if (err && err.code === 1) { + if (err) { return done(); } - return done(new Error('Error code not 1')); + return done(new Error('No error on exit')); }); }); it('should not exit with an error if no config is specified', function (done) { - var command = 'sass-lint tests/cli/cli-clean.scss --verbose --no-exit'; + var command = 'node bin/sass-lint tests/cli/cli-clean.scss --verbose --no-exit'; exec(command, function (err) { if (!err) { @@ -327,7 +423,7 @@ describe('cli', function () { * We disabled eslints handle callback err rule here as we are deliberately throwing errors that we don't care about */ it('parse errors should report as a lint error', function (done) { - var command = 'sass-lint --config tests/yml/.stylish-output.yml tests/sass/parse.scss --verbose --no-exit --format json'; + var command = 'node bin/sass-lint --config tests/yml/.stylish-output.yml tests/sass/parse.scss --verbose --no-exit --format json'; exec(command, function (err, stdout) { // eslint-disable-line handle-callback-err var result = JSON.parse(stdout)[0]; @@ -338,7 +434,7 @@ describe('cli', function () { }); it('parse errors should report as severity 2', function (done) { - var command = 'sass-lint --config tests/yml/.stylish-output.yml tests/sass/parse.scss --verbose --no-exit --format json'; + var command = 'node bin/sass-lint --config tests/yml/.stylish-output.yml tests/sass/parse.scss --verbose --no-exit --format json'; exec(command, function (err, stdout) { // eslint-disable-line handle-callback-err var result = JSON.parse(stdout)[0], @@ -351,7 +447,7 @@ describe('cli', function () { }); it('parse errors should report the correct message', function (done) { - var command = 'sass-lint --config tests/yml/.stylish-output.yml tests/sass/parse.scss --verbose --no-exit --format json'; + var command = 'node bin/sass-lint --config tests/yml/.stylish-output.yml tests/sass/parse.scss --verbose --no-exit --format json'; exec(command, function (err, stdout) { // eslint-disable-line handle-callback-err var result = JSON.parse(stdout)[0], @@ -364,7 +460,7 @@ describe('cli', function () { }); it('parse errors rule Id should be \'Fatal\'', function (done) { - var command = 'sass-lint --config tests/yml/.stylish-output.yml tests/sass/parse.scss --verbose --no-exit --format json'; + var command = 'node bin/sass-lint --config tests/yml/.stylish-output.yml tests/sass/parse.scss --verbose --no-exit --format json'; exec(command, function (err, stdout) { // eslint-disable-line handle-callback-err var result = JSON.parse(stdout)[0], @@ -376,3 +472,43 @@ describe('cli', function () { }); }); }); + +// ============================================================================== +// UTF-8 BOM +// ============================================================================== + +describe('Reading files with UTF-8 BOM', function () { + before(function () { + var testText = fs.readFileSync('tests/bom-utf8/starts-with-mixin-utf8-bom.scss').toString(); + if (testText.charCodeAt(0) !== 0xFEFF) { + throw new Error('BOM test files have no BOM markers'); + } + }); + + it('should not throw a parse error from file containing a BOM', function (done) { + var command = 'node bin/sass-lint -v tests/bom-utf8/starts-with-mixin-utf8-bom.scss --format json'; + + exec(command, function (err, stdout) { // eslint-disable-line handle-callback-err + var result = JSON.parse(stdout)[0]; + + // Files with BOM markers that start with a mixin throw a fatal error + // https://github.com/sasstools/sass-lint/issues/880 + assert.equal(result.errorCount, 0); + done(); + }); + }); + + it('should return the correct amount of warnings from a file containing BOM markers', function (done) { + var command = 'node bin/sass-lint -v tests/bom-utf8/var-utf8-bom.scss --format json'; + + exec(command, function (err, stdout) { // eslint-disable-line handle-callback-err + var result = JSON.parse(stdout)[0]; + + // Files starting with variables threw extra errors + // see https://github.com/sasstools/sass-lint/issues/880 + assert.equal(result.errorCount, 0); + assert.equal(result.warningCount, 2); + done(); + }); + }); +}); diff --git a/node_modules/sass-lint/tests/config-helpers.js b/node_modules/sass-lint/tests/config-helpers.js new file mode 100644 index 0000000..a30781e --- /dev/null +++ b/node_modules/sass-lint/tests/config-helpers.js @@ -0,0 +1,121 @@ +'use strict'; + +var equal = require('deep-equal'), + assert = require('assert'), + yaml = require('js-yaml'), + fs = require('fs'), + path = require('path'), + configHelpers = require('../lib/config-helpers'); + +var emptyConfig = { + options: {}, + files: {}, + rules: {} +}; +var defaultConfig = yaml.safeLoad(fs.readFileSync(path.resolve('lib/config/sass-lint.yml'), 'utf8')); +var ignoreConfig = yaml.safeLoad(fs.readFileSync('tests/yml/.ignore-file.yml', 'utf8')); + +var extendableConfigA1 = { + 'options': { + 'config-file': 'extend/.extend-c.yml' + }, + 'files': {}, + 'rules': { + 'no-ids': 2 + } +}; +var extendableConfigA2 = { + 'options': { + 'config-file': 'extend/.extend-b.yml' + }, + 'files': {}, + 'rules': { + 'no-ids': 2 + } +}; +var expectedA1 = { + 'options': { + 'config-file': 'extend/.extend-c.yml' + }, + 'files': {}, + 'rules': { + 'no-ids': 2, + 'no-important': 2 + } +}; +var expectedA2 = { + 'options': { + 'config-file': 'extend/.extend-b.yml' + }, + 'files': {}, + 'rules': { + 'no-ids': 2, + 'no-important': 2, + 'no-mergeable-selectors': 2 + } +}; + + +describe('config-helpers', function () { + describe('loadDefaults', function () { + it('Should load the current default config', function (done) { + var testConfig = configHelpers.loadDefaults(); + + assert(equal(defaultConfig, testConfig, { + 'strict': true + })); + done(); + }); + }); + + describe('loadConfig', function () { + it('Should load a config from a provided path', function (done) { + var testConfig = configHelpers.loadConfig('tests/yml/.ignore-file.yml'); + + assert(equal(ignoreConfig, testConfig, { + 'strict': true + })); + done(); + }); + + it('should return an empty config when an incorrect path is provided', function (done) { + var testConfig = configHelpers.loadConfig('tests/yml/non-existant.yml'); + + assert(equal(emptyConfig, testConfig, { + 'strict': true + })); + done(); + }); + + it('should return an empty config when a blank config is provided', function (done) { + var testConfig = configHelpers.loadConfig('tests/yml/.blank.yml'); + + assert(equal(emptyConfig, testConfig, { + 'strict': true + })); + done(); + }); + }); + + describe('checkForConfigExtend', function () { + it('should return the config it was provided when no extend is found', function (done) { + var config = yaml.safeLoad(fs.readFileSync('tests/yml/.ignore-file.yml', 'utf8')); + var testConfig = configHelpers.checkForConfigExtend(config); + + assert(equal(config, testConfig)); + done(); + }); + + it('should return a merged config when a config specifies an extended config', function (done) { + var testConfig = configHelpers.checkForConfigExtend(extendableConfigA1, 'tests/yml/.extend-a1.yml'); + assert(equal(expectedA1, testConfig)); + done(); + }); + + it('should return a merged config when a chain of configs are specified', function (done) { + var testConfig = configHelpers.checkForConfigExtend(extendableConfigA2, 'tests/yml/.extend-a2.yml'); + assert(equal(expectedA2, testConfig)); + done(); + }); + }); +}); diff --git a/node_modules/sass-lint/tests/config.js b/node_modules/sass-lint/tests/config.js index f77906d..d00f838 100644 --- a/node_modules/sass-lint/tests/config.js +++ b/node_modules/sass-lint/tests/config.js @@ -139,30 +139,6 @@ describe('config', function () { done(); }); - it('should not merge custom option rules when `merge-default-rules` is false', function (done) { - var defaultConfig = yaml.safeLoad(fs.readFileSync(path.join(__dirname, '..', 'lib', 'config', 'sass-lint.yml'), 'utf8')), - tempOptions = custOptions(), - conf, - merged; - - tempOptions.options['merge-default-rules'] = false; - conf = config(tempOptions); - merged = merge.recursive(tempOptions, defaultConfig); - merged.rules = tempOptions.rules; - - assert( - equal( - conf, - merged, - { - 'strict': true - } - ) - ); - - done(); - }); - it('should load a cached version of the config', function (done) { var tempOptions = { 'options': {} @@ -191,4 +167,30 @@ describe('config', function () { done(); }); + + it('should not merge custom option rules when `merge-default-rules` is false', function (done) { + var defaultConfig = yaml.safeLoad(fs.readFileSync(path.join(__dirname, '..', 'lib', 'config', 'sass-lint.yml'), 'utf8')), + tempOptions = custOptions(), + conf, + merged; + + tempOptions.options['merge-default-rules'] = false; + conf = config(tempOptions); + merged = merge.recursive(tempOptions, defaultConfig); + merged.rules = tempOptions.rules; + + assert( + equal( + conf, + merged, + { + 'strict': true + } + ) + ); + + done(); + }); + + }); diff --git a/node_modules/sass-lint/tests/dir-test/dir.scss/test.scss b/node_modules/sass-lint/tests/dir-test/dir.scss/test.scss new file mode 100644 index 0000000..e2658ab --- /dev/null +++ b/node_modules/sass-lint/tests/dir-test/dir.scss/test.scss @@ -0,0 +1,3 @@ +#foo { + content: ''; +} diff --git a/node_modules/sass-lint/tests/failures.js b/node_modules/sass-lint/tests/failures.js new file mode 100644 index 0000000..3127d45 --- /dev/null +++ b/node_modules/sass-lint/tests/failures.js @@ -0,0 +1,90 @@ +'use strict'; + +var lint = require('../index'), + assert = require('assert'), + exceptions = require('../lib/exceptions'); + +describe('failures', function () { + it('should raise SassLintFailureError if indentation is set to error', function (done) { + assert.throws( + function () { + var results = lint.lintFiles('tests/sass/indentation/indentation-spaces.scss', {rules: {indentation: 2}}); // 14 errors + lint.failOnError(results); // Set indentation to error + }, + exceptions.SassLintFailureError + ); + assert.throws( + function () { + var results = lint.lintFiles('tests/sass/indentation/indentation-spaces.scss', {}, 'tests/yml/.indentation-error.yml'); // 14 errors + lint.failOnError(results); // Set indentation to error + }, + exceptions.SassLintFailureError + ); + + done(); + }); + + it('should not raise error if indentation is only set to warn', function (done) { + // These should produce 55 warnings and 0 errors + var directResults = lint.lintFiles('sass/indentation/indentation-spaces.scss', {rules: {indentation: 1}}); + var configResults = lint.lintFiles('sass/indentation/indentation-spaces.scss', {}, 'yml/.indentation-warn.yml'); + lint.failOnError(directResults); + lint.failOnError(configResults); + + done(); + }); + + it('should raise MaxWarningsExceededError if warnings exceed `max-warnings` setting', function (done) { + assert.throws( + function () { + var results = lint.lintFiles('tests/sass/indentation/indentation-spaces.scss', {}); // 55 warnings + lint.failOnError(results, {options: {'max-warnings': 10}}); + }, + exceptions.MaxWarningsExceededError + ); + assert.throws( + function () { + var results = lint.lintFiles('tests/sass/indentation/indentation-spaces.scss', {}); // 55 warnings + lint.failOnError(results, {}, 'tests/yml/.max-10-warnings.yml'); + }, + exceptions.MaxWarningsExceededError + ); + + done(); + }); + + it('should raise MaxWarningsExceededError if warnings exceed `max-warnings` of zero', function (done) { + assert.throws( + function () { + var results = lint.lintFiles('tests/sass/indentation/indentation-spaces.scss', {}); // 55 warnings + lint.failOnError(results, {options: {'max-warnings': 0}}); + }, + exceptions.MaxWarningsExceededError + ); + assert.throws( + function () { + var results = lint.lintFiles('tests/sass/indentation/indentation-spaces.scss', {}); // 55 warnings + lint.failOnError(results, {}, 'tests/yml/.max-0-warnings.yml'); + }, + exceptions.MaxWarningsExceededError + ); + + done(); + }); + + it('should not raise error if warnings do not exceed `max-warnings` setting', function (done) { + var results = lint.lintFiles('sass/indentation/indentation-spaces.scss', {}); // 55 warnings + lint.failOnError(results, {'max-warnings': 100}); // should succceed + lint.failOnError(results, {}, 'yml/.max-100-warnings.yml'); // should succeed + + done(); + }); + + it('should not raise error if no warnings even if `max-warnings` is zero', function (done) { + var results = lint.lintFiles('sass/success.scss', {}); // no warnings + lint.failOnError(results, {'max-warnings': 0}); // should still succceed + lint.failOnError(results, {}, 'yml/.max-0-warnings.yml'); // should still succeed + + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers.js b/node_modules/sass-lint/tests/helpers.js deleted file mode 100644 index 126d10c..0000000 --- a/node_modules/sass-lint/tests/helpers.js +++ /dev/null @@ -1,1253 +0,0 @@ -'use strict'; - -var assert = require('assert'), - helpers = require('../lib/helpers'), - gonzales = require('gonzales-pe-sl'); - -var haystack = [ - { - prop: 'a', - propb: 'b' - }, - { - prop: 'c', - propb: 'd' - } -]; - -var classBlock = - { - type: 'class', - content: - [ - { - type: 'ident', - content: 'foo', - syntax: 'scss', - start: { line: 5, column: 2 }, - end: { line: 5, column: 4 }, - indexHasChanged: [ 0 ] - } - ], - syntax: 'scss', - start: { line: 5, column: 1 }, - end: { line: 5, column: 4 }, - indexHasChanged: [ 0 ] - }, - - otherClassBlock = - { - type: 'class', - content: - [ - { - type: 'ident', - content: 'test', - syntax: 'scss', - start: { line: 9, column: 2 }, - end: { line: 9, column: 5 }, - indexHasChanged: [ 0 ] - } - ], - syntax: 'scss', - start: { line: 9, column: 1 }, - end: { line: 9, column: 5 }, - indexHasChanged: [ 0 ] - }; - -var detectTestA = { - line: 1, - column: 1 - }, - - detectTestB = { - line: 2, - column: 2 - }, - - detectTestC = { - line: 1, - column: 2 - }; - - -describe('helpers', function () { - - ////////////////////////////// - // Helpers is loaded - ////////////////////////////// - - it('helpers should not be undefined', function (done) { - - var loaded = typeof (helpers) === 'object' ? true : false; - - assert.equal(true, loaded); - done(); - }); - - ////////////////////////////// - // propertySearch - ////////////////////////////// - - it('propertySearch should not find a property', function (done) { - - var needle = 'e', - property = 'prop', - result = helpers.propertySearch(haystack, needle, property); - - assert.equal(-1, result); - done(); - }); - - it('propertySearch should find a property', function (done) { - - var needle = 'a', - property = 'prop', - result = helpers.propertySearch(haystack, needle, property); - - assert.equal(0, result); - done(); - }); - - it('propertySearch should find a deeper property', function (done) { - - var needle = 'd', - property = 'propb', - result = helpers.propertySearch(haystack, needle, property); - - assert.equal(1, result); - done(); - }); - - ////////////////////////////// - // isEqual - ////////////////////////////// - - it('isEqual should return true', function (done) { - - var testBlock = - { - type: 'class', - content: - [ - { - type: 'ident', - content: 'foo', - syntax: 'scss', - start: { line: 5, column: 2 }, - end: { line: 5, column: 4 }, - indexHasChanged: [ 0 ] - } - ], - syntax: 'scss', - start: { line: 5, column: 1 }, - end: { line: 5, column: 4 }, - indexHasChanged: [ 0 ] - }, - result = helpers.isEqual(classBlock, testBlock); - - assert.equal(true, result); - done(); - }); - - it('isEqual should return false - [objA.type !== objB.type]', function (done) { - - var testBlock = { - type: 'block', - start: {line: 5}, - end: {line: 5}, - content: [1] - }, - result = helpers.isEqual(classBlock, testBlock); - - assert.equal(false, result); - done(); - }); - - it('isEqual should return false - [objA.start.line !== objB.start.line]', function (done) { - - var testBlock = { - type: 'class', - start: {line: 7}, - end: {line: 5}, - content: [1] - }, - result = helpers.isEqual(classBlock, testBlock); - - assert.equal(false, result); - done(); - }); - - it('isEqual should return false - [objA.end.line !== objB.end.line]', function (done) { - - var testBlock = { - type: 'class', - start: {line: 5}, - end: {line: 7}, - content: [1] - }, - result = helpers.isEqual(classBlock, testBlock); - - assert.equal(false, result); - done(); - }); - - it('isEqual should return false - [objA.content.length !== objB.content.length]', function (done) { - - var testBlock = { - type: 'class', - start: {line: 5}, - end: {line: 5}, - content: [1, 2, 3, 4] - }, - result = helpers.isEqual(classBlock, testBlock); - - assert.equal(false, result); - done(); - }); - - ////////////////////////////// - // isUnique - ////////////////////////////// - - it('isUnique should return false - [objA === objB]', function (done) { - - - var ledger = []; - ledger.push(classBlock); - - var result = helpers.isUnique(ledger, classBlock); - - assert.equal(false, result); - done(); - }); - - it('isUnique should return true - [objA !== objB]', function (done) { - - - var ledger = []; - ledger.push(classBlock); - - var result = helpers.isUnique(ledger, otherClassBlock); - - assert.equal(false, result); - done(); - }); - - ////////////////////////////// - // addUnique - ////////////////////////////// - - it('addUnique should return a modified results array - [objA !== objB]', function (done) { - - var ledger = []; - ledger.push(classBlock); - - var result = helpers.addUnique(ledger, otherClassBlock); - - ledger.push(otherClassBlock); - - assert.equal(ledger, result); - done(); - }); - - it('addUnique should return an unmodified results array - [objA === objB]', function (done) { - - var ledger = []; - ledger.push(classBlock); - - var result = helpers.addUnique(ledger, classBlock); - - assert.equal(ledger, result); - done(); - }); - - ////////////////////////////// - // sortDetects - ////////////////////////////// - - it('sortDetects should return -1 - [a.line < b.line]', function (done) { - - var result = helpers.sortDetects(detectTestA, detectTestB); - - assert.equal(-1, result); - done(); - }); - - it('sortDetects should return 1 - [a.line > b.line]', function (done) { - - var result = helpers.sortDetects(detectTestB, detectTestA); - - assert.equal(1, result); - done(); - }); - - it('sortDetects should return 0 - [a === b]', function (done) { - - var result = helpers.sortDetects(detectTestA, detectTestA); - - assert.equal(0, result); - done(); - }); - - it('sortDetects should return -1 - [a.column < b.column]', function (done) { - - var result = helpers.sortDetects(detectTestA, detectTestC); - - assert.equal(-1, result); - done(); - }); - - it('sortDetects should return 1 - [a.column > b.column]', function (done) { - - var result = helpers.sortDetects(detectTestC, detectTestA); - - assert.equal(1, result); - done(); - }); - - ////////////////////////////// - // isNumber - ////////////////////////////// - - it('isNumber - [10 - true]', function (done) { - - var result = helpers.isNumber(10); - - assert.equal(true, result); - done(); - }); - - it('isNumber - [\'10\' - true]', function (done) { - - var result = helpers.isNumber('10'); - - assert.equal(true, result); - done(); - }); - - it('isNumber - [\'ten\' - false]', function (done) { - - var result = helpers.isNumber('ten'); - - assert.equal(false, result); - done(); - }); - - it('isNumber - [\'ff00ff\' - false]', function (done) { - - var result = helpers.isNumber('ff00ff'); - - assert.equal(false, result); - done(); - }); - - ////////////////////////////// - // isUpperCase - ////////////////////////////// - - it('isUpperCase - [\'TEST\' - true]', function (done) { - - var result = helpers.isUpperCase('TEST'); - - assert.equal(true, result); - done(); - }); - - it('isUpperCase - [\'test\' - false]', function (done) { - - var result = helpers.isUpperCase('test'); - - assert.equal(false, result); - done(); - }); - - it('isUpperCase - [abcDEF - false]', function (done) { - - var result = helpers.isUpperCase('abcDEF'); - - assert.equal(false, result); - done(); - }); - - it('isUpperCase - [\'123\' - false]', function (done) { - - var result = helpers.isUpperCase('123'); - - assert.equal(false, result); - done(); - }); - - ////////////////////////////// - // isLowerCase - ////////////////////////////// - - it('isLowerCase - [\'TEST\' - false]', function (done) { - - var result = helpers.isLowerCase('TEST'); - - assert.equal(false, result); - done(); - }); - - it('isLowerCase - [\'test\' - true]', function (done) { - - var result = helpers.isLowerCase('test'); - - assert.equal(true, result); - done(); - }); - - it('isLowerCase - [abcDEF - false]', function (done) { - - var result = helpers.isLowerCase('abcDEF'); - - assert.equal(false, result); - done(); - }); - - it('isLowerCase - [\'123\' - false]', function (done) { - - var result = helpers.isLowerCase('123'); - - assert.equal(false, result); - done(); - }); - - ////////////////////////////// - // isCamelCase - ////////////////////////////// - - it('isCamelCase - [\'TEST\' - false]', function (done) { - - var result = helpers.isCamelCase('TEST'); - - assert.equal(false, result); - done(); - }); - - it('isCamelCase - [\'test\' - true]', function (done) { - - var result = helpers.isCamelCase('test'); - - assert.equal(true, result); - done(); - }); - - it('isCamelCase - [abcDEF - true]', function (done) { - - var result = helpers.isCamelCase('abcDEF'); - - assert.equal(true, result); - done(); - }); - - it('isCamelCase - [\'123\' - false]', function (done) { - - var result = helpers.isCamelCase('123'); - - assert.equal(false, result); - done(); - }); - - it('isCamelCase - [\'aBcDeF\' - true]', function (done) { - - var result = helpers.isCamelCase('aBcDeF'); - - assert.equal(true, result); - done(); - }); - - ////////////////////////////// - // isHyphenatedLowercase - ////////////////////////////// - - it('isHyphenatedLowercase - [\'abc-def\' - true]', function (done) { - - var result = helpers.isHyphenatedLowercase('abc-def'); - - assert.equal(true, result); - done(); - }); - - it('isHyphenatedLowercase - [\'TEST\' - false]', function (done) { - - var result = helpers.isHyphenatedLowercase('TEST'); - - assert.equal(false, result); - done(); - }); - - it('isHyphenatedLowercase - [\'test\' - true]', function (done) { - - var result = helpers.isHyphenatedLowercase('test'); - - assert.equal(true, result); - done(); - }); - - it('isHyphenatedLowercase - [abcDEF - false]', function (done) { - - var result = helpers.isHyphenatedLowercase('abcDEF'); - - assert.equal(false, result); - done(); - }); - - it('isHyphenatedLowercase - [\'123\' - true]', function (done) { - - var result = helpers.isHyphenatedLowercase('123'); - - assert.equal(true, result); - done(); - }); - - it('isHyphenatedLowercase - [\'aBcDeF\' - false]', function (done) { - - var result = helpers.isHyphenatedLowercase('aBcDeF'); - - assert.equal(false, result); - done(); - }); - - it('isHyphenatedLowercase - [\'abc-\\31\\32\\33\' - false]', function (done) { - - var result = helpers.isHyphenatedLowercase('abc-\\31\\32\\33'); - - assert.equal(false, result); - done(); - }); - - it('isHyphenatedLowercase - [\'abc-\\+\\*\' - false]', function (done) { - - var result = helpers.isHyphenatedLowercase('abc-\\+\\*'); - - assert.equal(false, result); - done(); - }); - - ////////////////////////////// - // isSnakeCase - ////////////////////////////// - - it('isSnakeCase - [\'TEST\' - false]', function (done) { - - var result = helpers.isSnakeCase('TEST'); - - assert.equal(false, result); - done(); - }); - - it('isSnakeCase - [\'test\' - true]', function (done) { - - var result = helpers.isSnakeCase('test'); - - assert.equal(true, result); - done(); - }); - - it('isSnakeCase - [abcDEF - false]', function (done) { - - var result = helpers.isSnakeCase('abcDEF'); - - assert.equal(false, result); - done(); - }); - - it('isSnakeCase - [\'123\' - true]', function (done) { - - var result = helpers.isSnakeCase('123'); - - assert.equal(true, result); - done(); - }); - - it('isSnakeCase - [\'ab_cd_ef\' - true]', function (done) { - - var result = helpers.isSnakeCase('ab_cd_ef'); - - assert.equal(true, result); - done(); - }); - - it('isSnakeCase - [\'ab_cd-ef\' - false]', function (done) { - - var result = helpers.isSnakeCase('ab_cd-ef'); - - assert.equal(false, result); - done(); - }); - - ////////////////////////////// - // isHyphenatedBEM - ////////////////////////////// - - it('isHyphenatedBEM - [\'TEST\' - false]', function (done) { - - var result = helpers.isHyphenatedBEM('TEST'); - - assert.equal(false, result); - done(); - }); - - it('isHyphenatedBEM - [\'test\' - true]', function (done) { - - var result = helpers.isHyphenatedBEM('test'); - - assert.equal(true, result); - done(); - }); - - it('isHyphenatedBEM - [abcDEF - false]', function (done) { - - var result = helpers.isHyphenatedBEM('abcDEF'); - - assert.equal(false, result); - done(); - }); - - it('isHyphenatedBEM - [\'abc---def\' - false]', function (done) { - - var result = helpers.isHyphenatedBEM('abc---def'); - - assert.equal(false, result); - done(); - }); - - it('isHyphenatedBEM - [\'abc___def\' - false]', function (done) { - - var result = helpers.isHyphenatedBEM('abc___def'); - - assert.equal(false, result); - done(); - }); - - it('isHyphenatedBEM - [\'ab__cd__ef\' - true]', function (done) { - - var result = helpers.isHyphenatedBEM('ab__cd__ef'); - - assert.equal(true, result); - done(); - }); - - it('isHyphenatedBEM - [\'ab__cd--ef\' - true]', function (done) { - - var result = helpers.isHyphenatedBEM('ab__cd--ef'); - - assert.equal(true, result); - done(); - }); - - it('isHyphenatedBEM - [\'abc_def\' - false]', function (done) { - - var result = helpers.isHyphenatedBEM('abc_def'); - - assert.equal(false, result); - done(); - }); - - it('isHyphenatedBEM - [\'abc-def\' - true]', function (done) { - - var result = helpers.isHyphenatedBEM('abc-def'); - - assert.equal(true, result); - done(); - }); - - it('isHyphenatedBEM - [\'ab-cd__ef\' - true]', function (done) { - - var result = helpers.isHyphenatedBEM('ab-cd__ef'); - - assert.equal(true, result); - done(); - }); - - ////////////////////////////// - // isStrictBEM - ////////////////////////////// - - it('isStrictBEM - [\'TEST\' - false]', function (done) { - - var result = helpers.isStrictBEM('TEST'); - - assert.equal(false, result); - done(); - }); - - it('isStrictBEM - [\'test\' - true]', function (done) { - - var result = helpers.isStrictBEM('test'); - - assert.equal(true, result); - done(); - }); - - it('isStrictBEM - [abcDEF - false]', function (done) { - - var result = helpers.isStrictBEM('abcDEF'); - - assert.equal(false, result); - done(); - }); - - it('isStrictBEM - [\'abc---def\' - false]', function (done) { - - var result = helpers.isStrictBEM('abc---def'); - - assert.equal(false, result); - done(); - }); - - it('isStrictBEM - [\'abc___def\' - false]', function (done) { - - var result = helpers.isStrictBEM('abc___def'); - - assert.equal(false, result); - done(); - }); - - it('isStrictBEM - [\'ab__cd__ef\' - false]', function (done) { - - var result = helpers.isStrictBEM('ab__cd__ef'); - - assert.equal(false, result); - done(); - }); - - it('isStrictBEM - [\'ab__cd--ef\' - false]', function (done) { - - var result = helpers.isStrictBEM('ab__cd--ef'); - - assert.equal(false, result); - done(); - }); - - it('isStrictBEM - [\'ab__cd_ef_gh\' - true]', function (done) { - - var result = helpers.isStrictBEM('ab__cd_ef_gh'); - - assert.equal(true, result); - done(); - }); - - it('isStrictBEM - [\'ab-cd-ef__gh-ij-kl_mn-op-qr_st-uv-wx\' - true]', function (done) { - - var result = helpers.isStrictBEM('ab-cd-ef__gh-ij-kl_mn-op-qr_st-uv-wx'); - - assert.equal(true, result); - done(); - }); - - it('isStrictBEM - [\'ab__cd_ef_gh_ij\' - false]', function (done) { - - var result = helpers.isStrictBEM('ab__cd_ef_gh_ij'); - - assert.equal(false, result); - done(); - }); - - it('isStrictBEM - [\'abc_def\' - false]', function (done) { - - var result = helpers.isStrictBEM('abc_def'); - - assert.equal(false, result); - done(); - }); - - it('isStrictBEM - [\'abc-def\' - true]', function (done) { - - var result = helpers.isStrictBEM('abc-def'); - - assert.equal(true, result); - done(); - }); - - it('isStrictBEM - [\'ab-cd__ef\' - true]', function (done) { - - var result = helpers.isStrictBEM('ab-cd__ef'); - - assert.equal(true, result); - done(); - }); - - ////////////////////////////// - // isValidHex - ////////////////////////////// - - it('isValidHex - [\'abcdef\' - true]', function (done) { - - var result = helpers.isValidHex('abcdef'); - - assert.equal(true, result); - done(); - }); - - it('isValidHex - [\'ABCDEF\' - true]', function (done) { - - var result = helpers.isValidHex('ABCDEF'); - - assert.equal(true, result); - done(); - }); - - it('isValidHex - [\'123456\' - true]', function (done) { - - var result = helpers.isValidHex('123456'); - - assert.equal(true, result); - done(); - }); - - it('isValidHex - [\'ABC123\' - true]', function (done) { - - var result = helpers.isValidHex('ABC123'); - - assert.equal(true, result); - done(); - }); - - it('isValidHex - [\'abc123\' - true]', function (done) { - - var result = helpers.isValidHex('abc123'); - - assert.equal(true, result); - done(); - }); - - it('isValidHex - [\'fff\' - true]', function (done) { - - var result = helpers.isValidHex('fff'); - - assert.equal(true, result); - done(); - }); - - it('isValidHex - [\'123\' - true]', function (done) { - - var result = helpers.isValidHex('123'); - - assert.equal(true, result); - done(); - }); - - it('isValidHex - [\'efghij\' - false]', function (done) { - - var result = helpers.isValidHex('efghij'); - - assert.equal(false, result); - done(); - }); - - it('isValidHex - [\'thj\' - false]', function (done) { - - var result = helpers.isValidHex('thj'); - - assert.equal(false, result); - done(); - }); - - it('isValidHex - [\'ab\' - false]', function (done) { - - var result = helpers.isValidHex('ab'); - - assert.equal(false, result); - done(); - }); - - it('isValidHex - [\'12\' - false]', function (done) { - - var result = helpers.isValidHex('12'); - - assert.equal(false, result); - done(); - }); - - it('isValidHex - [\'1234567\' - false]', function (done) { - - var result = helpers.isValidHex('1234567'); - - assert.equal(false, result); - done(); - }); - - it('isValidHex - [\'abc1234\' - false]', function (done) { - - var result = helpers.isValidHex('abc1234'); - - assert.equal(false, result); - done(); - }); - - ////////////////////////////// - // loadConfigFile - ////////////////////////////// - - it('loadConfigFile', function (done) { - - var result = helpers.loadConfigFile('../../tests/testFile.txt'), - expect = 'This is a test file that test\'s the loadConfigFile helper function.'; - - assert.equal(expect, result); - done(); - }); - - ////////////////////////////// - // hasEOL - ////////////////////////////// - - it('hasEOL - [\'\\n\' - true]', function (done) { - - var result = helpers.hasEOL('\n'); - - assert.equal(true, result); - done(); - }); - - it('hasEOL - [\'\\r\\n\' - true]', function (done) { - - var result = helpers.hasEOL('\r\n'); - - assert.equal(true, result); - done(); - }); - - ////////////////////////////// - // isEmptyLine - ////////////////////////////// - - it('isEmptyLine - [\'\\n\\n\' - true]', function (done) { - - var result = helpers.isEmptyLine('\n\n'); - - assert.equal(true, result); - done(); - }); - - it('isEmptyLine - [\'\\r\\n\\r\\n\' - true]', function (done) { - - var result = helpers.isEmptyLine('\r\n\r\n'); - - assert.equal(true, result); - done(); - }); - - it('isEmptyLine - [\'\\n \\n\' - false]', function (done) { - - var result = helpers.isEmptyLine('\n \n'); - - assert.equal(false, result); - done(); - }); - - it('isEmptyLine - [\'\\r\\nabc\\r\\n\' - false]', function (done) { - - var result = helpers.isEmptyLine('\r\nabc\r\n'); - - assert.equal(false, result); - done(); - }); - - ////////////////////////////// - // Strip quotes - ////////////////////////////// - - it('stripQuotes - [double quotes]', function (done) { - var result = helpers.stripQuotes('"This is a string"'), - expect = 'This is a string'; - - assert.equal(expect, result); - done(); - }); - - it('stripQuotes - [single quotes]', function (done) { - var result = helpers.stripQuotes('\'This is a string\''), - expect = 'This is a string'; - - assert.equal(expect, result); - done(); - }); - - ////////////////////////////// - // stripPrefix - ////////////////////////////// - - it('stripPrefix - [-webkit-transition - transition]', function (done) { - - var result = helpers.stripPrefix('-webkit-transition'); - - assert.equal('transition', result); - done(); - }); - - it('stripPrefix - [-moz-transition - transition]', function (done) { - - var result = helpers.stripPrefix('-moz-transition'); - - assert.equal('transition', result); - done(); - }); - - it('stripPrefix - [-webkit-border-color - border-color]', function (done) { - - var result = helpers.stripPrefix('-webkit-border-color'); - - assert.equal('border-color', result); - done(); - }); - - it('stripPrefix - [-moz-osx-font-smoothing - font-smoothing]', function (done) { - - var result = helpers.stripPrefix('-moz-osx-font-smoothing'); - - assert.equal('font-smoothing', result); - done(); - }); - - ////////////////////////////// - // stripLastSpace - ////////////////////////////// - - it('stripLastSpace - [\'selector \']', function (done) { - - var result = helpers.stripLastSpace('selector '); - - assert.equal('selector', result); - done(); - }); - - it('stripLastSpace - [\'selector test \']', function (done) { - - var result = helpers.stripLastSpace('selector test'); - - assert.equal('selector test', result); - done(); - }); - - it('stripLastSpace - [\'selector\']', function (done) { - - var result = helpers.stripLastSpace('selector'); - - assert.equal('selector', result); - done(); - }); - - it('stripLastSpace - [\'selector test\']', function (done) { - - var result = helpers.stripLastSpace('selector test'); - - assert.equal('selector test', result); - done(); - }); - - ////////////////////////////// - // isNestable - ////////////////////////////// - - it('isNestable - nest attribute in selector', function (done) { - var elements = ['selector', 'class', 'id', 'attribute'], - nestable = ['class', 'selector', 'attribute'], - previous = 'selector', - current = 'attribute'; - - var result = helpers.isNestable(current, previous, elements, nestable); - - assert.equal(true, result); - done(); - }); - - it('isNestable - nest id in class', function (done) { - var elements = ['selector', 'class', 'id', 'attribute'], - nestable = ['class', 'selector', 'attribute'], - previous = 'class', - current = 'id'; - - var result = helpers.isNestable(current, previous, elements, nestable); - - assert.equal(false, result); - done(); - }); - - ////////////////////////////// - // attemptTraversal - ////////////////////////////// - it('attemptTraversal - SCSS - collect all nodes', function () { - var stylesheet = gonzales.parse(['', - '.a {', - ' .b {', - ' color: red;', - ' }', - ' .c {', - ' color: blue;', - ' }', - ' .d {', - ' color: green;', - ' }', - '}'].join('\n'), { syntax: 'scss' }); - - assert.deepEqual( - helpers.attemptTraversal(stylesheet, ['ruleset', 'block', 'ruleset', 'block', 'declaration', 'property', 'ident']) - .map(function (node) { - return node.content; - }), - ['color', 'color', 'color'] - ); - }); - - it('attemptTraversal - SCSS - empty array when traversal fails', function () { - var stylesheet = gonzales.parse(['', - '.a {', - ' color: red;', - '}'].join('\n'), { syntax: 'scss' }); - - assert.equal( - helpers.attemptTraversal(stylesheet, ['ruleset', 'block', 'ruleset', 'block']).length, - 0 - ); - }); - - it('attemptTraversal - Sass - collect all nodes', function () { - var stylesheet = gonzales.parse(['', - '.a', - ' .b', - ' color: red', - ' .c', - ' color: blue', - ' .d', - ' color: green', - ''].join('\n'), { syntax: 'sass' }); - - assert.deepEqual( - helpers.attemptTraversal(stylesheet, ['ruleset', 'block', 'ruleset', 'block', 'declaration', 'property', 'ident']) - .map(function (node) { - return node.content; - }), - ['color', 'color', 'color'] - ); - }); - - it('attemptTraversal - Sass - empty array when traversal fails', function () { - var stylesheet = gonzales.parse(['', - '.a', - ' color: red', - ''].join('\n'), { syntax: 'sass' }); - - assert.equal( - helpers.attemptTraversal(stylesheet, ['ruleset', 'block', 'ruleset', 'block']).length, - 0 - ); - }); - - ////////////////////////////// - // collectSuffixExtensions - ////////////////////////////// - it('collectSuffixExtensions - SCSS - no extensions', function () { - var ruleset = gonzales.parse(['', - '.a {', - ' .b {', - ' .c {', - ' width: 2px;', - ' }', - ' }', - '}'].join('\n'), { syntax: 'scss' }) - .first('ruleset'); - - assert.deepEqual( - helpers.collectSuffixExtensions(ruleset, 'class').map(function (node) { - return node.content; - }), - ['a'] - ); - }); - - it('collectSuffixExtensions - SCSS - BEM example', function () { - var ruleset = gonzales.parse(['', - '.block {', - ' &__element {', - ' &--modifier {', - ' width: 2px;', - ' }', - ' }', - '}'].join('\n'), { syntax: 'scss' }) - .first('ruleset'); - - assert.deepEqual( - helpers.collectSuffixExtensions(ruleset, 'class').map(function (node) { - return node.content; - }), - ['block', 'block__element', 'block__element--modifier'] - ); - }); - - it('collectSuffixExtensions - SCSS - many parents and children', function () { - var ruleset = gonzales.parse(['', - '.a,', - '.b {', - ' &c,', - ' &d {', - ' &e,', - ' &f {', - ' width: 2px;', - ' }', - ' }', - '}'].join('\n'), { syntax: 'scss' }) - .first('ruleset'); - - assert.deepEqual( - helpers.collectSuffixExtensions(ruleset, 'class').map(function (node) { - return node.content; - }), - ['a', 'b', 'ac', 'bc', 'ad', 'bd', 'ace', 'bce', 'ade', 'bde', 'acf', 'bcf', 'adf', 'bdf'] - ); - }); - - it('collectSuffixExtensions - Sass - no extensions', function () { - var ruleset = gonzales.parse(['', - '.a', - ' .b', - ' .c', - ' width: 2px', - ''].join('\n'), { syntax: 'sass' }) - .first('ruleset'); - - assert.deepEqual( - helpers.collectSuffixExtensions(ruleset, 'class').map(function (node) { - return node.content; - }), - ['a'] - ); - }); - - it('collectSuffixExtensions - Sass - BEM example', function () { - var ruleset = gonzales.parse(['', - '.block', - ' &__element', - ' &--modifier', - ' width: 2px', - ''].join('\n'), { syntax: 'sass' }) - .first('ruleset'); - - assert.deepEqual( - helpers.collectSuffixExtensions(ruleset, 'class').map(function (node) { - return node.content; - }), - ['block', 'block__element', 'block__element--modifier'] - ); - }); - - it('collectSuffixExtensions - Sass - many parents and children', function () { - var ruleset = gonzales.parse(['', - '.a, .b', - ' &c, &d', - ' &e, &f', - ' width: 2px', - ''].join('\n'), { syntax: 'sass' }) - .first('ruleset'); - - assert.deepEqual( - helpers.collectSuffixExtensions(ruleset, 'class').map(function (node) { - return node.content; - }), - ['a', 'b', 'ac', 'bc', 'ad', 'bd', 'ace', 'bce', 'ade', 'bde', 'acf', 'bcf', 'adf', 'bdf'] - ); - }); -}); diff --git a/node_modules/sass-lint/tests/helpers/addUnique.js b/node_modules/sass-lint/tests/helpers/addUnique.js new file mode 100644 index 0000000..6d0712d --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/addUnique.js @@ -0,0 +1,75 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +var classBlock = + { + type: 'class', + content: + [ + { + type: 'ident', + content: 'foo', + syntax: 'scss', + start: { line: 5, column: 2 }, + end: { line: 5, column: 4 }, + indexHasChanged: [ 0 ] + } + ], + syntax: 'scss', + start: { line: 5, column: 1 }, + end: { line: 5, column: 4 }, + indexHasChanged: [ 0 ] + }, + + otherClassBlock = + { + type: 'class', + content: + [ + { + type: 'ident', + content: 'test', + syntax: 'scss', + start: { line: 9, column: 2 }, + end: { line: 9, column: 5 }, + indexHasChanged: [ 0 ] + } + ], + syntax: 'scss', + start: { line: 9, column: 1 }, + end: { line: 9, column: 5 }, + indexHasChanged: [ 0 ] + }; + +describe('helpers - addUnique', function () { + + ////////////////////////////// + // addUnique + ////////////////////////////// + + it('addUnique should return a modified results array - [objA !== objB]', function (done) { + + var ledger = []; + ledger.push(classBlock); + + var result = helpers.addUnique(ledger, otherClassBlock); + + ledger.push(otherClassBlock); + + assert.equal(ledger, result); + done(); + }); + + it('addUnique should return an unmodified results array - [objA === objB]', function (done) { + + var ledger = []; + ledger.push(classBlock); + + var result = helpers.addUnique(ledger, classBlock); + + assert.equal(ledger, result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/attemptTraversal.js b/node_modules/sass-lint/tests/helpers/attemptTraversal.js new file mode 100644 index 0000000..35d8146 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/attemptTraversal.js @@ -0,0 +1,78 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'), + gonzales = require('gonzales-pe'); + +describe('helpers - attemptTraversal', function () { + + ////////////////////////////// + // attemptTraversal + ////////////////////////////// + it('attemptTraversal - SCSS - collect all nodes', function () { + var stylesheet = gonzales.parse(['', + '.a {', + ' .b {', + ' color: red;', + ' }', + ' .c {', + ' color: blue;', + ' }', + ' .d {', + ' color: green;', + ' }', + '}'].join('\n'), { syntax: 'scss' }); + + assert.deepEqual( + helpers.attemptTraversal(stylesheet, ['ruleset', 'block', 'ruleset', 'block', 'declaration', 'property', 'ident']) + .map(function (node) { + return node.content; + }), + ['color', 'color', 'color'] + ); + }); + + it('attemptTraversal - SCSS - empty array when traversal fails', function () { + var stylesheet = gonzales.parse(['', + '.a {', + ' color: red;', + '}'].join('\n'), { syntax: 'scss' }); + + assert.equal( + helpers.attemptTraversal(stylesheet, ['ruleset', 'block', 'ruleset', 'block']).length, + 0 + ); + }); + + it('attemptTraversal - Sass - collect all nodes', function () { + var stylesheet = gonzales.parse(['', + '.a', + ' .b', + ' color: red', + ' .c', + ' color: blue', + ' .d', + ' color: green', + ''].join('\n'), { syntax: 'sass' }); + + assert.deepEqual( + helpers.attemptTraversal(stylesheet, ['ruleset', 'block', 'ruleset', 'block', 'declaration', 'property', 'ident']) + .map(function (node) { + return node.content; + }), + ['color', 'color', 'color'] + ); + }); + + it('attemptTraversal - Sass - empty array when traversal fails', function () { + var stylesheet = gonzales.parse(['', + '.a', + ' color: red', + ''].join('\n'), { syntax: 'sass' }); + + assert.equal( + helpers.attemptTraversal(stylesheet, ['ruleset', 'block', 'ruleset', 'block']).length, + 0 + ); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/collectSuffixExtensions.js b/node_modules/sass-lint/tests/helpers/collectSuffixExtensions.js new file mode 100644 index 0000000..8d96613 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/collectSuffixExtensions.js @@ -0,0 +1,123 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'), + gonzales = require('gonzales-pe'); + +describe('helpers - collectSuffixExtensions', function () { + + ////////////////////////////// + // collectSuffixExtensions + ////////////////////////////// + + it('collectSuffixExtensions - SCSS - no extensions', function () { + var ruleset = gonzales.parse(['', + '.a {', + ' .b {', + ' .c {', + ' width: 2px;', + ' }', + ' }', + '}'].join('\n'), { syntax: 'scss' }) + .first('ruleset'); + + assert.deepEqual( + helpers.collectSuffixExtensions(ruleset, 'class').map(function (node) { + return node.content; + }), + ['a'] + ); + }); + + it('collectSuffixExtensions - SCSS - BEM example', function () { + var ruleset = gonzales.parse(['', + '.block {', + ' &__element {', + ' &--modifier {', + ' width: 2px;', + ' }', + ' }', + '}'].join('\n'), { syntax: 'scss' }) + .first('ruleset'); + + assert.deepEqual( + helpers.collectSuffixExtensions(ruleset, 'class').map(function (node) { + return node.content; + }), + ['block', 'block__element', 'block__element--modifier'] + ); + }); + + it('collectSuffixExtensions - SCSS - many parents and children', function () { + var ruleset = gonzales.parse(['', + '.a,', + '.b {', + ' &c,', + ' &d {', + ' &e,', + ' &f {', + ' width: 2px;', + ' }', + ' }', + '}'].join('\n'), { syntax: 'scss' }) + .first('ruleset'); + + assert.deepEqual( + helpers.collectSuffixExtensions(ruleset, 'class').map(function (node) { + return node.content; + }), + ['a', 'b', 'ac', 'bc', 'ad', 'bd', 'ace', 'bce', 'ade', 'bde', 'acf', 'bcf', 'adf', 'bdf'] + ); + }); + + it('collectSuffixExtensions - Sass - no extensions', function () { + var ruleset = gonzales.parse(['', + '.a', + ' .b', + ' .c', + ' width: 2px', + ''].join('\n'), { syntax: 'sass' }) + .first('ruleset'); + + assert.deepEqual( + helpers.collectSuffixExtensions(ruleset, 'class').map(function (node) { + return node.content; + }), + ['a'] + ); + }); + + it('collectSuffixExtensions - Sass - BEM example', function () { + var ruleset = gonzales.parse(['', + '.block', + ' &__element', + ' &--modifier', + ' width: 2px', + ''].join('\n'), { syntax: 'sass' }) + .first('ruleset'); + + assert.deepEqual( + helpers.collectSuffixExtensions(ruleset, 'class').map(function (node) { + return node.content; + }), + ['block', 'block__element', 'block__element--modifier'] + ); + }); + + it('collectSuffixExtensions - Sass - many parents and children', function () { + var ruleset = gonzales.parse(['', + '.a, .b', + ' &c, &d', + ' &e, &f', + ' width: 2px', + ''].join('\n'), { syntax: 'sass' }) + .first('ruleset'); + + assert.deepEqual( + helpers.collectSuffixExtensions(ruleset, 'class').map(function (node) { + return node.content; + }), + ['a', 'b', 'ac', 'bc', 'ad', 'bd', 'ace', 'bce', 'ade', 'bde', 'acf', 'bcf', 'adf', 'bdf'] + ); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/hasEOL.js b/node_modules/sass-lint/tests/helpers/hasEOL.js new file mode 100644 index 0000000..4490a9f --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/hasEOL.js @@ -0,0 +1,27 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers - hasEOL', function () { + + ////////////////////////////// + // hasEOL + ////////////////////////////// + + it('hasEOL - [\'\\n\' - true]', function (done) { + + var result = helpers.hasEOL('\n'); + + assert.equal(true, result); + done(); + }); + + it('hasEOL - [\'\\r\\n\' - true]', function (done) { + + var result = helpers.hasEOL('\r\n'); + + assert.equal(true, result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/helpers.js b/node_modules/sass-lint/tests/helpers/helpers.js new file mode 100644 index 0000000..674a70b --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/helpers.js @@ -0,0 +1,18 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers', function () { + ////////////////////////////// + // Helpers is loaded + ////////////////////////////// + + it('helpers should not be undefined', function (done) { + + var loaded = typeof (helpers) === 'object' ? true : false; + + assert.equal(true, loaded); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/isCamelCase.js b/node_modules/sass-lint/tests/helpers/isCamelCase.js new file mode 100644 index 0000000..ec68785 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/isCamelCase.js @@ -0,0 +1,51 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers - isCamelCase', function () { + + ////////////////////////////// + // isCamelCase + ////////////////////////////// + + it('isCamelCase - [\'TEST\' - false]', function (done) { + + var result = helpers.isCamelCase('TEST'); + + assert.equal(false, result); + done(); + }); + + it('isCamelCase - [\'test\' - true]', function (done) { + + var result = helpers.isCamelCase('test'); + + assert.equal(true, result); + done(); + }); + + it('isCamelCase - [abcDEF - true]', function (done) { + + var result = helpers.isCamelCase('abcDEF'); + + assert.equal(true, result); + done(); + }); + + it('isCamelCase - [\'123\' - false]', function (done) { + + var result = helpers.isCamelCase('123'); + + assert.equal(false, result); + done(); + }); + + it('isCamelCase - [\'aBcDeF\' - true]', function (done) { + + var result = helpers.isCamelCase('aBcDeF'); + + assert.equal(true, result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/isEmptyLine.js b/node_modules/sass-lint/tests/helpers/isEmptyLine.js new file mode 100644 index 0000000..0bf8edc --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/isEmptyLine.js @@ -0,0 +1,43 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers - isEmptyLine', function () { + + ////////////////////////////// + // isEmptyLine + ////////////////////////////// + + it('isEmptyLine - [\'\\n\\n\' - true]', function (done) { + + var result = helpers.isEmptyLine('\n\n'); + + assert.equal(true, result); + done(); + }); + + it('isEmptyLine - [\'\\r\\n\\r\\n\' - true]', function (done) { + + var result = helpers.isEmptyLine('\r\n\r\n'); + + assert.equal(true, result); + done(); + }); + + it('isEmptyLine - [\'\\n \\n\' - false]', function (done) { + + var result = helpers.isEmptyLine('\n \n'); + + assert.equal(false, result); + done(); + }); + + it('isEmptyLine - [\'\\r\\nabc\\r\\n\' - false]', function (done) { + + var result = helpers.isEmptyLine('\r\nabc\r\n'); + + assert.equal(false, result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/isEqual.js b/node_modules/sass-lint/tests/helpers/isEqual.js new file mode 100644 index 0000000..a3970d1 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/isEqual.js @@ -0,0 +1,113 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +var classBlock = + { + type: 'class', + content: + [ + { + type: 'ident', + content: 'foo', + syntax: 'scss', + start: { line: 5, column: 2 }, + end: { line: 5, column: 4 }, + indexHasChanged: [ 0 ] + } + ], + syntax: 'scss', + start: { line: 5, column: 1 }, + end: { line: 5, column: 4 }, + indexHasChanged: [ 0 ] + }; + +describe('helpers - isEqual', function () { + ////////////////////////////// + // isEqual + ////////////////////////////// + + it('isEqual should return true', function (done) { + + var testBlock = + { + type: 'class', + content: + [ + { + type: 'ident', + content: 'foo', + syntax: 'scss', + start: { line: 5, column: 2 }, + end: { line: 5, column: 4 }, + indexHasChanged: [ 0 ] + } + ], + syntax: 'scss', + start: { line: 5, column: 1 }, + end: { line: 5, column: 4 }, + indexHasChanged: [ 0 ] + }, + result = helpers.isEqual(classBlock, testBlock); + + assert.equal(true, result); + done(); + }); + + it('isEqual should return false - [objA.type !== objB.type]', function (done) { + + var testBlock = { + type: 'block', + start: {line: 5}, + end: {line: 5}, + content: [1] + }, + result = helpers.isEqual(classBlock, testBlock); + + assert.equal(false, result); + done(); + }); + + it('isEqual should return false - [objA.start.line !== objB.start.line]', function (done) { + + var testBlock = { + type: 'class', + start: {line: 7}, + end: {line: 5}, + content: [1] + }, + result = helpers.isEqual(classBlock, testBlock); + + assert.equal(false, result); + done(); + }); + + it('isEqual should return false - [objA.end.line !== objB.end.line]', function (done) { + + var testBlock = { + type: 'class', + start: {line: 5}, + end: {line: 7}, + content: [1] + }, + result = helpers.isEqual(classBlock, testBlock); + + assert.equal(false, result); + done(); + }); + + it('isEqual should return false - [objA.content.length !== objB.content.length]', function (done) { + + var testBlock = { + type: 'class', + start: {line: 5}, + end: {line: 5}, + content: [1, 2, 3, 4] + }, + result = helpers.isEqual(classBlock, testBlock); + + assert.equal(false, result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/isHyphenatedBEM.js b/node_modules/sass-lint/tests/helpers/isHyphenatedBEM.js new file mode 100644 index 0000000..87fc060 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/isHyphenatedBEM.js @@ -0,0 +1,91 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers - isHyphenatedBEM', function () { + + ////////////////////////////// + // isHyphenatedBEM + ////////////////////////////// + + it('isHyphenatedBEM - [\'TEST\' - false]', function (done) { + + var result = helpers.isHyphenatedBEM('TEST'); + + assert.equal(false, result); + done(); + }); + + it('isHyphenatedBEM - [\'test\' - true]', function (done) { + + var result = helpers.isHyphenatedBEM('test'); + + assert.equal(true, result); + done(); + }); + + it('isHyphenatedBEM - [abcDEF - false]', function (done) { + + var result = helpers.isHyphenatedBEM('abcDEF'); + + assert.equal(false, result); + done(); + }); + + it('isHyphenatedBEM - [\'abc---def\' - false]', function (done) { + + var result = helpers.isHyphenatedBEM('abc---def'); + + assert.equal(false, result); + done(); + }); + + it('isHyphenatedBEM - [\'abc___def\' - false]', function (done) { + + var result = helpers.isHyphenatedBEM('abc___def'); + + assert.equal(false, result); + done(); + }); + + it('isHyphenatedBEM - [\'ab__cd__ef\' - true]', function (done) { + + var result = helpers.isHyphenatedBEM('ab__cd__ef'); + + assert.equal(true, result); + done(); + }); + + it('isHyphenatedBEM - [\'ab__cd--ef\' - true]', function (done) { + + var result = helpers.isHyphenatedBEM('ab__cd--ef'); + + assert.equal(true, result); + done(); + }); + + it('isHyphenatedBEM - [\'abc_def\' - false]', function (done) { + + var result = helpers.isHyphenatedBEM('abc_def'); + + assert.equal(false, result); + done(); + }); + + it('isHyphenatedBEM - [\'abc-def\' - true]', function (done) { + + var result = helpers.isHyphenatedBEM('abc-def'); + + assert.equal(true, result); + done(); + }); + + it('isHyphenatedBEM - [\'ab-cd__ef\' - true]', function (done) { + + var result = helpers.isHyphenatedBEM('ab-cd__ef'); + + assert.equal(true, result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/isHyphenatedLowerCase.js b/node_modules/sass-lint/tests/helpers/isHyphenatedLowerCase.js new file mode 100644 index 0000000..6f97966 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/isHyphenatedLowerCase.js @@ -0,0 +1,75 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers - isHyphenatedLowerCase', function () { + + ////////////////////////////// + // isHyphenatedLowercase + ////////////////////////////// + + it('isHyphenatedLowercase - [\'abc-def\' - true]', function (done) { + + var result = helpers.isHyphenatedLowercase('abc-def'); + + assert.equal(true, result); + done(); + }); + + it('isHyphenatedLowercase - [\'TEST\' - false]', function (done) { + + var result = helpers.isHyphenatedLowercase('TEST'); + + assert.equal(false, result); + done(); + }); + + it('isHyphenatedLowercase - [\'test\' - true]', function (done) { + + var result = helpers.isHyphenatedLowercase('test'); + + assert.equal(true, result); + done(); + }); + + it('isHyphenatedLowercase - [abcDEF - false]', function (done) { + + var result = helpers.isHyphenatedLowercase('abcDEF'); + + assert.equal(false, result); + done(); + }); + + it('isHyphenatedLowercase - [\'123\' - true]', function (done) { + + var result = helpers.isHyphenatedLowercase('123'); + + assert.equal(true, result); + done(); + }); + + it('isHyphenatedLowercase - [\'aBcDeF\' - false]', function (done) { + + var result = helpers.isHyphenatedLowercase('aBcDeF'); + + assert.equal(false, result); + done(); + }); + + it('isHyphenatedLowercase - [\'abc-\\31\\32\\33\' - false]', function (done) { + + var result = helpers.isHyphenatedLowercase('abc-\\31\\32\\33'); + + assert.equal(false, result); + done(); + }); + + it('isHyphenatedLowercase - [\'abc-\\+\\*\' - false]', function (done) { + + var result = helpers.isHyphenatedLowercase('abc-\\+\\*'); + + assert.equal(false, result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/isLowerCase.js b/node_modules/sass-lint/tests/helpers/isLowerCase.js new file mode 100644 index 0000000..ae55041 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/isLowerCase.js @@ -0,0 +1,43 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers - isLowerCase', function () { + + ////////////////////////////// + // isLowerCase + ////////////////////////////// + + it('isLowerCase - [\'TEST\' - false]', function (done) { + + var result = helpers.isLowerCase('TEST'); + + assert.equal(false, result); + done(); + }); + + it('isLowerCase - [\'test\' - true]', function (done) { + + var result = helpers.isLowerCase('test'); + + assert.equal(true, result); + done(); + }); + + it('isLowerCase - [abcDEF - false]', function (done) { + + var result = helpers.isLowerCase('abcDEF'); + + assert.equal(false, result); + done(); + }); + + it('isLowerCase - [\'123\' - false]', function (done) { + + var result = helpers.isLowerCase('123'); + + assert.equal(false, result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/isNestable.js b/node_modules/sass-lint/tests/helpers/isNestable.js new file mode 100644 index 0000000..5474bd7 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/isNestable.js @@ -0,0 +1,35 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers - isNestable', function () { + + ////////////////////////////// + // isNestable + ////////////////////////////// + + it('isNestable - nest attribute in selector', function (done) { + var elements = ['selector', 'class', 'id', 'attribute'], + nestable = ['class', 'selector', 'attribute'], + previous = 'selector', + current = 'attribute'; + + var result = helpers.isNestable(current, previous, elements, nestable); + + assert.equal(true, result); + done(); + }); + + it('isNestable - nest id in class', function (done) { + var elements = ['selector', 'class', 'id', 'attribute'], + nestable = ['class', 'selector', 'attribute'], + previous = 'class', + current = 'id'; + + var result = helpers.isNestable(current, previous, elements, nestable); + + assert.equal(false, result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/isNewLine.js b/node_modules/sass-lint/tests/helpers/isNewLine.js new file mode 100644 index 0000000..e78878f --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/isNewLine.js @@ -0,0 +1,119 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'), + gonzales = require('gonzales-pe'); + +var lfBlock = gonzales.createNode( + { + type: 'space', + content: '\n', + syntax: 'scss', + start: { line: 1, column: 1 }, + end: { line: 2, column: 1 } + }), + crlfBlock = gonzales.createNode( + { + type: 'space', + content: '\r\n', + syntax: 'scss', + start: { line: 1, column: 1 }, + end: { line: 2, column: 1 } + }), + multiLfBlock = gonzales.createNode( + { + type: 'space', + content: '\n\n', + syntax: 'scss', + start: { line: 1, column: 1 }, + end: { line: 3, column: 1 } + }), + multiCrLfBlock = gonzales.createNode( + { + type: 'space', + content: '\r\n\r\n', + syntax: 'scss', + start: { line: 1, column: 1 }, + end: { line: 3, column: 1 } + }), + mixedBlock = gonzales.createNode( + { + type: 'space', + content: ' \n', + syntax: 'scss', + start: { line: 1, column: 1 }, + end: { line: 3, column: 1 } + }), + spaceBlock = gonzales.createNode( + { + type: 'space', + content: ' ', + syntax: 'scss', + start: { line: 1, column: 1 }, + end: { line: 3, column: 1 } + }), + classBlock = gonzales.createNode( + { + type: 'class', + content: + [ + { + type: 'ident', + content: 'foo', + syntax: 'scss', + start: { line: 5, column: 2 }, + end: { line: 5, column: 4 }, + indexHasChanged: [ 0 ] + } + ], + syntax: 'scss', + start: { line: 5, column: 1 }, + end: { line: 5, column: 4 }, + indexHasChanged: [ 0 ] + } + ); + +describe('helpers - isNewLine', function () { + ////////////////////////////// + // isNewLine + ////////////////////////////// + it('should return true for a LF style space node', function (done) { + assert.equal(true, helpers.isNewLine(lfBlock)); + done(); + }); + + it('should return true for a multi LF style space node', function (done) { + assert.equal(true, helpers.isNewLine(multiLfBlock)); + done(); + }); + + it('should return true for a CRLF style space node', function (done) { + assert.equal(true, helpers.isNewLine(crlfBlock)); + done(); + }); + + it('should return true for a multi CRLF style space node', function (done) { + assert.equal(true, helpers.isNewLine(multiCrLfBlock)); + done(); + }); + + it('should return true for a mixed space node that contains a new line character', function (done) { + assert.equal(true, helpers.isNewLine(mixedBlock)); + done(); + }); + + it('should return false for a normal space node that doesn\'t contain a new line character', function (done) { + assert.equal(false, helpers.isNewLine(spaceBlock)); + done(); + }); + + it('should return false for a non space node', function (done) { + assert.equal(false, helpers.isNewLine(classBlock)); + done(); + }); + + it('should return false when no node is provided', function (done) { + assert.equal(false, helpers.isNewLine()); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/isNumber.js b/node_modules/sass-lint/tests/helpers/isNumber.js new file mode 100644 index 0000000..dc56ad3 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/isNumber.js @@ -0,0 +1,44 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers - isNumber', function () { + + ////////////////////////////// + // isNumber + ////////////////////////////// + + it('isNumber - [10 - true]', function (done) { + + var result = helpers.isNumber(10); + + assert.equal(true, result); + done(); + }); + + it('isNumber - [\'10\' - true]', function (done) { + + var result = helpers.isNumber('10'); + + assert.equal(true, result); + done(); + }); + + it('isNumber - [\'ten\' - false]', function (done) { + + var result = helpers.isNumber('ten'); + + assert.equal(false, result); + done(); + }); + + it('isNumber - [\'ff00ff\' - false]', function (done) { + + var result = helpers.isNumber('ff00ff'); + + assert.equal(false, result); + done(); + }); + +}); diff --git a/node_modules/sass-lint/tests/helpers/isPartialStringMatch.js b/node_modules/sass-lint/tests/helpers/isPartialStringMatch.js new file mode 100644 index 0000000..b4167e8 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/isPartialStringMatch.js @@ -0,0 +1,59 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers - isPartialStringMatch', function () { + + ////////////////////////////// + // isPartialStringMatch + ////////////////////////////// + + it('isPartialStringMatch - [needle: \'foo\', haystack: [\'foo\'] - true]', function () { + var result = helpers.isPartialStringMatch('foo', ['foo']); + + assert.equal(true, result); + }); + + it('isPartialStringMatch - [needle: \'bar\', haystack: [\'foo\'] - false]', function () { + var result = helpers.isPartialStringMatch('bar', ['foo']); + + assert.equal(false, result); + }); + + it('isPartialStringMatch - [needle: \'foo\', haystack: [\'foo-bar\'] - true]', function () { + var result = helpers.isPartialStringMatch('foo', ['foo-bar']); + + assert.equal(true, result); + }); + + it('isPartialStringMatch - [needle: \'bar\', haystack: [\'foo-bar\'] - true]', function () { + var result = helpers.isPartialStringMatch('bar', ['foo-bar']); + + assert.equal(true, result); + }); + + it('isPartialStringMatch - [needle: \'baz\', haystack: [\'foo\', \'bar\'] - false]', function () { + var result = helpers.isPartialStringMatch('baz', ['foo', 'bar']); + + assert.equal(false, result); + }); + + it('isPartialStringMatch - [needle: \'baz\', haystack: [\'foo\', \'bar\', \'baz\'] - true]', function () { + var result = helpers.isPartialStringMatch('baz', ['foo', 'bar', 'baz']); + + assert.equal(true, result); + }); + + it('isPartialStringMatch - [needle: \'foo-bar\', haystack: [\'foo\', \'bar\'] - false]', function () { + var result = helpers.isPartialStringMatch('foo-bar', ['foo', 'bar']); + + assert.equal(false, result); + }); + + it('isPartialStringMatch - [needle: \'foo-bar\', haystack: [\'baz\', \'qux\', \'foo\', \'bar\'] - false]', function () { + var result = helpers.isPartialStringMatch('foo-bar', ['baz', 'qux', 'foo', 'bar']); + + assert.equal(false, result); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/isPascalCase.js b/node_modules/sass-lint/tests/helpers/isPascalCase.js new file mode 100644 index 0000000..111848a --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/isPascalCase.js @@ -0,0 +1,51 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers - isPascalCase', function () { + + ////////////////////////////// + // isPascalCase + ////////////////////////////// + + it('isPascalCase - [\'TEST\' - true]', function (done) { + + var result = helpers.isPascalCase('TEST'); + + assert.equal(true, result); + done(); + }); + + it('isPascalCase - [\'test\' - false]', function (done) { + + var result = helpers.isPascalCase('test'); + + assert.equal(false, result); + done(); + }); + + it('isPascalCase - [AbcDEF - true]', function (done) { + + var result = helpers.isPascalCase('AbcDEF'); + + assert.equal(true, result); + done(); + }); + + it('isPascalCase - [\'123\' - false]', function (done) { + + var result = helpers.isPascalCase('123'); + + assert.equal(false, result); + done(); + }); + + it('isPascalCase - [\'ABcDeF\' - true]', function (done) { + + var result = helpers.isPascalCase('ABcDeF'); + + assert.equal(true, result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/isSnakeCase.js b/node_modules/sass-lint/tests/helpers/isSnakeCase.js new file mode 100644 index 0000000..285da4e --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/isSnakeCase.js @@ -0,0 +1,59 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers - isSnakeCase', function () { + + ////////////////////////////// + // isSnakeCase + ////////////////////////////// + + it('isSnakeCase - [\'TEST\' - false]', function (done) { + + var result = helpers.isSnakeCase('TEST'); + + assert.equal(false, result); + done(); + }); + + it('isSnakeCase - [\'test\' - true]', function (done) { + + var result = helpers.isSnakeCase('test'); + + assert.equal(true, result); + done(); + }); + + it('isSnakeCase - [abcDEF - false]', function (done) { + + var result = helpers.isSnakeCase('abcDEF'); + + assert.equal(false, result); + done(); + }); + + it('isSnakeCase - [\'123\' - true]', function (done) { + + var result = helpers.isSnakeCase('123'); + + assert.equal(true, result); + done(); + }); + + it('isSnakeCase - [\'ab_cd_ef\' - true]', function (done) { + + var result = helpers.isSnakeCase('ab_cd_ef'); + + assert.equal(true, result); + done(); + }); + + it('isSnakeCase - [\'ab_cd-ef\' - false]', function (done) { + + var result = helpers.isSnakeCase('ab_cd-ef'); + + assert.equal(false, result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/isSpace.js b/node_modules/sass-lint/tests/helpers/isSpace.js new file mode 100644 index 0000000..f54f04e --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/isSpace.js @@ -0,0 +1,87 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'), + gonzales = require('gonzales-pe'); + +var lfBlock = gonzales.createNode({ + type: 'space', + content: '\n', + syntax: 'scss', + start: { line: 1, column: 1 }, + end: { line: 2, column: 1 } + }), + crlfBlock = gonzales.createNode({ + type: 'space', + content: '\r\n', + syntax: 'scss', + start: { line: 1, column: 1 }, + end: { line: 2, column: 1 } + }), + mixedBlock = gonzales.createNode({ + type: 'space', + content: ' \n', + syntax: 'scss', + start: { line: 1, column: 1 }, + end: { line: 3, column: 1 } + }), + spaceBlock = gonzales.createNode({ + type: 'space', + content: ' ', + syntax: 'scss', + start: { line: 1, column: 1 }, + end: { line: 3, column: 1 } + }), + classBlock = gonzales.createNode({ + type: 'class', + content: + [ + { + type: 'ident', + content: 'foo', + syntax: 'scss', + start: { line: 5, column: 2 }, + end: { line: 5, column: 4 }, + indexHasChanged: [ 0 ] + } + ], + syntax: 'scss', + start: { line: 5, column: 1 }, + end: { line: 5, column: 4 }, + indexHasChanged: [ 0 ] + }); + +describe('helpers - isSpace', function () { + ////////////////////////////// + // isSpace + ////////////////////////////// + it('should return false for a LF style space node', function (done) { + assert.equal(false, helpers.isSpace(lfBlock)); + done(); + }); + + it('should return false for a CRLF style space node', function (done) { + assert.equal(false, helpers.isSpace(crlfBlock)); + done(); + }); + + it('should return false for a mixed space node that contains a new line character', function (done) { + assert.equal(false, helpers.isSpace(mixedBlock)); + done(); + }); + + it('should return true for a normal space node that doesn\'t contain a new line character', function (done) { + assert.equal(true, helpers.isSpace(spaceBlock)); + done(); + }); + + it('should return false for a non space node', function (done) { + assert.equal(false, helpers.isSpace(classBlock)); + done(); + }); + + it('should return false when no node is provided', function (done) { + assert.equal(false, helpers.isSpace()); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/isStrictBEM.js b/node_modules/sass-lint/tests/helpers/isStrictBEM.js new file mode 100644 index 0000000..0fa85d3 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/isStrictBEM.js @@ -0,0 +1,115 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers - isStrictBEM', function () { + + ////////////////////////////// + // isStrictBEM + ////////////////////////////// + + it('isStrictBEM - [\'TEST\' - false]', function (done) { + + var result = helpers.isStrictBEM('TEST'); + + assert.equal(false, result); + done(); + }); + + it('isStrictBEM - [\'test\' - true]', function (done) { + + var result = helpers.isStrictBEM('test'); + + assert.equal(true, result); + done(); + }); + + it('isStrictBEM - [abcDEF - false]', function (done) { + + var result = helpers.isStrictBEM('abcDEF'); + + assert.equal(false, result); + done(); + }); + + it('isStrictBEM - [\'abc---def\' - false]', function (done) { + + var result = helpers.isStrictBEM('abc---def'); + + assert.equal(false, result); + done(); + }); + + it('isStrictBEM - [\'abc___def\' - false]', function (done) { + + var result = helpers.isStrictBEM('abc___def'); + + assert.equal(false, result); + done(); + }); + + it('isStrictBEM - [\'ab__cd__ef\' - false]', function (done) { + + var result = helpers.isStrictBEM('ab__cd__ef'); + + assert.equal(false, result); + done(); + }); + + it('isStrictBEM - [\'ab__cd--ef\' - false]', function (done) { + + var result = helpers.isStrictBEM('ab__cd--ef'); + + assert.equal(false, result); + done(); + }); + + it('isStrictBEM - [\'ab__cd_ef_gh\' - true]', function (done) { + + var result = helpers.isStrictBEM('ab__cd_ef_gh'); + + assert.equal(true, result); + done(); + }); + + it('isStrictBEM - [\'ab-cd-ef__gh-ij-kl_mn-op-qr_st-uv-wx\' - true]', function (done) { + + var result = helpers.isStrictBEM('ab-cd-ef__gh-ij-kl_mn-op-qr_st-uv-wx'); + + assert.equal(true, result); + done(); + }); + + it('isStrictBEM - [\'ab__cd_ef_gh_ij\' - false]', function (done) { + + var result = helpers.isStrictBEM('ab__cd_ef_gh_ij'); + + assert.equal(false, result); + done(); + }); + + it('isStrictBEM - [\'abc_def\' - true]', function (done) { + + var result = helpers.isStrictBEM('abc_def'); + + assert.equal(true, result); + done(); + }); + + it('isStrictBEM - [\'abc-def\' - true]', function (done) { + + var result = helpers.isStrictBEM('abc-def'); + + assert.equal(true, result); + done(); + }); + + it('isStrictBEM - [\'ab-cd__ef\' - true]', function (done) { + + var result = helpers.isStrictBEM('ab-cd__ef'); + + assert.equal(true, result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/isUnique.js b/node_modules/sass-lint/tests/helpers/isUnique.js new file mode 100644 index 0000000..413cdd9 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/isUnique.js @@ -0,0 +1,74 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +var classBlock = + { + type: 'class', + content: + [ + { + type: 'ident', + content: 'foo', + syntax: 'scss', + start: { line: 5, column: 2 }, + end: { line: 5, column: 4 }, + indexHasChanged: [ 0 ] + } + ], + syntax: 'scss', + start: { line: 5, column: 1 }, + end: { line: 5, column: 4 }, + indexHasChanged: [ 0 ] + }, + + otherClassBlock = + { + type: 'class', + content: + [ + { + type: 'ident', + content: 'test', + syntax: 'scss', + start: { line: 9, column: 2 }, + end: { line: 9, column: 5 }, + indexHasChanged: [ 0 ] + } + ], + syntax: 'scss', + start: { line: 9, column: 1 }, + end: { line: 9, column: 5 }, + indexHasChanged: [ 0 ] + }; + +describe('helpers - isUnique', function () { + ////////////////////////////// + // isUnique + ////////////////////////////// + + it('isUnique should return false - [objA === objB]', function (done) { + + + var ledger = []; + ledger.push(classBlock); + + var result = helpers.isUnique(ledger, classBlock); + + assert.equal(false, result); + done(); + }); + + it('isUnique should return true - [objA !== objB]', function (done) { + + + var ledger = []; + ledger.push(classBlock); + + var result = helpers.isUnique(ledger, otherClassBlock); + + assert.equal(false, result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/isUpperCase.js b/node_modules/sass-lint/tests/helpers/isUpperCase.js new file mode 100644 index 0000000..0c06f74 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/isUpperCase.js @@ -0,0 +1,44 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers - isUpperCase', function () { + + ////////////////////////////// + // isUpperCase + ////////////////////////////// + + it('isUpperCase - [\'TEST\' - true]', function (done) { + + var result = helpers.isUpperCase('TEST'); + + assert.equal(true, result); + done(); + }); + + it('isUpperCase - [\'test\' - false]', function (done) { + + var result = helpers.isUpperCase('test'); + + assert.equal(false, result); + done(); + }); + + it('isUpperCase - [abcDEF - false]', function (done) { + + var result = helpers.isUpperCase('abcDEF'); + + assert.equal(false, result); + done(); + }); + + it('isUpperCase - [\'123\' - false]', function (done) { + + var result = helpers.isUpperCase('123'); + + assert.equal(false, result); + done(); + }); + +}); diff --git a/node_modules/sass-lint/tests/helpers/isValidHex.js b/node_modules/sass-lint/tests/helpers/isValidHex.js new file mode 100644 index 0000000..4cb8a64 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/isValidHex.js @@ -0,0 +1,115 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers - isValidHex', function () { + + ////////////////////////////// + // isValidHex + ////////////////////////////// + + it('isValidHex - [\'abcdef\' - true]', function (done) { + + var result = helpers.isValidHex('abcdef'); + + assert.equal(true, result); + done(); + }); + + it('isValidHex - [\'ABCDEF\' - true]', function (done) { + + var result = helpers.isValidHex('ABCDEF'); + + assert.equal(true, result); + done(); + }); + + it('isValidHex - [\'123456\' - true]', function (done) { + + var result = helpers.isValidHex('123456'); + + assert.equal(true, result); + done(); + }); + + it('isValidHex - [\'ABC123\' - true]', function (done) { + + var result = helpers.isValidHex('ABC123'); + + assert.equal(true, result); + done(); + }); + + it('isValidHex - [\'abc123\' - true]', function (done) { + + var result = helpers.isValidHex('abc123'); + + assert.equal(true, result); + done(); + }); + + it('isValidHex - [\'fff\' - true]', function (done) { + + var result = helpers.isValidHex('fff'); + + assert.equal(true, result); + done(); + }); + + it('isValidHex - [\'123\' - true]', function (done) { + + var result = helpers.isValidHex('123'); + + assert.equal(true, result); + done(); + }); + + it('isValidHex - [\'efghij\' - false]', function (done) { + + var result = helpers.isValidHex('efghij'); + + assert.equal(false, result); + done(); + }); + + it('isValidHex - [\'thj\' - false]', function (done) { + + var result = helpers.isValidHex('thj'); + + assert.equal(false, result); + done(); + }); + + it('isValidHex - [\'ab\' - false]', function (done) { + + var result = helpers.isValidHex('ab'); + + assert.equal(false, result); + done(); + }); + + it('isValidHex - [\'12\' - false]', function (done) { + + var result = helpers.isValidHex('12'); + + assert.equal(false, result); + done(); + }); + + it('isValidHex - [\'1234567\' - false]', function (done) { + + var result = helpers.isValidHex('1234567'); + + assert.equal(false, result); + done(); + }); + + it('isValidHex - [\'abc1234\' - false]', function (done) { + + var result = helpers.isValidHex('abc1234'); + + assert.equal(false, result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/loadConfigFile.js b/node_modules/sass-lint/tests/helpers/loadConfigFile.js new file mode 100644 index 0000000..8936427 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/loadConfigFile.js @@ -0,0 +1,20 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers - loadConfigFile', function () { + + ////////////////////////////// + // loadConfigFile + ////////////////////////////// + + it('loadConfigFile', function (done) { + + var result = helpers.loadConfigFile('../../tests/testFile.txt'), + expect = 'This is a test file that test\'s the loadConfigFile helper function.'; + + assert.equal(expect, result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/propertySearch.js b/node_modules/sass-lint/tests/helpers/propertySearch.js new file mode 100644 index 0000000..7c310e9 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/propertySearch.js @@ -0,0 +1,51 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +var haystack = [ + { + prop: 'a', + propb: 'b' + }, + { + prop: 'c', + propb: 'd' + } +]; + +describe('helpers - propertySearch', function () { + ////////////////////////////// + // propertySearch + ////////////////////////////// + + it('propertySearch should not find a property', function (done) { + + var needle = 'e', + property = 'prop', + result = helpers.propertySearch(haystack, needle, property); + + assert.equal(-1, result); + done(); + }); + + it('propertySearch should find a property', function (done) { + + var needle = 'a', + property = 'prop', + result = helpers.propertySearch(haystack, needle, property); + + assert.equal(0, result); + done(); + }); + + it('propertySearch should find a deeper property', function (done) { + + var needle = 'd', + property = 'propb', + result = helpers.propertySearch(haystack, needle, property); + + assert.equal(1, result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/sortDetects.js b/node_modules/sass-lint/tests/helpers/sortDetects.js new file mode 100644 index 0000000..3f3e493 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/sortDetects.js @@ -0,0 +1,66 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +var detectTestA = { + line: 1, + column: 1 + }, + + detectTestB = { + line: 2, + column: 2 + }, + + detectTestC = { + line: 1, + column: 2 + }; + +describe('helpers - sortDetects', function () { + + ////////////////////////////// + // sortDetects + ////////////////////////////// + + it('sortDetects should return -1 - [a.line < b.line]', function (done) { + + var result = helpers.sortDetects(detectTestA, detectTestB); + + assert.equal(-1, result); + done(); + }); + + it('sortDetects should return 1 - [a.line > b.line]', function (done) { + + var result = helpers.sortDetects(detectTestB, detectTestA); + + assert.equal(1, result); + done(); + }); + + it('sortDetects should return 0 - [a === b]', function (done) { + + var result = helpers.sortDetects(detectTestA, detectTestA); + + assert.equal(0, result); + done(); + }); + + it('sortDetects should return -1 - [a.column < b.column]', function (done) { + + var result = helpers.sortDetects(detectTestA, detectTestC); + + assert.equal(-1, result); + done(); + }); + + it('sortDetects should return 1 - [a.column > b.column]', function (done) { + + var result = helpers.sortDetects(detectTestC, detectTestA); + + assert.equal(1, result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/stripBom.js b/node_modules/sass-lint/tests/helpers/stripBom.js new file mode 100644 index 0000000..523e026 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/stripBom.js @@ -0,0 +1,28 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'), + fs = require('fs'); + +describe('helpers - stripBom', function () { + + ////////////////////////////// + // Strip BOM + ////////////////////////////// + + it('should remove the BOM marker', function (done) { + var file = fs.readFileSync('tests/bom-utf8/starts-with-mixin-utf8-bom.scss').toString(); + assert.equal(file.charCodeAt(0), 0xFEFF); + assert.notEqual(helpers.stripBom(file).charCodeAt(0), 0xFEFF); + done(); + }); + + it('should throw an error if not passed a string', function (done) { + assert.throws( + function () { + helpers.stripBom(8); + }, Error + ); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/stripLastSpace.js b/node_modules/sass-lint/tests/helpers/stripLastSpace.js new file mode 100644 index 0000000..748d059 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/stripLastSpace.js @@ -0,0 +1,43 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers - stripLastSpace', function () { + + ////////////////////////////// + // stripLastSpace + ////////////////////////////// + + it('stripLastSpace - [\'selector \']', function (done) { + + var result = helpers.stripLastSpace('selector '); + + assert.equal('selector', result); + done(); + }); + + it('stripLastSpace - [\'selector test \']', function (done) { + + var result = helpers.stripLastSpace('selector test'); + + assert.equal('selector test', result); + done(); + }); + + it('stripLastSpace - [\'selector\']', function (done) { + + var result = helpers.stripLastSpace('selector'); + + assert.equal('selector', result); + done(); + }); + + it('stripLastSpace - [\'selector test\']', function (done) { + + var result = helpers.stripLastSpace('selector test'); + + assert.equal('selector test', result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/stripPrefix.js b/node_modules/sass-lint/tests/helpers/stripPrefix.js new file mode 100644 index 0000000..ab13afd --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/stripPrefix.js @@ -0,0 +1,51 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers - stripPrefix', function () { + + ////////////////////////////// + // stripPrefix + ////////////////////////////// + + it('stripPrefix - [-webkit-transition - transition]', function (done) { + + var result = helpers.stripPrefix('-webkit-transition'); + + assert.equal('transition', result); + done(); + }); + + it('stripPrefix - [-moz-transition - transition]', function (done) { + + var result = helpers.stripPrefix('-moz-transition'); + + assert.equal('transition', result); + done(); + }); + + it('stripPrefix - [-webkit-border-color - border-color]', function (done) { + + var result = helpers.stripPrefix('-webkit-border-color'); + + assert.equal('border-color', result); + done(); + }); + + it('stripPrefix - [-moz-osx-font-smoothing - font-smoothing]', function (done) { + + var result = helpers.stripPrefix('-moz-osx-font-smoothing'); + + assert.equal('font-smoothing', result); + done(); + }); + + it('stripPrefix - [@-webkit-keyframes - @keyframes]', function (done) { + + var result = helpers.stripPrefix('@-webkit-keyframes'); + + assert.equal('@keyframes', result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/helpers/stripQuotes.js b/node_modules/sass-lint/tests/helpers/stripQuotes.js new file mode 100644 index 0000000..3350a88 --- /dev/null +++ b/node_modules/sass-lint/tests/helpers/stripQuotes.js @@ -0,0 +1,27 @@ +'use strict'; + +var assert = require('assert'), + helpers = require('../../lib/helpers'); + +describe('helpers - stripQuotes', function () { + + ////////////////////////////// + // Strip quotes + ////////////////////////////// + + it('stripQuotes - [double quotes]', function (done) { + var result = helpers.stripQuotes('"This is a string"'), + expect = 'This is a string'; + + assert.equal(expect, result); + done(); + }); + + it('stripQuotes - [single quotes]', function (done) { + var result = helpers.stripQuotes('\'This is a string\''), + expect = 'This is a string'; + + assert.equal(expect, result); + done(); + }); +}); diff --git a/node_modules/sass-lint/tests/main.js b/node_modules/sass-lint/tests/main.js index 4aed580..28131df 100644 --- a/node_modules/sass-lint/tests/main.js +++ b/node_modules/sass-lint/tests/main.js @@ -1,7 +1,10 @@ 'use strict'; var assert = require('assert'), - lint = require('../index'); + equal = require('deep-equal'), + lint = require('../index'), + fs = require('fs'), + sinon = require('sinon'); var lintFile = function lintFile (file, options, cb) { cb = cb || options; @@ -12,6 +15,13 @@ var lintFile = function lintFile (file, options, cb) { cb(results[0]); }; +var lintFiles = function lintFiles (files, options, configPath, cb) { + options = options || {}; + var results = lint.lintFiles(files, options, configPath); + + cb(results); +}; + var resultsObj = [{ filePath: 'app/scss/echo-base/defaults/utilities/_mixins.scss', warningCount: 3, @@ -53,95 +63,281 @@ var resultsObj = [{ severity: 2 }] }]; +var emptyResult = { + filePath: 'tests/cli/cli.scss', + warningCount: 0, + errorCount: 0, + messages: [] +}; +var oneWarningResult = { + filePath: 'tests/cli/cli.scss', + warningCount: 1, + errorCount: 0, + messages: [ + { + ruleId: 'no-color-literals', + line: 2, + column: 10, + message: 'Color literals such as \'red\' should only be used in variable declarations', + severity: 1 + } + ] +}; +var multiInputResults = [{ + filePath: 'tests/cli/cli-error.sass', + warningCount: 1, + errorCount: 0, + messages: [{ + ruleId: 'no-ids', + line: 1, + column: 1, + message: 'ID selectors not allowed', + severity: 1 + }] +}, { + filePath: 'tests/cli/cli-error.scss', + warningCount: 1, + errorCount: 0, + messages: [{ + ruleId: 'no-ids', + line: 1, + column: 1, + message: 'ID selectors not allowed', + severity: 1 + }] +}]; +var stringInputResults = [{ + filePath: 'tests/cli/cli-error.sass', + warningCount: 1, + errorCount: 0, + messages: [{ + ruleId: 'no-ids', + line: 1, + column: 1, + message: 'ID selectors not allowed', + severity: 1 + }] +}]; describe('sass lint', function () { - ////////////////////////////// - // Not Error on Empty Files - ////////////////////////////// - it('should not error if a file is empty', function (done) { - lintFile('empty-file.scss', function (data) { - assert.equal(0, data.warningCount); - assert.equal(0, data.errorCount); - assert.equal(0, data.messages.length); - done(); + describe('default functionality', function () { + + // ============================================================================== + // Not Error on Empty Files + // ============================================================================== + + it('should not error if a file is empty', function (done) { + lintFile('empty-file.scss', function (data) { + assert.equal(0, data.warningCount); + assert.equal(0, data.errorCount); + assert.equal(0, data.messages.length); + done(); + }); + }); + + // ============================================================================== + // Not try to read directories + // ============================================================================== + it('should not try to blindly read and lint a directory', function (done) { + var fileSpy = sinon.spy(lint, 'lintText'); + lintFiles('tests/dir-test/**/*.scss', { + options: { + 'merge-default-rules': false + }, + rules: { + 'no-ids': 1 + }}, '', function (data) { + assert.equal(1, data[0].warningCount); + assert.equal(0, data[0].errorCount); + assert.equal(1, data[0].messages.length); + + assert(fileSpy.called); + assert(fileSpy.calledOnce); + assert(fileSpy.calledWithMatch({format: 'scss', filename: 'tests/dir-test/dir.scss/test.scss'})); + assert(fileSpy.neverCalledWithMatch({filename: 'tests/dir-test/dir.scss'})); + fileSpy.reset(); + done(); + } + ); + }); + + // ============================================================================== + // Parse files with YAML front matter + // ============================================================================== + + it('should parse a file with front matter correctly and without parse error', function (done) { + lintFile('front-matter/front-matter.scss', function (data) { + assert.equal(0, data.errorCount); + assert.equal(2, data.warningCount); + done(); + }); + }); + + // ============================================================================== + // Parse Errors should return as lint errors + // ============================================================================== + + it('Parse Errors should return as lint errors', function (done) { + lintFile('parse.scss', function (data) { + assert.equal(1, data.errorCount); + done(); + }); + }); + + it('Parse Errors should not include warnings too', function (done) { + lintFile('parse.scss', function (data) { + assert.equal(0, data.warningCount); + done(); + }); + }); + + it('Parse Errors should return as severity 2', function (done) { + lintFile('parse.scss', function (data) { + var severity = data.messages[0].severity; + + assert.equal(2, severity); + done(); + }); + }); + + it('Parse Errors should return the correct error message', function (done) { + lintFile('parse.scss', function (data) { + var message = data.messages[0].message, + expected = 'Please check validity of the block starting from line #5'; + + assert.equal(expected, message); + done(); + }); + }); + + it('Parse Errors should return the rule ID \'Fatal\'', function (done) { + lintFile('parse.scss', function (data) { + var ruleId = data.messages[0].ruleId, + expected = 'Fatal'; + + assert.equal(expected, ruleId); + done(); + }); }); }); - ////////////////////////////// - // Parse Errors should return as lint errors - ////////////////////////////// - it('Parse Errors should return as lint errors', function (done) { - lintFile('parse.scss', function (data) { - assert.equal(1, data.errorCount); + // ============================================================================== + // lintFileText + // ============================================================================== + + + describe('lintFileText', function () { + var file, + fileObj; + + beforeEach(function () { + file = fs.readFileSync('tests/cli/cli.scss'); + fileObj = { + 'text': file, + 'format': 'scss', + 'filename': 'tests/cli/cli.scss' + }; + }); + + it('should ignore a file from the ignore section of a config file', function (done) { + var result = lint.lintFileText(fileObj, {options: {'cache-config': false}}, 'tests/yml/.ignore-file.yml'); + assert( + equal( + result, + emptyResult, + { + 'strict': true + } + ) + ); done(); }); - }); - it('Parse Errors should not include warnings too', function (done) { - lintFile('parse.scss', function (data) { - assert.equal(0, data.warningCount); + it('should lint a file when no ignores are specified', function (done) { + var result = lint.lintFileText(fileObj, {options: {'cache-config': false}}, 'tests/yml/.no-merge-default.yml'); + assert( + equal( + result, + oneWarningResult, + { + 'strict': true + } + ) + ); done(); }); }); - it('Parse Errors should return as severity 2', function (done) { - lintFile('parse.scss', function (data) { - var severity = data.messages[0].severity; + // ============================================================================== + // Lint files with config path + // ============================================================================== - assert.equal(2, severity); - done(); + describe('sassLint Config load', function () { + it('should accept multiple input sources in a config', function (done) { + lintFiles(null, {options: {'cache-config': false}}, 'tests/yml/.multiple-inputs.yml', function (data) { + assert.deepEqual(data, multiInputResults); + done(); + }); }); - }); - it('Parse Errors should return the correct error message', function (done) { - lintFile('parse.scss', function (data) { - var message = data.messages[0].message, - expected = 'Please check validity of the block starting from line #5'; + it('should accept multiple input sources and ignores in a config', function (done) { + lintFiles(null, {options: {'cache-config': false}}, 'tests/yml/.multiple-ignores.yml', function (data) { + assert.deepEqual(data, []); + done(); + }); + }); - assert.equal(expected, message); - done(); + it('should accept singular string input sources', function (done) { + lintFiles(null, {options: {'cache-config': false}}, 'tests/yml/.single-input-include-string.yml', function (data) { + assert.deepEqual(data, stringInputResults); + done(); + }); + }); + + it('should accept singular string input sources and ignores in a config file', function (done) { + lintFiles(null, {options: {'cache-config': false}}, 'tests/yml/.multiple-ignore-strings.yml', function (data) { + assert.deepEqual(data, []); + done(); + }); }); }); - it('Parse Errors should return the rule ID \'Fatal\'', function (done) { - lintFile('parse.scss', function (data) { - var ruleId = data.messages[0].ruleId, - expected = 'Fatal'; + // ============================================================================== + // Counters + // ============================================================================== + + describe('sassLint detect counts', function () { + // ============================================================================== + // Error Count + // ============================================================================== - assert.equal(expected, ruleId); + it('should equal 2 errors', function (done) { + var result = lint.errorCount(resultsObj); + + assert.equal(2, result.count); done(); }); - }); -}); -describe('sassLint detect counts', function () { - ////////////////////////////// - // Error count - ////////////////////////////// - it('should equal 2 errors', function (done) { - var result = lint.errorCount(resultsObj); + // ============================================================================== + // Warning count + // ============================================================================== - assert.equal(2, result.count); - done(); - }); + it('should equal 3 warnings', function (done) { + var result = lint.warningCount(resultsObj); - ////////////////////////////// - // Warning count - ////////////////////////////// - it('should equal 3 warnings', function (done) { - var result = lint.warningCount(resultsObj); + assert.equal(3, result.count); + done(); + }); - assert.equal(3, result.count); - done(); - }); + // ============================================================================== + // Result count + // ============================================================================== - ////////////////////////////// - // Result count - ////////////////////////////// - it('should equal 5 overall detects', function (done) { - var result = lint.resultCount(resultsObj); + it('should equal 5 overall detects', function (done) { + var result = lint.resultCount(resultsObj); - assert.equal(5, result); - done(); + assert.equal(5, result); + done(); + }); }); }); diff --git a/node_modules/sass-lint/tests/ruleToggler.js b/node_modules/sass-lint/tests/ruleToggler.js new file mode 100644 index 0000000..22b3c60 --- /dev/null +++ b/node_modules/sass-lint/tests/ruleToggler.js @@ -0,0 +1,326 @@ +var path = require('path'), + fs = require('fs'), + groot = require('../lib/groot'), + ruleToggler = require('../lib/ruleToggler'), + assert = require('assert'), + deepEqual = require('deep-equal'); + +var getToggledRules = ruleToggler.getToggledRules, + isResultEnabled = ruleToggler.isResultEnabled; + +var generateToggledRules = function (filename) { + var filePath = path.join(process.cwd(), 'tests', 'sass', filename); + var file = { + 'text': fs.readFileSync(filePath), + 'format': path.extname(filePath).replace('.', ''), + 'filename': path.basename(filePath) + }; + var ast = groot(file.text, file.format, file.filename); + return getToggledRules(ast); +}; + +describe('rule toggling', function () { + describe('getToggledRules', function () { + ////////////////////////////// + // SCSS syntax tests + ////////////////////////////// + it('should allow all rules to be disabled', function () { + assert(deepEqual(generateToggledRules('ruleToggler-disable-all.scss'), { + globalEnable: [[false, 1, 1]], + ruleEnable: {} + }) === true); + }); + it('should allow all rules to be disabled then re-enabled', function () { + var ruleToggles = generateToggledRules('ruleToggler-disable-all-then-reenable.scss'); + assert(deepEqual(ruleToggles, { + globalEnable: [ + [false, 1, 1], + [true, 3, 1] + ], + ruleEnable: {} + }) === true); + }); + it('should allow a single rule to be disabled', function () { + assert(deepEqual(generateToggledRules('ruleToggler-disable-a-rule.scss'), { + globalEnable: [], + ruleEnable: { + a: [[false, 1, 1]] + } + }) === true); + }); + it('should allow multiple rules to be disabled', function () { + assert(deepEqual(generateToggledRules('ruleToggler-disable-multiple-rules.scss'), { + globalEnable: [], + ruleEnable: { + a: [[false, 1, 1]], + b: [[false, 1, 1]], + c: [[false, 1, 1]], + d: [[false, 1, 1]] + } + }) === true); + }); + it('should be able to disable a single line', function () { + var ruleToggles = generateToggledRules('ruleToggler-disable-a-line.scss'); + assert(deepEqual(ruleToggles, { + globalEnable: [], + ruleEnable: { + a: [[false, 2, 1], [true, 3, 1]] + } + }) === true); + }); + it('should be able to disable a block of code', function () { + var ruleToggles = generateToggledRules('ruleToggler-disable-a-block.scss'); + assert(deepEqual(ruleToggles, { + globalEnable: [], + ruleEnable: { + a: [[false, 1, 3], [true, 3, 1]] + } + }) === true); + }); + it('should be able to enable a disabled rule', function () { + var ruleToggles = generateToggledRules('ruleToggler-disable-then-enable.scss'); + assert(deepEqual(ruleToggles, { + globalEnable: [], + ruleEnable: { + a: [[false, 2, 5], [true, 4, 5]] + } + }) === true); + }); + it('should ignore comments that don\'t fit known formats', function () { + var ruleToggles = generateToggledRules('ruleToggler-ignore-unknown.scss'); + assert(deepEqual(ruleToggles, { + globalEnable: [], + ruleEnable: {} + }) === true); + }); + it('should ignore empty files', function () { + var ruleToggles = generateToggledRules('empty-file.scss'); + assert(deepEqual(ruleToggles, { + globalEnable: [], + ruleEnable: {} + }) === true); + }); + it('should ignore empty comments', function () { + var ruleToggles = generateToggledRules('ruleToggler-empty-comment.scss'); + assert(deepEqual(ruleToggles, { + globalEnable: [], + ruleEnable: {} + }) === true); + }); + it('should be ordered', function () { + var ruleToggles = generateToggledRules('ruleToggler-guarantee-order.scss'); + assert(deepEqual(ruleToggles, { + globalEnable: [], + ruleEnable: { + a: [[false, 1, 3], + [false, 2, 5], + [true, 6, 1], + [false, 8, 3], + [false, 8, 5], + [true, 12, 1], + [false, 14, 6], + [false, 14, 32]] + } + }) === true); + }); + + ////////////////////////////// + // SASS syntax tests + ////////////////////////////// + it('should allow all rules to be disabled', function () { + assert(deepEqual(generateToggledRules('ruleToggler-disable-all.sass'), { + globalEnable: [[false, 1, 1]], + ruleEnable: {} + }) === true); + }); + it('should allow all rules to be disabled then re-enabled', function () { + var ruleToggles = generateToggledRules('ruleToggler-disable-all-then-reenable.sass'); + assert(deepEqual(ruleToggles, { + globalEnable: [ + [false, 1, 1], + [true, 3, 1] + ], + ruleEnable: {} + }) === true); + }); + it('should allow a single rule to be disabled', function () { + assert(deepEqual(generateToggledRules('ruleToggler-disable-a-rule.sass'), { + globalEnable: [], + ruleEnable: { + a: [[false, 1, 1]] + } + }) === true); + }); + it('should allow multiple rules to be disabled', function () { + assert(deepEqual(generateToggledRules('ruleToggler-disable-multiple-rules.sass'), { + globalEnable: [], + ruleEnable: { + a: [[false, 1, 1]], + b: [[false, 1, 1]], + c: [[false, 1, 1]], + d: [[false, 1, 1]] + } + }) === true); + }); + it('should be able to disable a single line', function () { + var ruleToggles = generateToggledRules('ruleToggler-disable-a-line.sass'); + assert(deepEqual(ruleToggles, { + globalEnable: [], + ruleEnable: { + a: [[false, 2, 1], [true, 3, 1]] + } + }) === true); + }); + it('should be able to disable a block of code', function () { + var ruleToggles = generateToggledRules('ruleToggler-disable-a-block.sass'); + assert(deepEqual(ruleToggles, { + globalEnable: [], + ruleEnable: { + a: [[false, 2, 1], [true, 2, 32]] + } + }) === true); + }); + it('should be able to enable a disabled rule', function () { + var ruleToggles = generateToggledRules('ruleToggler-disable-then-enable.sass'); + assert(deepEqual(ruleToggles, { + globalEnable: [], + ruleEnable: { + a: [[false, 2, 5], [true, 4, 5]] + } + }) === true); + }); + it('should ignore comments that don\'t fit known formats', function () { + var ruleToggles = generateToggledRules('ruleToggler-ignore-unknown.sass'); + assert(deepEqual(ruleToggles, { + globalEnable: [], + ruleEnable: {} + }) === true); + }); + it('should ignore empty files', function () { + var ruleToggles = generateToggledRules('empty-file.sass'); + assert(deepEqual(ruleToggles, { + globalEnable: [], + ruleEnable: {} + }) === true); + }); + it('should ignore empty comments', function () { + var ruleToggles = generateToggledRules('ruleToggler-empty-comment.sass'); + assert(deepEqual(ruleToggles, { + globalEnable: [], + ruleEnable: {} + }) === true); + }); + it('should be ordered', function () { + var ruleToggles = generateToggledRules('ruleToggler-guarantee-order.sass'); + assert(deepEqual(ruleToggles, { + globalEnable: [], + ruleEnable: { + a: [[false, 2, 1], + [false, 2, 5], + [true, 5, 20], + [false, 8, 1], + [false, 8, 5], + [true, 11, 20], + [false, 14, 5], + [false, 15, 5]] + } + }) === true); + }); + }); + describe('isResultEnabled', function () { + it('should disable all rules if global is disabled', function () { + assert(isResultEnabled({ + globalEnable: [[false, 1, 1]], + ruleEnable: {} + })({ + ruleId: 'anything', + line: 2, + column: 1 + }) === false); + }); + it('should disable a rule', function () { + assert(isResultEnabled({ + globalEnable: [], + ruleEnable: { + a: [[false, 1, 1]] + } + })({ + ruleId: 'a', + line: 2, + column: 1 + }) === false); + }); + it('should not disable an unrelated rule', function () { + assert(isResultEnabled({ + globalEnable: [], + ruleEnable: { + b: [[false, 1, 1]] + } + })({ + ruleId: 'a', + line: 2, + column: 1 + }) === true); + }); + it('should support enabling a previously disabled rule', function () { + assert(isResultEnabled({ + globalEnable: [], + ruleEnable: { + a: [[false, 1, 1], [true, 2, 1]] + } + })({ + ruleId: 'a', + line: 3, + column: 1 + }) === true); + }); + it('should support disabling a previously re-enabled rule', function () { + assert(isResultEnabled({ + globalEnable: [], + ruleEnable: { + a: [[false, 1, 1], [true, 2, 1], [false, 3, 1]] + } + })({ + ruleId: 'a', + line: 4, + column: 1 + }) === false); + }); + it('should support enabling a previously re-enabled then disabled rule (in enabled part)', function () { + assert(isResultEnabled({ + globalEnable: [], + ruleEnable: { + a: [[false, 1, 1], [true, 2, 1], [false, 3, 1], [true, 4, 1]] + } + })({ + ruleId: 'a', + line: 5, + column: 1 + }) === true); + }); + it('should support enabling a previously re-enabled then disabled rule (in disabled part)', function () { + assert(isResultEnabled({ + globalEnable: [], + ruleEnable: { + a: [[false, 1, 1], [true, 2, 1], [false, 3, 1], [true, 4, 1]] + } + })({ + ruleId: 'a', + line: 3, + column: 10 + }) === false); + }); + it('should support disabling a rule that is later re-enabled', function () { + assert(isResultEnabled({ + globalEnable: [], + ruleEnable: { + a: [[false, 1, 1], [true, 3, 1], [false, 4, 1]] + } + })({ + ruleId: 'a', + line: 2, + column: 1 + }) === false); + }); + }); +}); diff --git a/node_modules/sass-lint/tests/rules/attribute-quotes.js b/node_modules/sass-lint/tests/rules/attribute-quotes.js new file mode 100644 index 0000000..481d546 --- /dev/null +++ b/node_modules/sass-lint/tests/rules/attribute-quotes.js @@ -0,0 +1,63 @@ +'use strict'; + +var lint = require('./_lint'); + +////////////////////////////// +// SCSS syntax tests +////////////////////////////// +describe('attribute-quotes - scss', function () { + var file = lint.file('attribute-quotes.scss'); + + it('[default] include [include: true]', function (done) { + lint.test(file, { + 'attribute-quotes': 1 + }, function (data) { + lint.assert.equal(5, data.warningCount); + done(); + }); + }); + + it('exclude [include: false]', function (done) { + lint.test(file, { + 'attribute-quotes': [ + 1, + { + 'include': false + } + ] + }, function (data) { + lint.assert.equal(7, data.warningCount); + done(); + }); + }); +}); + +////////////////////////////// +// Sass syntax tests +////////////////////////////// +describe('attribute-quotes - sass', function () { + var file = lint.file('attribute-quotes.scss'); + + it('[default] include [include: true]', function (done) { + lint.test(file, { + 'attribute-quotes': 1 + }, function (data) { + lint.assert.equal(5, data.warningCount); + done(); + }); + }); + + it('exclude [include: false]', function (done) { + lint.test(file, { + 'attribute-quotes': [ + 1, + { + 'include': false + } + ] + }, function (data) { + lint.assert.equal(7, data.warningCount); + done(); + }); + }); +}); diff --git a/node_modules/sass-lint/tests/rules/border-zero.js b/node_modules/sass-lint/tests/rules/border-zero.js index da2c280..1c026aa 100644 --- a/node_modules/sass-lint/tests/rules/border-zero.js +++ b/node_modules/sass-lint/tests/rules/border-zero.js @@ -9,6 +9,20 @@ describe('border zero - scss', function () { var file = lint.file('border-zero.scss'); it('[convention: 0]', function (done) { + lint.test(file, { + 'border-zero': [ + 1, + { + 'convention': 0 + } + ] + }, function (data) { + lint.assert.equal(3, data.warningCount); + done(); + }); + }); + + it('[convention: \'0\']', function (done) { lint.test(file, { 'border-zero': 1 }, function (data) { @@ -30,6 +44,21 @@ describe('border zero - scss', function () { done(); }); }); + + it('invalid convention [convention: \'zero\']', function (done) { + // defaults to convention 0 + lint.test(file, { + 'border-zero': [ + 1, + { + 'convention': 'zero' + } + ] + }, function (data) { + lint.assert.equal(4, data.warningCount); + done(); + }); + }); }); ////////////////////////////// @@ -39,6 +68,20 @@ describe('border zero - sass', function () { var file = lint.file('border-zero.sass'); it('[convention: 0]', function (done) { + lint.test(file, { + 'border-zero': [ + 1, + { + 'convention': 0 + } + ] + }, function (data) { + lint.assert.equal(3, data.warningCount); + done(); + }); + }); + + it('[convention: \'0\']', function (done) { lint.test(file, { 'border-zero': 1 }, function (data) { @@ -60,4 +103,19 @@ describe('border zero - sass', function () { done(); }); }); + + it('invalid convention [convention: \'zero\']', function (done) { + // defaults to convention 0 + lint.test(file, { + 'border-zero': [ + 1, + { + 'convention': 'zero' + } + ] + }, function (data) { + lint.assert.equal(4, data.warningCount); + done(); + }); + }); }); diff --git a/node_modules/sass-lint/tests/rules/class-name-format.js b/node_modules/sass-lint/tests/rules/class-name-format.js index c7bd7c9..c5f5365 100644 --- a/node_modules/sass-lint/tests/rules/class-name-format.js +++ b/node_modules/sass-lint/tests/rules/class-name-format.js @@ -12,7 +12,7 @@ describe('class name format - scss', function () { lint.test(file, { 'class-name-format': 1 }, function (data) { - lint.assert.equal(24, data.warningCount); + lint.assert.equal(31, data.warningCount); done(); }); }); @@ -26,7 +26,7 @@ describe('class name format - scss', function () { } ] }, function (data) { - lint.assert.equal(23, data.warningCount); + lint.assert.equal(30, data.warningCount); done(); }); }); @@ -40,7 +40,21 @@ describe('class name format - scss', function () { } ] }, function (data) { - lint.assert.equal(34, data.warningCount); + lint.assert.equal(40, data.warningCount); + done(); + }); + }); + + it('[convention: pascalcase]', function (done) { + lint.test(file, { + 'class-name-format': [ + 1, + { + 'convention': 'pascalcase' + } + ] + }, function (data) { + lint.assert.equal(40, data.warningCount); done(); }); }); @@ -54,7 +68,7 @@ describe('class name format - scss', function () { } ] }, function (data) { - lint.assert.equal(29, data.warningCount); + lint.assert.equal(36, data.warningCount); done(); }); }); @@ -68,7 +82,7 @@ describe('class name format - scss', function () { } ] }, function (data) { - lint.assert.equal(19, data.warningCount); + lint.assert.equal(17, data.warningCount); done(); }); }); @@ -82,7 +96,7 @@ describe('class name format - scss', function () { } ] }, function (data) { - lint.assert.equal(17, data.warningCount); + lint.assert.equal(24, data.warningCount); done(); }); }); @@ -96,7 +110,7 @@ describe('class name format - scss', function () { } ] }, function (data) { - lint.assert.equal(35, data.warningCount); + lint.assert.equal(42, data.warningCount); done(); }); }); @@ -112,7 +126,7 @@ describe('class name format - scss', function () { } ] }, function (data) { - lint.assert.equal(31, data.warningCount); + lint.assert.equal(38, data.warningCount); lint.assert.equal(data.messages[0].message, message); done(); }); @@ -129,7 +143,7 @@ describe('class name format - sass', function () { lint.test(file, { 'class-name-format': 1 }, function (data) { - lint.assert.equal(24, data.warningCount); + lint.assert.equal(31, data.warningCount); done(); }); }); @@ -143,7 +157,7 @@ describe('class name format - sass', function () { } ] }, function (data) { - lint.assert.equal(23, data.warningCount); + lint.assert.equal(30, data.warningCount); done(); }); }); @@ -157,7 +171,21 @@ describe('class name format - sass', function () { } ] }, function (data) { - lint.assert.equal(34, data.warningCount); + lint.assert.equal(40, data.warningCount); + done(); + }); + }); + + it('[convention: pascalcase]', function (done) { + lint.test(file, { + 'class-name-format': [ + 1, + { + 'convention': 'pascalcase' + } + ] + }, function (data) { + lint.assert.equal(40, data.warningCount); done(); }); }); @@ -171,7 +199,7 @@ describe('class name format - sass', function () { } ] }, function (data) { - lint.assert.equal(29, data.warningCount); + lint.assert.equal(36, data.warningCount); done(); }); }); @@ -185,7 +213,7 @@ describe('class name format - sass', function () { } ] }, function (data) { - lint.assert.equal(19, data.warningCount); + lint.assert.equal(17, data.warningCount); done(); }); }); @@ -199,7 +227,7 @@ describe('class name format - sass', function () { } ] }, function (data) { - lint.assert.equal(17, data.warningCount); + lint.assert.equal(24, data.warningCount); done(); }); }); @@ -213,7 +241,7 @@ describe('class name format - sass', function () { } ] }, function (data) { - lint.assert.equal(35, data.warningCount); + lint.assert.equal(42, data.warningCount); done(); }); }); @@ -229,7 +257,7 @@ describe('class name format - sass', function () { } ] }, function (data) { - lint.assert.equal(31, data.warningCount); + lint.assert.equal(38, data.warningCount); lint.assert.equal(data.messages[0].message, message); done(); }); diff --git a/node_modules/sass-lint/tests/rules/declarations-before-nesting.js b/node_modules/sass-lint/tests/rules/declarations-before-nesting.js new file mode 100644 index 0000000..e8f4b59 --- /dev/null +++ b/node_modules/sass-lint/tests/rules/declarations-before-nesting.js @@ -0,0 +1,35 @@ +'use strict'; + +var lint = require('./_lint'); + +////////////////////////////// +// SCSS syntax tests +////////////////////////////// +describe('declarations before nesting - scss', function () { + var file = lint.file('declarations-before-nesting.scss'); + + it('enforce', function (done) { + lint.test(file, { + 'declarations-before-nesting': 1 + }, function (data) { + lint.assert.equal(4, data.warningCount); + done(); + }); + }); +}); + +////////////////////////////// +// Sass syntax tests +////////////////////////////// +describe('declarations before nesting - sass', function () { + var file = lint.file('declarations-before-nesting.sass'); + + it('enforce', function (done) { + lint.test(file, { + 'declarations-before-nesting': 1 + }, function (data) { + lint.assert.equal(4, data.warningCount); + done(); + }); + }); +}); diff --git a/node_modules/sass-lint/tests/rules/function-name-format.js b/node_modules/sass-lint/tests/rules/function-name-format.js index e797f6a..beda9f5 100644 --- a/node_modules/sass-lint/tests/rules/function-name-format.js +++ b/node_modules/sass-lint/tests/rules/function-name-format.js @@ -28,6 +28,20 @@ describe('function name format - scss', function () { }); }); + it('[convention: pascalcase]', function (done) { + lint.test(file, { + 'function-name-format': [ + 1, + { + 'convention': 'pascalcase' + } + ] + }, function (data) { + lint.assert.equal(17, data.warningCount); + done(); + }); + }); + it('[convention: snakecase]', function (done) { lint.test(file, { 'function-name-format': [ @@ -51,7 +65,7 @@ describe('function name format - scss', function () { } ] }, function (data) { - lint.assert.equal(13, data.warningCount); + lint.assert.equal(10, data.warningCount); done(); }); }); @@ -126,6 +140,20 @@ describe('function name format - sass', function () { }); }); + it('[convention: pascalcase]', function (done) { + lint.test(file, { + 'function-name-format': [ + 1, + { + 'convention': 'pascalcase' + } + ] + }, function (data) { + lint.assert.equal(17, data.warningCount); + done(); + }); + }); + it('[convention: snakecase]', function (done) { lint.test(file, { 'function-name-format': [ @@ -149,7 +177,7 @@ describe('function name format - sass', function () { } ] }, function (data) { - lint.assert.equal(13, data.warningCount); + lint.assert.equal(10, data.warningCount); done(); }); }); diff --git a/node_modules/sass-lint/tests/rules/id-name-format.js b/node_modules/sass-lint/tests/rules/id-name-format.js index 0518279..93ab922 100644 --- a/node_modules/sass-lint/tests/rules/id-name-format.js +++ b/node_modules/sass-lint/tests/rules/id-name-format.js @@ -59,6 +59,20 @@ describe('id name format - scss', function () { }); }); + it('[convention: pascalcase]', function (done) { + lint.test(file, { + 'id-name-format': [ + 1, + { + 'convention': 'pascalcase' + } + ] + }, function (data) { + lint.assert.equal(20, data.warningCount); + done(); + }); + }); + it('[convention: RegExp ^[_A-Z]+$]', function (done) { lint.test(file, { 'id-name-format': [ @@ -134,6 +148,20 @@ describe('id name format - sass', function () { }); }); + it('[convention: pascalcase]', function (done) { + lint.test(file, { + 'id-name-format': [ + 1, + { + 'convention': 'pascalcase' + } + ] + }, function (data) { + lint.assert.equal(20, data.warningCount); + done(); + }); + }); + it('[convention: snakecase]', function (done) { lint.test(file, { 'id-name-format': [ diff --git a/node_modules/sass-lint/tests/rules/indentation.js b/node_modules/sass-lint/tests/rules/indentation.js index 73b5fc7..43968f5 100644 --- a/node_modules/sass-lint/tests/rules/indentation.js +++ b/node_modules/sass-lint/tests/rules/indentation.js @@ -6,13 +6,28 @@ var lint = require('./_lint'); // SCSS syntax tests ////////////////////////////// describe('indentation - scss', function () { - var file = lint.file('indentation.scss'); + var spaceFile = lint.file('indentation/indentation-spaces.scss'); + var tabFile = lint.file('indentation/indentation-tabs.scss'); it('[size: 2]', function (done) { - lint.test(file, { + lint.test(spaceFile, { 'indentation': 1 }, function (data) { - lint.assert.equal(9, data.warningCount); + lint.assert.equal(14, data.warningCount); + done(); + }); + }); + + it('[size: tab]', function (done) { + lint.test(tabFile, { + 'indentation': [ + 1, + { + size: 'tab' + } + ] + }, function (data) { + lint.assert.equal(14, data.warningCount); done(); }); }); @@ -22,16 +37,31 @@ describe('indentation - scss', function () { ////////////////////////////// // Sass syntax tests ////////////////////////////// -// describe('indentation - sass', function () { -// var file = lint.file('indentation.sass'); -// -// // Indentation -// it('[size: 2]', function (done) { -// lint.test(file, { -// 'indentation': 1 -// }, function (data) { -// lint.assert.equal(8, data.warningCount); -// done(); -// }); -// }); -// }); +describe('indentation - sass', function () { + var spaceFile = lint.file('indentation/indentation-spaces.sass'); + var tabFile = lint.file('indentation/indentation-tabs.sass'); + + // Indentation + it('[size: 2]', function (done) { + lint.test(spaceFile, { + 'indentation': 1 + }, function (data) { + lint.assert.equal(13, data.warningCount); + done(); + }); + }); + + it('[size: tab]', function (done) { + lint.test(tabFile, { + 'indentation': [ + 1, + { + size: 'tab' + } + ] + }, function (data) { + lint.assert.equal(13, data.warningCount); + done(); + }); + }); +}); diff --git a/node_modules/sass-lint/tests/rules/max-file-line-count.js b/node_modules/sass-lint/tests/rules/max-file-line-count.js new file mode 100644 index 0000000..89a8690 --- /dev/null +++ b/node_modules/sass-lint/tests/rules/max-file-line-count.js @@ -0,0 +1,63 @@ +'use strict'; + +var lint = require('./_lint'); + +////////////////////////////// +// SCSS syntax tests +////////////////////////////// +describe('max-file-line-count - scss', function () { + var file = lint.file('max-file-line-count.scss'); + + it('enforce [default]', function (done) { + lint.test(file, { + 'max-file-line-count': 1 + }, function (data) { + lint.assert.equal(1, data.warningCount); + done(); + }); + }); + + it('enforce [length: 3000]', function (done) { + lint.test(file, { + 'max-file-line-count': [ + 1, + { + length: 3000 + } + ] + }, function (data) { + lint.assert.equal(0, data.warningCount); + done(); + }); + }); +}); + +////////////////////////////// +// Sass syntax tests +////////////////////////////// +describe('max-file-line-count - sass', function () { + var file = lint.file('max-file-line-count.sass'); + + it('enforce', function (done) { + lint.test(file, { + 'max-file-line-count': 1 + }, function (data) { + lint.assert.equal(1, data.warningCount); + done(); + }); + }); + + it('enforce [length: 3000]', function (done) { + lint.test(file, { + 'max-file-line-count': [ + 1, + { + length: 3000 + } + ] + }, function (data) { + lint.assert.equal(0, data.warningCount); + done(); + }); + }); +}); diff --git a/node_modules/sass-lint/tests/rules/max-line-length.js b/node_modules/sass-lint/tests/rules/max-line-length.js new file mode 100644 index 0000000..0109174 --- /dev/null +++ b/node_modules/sass-lint/tests/rules/max-line-length.js @@ -0,0 +1,63 @@ +'use strict'; + +var lint = require('./_lint'); + +////////////////////////////// +// SCSS syntax tests +////////////////////////////// +describe('max-line-length - scss', function () { + var file = lint.file('max-line-length.scss'); + + it('enforce [default]', function (done) { + lint.test(file, { + 'max-line-length': 1 + }, function (data) { + lint.assert.equal(5, data.warningCount); + done(); + }); + }); + + it('enforce [length: 79]', function (done) { + lint.test(file, { + 'max-line-length': [ + 1, + { + length: 79 + } + ] + }, function (data) { + lint.assert.equal(8, data.warningCount); + done(); + }); + }); +}); + +////////////////////////////// +// Sass syntax tests +////////////////////////////// +describe('max-line-length - sass', function () { + var file = lint.file('max-line-length.sass'); + + it('enforce', function (done) { + lint.test(file, { + 'max-line-length': 1 + }, function (data) { + lint.assert.equal(5, data.warningCount); + done(); + }); + }); + + it('enforce [length: 79]', function (done) { + lint.test(file, { + 'max-line-length': [ + 1, + { + length: 79 + } + ] + }, function (data) { + lint.assert.equal(8, data.warningCount); + done(); + }); + }); +}); diff --git a/node_modules/sass-lint/tests/rules/mixin-name-format.js b/node_modules/sass-lint/tests/rules/mixin-name-format.js index f56bb14..4c98580 100644 --- a/node_modules/sass-lint/tests/rules/mixin-name-format.js +++ b/node_modules/sass-lint/tests/rules/mixin-name-format.js @@ -28,6 +28,20 @@ describe('mixin name format - scss', function () { }); }); + it('[convention: pascalcase]', function (done) { + lint.test(file, { + 'mixin-name-format': [ + 1, + { + 'convention': 'pascalcase' + } + ] + }, function (data) { + lint.assert.equal(17, data.warningCount); + done(); + }); + }); + it('[convention: snakecase]', function (done) { lint.test(file, { 'mixin-name-format': [ @@ -51,7 +65,7 @@ describe('mixin name format - scss', function () { } ] }, function (data) { - lint.assert.equal(13, data.warningCount); + lint.assert.equal(9, data.warningCount); done(); }); }); @@ -140,6 +154,20 @@ describe('mixin name format - sass', function () { }); }); + it('[convention: pascalcase]', function (done) { + lint.test(file, { + 'mixin-name-format': [ + 1, + { + 'convention': 'pascalcase' + } + ] + }, function (data) { + lint.assert.equal(17, data.warningCount); + done(); + }); + }); + it('[convention: strictbem]', function (done) { lint.test(file, { 'mixin-name-format': [ @@ -149,7 +177,7 @@ describe('mixin name format - sass', function () { } ] }, function (data) { - lint.assert.equal(13, data.warningCount); + lint.assert.equal(9, data.warningCount); done(); }); }); diff --git a/node_modules/sass-lint/tests/rules/no-attribute-selectors.js b/node_modules/sass-lint/tests/rules/no-attribute-selectors.js new file mode 100644 index 0000000..1e25656 --- /dev/null +++ b/node_modules/sass-lint/tests/rules/no-attribute-selectors.js @@ -0,0 +1,35 @@ +'use strict'; + +var lint = require('./_lint'); + +////////////////////////////// +// SCSS syntax tests +////////////////////////////// +describe('no attribute selectors - scss', function () { + var file = lint.file('no-attribute-selectors.scss'); + + it('enforce', function (done) { + lint.test(file, { + 'no-attribute-selectors': 1 + }, function (data) { + lint.assert.equal(18, data.warningCount); + done(); + }); + }); +}); + +////////////////////////////// +// Sass syntax tests +////////////////////////////// +describe('no attribute selectors - sass', function () { + var file = lint.file('no-attribute-selectors.sass'); + + it('enforce', function (done) { + lint.test(file, { + 'no-attribute-selectors': 1 + }, function (data) { + lint.assert.equal(18, data.warningCount); + done(); + }); + }); +}); diff --git a/node_modules/sass-lint/tests/rules/no-color-hex.js b/node_modules/sass-lint/tests/rules/no-color-hex.js new file mode 100644 index 0000000..2cfe53e --- /dev/null +++ b/node_modules/sass-lint/tests/rules/no-color-hex.js @@ -0,0 +1,35 @@ +'use strict'; + +var lint = require('./_lint'); + +////////////////////////////// +// SCSS syntax tests +////////////////////////////// +describe('no color hex - scss', function () { + var file = lint.file('no-color-hex.scss'); + + it('enforce', function (done) { + lint.test(file, { + 'no-color-hex': 1 + }, function (data) { + lint.assert.equal(9, data.warningCount); + done(); + }); + }); +}); + +////////////////////////////// +// Sass syntax tests +////////////////////////////// +describe('no color hex - sass', function () { + var file = lint.file('no-color-hex.sass'); + + it('enforce', function (done) { + lint.test(file, { + 'no-color-hex': 1 + }, function (data) { + lint.assert.equal(9, data.warningCount); + done(); + }); + }); +}); diff --git a/node_modules/sass-lint/tests/rules/no-combinators.js b/node_modules/sass-lint/tests/rules/no-combinators.js new file mode 100644 index 0000000..aab0597 --- /dev/null +++ b/node_modules/sass-lint/tests/rules/no-combinators.js @@ -0,0 +1,35 @@ +'use strict'; + +var lint = require('./_lint'); + +////////////////////////////// +// SCSS syntax tests +////////////////////////////// +describe('no combinators - scss', function () { + var file = lint.file('no-combinators.scss'); + + it('enforce', function (done) { + lint.test(file, { + 'no-combinators': 1 + }, function (data) { + lint.assert.equal(23, data.warningCount); + done(); + }); + }); +}); + +////////////////////////////// +// Sass syntax tests +////////////////////////////// +describe('no combinators - sass', function () { + var file = lint.file('no-combinators.sass'); + + it('enforce', function (done) { + lint.test(file, { + 'no-combinators': 1 + }, function (data) { + lint.assert.equal(23, data.warningCount); + done(); + }); + }); +}); diff --git a/node_modules/sass-lint/tests/rules/no-disallowed-properties.js b/node_modules/sass-lint/tests/rules/no-disallowed-properties.js new file mode 100644 index 0000000..dc015e1 --- /dev/null +++ b/node_modules/sass-lint/tests/rules/no-disallowed-properties.js @@ -0,0 +1,83 @@ +'use strict'; + +var lint = require('./_lint'); + +////////////////////////////// +// SCSS syntax tests +////////////////////////////// +describe('no disallowed properties - scss', function () { + var file = lint.file('no-disallowed-properties.scss'); + + it('properties: [z-index]', function (done) { + lint.test(file, { + 'no-disallowed-properties': [ + 1, + { + properties: [ + 'z-index' + ] + } + ] + }, function (data) { + lint.assert.equal(6, data.warningCount); + done(); + }); + }); + + it('properties: [z-index, display]', function (done) { + lint.test(file, { + 'no-disallowed-properties': [ + 1, + { + properties: [ + 'z-index', + 'display' + ] + } + ] + }, function (data) { + lint.assert.equal(10, data.warningCount); + done(); + }); + }); +}); + +////////////////////////////// +// Sass syntax tests +////////////////////////////// +describe('no disallowed properties - sass', function () { + var file = lint.file('no-disallowed-properties.sass'); + + it('properties: [z-index]', function (done) { + lint.test(file, { + 'no-disallowed-properties': [ + 1, + { + properties: [ + 'z-index' + ] + } + ] + }, function (data) { + lint.assert.equal(6, data.warningCount); + done(); + }); + }); + + it('properties: [z-index, display]', function (done) { + lint.test(file, { + 'no-disallowed-properties': [ + 1, + { + properties: [ + 'z-index', + 'display' + ] + } + ] + }, function (data) { + lint.assert.equal(10, data.warningCount); + done(); + }); + }); +}); diff --git a/node_modules/sass-lint/tests/rules/no-duplicate-properties.js b/node_modules/sass-lint/tests/rules/no-duplicate-properties.js index c703d25..d51bf82 100644 --- a/node_modules/sass-lint/tests/rules/no-duplicate-properties.js +++ b/node_modules/sass-lint/tests/rules/no-duplicate-properties.js @@ -12,7 +12,7 @@ describe('no duplicate properties - scss', function () { lint.test(file, { 'no-duplicate-properties': 1 }, function (data) { - lint.assert.equal(6, data.warningCount); + lint.assert.equal(7, data.warningCount); done(); }); }); @@ -28,7 +28,7 @@ describe('no duplicate properties - scss', function () { } ] }, function (data) { - lint.assert.equal(5, data.warningCount); + lint.assert.equal(6, data.warningCount); done(); }); }); @@ -45,7 +45,7 @@ describe('no duplicate properties - scss', function () { } ] }, function (data) { - lint.assert.equal(4, data.warningCount); + lint.assert.equal(5, data.warningCount); done(); }); }); @@ -61,7 +61,7 @@ describe('no duplicate properties - sass', function () { lint.test(file, { 'no-duplicate-properties': 1 }, function (data) { - lint.assert.equal(6, data.warningCount); + lint.assert.equal(7, data.warningCount); done(); }); }); @@ -77,7 +77,7 @@ describe('no duplicate properties - sass', function () { } ] }, function (data) { - lint.assert.equal(5, data.warningCount); + lint.assert.equal(6, data.warningCount); done(); }); }); @@ -94,7 +94,7 @@ describe('no duplicate properties - sass', function () { } ] }, function (data) { - lint.assert.equal(4, data.warningCount); + lint.assert.equal(5, data.warningCount); done(); }); }); diff --git a/node_modules/sass-lint/tests/rules/no-empty-rulesets.js b/node_modules/sass-lint/tests/rules/no-empty-rulesets.js index 752cf9e..cb86204 100644 --- a/node_modules/sass-lint/tests/rules/no-empty-rulesets.js +++ b/node_modules/sass-lint/tests/rules/no-empty-rulesets.js @@ -10,7 +10,7 @@ describe('no empty rulesets - scss', function () { it('enforce', function (done) { lint.test(file, { - 'empty-ruleset': 1 + 'no-empty-rulesets': 1 }, function (data) { lint.assert.equal(3, data.warningCount); done(); diff --git a/node_modules/sass-lint/tests/rules/no-mergeable-selectors.js b/node_modules/sass-lint/tests/rules/no-mergeable-selectors.js index 33eb53b..4b4be90 100644 --- a/node_modules/sass-lint/tests/rules/no-mergeable-selectors.js +++ b/node_modules/sass-lint/tests/rules/no-mergeable-selectors.js @@ -9,7 +9,7 @@ describe('no mergeable selectors - scss', function () { lint.test(file, { 'no-mergeable-selectors': 1 }, function (data) { - lint.assert.equal(21, data.warningCount); + lint.assert.equal(24, data.warningCount); done(); }); }); @@ -25,7 +25,7 @@ describe('no mergeable selectors - scss', function () { } ] }, function (data) { - lint.assert.equal(20, data.warningCount); + lint.assert.equal(23, data.warningCount); done(); }); }); @@ -40,7 +40,7 @@ describe('no mergeable selectors - sass', function () { lint.test(file, { 'no-mergeable-selectors': 1 }, function (data) { - lint.assert.equal(20, data.warningCount); + lint.assert.equal(21, data.warningCount); done(); }); }); @@ -57,7 +57,7 @@ describe('no mergeable selectors - sass', function () { } ] }, function (data) { - lint.assert.equal(19, data.warningCount); + lint.assert.equal(20, data.warningCount); done(); }); }); diff --git a/node_modules/sass-lint/tests/rules/no-misspelled-properties.js b/node_modules/sass-lint/tests/rules/no-misspelled-properties.js index a09b532..c7a5e5b 100644 --- a/node_modules/sass-lint/tests/rules/no-misspelled-properties.js +++ b/node_modules/sass-lint/tests/rules/no-misspelled-properties.js @@ -12,7 +12,7 @@ describe('no misspelled properties - scss', function () { lint.test(file, { 'no-misspelled-properties': 1 }, function (data) { - lint.assert.equal(4, data.warningCount); + lint.assert.equal(7, data.warningCount); done(); }); }); @@ -28,7 +28,7 @@ describe('no misspelled properties - scss', function () { } ] }, function (data) { - lint.assert.equal(2, data.warningCount); + lint.assert.equal(5, data.warningCount); done(); }); }); @@ -45,7 +45,7 @@ describe('no misspelled properties - scss', function () { } ] }, function (data) { - lint.assert.equal(1, data.warningCount); + lint.assert.equal(4, data.warningCount); done(); }); }); @@ -61,7 +61,7 @@ describe('no misspelled properties - sass', function () { lint.test(file, { 'no-misspelled-properties': 1 }, function (data) { - lint.assert.equal(4, data.warningCount); + lint.assert.equal(7, data.warningCount); done(); }); }); @@ -77,7 +77,7 @@ describe('no misspelled properties - sass', function () { } ] }, function (data) { - lint.assert.equal(2, data.warningCount); + lint.assert.equal(5, data.warningCount); done(); }); }); @@ -94,7 +94,7 @@ describe('no misspelled properties - sass', function () { } ] }, function (data) { - lint.assert.equal(1, data.warningCount); + lint.assert.equal(4, data.warningCount); done(); }); }); diff --git a/node_modules/sass-lint/tests/rules/no-trailing-zero.js b/node_modules/sass-lint/tests/rules/no-trailing-zero.js index 0da6797..8b87295 100644 --- a/node_modules/sass-lint/tests/rules/no-trailing-zero.js +++ b/node_modules/sass-lint/tests/rules/no-trailing-zero.js @@ -10,7 +10,7 @@ describe('no trailing zero - scss', function () { it('enforce', function (done) { lint.test(file, { - 'trailing-zero': 1 + 'no-trailing-zero': 1 }, function (data) { lint.assert.equal(8, data.warningCount); done(); @@ -26,7 +26,7 @@ describe('no trailing zero - sass', function () { it('enforce', function (done) { lint.test(file, { - 'trailing-zero': 1 + 'no-trailing-zero': 1 }, function (data) { lint.assert.equal(8, data.warningCount); done(); diff --git a/node_modules/sass-lint/tests/rules/no-universal-selectors.js b/node_modules/sass-lint/tests/rules/no-universal-selectors.js new file mode 100644 index 0000000..fd59bc8 --- /dev/null +++ b/node_modules/sass-lint/tests/rules/no-universal-selectors.js @@ -0,0 +1,35 @@ +'use strict'; + +var lint = require('./_lint'); + +////////////////////////////// +// SCSS syntax tests +////////////////////////////// +describe('no universal selectors - scss', function () { + var file = lint.file('no-universal-selectors.scss'); + + it('enforce', function (done) { + lint.test(file, { + 'no-universal-selectors': 1 + }, function (data) { + lint.assert.equal(6, data.warningCount); + done(); + }); + }); +}); + +////////////////////////////// +// Sass syntax tests +////////////////////////////// +describe('no universal selectors - sass', function () { + var file = lint.file('no-universal-selectors.sass'); + + it('enforce', function (done) { + lint.test(file, { + 'no-universal-selectors': 1 + }, function (data) { + lint.assert.equal(6, data.warningCount); + done(); + }); + }); +}); diff --git a/node_modules/sass-lint/tests/rules/no-url-domains.js b/node_modules/sass-lint/tests/rules/no-url-domains.js new file mode 100644 index 0000000..2caabdb --- /dev/null +++ b/node_modules/sass-lint/tests/rules/no-url-domains.js @@ -0,0 +1,35 @@ +'use strict'; + +var lint = require('./_lint'); + +////////////////////////////// +// SCSS syntax tests +////////////////////////////// +describe('no url domains - scss', function () { + var file = lint.file('no-url-domains.scss'); + + it('enforce', function (done) { + lint.test(file, { + 'no-url-domains': 1 + }, function (data) { + lint.assert.equal(3, data.warningCount); + done(); + }); + }); +}); + +////////////////////////////// +// Sass syntax tests +////////////////////////////// +describe('no url domains - sass', function () { + var file = lint.file('no-url-domains.sass'); + + it('enforce', function (done) { + lint.test(file, { + 'no-url-domains': 1 + }, function (data) { + lint.assert.equal(3, data.warningCount); + done(); + }); + }); +}); diff --git a/node_modules/sass-lint/tests/rules/no-url-protocols.js b/node_modules/sass-lint/tests/rules/no-url-protocols.js index 87b5422..65b5b5f 100644 --- a/node_modules/sass-lint/tests/rules/no-url-protocols.js +++ b/node_modules/sass-lint/tests/rules/no-url-protocols.js @@ -16,8 +16,23 @@ describe('no url protocols - scss', function () { done(); }); }); + + it('[allow-protocol-relative-urls: true]', function (done) { + lint.test(file, { + 'no-url-protocols': [ + 1, + { + 'allow-protocol-relative-urls': true + } + ] + }, function (data) { + lint.assert.equal(2, data.warningCount); + done(); + }); + }); }); + ////////////////////////////// // Sass syntax tests ////////////////////////////// @@ -32,4 +47,18 @@ describe('no url protocols - sass', function () { done(); }); }); + + it('[allow-protocol-relative-urls: true]', function (done) { + lint.test(file, { + 'no-url-protocols': [ + 1, + { + 'allow-protocol-relative-urls': true + } + ] + }, function (data) { + lint.assert.equal(2, data.warningCount); + done(); + }); + }); }); diff --git a/node_modules/sass-lint/tests/rules/no-vendor-prefixes.js b/node_modules/sass-lint/tests/rules/no-vendor-prefixes.js index 46ff4b7..37d0579 100644 --- a/node_modules/sass-lint/tests/rules/no-vendor-prefixes.js +++ b/node_modules/sass-lint/tests/rules/no-vendor-prefixes.js @@ -12,7 +12,7 @@ describe('no vendor prefix - scss', function () { lint.test(file, { 'no-vendor-prefixes': 1 }, function (data) { - lint.assert.equal(5, data.warningCount); + lint.assert.equal(10, data.warningCount); done(); }); }); @@ -29,7 +29,7 @@ describe('no vendor prefix - scss', function () { } ] }, function (data) { - lint.assert.equal(3, data.warningCount); + lint.assert.equal(5, data.warningCount); done(); }); }); @@ -64,7 +64,7 @@ describe('no vendor prefix - scss', function () { } ] }, function (data) { - lint.assert.equal(6, data.warningCount); + lint.assert.equal(11, data.warningCount); done(); }); }); @@ -84,7 +84,38 @@ describe('no vendor prefix - scss', function () { } ] }, function (data) { - lint.assert.equal(6, data.warningCount); + lint.assert.equal(11, data.warningCount); + done(); + }); + }); + + it('[ignore-non-standard: true]', function (done) { + lint.test(file, { + 'no-vendor-prefixes': [ + 1, + { + 'ignore-non-standard': true + } + ] + }, function (data) { + lint.assert.equal(4, data.warningCount); + done(); + }); + }); + + it('[ignore-non-standard: true][excluded-identifiers: webkit]', function (done) { + lint.test(file, { + 'no-vendor-prefixes': [ + 1, + { + 'excluded-identifiers': [ + 'webkit' + ], + 'ignore-non-standard': true + } + ] + }, function (data) { + lint.assert.equal(1, data.warningCount); done(); }); }); @@ -100,7 +131,7 @@ describe('no vendor prefix - sass', function () { lint.test(file, { 'no-vendor-prefixes': 1 }, function (data) { - lint.assert.equal(5, data.warningCount); + lint.assert.equal(10, data.warningCount); done(); }); }); @@ -117,7 +148,7 @@ describe('no vendor prefix - sass', function () { } ] }, function (data) { - lint.assert.equal(3, data.warningCount); + lint.assert.equal(5, data.warningCount); done(); }); }); @@ -152,7 +183,7 @@ describe('no vendor prefix - sass', function () { } ] }, function (data) { - lint.assert.equal(6, data.warningCount); + lint.assert.equal(11, data.warningCount); done(); }); }); @@ -172,7 +203,38 @@ describe('no vendor prefix - sass', function () { } ] }, function (data) { - lint.assert.equal(6, data.warningCount); + lint.assert.equal(11, data.warningCount); + done(); + }); + }); + + it('[ignore-non-standard: true]', function (done) { + lint.test(file, { + 'no-vendor-prefixes': [ + 1, + { + 'ignore-non-standard': true + } + ] + }, function (data) { + lint.assert.equal(4, data.warningCount); + done(); + }); + }); + + it('[ignore-non-standard: true][excluded-identifiers: webkit]', function (done) { + lint.test(file, { + 'no-vendor-prefixes': [ + 1, + { + 'excluded-identifiers': [ + 'webkit' + ], + 'ignore-non-standard': true + } + ] + }, function (data) { + lint.assert.equal(1, data.warningCount); done(); }); }); diff --git a/node_modules/sass-lint/tests/rules/placeholder-name-format.js b/node_modules/sass-lint/tests/rules/placeholder-name-format.js index f0f2035..0d30033 100644 --- a/node_modules/sass-lint/tests/rules/placeholder-name-format.js +++ b/node_modules/sass-lint/tests/rules/placeholder-name-format.js @@ -2,6 +2,10 @@ var lint = require('./_lint'); +// ============================================================================== +// SCSS +// ============================================================================== + describe('placeholder name format - scss', function () { var file = lint.file('placeholder-name-format.scss'); @@ -28,6 +32,20 @@ describe('placeholder name format - scss', function () { }); }); + it('[convention: pascalcase]', function (done) { + lint.test(file, { + 'placeholder-name-format': [ + 1, + { + 'convention': 'pascalcase' + } + ] + }, function (data) { + lint.assert.equal(17, data.warningCount); + done(); + }); + }); + it('[convention: snakecase]', function (done) { lint.test(file, { 'placeholder-name-format': [ @@ -51,7 +69,7 @@ describe('placeholder name format - scss', function () { } ] }, function (data) { - lint.assert.equal(13, data.warningCount); + lint.assert.equal(9, data.warningCount); done(); }); }); @@ -100,6 +118,10 @@ describe('placeholder name format - scss', function () { }); }); +// ============================================================================== +// Sass +// ============================================================================== + describe('placeholder name format - sass', function () { var file = lint.file('placeholder-name-format.sass'); @@ -140,6 +162,20 @@ describe('placeholder name format - sass', function () { }); }); + it('[convention: pascalcase]', function (done) { + lint.test(file, { + 'placeholder-name-format': [ + 1, + { + 'convention': 'pascalcase' + } + ] + }, function (data) { + lint.assert.equal(17, data.warningCount); + done(); + }); + }); + it('[convention: strictbem]', function (done) { lint.test(file, { 'placeholder-name-format': [ @@ -149,7 +185,7 @@ describe('placeholder name format - sass', function () { } ] }, function (data) { - lint.assert.equal(13, data.warningCount); + lint.assert.equal(9, data.warningCount); done(); }); }); diff --git a/node_modules/sass-lint/tests/rules/pseudo-element.js b/node_modules/sass-lint/tests/rules/pseudo-element.js new file mode 100644 index 0000000..0281556 --- /dev/null +++ b/node_modules/sass-lint/tests/rules/pseudo-element.js @@ -0,0 +1,73 @@ +'use strict'; + +var lint = require('./_lint'); + +////////////////////////////// +// SCSS syntax tests +////////////////////////////// +describe('pseudo-element - scss', function () { + var file = lint.file('pseudo-element.scss'); + + var byAttribute = function byAttribute (key, value) { + return function filterByAttribute (element) { + return element[key].match(value); + }; + }; + + it('enforces double colons for pseudo-elements', function (done) { + lint.test(file, { + 'pseudo-element': 1 + }, function (data) { + var pseudoElementRelatedWarnings = data.messages.filter(byAttribute('message', /Pseudo-elements/)); + lint.assert.equal(39, data.warningCount); + lint.assert.equal(7, pseudoElementRelatedWarnings.length); + done(); + }); + }); + + it('enforces single colon for pseudo-classes', function (done) { + lint.test(file, { + 'pseudo-element': 1 + }, function (data) { + var pseudoClassRelatedWarnings = data.messages.filter(byAttribute('message', /Pseudo-classes/)); + lint.assert.equal(39, data.warningCount); + lint.assert.equal(32, pseudoClassRelatedWarnings.length); + done(); + }); + }); +}); + +////////////////////////////// +// Sass syntax tests +////////////////////////////// +describe('pseudo-element - sass', function () { + var file = lint.file('pseudo-element.sass'); + + var byAttribute = function byAttribute (key, value) { + return function filterByAttribute (element) { + return element[key].match(value); + }; + }; + + it('enforces double colons for pseudo-elements', function (done) { + lint.test(file, { + 'pseudo-element': 1 + }, function (data) { + var pseudoElementRelatedWarnings = data.messages.filter(byAttribute('message', /Pseudo-elements/)); + lint.assert.equal(39, data.warningCount); + lint.assert.equal(7, pseudoElementRelatedWarnings.length); + done(); + }); + }); + + it('enforces single colon for pseudo-classes', function (done) { + lint.test(file, { + 'pseudo-element': 1 + }, function (data) { + var pseudoClassRelatedWarnings = data.messages.filter(byAttribute('message', /Pseudo-classes/)); + lint.assert.equal(39, data.warningCount); + lint.assert.equal(32, pseudoClassRelatedWarnings.length); + done(); + }); + }); +}); diff --git a/node_modules/sass-lint/tests/rules/shorthand-values.js b/node_modules/sass-lint/tests/rules/shorthand-values.js index 7188106..5bf8dbe 100644 --- a/node_modules/sass-lint/tests/rules/shorthand-values.js +++ b/node_modules/sass-lint/tests/rules/shorthand-values.js @@ -12,7 +12,7 @@ describe('shorthand values - scss', function () { lint.test(file, { 'shorthand-values': 1 }, function (data) { - lint.assert.equal(54, data.warningCount); + lint.assert.equal(78, data.warningCount); done(); }); }); @@ -28,7 +28,7 @@ describe('shorthand values - scss', function () { } ] }, function (data) { - lint.assert.equal(23, data.warningCount); + lint.assert.equal(32, data.warningCount); done(); }); }); @@ -44,7 +44,7 @@ describe('shorthand values - scss', function () { } ] }, function (data) { - lint.assert.equal(26, data.warningCount); + lint.assert.equal(40, data.warningCount); done(); }); }); @@ -60,7 +60,7 @@ describe('shorthand values - scss', function () { } ] }, function (data) { - lint.assert.equal(32, data.warningCount); + lint.assert.equal(47, data.warningCount); done(); }); }); @@ -92,7 +92,7 @@ describe('shorthand values - scss', function () { } ] }, function (data) { - lint.assert.equal(40, data.warningCount); + lint.assert.equal(59, data.warningCount); done(); }); }); @@ -109,7 +109,7 @@ describe('shorthand values - scss', function () { } ] }, function (data) { - lint.assert.equal(46, data.warningCount); + lint.assert.equal(66, data.warningCount); done(); }); }); @@ -126,7 +126,7 @@ describe('shorthand values - scss', function () { } ] }, function (data) { - lint.assert.equal(40, data.warningCount); + lint.assert.equal(59, data.warningCount); done(); }); }); @@ -144,7 +144,7 @@ describe('shorthand values - scss', function () { } ] }, function (data) { - lint.assert.equal(54, data.warningCount); + lint.assert.equal(78, data.warningCount); done(); }); }); @@ -161,7 +161,7 @@ describe('shorthand values - sass', function () { lint.test(file, { 'shorthand-values': 1 }, function (data) { - lint.assert.equal(54, data.warningCount); + lint.assert.equal(78, data.warningCount); done(); }); }); @@ -177,7 +177,7 @@ describe('shorthand values - sass', function () { } ] }, function (data) { - lint.assert.equal(23, data.warningCount); + lint.assert.equal(32, data.warningCount); done(); }); }); @@ -193,7 +193,7 @@ describe('shorthand values - sass', function () { } ] }, function (data) { - lint.assert.equal(26, data.warningCount); + lint.assert.equal(40, data.warningCount); done(); }); }); @@ -209,7 +209,7 @@ describe('shorthand values - sass', function () { } ] }, function (data) { - lint.assert.equal(32, data.warningCount); + lint.assert.equal(47, data.warningCount); done(); }); }); @@ -241,7 +241,7 @@ describe('shorthand values - sass', function () { } ] }, function (data) { - lint.assert.equal(40, data.warningCount); + lint.assert.equal(59, data.warningCount); done(); }); }); @@ -258,7 +258,7 @@ describe('shorthand values - sass', function () { } ] }, function (data) { - lint.assert.equal(46, data.warningCount); + lint.assert.equal(66, data.warningCount); done(); }); }); @@ -275,7 +275,7 @@ describe('shorthand values - sass', function () { } ] }, function (data) { - lint.assert.equal(40, data.warningCount); + lint.assert.equal(59, data.warningCount); done(); }); }); @@ -293,7 +293,7 @@ describe('shorthand values - sass', function () { } ] }, function (data) { - lint.assert.equal(54, data.warningCount); + lint.assert.equal(78, data.warningCount); done(); }); }); diff --git a/node_modules/sass-lint/tests/rules/space-around-operator.js b/node_modules/sass-lint/tests/rules/space-around-operator.js index b87ca3c..a7ffdb3 100644 --- a/node_modules/sass-lint/tests/rules/space-around-operator.js +++ b/node_modules/sass-lint/tests/rules/space-around-operator.js @@ -26,7 +26,7 @@ describe('space around operator - scss', function () { } ] }, function (data) { - lint.assert.equal(92, data.warningCount); + lint.assert.equal(94, data.warningCount); done(); }); }); @@ -56,7 +56,7 @@ describe('space around operator - sass', function () { } ] }, function (data) { - lint.assert.equal(86, data.warningCount); + lint.assert.equal(88, data.warningCount); done(); }); }); diff --git a/node_modules/sass-lint/tests/rules/variable-for-property.js b/node_modules/sass-lint/tests/rules/variable-for-property.js index 7601fda..8e80334 100644 --- a/node_modules/sass-lint/tests/rules/variable-for-property.js +++ b/node_modules/sass-lint/tests/rules/variable-for-property.js @@ -34,6 +34,22 @@ describe('variable for property - scss', function () { done(); }); }); + + it('[properties: color]', function (done) { + lint.test(file, { + 'variable-for-property': [ + 1, + { + 'properties': [ + 'color' + ] + } + ] + }, function (data) { + lint.assert.equal(1, data.warningCount); + done(); + }); + }); }); ////////////////////////////// @@ -68,4 +84,20 @@ describe('variable for property - sass', function () { done(); }); }); + + it('[properties: color]', function (done) { + lint.test(file, { + 'variable-for-property': [ + 1, + { + 'properties': [ + 'color' + ] + } + ] + }, function (data) { + lint.assert.equal(1, data.warningCount); + done(); + }); + }); }); diff --git a/node_modules/sass-lint/tests/rules/variable-name-format.js b/node_modules/sass-lint/tests/rules/variable-name-format.js index 6716890..ecd647f 100644 --- a/node_modules/sass-lint/tests/rules/variable-name-format.js +++ b/node_modules/sass-lint/tests/rules/variable-name-format.js @@ -2,6 +2,10 @@ var lint = require('./_lint'); +// ============================================================================== +// SCSS +// ============================================================================== + describe('variable name format - scss', function () { var file = lint.file('variable-name-format.scss'); @@ -23,7 +27,21 @@ describe('variable name format - scss', function () { } ] }, function (data) { - lint.assert.equal(15, data.warningCount); + lint.assert.equal(16, data.warningCount); + done(); + }); + }); + + it('[convention: pascalcase]', function (done) { + lint.test(file, { + 'variable-name-format': [ + 1, + { + 'convention': 'pascalcase' + } + ] + }, function (data) { + lint.assert.equal(17, data.warningCount); done(); }); }); @@ -37,7 +55,7 @@ describe('variable name format - scss', function () { } ] }, function (data) { - lint.assert.equal(10, data.warningCount); + lint.assert.equal(11, data.warningCount); done(); }); }); @@ -51,7 +69,7 @@ describe('variable name format - scss', function () { } ] }, function (data) { - lint.assert.equal(12, data.warningCount); + lint.assert.equal(9, data.warningCount); done(); }); }); @@ -80,7 +98,7 @@ describe('variable name format - scss', function () { } ] }, function (data) { - lint.assert.equal(16, data.warningCount); + lint.assert.equal(17, data.warningCount); done(); }); }); @@ -100,6 +118,10 @@ describe('variable name format - scss', function () { }); }); +// ============================================================================== +// Sass +// ============================================================================== + describe('variable name format - sass', function () { var file = lint.file('variable-name-format.sass'); @@ -121,7 +143,7 @@ describe('variable name format - sass', function () { } ] }, function (data) { - lint.assert.equal(15, data.warningCount); + lint.assert.equal(16, data.warningCount); done(); }); }); @@ -135,7 +157,21 @@ describe('variable name format - sass', function () { } ] }, function (data) { - lint.assert.equal(10, data.warningCount); + lint.assert.equal(11, data.warningCount); + done(); + }); + }); + + it('[convention: pascalcase]', function (done) { + lint.test(file, { + 'variable-name-format': [ + 1, + { + 'convention': 'pascalcase' + } + ] + }, function (data) { + lint.assert.equal(17, data.warningCount); done(); }); }); @@ -149,7 +185,7 @@ describe('variable name format - sass', function () { } ] }, function (data) { - lint.assert.equal(12, data.warningCount); + lint.assert.equal(9, data.warningCount); done(); }); }); @@ -178,7 +214,7 @@ describe('variable name format - sass', function () { } ] }, function (data) { - lint.assert.equal(16, data.warningCount); + lint.assert.equal(17, data.warningCount); done(); }); }); diff --git a/node_modules/sass-lint/tests/sass/attribute-quotes.sass b/node_modules/sass-lint/tests/sass/attribute-quotes.sass new file mode 100644 index 0000000..b759446 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/attribute-quotes.sass @@ -0,0 +1,62 @@ +span[lang] + font-weight: bold + +//////////////////////////// +// No Quotes - Default warnings +//////////////////////////// + +span[lang=pt] + color: green + +span[lang~=en-us] + color: blue + +// TODO currently a parse error in gonzales-pe +// span[lang|="zh"] {color: red;} + +// TODO currently a parse error in gonzales-pe +// a[href^=#] { +// background-color: gold; +// } + +span[class^=main] + background-color: yellow + +// TODO currently a parse error in gonzales-pe +// a[href$=.cn] { +// color: red; +// } + +a[href*=example] + background-color: #CCCCCC + +input[type=email i] + border-color: blue + +//////////////////////////// +// Quotes - exclude option warnings +//////////////////////////// + +span[lang="pt"] + color: green + +span[lang~="en-us"] + color: blue + +// TODO currently a parse error in gonzales-pe +// span[lang|="zh"] {color: red;} + +a[href^="#"] + background-color: gold + +span[class^="main"] + background-color: yellow + +a[href$=".cn"] + color: red + +a[href*="example"] + background-color: #CCCCCC + +input[type="email" i] + border-color: blue diff --git a/node_modules/sass-lint/tests/sass/attribute-quotes.scss b/node_modules/sass-lint/tests/sass/attribute-quotes.scss new file mode 100644 index 0000000..8fd957b --- /dev/null +++ b/node_modules/sass-lint/tests/sass/attribute-quotes.scss @@ -0,0 +1,75 @@ +span[lang] { + font-weight: bold; +} + +//////////////////////////// +// No Quotes - Default warnings +//////////////////////////// + +span[lang=pt] { + color: green; +} + +span[lang~=en-us] { + color: blue; +} + +// TODO currently a parse error in gonzales-pe +// span[lang|="zh"] {color: red;} + +// TODO currently a parse error in gonzales-pe +// a[href^=#] { +// background-color: gold; +// } + +span[class^=main] { + background-color: yellow; +} + +// TODO currently a parse error in gonzales-pe +// a[href$=.cn] { +// color: red; +// } + +a[href*=example] { + background-color: #CCCCCC; +} + +input[type=email i] { + border-color: blue; +} + +//////////////////////////// +// Quotes - exclude option warnings +//////////////////////////// + +span[lang="pt"] { + color: green; +} + +span[lang~="en-us"] { + color: blue; +} + +// TODO currently a parse error in gonzales-pe +// span[lang|="zh"] {color: red;} + +a[href^="#"] { + background-color: gold; +} + +span[class^="main"] { + background-color: yellow; +} + +a[href$=".cn"] { + color: red; +} + +a[href*="example"] { + background-color: #CCCCCC; +} + +input[type="email" i] { + border-color: blue; +} diff --git a/node_modules/sass-lint/tests/sass/border-zero.scss b/node_modules/sass-lint/tests/sass/border-zero.scss index 398d1cb..5336c60 100644 --- a/node_modules/sass-lint/tests/sass/border-zero.scss +++ b/node_modules/sass-lint/tests/sass/border-zero.scss @@ -21,3 +21,9 @@ .norf { border: 1px; } + +.norf { + // sass-lint:disable border-zero + border: none; + // sass-lint:enable border-zero +} diff --git a/node_modules/sass-lint/tests/sass/class-name-format.sass b/node_modules/sass-lint/tests/sass/class-name-format.sass index ecc6fb8..f63b1fe 100644 --- a/node_modules/sass-lint/tests/sass/class-name-format.sass +++ b/node_modules/sass-lint/tests/sass/class-name-format.sass @@ -76,3 +76,21 @@ &_valid_child, &-invalid-child height: 10px + +.Pascal + .APascalCase + .camelCase + color: red + +// Issue #872 - incorrect strict bem regex +.strict-bem__elem_bool + color: red + +.strict-bem__elem_bool-modifier + color: red + +.strict-bem__elem_key-val + color: red + +.strict-bem__elem_key--fail + color: red diff --git a/node_modules/sass-lint/tests/sass/class-name-format.scss b/node_modules/sass-lint/tests/sass/class-name-format.scss index 019e00a..bbb2452 100644 --- a/node_modules/sass-lint/tests/sass/class-name-format.scss +++ b/node_modules/sass-lint/tests/sass/class-name-format.scss @@ -108,3 +108,28 @@ height: 10px; } } + +.Pascal { + .APascalCase { + .camelCase { + color: red; + } + } +} + +// Issue #872 - incorrect strict bem regex +.strict-bem__elem_bool { + color: red; +} + +.strict-bem__elem_bool-modifier { + color: red; +} + +.strict-bem__elem_key-val { + color: red; +} + +.strict-bem__elem_key--fail { + color: red; +} diff --git a/node_modules/sass-lint/tests/sass/declarations-before-nesting.sass b/node_modules/sass-lint/tests/sass/declarations-before-nesting.sass new file mode 100644 index 0000000..5b9b11e --- /dev/null +++ b/node_modules/sass-lint/tests/sass/declarations-before-nesting.sass @@ -0,0 +1,34 @@ +.bar + content: 'baz' + + .qux + content: 'baz' + +.foo + .bar + content: 'where' + + content: 'baz' + + .baz + content: 'where' + + content: 'baz' + +.foo + .bar + content: 'where' + + .baz + content: 'quz' + + content: 'baz' + + content: 'baz' + +// issue #935 - ignore variables ++foo + #{$bar} + content: 'foobar' + + $baz: 'qux' diff --git a/node_modules/sass-lint/tests/sass/declarations-before-nesting.scss b/node_modules/sass-lint/tests/sass/declarations-before-nesting.scss new file mode 100644 index 0000000..0251b92 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/declarations-before-nesting.scss @@ -0,0 +1,44 @@ +.bar { + content: 'baz'; + + .qux { + content: 'baz'; + } +} + +.foo { + .bar { + content: 'where'; + } + + content: 'baz'; + + .baz { + content: 'where'; + } + + content: 'baz'; +} + +.foo { + .bar { + content: 'where'; + + .baz { + content: 'quz'; + } + + content: 'baz'; + } + + content: 'baz'; +} + +// issue #935 - ignore variables +@mixin foo { + #{$bar} { + content: 'foobar'; + } + + $baz: 'qux'; +} diff --git a/node_modules/sass-lint/tests/sass/empty-file.sass b/node_modules/sass-lint/tests/sass/empty-file.sass new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/sass-lint/tests/sass/front-matter/front-matter.scss b/node_modules/sass-lint/tests/sass/front-matter/front-matter.scss new file mode 100644 index 0000000..93f12e5 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/front-matter/front-matter.scss @@ -0,0 +1,7 @@ +--- +# Only the main Sass file needs front matter (the dashes are enough) +--- + +.test { + color: red; +} diff --git a/node_modules/sass-lint/tests/sass/indentation/indentation-spaces.sass b/node_modules/sass-lint/tests/sass/indentation/indentation-spaces.sass new file mode 100644 index 0000000..523813c --- /dev/null +++ b/node_modules/sass-lint/tests/sass/indentation/indentation-spaces.sass @@ -0,0 +1,107 @@ +$foo: ('foo': 'bar', 'bar': ('foo': 'bze')) + +.parent + &__child + p::first-line + content: '' + content: 'ta' + +.foo, +.bar + content: 'bar' + + content: 'baz' + content: 'bar' + + +breakpoint(500) + content: 'baz' + // comment inside block + content: 'qux' + + +mixin-extra + content: 'baz' + content: 'qux' + + +mixin-empty-args() + content: 'baz' + content: 'qux' + + .qux + content: 'bar' + + + @if (1 == 1) + content: 'foo' + +=bar + content: 'bar' + content: 'baz' + +.color + color: rgba(255, 255, 255, 0.3) + +$colors: (base: (red: #fff, blue: #fff), text: (default: #fff, light: (brap: #987), not: (test: #fff))) + +.multilineprops + background: transparent linear-gradient( + to bottom, + #ff0000 0%, + #00ff00 40%, + #0000ff 40% + ) + +.multilineprops-extra + background: transparent linear-gradient(to bottom, #ff0000 0%, #00ff00 40%, #0000ff 40%) + +// Top-level mixin ++hello( + $foo, + $bar, + $baz +) + +.foo + // Nested Mixin + +hello( + $foo, + $bar, + $baz + ) + + // CSS built-in function + background: transparent linear-gradient( + to bottom, + #ff0000 0%, + #00ff00 40%, + #0000ff 40% + ) + + // User-defined function + content: goodbye( + $foo, + $bar + ) + +@function cp($target, $container) + @return calc-percent($target, $container) + +// Issue #426 - Unexpected indenting enforcement on multiline rules +=hidpi-background-image($filename, $background-size: 'mixed', $extension: png) + background-image: url('../images/#{$filename}.#{$extension}') + @if ($background-size != 'mixed') + background-size: $background-size + + @media (min--moz-device-pixel-ratio: 1.3) + background-image: url('../images/#{$filename}@2x.#{$extension}') + color: red + +.test + @media (max-width: 800px), (max-height: 600px) + #unit + margin: 16px + +// Gonzales issue with media queries +// .test +// @media (max-width: 800px), (max-height: 600px) +// #unit +// margin: 16px diff --git a/node_modules/sass-lint/tests/sass/indentation.scss b/node_modules/sass-lint/tests/sass/indentation/indentation-spaces.scss similarity index 55% rename from node_modules/sass-lint/tests/sass/indentation.scss rename to node_modules/sass-lint/tests/sass/indentation/indentation-spaces.scss index 1a9bea1..15d8ea6 100644 --- a/node_modules/sass-lint/tests/sass/indentation.scss +++ b/node_modules/sass-lint/tests/sass/indentation/indentation-spaces.scss @@ -115,3 +115,61 @@ $colors: ( @function cp($target, $container) { @return calc-percent($target, $container); } + +// Issue #426 - Unexpected indenting enforcement on multiline rules +@mixin hidpi-background-image($filename, $background-size: 'mixed', $extension: png) { + background-image: url('../images/#{$filename}.#{$extension}'); + @if ($background-size != 'mixed') { + background-size: $background-size; + } + @media (min--moz-device-pixel-ratio: 1.3), + (-o-min-device-pixel-ratio: 2.6/2), + (-webkit-min-device-pixel-ratio: 1.3), + (min-device-pixel-ratio: 1.3), + (min-resolution: 1.3dppx) { + background-image: url('../images/#{$filename}@2x.#{$extension}'); + color: red; + } +} + +@media (max-width: 800px), (max-height: 600px) { + #unit { + margin: 16px; + } +} + +@media (max-width: 800px), (max-height: 600px) { + #unit { + margin: 16px; + } +} + +// Issue #783 and issue #779 - at-rule throws off indentation of maps etc + +@import 'echo-base/defaults/breakpoints'; + +$textsizes: ( + xs: ( + s: 10px, + m: 10px + ), + s: ( + s: 12px, + m: 13px + ), +); + +@function em($pixels, $context: $font-size-base) { + @return #{($pixels / $context)}rem; +} + +$textsizes: ( + xs: ( + s: 10px, + m: 10px + ), + s: ( + s: 12px, + m: 13px + ), +); diff --git a/node_modules/sass-lint/tests/sass/indentation/indentation-tabs.sass b/node_modules/sass-lint/tests/sass/indentation/indentation-tabs.sass new file mode 100644 index 0000000..a702bed --- /dev/null +++ b/node_modules/sass-lint/tests/sass/indentation/indentation-tabs.sass @@ -0,0 +1,107 @@ +$foo: ('foo': 'bar', 'bar': ('foo': 'bze')) + +.parent + &__child + p::first-line + content: '' + content: 'ta' + +.foo, +.bar + content: 'bar' + + content: 'baz' + content: 'bar' + + +breakpoint(500) + content: 'baz' + // comment inside block + content: 'qux' + + +mixin-extra + content: 'baz' + content: 'qux' + + +mixin-empty-args() + content: 'baz' + content: 'qux' + + .qux + content: 'bar' + + + @if (1 == 1) + content: 'foo' + +=bar + content: 'bar' + content: 'baz' + +.color + color: rgba(255, 255, 255, 0.3) + +$colors: (base: (red: #fff, blue: #fff), text: (default: #fff, light: (brap: #987), not: (test: #fff))) + +.multilineprops + background: transparent linear-gradient( + to bottom, + #ff0000 0%, + #00ff00 40%, + #0000ff 40% + ) + +.multilineprops-extra + background: transparent linear-gradient(to bottom, #ff0000 0%, #00ff00 40%, #0000ff 40%) + +// Top-level mixin ++hello( + $foo, + $bar, + $baz +) + +.foo + // Nested Mixin + +hello( + $foo, + $bar, + $baz + ) + + // CSS built-in function + background: transparent linear-gradient( + to bottom, + #ff0000 0%, + #00ff00 40%, + #0000ff 40% + ) + + // User-defined function + content: goodbye( + $foo, + $bar + ) + +@function cp($target, $container) + @return calc-percent($target, $container) + +// Issue #426 - Unexpected indenting enforcement on multiline rules +=hidpi-background-image($filename, $background-size: 'mixed', $extension: png) + background-image: url('../images/#{$filename}.#{$extension}') + @if ($background-size != 'mixed') + background-size: $background-size + + @media (min--moz-device-pixel-ratio: 1.3) + background-image: url('../images/#{$filename}@2x.#{$extension}') + color: red + +.test + @media (max-width: 800px), (max-height: 600px) + #unit + margin: 16px + +// Gonzales issue with media queries +// .test +// @media (max-width: 800px), (max-height: 600px) +// #unit +// margin: 16px diff --git a/node_modules/sass-lint/tests/sass/indentation/indentation-tabs.scss b/node_modules/sass-lint/tests/sass/indentation/indentation-tabs.scss new file mode 100644 index 0000000..c34f5d5 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/indentation/indentation-tabs.scss @@ -0,0 +1,175 @@ +$foo: ( + 'foo': 'bar', + 'bar': ( + 'foo': 'bze' + ) +); + +.parent { + &__child { + p::first-line { + content: ''; + } + } +} + +.foo, +.bar { + content: 'bar'; + + content: 'baz'; +content: 'bar'; + + @include breakpoint(500) { + content: 'baz'; + content: 'qux'; + } + + @include mixin-extra { + content: 'baz'; + content: 'qux'; + } + + @include mixin-empty-args() { + content: 'baz'; + content: 'qux'; + } + + .qux { + content: 'bar'; + } + + @if (1 == 1) { + content: 'foo'; + } +} + +@mixin bar { + content: 'bar'; + content: 'baz'; +} + +.color { + color: rgba(255, 255, 255, 0.3); +} + +$colors: ( + base: ( + red: #fff, + blue: #fff + ), + text: ( + default: #fff, + light: ( + brap: #987 + ), + not: ( + test: #fff + ) + ) +); + +.multilineprops { + background: transparent linear-gradient( + to bottom, + #ff0000 0%, + #00ff00 40%, + #0000ff 40% + ); +} + +.multilineprops-extra { + background: transparent linear-gradient(to bottom, #ff0000 0%, #00ff00 40%, #0000ff 40%); +} + +// Top-level mixin +@include hello( + $foo, + $bar, + $baz +); + +.foo { + // Nested Mixin + @include hello( + $foo, + $bar, + $baz + ); + + // CSS built-in function + background: transparent linear-gradient( + to bottom, + #ff0000 0%, + #00ff00 40%, + #0000ff 40% + ); + + // User-defined function + content: goodbye( + $foo, + $bar + ); +} + +@function cp($target, $container) { + @return calc-percent($target, $container); +} + +// Issue #426 - Unexpected indenting enforcement on multiline rules +@mixin hidpi-background-image($filename, $background-size: 'mixed', $extension: png) { + background-image: url('../images/#{$filename}.#{$extension}'); + @if ($background-size != 'mixed') { + background-size: $background-size; + } + @media (min--moz-device-pixel-ratio: 1.3), + (-o-min-device-pixel-ratio: 2.6/2), + (-webkit-min-device-pixel-ratio: 1.3), + (min-device-pixel-ratio: 1.3), + (min-resolution: 1.3dppx) { + background-image: url('../images/#{$filename}@2x.#{$extension}'); + color: red; + } +} + +@media (max-width: 800px), (max-height: 600px) { + #unit { + margin: 16px; + } +} + +@media (max-width: 800px), (max-height: 600px) { + #unit { + margin: 16px; + } +} + +// Issue #783 and issue #779 - at-rule throws off indentation of maps etc + +@import 'echo-base/defaults/breakpoints'; + +$textsizes: ( + xs: ( + s: 10px, + m: 10px + ), + s: ( + s: 12px, + m: 13px + ), +); + +@function em($pixels, $context: $font-size-base) { + @return #{($pixels / $context)}rem; +} + +$textsizes: ( + xs: ( + s: 10px, + m: 10px + ), + s: ( + s: 12px, + m: 13px + ), +); diff --git a/node_modules/sass-lint/tests/sass/max-file-line-count.sass b/node_modules/sass-lint/tests/sass/max-file-line-count.sass new file mode 100644 index 0000000..26d1540 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/max-file-line-count.sass @@ -0,0 +1,301 @@ +// ============================================ +// +// Really +// long +// comment +// for +// padding +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +.test + .other + .foo + .bar + .baz + .qux + color: red diff --git a/node_modules/sass-lint/tests/sass/max-file-line-count.scss b/node_modules/sass-lint/tests/sass/max-file-line-count.scss new file mode 100644 index 0000000..6319aa2 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/max-file-line-count.scss @@ -0,0 +1,301 @@ +// ============================================ +// +// Really +// long +// comment +// for +// padding +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +.test { + .other { + .foo { + .bar { + .baz { + .qux { + color: red; + } + } + } + } + } +} diff --git a/node_modules/sass-lint/tests/sass/max-line-length.sass b/node_modules/sass-lint/tests/sass/max-line-length.sass new file mode 100644 index 0000000..a753bb7 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/max-line-length.sass @@ -0,0 +1,20 @@ +.really--long--class-name--that-unfortunately--isnt--very--succint--and-looks-stupid + color: red + +@function($aReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyLongVariableName) + @return 'test' + +// ============================================================================== +// +// This comment is too long clearly, we should probably make sure we have a rule to +// determine when we breach this length +// +// ============================================================================== + + +// ============================================================================= +// +// This comment comment on the other hand should be the perfect length, unless a +// user decides to make their max line length === 79! +// +// ============================================================================= diff --git a/node_modules/sass-lint/tests/sass/max-line-length.scss b/node_modules/sass-lint/tests/sass/max-line-length.scss new file mode 100644 index 0000000..07021d2 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/max-line-length.scss @@ -0,0 +1,22 @@ +.really--long--class-name--that-unfortunately--isnt--very--succint--and-looks-stupid { + color: red; +} + +@function($aReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyLongVariableName) { + @return 'test'; +} + +// ============================================================================== +// +// This comment is too long clearly, we should probably make sure we have a rule to +// determine when we breach this length +// +// ============================================================================== + + +// ============================================================================= +// +// This comment comment on the other hand should be the perfect length, unless a +// user decides to make their max line length === 79! +// +// ============================================================================= diff --git a/node_modules/sass-lint/tests/sass/no-attribute-selectors.sass b/node_modules/sass-lint/tests/sass/no-attribute-selectors.sass new file mode 100644 index 0000000..dd67d65 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/no-attribute-selectors.sass @@ -0,0 +1,77 @@ +// Standard +//============================================================================== + +[autoplay] + content: 'foo' + +[attr=value] + content: 'bar' + +[attr~=value] + content: 'baz' + +// TODO: Uncomment once gonzale-pe issue fixed +// https://github.com/tonyganch/gonzales-pe/issues/174 +// [attr|=value] +// content: 'qux' + +[attr^=value] + content: 'norf' + +[attr$=value] + content: 'foo' + +[attr*=value] + content: 'bar' + +// Combinator +//============================================================================== + +.foo [autoplay] + content: 'foo' + +.foo [attr=value] + content: 'bar' + +.foo [attr~=value] + content: 'baz' + +// TODO: Uncomment once gonzale-pe issue fixed +// https://github.com/tonyganch/gonzales-pe/issues/174 +// .foo [attr|=value] +// content: 'qux' + +.foo [attr^=value] + content: 'norf' + +.foo [attr$=value] + content: 'foo' + +.foo [attr*=value] + content: 'bar' + +// Specific +//============================================================================== + +.foo[autoplay] + content: 'foo' + +.foo[attr=value] + content: 'bar' + +.foo[attr~=value] + content: 'baz' + +// TODO: Uncomment once gonzale-pe issue fixed +// https://github.com/tonyganch/gonzales-pe/issues/174 +// .foo[attr|=value] +// content: 'qux' + +.foo[attr^=value] + content: 'norf' + +.foo[attr$=value] + content: 'foo' + +.foo[attr*=value] + content: 'bar' diff --git a/node_modules/sass-lint/tests/sass/no-attribute-selectors.scss b/node_modules/sass-lint/tests/sass/no-attribute-selectors.scss new file mode 100644 index 0000000..6b49335 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/no-attribute-selectors.scss @@ -0,0 +1,98 @@ +// Standard +//============================================================================== + +[autoplay] { + content: 'foo'; +} + +[attr=value] { + content: 'bar'; +} + +[attr~=value] { + content: 'baz'; +} + +// TODO: Uncomment once gonzale-pe issue fixed +// https://github.com/tonyganch/gonzales-pe/issues/174 +// [attr|=value] { +// content: 'qux'; +// } + +[attr^=value] { + content: 'norf'; +} + +[attr$=value] { + content: 'foo'; +} + +[attr*=value] { + content: 'bar'; +} + +// Combinator +//============================================================================== + +.foo [autoplay] { + content: 'foo'; +} + +.foo [attr=value] { + content: 'bar'; +} + +.foo [attr~=value] { + content: 'baz'; +} + +// TODO: Uncomment once gonzale-pe issue fixed +// https://github.com/tonyganch/gonzales-pe/issues/174 +// .foo [attr|=value] { +// content: 'qux'; +// } + +.foo [attr^=value] { + content: 'norf'; +} + +.foo [attr$=value] { + content: 'foo'; +} + +.foo [attr*=value] { + content: 'bar'; +} + +// Specific +//============================================================================== + +.foo[autoplay] { + content: 'foo'; +} + +.foo[attr=value] { + content: 'bar'; +} + +.foo[attr~=value] { + content: 'baz'; +} + +// TODO: Uncomment once gonzale-pe issue fixed +// https://github.com/tonyganch/gonzales-pe/issues/174 +// .foo[attr|=value] { +// content: 'qux'; +// } + +.foo[attr^=value] { + content: 'norf'; +} + +.foo[attr$=value] { + content: 'foo'; +} + +.foo[attr*=value] { + content: 'bar'; +} diff --git a/node_modules/sass-lint/tests/sass/no-color-hex.sass b/node_modules/sass-lint/tests/sass/no-color-hex.sass new file mode 100644 index 0000000..69c26e6 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/no-color-hex.sass @@ -0,0 +1,25 @@ +$foo-color: #123 + +.foo + background: linear-gradient(top, #cc2, #44d) + color: #fff + + +$bar-color: #112233 + +.bar + background: linear-gradient(top, #cccc22, #4444dd) + color: #ffffff + +.baz + border-color: #123456 + + +// color literals, rgb and hsl values currently don't get returned +// by the AST's color type + +$qux-color: red +$rgb-color: rgb(255, 255, 255) +$rgba-color: rgba(0, 0, 0, .1) +$hsl-color: hsl(40, 50%, 50%) +$hsla-color: hsla(40, 50%, 50%, .3) diff --git a/node_modules/sass-lint/tests/sass/no-color-hex.scss b/node_modules/sass-lint/tests/sass/no-color-hex.scss new file mode 100644 index 0000000..58c383d --- /dev/null +++ b/node_modules/sass-lint/tests/sass/no-color-hex.scss @@ -0,0 +1,26 @@ +$foo-color: #123; + +.foo { + background: linear-gradient(top, #cc2, #44d); + color: #fff; +} + +$bar-color: #112233; + +.bar { + background: linear-gradient(top, #cccc22, #4444dd); + color: #ffffff; +} + +.baz { + border-color: #123456; +} + +// color literals, rgb and hsl values currently don't get returned +// by the AST's color type + +$qux-color: red; +$rgb-color: rgb(255, 255, 255); +$rgba-color: rgba(0, 0, 0, .1); +$hsl-color: hsl(40, 50%, 50%); +$hsla-color: hsla(40, 50%, 50%, .3); diff --git a/node_modules/sass-lint/tests/sass/no-color-keywords.sass b/node_modules/sass-lint/tests/sass/no-color-keywords.sass index 88119ee..a619da9 100644 --- a/node_modules/sass-lint/tests/sass/no-color-keywords.sass +++ b/node_modules/sass-lint/tests/sass/no-color-keywords.sass @@ -28,3 +28,6 @@ $blue: #0050a0 $brand-primary: $blue $other: rgba($blue, 0.3) + +// Issue #717 - rule trips over Sass color function names +$colors: ( 'red': red($color), 'green': green($color), 'blue': blue($color) ) diff --git a/node_modules/sass-lint/tests/sass/no-color-keywords.scss b/node_modules/sass-lint/tests/sass/no-color-keywords.scss index ff6b499..3bcea3d 100644 --- a/node_modules/sass-lint/tests/sass/no-color-keywords.scss +++ b/node_modules/sass-lint/tests/sass/no-color-keywords.scss @@ -35,3 +35,10 @@ $blue: #0050a0; $brand-primary: $blue; $other: rgba($blue, 0.3); + +// Issue #717 - rule trips over Sass color function names +$colors: ( + 'red': red($color), + 'green': green($color), + 'blue': blue($color) +); diff --git a/node_modules/sass-lint/tests/sass/no-combinators.sass b/node_modules/sass-lint/tests/sass/no-combinators.sass new file mode 100644 index 0000000..598047e --- /dev/null +++ b/node_modules/sass-lint/tests/sass/no-combinators.sass @@ -0,0 +1,115 @@ +.foo > .bar + content: 'foo' + +.foo ~ .bar + content: 'bar' + +.foo + .bar + content: 'baz' + +.foo .bar + content: 'qux' + + +// No space +.foo>.bar + content: 'foo' + +.foo~.bar + content: 'bar' + +.foo+.bar + content: 'baz' + +// Ignore +.foo.bar + content: 'qux' + + +// Single interpolation +.foo > #{$bar} + content: 'foo' + +.foo ~ #{$bar} + content: 'bar' + +.foo + #{$bar} + content: 'baz' + +.foo #{$bar} + content: 'qux' + + +// Double interpolation +#{$foo} > #{$bar} + content: 'foo' + +#{$foo} ~ #{$bar} + content: 'bar' + +#{$foo} + #{$bar} + content: 'baz' + +#{$foo} #{$bar} + content: 'qux' + + +// Double nested interpolation +#{$foo} > + #{$bar} + content: 'foo' + +#{$foo} ~ + #{$bar} + content: 'bar' + +#{$foo} + + #{$bar} + content: 'baz' + +#{$foo} + #{$bar} + content: 'qux' + + +// Parent selector +&__bar + content: 'bar' + +.foo > + .bar & + content: 'foo' + +.foo > + &.bar + content: 'foo' + + +// Sassy nested combinators +.foo > + .bar + content: 'baz' + +.foo ~ + .bar + content: 'baz' + +.foo + + .bar + content: 'baz' + +.foo + .bar + content: 'baz' + + +// Ignore +li:nth-child(2n + 1) + content: 'foo' + +li::first-letter:nth-child(-2n + 1) + content: 'foo' + +// Ignore +.bar & + content: 'bar' diff --git a/node_modules/sass-lint/tests/sass/no-combinators.scss b/node_modules/sass-lint/tests/sass/no-combinators.scss new file mode 100644 index 0000000..592c7dc --- /dev/null +++ b/node_modules/sass-lint/tests/sass/no-combinators.scss @@ -0,0 +1,155 @@ +.foo > .bar { + content: 'foo'; +} + +.foo ~ .bar { + content: 'bar'; +} + +.foo + .bar { + content: 'baz'; +} + +.foo .bar { + content: 'qux'; +} + + +// No space +.foo>.bar { + content: 'foo'; +} + +.foo~.bar { + content: 'bar'; +} + +.foo+.bar { + content: 'baz'; +} + +// Ignore +.foo.bar { + content: 'qux'; +} + + +// Single interpolation +.foo > #{$bar} { + content: 'foo'; +} + +.foo ~ #{$bar} { + content: 'bar'; +} + +.foo + #{$bar} { + content: 'baz'; +} + +.foo #{$bar} { + content: 'qux'; +} + + +// Double interpolation +#{$foo} > #{$bar} { + content: 'foo'; +} + +#{$foo} ~ #{$bar} { + content: 'bar'; +} + +#{$foo} + #{$bar} { + content: 'baz'; +} + +#{$foo} #{$bar} { + content: 'qux'; +} + + +// Double nested interpolation +#{$foo} > { + #{$bar} { + content: 'foo'; + } +} + +#{$foo} ~ { + #{$bar} { + content: 'bar'; + } +} + +#{$foo} + { + #{$bar} { + content: 'baz'; + } +} + +#{$foo} { + #{$bar} { + content: 'qux'; + } +} + + +// Parent selector +&__bar { + content: 'bar'; +} + +.foo > { + .bar & { + content: 'foo'; + } +} + +.foo > { + &.bar { + content: 'foo'; + } +} + + +// Sassy nested combinators +.foo > { + .bar { + content: 'baz'; + } +} + +.foo ~ { + .bar { + content: 'baz'; + } +} + +.foo + { + .bar { + content: 'baz'; + } +} + +.foo { + .bar { + content: 'baz'; + } +} + + +// Ignore +li:nth-child(2n + 1) { + content: 'foo'; +} + +li::first-letter:nth-child(-2n + 1) { + content: 'foo'; +} + +// Ignore +.bar & { + content: 'bar'; +} diff --git a/node_modules/sass-lint/tests/sass/no-disallowed-properties.sass b/node_modules/sass-lint/tests/sass/no-disallowed-properties.sass new file mode 100644 index 0000000..18a7549 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/no-disallowed-properties.sass @@ -0,0 +1,25 @@ +.foo + z-index: 10 + display: block + .bar + .baz + z-index: 20 + +.test + @media (max-width: 100px) + z-index: 10 + +=test ($level) + z-index: $level + display: block + +@function myFunc($level) + @return $level * 2 + +.func-res + z-index: myFunc(10) + display: block + +interp + z-index: #{20} + display: block diff --git a/node_modules/sass-lint/tests/sass/no-disallowed-properties.scss b/node_modules/sass-lint/tests/sass/no-disallowed-properties.scss new file mode 100644 index 0000000..e91b226 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/no-disallowed-properties.scss @@ -0,0 +1,36 @@ +.foo { + z-index: 10; + display: block; + + .bar { + .baz { + z-index: 20; + } + } +} + +.test { + @media (max-width: 100px) { + z-index: 10; + } +} + +@mixin test ($level) { + z-index: $level; + display: block; +} + + +@function myFunc($level) { + @return $level * 2; +} + +.func-res { + z-index: myFunc(10); + display: block; +} + +interp { + z-index: #{20}; + display: block; +} diff --git a/node_modules/sass-lint/tests/sass/no-duplicate-properties.sass b/node_modules/sass-lint/tests/sass/no-duplicate-properties.sass index 1f3b4c5..20402c2 100644 --- a/node_modules/sass-lint/tests/sass/no-duplicate-properties.sass +++ b/node_modules/sass-lint/tests/sass/no-duplicate-properties.sass @@ -30,3 +30,18 @@ content: 'display' display: flex display: inline-block + +// issue #907 - interpolation/variable in property names +$paint-border-1: top +$paint-border-2: left + +.test + border: $size solid transparent + border-#{$paint-border-1}: $size solid $color + border-#{$paint-border-2}: $size solid $color + border-#{$paint-border-2}: $size solid $color + +// issue #935 - ignore variables ++foo + $i: 0 + $i: 1 diff --git a/node_modules/sass-lint/tests/sass/no-duplicate-properties.scss b/node_modules/sass-lint/tests/sass/no-duplicate-properties.scss index af11b69..8ee2b7c 100644 --- a/node_modules/sass-lint/tests/sass/no-duplicate-properties.scss +++ b/node_modules/sass-lint/tests/sass/no-duplicate-properties.scss @@ -37,3 +37,20 @@ display: inline-block; } + +// issue #907 - interpolation/variable in property names +$paint-border-1: top; +$paint-border-2: left; + +.test { + border: $size solid transparent; + border-#{$paint-border-1}: $size solid $color; + border-#{$paint-border-2}: $size solid $color; + border-#{$paint-border-2}: $size solid $color; +} + +// issue #935 - ignore variables +@mixin foo { + $i: 0; + $i: 1; +} diff --git a/node_modules/sass-lint/tests/sass/no-mergeable-selectors.sass b/node_modules/sass-lint/tests/sass/no-mergeable-selectors.sass index f17312b..04aad20 100644 --- a/node_modules/sass-lint/tests/sass/no-mergeable-selectors.sass +++ b/node_modules/sass-lint/tests/sass/no-mergeable-selectors.sass @@ -179,6 +179,20 @@ ul ~ p .bar content: '' +// Issue #834 - selectors/typeselectors not properly recognised +.fake-field + tbody + tr:nth-child(even) + background: lighten($theme-color-primary, 50%) + tr:nth-child(odd) + background: #FFFFFF + +.not-test + &:not(:first-child) + border-left: none + + &:not(:first-child) + border-left: 2px .bar @media (max-width: 40em) and (min-width: 20em) and (orientation: landscape) @@ -235,3 +249,5 @@ ul ~ p // // 100% // opacity: 1 + +// Issue #703 - Interpolation in selector - ignored in Sass syntax for now due to gonzales issue diff --git a/node_modules/sass-lint/tests/sass/no-mergeable-selectors.scss b/node_modules/sass-lint/tests/sass/no-mergeable-selectors.scss index 76ac5fd..335c888 100644 --- a/node_modules/sass-lint/tests/sass/no-mergeable-selectors.scss +++ b/node_modules/sass-lint/tests/sass/no-mergeable-selectors.scss @@ -282,21 +282,81 @@ ul ~ p { //keyframes should be ignored completely @include keyframes(fade-in) { - 0% { - opacity: 0; - } + 0% { + opacity: 0; + } - 100% { - opacity: 1; - } + 100% { + opacity: 1; + } } @include keyframes(fade-out) { - 0% { - opacity: 1; + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +} + +// Issue #703 - Interpolation in selector + +.navigation { + @media #{$media-query-lg-up} { + .nav-item { + display: inline-block; + } + } + @media #{$media-query-md-down} { + // should not merge with the media query above + .nav-item { + display: block; } + // should merge with the ruleset directly above + .nav-item { + color: $blue; + } + } +} - 100% { - opacity: 0; +// issue 826 - media queries with functions +@media(min-width: break('large')) { + .test { + float: left; + } +} + +@media(min-width: break('small')) { + .test { + float: left; + } +} + +@media(min-width: break('small')) { + .test { + float: none; + } +} + +// Issue #834 - selectors/typeselectors not properly recognised +.fake-field { + tbody { + tr:nth-child(even) { + background: lighten($theme-color-primary, 50%); + } + tr:nth-child(odd) { + background: #FFFFFF; } + } +} + +.pseudo-not { + &:not(:first-child) { + border-left: none; + } + &:not(:first-child) { + border-left: 2px; + } } diff --git a/node_modules/sass-lint/tests/sass/no-misspelled-properties.sass b/node_modules/sass-lint/tests/sass/no-misspelled-properties.sass index b9e454c..46544a2 100644 --- a/node_modules/sass-lint/tests/sass/no-misspelled-properties.sass +++ b/node_modules/sass-lint/tests/sass/no-misspelled-properties.sass @@ -20,3 +20,29 @@ $red: #ff0000 // https://github.com/sasstools/sass-lint/issues/606 .test-vendor -moz-osx-font-smoothing: auto + + +.foo + font: + family: fantasy + size: 12px + border: + top: + right: 1px solid #fff + left: + color: red + left: 2px solid #000 + +.bar + font: + famizy: fantasy + size: 12px + boder: + top: + rigt: 1px solid #fff + left: + color: red + left: 2px solid #000 + +.foo + margin-#{$property-y}: -2 * $hint-arrow-width diff --git a/node_modules/sass-lint/tests/sass/no-misspelled-properties.scss b/node_modules/sass-lint/tests/sass/no-misspelled-properties.scss index ac1b99c..330298f 100644 --- a/node_modules/sass-lint/tests/sass/no-misspelled-properties.scss +++ b/node_modules/sass-lint/tests/sass/no-misspelled-properties.scss @@ -26,3 +26,40 @@ $red: #ff0000; .test-vendor { -moz-osx-font-smoothing: auto; } + + +.foo { + font: { + family: fantasy; + size: 12px; + } + border: { + top: { + right: 1px solid #fff; + left: { + color: red; + } + } + left: 2px solid #000; + } +} + +.bar { + font: { + famizy: fantasy; + size: 12px; + } + boder: { + top: { + rigt: 1px solid #fff; + left: { + color: red; + } + } + left: 2px solid #000; + } +} + +.foo { + margin-#{$property-y}: -2 * $hint-arrow-width; +} diff --git a/node_modules/sass-lint/tests/sass/no-universal-selectors.sass b/node_modules/sass-lint/tests/sass/no-universal-selectors.sass new file mode 100644 index 0000000..fb1ea8b --- /dev/null +++ b/node_modules/sass-lint/tests/sass/no-universal-selectors.sass @@ -0,0 +1,15 @@ +* + content: 'foo' + +* [lang^=en] + content: 'bar' + +*.warning + content: 'baz' + +*#maincontent + content: 'qux' + +*:before, +*:after + content: 'nurf' diff --git a/node_modules/sass-lint/tests/sass/no-universal-selectors.scss b/node_modules/sass-lint/tests/sass/no-universal-selectors.scss new file mode 100644 index 0000000..91ecda2 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/no-universal-selectors.scss @@ -0,0 +1,20 @@ +* { + content: 'foo'; +} + +* [lang^=en] { + content: 'bar'; +} + +*.warning { + content: 'baz'; +} + +*#maincontent { + content: 'qux'; +} + +*:before, +*:after { + content: 'nurf'; +} diff --git a/node_modules/sass-lint/tests/sass/no-url-domains.sass b/node_modules/sass-lint/tests/sass/no-url-domains.sass new file mode 100644 index 0000000..21a1703 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/no-url-domains.sass @@ -0,0 +1,25 @@ +.foo + background-image: url('https://foo.com/img/bar.png') + + +.foo + background-image: url('http://foo.com/img/bar.png') + + +.foo + background-image: url('//foo.com/img/bar.png') + + +.foo + background-image: url('/img/bar.png') + + +.foo + background-image: url('img/bar.png') + + +.foo + background-image: url('bar.png') + +.foo + background-image: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7') diff --git a/node_modules/sass-lint/tests/sass/no-url-domains.scss b/node_modules/sass-lint/tests/sass/no-url-domains.scss new file mode 100644 index 0000000..98ba24c --- /dev/null +++ b/node_modules/sass-lint/tests/sass/no-url-domains.scss @@ -0,0 +1,27 @@ +.foo { + background-image: url('https://foo.com/img/bar.png'); +} + +.foo { + background-image: url('http://foo.com/img/bar.png'); +} + +.foo { + background-image: url('//foo.com/img/bar.png'); +} + +.foo { + background-image: url('/img/bar.png'); +} + +.foo { + background-image: url('img/bar.png'); +} + +.foo { + background-image: url('bar.png'); +} + +.foo { + background-image: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'); +} diff --git a/node_modules/sass-lint/tests/sass/no-vendor-prefixes.sass b/node_modules/sass-lint/tests/sass/no-vendor-prefixes.sass index 9c72206..337e4d5 100644 --- a/node_modules/sass-lint/tests/sass/no-vendor-prefixes.sass +++ b/node_modules/sass-lint/tests/sass/no-vendor-prefixes.sass @@ -21,3 +21,18 @@ .ms-block -ms-hyphenate-limit-lines: no-limit + +// Issue #705 - ignore non standard properties +html + -webkit-tap-highlight-color: $link-color-hover + +// Issue #702 - ignore non standard properties +button::-moz-focus-inner, +input::-moz-focus-inner + border: 0 + padding: 0 + +// Issue #702 - ignore non standard properties +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button + height: auto diff --git a/node_modules/sass-lint/tests/sass/no-vendor-prefixes.scss b/node_modules/sass-lint/tests/sass/no-vendor-prefixes.scss index af061db..8f0a763 100644 --- a/node_modules/sass-lint/tests/sass/no-vendor-prefixes.scss +++ b/node_modules/sass-lint/tests/sass/no-vendor-prefixes.scss @@ -21,3 +21,21 @@ .ms-block { -ms-hyphenate-limit-lines: no-limit; } + +// Issue #705 - ignore non standard properties +html { + -webkit-tap-highlight-color: $link-color-hover; +} + +// Issue #702 - ignore non standard properties +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +// Issue #702 - ignore non standard properties +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} diff --git a/node_modules/sass-lint/tests/sass/pseudo-element.sass b/node_modules/sass-lint/tests/sass/pseudo-element.sass new file mode 100644 index 0000000..c1b2f78 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/pseudo-element.sass @@ -0,0 +1,236 @@ +.right-element::after + content: "right-element" + +.right-element::before + content: "right-element" + +.right-element::first-letter + content: "right-element" + +.right-element::first-line + content: "right-element" + +.right-element::selection + content: "right-element" + +.right-element::backdrop + content: "right-element" + +.right-element::-ms-backdrop + content: "right-prefixed-element" + + +.wrong-element:after + content: "wrong-element" + +.wrong-element:before + content: "wrong-element" + +.wrong-element:first-letter + content: "wrong-element" + +.wrong-element:first-line + content: "wrong-element" + +.wrong-element:selection + content: "wrong-element" + +.wrong-element:backdrop + content: "wrong-element" + +.wrong-element:-ms-backdrop + content: "wrong-prefixed-element" + + +.right-selector:active + content: "right-selector" + +.right-selector:checked + content: "right-selector" + +.right-selector:disabled + content: "right-selector" + +.right-selector:empty + content: "right-selector" + +.right-selector:enabled + content: "right-selector" + +.right-selector:first-child + content: "right-selector" + +.right-selector:first-of-type + content: "right-selector" + +.right-selector:focus + content: "right-selector" + +.right-selector:hover + content: "right-selector" + +.right-selector:in-range + content: "right-selector" + +.right-selector:invalid + content: "right-selector" + +.right-selector:lang + content: "right-selector" + +.right-selector:last-child + content: "right-selector" + +.right-selector:last-of-type + content: "right-selector" + +.right-selector:link + content: "right-selector" + +.right-selector:not + content: "right-selector" + +.right-selector:nth-child + content: "right-selector" + +.right-selector:nth-last-child + content: "right-selector" + +.right-selector:nth-last-of-type + content: "right-selector" + +.right-selector:nth-of-type + content: "right-selector" + +.right-selector:only-of-type + content: "right-selector" + +.right-selector:only-child + content: "right-selector" + +.right-selector:optional + content: "right-selector" + +.right-selector:out-of-range + content: "right-selector" + +.right-selector:read-only + content: "right-selector" + +.right-selector:read-write + content: "right-selector" + +.right-selector:-moz-read-write + content: "right-prefixed-selector" + +.right-selector:required + content: "right-selector" + +.right-selector:root + content: "right-selector" + +.right-selector:target + content: "right-selector" + +.right-selector:valid + content: "right-selector" + +.right-selector:visited + content: "right-selector" + + +.wrong-selector::active + content: "wrong-selector" + +.wrong-selector::checked + content: "wrong-selector" + +.wrong-selector::disabled + content: "wrong-selector" + +.wrong-selector::empty + content: "wrong-selector" + +.wrong-selector::enabled + content: "wrong-selector" + +.wrong-selector::first-child + content: "wrong-selector" + +.wrong-selector::first-of-type + content: "wrong-selector" + +.wrong-selector::focus + content: "wrong-selector" + +.wrong-selector::hover + content: "wrong-selector" + +.wrong-selector::in-range + content: "wrong-selector" + +.wrong-selector::invalid + content: "wrong-selector" + +.wrong-selector::lang + content: "wrong-selector" + +.wrong-selector::last-child + content: "wrong-selector" + +.wrong-selector::last-of-type + content: "wrong-selector" + +.wrong-selector::link + content: "wrong-selector" + +.wrong-selector::not + content: "wrong-selector" + +.wrong-selector::nth-child + content: "wrong-selector" + +.wrong-selector::nth-last-child + content: "wrong-selector" + +.wrong-selector::nth-last-of-type + content: "wrong-selector" + +.wrong-selector::nth-of-type + content: "wrong-selector" + +.wrong-selector::only-of-type + content: "wrong-selector" + +.wrong-selector::only-child + content: "wrong-selector" + +.wrong-selector::optional + content: "wrong-selector" + +.wrong-selector::out-of-range + content: "wrong-selector" + +.wrong-selector::read-only + content: "wrong-selector" + +.wrong-selector::read-write + content: "wrong-selector" + +.wrong-selector::-moz-read-write + content: "wrong-prefixed-selector" + +.wrong-selector::required + content: "wrong-selector" + +.wrong-selector::root + content: "wrong-selector" + +.wrong-selector::target + content: "wrong-selector" + +.wrong-selector::valid + content: "wrong-selector" + +.wrong-selector::visited + content: "wrong-selector" diff --git a/node_modules/sass-lint/tests/sass/pseudo-element.scss b/node_modules/sass-lint/tests/sass/pseudo-element.scss new file mode 100644 index 0000000..cccebd5 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/pseudo-element.scss @@ -0,0 +1,238 @@ +.right-element::after { + content: "right-element"; +} +.right-element::before { + content: "right-element"; +} +.right-element::first-letter { + content: "right-element"; +} +.right-element::first-line { + content: "right-element"; +} +.right-element::selection { + content: "right-element"; +} +.right-element::backdrop { + content: "right-element"; +} +.right-element::-ms-backdrop { + content: "right-prefixed-element"; +} + + +.wrong-element:after { + content: "wrong-element"; +} +.wrong-element:before { + content: "wrong-element"; +} +.wrong-element:first-letter { + content: "wrong-element"; +} +.wrong-element:first-line { + content: "wrong-element"; +} +.wrong-element:selection { + content: "wrong-element"; +} +.wrong-element:backdrop { + content: "wrong-element"; +} +.wrong-element:-ms-backdrop { + content: "wrong-prefixed-element"; +} + +.right-selector:active { + content: "right-selector"; +} +.right-selector:checked { + content: "right-selector"; +} +.right-selector:disabled { + content: "right-selector"; +} +.right-selector:empty { + content: "right-selector"; +} +.right-selector:enabled { + content: "right-selector"; +} +.right-selector:first-child { + content: "right-selector"; +} +.right-selector:first-of-type { + content: "right-selector"; +} +.right-selector:focus { + content: "right-selector"; +} +.right-selector:hover { + content: "right-selector"; +} +.right-selector:in-range { + content: "right-selector"; +} +.right-selector:invalid { + content: "right-selector"; +} +.right-selector:lang { + content: "right-selector"; +} +.right-selector:last-child { + content: "right-selector"; +} +.right-selector:last-of-type { + content: "right-selector"; +} +.right-selector:link { + content: "right-selector"; +} +.right-selector:not { + content: "right-selector"; +} +.right-selector:nth-child { + content: "right-selector"; +} +.right-selector:nth-last-child { + content: "right-selector"; +} +.right-selector:nth-last-of-type { + content: "right-selector"; +} +.right-selector:nth-of-type { + content: "right-selector"; +} +.right-selector:only-of-type { + content: "right-selector"; +} +.right-selector:only-child { + content: "right-selector"; +} +.right-selector:optional { + content: "right-selector"; +} +.right-selector:out-of-range { + content: "right-selector"; +} +.right-selector:read-only { + content: "right-selector"; +} +.right-selector:read-write { + content: "right-selector"; +} +.right-selector:-moz-read-write { + content: "right-prefixed-selector"; +} +.right-selector:required { + content: "right-selector"; +} +.right-selector:root { + content: "right-selector"; +} +.right-selector:target { + content: "right-selector"; +} +.right-selector:valid { + content: "right-selector"; +} +.right-selector:visited { + content: "right-selector"; +} + +.wrong-selector::active { + content: "wrong-selector"; +} +.wrong-selector::checked { + content: "wrong-selector"; +} +.wrong-selector::disabled { + content: "wrong-selector"; +} +.wrong-selector::empty { + content: "wrong-selector"; +} +.wrong-selector::enabled { + content: "wrong-selector"; +} +.wrong-selector::first-child { + content: "wrong-selector"; +} +.wrong-selector::first-of-type { + content: "wrong-selector"; +} +.wrong-selector::focus { + content: "wrong-selector"; +} +.wrong-selector::hover { + content: "wrong-selector"; +} +.wrong-selector::in-range { + content: "wrong-selector"; +} +.wrong-selector::invalid { + content: "wrong-selector"; +} +.wrong-selector::lang { + content: "wrong-selector"; +} +.wrong-selector::last-child { + content: "wrong-selector"; +} +.wrong-selector::last-of-type { + content: "wrong-selector"; +} +.wrong-selector::link { + content: "wrong-selector"; +} +.wrong-selector::not { + content: "wrong-selector"; +} +.wrong-selector::nth-child { + content: "wrong-selector"; +} +.wrong-selector::nth-last-child { + content: "wrong-selector"; +} +.wrong-selector::nth-last-of-type { + content: "wrong-selector"; +} +.wrong-selector::nth-of-type { + content: "wrong-selector"; +} +.wrong-selector::only-of-type { + content: "wrong-selector"; +} +.wrong-selector::only-child { + content: "wrong-selector"; +} +.wrong-selector::optional { + content: "wrong-selector"; +} +.wrong-selector::out-of-range { + content: "wrong-selector"; +} +.wrong-selector::read-only { + content: "wrong-selector"; +} +.wrong-selector::read-write { + content: "wrong-selector"; +} +.wrong-selector::-moz-read-write { + content: "wrong-prefixed-selector"; +} +.wrong-selector::required { + content: "wrong-selector"; +} +.wrong-selector::root { + content: "wrong-selector"; +} +.wrong-selector::target { + content: "wrong-selector"; +} +.wrong-selector::valid { + content: "wrong-selector"; +} +.wrong-selector::visited { + content: "wrong-selector"; +} diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-disable-a-block.sass b/node_modules/sass-lint/tests/sass/ruleToggler-disable-a-block.sass new file mode 100644 index 0000000..79981c6 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-disable-a-block.sass @@ -0,0 +1,2 @@ +p + // sass-lint:disable-block a diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-disable-a-block.scss b/node_modules/sass-lint/tests/sass/ruleToggler-disable-a-block.scss new file mode 100644 index 0000000..8eddb3e --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-disable-a-block.scss @@ -0,0 +1,3 @@ +p { + // sass-lint:disable-block a +} diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-disable-a-line.sass b/node_modules/sass-lint/tests/sass/ruleToggler-disable-a-line.sass new file mode 100644 index 0000000..9c44919 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-disable-a-line.sass @@ -0,0 +1,2 @@ +p + border-color: red // sass-lint:disable-line a diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-disable-a-line.scss b/node_modules/sass-lint/tests/sass/ruleToggler-disable-a-line.scss new file mode 100644 index 0000000..7d6ca7c --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-disable-a-line.scss @@ -0,0 +1,3 @@ +p { + border-color: red; // sass-lint:disable-line a +} diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-disable-a-rule.sass b/node_modules/sass-lint/tests/sass/ruleToggler-disable-a-rule.sass new file mode 100644 index 0000000..5f04af3 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-disable-a-rule.sass @@ -0,0 +1 @@ +// sass-lint:disable a diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-disable-a-rule.scss b/node_modules/sass-lint/tests/sass/ruleToggler-disable-a-rule.scss new file mode 100644 index 0000000..5f04af3 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-disable-a-rule.scss @@ -0,0 +1 @@ +// sass-lint:disable a diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-disable-all-then-reenable.sass b/node_modules/sass-lint/tests/sass/ruleToggler-disable-all-then-reenable.sass new file mode 100644 index 0000000..63eeb62 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-disable-all-then-reenable.sass @@ -0,0 +1,3 @@ +// sass-lint:disable-all + +// sass-lint:enable-all diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-disable-all-then-reenable.scss b/node_modules/sass-lint/tests/sass/ruleToggler-disable-all-then-reenable.scss new file mode 100644 index 0000000..63eeb62 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-disable-all-then-reenable.scss @@ -0,0 +1,3 @@ +// sass-lint:disable-all + +// sass-lint:enable-all diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-disable-all.sass b/node_modules/sass-lint/tests/sass/ruleToggler-disable-all.sass new file mode 100644 index 0000000..1776554 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-disable-all.sass @@ -0,0 +1 @@ +// sass-lint:disable-all diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-disable-all.scss b/node_modules/sass-lint/tests/sass/ruleToggler-disable-all.scss new file mode 100644 index 0000000..1776554 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-disable-all.scss @@ -0,0 +1 @@ +// sass-lint:disable-all diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-disable-multiple-rules.sass b/node_modules/sass-lint/tests/sass/ruleToggler-disable-multiple-rules.sass new file mode 100644 index 0000000..8e44d37 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-disable-multiple-rules.sass @@ -0,0 +1 @@ +// sass-lint:disable a b, c d diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-disable-multiple-rules.scss b/node_modules/sass-lint/tests/sass/ruleToggler-disable-multiple-rules.scss new file mode 100644 index 0000000..8e44d37 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-disable-multiple-rules.scss @@ -0,0 +1 @@ +// sass-lint:disable a b, c d diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-disable-then-enable.sass b/node_modules/sass-lint/tests/sass/ruleToggler-disable-then-enable.sass new file mode 100644 index 0000000..5fdc7cf --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-disable-then-enable.sass @@ -0,0 +1,5 @@ +p + // sass-lint:disable a + border: none + // sass-lint:enable a + color: blue diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-disable-then-enable.scss b/node_modules/sass-lint/tests/sass/ruleToggler-disable-then-enable.scss new file mode 100644 index 0000000..44f55f6 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-disable-then-enable.scss @@ -0,0 +1,6 @@ +p { + // sass-lint:disable a + border: none; + // sass-lint:enable a + color: blue; +} diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-empty-comment.sass b/node_modules/sass-lint/tests/sass/ruleToggler-empty-comment.sass new file mode 100644 index 0000000..eea459d --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-empty-comment.sass @@ -0,0 +1,2 @@ +p + /**/ diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-empty-comment.scss b/node_modules/sass-lint/tests/sass/ruleToggler-empty-comment.scss new file mode 100644 index 0000000..1d7676a --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-empty-comment.scss @@ -0,0 +1,3 @@ +p { + /**/ +} \ No newline at end of file diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-guarantee-order.sass b/node_modules/sass-lint/tests/sass/ruleToggler-guarantee-order.sass new file mode 100644 index 0000000..62efa91 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-guarantee-order.sass @@ -0,0 +1,17 @@ +p + // sass-lint:disable a + border: 0 + // sass-lint:disable-block a + font-size: 100% + +a + // sass-lint:disable a + border: 0 + // sass-lint:disable-block a + font-size: 100% + +li + /* sass-lint:disable a + /* sass-lint:disable a + border: 0 + font-size: 100% diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-guarantee-order.scss b/node_modules/sass-lint/tests/sass/ruleToggler-guarantee-order.scss new file mode 100644 index 0000000..7c6d617 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-guarantee-order.scss @@ -0,0 +1,17 @@ +p { + // sass-lint:disable a + border: 0; + // sass-lint:disable-block a + font-size: 100%; +} + +a { // sass-lint:disable a + border: 0; + // sass-lint:disable-block a + font-size: 100%; +} + +li { /* sass-lint:disable a */ /* sass-lint:disable a */ + border: 0; + font-size: 100%; +} diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-ignore-unknown.sass b/node_modules/sass-lint/tests/sass/ruleToggler-ignore-unknown.sass new file mode 100644 index 0000000..7913ac8 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-ignore-unknown.sass @@ -0,0 +1,2 @@ +p + //sass-lint:random a diff --git a/node_modules/sass-lint/tests/sass/ruleToggler-ignore-unknown.scss b/node_modules/sass-lint/tests/sass/ruleToggler-ignore-unknown.scss new file mode 100644 index 0000000..698ec2e --- /dev/null +++ b/node_modules/sass-lint/tests/sass/ruleToggler-ignore-unknown.scss @@ -0,0 +1,3 @@ +p { + //sass-lint:random a +} \ No newline at end of file diff --git a/node_modules/sass-lint/tests/sass/selector-helpers/selector-helpers.scss b/node_modules/sass-lint/tests/sass/selector-helpers/selector-helpers.scss new file mode 100644 index 0000000..cd20633 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/selector-helpers/selector-helpers.scss @@ -0,0 +1,68 @@ +.test{ + color: red; +} + +#test{ + color: red; +} + +%test { + color: red; +} + +.#{test} { + color: red +} + +.test, #test { + color: red; +} + +input[type="text"] { + color: red; +} + +.test > li { + color: red; +} + +span[lang~=en-us] { + color: red; +} + +.block__element-one { + color: red; +} + +@media (max-width: 200px) { + color: red; +} + +##{$id} { + color: red; +} + +.right-element::-ms-backdrop { + content: "right-prefixed-element"; +} + +.wrong-element:selection { + content: "wrong-element"; +} + +p:nth-of-type(2) { + margin: 0; +} + +.test { + &__test { + color: red; + } +} + +tr:nth-child(even) { + background: lighten($theme-color-primary, 50%); +} +tr:nth-child(odd) { + background: #FFFFFF; +} diff --git a/node_modules/sass-lint/tests/sass/shorthand-values.sass b/node_modules/sass-lint/tests/sass/shorthand-values.sass index 4b75496..6e9dbff 100644 --- a/node_modules/sass-lint/tests/sass/shorthand-values.sass +++ b/node_modules/sass-lint/tests/sass/shorthand-values.sass @@ -5,6 +5,7 @@ border-width: inherit margin: 1rem padding: 1px + padding: ($gutter / 2); .value-two-ident border-color: red red @@ -13,6 +14,7 @@ border-width: inherit inherit margin: 1rem 1rem padding: 1px 1px + padding: ($gutter / 2) ($gutter / 2) .value-two-diff border-color: red blue @@ -21,6 +23,7 @@ border-width: inherit 2em margin: 1rem 2rem padding: 1px 2px + padding: ($gutter / 2) ($gutter / 3) .value-three-ident border-color: red red red @@ -29,6 +32,7 @@ border-width: inherit inherit inherit margin: 1rem 1rem 1rem padding: 1px 1px 1px + padding: ($gutter / 2) ($gutter / 2) ($gutter / 2) .value-three-diff-one border-color: blue red red @@ -37,6 +41,7 @@ border-width: 10px inherit inherit margin: 2rem 1rem 1rem padding: 2px 1px 1px + padding: ($gutter / 3) ($gutter / 2) ($gutter / 2) .value-three-diff-two border-color: red blue red @@ -45,6 +50,7 @@ border-width: inherit 10px inherit margin: 1rem 2rem 1rem padding: 1px 2px 1px + padding: ($gutter / 2) ($gutter / 3) ($gutter / 2) .value-three-diff-three border-color: red red blue @@ -53,6 +59,7 @@ border-width: inherit inherit 10px margin: 1rem 1rem 2rem padding: 1px 1px 2px + padding: ($gutter / 2) ($gutter / 2) ($gutter / 3) .value-three-diff-four border-color: red blue orange @@ -61,6 +68,7 @@ border-width: inherit 10px 20px margin: 1rem 2rem 3rem padding: 1px 2px 3px + padding: ($gutter / 2) ($gutter / 3) ($gutter / 4) .value-four-ident border-color: red red red red @@ -69,6 +77,7 @@ border-width: inherit inherit inherit inherit margin: 1rem 1rem 1rem 1rem padding: 1px 1px 1px 1px + padding: ($gutter / 2) ($gutter / 2) ($gutter / 2) ($gutter / 2) .value-four-diff-one border-color: blue red red red @@ -77,6 +86,7 @@ border-width: 10px inherit inherit inherit margin: 2rem 1rem 1rem 1rem padding: 2px 1px 1px 1px + padding: ($gutter / 3) ($gutter / 2) ($gutter / 2) ($gutter / 2) .value-four-diff-two border-color: red blue red red @@ -85,6 +95,7 @@ border-width: inherit 10px inherit inherit margin: 1rem 2rem 1rem 1rem padding: 1px 2px 1px 1px + padding: ($gutter / 2) ($gutter / 3) ($gutter / 2) ($gutter / 2) .value-four-diff-three border-color: red red blue red @@ -93,6 +104,7 @@ border-width: inherit inherit 10px inherit margin: 1rem 1rem 2rem 1rem padding: 1px 1px 2px 1px + padding: ($gutter / 2) ($gutter / 2) ($gutter / 3) ($gutter / 2) .value-four-diff-four border-color: red red red blue @@ -101,6 +113,7 @@ border-width: inherit inherit inherit 10px margin: 1rem 1rem 1rem 2rem padding: 1px 1px 1px 2px + padding: ($gutter / 2) ($gutter / 2) ($gutter / 2) ($gutter / 3) .value-four-diff-five border-color: red blue red blue @@ -109,6 +122,7 @@ border-width: inherit 10px inherit 10px margin: 1rem 2rem 1rem 2rem padding: 1px 2px 1px 2px + padding: ($gutter / 2) ($gutter / 3) ($gutter / 2) ($gutter / 3) .value-four-diff-six border-color: red blue orange green @@ -117,6 +131,7 @@ border-width: inherit 10px 20px 30px margin: 1rem 2rem 3rem 4rem padding: 1px 2px 3px 4px + padding: ($gutter / 2) ($gutter / 3) ($gutter / 4) ($gutter / 5) .value-four-ident border-color: $red $red $red $red @@ -131,45 +146,58 @@ border-width: none margin: 0 0px padding: 1px 0 + padding: ($gutter / 2) 0 .value-mixed border-color: $red 1px red 1rem border-radius: 1px 1pc 1rem border-style: $red red border-width: 1px 1pc + padding: ($gutter / 2) 1px .value-negative margin: -1px + padding: -($gutter / 2) .value-two-negative margin: -1px -1px + padding: -($gutter / 2) -($gutter / 2) .value-two-diff-negative margin: -1px 1px + padding: -($gutter / 2) ($gutter / 2) .value-three-diff-one-negative margin: -1px -2px -1px + padding: -($gutter / 2) -($gutter / 3) -($gutter / 2) .value-three-diff-two-negative margin: -1px -2px 1px + padding: -($gutter / 2) -($gutter / 3) ($gutter / 2) .value-four-negative margin: -1px -1px -1px -1px + padding: -($gutter / 2) -($gutter / 2) -($gutter / 2) -($gutter / 2) .value-four-diff-one-negative margin: -1px -1px -1px 1px + padding: -($gutter / 2) -($gutter / 2) -($gutter / 2) ($gutter / 2) .value-four-diff-two-negative margin: -1px 1px -1px 1px + padding: -($gutter / 2) ($gutter / 2) -($gutter / 2) ($gutter / 2) .value-four-diff-three-negative margin: -1px 1px 1px 1px + padding: -($gutter / 2) ($gutter / 2) ($gutter / 2) ($gutter / 2) .value-four-diff-four-negative margin: -1px 2px 3px -4px + padding: -($gutter / 2) ($gutter / 3) ($gutter / 4) -($gutter / 5) .value-four-diff-four-negative-mixed margin: -1px 1px -1rem -1rem + padding: -($gutter / 2) ($gutter / 2) -($gutter-ex / 2) -($gutter-ex / 2) .value-percentage margin: 1% @@ -203,3 +231,84 @@ .value-four-diff-four-percentage-mixed margin: -1% -1% -1rem -1rem + +.value-function + margin: calc(100% - 20%) + +.value-two-function + margin: calc(100% - 20%) calc(100% - 20%) + +.value-two-diff-function + margin: calc(100% - 20%) calc(100% + 20%) + +.value-three-diff-one-function + margin: calc(100% - 20%) calc(100% - 30%) calc(100% - 20%) + +.value-three-diff-two-function + margin: calc(100% - 20%) calc(100% - 30%) calc(100% - 10%) + +.value-four-function + margin: calc(100% - 20%) calc(100% - 20%) calc(100% - 20%) calc(100% - 20%) + +.value-four-diff-one-function + margin: calc(100% - 20%) calc(100% - 20%) calc(100% - 20%) calc(100% - 10%) + +.value-four-diff-two-function + margin: calc(100% - 20%) calc(100% - 10%) calc(100% - 20%) calc(100% - 10%) + +.value-four-diff-three-function + margin: calc(100% - 20%) calc(100% - 10%) calc(100% - 10%) calc(100% - 10%) + +.value-four-diff-four-function + margin: calc(100% - 20%) calc(100% + 20%) calc(100% + 30%) calc(100% - 40%) + +.value-four-diff-four-function-mixed + margin: calc(100% - 10%) calc(100% - 10%) calc(100px - 10px) calc(100px - 10px) + +.value-interp-function + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) + +.value-two-interp-function + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--regular}) + +.value-two-diff-interp-function + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} - #{$global-whitespace--regular}) + +.value-three-diff-one-interp-function + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--large}) calc(#{$doc-header-height} + #{$global-whitespace--regular}) + +.value-three-diff-two-interp-function + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--large}) calc(#{$doc-header-height} + #{$global-whitespace--small}) + +.value-four-interp-function + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--regular}) + +.value-four-diff-one-interp-function + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--large}) + +.value-four-diff-two-interp-function + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--large}) calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--large}) + +.value-four-diff-three-interp-function + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--large}) calc(#{$doc-header-height} + #{$global-whitespace--large}) calc(#{$doc-header-height} + #{$global-whitespace--large}) + +.value-four-diff-four-interp-function + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} - #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--large}) calc(#{$doc-header-height} + #{$global-whitespace--small}) + +.value-four-diff-four-interp-function-mixed + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} - #{$global-whitespace--regular}) calc(#{$doc-header-height} - #{$global-whitespace--regular}) + +// issue #772 - Issue with colours not being correctly interpreted +// should be ignored; +.test + border-color: transparent transparent transparent #095b97 + +.test + border-color: transparent #095b97 transparent #095b97 + +// Issue #847 - Ignoring function arguments +.foo + padding: 0 size('half-shim') 0 size('spacer') + +.foo + padding: 0 size('half-shim') 0 size('half-shim') diff --git a/node_modules/sass-lint/tests/sass/shorthand-values.scss b/node_modules/sass-lint/tests/sass/shorthand-values.scss index bf1bc69..54a422a 100644 --- a/node_modules/sass-lint/tests/sass/shorthand-values.scss +++ b/node_modules/sass-lint/tests/sass/shorthand-values.scss @@ -5,6 +5,7 @@ border-width: inherit; margin: 1rem; padding: 1px; + padding: ($gutter / 2); } .value-two-ident { @@ -14,6 +15,7 @@ border-width: inherit inherit; margin: 1rem 1rem; padding: 1px 1px; + padding: ($gutter / 2) ($gutter / 2); } .value-two-diff { @@ -23,6 +25,7 @@ border-width: inherit 2em; margin: 1rem 2rem; padding: 1px 2px; + padding: ($gutter / 2) ($gutter / 3); } .value-three-ident { @@ -32,6 +35,7 @@ border-width: inherit inherit inherit; margin: 1rem 1rem 1rem; padding: 1px 1px 1px; + padding: ($gutter / 2) ($gutter / 2) ($gutter / 2); } .value-three-diff-one { @@ -41,6 +45,7 @@ border-width: 10px inherit inherit; margin: 2rem 1rem 1rem; padding: 2px 1px 1px; + padding: ($gutter / 3) ($gutter / 2) ($gutter / 2); } .value-three-diff-two { @@ -50,6 +55,7 @@ border-width: inherit 10px inherit; margin: 1rem 2rem 1rem; padding: 1px 2px 1px; + padding: ($gutter / 2) ($gutter / 3) ($gutter / 2); } .value-three-diff-three { @@ -59,6 +65,7 @@ border-width: inherit inherit 10px; margin: 1rem 1rem 2rem; padding: 1px 1px 2px; + padding: ($gutter / 2) ($gutter / 2) ($gutter / 3); } .value-three-diff-four { @@ -68,6 +75,7 @@ border-width: inherit 10px 20px; margin: 1rem 2rem 3rem; padding: 1px 2px 3px; + padding: ($gutter / 2) ($gutter / 3) ($gutter / 4); } .value-four-ident { @@ -77,6 +85,7 @@ border-width: inherit inherit inherit inherit; margin: 1rem 1rem 1rem 1rem; padding: 1px 1px 1px 1px; + padding: ($gutter / 2) ($gutter / 2) ($gutter / 2) ($gutter / 2); } .value-four-diff-one { @@ -86,6 +95,7 @@ border-width: 10px inherit inherit inherit; margin: 2rem 1rem 1rem 1rem; padding: 2px 1px 1px 1px; + padding: ($gutter / 3) ($gutter / 2) ($gutter / 2) ($gutter / 2); } .value-four-diff-two { @@ -95,6 +105,7 @@ border-width: inherit 10px inherit inherit; margin: 1rem 2rem 1rem 1rem; padding: 1px 2px 1px 1px; + padding: ($gutter / 2) ($gutter / 3) ($gutter / 2) ($gutter / 2); } .value-four-diff-three { @@ -104,6 +115,7 @@ border-width: inherit inherit 10px inherit; margin: 1rem 1rem 2rem 1rem; padding: 1px 1px 2px 1px; + padding: ($gutter / 2) ($gutter / 2) ($gutter / 3) ($gutter / 2); } .value-four-diff-four { @@ -113,6 +125,7 @@ border-width: inherit inherit inherit 10px; margin: 1rem 1rem 1rem 2rem; padding: 1px 1px 1px 2px; + padding: ($gutter / 2) ($gutter / 2) ($gutter / 2) ($gutter / 3); } .value-four-diff-five { @@ -122,6 +135,7 @@ border-width: inherit 10px inherit 10px; margin: 1rem 2rem 1rem 2rem; padding: 1px 2px 1px 2px; + padding: ($gutter / 2) ($gutter / 3) ($gutter / 2) ($gutter / 3); } .value-four-diff-six { @@ -131,6 +145,7 @@ border-width: inherit 10px 20px 30px; margin: 1rem 2rem 3rem 4rem; padding: 1px 2px 3px 4px; + padding: ($gutter / 2) ($gutter / 3) ($gutter / 4) ($gutter / 5); } .value-four-ident { @@ -147,57 +162,70 @@ border-width: none; margin: 0 0px; padding: 1px 0; + padding: ($gutter / 2) 0; } .value-mixed { - border-color: $red 1px red 1rem; - border-radius: 1px 1pc 1rem; - border-style: $red red; - border-width: 1px 1pc; + border-color: $red 1px red 1rem; + border-radius: 1px 1pc 1rem; + border-style: $red red; + border-width: 1px 1pc; + padding: ($gutter / 2) 1px; } .value-negative { margin: -1px; + padding: -($gutter / 2); } .value-two-negative { margin: -1px -1px; + padding: -($gutter / 2) -($gutter / 2); } .value-two-diff-negative { margin: -1px 1px; + padding: -($gutter / 2) ($gutter / 2); } .value-three-diff-one-negative { margin: -1px -2px -1px; + padding: -($gutter / 2) -($gutter / 3) -($gutter / 2); } .value-three-diff-two-negative { margin: -1px -2px 1px; + padding: -($gutter / 2) -($gutter / 3) ($gutter / 2); } .value-four-negative { margin: -1px -1px -1px -1px; + padding: -($gutter / 2) -($gutter / 2) -($gutter / 2) -($gutter / 2); } .value-four-diff-one-negative { margin: -1px -1px -1px 1px; + padding: -($gutter / 2) -($gutter / 2) -($gutter / 2) ($gutter / 2); } .value-four-diff-two-negative { margin: -1px 1px -1px 1px; + padding: -($gutter / 2) ($gutter / 2) -($gutter / 2) ($gutter / 2); } .value-four-diff-three-negative { margin: -1px 1px 1px 1px; + padding: -($gutter / 2) ($gutter / 2) ($gutter / 2) ($gutter / 2); } .value-four-diff-four-negative { margin: -1px 2px 3px -4px; + padding: -($gutter / 2) ($gutter / 3) ($gutter / 4) -($gutter / 5); } .value-four-diff-four-negative-mixed { margin: -1px 1px -1rem -1rem; + padding: -($gutter / 2) ($gutter / 2) -($gutter-ex / 2) -($gutter-ex / 2); } .value-percentage { @@ -243,3 +271,110 @@ .value-four-diff-four-percentage-mixed { margin: -1% -1% -1rem -1rem; } + +.value-function { + margin: calc(100% - 20%); +} + +.value-two-function { + margin: calc(100% - 20%) calc(100% - 20%); +} + +.value-two-diff-function { + margin: calc(100% - 20%) calc(100% + 20%); +} + +.value-three-diff-one-function { + margin: calc(100% - 20%) calc(100% - 30%) calc(100% - 20%); +} + +.value-three-diff-two-function { + margin: calc(100% - 20%) calc(100% - 30%) calc(100% - 10%); +} + +.value-four-function { + margin: calc(100% - 20%) calc(100% - 20%) calc(100% - 20%) calc(100% - 20%); +} + +.value-four-diff-one-function { + margin: calc(100% - 20%) calc(100% - 20%) calc(100% - 20%) calc(100% - 10%); +} + +.value-four-diff-two-function { + margin: calc(100% - 20%) calc(100% - 10%) calc(100% - 20%) calc(100% - 10%); +} + +.value-four-diff-three-function { + margin: calc(100% - 20%) calc(100% - 10%) calc(100% - 10%) calc(100% - 10%); +} + +.value-four-diff-four-function { + margin: calc(100% - 20%) calc(100% + 20%) calc(100% + 30%) calc(100% - 40%); +} + +.value-four-diff-four-function-mixed { + margin: calc(100% - 10%) calc(100% - 10%) calc(100px - 10px) calc(100px - 10px); +} + +.value-interp-function { + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}); +} + +.value-two-interp-function { + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--regular}); +} + +.value-two-diff-interp-function { + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} - #{$global-whitespace--regular}); +} + +.value-three-diff-one-interp-function { + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--large}) calc(#{$doc-header-height} + #{$global-whitespace--regular}); +} + +.value-three-diff-two-interp-function { + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--large}) calc(#{$doc-header-height} + #{$global-whitespace--small}); +} + +.value-four-interp-function { + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--regular}); +} + +.value-four-diff-one-interp-function { + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--large}); +} + +.value-four-diff-two-interp-function { + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--large}) calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--large}); +} + +.value-four-diff-three-interp-function { + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--large}) calc(#{$doc-header-height} + #{$global-whitespace--large}) calc(#{$doc-header-height} + #{$global-whitespace--large}); +} + +.value-four-diff-four-interp-function { + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} - #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--large}) calc(#{$doc-header-height} + #{$global-whitespace--small}); +} + +.value-four-diff-four-interp-function-mixed { + margin: calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} + #{$global-whitespace--regular}) calc(#{$doc-header-height} - #{$global-whitespace--regular}) calc(#{$doc-header-height} - #{$global-whitespace--regular}); +} + +// issue #772 - Issue with colours not being correctly interpreted +// should be ignored; +.test { + border-color: transparent transparent transparent #095b97; +} + +.test { + border-color: transparent #095b97 transparent #095b97; +} + +// Issue #847 - Ignoring function arguments +.foo { + padding: 0 size('half-shim') 0 size('spacer'); +} + +.foo { + padding: 0 size('half-shim') 0 size('half-shim'); +} diff --git a/node_modules/sass-lint/tests/sass/single-line-per-selector.sass b/node_modules/sass-lint/tests/sass/single-line-per-selector.sass index 72210d7..f2b94b0 100644 --- a/node_modules/sass-lint/tests/sass/single-line-per-selector.sass +++ b/node_modules/sass-lint/tests/sass/single-line-per-selector.sass @@ -48,3 +48,12 @@ .foo .bar &, .baz & content: 'foo' + +// Issue #789 - Issue with comments being warned as selector content on single lines +button, +html, +html input[type='button'], // 6 +input[type='reset'], +input[type='submit'] + -webkit-appearance: button; // 7 + cursor: pointer; // 8 diff --git a/node_modules/sass-lint/tests/sass/single-line-per-selector.scss b/node_modules/sass-lint/tests/sass/single-line-per-selector.scss index 65ed18e..18fcb5d 100644 --- a/node_modules/sass-lint/tests/sass/single-line-per-selector.scss +++ b/node_modules/sass-lint/tests/sass/single-line-per-selector.scss @@ -54,3 +54,13 @@ content: 'foo'; } } + +// Issue #789 - Issue with comments being warned as selector content on single lines +button, +html, +html input[type='button'], // 6 +input[type='reset'], +input[type='submit'] { + -webkit-appearance: button; // 7 + cursor: pointer; // 8 +} diff --git a/node_modules/sass-lint/tests/sass/space-around-operator.sass b/node_modules/sass-lint/tests/sass/space-around-operator.sass index ef44fe6..f66d539 100644 --- a/node_modules/sass-lint/tests/sass/space-around-operator.sass +++ b/node_modules/sass-lint/tests/sass/space-around-operator.sass @@ -333,6 +333,9 @@ $qux: (2 +1) $foo: scale-color($foo, $lightness: -14%) +$foobar: #{$foo}-#{$bar} +$foobar: #{$foo}-4 + .foo top: -10px @@ -474,9 +477,8 @@ h1 unicode-range: U+26 unicode-range: U+0-7F unicode-range: U+0025-00FF - // TODO: Wildcard currently causes gonzales to fail - // unicode-range: U+4??; - // unicode-range: U+0025-00FF, U+4??; + unicode-range: U+4?? + unicode-range: U+0025-00FF, U+4?? // Negative numbers .foo @@ -484,3 +486,27 @@ h1 // Imports @import bar/foo + +@if -1 + $bar: 1 + +@if -$foo + $bar: 1 + +@if -#{$foo} + $bar: 1 + +@if -($foo * 2) + $bar: 1 + +@for $i from 0 through -1 + $bar: 1 + +@for $i from 0 through -$foo + $bar: 1 + +@for $i from 0 through -#{$foo} + $bar: 1 + +@for $i from 0 through -($foo * 2) + $bar: 1 diff --git a/node_modules/sass-lint/tests/sass/space-around-operator.scss b/node_modules/sass-lint/tests/sass/space-around-operator.scss index 550bb9d..342c197 100644 --- a/node_modules/sass-lint/tests/sass/space-around-operator.scss +++ b/node_modules/sass-lint/tests/sass/space-around-operator.scss @@ -345,6 +345,9 @@ $norf: (5 % 2); $foo: scale-color($foo, $lightness: -14%); +$foobar: #{$foo}-#{$bar}; +$foobar: #{$foo}-4; + .foo { top: -10px; } @@ -492,9 +495,8 @@ $norf: (5 % 2); unicode-range: U+26; unicode-range: U+0-7F; unicode-range: U+0025-00FF; - // TODO: Wildcard currently causes gonzales to fail - // unicode-range: U+4??; - // unicode-range: U+0025-00FF, U+4??; + unicode-range: U+4??; + unicode-range: U+0025-00FF, U+4??; } // Negative numbers @@ -504,3 +506,35 @@ $norf: (5 % 2); // Imports @import 'bar/foo'; + +@if -1 { + $bar: 1; +} + +@if -$foo { + $bar: 1; +} + +@if -#{$foo} { + $bar: 1; +} + +@if -($foo * 2) { + $bar: 1; +} + +@for $i from 0 through -1 { + $bar: 1; +} + +@for $i from 0 through -$foo { + $bar: 1; +} + +@for $i from 0 through -#{$foo} { + $bar: 1; +} + +@for $i from 0 through -($foo * 2) { + $bar: 1; +} diff --git a/node_modules/sass-lint/tests/sass/success.scss b/node_modules/sass-lint/tests/sass/success.scss new file mode 100644 index 0000000..ae771e4 --- /dev/null +++ b/node_modules/sass-lint/tests/sass/success.scss @@ -0,0 +1,3 @@ +.one { + margin-top: 0; +} diff --git a/node_modules/sass-lint/tests/sass/variable-for-property.sass b/node_modules/sass-lint/tests/sass/variable-for-property.sass index 66cfdf8..7804768 100644 --- a/node_modules/sass-lint/tests/sass/variable-for-property.sass +++ b/node_modules/sass-lint/tests/sass/variable-for-property.sass @@ -28,3 +28,10 @@ background: initial background: transparent background: none + +// Issue #714 - !important and spaces were classed as erroneous value types +.non-issue + color: $gray-chateau !important + +.issue + color: red !important diff --git a/node_modules/sass-lint/tests/sass/variable-for-property.scss b/node_modules/sass-lint/tests/sass/variable-for-property.scss index f72709a..b962177 100644 --- a/node_modules/sass-lint/tests/sass/variable-for-property.scss +++ b/node_modules/sass-lint/tests/sass/variable-for-property.scss @@ -30,3 +30,12 @@ background: transparent; background: none; } + +// Issue #714 - !important and spaces were classed as erroneous value types +.t-neutral { + color: $gray-chateau !important; +} + +.t-neutral { + color: red !important; +} diff --git a/node_modules/sass-lint/tests/sass/variable-name-format.sass b/node_modules/sass-lint/tests/sass/variable-name-format.sass index 3c3ce96..9738a0a 100644 --- a/node_modules/sass-lint/tests/sass/variable-name-format.sass +++ b/node_modules/sass-lint/tests/sass/variable-name-format.sass @@ -19,3 +19,7 @@ $_does_NOT-fitSTANDARD: 1 .class width: $snake_case + +// Issue #901 - operators not recognized as separate tokens by gonzales-pe +.content-main + padding: $mobile-site-gutter*1.5 diff --git a/node_modules/sass-lint/tests/sass/variable-name-format.scss b/node_modules/sass-lint/tests/sass/variable-name-format.scss index fd8df36..e04be3a 100644 --- a/node_modules/sass-lint/tests/sass/variable-name-format.scss +++ b/node_modules/sass-lint/tests/sass/variable-name-format.scss @@ -20,3 +20,8 @@ $_does_NOT-fitSTANDARD: 1; .class { width: $snake_case; } + +// Issue #901 - operators not recognized as separate tokens by gonzales-pe +.content-main { + padding: $mobile-site-gutter*1.5; +} diff --git a/node_modules/sass-lint/tests/selector-helpers/selectorHelpers.js b/node_modules/sass-lint/tests/selector-helpers/selectorHelpers.js new file mode 100644 index 0000000..23ffe73 --- /dev/null +++ b/node_modules/sass-lint/tests/selector-helpers/selectorHelpers.js @@ -0,0 +1,137 @@ +'use strict'; + +var assert = require('assert'), + selectorHelpers = require('../../lib/selector-helpers'), + groot = require('../../lib/groot'), + path = require('path'), + fs = require('fs'), + equal = require('deep-equal'); + +describe('selectorHelpers - constructSelector', function () { + + var expectedSelectors = [ + '.test', + '#test', + '%test', + '.#{test}', + '.test', + '#test', + 'input[type="text"]', + '.test > li', + 'span[lang~=en-us]', + '.block__element-one', + '##{$id}', + '.right-element::-ms-backdrop', + '.wrong-element:selection', + 'p:nth-of-type(2)', + '.test', + '&__test', + 'tr:nth-child(even)', + 'even', + 'tr:nth-child(odd)', + 'odd' + ], + selectorList = []; + + before(function () { + var file = '../sass/selector-helpers/selector-helpers.scss', + ast = groot(fs.readFileSync(path.join(__dirname, file)), path.extname(file).replace('.', ''), file); + + ast.traverseByType('selector', function (value) { + var ruleSet = ''; + value.forEach(function (selectorContent) { + ruleSet += selectorHelpers.constructSelector(selectorContent); + }); + selectorList.push(ruleSet); + }); + }); + + ////////////////////////////// + // contructSelector + ////////////////////////////// + + // .test + it('should return the correct class name', function (done) { + assert(equal(selectorList[0], expectedSelectors[0])); + done(); + }); + + // #test + it('should return the correct ID name', function (done) { + assert(equal(selectorList[1], expectedSelectors[1])); + done(); + }); + + // %test + it('should return the correct placeholder name', function (done) { + assert(equal(selectorList[2], expectedSelectors[2])); + done(); + }); + + // .#{test} + it('should return the correct interpolated selector name', function (done) { + assert(equal(selectorList[3], expectedSelectors[3])); + done(); + }); + + // input[type="text"] + it('should return the correct type selector name', function (done) { + assert(equal(selectorList[6], expectedSelectors[6])); + done(); + }); + + // .test > li + it('should return the correct combinator selector name', function (done) { + assert(equal(selectorList[7], expectedSelectors[7])); + done(); + }); + + // span[lang~=en-us] + it('should return the correct attribute selector name', function (done) { + assert(equal(selectorList[8], expectedSelectors[8])); + done(); + }); + + // .block__element-one + it('should return the correct BEM selector name', function (done) { + assert(equal(selectorList[9], expectedSelectors[9])); + done(); + }); + + // ##{$id} + it('should return the correct interpolated ID selector name', function (done) { + assert(equal(selectorList[10], expectedSelectors[10])); + done(); + }); + + // .right-element::-ms-backdrop + it('should return the correct pseudo element selector name', function (done) { + assert(equal(selectorList[11], expectedSelectors[11])); + done(); + }); + + // .wrong-element:selection + it('should return the correct pseudo selector name', function (done) { + assert(equal(selectorList[12], expectedSelectors[12])); + done(); + }); + + // p:nth-of-type(2) + it('should return the correct nth selector name', function (done) { + assert(equal(selectorList[13], expectedSelectors[13])); + done(); + }); + + // &__test + it('should return the correct parent selector name', function (done) { + assert(equal(selectorList[15], expectedSelectors[15])); + done(); + }); + + // tr:nth-child(even) + it('should return the correct nth selector and typeselector', function (done) { + assert(equal(selectorList[16], expectedSelectors[16])); + done(); + }); + +}); diff --git a/node_modules/sass-lint/tests/yml/.blank.yml b/node_modules/sass-lint/tests/yml/.blank.yml new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/sass-lint/tests/yml/.extend-a1.yml b/node_modules/sass-lint/tests/yml/.extend-a1.yml new file mode 100644 index 0000000..e7a8daa --- /dev/null +++ b/node_modules/sass-lint/tests/yml/.extend-a1.yml @@ -0,0 +1,4 @@ +options: + config-file: extend/.extend-c.yml +rules: + no-ids: 2 diff --git a/node_modules/sass-lint/tests/yml/.extend-a2.yml b/node_modules/sass-lint/tests/yml/.extend-a2.yml new file mode 100644 index 0000000..956c173 --- /dev/null +++ b/node_modules/sass-lint/tests/yml/.extend-a2.yml @@ -0,0 +1,4 @@ +options: + config-file: extend/.extend-b.yml +rules: + no-ids: 2 diff --git a/node_modules/sass-lint/tests/yml/.ignore-file.yml b/node_modules/sass-lint/tests/yml/.ignore-file.yml new file mode 100644 index 0000000..4ece16d --- /dev/null +++ b/node_modules/sass-lint/tests/yml/.ignore-file.yml @@ -0,0 +1,9 @@ +options: + formatter: stylish + cache-config: false + merge-default-rules: false +files: + include: '**/*.s+(a|c)ss' + ignore: '**/cli.scss' +rules: + no-color-literals: 1 diff --git a/node_modules/sass-lint/tests/yml/.indentation-error.yml b/node_modules/sass-lint/tests/yml/.indentation-error.yml new file mode 100644 index 0000000..57dbbfe --- /dev/null +++ b/node_modules/sass-lint/tests/yml/.indentation-error.yml @@ -0,0 +1,2 @@ +rules: + indentation: 2 diff --git a/node_modules/sass-lint/tests/yml/.indentation-warn.yml b/node_modules/sass-lint/tests/yml/.indentation-warn.yml new file mode 100644 index 0000000..71a1f08 --- /dev/null +++ b/node_modules/sass-lint/tests/yml/.indentation-warn.yml @@ -0,0 +1,2 @@ +rules: + indentation: 1 diff --git a/node_modules/sass-lint/tests/yml/.max-0-warnings.yml b/node_modules/sass-lint/tests/yml/.max-0-warnings.yml new file mode 100644 index 0000000..0a3dc12 --- /dev/null +++ b/node_modules/sass-lint/tests/yml/.max-0-warnings.yml @@ -0,0 +1,2 @@ +options: + max-warnings: 0 diff --git a/node_modules/sass-lint/tests/yml/.max-10-warnings.yml b/node_modules/sass-lint/tests/yml/.max-10-warnings.yml new file mode 100644 index 0000000..85b0f1c --- /dev/null +++ b/node_modules/sass-lint/tests/yml/.max-10-warnings.yml @@ -0,0 +1,2 @@ +options: + max-warnings: 10 diff --git a/node_modules/sass-lint/tests/yml/.max-100-warnings.yml b/node_modules/sass-lint/tests/yml/.max-100-warnings.yml new file mode 100644 index 0000000..759639a --- /dev/null +++ b/node_modules/sass-lint/tests/yml/.max-100-warnings.yml @@ -0,0 +1,2 @@ +options: + max-warnings: 100 diff --git a/node_modules/sass-lint/tests/yml/.multiple-ignore-strings.yml b/node_modules/sass-lint/tests/yml/.multiple-ignore-strings.yml new file mode 100644 index 0000000..1fb0a5f --- /dev/null +++ b/node_modules/sass-lint/tests/yml/.multiple-ignore-strings.yml @@ -0,0 +1,60 @@ +options: + formatter: stylish + cache-config: false + merge-default-rules: false +files: + include: 'tests/cli/cli-error.sass' + ignore: 'tests/cli/cli-error.sass' +rules: + # Extends + extends-before-mixins: 0 + extends-before-declarations: 0 + placeholder-in-extend: 0 + + # Mixins + mixins-before-declarations: 0 + + # Line Spacing + one-declaration-per-line: 0 + empty-line-between-blocks: 0 + single-line-per-selector: 0 + + # Disallows + no-debug: 0 + no-duplicate-properties: 0 + no-empty-rulesets: 0 + no-extends: 0 + no-ids: 1 + no-important: 0 + no-warn: 0 + no-color-keywords: 0 + no-invalid-hex: 0 + no-css-comments: 0 + no-color-literals: 0 + + # Style Guide + border-zero: 0 + clean-import-paths: 0 + empty-args: 0 + hex-length: 0 + hex-notation: 0 + indentation: 0 + leading-zero: 0 + nesting-depth: 0 + property-sort-order: 0 + quotes: 0 + variable-for-property: 0 + zero-unit: 0 + + # Inner Spacing + space-after-comma: 0 + space-before-colon: 0 + space-after-colon: 0 + space-before-brace: 0 + space-before-bang: 0 + space-after-bang: 0 + space-between-parens: 0 + + # Final Items + trailing-semicolon: 0 + final-newline: 0 diff --git a/node_modules/sass-lint/tests/yml/.multiple-ignores.yml b/node_modules/sass-lint/tests/yml/.multiple-ignores.yml new file mode 100644 index 0000000..310a007 --- /dev/null +++ b/node_modules/sass-lint/tests/yml/.multiple-ignores.yml @@ -0,0 +1,64 @@ +options: + formatter: stylish + cache-config: false + merge-default-rules: false +files: + include: + - 'tests/cli/cli-error.sass' + - 'tests/cli/cli-error.scss' + ignore: + - 'tests/cli/cli-error.sass' + - 'tests/cli/cli-error.scss' +rules: + # Extends + extends-before-mixins: 0 + extends-before-declarations: 0 + placeholder-in-extend: 0 + + # Mixins + mixins-before-declarations: 0 + + # Line Spacing + one-declaration-per-line: 0 + empty-line-between-blocks: 0 + single-line-per-selector: 0 + + # Disallows + no-debug: 0 + no-duplicate-properties: 0 + no-empty-rulesets: 0 + no-extends: 0 + no-ids: 1 + no-important: 0 + no-warn: 0 + no-color-keywords: 0 + no-invalid-hex: 0 + no-css-comments: 0 + no-color-literals: 0 + + # Style Guide + border-zero: 0 + clean-import-paths: 0 + empty-args: 0 + hex-length: 0 + hex-notation: 0 + indentation: 0 + leading-zero: 0 + nesting-depth: 0 + property-sort-order: 0 + quotes: 0 + variable-for-property: 0 + zero-unit: 0 + + # Inner Spacing + space-after-comma: 0 + space-before-colon: 0 + space-after-colon: 0 + space-before-brace: 0 + space-before-bang: 0 + space-after-bang: 0 + space-between-parens: 0 + + # Final Items + trailing-semicolon: 0 + final-newline: 0 diff --git a/node_modules/sass-lint/tests/yml/.multiple-inputs.yml b/node_modules/sass-lint/tests/yml/.multiple-inputs.yml new file mode 100644 index 0000000..d6162ba --- /dev/null +++ b/node_modules/sass-lint/tests/yml/.multiple-inputs.yml @@ -0,0 +1,61 @@ +options: + formatter: stylish + cache-config: false + merge-default-rules: false +files: + include: + - 'tests/cli/cli-error.sass' + - 'tests/cli/cli-error.scss' +rules: + # Extends + extends-before-mixins: 0 + extends-before-declarations: 0 + placeholder-in-extend: 0 + + # Mixins + mixins-before-declarations: 0 + + # Line Spacing + one-declaration-per-line: 0 + empty-line-between-blocks: 0 + single-line-per-selector: 0 + + # Disallows + no-debug: 0 + no-duplicate-properties: 0 + no-empty-rulesets: 0 + no-extends: 0 + no-ids: 1 + no-important: 0 + no-warn: 0 + no-color-keywords: 0 + no-invalid-hex: 0 + no-css-comments: 0 + no-color-literals: 0 + + # Style Guide + border-zero: 0 + clean-import-paths: 0 + empty-args: 0 + hex-length: 0 + hex-notation: 0 + indentation: 0 + leading-zero: 0 + nesting-depth: 0 + property-sort-order: 0 + quotes: 0 + variable-for-property: 0 + zero-unit: 0 + + # Inner Spacing + space-after-comma: 0 + space-before-colon: 0 + space-after-colon: 0 + space-before-brace: 0 + space-before-bang: 0 + space-after-bang: 0 + space-between-parens: 0 + + # Final Items + trailing-semicolon: 0 + final-newline: 0 diff --git a/node_modules/sass-lint/tests/yml/.single-input-include-string.yml b/node_modules/sass-lint/tests/yml/.single-input-include-string.yml new file mode 100644 index 0000000..57693d3 --- /dev/null +++ b/node_modules/sass-lint/tests/yml/.single-input-include-string.yml @@ -0,0 +1,59 @@ +options: + formatter: stylish + cache-config: false + merge-default-rules: false +files: + include: 'tests/cli/cli-error.sass' +rules: + # Extends + extends-before-mixins: 0 + extends-before-declarations: 0 + placeholder-in-extend: 0 + + # Mixins + mixins-before-declarations: 0 + + # Line Spacing + one-declaration-per-line: 0 + empty-line-between-blocks: 0 + single-line-per-selector: 0 + + # Disallows + no-debug: 0 + no-duplicate-properties: 0 + no-empty-rulesets: 0 + no-extends: 0 + no-ids: 1 + no-important: 0 + no-warn: 0 + no-color-keywords: 0 + no-invalid-hex: 0 + no-css-comments: 0 + no-color-literals: 0 + + # Style Guide + border-zero: 0 + clean-import-paths: 0 + empty-args: 0 + hex-length: 0 + hex-notation: 0 + indentation: 0 + leading-zero: 0 + nesting-depth: 0 + property-sort-order: 0 + quotes: 0 + variable-for-property: 0 + zero-unit: 0 + + # Inner Spacing + space-after-comma: 0 + space-before-colon: 0 + space-after-colon: 0 + space-before-brace: 0 + space-before-bang: 0 + space-after-bang: 0 + space-between-parens: 0 + + # Final Items + trailing-semicolon: 0 + final-newline: 0 diff --git a/node_modules/sass-lint/tests/yml/extend/.extend-b.yml b/node_modules/sass-lint/tests/yml/extend/.extend-b.yml new file mode 100644 index 0000000..0a6dcbd --- /dev/null +++ b/node_modules/sass-lint/tests/yml/extend/.extend-b.yml @@ -0,0 +1,5 @@ +options: + config-file: .extend-c.yml +rules: + no-ids: 0 + no-mergeable-selectors: 2 diff --git a/node_modules/sass-lint/tests/yml/extend/.extend-c.yml b/node_modules/sass-lint/tests/yml/extend/.extend-c.yml new file mode 100644 index 0000000..96afb74 --- /dev/null +++ b/node_modules/sass-lint/tests/yml/extend/.extend-c.yml @@ -0,0 +1,3 @@ +rules: + no-ids: 1 + no-important: 2 diff --git a/node_modules/sass-lint/tests/yml/extend/find-file-test/.npmignore b/node_modules/sass-lint/tests/yml/extend/find-file-test/.npmignore new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/shelljs/.idea/.name b/node_modules/shelljs/.idea/.name deleted file mode 100644 index 68840c9..0000000 --- a/node_modules/shelljs/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -shelljs \ No newline at end of file diff --git a/node_modules/shelljs/.idea/encodings.xml b/node_modules/shelljs/.idea/encodings.xml deleted file mode 100644 index 97626ba..0000000 --- a/node_modules/shelljs/.idea/encodings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/node_modules/shelljs/.idea/inspectionProfiles/Project_Default.xml b/node_modules/shelljs/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index e6d8387..0000000 --- a/node_modules/shelljs/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - \ No newline at end of file diff --git a/node_modules/shelljs/.idea/inspectionProfiles/profiles_settings.xml b/node_modules/shelljs/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 3b31283..0000000 --- a/node_modules/shelljs/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - \ No newline at end of file diff --git a/node_modules/shelljs/.idea/jsLibraryMappings.xml b/node_modules/shelljs/.idea/jsLibraryMappings.xml deleted file mode 100644 index 40bdc77..0000000 --- a/node_modules/shelljs/.idea/jsLibraryMappings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/node_modules/shelljs/.idea/libraries/shelljs_node_modules.xml b/node_modules/shelljs/.idea/libraries/shelljs_node_modules.xml deleted file mode 100644 index b1e5dce..0000000 --- a/node_modules/shelljs/.idea/libraries/shelljs_node_modules.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/node_modules/shelljs/.idea/misc.xml b/node_modules/shelljs/.idea/misc.xml deleted file mode 100644 index f524616..0000000 --- a/node_modules/shelljs/.idea/misc.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/node_modules/shelljs/.idea/modules.xml b/node_modules/shelljs/.idea/modules.xml deleted file mode 100644 index 26f2275..0000000 --- a/node_modules/shelljs/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/node_modules/shelljs/.idea/shelljs.iml b/node_modules/shelljs/.idea/shelljs.iml deleted file mode 100644 index 89f6e57..0000000 --- a/node_modules/shelljs/.idea/shelljs.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/node_modules/shelljs/.idea/vcs.xml b/node_modules/shelljs/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/node_modules/shelljs/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/node_modules/shelljs/.idea/workspace.xml b/node_modules/shelljs/.idea/workspace.xml deleted file mode 100644 index 9247ca4..0000000 --- a/node_modules/shelljs/.idea/workspace.xml +++ /dev/null @@ -1,764 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $PROJECT_DIR$ - true - - bdd - - DIRECTORY - - false - - - - - - - - - - - 1453951651105 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/node_modules/shelljs/build/output.js b/node_modules/shelljs/build/output.js deleted file mode 100644 index 1b778b9..0000000 --- a/node_modules/shelljs/build/output.js +++ /dev/null @@ -1,2411 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); - -//@ -//@ ### cat(file [, file ...]) -//@ ### cat(file_array) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ var str = cat('file*.txt'); -//@ var str = cat('file1', 'file2'); -//@ var str = cat(['file1', 'file2']); // same as above -//@ ``` -//@ -//@ Returns a string containing the given file, or a concatenated string -//@ containing the files if more than one file is given (a new line character is -//@ introduced between each file). Wildcard `*` accepted. -function _cat(options, files) { - var cat = ''; - - if (!files) - common.error('no paths given'); - - if (typeof files === 'string') - files = [].slice.call(arguments, 1); - // if it's array leave it as it is - - files = common.expand(files); - - files.forEach(function(file) { - if (!fs.existsSync(file)) - common.error('no such file or directory: ' + file); - - cat += fs.readFileSync(file, 'utf8'); - }); - - return common.ShellString(cat); -} -module.exports = _cat; - -var fs = require('fs'); -var common = require('./common'); - -//@ -//@ ### cd([dir]) -//@ Changes to directory `dir` for the duration of the script. Changes to home -//@ directory if no argument is supplied. -function _cd(options, dir) { - if (!dir) - dir = common.getUserHome(); - - if (dir === '-') { - if (!common.state.previousDir) - common.error('could not find previous directory'); - else - dir = common.state.previousDir; - } - - if (!fs.existsSync(dir)) - common.error('no such file or directory: ' + dir); - - if (!fs.statSync(dir).isDirectory()) - common.error('not a directory: ' + dir); - - common.state.previousDir = process.cwd(); - process.chdir(dir); -} -module.exports = _cd; - -var common = require('./common'); -var fs = require('fs'); -var path = require('path'); - -var PERMS = (function (base) { - return { - OTHER_EXEC : base.EXEC, - OTHER_WRITE : base.WRITE, - OTHER_READ : base.READ, - - GROUP_EXEC : base.EXEC << 3, - GROUP_WRITE : base.WRITE << 3, - GROUP_READ : base.READ << 3, - - OWNER_EXEC : base.EXEC << 6, - OWNER_WRITE : base.WRITE << 6, - OWNER_READ : base.READ << 6, - - // Literal octal numbers are apparently not allowed in "strict" javascript. Using parseInt is - // the preferred way, else a jshint warning is thrown. - STICKY : parseInt('01000', 8), - SETGID : parseInt('02000', 8), - SETUID : parseInt('04000', 8), - - TYPE_MASK : parseInt('0770000', 8) - }; -})({ - EXEC : 1, - WRITE : 2, - READ : 4 -}); - -//@ -//@ ### chmod(octal_mode || octal_string, file) -//@ ### chmod(symbolic_mode, file) -//@ -//@ Available options: -//@ -//@ + `-v`: output a diagnostic for every file processed//@ -//@ + `-c`: like verbose but report only when a change is made//@ -//@ + `-R`: change files and directories recursively//@ -//@ -//@ Examples: -//@ -//@ ```javascript -//@ chmod(755, '/Users/brandon'); -//@ chmod('755', '/Users/brandon'); // same as above -//@ chmod('u+x', '/Users/brandon'); -//@ ``` -//@ -//@ Alters the permissions of a file or directory by either specifying the -//@ absolute permissions in octal form or expressing the changes in symbols. -//@ This command tries to mimic the POSIX behavior as much as possible. -//@ Notable exceptions: -//@ -//@ + In symbolic modes, 'a-r' and '-r' are identical. No consideration is -//@ given to the umask. -//@ + There is no "quiet" option since default behavior is to run silent. -function _chmod(options, mode, filePattern) { - if (!filePattern) { - if (options.length > 0 && options.charAt(0) === '-') { - // Special case where the specified file permissions started with - to subtract perms, which - // get picked up by the option parser as command flags. - // If we are down by one argument and options starts with -, shift everything over. - filePattern = mode; - mode = options; - options = ''; - } - else { - common.error('You must specify a file.'); - } - } - - options = common.parseOptions(options, { - 'R': 'recursive', - 'c': 'changes', - 'v': 'verbose' - }); - - if (typeof filePattern === 'string') { - filePattern = [ filePattern ]; - } - - var files; - - if (options.recursive) { - files = []; - common.expand(filePattern).forEach(function addFile(expandedFile) { - var stat = fs.lstatSync(expandedFile); - - if (!stat.isSymbolicLink()) { - files.push(expandedFile); - - if (stat.isDirectory()) { // intentionally does not follow symlinks. - fs.readdirSync(expandedFile).forEach(function (child) { - addFile(expandedFile + '/' + child); - }); - } - } - }); - } - else { - files = common.expand(filePattern); - } - - files.forEach(function innerChmod(file) { - file = path.resolve(file); - if (!fs.existsSync(file)) { - common.error('File not found: ' + file); - } - - // When recursing, don't follow symlinks. - if (options.recursive && fs.lstatSync(file).isSymbolicLink()) { - return; - } - - var stat = fs.statSync(file); - var isDir = stat.isDirectory(); - var perms = stat.mode; - var type = perms & PERMS.TYPE_MASK; - - var newPerms = perms; - - if (isNaN(parseInt(mode, 8))) { - // parse options - mode.split(',').forEach(function (symbolicMode) { - /*jshint regexdash:true */ - var pattern = /([ugoa]*)([=\+-])([rwxXst]*)/i; - var matches = pattern.exec(symbolicMode); - - if (matches) { - var applyTo = matches[1]; - var operator = matches[2]; - var change = matches[3]; - - var changeOwner = applyTo.indexOf('u') != -1 || applyTo === 'a' || applyTo === ''; - var changeGroup = applyTo.indexOf('g') != -1 || applyTo === 'a' || applyTo === ''; - var changeOther = applyTo.indexOf('o') != -1 || applyTo === 'a' || applyTo === ''; - - var changeRead = change.indexOf('r') != -1; - var changeWrite = change.indexOf('w') != -1; - var changeExec = change.indexOf('x') != -1; - var changeExecDir = change.indexOf('X') != -1; - var changeSticky = change.indexOf('t') != -1; - var changeSetuid = change.indexOf('s') != -1; - - if (changeExecDir && isDir) - changeExec = true; - - var mask = 0; - if (changeOwner) { - mask |= (changeRead ? PERMS.OWNER_READ : 0) + (changeWrite ? PERMS.OWNER_WRITE : 0) + (changeExec ? PERMS.OWNER_EXEC : 0) + (changeSetuid ? PERMS.SETUID : 0); - } - if (changeGroup) { - mask |= (changeRead ? PERMS.GROUP_READ : 0) + (changeWrite ? PERMS.GROUP_WRITE : 0) + (changeExec ? PERMS.GROUP_EXEC : 0) + (changeSetuid ? PERMS.SETGID : 0); - } - if (changeOther) { - mask |= (changeRead ? PERMS.OTHER_READ : 0) + (changeWrite ? PERMS.OTHER_WRITE : 0) + (changeExec ? PERMS.OTHER_EXEC : 0); - } - - // Sticky bit is special - it's not tied to user, group or other. - if (changeSticky) { - mask |= PERMS.STICKY; - } - - switch (operator) { - case '+': - newPerms |= mask; - break; - - case '-': - newPerms &= ~mask; - break; - - case '=': - newPerms = type + mask; - - // According to POSIX, when using = to explicitly set the permissions, setuid and setgid can never be cleared. - if (fs.statSync(file).isDirectory()) { - newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; - } - break; - } - - if (options.verbose) { - console.log(file + ' -> ' + newPerms.toString(8)); - } - - if (perms != newPerms) { - if (!options.verbose && options.changes) { - console.log(file + ' -> ' + newPerms.toString(8)); - } - fs.chmodSync(file, newPerms); - perms = newPerms; // for the next round of changes! - } - } - else { - common.error('Invalid symbolic mode change: ' + symbolicMode); - } - }); - } - else { - // they gave us a full number - newPerms = type + parseInt(mode, 8); - - // POSIX rules are that setuid and setgid can only be added using numeric form, but not cleared. - if (fs.statSync(file).isDirectory()) { - newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; - } - - fs.chmodSync(file, newPerms); - } - }); -} -module.exports = _chmod; - -var os = require('os'); -var fs = require('fs'); -var _ls = require('./ls'); - -// Module globals -var config = { - silent: false, - fatal: false, - verbose: false, -}; -exports.config = config; - -var state = { - error: null, - currentCmd: 'shell.js', - previousDir: null, - tempDir: null -}; -exports.state = state; - -var platform = os.type().match(/^Win/) ? 'win' : 'unix'; -exports.platform = platform; - -function log() { - if (!config.silent) - console.error.apply(console, arguments); -} -exports.log = log; - -// Shows error message. Throws unless _continue or config.fatal are true -function error(msg, _continue) { - if (state.error === null) - state.error = ''; - var log_entry = state.currentCmd + ': ' + msg; - if (state.error === '') - state.error = log_entry; - else - state.error += '\n' + log_entry; - - if (msg.length > 0) - log(log_entry); - - if (config.fatal) - process.exit(1); - - if (!_continue) - throw ''; -} -exports.error = error; - -// In the future, when Proxies are default, we can add methods like `.to()` to primitive strings. -// For now, this is a dummy function to bookmark places we need such strings -function ShellString(str) { - return str; -} -exports.ShellString = ShellString; - -// Return the home directory in a platform-agnostic way, with consideration for -// older versions of node -function getUserHome() { - var result; - if (os.homedir) - result = os.homedir(); // node 3+ - else - result = process.env[(process.platform === 'win32') ? 'USERPROFILE' : 'HOME']; - return result; -} -exports.getUserHome = getUserHome; - -// Returns {'alice': true, 'bob': false} when passed a dictionary, e.g.: -// parseOptions('-a', {'a':'alice', 'b':'bob'}); -function parseOptions(str, map) { - if (!map) - error('parseOptions() internal error: no map given'); - - // All options are false by default - var options = {}; - for (var letter in map) { - if (!map[letter].match('^!')) - options[map[letter]] = false; - } - - if (!str) - return options; // defaults - - if (typeof str !== 'string') - error('parseOptions() internal error: wrong str'); - - // e.g. match[1] = 'Rf' for str = '-Rf' - var match = str.match(/^\-(.+)/); - if (!match) - return options; - - // e.g. chars = ['R', 'f'] - var chars = match[1].split(''); - - var opt; - chars.forEach(function(c) { - if (c in map) { - opt = map[c]; - if (opt.match('^!')) - options[opt.slice(1, opt.length-1)] = false; - else - options[opt] = true; - } else { - error('option not recognized: '+c); - } - }); - - return options; -} -exports.parseOptions = parseOptions; - -// Expands wildcards with matching (ie. existing) file names. -// For example: -// expand(['file*.js']) = ['file1.js', 'file2.js', ...] -// (if the files 'file1.js', 'file2.js', etc, exist in the current dir) -function expand(list) { - var expanded = []; - list.forEach(function(listEl) { - // Wildcard present on directory names ? - if(listEl.search(/\*[^\/]*\//) > -1 || listEl.search(/\*\*[^\/]*\//) > -1) { - var match = listEl.match(/^([^*]+\/|)(.*)/); - var root = match[1]; - var rest = match[2]; - var restRegex = rest.replace(/\*\*/g, ".*").replace(/\*/g, "[^\\/]*"); - restRegex = new RegExp(restRegex); - - _ls('-R', root).filter(function (e) { - return restRegex.test(e); - }).forEach(function(file) { - expanded.push(file); - }); - } - // Wildcard present on file names ? - else if (listEl.search(/\*/) > -1) { - _ls('', listEl).forEach(function(file) { - expanded.push(file); - }); - } else { - expanded.push(listEl); - } - }); - return expanded; -} -exports.expand = expand; - -// Normalizes _unlinkSync() across platforms to match Unix behavior, i.e. -// file can be unlinked even if it's read-only, see https://github.com/joyent/node/issues/3006 -function unlinkSync(file) { - try { - fs.unlinkSync(file); - } catch(e) { - // Try to override file permission - if (e.code === 'EPERM') { - fs.chmodSync(file, '0666'); - fs.unlinkSync(file); - } else { - throw e; - } - } -} -exports.unlinkSync = unlinkSync; - -// e.g. 'shelljs_a5f185d0443ca...' -function randomFileName() { - function randomHash(count) { - if (count === 1) - return parseInt(16*Math.random(), 10).toString(16); - else { - var hash = ''; - for (var i=0; i and/or '); - } else if (arguments.length > 3) { - sources = [].slice.call(arguments, 1, arguments.length - 1); - dest = arguments[arguments.length - 1]; - } else if (typeof sources === 'string') { - sources = [sources]; - } else if ('length' in sources) { - sources = sources; // no-op for array - } else { - common.error('invalid arguments'); - } - - var exists = fs.existsSync(dest), - stats = exists && fs.statSync(dest); - - // Dest is not existing dir, but multiple sources given - if ((!exists || !stats.isDirectory()) && sources.length > 1) - common.error('dest is not a directory (too many sources)'); - - // Dest is an existing file, but no -f given - if (exists && stats.isFile() && options.no_force) - common.error('dest file already exists: ' + dest); - - if (options.recursive) { - // Recursive allows the shortcut syntax "sourcedir/" for "sourcedir/*" - // (see Github issue #15) - sources.forEach(function(src, i) { - if (src[src.length - 1] === '/') { - sources[i] += '*'; - // If src is a directory and dest doesn't exist, 'cp -r src dest' should copy src/* into dest - } else if (fs.statSync(src).isDirectory() && !exists) { - sources[i] += '/*'; - } - }); - - // Create dest - try { - fs.mkdirSync(dest, parseInt('0777', 8)); - } catch (e) { - // like Unix's cp, keep going even if we can't create dest dir - } - } - - sources = common.expand(sources); - - sources.forEach(function(src) { - if (!fs.existsSync(src)) { - common.error('no such file or directory: '+src, true); - return; // skip file - } - - // If here, src exists - if (fs.statSync(src).isDirectory()) { - if (!options.recursive) { - // Non-Recursive - common.log(src + ' is a directory (not copied)'); - } else { - // Recursive - // 'cp /a/source dest' should create 'source' in 'dest' - var newDest = path.join(dest, path.basename(src)), - checkDir = fs.statSync(src); - try { - fs.mkdirSync(newDest, checkDir.mode); - } catch (e) { - //if the directory already exists, that's okay - if (e.code !== 'EEXIST') { - common.error('dest file no such file or directory: ' + newDest, true); - throw e; - } - } - - cpdirSyncRecursive(src, newDest, {no_force: options.no_force}); - } - return; // done with dir - } - - // If here, src is a file - - // When copying to '/path/dir': - // thisDest = '/path/dir/file1' - var thisDest = dest; - if (fs.existsSync(dest) && fs.statSync(dest).isDirectory()) - thisDest = path.normalize(dest + '/' + path.basename(src)); - - if (fs.existsSync(thisDest) && options.no_force) { - common.error('dest file already exists: ' + thisDest, true); - return; // skip file - } - - copyFileSync(src, thisDest); - }); // forEach(src) -} -module.exports = _cp; - -var common = require('./common'); -var _cd = require('./cd'); -var path = require('path'); - -// Pushd/popd/dirs internals -var _dirStack = []; - -function _isStackIndex(index) { - return (/^[\-+]\d+$/).test(index); -} - -function _parseStackIndex(index) { - if (_isStackIndex(index)) { - if (Math.abs(index) < _dirStack.length + 1) { // +1 for pwd - return (/^-/).test(index) ? Number(index) - 1 : Number(index); - } else { - common.error(index + ': directory stack index out of range'); - } - } else { - common.error(index + ': invalid number'); - } -} - -function _actualDirStack() { - return [process.cwd()].concat(_dirStack); -} - -//@ -//@ ### pushd([options,] [dir | '-N' | '+N']) -//@ -//@ Available options: -//@ -//@ + `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. -//@ -//@ Arguments: -//@ -//@ + `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`. -//@ + `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. -//@ + `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. -//@ -//@ Examples: -//@ -//@ ```javascript -//@ // process.cwd() === '/usr' -//@ pushd('/etc'); // Returns /etc /usr -//@ pushd('+1'); // Returns /usr /etc -//@ ``` -//@ -//@ Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. -function _pushd(options, dir) { - if (_isStackIndex(options)) { - dir = options; - options = ''; - } - - options = common.parseOptions(options, { - 'n' : 'no-cd' - }); - - var dirs = _actualDirStack(); - - if (dir === '+0') { - return dirs; // +0 is a noop - } else if (!dir) { - if (dirs.length > 1) { - dirs = dirs.splice(1, 1).concat(dirs); - } else { - return common.error('no other directory'); - } - } else if (_isStackIndex(dir)) { - var n = _parseStackIndex(dir); - dirs = dirs.slice(n).concat(dirs.slice(0, n)); - } else { - if (options['no-cd']) { - dirs.splice(1, 0, dir); - } else { - dirs.unshift(dir); - } - } - - if (options['no-cd']) { - dirs = dirs.slice(1); - } else { - dir = path.resolve(dirs.shift()); - _cd('', dir); - } - - _dirStack = dirs; - return _dirs(''); -} -exports.pushd = _pushd; - -//@ -//@ ### popd([options,] ['-N' | '+N']) -//@ -//@ Available options: -//@ -//@ + `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated. -//@ -//@ Arguments: -//@ -//@ + `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. -//@ + `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. -//@ -//@ Examples: -//@ -//@ ```javascript -//@ echo(process.cwd()); // '/usr' -//@ pushd('/etc'); // '/etc /usr' -//@ echo(process.cwd()); // '/etc' -//@ popd(); // '/usr' -//@ echo(process.cwd()); // '/usr' -//@ ``` -//@ -//@ When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. -function _popd(options, index) { - if (_isStackIndex(options)) { - index = options; - options = ''; - } - - options = common.parseOptions(options, { - 'n' : 'no-cd' - }); - - if (!_dirStack.length) { - return common.error('directory stack empty'); - } - - index = _parseStackIndex(index || '+0'); - - if (options['no-cd'] || index > 0 || _dirStack.length + index === 0) { - index = index > 0 ? index - 1 : index; - _dirStack.splice(index, 1); - } else { - var dir = path.resolve(_dirStack.shift()); - _cd('', dir); - } - - return _dirs(''); -} -exports.popd = _popd; - -//@ -//@ ### dirs([options | '+N' | '-N']) -//@ -//@ Available options: -//@ -//@ + `-c`: Clears the directory stack by deleting all of the elements. -//@ -//@ Arguments: -//@ -//@ + `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. -//@ + `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. -//@ -//@ Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. -//@ -//@ See also: pushd, popd -function _dirs(options, index) { - if (_isStackIndex(options)) { - index = options; - options = ''; - } - - options = common.parseOptions(options, { - 'c' : 'clear' - }); - - if (options['clear']) { - _dirStack = []; - return _dirStack; - } - - var stack = _actualDirStack(); - - if (index) { - index = _parseStackIndex(index); - - if (index < 0) { - index = stack.length + index; - } - - common.log(stack[index]); - return stack[index]; - } - - common.log(stack.join(' ')); - - return stack; -} -exports.dirs = _dirs; - -var common = require('./common'); - -//@ -//@ ### echo(string [, string ...]) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ echo('hello world'); -//@ var str = echo('hello world'); -//@ ``` -//@ -//@ Prints string to stdout, and returns string with additional utility methods -//@ like `.to()`. -function _echo() { - var messages = [].slice.call(arguments, 0); - console.log.apply(console, messages); - return common.ShellString(messages.join(' ')); -} -module.exports = _echo; - -var common = require('./common'); - -//@ -//@ ### error() -//@ Tests if error occurred in the last command. Returns `null` if no error occurred, -//@ otherwise returns string explaining the error -function error() { - return common.state.error; -} -module.exports = error; - -var common = require('./common'); -var _tempDir = require('./tempdir'); -var _pwd = require('./pwd'); -var path = require('path'); -var fs = require('fs'); -var child = require('child_process'); - -// Hack to run child_process.exec() synchronously (sync avoids callback hell) -// Uses a custom wait loop that checks for a flag file, created when the child process is done. -// (Can't do a wait loop that checks for internal Node variables/messages as -// Node is single-threaded; callbacks and other internal state changes are done in the -// event loop). -function execSync(cmd, opts) { - var tempDir = _tempDir(); - var stdoutFile = path.resolve(tempDir+'/'+common.randomFileName()), - stderrFile = path.resolve(tempDir+'/'+common.randomFileName()), - codeFile = path.resolve(tempDir+'/'+common.randomFileName()), - scriptFile = path.resolve(tempDir+'/'+common.randomFileName()), - sleepFile = path.resolve(tempDir+'/'+common.randomFileName()); - - var options = common.extend({ - silent: common.config.silent - }, opts); - - var previousStdoutContent = '', - previousStderrContent = ''; - // Echoes stdout and stderr changes from running process, if not silent - function updateStream(streamFile) { - if (options.silent || !fs.existsSync(streamFile)) - return; - - var previousStreamContent, - proc_stream; - if (streamFile === stdoutFile) { - previousStreamContent = previousStdoutContent; - proc_stream = process.stdout; - } else { // assume stderr - previousStreamContent = previousStderrContent; - proc_stream = process.stderr; - } - - var streamContent = fs.readFileSync(streamFile, 'utf8'); - // No changes since last time? - if (streamContent.length <= previousStreamContent.length) - return; - - proc_stream.write(streamContent.substr(previousStreamContent.length)); - previousStreamContent = streamContent; - } - - function escape(str) { - return (str+'').replace(/([\\"'])/g, "\\$1").replace(/\0/g, "\\0"); - } - - if (fs.existsSync(scriptFile)) common.unlinkSync(scriptFile); - if (fs.existsSync(stdoutFile)) common.unlinkSync(stdoutFile); - if (fs.existsSync(stderrFile)) common.unlinkSync(stderrFile); - if (fs.existsSync(codeFile)) common.unlinkSync(codeFile); - - var execCommand = '"'+process.execPath+'" '+scriptFile; - var execOptions = { - env: process.env, - cwd: _pwd(), - maxBuffer: 20*1024*1024 - }; - - var script; - - if (typeof child.execSync === 'function') { - script = [ - "var child = require('child_process')", - " , fs = require('fs');", - "var childProcess = child.exec('"+escape(cmd)+"', {env: process.env, maxBuffer: 20*1024*1024}, function(err) {", - " fs.writeFileSync('"+escape(codeFile)+"', err ? err.code.toString() : '0');", - "});", - "var stdoutStream = fs.createWriteStream('"+escape(stdoutFile)+"');", - "var stderrStream = fs.createWriteStream('"+escape(stderrFile)+"');", - "childProcess.stdout.pipe(stdoutStream, {end: false});", - "childProcess.stderr.pipe(stderrStream, {end: false});", - "childProcess.stdout.pipe(process.stdout);", - "childProcess.stderr.pipe(process.stderr);", - "var stdoutEnded = false, stderrEnded = false;", - "function tryClosingStdout(){ if(stdoutEnded){ stdoutStream.end(); } }", - "function tryClosingStderr(){ if(stderrEnded){ stderrStream.end(); } }", - "childProcess.stdout.on('end', function(){ stdoutEnded = true; tryClosingStdout(); });", - "childProcess.stderr.on('end', function(){ stderrEnded = true; tryClosingStderr(); });" - ].join('\n'); - - fs.writeFileSync(scriptFile, script); - - if (options.silent) { - execOptions.stdio = 'ignore'; - } else { - execOptions.stdio = [0, 1, 2]; - } - - // Welcome to the future - child.execSync(execCommand, execOptions); - } else { - cmd += ' > '+stdoutFile+' 2> '+stderrFile; // works on both win/unix - - script = [ - "var child = require('child_process')", - " , fs = require('fs');", - "var childProcess = child.exec('"+escape(cmd)+"', {env: process.env, maxBuffer: 20*1024*1024}, function(err) {", - " fs.writeFileSync('"+escape(codeFile)+"', err ? err.code.toString() : '0');", - "});" - ].join('\n'); - - fs.writeFileSync(scriptFile, script); - - child.exec(execCommand, execOptions); - - // The wait loop - // sleepFile is used as a dummy I/O op to mitigate unnecessary CPU usage - // (tried many I/O sync ops, writeFileSync() seems to be only one that is effective in reducing - // CPU usage, though apparently not so much on Windows) - while (!fs.existsSync(codeFile)) { updateStream(stdoutFile); fs.writeFileSync(sleepFile, 'a'); } - while (!fs.existsSync(stdoutFile)) { updateStream(stdoutFile); fs.writeFileSync(sleepFile, 'a'); } - while (!fs.existsSync(stderrFile)) { updateStream(stderrFile); fs.writeFileSync(sleepFile, 'a'); } - } - - // At this point codeFile exists, but it's not necessarily flushed yet. - // Keep reading it until it is. - var code = parseInt('', 10); - while (isNaN(code)) { - code = parseInt(fs.readFileSync(codeFile, 'utf8'), 10); - } - - var stdout = fs.readFileSync(stdoutFile, 'utf8'); - var stderr = fs.readFileSync(stderrFile, 'utf8'); - - // No biggie if we can't erase the files now -- they're in a temp dir anyway - try { common.unlinkSync(scriptFile); } catch(e) {} - try { common.unlinkSync(stdoutFile); } catch(e) {} - try { common.unlinkSync(stderrFile); } catch(e) {} - try { common.unlinkSync(codeFile); } catch(e) {} - try { common.unlinkSync(sleepFile); } catch(e) {} - - // some shell return codes are defined as errors, per http://tldp.org/LDP/abs/html/exitcodes.html - if (code === 1 || code === 2 || code >= 126) { - common.error('', true); // unix/shell doesn't really give an error message after non-zero exit codes - } - // True if successful, false if not - var obj = { - code: code, - output: stdout, // deprecated - stdout: stdout, - stderr: stderr - }; - return obj; -} // execSync() - -// Wrapper around exec() to enable echoing output to console in real time -function execAsync(cmd, opts, callback) { - var stdout = ''; - var stderr = ''; - - var options = common.extend({ - silent: common.config.silent - }, opts); - - var c = child.exec(cmd, {env: process.env, maxBuffer: 20*1024*1024}, function(err) { - if (callback) - callback(err ? err.code : 0, stdout, stderr); - }); - - c.stdout.on('data', function(data) { - stdout += data; - if (!options.silent) - process.stdout.write(data); - }); - - c.stderr.on('data', function(data) { - stderr += data; - if (!options.silent) - process.stderr.write(data); - }); - - return c; -} - -//@ -//@ ### exec(command [, options] [, callback]) -//@ Available options (all `false` by default): -//@ -//@ + `async`: Asynchronous execution. If a callback is provided, it will be set to -//@ `true`, regardless of the passed value. -//@ + `silent`: Do not echo program output to console. -//@ -//@ Examples: -//@ -//@ ```javascript -//@ var version = exec('node --version', {silent:true}).stdout; -//@ -//@ var child = exec('some_long_running_process', {async:true}); -//@ child.stdout.on('data', function(data) { -//@ /* ... do something with data ... */ -//@ }); -//@ -//@ exec('some_long_running_process', function(code, stdout, stderr) { -//@ console.log('Exit code:', code); -//@ console.log('Program output:', stdout); -//@ console.log('Program stderr:', stderr); -//@ }); -//@ ``` -//@ -//@ Executes the given `command` _synchronously_, unless otherwise specified. When in synchronous -//@ mode returns the object `{ code:..., stdout:... , stderr:... }`, containing the program's -//@ `stdout`, `stderr`, and its exit `code`. Otherwise returns the child process object, -//@ and the `callback` gets the arguments `(code, stdout, stderr)`. -//@ -//@ **Note:** For long-lived processes, it's best to run `exec()` asynchronously as -//@ the current synchronous implementation uses a lot of CPU. This should be getting -//@ fixed soon. -function _exec(command, options, callback) { - if (!command) - common.error('must specify command'); - - // Callback is defined instead of options. - if (typeof options === 'function') { - callback = options; - options = { async: true }; - } - - // Callback is defined with options. - if (typeof options === 'object' && typeof callback === 'function') { - options.async = true; - } - - options = common.extend({ - silent: common.config.silent, - async: false - }, options); - - if (options.async) - return execAsync(command, options, callback); - else - return execSync(command, options); -} -module.exports = _exec; - -var fs = require('fs'); -var common = require('./common'); -var _ls = require('./ls'); - -//@ -//@ ### find(path [, path ...]) -//@ ### find(path_array) -//@ Examples: -//@ -//@ ```javascript -//@ find('src', 'lib'); -//@ find(['src', 'lib']); // same as above -//@ find('.').filter(function(file) { return file.match(/\.js$/); }); -//@ ``` -//@ -//@ Returns array of all files (however deep) in the given paths. -//@ -//@ The main difference from `ls('-R', path)` is that the resulting file names -//@ include the base directories, e.g. `lib/resources/file1` instead of just `file1`. -function _find(options, paths) { - if (!paths) - common.error('no path specified'); - else if (typeof paths === 'object') - paths = paths; // assume array - else if (typeof paths === 'string') - paths = [].slice.call(arguments, 1); - - var list = []; - - function pushFile(file) { - if (common.platform === 'win') - file = file.replace(/\\/g, '/'); - list.push(file); - } - - // why not simply do ls('-R', paths)? because the output wouldn't give the base dirs - // to get the base dir in the output, we need instead ls('-R', 'dir/*') for every directory - - paths.forEach(function(file) { - pushFile(file); - - if (fs.statSync(file).isDirectory()) { - _ls('-RA', file+'/*').forEach(function(subfile) { - pushFile(subfile); - }); - } - }); - - return list; -} -module.exports = _find; - -var common = require('./common'); -var fs = require('fs'); - -//@ -//@ ### grep([options,] regex_filter, file [, file ...]) -//@ ### grep([options,] regex_filter, file_array) -//@ Available options: -//@ -//@ + `-v`: Inverse the sense of the regex and print the lines not matching the criteria. -//@ -//@ Examples: -//@ -//@ ```javascript -//@ grep('-v', 'GLOBAL_VARIABLE', '*.js'); -//@ grep('GLOBAL_VARIABLE', '*.js'); -//@ ``` -//@ -//@ Reads input string from given files and returns a string containing all lines of the -//@ file that match the given `regex_filter`. Wildcard `*` accepted. -function _grep(options, regex, files) { - options = common.parseOptions(options, { - 'v': 'inverse' - }); - - if (!files) - common.error('no paths given'); - - if (typeof files === 'string') - files = [].slice.call(arguments, 2); - // if it's array leave it as it is - - files = common.expand(files); - - var grep = ''; - files.forEach(function(file) { - if (!fs.existsSync(file)) { - common.error('no such file or directory: ' + file, true); - return; - } - - var contents = fs.readFileSync(file, 'utf8'), - lines = contents.split(/\r*\n/); - lines.forEach(function(line) { - var matched = line.match(regex); - if ((options.inverse && !matched) || (!options.inverse && matched)) - grep += line + '\n'; - }); - }); - - return common.ShellString(grep); -} -module.exports = _grep; - -var fs = require('fs'); -var path = require('path'); -var common = require('./common'); - -//@ -//@ ### ln([options,] source, dest) -//@ Available options: -//@ -//@ + `-s`: symlink -//@ + `-f`: force -//@ -//@ Examples: -//@ -//@ ```javascript -//@ ln('file', 'newlink'); -//@ ln('-sf', 'file', 'existing'); -//@ ``` -//@ -//@ Links source to dest. Use -f to force the link, should dest already exist. -function _ln(options, source, dest) { - options = common.parseOptions(options, { - 's': 'symlink', - 'f': 'force' - }); - - if (!source || !dest) { - common.error('Missing and/or '); - } - - source = String(source); - var sourcePath = path.normalize(source).replace(RegExp(path.sep + '$'), ''); - var isAbsolute = (path.resolve(source) === sourcePath); - dest = path.resolve(process.cwd(), String(dest)); - - if (fs.existsSync(dest)) { - if (!options.force) { - common.error('Destination file exists', true); - } - - fs.unlinkSync(dest); - } - - if (options.symlink) { - var isWindows = common.platform === 'win'; - var linkType = isWindows ? 'file' : null; - var resolvedSourcePath = isAbsolute ? sourcePath : path.resolve(process.cwd(), path.dirname(dest), source); - if (!fs.existsSync(resolvedSourcePath)) { - common.error('Source file does not exist', true); - } else if (isWindows && fs.statSync(resolvedSourcePath).isDirectory()) { - linkType = 'junction'; - } - - try { - fs.symlinkSync(linkType === 'junction' ? resolvedSourcePath: source, dest, linkType); - } catch (err) { - common.error(err.message); - } - } else { - if (!fs.existsSync(source)) { - common.error('Source file does not exist', true); - } - try { - fs.linkSync(source, dest); - } catch (err) { - common.error(err.message); - } - } -} -module.exports = _ln; - -var path = require('path'); -var fs = require('fs'); -var common = require('./common'); -var _cd = require('./cd'); -var _pwd = require('./pwd'); - -//@ -//@ ### ls([options,] [path, ...]) -//@ ### ls([options,] path_array) -//@ Available options: -//@ -//@ + `-R`: recursive -//@ + `-A`: all files (include files beginning with `.`, except for `.` and `..`) -//@ + `-d`: list directories themselves, not their contents -//@ + `-l`: list objects representing each file, each with fields containing `ls -//@ -l` output fields. See -//@ [fs.Stats](https://nodejs.org/api/fs.html#fs_class_fs_stats) -//@ for more info -//@ -//@ Examples: -//@ -//@ ```javascript -//@ ls('projs/*.js'); -//@ ls('-R', '/users/me', '/tmp'); -//@ ls('-R', ['/users/me', '/tmp']); // same as above -//@ ls('-l', 'file.txt'); // { name: 'file.txt', mode: 33188, nlink: 1, ...} -//@ ``` -//@ -//@ Returns array of files in the given path, or in current directory if no path provided. -function _ls(options, paths) { - options = common.parseOptions(options, { - 'R': 'recursive', - 'A': 'all', - 'a': 'all_deprecated', - 'd': 'directory', - 'l': 'long' - }); - - if (options.all_deprecated) { - // We won't support the -a option as it's hard to image why it's useful - // (it includes '.' and '..' in addition to '.*' files) - // For backwards compatibility we'll dump a deprecated message and proceed as before - common.log('ls: Option -a is deprecated. Use -A instead'); - options.all = true; - } - - if (!paths) - paths = ['.']; - else if (typeof paths === 'object') - paths = paths; // assume array - else if (typeof paths === 'string') - paths = [].slice.call(arguments, 1); - - var list = []; - - // Conditionally pushes file to list - returns true if pushed, false otherwise - // (e.g. prevents hidden files to be included unless explicitly told so) - function pushFile(file, query) { - var name = file.name || file; - // hidden file? - if (path.basename(name)[0] === '.') { - // not explicitly asking for hidden files? - if (!options.all && !(path.basename(query)[0] === '.' && path.basename(query).length > 1)) - return false; - } - - if (common.platform === 'win') - name = name.replace(/\\/g, '/'); - - if (file.name) { - file.name = name; - } else { - file = name; - } - list.push(file); - return true; - } - - paths.forEach(function(p) { - if (fs.existsSync(p)) { - var stats = ls_stat(p); - // Simple file? - if (stats.isFile()) { - if (options.long) { - pushFile(stats, p); - } else { - pushFile(p, p); - } - return; // continue - } - - // Simple dir? - if (options.directory) { - pushFile(p, p); - return; - } else if (stats.isDirectory()) { - // Iterate over p contents - fs.readdirSync(p).forEach(function(file) { - var orig_file = file; - if (options.long) - file = ls_stat(path.join(p, file)); - if (!pushFile(file, p)) - return; - - // Recursive? - if (options.recursive) { - var oldDir = _pwd(); - _cd('', p); - if (fs.statSync(orig_file).isDirectory()) - list = list.concat(_ls('-R'+(options.all?'A':''), orig_file+'/*')); - _cd('', oldDir); - } - }); - return; // continue - } - } - - // p does not exist - possible wildcard present - - var basename = path.basename(p); - var dirname = path.dirname(p); - // Wildcard present on an existing dir? (e.g. '/tmp/*.js') - if (basename.search(/\*/) > -1 && fs.existsSync(dirname) && fs.statSync(dirname).isDirectory) { - // Escape special regular expression chars - var regexp = basename.replace(/(\^|\$|\(|\)|<|>|\[|\]|\{|\}|\.|\+|\?)/g, '\\$1'); - // Translates wildcard into regex - regexp = '^' + regexp.replace(/\*/g, '.*') + '$'; - // Iterate over directory contents - fs.readdirSync(dirname).forEach(function(file) { - if (file.match(new RegExp(regexp))) { - var file_path = path.join(dirname, file); - file_path = options.long ? ls_stat(file_path) : file_path; - if (file_path.name) - file_path.name = path.normalize(file_path.name); - else - file_path = path.normalize(file_path); - if (!pushFile(file_path, basename)) - return; - - // Recursive? - if (options.recursive) { - var pp = dirname + '/' + file; - if (fs.lstatSync(pp).isDirectory()) - list = list.concat(_ls('-R'+(options.all?'A':''), pp+'/*')); - } // recursive - } // if file matches - }); // forEach - return; - } - - common.error('no such file or directory: ' + p, true); - }); - - return list; -} -module.exports = _ls; - - -function ls_stat(path) { - var stats = fs.statSync(path); - // Note: this object will contain more information than .toString() returns - stats.name = path; - stats.toString = function() { - // Return a string resembling unix's `ls -l` format - return [this.mode, this.nlink, this.uid, this.gid, this.size, this.mtime, this.name].join(' '); - }; - return stats; -} - -var common = require('./common'); -var fs = require('fs'); -var path = require('path'); - -// Recursively creates 'dir' -function mkdirSyncRecursive(dir) { - var baseDir = path.dirname(dir); - - // Base dir exists, no recursion necessary - if (fs.existsSync(baseDir)) { - fs.mkdirSync(dir, parseInt('0777', 8)); - return; - } - - // Base dir does not exist, go recursive - mkdirSyncRecursive(baseDir); - - // Base dir created, can create dir - fs.mkdirSync(dir, parseInt('0777', 8)); -} - -//@ -//@ ### mkdir([options,] dir [, dir ...]) -//@ ### mkdir([options,] dir_array) -//@ Available options: -//@ -//@ + `-p`: full path (will create intermediate dirs if necessary) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g'); -//@ mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above -//@ ``` -//@ -//@ Creates directories. -function _mkdir(options, dirs) { - options = common.parseOptions(options, { - 'p': 'fullpath' - }); - if (!dirs) - common.error('no paths given'); - - if (typeof dirs === 'string') - dirs = [].slice.call(arguments, 1); - // if it's array leave it as it is - - dirs.forEach(function(dir) { - if (fs.existsSync(dir)) { - if (!options.fullpath) - common.error('path already exists: ' + dir, true); - return; // skip dir - } - - // Base dir does not exist, and no -p option given - var baseDir = path.dirname(dir); - if (!fs.existsSync(baseDir) && !options.fullpath) { - common.error('no such file or directory: ' + baseDir, true); - return; // skip dir - } - - if (options.fullpath) - mkdirSyncRecursive(dir); - else - fs.mkdirSync(dir, parseInt('0777', 8)); - }); -} // mkdir -module.exports = _mkdir; - -var fs = require('fs'); -var path = require('path'); -var common = require('./common'); - -//@ -//@ ### mv([options ,] source [, source ...], dest') -//@ ### mv([options ,] source_array, dest') -//@ Available options: -//@ -//@ + `-f`: force (default behavior) -//@ + `-n`: no-clobber -//@ -//@ Examples: -//@ -//@ ```javascript -//@ mv('-n', 'file', 'dir/'); -//@ mv('file1', 'file2', 'dir/'); -//@ mv(['file1', 'file2'], 'dir/'); // same as above -//@ ``` -//@ -//@ Moves files. The wildcard `*` is accepted. -function _mv(options, sources, dest) { - options = common.parseOptions(options, { - 'f': '!no_force', - 'n': 'no_force' - }); - - // Get sources, dest - if (arguments.length < 3) { - common.error('missing and/or '); - } else if (arguments.length > 3) { - sources = [].slice.call(arguments, 1, arguments.length - 1); - dest = arguments[arguments.length - 1]; - } else if (typeof sources === 'string') { - sources = [sources]; - } else if ('length' in sources) { - sources = sources; // no-op for array - } else { - common.error('invalid arguments'); - } - - sources = common.expand(sources); - - var exists = fs.existsSync(dest), - stats = exists && fs.statSync(dest); - - // Dest is not existing dir, but multiple sources given - if ((!exists || !stats.isDirectory()) && sources.length > 1) - common.error('dest is not a directory (too many sources)'); - - // Dest is an existing file, but no -f given - if (exists && stats.isFile() && options.no_force) - common.error('dest file already exists: ' + dest); - - sources.forEach(function(src) { - if (!fs.existsSync(src)) { - common.error('no such file or directory: '+src, true); - return; // skip file - } - - // If here, src exists - - // When copying to '/path/dir': - // thisDest = '/path/dir/file1' - var thisDest = dest; - if (fs.existsSync(dest) && fs.statSync(dest).isDirectory()) - thisDest = path.normalize(dest + '/' + path.basename(src)); - - if (fs.existsSync(thisDest) && options.no_force) { - common.error('dest file already exists: ' + thisDest, true); - return; // skip file - } - - if (path.resolve(src) === path.dirname(path.resolve(thisDest))) { - common.error('cannot move to self: '+src, true); - return; // skip file - } - - fs.renameSync(src, thisDest); - }); // forEach(src) -} // mv -module.exports = _mv; - -// see dirs.js -// see dirs.js -var path = require('path'); -var common = require('./common'); - -//@ -//@ ### pwd() -//@ Returns the current directory. -function _pwd() { - var pwd = path.resolve(process.cwd()); - return common.ShellString(pwd); -} -module.exports = _pwd; - -var common = require('./common'); -var fs = require('fs'); - -// Recursively removes 'dir' -// Adapted from https://github.com/ryanmcgrath/wrench-js -// -// Copyright (c) 2010 Ryan McGrath -// Copyright (c) 2012 Artur Adib -// -// Licensed under the MIT License -// http://www.opensource.org/licenses/mit-license.php -function rmdirSyncRecursive(dir, force) { - var files; - - files = fs.readdirSync(dir); - - // Loop through and delete everything in the sub-tree after checking it - for(var i = 0; i < files.length; i++) { - var file = dir + "/" + files[i], - currFile = fs.lstatSync(file); - - if(currFile.isDirectory()) { // Recursive function back to the beginning - rmdirSyncRecursive(file, force); - } - - else if(currFile.isSymbolicLink()) { // Unlink symlinks - if (force || isWriteable(file)) { - try { - common.unlinkSync(file); - } catch (e) { - common.error('could not remove file (code '+e.code+'): ' + file, true); - } - } - } - - else // Assume it's a file - perhaps a try/catch belongs here? - if (force || isWriteable(file)) { - try { - common.unlinkSync(file); - } catch (e) { - common.error('could not remove file (code '+e.code+'): ' + file, true); - } - } - } - - // Now that we know everything in the sub-tree has been deleted, we can delete the main directory. - // Huzzah for the shopkeep. - - var result; - try { - // Retry on windows, sometimes it takes a little time before all the files in the directory are gone - var start = Date.now(); - while (true) { - try { - result = fs.rmdirSync(dir); - if (fs.existsSync(dir)) throw { code: "EAGAIN" }; - break; - } catch(er) { - // In addition to error codes, also check if the directory still exists and loop again if true - if (process.platform === "win32" && (er.code === "ENOTEMPTY" || er.code === "EBUSY" || er.code === "EPERM" || er.code === "EAGAIN")) { - if (Date.now() - start > 1000) throw er; - } else if (er.code === "ENOENT") { - // Directory did not exist, deletion was successful - break; - } else { - throw er; - } - } - } - } catch(e) { - common.error('could not remove directory (code '+e.code+'): ' + dir, true); - } - - return result; -} // rmdirSyncRecursive - -// Hack to determine if file has write permissions for current user -// Avoids having to check user, group, etc, but it's probably slow -function isWriteable(file) { - var writePermission = true; - try { - var __fd = fs.openSync(file, 'a'); - fs.closeSync(__fd); - } catch(e) { - writePermission = false; - } - - return writePermission; -} - -//@ -//@ ### rm([options,] file [, file ...]) -//@ ### rm([options,] file_array) -//@ Available options: -//@ -//@ + `-f`: force -//@ + `-r, -R`: recursive -//@ -//@ Examples: -//@ -//@ ```javascript -//@ rm('-rf', '/tmp/*'); -//@ rm('some_file.txt', 'another_file.txt'); -//@ rm(['some_file.txt', 'another_file.txt']); // same as above -//@ ``` -//@ -//@ Removes files. The wildcard `*` is accepted. -function _rm(options, files) { - options = common.parseOptions(options, { - 'f': 'force', - 'r': 'recursive', - 'R': 'recursive' - }); - if (!files) - common.error('no paths given'); - - if (typeof files === 'string') - files = [].slice.call(arguments, 1); - // if it's array leave it as it is - - files = common.expand(files); - - files.forEach(function(file) { - if (!fs.existsSync(file)) { - // Path does not exist, no force flag given - if (!options.force) - common.error('no such file or directory: '+file, true); - - return; // skip file - } - - // If here, path exists - - var stats = fs.lstatSync(file); - if (stats.isFile() || stats.isSymbolicLink()) { - - // Do not check for file writing permissions - if (options.force) { - common.unlinkSync(file); - return; - } - - if (isWriteable(file)) - common.unlinkSync(file); - else - common.error('permission denied: '+file, true); - - return; - } // simple file - - // Path is an existing directory, but no -r flag given - if (stats.isDirectory() && !options.recursive) { - common.error('path is a directory', true); - return; // skip path - } - - // Recursively remove existing directory - if (stats.isDirectory() && options.recursive) { - rmdirSyncRecursive(file, options.force); - } - }); // forEach(file) -} // rm -module.exports = _rm; - -var common = require('./common'); -var fs = require('fs'); - -//@ -//@ ### sed([options,] search_regex, replacement, file [, file ...]) -//@ ### sed([options,] search_regex, replacement, file_array) -//@ Available options: -//@ -//@ + `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_ -//@ -//@ Examples: -//@ -//@ ```javascript -//@ sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js'); -//@ sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js'); -//@ ``` -//@ -//@ Reads an input string from `files` and performs a JavaScript `replace()` on the input -//@ using the given search regex and replacement string or function. Returns the new string after replacement. -function _sed(options, regex, replacement, files) { - options = common.parseOptions(options, { - 'i': 'inplace' - }); - - if (typeof replacement === 'string' || typeof replacement === 'function') - replacement = replacement; // no-op - else if (typeof replacement === 'number') - replacement = replacement.toString(); // fallback - else - common.error('invalid replacement string'); - - // Convert all search strings to RegExp - if (typeof regex === 'string') - regex = RegExp(regex); - - if (!files) - common.error('no files given'); - - if (typeof files === 'string') - files = [].slice.call(arguments, 3); - // if it's array leave it as it is - - files = common.expand(files); - - var sed = []; - files.forEach(function(file) { - if (!fs.existsSync(file)) { - common.error('no such file or directory: ' + file, true); - return; - } - - var result = fs.readFileSync(file, 'utf8').split('\n').map(function (line) { - return line.replace(regex, replacement); - }).join('\n'); - - sed.push(result); - - if (options.inplace) - fs.writeFileSync(file, result, 'utf8'); - }); - - return common.ShellString(sed.join('\n')); -} -module.exports = _sed; - -var common = require('./common'); - -//@ -//@ ### set(options) -//@ Available options: -//@ -//@ + `+/-e`: exit upon error (`config.fatal`) -//@ + `+/-v`: verbose: show all commands (`config.verbose`) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ set('-e'); // exit upon first error -//@ set('+e'); // this undoes a "set('-e')" -//@ ``` -//@ -//@ Sets global configuration variables -function _set(options) { - if (!options) { - var args = [].slice.call(arguments, 0); - if (args.length < 2) - common.error('must provide an argument'); - options = args[1]; - } - var negate = (options[0] === '+'); - if (negate) { - options = '-' + options.slice(1); // parseOptions needs a '-' prefix - } - options = common.parseOptions(options, { - 'e': 'fatal', - 'v': 'verbose' - }); - - var key; - if (negate) { - for (key in options) - options[key] = !options[key]; - } - - for (key in options) { - // Only change the global config if `negate` is false and the option is true - // or if `negate` is true and the option is false (aka negate !== option) - if (negate !== options[key]) { - common.config[key] = options[key]; - } - } - return; -} -module.exports = _set; - -var common = require('./common'); -var os = require('os'); -var fs = require('fs'); - -// Returns false if 'dir' is not a writeable directory, 'dir' otherwise -function writeableDir(dir) { - if (!dir || !fs.existsSync(dir)) - return false; - - if (!fs.statSync(dir).isDirectory()) - return false; - - var testFile = dir+'/'+common.randomFileName(); - try { - fs.writeFileSync(testFile, ' '); - common.unlinkSync(testFile); - return dir; - } catch (e) { - return false; - } -} - - -//@ -//@ ### tempdir() -//@ -//@ Examples: -//@ -//@ ```javascript -//@ var tmp = tempdir(); // "/tmp" for most *nix platforms -//@ ``` -//@ -//@ Searches and returns string containing a writeable, platform-dependent temporary directory. -//@ Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir). -function _tempDir() { - var state = common.state; - if (state.tempDir) - return state.tempDir; // from cache - - state.tempDir = writeableDir(os.tmpdir && os.tmpdir()) || // node 0.10+ - writeableDir(os.tmpDir && os.tmpDir()) || // node 0.8+ - writeableDir(process.env['TMPDIR']) || - writeableDir(process.env['TEMP']) || - writeableDir(process.env['TMP']) || - writeableDir(process.env['Wimp$ScrapDir']) || // RiscOS - writeableDir('C:\\TEMP') || // Windows - writeableDir('C:\\TMP') || // Windows - writeableDir('\\TEMP') || // Windows - writeableDir('\\TMP') || // Windows - writeableDir('/tmp') || - writeableDir('/var/tmp') || - writeableDir('/usr/tmp') || - writeableDir('.'); // last resort - - return state.tempDir; -} -module.exports = _tempDir; - -var common = require('./common'); -var fs = require('fs'); - -//@ -//@ ### test(expression) -//@ Available expression primaries: -//@ -//@ + `'-b', 'path'`: true if path is a block device -//@ + `'-c', 'path'`: true if path is a character device -//@ + `'-d', 'path'`: true if path is a directory -//@ + `'-e', 'path'`: true if path exists -//@ + `'-f', 'path'`: true if path is a regular file -//@ + `'-L', 'path'`: true if path is a symbolic link -//@ + `'-p', 'path'`: true if path is a pipe (FIFO) -//@ + `'-S', 'path'`: true if path is a socket -//@ -//@ Examples: -//@ -//@ ```javascript -//@ if (test('-d', path)) { /* do something with dir */ }; -//@ if (!test('-f', path)) continue; // skip if it's a regular file -//@ ``` -//@ -//@ Evaluates expression using the available primaries and returns corresponding value. -function _test(options, path) { - if (!path) - common.error('no path given'); - - // hack - only works with unary primaries - options = common.parseOptions(options, { - 'b': 'block', - 'c': 'character', - 'd': 'directory', - 'e': 'exists', - 'f': 'file', - 'L': 'link', - 'p': 'pipe', - 'S': 'socket' - }); - - var canInterpret = false; - for (var key in options) - if (options[key] === true) { - canInterpret = true; - break; - } - - if (!canInterpret) - common.error('could not interpret expression'); - - if (options.link) { - try { - return fs.lstatSync(path).isSymbolicLink(); - } catch(e) { - return false; - } - } - - if (!fs.existsSync(path)) - return false; - - if (options.exists) - return true; - - var stats = fs.statSync(path); - - if (options.block) - return stats.isBlockDevice(); - - if (options.character) - return stats.isCharacterDevice(); - - if (options.directory) - return stats.isDirectory(); - - if (options.file) - return stats.isFile(); - - if (options.pipe) - return stats.isFIFO(); - - if (options.socket) - return stats.isSocket(); -} // test -module.exports = _test; - -var common = require('./common'); -var fs = require('fs'); -var path = require('path'); - -//@ -//@ ### 'string'.to(file) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ cat('input.txt').to('output.txt'); -//@ ``` -//@ -//@ Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as -//@ those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_ -function _to(options, file) { - if (!file) - common.error('wrong arguments'); - - if (!fs.existsSync( path.dirname(file) )) - common.error('no such file or directory: ' + path.dirname(file)); - - try { - fs.writeFileSync(file, this.toString(), 'utf8'); - return this; - } catch(e) { - common.error('could not write to file (code '+e.code+'): '+file, true); - } -} -module.exports = _to; - -var common = require('./common'); -var fs = require('fs'); -var path = require('path'); - -//@ -//@ ### 'string'.toEnd(file) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ cat('input.txt').toEnd('output.txt'); -//@ ``` -//@ -//@ Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as -//@ those returned by `cat`, `grep`, etc). -function _toEnd(options, file) { - if (!file) - common.error('wrong arguments'); - - if (!fs.existsSync( path.dirname(file) )) - common.error('no such file or directory: ' + path.dirname(file)); - - try { - fs.appendFileSync(file, this.toString(), 'utf8'); - return this; - } catch(e) { - common.error('could not append to file (code '+e.code+'): '+file, true); - } -} -module.exports = _toEnd; - -var common = require('./common'); -var fs = require('fs'); - -//@ -//@ ### touch([options,] file) -//@ Available options: -//@ -//@ + `-a`: Change only the access time -//@ + `-c`: Do not create any files -//@ + `-m`: Change only the modification time -//@ + `-d DATE`: Parse DATE and use it instead of current time -//@ + `-r FILE`: Use FILE's times instead of current time -//@ -//@ Examples: -//@ -//@ ```javascript -//@ touch('source.js'); -//@ touch('-c', '/path/to/some/dir/source.js'); -//@ touch({ '-r': FILE }, '/path/to/some/dir/source.js'); -//@ ``` -//@ -//@ Update the access and modification times of each FILE to the current time. -//@ A FILE argument that does not exist is created empty, unless -c is supplied. -//@ This is a partial implementation of *[touch(1)](http://linux.die.net/man/1/touch)*. -function _touch(opts, files) { - opts = common.parseOptions(opts, { - 'a': 'atime_only', - 'c': 'no_create', - 'd': 'date', - 'm': 'mtime_only', - 'r': 'reference', - }); - - if (!files) { - common.error('no paths given'); - } - - - if (Array.isArray(files)) { - files.forEach(function(f) { - touchFile(opts, f); - }); - } else if (typeof files === 'string') { - touchFile(opts, files); - } else { - common.error('file arg should be a string file path or an Array of string file paths'); - } - -} - -function touchFile(opts, file) { - var stat = tryStatFile(file); - - if (stat && stat.isDirectory()) { - // don't error just exit - return; - } - - // if the file doesn't already exist and the user has specified --no-create then - // this script is finished - if (!stat && opts.no_create) { - return; - } - - // open the file and then close it. this will create it if it doesn't exist but will - // not truncate the file - fs.closeSync(fs.openSync(file, 'a')); - - // - // Set timestamps - // - - // setup some defaults - var now = new Date(); - var mtime = opts.date || now; - var atime = opts.date || now; - - // use reference file - if (opts.reference) { - var refStat = tryStatFile(opts.reference); - if (!refStat) { - common.error('failed to get attributess of ' + opts.reference); - } - mtime = refStat.mtime; - atime = refStat.atime; - } else if (opts.date) { - mtime = opts.date; - atime = opts.date; - } - - if (opts.atime_only && opts.mtime_only) { - // keep the new values of mtime and atime like GNU - } else if (opts.atime_only) { - mtime = stat.mtime; - } else if (opts.mtime_only) { - atime = stat.atime; - } - - fs.utimesSync(file, atime, mtime); -} - -module.exports = _touch; - -function tryStatFile(filePath) { - try { - return fs.statSync(filePath); - } catch (e) { - return null; - } -} - -var common = require('./common'); -var fs = require('fs'); -var path = require('path'); - -// XP's system default value for PATHEXT system variable, just in case it's not -// set on Windows. -var XP_DEFAULT_PATHEXT = '.com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh'; - -// Cross-platform method for splitting environment PATH variables -function splitPath(p) { - if (!p) - return []; - - if (common.platform === 'win') - return p.split(';'); - else - return p.split(':'); -} - -function checkPath(path) { - return fs.existsSync(path) && !fs.statSync(path).isDirectory(); -} - -//@ -//@ ### which(command) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ var nodeExec = which('node'); -//@ ``` -//@ -//@ Searches for `command` in the system's PATH. On Windows, this uses the -//@ `PATHEXT` variable to append the extension if it's not already executable. -//@ Returns string containing the absolute path to the command. -function _which(options, cmd) { - if (!cmd) - common.error('must specify command'); - - var pathEnv = process.env.path || process.env.Path || process.env.PATH, - pathArray = splitPath(pathEnv), - where = null; - - // No relative/absolute paths provided? - if (cmd.search(/\//) === -1) { - // Search for command in PATH - pathArray.forEach(function(dir) { - if (where) - return; // already found it - - var attempt = path.resolve(dir, cmd); - - if (common.platform === 'win') { - attempt = attempt.toUpperCase(); - - // In case the PATHEXT variable is somehow not set (e.g. - // child_process.spawn with an empty environment), use the XP default. - var pathExtEnv = process.env.PATHEXT || XP_DEFAULT_PATHEXT; - var pathExtArray = splitPath(pathExtEnv.toUpperCase()); - var i; - - // If the extension is already in PATHEXT, just return that. - for (i = 0; i < pathExtArray.length; i++) { - var ext = pathExtArray[i]; - if (attempt.slice(-ext.length) === ext && checkPath(attempt)) { - where = attempt; - return; - } - } - - // Cycle through the PATHEXT variable - var baseAttempt = attempt; - for (i = 0; i < pathExtArray.length; i++) { - attempt = baseAttempt + pathExtArray[i]; - if (checkPath(attempt)) { - where = attempt; - return; - } - } - } else { - // Assume it's Unix-like - if (checkPath(attempt)) { - where = attempt; - return; - } - } - }); - } - - // Command not found anywhere? - if (!checkPath(cmd) && !where) - return null; - - where = where || path.resolve(cmd); - - return common.ShellString(where); -} -module.exports = _which; diff --git a/node_modules/shelljs/package.json b/node_modules/shelljs/package.json index ff14e20..b7f9f31 100644 --- a/node_modules/shelljs/package.json +++ b/node_modules/shelljs/package.json @@ -1,112 +1,40 @@ { - "_args": [ - [ - "shelljs@^0.6.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint" - ] + "name": "shelljs", + "version": "0.6.1", + "author": "Artur Adib ", + "description": "Portable Unix shell commands for Node.js", + "keywords": [ + "unix", + "shell", + "makefile", + "make", + "jake", + "synchronous" ], - "_from": "shelljs@>=0.6.0 <0.7.0", - "_id": "shelljs@0.6.0", - "_inCache": true, - "_installable": true, - "_location": "/shelljs", - "_nodeVersion": "5.4.0", - "_npmOperationalInternal": { - "host": "packages-6-west.internal.npmjs.com", - "tmp": "tmp/shelljs-0.6.0.tgz_1454632811074_0.5800695188809186" - }, - "_npmUser": { - "email": "ari@ariporad.com", - "name": "ariporad" - }, - "_npmVersion": "3.6.0", - "_phantomChildren": {}, - "_requested": { - "name": "shelljs", - "raw": "shelljs@^0.6.0", - "rawSpec": "^0.6.0", - "scope": null, - "spec": ">=0.6.0 <0.7.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint" + "contributors": [ + "Ari Porad (http://ariporad.com/)", + "Nate Fischer " ], - "_resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.6.0.tgz", - "_shasum": "ce1ed837b4b0e55b5ec3dab84251ab9dbdc0c7ec", - "_shrinkwrap": null, - "_spec": "shelljs@^0.6.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint", - "author": { - "email": "arturadib@gmail.com", - "name": "Artur Adib" + "repository": { + "type": "git", + "url": "git://github.com/shelljs/shelljs.git" + }, + "license": "BSD-3-Clause", + "homepage": "http://github.com/shelljs/shelljs", + "main": "./shell.js", + "scripts": { + "test": "node scripts/run-tests" }, "bin": { "shjs": "./bin/shjs" }, - "bugs": { - "url": "https://github.com/shelljs/shelljs/issues" - }, - "contributors": [ - { - "name": "Ari Porad", - "email": "ari@ariporad.com", - "url": "http://ariporad.com/" - }, - { - "name": "Nate Fischer", - "email": "ntfschr@gmail.com" - } - ], "dependencies": {}, - "description": "Portable Unix shell commands for Node.js", "devDependencies": { "coffee-script": "^1.10.0", "jshint": "~2.1.11" }, - "directories": {}, - "dist": { - "shasum": "ce1ed837b4b0e55b5ec3dab84251ab9dbdc0c7ec", - "tarball": "https://registry.npmjs.org/shelljs/-/shelljs-0.6.0.tgz" - }, + "optionalDependencies": {}, "engines": { "node": ">=0.10.0" - }, - "gitHead": "fe06baf1173ec6f0a70cd58ddb7d373f4c6446f5", - "homepage": "http://github.com/shelljs/shelljs", - "keywords": [ - "jake", - "make", - "makefile", - "shell", - "synchronous", - "unix" - ], - "license": "BSD-3-Clause", - "main": "./shell.js", - "maintainers": [ - { - "name": "ariporad", - "email": "ari@ariporad.com" - }, - { - "name": "artur", - "email": "arturadib@gmail.com" - }, - { - "name": "nfischer", - "email": "ntfschr@gmail.com" - } - ], - "name": "shelljs", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/shelljs/shelljs.git" - }, - "scripts": { - "test": "node scripts/run-tests" - }, - "version": "0.6.0" + } } diff --git a/node_modules/slice-ansi/package.json b/node_modules/slice-ansi/package.json index dfc5087..70bc931 100644 --- a/node_modules/slice-ansi/package.json +++ b/node_modules/slice-ansi/package.json @@ -1,105 +1,56 @@ { - "_args": [ - [ - "slice-ansi@0.0.4", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\table" - ] - ], - "_from": "slice-ansi@0.0.4", - "_id": "slice-ansi@0.0.4", - "_inCache": true, - "_installable": true, - "_location": "/slice-ansi", - "_nodeVersion": "3.2.0", - "_npmUser": { - "email": "threedeecee@gmail.com", - "name": "dthree" - }, - "_npmVersion": "2.13.3", - "_phantomChildren": {}, - "_requested": { - "name": "slice-ansi", - "raw": "slice-ansi@0.0.4", - "rawSpec": "0.0.4", - "scope": null, - "spec": "0.0.4", - "type": "version" - }, - "_requiredBy": [ - "/table" - ], - "_resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", - "_shasum": "edbf8903f66f7ce2f8eafd6ceed65e264c831b35", - "_shrinkwrap": null, - "_spec": "slice-ansi@0.0.4", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\table", - "author": { - "email": "threedeecee@gmail.com", - "name": "David Caccavella" - }, - "bugs": { - "url": "https://github.com/chalk/slice-ansi/issues" - }, - "dependencies": {}, + "name": "slice-ansi", + "version": "0.0.4", "description": "Slice a string with ANSI escape codes", - "devDependencies": { - "ava": "^0.2.0", - "chalk": "^1.1.1", - "strip-ansi": "^3.0.0", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "edbf8903f66f7ce2f8eafd6ceed65e264c831b35", - "tarball": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz" + "license": "MIT", + "repository": "chalk/slice-ansi", + "author": { + "name": "David Caccavella", + "email": "threedeecee@gmail.com" }, + "maintainers": [ + "David Caccavella (github.com/dthree)", + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)", + "JD Ballard (github.com/qix-)" + ], "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "node test.js && xo" + }, "files": [ "index.js" ], - "gitHead": "8670277262281964b13f051d51b2e24bcfda8a66", - "homepage": "https://github.com/chalk/slice-ansi#readme", "keywords": [ - "256", + "slice", + "string", "ansi", - "cli", + "styles", "color", - "colors", "colour", - "command-line", + "colors", + "terminal", "console", + "cli", + "tty", "escape", "formatting", - "log", - "logging", "rgb", + "256", "shell", - "slice", - "string", - "styles", - "terminal", - "text", - "tty", - "xterm" - ], - "license": "MIT", - "maintainers": [ - { - "name": "dthree", - "email": "threedeecee@gmail.com" - } + "xterm", + "log", + "logging", + "command-line", + "text" ], - "name": "slice-ansi", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/slice-ansi.git" - }, - "scripts": { - "test": "node test.js && xo" - }, - "version": "0.0.4" + "dependencies": {}, + "devDependencies": { + "ava": "^0.2.0", + "chalk": "^1.1.1", + "strip-ansi": "^3.0.0", + "xo": "*" + } } diff --git a/node_modules/sprintf-js/package.json b/node_modules/sprintf-js/package.json index de18b96..75f7eca 100644 --- a/node_modules/sprintf-js/package.json +++ b/node_modules/sprintf-js/package.json @@ -1,78 +1,22 @@ { - "_args": [ - [ - "sprintf-js@~1.0.2", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\argparse" - ] - ], - "_from": "sprintf-js@>=1.0.2 <1.1.0", - "_id": "sprintf-js@1.0.3", - "_inCache": true, - "_installable": true, - "_location": "/sprintf-js", - "_nodeVersion": "0.12.4", - "_npmUser": { - "email": "hello@alexei.ro", - "name": "alexei" - }, - "_npmVersion": "2.10.1", - "_phantomChildren": {}, - "_requested": { "name": "sprintf-js", - "raw": "sprintf-js@~1.0.2", - "rawSpec": "~1.0.2", - "scope": null, - "spec": ">=1.0.2 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/argparse" - ], - "_resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "_shasum": "04e6926f662895354f3dd015203633b857297e2c", - "_shrinkwrap": null, - "_spec": "sprintf-js@~1.0.2", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\argparse", - "author": { - "email": "hello@alexei.ro", - "name": "Alexandru Marasteanu", - "url": "http://alexei.ro/" - }, - "bugs": { - "url": "https://github.com/alexei/sprintf.js/issues" - }, - "dependencies": {}, - "description": "JavaScript sprintf implementation", - "devDependencies": { - "grunt": "*", - "grunt-contrib-uglify": "*", - "grunt-contrib-watch": "*", - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "04e6926f662895354f3dd015203633b857297e2c", - "tarball": "http://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" - }, - "gitHead": "747b806c2dab5b64d5c9958c42884946a187c3b1", - "homepage": "https://github.com/alexei/sprintf.js#readme", - "license": "BSD-3-Clause", - "main": "src/sprintf.js", - "maintainers": [ - { - "name": "alexei", - "email": "hello@alexei.ro" + "version": "1.0.3", + "description": "JavaScript sprintf implementation", + "author": "Alexandru Marasteanu (http://alexei.ro/)", + "main": "src/sprintf.js", + "scripts": { + "test": "mocha test/test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/alexei/sprintf.js.git" + }, + "license": "BSD-3-Clause", + "readmeFilename": "README.md", + "devDependencies": { + "mocha": "*", + "grunt": "*", + "grunt-contrib-watch": "*", + "grunt-contrib-uglify": "*" } - ], - "name": "sprintf-js", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/alexei/sprintf.js.git" - }, - "scripts": { - "test": "mocha test/test.js" - }, - "version": "1.0.3" } diff --git a/node_modules/string-width/index.js b/node_modules/string-width/index.js index aa2f839..b9bec62 100644 --- a/node_modules/string-width/index.js +++ b/node_modules/string-width/index.js @@ -16,6 +16,11 @@ module.exports = function (str) { for (var i = 0; i < str.length; i++) { var code = codePointAt(str, i); + // ignore control characters + if (code <= 0x1f || (code >= 0x7f && code <= 0x9f)) { + continue; + } + // surrogates if (code >= 0x10000) { i++; diff --git a/node_modules/string-width/package.json b/node_modules/string-width/package.json index 2e54dde..5ba4361 100644 --- a/node_modules/string-width/package.json +++ b/node_modules/string-width/package.json @@ -1,111 +1,56 @@ { - "_args": [ - [ - "string-width@^1.0.1", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\inquirer" - ] - ], - "_from": "string-width@>=1.0.1 <2.0.0", - "_id": "string-width@1.0.1", - "_inCache": true, - "_installable": true, - "_location": "/string-width", - "_nodeVersion": "0.12.5", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.11.2", - "_phantomChildren": {}, - "_requested": { - "name": "string-width", - "raw": "string-width@^1.0.1", - "rawSpec": "^1.0.1", - "scope": null, - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/inquirer", - "/table" - ], - "_resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz", - "_shasum": "c92129b6f1d7f52acf9af424a26e3864a05ceb0a", - "_shrinkwrap": null, - "_spec": "string-width@^1.0.1", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\inquirer", + "name": "string-width", + "version": "1.0.2", + "description": "Get the visual width of a string - the number of columns required to display it", + "license": "MIT", + "repository": "sindresorhus/string-width", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/string-width/issues" - }, - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "description": "Get the visual width of a string - the number of columns required to display it", - "devDependencies": { - "ava": "0.0.4" - }, - "directories": {}, - "dist": { - "shasum": "c92129b6f1d7f52acf9af424a26e3864a05ceb0a", - "tarball": "http://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "xo && ava" + }, "files": [ "index.js" ], - "gitHead": "f279cfd14835f0a3c8df69ba18e9a3960156e135", - "homepage": "https://github.com/sindresorhus/string-width", "keywords": [ - "ansi", - "char", + "string", + "str", "character", - "chinese", - "cjk", - "cli", - "codes", + "char", + "unicode", + "width", + "visual", "column", "columns", + "fullwidth", + "full-width", + "full", + "ansi", + "escape", + "codes", + "cli", "command-line", + "terminal", "console", - "escape", - "fixed-width", - "full", - "full-width", - "fullwidth", + "cjk", + "chinese", "japanese", "korean", - "str", - "string", - "terminal", - "unicode", - "visual", - "width" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } + "fixed-width" ], - "name": "string-width", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/string-width.git" - }, - "scripts": { - "test": "node test.js" + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" }, - "version": "1.0.1" + "devDependencies": { + "ava": "*", + "xo": "*" + } } diff --git a/node_modules/string-width/readme.md b/node_modules/string-width/readme.md index a7737a9..1ab42c9 100644 --- a/node_modules/string-width/readme.md +++ b/node_modules/string-width/readme.md @@ -2,7 +2,7 @@ > Get the visual width of a string - the number of columns required to display it -Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. Useful to be able to measure the actual width of command-line output. @@ -17,7 +17,7 @@ $ npm install --save string-width ## Usage ```js -var stringWidth = require('string-width'); +const stringWidth = require('string-width'); stringWidth('古'); //=> 2 @@ -34,8 +34,9 @@ stringWidth('a'); - [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module - [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string +- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/string_decoder/package.json b/node_modules/string_decoder/package.json index d52c878..f2dd499 100644 --- a/node_modules/string_decoder/package.json +++ b/node_modules/string_decoder/package.json @@ -1,79 +1,25 @@ { - "_args": [ - [ - "string_decoder@~0.10.x", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\readable-stream" - ] - ], - "_from": "string_decoder@>=0.10.0 <0.11.0", - "_id": "string_decoder@0.10.31", - "_inCache": true, - "_installable": true, - "_location": "/string_decoder", - "_npmUser": { - "email": "rod@vagg.org", - "name": "rvagg" - }, - "_npmVersion": "1.4.23", - "_phantomChildren": {}, - "_requested": { - "name": "string_decoder", - "raw": "string_decoder@~0.10.x", - "rawSpec": "~0.10.x", - "scope": null, - "spec": ">=0.10.0 <0.11.0", - "type": "range" - }, - "_requiredBy": [ - "/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "_shrinkwrap": null, - "_spec": "string_decoder@~0.10.x", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\readable-stream", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "dependencies": {}, + "name": "string_decoder", + "version": "0.10.31", "description": "The string_decoder module from Node core", + "main": "index.js", + "dependencies": {}, "devDependencies": { "tap": "~0.4.8" }, - "directories": {}, - "dist": { - "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + "scripts": { + "test": "tap test/simple/*.js" }, - "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "browser", - "browserify", - "decoder", - "string" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "name": "string_decoder", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git://github.com/rvagg/string_decoder.git" }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "version": "0.10.31" + "homepage": "https://github.com/rvagg/string_decoder", + "keywords": [ + "string", + "decoder", + "browser", + "browserify" + ], + "license": "MIT" } diff --git a/node_modules/strip-ansi/package.json b/node_modules/strip-ansi/package.json index bf15b1e..301685b 100644 --- a/node_modules/strip-ansi/package.json +++ b/node_modules/strip-ansi/package.json @@ -1,118 +1,57 @@ { - "_args": [ - [ - "strip-ansi@^3.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\chalk" - ] - ], - "_from": "strip-ansi@>=3.0.0 <4.0.0", - "_id": "strip-ansi@3.0.1", - "_inCache": true, - "_installable": true, - "_location": "/strip-ansi", - "_nodeVersion": "0.12.7", - "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/strip-ansi-3.0.1.tgz_1456057278183_0.28958667791448534" - }, - "_npmUser": { - "email": "jappelman@xebia.com", - "name": "jbnicolai" - }, - "_npmVersion": "2.11.3", - "_phantomChildren": {}, - "_requested": { - "name": "strip-ansi", - "raw": "strip-ansi@^3.0.0", - "rawSpec": "^3.0.0", - "scope": null, - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/chalk", - "/inquirer", - "/string-width", - "/table" - ], - "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf", - "_shrinkwrap": null, - "_spec": "strip-ansi@^3.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\chalk", + "name": "strip-ansi", + "version": "3.0.1", + "description": "Strip ANSI escape codes", + "license": "MIT", + "repository": "chalk/strip-ansi", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "bugs": { - "url": "https://github.com/chalk/strip-ansi/issues" - }, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "description": "Strip ANSI escape codes", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf", - "tarball": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" - }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Boy Nicolai Appelman (jbna.nl)", + "JD Ballard (github.com/qix-)" + ], "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "xo && ava" + }, "files": [ "index.js" ], - "gitHead": "8270705c704956da865623e564eba4875c3ea17f", - "homepage": "https://github.com/chalk/strip-ansi", "keywords": [ - "256", + "strip", + "trim", + "remove", "ansi", + "styles", "color", - "colors", "colour", - "command-line", + "colors", + "terminal", "console", + "string", + "tty", "escape", "formatting", - "log", - "logging", - "remove", "rgb", + "256", "shell", - "string", - "strip", - "styles", - "terminal", - "text", - "trim", - "tty", - "xterm" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - } + "xterm", + "log", + "logging", + "command-line", + "text" ], - "name": "strip-ansi", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/strip-ansi.git" - }, - "scripts": { - "test": "xo && ava" + "dependencies": { + "ansi-regex": "^2.0.0" }, - "version": "3.0.1" + "devDependencies": { + "ava": "*", + "xo": "*" + } } diff --git a/node_modules/strip-json-comments/package.json b/node_modules/strip-json-comments/package.json index 418d9eb..20c9c25 100644 --- a/node_modules/strip-json-comments/package.json +++ b/node_modules/strip-json-comments/package.json @@ -1,104 +1,46 @@ { - "_args": [ - [ - "strip-json-comments@~1.0.1", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "strip-json-comments@>=1.0.1 <1.1.0", - "_id": "strip-json-comments@1.0.4", - "_inCache": true, - "_installable": true, - "_location": "/strip-json-comments", - "_nodeVersion": "0.12.5", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.11.2", - "_phantomChildren": {}, - "_requested": { - "name": "strip-json-comments", - "raw": "strip-json-comments@~1.0.1", - "rawSpec": "~1.0.1", - "scope": null, - "spec": ">=1.0.1 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", - "_shasum": "1e15fbcac97d3ee99bf2d73b4c656b082bbafb91", - "_shrinkwrap": null, - "_spec": "strip-json-comments@~1.0.1", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint", - "author": { - "email": "sindresorhus@gmail.com", - "name": "Sindre Sorhus", - "url": "sindresorhus.com" - }, - "bin": { - "strip-json-comments": "cli.js" - }, - "bugs": { - "url": "https://github.com/sindresorhus/strip-json-comments/issues" - }, - "dependencies": {}, + "name": "strip-json-comments", + "version": "1.0.4", "description": "Strip comments from JSON. Lets you use comments in your JSON files!", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "1e15fbcac97d3ee99bf2d73b4c656b082bbafb91", - "tarball": "http://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz" - }, - "engines": { - "node": ">=0.8.0" - }, - "files": [ - "cli.js", - "strip-json-comments.js" - ], - "gitHead": "f58348696368583cc5bb18525fe31eacc9bd00e1", - "homepage": "https://github.com/sindresorhus/strip-json-comments", "keywords": [ - "bin", - "cli", + "json", + "strip", + "remove", + "delete", + "trim", "comments", - "conf", + "multiline", + "parse", "config", "configuration", - "delete", + "conf", + "settings", + "util", "env", "environment", - "json", - "multiline", - "parse", - "remove", - "settings", - "strip", - "trim", - "util" + "cli", + "bin" ], "license": "MIT", - "main": "strip-json-comments", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "strip-json-comments", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/strip-json-comments.git" + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" }, + "files": [ + "cli.js", + "strip-json-comments.js" + ], + "main": "strip-json-comments", + "bin": "cli.js", + "repository": "sindresorhus/strip-json-comments", "scripts": { "test": "mocha --ui tdd" }, - "version": "1.0.4" + "devDependencies": { + "mocha": "*" + }, + "engines": { + "node": ">=0.8.0" + } } diff --git a/node_modules/supports-color/package.json b/node_modules/supports-color/package.json index 99082ab..3bb77ac 100644 --- a/node_modules/supports-color/package.json +++ b/node_modules/supports-color/package.json @@ -1,105 +1,49 @@ { - "_args": [ - [ - "supports-color@^2.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\chalk" - ] - ], - "_from": "supports-color@>=2.0.0 <3.0.0", - "_id": "supports-color@2.0.0", - "_inCache": true, - "_installable": true, - "_location": "/supports-color", - "_nodeVersion": "0.12.5", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.11.2", - "_phantomChildren": {}, - "_requested": { - "name": "supports-color", - "raw": "supports-color@^2.0.0", - "rawSpec": "^2.0.0", - "scope": null, - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/chalk" - ], - "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "_shasum": "535d045ce6b6363fa40117084629995e9df324c7", - "_shrinkwrap": null, - "_spec": "supports-color@^2.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\chalk", + "name": "supports-color", + "version": "2.0.0", + "description": "Detect whether a terminal supports color", + "license": "MIT", + "repository": "chalk/supports-color", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "bugs": { - "url": "https://github.com/chalk/supports-color/issues" - }, - "dependencies": {}, - "description": "Detect whether a terminal supports color", - "devDependencies": { - "mocha": "*", - "require-uncached": "^1.0.2" - }, - "directories": {}, - "dist": { - "shasum": "535d045ce6b6363fa40117084629995e9df324c7", - "tarball": "http://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" - }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)" + ], "engines": { "node": ">=0.8.0" }, + "scripts": { + "test": "mocha" + }, "files": [ "index.js" ], - "gitHead": "8400d98ade32b2adffd50902c06d9e725a5c6588", - "homepage": "https://github.com/chalk/supports-color", "keywords": [ - "256", - "ansi", - "capability", - "cli", "color", - "colors", "colour", - "command-line", + "colors", + "terminal", "console", - "detect", + "cli", + "ansi", + "styles", + "tty", "rgb", + "256", "shell", - "styles", + "xterm", + "command-line", "support", "supports", - "terminal", - "tty", - "xterm" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - } + "capability", + "detect" ], - "name": "supports-color", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/supports-color.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "2.0.0" + "devDependencies": { + "mocha": "*", + "require-uncached": "^1.0.2" + } } diff --git a/node_modules/table/dist/alignString.js b/node_modules/table/dist/alignString.js index 24891e7..73e6137 100644 --- a/node_modules/table/dist/alignString.js +++ b/node_modules/table/dist/alignString.js @@ -1,24 +1,12 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -var _isNumber2 = require('lodash/isNumber'); +var _lodash = require('lodash'); -var _isNumber3 = _interopRequireDefault(_isNumber2); - -var _isString2 = require('lodash/isString'); - -var _isString3 = _interopRequireDefault(_isString2); - -var _floor2 = require('lodash/floor'); - -var _floor3 = _interopRequireDefault(_floor2); - -var _repeat2 = require('lodash/repeat'); - -var _repeat3 = _interopRequireDefault(_repeat2); +var _lodash2 = _interopRequireDefault(_lodash); var _stringWidth = require('string-width'); @@ -26,20 +14,15 @@ var _stringWidth2 = _interopRequireDefault(_stringWidth); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var alignCenter = undefined, - alignLeft = undefined, - alignRight = undefined, - alignments = undefined; - -alignments = ['left', 'right', 'center']; +const alignments = ['left', 'right', 'center']; /** * @param {string} subject * @param {number} width * @returns {string} */ -alignLeft = function alignLeft(subject, width) { - return subject + (0, _repeat3.default)(' ', width); +const alignLeft = (subject, width) => { + return subject + _lodash2.default.repeat(' ', width); }; /** @@ -47,8 +30,8 @@ alignLeft = function alignLeft(subject, width) { * @param {number} width * @returns {string} */ -alignRight = function alignRight(subject, width) { - return (0, _repeat3.default)(' ', width) + subject; +const alignRight = (subject, width) => { + return _lodash2.default.repeat(' ', width) + subject; }; /** @@ -56,18 +39,18 @@ alignRight = function alignRight(subject, width) { * @param {number} width * @returns {string} */ -alignCenter = function alignCenter(subject, width) { - var halfWidth = undefined; +const alignCenter = (subject, width) => { + let halfWidth; - halfWidth = width / 2; + halfWidth = width / 2; - if (halfWidth % 2 === 0) { - return (0, _repeat3.default)(' ', halfWidth) + subject + (0, _repeat3.default)(' ', halfWidth); - } else { - halfWidth = (0, _floor3.default)(halfWidth); + if (halfWidth % 2 === 0) { + return _lodash2.default.repeat(' ', halfWidth) + subject + _lodash2.default.repeat(' ', halfWidth); + } else { + halfWidth = _lodash2.default.floor(halfWidth); - return (0, _repeat3.default)(' ', halfWidth) + subject + (0, _repeat3.default)(' ', halfWidth + 1); - } + return _lodash2.default.repeat(' ', halfWidth) + subject + _lodash2.default.repeat(' ', halfWidth + 1); + } }; /** @@ -80,50 +63,46 @@ alignCenter = function alignCenter(subject, width) { * @returns {string} */ -exports.default = function (subject, containerWidth, alignment) { - var availableWidth = undefined, - subjectWidth = undefined; - - if (!(0, _isString3.default)(subject)) { - throw new Error('Subject parameter value must be a string.'); - } +exports.default = (subject, containerWidth, alignment) => { + if (!_lodash2.default.isString(subject)) { + throw new Error('Subject parameter value must be a string.'); + } - if (!(0, _isNumber3.default)(containerWidth)) { - throw new Error('Container width parameter value must be a number.'); - } + if (!_lodash2.default.isNumber(containerWidth)) { + throw new Error('Container width parameter value must be a number.'); + } - subjectWidth = (0, _stringWidth2.default)(subject); + const subjectWidth = (0, _stringWidth2.default)(subject); - if (subjectWidth > containerWidth) { - // console.log('subjectWidth', subjectWidth, 'containerWidth', containerWidth, 'subject', subject); + if (subjectWidth > containerWidth) { + // console.log('subjectWidth', subjectWidth, 'containerWidth', containerWidth, 'subject', subject); - throw new Error('Subject parameter value width cannot be greater than the container width.'); - } + throw new Error('Subject parameter value width cannot be greater than the container width.'); + } - if (!(0, _isString3.default)(alignment)) { - throw new Error('Alignment parameter value must be a string.'); - } + if (!_lodash2.default.isString(alignment)) { + throw new Error('Alignment parameter value must be a string.'); + } - if (alignments.indexOf(alignment) === -1) { - throw new Error('Alignment parameter value must be a known alignment parameter value (left, right, center).'); - } + if (alignments.indexOf(alignment) === -1) { + throw new Error('Alignment parameter value must be a known alignment parameter value (left, right, center).'); + } - if (subjectWidth === 0) { - return (0, _repeat3.default)(' ', containerWidth); - } + if (subjectWidth === 0) { + return _lodash2.default.repeat(' ', containerWidth); + } - availableWidth = containerWidth - subjectWidth; + const availableWidth = containerWidth - subjectWidth; - if (alignment === 'left') { - return alignLeft(subject, availableWidth); - } + if (alignment === 'left') { + return alignLeft(subject, availableWidth); + } - if (alignment === 'right') { - return alignRight(subject, availableWidth); - } + if (alignment === 'right') { + return alignRight(subject, availableWidth); + } - return alignCenter(subject, availableWidth); + return alignCenter(subject, availableWidth); }; -module.exports = exports['default']; -//# sourceMappingURL=alignString.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/alignString.js.map b/node_modules/table/dist/alignString.js.map deleted file mode 100644 index 77fabea..0000000 --- a/node_modules/table/dist/alignString.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["alignString.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAI,WAAW,YAAA;IACX,SAAS,YAAA;IACT,UAAU,YAAA;IACV,UAAU,YAAA,CAAC;;AAEf,UAAU,GAAG,CACT,MAAM,EACN,OAAO,EACP,QAAQ,CACX;;;;;;;AAAC,AAOF,SAAS,GAAG,mBAAC,OAAO,EAAE,KAAK,EAAK;AAC5B,WAAO,OAAO,GAAG,sBAAS,GAAG,EAAE,KAAK,CAAC,CAAC;CACzC;;;;;;;AAAC,AAOF,UAAU,GAAG,oBAAC,OAAO,EAAE,KAAK,EAAK;AAC7B,WAAO,sBAAS,GAAG,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC;CACzC;;;;;;;AAAC,AAOF,WAAW,GAAG,qBAAC,OAAO,EAAE,KAAK,EAAK;AAC9B,QAAI,SAAS,YAAA,CAAC;;AAEd,aAAS,GAAG,KAAK,GAAG,CAAC,CAAC;;AAEtB,QAAI,SAAS,GAAG,CAAC,KAAK,CAAC,EAAE;AACrB,eAAO,sBAAS,GAAG,EAAE,SAAS,CAAC,GAAG,OAAO,GAAG,sBAAS,GAAG,EAAE,SAAS,CAAC,CAAC;KACxE,MAAM;AACH,iBAAS,GAAG,qBAAQ,SAAS,CAAC,CAAC;;AAE/B,eAAO,sBAAS,GAAG,EAAE,SAAS,CAAC,GAAG,OAAO,GAAG,sBAAS,GAAG,EAAE,SAAS,GAAG,CAAC,CAAC,CAAC;KAC5E;CACJ;;;;;;;;;;;AAAC;kBAWa,UAAC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAK;AACnD,QAAI,cAAc,YAAA;QACd,YAAY,YAAA,CAAC;;AAEjB,QAAI,CAAC,wBAAW,OAAO,CAAC,EAAE;AACtB,cAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;KAChE;;AAED,QAAI,CAAC,wBAAW,cAAc,CAAC,EAAE;AAC7B,cAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;KACxE;;AAED,gBAAY,GAAG,2BAAY,OAAO,CAAC,CAAC;;AAEpC,QAAI,YAAY,GAAG,cAAc,EAAE;;;AAG/B,cAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC,CAAC;KAChG;;AAED,QAAI,CAAC,wBAAW,SAAS,CAAC,EAAE;AACxB,cAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;KAClE;;AAED,QAAI,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE;AACtC,cAAM,IAAI,KAAK,CAAC,4FAA4F,CAAC,CAAC;KACjH;;AAED,QAAI,YAAY,KAAK,CAAC,EAAE;AACpB,eAAO,sBAAS,GAAG,EAAE,cAAc,CAAC,CAAC;KACxC;;AAED,kBAAc,GAAG,cAAc,GAAG,YAAY,CAAC;;AAE/C,QAAI,SAAS,KAAK,MAAM,EAAE;AACtB,eAAO,SAAS,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;KAC7C;;AAED,QAAI,SAAS,KAAK,OAAO,EAAE;AACvB,eAAO,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;KAC9C;;AAED,WAAO,WAAW,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;CAC/C","file":"alignString.js","sourcesContent":["import _ from 'lodash';\nimport stringWidth from 'string-width';\n\nlet alignCenter,\n alignLeft,\n alignRight,\n alignments;\n\nalignments = [\n 'left',\n 'right',\n 'center'\n];\n\n/**\n * @param {string} subject\n * @param {number} width\n * @returns {string}\n */\nalignLeft = (subject, width) => {\n return subject + _.repeat(' ', width);\n};\n\n/**\n * @param {string} subject\n * @param {number} width\n * @returns {string}\n */\nalignRight = (subject, width) => {\n return _.repeat(' ', width) + subject;\n};\n\n/**\n * @param {string} subject\n * @param {number} width\n * @returns {string}\n */\nalignCenter = (subject, width) => {\n let halfWidth;\n\n halfWidth = width / 2;\n\n if (halfWidth % 2 === 0) {\n return _.repeat(' ', halfWidth) + subject + _.repeat(' ', halfWidth);\n } else {\n halfWidth = _.floor(halfWidth);\n\n return _.repeat(' ', halfWidth) + subject + _.repeat(' ', halfWidth + 1);\n }\n};\n\n/**\n * Pads a string to the left and/or right to position the subject\n * text in a desired alignment within a container.\n *\n * @param {string} subject\n * @param {number} containerWidth\n * @param {string} alignment One of the valid options (left, right, center).\n * @returns {string}\n */\nexport default (subject, containerWidth, alignment) => {\n let availableWidth,\n subjectWidth;\n\n if (!_.isString(subject)) {\n throw new Error('Subject parameter value must be a string.');\n }\n\n if (!_.isNumber(containerWidth)) {\n throw new Error('Container width parameter value must be a number.');\n }\n\n subjectWidth = stringWidth(subject);\n\n if (subjectWidth > containerWidth) {\n // console.log('subjectWidth', subjectWidth, 'containerWidth', containerWidth, 'subject', subject);\n\n throw new Error('Subject parameter value width cannot be greater than the container width.');\n }\n\n if (!_.isString(alignment)) {\n throw new Error('Alignment parameter value must be a string.');\n }\n\n if (alignments.indexOf(alignment) === -1) {\n throw new Error('Alignment parameter value must be a known alignment parameter value (left, right, center).');\n }\n\n if (subjectWidth === 0) {\n return _.repeat(' ', containerWidth);\n }\n\n availableWidth = containerWidth - subjectWidth;\n\n if (alignment === 'left') {\n return alignLeft(subject, availableWidth);\n }\n\n if (alignment === 'right') {\n return alignRight(subject, availableWidth);\n }\n\n return alignCenter(subject, availableWidth);\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/alignTableData.js b/node_modules/table/dist/alignTableData.js index 2fa881d..5d390b9 100644 --- a/node_modules/table/dist/alignTableData.js +++ b/node_modules/table/dist/alignTableData.js @@ -1,44 +1,40 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -var _map2 = require('lodash/map'); +var _lodash = require('lodash'); -var _map3 = _interopRequireDefault(_map2); - -var _alignString = require('./alignString'); - -var _alignString2 = _interopRequireDefault(_alignString); +var _lodash2 = _interopRequireDefault(_lodash); var _stringWidth = require('string-width'); var _stringWidth2 = _interopRequireDefault(_stringWidth); +var _alignString = require('./alignString'); + +var _alignString2 = _interopRequireDefault(_alignString); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * @param {table~row[]} rows * @param {Object} config - * @return {table~row[]} + * @returns {table~row[]} */ - -exports.default = function (rows, config) { - return (0, _map3.default)(rows, function (cells) { - return (0, _map3.default)(cells, function (value, index1) { - var column = undefined; - - column = config.columns[index1]; - - if ((0, _stringWidth2.default)(value) === column.width) { - return value; - } else { - return (0, _alignString2.default)(value, column.width, column.alignment); - } - }); +exports.default = (rows, config) => { + return _lodash2.default.map(rows, cells => { + return _lodash2.default.map(cells, (value, index1) => { + const column = config.columns[index1]; + + if ((0, _stringWidth2.default)(value) === column.width) { + return value; + } else { + return (0, _alignString2.default)(value, column.width, column.alignment); + } }); + }); }; -module.exports = exports['default']; -//# sourceMappingURL=alignTableData.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/alignTableData.js.map b/node_modules/table/dist/alignTableData.js.map deleted file mode 100644 index 704e4c4..0000000 --- a/node_modules/table/dist/alignTableData.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["alignTableData.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;kBASe,UAAC,IAAI,EAAE,MAAM,EAAK;AAC7B,WAAO,mBAAM,IAAI,EAAE,UAAC,KAAK,EAAK;AAC1B,eAAO,mBAAM,KAAK,EAAE,UAAC,KAAK,EAAE,MAAM,EAAK;AACnC,gBAAI,MAAM,YAAA,CAAC;;AAEX,kBAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;;AAEhC,gBAAI,2BAAY,KAAK,CAAC,KAAK,MAAM,CAAC,KAAK,EAAE;AACrC,uBAAO,KAAK,CAAC;aAChB,MAAM;AACH,uBAAO,2BAAY,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;aAC7D;SACJ,CAAC,CAAC;KACN,CAAC,CAAC;CACN","file":"alignTableData.js","sourcesContent":["import _ from 'lodash';\nimport alignString from './alignString';\nimport stringWidth from 'string-width';\n\n/**\n * @param {table~row[]} rows\n * @param {Object} config\n * @return {table~row[]}\n */\nexport default (rows, config) => {\n return _.map(rows, (cells) => {\n return _.map(cells, (value, index1) => {\n let column;\n\n column = config.columns[index1];\n\n if (stringWidth(value) === column.width) {\n return value;\n } else {\n return alignString(value, column.width, column.alignment);\n }\n });\n });\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/calculateCellHeight.js b/node_modules/table/dist/calculateCellHeight.js index eb4ce2d..b5ec699 100644 --- a/node_modules/table/dist/calculateCellHeight.js +++ b/node_modules/table/dist/calculateCellHeight.js @@ -1,20 +1,12 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -var _ceil2 = require('lodash/ceil'); +var _lodash = require('lodash'); -var _ceil3 = _interopRequireDefault(_ceil2); - -var _isInteger2 = require('lodash/isInteger'); - -var _isInteger3 = _interopRequireDefault(_isInteger2); - -var _isString2 = require('lodash/isString'); - -var _isString3 = _interopRequireDefault(_isString2); +var _lodash2 = _interopRequireDefault(_lodash); var _stringWidth = require('string-width'); @@ -32,28 +24,26 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * @param {boolean} useWrapWord * @returns {number} */ - exports.default = function (value, columnWidth) { - var useWrapWord = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; + let useWrapWord = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - if (!(0, _isString3.default)(value)) { - throw new Error('Value must be a string.'); - } + if (!_lodash2.default.isString(value)) { + throw new Error('Value must be a string.'); + } - if (!(0, _isInteger3.default)(columnWidth)) { - throw new Error('Column width must be an integer.'); - } + if (!_lodash2.default.isInteger(columnWidth)) { + throw new Error('Column width must be an integer.'); + } - if (columnWidth < 1) { - throw new Error('Column width must be greater than 0.'); - } + if (columnWidth < 1) { + throw new Error('Column width must be greater than 0.'); + } - if (useWrapWord) { - return (0, _wrapWord2.default)(value, columnWidth).length; - } + if (useWrapWord) { + return (0, _wrapWord2.default)(value, columnWidth).length; + } - return (0, _ceil3.default)((0, _stringWidth2.default)(value) / columnWidth); + return _lodash2.default.ceil((0, _stringWidth2.default)(value) / columnWidth); }; -module.exports = exports['default']; -//# sourceMappingURL=calculateCellHeight.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/calculateCellHeight.js.map b/node_modules/table/dist/calculateCellHeight.js.map deleted file mode 100644 index 4983826..0000000 --- a/node_modules/table/dist/calculateCellHeight.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["calculateCellHeight.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAUe,UAAC,KAAK,EAAE,WAAW,EAA0B;QAAxB,WAAW,yDAAG,KAAK;;AACnD,QAAI,CAAC,wBAAW,KAAK,CAAC,EAAE;AACpB,cAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC9C;;AAED,QAAI,CAAC,yBAAY,WAAW,CAAC,EAAE;AAC3B,cAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;KACvD;;AAED,QAAI,WAAW,GAAG,CAAC,EAAE;AACjB,cAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;KAC3D;;AAED,QAAI,WAAW,EAAE;AACb,eAAO,wBAAS,KAAK,EAAE,WAAW,CAAC,CAAC,MAAM,CAAC;KAC9C;;AAED,WAAO,oBAAO,2BAAY,KAAK,CAAC,GAAG,WAAW,CAAC,CAAC;CACnD","file":"calculateCellHeight.js","sourcesContent":["import _ from 'lodash';\nimport stringWidth from 'string-width';\nimport wrapWord from './wrapWord';\n\n/**\n * @param {string} value\n * @param {number} columnWidth\n * @param {boolean} useWrapWord\n * @returns {number}\n */\nexport default (value, columnWidth, useWrapWord = false) => {\n if (!_.isString(value)) {\n throw new Error('Value must be a string.');\n }\n\n if (!_.isInteger(columnWidth)) {\n throw new Error('Column width must be an integer.');\n }\n\n if (columnWidth < 1) {\n throw new Error('Column width must be greater than 0.');\n }\n\n if (useWrapWord) {\n return wrapWord(value, columnWidth).length;\n }\n\n return _.ceil(stringWidth(value) / columnWidth);\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/calculateCellWidthIndex.js b/node_modules/table/dist/calculateCellWidthIndex.js index ceb756b..bc6c0a3 100644 --- a/node_modules/table/dist/calculateCellWidthIndex.js +++ b/node_modules/table/dist/calculateCellWidthIndex.js @@ -1,12 +1,12 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -var _map2 = require('lodash/map'); +var _lodash = require('lodash'); -var _map3 = _interopRequireDefault(_map2); +var _lodash2 = _interopRequireDefault(_lodash); var _stringWidth = require('string-width'); @@ -18,14 +18,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * Calculates width of each cell contents. * * @param {string[]} cells - * @return {number[]} + * @returns {number[]} */ - -exports.default = function (cells) { - return (0, _map3.default)(cells, function (value) { - return (0, _stringWidth2.default)(value); - }); +exports.default = cells => { + return _lodash2.default.map(cells, value => { + return (0, _stringWidth2.default)(value); + }); }; -module.exports = exports['default']; -//# sourceMappingURL=calculateCellWidthIndex.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/calculateCellWidthIndex.js.map b/node_modules/table/dist/calculateCellWidthIndex.js.map deleted file mode 100644 index a3c2eeb..0000000 --- a/node_modules/table/dist/calculateCellWidthIndex.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["calculateCellWidthIndex.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;kBASe,UAAC,KAAK,EAAK;AACtB,WAAO,mBAAM,KAAK,EAAE,UAAC,KAAK,EAAK;AAC3B,eAAO,2BAAY,KAAK,CAAC,CAAC;KAC7B,CAAC,CAAC;CACN","file":"calculateCellWidthIndex.js","sourcesContent":["import _ from 'lodash';\nimport stringWidth from 'string-width';\n\n/**\n * Calculates width of each cell contents.\n *\n * @param {string[]} cells\n * @return {number[]}\n */\nexport default (cells) => {\n return _.map(cells, (value) => {\n return stringWidth(value);\n });\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/calculateMaximumColumnWidthIndex.js b/node_modules/table/dist/calculateMaximumColumnWidthIndex.js index 7e5d066..062ca45 100644 --- a/node_modules/table/dist/calculateMaximumColumnWidthIndex.js +++ b/node_modules/table/dist/calculateMaximumColumnWidthIndex.js @@ -1,16 +1,12 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -var _forEach2 = require('lodash/forEach'); +var _lodash = require('lodash'); -var _forEach3 = _interopRequireDefault(_forEach2); - -var _fill2 = require('lodash/fill'); - -var _fill3 = _interopRequireDefault(_fill2); +var _lodash2 = _interopRequireDefault(_lodash); var _calculateCellWidthIndex = require('./calculateCellWidthIndex'); @@ -22,32 +18,26 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * Produces an array of values that describe the largest value length (width) in every column. * * @param {Array[]} rows - * @return {number[]} + * @returns {number[]} */ +exports.default = rows => { + if (!rows[0]) { + throw new Error('Dataset must have at least one row.'); + } -exports.default = function (rows) { - var columns = undefined; - - if (!rows[0]) { - throw new Error('Dataset must have at least one row.'); - } - - columns = (0, _fill3.default)(Array(rows[0].length), 0); - - (0, _forEach3.default)(rows, function (row) { - var columnWidthIndex = undefined; + const columns = _lodash2.default.fill(Array(rows[0].length), 0); - columnWidthIndex = (0, _calculateCellWidthIndex2.default)(row); + _lodash2.default.forEach(rows, row => { + const columnWidthIndex = (0, _calculateCellWidthIndex2.default)(row); - (0, _forEach3.default)(columnWidthIndex, function (valueWidth, index0) { - if (columns[index0] < valueWidth) { - columns[index0] = valueWidth; - } - }); + _lodash2.default.forEach(columnWidthIndex, (valueWidth, index0) => { + if (columns[index0] < valueWidth) { + columns[index0] = valueWidth; + } }); + }); - return columns; + return columns; }; -module.exports = exports['default']; -//# sourceMappingURL=calculateMaximumColumnWidthIndex.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/calculateMaximumColumnWidthIndex.js.map b/node_modules/table/dist/calculateMaximumColumnWidthIndex.js.map deleted file mode 100644 index ecb2c20..0000000 --- a/node_modules/table/dist/calculateMaximumColumnWidthIndex.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["calculateMaximumColumnWidthIndex.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;kBASe,UAAC,IAAI,EAAK;AACrB,QAAI,OAAO,YAAA,CAAC;;AAEZ,QAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;AACV,cAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;KAC1D;;AAED,WAAO,GAAG,oBAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;;AAE3C,2BAAU,IAAI,EAAE,UAAC,GAAG,EAAK;AACrB,YAAI,gBAAgB,YAAA,CAAC;;AAErB,wBAAgB,GAAG,uCAAwB,GAAG,CAAC,CAAC;;AAEhD,+BAAU,gBAAgB,EAAE,UAAC,UAAU,EAAE,MAAM,EAAK;AAChD,gBAAI,OAAO,CAAC,MAAM,CAAC,GAAG,UAAU,EAAE;AAC9B,uBAAO,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC;aAChC;SACJ,CAAC,CAAC;KACN,CAAC,CAAC;;AAEH,WAAO,OAAO,CAAC;CAClB","file":"calculateMaximumColumnWidthIndex.js","sourcesContent":["import _ from 'lodash';\nimport calculateCellWidthIndex from './calculateCellWidthIndex';\n\n/**\n * Produces an array of values that describe the largest value length (width) in every column.\n *\n * @param {Array[]} rows\n * @return {number[]}\n */\nexport default (rows) => {\n let columns;\n\n if (!rows[0]) {\n throw new Error('Dataset must have at least one row.');\n }\n\n columns = _.fill(Array(rows[0].length), 0);\n\n _.forEach(rows, (row) => {\n let columnWidthIndex;\n\n columnWidthIndex = calculateCellWidthIndex(row);\n\n _.forEach(columnWidthIndex, (valueWidth, index0) => {\n if (columns[index0] < valueWidth) {\n columns[index0] = valueWidth;\n }\n });\n });\n\n return columns;\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/calculateRowHeightIndex.js b/node_modules/table/dist/calculateRowHeightIndex.js index e1db4ad..b9eaf60 100644 --- a/node_modules/table/dist/calculateRowHeightIndex.js +++ b/node_modules/table/dist/calculateRowHeightIndex.js @@ -1,28 +1,12 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -var _max2 = require('lodash/max'); +var _lodash = require('lodash'); -var _max3 = _interopRequireDefault(_max2); - -var _isBoolean2 = require('lodash/isBoolean'); - -var _isBoolean3 = _interopRequireDefault(_isBoolean2); - -var _isNumber2 = require('lodash/isNumber'); - -var _isNumber3 = _interopRequireDefault(_isNumber2); - -var _fill2 = require('lodash/fill'); - -var _fill3 = _interopRequireDefault(_fill2); - -var _forEach2 = require('lodash/forEach'); - -var _forEach3 = _interopRequireDefault(_forEach2); +var _lodash2 = _interopRequireDefault(_lodash); var _calculateCellHeight = require('./calculateCellHeight'); @@ -35,39 +19,32 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * * @param {Array[]} rows * @param {Object} config - * @return {number[]} + * @returns {number[]} */ +exports.default = (rows, config) => { + const tableWidth = rows[0].length; -exports.default = function (rows, config) { - var rowSpanIndex = undefined, - tableWidth = undefined; - - tableWidth = rows[0].length; - - rowSpanIndex = []; + const rowSpanIndex = []; - (0, _forEach3.default)(rows, function (cells) { - var cellHeightIndex = undefined; + _lodash2.default.forEach(rows, cells => { + const cellHeightIndex = _lodash2.default.fill(Array(tableWidth), 1); - cellHeightIndex = (0, _fill3.default)(Array(tableWidth), 1); + _lodash2.default.forEach(cells, (value, index1) => { + if (!_lodash2.default.isNumber(config.columns[index1].width)) { + throw new Error('column[index].width must be a number.'); + } - (0, _forEach3.default)(cells, function (value, index1) { - if (!(0, _isNumber3.default)(config.columns[index1].width)) { - throw new Error('column[index].width must be a number.'); - } + if (!_lodash2.default.isBoolean(config.columns[index1].wrapWord)) { + throw new Error('column[index].wrapWord must be a boolean.'); + } - if (!(0, _isBoolean3.default)(config.columns[index1].wrapWord)) { - throw new Error('column[index].wrapWord must be a boolean.'); - } - - cellHeightIndex[index1] = (0, _calculateCellHeight2.default)(value, config.columns[index1].width, config.columns[index1].wrapWord); - }); - - rowSpanIndex.push((0, _max3.default)(cellHeightIndex)); + cellHeightIndex[index1] = (0, _calculateCellHeight2.default)(value, config.columns[index1].width, config.columns[index1].wrapWord); }); - return rowSpanIndex; + rowSpanIndex.push(_lodash2.default.max(cellHeightIndex)); + }); + + return rowSpanIndex; }; -module.exports = exports['default']; -//# sourceMappingURL=calculateRowHeightIndex.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/calculateRowHeightIndex.js.map b/node_modules/table/dist/calculateRowHeightIndex.js.map deleted file mode 100644 index 4788b17..0000000 --- a/node_modules/table/dist/calculateRowHeightIndex.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["calculateRowHeightIndex.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAUe,UAAC,IAAI,EAAE,MAAM,EAAK;AAC7B,QAAI,YAAY,YAAA;QACZ,UAAU,YAAA,CAAC;;AAEf,cAAU,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;;AAE5B,gBAAY,GAAG,EAAE,CAAC;;AAElB,2BAAU,IAAI,EAAE,UAAC,KAAK,EAAK;AACvB,YAAI,eAAe,YAAA,CAAC;;AAEpB,uBAAe,GAAG,oBAAO,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;;AAE/C,+BAAU,KAAK,EAAE,UAAC,KAAK,EAAE,MAAM,EAAK;AAChC,gBAAI,CAAC,wBAAW,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,EAAE;AAC3C,sBAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;aAC5D;;AAED,gBAAI,CAAC,yBAAY,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EAAE;AAC/C,sBAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;aAChE;;AAED,2BAAe,CAAC,MAAM,CAAC,GAAG,mCAAoB,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;SACvH,CAAC,CAAC;;AAEH,oBAAY,CAAC,IAAI,CAAC,mBAAM,eAAe,CAAC,CAAC,CAAC;KAC7C,CAAC,CAAC;;AAEH,WAAO,YAAY,CAAC;CACvB","file":"calculateRowHeightIndex.js","sourcesContent":["import _ from 'lodash';\nimport calculateCellHeight from './calculateCellHeight';\n\n/**\n * Calculates the vertical row span index.\n *\n * @param {Array[]} rows\n * @param {Object} config\n * @return {number[]}\n */\nexport default (rows, config) => {\n let rowSpanIndex,\n tableWidth;\n\n tableWidth = rows[0].length;\n\n rowSpanIndex = [];\n\n _.forEach(rows, (cells) => {\n let cellHeightIndex;\n\n cellHeightIndex = _.fill(Array(tableWidth), 1);\n\n _.forEach(cells, (value, index1) => {\n if (!_.isNumber(config.columns[index1].width)) {\n throw new Error('column[index].width must be a number.');\n }\n\n if (!_.isBoolean(config.columns[index1].wrapWord)) {\n throw new Error('column[index].wrapWord must be a boolean.');\n }\n\n cellHeightIndex[index1] = calculateCellHeight(value, config.columns[index1].width, config.columns[index1].wrapWord);\n });\n\n rowSpanIndex.push(_.max(cellHeightIndex));\n });\n\n return rowSpanIndex;\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/createStream.js b/node_modules/table/dist/createStream.js index 236944e..f9c3df5 100644 --- a/node_modules/table/dist/createStream.js +++ b/node_modules/table/dist/createStream.js @@ -1,20 +1,12 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -var _mapValues2 = require('lodash/mapValues'); +var _lodash = require('lodash'); -var _mapValues3 = _interopRequireDefault(_mapValues2); - -var _trimEnd2 = require('lodash/trimEnd'); - -var _trimEnd3 = _interopRequireDefault(_trimEnd2); - -var _map2 = require('lodash/map'); - -var _map3 = _interopRequireDefault(_map2); +var _lodash2 = _interopRequireDefault(_lodash); var _makeStreamConfig = require('./makeStreamConfig'); @@ -52,35 +44,25 @@ var _calculateRowHeightIndex2 = _interopRequireDefault(_calculateRowHeightIndex) function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var append = undefined, - create = undefined, - prepareData = undefined; - /** - * @param {string[]} row - * @param {number[]} columnWidthIndex + * @param {Array} data * @param {Object} config - * @returns {undefined} + * @returns {Array} */ -create = function create(row, columnWidthIndex, config) { - var body = undefined, - output = undefined, - rows = undefined; +const prepareData = (data, config) => { + let rows; - rows = prepareData([row], config); + rows = (0, _stringifyTableData2.default)(data); - body = (0, _map3.default)(rows, function (literalRow) { - return (0, _drawRow2.default)(literalRow, config.border); - }).join(''); + rows = (0, _truncateTableData2.default)(data, config); - output = ''; - output += (0, _drawBorder.drawBorderTop)(columnWidthIndex, config.border); - output += body; - output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border); + const rowHeightIndex = (0, _calculateRowHeightIndex2.default)(rows, config); - output = (0, _trimEnd3.default)(output); + rows = (0, _mapDataUsingRowHeightIndex2.default)(rows, rowHeightIndex, config); + rows = (0, _alignTableData2.default)(rows, config); + rows = (0, _padTableData2.default)(rows, config); - process.stdout.write(output); + return rows; }; /** @@ -89,91 +71,89 @@ create = function create(row, columnWidthIndex, config) { * @param {Object} config * @returns {undefined} */ -append = function append(row, columnWidthIndex, config) { - var body = undefined, - output = undefined, - rows = undefined; +const create = (row, columnWidthIndex, config) => { + const rows = prepareData([row], config); - rows = prepareData([row], config); + const body = _lodash2.default.map(rows, literalRow => { + return (0, _drawRow2.default)(literalRow, config.border); + }).join(''); - // console.log('rows', rows); + let output; - body = (0, _map3.default)(rows, function (literalRow) { - return (0, _drawRow2.default)(literalRow, config.border); - }).join(''); + output = ''; - output = '\r\x1b[K'; - output += (0, _drawBorder.drawBorderJoin)(columnWidthIndex, config.border); - output += body; - output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border); + output += (0, _drawBorder.drawBorderTop)(columnWidthIndex, config.border); + output += body; + output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border); - output = (0, _trimEnd3.default)(output); + output = _lodash2.default.trimEnd(output); - process.stdout.write(output); + process.stdout.write(output); }; /** - * @param {Array} data + * @param {string[]} row + * @param {number[]} columnWidthIndex * @param {Object} config - * @returns {Array} + * @returns {undefined} */ -prepareData = function prepareData(data, config) { - var rowHeightIndex = undefined, - rows = undefined; +const append = (row, columnWidthIndex, config) => { + const rows = prepareData([row], config); - rows = (0, _stringifyTableData2.default)(data); + const body = _lodash2.default.map(rows, literalRow => { + return (0, _drawRow2.default)(literalRow, config.border); + }).join(''); - rows = (0, _truncateTableData2.default)(data, config); + let output; - rowHeightIndex = (0, _calculateRowHeightIndex2.default)(rows, config); + output = '\r\x1b[K'; - rows = (0, _mapDataUsingRowHeightIndex2.default)(rows, rowHeightIndex, config); - rows = (0, _alignTableData2.default)(rows, config); - rows = (0, _padTableData2.default)(rows, config); + output += (0, _drawBorder.drawBorderJoin)(columnWidthIndex, config.border); + output += body; + output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border); - return rows; + output = _lodash2.default.trimEnd(output); + + process.stdout.write(output); }; /** * @param {Object} userConfig - * @return {Object} + * @returns {Object} */ exports.default = function () { - var userConfig = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - - var columnWidthIndex = undefined, - config = undefined, - empty = undefined; - - config = (0, _makeStreamConfig2.default)(userConfig); - - columnWidthIndex = (0, _mapValues3.default)(config.columns, function (column) { - return column.width + column.paddingLeft + column.paddingRight; - }); - - empty = true; - - return { - /** - * @param {string[]} row - * @returns {undefined} - */ - write: function write(row) { - if (row.length !== config.columnCount) { - throw new Error('Row cell count does not match the config.columnCount.'); - } - - if (empty) { - empty = false; - - return create(row, columnWidthIndex, config); - } else { - return append(row, columnWidthIndex, config); - } - } - }; + let userConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + const config = (0, _makeStreamConfig2.default)(userConfig); + + const columnWidthIndex = _lodash2.default.mapValues(config.columns, column => { + return column.width + column.paddingLeft + column.paddingRight; + }); + + let empty; + + empty = true; + + return { + /** + * @param {string[]} row + * @returns {undefined} + */ + write: row => { + if (row.length !== config.columnCount) { + throw new Error('Row cell count does not match the config.columnCount.'); + } + + if (empty) { + empty = false; + + return create(row, columnWidthIndex, config); + } else { + return append(row, columnWidthIndex, config); + } + } + }; }; -module.exports = exports['default']; -//# sourceMappingURL=createStream.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/createStream.js.map b/node_modules/table/dist/createStream.js.map deleted file mode 100644 index bae4cce..0000000 --- a/node_modules/table/dist/createStream.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["createStream.js"],"names":[],"mappings":"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","file":"createStream.js","sourcesContent":["import makeStreamConfig from './makeStreamConfig';\nimport drawRow from './drawRow';\nimport {\n drawBorderBottom,\n drawBorderJoin,\n drawBorderTop\n} from './drawBorder';\nimport _ from 'lodash';\n\nimport stringifyTableData from './stringifyTableData';\nimport truncateTableData from './truncateTableData';\nimport mapDataUsingRowHeightIndex from './mapDataUsingRowHeightIndex';\nimport alignTableData from './alignTableData';\nimport padTableData from './padTableData';\nimport calculateRowHeightIndex from './calculateRowHeightIndex';\n\nlet append,\n create,\n prepareData;\n\n/**\n * @param {string[]} row\n * @param {number[]} columnWidthIndex\n * @param {Object} config\n * @returns {undefined}\n */\ncreate = (row, columnWidthIndex, config) => {\n let body,\n output,\n rows;\n\n rows = prepareData([row], config);\n\n body = _.map(rows, (literalRow) => {\n return drawRow(literalRow, config.border);\n }).join('');\n\n output = '';\n output += drawBorderTop(columnWidthIndex, config.border);\n output += body;\n output += drawBorderBottom(columnWidthIndex, config.border);\n\n output = _.trimEnd(output);\n\n process.stdout.write(output);\n};\n\n/**\n * @param {string[]} row\n * @param {number[]} columnWidthIndex\n * @param {Object} config\n * @returns {undefined}\n */\nappend = (row, columnWidthIndex, config) => {\n let body,\n output,\n rows;\n\n rows = prepareData([row], config);\n\n // console.log('rows', rows);\n\n body = _.map(rows, (literalRow) => {\n return drawRow(literalRow, config.border);\n }).join('');\n\n output = '\\r\\x1b[K';\n output += drawBorderJoin(columnWidthIndex, config.border);\n output += body;\n output += drawBorderBottom(columnWidthIndex, config.border);\n\n output = _.trimEnd(output);\n\n process.stdout.write(output);\n};\n\n/**\n * @param {Array} data\n * @param {Object} config\n * @returns {Array}\n */\nprepareData = (data, config) => {\n let rowHeightIndex,\n rows;\n\n rows = stringifyTableData(data);\n\n rows = truncateTableData(data, config);\n\n rowHeightIndex = calculateRowHeightIndex(rows, config);\n\n rows = mapDataUsingRowHeightIndex(rows, rowHeightIndex, config);\n rows = alignTableData(rows, config);\n rows = padTableData(rows, config);\n\n return rows;\n};\n\n/**\n * @param {Object} userConfig\n * @return {Object}\n */\nexport default (userConfig = {}) => {\n let columnWidthIndex,\n config,\n empty;\n\n config = makeStreamConfig(userConfig);\n\n columnWidthIndex = _.mapValues(config.columns, (column) => {\n return column.width + column.paddingLeft + column.paddingRight;\n });\n\n empty = true;\n\n return {\n /**\n * @param {string[]} row\n * @returns {undefined}\n */\n write: (row) => {\n if (row.length !== config.columnCount) {\n throw new Error('Row cell count does not match the config.columnCount.');\n }\n\n if (empty) {\n empty = false;\n\n return create(row, columnWidthIndex, config);\n } else {\n return append(row, columnWidthIndex, config);\n }\n }\n };\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/drawBorder.js b/node_modules/table/dist/drawBorder.js index dfb0488..aeb2b71 100644 --- a/node_modules/table/dist/drawBorder.js +++ b/node_modules/table/dist/drawBorder.js @@ -1,25 +1,16 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -exports.drawBorderBottom = exports.drawBorderJoin = exports.drawBorderTop = exports.drawBorder = undefined; +exports.drawBorderTop = exports.drawBorderJoin = exports.drawBorderBottom = exports.drawBorder = undefined; -var _repeat2 = require('lodash/repeat'); +var _lodash = require('lodash'); -var _repeat3 = _interopRequireDefault(_repeat2); - -var _map2 = require('lodash/map'); - -var _map3 = _interopRequireDefault(_map2); +var _lodash2 = _interopRequireDefault(_lodash); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var drawBorder = undefined, - drawBorderBottom = undefined, - drawBorderJoin = undefined, - drawBorderTop = undefined; - /** * @typedef drawBorder~parts * @property {string} left @@ -33,16 +24,12 @@ var drawBorder = undefined, * @param {drawBorder~parts} parts * @returns {string} */ -exports.drawBorder = drawBorder = function drawBorder(columnSizeIndex, parts) { - var columns = undefined; - - columns = (0, _map3.default)(columnSizeIndex, function (size) { - return (0, _repeat3.default)(parts.body, size); - }); +const drawBorder = (columnSizeIndex, parts) => { + const columns = _lodash2.default.map(columnSizeIndex, size => { + return _lodash2.default.repeat(parts.body, size); + }).join(parts.join); - columns = columns.join(parts.join); - - return parts.left + columns + parts.right + '\n'; + return parts.left + columns + parts.right + '\n'; }; /** @@ -56,15 +43,15 @@ exports.drawBorder = drawBorder = function drawBorder(columnSizeIndex, parts) { /** * @param {number[]} columnSizeIndex * @param {drawBorderTop~parts} parts - * @return {string} + * @returns {string} */ -exports.drawBorderTop = drawBorderTop = function drawBorderTop(columnSizeIndex, parts) { - return drawBorder(columnSizeIndex, { - left: parts.topLeft, - right: parts.topRight, - body: parts.topBody, - join: parts.topJoin - }); +const drawBorderTop = (columnSizeIndex, parts) => { + return drawBorder(columnSizeIndex, { + body: parts.topBody, + join: parts.topJoin, + left: parts.topLeft, + right: parts.topRight + }); }; /** @@ -80,13 +67,13 @@ exports.drawBorderTop = drawBorderTop = function drawBorderTop(columnSizeIndex, * @param {drawBorderJoin~parts} parts * @returns {string} */ -exports.drawBorderJoin = drawBorderJoin = function drawBorderJoin(columnSizeIndex, parts) { - return drawBorder(columnSizeIndex, { - left: parts.joinLeft, - right: parts.joinRight, - body: parts.joinBody, - join: parts.joinJoin - }); +const drawBorderJoin = (columnSizeIndex, parts) => { + return drawBorder(columnSizeIndex, { + body: parts.joinBody, + join: parts.joinJoin, + left: parts.joinLeft, + right: parts.joinRight + }); }; /** @@ -102,17 +89,16 @@ exports.drawBorderJoin = drawBorderJoin = function drawBorderJoin(columnSizeInde * @param {drawBorderBottom~parts} parts * @returns {string} */ -exports.drawBorderBottom = drawBorderBottom = function drawBorderBottom(columnSizeIndex, parts) { - return drawBorder(columnSizeIndex, { - left: parts.bottomLeft, - right: parts.bottomRight, - body: parts.bottomBody, - join: parts.bottomJoin - }); +const drawBorderBottom = (columnSizeIndex, parts) => { + return drawBorder(columnSizeIndex, { + body: parts.bottomBody, + join: parts.bottomJoin, + left: parts.bottomLeft, + right: parts.bottomRight + }); }; exports.drawBorder = drawBorder; -exports.drawBorderTop = drawBorderTop; -exports.drawBorderJoin = drawBorderJoin; exports.drawBorderBottom = drawBorderBottom; -//# sourceMappingURL=drawBorder.js.map +exports.drawBorderJoin = drawBorderJoin; +exports.drawBorderTop = drawBorderTop; \ No newline at end of file diff --git a/node_modules/table/dist/drawBorder.js.map b/node_modules/table/dist/drawBorder.js.map deleted file mode 100644 index 1dd7b20..0000000 --- a/node_modules/table/dist/drawBorder.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["drawBorder.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,IAAI,UAAU,YAAA;IACV,gBAAgB,YAAA;IAChB,cAAc,YAAA;IACd,aAAa,YAAA;;;;;;;;;;;;;;;AAAC,AAelB,QA+EI,UAAU,GA/Ed,UAAU,GAAG,oBAAC,eAAe,EAAE,KAAK,EAAK;AACrC,QAAI,OAAO,YAAA,CAAC;;AAEZ,WAAO,GAAG,mBAAM,eAAe,EAAE,UAAC,IAAI,EAAK;AACvC,eAAO,sBAAS,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KACrC,CAAC,CAAC;;AAEH,WAAO,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;;AAEnC,WAAO,KAAK,CAAC,IAAI,GAAG,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC;CACpD;;;;;;;;;;;;;;;AAAC,AAeF,QAuDI,aAAa,GAvDjB,aAAa,GAAG,uBAAC,eAAe,EAAE,KAAK,EAAK;AACxC,WAAO,UAAU,CAAC,eAAe,EAAE;AAC/B,YAAI,EAAE,KAAK,CAAC,OAAO;AACnB,aAAK,EAAE,KAAK,CAAC,QAAQ;AACrB,YAAI,EAAE,KAAK,CAAC,OAAO;AACnB,YAAI,EAAE,KAAK,CAAC,OAAO;KACtB,CAAC,CAAC;CACN;;;;;;;;;;;;;;;AAAC,AAeF,QAkCI,cAAc,GAlClB,cAAc,GAAG,wBAAC,eAAe,EAAE,KAAK,EAAK;AACzC,WAAO,UAAU,CAAC,eAAe,EAAE;AAC/B,YAAI,EAAE,KAAK,CAAC,QAAQ;AACpB,aAAK,EAAE,KAAK,CAAC,SAAS;AACtB,YAAI,EAAE,KAAK,CAAC,QAAQ;AACpB,YAAI,EAAE,KAAK,CAAC,QAAQ;KACvB,CAAC,CAAC;CACN;;;;;;;;;;;;;;;AAAC,AAeF,QAaI,gBAAgB,GAbpB,gBAAgB,GAAG,0BAAC,eAAe,EAAE,KAAK,EAAK;AAC3C,WAAO,UAAU,CAAC,eAAe,EAAE;AAC/B,YAAI,EAAE,KAAK,CAAC,UAAU;AACtB,aAAK,EAAE,KAAK,CAAC,WAAW;AACxB,YAAI,EAAE,KAAK,CAAC,UAAU;AACtB,YAAI,EAAE,KAAK,CAAC,UAAU;KACzB,CAAC,CAAC;CACN,CAAC;;QAGE,UAAU,GAAV,UAAU;QACV,aAAa,GAAb,aAAa;QACb,cAAc,GAAd,cAAc;QACd,gBAAgB,GAAhB,gBAAgB","file":"drawBorder.js","sourcesContent":["import _ from 'lodash';\n\nlet drawBorder,\n drawBorderBottom,\n drawBorderJoin,\n drawBorderTop;\n\n/**\n * @typedef drawBorder~parts\n * @property {string} left\n * @property {string} right\n * @property {string} body\n * @property {string} join\n */\n\n/**\n * @param {number[]} columnSizeIndex\n * @param {drawBorder~parts} parts\n * @returns {string}\n */\ndrawBorder = (columnSizeIndex, parts) => {\n let columns;\n\n columns = _.map(columnSizeIndex, (size) => {\n return _.repeat(parts.body, size);\n });\n\n columns = columns.join(parts.join);\n\n return parts.left + columns + parts.right + '\\n';\n};\n\n/**\n * @typedef drawBorderTop~parts\n * @property {string} topLeft\n * @property {string} topRight\n * @property {string} topBody\n * @property {string} topJoin\n */\n\n/**\n * @param {number[]} columnSizeIndex\n * @param {drawBorderTop~parts} parts\n * @return {string}\n */\ndrawBorderTop = (columnSizeIndex, parts) => {\n return drawBorder(columnSizeIndex, {\n left: parts.topLeft,\n right: parts.topRight,\n body: parts.topBody,\n join: parts.topJoin\n });\n};\n\n/**\n * @typedef drawBorderJoin~parts\n * @property {string} joinLeft\n * @property {string} joinRight\n * @property {string} joinBody\n * @property {string} joinJoin\n */\n\n/**\n * @param {number[]} columnSizeIndex\n * @param {drawBorderJoin~parts} parts\n * @returns {string}\n */\ndrawBorderJoin = (columnSizeIndex, parts) => {\n return drawBorder(columnSizeIndex, {\n left: parts.joinLeft,\n right: parts.joinRight,\n body: parts.joinBody,\n join: parts.joinJoin\n });\n};\n\n/**\n * @typedef drawBorderBottom~parts\n * @property {string} topLeft\n * @property {string} topRight\n * @property {string} topBody\n * @property {string} topJoin\n */\n\n/**\n * @param {number[]} columnSizeIndex\n * @param {drawBorderBottom~parts} parts\n * @returns {string}\n */\ndrawBorderBottom = (columnSizeIndex, parts) => {\n return drawBorder(columnSizeIndex, {\n left: parts.bottomLeft,\n right: parts.bottomRight,\n body: parts.bottomBody,\n join: parts.bottomJoin\n });\n};\n\nexport {\n drawBorder,\n drawBorderTop,\n drawBorderJoin,\n drawBorderBottom\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/drawRow.js b/node_modules/table/dist/drawRow.js index b4036f5..8e75bc2 100644 --- a/node_modules/table/dist/drawRow.js +++ b/node_modules/table/dist/drawRow.js @@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); + /** * @typedef {Object} drawRow~border * @property {string} bodyLeft @@ -13,12 +14,10 @@ Object.defineProperty(exports, "__esModule", { /** * @param {number[]} columns * @param {drawRow~border} border - * @return {string} + * @returns {string} */ - -exports.default = function (columns, border) { +exports.default = (columns, border) => { return border.bodyLeft + columns.join(border.bodyJoin) + border.bodyRight + '\n'; }; -module.exports = exports['default']; -//# sourceMappingURL=drawRow.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/drawRow.js.map b/node_modules/table/dist/drawRow.js.map deleted file mode 100644 index d3a5464..0000000 --- a/node_modules/table/dist/drawRow.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["drawRow.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;kBAYe,UAAC,OAAO,EAAE,MAAM,EAAK;AAChC,SAAO,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;CACpF","file":"drawRow.js","sourcesContent":["/**\n * @typedef {Object} drawRow~border\n * @property {string} bodyLeft\n * @property {string} bodyRight\n * @property {string} bodyJoin\n */\n\n/**\n * @param {number[]} columns\n * @param {drawRow~border} border\n * @return {string}\n */\nexport default (columns, border) => {\n return border.bodyLeft + columns.join(border.bodyJoin) + border.bodyRight + '\\n';\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/drawTable.js b/node_modules/table/dist/drawTable.js index 2420950..12b6a75 100644 --- a/node_modules/table/dist/drawTable.js +++ b/node_modules/table/dist/drawTable.js @@ -1,12 +1,12 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -var _forEach2 = require('lodash/forEach'); +var _lodash = require('lodash'); -var _forEach3 = _interopRequireDefault(_forEach2); +var _lodash2 = _interopRequireDefault(_lodash); var _drawBorder = require('./drawBorder'); @@ -24,45 +24,40 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * @param {Function} drawHorizontalLine * @returns {string} */ +exports.default = (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine) => { + let output, realRowIndex, rowHeight; -exports.default = function (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine) { - var output = undefined, - realRowIndex = undefined, - rowCount = undefined, - rowHeight = undefined; + const rowCount = rows.length; - rowCount = rows.length; + realRowIndex = 0; - realRowIndex = 0; + output = ''; - output = ''; + if (drawHorizontalLine(realRowIndex, rowCount)) { + output += (0, _drawBorder.drawBorderTop)(columnSizeIndex, border); + } - if (drawHorizontalLine(realRowIndex, rowCount)) { - output += (0, _drawBorder.drawBorderTop)(columnSizeIndex, border); - } - - (0, _forEach3.default)(rows, function (row, index0) { - output += (0, _drawRow2.default)(row, border); - - if (!rowHeight) { - rowHeight = rowSpanIndex[realRowIndex]; + _lodash2.default.forEach(rows, (row, index0) => { + output += (0, _drawRow2.default)(row, border); - realRowIndex++; - } + if (!rowHeight) { + rowHeight = rowSpanIndex[realRowIndex]; - rowHeight--; + realRowIndex++; + } - if (rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) { - output += (0, _drawBorder.drawBorderJoin)(columnSizeIndex, border); - } - }); + rowHeight--; - if (drawHorizontalLine(realRowIndex, rowCount)) { - output += (0, _drawBorder.drawBorderBottom)(columnSizeIndex, border); + if (rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) { + output += (0, _drawBorder.drawBorderJoin)(columnSizeIndex, border); } + }); + + if (drawHorizontalLine(realRowIndex, rowCount)) { + output += (0, _drawBorder.drawBorderBottom)(columnSizeIndex, border); + } - return output; + return output; }; -module.exports = exports['default']; -//# sourceMappingURL=drawTable.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/drawTable.js.map b/node_modules/table/dist/drawTable.js.map deleted file mode 100644 index 705e822..0000000 --- a/node_modules/table/dist/drawTable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["drawTable.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgBe,UAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAK;AAChF,QAAI,MAAM,YAAA;QACN,YAAY,YAAA;QACZ,QAAQ,YAAA;QACR,SAAS,YAAA,CAAC;;AAEd,YAAQ,GAAG,IAAI,CAAC,MAAM,CAAC;;AAEvB,gBAAY,GAAG,CAAC,CAAC;;AAEjB,UAAM,GAAG,EAAE,CAAC;;AAEZ,QAAI,kBAAkB,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE;AAC5C,cAAM,IAAI,gBA3Bd,aAAa,EA2Be,eAAe,EAAE,MAAM,CAAC,CAAC;KACpD;;AAED,2BAAU,IAAI,EAAE,UAAC,GAAG,EAAE,MAAM,EAAK;AAC7B,cAAM,IAAI,uBAAQ,GAAG,EAAE,MAAM,CAAC,CAAC;;AAE/B,YAAI,CAAC,SAAS,EAAE;AACZ,qBAAS,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;;AAEvC,wBAAY,EAAE,CAAC;SAClB;;AAED,iBAAS,EAAE,CAAC;;AAEZ,YAAI,SAAS,KAAK,CAAC,IAAI,MAAM,KAAK,QAAQ,GAAG,CAAC,IAAI,kBAAkB,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE;AAC1F,kBAAM,IAAI,gBAzClB,cAAc,EAyCmB,eAAe,EAAE,MAAM,CAAC,CAAC;SACrD;KACJ,CAAC,CAAC;;AAEH,QAAI,kBAAkB,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE;AAC5C,cAAM,IAAI,gBA7Cd,gBAAgB,EA6Ce,eAAe,EAAE,MAAM,CAAC,CAAC;KACvD;;AAED,WAAO,MAAM,CAAC;CACjB","file":"drawTable.js","sourcesContent":["import _ from 'lodash';\nimport {\n drawBorderTop,\n drawBorderJoin,\n drawBorderBottom\n} from './drawBorder';\nimport drawRow from './drawRow';\n\n/**\n * @param {Array} rows\n * @param {Object} border\n * @param {Array} columnSizeIndex\n * @param {Array} rowSpanIndex\n * @param {Function} drawHorizontalLine\n * @returns {string}\n */\nexport default (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine) => {\n let output,\n realRowIndex,\n rowCount,\n rowHeight;\n\n rowCount = rows.length;\n\n realRowIndex = 0;\n\n output = '';\n\n if (drawHorizontalLine(realRowIndex, rowCount)) {\n output += drawBorderTop(columnSizeIndex, border);\n }\n\n _.forEach(rows, (row, index0) => {\n output += drawRow(row, border);\n\n if (!rowHeight) {\n rowHeight = rowSpanIndex[realRowIndex];\n\n realRowIndex++;\n }\n\n rowHeight--;\n\n if (rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) {\n output += drawBorderJoin(columnSizeIndex, border);\n }\n });\n\n if (drawHorizontalLine(realRowIndex, rowCount)) {\n output += drawBorderBottom(columnSizeIndex, border);\n }\n\n return output;\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/getBorderCharacters.js b/node_modules/table/dist/getBorderCharacters.js index 0fc3f7e..21f4eb1 100644 --- a/node_modules/table/dist/getBorderCharacters.js +++ b/node_modules/table/dist/getBorderCharacters.js @@ -1,9 +1,10 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -/* eslint-disable sorting/sort-object-props */ + +/* eslint-disable sort-keys */ /** * @typedef border @@ -28,102 +29,100 @@ Object.defineProperty(exports, "__esModule", { * @param {string} name * @returns {border} */ - -exports.default = function (name) { - if (name === 'honeywell') { - return { - topBody: '═', - topJoin: '╤', - topLeft: '╔', - topRight: '╗', - - bottomBody: '═', - bottomJoin: '╧', - bottomLeft: '╚', - bottomRight: '╝', - - bodyLeft: '║', - bodyRight: '║', - bodyJoin: '│', - - joinBody: '─', - joinLeft: '╟', - joinRight: '╢', - joinJoin: '┼' - }; - } - - if (name === 'norc') { - return { - topBody: '─', - topJoin: '┬', - topLeft: '┌', - topRight: '┐', - - bottomBody: '─', - bottomJoin: '┴', - bottomLeft: '└', - bottomRight: '┘', - - bodyLeft: '│', - bodyRight: '│', - bodyJoin: '│', - - joinBody: '─', - joinLeft: '├', - joinRight: '┤', - joinJoin: '┼' - }; - } - - if (name === 'ramac') { - return { - topBody: '-', - topJoin: '+', - topLeft: '+', - topRight: '+', - - bottomBody: '-', - bottomJoin: '+', - bottomLeft: '+', - bottomRight: '+', - - bodyLeft: '|', - bodyRight: '|', - bodyJoin: '|', - - joinBody: '-', - joinLeft: '|', - joinRight: '|', - joinJoin: '|' - }; - } - - if (name === 'void') { - return { - topBody: '', - topJoin: '', - topLeft: '', - topRight: '', - - bottomBody: '', - bottomJoin: '', - bottomLeft: '', - bottomRight: '', - - bodyLeft: '', - bodyRight: '', - bodyJoin: '', - - joinBody: '', - joinLeft: '', - joinRight: '', - joinJoin: '' - }; - } - - throw new Error('Unknown border template "${name}".'); +exports.default = name => { + if (name === 'honeywell') { + return { + topBody: '═', + topJoin: '╤', + topLeft: '╔', + topRight: '╗', + + bottomBody: '═', + bottomJoin: '╧', + bottomLeft: '╚', + bottomRight: '╝', + + bodyLeft: '║', + bodyRight: '║', + bodyJoin: '│', + + joinBody: '─', + joinLeft: '╟', + joinRight: '╢', + joinJoin: '┼' + }; + } + + if (name === 'norc') { + return { + topBody: '─', + topJoin: '┬', + topLeft: '┌', + topRight: '┐', + + bottomBody: '─', + bottomJoin: '┴', + bottomLeft: '└', + bottomRight: '┘', + + bodyLeft: '│', + bodyRight: '│', + bodyJoin: '│', + + joinBody: '─', + joinLeft: '├', + joinRight: '┤', + joinJoin: '┼' + }; + } + + if (name === 'ramac') { + return { + topBody: '-', + topJoin: '+', + topLeft: '+', + topRight: '+', + + bottomBody: '-', + bottomJoin: '+', + bottomLeft: '+', + bottomRight: '+', + + bodyLeft: '|', + bodyRight: '|', + bodyJoin: '|', + + joinBody: '-', + joinLeft: '|', + joinRight: '|', + joinJoin: '|' + }; + } + + if (name === 'void') { + return { + topBody: '', + topJoin: '', + topLeft: '', + topRight: '', + + bottomBody: '', + bottomJoin: '', + bottomLeft: '', + bottomRight: '', + + bodyLeft: '', + bodyRight: '', + bodyJoin: '', + + joinBody: '', + joinLeft: '', + joinRight: '', + joinJoin: '' + }; + } + + throw new Error('Unknown border template "' + name + '".'); }; -module.exports = exports['default']; -//# sourceMappingURL=getBorderCharacters.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/getBorderCharacters.js.map b/node_modules/table/dist/getBorderCharacters.js.map deleted file mode 100644 index 3f0ae7c..0000000 --- a/node_modules/table/dist/getBorderCharacters.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["getBorderCharacters.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAyBe,UAAC,IAAI,EAAK;AACrB,QAAI,IAAI,KAAK,WAAW,EAAE;AACtB,eAAO;AACH,mBAAO,EAAE,GAAG;AACZ,mBAAO,EAAE,GAAG;AACZ,mBAAO,EAAE,GAAG;AACZ,oBAAQ,EAAE,GAAG;;AAEb,sBAAU,EAAE,GAAG;AACf,sBAAU,EAAE,GAAG;AACf,sBAAU,EAAE,GAAG;AACf,uBAAW,EAAE,GAAG;;AAEhB,oBAAQ,EAAE,GAAG;AACb,qBAAS,EAAE,GAAG;AACd,oBAAQ,EAAE,GAAG;;AAEb,oBAAQ,EAAE,GAAG;AACb,oBAAQ,EAAE,GAAG;AACb,qBAAS,EAAE,GAAG;AACd,oBAAQ,EAAE,GAAG;SAChB,CAAC;KACL;;AAED,QAAI,IAAI,KAAK,MAAM,EAAE;AACjB,eAAO;AACH,mBAAO,EAAE,GAAG;AACZ,mBAAO,EAAE,GAAG;AACZ,mBAAO,EAAE,GAAG;AACZ,oBAAQ,EAAE,GAAG;;AAEb,sBAAU,EAAE,GAAG;AACf,sBAAU,EAAE,GAAG;AACf,sBAAU,EAAE,GAAG;AACf,uBAAW,EAAE,GAAG;;AAEhB,oBAAQ,EAAE,GAAG;AACb,qBAAS,EAAE,GAAG;AACd,oBAAQ,EAAE,GAAG;;AAEb,oBAAQ,EAAE,GAAG;AACb,oBAAQ,EAAE,GAAG;AACb,qBAAS,EAAE,GAAG;AACd,oBAAQ,EAAE,GAAG;SAChB,CAAC;KACL;;AAED,QAAI,IAAI,KAAK,OAAO,EAAE;AAClB,eAAO;AACH,mBAAO,EAAE,GAAG;AACZ,mBAAO,EAAE,GAAG;AACZ,mBAAO,EAAE,GAAG;AACZ,oBAAQ,EAAE,GAAG;;AAEb,sBAAU,EAAE,GAAG;AACf,sBAAU,EAAE,GAAG;AACf,sBAAU,EAAE,GAAG;AACf,uBAAW,EAAE,GAAG;;AAEhB,oBAAQ,EAAE,GAAG;AACb,qBAAS,EAAE,GAAG;AACd,oBAAQ,EAAE,GAAG;;AAEb,oBAAQ,EAAE,GAAG;AACb,oBAAQ,EAAE,GAAG;AACb,qBAAS,EAAE,GAAG;AACd,oBAAQ,EAAE,GAAG;SAChB,CAAC;KACL;;AAED,QAAI,IAAI,KAAK,MAAM,EAAE;AACjB,eAAO;AACH,mBAAO,EAAE,EAAE;AACX,mBAAO,EAAE,EAAE;AACX,mBAAO,EAAE,EAAE;AACX,oBAAQ,EAAE,EAAE;;AAEZ,sBAAU,EAAE,EAAE;AACd,sBAAU,EAAE,EAAE;AACd,sBAAU,EAAE,EAAE;AACd,uBAAW,EAAE,EAAE;;AAEf,oBAAQ,EAAE,EAAE;AACZ,qBAAS,EAAE,EAAE;AACb,oBAAQ,EAAE,EAAE;;AAEZ,oBAAQ,EAAE,EAAE;AACZ,oBAAQ,EAAE,EAAE;AACZ,qBAAS,EAAE,EAAE;AACb,oBAAQ,EAAE,EAAE;SACf,CAAC;KACL;;AAED,UAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;CACzD","file":"getBorderCharacters.js","sourcesContent":["/* eslint-disable sorting/sort-object-props */\n\n/**\n * @typedef border\n * @property {string} topBody\n * @property {string} topJoin\n * @property {string} topLeft\n * @property {string} topRight\n * @property {string} bottomBody\n * @property {string} bottomJoin\n * @property {string} bottomLeft\n * @property {string} bottomRight\n * @property {string} bodyLeft\n * @property {string} bodyRight\n * @property {string} bodyJoin\n * @property {string} joinBody\n * @property {string} joinLeft\n * @property {string} joinRight\n * @property {string} joinJoin\n */\n\n/**\n * @param {string} name\n * @returns {border}\n */\nexport default (name) => {\n if (name === 'honeywell') {\n return {\n topBody: '═',\n topJoin: '╤',\n topLeft: '╔',\n topRight: '╗',\n\n bottomBody: '═',\n bottomJoin: '╧',\n bottomLeft: '╚',\n bottomRight: '╝',\n\n bodyLeft: '║',\n bodyRight: '║',\n bodyJoin: '│',\n\n joinBody: '─',\n joinLeft: '╟',\n joinRight: '╢',\n joinJoin: '┼'\n };\n }\n\n if (name === 'norc') {\n return {\n topBody: '─',\n topJoin: '┬',\n topLeft: '┌',\n topRight: '┐',\n\n bottomBody: '─',\n bottomJoin: '┴',\n bottomLeft: '└',\n bottomRight: '┘',\n\n bodyLeft: '│',\n bodyRight: '│',\n bodyJoin: '│',\n\n joinBody: '─',\n joinLeft: '├',\n joinRight: '┤',\n joinJoin: '┼'\n };\n }\n\n if (name === 'ramac') {\n return {\n topBody: '-',\n topJoin: '+',\n topLeft: '+',\n topRight: '+',\n\n bottomBody: '-',\n bottomJoin: '+',\n bottomLeft: '+',\n bottomRight: '+',\n\n bodyLeft: '|',\n bodyRight: '|',\n bodyJoin: '|',\n\n joinBody: '-',\n joinLeft: '|',\n joinRight: '|',\n joinJoin: '|'\n };\n }\n\n if (name === 'void') {\n return {\n topBody: '',\n topJoin: '',\n topLeft: '',\n topRight: '',\n\n bottomBody: '',\n bottomJoin: '',\n bottomLeft: '',\n bottomRight: '',\n\n bodyLeft: '',\n bodyRight: '',\n bodyJoin: '',\n\n joinBody: '',\n joinLeft: '',\n joinRight: '',\n joinJoin: ''\n };\n }\n\n throw new Error('Unknown border template \"${name}\".');\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/index.js b/node_modules/table/dist/index.js index b3462ea..f937e06 100644 --- a/node_modules/table/dist/index.js +++ b/node_modules/table/dist/index.js @@ -21,5 +21,4 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de exports.createStream = _createStream2.default; exports.getBorderCharacters = _getBorderCharacters2.default; -exports.default = _table2.default; -//# sourceMappingURL=index.js.map +exports.default = _table2.default; \ No newline at end of file diff --git a/node_modules/table/dist/index.js.map b/node_modules/table/dist/index.js.map deleted file mode 100644 index 9e3155e..0000000 --- a/node_modules/table/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;QAKI,YAAY;QACZ,mBAAmB","file":"index.js","sourcesContent":["import table from './table';\nimport createStream from './createStream';\nimport getBorderCharacters from './getBorderCharacters';\n\nexport {\n createStream,\n getBorderCharacters\n};\n\nexport default table;\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/makeConfig.js b/node_modules/table/dist/makeConfig.js index 1c9b9ba..45ad8e8 100644 --- a/node_modules/table/dist/makeConfig.js +++ b/node_modules/table/dist/makeConfig.js @@ -1,24 +1,12 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -var _cloneDeep2 = require('lodash/cloneDeep'); +var _lodash = require('lodash'); -var _cloneDeep3 = _interopRequireDefault(_cloneDeep2); - -var _isUndefined2 = require('lodash/isUndefined'); - -var _isUndefined3 = _interopRequireDefault(_isUndefined2); - -var _times2 = require('lodash/times'); - -var _times3 = _interopRequireDefault(_times2); - -var _assign2 = require('lodash/assign'); - -var _assign3 = _interopRequireDefault(_assign2); +var _lodash2 = _interopRequireDefault(_lodash); var _getBorderCharacters = require('./getBorderCharacters'); @@ -34,19 +22,16 @@ var _calculateMaximumColumnWidthIndex2 = _interopRequireDefault(_calculateMaximu function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var makeBorder = undefined, - makeColumns = undefined; - /** * Merges user provided border characters with the default border ("honeywell") characters. * * @param {Object} border * @returns {Object} */ -makeBorder = function makeBorder() { - var border = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; +const makeBorder = function makeBorder() { + let border = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - return (0, _assign3.default)({}, (0, _getBorderCharacters2.default)('honeywell'), border); + return _lodash2.default.assign({}, (0, _getBorderCharacters2.default)('honeywell'), border); }; /** @@ -58,30 +43,28 @@ makeBorder = function makeBorder() { * @param {Object} columnDefault * @returns {Object} */ -makeColumns = function makeColumns(rows) { - var columns = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - var columnDefault = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; - - var maximumColumnWidthIndex = undefined; - - maximumColumnWidthIndex = (0, _calculateMaximumColumnWidthIndex2.default)(rows); - - (0, _times3.default)(rows[0].length, function (index) { - if ((0, _isUndefined3.default)(columns[index])) { - columns[index] = {}; - } - - columns[index] = (0, _assign3.default)({ - alignment: 'left', - width: maximumColumnWidthIndex[index], - wrapWord: false, - truncate: Infinity, - paddingLeft: 1, - paddingRight: 1 - }, columnDefault, columns[index]); - }); - - return columns; +const makeColumns = function makeColumns(rows) { + let columns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + let columnDefault = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + const maximumColumnWidthIndex = (0, _calculateMaximumColumnWidthIndex2.default)(rows); + + _lodash2.default.times(rows[0].length, index => { + if (_lodash2.default.isUndefined(columns[index])) { + columns[index] = {}; + } + + columns[index] = _lodash2.default.assign({ + alignment: 'left', + paddingLeft: 1, + paddingRight: 1, + truncate: Infinity, + width: maximumColumnWidthIndex[index], + wrapWord: false + }, columnDefault, columns[index]); + }); + + return columns; }; /** @@ -94,28 +77,25 @@ makeColumns = function makeColumns(rows) { */ exports.default = function (rows) { - var userConfig = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var config = undefined; + let userConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - (0, _validateConfig2.default)(userConfig); + (0, _validateConfig2.default)('config.json', userConfig); - config = (0, _cloneDeep3.default)(userConfig); + const config = _lodash2.default.cloneDeep(userConfig); - config.border = makeBorder(config.border); - config.columns = makeColumns(rows, config.columns, config.columnDefault); + config.border = makeBorder(config.border); + config.columns = makeColumns(rows, config.columns, config.columnDefault); - if (!config.drawHorizontalLine) { - /** - * @returns {boolean} - */ - config.drawHorizontalLine = function () { - return true; - }; - } + if (!config.drawHorizontalLine) { + /** + * @returns {boolean} + */ + config.drawHorizontalLine = () => { + return true; + }; + } - return config; + return config; }; -module.exports = exports['default']; -//# sourceMappingURL=makeConfig.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/makeConfig.js.map b/node_modules/table/dist/makeConfig.js.map deleted file mode 100644 index f64b008..0000000 --- a/node_modules/table/dist/makeConfig.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["makeConfig.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAI,UAAU,YAAA;IACV,WAAW,YAAA;;;;;;;;AAAC,AAQhB,UAAU,GAAG,sBAAiB;QAAhB,MAAM,yDAAG,EAAE;;AACrB,WAAO,sBAAS,EAAE,EAAE,mCAAoB,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;CACjE;;;;;;;;;;;AAAC,AAWF,WAAW,GAAG,qBAAC,IAAI,EAAuC;QAArC,OAAO,yDAAG,EAAE;QAAE,aAAa,yDAAG,EAAE;;AACjD,QAAI,uBAAuB,YAAA,CAAC;;AAE5B,2BAAuB,GAAG,gDAAiC,IAAI,CAAC,CAAC;;AAEjE,yBAAQ,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,UAAC,KAAK,EAAK;AAC/B,YAAI,2BAAc,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE;AAC/B,mBAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;SACvB;;AAED,eAAO,CAAC,KAAK,CAAC,GAAG,sBAAS;AACtB,qBAAS,EAAE,MAAM;AACjB,iBAAK,EAAE,uBAAuB,CAAC,KAAK,CAAC;AACrC,oBAAQ,EAAE,KAAK;AACf,oBAAQ,EAAE,QAAQ;AAClB,uBAAW,EAAE,CAAC;AACd,wBAAY,EAAE,CAAC;SAClB,EAAE,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;KACrC,CAAC,CAAC;;AAEH,WAAO,OAAO,CAAC;CAClB;;;;;;;;;;AAAC;kBAUa,UAAC,IAAI,EAAsB;QAApB,UAAU,yDAAG,EAAE;;AACjC,QAAI,MAAM,YAAA,CAAC;;AAEX,kCAAe,UAAU,CAAC,CAAC;;AAE3B,UAAM,GAAG,yBAAY,UAAU,CAAC,CAAC;;AAEjC,UAAM,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC1C,UAAM,CAAC,OAAO,GAAG,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;;AAEzE,QAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE;;;;AAI5B,cAAM,CAAC,kBAAkB,GAAG,YAAM;AAC9B,mBAAO,IAAI,CAAC;SACf,CAAC;KACL;;AAED,WAAO,MAAM,CAAC;CACjB","file":"makeConfig.js","sourcesContent":["import _ from 'lodash';\nimport getBorderCharacters from './getBorderCharacters';\nimport validateConfig from './validateConfig';\nimport calculateMaximumColumnWidthIndex from './calculateMaximumColumnWidthIndex';\n\nlet makeBorder,\n makeColumns;\n\n/**\n * Merges user provided border characters with the default border (\"honeywell\") characters.\n *\n * @param {Object} border\n * @returns {Object}\n */\nmakeBorder = (border = {}) => {\n return _.assign({}, getBorderCharacters('honeywell'), border);\n};\n\n/**\n * Creates a configuration for every column using default\n * values for the missing configuration properties.\n *\n * @param {Array[]} rows\n * @param {Object} columns\n * @param {Object} columnDefault\n * @returns {Object}\n */\nmakeColumns = (rows, columns = {}, columnDefault = {}) => {\n let maximumColumnWidthIndex;\n\n maximumColumnWidthIndex = calculateMaximumColumnWidthIndex(rows);\n\n _.times(rows[0].length, (index) => {\n if (_.isUndefined(columns[index])) {\n columns[index] = {};\n }\n\n columns[index] = _.assign({\n alignment: 'left',\n width: maximumColumnWidthIndex[index],\n wrapWord: false,\n truncate: Infinity,\n paddingLeft: 1,\n paddingRight: 1\n }, columnDefault, columns[index]);\n });\n\n return columns;\n};\n\n/**\n * Makes a new configuration object out of the userConfig object\n * using default values for the missing configuration properties.\n *\n * @param {Array[]} rows\n * @param {Object} userConfig\n * @returns {Object}\n */\nexport default (rows, userConfig = {}) => {\n let config;\n\n validateConfig(userConfig);\n\n config = _.cloneDeep(userConfig);\n\n config.border = makeBorder(config.border);\n config.columns = makeColumns(rows, config.columns, config.columnDefault);\n\n if (!config.drawHorizontalLine) {\n /**\n * @returns {boolean}\n */\n config.drawHorizontalLine = () => {\n return true;\n };\n }\n\n return config;\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/makeStreamConfig.js b/node_modules/table/dist/makeStreamConfig.js index 49692a3..1482dae 100644 --- a/node_modules/table/dist/makeStreamConfig.js +++ b/node_modules/table/dist/makeStreamConfig.js @@ -1,48 +1,33 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -var _cloneDeep2 = require('lodash/cloneDeep'); +var _lodash = require('lodash'); -var _cloneDeep3 = _interopRequireDefault(_cloneDeep2); - -var _isUndefined2 = require('lodash/isUndefined'); - -var _isUndefined3 = _interopRequireDefault(_isUndefined2); - -var _times2 = require('lodash/times'); - -var _times3 = _interopRequireDefault(_times2); - -var _assign2 = require('lodash/assign'); - -var _assign3 = _interopRequireDefault(_assign2); +var _lodash2 = _interopRequireDefault(_lodash); var _getBorderCharacters = require('./getBorderCharacters'); var _getBorderCharacters2 = _interopRequireDefault(_getBorderCharacters); -var _validateStreamConfig = require('./validateStreamConfig'); +var _validateConfig = require('./validateConfig'); -var _validateStreamConfig2 = _interopRequireDefault(_validateStreamConfig); +var _validateConfig2 = _interopRequireDefault(_validateConfig); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var makeBorder = undefined, - makeColumns = undefined; - /** * Merges user provided border characters with the default border ("honeywell") characters. * * @param {Object} border * @returns {Object} */ -makeBorder = function makeBorder() { - var border = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; +const makeBorder = function makeBorder() { + let border = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - return (0, _assign3.default)({}, (0, _getBorderCharacters2.default)('honeywell'), border); + return _lodash2.default.assign({}, (0, _getBorderCharacters2.default)('honeywell'), border); }; /** @@ -54,26 +39,25 @@ makeBorder = function makeBorder() { * @param {Object} columnDefault * @returns {Object} */ -makeColumns = function makeColumns(columnCount) { - var columns = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - var columnDefault = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; - - (0, _times3.default)(columnCount, function (index) { - if ((0, _isUndefined3.default)(columns[index])) { - columns[index] = {}; - } - - columns[index] = (0, _assign3.default)({ - alignment: 'left', - // width: columnDefault.width, - wrapWord: false, - truncate: Infinity, - paddingLeft: 1, - paddingRight: 1 - }, columnDefault, columns[index]); - }); - - return columns; +const makeColumns = function makeColumns(columnCount) { + let columns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + let columnDefault = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + _lodash2.default.times(columnCount, index => { + if (_lodash2.default.isUndefined(columns[index])) { + columns[index] = {}; + } + + columns[index] = _lodash2.default.assign({ + alignment: 'left', + paddingLeft: 1, + paddingRight: 1, + truncate: Infinity, + wrapWord: false + }, columnDefault, columns[index]); + }); + + return columns; }; /** @@ -102,27 +86,24 @@ makeColumns = function makeColumns(columnCount) { */ exports.default = function () { - var userConfig = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + let userConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var config = undefined; + (0, _validateConfig2.default)('streamConfig.json', userConfig); - (0, _validateStreamConfig2.default)(userConfig); + const config = _lodash2.default.cloneDeep(userConfig); - config = (0, _cloneDeep3.default)(userConfig); + if (!config.columnDefault || !config.columnDefault.width) { + throw new Error('Must provide config.columnDefault.width when creating a stream.'); + } - if (!config.columnDefault || !config.columnDefault.width) { - throw new Error('Must provide config.columnDefault.width when creating a stream.'); - } - - if (!config.columnCount) { - throw new Error('Must provide config.columnCount.'); - } + if (!config.columnCount) { + throw new Error('Must provide config.columnCount.'); + } - config.border = makeBorder(config.border); - config.columns = makeColumns(config.columnCount, config.columns, config.columnDefault); + config.border = makeBorder(config.border); + config.columns = makeColumns(config.columnCount, config.columns, config.columnDefault); - return config; + return config; }; -module.exports = exports['default']; -//# sourceMappingURL=makeStreamConfig.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/makeStreamConfig.js.map b/node_modules/table/dist/makeStreamConfig.js.map deleted file mode 100644 index 4ab4ef8..0000000 --- a/node_modules/table/dist/makeStreamConfig.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["makeStreamConfig.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAI,UAAU,YAAA;IACV,WAAW,YAAA;;;;;;;;AAAC,AAQhB,UAAU,GAAG,sBAAiB;QAAhB,MAAM,yDAAG,EAAE;;AACrB,WAAO,sBAAS,EAAE,EAAE,mCAAoB,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;CACjE;;;;;;;;;;;AAAC,AAWF,WAAW,GAAG,qBAAC,WAAW,EAAuC;QAArC,OAAO,yDAAG,EAAE;QAAE,aAAa,yDAAG,EAAE;;AACxD,yBAAQ,WAAW,EAAE,UAAC,KAAK,EAAK;AAC5B,YAAI,2BAAc,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE;AAC/B,mBAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;SACvB;;AAED,eAAO,CAAC,KAAK,CAAC,GAAG,sBAAS;AACtB,qBAAS,EAAE,MAAM;;AAEjB,oBAAQ,EAAE,KAAK;AACf,oBAAQ,EAAE,QAAQ;AAClB,uBAAW,EAAE,CAAC;AACd,wBAAY,EAAE,CAAC;SAClB,EAAE,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;KACrC,CAAC,CAAC;;AAEH,WAAO,OAAO,CAAC;CAClB;;;;;;;;;;;;;;;;;;;;;;;;;;AAAC;kBA0Ba,YAAqB;QAApB,UAAU,yDAAG,EAAE;;AAC3B,QAAI,MAAM,YAAA,CAAC;;AAEX,wCAAqB,UAAU,CAAC,CAAC;;AAEjC,UAAM,GAAG,yBAAY,UAAU,CAAC,CAAC;;AAEjC,QAAI,CAAC,MAAM,CAAC,aAAa,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE;AACtD,cAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;KACtF;;AAED,QAAI,CAAC,MAAM,CAAC,WAAW,EAAE;AACrB,cAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;KACvD;;AAED,UAAM,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC1C,UAAM,CAAC,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;;AAEvF,WAAO,MAAM,CAAC;CACjB","file":"makeStreamConfig.js","sourcesContent":["import _ from 'lodash';\nimport getBorderCharacters from './getBorderCharacters';\nimport validateStreamConfig from './validateStreamConfig';\n\nlet makeBorder,\n makeColumns;\n\n/**\n * Merges user provided border characters with the default border (\"honeywell\") characters.\n *\n * @param {Object} border\n * @returns {Object}\n */\nmakeBorder = (border = {}) => {\n return _.assign({}, getBorderCharacters('honeywell'), border);\n};\n\n/**\n * Creates a configuration for every column using default\n * values for the missing configuration properties.\n *\n * @param {number} columnCount\n * @param {Object} columns\n * @param {Object} columnDefault\n * @returns {Object}\n */\nmakeColumns = (columnCount, columns = {}, columnDefault = {}) => {\n _.times(columnCount, (index) => {\n if (_.isUndefined(columns[index])) {\n columns[index] = {};\n }\n\n columns[index] = _.assign({\n alignment: 'left',\n // width: columnDefault.width,\n wrapWord: false,\n truncate: Infinity,\n paddingLeft: 1,\n paddingRight: 1\n }, columnDefault, columns[index]);\n });\n\n return columns;\n};\n\n/**\n * @typedef {Object} columnConfig\n * @property {string} alignment\n * @property {number} width\n * @property {number} truncate\n * @property {number} paddingLeft\n * @property {number} paddingRight\n */\n\n/**\n * @typedef {Object} streamConfig\n * @property {columnConfig} columnDefault\n * @property {Object} border\n * @property {columnConfig[]}\n * @property {number} columnCount Number of columns in the table (required).\n */\n\n/**\n * Makes a new configuration object out of the userConfig object\n * using default values for the missing configuration properties.\n *\n * @param {streamConfig} userConfig\n * @returns {Object}\n */\nexport default (userConfig = {}) => {\n let config;\n\n validateStreamConfig(userConfig);\n\n config = _.cloneDeep(userConfig);\n\n if (!config.columnDefault || !config.columnDefault.width) {\n throw new Error('Must provide config.columnDefault.width when creating a stream.');\n }\n\n if (!config.columnCount) {\n throw new Error('Must provide config.columnCount.');\n }\n\n config.border = makeBorder(config.border);\n config.columns = makeColumns(config.columnCount, config.columns, config.columnDefault);\n\n return config;\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/mapDataUsingRowHeightIndex.js b/node_modules/table/dist/mapDataUsingRowHeightIndex.js index f260ca6..fb1c091 100644 --- a/node_modules/table/dist/mapDataUsingRowHeightIndex.js +++ b/node_modules/table/dist/mapDataUsingRowHeightIndex.js @@ -1,24 +1,12 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -var _flatten2 = require('lodash/flatten'); +var _lodash = require('lodash'); -var _flatten3 = _interopRequireDefault(_flatten2); - -var _forEach2 = require('lodash/forEach'); - -var _forEach3 = _interopRequireDefault(_forEach2); - -var _fill2 = require('lodash/fill'); - -var _fill3 = _interopRequireDefault(_fill2); - -var _map2 = require('lodash/map'); - -var _map3 = _interopRequireDefault(_map2); +var _lodash2 = _interopRequireDefault(_lodash); var _wrapString = require('./wrapString'); @@ -34,53 +22,38 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * @param {Array} unmappedRows * @param {number[]} rowHeightIndex * @param {Object} config - * @return {Array} + * @returns {Array} */ +exports.default = (unmappedRows, rowHeightIndex, config) => { + const tableWidth = unmappedRows[0].length; -exports.default = function (unmappedRows, rowHeightIndex, config) { - var mappedRows = undefined, - tableWidth = undefined; - - tableWidth = unmappedRows[0].length; - - // console.log('unmappedRows', unmappedRows, 'rowHeightIndex', rowHeightIndex, 'config', config, 'tableWidth', tableWidth); - - mappedRows = (0, _map3.default)(unmappedRows, function (cells, index0) { - var rowHeight = undefined; - - rowHeight = (0, _map3.default)(Array(rowHeightIndex[index0]), function () { - return (0, _fill3.default)(Array(tableWidth), ''); - }); - - // console.log('rowHeight', rowHeight); - - // rowHeight - // [{row index within rowSaw; index2}] - // [{cell index within a virtual row; index1}] - - (0, _forEach3.default)(cells, function (value, index1) { - var chunkedValue = undefined; - - if (config.columns[index1].wrapWord) { - chunkedValue = (0, _wrapWord2.default)(value, config.columns[index1].width); - } else { - chunkedValue = (0, _wrapString2.default)(value, config.columns[index1].width); - } + const mappedRows = _lodash2.default.map(unmappedRows, (cells, index0) => { + const rowHeight = _lodash2.default.times(rowHeightIndex[index0], () => { + return _lodash2.default.fill(Array(tableWidth), ''); + }); - // console.log('chunkedValue', chunkedValue.length, 'rowHeight', rowHeight.length); + // rowHeight + // [{row index within rowSaw; index2}] + // [{cell index within a virtual row; index1}] - (0, _forEach3.default)(chunkedValue, function (part, index2) { - // console.log(rowHeight[index2]); + _lodash2.default.forEach(cells, (value, index1) => { + let chunkedValue; - rowHeight[index2][index1] = part; - }); - }); + if (config.columns[index1].wrapWord) { + chunkedValue = (0, _wrapWord2.default)(value, config.columns[index1].width); + } else { + chunkedValue = (0, _wrapString2.default)(value, config.columns[index1].width); + } - return rowHeight; + _lodash2.default.forEach(chunkedValue, (part, index2) => { + rowHeight[index2][index1] = part; + }); }); - return (0, _flatten3.default)(mappedRows); + return rowHeight; + }); + + return _lodash2.default.flatten(mappedRows); }; -module.exports = exports['default']; -//# sourceMappingURL=mapDataUsingRowHeightIndex.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/mapDataUsingRowHeightIndex.js.map b/node_modules/table/dist/mapDataUsingRowHeightIndex.js.map deleted file mode 100644 index 68b34b6..0000000 --- a/node_modules/table/dist/mapDataUsingRowHeightIndex.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["mapDataUsingRowHeightIndex.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAUe,UAAC,YAAY,EAAE,cAAc,EAAE,MAAM,EAAK;AACrD,QAAI,UAAU,YAAA;QACV,UAAU,YAAA,CAAC;;AAEf,cAAU,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM;;;;AAAC,AAIpC,cAAU,GAAG,mBAAM,YAAY,EAAE,UAAC,KAAK,EAAE,MAAM,EAAK;AAChD,YAAI,SAAS,YAAA,CAAC;;AAEd,iBAAS,GAAG,mBAAM,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,YAAM;AACnD,mBAAO,oBAAO,KAAK,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC;SACxC,CAAC;;;;;;;;AAAC,AAQH,+BAAU,KAAK,EAAE,UAAC,KAAK,EAAE,MAAM,EAAK;AAChC,gBAAI,YAAY,YAAA,CAAC;;AAEjB,gBAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;AACjC,4BAAY,GAAG,wBAAS,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;aAChE,MAAM;AACH,4BAAY,GAAG,0BAAW,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;aAClE;;;;AAAA,AAID,mCAAU,YAAY,EAAE,UAAC,IAAI,EAAE,MAAM,EAAK;;;AAGtC,yBAAS,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;aACpC,CAAC,CAAC;SACN,CAAC,CAAC;;AAEH,eAAO,SAAS,CAAC;KACpB,CAAC,CAAC;;AAEH,WAAO,uBAAU,UAAU,CAAC,CAAC;CAChC","file":"mapDataUsingRowHeightIndex.js","sourcesContent":["import _ from 'lodash';\nimport wrapString from './wrapString';\nimport wrapWord from './wrapWord';\n\n/**\n * @param {Array} unmappedRows\n * @param {number[]} rowHeightIndex\n * @param {Object} config\n * @return {Array}\n */\nexport default (unmappedRows, rowHeightIndex, config) => {\n let mappedRows,\n tableWidth;\n\n tableWidth = unmappedRows[0].length;\n\n // console.log('unmappedRows', unmappedRows, 'rowHeightIndex', rowHeightIndex, 'config', config, 'tableWidth', tableWidth);\n\n mappedRows = _.map(unmappedRows, (cells, index0) => {\n let rowHeight;\n\n rowHeight = _.map(Array(rowHeightIndex[index0]), () => {\n return _.fill(Array(tableWidth), '');\n });\n\n // console.log('rowHeight', rowHeight);\n\n // rowHeight\n // [{row index within rowSaw; index2}]\n // [{cell index within a virtual row; index1}]\n\n _.forEach(cells, (value, index1) => {\n let chunkedValue;\n\n if (config.columns[index1].wrapWord) {\n chunkedValue = wrapWord(value, config.columns[index1].width);\n } else {\n chunkedValue = wrapString(value, config.columns[index1].width);\n }\n\n // console.log('chunkedValue', chunkedValue.length, 'rowHeight', rowHeight.length);\n\n _.forEach(chunkedValue, (part, index2) => {\n // console.log(rowHeight[index2]);\n\n rowHeight[index2][index1] = part;\n });\n });\n\n return rowHeight;\n });\n\n return _.flatten(mappedRows);\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/padTableData.js b/node_modules/table/dist/padTableData.js index f96dc04..5132421 100644 --- a/node_modules/table/dist/padTableData.js +++ b/node_modules/table/dist/padTableData.js @@ -1,36 +1,28 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -var _repeat2 = require('lodash/repeat'); +var _lodash = require('lodash'); -var _repeat3 = _interopRequireDefault(_repeat2); - -var _map2 = require('lodash/map'); - -var _map3 = _interopRequireDefault(_map2); +var _lodash2 = _interopRequireDefault(_lodash); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * @param {table~row[]} rows * @param {Object} config - * @return {table~row[]} + * @returns {table~row[]} */ +exports.default = (rows, config) => { + return _lodash2.default.map(rows, cells => { + return _lodash2.default.map(cells, (value, index1) => { + const column = config.columns[index1]; -exports.default = function (rows, config) { - return (0, _map3.default)(rows, function (cells) { - return (0, _map3.default)(cells, function (value, index1) { - var column = undefined; - - column = config.columns[index1]; - - return (0, _repeat3.default)(' ', column.paddingLeft) + value + (0, _repeat3.default)(' ', column.paddingRight); - }); + return _lodash2.default.repeat(' ', column.paddingLeft) + value + _lodash2.default.repeat(' ', column.paddingRight); }); + }); }; -module.exports = exports['default']; -//# sourceMappingURL=padTableData.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/padTableData.js.map b/node_modules/table/dist/padTableData.js.map deleted file mode 100644 index 6d456f1..0000000 --- a/node_modules/table/dist/padTableData.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["padTableData.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;kBAOe,UAAC,IAAI,EAAE,MAAM,EAAK;AAC7B,WAAO,mBAAM,IAAI,EAAE,UAAC,KAAK,EAAK;AAC1B,eAAO,mBAAM,KAAK,EAAE,UAAC,KAAK,EAAE,MAAM,EAAK;AACnC,gBAAI,MAAM,YAAA,CAAC;;AAEX,kBAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;;AAEhC,mBAAO,sBAAS,GAAG,EAAE,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,GAAG,sBAAS,GAAG,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;SACzF,CAAC,CAAC;KACN,CAAC,CAAC;CACN","file":"padTableData.js","sourcesContent":["import _ from 'lodash';\n\n/**\n * @param {table~row[]} rows\n * @param {Object} config\n * @return {table~row[]}\n */\nexport default (rows, config) => {\n return _.map(rows, (cells) => {\n return _.map(cells, (value, index1) => {\n let column;\n\n column = config.columns[index1];\n\n return _.repeat(' ', column.paddingLeft) + value + _.repeat(' ', column.paddingRight);\n });\n });\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/schemas/config.json b/node_modules/table/dist/schemas/config.json index 7ee700c..c71fed5 100644 --- a/node_modules/table/dist/schemas/config.json +++ b/node_modules/table/dist/schemas/config.json @@ -1,4 +1,6 @@ { + "id": "config.json", + "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "border": { @@ -11,7 +13,7 @@ "$ref": "#/definitions/column" }, "drawHorizontalLine": { - "type": "function" + "typeof": "function" } }, "additionalProperties": false, diff --git a/node_modules/table/dist/schemas/streamConfig.json b/node_modules/table/dist/schemas/streamConfig.json index 5c4e133..878f3fc 100644 --- a/node_modules/table/dist/schemas/streamConfig.json +++ b/node_modules/table/dist/schemas/streamConfig.json @@ -1,4 +1,6 @@ { + "id": "streamConfig.json", + "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "border": { diff --git a/node_modules/table/dist/stringifyTableData.js b/node_modules/table/dist/stringifyTableData.js index c1a2cf8..2600f95 100644 --- a/node_modules/table/dist/stringifyTableData.js +++ b/node_modules/table/dist/stringifyTableData.js @@ -1,12 +1,12 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -var _map2 = require('lodash/map'); +var _lodash = require('lodash'); -var _map3 = _interopRequireDefault(_map2); +var _lodash2 = _interopRequireDefault(_lodash); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -14,14 +14,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * Casts all cell values to a string. * * @param {table~row[]} rows - * @return {table~row[]} + * @returns {table~row[]} */ - -exports.default = function (rows) { - return (0, _map3.default)(rows, function (cells) { - return (0, _map3.default)(cells, String); - }); +exports.default = rows => { + return _lodash2.default.map(rows, cells => { + return _lodash2.default.map(cells, String); + }); }; -module.exports = exports['default']; -//# sourceMappingURL=stringifyTableData.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/stringifyTableData.js.map b/node_modules/table/dist/stringifyTableData.js.map deleted file mode 100644 index 89606f4..0000000 --- a/node_modules/table/dist/stringifyTableData.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["stringifyTableData.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;kBAQe,UAAC,IAAI,EAAK;AACrB,WAAO,mBAAM,IAAI,EAAE,UAAC,KAAK,EAAK;AAC1B,eAAO,mBAAM,KAAK,EAAE,MAAM,CAAC,CAAC;KAC/B,CAAC,CAAC;CACN","file":"stringifyTableData.js","sourcesContent":["import _ from 'lodash';\n\n/**\n * Casts all cell values to a string.\n *\n * @param {table~row[]} rows\n * @return {table~row[]}\n */\nexport default (rows) => {\n return _.map(rows, (cells) => {\n return _.map(cells, String);\n });\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/table.js b/node_modules/table/dist/table.js index 58239ce..b62ffd2 100644 --- a/node_modules/table/dist/table.js +++ b/node_modules/table/dist/table.js @@ -90,7 +90,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * @typedef {Function} drawHorizontalLine * @param {number} index * @param {number} size - * @return {boolean} + * @returns {boolean} */ /** @@ -106,35 +106,30 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * * @param {table~row[]} data * @param {table~config} userConfig - * @return {string} + * @returns {string} */ - exports.default = function (data) { - var userConfig = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + let userConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var cellWidthIndex = undefined, - config = undefined, - rowHeightIndex = undefined, - rows = undefined; + let rows; (0, _validateTableData2.default)(data); rows = (0, _stringifyTableData2.default)(data); - config = (0, _makeConfig2.default)(rows, userConfig); + const config = (0, _makeConfig2.default)(rows, userConfig); rows = (0, _truncateTableData2.default)(data, config); - rowHeightIndex = (0, _calculateRowHeightIndex2.default)(rows, config); + const rowHeightIndex = (0, _calculateRowHeightIndex2.default)(rows, config); rows = (0, _mapDataUsingRowHeightIndex2.default)(rows, rowHeightIndex, config); rows = (0, _alignTableData2.default)(rows, config); rows = (0, _padTableData2.default)(rows, config); - cellWidthIndex = (0, _calculateCellWidthIndex2.default)(rows[0]); + const cellWidthIndex = (0, _calculateCellWidthIndex2.default)(rows[0]); return (0, _drawTable2.default)(rows, config.border, cellWidthIndex, rowHeightIndex, config.drawHorizontalLine); }; -module.exports = exports['default']; -//# sourceMappingURL=table.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/table.js.map b/node_modules/table/dist/table.js.map deleted file mode 100644 index 069d4c1..0000000 --- a/node_modules/table/dist/table.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["table.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAyEe,UAAC,IAAI,EAAsB;MAApB,UAAU,yDAAG,EAAE;;AACjC,MAAI,cAAc,YAAA;MACd,MAAM,YAAA;MACN,cAAc,YAAA;MACd,IAAI,YAAA,CAAC;;AAET,mCAAkB,IAAI,CAAC,CAAC;;AAExB,MAAI,GAAG,kCAAmB,IAAI,CAAC,CAAC;;AAEhC,QAAM,GAAG,0BAAW,IAAI,EAAE,UAAU,CAAC,CAAC;;AAEtC,MAAI,GAAG,iCAAkB,IAAI,EAAE,MAAM,CAAC,CAAC;;AAEvC,gBAAc,GAAG,uCAAwB,IAAI,EAAE,MAAM,CAAC,CAAC;;AAEvD,MAAI,GAAG,0CAA2B,IAAI,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;AAChE,MAAI,GAAG,8BAAe,IAAI,EAAE,MAAM,CAAC,CAAC;AACpC,MAAI,GAAG,4BAAa,IAAI,EAAE,MAAM,CAAC,CAAC;;AAElC,gBAAc,GAAG,uCAAwB,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;;AAElD,SAAO,yBAAU,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,CAAC,kBAAkB,CAAC,CAAC;CACpG","file":"table.js","sourcesContent":["import drawTable from './drawTable';\nimport calculateCellWidthIndex from './calculateCellWidthIndex';\nimport makeConfig from './makeConfig';\nimport calculateRowHeightIndex from './calculateRowHeightIndex';\nimport mapDataUsingRowHeightIndex from './mapDataUsingRowHeightIndex';\nimport alignTableData from './alignTableData';\nimport padTableData from './padTableData';\nimport validateTableData from './validateTableData';\nimport stringifyTableData from './stringifyTableData';\nimport truncateTableData from './truncateTableData';\n\n/**\n * @typedef {string} table~cell\n */\n\n/**\n * @typedef {table~cell[]} table~row\n */\n\n/**\n * @typedef {Object} table~columns\n * @property {string} alignment Cell content alignment (enum: left, center, right) (default: left).\n * @property {number} width Column width (default: auto).\n * @property {number} truncate Number of characters are which the content will be truncated (default: Infinity).\n * @property {number} paddingLeft Cell content padding width left (default: 1).\n * @property {number} paddingRight Cell content padding width right (default: 1).\n */\n\n/**\n * @typedef {Object} table~border\n * @property {string} topBody\n * @property {string} topJoin\n * @property {string} topLeft\n * @property {string} topRight\n * @property {string} bottomBody\n * @property {string} bottomJoin\n * @property {string} bottomLeft\n * @property {string} bottomRight\n * @property {string} bodyLeft\n * @property {string} bodyRight\n * @property {string} bodyJoin\n * @property {string} joinBody\n * @property {string} joinLeft\n * @property {string} joinRight\n * @property {string} joinJoin\n */\n\n/**\n * Used to tell whether to draw a horizontal line.\n * This callback is called for each non-content line of the table.\n * The default behavior is to always return true.\n *\n * @typedef {Function} drawHorizontalLine\n * @param {number} index\n * @param {number} size\n * @return {boolean}\n */\n\n/**\n * @typedef {Object} table~config\n * @property {table~border} border\n * @property {table~columns[]} columns Column specific configuration.\n * @property {table~columns} columnDefault Default values for all columns. Column specific settings overwrite the default values.\n * @property {table~drawHorizontalLine} drawHorizontalLine\n */\n\n/**\n * Generates a text table.\n *\n * @param {table~row[]} data\n * @param {table~config} userConfig\n * @return {string}\n */\nexport default (data, userConfig = {}) => {\n let cellWidthIndex,\n config,\n rowHeightIndex,\n rows;\n\n validateTableData(data);\n\n rows = stringifyTableData(data);\n\n config = makeConfig(rows, userConfig);\n\n rows = truncateTableData(data, config);\n\n rowHeightIndex = calculateRowHeightIndex(rows, config);\n\n rows = mapDataUsingRowHeightIndex(rows, rowHeightIndex, config);\n rows = alignTableData(rows, config);\n rows = padTableData(rows, config);\n\n cellWidthIndex = calculateCellWidthIndex(rows[0]);\n\n return drawTable(rows, config.border, cellWidthIndex, rowHeightIndex, config.drawHorizontalLine);\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/truncateTableData.js b/node_modules/table/dist/truncateTableData.js index 4b1afc9..4bc197d 100644 --- a/node_modules/table/dist/truncateTableData.js +++ b/node_modules/table/dist/truncateTableData.js @@ -1,16 +1,12 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -var _truncate2 = require('lodash/truncate'); +var _lodash = require('lodash'); -var _truncate3 = _interopRequireDefault(_truncate2); - -var _map2 = require('lodash/map'); - -var _map3 = _interopRequireDefault(_map2); +var _lodash2 = _interopRequireDefault(_lodash); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -18,18 +14,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * @todo Make it work with ASCII content. * @param {table~row[]} rows * @param {Object} config - * @return {table~row[]} + * @returns {table~row[]} */ - -exports.default = function (rows, config) { - return (0, _map3.default)(rows, function (cells) { - return (0, _map3.default)(cells, function (content, index) { - return (0, _truncate3.default)(content, { - length: config.columns[index].truncate - }); - }); +exports.default = (rows, config) => { + return _lodash2.default.map(rows, cells => { + return _lodash2.default.map(cells, (content, index) => { + return _lodash2.default.truncate(content, { + length: config.columns[index].truncate + }); }); + }); }; -module.exports = exports['default']; -//# sourceMappingURL=truncateTableData.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/truncateTableData.js.map b/node_modules/table/dist/truncateTableData.js.map deleted file mode 100644 index 1abbb32..0000000 --- a/node_modules/table/dist/truncateTableData.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["truncateTableData.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;kBAQe,UAAC,IAAI,EAAE,MAAM,EAAK;AAC7B,WAAO,mBAAM,IAAI,EAAE,UAAC,KAAK,EAAK;AAC1B,eAAO,mBAAM,KAAK,EAAE,UAAC,OAAO,EAAE,KAAK,EAAK;AACpC,mBAAO,wBAAW,OAAO,EAAE;AACvB,sBAAM,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ;aACzC,CAAC,CAAC;SACN,CAAC,CAAC;KACN,CAAC,CAAC;CACN","file":"truncateTableData.js","sourcesContent":["import _ from 'lodash';\n\n/**\n * @todo Make it work with ASCII content.\n * @param {table~row[]} rows\n * @param {Object} config\n * @return {table~row[]}\n */\nexport default (rows, config) => {\n return _.map(rows, (cells) => {\n return _.map(cells, (content, index) => {\n return _.truncate(content, {\n length: config.columns[index].truncate\n });\n });\n });\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/validateConfig.js b/node_modules/table/dist/validateConfig.js index f399f37..caba301 100644 --- a/node_modules/table/dist/validateConfig.js +++ b/node_modules/table/dist/validateConfig.js @@ -1,53 +1,756 @@ 'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _config = require('./schemas/config.json'); - -var _config2 = _interopRequireDefault(_config); - -var _tv = require('tv4'); - -var _tv2 = _interopRequireDefault(_tv); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * @typedef {string} cell - */ - -/** - * @typedef {cell[]} validateData~column - */ - -/** - * @param {formatData~config} config - * @returns {undefined} - */ - -exports.default = function () { - var config = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - - var result = undefined; - - result = _tv2.default.validateResult(config, _config2.default); - - if (!result.valid) { - /* eslint-disable no-console */ - console.log('config', config); - console.log('error', { - message: result.error.message, - params: result.error.params, - dataPath: result.error.dataPath, - schemaPath: result.error.schemaPath - }); - /* eslint-enable no-console */ - - throw new Error('Invalid config.'); +var equal = require('ajv/lib/compile/equal'); +var validate = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + var refVal = []; + var refVal1 = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + var vErrors = null; + var errors = 0; + if (rootData === undefined) rootData = data; + if ((data && typeof data === "object" && !Array.isArray(data))) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(false || validate.schema.properties[key0]); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: 'additionalProperties', + dataPath: (dataPath || '') + "", + schemaPath: '#/additionalProperties', + params: { + additionalProperty: '' + key0 + '' + }, + message: 'should NOT have additional properties' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + } + if (data.topBody !== undefined) { + var errs_1 = errors; + if (!refVal2(data.topBody, (dataPath || '') + '.topBody', data, 'topBody', rootData)) { + if (vErrors === null) vErrors = refVal2.errors; + else vErrors = vErrors.concat(refVal2.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topJoin !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.topJoin, (dataPath || '') + '.topJoin', data, 'topJoin', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topLeft !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.topLeft, (dataPath || '') + '.topLeft', data, 'topLeft', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topRight !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.topRight, (dataPath || '') + '.topRight', data, 'topRight', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomBody !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bottomBody, (dataPath || '') + '.bottomBody', data, 'bottomBody', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomJoin !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bottomJoin, (dataPath || '') + '.bottomJoin', data, 'bottomJoin', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomLeft !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bottomLeft, (dataPath || '') + '.bottomLeft', data, 'bottomLeft', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomRight !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bottomRight, (dataPath || '') + '.bottomRight', data, 'bottomRight', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyLeft !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bodyLeft, (dataPath || '') + '.bodyLeft', data, 'bodyLeft', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyRight !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bodyRight, (dataPath || '') + '.bodyRight', data, 'bodyRight', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyJoin !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bodyJoin, (dataPath || '') + '.bodyJoin', data, 'bodyJoin', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinBody !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.joinBody, (dataPath || '') + '.joinBody', data, 'joinBody', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinLeft !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.joinLeft, (dataPath || '') + '.joinLeft', data, 'joinLeft', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinRight !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.joinRight, (dataPath || '') + '.joinRight', data, 'joinRight', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinJoin !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.joinJoin, (dataPath || '') + '.joinJoin', data, 'joinJoin', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'object' + }, + message: 'should be object' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + validate.errors = vErrors; + return errors === 0; + }; + })(); + refVal1.schema = { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }; + refVal1.errors = null; + refVal[1] = refVal1; + var refVal2 = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + var vErrors = null; + var errors = 0; + if (rootData === undefined) rootData = data; + if (typeof data !== "string") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'string' + }, + message: 'should be string' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + validate.errors = vErrors; + return errors === 0; + }; + })(); + refVal2.schema = { + "type": "string" + }; + refVal2.errors = null; + refVal[2] = refVal2; + var refVal3 = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + var vErrors = null; + var errors = 0; + if (rootData === undefined) rootData = data; + if ((data && typeof data === "object" && !Array.isArray(data))) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(false || pattern0.test(key0)); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: 'additionalProperties', + dataPath: (dataPath || '') + "", + schemaPath: '#/additionalProperties', + params: { + additionalProperty: '' + key0 + '' + }, + message: 'should NOT have additional properties' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + } + for (var key0 in data) { + if (pattern0.test(key0)) { + var errs_1 = errors; + if (!refVal4(data[key0], (dataPath || '') + '[\'' + key0 + '\']', data, key0, rootData)) { + if (vErrors === null) vErrors = refVal4.errors; + else vErrors = vErrors.concat(refVal4.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + } + } else { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'object' + }, + message: 'should be object' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + validate.errors = vErrors; + return errors === 0; + }; + })(); + refVal3.schema = { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }; + refVal3.errors = null; + refVal[3] = refVal3; + var refVal4 = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + var vErrors = null; + var errors = 0; + if (rootData === undefined) rootData = data; + if ((data && typeof data === "object" && !Array.isArray(data))) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(false || validate.schema.properties[key0]); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: 'additionalProperties', + dataPath: (dataPath || '') + "", + schemaPath: '#/additionalProperties', + params: { + additionalProperty: '' + key0 + '' + }, + message: 'should NOT have additional properties' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + } + var data1 = data.alignment; + if (data1 !== undefined) { + var errs_1 = errors; + var schema1 = validate.schema.properties.alignment.enum; + var valid1; + valid1 = false; + for (var i1 = 0; i1 < schema1.length; i1++) + if (equal(data1, schema1[i1])) { + valid1 = true; + break; + } + if (!valid1) { + var err = { + keyword: 'enum', + dataPath: (dataPath || '') + '.alignment', + schemaPath: '#/properties/alignment/enum', + params: { + allowedValues: schema1 + }, + message: 'should be equal to one of the allowed values' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + if (typeof data1 !== "string") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.alignment', + schemaPath: '#/properties/alignment/type', + params: { + type: 'string' + }, + message: 'should be string' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.width !== undefined) { + var errs_1 = errors; + if (typeof data.width !== "number") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.width', + schemaPath: '#/properties/width/type', + params: { + type: 'number' + }, + message: 'should be number' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.wrapWord !== undefined) { + var errs_1 = errors; + if (typeof data.wrapWord !== "boolean") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.wrapWord', + schemaPath: '#/properties/wrapWord/type', + params: { + type: 'boolean' + }, + message: 'should be boolean' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.truncate !== undefined) { + var errs_1 = errors; + if (typeof data.truncate !== "number") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.truncate', + schemaPath: '#/properties/truncate/type', + params: { + type: 'number' + }, + message: 'should be number' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.paddingLeft !== undefined) { + var errs_1 = errors; + if (typeof data.paddingLeft !== "number") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.paddingLeft', + schemaPath: '#/properties/paddingLeft/type', + params: { + type: 'number' + }, + message: 'should be number' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.paddingRight !== undefined) { + var errs_1 = errors; + if (typeof data.paddingRight !== "number") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.paddingRight', + schemaPath: '#/properties/paddingRight/type', + params: { + type: 'number' + }, + message: 'should be number' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'object' + }, + message: 'should be object' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + validate.errors = vErrors; + return errors === 0; + }; + })(); + refVal4.schema = { + "type": "object", + "properties": { + "alignment": { + "type": "string", + "enum": ["left", "right", "center"] + }, + "width": { + "type": "number" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "number" + }, + "paddingLeft": { + "type": "number" + }, + "paddingRight": { + "type": "number" + } + }, + "additionalProperties": false + }; + refVal4.errors = null; + refVal[4] = refVal4; + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + var vErrors = null; + var errors = 0; + if (rootData === undefined) rootData = data; + if ((data && typeof data === "object" && !Array.isArray(data))) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(false || key0 == 'border' || key0 == 'columns' || key0 == 'columnDefault' || key0 == 'drawHorizontalLine'); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: 'additionalProperties', + dataPath: (dataPath || '') + "", + schemaPath: '#/additionalProperties', + params: { + additionalProperty: '' + key0 + '' + }, + message: 'should NOT have additional properties' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + } + if (data.border !== undefined) { + var errs_1 = errors; + if (!refVal1(data.border, (dataPath || '') + '.border', data, 'border', rootData)) { + if (vErrors === null) vErrors = refVal1.errors; + else vErrors = vErrors.concat(refVal1.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.columns !== undefined) { + var errs_1 = errors; + if (!refVal3(data.columns, (dataPath || '') + '.columns', data, 'columns', rootData)) { + if (vErrors === null) vErrors = refVal3.errors; + else vErrors = vErrors.concat(refVal3.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.columnDefault !== undefined) { + var errs_1 = errors; + if (!refVal[4](data.columnDefault, (dataPath || '') + '.columnDefault', data, 'columnDefault', rootData)) { + if (vErrors === null) vErrors = refVal[4].errors; + else vErrors = vErrors.concat(refVal[4].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.drawHorizontalLine !== undefined) { + var errs_1 = errors; + var errs__1 = errors; + var valid1; + if (!(typeof data.drawHorizontalLine == "function")) { + if (errs__1 == errors) { + var err = { + keyword: 'typeof', + dataPath: (dataPath || '') + '.drawHorizontalLine', + schemaPath: '#/properties/drawHorizontalLine/typeof', + params: { + keyword: 'typeof' + }, + message: 'should pass "typeof" keyword validation' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } else { + for (var i1 = errs__1; i1 < errors; i1++) { + var ruleErr1 = vErrors[i1]; + if (ruleErr1.dataPath === undefined) { + ruleErr1.dataPath = (dataPath || '') + '.drawHorizontalLine'; + } + if (ruleErr1.schemaPath === undefined) { + ruleErr1.schemaPath = "#/properties/drawHorizontalLine/typeof"; + } + } + } + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'object' + }, + message: 'should be object' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; } + validate.errors = vErrors; + return errors === 0; + }; +})(); +validate.schema = { + "id": "config.json", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "border": { + "$ref": "#/definitions/borders" + }, + "columns": { + "$ref": "#/definitions/columns" + }, + "columnDefault": { + "$ref": "#/definitions/column" + }, + "drawHorizontalLine": { + "typeof": "function" + } + }, + "additionalProperties": false, + "definitions": { + "columns": { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }, + "column": { + "type": "object", + "properties": { + "alignment": { + "type": "string", + "enum": ["left", "right", "center"] + }, + "width": { + "type": "number" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "number" + }, + "paddingLeft": { + "type": "number" + }, + "paddingRight": { + "type": "number" + } + }, + "additionalProperties": false + }, + "borders": { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }, + "border": { + "type": "string" + } + } }; - -module.exports = exports['default']; -//# sourceMappingURL=validateConfig.js.map +validate.errors = null; +module.exports = validate; \ No newline at end of file diff --git a/node_modules/table/dist/validateConfig.js.map b/node_modules/table/dist/validateConfig.js.map deleted file mode 100644 index bc9508c..0000000 --- a/node_modules/table/dist/validateConfig.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["validateConfig.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAee,YAAiB;QAAhB,MAAM,yDAAG,EAAE;;AACvB,QAAI,MAAM,YAAA,CAAC;;AAEX,UAAM,GAAG,aAAI,cAAc,CAAC,MAAM,mBAAS,CAAC;;AAE5C,QAAI,CAAC,MAAM,CAAC,KAAK,EAAE;;AAEf,eAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC9B,eAAO,CAAC,GAAG,CAAC,OAAO,EAAE;AACjB,mBAAO,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO;AAC7B,kBAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM;AAC3B,oBAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ;AAC/B,sBAAU,EAAE,MAAM,CAAC,KAAK,CAAC,UAAU;SACtC,CAAC;;;AAAC,AAGH,cAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;KACtC;CACJ","file":"validateConfig.js","sourcesContent":["import schema from './schemas/config.json';\nimport tv4 from 'tv4';\n\n/**\n * @typedef {string} cell\n */\n\n/**\n * @typedef {cell[]} validateData~column\n */\n\n/**\n * @param {formatData~config} config\n * @returns {undefined}\n */\nexport default (config = {}) => {\n let result;\n\n result = tv4.validateResult(config, schema);\n\n if (!result.valid) {\n /* eslint-disable no-console */\n console.log('config', config);\n console.log('error', {\n message: result.error.message,\n params: result.error.params,\n dataPath: result.error.dataPath,\n schemaPath: result.error.schemaPath\n });\n /* eslint-enable no-console */\n\n throw new Error('Invalid config.');\n }\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/validateStreamConfig.js b/node_modules/table/dist/validateStreamConfig.js index 8123d2a..09ea2aa 100644 --- a/node_modules/table/dist/validateStreamConfig.js +++ b/node_modules/table/dist/validateStreamConfig.js @@ -1,53 +1,742 @@ 'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _streamConfig = require('./schemas/streamConfig.json'); - -var _streamConfig2 = _interopRequireDefault(_streamConfig); - -var _tv = require('tv4'); - -var _tv2 = _interopRequireDefault(_tv); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * @typedef {string} cell - */ - -/** - * @typedef {cell[]} validateData~column - */ - -/** - * @param {formatData~config} config - * @returns {undefined} - */ - -exports.default = function () { - var config = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - - var result = undefined; - - result = _tv2.default.validateResult(config, _streamConfig2.default); - - if (!result.valid) { - /* eslint-disable no-console */ - console.log('config', config); - console.log('error', { - message: result.error.message, - params: result.error.params, - dataPath: result.error.dataPath, - schemaPath: result.error.schemaPath - }); - /* eslint-enable no-console */ - - throw new Error('Invalid config.'); +var equal = require('ajv/lib/compile/equal'); +var validate = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + var refVal = []; + var refVal1 = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + var vErrors = null; + var errors = 0; + if (rootData === undefined) rootData = data; + if ((data && typeof data === "object" && !Array.isArray(data))) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(false || validate.schema.properties[key0]); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: 'additionalProperties', + dataPath: (dataPath || '') + "", + schemaPath: '#/additionalProperties', + params: { + additionalProperty: '' + key0 + '' + }, + message: 'should NOT have additional properties' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + } + if (data.topBody !== undefined) { + var errs_1 = errors; + if (!refVal2(data.topBody, (dataPath || '') + '.topBody', data, 'topBody', rootData)) { + if (vErrors === null) vErrors = refVal2.errors; + else vErrors = vErrors.concat(refVal2.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topJoin !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.topJoin, (dataPath || '') + '.topJoin', data, 'topJoin', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topLeft !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.topLeft, (dataPath || '') + '.topLeft', data, 'topLeft', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topRight !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.topRight, (dataPath || '') + '.topRight', data, 'topRight', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomBody !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bottomBody, (dataPath || '') + '.bottomBody', data, 'bottomBody', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomJoin !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bottomJoin, (dataPath || '') + '.bottomJoin', data, 'bottomJoin', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomLeft !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bottomLeft, (dataPath || '') + '.bottomLeft', data, 'bottomLeft', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomRight !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bottomRight, (dataPath || '') + '.bottomRight', data, 'bottomRight', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyLeft !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bodyLeft, (dataPath || '') + '.bodyLeft', data, 'bodyLeft', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyRight !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bodyRight, (dataPath || '') + '.bodyRight', data, 'bodyRight', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyJoin !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bodyJoin, (dataPath || '') + '.bodyJoin', data, 'bodyJoin', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinBody !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.joinBody, (dataPath || '') + '.joinBody', data, 'joinBody', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinLeft !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.joinLeft, (dataPath || '') + '.joinLeft', data, 'joinLeft', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinRight !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.joinRight, (dataPath || '') + '.joinRight', data, 'joinRight', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinJoin !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.joinJoin, (dataPath || '') + '.joinJoin', data, 'joinJoin', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'object' + }, + message: 'should be object' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + validate.errors = vErrors; + return errors === 0; + }; + })(); + refVal1.schema = { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }; + refVal1.errors = null; + refVal[1] = refVal1; + var refVal2 = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + var vErrors = null; + var errors = 0; + if (rootData === undefined) rootData = data; + if (typeof data !== "string") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'string' + }, + message: 'should be string' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + validate.errors = vErrors; + return errors === 0; + }; + })(); + refVal2.schema = { + "type": "string" + }; + refVal2.errors = null; + refVal[2] = refVal2; + var refVal3 = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + var vErrors = null; + var errors = 0; + if (rootData === undefined) rootData = data; + if ((data && typeof data === "object" && !Array.isArray(data))) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(false || pattern0.test(key0)); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: 'additionalProperties', + dataPath: (dataPath || '') + "", + schemaPath: '#/additionalProperties', + params: { + additionalProperty: '' + key0 + '' + }, + message: 'should NOT have additional properties' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + } + for (var key0 in data) { + if (pattern0.test(key0)) { + var errs_1 = errors; + if (!refVal4(data[key0], (dataPath || '') + '[\'' + key0 + '\']', data, key0, rootData)) { + if (vErrors === null) vErrors = refVal4.errors; + else vErrors = vErrors.concat(refVal4.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + } + } else { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'object' + }, + message: 'should be object' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + validate.errors = vErrors; + return errors === 0; + }; + })(); + refVal3.schema = { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }; + refVal3.errors = null; + refVal[3] = refVal3; + var refVal4 = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + var vErrors = null; + var errors = 0; + if (rootData === undefined) rootData = data; + if ((data && typeof data === "object" && !Array.isArray(data))) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(false || validate.schema.properties[key0]); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: 'additionalProperties', + dataPath: (dataPath || '') + "", + schemaPath: '#/additionalProperties', + params: { + additionalProperty: '' + key0 + '' + }, + message: 'should NOT have additional properties' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + } + var data1 = data.alignment; + if (data1 !== undefined) { + var errs_1 = errors; + var schema1 = validate.schema.properties.alignment.enum; + var valid1; + valid1 = false; + for (var i1 = 0; i1 < schema1.length; i1++) + if (equal(data1, schema1[i1])) { + valid1 = true; + break; + } + if (!valid1) { + var err = { + keyword: 'enum', + dataPath: (dataPath || '') + '.alignment', + schemaPath: '#/properties/alignment/enum', + params: { + allowedValues: schema1 + }, + message: 'should be equal to one of the allowed values' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + if (typeof data1 !== "string") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.alignment', + schemaPath: '#/properties/alignment/type', + params: { + type: 'string' + }, + message: 'should be string' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.width !== undefined) { + var errs_1 = errors; + if (typeof data.width !== "number") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.width', + schemaPath: '#/properties/width/type', + params: { + type: 'number' + }, + message: 'should be number' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.wrapWord !== undefined) { + var errs_1 = errors; + if (typeof data.wrapWord !== "boolean") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.wrapWord', + schemaPath: '#/properties/wrapWord/type', + params: { + type: 'boolean' + }, + message: 'should be boolean' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.truncate !== undefined) { + var errs_1 = errors; + if (typeof data.truncate !== "number") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.truncate', + schemaPath: '#/properties/truncate/type', + params: { + type: 'number' + }, + message: 'should be number' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.paddingLeft !== undefined) { + var errs_1 = errors; + if (typeof data.paddingLeft !== "number") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.paddingLeft', + schemaPath: '#/properties/paddingLeft/type', + params: { + type: 'number' + }, + message: 'should be number' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.paddingRight !== undefined) { + var errs_1 = errors; + if (typeof data.paddingRight !== "number") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.paddingRight', + schemaPath: '#/properties/paddingRight/type', + params: { + type: 'number' + }, + message: 'should be number' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'object' + }, + message: 'should be object' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + validate.errors = vErrors; + return errors === 0; + }; + })(); + refVal4.schema = { + "type": "object", + "properties": { + "alignment": { + "type": "string", + "enum": ["left", "right", "center"] + }, + "width": { + "type": "number" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "number" + }, + "paddingLeft": { + "type": "number" + }, + "paddingRight": { + "type": "number" + } + }, + "additionalProperties": false + }; + refVal4.errors = null; + refVal[4] = refVal4; + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + var vErrors = null; + var errors = 0; + if (rootData === undefined) rootData = data; + if ((data && typeof data === "object" && !Array.isArray(data))) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(false || key0 == 'border' || key0 == 'columns' || key0 == 'columnDefault' || key0 == 'columnCount'); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: 'additionalProperties', + dataPath: (dataPath || '') + "", + schemaPath: '#/additionalProperties', + params: { + additionalProperty: '' + key0 + '' + }, + message: 'should NOT have additional properties' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + } + if (data.border !== undefined) { + var errs_1 = errors; + if (!refVal1(data.border, (dataPath || '') + '.border', data, 'border', rootData)) { + if (vErrors === null) vErrors = refVal1.errors; + else vErrors = vErrors.concat(refVal1.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.columns !== undefined) { + var errs_1 = errors; + if (!refVal3(data.columns, (dataPath || '') + '.columns', data, 'columns', rootData)) { + if (vErrors === null) vErrors = refVal3.errors; + else vErrors = vErrors.concat(refVal3.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.columnDefault !== undefined) { + var errs_1 = errors; + if (!refVal[4](data.columnDefault, (dataPath || '') + '.columnDefault', data, 'columnDefault', rootData)) { + if (vErrors === null) vErrors = refVal[4].errors; + else vErrors = vErrors.concat(refVal[4].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.columnCount !== undefined) { + var errs_1 = errors; + if (typeof data.columnCount !== "number") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.columnCount', + schemaPath: '#/properties/columnCount/type', + params: { + type: 'number' + }, + message: 'should be number' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'object' + }, + message: 'should be object' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; } + validate.errors = vErrors; + return errors === 0; + }; +})(); +validate.schema = { + "id": "streamConfig.json", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "border": { + "$ref": "#/definitions/borders" + }, + "columns": { + "$ref": "#/definitions/columns" + }, + "columnDefault": { + "$ref": "#/definitions/column" + }, + "columnCount": { + "type": "number" + } + }, + "additionalProperties": false, + "definitions": { + "columns": { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }, + "column": { + "type": "object", + "properties": { + "alignment": { + "type": "string", + "enum": ["left", "right", "center"] + }, + "width": { + "type": "number" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "number" + }, + "paddingLeft": { + "type": "number" + }, + "paddingRight": { + "type": "number" + } + }, + "additionalProperties": false + }, + "borders": { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }, + "border": { + "type": "string" + } + } }; - -module.exports = exports['default']; -//# sourceMappingURL=validateStreamConfig.js.map +validate.errors = null; +module.exports = validate; \ No newline at end of file diff --git a/node_modules/table/dist/validateStreamConfig.js.map b/node_modules/table/dist/validateStreamConfig.js.map deleted file mode 100644 index 203922c..0000000 --- a/node_modules/table/dist/validateStreamConfig.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["validateStreamConfig.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAee,YAAiB;QAAhB,MAAM,yDAAG,EAAE;;AACvB,QAAI,MAAM,YAAA,CAAC;;AAEX,UAAM,GAAG,aAAI,cAAc,CAAC,MAAM,yBAAS,CAAC;;AAE5C,QAAI,CAAC,MAAM,CAAC,KAAK,EAAE;;AAEf,eAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC9B,eAAO,CAAC,GAAG,CAAC,OAAO,EAAE;AACjB,mBAAO,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO;AAC7B,kBAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM;AAC3B,oBAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ;AAC/B,sBAAU,EAAE,MAAM,CAAC,KAAK,CAAC,UAAU;SACtC,CAAC;;;AAAC,AAGH,cAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;KACtC;CACJ","file":"validateStreamConfig.js","sourcesContent":["import schema from './schemas/streamConfig.json';\nimport tv4 from 'tv4';\n\n/**\n * @typedef {string} cell\n */\n\n/**\n * @typedef {cell[]} validateData~column\n */\n\n/**\n * @param {formatData~config} config\n * @returns {undefined}\n */\nexport default (config = {}) => {\n let result;\n\n result = tv4.validateResult(config, schema);\n\n if (!result.valid) {\n /* eslint-disable no-console */\n console.log('config', config);\n console.log('error', {\n message: result.error.message,\n params: result.error.params,\n dataPath: result.error.dataPath,\n schemaPath: result.error.schemaPath\n });\n /* eslint-enable no-console */\n\n throw new Error('Invalid config.');\n }\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/validateTableData.js b/node_modules/table/dist/validateTableData.js index 98353ac..4f71f39 100644 --- a/node_modules/table/dist/validateTableData.js +++ b/node_modules/table/dist/validateTableData.js @@ -1,16 +1,12 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -var _forEach2 = require('lodash/forEach'); +var _lodash = require('lodash'); -var _forEach3 = _interopRequireDefault(_forEach2); - -var _isArray2 = require('lodash/isArray'); - -var _isArray3 = _interopRequireDefault(_isArray2); +var _lodash2 = _interopRequireDefault(_lodash); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -26,42 +22,38 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * @param {column[]} rows * @returns {undefined} */ +exports.default = rows => { + if (!_lodash2.default.isArray(rows)) { + throw new Error('Table data must be an array.'); + } -exports.default = function (rows) { - var columnNumber = undefined; + if (rows.length === 0) { + throw new Error('Table must define at least one row.'); + } - if (!(0, _isArray3.default)(rows)) { - throw new Error('Table data must be an array.'); - } + if (rows[0].length === 0) { + throw new Error('Table must define at least one column.'); + } - if (rows.length === 0) { - throw new Error('Table must define at least one row.'); - } + const columnNumber = rows[0].length; - if (rows[0].length === 0) { - throw new Error('Table must define at least one column.'); + _lodash2.default.forEach(rows, cells => { + if (!_lodash2.default.isArray(cells)) { + throw new Error('Table row data must be an array.'); } - columnNumber = rows[0].length; - - (0, _forEach3.default)(rows, function (cells) { - if (!(0, _isArray3.default)(cells)) { - throw new Error('Table row data must be an array.'); - } - - if (cells.length !== columnNumber) { - throw new Error('Table must have a consistent number of cells.'); - } + if (cells.length !== columnNumber) { + throw new Error('Table must have a consistent number of cells.'); + } - // @todo Make an exception for newline characters. - // @see https://github.com/gajus/table/issues/9 - (0, _forEach3.default)(cells, function (cell) { - if (/[\x01-\x1A]/.test(cell)) { - throw new Error('Table data must not contain control characters.'); - } - }); + // @todo Make an exception for newline characters. + // @see https://github.com/gajus/table/issues/9 + _lodash2.default.forEach(cells, cell => { + if (/[\x01-\x1A]/.test(cell)) { + throw new Error('Table data must not contain control characters.'); + } }); + }); }; -module.exports = exports['default']; -//# sourceMappingURL=validateTableData.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/validateTableData.js.map b/node_modules/table/dist/validateTableData.js.map deleted file mode 100644 index fb4b905..0000000 --- a/node_modules/table/dist/validateTableData.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["validateTableData.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAce,UAAC,IAAI,EAAK;AACrB,QAAI,YAAY,YAAA,CAAC;;AAEjB,QAAI,CAAC,uBAAU,IAAI,CAAC,EAAE;AAClB,cAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;KACnD;;AAED,QAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;AACnB,cAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;KAC1D;;AAED,QAAI,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;AACtB,cAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;KAC7D;;AAED,gBAAY,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;;AAE9B,2BAAU,IAAI,EAAE,UAAC,KAAK,EAAK;AACvB,YAAI,CAAC,uBAAU,KAAK,CAAC,EAAE;AACnB,kBAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;SACvD;;AAED,YAAI,KAAK,CAAC,MAAM,KAAK,YAAY,EAAE;AAC/B,kBAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;SACpE;;;;AAAA,AAID,+BAAU,KAAK,EAAE,UAAC,IAAI,EAAK;AACvB,gBAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AAC1B,sBAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;aACtE;SACJ,CAAC,CAAC;KACN,CAAC,CAAC;CACN","file":"validateTableData.js","sourcesContent":["import _ from 'lodash';\n\n/**\n * @typedef {string} cell\n */\n\n/**\n * @typedef {cell[]} validateData~column\n */\n\n/**\n * @param {column[]} rows\n * @returns {undefined}\n */\nexport default (rows) => {\n let columnNumber;\n\n if (!_.isArray(rows)) {\n throw new Error('Table data must be an array.');\n }\n\n if (rows.length === 0) {\n throw new Error('Table must define at least one row.');\n }\n\n if (rows[0].length === 0) {\n throw new Error('Table must define at least one column.');\n }\n\n columnNumber = rows[0].length;\n\n _.forEach(rows, (cells) => {\n if (!_.isArray(cells)) {\n throw new Error('Table row data must be an array.');\n }\n\n if (cells.length !== columnNumber) {\n throw new Error('Table must have a consistent number of cells.');\n }\n\n // @todo Make an exception for newline characters.\n // @see https://github.com/gajus/table/issues/9\n _.forEach(cells, (cell) => {\n if (/[\\x01-\\x1A]/.test(cell)) {\n throw new Error('Table data must not contain control characters.');\n }\n });\n });\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/wrapString.js b/node_modules/table/dist/wrapString.js index f61b81a..d511845 100644 --- a/node_modules/table/dist/wrapString.js +++ b/node_modules/table/dist/wrapString.js @@ -1,12 +1,12 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -var _trim2 = require('lodash/trim'); +var _lodash = require('lodash'); -var _trim3 = _interopRequireDefault(_trim2); +var _lodash2 = _interopRequireDefault(_lodash); var _sliceAnsi = require('slice-ansi'); @@ -29,23 +29,20 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * @param {number} size * @returns {Array} */ +exports.default = (subject, size) => { + let subjectSlice; -exports.default = function (subject, size) { - var chunks = undefined, - subjectSlice = undefined; + subjectSlice = subject; - subjectSlice = subject; + const chunks = []; - chunks = []; + do { + chunks.push((0, _sliceAnsi2.default)(subjectSlice, 0, size)); - do { - chunks.push((0, _sliceAnsi2.default)(subjectSlice, 0, size)); + subjectSlice = _lodash2.default.trim((0, _sliceAnsi2.default)(subjectSlice, size)); + } while ((0, _stringWidth2.default)(subjectSlice)); - subjectSlice = (0, _trim3.default)((0, _sliceAnsi2.default)(subjectSlice, size)); - } while ((0, _stringWidth2.default)(subjectSlice)); - - return chunks; + return chunks; }; -module.exports = exports['default']; -//# sourceMappingURL=wrapString.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/wrapString.js.map b/node_modules/table/dist/wrapString.js.map deleted file mode 100644 index 11c52bc..0000000 --- a/node_modules/table/dist/wrapString.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["wrapString.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAee,UAAC,OAAO,EAAE,IAAI,EAAK;AAC9B,QAAI,MAAM,YAAA;QACN,YAAY,YAAA,CAAC;;AAEjB,gBAAY,GAAG,OAAO,CAAC;;AAEvB,UAAM,GAAG,EAAE,CAAC;;AAEZ,OAAG;AACC,cAAM,CAAC,IAAI,CAAC,yBAAM,YAAY,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;;AAE1C,oBAAY,GAAG,oBAAO,yBAAM,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;KACpD,QAAQ,2BAAY,YAAY,CAAC,EAAE;;AAEpC,WAAO,MAAM,CAAC;CACjB","file":"wrapString.js","sourcesContent":["import _ from 'lodash';\nimport slice from 'slice-ansi';\nimport stringWidth from 'string-width';\n\n/**\n * Creates an array of strings split into groups the length of size.\n * This function works with strings that contain ASCII characters.\n *\n * wrapText is different from would-be \"chunk\" implementation\n * in that whitespace characters that occur on a chunk size limit are trimmed.\n *\n * @param {string} subject\n * @param {number} size\n * @returns {Array}\n */\nexport default (subject, size) => {\n let chunks,\n subjectSlice;\n\n subjectSlice = subject;\n\n chunks = [];\n\n do {\n chunks.push(slice(subjectSlice, 0, size));\n\n subjectSlice = _.trim(slice(subjectSlice, size));\n } while (stringWidth(subjectSlice));\n\n return chunks;\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/dist/wrapWord.js b/node_modules/table/dist/wrapWord.js index e1d0714..f994f96 100644 --- a/node_modules/table/dist/wrapWord.js +++ b/node_modules/table/dist/wrapWord.js @@ -1,12 +1,12 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); -var _trim2 = require('lodash/trim'); +var _lodash = require('lodash'); -var _trim3 = _interopRequireDefault(_trim2); +var _lodash2 = _interopRequireDefault(_lodash); var _sliceAnsi = require('slice-ansi'); @@ -23,41 +23,36 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * @param {number} size * @returns {Array} */ +exports.default = (input, size) => { + let subject; -exports.default = function (input, size) { - var chunk = undefined, - chunks = undefined, - re = undefined, - subject = undefined; + subject = input; - subject = input; + const chunks = []; - chunks = []; + // https://regex101.com/r/gY5kZ1/1 + const re = new RegExp('(^.{1,' + size + '}(\\s+|$))|(^.{1,' + (size - 1) + '}(\\\\|/|_|\\.|,|;|-))'); - // https://regex101.com/r/gY5kZ1/1 - re = new RegExp('(^.{1,' + size + '}(\\s+|$))|(^.{1,' + (size - 1) + '}(\\\\|/|_|\\.|,|;|\-))'); + do { + let chunk; - do { - chunk = subject.match(re); + chunk = subject.match(re); - // console.log('chunk', chunk, re); + if (chunk) { + chunk = chunk[0]; - if (chunk) { - chunk = chunk[0]; + subject = (0, _sliceAnsi2.default)(subject, (0, _stringWidth2.default)(chunk)); - subject = (0, _sliceAnsi2.default)(subject, (0, _stringWidth2.default)(chunk)); + chunk = _lodash2.default.trim(chunk); + } else { + chunk = (0, _sliceAnsi2.default)(subject, 0, size); + subject = (0, _sliceAnsi2.default)(subject, size); + } - chunk = (0, _trim3.default)(chunk); - } else { - chunk = (0, _sliceAnsi2.default)(subject, 0, size); - subject = (0, _sliceAnsi2.default)(subject, size); - } + chunks.push(chunk); + } while ((0, _stringWidth2.default)(subject)); - chunks.push(chunk); - } while ((0, _stringWidth2.default)(subject)); - - return chunks; + return chunks; }; -module.exports = exports['default']; -//# sourceMappingURL=wrapWord.js.map +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/table/dist/wrapWord.js.map b/node_modules/table/dist/wrapWord.js.map deleted file mode 100644 index 16231f4..0000000 --- a/node_modules/table/dist/wrapWord.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["wrapWord.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;kBASe,UAAC,KAAK,EAAE,IAAI,EAAK;AAC5B,QAAI,KAAK,YAAA;QACL,MAAM,YAAA;QACN,EAAE,YAAA;QACF,OAAO,YAAA,CAAC;;AAEZ,WAAO,GAAG,KAAK,CAAC;;AAEhB,UAAM,GAAG,EAAE;;;AAAC,AAGZ,MAAE,GAAG,IAAI,MAAM,CAAC,QAAQ,GAAG,IAAI,GAAG,mBAAmB,IAAI,IAAI,GAAG,CAAC,CAAA,AAAC,GAAG,yBAAyB,CAAC,CAAC;;AAEhG,OAAG;AACC,aAAK,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;;;;AAAC,AAI1B,YAAI,KAAK,EAAE;AACP,iBAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;;AAEjB,mBAAO,GAAG,yBAAM,OAAO,EAAE,2BAAY,KAAK,CAAC,CAAC,CAAC;;AAE7C,iBAAK,GAAG,oBAAO,KAAK,CAAC,CAAC;SACzB,MAAM;AACH,iBAAK,GAAG,yBAAM,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;AAChC,mBAAO,GAAG,yBAAM,OAAO,EAAE,IAAI,CAAC,CAAC;SAClC;;AAED,cAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACtB,QAAQ,2BAAY,OAAO,CAAC,EAAE;;AAE/B,WAAO,MAAM,CAAC;CACjB","file":"wrapWord.js","sourcesContent":["import _ from 'lodash';\nimport slice from 'slice-ansi';\nimport stringWidth from 'string-width';\n\n/**\n * @param {string} input\n * @param {number} size\n * @returns {Array}\n */\nexport default (input, size) => {\n let chunk,\n chunks,\n re,\n subject;\n\n subject = input;\n\n chunks = [];\n\n // https://regex101.com/r/gY5kZ1/1\n re = new RegExp('(^.{1,' + size + '}(\\\\s+|$))|(^.{1,' + (size - 1) + '}(\\\\\\\\|/|_|\\\\.|,|;|\\-))');\n\n do {\n chunk = subject.match(re);\n\n // console.log('chunk', chunk, re);\n\n if (chunk) {\n chunk = chunk[0];\n\n subject = slice(subject, stringWidth(chunk));\n\n chunk = _.trim(chunk);\n } else {\n chunk = slice(subject, 0, size);\n subject = slice(subject, size);\n }\n\n chunks.push(chunk);\n } while (stringWidth(subject));\n\n return chunks;\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/node_modules/table/node_modules/is-fullwidth-code-point/index.js b/node_modules/table/node_modules/is-fullwidth-code-point/index.js new file mode 100644 index 0000000..d506327 --- /dev/null +++ b/node_modules/table/node_modules/is-fullwidth-code-point/index.js @@ -0,0 +1,46 @@ +'use strict'; +/* eslint-disable yoda */ +module.exports = x => { + if (Number.isNaN(x)) { + return false; + } + + // code points are derived from: + // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt + if ( + x >= 0x1100 && ( + x <= 0x115f || // Hangul Jamo + x === 0x2329 || // LEFT-POINTING ANGLE BRACKET + x === 0x232a || // RIGHT-POINTING ANGLE BRACKET + // CJK Radicals Supplement .. Enclosed CJK Letters and Months + (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) || + // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A + (0x3250 <= x && x <= 0x4dbf) || + // CJK Unified Ideographs .. Yi Radicals + (0x4e00 <= x && x <= 0xa4c6) || + // Hangul Jamo Extended-A + (0xa960 <= x && x <= 0xa97c) || + // Hangul Syllables + (0xac00 <= x && x <= 0xd7a3) || + // CJK Compatibility Ideographs + (0xf900 <= x && x <= 0xfaff) || + // Vertical Forms + (0xfe10 <= x && x <= 0xfe19) || + // CJK Compatibility Forms .. Small Form Variants + (0xfe30 <= x && x <= 0xfe6b) || + // Halfwidth and Fullwidth Forms + (0xff01 <= x && x <= 0xff60) || + (0xffe0 <= x && x <= 0xffe6) || + // Kana Supplement + (0x1b000 <= x && x <= 0x1b001) || + // Enclosed Ideographic Supplement + (0x1f200 <= x && x <= 0x1f251) || + // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane + (0x20000 <= x && x <= 0x3fffd) + ) + ) { + return true; + } + + return false; +}; diff --git a/node_modules/table/node_modules/is-fullwidth-code-point/license b/node_modules/table/node_modules/is-fullwidth-code-point/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/table/node_modules/is-fullwidth-code-point/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/table/node_modules/is-fullwidth-code-point/package.json b/node_modules/table/node_modules/is-fullwidth-code-point/package.json new file mode 100644 index 0000000..3049d9e --- /dev/null +++ b/node_modules/table/node_modules/is-fullwidth-code-point/package.json @@ -0,0 +1,45 @@ +{ + "name": "is-fullwidth-code-point", + "version": "2.0.0", + "description": "Check if the character represented by a given Unicode code point is fullwidth", + "license": "MIT", + "repository": "sindresorhus/is-fullwidth-code-point", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "fullwidth", + "full-width", + "full", + "width", + "unicode", + "character", + "char", + "string", + "str", + "codepoint", + "code", + "point", + "is", + "detect", + "check" + ], + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "xo": { + "esnext": true + } +} diff --git a/node_modules/table/node_modules/is-fullwidth-code-point/readme.md b/node_modules/table/node_modules/is-fullwidth-code-point/readme.md new file mode 100644 index 0000000..093b028 --- /dev/null +++ b/node_modules/table/node_modules/is-fullwidth-code-point/readme.md @@ -0,0 +1,39 @@ +# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point) + +> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) + + +## Install + +``` +$ npm install --save is-fullwidth-code-point +``` + + +## Usage + +```js +const isFullwidthCodePoint = require('is-fullwidth-code-point'); + +isFullwidthCodePoint('谢'.codePointAt()); +//=> true + +isFullwidthCodePoint('a'.codePointAt()); +//=> false +``` + + +## API + +### isFullwidthCodePoint(input) + +#### input + +Type: `number` + +[Code point](https://en.wikipedia.org/wiki/Code_point) of a character. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/table/node_modules/string-width/index.js b/node_modules/table/node_modules/string-width/index.js new file mode 100644 index 0000000..25a8943 --- /dev/null +++ b/node_modules/table/node_modules/string-width/index.js @@ -0,0 +1,35 @@ +'use strict'; +const stripAnsi = require('strip-ansi'); +const isFullwidthCodePoint = require('is-fullwidth-code-point'); + +module.exports = str => { + if (typeof str !== 'string' || str.length === 0) { + return 0; + } + + let width = 0; + + str = stripAnsi(str); + + for (let i = 0; i < str.length; i++) { + const code = str.codePointAt(i); + + // ignore control characters + if (code <= 0x1f || (code >= 0x7f && code <= 0x9f)) { + continue; + } + + // surrogates + if (code >= 0x10000) { + i++; + } + + if (isFullwidthCodePoint(code)) { + width += 2; + } else { + width++; + } + } + + return width; +}; diff --git a/node_modules/table/node_modules/string-width/license b/node_modules/table/node_modules/string-width/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/table/node_modules/string-width/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/table/node_modules/string-width/package.json b/node_modules/table/node_modules/string-width/package.json new file mode 100644 index 0000000..a590d2e --- /dev/null +++ b/node_modules/table/node_modules/string-width/package.json @@ -0,0 +1,58 @@ +{ + "name": "string-width", + "version": "2.0.0", + "description": "Get the visual width of a string - the number of columns required to display it", + "license": "MIT", + "repository": "sindresorhus/string-width", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "string", + "str", + "character", + "char", + "unicode", + "width", + "visual", + "column", + "columns", + "fullwidth", + "full-width", + "full", + "ansi", + "escape", + "codes", + "cli", + "command-line", + "terminal", + "console", + "cjk", + "chinese", + "japanese", + "korean", + "fixed-width" + ], + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^3.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "xo": { + "esnext": true + } +} diff --git a/node_modules/table/node_modules/string-width/readme.md b/node_modules/table/node_modules/string-width/readme.md new file mode 100644 index 0000000..1ab42c9 --- /dev/null +++ b/node_modules/table/node_modules/string-width/readme.md @@ -0,0 +1,42 @@ +# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width) + +> Get the visual width of a string - the number of columns required to display it + +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. + +Useful to be able to measure the actual width of command-line output. + + +## Install + +``` +$ npm install --save string-width +``` + + +## Usage + +```js +const stringWidth = require('string-width'); + +stringWidth('古'); +//=> 2 + +stringWidth('\u001b[1m古\u001b[22m'); +//=> 2 + +stringWidth('a'); +//=> 1 +``` + + +## Related + +- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module +- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string +- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/table/package.json b/node_modules/table/package.json index c33fe3d..d53b6e5 100644 --- a/node_modules/table/package.json +++ b/node_modules/table/package.json @@ -1,101 +1,69 @@ { - "_args": [ - [ - "table@^3.7.8", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "table@>=3.7.8 <4.0.0", - "_id": "table@3.7.8", - "_inCache": true, - "_installable": true, - "_location": "/table", - "_nodeVersion": "5.3.0", - "_npmUser": { - "email": "gajus@gajus.com", - "name": "gajus" - }, - "_npmVersion": "3.5.2", - "_phantomChildren": {}, - "_requested": { - "name": "table", - "raw": "table@^3.7.8", - "rawSpec": "^3.7.8", - "scope": null, - "spec": ">=3.7.8 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/table/-/table-3.7.8.tgz", - "_shasum": "b424433ef596851922b2fd77224a69a1951618eb", - "_shrinkwrap": null, - "_spec": "table@^3.7.8", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\eslint", "author": { "email": "gajus@gajus.com", "name": "Gajus Kuizinas", "url": "http://gajus.com" }, - "bugs": { - "url": "https://github.com/gajus/table/issues" - }, "dependencies": { - "bluebird": "^3.1.1", + "ajv": "^4.7.0", + "ajv-keywords": "^1.0.0", "chalk": "^1.1.1", "lodash": "^4.0.0", "slice-ansi": "0.0.4", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.0", - "tv4": "^1.2.7", - "xregexp": "^3.0.0" + "string-width": "^2.0.0" }, "description": "Formats data into a string table.", "devDependencies": { + "ajv-cli": "^1.1.0", + "babel": "^6.5.2", + "babel-cli": "^6.14.0", + "babel-core": "^6.14.0", + "babel-plugin-add-module-exports": "^0.2.1", + "babel-plugin-istanbul": "^2.0.3", + "babel-preset-es2015-node4": "^2.1.0", + "babel-register": "^6.14.0", "chai": "^3.4.1", + "eslint": "^3.5.0", + "eslint-config-canonical": "^1.8.6", "gitdown": "^2.4.0", - "jsonlint": "^1.6.2", - "pragmatist": "^3.0.2", + "husky": "^0.11.7", + "mocha": "^3.0.2", + "nyc": "^8.3.1", "sinon": "^1.17.2" }, - "directories": {}, - "dist": { - "shasum": "b424433ef596851922b2fd77224a69a1951618eb", - "tarball": "http://registry.npmjs.org/table/-/table-3.7.8.tgz" - }, - "gitHead": "7464b27999c5c6da43c754fb5f94931423d41839", - "homepage": "https://github.com/gajus/table#readme", "keywords": [ - "align", - "ansi", "ascii", + "text", "table", - "text" + "align", + "ansi" ], "license": "BSD-3-Clause", "main": "./dist/index.js", - "maintainers": [ - { - "name": "gajus", - "email": "gk@anuary.com" - } - ], "name": "table", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", + "nyc": { + "include": [ + "src/*.js" + ], + "instrument": false, + "lines": 70, + "require": [ + "babel-register" + ], + "sourceMap": false + }, "repository": { "type": "git", - "url": "git+https://github.com/gajus/table.git" + "url": "https://github.com/gajus/table" }, "scripts": { - "build": "npm run pragmatist build -- --es5", - "format-config": "npm run format-json ./package.json", - "format-json": "jsonlint --sort-keys --in-place --indent ' '", - "lint": "npm run pragmatist lint", - "pragmatist": "pragmatist", - "readme": "node ./node_modules/.bin/gitdown ./.README/README.md --output-file ./README.md", - "test": "npm run pragmatist test" + "build": "rm -fr ./dist && babel --copy-files ./src --out-dir ./dist && npm run make-validators", + "lint": "npm run build && eslint ./src ./tests", + "make-readme": "gitdown ./.README/README.md --output-file ./README.md", + "make-validators": "ajv compile --all-errors --inline-refs=false -s src/schemas/config -c ajv-keywords/keywords/typeof -o dist/validateConfig.js && ajv compile --all-errors --inline-refs=false -s src/schemas/streamConfig -c ajv-keywords/keywords/typeof -o dist/validateStreamConfig.js", + "precommit": "npm run lint && npm run test", + "prepublish": "NODE_ENV=production npm run build", + "test": "npm run build && nyc --check-coverage mocha" }, - "version": "3.7.8" + "version": "3.8.3" } diff --git a/node_modules/table/test/README/usage/basic.js b/node_modules/table/test/README/usage/basic.js new file mode 100644 index 0000000..1ce78eb --- /dev/null +++ b/node_modules/table/test/README/usage/basic.js @@ -0,0 +1,25 @@ +import table from './../../../src'; +import expectTable from './expectTable'; + +describe('README.md usage/', () => { + it('basic', () => { + const data = [ + ['0A', '0B', '0C'], + ['1A', '1B', '1C'], + ['2A', '2B', '2C'] + ]; + + const output = table(data); + + // eslint-disable-next-line no-restricted-syntax + expectTable(output, ` +╔════╤════╤════╗ +║ 0A │ 0B │ 0C ║ +╟────┼────┼────╢ +║ 1A │ 1B │ 1C ║ +╟────┼────┼────╢ +║ 2A │ 2B │ 2C ║ +╚════╧════╧════╝ + `); + }); +}); diff --git a/node_modules/table/test/README/usage/cell_content_alignment.js b/node_modules/table/test/README/usage/cell_content_alignment.js new file mode 100644 index 0000000..b687599 --- /dev/null +++ b/node_modules/table/test/README/usage/cell_content_alignment.js @@ -0,0 +1,45 @@ +import table from './../../../src'; +import expectTable from './expectTable'; + +describe('README.md usage/', () => { + it('cell_content_alignment', () => { + const data = [ + ['0A', '0B', '0C'], + ['1A', '1B', '1C'], + ['2A', '2B', '2C'] + ]; + + const config = { + columns: { + 0: { + alignment: 'left', + width: 10 + }, + 1: { + alignment: 'center', + width: 10 + }, + 2: { + alignment: 'right', + width: 10 + } + } + }; + + const output = table(data, config); + + // console.log(output); + + /* eslint-disable no-restricted-syntax */ + expectTable(output, ` +╔════════════╤════════════╤════════════╗ +║ 0A │ 0B │ 0C ║ +╟────────────┼────────────┼────────────╢ +║ 1A │ 1B │ 1C ║ +╟────────────┼────────────┼────────────╢ +║ 2A │ 2B │ 2C ║ +╚════════════╧════════════╧════════════╝ + `); + /* eslint-enable no-restricted-syntax */ + }); +}); diff --git a/node_modules/table/test/README/usage/column_width.js b/node_modules/table/test/README/usage/column_width.js new file mode 100644 index 0000000..698b4aa --- /dev/null +++ b/node_modules/table/test/README/usage/column_width.js @@ -0,0 +1,33 @@ +import table from './../../../src'; +import expectTable from './expectTable'; + +describe('README.md usage/', () => { + it('column_width', () => { + const data = [ + ['0A', '0B', '0C'], + ['1A', '1B', '1C'], + ['2A', '2B', '2C'] + ]; + + const config = { + columns: { + 1: { + width: 10 + } + } + }; + + const output = table(data, config); + + // eslint-disable-next-line no-restricted-syntax + expectTable(output, ` +╔════╤════════════╤════╗ +║ 0A │ 0B │ 0C ║ +╟────┼────────────┼────╢ +║ 1A │ 1B │ 1C ║ +╟────┼────────────┼────╢ +║ 2A │ 2B │ 2C ║ +╚════╧════════════╧════╝ + `); + }); +}); diff --git a/node_modules/table/test/README/usage/custom_border.js b/node_modules/table/test/README/usage/custom_border.js new file mode 100644 index 0000000..2ce22ab --- /dev/null +++ b/node_modules/table/test/README/usage/custom_border.js @@ -0,0 +1,50 @@ +import table from './../../../src'; +import expectTable from './expectTable'; + +describe('README.md usage/', () => { + it('usage/custom_border', () => { + const data = [ + ['0A', '0B', '0C'], + ['1A', '1B', '1C'], + ['2A', '2B', '2C'] + ]; + + /* eslint-disable sort-keys */ + const config = { + border: { + topBody: '─', + topJoin: '┬', + topLeft: '┌', + topRight: '┐', + + bottomBody: '─', + bottomJoin: '┴', + bottomLeft: '└', + bottomRight: '┘', + + bodyLeft: '│', + bodyRight: '│', + bodyJoin: '│', + + joinBody: '─', + joinLeft: '├', + joinRight: '┤', + joinJoin: '┼' + } + }; + /* eslint-enable */ + + const output = table(data, config); + + // eslint-disable-next-line no-restricted-syntax + expectTable(output, ` +┌────┬────┬────┐ +│ 0A │ 0B │ 0C │ +├────┼────┼────┤ +│ 1A │ 1B │ 1C │ +├────┼────┼────┤ +│ 2A │ 2B │ 2C │ +└────┴────┴────┘ + `); + }); +}); diff --git a/node_modules/table/test/README/usage/draw_horizontal_line.js b/node_modules/table/test/README/usage/draw_horizontal_line.js new file mode 100644 index 0000000..621081b --- /dev/null +++ b/node_modules/table/test/README/usage/draw_horizontal_line.js @@ -0,0 +1,41 @@ +import table from './../../../src'; +import expectTable from './expectTable'; + +describe('README.md usage/', () => { + it('usage/draw_horizontal_line', () => { + const data = [ + ['0A', '0B', '0C'], + ['1A', '1B', '1C'], + ['2A', '2B', '2C'], + ['3A', '3B', '3C'], + ['4A', '4B', '4C'] + ]; + + const options = { + /** + * @typedef {Function} drawJoin + * @param {number} index + * @param {number} size + * @returns {boolean} + */ + drawHorizontalLine: (index, size) => { + return index === 0 || index === 1 || index === size - 1 || index === size; + } + }; + + const output = table(data, options); + + // eslint-disable-next-line no-restricted-syntax + expectTable(output, ` +╔════╤════╤════╗ +║ 0A │ 0B │ 0C ║ +╟────┼────┼────╢ +║ 1A │ 1B │ 1C ║ +║ 2A │ 2B │ 2C ║ +║ 3A │ 3B │ 3C ║ +╟────┼────┼────╢ +║ 4A │ 4B │ 4C ║ +╚════╧════╧════╝ + `); + }); +}); diff --git a/node_modules/table/test/README/usage/expectTable.js b/node_modules/table/test/README/usage/expectTable.js new file mode 100644 index 0000000..d66c913 --- /dev/null +++ b/node_modules/table/test/README/usage/expectTable.js @@ -0,0 +1,13 @@ +import { + expect +} from 'chai'; +import _ from 'lodash'; + +/** + * @param {string} result + * @param {string} expectedResult + * @returns {undefined} + */ +export default (result, expectedResult) => { + expect(result).to.equal(_.trim(expectedResult) + '\n'); +}; diff --git a/node_modules/table/test/README/usage/moon_mission.js b/node_modules/table/test/README/usage/moon_mission.js new file mode 100644 index 0000000..c9b9239 --- /dev/null +++ b/node_modules/table/test/README/usage/moon_mission.js @@ -0,0 +1,67 @@ +import _ from 'lodash'; +import chalk from 'chalk'; +import table, { + getBorderCharacters +} from './../../../src'; + +describe('README.md usage/', () => { + it('moon_mission', () => { + const data = [ + [ + chalk.bold('Spacecraft'), + chalk.bold('Launch Date'), + chalk.bold('Operator'), + chalk.bold('Outcome'), + chalk.bold('Remarks') + ], + [ + 'Able I', + '17 August 1958', + 'USAF', + chalk.white.bold.bgRed('Launch failure'), + 'First attempted launch beyond Earth orbit; failed to orbit due to turbopump gearbox malfunction resulting in first stage explosion.[3] Reached apogee of 16 kilometres (9.9 mi)' + ], + [ + 'Luna 2', + '12 September 1959', + 'OKB-1', + chalk.black.bgGreen('Successful'), + 'Successful impact at 21:02 on 14 September 1959. First spacecraft to reach lunar surface' + ], + [ + 'Lunar Orbiter 1', + '10 August 1966', + 'NASA', + chalk.black.bgYellow('Partial failure'), + 'Orbital insertion at around 15:36 UTC on 14 August. Deorbited early due to lack of fuel and to avoid communications interference with the next mission, impacted the Moon at 13:30 UTC on 29 October 1966.' + ], + [ + 'Apollo 8', + '21 December 1968', + 'NASA', + chalk.black.bgGreen('Successful'), + 'First manned mission to the Moon; entered orbit around the Moon with four-minute burn beginning at 09:59:52 UTC on 24 December. Completed ten orbits of the Moon before returning to Earth with an engine burn at 06:10:16 UTC on 25 December. Landed in the Pacific Ocean at 15:51 UTC on 27 December.' + ], + [ + 'Apollo 11', + '16 July 1969', + 'NASA', + chalk.black.bgGreen('Successful'), + 'First manned landing on the Moon. LM landed at 20:17 UTC on 20 July 1969' + ] + ]; + + const tableBorder = _.mapValues(getBorderCharacters('honeywell'), (char) => { + return chalk.gray(char); + }); + + table(data, { + border: tableBorder, + columns: { + 4: { + width: 50 + } + } + }); + }); +}); diff --git a/node_modules/table/test/README/usage/padding_cell_content.js b/node_modules/table/test/README/usage/padding_cell_content.js new file mode 100644 index 0000000..fdac2b3 --- /dev/null +++ b/node_modules/table/test/README/usage/padding_cell_content.js @@ -0,0 +1,39 @@ +import table from './../../../src'; +import expectTable from './expectTable'; + +describe('README.md usage/', () => { + it('usage/padding_cell_content', () => { + const data = [ + ['0A', 'AABBCC', '0C'], + ['1A', '1B', '1C'], + ['2A', '2B', '2C'] + ]; + + const config = { + columns: { + 0: { + paddingLeft: 3 + }, + 1: { + paddingRight: 3, + width: 2 + } + } + }; + + const output = table(data, config); + + // eslint-disable-next-line no-restricted-syntax + expectTable(output, ` +╔══════╤══════╤════╗ +║ 0A │ AA │ 0C ║ +║ │ BB │ ║ +║ │ CC │ ║ +╟──────┼──────┼────╢ +║ 1A │ 1B │ 1C ║ +╟──────┼──────┼────╢ +║ 2A │ 2B │ 2C ║ +╚══════╧══════╧════╝ + `); + }); +}); diff --git a/node_modules/table/test/README/usage/predefined_border_templates.js b/node_modules/table/test/README/usage/predefined_border_templates.js new file mode 100644 index 0000000..f6ad716 --- /dev/null +++ b/node_modules/table/test/README/usage/predefined_border_templates.js @@ -0,0 +1,91 @@ +import _ from 'lodash'; +import table, { + getBorderCharacters +} from './../../../src'; +import expectTable from './expectTable'; + +describe('README.md usage/predefined_border_templates', () => { + let data; + + before(() => { + data = [ + ['0A', '0B', '0C'], + ['1A', '1B', '1C'], + ['2A', '2B', '2C'] + ]; + }); + + it('honeywell', () => { + const output = table(data, { + border: getBorderCharacters('honeywell') + }); + + // eslint-disable-next-line no-restricted-syntax + expectTable(output, ` +╔════╤════╤════╗ +║ 0A │ 0B │ 0C ║ +╟────┼────┼────╢ +║ 1A │ 1B │ 1C ║ +╟────┼────┼────╢ +║ 2A │ 2B │ 2C ║ +╚════╧════╧════╝ + `); + }); + + it('norc', () => { + const output = table(data, { + border: getBorderCharacters('norc') + }); + + // eslint-disable-next-line no-restricted-syntax + expectTable(output, ` +┌────┬────┬────┐ +│ 0A │ 0B │ 0C │ +├────┼────┼────┤ +│ 1A │ 1B │ 1C │ +├────┼────┼────┤ +│ 2A │ 2B │ 2C │ +└────┴────┴────┘ + `); + }); + + it('ramac', () => { + const output = table(data, { + border: getBorderCharacters('ramac') + }); + + // eslint-disable-next-line no-restricted-syntax + expectTable(output, ` ++----+----+----+ +| 0A | 0B | 0C | +|----|----|----| +| 1A | 1B | 1C | +|----|----|----| +| 2A | 2B | 2C | ++----+----+----+ + `); + }); + + it('void', () => { + const output = table(data, { + border: getBorderCharacters('void') + }); + + expectTable(_.trim(output) + '\n', '0A 0B 0C \n\n 1A 1B 1C \n\n 2A 2B 2C'); + }); + + it('borderless', () => { + const output = table(data, { + border: getBorderCharacters('void'), + columnDefault: { + paddingLeft: 0, + paddingRight: 1 + }, + drawHorizontalLine: () => { + return false; + } + }); + + expectTable(_.trim(output) + '\n', '0A 0B 0C \n1A 1B 1C \n2A 2B 2C'); + }); +}); diff --git a/node_modules/table/test/README/usage/streaming.js b/node_modules/table/test/README/usage/streaming.js new file mode 100644 index 0000000..faec63d --- /dev/null +++ b/node_modules/table/test/README/usage/streaming.js @@ -0,0 +1,56 @@ +import { + createStream +} from './../../../src'; +import expectTable from './expectTable'; + +describe('README.md usage/', () => { + describe('process.stdout.write', () => { + let processStdoutWriteBuffer; + + /** + * @var {Function} Reference to the original process.stdout.write function. + */ + const processStdoutWrite = process.stdout.write; + + /** + * @returns {undefined} + */ + const overwriteProcessStdoutWrite = () => { + processStdoutWriteBuffer = ''; + + process.stdout.write = (text) => { + processStdoutWriteBuffer += text; + }; + }; + + /** + * @returns {string} + */ + const resetProcessStdoudWrite = () => { + process.stdout.write = processStdoutWrite; + + return processStdoutWriteBuffer; + }; + + it('streaming', () => { + const config = { + columnCount: 3, + columnDefault: { + width: 2 + } + }; + + const stream = createStream(config); + + overwriteProcessStdoutWrite(); + + stream.write(['0A', '0B', '0C']); + stream.write(['1A', '1B', '1C']); + stream.write(['2A', '2B', '2C']); + + const output = resetProcessStdoudWrite(); + + expectTable(output + '\n', '╔════╤════╤════╗\n║ 0A │ 0B │ 0C ║\n╚════╧════╧════╝\r\u001b[K╟────┼────┼────╢\n║ 1A │ 1B │ 1C ║\n╚════╧════╧════╝\r\u001b[K╟────┼────┼────╢\n║ 2A │ 2B │ 2C ║\n╚════╧════╧════╝'); + }); + }); +}); diff --git a/node_modules/table/test/README/usage/text_truncating.js b/node_modules/table/test/README/usage/text_truncating.js new file mode 100644 index 0000000..07e9412 --- /dev/null +++ b/node_modules/table/test/README/usage/text_truncating.js @@ -0,0 +1,32 @@ +import table from './../../../src'; +import expectTable from './expectTable'; + +describe('README.md usage/', () => { + it('text_truncating', () => { + const data = [ + ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.'] + ]; + + const config = { + columns: { + 0: { + truncate: 100, + width: 20 + } + } + }; + + const output = table(data, config); + + // eslint-disable-next-line no-restricted-syntax + expectTable(output, ` +╔══════════════════════╗ +║ Lorem ipsum dolor si ║ +║ t amet, consectetur ║ +║ adipiscing elit. Pha ║ +║ sellus pulvinar nibh ║ +║ sed mauris conva... ║ +╚══════════════════════╝ + `); + }); +}); diff --git a/node_modules/table/test/README/usage/text_wrapping.js b/node_modules/table/test/README/usage/text_wrapping.js new file mode 100644 index 0000000..1db25e9 --- /dev/null +++ b/node_modules/table/test/README/usage/text_wrapping.js @@ -0,0 +1,67 @@ +import table from './../../../src'; +import expectTable from './expectTable'; + +describe('README.md usage/', () => { + it('text_wrapping (no wrap word)', () => { + const data = [ + ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.'] + ]; + + const config = { + columns: { + 0: { + width: 20 + } + } + }; + + const output = table(data, config); + + // eslint-disable-next-line no-restricted-syntax + expectTable(output, ` +╔══════════════════════╗ +║ Lorem ipsum dolor si ║ +║ t amet, consectetur ║ +║ adipiscing elit. Pha ║ +║ sellus pulvinar nibh ║ +║ sed mauris convallis ║ +║ dapibus. Nunc venena ║ +║ tis tempus nulla sit ║ +║ amet viverra. ║ +╚══════════════════════╝ + `); + }); + + it('text_wrapping (wrap word)', () => { + const data = [ + ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.'] + ]; + + const config = { + columns: { + 0: { + width: 20, + wrapWord: true + } + } + }; + + const output = table(data, config); + + // eslint-disable-next-line no-restricted-syntax + expectTable(output, ` +╔══════════════════════╗ +║ Lorem ipsum dolor ║ +║ sit amet, ║ +║ consectetur ║ +║ adipiscing elit. ║ +║ Phasellus pulvinar ║ +║ nibh sed mauris ║ +║ convallis dapibus. ║ +║ Nunc venenatis ║ +║ tempus nulla sit ║ +║ amet viverra. ║ +╚══════════════════════╝ + `); + }); +}); diff --git a/node_modules/table/test/alignString.js b/node_modules/table/test/alignString.js new file mode 100644 index 0000000..e995a34 --- /dev/null +++ b/node_modules/table/test/alignString.js @@ -0,0 +1,102 @@ +/* eslint-disable max-nested-callbacks */ + +import { + expect +} from 'chai'; +import chalk from 'chalk'; +import alignString from './../src/alignString'; + +describe('alignString', () => { + context('subject parameter value is not a string', () => { + it('throws an error', () => { + expect(() => { + alignString(); + }).to.throw(Error, 'Subject parameter value must be a string.'); + }); + }); + context('container width parameter value is not a string', () => { + it('throws an error', () => { + expect(() => { + alignString(''); + }).to.throw(Error, 'Container width parameter value must be a number.'); + }); + }); + context('subject parameter value width is greater than the container width', () => { + it('throws an error', () => { + expect(() => { + alignString('aa', 1, 'left'); + }).to.throw(Error, 'Subject parameter value width cannot be greater than the container width.'); + }); + }); + context('container alignment parameter value is not a string', () => { + it('throws an error', () => { + expect(() => { + alignString('', 1); + }).to.throw(Error, 'Alignment parameter value must be a string.'); + }); + }); + context('container alignment parameter value is not a known alignment parameter value', () => { + it('throws an error', () => { + expect(() => { + alignString('', 1, 'foo'); + }).to.throw(Error, 'Alignment parameter value must be a known alignment parameter value (left, right, center).'); + }); + }); + context('subject parameter value', () => { + context('0 width', () => { + it('produces a string consisting of container width number of whitespace characters', () => { + expect(alignString('', 5, 'left')).to.equal(' ', 'left'); + expect(alignString('', 5, 'center')).to.equal(' ', 'center'); + expect(alignString('', 5, 'right')).to.equal(' ', 'right'); + }); + }); + context('plain text', () => { + context('alignment', () => { + context('left', () => { + it('pads the string on the right side using a whitespace character', () => { + expect(alignString('aa', 6, 'left')).to.equal('aa '); + }); + }); + context('right', () => { + it('pads the string on the left side using a whitespace character', () => { + expect(alignString('aa', 6, 'right')).to.equal(' aa'); + }); + }); + context('center', () => { + it('pads the string on both sides using a whitespace character', () => { + expect(alignString('aa', 6, 'center')).to.equal(' aa '); + }); + context('uneven number of available with', () => { + it('floors the available width; adds extra space to the end of the string', () => { + expect(alignString('aa', 7, 'center')).to.equal(' aa '); + }); + }); + }); + }); + }); + context('text containing ANSI escape codes', () => { + context('alignment', () => { + context('left', () => { + it('pads the string on the right side using a whitespace character', () => { + expect(alignString(chalk.red('aa'), 6, 'left')).to.equal(chalk.red('aa') + ' '); + }); + }); + context('right', () => { + it('pads the string on the left side using a whitespace character', () => { + expect(alignString(chalk.red('aa'), 6, 'right')).to.equal(' ' + chalk.red('aa')); + }); + }); + context('center', () => { + it('pads the string on both sides using a whitespace character', () => { + expect(alignString(chalk.red('aa'), 6, 'center')).to.equal(' ' + chalk.red('aa') + ' '); + }); + context('uneven number of available with', () => { + it('floors the available width; adds extra space to the end of the string', () => { + expect(alignString(chalk.red('aa'), 7, 'center')).to.equal(' ' + chalk.red('aa') + ' '); + }); + }); + }); + }); + }); + }); +}); diff --git a/node_modules/table/test/calculateCellHeight.js b/node_modules/table/test/calculateCellHeight.js new file mode 100644 index 0000000..c5a4929 --- /dev/null +++ b/node_modules/table/test/calculateCellHeight.js @@ -0,0 +1,44 @@ +/* eslint-disable max-nested-callbacks */ + +import { + expect +} from 'chai'; +import calculateCellHeight from './../src/calculateCellHeight'; + +describe('calculateCellHeight', () => { + describe('value', () => { + context('is not a string', () => { + it('throws an error', () => { + expect(() => { + calculateCellHeight(null); + }).to.throw(Error, 'Value must be a string.'); + }); + }); + }); + describe('context width', () => { + context('is not an integer', () => { + it('throws an error', () => { + expect(() => { + calculateCellHeight('foo', null); + }).to.throw(Error, 'Column width must be an integer.'); + }); + }); + context('is 0', () => { + it('throws an error', () => { + expect(() => { + calculateCellHeight('foo', 0); + }).to.throw(Error, 'Column width must be greater than 0.'); + }); + }); + context('is lesser than the column width', () => { + it('has height 1', () => { + expect(calculateCellHeight('foo', 10)).to.equal(1); + }); + }); + context('is 2 and half times greater than the column width', () => { + it('has height 3', () => { + expect(calculateCellHeight('aabbc', 2)).to.equal(3); + }); + }); + }); +}); diff --git a/node_modules/table/test/calculateCellWidthIndex.js b/node_modules/table/test/calculateCellWidthIndex.js new file mode 100644 index 0000000..b999567 --- /dev/null +++ b/node_modules/table/test/calculateCellWidthIndex.js @@ -0,0 +1,20 @@ +import { + expect +} from 'chai'; +import calculateCellWidthIndex from './../src/calculateCellWidthIndex'; + +describe('calculateCellWidthIndex', () => { + context('all cells have different width', () => { + it('describes each cell contents width', () => { + const cellWidthIndex = calculateCellWidthIndex([ + 'a', + 'aaa', + 'aaaaaa' + ]); + + expect(cellWidthIndex[0]).to.equal(1, 'first column'); + expect(cellWidthIndex[1]).to.equal(3, 'second column'); + expect(cellWidthIndex[2]).to.equal(6, 'third column'); + }); + }); +}); diff --git a/node_modules/table/test/calculateMaximumColumnWidthIndex.js b/node_modules/table/test/calculateMaximumColumnWidthIndex.js new file mode 100644 index 0000000..6508134 --- /dev/null +++ b/node_modules/table/test/calculateMaximumColumnWidthIndex.js @@ -0,0 +1,59 @@ +import { + expect +} from 'chai'; +import chalk from 'chalk'; +import calculateMaximumColumnWidthIndex from './../src/calculateMaximumColumnWidthIndex'; + +describe('calculateMaximumColumnWidthIndex', () => { + it('throws an error when attempting to calculate maximum column value index for an empty data set', () => { + expect(() => { + calculateMaximumColumnWidthIndex([]); + }).to.throw(Error, 'Dataset must have at least one row.'); + }); + it('calculates the maximum column value index', () => { + const maximumColumnValueIndex = calculateMaximumColumnWidthIndex([ + [ + '', + 'a', + 'b', + 'c' + ], + [ + '', + 'a', + 'bbbbbbbbbb', + 'c' + ], + [ + '', + '', + 'b', + 'ccccc' + ] + ]); + + expect(maximumColumnValueIndex).to.deep.equal([0, 1, 10, 5]); + }); + context('cell values contain ANSI codes', () => { + it('uses visual width of the string', () => { + const maximumColumnValueIndex = calculateMaximumColumnWidthIndex([ + [ + chalk.red('aaaaa') + ] + ]); + + expect(maximumColumnValueIndex[0]).to.equal(5); + }); + }); + context('cell values contain fullwidth characters', () => { + it('uses visual width of the string', () => { + const maximumColumnValueIndex = calculateMaximumColumnWidthIndex([ + [ + chalk.red('古') + ] + ]); + + expect(maximumColumnValueIndex[0]).to.equal(2); + }); + }); +}); diff --git a/node_modules/table/test/calculateRowHeightIndex.js b/node_modules/table/test/calculateRowHeightIndex.js new file mode 100644 index 0000000..d4a43ae --- /dev/null +++ b/node_modules/table/test/calculateRowHeightIndex.js @@ -0,0 +1,78 @@ +/* eslint-disable max-nested-callbacks */ + +import { + expect +} from 'chai'; +import calculateRowHeightIndex from './../src/calculateRowHeightIndex'; + +describe('calculateRowHeightIndex', () => { + context('single column', () => { + context('cell content width is lesser than column width', () => { + it('is equal to 1', () => { + const data = [ + [ + 'aaa' + ] + ]; + + const config = { + columns: { + 0: { + width: 10, + wrapWord: false + } + } + }; + + const rowSpanIndex = calculateRowHeightIndex(data, config); + + expect(rowSpanIndex[0]).to.equal(1); + }); + }); + context('cell content width is twice the size of the column width', () => { + it('is equal to 2', () => { + const data = [ + [ + 'aaabbb' + ] + ]; + + const config = { + columns: { + 0: { + width: 3, + wrapWord: false + } + } + }; + + const rowSpanIndex = calculateRowHeightIndex(data, config); + + expect(rowSpanIndex[0]).to.equal(2); + }); + }); + }); + context('multiple columns', () => { + context('multiple cell content width is greater than the column width', () => { + it('uses the largest height', () => { + const data = [ + ['aaabbb'], + ['aaabbb'] + ]; + + const config = { + columns: { + 0: { + width: 2, + wrapWord: false + } + } + }; + + const rowSpanIndex = calculateRowHeightIndex(data, config); + + expect(rowSpanIndex[0]).to.equal(3); + }); + }); + }); +}); diff --git a/node_modules/table/test/config.js b/node_modules/table/test/config.js new file mode 100644 index 0000000..55bd5c2 --- /dev/null +++ b/node_modules/table/test/config.js @@ -0,0 +1,43 @@ +import { + expect +} from 'chai'; +import configSamples from './configSamples'; +import validateConfig from '../dist/validateConfig'; +import configSchema from '../src/schemas/config.json'; +import Ajv from 'ajv'; +import ajvKeywords from 'ajv-keywords'; + +describe('config.json schema', () => { + var validate; + + before(() => { + var ajv = new Ajv({allErrors: true}); + ajvKeywords(ajv, 'typeof'); + validate = ajv.compile(configSchema); + }); + + it('should pass validation of valid config samples', () => { + configSamples.valid.forEach((sample, i) => { + testValid(sample, validate); + testValid(sample, validateConfig); + }); + + function testValid(sample, validate) { + var valid = validate(sample); + if (!valid) console.log(validate.errors); + expect(valid).to.equal(true); + } + }); + + it('should fail validation of invalid config samples', () => { + configSamples.invalid.forEach((sample, i) => { + testInvalid(sample, validate); + testInvalid(sample, validateConfig); + }); + + function testInvalid(sample, validate) { + var valid = validate(sample); + expect(valid).to.equal(false); + } + }); +}); diff --git a/node_modules/table/test/configSamples.js b/node_modules/table/test/configSamples.js new file mode 100644 index 0000000..20d8bf6 --- /dev/null +++ b/node_modules/table/test/configSamples.js @@ -0,0 +1,153 @@ +export default { + valid: [ + { + columns: { + 0: { + alignment: 'left', + // minWidth: 10, + width: 10 + }, + 1: { + alignment: 'center', + // minWidth: 10, + width: 10 + }, + 2: { + alignment: 'right', + // minWidth: 10, + width: 10 + } + } + }, + { + border: { + topBody: `─`, + topJoin: `┬`, + topLeft: `┌`, + topRight: `┐`, + + bottomBody: `─`, + bottomJoin: `┴`, + bottomLeft: `└`, + bottomRight: `┘`, + + bodyLeft: `│`, + bodyRight: `│`, + bodyJoin: `│`, + + joinBody: `─`, + joinLeft: `├`, + joinRight: `┤`, + joinJoin: `┼` + } + }, + { + columns: { + 0: { + paddingLeft: 3 + }, + 1: { + width: 2, + paddingRight: 3 + } + } + }, + { + border: {}, + columnDefault: { + paddingLeft: 0, + paddingRight: 1 + }, + // drawJoin: () => { + // return false + // } + }, + { + columnDefault: { + width: 50 + }, + // columnCount: 3, + columns: { + 0: { + width: 10, + alignment: 'right' + }, + 1: { + alignment: 'center', + }, + 2: { + width: 10 + } + } + }, + { border: { topBody: '-' } }, + { border: { topJoin: '-' } }, + { border: { topLeft: '-' } }, + { border: { topRight: '-' } }, + { border: { bottomBody: '-' } }, + { border: { bottomJoin: '-' } }, + { border: { bottomLeft: '-' } }, + { border: { bottomRight: '-' } }, + { border: { bodyLeft: '-' } }, + { border: { bodyRight: '-' } }, + { border: { bodyJoin: '-' } }, + { border: { joinBody: '-' } }, + { border: { joinLeft: '-' } }, + { border: { joinRight: '-' } }, + { border: { joinJoin: '-' } }, + { columns: { '1': { alignment: 'left' } } }, + { columns: { '1': { width: 5 } } }, + { columns: { '1': { wrapWord: true } } }, + { columns: { '1': { truncate: 1 } } }, + { columns: { '1': { paddingLeft: 1 } } }, + { columns: { '1': { paddingRight: 1 } } }, + { columnDefault: { alignment: 'left' } }, + { columnDefault: { width: 5 } }, + { columnDefault: { wrapWord: true } }, + { columnDefault: { truncate: 1 } }, + { columnDefault: { paddingLeft: 1 } }, + { columnDefault: { paddingRight: 1 } }, + { drawHorizontalLine: function(){} } + ], + invalid: [ + { border: 1 }, + { border: { unknown: '-' } }, + { border: { topBody: 1 } }, + { border: { topJoin: 1 } }, + { border: { topLeft: 1 } }, + { border: { topRight: 1 } }, + { border: { bottomBody: 1 } }, + { border: { bottomJoin: 1 } }, + { border: { bottomLeft: 1 } }, + { border: { bottomRight: 1 } }, + { border: { bodyLeft: 1 } }, + { border: { bodyRight: 1 } }, + { border: { bodyJoin: 1 } }, + { border: { joinBody: 1 } }, + { border: { joinLeft: 1 } }, + { border: { joinRight: 1 } }, + { border: { joinJoin: 1 } }, + { columns: 1 }, + { columns: { a: { width: 5 } } }, + { columns: { '1': 1 } }, + { columns: { '1': { unknown: 1 } } }, + { columns: { '1': { alignment: 1 } } }, + { columns: { '1': { alignment: '1' } } }, + { columns: { '1': { width: '5' } } }, + { columns: { '1': { wrapWord: 1 } } }, + { columns: { '1': { truncate: '1' } } }, + { columns: { '1': { paddingLeft: '1' } } }, + { columns: { '1': { paddingRight: '1' } } }, + { columnDefault: 1 }, + { columnDefault: { unknown: 1 } }, + { columnDefault: { alignment: 1 } }, + { columnDefault: { alignment: '1' } }, + { columnDefault: { width: '5' } }, + { columnDefault: { wrapWord: 1 } }, + { columnDefault: { truncate: '1' } }, + { columnDefault: { paddingLeft: '1' } }, + { columnDefault: { paddingRight: '1' } }, + { drawHorizontalLine: 1 }, + { unknown: 1 } + ] +}; diff --git a/node_modules/table/test/createStream.js b/node_modules/table/test/createStream.js new file mode 100644 index 0000000..c9abece --- /dev/null +++ b/node_modules/table/test/createStream.js @@ -0,0 +1,41 @@ +/* eslint-disable max-nested-callbacks */ + +import { + expect +} from 'chai'; +import createStream from './../src/createStream'; + +describe('createStream', () => { + context('"config.columnDefault.width" property is not provided', () => { + it('throws an error', () => { + expect(() => { + createStream(); + }).to.throw(Error, 'Must provide config.columnDefault.width when creating a stream.'); + }); + }); + context('"config.columnCount" property is not provided', () => { + it('throws an error', () => { + expect(() => { + createStream({ + columnDefault: { + width: 10 + } + }); + }).to.throw(Error, 'Must provide config.columnCount.'); + }); + }); + context('Table data cell count does not match the columnCount.', () => { + it('throws an error', () => { + expect(() => { + const stream = createStream({ + columnCount: 10, + columnDefault: { + width: 10 + } + }); + + stream.write(['foo']); + }).to.throw(Error, 'Row cell count does not match the config.columnCount.'); + }); + }); +}); diff --git a/node_modules/table/test/drawBorder.js b/node_modules/table/test/drawBorder.js new file mode 100644 index 0000000..a2cbb17 --- /dev/null +++ b/node_modules/table/test/drawBorder.js @@ -0,0 +1,71 @@ +/* eslint-disable sort-keys */ + +import { + expect +} from 'chai'; +import { + drawBorder, + drawBorderTop, + drawBorderJoin, + drawBorderBottom +} from './../src/drawBorder'; + +describe('drawBorder', () => { + it('draws a border using parts', () => { + const parts = { + left: '╔', + right: '╗', + body: '═', + join: '╤' + }; + + expect(drawBorder([1], parts)).to.equal('╔═╗\n'); + expect(drawBorder([1, 1], parts)).to.equal('╔═╤═╗\n'); + expect(drawBorder([5, 10], parts)).to.equal('╔═════╤══════════╗\n'); + }); +}); + +describe('drawBorderTop', () => { + it('draws a border using parts', () => { + const parts = { + topLeft: '╔', + topRight: '╗', + topBody: '═', + topJoin: '╤' + }; + + expect(drawBorderTop([1], parts)).to.equal('╔═╗\n'); + expect(drawBorderTop([1, 1], parts)).to.equal('╔═╤═╗\n'); + expect(drawBorderTop([5, 10], parts)).to.equal('╔═════╤══════════╗\n'); + }); +}); + +describe('drawBorderJoin', () => { + it('draws a border using parts', () => { + const parts = { + joinBody: '─', + joinLeft: '╟', + joinRight: '╢', + joinJoin: '┼' + }; + + expect(drawBorderJoin([1], parts)).to.equal('╟─╢\n'); + expect(drawBorderJoin([1, 1], parts)).to.equal('╟─┼─╢\n'); + expect(drawBorderJoin([5, 10], parts)).to.equal('╟─────┼──────────╢\n'); + }); +}); + +describe('drawBorderBottom', () => { + it('draws a border using parts', () => { + const parts = { + bottomBody: '═', + bottomJoin: '╧', + bottomLeft: '╚', + bottomRight: '╝' + }; + + expect(drawBorderBottom([1], parts)).to.equal('╚═╝\n'); + expect(drawBorderBottom([1, 1], parts)).to.equal('╚═╧═╝\n'); + expect(drawBorderBottom([5, 10], parts)).to.equal('╚═════╧══════════╝\n'); + }); +}); diff --git a/node_modules/table/test/makeConfig.js b/node_modules/table/test/makeConfig.js new file mode 100644 index 0000000..7061738 --- /dev/null +++ b/node_modules/table/test/makeConfig.js @@ -0,0 +1,75 @@ +/* eslint-disable max-nested-callbacks */ + +import { + expect +} from 'chai'; +import makeConfig from './../src/makeConfig'; + +describe('makeConfig', () => { + it('does not affect the parameter configuration object', () => { + const config = {}; + + makeConfig([ + [ + 'aaaaa' + ] + ], config); + + expect(config).to.deep.equal({}); + }); + + context('column', () => { + context('"alignment"', () => { + context('is not provided', () => { + it('defaults to "left"', () => { + const config = makeConfig([ + [ + 'aaaaa' + ] + ]); + + expect(config.columns[0].alignment).to.equal('left'); + }); + }); + }); + context('"width"', () => { + context('is not provided', () => { + it('defaults to the maximum column width', () => { + const config = makeConfig([ + [ + 'aaaaa' + ] + ]); + + expect(config.columns[0].width).to.equal(5); + }); + }); + }); + context('"paddingLeft"', () => { + context('is not provided', () => { + it('defaults to 1', () => { + const config = makeConfig([ + [ + 'aaaaa' + ] + ]); + + expect(config.columns[0].paddingLeft).to.equal(1); + }); + }); + }); + context('"paddingRight"', () => { + context('is not provided', () => { + it('defaults to 1', () => { + const config = makeConfig([ + [ + 'aaaaa' + ] + ]); + + expect(config.columns[0].paddingRight).to.equal(1); + }); + }); + }); + }); +}); diff --git a/node_modules/table/test/mapDataUsingRowHeightIndex.js b/node_modules/table/test/mapDataUsingRowHeightIndex.js new file mode 100644 index 0000000..d6ddd6b --- /dev/null +++ b/node_modules/table/test/mapDataUsingRowHeightIndex.js @@ -0,0 +1,119 @@ +import { + expect +} from 'chai'; +import mapDataUsingRowHeightIndex from './../src/mapDataUsingRowHeightIndex'; + +describe('mapDataUsingRowHeightIndex', () => { + context('no data spans multiple rows', () => { + it('maps data to a single cell', () => { + const config = { + columns: { + 0: { + width: 2 + } + } + }; + + const rowSpanIndex = [ + 1 + ]; + + const data = [ + [ + 'aa' + ] + ]; + + const mappedData = mapDataUsingRowHeightIndex(data, rowSpanIndex, config); + + expect(mappedData).to.deep.equal([ + [ + 'aa' + ] + ]); + }); + }); + + context('single cell spans multiple rows', () => { + it('maps data to multiple rows', () => { + const config = { + columns: { + 0: { + width: 2 + } + } + }; + + const rowSpanIndex = [ + 5 + ]; + + const data = [ + [ + 'aabbccddee' + ] + ]; + + const mappedData = mapDataUsingRowHeightIndex(data, rowSpanIndex, config); + + expect(mappedData).to.deep.equal([ + ['aa'], + ['bb'], + ['cc'], + ['dd'], + ['ee'] + ]); + }); + }); + + context('multiple cells spans multiple rows', () => { + it('maps data to multiple rows', () => { + const config = { + columns: { + 0: { + width: 2 + }, + 1: { + width: 4 + } + } + }; + + const rowSpanIndex = [ + 5 + ]; + + const data = [ + [ + 'aabbccddee', + '00001111' + ] + ]; + + const mappedData = mapDataUsingRowHeightIndex(data, rowSpanIndex, config); + + expect(mappedData).to.deep.equal([ + [ + 'aa', + '0000' + ], + [ + 'bb', + '1111' + ], + [ + 'cc', + '' + ], + [ + 'dd', + '' + ], + [ + 'ee', + '' + ] + ]); + }); + }); +}); diff --git a/node_modules/table/test/streamConfig.js b/node_modules/table/test/streamConfig.js new file mode 100644 index 0000000..fe3e755 --- /dev/null +++ b/node_modules/table/test/streamConfig.js @@ -0,0 +1,43 @@ +import { + expect +} from 'chai'; +import configSamples from './streamConfigSamples'; +import validateConfig from '../dist/validateStreamConfig'; +import configSchema from '../src/schemas/streamConfig.json'; +import Ajv from 'ajv'; +import ajvKeywords from 'ajv-keywords'; + +describe('streamConfig.json schema', () => { + var validate; + + before(() => { + var ajv = new Ajv({allErrors: true}); + ajvKeywords(ajv, 'typeof'); + validate = ajv.compile(configSchema); + }); + + it('should pass validation of valid streamConfig samples', () => { + configSamples.valid.forEach((sample, i) => { + testValid(sample, validate); + testValid(sample, validateConfig); + }); + + function testValid(sample, validate) { + var valid = validate(sample); + if (!valid) console.log(validate.errors); + expect(valid).to.equal(true); + } + }); + + it('should fail validation of invalid streamConfig samples', () => { + configSamples.invalid.forEach((sample, i) => { + testInvalid(sample, validate); + testInvalid(sample, validateConfig); + }); + + function testInvalid(sample, validate) { + var valid = validate(sample); + expect(valid).to.equal(false); + } + }); +}); diff --git a/node_modules/table/test/streamConfigSamples.js b/node_modules/table/test/streamConfigSamples.js new file mode 100644 index 0000000..3c7d1f3 --- /dev/null +++ b/node_modules/table/test/streamConfigSamples.js @@ -0,0 +1,151 @@ +export default { + valid: [ + { + columns: { + 0: { + alignment: 'left', + // minWidth: 10, + width: 10 + }, + 1: { + alignment: 'center', + // minWidth: 10, + width: 10 + }, + 2: { + alignment: 'right', + // minWidth: 10, + width: 10 + } + } + }, + { + border: { + topBody: `─`, + topJoin: `┬`, + topLeft: `┌`, + topRight: `┐`, + + bottomBody: `─`, + bottomJoin: `┴`, + bottomLeft: `└`, + bottomRight: `┘`, + + bodyLeft: `│`, + bodyRight: `│`, + bodyJoin: `│`, + + joinBody: `─`, + joinLeft: `├`, + joinRight: `┤`, + joinJoin: `┼` + } + }, + { + columns: { + 0: { + paddingLeft: 3 + }, + 1: { + width: 2, + paddingRight: 3 + } + } + }, + { + border: {}, + columnDefault: { + paddingLeft: 0, + paddingRight: 1 + }, + // drawJoin: () => { + // return false + // } + }, + { + columnDefault: { + width: 50 + }, + // columnCount: 3, + columns: { + 0: { + width: 10, + alignment: 'right' + }, + 1: { + alignment: 'center', + }, + 2: { + width: 10 + } + } + }, + { border: { topBody: '-' } }, + { border: { topJoin: '-' } }, + { border: { topLeft: '-' } }, + { border: { topRight: '-' } }, + { border: { bottomBody: '-' } }, + { border: { bottomJoin: '-' } }, + { border: { bottomLeft: '-' } }, + { border: { bottomRight: '-' } }, + { border: { bodyLeft: '-' } }, + { border: { bodyRight: '-' } }, + { border: { bodyJoin: '-' } }, + { border: { joinBody: '-' } }, + { border: { joinLeft: '-' } }, + { border: { joinRight: '-' } }, + { border: { joinJoin: '-' } }, + { columns: { '1': { alignment: 'left' } } }, + { columns: { '1': { width: 5 } } }, + { columns: { '1': { wrapWord: true } } }, + { columns: { '1': { truncate: 1 } } }, + { columns: { '1': { paddingLeft: 1 } } }, + { columns: { '1': { paddingRight: 1 } } }, + { columnDefault: { alignment: 'left' } }, + { columnDefault: { width: 5 } }, + { columnDefault: { wrapWord: true } }, + { columnDefault: { truncate: 1 } }, + { columnDefault: { paddingLeft: 1 } }, + { columnDefault: { paddingRight: 1 } } + ], + invalid: [ + { border: 1 }, + { border: { unknown: '-' } }, + { border: { topBody: 1 } }, + { border: { topJoin: 1 } }, + { border: { topLeft: 1 } }, + { border: { topRight: 1 } }, + { border: { bottomBody: 1 } }, + { border: { bottomJoin: 1 } }, + { border: { bottomLeft: 1 } }, + { border: { bottomRight: 1 } }, + { border: { bodyLeft: 1 } }, + { border: { bodyRight: 1 } }, + { border: { bodyJoin: 1 } }, + { border: { joinBody: 1 } }, + { border: { joinLeft: 1 } }, + { border: { joinRight: 1 } }, + { border: { joinJoin: 1 } }, + { columns: 1 }, + { columns: { a: { width: 5 } } }, + { columns: { '1': 1 } }, + { columns: { '1': { unknown: 1 } } }, + { columns: { '1': { alignment: 1 } } }, + { columns: { '1': { alignment: '1' } } }, + { columns: { '1': { width: '5' } } }, + { columns: { '1': { wrapWord: 1 } } }, + { columns: { '1': { truncate: '1' } } }, + { columns: { '1': { paddingLeft: '1' } } }, + { columns: { '1': { paddingRight: '1' } } }, + { columnDefault: 1 }, + { columnDefault: { unknown: 1 } }, + { columnDefault: { alignment: 1 } }, + { columnDefault: { alignment: '1' } }, + { columnDefault: { width: '5' } }, + { columnDefault: { wrapWord: 1 } }, + { columnDefault: { truncate: '1' } }, + { columnDefault: { paddingLeft: '1' } }, + { columnDefault: { paddingRight: '1' } }, + { unknown: 1 } + ] +}; diff --git a/node_modules/table/test/validateTableData.js b/node_modules/table/test/validateTableData.js new file mode 100644 index 0000000..24e8800 --- /dev/null +++ b/node_modules/table/test/validateTableData.js @@ -0,0 +1,65 @@ +/* eslint-disable max-nested-callbacks */ + +import { + expect +} from 'chai'; +import validateTableData from './../src/validateTableData'; + +describe('validateTableData', () => { + context('table does not have a row', () => { + it('throws an error', () => { + expect(() => { + validateTableData([]); + }).to.throw(Error, 'Table must define at least one row.'); + }); + }); + + context('table does not have a column', () => { + it('throws an error', () => { + expect(() => { + validateTableData([[]]); + }).to.throw(Error, 'Table must define at least one column.'); + }); + }); + + context('row data is not an array', () => { + it('throws an error', () => { + expect(() => { + validateTableData({}); + }).to.throw(Error, 'Table data must be an array.'); + }); + }); + + context('column data is not an array', () => { + it('throws an error', () => { + expect(() => { + validateTableData([{}]); + }).to.throw(Error, 'Table row data must be an array.'); + }); + }); + + context('cell data contains a control character', () => { + it('throws an error', () => { + expect(() => { + validateTableData([ + [ + [ + String.fromCodePoint(0x01) + ] + ] + ]); + }).to.throw(Error, 'Table data must not contain control characters.'); + }); + }); + + context('rows have inconsistent number of cells', () => { + it('throws an error', () => { + expect(() => { + validateTableData([ + ['a', 'b', 'c'], + ['a', 'b'] + ]); + }).to.throw(Error, 'Table must have a consistent number of cells.'); + }); + }); +}); diff --git a/node_modules/table/test/wrapString.js b/node_modules/table/test/wrapString.js new file mode 100644 index 0000000..d1c4f54 --- /dev/null +++ b/node_modules/table/test/wrapString.js @@ -0,0 +1,45 @@ +/* eslint-disable max-nested-callbacks */ + +import { + expect +} from 'chai'; +import chalk from 'chalk'; +import wrapString from './../src/wrapString'; + +describe('wrapString', () => { + context('subject is a plain text string', () => { + context('subject is lesser than the chunk size', () => { + it('returns subject in a single chunk', () => { + expect(wrapString('aaa', 3)).to.deep.equal(['aaa']); + }); + }); + context('subject is larger than the chunk size', () => { + it('returns subject sliced into multiple chunks', () => { + expect(wrapString('aaabbbc', 3)).to.deep.equal(['aaa', 'bbb', 'c']); + }); + }); + context('a chunk starts with a space', () => { + it('adjusts chunks to offset the space', () => { + expect(wrapString('aaa bbb ccc', 3)).to.deep.equal(['aaa', 'bbb', 'ccc']); + }); + }); + }); + context('subject string contains ANSI escape codes', () => { + describe('subject is lesser than the chunk size', () => { + it('returns subject in a single chunk', () => { + expect(wrapString(chalk.red('aaa'), 3)).to.deep.equal([ + '\u001b[31m\u001b[31m\u001b[31m\u001b[31m\u001b[31maaa\u001b[39m' + ]); + }); + }); + describe('subject is larger than the chunk size', () => { + it('returns subject sliced into multiple chunks', () => { + expect(wrapString(chalk.red('aaabbbc'), 3)).to.deep.equal([ + '\u001b[31m\u001b[31m\u001b[31m\u001b[31m\u001b[31maaa\u001b[39m', + '\u001b[31m\u001b[31m\u001b[31m\u001b[31m\u001b[31mbbb\u001b[39m', + '\u001b[31m\u001b[31m\u001b[31m\u001b[31m\u001b[31mc\u001b[39m' + ]); + }); + }); + }); +}); diff --git a/node_modules/table/test/wrapWord.js b/node_modules/table/test/wrapWord.js new file mode 100644 index 0000000..309b9d3 --- /dev/null +++ b/node_modules/table/test/wrapWord.js @@ -0,0 +1,32 @@ +import { + expect +} from 'chai'; +import wrapWord from './../src/wrapWord'; + +describe('wrapWord', () => { + it('wraps a string at a nearest whitespace', () => { + expect(wrapWord('aaa bbb', 5)).to.deep.equal(['aaa', 'bbb']); + expect(wrapWord('a a a bbb', 5)).to.deep.equal(['a a a', 'bbb']); + }); + context('a single word is longer than chunk size', () => { + it('cuts the word', () => { + expect(wrapWord('aaaaa', 2)).to.deep.equal(['aa', 'aa', 'a']); + }); + }); + context('a long word with a special character', () => { + it('cuts the word at the special character', () => { + expect(wrapWord('aaa\\bbb', 5)).to.deep.equal(['aaa\\', 'bbb']); + expect(wrapWord('aaa/bbb', 5)).to.deep.equal(['aaa/', 'bbb']); + expect(wrapWord('aaa_bbb', 5)).to.deep.equal(['aaa_', 'bbb']); + expect(wrapWord('aaa-bbb', 5)).to.deep.equal(['aaa-', 'bbb']); + expect(wrapWord('aaa.bbb', 5)).to.deep.equal(['aaa.', 'bbb']); + expect(wrapWord('aaa,bbb', 5)).to.deep.equal(['aaa,', 'bbb']); + expect(wrapWord('aaa;bbb', 5)).to.deep.equal(['aaa;', 'bbb']); + }); + }); + context('a special character after the length of a container', () => { + it('does not include special character', () => { + expect(wrapWord('aa-bbbbb-cccc', 5)).to.deep.equal(['aa-', 'bbbbb', '-cccc']); + }); + }); +}); diff --git a/node_modules/text-table/package.json b/node_modules/text-table/package.json index 34791a9..b4d17a4 100644 --- a/node_modules/text-table/package.json +++ b/node_modules/text-table/package.json @@ -1,96 +1,44 @@ { - "_args": [ - [ - "text-table@~0.2.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "text-table@>=0.2.0 <0.3.0", - "_id": "text-table@0.2.0", - "_inCache": true, - "_installable": true, - "_location": "/text-table", - "_npmUser": { - "email": "mail@substack.net", - "name": "substack" - }, - "_npmVersion": "1.3.7", - "_phantomChildren": {}, - "_requested": { "name": "text-table", - "raw": "text-table@~0.2.0", - "rawSpec": "~0.2.0", - "scope": null, - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "_shasum": "7f5ee823ae805207c00af2df4a84ec3fcfa570b4", - "_shrinkwrap": null, - "_spec": "text-table@~0.2.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint", - "author": { - "email": "mail@substack.net", - "name": "James Halliday", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/text-table/issues" - }, - "dependencies": {}, - "description": "borderless text tables with alignment", - "devDependencies": { - "cli-color": "~0.2.3", - "tap": "~0.4.0", - "tape": "~1.0.2" - }, - "directories": {}, - "dist": { - "shasum": "7f5ee823ae805207c00af2df4a84ec3fcfa570b4", - "tarball": "http://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" - }, - "homepage": "https://github.com/substack/text-table", - "keywords": [ - "align", - "ascii", - "rows", - "table", - "tabular", - "text" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "name": "text-table", - "optionalDependencies": {}, - "readme": "# text-table\n\ngenerate borderless text table strings suitable for printing to stdout\n\n[![build status](https://secure.travis-ci.org/substack/text-table.png)](http://travis-ci.org/substack/text-table)\n\n[![browser support](https://ci.testling.com/substack/text-table.png)](http://ci.testling.com/substack/text-table)\n\n# example\n\n## default align\n\n``` js\nvar table = require('text-table');\nvar t = table([\n [ 'master', '0123456789abcdef' ],\n [ 'staging', 'fedcba9876543210' ]\n]);\nconsole.log(t);\n```\n\n```\nmaster 0123456789abcdef\nstaging fedcba9876543210\n```\n\n## left-right align\n\n``` js\nvar table = require('text-table');\nvar t = table([\n [ 'beep', '1024' ],\n [ 'boop', '33450' ],\n [ 'foo', '1006' ],\n [ 'bar', '45' ]\n], { align: [ 'l', 'r' ] });\nconsole.log(t);\n```\n\n```\nbeep 1024\nboop 33450\nfoo 1006\nbar 45\n```\n\n## dotted align\n\n``` js\nvar table = require('text-table');\nvar t = table([\n [ 'beep', '1024' ],\n [ 'boop', '334.212' ],\n [ 'foo', '1006' ],\n [ 'bar', '45.6' ],\n [ 'baz', '123.' ]\n], { align: [ 'l', '.' ] });\nconsole.log(t);\n```\n\n```\nbeep 1024\nboop 334.212\nfoo 1006\nbar 45.6\nbaz 123.\n```\n\n## centered\n\n``` js\nvar table = require('text-table');\nvar t = table([\n [ 'beep', '1024', 'xyz' ],\n [ 'boop', '3388450', 'tuv' ],\n [ 'foo', '10106', 'qrstuv' ],\n [ 'bar', '45', 'lmno' ]\n], { align: [ 'l', 'c', 'l' ] });\nconsole.log(t);\n```\n\n```\nbeep 1024 xyz\nboop 3388450 tuv\nfoo 10106 qrstuv\nbar 45 lmno\n```\n\n# methods\n\n``` js\nvar table = require('text-table')\n```\n\n## var s = table(rows, opts={})\n\nReturn a formatted table string `s` from an array of `rows` and some options\n`opts`.\n\n`rows` should be an array of arrays containing strings, numbers, or other\nprintable values.\n\noptions can be:\n\n* `opts.hsep` - separator to use between columns, default `' '`\n* `opts.align` - array of alignment types for each column, default `['l','l',...]`\n* `opts.stringLength` - callback function to use when calculating the string length\n\nalignment types are:\n\n* `'l'` - left\n* `'r'` - right\n* `'c'` - center\n* `'.'` - decimal\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install text-table\n```\n\n# Use with ANSI-colors\n\nSince the string length of ANSI color schemes does not equal the length\nJavaScript sees internally it is necessary to pass the a custom string length\ncalculator during the main function call.\n\nSee the `test/ansi-colors.js` file for an example.\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", - "repository": { - "type": "git", - "url": "git://github.com/substack/text-table.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "testling": { - "browsers": [ - "chrome/20..latest", - "firefox/10..latest", - "ie/6..latest", - "ipad/6", - "iphone/6", - "opera/11.0..latest", - "safari/latest" + "version": "0.2.0", + "description": "borderless text tables with alignment", + "main": "index.js", + "devDependencies": { + "tap": "~0.4.0", + "tape": "~1.0.2", + "cli-color": "~0.2.3" + }, + "scripts": { + "test": "tap test/*.js" + }, + "testling" : { + "files" : "test/*.js", + "browsers" : [ + "ie/6..latest", + "chrome/20..latest", + "firefox/10..latest", + "safari/latest", + "opera/11.0..latest", + "iphone/6", "ipad/6" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/text-table.git" + }, + "homepage": "https://github.com/substack/text-table", + "keywords": [ + "text", + "table", + "align", + "ascii", + "rows", + "tabular" ], - "files": "test/*.js" - }, - "version": "0.2.0" + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT" } diff --git a/node_modules/through/package.json b/node_modules/through/package.json index 34d83a7..9862189 100644 --- a/node_modules/through/package.json +++ b/node_modules/through/package.json @@ -1,92 +1,36 @@ { - "_args": [ - [ - "through@^2.3.6", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\inquirer" - ] - ], - "_from": "through@>=2.3.6 <3.0.0", - "_id": "through@2.3.8", - "_inCache": true, - "_installable": true, - "_location": "/through", - "_nodeVersion": "2.3.1", - "_npmUser": { - "email": "dominic.tarr@gmail.com", - "name": "dominictarr" - }, - "_npmVersion": "2.12.0", - "_phantomChildren": {}, - "_requested": { - "name": "through", - "raw": "through@^2.3.6", - "rawSpec": "^2.3.6", - "scope": null, - "spec": ">=2.3.6 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/inquirer" - ], - "_resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "_shasum": "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5", - "_shrinkwrap": null, - "_spec": "through@^2.3.6", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\inquirer", - "author": { - "email": "dominic.tarr@gmail.com", - "name": "Dominic Tarr", - "url": "dominictarr.com" - }, - "bugs": { - "url": "https://github.com/dominictarr/through/issues" - }, - "dependencies": {}, + "name": "through", + "version": "2.3.8", "description": "simplified stream construction", + "main": "index.js", + "scripts": { + "test": "set -e; for t in test/*.js; do node $t; done" + }, "devDependencies": { - "from": "~0.1.3", "stream-spec": "~0.3.5", - "tape": "~2.3.2" - }, - "directories": {}, - "dist": { - "shasum": "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5", - "tarball": "http://registry.npmjs.org/through/-/through-2.3.8.tgz" + "tape": "~2.3.2", + "from": "~0.1.3" }, - "gitHead": "2c5a6f9a0cc54da759b6e10964f2081c358e49dc", - "homepage": "https://github.com/dominictarr/through", "keywords": [ - "pipe", "stream", "streams", - "user-streams" + "user-streams", + "pipe" ], + "author": "Dominic Tarr (dominictarr.com)", "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - } - ], - "name": "through", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", "repository": { "type": "git", - "url": "git+https://github.com/dominictarr/through.git" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" + "url": "https://github.com/dominictarr/through.git" }, + "homepage": "https://github.com/dominictarr/through", "testling": { "browsers": [ - "chrome/20..latest", - "ff/15..latest", "ie/8..latest", + "ff/15..latest", + "chrome/20..latest", "safari/5.1..latest" ], "files": "test/*.js" - }, - "version": "2.3.8" + } } diff --git a/node_modules/tryit/package.json b/node_modules/tryit/package.json index 5e47a4a..4f14a41 100644 --- a/node_modules/tryit/package.json +++ b/node_modules/tryit/package.json @@ -1,80 +1,27 @@ { - "_args": [ - [ - "tryit@^1.0.1", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\is-resolvable" - ] - ], - "_from": "tryit@>=1.0.1 <2.0.0", - "_id": "tryit@1.0.2", - "_inCache": true, - "_installable": true, - "_location": "/tryit", - "_nodeVersion": "4.1.0", - "_npmUser": { - "email": "henrik@joreteg.com", - "name": "henrikjoreteg" - }, - "_npmVersion": "3.3.8", - "_phantomChildren": {}, - "_requested": { - "name": "tryit", - "raw": "tryit@^1.0.1", - "rawSpec": "^1.0.1", - "scope": null, - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/is-resolvable" - ], - "_resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.2.tgz", - "_shasum": "c196b0073e6b1c595d93c9c830855b7acc32a453", - "_shrinkwrap": null, - "_spec": "tryit@^1.0.1", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\is-resolvable", - "author": { - "email": "henrik@andyet.net", - "name": "Henrik Joreteg" - }, - "bugs": { - "url": "https://github.com/HenrikJoreteg/tryit/issues" - }, - "dependencies": {}, + "name": "tryit", "description": "Module to wrap try-catch for better performance and cleaner API.", + "version": "1.0.3", + "author": "Henrik Joreteg ", + "files": [ + "tryit.js" + ], "devDependencies": { "tap-spec": "^2.1.2", "tape": "^3.0.3" }, - "directories": {}, - "dist": { - "shasum": "c196b0073e6b1c595d93c9c830855b7acc32a453", - "tarball": "http://registry.npmjs.org/tryit/-/tryit-1.0.2.tgz" - }, - "gitHead": "b567b4feb491e2ee89addd3d06f66d6ec2217cf5", - "homepage": "https://github.com/HenrikJoreteg/tryit#readme", "keywords": [ - "errorhandling", "errors", - "try" + "try", + "errorhandling" ], "license": "MIT", "main": "tryit.js", - "maintainers": [ - { - "name": "henrikjoreteg", - "email": "henrik@andyet.net" - } - ], - "name": "tryit", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", "repository": { "type": "git", - "url": "git+ssh://git@github.com/HenrikJoreteg/tryit.git" + "url": "git@github.com:HenrikJoreteg/tryit.git" }, "scripts": { "test": "node test/test.js | tap-spec" - }, - "version": "1.0.2" + } } diff --git a/node_modules/tryit/test/test.js b/node_modules/tryit/test/test.js deleted file mode 100644 index 68f6f2b..0000000 --- a/node_modules/tryit/test/test.js +++ /dev/null @@ -1,37 +0,0 @@ -var test = require('tape'); -var tryit = require('../tryit'); - - -test('basic functionality', function (t) { - var count = 0; - - var noOp = function () {}; - var throwsError = function () { - throw new Error('whammo'); - } - - tryit(noOp, function (e) { - t.ok(e == null, 'should be called without an error'); - }); - - tryit(throwsError, function (e) { - t.ok('should be called'); - t.ok(e instanceof Error); - }); - - t.end(); -}); - -test('handle case where callback throws', function (t) { - var count = 0; - - t.throws(function () { - tryit(function () {}, function(e) { - count++; - t.equal(count, 1, 'should be called once'); - throw new Error('kablowie'); - }); - }, 'should throw once'); - - t.end(); -}); diff --git a/node_modules/tv4/LICENSE.txt b/node_modules/tv4/LICENSE.txt deleted file mode 100644 index f421228..0000000 --- a/node_modules/tv4/LICENSE.txt +++ /dev/null @@ -1,8 +0,0 @@ -/* -Author: Geraint Luff and others -Year: 2013 - -This code is released into the "public domain" by its author(s). Anybody may use, alter and distribute the code without restriction. The author makes no guarantees, and takes no liability of any kind for use of this code. - -If you find a bug or make an improvement, it would be courteous to let the author know, but it is not compulsory. -*/ \ No newline at end of file diff --git a/node_modules/tv4/README.md b/node_modules/tv4/README.md deleted file mode 100644 index 3ffa761..0000000 --- a/node_modules/tv4/README.md +++ /dev/null @@ -1,468 +0,0 @@ -# Tiny Validator (for v4 JSON Schema) - -[![Build Status](https://secure.travis-ci.org/geraintluff/tv4.svg?branch=master)](http://travis-ci.org/geraintluff/tv4) [![Dependency Status](https://gemnasium.com/geraintluff/tv4.svg)](https://gemnasium.com/geraintluff/tv4) [![NPM version](https://badge.fury.io/js/tv4.svg)](http://badge.fury.io/js/tv4) - -Use [json-schema](http://json-schema.org/) [draft v4](http://json-schema.org/latest/json-schema-core.html) to validate simple values and complex objects using a rich [validation vocabulary](http://json-schema.org/latest/json-schema-validation.html) ([examples](http://json-schema.org/examples.html)). - -There is support for `$ref` with JSON Pointer fragment paths (```other-schema.json#/properties/myKey```). - -## Usage 1: Simple validation - -```javascript -var valid = tv4.validate(data, schema); -``` - -If validation returns ```false```, then an explanation of why validation failed can be found in ```tv4.error```. - -The error object will look something like: -```json -{ - "code": 0, - "message": "Invalid type: string", - "dataPath": "/intKey", - "schemaPath": "/properties/intKey/type" -} -``` - -The `"code"` property will refer to one of the values in `tv4.errorCodes` - in this case, `tv4.errorCodes.INVALID_TYPE`. - -To enable external schema to be referenced, you use: -```javascript -tv4.addSchema(url, schema); -``` - -If schemas are referenced (```$ref```) but not known, then validation will return ```true``` and the missing schema(s) will be listed in ```tv4.missing```. For more info see the API documentation below. - -## Usage 2: Multi-threaded validation - -Storing the error and missing schemas does not work well in multi-threaded environments, so there is an alternative syntax: - -```javascript -var result = tv4.validateResult(data, schema); -``` - -The result will look something like: -```json -{ - "valid": false, - "error": {...}, - "missing": [...] -} -``` - -## Usage 3: Multiple errors - -Normally, `tv4` stops when it encounters the first validation error. However, you can collect an array of validation errors using: - -```javascript -var result = tv4.validateMultiple(data, schema); -``` - -The result will look something like: -```json -{ - "valid": false, - "errors": [ - {...}, - ... - ], - "missing": [...] -} -``` - -## Asynchronous validation - -Support for asynchronous validation (where missing schemas are fetched) can be added by including an extra JavaScript file. Currently, the only version requires jQuery (`tv4.async-jquery.js`), but the code is very short and should be fairly easy to modify for other libraries (such as MooTools). - -Usage: - -```javascript -tv4.validate(data, schema, function (isValid, validationError) { ... }); -``` - -`validationFailure` is simply taken from `tv4.error`. - -## Cyclical JavaScript objects - -While they don't occur in proper JSON, JavaScript does support self-referencing objects. Any of the above calls support an optional third argument: `checkRecursive`. If true, tv4 will handle self-referencing objects properly - this slows down validation slightly, but that's better than a hanging script. - -Consider this data, notice how both `a` and `b` refer to each other: - -```javascript -var a = {}; -var b = { a: a }; -a.b = b; -var aSchema = { properties: { b: { $ref: 'bSchema' }}}; -var bSchema = { properties: { a: { $ref: 'aSchema' }}}; -tv4.addSchema('aSchema', aSchema); -tv4.addSchema('bSchema', bSchema); -``` - -If the `checkRecursive` argument were missing, this would throw a "too much recursion" error. - -To enable support for this, pass `true` as additional argument to any of the regular validation methods: - -```javascript -tv4.validate(a, aSchema, true); -tv4.validateResult(data, aSchema, true); -tv4.validateMultiple(data, aSchema, true); -``` - -## The `banUnknownProperties` flag - -Sometimes, it is desirable to flag all unknown properties as an error. This is especially useful during development, to catch typos and the like, even when extra custom-defined properties are allowed. - -As such, tv4 implements ["ban unknown properties" mode](https://github.com/json-schema/json-schema/wiki/ban-unknown-properties-mode-\(v5-proposal\)), enabled by a fourth-argument flag: - -```javascript -tv4.validate(data, schema, checkRecursive, true); -tv4.validateResult(data, schema, checkRecursive, true); -tv4.validateMultiple(data, schema, checkRecursive, true); -``` - -## API - -There are additional api commands available for more complex use-cases: - -##### addSchema(uri, schema) -Pre-register a schema for reference by other schema and synchronous validation. - -````js -tv4.addSchema('http://example.com/schema', { ... }); -```` - -* `uri` the uri to identify this schema. -* `schema` the schema object. - -Schemas that have their `id` property set can be added directly. - -````js -tv4.addSchema({ ... }); -```` - -##### getSchema(uri) - -Return a schema from the cache. - -* `uri` the uri of the schema (may contain a `#` fragment) - -````js -var schema = tv4.getSchema('http://example.com/schema'); -```` - -##### getSchemaMap() - -Return a shallow copy of the schema cache, mapping schema document URIs to schema objects. - -```` -var map = tv4.getSchemaMap(); - -var schema = map[uri]; -```` - -##### getSchemaUris(filter) - -Return an Array with known schema document URIs. - -* `filter` optional RegExp to filter URIs - -```` -var arr = tv4.getSchemaUris(); - -// optional filter using a RegExp -var arr = tv4.getSchemaUris(/^https?://example.com/); -```` - -##### getMissingUris(filter) - -Return an Array with schema document URIs that are used as `$ref` in known schemas but which currently have no associated schema data. - -Use this in combination with `tv4.addSchema(uri, schema)` to preload the cache for complete synchronous validation with. - -* `filter` optional RegExp to filter URIs - -```` -var arr = tv4.getMissingUris(); - -// optional filter using a RegExp -var arr = tv4.getMissingUris(/^https?://example.com/); -```` - -##### dropSchemas() - -Drop all known schema document URIs from the cache. - -```` -tv4.dropSchemas(); -```` - -##### freshApi() - -Return a new tv4 instance with no shared state. - -```` -var otherTV4 = tv4.freshApi(); -```` - -##### reset() - -Manually reset validation status from the simple `tv4.validate(data, schema)`. Although tv4 will self reset on each validation there are some implementation scenarios where this is useful. - -```` -tv4.reset(); -```` - -##### setErrorReporter(reporter) - -Sets a custom error reporter. This is a function that accepts three arguments, and returns an error message (string): - -``` -tv4.setErrorReporter(function (error, data, schema) { - return "Error code: " + error.code; -}); -``` - -The `error` object already has everything aside from the `.message` property filled in (so you can use `error.params`, `error.dataPath`, `error.schemaPath` etc.). - -If nothing is returned (or the empty string), then it falls back to the default error reporter. To remove a custom error reporter, call `tv4.setErrorReporter(null)`. - -##### language(code) - -Sets the language used by the default error reporter. - -* `code` is a language code, like `'en'` or `'en-gb'` - -```` -tv4.language('en-gb'); -```` - -If you specify a multi-level language code (e.g. `fr-CH`), then it will fall back to the generic version (`fr`) if needed. - -##### addLanguage(code, map) - -Add a new template-based language map for the default error reporter (used by `tv4.language(code)`) - -* `code` is new language code -* `map` is an object mapping error IDs or constant names (e.g. `103` or `"NUMBER_MAXIMUM"`) to language strings. - -```` -tv4.addLanguage('fr', { ... }); - -// select for use -tv4.language('fr') -```` - -If you register a multi-level language code (e.g. `fr-FR`), then it will also be registered for plain `fr` if that does not already exist. - -##### addFormat(format, validationFunction) - -Add a custom format validator. (There are no built-in format validators. Several common ones can be found [here](https://github.com/ikr/tv4-formats) though) - -* `format` is a string, corresponding to the `"format"` value in schemas. -* `validationFunction` is a function that either returns: - * `null` (meaning no error) - * an error string (explaining the reason for failure) - -```` -tv4.addFormat('decimal-digits', function (data, schema) { - if (typeof data === 'string' && !/^[0-9]+$/.test(data)) { - return null; - } - return "must be string of decimal digits"; -}); -```` - -Alternatively, multiple formats can be added at the same time using an object: -```` -tv4.addFormat({ - 'my-format': function () {...}, - 'other-format': function () {...} -}); -```` - -##### defineKeyword(keyword, validationFunction) - -Add a custom keyword validator. - -* `keyword` is a string, corresponding to a schema keyword -* `validationFunction` is a function that either returns: - * `null` (meaning no error) - * an error string (explaining the reason for failure) - * an error object (containing some of: `code`/`message`/`dataPath`/`schemaPath`) - -```` -tv4.defineKeyword('my-custom-keyword', function (data, value, schema) { - if (simpleFailure()) { - return "Failure"; - } else if (detailedFailure()) { - return {code: tv4.errorCodes.MY_CUSTOM_CODE, message: {param1: 'a', param2: 'b'}}; - } else { - return null; - } -}); -```` - -`schema` is the schema upon which the keyword is defined. In the above example, `value === schema['my-custom-keyword']`. - -If an object is returned from the custom validator, and its `message` is a string, then that is used as the message result. If `message` is an object, then that is used to populate the (localisable) error template. - -##### defineError(codeName, codeNumber, defaultMessage) - -Defines a custom error code. - -* `codeName` is a string, all-caps underscore separated, e.g. `"MY_CUSTOM_ERROR"` -* `codeNumber` is an integer > 10000, which will be stored in `tv4.errorCodes` (e.g. `tv4.errorCodes.MY_CUSTOM_ERROR`) -* `defaultMessage` is an error message template to use (assuming translations have not been provided for this code) - -An example of `defaultMessage` might be: `"Incorrect moon (expected {expected}, got {actual}"`). This is filled out if a custom keyword returns a object `message` (see above). Translations will be used, if associated with the correct code name/number. - -## Demos - -### Basic usage -
-
-var schema = {
-	"items": {
-		"type": "boolean"
-	}
-};
-var data1 = [true, false];
-var data2 = [true, 123];
-
-alert("data 1: " + tv4.validate(data1, schema)); // true
-alert("data 2: " + tv4.validate(data2, schema)); // false
-alert("data 2 error: " + JSON.stringify(tv4.error, null, 4));
-
-
- -### Use of $ref -
-
-var schema = {
-	"type": "array",
-	"items": {"$ref": "#"}
-};
-var data1 = [[], [[]]];
-var data2 = [[], [true, []]];
-
-alert("data 1: " + tv4.validate(data1, schema)); // true
-alert("data 2: " + tv4.validate(data2, schema)); // false
-
-
- -### Missing schema -
-
-var schema = {
-	"type": "array",
-	"items": {"$ref": "http://example.com/schema" }
-};
-var data = [1, 2, 3];
-
-alert("Valid: " + tv4.validate(data, schema)); // true
-alert("Missing schemas: " + JSON.stringify(tv4.missing));
-
-
- -### Referencing remote schema -
-
-tv4.addSchema("http://example.com/schema", {
-	"definitions": {
-		"arrayItem": {"type": "boolean"}
-	}
-});
-var schema = {
-	"type": "array",
-	"items": {"$ref": "http://example.com/schema#/definitions/arrayItem" }
-};
-var data1 = [true, false, true];
-var data2 = [1, 2, 3];
-
-alert("data 1: " + tv4.validate(data1, schema)); // true
-alert("data 2: " + tv4.validate(data2, schema)); // false
-
-
- -## Supported platforms - -* Node.js -* All modern browsers -* IE >= 7 - -## Installation - -You can manually download [`tv4.js`](https://raw.github.com/geraintluff/tv4/master/tv4.js) or the minified [`tv4.min.js`](https://raw.github.com/geraintluff/tv4/master/tv4.min.js) and include it in your html to create the global `tv4` variable. - -Alternately use it as a CommonJS module: - -````js -var tv4 = require('tv4'); -```` - -or as an AMD module (e.g. with requirejs): - -```js -require('tv4', function(tv4){ - //use tv4 here -}); -``` - -There is a command-line tool that wraps this library: [tv4-cmd](https://www.npmjs.com/package/tv4-cmd). - -#### npm - -```` -$ npm install tv4 -```` - -#### bower - -```` -$ bower install tv4 -```` - -#### component.io - -```` -$ component install geraintluff/tv4 -```` - -## Build and test - -You can rebuild and run the node and browser tests using node.js and [grunt](http://http://gruntjs.com/): - -Make sure you have the global grunt cli command: -```` -$ npm install grunt-cli -g -```` - -Clone the git repos, open a shell in the root folder and install the development dependencies: - -```` -$ npm install -```` - -Rebuild and run the tests: -```` -$ grunt -```` - -It will run a build and display one Spec-style report for the node.js and two Dot-style reports for both the plain and minified browser tests (via phantomJS). You can also use your own browser to manually run the suites by opening [`test/index.html`](http://geraintluff.github.io/tv4/test/index.html) and [`test/index-min.html`](http://geraintluff.github.io/tv4/test/index-min.html). - -## Contributing - -Pull-requests for fixes and expansions are welcome. Edit the partial files in `/source` and add your tests in a suitable suite or folder under `/test/tests` and run `grunt` to rebuild and run the test suite. Try to maintain an idiomatic coding style and add tests for any new features. It is recommend to discuss big changes in an Issue. - -Do you speak another language? `tv4` needs internationalisation - please contribute language files to `/lang`! - -## Packages using tv4 - -* [chai-json-schema](http://chaijs.com/plugins/chai-json-schema) is a [Chai Assertion Library](http://chaijs.com) plugin to assert values against json-schema. -* [grunt-tv4](http://www.github.com/Bartvds/grunt-tv4) is a plugin for [Grunt](http://http://gruntjs.com/) that uses tv4 to bulk validate json files. - -## License - -The code is available as "public domain", meaning that it is completely free to use, without any restrictions at all. Read the full license [here](http://geraintluff.github.com/tv4/LICENSE.txt). - -It's also available under an [MIT license](http://jsonary.com/LICENSE.txt). diff --git a/node_modules/tv4/lang/de.js b/node_modules/tv4/lang/de.js deleted file mode 100644 index edbc11e..0000000 --- a/node_modules/tv4/lang/de.js +++ /dev/null @@ -1,47 +0,0 @@ -(function (global) { - var lang = { - INVALID_TYPE: "Ungültiger Typ: {type} (erwartet wurde: {expected})", - ENUM_MISMATCH: "Keine Übereinstimmung mit der Aufzählung (enum) für: {value}", - ANY_OF_MISSING: "Daten stimmen nicht überein mit einem der Schemas von \"anyOf\"", - ONE_OF_MISSING: "Daten stimmen nicht überein mit einem der Schemas von \"oneOf\"", - ONE_OF_MULTIPLE: "Daten sind valid in Bezug auf mehreren Schemas von \"oneOf\": index {index1} und {index2}", - NOT_PASSED: "Daten stimmen mit dem \"not\" Schema überein", - // Numeric errors - NUMBER_MULTIPLE_OF: "Wert {value} ist kein Vielfaches von {multipleOf}", - NUMBER_MINIMUM: "Wert {value} ist kleiner als das Minimum {minimum}", - NUMBER_MINIMUM_EXCLUSIVE: "Wert {value} ist gleich dem Exklusiven Minimum {minimum}", - NUMBER_MAXIMUM: "Wert {value} ist größer als das Maximum {maximum}", - NUMBER_MAXIMUM_EXCLUSIVE: "Wert {value} ist gleich dem Exklusiven Maximum {maximum}", - // String errors - STRING_LENGTH_SHORT: "Zeichenkette zu kurz ({length} chars), minimum {minimum}", - STRING_LENGTH_LONG: "Zeichenkette zu lang ({length} chars), maximum {maximum}", - STRING_PATTERN: "Zeichenkette entspricht nicht dem Muster: {pattern}", - // Object errors - OBJECT_PROPERTIES_MINIMUM: "Zu wenige Attribute definiert ({propertyCount}), minimum {minimum}", - OBJECT_PROPERTIES_MAXIMUM: "Zu viele Attribute definiert ({propertyCount}), maximum {maximum}", - OBJECT_REQUIRED: "Notwendiges Attribut fehlt: {key}", - OBJECT_ADDITIONAL_PROPERTIES: "Zusätzliche Attribute nicht erlaubt", - OBJECT_DEPENDENCY_KEY: "Abhängigkeit fehlt - Schlüssel nicht vorhanden: {missing} (wegen Schlüssel: {key})", - // Array errors - ARRAY_LENGTH_SHORT: "Array zu kurz ({length}), minimum {minimum}", - ARRAY_LENGTH_LONG: "Array zu lang ({length}), maximum {maximum}", - ARRAY_UNIQUE: "Array Einträge nicht eindeutig (Index {match1} und {match2})", - ARRAY_ADDITIONAL_ITEMS: "Zusätzliche Einträge nicht erlaubt" - }; - - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['../tv4'], function(tv4) { - tv4.addLanguage('de', lang); - return tv4; - }); - } else if (typeof module !== 'undefined' && module.exports){ - // CommonJS. Define export. - var tv4 = require('../tv4'); - tv4.addLanguage('de', lang); - module.exports = tv4; - } else { - // Browser globals - global.tv4.addLanguage('de', lang); - } -})(this); diff --git a/node_modules/tv4/lang/fr.js b/node_modules/tv4/lang/fr.js deleted file mode 100644 index c020b72..0000000 --- a/node_modules/tv4/lang/fr.js +++ /dev/null @@ -1,55 +0,0 @@ -(function (global) { - var lang = { - INVALID_TYPE: "Type invalide: {type} ({expected} attendu)", - ENUM_MISMATCH: "Aucune valeur correspondante (enum) pour: {value}", - ANY_OF_MISSING: "La donnée ne correspond à aucun schema de \"anyOf\"", - ONE_OF_MISSING: "La donnée ne correspond à aucun schema de \"oneOf\"", - ONE_OF_MULTIPLE: "La donnée est valide pour plus d'un schema de \"oneOf\": indices {index1} et {index2}", - NOT_PASSED: "La donnée correspond au schema de \"not\"", - // Numeric errors - NUMBER_MULTIPLE_OF: "La valeur {value} n'est pas un multiple de {multipleOf}", - NUMBER_MINIMUM: "La valeur {value} est inférieure au minimum {minimum}", - NUMBER_MINIMUM_EXCLUSIVE: "La valeur {value} est égale au minimum exclusif {minimum}", - NUMBER_MAXIMUM: "La valeur {value} est supérieure au maximum {maximum}", - NUMBER_MAXIMUM_EXCLUSIVE: "La valeur {value} est égale au maximum exclusif {maximum}", - NUMBER_NOT_A_NUMBER: "La valeur {value} n'est pas un nombre valide", - // String errors - STRING_LENGTH_SHORT: "Le texte est trop court ({length} carac.), minimum {minimum}", - STRING_LENGTH_LONG: "Le texte est trop long ({length} carac.), maximum {maximum}", - STRING_PATTERN: "Le texte ne correspond pas au motif: {pattern}", - // Object errors - OBJECT_PROPERTIES_MINIMUM: "Pas assez de propriétés définies ({propertyCount}), minimum {minimum}", - OBJECT_PROPERTIES_MAXIMUM: "Trop de propriétés définies ({propertyCount}), maximum {maximum}", - OBJECT_REQUIRED: "Propriété requise manquante: {key}", - OBJECT_ADDITIONAL_PROPERTIES: "Propriétés additionnelles non autorisées", - OBJECT_DEPENDENCY_KEY: "Echec de dépendance - la clé doit exister: {missing} (du à la clé: {key})", - // Array errors - ARRAY_LENGTH_SHORT: "Le tableau est trop court ({length}), minimum {minimum}", - ARRAY_LENGTH_LONG: "Le tableau est trop long ({length}), maximum {maximum}", - ARRAY_UNIQUE: "Des éléments du tableau ne sont pas uniques (indices {match1} et {match2})", - ARRAY_ADDITIONAL_ITEMS: "Éléments additionnels non autorisés", - // Format errors - FORMAT_CUSTOM: "Échec de validation du format ({message})", - KEYWORD_CUSTOM: "Échec de mot-clé: {key} ({message})", - // Schema structure - CIRCULAR_REFERENCE: "Références ($refs) circulaires: {urls}", - // Non-standard validation options - UNKNOWN_PROPERTY: "Propriété inconnue (n'existe pas dans le schema)" - }; - - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['../tv4'], function(tv4) { - tv4.addLanguage('fr', lang); - return tv4; - }); - } else if (typeof module !== 'undefined' && module.exports){ - // CommonJS. Define export. - var tv4 = require('../tv4'); - tv4.addLanguage('fr', lang); - module.exports = tv4; - } else { - // Browser globals - global.tv4.addLanguage('fr', lang); - } -})(this); diff --git a/node_modules/tv4/lang/nb.js b/node_modules/tv4/lang/nb.js deleted file mode 100644 index d6b1a84..0000000 --- a/node_modules/tv4/lang/nb.js +++ /dev/null @@ -1,56 +0,0 @@ -(function (global) { - var lang = { - INVALID_TYPE: "Ugyldig type: {type} (forventet {expected})", - ENUM_MISMATCH: "Ingen samsvarende enum verdi for: {value}", - ANY_OF_MISSING: "Data samsvarer ikke med noe skjema fra \"anyOf\"", - ONE_OF_MISSING: "Data samsvarer ikke med noe skjema fra \"oneOf\"", - ONE_OF_MULTIPLE: "Data samsvarer med mer enn ett skjema fra \"oneOf\": indeks {index1} og {index2}", - NOT_PASSED: "Data samsvarer med skjema fra \"not\"", - // Numeric errors - NUMBER_MULTIPLE_OF: "Verdien {value} er ikke et multiplum av {multipleOf}", - NUMBER_MINIMUM: "Verdien {value} er mindre enn minsteverdi {minimum}", - NUMBER_MINIMUM_EXCLUSIVE: "Verdien {value} er lik eksklusiv minsteverdi {minimum}", - NUMBER_MAXIMUM: "Verdien {value} er større enn maksimalverdi {maximum}", - NUMBER_MAXIMUM_EXCLUSIVE: "Verdien {value} er lik eksklusiv maksimalverdi {maximum}", - NUMBER_NOT_A_NUMBER: "Verdien {value} er ikke et gyldig tall", - // String errors - STRING_LENGTH_SHORT: "Strengen er for kort ({length} tegn), minst {minimum}", - STRING_LENGTH_LONG: "Strengen er for lang ({length} tegn), maksimalt {maximum}", - STRING_PATTERN: "Strengen samsvarer ikke med regulært uttrykk: {pattern}", - // Object errors - OBJECT_PROPERTIES_MINIMUM: "For få variabler definert ({propertyCount}), minst {minimum} er forventet", - OBJECT_PROPERTIES_MAXIMUM: "For mange variabler definert ({propertyCount}), makismalt {maximum} er tillatt", - OBJECT_REQUIRED: "Mangler obligatorisk variabel: {key}", - OBJECT_ADDITIONAL_PROPERTIES: "Tilleggsvariabler er ikke tillatt", - OBJECT_DEPENDENCY_KEY: "Variabelen {missing} må være definert (på grunn av følgende variabel: {key})", - // Array errors - ARRAY_LENGTH_SHORT: "Listen er for kort ({length} elementer), minst {minimum}", - ARRAY_LENGTH_LONG: "Listen er for lang ({length} elementer), maksimalt {maximum}", - ARRAY_UNIQUE: "Elementene er ikke unike (indeks {match1} og {match2} er like)", - ARRAY_ADDITIONAL_ITEMS: "Tillegselementer er ikke tillatt", - // Format errors - FORMAT_CUSTOM: "Formatteringen stemmer ikke ({message})", - KEYWORD_CUSTOM: "Nøkkelen stemmer ikke: {key} ({message})", - // Schema structure - CIRCULAR_REFERENCE: "Sirkulære referanser ($refs): {urls}", - // Non-standard validation options - UNKNOWN_PROPERTY: "Ukjent variabel (eksisterer ikke i skjemaet)" - }; - - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['../tv4'], function(tv4) { - tv4.addLanguage('nb', lang); - return tv4; - }); - } else if (typeof module !== 'undefined' && module.exports) { - // CommonJS. Define export. - var tv4 = require('../tv4'); - tv4.addLanguage('nb', lang); - module.exports = tv4; - } else { - // Browser globals - global.tv4.addLanguage('nb', lang); - } -})(this); - diff --git a/node_modules/tv4/lang/pl-PL.js b/node_modules/tv4/lang/pl-PL.js deleted file mode 100644 index c4b8ba8..0000000 --- a/node_modules/tv4/lang/pl-PL.js +++ /dev/null @@ -1,55 +0,0 @@ -(function (global) { - var lang = { - INVALID_TYPE: "Niepoprawny typ: {type} (spodziewany {expected})", - ENUM_MISMATCH: "Żadna predefiniowana wartośc nie pasuje do: {value}", - ANY_OF_MISSING: "Dane nie pasują do żadnego wzoru z sekcji \"anyOf\"", - ONE_OF_MISSING: "Dane nie pasują do żadnego wzoru z sekcji \"oneOf\"", - ONE_OF_MULTIPLE: "Dane są prawidłowe dla więcej niż jednego schematu z \"oneOf\": indeksy {index1} i {index2}", - NOT_PASSED: "Dane pasują do wzoru z sekcji \"not\"", - // Numeric errors - NUMBER_MULTIPLE_OF: "Wartość {value} nie jest wielokrotnością {multipleOf}", - NUMBER_MINIMUM: "Wartość {value} jest mniejsza niż {minimum}", - NUMBER_MINIMUM_EXCLUSIVE: "Wartość {value} jest równa wyłączonemu minimum {minimum}", - NUMBER_MAXIMUM: "Wartość {value} jest większa niż {maximum}", - NUMBER_MAXIMUM_EXCLUSIVE: "Wartość {value} jest równa wyłączonemu maksimum {maximum}", - NUMBER_NOT_A_NUMBER: "Wartość {value} nie jest poprawną liczbą", - // String errors - STRING_LENGTH_SHORT: "Napis jest za krótki ({length} znaków), minimum {minimum}", - STRING_LENGTH_LONG: "Napis jest za długi ({length} )znaków, maksimum {maximum}", - STRING_PATTERN: "Napis nie pasuje do wzoru: {pattern}", - // Object errors - OBJECT_PROPERTIES_MINIMUM: "Za mało zdefiniowanych pól ({propertyCount}), minimum {minimum}", - OBJECT_PROPERTIES_MAXIMUM: "Za dużo zdefiniowanych pól ({propertyCount}), maksimum {maximum}", - OBJECT_REQUIRED: "Brakuje wymaganego pola: {key}", - OBJECT_ADDITIONAL_PROPERTIES: "Dodatkowe pola są niedozwolone", - OBJECT_DEPENDENCY_KEY: "Błąd zależności - klucz musi istnieć: {missing} (wzgledem klucza: {key})", - // Array errors - ARRAY_LENGTH_SHORT: "Tablica ma za mało elementów ({length}), minimum {minimum}", - ARRAY_LENGTH_LONG: "Tablica ma za dużo elementów ({length}), maximum {maximum}", - ARRAY_UNIQUE: "Elementy tablicy nie są unikalne (indeks {match1} i {match2})", - ARRAY_ADDITIONAL_ITEMS: "Dodatkowe elementy są niedozwolone", - // Format errors - FORMAT_CUSTOM: "Błąd zgodności z formatem ({message})", - KEYWORD_CUSTOM: "Błąd słowa kluczowego: {key} ({message})", - // Schema structure - CIRCULAR_REFERENCE: "Cykliczna referencja $refs: {urls}", - // Non-standard validation options - UNKNOWN_PROPERTY: "Nie znane pole (brak we wzorze(schema))" - }; - - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['../tv4'], function(tv4) { - tv4.addLanguage('pl-PL', lang); - return tv4; - }); - } else if (typeof module !== 'undefined' && module.exports) { - // CommonJS. Define export. - var tv4 = require('../tv4'); - tv4.addLanguage('pl-PL', lang); - module.exports = tv4; - } else { - // Browser globals - global.tv4.addLanguage('pl-PL', lang); - } -})(this); diff --git a/node_modules/tv4/lang/pt-PT.js b/node_modules/tv4/lang/pt-PT.js deleted file mode 100644 index 6fa5a98..0000000 --- a/node_modules/tv4/lang/pt-PT.js +++ /dev/null @@ -1,55 +0,0 @@ -(function (global) { - var lang = { - INVALID_TYPE: "Tipo inválido: {type} (esperava {expected})", - ENUM_MISMATCH: "Nenhuma correspondência 'enum' para: {value}", - ANY_OF_MISSING: "Os dados não correspondem a nenhum esquema de \"anyOf\"", - ONE_OF_MISSING: "Os dados não correspondem a nenhum esquema de \"oneOf\"", - ONE_OF_MULTIPLE: "Os dados são válidos quando comparados com mais de um esquema de \"oneOf\": índices {index1} e {index2}", - NOT_PASSED: "Os dados correspondem a um esquema de \"not\"", - // Numeric errors - NUMBER_MULTIPLE_OF: "O valor {value} não é um múltiplo de {multipleOf}", - NUMBER_MINIMUM: "O valor {value} é menor que o mínimo {minimum}", - NUMBER_MINIMUM_EXCLUSIVE: "O valor {value} é igual ao mínimo exclusivo {minimum}", - NUMBER_MAXIMUM: "O valor {value} é maior que o máximo {maximum}", - NUMBER_MAXIMUM_EXCLUSIVE: "O valor {value} é igual ao máximo exclusivo {maximum}", - NUMBER_NOT_A_NUMBER: "O valor {value} não é um número válido", - // String errors - STRING_LENGTH_SHORT: "A 'string' é muito curta ({length} caracteres), mínimo {minimum}", - STRING_LENGTH_LONG: "A 'string' é muito longa ({length} caracteres), máximo {maximum}", - STRING_PATTERN: "A 'string' não corresponde ao modelo: {pattern}", - // Object errors - OBJECT_PROPERTIES_MINIMUM: "Poucas propriedades definidas ({propertyCount}), mínimo {minimum}", - OBJECT_PROPERTIES_MAXIMUM: "Muitas propriedades definidas ({propertyCount}), máximo {maximum}", - OBJECT_REQUIRED: "Propriedade necessária em falta: {key}", - OBJECT_ADDITIONAL_PROPERTIES: "Não são permitidas propriedades adicionais", - OBJECT_DEPENDENCY_KEY: "Uma dependência falhou - tem de existir uma chave: {missing} (devido à chave: {key})", - // Array errors - ARRAY_LENGTH_SHORT: "A 'array' é muito curta ({length}), mínimo {minimum}", - ARRAY_LENGTH_LONG: "A 'array' é muito longa ({length}), máximo {maximum}", - ARRAY_UNIQUE: "Os itens da 'array' não são únicos (índices {match1} e {match2})", - ARRAY_ADDITIONAL_ITEMS: "Não são permitidos itens adicionais", - // Format errors - FORMAT_CUSTOM: "A validação do formato falhou ({message})", - KEYWORD_CUSTOM: "A 'keyword' falhou: {key} ({message})", - // Schema structure - CIRCULAR_REFERENCE: "$refs circular: {urls}", - // Non-standard validation options - UNKNOWN_PROPERTY: "Propriedade desconhecida (não está em 'schema')" - }; - - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['../tv4'], function(tv4) { - tv4.addLanguage('pt-PT', lang); - return tv4; - }); - } else if (typeof module !== 'undefined' && module.exports) { - // CommonJS. Define export. - var tv4 = require('../tv4'); - tv4.addLanguage('pt-PT', lang); - module.exports = tv4; - } else { - // Browser globals - global.tv4.addLanguage('pt-PT', lang); - } -})(this); diff --git a/node_modules/tv4/lang/sv-SE.js b/node_modules/tv4/lang/sv-SE.js deleted file mode 100644 index 3621a34..0000000 --- a/node_modules/tv4/lang/sv-SE.js +++ /dev/null @@ -1,55 +0,0 @@ -(function (global) { - var lang = { - INVALID_TYPE: "Otillåten typ: {type} (skall vara {expected})", - ENUM_MISMATCH: "Otillåtet värde: {value}", - ANY_OF_MISSING: "Värdet matchar inget av schemana \"anyOf\"", - ONE_OF_MISSING: "Värdet matchar inget av schemana \"oneOf\"", - ONE_OF_MULTIPLE: "Värdet matchar flera scheman \"oneOf\": index {index1} och {index2}", - NOT_PASSED: "Värdet matchar schemat från \"not\"", - // Numeric errors - NUMBER_MULTIPLE_OF: "Värdet {value} är inte en multipel av {multipleOf}", - NUMBER_MINIMUM: "Värdet {value} får inte vara mindre än {minimum}", - NUMBER_MINIMUM_EXCLUSIVE: "Värdet {value} måste vara större än {minimum}", - NUMBER_MAXIMUM: "Värdet {value} får inte vara större än {maximum}", - NUMBER_MAXIMUM_EXCLUSIVE: "Värdet {value} måste vara mindre än {maximum}", - NUMBER_NOT_A_NUMBER: "Värdet {value} är inte ett giltigt tal", - // String errors - STRING_LENGTH_SHORT: "Texten är för kort ({length} tecken), ska vara minst {minimum} tecken", - STRING_LENGTH_LONG: "Texten är för lång ({length} tecken), ska vara högst {maximum}", - STRING_PATTERN: "Texten har fel format: {pattern}", - // Object errors - OBJECT_PROPERTIES_MINIMUM: "För få parametrar ({propertyCount}), ska minst vara {minimum}", - OBJECT_PROPERTIES_MAXIMUM: "För många parametrar ({propertyCount}), får högst vara {maximum}", - OBJECT_REQUIRED: "Egenskap saknas: {key}", - OBJECT_ADDITIONAL_PROPERTIES: "Extra parametrar är inte tillåtna", - OBJECT_DEPENDENCY_KEY: "Saknar beroende - saknad nyckel: {missing} (beroende nyckel: {key})", - // Array errors - ARRAY_LENGTH_SHORT: "Listan är för kort ({length}), ska minst vara {minimum}", - ARRAY_LENGTH_LONG: "Listan är för lång ({length}), ska högst vara {maximum}", - ARRAY_UNIQUE: "Listvärden är inte unika (index {match1} och {match2})", - ARRAY_ADDITIONAL_ITEMS: "Extra värden är inte tillåtna", - // Format errors - FORMAT_CUSTOM: "Misslyckad validering ({message})", - KEYWORD_CUSTOM: "Misslyckat nyckelord: {key} ({message})", - // Schema structure - CIRCULAR_REFERENCE: "Cirkulär $refs: {urls}", - // Non-standard validation options - UNKNOWN_PROPERTY: "Okänd egenskap (finns ej i schema)" - }; - - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['../tv4'], function(tv4) { - tv4.addLanguage('sv-SE', lang); - return tv4; - }); - } else if (typeof module !== 'undefined' && module.exports) { - // CommonJS. Define export. - var tv4 = require('../tv4'); - tv4.addLanguage('sv-SE', lang); - module.exports = tv4; - } else { - // Browser globals - global.tv4.addLanguage('sv-SE', lang); - } -})(this); diff --git a/node_modules/tv4/lang/zh-CN.js b/node_modules/tv4/lang/zh-CN.js deleted file mode 100644 index b3c4c1b..0000000 --- a/node_modules/tv4/lang/zh-CN.js +++ /dev/null @@ -1,55 +0,0 @@ -(function (global) { - var lang = { - INVALID_TYPE: "当前类型 {type} 不符合期望的类型 {expected}", - ENUM_MISMATCH: "{value} 不是有效的枚举类型取值", - ANY_OF_MISSING: "数据不符合以下任何一个模式 (\"anyOf\")", - ONE_OF_MISSING: "数据不符合以下任何一个模式 (\"oneOf\")", - ONE_OF_MULTIPLE: "数据同时符合多个模式 (\"oneOf\"): 下标 {index1} 和 {index2}", - NOT_PASSED: "数据不应匹配以下模式 (\"not\")", - // Numeric errors - NUMBER_MULTIPLE_OF: "数值 {value} 不是 {multipleOf} 的倍数", - NUMBER_MINIMUM: "数值 {value} 小于最小值 {minimum}", - NUMBER_MINIMUM_EXCLUSIVE: "数值 {value} 等于排除的最小值 {minimum}", - NUMBER_MAXIMUM: "数值 {value} is greater 大于最大值 {maximum}", - NUMBER_MAXIMUM_EXCLUSIVE: "数值 {value} 等于排除的最大值 {maximum}", - NUMBER_NOT_A_NUMBER: "数值 {value} 不是有效的数字", - // String errors - STRING_LENGTH_SHORT: "字符串太短 ({length} 个字符), 最少 {minimum} 个", - STRING_LENGTH_LONG: "字符串太长 ({length} 个字符), 最多 {maximum} 个", - STRING_PATTERN: "字符串不匹配模式: {pattern}", - // Object errors - OBJECT_PROPERTIES_MINIMUM: "字段数过少 ({propertyCount}), 最少 {minimum} 个", - OBJECT_PROPERTIES_MAXIMUM: "字段数过多 ({propertyCount}), 最多 {maximum} 个", - OBJECT_REQUIRED: "缺少必要字段: {key}", - OBJECT_ADDITIONAL_PROPERTIES: "不允许多余的字段", - OBJECT_DEPENDENCY_KEY: "依赖失败 - 缺少键 {missing} (来自键: {key})", - // Array errors - ARRAY_LENGTH_SHORT: "数组长度太短 ({length}), 最小长度 {minimum}", - ARRAY_LENGTH_LONG: "数组长度太长 ({length}), 最大长度 {maximum}", - ARRAY_UNIQUE: "数组元素不唯一 (下标 {match1} 和 {match2})", - ARRAY_ADDITIONAL_ITEMS: "不允许多余的元素", - // Format errors - FORMAT_CUSTOM: "格式校验失败 ({message})", - KEYWORD_CUSTOM: "关键字 {key} 校验失败: ({message})", - // Schema structure - CIRCULAR_REFERENCE: "循环引用 ($refs): {urls}", - // Non-standard validation options - UNKNOWN_PROPERTY: "未知字段 (不在 schema 中)" - }; - - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['../tv4'], function(tv4) { - tv4.addLanguage('zh-CN', lang); - return tv4; - }); - } else if (typeof module !== 'undefined' && module.exports){ - // CommonJS. Define export. - var tv4 = require('../tv4'); - tv4.addLanguage('zh-CN', lang); - module.exports = tv4; - } else { - // Browser globals - global.tv4.addLanguage('zh-CN', lang); - } -})(this); diff --git a/node_modules/tv4/package.json b/node_modules/tv4/package.json deleted file mode 100644 index 803acc9..0000000 --- a/node_modules/tv4/package.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "_args": [ - [ - "tv4@^1.2.7", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\table" - ] - ], - "_from": "tv4@>=1.2.7 <2.0.0", - "_id": "tv4@1.2.7", - "_inCache": true, - "_installable": true, - "_location": "/tv4", - "_nodeVersion": "0.12.4", - "_npmUser": { - "email": "luffgd@gmail.com", - "name": "geraintluff" - }, - "_npmVersion": "2.10.1", - "_phantomChildren": {}, - "_requested": { - "name": "tv4", - "raw": "tv4@^1.2.7", - "rawSpec": "^1.2.7", - "scope": null, - "spec": ">=1.2.7 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/table" - ], - "_resolved": "https://registry.npmjs.org/tv4/-/tv4-1.2.7.tgz", - "_shasum": "bd29389afc73ade49ae5f48142b5d544bf68d120", - "_shrinkwrap": null, - "_spec": "tv4@^1.2.7", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\table", - "author": { - "name": "Geraint Luff" - }, - "bugs": { - "url": "https://github.com/geraintluff/tv4/issues" - }, - "dependencies": {}, - "description": "A public domain JSON Schema validator for JavaScript", - "devDependencies": { - "grunt": "~0.4.1", - "grunt-cli": "~0.1.9", - "grunt-component-io": "~0.1.0", - "grunt-concat-sourcemap": "~0.2", - "grunt-contrib-clean": "~0.4.1", - "grunt-contrib-copy": "~0.4.1", - "grunt-contrib-jshint": "~0.6.2", - "grunt-contrib-uglify": "~0.2.2", - "grunt-markdown": "~0.3.0", - "grunt-mocha": "~0.4", - "grunt-mocha-test": "~0.5.0", - "grunt-push-release": "~0.1.1", - "grunt-regex-replace": "~0.2.5", - "jshint-path-reporter": "~0.1", - "mocha": "~1.11.0", - "mocha-unfunk-reporter": "~0.2", - "proclaim": "1.4", - "requirejs": "~2.1.11", - "source-map-support": "~0.1" - }, - "directories": {}, - "dist": { - "shasum": "bd29389afc73ade49ae5f48142b5d544bf68d120", - "tarball": "https://registry.npmjs.org/tv4/-/tv4-1.2.7.tgz" - }, - "engines": { - "node": ">= 0.8.0" - }, - "gitHead": "c1db91fd7a915178f4b8f66622f0e78fcb4e3ecb", - "homepage": "https://github.com/geraintluff/tv4#readme", - "keywords": [ - "json-schema", - "schema", - "tv4", - "validator" - ], - "license:": [ - { - "type": "Public Domain", - "url": "http://geraintluff.github.io/tv4/LICENSE.txt" - }, - { - "type": "MIT", - "url": "http://jsonary.com/LICENSE.txt" - } - ], - "main": "tv4.js", - "maintainers": [ - { - "name": "geraintluff", - "email": "luffgd@gmail.com" - }, - { - "name": "bartvds", - "email": "bartvanderschoor@gmail.com" - } - ], - "name": "tv4", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/geraintluff/tv4.git" - }, - "scripts": { - "prepublish": "grunt prepublish", - "test": "grunt test" - }, - "version": "1.2.7" -} diff --git a/node_modules/tv4/tv4.async-jquery.js b/node_modules/tv4/tv4.async-jquery.js deleted file mode 100644 index 761f232..0000000 --- a/node_modules/tv4/tv4.async-jquery.js +++ /dev/null @@ -1,34 +0,0 @@ -// Provides support for asynchronous validation (fetching schemas) using jQuery -// Callback is optional third argument to tv4.validate() - if not present, synchronous operation -// callback(result, error); -if (typeof (tv4.asyncValidate) === 'undefined') { - tv4.syncValidate = tv4.validate; - tv4.validate = function (data, schema, callback, checkRecursive, banUnknownProperties) { - if (typeof (callback) === 'undefined') { - return this.syncValidate(data, schema, checkRecursive, banUnknownProperties); - } else { - return this.asyncValidate(data, schema, callback, checkRecursive, banUnknownProperties); - } - }; - tv4.asyncValidate = function (data, schema, callback, checkRecursive, banUnknownProperties) { - var $ = jQuery; - var result = tv4.validate(data, schema, checkRecursive, banUnknownProperties); - if (!tv4.missing.length) { - callback(result, tv4.error); - } else { - // Make a request for each missing schema - var missingSchemas = $.map(tv4.missing, function (schemaUri) { - return $.getJSON(schemaUri).success(function (fetchedSchema) { - tv4.addSchema(schemaUri, fetchedSchema); - }).error(function () { - // If there's an error, just use an empty schema - tv4.addSchema(schemaUri, {}); - }); - }); - // When all requests done, try again - $.when.apply($, missingSchemas).done(function () { - var result = tv4.asyncValidate(data, schema, callback, checkRecursive, banUnknownProperties); - }); - } - }; -} diff --git a/node_modules/tv4/tv4.js b/node_modules/tv4/tv4.js deleted file mode 100644 index 614f443..0000000 --- a/node_modules/tv4/tv4.js +++ /dev/null @@ -1,1677 +0,0 @@ -/* -Author: Geraint Luff and others -Year: 2013 - -This code is released into the "public domain" by its author(s). Anybody may use, alter and distribute the code without restriction. The author makes no guarantees, and takes no liability of any kind for use of this code. - -If you find a bug or make an improvement, it would be courteous to let the author know, but it is not compulsory. -*/ -(function (global, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define([], factory); - } else if (typeof module !== 'undefined' && module.exports){ - // CommonJS. Define export. - module.exports = factory(); - } else { - // Browser globals - global.tv4 = factory(); - } -}(this, function () { - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FObject%2Fkeys -if (!Object.keys) { - Object.keys = (function () { - var hasOwnProperty = Object.prototype.hasOwnProperty, - hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'), - dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ], - dontEnumsLength = dontEnums.length; - - return function (obj) { - if (typeof obj !== 'object' && typeof obj !== 'function' || obj === null) { - throw new TypeError('Object.keys called on non-object'); - } - - var result = []; - - for (var prop in obj) { - if (hasOwnProperty.call(obj, prop)) { - result.push(prop); - } - } - - if (hasDontEnumBug) { - for (var i=0; i < dontEnumsLength; i++) { - if (hasOwnProperty.call(obj, dontEnums[i])) { - result.push(dontEnums[i]); - } - } - } - return result; - }; - })(); -} -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create -if (!Object.create) { - Object.create = (function(){ - function F(){} - - return function(o){ - if (arguments.length !== 1) { - throw new Error('Object.create implementation only accepts one parameter.'); - } - F.prototype = o; - return new F(); - }; - })(); -} -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FArray%2FisArray -if(!Array.isArray) { - Array.isArray = function (vArg) { - return Object.prototype.toString.call(vArg) === "[object Array]"; - }; -} -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FArray%2FindexOf -if (!Array.prototype.indexOf) { - Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) { - if (this === null) { - throw new TypeError(); - } - var t = Object(this); - var len = t.length >>> 0; - - if (len === 0) { - return -1; - } - var n = 0; - if (arguments.length > 1) { - n = Number(arguments[1]); - if (n !== n) { // shortcut for verifying if it's NaN - n = 0; - } else if (n !== 0 && n !== Infinity && n !== -Infinity) { - n = (n > 0 || -1) * Math.floor(Math.abs(n)); - } - } - if (n >= len) { - return -1; - } - var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0); - for (; k < len; k++) { - if (k in t && t[k] === searchElement) { - return k; - } - } - return -1; - }; -} - -// Grungey Object.isFrozen hack -if (!Object.isFrozen) { - Object.isFrozen = function (obj) { - var key = "tv4_test_frozen_key"; - while (obj.hasOwnProperty(key)) { - key += Math.random(); - } - try { - obj[key] = true; - delete obj[key]; - return false; - } catch (e) { - return true; - } - }; -} -// Based on: https://github.com/geraintluff/uri-templates, but with all the de-substitution stuff removed - -var uriTemplateGlobalModifiers = { - "+": true, - "#": true, - ".": true, - "/": true, - ";": true, - "?": true, - "&": true -}; -var uriTemplateSuffices = { - "*": true -}; - -function notReallyPercentEncode(string) { - return encodeURI(string).replace(/%25[0-9][0-9]/g, function (doubleEncoded) { - return "%" + doubleEncoded.substring(3); - }); -} - -function uriTemplateSubstitution(spec) { - var modifier = ""; - if (uriTemplateGlobalModifiers[spec.charAt(0)]) { - modifier = spec.charAt(0); - spec = spec.substring(1); - } - var separator = ""; - var prefix = ""; - var shouldEscape = true; - var showVariables = false; - var trimEmptyString = false; - if (modifier === '+') { - shouldEscape = false; - } else if (modifier === ".") { - prefix = "."; - separator = "."; - } else if (modifier === "/") { - prefix = "/"; - separator = "/"; - } else if (modifier === '#') { - prefix = "#"; - shouldEscape = false; - } else if (modifier === ';') { - prefix = ";"; - separator = ";"; - showVariables = true; - trimEmptyString = true; - } else if (modifier === '?') { - prefix = "?"; - separator = "&"; - showVariables = true; - } else if (modifier === '&') { - prefix = "&"; - separator = "&"; - showVariables = true; - } - - var varNames = []; - var varList = spec.split(","); - var varSpecs = []; - var varSpecMap = {}; - for (var i = 0; i < varList.length; i++) { - var varName = varList[i]; - var truncate = null; - if (varName.indexOf(":") !== -1) { - var parts = varName.split(":"); - varName = parts[0]; - truncate = parseInt(parts[1], 10); - } - var suffices = {}; - while (uriTemplateSuffices[varName.charAt(varName.length - 1)]) { - suffices[varName.charAt(varName.length - 1)] = true; - varName = varName.substring(0, varName.length - 1); - } - var varSpec = { - truncate: truncate, - name: varName, - suffices: suffices - }; - varSpecs.push(varSpec); - varSpecMap[varName] = varSpec; - varNames.push(varName); - } - var subFunction = function (valueFunction) { - var result = ""; - var startIndex = 0; - for (var i = 0; i < varSpecs.length; i++) { - var varSpec = varSpecs[i]; - var value = valueFunction(varSpec.name); - if (value === null || value === undefined || (Array.isArray(value) && value.length === 0) || (typeof value === 'object' && Object.keys(value).length === 0)) { - startIndex++; - continue; - } - if (i === startIndex) { - result += prefix; - } else { - result += (separator || ","); - } - if (Array.isArray(value)) { - if (showVariables) { - result += varSpec.name + "="; - } - for (var j = 0; j < value.length; j++) { - if (j > 0) { - result += varSpec.suffices['*'] ? (separator || ",") : ","; - if (varSpec.suffices['*'] && showVariables) { - result += varSpec.name + "="; - } - } - result += shouldEscape ? encodeURIComponent(value[j]).replace(/!/g, "%21") : notReallyPercentEncode(value[j]); - } - } else if (typeof value === "object") { - if (showVariables && !varSpec.suffices['*']) { - result += varSpec.name + "="; - } - var first = true; - for (var key in value) { - if (!first) { - result += varSpec.suffices['*'] ? (separator || ",") : ","; - } - first = false; - result += shouldEscape ? encodeURIComponent(key).replace(/!/g, "%21") : notReallyPercentEncode(key); - result += varSpec.suffices['*'] ? '=' : ","; - result += shouldEscape ? encodeURIComponent(value[key]).replace(/!/g, "%21") : notReallyPercentEncode(value[key]); - } - } else { - if (showVariables) { - result += varSpec.name; - if (!trimEmptyString || value !== "") { - result += "="; - } - } - if (varSpec.truncate != null) { - value = value.substring(0, varSpec.truncate); - } - result += shouldEscape ? encodeURIComponent(value).replace(/!/g, "%21"): notReallyPercentEncode(value); - } - } - return result; - }; - subFunction.varNames = varNames; - return { - prefix: prefix, - substitution: subFunction - }; -} - -function UriTemplate(template) { - if (!(this instanceof UriTemplate)) { - return new UriTemplate(template); - } - var parts = template.split("{"); - var textParts = [parts.shift()]; - var prefixes = []; - var substitutions = []; - var varNames = []; - while (parts.length > 0) { - var part = parts.shift(); - var spec = part.split("}")[0]; - var remainder = part.substring(spec.length + 1); - var funcs = uriTemplateSubstitution(spec); - substitutions.push(funcs.substitution); - prefixes.push(funcs.prefix); - textParts.push(remainder); - varNames = varNames.concat(funcs.substitution.varNames); - } - this.fill = function (valueFunction) { - var result = textParts[0]; - for (var i = 0; i < substitutions.length; i++) { - var substitution = substitutions[i]; - result += substitution(valueFunction); - result += textParts[i + 1]; - } - return result; - }; - this.varNames = varNames; - this.template = template; -} -UriTemplate.prototype = { - toString: function () { - return this.template; - }, - fillFromObject: function (obj) { - return this.fill(function (varName) { - return obj[varName]; - }); - } -}; -var ValidatorContext = function ValidatorContext(parent, collectMultiple, errorReporter, checkRecursive, trackUnknownProperties) { - this.missing = []; - this.missingMap = {}; - this.formatValidators = parent ? Object.create(parent.formatValidators) : {}; - this.schemas = parent ? Object.create(parent.schemas) : {}; - this.collectMultiple = collectMultiple; - this.errors = []; - this.handleError = collectMultiple ? this.collectError : this.returnError; - if (checkRecursive) { - this.checkRecursive = true; - this.scanned = []; - this.scannedFrozen = []; - this.scannedFrozenSchemas = []; - this.scannedFrozenValidationErrors = []; - this.validatedSchemasKey = 'tv4_validation_id'; - this.validationErrorsKey = 'tv4_validation_errors_id'; - } - if (trackUnknownProperties) { - this.trackUnknownProperties = true; - this.knownPropertyPaths = {}; - this.unknownPropertyPaths = {}; - } - this.errorReporter = errorReporter || defaultErrorReporter('en'); - if (typeof this.errorReporter === 'string') { - throw new Error('debug'); - } - this.definedKeywords = {}; - if (parent) { - for (var key in parent.definedKeywords) { - this.definedKeywords[key] = parent.definedKeywords[key].slice(0); - } - } -}; -ValidatorContext.prototype.defineKeyword = function (keyword, keywordFunction) { - this.definedKeywords[keyword] = this.definedKeywords[keyword] || []; - this.definedKeywords[keyword].push(keywordFunction); -}; -ValidatorContext.prototype.createError = function (code, messageParams, dataPath, schemaPath, subErrors, data, schema) { - var error = new ValidationError(code, messageParams, dataPath, schemaPath, subErrors); - error.message = this.errorReporter(error, data, schema); - return error; -}; -ValidatorContext.prototype.returnError = function (error) { - return error; -}; -ValidatorContext.prototype.collectError = function (error) { - if (error) { - this.errors.push(error); - } - return null; -}; -ValidatorContext.prototype.prefixErrors = function (startIndex, dataPath, schemaPath) { - for (var i = startIndex; i < this.errors.length; i++) { - this.errors[i] = this.errors[i].prefixWith(dataPath, schemaPath); - } - return this; -}; -ValidatorContext.prototype.banUnknownProperties = function (data, schema) { - for (var unknownPath in this.unknownPropertyPaths) { - var error = this.createError(ErrorCodes.UNKNOWN_PROPERTY, {path: unknownPath}, unknownPath, "", null, data, schema); - var result = this.handleError(error); - if (result) { - return result; - } - } - return null; -}; - -ValidatorContext.prototype.addFormat = function (format, validator) { - if (typeof format === 'object') { - for (var key in format) { - this.addFormat(key, format[key]); - } - return this; - } - this.formatValidators[format] = validator; -}; -ValidatorContext.prototype.resolveRefs = function (schema, urlHistory) { - if (schema['$ref'] !== undefined) { - urlHistory = urlHistory || {}; - if (urlHistory[schema['$ref']]) { - return this.createError(ErrorCodes.CIRCULAR_REFERENCE, {urls: Object.keys(urlHistory).join(', ')}, '', '', null, undefined, schema); - } - urlHistory[schema['$ref']] = true; - schema = this.getSchema(schema['$ref'], urlHistory); - } - return schema; -}; -ValidatorContext.prototype.getSchema = function (url, urlHistory) { - var schema; - if (this.schemas[url] !== undefined) { - schema = this.schemas[url]; - return this.resolveRefs(schema, urlHistory); - } - var baseUrl = url; - var fragment = ""; - if (url.indexOf('#') !== -1) { - fragment = url.substring(url.indexOf("#") + 1); - baseUrl = url.substring(0, url.indexOf("#")); - } - if (typeof this.schemas[baseUrl] === 'object') { - schema = this.schemas[baseUrl]; - var pointerPath = decodeURIComponent(fragment); - if (pointerPath === "") { - return this.resolveRefs(schema, urlHistory); - } else if (pointerPath.charAt(0) !== "/") { - return undefined; - } - var parts = pointerPath.split("/").slice(1); - for (var i = 0; i < parts.length; i++) { - var component = parts[i].replace(/~1/g, "/").replace(/~0/g, "~"); - if (schema[component] === undefined) { - schema = undefined; - break; - } - schema = schema[component]; - } - if (schema !== undefined) { - return this.resolveRefs(schema, urlHistory); - } - } - if (this.missing[baseUrl] === undefined) { - this.missing.push(baseUrl); - this.missing[baseUrl] = baseUrl; - this.missingMap[baseUrl] = baseUrl; - } -}; -ValidatorContext.prototype.searchSchemas = function (schema, url) { - if (Array.isArray(schema)) { - for (var i = 0; i < schema.length; i++) { - this.searchSchemas(schema[i], url); - } - } else if (schema && typeof schema === "object") { - if (typeof schema.id === "string") { - if (isTrustedUrl(url, schema.id)) { - if (this.schemas[schema.id] === undefined) { - this.schemas[schema.id] = schema; - } - } - } - for (var key in schema) { - if (key !== "enum") { - if (typeof schema[key] === "object") { - this.searchSchemas(schema[key], url); - } else if (key === "$ref") { - var uri = getDocumentUri(schema[key]); - if (uri && this.schemas[uri] === undefined && this.missingMap[uri] === undefined) { - this.missingMap[uri] = uri; - } - } - } - } - } -}; -ValidatorContext.prototype.addSchema = function (url, schema) { - //overload - if (typeof url !== 'string' || typeof schema === 'undefined') { - if (typeof url === 'object' && typeof url.id === 'string') { - schema = url; - url = schema.id; - } - else { - return; - } - } - if (url === getDocumentUri(url) + "#") { - // Remove empty fragment - url = getDocumentUri(url); - } - this.schemas[url] = schema; - delete this.missingMap[url]; - normSchema(schema, url); - this.searchSchemas(schema, url); -}; - -ValidatorContext.prototype.getSchemaMap = function () { - var map = {}; - for (var key in this.schemas) { - map[key] = this.schemas[key]; - } - return map; -}; - -ValidatorContext.prototype.getSchemaUris = function (filterRegExp) { - var list = []; - for (var key in this.schemas) { - if (!filterRegExp || filterRegExp.test(key)) { - list.push(key); - } - } - return list; -}; - -ValidatorContext.prototype.getMissingUris = function (filterRegExp) { - var list = []; - for (var key in this.missingMap) { - if (!filterRegExp || filterRegExp.test(key)) { - list.push(key); - } - } - return list; -}; - -ValidatorContext.prototype.dropSchemas = function () { - this.schemas = {}; - this.reset(); -}; -ValidatorContext.prototype.reset = function () { - this.missing = []; - this.missingMap = {}; - this.errors = []; -}; - -ValidatorContext.prototype.validateAll = function (data, schema, dataPathParts, schemaPathParts, dataPointerPath) { - var topLevel; - schema = this.resolveRefs(schema); - if (!schema) { - return null; - } else if (schema instanceof ValidationError) { - this.errors.push(schema); - return schema; - } - - var startErrorCount = this.errors.length; - var frozenIndex, scannedFrozenSchemaIndex = null, scannedSchemasIndex = null; - if (this.checkRecursive && data && typeof data === 'object') { - topLevel = !this.scanned.length; - if (data[this.validatedSchemasKey]) { - var schemaIndex = data[this.validatedSchemasKey].indexOf(schema); - if (schemaIndex !== -1) { - this.errors = this.errors.concat(data[this.validationErrorsKey][schemaIndex]); - return null; - } - } - if (Object.isFrozen(data)) { - frozenIndex = this.scannedFrozen.indexOf(data); - if (frozenIndex !== -1) { - var frozenSchemaIndex = this.scannedFrozenSchemas[frozenIndex].indexOf(schema); - if (frozenSchemaIndex !== -1) { - this.errors = this.errors.concat(this.scannedFrozenValidationErrors[frozenIndex][frozenSchemaIndex]); - return null; - } - } - } - this.scanned.push(data); - if (Object.isFrozen(data)) { - if (frozenIndex === -1) { - frozenIndex = this.scannedFrozen.length; - this.scannedFrozen.push(data); - this.scannedFrozenSchemas.push([]); - } - scannedFrozenSchemaIndex = this.scannedFrozenSchemas[frozenIndex].length; - this.scannedFrozenSchemas[frozenIndex][scannedFrozenSchemaIndex] = schema; - this.scannedFrozenValidationErrors[frozenIndex][scannedFrozenSchemaIndex] = []; - } else { - if (!data[this.validatedSchemasKey]) { - try { - Object.defineProperty(data, this.validatedSchemasKey, { - value: [], - configurable: true - }); - Object.defineProperty(data, this.validationErrorsKey, { - value: [], - configurable: true - }); - } catch (e) { - //IE 7/8 workaround - data[this.validatedSchemasKey] = []; - data[this.validationErrorsKey] = []; - } - } - scannedSchemasIndex = data[this.validatedSchemasKey].length; - data[this.validatedSchemasKey][scannedSchemasIndex] = schema; - data[this.validationErrorsKey][scannedSchemasIndex] = []; - } - } - - var errorCount = this.errors.length; - var error = this.validateBasic(data, schema, dataPointerPath) - || this.validateNumeric(data, schema, dataPointerPath) - || this.validateString(data, schema, dataPointerPath) - || this.validateArray(data, schema, dataPointerPath) - || this.validateObject(data, schema, dataPointerPath) - || this.validateCombinations(data, schema, dataPointerPath) - || this.validateHypermedia(data, schema, dataPointerPath) - || this.validateFormat(data, schema, dataPointerPath) - || this.validateDefinedKeywords(data, schema, dataPointerPath) - || null; - - if (topLevel) { - while (this.scanned.length) { - var item = this.scanned.pop(); - delete item[this.validatedSchemasKey]; - } - this.scannedFrozen = []; - this.scannedFrozenSchemas = []; - } - - if (error || errorCount !== this.errors.length) { - while ((dataPathParts && dataPathParts.length) || (schemaPathParts && schemaPathParts.length)) { - var dataPart = (dataPathParts && dataPathParts.length) ? "" + dataPathParts.pop() : null; - var schemaPart = (schemaPathParts && schemaPathParts.length) ? "" + schemaPathParts.pop() : null; - if (error) { - error = error.prefixWith(dataPart, schemaPart); - } - this.prefixErrors(errorCount, dataPart, schemaPart); - } - } - - if (scannedFrozenSchemaIndex !== null) { - this.scannedFrozenValidationErrors[frozenIndex][scannedFrozenSchemaIndex] = this.errors.slice(startErrorCount); - } else if (scannedSchemasIndex !== null) { - data[this.validationErrorsKey][scannedSchemasIndex] = this.errors.slice(startErrorCount); - } - - return this.handleError(error); -}; -ValidatorContext.prototype.validateFormat = function (data, schema) { - if (typeof schema.format !== 'string' || !this.formatValidators[schema.format]) { - return null; - } - var errorMessage = this.formatValidators[schema.format].call(null, data, schema); - if (typeof errorMessage === 'string' || typeof errorMessage === 'number') { - return this.createError(ErrorCodes.FORMAT_CUSTOM, {message: errorMessage}, '', '/format', null, data, schema); - } else if (errorMessage && typeof errorMessage === 'object') { - return this.createError(ErrorCodes.FORMAT_CUSTOM, {message: errorMessage.message || "?"}, errorMessage.dataPath || '', errorMessage.schemaPath || "/format", null, data, schema); - } - return null; -}; -ValidatorContext.prototype.validateDefinedKeywords = function (data, schema, dataPointerPath) { - for (var key in this.definedKeywords) { - if (typeof schema[key] === 'undefined') { - continue; - } - var validationFunctions = this.definedKeywords[key]; - for (var i = 0; i < validationFunctions.length; i++) { - var func = validationFunctions[i]; - var result = func(data, schema[key], schema, dataPointerPath); - if (typeof result === 'string' || typeof result === 'number') { - return this.createError(ErrorCodes.KEYWORD_CUSTOM, {key: key, message: result}, '', '', null, data, schema).prefixWith(null, key); - } else if (result && typeof result === 'object') { - var code = result.code; - if (typeof code === 'string') { - if (!ErrorCodes[code]) { - throw new Error('Undefined error code (use defineError): ' + code); - } - code = ErrorCodes[code]; - } else if (typeof code !== 'number') { - code = ErrorCodes.KEYWORD_CUSTOM; - } - var messageParams = (typeof result.message === 'object') ? result.message : {key: key, message: result.message || "?"}; - var schemaPath = result.schemaPath || ("/" + key.replace(/~/g, '~0').replace(/\//g, '~1')); - return this.createError(code, messageParams, result.dataPath || null, schemaPath, null, data, schema); - } - } - } - return null; -}; - -function recursiveCompare(A, B) { - if (A === B) { - return true; - } - if (A && B && typeof A === "object" && typeof B === "object") { - if (Array.isArray(A) !== Array.isArray(B)) { - return false; - } else if (Array.isArray(A)) { - if (A.length !== B.length) { - return false; - } - for (var i = 0; i < A.length; i++) { - if (!recursiveCompare(A[i], B[i])) { - return false; - } - } - } else { - var key; - for (key in A) { - if (B[key] === undefined && A[key] !== undefined) { - return false; - } - } - for (key in B) { - if (A[key] === undefined && B[key] !== undefined) { - return false; - } - } - for (key in A) { - if (!recursiveCompare(A[key], B[key])) { - return false; - } - } - } - return true; - } - return false; -} - -ValidatorContext.prototype.validateBasic = function validateBasic(data, schema, dataPointerPath) { - var error; - if (error = this.validateType(data, schema, dataPointerPath)) { - return error.prefixWith(null, "type"); - } - if (error = this.validateEnum(data, schema, dataPointerPath)) { - return error.prefixWith(null, "type"); - } - return null; -}; - -ValidatorContext.prototype.validateType = function validateType(data, schema) { - if (schema.type === undefined) { - return null; - } - var dataType = typeof data; - if (data === null) { - dataType = "null"; - } else if (Array.isArray(data)) { - dataType = "array"; - } - var allowedTypes = schema.type; - if (!Array.isArray(allowedTypes)) { - allowedTypes = [allowedTypes]; - } - - for (var i = 0; i < allowedTypes.length; i++) { - var type = allowedTypes[i]; - if (type === dataType || (type === "integer" && dataType === "number" && (data % 1 === 0))) { - return null; - } - } - return this.createError(ErrorCodes.INVALID_TYPE, {type: dataType, expected: allowedTypes.join("/")}, '', '', null, data, schema); -}; - -ValidatorContext.prototype.validateEnum = function validateEnum(data, schema) { - if (schema["enum"] === undefined) { - return null; - } - for (var i = 0; i < schema["enum"].length; i++) { - var enumVal = schema["enum"][i]; - if (recursiveCompare(data, enumVal)) { - return null; - } - } - return this.createError(ErrorCodes.ENUM_MISMATCH, {value: (typeof JSON !== 'undefined') ? JSON.stringify(data) : data}, '', '', null, data, schema); -}; - -ValidatorContext.prototype.validateNumeric = function validateNumeric(data, schema, dataPointerPath) { - return this.validateMultipleOf(data, schema, dataPointerPath) - || this.validateMinMax(data, schema, dataPointerPath) - || this.validateNaN(data, schema, dataPointerPath) - || null; -}; - -var CLOSE_ENOUGH_LOW = Math.pow(2, -51); -var CLOSE_ENOUGH_HIGH = 1 - CLOSE_ENOUGH_LOW; -ValidatorContext.prototype.validateMultipleOf = function validateMultipleOf(data, schema) { - var multipleOf = schema.multipleOf || schema.divisibleBy; - if (multipleOf === undefined) { - return null; - } - if (typeof data === "number") { - var remainder = (data/multipleOf)%1; - if (remainder >= CLOSE_ENOUGH_LOW && remainder < CLOSE_ENOUGH_HIGH) { - return this.createError(ErrorCodes.NUMBER_MULTIPLE_OF, {value: data, multipleOf: multipleOf}, '', '', null, data, schema); - } - } - return null; -}; - -ValidatorContext.prototype.validateMinMax = function validateMinMax(data, schema) { - if (typeof data !== "number") { - return null; - } - if (schema.minimum !== undefined) { - if (data < schema.minimum) { - return this.createError(ErrorCodes.NUMBER_MINIMUM, {value: data, minimum: schema.minimum}, '', '/minimum', null, data, schema); - } - if (schema.exclusiveMinimum && data === schema.minimum) { - return this.createError(ErrorCodes.NUMBER_MINIMUM_EXCLUSIVE, {value: data, minimum: schema.minimum}, '', '/exclusiveMinimum', null, data, schema); - } - } - if (schema.maximum !== undefined) { - if (data > schema.maximum) { - return this.createError(ErrorCodes.NUMBER_MAXIMUM, {value: data, maximum: schema.maximum}, '', '/maximum', null, data, schema); - } - if (schema.exclusiveMaximum && data === schema.maximum) { - return this.createError(ErrorCodes.NUMBER_MAXIMUM_EXCLUSIVE, {value: data, maximum: schema.maximum}, '', '/exclusiveMaximum', null, data, schema); - } - } - return null; -}; - -ValidatorContext.prototype.validateNaN = function validateNaN(data, schema) { - if (typeof data !== "number") { - return null; - } - if (isNaN(data) === true || data === Infinity || data === -Infinity) { - return this.createError(ErrorCodes.NUMBER_NOT_A_NUMBER, {value: data}, '', '/type', null, data, schema); - } - return null; -}; - -ValidatorContext.prototype.validateString = function validateString(data, schema, dataPointerPath) { - return this.validateStringLength(data, schema, dataPointerPath) - || this.validateStringPattern(data, schema, dataPointerPath) - || null; -}; - -ValidatorContext.prototype.validateStringLength = function validateStringLength(data, schema) { - if (typeof data !== "string") { - return null; - } - if (schema.minLength !== undefined) { - if (data.length < schema.minLength) { - return this.createError(ErrorCodes.STRING_LENGTH_SHORT, {length: data.length, minimum: schema.minLength}, '', '/minLength', null, data, schema); - } - } - if (schema.maxLength !== undefined) { - if (data.length > schema.maxLength) { - return this.createError(ErrorCodes.STRING_LENGTH_LONG, {length: data.length, maximum: schema.maxLength}, '', '/maxLength', null, data, schema); - } - } - return null; -}; - -ValidatorContext.prototype.validateStringPattern = function validateStringPattern(data, schema) { - if (typeof data !== "string" || (typeof schema.pattern !== "string" && !(schema.pattern instanceof RegExp))) { - return null; - } - var regexp; - if (schema.pattern instanceof RegExp) { - regexp = schema.pattern; - } - else { - var body, flags = ''; - // Check for regular expression literals - // @see http://www.ecma-international.org/ecma-262/5.1/#sec-7.8.5 - var literal = schema.pattern.match(/^\/(.+)\/([img]*)$/); - if (literal) { - body = literal[1]; - flags = literal[2]; - } - else { - body = schema.pattern; - } - regexp = new RegExp(body, flags); - } - if (!regexp.test(data)) { - return this.createError(ErrorCodes.STRING_PATTERN, {pattern: schema.pattern}, '', '/pattern', null, data, schema); - } - return null; -}; - -ValidatorContext.prototype.validateArray = function validateArray(data, schema, dataPointerPath) { - if (!Array.isArray(data)) { - return null; - } - return this.validateArrayLength(data, schema, dataPointerPath) - || this.validateArrayUniqueItems(data, schema, dataPointerPath) - || this.validateArrayItems(data, schema, dataPointerPath) - || null; -}; - -ValidatorContext.prototype.validateArrayLength = function validateArrayLength(data, schema) { - var error; - if (schema.minItems !== undefined) { - if (data.length < schema.minItems) { - error = this.createError(ErrorCodes.ARRAY_LENGTH_SHORT, {length: data.length, minimum: schema.minItems}, '', '/minItems', null, data, schema); - if (this.handleError(error)) { - return error; - } - } - } - if (schema.maxItems !== undefined) { - if (data.length > schema.maxItems) { - error = this.createError(ErrorCodes.ARRAY_LENGTH_LONG, {length: data.length, maximum: schema.maxItems}, '', '/maxItems', null, data, schema); - if (this.handleError(error)) { - return error; - } - } - } - return null; -}; - -ValidatorContext.prototype.validateArrayUniqueItems = function validateArrayUniqueItems(data, schema) { - if (schema.uniqueItems) { - for (var i = 0; i < data.length; i++) { - for (var j = i + 1; j < data.length; j++) { - if (recursiveCompare(data[i], data[j])) { - var error = this.createError(ErrorCodes.ARRAY_UNIQUE, {match1: i, match2: j}, '', '/uniqueItems', null, data, schema); - if (this.handleError(error)) { - return error; - } - } - } - } - } - return null; -}; - -ValidatorContext.prototype.validateArrayItems = function validateArrayItems(data, schema, dataPointerPath) { - if (schema.items === undefined) { - return null; - } - var error, i; - if (Array.isArray(schema.items)) { - for (i = 0; i < data.length; i++) { - if (i < schema.items.length) { - if (error = this.validateAll(data[i], schema.items[i], [i], ["items", i], dataPointerPath + "/" + i)) { - return error; - } - } else if (schema.additionalItems !== undefined) { - if (typeof schema.additionalItems === "boolean") { - if (!schema.additionalItems) { - error = (this.createError(ErrorCodes.ARRAY_ADDITIONAL_ITEMS, {}, '/' + i, '/additionalItems', null, data, schema)); - if (this.handleError(error)) { - return error; - } - } - } else if (error = this.validateAll(data[i], schema.additionalItems, [i], ["additionalItems"], dataPointerPath + "/" + i)) { - return error; - } - } - } - } else { - for (i = 0; i < data.length; i++) { - if (error = this.validateAll(data[i], schema.items, [i], ["items"], dataPointerPath + "/" + i)) { - return error; - } - } - } - return null; -}; - -ValidatorContext.prototype.validateObject = function validateObject(data, schema, dataPointerPath) { - if (typeof data !== "object" || data === null || Array.isArray(data)) { - return null; - } - return this.validateObjectMinMaxProperties(data, schema, dataPointerPath) - || this.validateObjectRequiredProperties(data, schema, dataPointerPath) - || this.validateObjectProperties(data, schema, dataPointerPath) - || this.validateObjectDependencies(data, schema, dataPointerPath) - || null; -}; - -ValidatorContext.prototype.validateObjectMinMaxProperties = function validateObjectMinMaxProperties(data, schema) { - var keys = Object.keys(data); - var error; - if (schema.minProperties !== undefined) { - if (keys.length < schema.minProperties) { - error = this.createError(ErrorCodes.OBJECT_PROPERTIES_MINIMUM, {propertyCount: keys.length, minimum: schema.minProperties}, '', '/minProperties', null, data, schema); - if (this.handleError(error)) { - return error; - } - } - } - if (schema.maxProperties !== undefined) { - if (keys.length > schema.maxProperties) { - error = this.createError(ErrorCodes.OBJECT_PROPERTIES_MAXIMUM, {propertyCount: keys.length, maximum: schema.maxProperties}, '', '/maxProperties', null, data, schema); - if (this.handleError(error)) { - return error; - } - } - } - return null; -}; - -ValidatorContext.prototype.validateObjectRequiredProperties = function validateObjectRequiredProperties(data, schema) { - if (schema.required !== undefined) { - for (var i = 0; i < schema.required.length; i++) { - var key = schema.required[i]; - if (data[key] === undefined) { - var error = this.createError(ErrorCodes.OBJECT_REQUIRED, {key: key}, '', '/required/' + i, null, data, schema); - if (this.handleError(error)) { - return error; - } - } - } - } - return null; -}; - -ValidatorContext.prototype.validateObjectProperties = function validateObjectProperties(data, schema, dataPointerPath) { - var error; - for (var key in data) { - var keyPointerPath = dataPointerPath + "/" + key.replace(/~/g, '~0').replace(/\//g, '~1'); - var foundMatch = false; - if (schema.properties !== undefined && schema.properties[key] !== undefined) { - foundMatch = true; - if (error = this.validateAll(data[key], schema.properties[key], [key], ["properties", key], keyPointerPath)) { - return error; - } - } - if (schema.patternProperties !== undefined) { - for (var patternKey in schema.patternProperties) { - var regexp = new RegExp(patternKey); - if (regexp.test(key)) { - foundMatch = true; - if (error = this.validateAll(data[key], schema.patternProperties[patternKey], [key], ["patternProperties", patternKey], keyPointerPath)) { - return error; - } - } - } - } - if (!foundMatch) { - if (schema.additionalProperties !== undefined) { - if (this.trackUnknownProperties) { - this.knownPropertyPaths[keyPointerPath] = true; - delete this.unknownPropertyPaths[keyPointerPath]; - } - if (typeof schema.additionalProperties === "boolean") { - if (!schema.additionalProperties) { - error = this.createError(ErrorCodes.OBJECT_ADDITIONAL_PROPERTIES, {key: key}, '', '/additionalProperties', null, data, schema).prefixWith(key, null); - if (this.handleError(error)) { - return error; - } - } - } else { - if (error = this.validateAll(data[key], schema.additionalProperties, [key], ["additionalProperties"], keyPointerPath)) { - return error; - } - } - } else if (this.trackUnknownProperties && !this.knownPropertyPaths[keyPointerPath]) { - this.unknownPropertyPaths[keyPointerPath] = true; - } - } else if (this.trackUnknownProperties) { - this.knownPropertyPaths[keyPointerPath] = true; - delete this.unknownPropertyPaths[keyPointerPath]; - } - } - return null; -}; - -ValidatorContext.prototype.validateObjectDependencies = function validateObjectDependencies(data, schema, dataPointerPath) { - var error; - if (schema.dependencies !== undefined) { - for (var depKey in schema.dependencies) { - if (data[depKey] !== undefined) { - var dep = schema.dependencies[depKey]; - if (typeof dep === "string") { - if (data[dep] === undefined) { - error = this.createError(ErrorCodes.OBJECT_DEPENDENCY_KEY, {key: depKey, missing: dep}, '', '', null, data, schema).prefixWith(null, depKey).prefixWith(null, "dependencies"); - if (this.handleError(error)) { - return error; - } - } - } else if (Array.isArray(dep)) { - for (var i = 0; i < dep.length; i++) { - var requiredKey = dep[i]; - if (data[requiredKey] === undefined) { - error = this.createError(ErrorCodes.OBJECT_DEPENDENCY_KEY, {key: depKey, missing: requiredKey}, '', '/' + i, null, data, schema).prefixWith(null, depKey).prefixWith(null, "dependencies"); - if (this.handleError(error)) { - return error; - } - } - } - } else { - if (error = this.validateAll(data, dep, [], ["dependencies", depKey], dataPointerPath)) { - return error; - } - } - } - } - } - return null; -}; - -ValidatorContext.prototype.validateCombinations = function validateCombinations(data, schema, dataPointerPath) { - return this.validateAllOf(data, schema, dataPointerPath) - || this.validateAnyOf(data, schema, dataPointerPath) - || this.validateOneOf(data, schema, dataPointerPath) - || this.validateNot(data, schema, dataPointerPath) - || null; -}; - -ValidatorContext.prototype.validateAllOf = function validateAllOf(data, schema, dataPointerPath) { - if (schema.allOf === undefined) { - return null; - } - var error; - for (var i = 0; i < schema.allOf.length; i++) { - var subSchema = schema.allOf[i]; - if (error = this.validateAll(data, subSchema, [], ["allOf", i], dataPointerPath)) { - return error; - } - } - return null; -}; - -ValidatorContext.prototype.validateAnyOf = function validateAnyOf(data, schema, dataPointerPath) { - if (schema.anyOf === undefined) { - return null; - } - var errors = []; - var startErrorCount = this.errors.length; - var oldUnknownPropertyPaths, oldKnownPropertyPaths; - if (this.trackUnknownProperties) { - oldUnknownPropertyPaths = this.unknownPropertyPaths; - oldKnownPropertyPaths = this.knownPropertyPaths; - } - var errorAtEnd = true; - for (var i = 0; i < schema.anyOf.length; i++) { - if (this.trackUnknownProperties) { - this.unknownPropertyPaths = {}; - this.knownPropertyPaths = {}; - } - var subSchema = schema.anyOf[i]; - - var errorCount = this.errors.length; - var error = this.validateAll(data, subSchema, [], ["anyOf", i], dataPointerPath); - - if (error === null && errorCount === this.errors.length) { - this.errors = this.errors.slice(0, startErrorCount); - - if (this.trackUnknownProperties) { - for (var knownKey in this.knownPropertyPaths) { - oldKnownPropertyPaths[knownKey] = true; - delete oldUnknownPropertyPaths[knownKey]; - } - for (var unknownKey in this.unknownPropertyPaths) { - if (!oldKnownPropertyPaths[unknownKey]) { - oldUnknownPropertyPaths[unknownKey] = true; - } - } - // We need to continue looping so we catch all the property definitions, but we don't want to return an error - errorAtEnd = false; - continue; - } - - return null; - } - if (error) { - errors.push(error.prefixWith(null, "" + i).prefixWith(null, "anyOf")); - } - } - if (this.trackUnknownProperties) { - this.unknownPropertyPaths = oldUnknownPropertyPaths; - this.knownPropertyPaths = oldKnownPropertyPaths; - } - if (errorAtEnd) { - errors = errors.concat(this.errors.slice(startErrorCount)); - this.errors = this.errors.slice(0, startErrorCount); - return this.createError(ErrorCodes.ANY_OF_MISSING, {}, "", "/anyOf", errors, data, schema); - } -}; - -ValidatorContext.prototype.validateOneOf = function validateOneOf(data, schema, dataPointerPath) { - if (schema.oneOf === undefined) { - return null; - } - var validIndex = null; - var errors = []; - var startErrorCount = this.errors.length; - var oldUnknownPropertyPaths, oldKnownPropertyPaths; - if (this.trackUnknownProperties) { - oldUnknownPropertyPaths = this.unknownPropertyPaths; - oldKnownPropertyPaths = this.knownPropertyPaths; - } - for (var i = 0; i < schema.oneOf.length; i++) { - if (this.trackUnknownProperties) { - this.unknownPropertyPaths = {}; - this.knownPropertyPaths = {}; - } - var subSchema = schema.oneOf[i]; - - var errorCount = this.errors.length; - var error = this.validateAll(data, subSchema, [], ["oneOf", i], dataPointerPath); - - if (error === null && errorCount === this.errors.length) { - if (validIndex === null) { - validIndex = i; - } else { - this.errors = this.errors.slice(0, startErrorCount); - return this.createError(ErrorCodes.ONE_OF_MULTIPLE, {index1: validIndex, index2: i}, "", "/oneOf", null, data, schema); - } - if (this.trackUnknownProperties) { - for (var knownKey in this.knownPropertyPaths) { - oldKnownPropertyPaths[knownKey] = true; - delete oldUnknownPropertyPaths[knownKey]; - } - for (var unknownKey in this.unknownPropertyPaths) { - if (!oldKnownPropertyPaths[unknownKey]) { - oldUnknownPropertyPaths[unknownKey] = true; - } - } - } - } else if (error) { - errors.push(error); - } - } - if (this.trackUnknownProperties) { - this.unknownPropertyPaths = oldUnknownPropertyPaths; - this.knownPropertyPaths = oldKnownPropertyPaths; - } - if (validIndex === null) { - errors = errors.concat(this.errors.slice(startErrorCount)); - this.errors = this.errors.slice(0, startErrorCount); - return this.createError(ErrorCodes.ONE_OF_MISSING, {}, "", "/oneOf", errors, data, schema); - } else { - this.errors = this.errors.slice(0, startErrorCount); - } - return null; -}; - -ValidatorContext.prototype.validateNot = function validateNot(data, schema, dataPointerPath) { - if (schema.not === undefined) { - return null; - } - var oldErrorCount = this.errors.length; - var oldUnknownPropertyPaths, oldKnownPropertyPaths; - if (this.trackUnknownProperties) { - oldUnknownPropertyPaths = this.unknownPropertyPaths; - oldKnownPropertyPaths = this.knownPropertyPaths; - this.unknownPropertyPaths = {}; - this.knownPropertyPaths = {}; - } - var error = this.validateAll(data, schema.not, null, null, dataPointerPath); - var notErrors = this.errors.slice(oldErrorCount); - this.errors = this.errors.slice(0, oldErrorCount); - if (this.trackUnknownProperties) { - this.unknownPropertyPaths = oldUnknownPropertyPaths; - this.knownPropertyPaths = oldKnownPropertyPaths; - } - if (error === null && notErrors.length === 0) { - return this.createError(ErrorCodes.NOT_PASSED, {}, "", "/not", null, data, schema); - } - return null; -}; - -ValidatorContext.prototype.validateHypermedia = function validateCombinations(data, schema, dataPointerPath) { - if (!schema.links) { - return null; - } - var error; - for (var i = 0; i < schema.links.length; i++) { - var ldo = schema.links[i]; - if (ldo.rel === "describedby") { - var template = new UriTemplate(ldo.href); - var allPresent = true; - for (var j = 0; j < template.varNames.length; j++) { - if (!(template.varNames[j] in data)) { - allPresent = false; - break; - } - } - if (allPresent) { - var schemaUrl = template.fillFromObject(data); - var subSchema = {"$ref": schemaUrl}; - if (error = this.validateAll(data, subSchema, [], ["links", i], dataPointerPath)) { - return error; - } - } - } - } -}; - -// parseURI() and resolveUrl() are from https://gist.github.com/1088850 -// - released as public domain by author ("Yaffle") - see comments on gist - -function parseURI(url) { - var m = String(url).replace(/^\s+|\s+$/g, '').match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/); - // authority = '//' + user + ':' + pass '@' + hostname + ':' port - return (m ? { - href : m[0] || '', - protocol : m[1] || '', - authority: m[2] || '', - host : m[3] || '', - hostname : m[4] || '', - port : m[5] || '', - pathname : m[6] || '', - search : m[7] || '', - hash : m[8] || '' - } : null); -} - -function resolveUrl(base, href) {// RFC 3986 - - function removeDotSegments(input) { - var output = []; - input.replace(/^(\.\.?(\/|$))+/, '') - .replace(/\/(\.(\/|$))+/g, '/') - .replace(/\/\.\.$/, '/../') - .replace(/\/?[^\/]*/g, function (p) { - if (p === '/..') { - output.pop(); - } else { - output.push(p); - } - }); - return output.join('').replace(/^\//, input.charAt(0) === '/' ? '/' : ''); - } - - href = parseURI(href || ''); - base = parseURI(base || ''); - - return !href || !base ? null : (href.protocol || base.protocol) + - (href.protocol || href.authority ? href.authority : base.authority) + - removeDotSegments(href.protocol || href.authority || href.pathname.charAt(0) === '/' ? href.pathname : (href.pathname ? ((base.authority && !base.pathname ? '/' : '') + base.pathname.slice(0, base.pathname.lastIndexOf('/') + 1) + href.pathname) : base.pathname)) + - (href.protocol || href.authority || href.pathname ? href.search : (href.search || base.search)) + - href.hash; -} - -function getDocumentUri(uri) { - return uri.split('#')[0]; -} -function normSchema(schema, baseUri) { - if (schema && typeof schema === "object") { - if (baseUri === undefined) { - baseUri = schema.id; - } else if (typeof schema.id === "string") { - baseUri = resolveUrl(baseUri, schema.id); - schema.id = baseUri; - } - if (Array.isArray(schema)) { - for (var i = 0; i < schema.length; i++) { - normSchema(schema[i], baseUri); - } - } else { - if (typeof schema['$ref'] === "string") { - schema['$ref'] = resolveUrl(baseUri, schema['$ref']); - } - for (var key in schema) { - if (key !== "enum") { - normSchema(schema[key], baseUri); - } - } - } - } -} - -function defaultErrorReporter(language) { - language = language || 'en'; - - var errorMessages = languages[language]; - - return function (error) { - var messageTemplate = errorMessages[error.code] || ErrorMessagesDefault[error.code]; - if (typeof messageTemplate !== 'string') { - return "Unknown error code " + error.code + ": " + JSON.stringify(error.messageParams); - } - var messageParams = error.params; - // Adapted from Crockford's supplant() - return messageTemplate.replace(/\{([^{}]*)\}/g, function (whole, varName) { - var subValue = messageParams[varName]; - return typeof subValue === 'string' || typeof subValue === 'number' ? subValue : whole; - }); - }; -} - -var ErrorCodes = { - INVALID_TYPE: 0, - ENUM_MISMATCH: 1, - ANY_OF_MISSING: 10, - ONE_OF_MISSING: 11, - ONE_OF_MULTIPLE: 12, - NOT_PASSED: 13, - // Numeric errors - NUMBER_MULTIPLE_OF: 100, - NUMBER_MINIMUM: 101, - NUMBER_MINIMUM_EXCLUSIVE: 102, - NUMBER_MAXIMUM: 103, - NUMBER_MAXIMUM_EXCLUSIVE: 104, - NUMBER_NOT_A_NUMBER: 105, - // String errors - STRING_LENGTH_SHORT: 200, - STRING_LENGTH_LONG: 201, - STRING_PATTERN: 202, - // Object errors - OBJECT_PROPERTIES_MINIMUM: 300, - OBJECT_PROPERTIES_MAXIMUM: 301, - OBJECT_REQUIRED: 302, - OBJECT_ADDITIONAL_PROPERTIES: 303, - OBJECT_DEPENDENCY_KEY: 304, - // Array errors - ARRAY_LENGTH_SHORT: 400, - ARRAY_LENGTH_LONG: 401, - ARRAY_UNIQUE: 402, - ARRAY_ADDITIONAL_ITEMS: 403, - // Custom/user-defined errors - FORMAT_CUSTOM: 500, - KEYWORD_CUSTOM: 501, - // Schema structure - CIRCULAR_REFERENCE: 600, - // Non-standard validation options - UNKNOWN_PROPERTY: 1000 -}; -var ErrorCodeLookup = {}; -for (var key in ErrorCodes) { - ErrorCodeLookup[ErrorCodes[key]] = key; -} -var ErrorMessagesDefault = { - INVALID_TYPE: "Invalid type: {type} (expected {expected})", - ENUM_MISMATCH: "No enum match for: {value}", - ANY_OF_MISSING: "Data does not match any schemas from \"anyOf\"", - ONE_OF_MISSING: "Data does not match any schemas from \"oneOf\"", - ONE_OF_MULTIPLE: "Data is valid against more than one schema from \"oneOf\": indices {index1} and {index2}", - NOT_PASSED: "Data matches schema from \"not\"", - // Numeric errors - NUMBER_MULTIPLE_OF: "Value {value} is not a multiple of {multipleOf}", - NUMBER_MINIMUM: "Value {value} is less than minimum {minimum}", - NUMBER_MINIMUM_EXCLUSIVE: "Value {value} is equal to exclusive minimum {minimum}", - NUMBER_MAXIMUM: "Value {value} is greater than maximum {maximum}", - NUMBER_MAXIMUM_EXCLUSIVE: "Value {value} is equal to exclusive maximum {maximum}", - NUMBER_NOT_A_NUMBER: "Value {value} is not a valid number", - // String errors - STRING_LENGTH_SHORT: "String is too short ({length} chars), minimum {minimum}", - STRING_LENGTH_LONG: "String is too long ({length} chars), maximum {maximum}", - STRING_PATTERN: "String does not match pattern: {pattern}", - // Object errors - OBJECT_PROPERTIES_MINIMUM: "Too few properties defined ({propertyCount}), minimum {minimum}", - OBJECT_PROPERTIES_MAXIMUM: "Too many properties defined ({propertyCount}), maximum {maximum}", - OBJECT_REQUIRED: "Missing required property: {key}", - OBJECT_ADDITIONAL_PROPERTIES: "Additional properties not allowed", - OBJECT_DEPENDENCY_KEY: "Dependency failed - key must exist: {missing} (due to key: {key})", - // Array errors - ARRAY_LENGTH_SHORT: "Array is too short ({length}), minimum {minimum}", - ARRAY_LENGTH_LONG: "Array is too long ({length}), maximum {maximum}", - ARRAY_UNIQUE: "Array items are not unique (indices {match1} and {match2})", - ARRAY_ADDITIONAL_ITEMS: "Additional items not allowed", - // Format errors - FORMAT_CUSTOM: "Format validation failed ({message})", - KEYWORD_CUSTOM: "Keyword failed: {key} ({message})", - // Schema structure - CIRCULAR_REFERENCE: "Circular $refs: {urls}", - // Non-standard validation options - UNKNOWN_PROPERTY: "Unknown property (not in schema)" -}; - -function ValidationError(code, params, dataPath, schemaPath, subErrors) { - Error.call(this); - if (code === undefined) { - throw new Error ("No error code supplied: " + schemaPath); - } - this.message = ''; - this.params = params; - this.code = code; - this.dataPath = dataPath || ""; - this.schemaPath = schemaPath || ""; - this.subErrors = subErrors || null; - - var err = new Error(this.message); - this.stack = err.stack || err.stacktrace; - if (!this.stack) { - try { - throw err; - } - catch(err) { - this.stack = err.stack || err.stacktrace; - } - } -} -ValidationError.prototype = Object.create(Error.prototype); -ValidationError.prototype.constructor = ValidationError; -ValidationError.prototype.name = 'ValidationError'; - -ValidationError.prototype.prefixWith = function (dataPrefix, schemaPrefix) { - if (dataPrefix !== null) { - dataPrefix = dataPrefix.replace(/~/g, "~0").replace(/\//g, "~1"); - this.dataPath = "/" + dataPrefix + this.dataPath; - } - if (schemaPrefix !== null) { - schemaPrefix = schemaPrefix.replace(/~/g, "~0").replace(/\//g, "~1"); - this.schemaPath = "/" + schemaPrefix + this.schemaPath; - } - if (this.subErrors !== null) { - for (var i = 0; i < this.subErrors.length; i++) { - this.subErrors[i].prefixWith(dataPrefix, schemaPrefix); - } - } - return this; -}; - -function isTrustedUrl(baseUrl, testUrl) { - if(testUrl.substring(0, baseUrl.length) === baseUrl){ - var remainder = testUrl.substring(baseUrl.length); - if ((testUrl.length > 0 && testUrl.charAt(baseUrl.length - 1) === "/") - || remainder.charAt(0) === "#" - || remainder.charAt(0) === "?") { - return true; - } - } - return false; -} - -var languages = {}; -function createApi(language) { - var globalContext = new ValidatorContext(); - var currentLanguage; - var customErrorReporter; - var api = { - setErrorReporter: function (reporter) { - if (typeof reporter === 'string') { - return this.language(reporter); - } - customErrorReporter = reporter; - return true; - }, - addFormat: function () { - globalContext.addFormat.apply(globalContext, arguments); - }, - language: function (code) { - if (!code) { - return currentLanguage; - } - if (!languages[code]) { - code = code.split('-')[0]; // fall back to base language - } - if (languages[code]) { - currentLanguage = code; - return code; // so you can tell if fall-back has happened - } - return false; - }, - addLanguage: function (code, messageMap) { - var key; - for (key in ErrorCodes) { - if (messageMap[key] && !messageMap[ErrorCodes[key]]) { - messageMap[ErrorCodes[key]] = messageMap[key]; - } - } - var rootCode = code.split('-')[0]; - if (!languages[rootCode]) { // use for base language if not yet defined - languages[code] = messageMap; - languages[rootCode] = messageMap; - } else { - languages[code] = Object.create(languages[rootCode]); - for (key in messageMap) { - if (typeof languages[rootCode][key] === 'undefined') { - languages[rootCode][key] = messageMap[key]; - } - languages[code][key] = messageMap[key]; - } - } - return this; - }, - freshApi: function (language) { - var result = createApi(); - if (language) { - result.language(language); - } - return result; - }, - validate: function (data, schema, checkRecursive, banUnknownProperties) { - var def = defaultErrorReporter(currentLanguage); - var errorReporter = customErrorReporter ? function (error, data, schema) { - return customErrorReporter(error, data, schema) || def(error, data, schema); - } : def; - var context = new ValidatorContext(globalContext, false, errorReporter, checkRecursive, banUnknownProperties); - if (typeof schema === "string") { - schema = {"$ref": schema}; - } - context.addSchema("", schema); - var error = context.validateAll(data, schema, null, null, ""); - if (!error && banUnknownProperties) { - error = context.banUnknownProperties(data, schema); - } - this.error = error; - this.missing = context.missing; - this.valid = (error === null); - return this.valid; - }, - validateResult: function () { - var result = {}; - this.validate.apply(result, arguments); - return result; - }, - validateMultiple: function (data, schema, checkRecursive, banUnknownProperties) { - var def = defaultErrorReporter(currentLanguage); - var errorReporter = customErrorReporter ? function (error, data, schema) { - return customErrorReporter(error, data, schema) || def(error, data, schema); - } : def; - var context = new ValidatorContext(globalContext, true, errorReporter, checkRecursive, banUnknownProperties); - if (typeof schema === "string") { - schema = {"$ref": schema}; - } - context.addSchema("", schema); - context.validateAll(data, schema, null, null, ""); - if (banUnknownProperties) { - context.banUnknownProperties(data, schema); - } - var result = {}; - result.errors = context.errors; - result.missing = context.missing; - result.valid = (result.errors.length === 0); - return result; - }, - addSchema: function () { - return globalContext.addSchema.apply(globalContext, arguments); - }, - getSchema: function () { - return globalContext.getSchema.apply(globalContext, arguments); - }, - getSchemaMap: function () { - return globalContext.getSchemaMap.apply(globalContext, arguments); - }, - getSchemaUris: function () { - return globalContext.getSchemaUris.apply(globalContext, arguments); - }, - getMissingUris: function () { - return globalContext.getMissingUris.apply(globalContext, arguments); - }, - dropSchemas: function () { - globalContext.dropSchemas.apply(globalContext, arguments); - }, - defineKeyword: function () { - globalContext.defineKeyword.apply(globalContext, arguments); - }, - defineError: function (codeName, codeNumber, defaultMessage) { - if (typeof codeName !== 'string' || !/^[A-Z]+(_[A-Z]+)*$/.test(codeName)) { - throw new Error('Code name must be a string in UPPER_CASE_WITH_UNDERSCORES'); - } - if (typeof codeNumber !== 'number' || codeNumber%1 !== 0 || codeNumber < 10000) { - throw new Error('Code number must be an integer > 10000'); - } - if (typeof ErrorCodes[codeName] !== 'undefined') { - throw new Error('Error already defined: ' + codeName + ' as ' + ErrorCodes[codeName]); - } - if (typeof ErrorCodeLookup[codeNumber] !== 'undefined') { - throw new Error('Error code already used: ' + ErrorCodeLookup[codeNumber] + ' as ' + codeNumber); - } - ErrorCodes[codeName] = codeNumber; - ErrorCodeLookup[codeNumber] = codeName; - ErrorMessagesDefault[codeName] = ErrorMessagesDefault[codeNumber] = defaultMessage; - for (var langCode in languages) { - var language = languages[langCode]; - if (language[codeName]) { - language[codeNumber] = language[codeNumber] || language[codeName]; - } - } - }, - reset: function () { - globalContext.reset(); - this.error = null; - this.missing = []; - this.valid = true; - }, - missing: [], - error: null, - valid: true, - normSchema: normSchema, - resolveUrl: resolveUrl, - getDocumentUri: getDocumentUri, - errorCodes: ErrorCodes - }; - api.language(language || 'en'); - return api; -} - -var tv4 = createApi(); -tv4.addLanguage('en-gb', ErrorMessagesDefault); - -//legacy property -tv4.tv4 = tv4; - -return tv4; // used by _header.js to globalise. - -})); \ No newline at end of file diff --git a/node_modules/type-check/package.json b/node_modules/type-check/package.json index 31f9070..8c0b021 100644 --- a/node_modules/type-check/package.json +++ b/node_modules/type-check/package.json @@ -1,88 +1,26 @@ { - "_args": [ - [ - "type-check@~0.3.1", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\optionator" - ] - ], - "_from": "type-check@>=0.3.1 <0.4.0", - "_id": "type-check@0.3.2", - "_inCache": true, - "_installable": true, - "_location": "/type-check", - "_nodeVersion": "4.2.4", - "_npmUser": { - "email": "z@georgezahariev.com", - "name": "gkz" - }, - "_npmVersion": "2.14.12", - "_phantomChildren": {}, - "_requested": { - "name": "type-check", - "raw": "type-check@~0.3.1", - "rawSpec": "~0.3.1", - "scope": null, - "spec": ">=0.3.1 <0.4.0", - "type": "range" - }, - "_requiredBy": [ - "/levn", - "/optionator" - ], - "_resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "_shasum": "5884cab512cf1d355e3fb784f30804b2b520db72", - "_shrinkwrap": null, - "_spec": "type-check@~0.3.1", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\optionator", - "author": { - "email": "z@georgezahariev.com", - "name": "George Zahariev" - }, - "bugs": { - "url": "https://github.com/gkz/type-check/issues" - }, - "dependencies": { - "prelude-ls": "~1.1.2" - }, + "name": "type-check", + "version": "0.3.2", + "author": "George Zahariev ", "description": "type-check allows you to check the types of JavaScript values at runtime with a Haskell like type syntax.", - "devDependencies": { - "browserify": "~12.0.1", - "istanbul": "~0.4.1", - "livescript": "~1.4.0", - "mocha": "~2.3.4" - }, - "directories": {}, - "dist": { - "shasum": "5884cab512cf1d355e3fb784f30804b2b520db72", - "tarball": "http://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz" - }, - "engines": { - "node": ">= 0.8.0" - }, - "files": [ - "LICENSE", - "README.md", - "lib" - ], - "gitHead": "0ab04e7a660485d0cc3aa87e95f2f9a6464cf8e6", "homepage": "https://github.com/gkz/type-check", "keywords": [ + "type", "check", "checking", - "library", - "type" + "library" ], - "license": "MIT", - "main": "./lib/", - "maintainers": [ - { - "name": "gkz", - "email": "z@georgezahariev.com" - } + "files": [ + "lib", + "README.md", + "LICENSE" ], - "name": "type-check", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", + "main": "./lib/", + "bugs": "https://github.com/gkz/type-check/issues", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + }, "repository": { "type": "git", "url": "git://github.com/gkz/type-check.git" @@ -90,5 +28,13 @@ "scripts": { "test": "make test" }, - "version": "0.3.2" + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "devDependencies": { + "livescript": "~1.4.0", + "mocha": "~2.3.4", + "istanbul": "~0.4.1", + "browserify": "~12.0.1" + } } diff --git a/node_modules/typedarray/package.json b/node_modules/typedarray/package.json index 323d2f2..a7854a0 100644 --- a/node_modules/typedarray/package.json +++ b/node_modules/typedarray/package.json @@ -1,54 +1,17 @@ { - "_args": [ - [ - "typedarray@~0.0.5", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\concat-stream" - ] - ], - "_from": "typedarray@>=0.0.5 <0.1.0", - "_id": "typedarray@0.0.6", - "_inCache": true, - "_installable": true, - "_location": "/typedarray", - "_npmUser": { - "email": "mail@substack.net", - "name": "substack" - }, - "_npmVersion": "1.4.3", - "_phantomChildren": {}, - "_requested": { - "name": "typedarray", - "raw": "typedarray@~0.0.5", - "rawSpec": "~0.0.5", - "scope": null, - "spec": ">=0.0.5 <0.1.0", - "type": "range" - }, - "_requiredBy": [ - "/concat-stream" - ], - "_resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "_shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777", - "_shrinkwrap": null, - "_spec": "typedarray@~0.0.5", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\concat-stream", - "author": { - "email": "mail@substack.net", - "name": "James Halliday", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/typedarray/issues" - }, - "dependencies": {}, + "name": "typedarray", + "version": "0.0.6", "description": "TypedArray polyfill for old browsers", + "main": "index.js", "devDependencies": { "tape": "~2.3.2" }, - "directories": {}, - "dist": { - "shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777", - "tarball": "http://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" + "scripts": { + "test": "tape test/*.js test/server/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/typedarray.git" }, "homepage": "https://github.com/substack/typedarray", "keywords": [ @@ -56,50 +19,37 @@ "DataView", "Float32Array", "Float64Array", + "Int8Array", "Int16Array", "Int32Array", - "Int8Array", - "Uint16Array", - "Uint32Array", "Uint8Array", "Uint8ClampedArray", + "Uint16Array", + "Uint32Array", + "typed", "array", - "polyfill", - "typed" + "polyfill" ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "name": "typedarray", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/substack/typedarray.git" - }, - "scripts": { - "test": "tape test/*.js test/server/*.js" + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" }, + "license": "MIT", "testling": { + "files": "test/*.js", "browsers": [ - "android-browser/4.2..latest", - "chrome/22..latest", - "chrome/canary", + "ie/6..latest", "firefox/16..latest", "firefox/nightly", - "ie/6..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", + "chrome/22..latest", + "chrome/canary", "opera/12..latest", "opera/next", - "safari/5.1..latest" - ], - "files": "test/*.js" - }, - "version": "0.0.6" + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + } } diff --git a/node_modules/user-home/package.json b/node_modules/user-home/package.json index 9f89d5b..5eeb607 100644 --- a/node_modules/user-home/package.json +++ b/node_modules/user-home/package.json @@ -1,98 +1,43 @@ { - "_args": [ - [ - "user-home@^2.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint" - ] - ], - "_from": "user-home@>=2.0.0 <3.0.0", - "_id": "user-home@2.0.0", - "_inCache": true, - "_installable": true, - "_location": "/user-home", - "_nodeVersion": "0.12.4", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.10.1", - "_phantomChildren": {}, - "_requested": { - "name": "user-home", - "raw": "user-home@^2.0.0", - "rawSpec": "^2.0.0", - "scope": null, - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", - "_shasum": "9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f", - "_shrinkwrap": null, - "_spec": "user-home@^2.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\eslint", + "name": "user-home", + "version": "2.0.0", + "description": "Get the path to the user home directory", + "license": "MIT", + "repository": "sindresorhus/user-home", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "bugs": { - "url": "https://github.com/sindresorhus/user-home/issues" - }, - "dependencies": { - "os-homedir": "^1.0.0" - }, - "description": "Get the path to the user home directory", - "devDependencies": { - "ava": "0.0.4", - "path-exists": "^1.0.0" - }, - "directories": {}, - "dist": { - "shasum": "9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f", - "tarball": "http://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz" - }, "engines": { "node": ">=0.10.0" }, + "scripts": { + "test": "node test.js" + }, "files": [ "index.js" ], - "gitHead": "23e6d1e2dd553b599c787348f82bd2463225cc80", - "homepage": "https://github.com/sindresorhus/user-home", "keywords": [ - "dir", - "directory", - "env", - "environment", - "folder", + "user", "home", "homedir", "os-homedir", + "dir", + "directory", + "folder", "path", - "user", - "userprofile", + "env", + "vars", + "environment", "variables", - "vars" + "userprofile" ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "user-home", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/user-home.git" - }, - "scripts": { - "test": "node test.js" + "dependencies": { + "os-homedir": "^1.0.0" }, - "version": "2.0.0" + "devDependencies": { + "ava": "0.0.4", + "path-exists": "^1.0.0" + } } diff --git a/node_modules/util-deprecate/package.json b/node_modules/util-deprecate/package.json index 9650a9a..2e79f89 100644 --- a/node_modules/util-deprecate/package.json +++ b/node_modules/util-deprecate/package.json @@ -1,81 +1,27 @@ { - "_args": [ - [ - "util-deprecate@~1.0.1", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\readable-stream" - ] - ], - "_from": "util-deprecate@>=1.0.1 <1.1.0", - "_id": "util-deprecate@1.0.2", - "_inCache": true, - "_installable": true, - "_location": "/util-deprecate", - "_nodeVersion": "4.1.2", - "_npmUser": { - "email": "nathan@tootallnate.net", - "name": "tootallnate" - }, - "_npmVersion": "2.14.4", - "_phantomChildren": {}, - "_requested": { - "name": "util-deprecate", - "raw": "util-deprecate@~1.0.1", - "rawSpec": "~1.0.1", - "scope": null, - "spec": ">=1.0.1 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "_shrinkwrap": null, - "_spec": "util-deprecate@~1.0.1", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\readable-stream", - "author": { - "email": "nathan@tootallnate.net", - "name": "Nathan Rajlich", - "url": "http://n8.io/" - }, + "name": "util-deprecate", + "version": "1.0.2", + "description": "The Node.js `util.deprecate()` function with browser support", + "main": "node.js", "browser": "browser.js", - "bugs": { - "url": "https://github.com/TooTallNate/util-deprecate/issues" + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" }, - "dependencies": {}, - "description": "The Node.js `util.deprecate()` function with browser support", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "tarball": "http://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/util-deprecate.git" }, - "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4", - "homepage": "https://github.com/TooTallNate/util-deprecate", "keywords": [ - "browser", - "browserify", + "util", "deprecate", - "node", - "util" + "browserify", + "browser", + "node" ], + "author": "Nathan Rajlich (http://n8.io/)", "license": "MIT", - "main": "node.js", - "maintainers": [ - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - } - ], - "name": "util-deprecate", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/util-deprecate.git" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "bugs": { + "url": "https://github.com/TooTallNate/util-deprecate/issues" }, - "version": "1.0.2" + "homepage": "https://github.com/TooTallNate/util-deprecate" } diff --git a/node_modules/util/package.json b/node_modules/util/package.json index 088ec4f..738d0a8 100644 --- a/node_modules/util/package.json +++ b/node_modules/util/package.json @@ -1,80 +1,31 @@ { - "_args": [ - [ - "util@^0.10.3", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\sass-lint" - ] - ], - "_from": "util@>=0.10.3 <0.11.0", - "_id": "util@0.10.3", - "_inCache": true, - "_installable": true, - "_location": "/util", - "_npmUser": { - "email": "shtylman@gmail.com", - "name": "shtylman" - }, - "_npmVersion": "1.3.24", - "_phantomChildren": {}, - "_requested": { - "name": "util", - "raw": "util@^0.10.3", - "rawSpec": "^0.10.3", - "scope": null, - "spec": ">=0.10.3 <0.11.0", - "type": "range" - }, - "_requiredBy": [ - "/sass-lint" - ], - "_resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "_shasum": "7afb1afe50805246489e3db7fe0ed379336ac0f9", - "_shrinkwrap": null, - "_spec": "util@^0.10.3", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\sass-lint", "author": { "name": "Joyent", "url": "http://www.joyent.com" }, - "browser": { - "./support/isBuffer.js": "./support/isBufferBrowser.js" - }, - "bugs": { - "url": "https://github.com/defunctzombie/node-util/issues" - }, - "dependencies": { - "inherits": "2.0.1" - }, + "name": "util", "description": "Node.JS util module", - "devDependencies": { - "zuul": "~1.0.9" - }, - "directories": {}, - "dist": { - "shasum": "7afb1afe50805246489e3db7fe0ed379336ac0f9", - "tarball": "http://registry.npmjs.org/util/-/util-0.10.3.tgz" - }, - "homepage": "https://github.com/defunctzombie/node-util", "keywords": [ "util" ], - "license": "MIT", - "main": "./util.js", - "maintainers": [ - { - "name": "shtylman", - "email": "shtylman@gmail.com" - } - ], - "name": "util", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", + "version": "0.10.3", + "homepage": "https://github.com/defunctzombie/node-util", "repository": { "type": "git", - "url": "git://github.com/defunctzombie/node-util.git" + "url": "git://github.com/defunctzombie/node-util" }, + "main": "./util.js", "scripts": { "test": "node test/node/*.js && zuul test/browser/*.js" }, - "version": "0.10.3" + "dependencies": { + "inherits": "2.0.1" + }, + "license": "MIT", + "devDependencies": { + "zuul": "~1.0.9" + }, + "browser": { + "./support/isBuffer.js": "./support/isBufferBrowser.js" + } } diff --git a/node_modules/wordwrap/package.json b/node_modules/wordwrap/package.json index 8261d32..5339ac0 100644 --- a/node_modules/wordwrap/package.json +++ b/node_modules/wordwrap/package.json @@ -1,86 +1,34 @@ { - "_args": [ - [ - "wordwrap@~1.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\optionator" - ] - ], - "_from": "wordwrap@>=1.0.0 <1.1.0", - "_id": "wordwrap@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/wordwrap", - "_nodeVersion": "2.0.0", - "_npmUser": { - "email": "substack@gmail.com", - "name": "substack" - }, - "_npmVersion": "2.9.0", - "_phantomChildren": {}, - "_requested": { - "name": "wordwrap", - "raw": "wordwrap@~1.0.0", - "rawSpec": "~1.0.0", - "scope": null, - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/optionator" - ], - "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "_shasum": "27584810891456a4171c8d0226441ade90cbcaeb", - "_shrinkwrap": null, - "_spec": "wordwrap@~1.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\optionator", - "author": { - "email": "mail@substack.net", - "name": "James Halliday", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/node-wordwrap/issues" - }, - "dependencies": {}, + "name": "wordwrap", "description": "Wrap those words. Show them at what columns to start and stop.", - "devDependencies": { - "tape": "^4.0.0" - }, - "directories": { - "example": "example", - "lib": ".", - "test": "test" - }, - "dist": { - "shasum": "27584810891456a4171c8d0226441ade90cbcaeb", - "tarball": "http://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" + "version": "1.0.0", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-wordwrap.git" }, - "gitHead": "9f02667e901f2f10d87c33f7093fcf94788ab2f8", - "homepage": "https://github.com/substack/node-wordwrap#readme", + "main": "./index.js", "keywords": [ - "column", - "format", - "rule", "word", - "wrap" - ], - "license": "MIT", - "main": "./index.js", - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } + "wrap", + "rule", + "format", + "column" ], - "name": "wordwrap", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-wordwrap.git" + "directories": { + "lib": ".", + "example": "example", + "test": "test" }, "scripts": { "test": "expresso" }, - "version": "1.0.0" + "devDependencies": { + "tape": "^4.0.0" + }, + "license": "MIT", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + } } diff --git a/node_modules/wrappy/package.json b/node_modules/wrappy/package.json index ea3bd02..1307520 100644 --- a/node_modules/wrappy/package.json +++ b/node_modules/wrappy/package.json @@ -1,78 +1,29 @@ { - "_args": [ - [ - "wrappy@1", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\inflight" - ] - ], - "_from": "wrappy@>=1.0.0 <2.0.0", - "_id": "wrappy@1.0.1", - "_inCache": true, - "_installable": true, - "_location": "/wrappy", - "_nodeVersion": "0.10.31", - "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" - }, - "_npmVersion": "2.0.0", - "_phantomChildren": {}, - "_requested": { - "name": "wrappy", - "raw": "wrappy@1", - "rawSpec": "1", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/inflight", - "/once" + "name": "wrappy", + "version": "1.0.2", + "description": "Callback wrapping utility", + "main": "wrappy.js", + "files": [ + "wrappy.js" ], - "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz", - "_shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", - "_shrinkwrap": null, - "_spec": "wrappy@1", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\inflight", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/npm/wrappy/issues" + "directories": { + "test": "test" }, "dependencies": {}, - "description": "Callback wrapping utility", "devDependencies": { - "tap": "^0.4.12" + "tap": "^2.3.1" }, - "directories": { - "test": "test" - }, - "dist": { - "shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", - "tarball": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + "scripts": { + "test": "tap --coverage test/*.js" }, - "gitHead": "006a8cbac6b99988315834c207896eed71fd069a", - "homepage": "https://github.com/npm/wrappy", - "license": "ISC", - "main": "wrappy.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "wrappy", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", "repository": { "type": "git", - "url": "git+https://github.com/npm/wrappy.git" + "url": "https://github.com/npm/wrappy" }, - "scripts": { - "test": "tap test/*.js" + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/wrappy/issues" }, - "version": "1.0.1" + "homepage": "https://github.com/npm/wrappy" } diff --git a/node_modules/wrappy/test/basic.js b/node_modules/wrappy/test/basic.js deleted file mode 100644 index 5ed0fcd..0000000 --- a/node_modules/wrappy/test/basic.js +++ /dev/null @@ -1,51 +0,0 @@ -var test = require('tap').test -var wrappy = require('../wrappy.js') - -test('basic', function (t) { - function onceifier (cb) { - var called = false - return function () { - if (called) return - called = true - return cb.apply(this, arguments) - } - } - onceifier.iAmOnce = {} - var once = wrappy(onceifier) - t.equal(once.iAmOnce, onceifier.iAmOnce) - - var called = 0 - function boo () { - t.equal(called, 0) - called++ - } - // has some rando property - boo.iAmBoo = true - - var onlyPrintOnce = once(boo) - - onlyPrintOnce() // prints 'boo' - onlyPrintOnce() // does nothing - t.equal(called, 1) - - // random property is retained! - t.equal(onlyPrintOnce.iAmBoo, true) - - var logs = [] - var logwrap = wrappy(function (msg, cb) { - logs.push(msg + ' wrapping cb') - return function () { - logs.push(msg + ' before cb') - var ret = cb.apply(this, arguments) - logs.push(msg + ' after cb') - } - }) - - var c = logwrap('foo', function () { - t.same(logs, [ 'foo wrapping cb', 'foo before cb' ]) - }) - c() - t.same(logs, [ 'foo wrapping cb', 'foo before cb', 'foo after cb' ]) - - t.end() -}) diff --git a/node_modules/write/node_modules/.bin/mkdirp b/node_modules/write/node_modules/.bin/mkdirp new file mode 100644 index 0000000..1c12a6c --- /dev/null +++ b/node_modules/write/node_modules/.bin/mkdirp @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../../../mkdirp/bin/cmd.js" "$@" + ret=$? +else + node "$basedir/../../../mkdirp/bin/cmd.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/write/node_modules/.bin/mkdirp.cmd b/node_modules/write/node_modules/.bin/mkdirp.cmd new file mode 100644 index 0000000..ecac552 --- /dev/null +++ b/node_modules/write/node_modules/.bin/mkdirp.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\..\..\mkdirp\bin\cmd.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\..\..\mkdirp\bin\cmd.js" %* +) \ No newline at end of file diff --git a/node_modules/write/package.json b/node_modules/write/package.json index 2c551e6..f6ad3c3 100644 --- a/node_modules/write/package.json +++ b/node_modules/write/package.json @@ -1,68 +1,33 @@ { - "_args": [ - [ - "write@^0.2.1", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\flat-cache" - ] - ], - "_from": "write@>=0.2.1 <0.3.0", - "_id": "write@0.2.1", - "_inCache": true, - "_installable": true, - "_location": "/write", - "_nodeVersion": "0.12.4", - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "2.10.1", - "_phantomChildren": {}, - "_requested": { - "name": "write", - "raw": "write@^0.2.1", - "rawSpec": "^0.2.1", - "scope": null, - "spec": ">=0.2.1 <0.3.0", - "type": "range" + "name": "write", + "description": "Write files to disk, creating intermediate directories if they don't exist.", + "version": "0.2.1", + "homepage": "https://github.com/jonschlinkert/write", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/write", + "bugs": { + "url": "https://github.com/jonschlinkert/write/issues" }, - "_requiredBy": [ - "/flat-cache" + "license": "MIT", + "files": [ + "index.js" ], - "_resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "_shasum": "5fc03828e264cea3fe91455476f7a3c566cb0757", - "_shrinkwrap": null, - "_spec": "write@^0.2.1", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\flat-cache", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" + "main": "index.js", + "engines": { + "node": ">=0.10.0" }, - "bugs": { - "url": "https://github.com/jonschlinkert/write/issues" + "scripts": { + "test": "mocha" }, "dependencies": { "mkdirp": "^0.5.1" }, - "description": "Write files to disk, creating intermediate directories if they don't exist.", "devDependencies": { "async": "^1.4.0", "delete": "^0.2.1", "mocha": "^2.2.5", "should": "^7.0.2" }, - "directories": {}, - "dist": { - "shasum": "5fc03828e264cea3fe91455476f7a3c566cb0757", - "tarball": "http://registry.npmjs.org/write/-/write-0.2.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "4fde911228a1d244d4439292d6850175c8195730", - "homepage": "https://github.com/jonschlinkert/write", "keywords": [ "file", "filepath", @@ -74,24 +39,5 @@ "fs.writeFileSync", "path", "write" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - } - ], - "name": "write", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/write.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "0.2.1" + ] } diff --git a/node_modules/xregexp/README.md b/node_modules/xregexp/README.md deleted file mode 100644 index 3ea582c..0000000 --- a/node_modules/xregexp/README.md +++ /dev/null @@ -1,243 +0,0 @@ -[XRegExp](http://xregexp.com/) 3.1.0 -==================================== - -XRegExp provides augmented (and extensible) JavaScript regular expressions. You get new modern syntax and flags beyond what browsers support natively. XRegExp is also a regex utility belt with tools to make your client-side grepping and parsing easier, while freeing you from worrying about pesky aspects of JavaScript regexes like cross-browser inconsistencies and manually manipulating `lastIndex`. - -XRegExp supports all native ES6 regular expression syntax. It supports Internet Explorer 5.5+, Firefox 1.5+, Chrome, Safari 3+, and Opera 11+. You can also use it with Node.js, or as a RequireJS module. The base library is about 4.25 KB, minified and gzipped. - -## Performance - -XRegExp regexes compile to native `RegExp` objects, and therefore perform just as fast as native regular expressions. There is a tiny extra cost when compiling a pattern for the first time. - -## Usage examples - -```js -// Using named capture and flag x (free-spacing and line comments) -var date = XRegExp('(? [0-9]{4} ) -? # year \n\ - (? [0-9]{2} ) -? # month \n\ - (? [0-9]{2} ) # day ', 'x'); - -// XRegExp.exec gives you named backreferences on the match result -var match = XRegExp.exec('2015-02-22', date); -match.year; // -> '2015' - -// It also includes optional pos and sticky arguments -var pos = 3, result = []; -while (match = XRegExp.exec('<1><2><3><4>5<6>', /<(\d+)>/, pos, 'sticky')) { - result.push(match[1]); - pos = match.index + match[0].length; -} // result -> ['2', '3', '4'] - -// XRegExp.replace allows named backreferences in replacements -XRegExp.replace('2015-02-22', date, '${month}/${day}/${year}'); // -> '02/22/2015' -XRegExp.replace('2015-02-22', date, function(match) { - return match.month + '/' + match.day + '/' + match.year; -}); // -> '02/22/2015' - -// In fact, XRegExps compile to RegExps and work perfectly with native methods -date.test('2015-02-22'); // -> true - -// The *only* caveat is that named captures must be referenced using numbered backreferences -'2015-02-22'.replace(date, '$2/$3/$1'); // -> '02/22/2015' - -// Extract every other digit from a string using XRegExp.forEach -var evens = []; -XRegExp.forEach('1a2345', /\d/, function(match, i) { - if (i % 2) evens.push(+match[0]); -}); -// evens -> [2, 4] - -// Get numbers within tags using XRegExp.matchChain -XRegExp.matchChain('1 2 3 4 a 56', [ - XRegExp('(?is).*?'), - /\d+/ -]); // -> ['2', '4', '56'] - -// You can also pass forward and return specific backreferences -var html = '
XRegExp' + - 'Google'; -XRegExp.matchChain(html, [ - {regex: //i, backref: 1}, - {regex: XRegExp('(?i)^https?://(?[^/?#]+)'), backref: 'domain'} -]); // -> ['xregexp.com', 'www.google.com'] - -// Merge strings and regexes into a single pattern, safely rewriting backreferences -XRegExp.union(['a+b*c', /(dog)\1/, /(cat)\1/], 'i'); -// -> /a\+b\*c|(dog)\1|(cat)\2/i -``` - -These examples should give you the flavor of what's possible, but XRegExp has more syntax, flags, methods, options, and browser fixes that aren't shown here. You can even augment XRegExp's regular expression syntax with addons (see below) or write your own. See [xregexp.com](http://xregexp.com/) for more details. - -## Addons - -You can either load addons individually, or bundle all addons together with XRegExp by loading `xregexp-all.js`. XRegExp's [npm package](https://www.npmjs.com/package/xregexp) uses `xregexp-all.js`, so addons are always available when XRegExp is installed using npm. - -### Unicode - -In browsers, first include the Unicode Base script and then one or more of the addons for Unicode blocks, categories, properties, or scripts. - -```html - - - - -``` - -Then you can do this: - -```js -// Test the Unicode category L (Letter) -var unicodeWord = XRegExp('^\\pL+$'); -unicodeWord.test('Русский'); // -> true -unicodeWord.test('日本語'); // -> true -unicodeWord.test('العربية'); // -> true - -// Test some Unicode scripts -XRegExp('^\\p{Hiragana}+$').test('ひらがな'); // -> true -XRegExp('^[\\p{Latin}\\p{Common}]+$').test('Über Café.'); // -> true -``` - -By default, `\p{…}` and `\P{…}` support the Basic Multilingual Plane (i.e. code points up to `U+FFFF`). You can opt-in to full 21-bit Unicode support (with code points up to `U+10FFFF`) on a per-regex basis by using flag `A`. In XRegExp, this is called *astral mode*. You can automatically add flag `A` for all new regexes by running `XRegExp.install('astral')`. When in astral mode, `\p{…}` and `\P{…}` always match a full code point rather than a code unit, using surrogate pairs for code points above `U+FFFF`. - -```js -// Using flag A to match astral code points -XRegExp('^\\pS$').test('💩'); // -> false -XRegExp('^\\pS$', 'A').test('💩'); // -> true -XRegExp('(?A)^\\pS$').test('💩'); // -> true -// Using surrogate pair U+D83D U+DCA9 to represent U+1F4A9 (pile of poo) -XRegExp('(?A)^\\pS$').test('\uD83D\uDCA9'); // -> true - -// Implicit flag A -XRegExp.install('astral'); -XRegExp('^\\pS$').test('💩'); // -> true -``` - -Opting in to astral mode disables the use of `\p{…}` and `\P{…}` within character classes. In astral mode, use e.g. `(\pL|[0-9_])+` instead of `[\pL0-9_]+`. - -XRegExp uses Unicode 8.0.0. - -### XRegExp.build - -In browsers, first include the script: - -```html - - -``` - -You can then build regular expressions using named subpatterns, for readability and pattern reuse: - -```js -var time = XRegExp.build('(?x)^ {{hours}} ({{minutes}}) $', { - hours: XRegExp.build('{{h12}} : | {{h24}}', { - h12: /1[0-2]|0?[1-9]/, - h24: /2[0-3]|[01][0-9]/ - }), - minutes: /^[0-5][0-9]$/ -}); - -time.test('10:59'); // -> true -XRegExp.exec('10:59', time).minutes; // -> '59' -``` - -Named subpatterns can be provided as strings or regex objects. A leading `^` and trailing unescaped `$` are stripped from subpatterns if both are present, which allows embedding independently-useful anchored patterns. `{{…}}` tokens can be quantified as a single unit. Any backreferences in the outer pattern or provided subpatterns are automatically renumbered to work correctly within the larger combined pattern. The syntax `({{name}})` works as shorthand for named capture via `(?{{name}})`. Named subpatterns cannot be embedded within character classes. - -See also: *[Creating Grammatical Regexes Using XRegExp.build](http://blog.stevenlevithan.com/archives/grammatical-patterns-xregexp-build)*. - -### XRegExp.matchRecursive - -In browsers, first include the script: - -```html - - -``` - -You can then match recursive constructs using XRegExp pattern strings as left and right delimiters: - -```js -var str = '(t((e))s)t()(ing)'; -XRegExp.matchRecursive(str, '\\(', '\\)', 'g'); -// -> ['t((e))s', '', 'ing'] - -// Extended information mode with valueNames -str = 'Here is
an
example'; -XRegExp.matchRecursive(str, '', '', 'gi', { - valueNames: ['between', 'left', 'match', 'right'] -}); -/* -> [ -{name: 'between', value: 'Here is ', start: 0, end: 8}, -{name: 'left', value: '
', start: 8, end: 13}, -{name: 'match', value: '
an
', start: 13, end: 27}, -{name: 'right', value: '
', start: 27, end: 33}, -{name: 'between', value: ' example', start: 33, end: 41} -] */ - -// Omitting unneeded parts with null valueNames, and using escapeChar -str = '...{1}.\\{{function(x,y){return {y:x}}}'; -XRegExp.matchRecursive(str, '{', '}', 'g', { - valueNames: ['literal', null, 'value', null], - escapeChar: '\\' -}); -/* -> [ -{name: 'literal', value: '...', start: 0, end: 3}, -{name: 'value', value: '1', start: 4, end: 5}, -{name: 'literal', value: '.\\{', start: 6, end: 9}, -{name: 'value', value: 'function(x,y){return {y:x}}', start: 10, end: 37} -] */ - -// Sticky mode via flag y -str = '<1><<<2>>><3>4<5>'; -XRegExp.matchRecursive(str, '<', '>', 'gy'); -// -> ['1', '<<2>>', '3'] -``` - -`XRegExp.matchRecursive` throws an error if it scans past an unbalanced delimiter in the target string. - -## Installation and usage - -In browsers: - -```html - -``` - -Or, to bundle XRegExp with all of its addons: - -```html - -``` - -Using [npm](https://www.npmjs.com/): - -```bash -npm install xregexp -``` - -In [Node.js](http://nodejs.org/): - -```js -var XRegExp = require('xregexp'); -``` - -In an AMD loader like [RequireJS](http://requirejs.org/): - -```js -require({paths: {xregexp: 'xregexp-all'}}, ['xregexp'], function(XRegExp) { - console.log(XRegExp.version); -}); -``` - -## About - -XRegExp copyright 2007-2016 by [Steven Levithan](http://stevenlevithan.com/). - -Tools: Unicode range generators by [Mathias Bynens](http://mathiasbynens.be/), and adapted from his [unicode-data](https://github.com/mathiasbynens/unicode-data) project. - -Tests: Uses [Jasmine](http://jasmine.github.io/) for unit tests, and [Benchmark.js](http://benchmarkjs.com) for performance tests. - -Prior art: `XRegExp.build` inspired by [Lea Verou](http://lea.verou.me/)'s [RegExp.create](http://lea.verou.me/2011/03/create-complex-regexps-more-easily/). `XRegExp.union` inspired by [Ruby](http://www.ruby-lang.org/). XRegExp's syntax extensions and flags come from [Perl](http://www.perl.org/), [.NET](http://www.microsoft.com/net), etc. - -All code, including addons, tools, and tests, is released under the terms of the [MIT](http://mit-license.org/) license. - -Fork me to show support, fix, and extend. diff --git a/node_modules/xregexp/package.json b/node_modules/xregexp/package.json deleted file mode 100644 index 9c963c2..0000000 --- a/node_modules/xregexp/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_args": [ - [ - "xregexp@^3.0.0", - "D:\\Koodaus\\brackets-sass-lint\\node_modules\\table" - ] - ], - "_from": "xregexp@>=3.0.0 <4.0.0", - "_id": "xregexp@3.1.0", - "_inCache": true, - "_installable": true, - "_location": "/xregexp", - "_nodeVersion": "3.3.1", - "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/xregexp-3.1.0.tgz_1456271836601_0.7557942552957684" - }, - "_npmUser": { - "email": "steves_list@hotmail.com", - "name": "slevithan" - }, - "_npmVersion": "2.14.3", - "_phantomChildren": {}, - "_requested": { - "name": "xregexp", - "raw": "xregexp@^3.0.0", - "rawSpec": "^3.0.0", - "scope": null, - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/table" - ], - "_resolved": "https://registry.npmjs.org/xregexp/-/xregexp-3.1.0.tgz", - "_shasum": "14d8461e0bdd38224bfee5039a0898fc42fcd336", - "_shrinkwrap": null, - "_spec": "xregexp@^3.0.0", - "_where": "D:\\Koodaus\\brackets-sass-lint\\node_modules\\table", - "author": { - "email": "steves_list@hotmail.com", - "name": "Steven Levithan" - }, - "bugs": { - "url": "https://github.com/slevithan/xregexp/issues" - }, - "dependencies": {}, - "description": "Extended regular expressions", - "devDependencies": { - "browserify": "^12.0.1" - }, - "directories": {}, - "dist": { - "shasum": "14d8461e0bdd38224bfee5039a0898fc42fcd336", - "tarball": "https://registry.npmjs.org/xregexp/-/xregexp-3.1.0.tgz" - }, - "files": [ - "src" - ], - "gitHead": "bbd5b1c2f759bdf278192be5df70af16342ffa4d", - "homepage": "http://xregexp.com/", - "keywords": [ - "regex", - "regexp" - ], - "license": "MIT", - "main": "./src/index.js", - "maintainers": [ - { - "name": "slevithan", - "email": "steves_list@hotmail.com" - } - ], - "name": "xregexp", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/slevithan/xregexp.git" - }, - "scripts": { - "build": "browserify src/index.js --standalone XRegExp > xregexp-all.js" - }, - "version": "3.1.0" -} diff --git a/node_modules/xregexp/src/addons/build.js b/node_modules/xregexp/src/addons/build.js deleted file mode 100644 index 221cb26..0000000 --- a/node_modules/xregexp/src/addons/build.js +++ /dev/null @@ -1,189 +0,0 @@ -/*! - * XRegExp.build 3.1.0 - * - * Steven Levithan (c) 2012-2016 MIT License - * Inspired by Lea Verou's RegExp.create - */ - -module.exports = function(XRegExp) { - 'use strict'; - - var REGEX_DATA = 'xregexp', - subParts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g, - parts = XRegExp.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/, subParts], 'g'); - -/** - * Strips a leading `^` and trailing unescaped `$`, if both are present. - * - * @private - * @param {String} pattern Pattern to process. - * @returns {String} Pattern with edge anchors removed. - */ - function deanchor(pattern) { - // Allow any number of empty noncapturing groups before/after anchors, because regexes - // built/generated by XRegExp sometimes include them - var leadingAnchor = /^(?:\(\?:\))*\^/, - trailingAnchor = /\$(?:\(\?:\))*$/; - - if ( - leadingAnchor.test(pattern) && - trailingAnchor.test(pattern) && - // Ensure that the trailing `$` isn't escaped - trailingAnchor.test(pattern.replace(/\\[\s\S]/g, '')) - ) { - return pattern.replace(leadingAnchor, '').replace(trailingAnchor, ''); - } - - return pattern; - } - -/** - * Converts the provided value to an XRegExp. Native RegExp flags are not preserved. - * - * @private - * @param {String|RegExp} value Value to convert. - * @returns {RegExp} XRegExp object with XRegExp syntax applied. - */ - function asXRegExp(value) { - return XRegExp.isRegExp(value) ? - (value[REGEX_DATA] && value[REGEX_DATA].captureNames ? - // Don't recompile, to preserve capture names - value : - // Recompile as XRegExp - XRegExp(value.source) - ) : - // Compile string as XRegExp - XRegExp(value); - } - -/** - * Builds regexes using named subpatterns, for readability and pattern reuse. Backreferences in the - * outer pattern and provided subpatterns are automatically renumbered to work correctly. Native - * flags used by provided subpatterns are ignored in favor of the `flags` argument. - * - * @memberOf XRegExp - * @param {String} pattern XRegExp pattern using `{{name}}` for embedded subpatterns. Allows - * `({{name}})` as shorthand for `(?{{name}})`. Patterns cannot be embedded within - * character classes. - * @param {Object} subs Lookup object for named subpatterns. Values can be strings or regexes. A - * leading `^` and trailing unescaped `$` are stripped from subpatterns, if both are present. - * @param {String} [flags] Any combination of XRegExp flags. - * @returns {RegExp} Regex with interpolated subpatterns. - * @example - * - * var time = XRegExp.build('(?x)^ {{hours}} ({{minutes}}) $', { - * hours: XRegExp.build('{{h12}} : | {{h24}}', { - * h12: /1[0-2]|0?[1-9]/, - * h24: /2[0-3]|[01][0-9]/ - * }, 'x'), - * minutes: /^[0-5][0-9]$/ - * }); - * time.test('10:59'); // -> true - * XRegExp.exec('10:59', time).minutes; // -> '59' - */ - XRegExp.build = function(pattern, subs, flags) { - var inlineFlags = /^\(\?([\w$]+)\)/.exec(pattern), - data = {}, - numCaps = 0, // 'Caps' is short for captures - numPriorCaps, - numOuterCaps = 0, - outerCapsMap = [0], - outerCapNames, - sub, - p; - - // Add flags within a leading mode modifier to the overall pattern's flags - if (inlineFlags) { - flags = flags || ''; - inlineFlags[1].replace(/./g, function(flag) { - // Don't add duplicates - flags += (flags.indexOf(flag) > -1 ? '' : flag); - }); - } - - for (p in subs) { - if (subs.hasOwnProperty(p)) { - // Passing to XRegExp enables extended syntax and ensures independent validity, - // lest an unescaped `(`, `)`, `[`, or trailing `\` breaks the `(?:)` wrapper. For - // subpatterns provided as native regexes, it dies on octals and adds the property - // used to hold extended regex instance data, for simplicity - sub = asXRegExp(subs[p]); - data[p] = { - // Deanchoring allows embedding independently useful anchored regexes. If you - // really need to keep your anchors, double them (i.e., `^^...$$`) - pattern: deanchor(sub.source), - names: sub[REGEX_DATA].captureNames || [] - }; - } - } - - // Passing to XRegExp dies on octals and ensures the outer pattern is independently valid; - // helps keep this simple. Named captures will be put back - pattern = asXRegExp(pattern); - outerCapNames = pattern[REGEX_DATA].captureNames || []; - pattern = pattern.source.replace(parts, function($0, $1, $2, $3, $4) { - var subName = $1 || $2, - capName, - intro, - localCapIndex; - // Named subpattern - if (subName) { - if (!data.hasOwnProperty(subName)) { - throw new ReferenceError('Undefined property ' + $0); - } - // Named subpattern was wrapped in a capturing group - if ($1) { - capName = outerCapNames[numOuterCaps]; - outerCapsMap[++numOuterCaps] = ++numCaps; - // If it's a named group, preserve the name. Otherwise, use the subpattern name - // as the capture name - intro = '(?<' + (capName || subName) + '>'; - } else { - intro = '(?:'; - } - numPriorCaps = numCaps; - return intro + data[subName].pattern.replace(subParts, function(match, paren, backref) { - // Capturing group - if (paren) { - capName = data[subName].names[numCaps - numPriorCaps]; - ++numCaps; - // If the current capture has a name, preserve the name - if (capName) { - return '(?<' + capName + '>'; - } - // Backreference - } else if (backref) { - localCapIndex = +backref - 1; - // Rewrite the backreference - return data[subName].names[localCapIndex] ? - // Need to preserve the backreference name in case using flag `n` - '\\k<' + data[subName].names[localCapIndex] + '>' : - '\\' + (+backref + numPriorCaps); - } - return match; - }) + ')'; - } - // Capturing group - if ($3) { - capName = outerCapNames[numOuterCaps]; - outerCapsMap[++numOuterCaps] = ++numCaps; - // If the current capture has a name, preserve the name - if (capName) { - return '(?<' + capName + '>'; - } - // Backreference - } else if ($4) { - localCapIndex = +$4 - 1; - // Rewrite the backreference - return outerCapNames[localCapIndex] ? - // Need to preserve the backreference name in case using flag `n` - '\\k<' + outerCapNames[localCapIndex] + '>' : - '\\' + outerCapsMap[+$4]; - } - return $0; - }); - - return XRegExp(pattern, flags); - }; - -}; diff --git a/node_modules/xregexp/src/addons/matchrecursive.js b/node_modules/xregexp/src/addons/matchrecursive.js deleted file mode 100644 index 1de3bdc..0000000 --- a/node_modules/xregexp/src/addons/matchrecursive.js +++ /dev/null @@ -1,191 +0,0 @@ -/*! - * XRegExp.matchRecursive 3.1.0 - * - * Steven Levithan (c) 2009-2016 MIT License - */ - -module.exports = function(XRegExp) { - 'use strict'; - -/** - * Returns a match detail object composed of the provided values. - * - * @private - */ - function row(name, value, start, end) { - return { - name: name, - value: value, - start: start, - end: end - }; - } - -/** - * Returns an array of match strings between outermost left and right delimiters, or an array of - * objects with detailed match parts and position data. An error is thrown if delimiters are - * unbalanced within the data. - * - * @memberOf XRegExp - * @param {String} str String to search. - * @param {String} left Left delimiter as an XRegExp pattern. - * @param {String} right Right delimiter as an XRegExp pattern. - * @param {String} [flags] Any native or XRegExp flags, used for the left and right delimiters. - * @param {Object} [options] Lets you specify `valueNames` and `escapeChar` options. - * @returns {Array} Array of matches, or an empty array. - * @example - * - * // Basic usage - * var str = '(t((e))s)t()(ing)'; - * XRegExp.matchRecursive(str, '\\(', '\\)', 'g'); - * // -> ['t((e))s', '', 'ing'] - * - * // Extended information mode with valueNames - * str = 'Here is
an
example'; - * XRegExp.matchRecursive(str, '', '', 'gi', { - * valueNames: ['between', 'left', 'match', 'right'] - * }); - * // -> [ - * // {name: 'between', value: 'Here is ', start: 0, end: 8}, - * // {name: 'left', value: '
', start: 8, end: 13}, - * // {name: 'match', value: '
an
', start: 13, end: 27}, - * // {name: 'right', value: '
', start: 27, end: 33}, - * // {name: 'between', value: ' example', start: 33, end: 41} - * // ] - * - * // Omitting unneeded parts with null valueNames, and using escapeChar - * str = '...{1}.\\{{function(x,y){return {y:x}}}'; - * XRegExp.matchRecursive(str, '{', '}', 'g', { - * valueNames: ['literal', null, 'value', null], - * escapeChar: '\\' - * }); - * // -> [ - * // {name: 'literal', value: '...', start: 0, end: 3}, - * // {name: 'value', value: '1', start: 4, end: 5}, - * // {name: 'literal', value: '.\\{', start: 6, end: 9}, - * // {name: 'value', value: 'function(x,y){return {y:x}}', start: 10, end: 37} - * // ] - * - * // Sticky mode via flag y - * str = '<1><<<2>>><3>4<5>'; - * XRegExp.matchRecursive(str, '<', '>', 'gy'); - * // -> ['1', '<<2>>', '3'] - */ - XRegExp.matchRecursive = function(str, left, right, flags, options) { - flags = flags || ''; - options = options || {}; - var global = flags.indexOf('g') > -1, - sticky = flags.indexOf('y') > -1, - // Flag `y` is controlled internally - basicFlags = flags.replace(/y/g, ''), - escapeChar = options.escapeChar, - vN = options.valueNames, - output = [], - openTokens = 0, - delimStart = 0, - delimEnd = 0, - lastOuterEnd = 0, - outerStart, - innerStart, - leftMatch, - rightMatch, - esc; - left = XRegExp(left, basicFlags); - right = XRegExp(right, basicFlags); - - if (escapeChar) { - if (escapeChar.length > 1) { - throw new Error('Cannot use more than one escape character'); - } - escapeChar = XRegExp.escape(escapeChar); - // Using `XRegExp.union` safely rewrites backreferences in `left` and `right` - esc = new RegExp( - '(?:' + escapeChar + '[\\S\\s]|(?:(?!' + - XRegExp.union([left, right]).source + - ')[^' + escapeChar + '])+)+', - // Flags `gy` not needed here - flags.replace(/[^imu]+/g, '') - ); - } - - while (true) { - // If using an escape character, advance to the delimiter's next starting position, - // skipping any escaped characters in between - if (escapeChar) { - delimEnd += (XRegExp.exec(str, esc, delimEnd, 'sticky') || [''])[0].length; - } - leftMatch = XRegExp.exec(str, left, delimEnd); - rightMatch = XRegExp.exec(str, right, delimEnd); - // Keep the leftmost match only - if (leftMatch && rightMatch) { - if (leftMatch.index <= rightMatch.index) { - rightMatch = null; - } else { - leftMatch = null; - } - } - // Paths (LM: leftMatch, RM: rightMatch, OT: openTokens): - // LM | RM | OT | Result - // 1 | 0 | 1 | loop - // 1 | 0 | 0 | loop - // 0 | 1 | 1 | loop - // 0 | 1 | 0 | throw - // 0 | 0 | 1 | throw - // 0 | 0 | 0 | break - // The paths above don't include the sticky mode special case. The loop ends after the - // first completed match if not `global`. - if (leftMatch || rightMatch) { - delimStart = (leftMatch || rightMatch).index; - delimEnd = delimStart + (leftMatch || rightMatch)[0].length; - } else if (!openTokens) { - break; - } - if (sticky && !openTokens && delimStart > lastOuterEnd) { - break; - } - if (leftMatch) { - if (!openTokens) { - outerStart = delimStart; - innerStart = delimEnd; - } - ++openTokens; - } else if (rightMatch && openTokens) { - if (!--openTokens) { - if (vN) { - if (vN[0] && outerStart > lastOuterEnd) { - output.push(row(vN[0], str.slice(lastOuterEnd, outerStart), lastOuterEnd, outerStart)); - } - if (vN[1]) { - output.push(row(vN[1], str.slice(outerStart, innerStart), outerStart, innerStart)); - } - if (vN[2]) { - output.push(row(vN[2], str.slice(innerStart, delimStart), innerStart, delimStart)); - } - if (vN[3]) { - output.push(row(vN[3], str.slice(delimStart, delimEnd), delimStart, delimEnd)); - } - } else { - output.push(str.slice(innerStart, delimStart)); - } - lastOuterEnd = delimEnd; - if (!global) { - break; - } - } - } else { - throw new Error('Unbalanced delimiter found in string'); - } - // If the delimiter matched an empty string, avoid an infinite loop - if (delimStart === delimEnd) { - ++delimEnd; - } - } - - if (global && !sticky && vN && vN[0] && str.length > lastOuterEnd) { - output.push(row(vN[0], str.slice(lastOuterEnd), lastOuterEnd, str.length)); - } - - return output; - }; - -}; diff --git a/node_modules/xregexp/src/addons/unicode-base.js b/node_modules/xregexp/src/addons/unicode-base.js deleted file mode 100644 index 2a32304..0000000 --- a/node_modules/xregexp/src/addons/unicode-base.js +++ /dev/null @@ -1,236 +0,0 @@ -/*! - * XRegExp Unicode Base 3.1.0 - * - * Steven Levithan (c) 2008-2016 MIT License - */ - -/** - * Adds base support for Unicode matching: - * - Adds syntax `\p{..}` for matching Unicode tokens. Tokens can be inverted using `\P{..}` or - * `\p{^..}`. Token names ignore case, spaces, hyphens, and underscores. You can omit the braces - * for token names that are a single letter (e.g. `\pL` or `PL`). - * - Adds flag A (astral), which enables 21-bit Unicode support. - * - Adds the `XRegExp.addUnicodeData` method used by other addons to provide character data. - * - * Unicode Base relies on externally provided Unicode character data. Official addons are available - * to provide data for Unicode categories, scripts, blocks, and properties. - * - * @requires XRegExp - */ -module.exports = function(XRegExp) { - 'use strict'; - -// Storage for Unicode data - var unicode = {}; - -/* ============================== - * Private functions - * ============================== */ - -// Generates a token lookup name: lowercase, with hyphens, spaces, and underscores removed - function normalize(name) { - return name.replace(/[- _]+/g, '').toLowerCase(); - } - -// Adds leading zeros if shorter than four characters - function pad4(str) { - while (str.length < 4) { - str = '0' + str; - } - return str; - } - -// Converts a hexadecimal number to decimal - function dec(hex) { - return parseInt(hex, 16); - } - -// Converts a decimal number to hexadecimal - function hex(dec) { - return parseInt(dec, 10).toString(16); - } - -// Gets the decimal code of a literal code unit, \xHH, \uHHHH, or a backslash-escaped literal - function charCode(chr) { - var esc = /^\\[xu](.+)/.exec(chr); - return esc ? - dec(esc[1]) : - chr.charCodeAt(chr.charAt(0) === '\\' ? 1 : 0); - } - -// Inverts a list of ordered BMP characters and ranges - function invertBmp(range) { - var output = '', - lastEnd = -1, - start; - XRegExp.forEach(range, /(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/, function(m) { - start = charCode(m[1]); - if (start > (lastEnd + 1)) { - output += '\\u' + pad4(hex(lastEnd + 1)); - if (start > (lastEnd + 2)) { - output += '-\\u' + pad4(hex(start - 1)); - } - } - lastEnd = charCode(m[2] || m[1]); - }); - if (lastEnd < 0xFFFF) { - output += '\\u' + pad4(hex(lastEnd + 1)); - if (lastEnd < 0xFFFE) { - output += '-\\uFFFF'; - } - } - return output; - } - -// Generates an inverted BMP range on first use - function cacheInvertedBmp(slug) { - var prop = 'b!'; - return unicode[slug][prop] || ( - unicode[slug][prop] = invertBmp(unicode[slug].bmp) - ); - } - -// Combines and optionally negates BMP and astral data - function buildAstral(slug, isNegated) { - var item = unicode[slug], - combined = ''; - if (item.bmp && !item.isBmpLast) { - combined = '[' + item.bmp + ']' + (item.astral ? '|' : ''); - } - if (item.astral) { - combined += item.astral; - } - if (item.isBmpLast && item.bmp) { - combined += (item.astral ? '|' : '') + '[' + item.bmp + ']'; - } - // Astral Unicode tokens always match a code point, never a code unit - return isNegated ? - '(?:(?!' + combined + ')(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))' : - '(?:' + combined + ')'; - } - -// Builds a complete astral pattern on first use - function cacheAstral(slug, isNegated) { - var prop = isNegated ? 'a!' : 'a='; - return unicode[slug][prop] || ( - unicode[slug][prop] = buildAstral(slug, isNegated) - ); - } - -/* ============================== - * Core functionality - * ============================== */ - -/* - * Add Unicode token syntax: \p{..}, \P{..}, \p{^..}. Also add astral mode (flag A). - */ - XRegExp.addToken( - // Use `*` instead of `+` to avoid capturing `^` as the token name in `\p{^}` - /\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/, - function(match, scope, flags) { - var ERR_DOUBLE_NEG = 'Invalid double negation ', - ERR_UNKNOWN_NAME = 'Unknown Unicode token ', - ERR_UNKNOWN_REF = 'Unicode token missing data ', - ERR_ASTRAL_ONLY = 'Astral mode required for Unicode token ', - ERR_ASTRAL_IN_CLASS = 'Astral mode does not support Unicode tokens within character classes', - // Negated via \P{..} or \p{^..} - isNegated = match[1] === 'P' || !!match[2], - // Switch from BMP (0-FFFF) to astral (0-10FFFF) mode via flag A - isAstralMode = flags.indexOf('A') > -1, - // Token lookup name. Check `[4]` first to avoid passing `undefined` via `\p{}` - slug = normalize(match[4] || match[3]), - // Token data object - item = unicode[slug]; - - if (match[1] === 'P' && match[2]) { - throw new SyntaxError(ERR_DOUBLE_NEG + match[0]); - } - if (!unicode.hasOwnProperty(slug)) { - throw new SyntaxError(ERR_UNKNOWN_NAME + match[0]); - } - - // Switch to the negated form of the referenced Unicode token - if (item.inverseOf) { - slug = normalize(item.inverseOf); - if (!unicode.hasOwnProperty(slug)) { - throw new ReferenceError(ERR_UNKNOWN_REF + match[0] + ' -> ' + item.inverseOf); - } - item = unicode[slug]; - isNegated = !isNegated; - } - - if (!(item.bmp || isAstralMode)) { - throw new SyntaxError(ERR_ASTRAL_ONLY + match[0]); - } - if (isAstralMode) { - if (scope === 'class') { - throw new SyntaxError(ERR_ASTRAL_IN_CLASS); - } - - return cacheAstral(slug, isNegated); - } - - return scope === 'class' ? - (isNegated ? cacheInvertedBmp(slug) : item.bmp) : - (isNegated ? '[^' : '[') + item.bmp + ']'; - }, - { - scope: 'all', - optionalFlags: 'A', - leadChar: '\\' - } - ); - -/** - * Adds to the list of Unicode tokens that XRegExp regexes can match via `\p` or `\P`. - * - * @memberOf XRegExp - * @param {Array} data Objects with named character ranges. Each object may have properties `name`, - * `alias`, `isBmpLast`, `inverseOf`, `bmp`, and `astral`. All but `name` are optional, although - * one of `bmp` or `astral` is required (unless `inverseOf` is set). If `astral` is absent, the - * `bmp` data is used for BMP and astral modes. If `bmp` is absent, the name errors in BMP mode - * but works in astral mode. If both `bmp` and `astral` are provided, the `bmp` data only is used - * in BMP mode, and the combination of `bmp` and `astral` data is used in astral mode. - * `isBmpLast` is needed when a token matches orphan high surrogates *and* uses surrogate pairs - * to match astral code points. The `bmp` and `astral` data should be a combination of literal - * characters and `\xHH` or `\uHHHH` escape sequences, with hyphens to create ranges. Any regex - * metacharacters in the data should be escaped, apart from range-creating hyphens. The `astral` - * data can additionally use character classes and alternation, and should use surrogate pairs to - * represent astral code points. `inverseOf` can be used to avoid duplicating character data if a - * Unicode token is defined as the exact inverse of another token. - * @example - * - * // Basic use - * XRegExp.addUnicodeData([{ - * name: 'XDigit', - * alias: 'Hexadecimal', - * bmp: '0-9A-Fa-f' - * }]); - * XRegExp('\\p{XDigit}:\\p{Hexadecimal}+').test('0:3D'); // -> true - */ - XRegExp.addUnicodeData = function(data) { - var ERR_NO_NAME = 'Unicode token requires name', - ERR_NO_DATA = 'Unicode token has no character data ', - item, - i; - - for (i = 0; i < data.length; ++i) { - item = data[i]; - if (!item.name) { - throw new Error(ERR_NO_NAME); - } - if (!(item.inverseOf || item.bmp || item.astral)) { - throw new Error(ERR_NO_DATA + item.name); - } - unicode[normalize(item.name)] = item; - if (item.alias) { - unicode[normalize(item.alias)] = item; - } - } - - // Reset the pattern cache used by the `XRegExp` constructor, since the same pattern and - // flags might now produce different results - XRegExp.cache.flush('patterns'); - }; - -}; diff --git a/node_modules/xregexp/src/addons/unicode-blocks.js b/node_modules/xregexp/src/addons/unicode-blocks.js deleted file mode 100644 index 918dc9d..0000000 --- a/node_modules/xregexp/src/addons/unicode-blocks.js +++ /dev/null @@ -1,1074 +0,0 @@ -/*! - * XRegExp Unicode Blocks 3.1.0 - * - * Steven Levithan (c) 2010-2016 MIT License - * Unicode data by Mathias Bynens - */ - -/** - * Adds support for all Unicode blocks. Block names use the prefix 'In'. E.g., `\p{InBasicLatin}`. - * Token names are case insensitive, and any spaces, hyphens, and underscores are ignored. - * - * Uses Unicode 8.0.0. - * - * @requires XRegExp, Unicode Base - */ -module.exports = function(XRegExp) { - 'use strict'; - - if (!XRegExp.addUnicodeData) { - throw new ReferenceError('Unicode Base must be loaded before Unicode Blocks'); - } - - XRegExp.addUnicodeData([ - { - name: 'InAegean_Numbers', - astral: '\uD800[\uDD00-\uDD3F]' - }, - { - name: 'InAhom', - astral: '\uD805[\uDF00-\uDF3F]' - }, - { - name: 'InAlchemical_Symbols', - astral: '\uD83D[\uDF00-\uDF7F]' - }, - { - name: 'InAlphabetic_Presentation_Forms', - bmp: '\uFB00-\uFB4F' - }, - { - name: 'InAnatolian_Hieroglyphs', - astral: '\uD811[\uDC00-\uDE7F]' - }, - { - name: 'InAncient_Greek_Musical_Notation', - astral: '\uD834[\uDE00-\uDE4F]' - }, - { - name: 'InAncient_Greek_Numbers', - astral: '\uD800[\uDD40-\uDD8F]' - }, - { - name: 'InAncient_Symbols', - astral: '\uD800[\uDD90-\uDDCF]' - }, - { - name: 'InArabic', - bmp: '\u0600-\u06FF' - }, - { - name: 'InArabic_Extended_A', - bmp: '\u08A0-\u08FF' - }, - { - name: 'InArabic_Mathematical_Alphabetic_Symbols', - astral: '\uD83B[\uDE00-\uDEFF]' - }, - { - name: 'InArabic_Presentation_Forms_A', - bmp: '\uFB50-\uFDFF' - }, - { - name: 'InArabic_Presentation_Forms_B', - bmp: '\uFE70-\uFEFF' - }, - { - name: 'InArabic_Supplement', - bmp: '\u0750-\u077F' - }, - { - name: 'InArmenian', - bmp: '\u0530-\u058F' - }, - { - name: 'InArrows', - bmp: '\u2190-\u21FF' - }, - { - name: 'InAvestan', - astral: '\uD802[\uDF00-\uDF3F]' - }, - { - name: 'InBalinese', - bmp: '\u1B00-\u1B7F' - }, - { - name: 'InBamum', - bmp: '\uA6A0-\uA6FF' - }, - { - name: 'InBamum_Supplement', - astral: '\uD81A[\uDC00-\uDE3F]' - }, - { - name: 'InBasic_Latin', - bmp: '\0-\x7F' - }, - { - name: 'InBassa_Vah', - astral: '\uD81A[\uDED0-\uDEFF]' - }, - { - name: 'InBatak', - bmp: '\u1BC0-\u1BFF' - }, - { - name: 'InBengali', - bmp: '\u0980-\u09FF' - }, - { - name: 'InBlock_Elements', - bmp: '\u2580-\u259F' - }, - { - name: 'InBopomofo', - bmp: '\u3100-\u312F' - }, - { - name: 'InBopomofo_Extended', - bmp: '\u31A0-\u31BF' - }, - { - name: 'InBox_Drawing', - bmp: '\u2500-\u257F' - }, - { - name: 'InBrahmi', - astral: '\uD804[\uDC00-\uDC7F]' - }, - { - name: 'InBraille_Patterns', - bmp: '\u2800-\u28FF' - }, - { - name: 'InBuginese', - bmp: '\u1A00-\u1A1F' - }, - { - name: 'InBuhid', - bmp: '\u1740-\u175F' - }, - { - name: 'InByzantine_Musical_Symbols', - astral: '\uD834[\uDC00-\uDCFF]' - }, - { - name: 'InCJK_Compatibility', - bmp: '\u3300-\u33FF' - }, - { - name: 'InCJK_Compatibility_Forms', - bmp: '\uFE30-\uFE4F' - }, - { - name: 'InCJK_Compatibility_Ideographs', - bmp: '\uF900-\uFAFF' - }, - { - name: 'InCJK_Compatibility_Ideographs_Supplement', - astral: '\uD87E[\uDC00-\uDE1F]' - }, - { - name: 'InCJK_Radicals_Supplement', - bmp: '\u2E80-\u2EFF' - }, - { - name: 'InCJK_Strokes', - bmp: '\u31C0-\u31EF' - }, - { - name: 'InCJK_Symbols_and_Punctuation', - bmp: '\u3000-\u303F' - }, - { - name: 'InCJK_Unified_Ideographs', - bmp: '\u4E00-\u9FFF' - }, - { - name: 'InCJK_Unified_Ideographs_Extension_A', - bmp: '\u3400-\u4DBF' - }, - { - name: 'InCJK_Unified_Ideographs_Extension_B', - astral: '[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF]' - }, - { - name: 'InCJK_Unified_Ideographs_Extension_C', - astral: '\uD86D[\uDC00-\uDF3F]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD869[\uDF00-\uDFFF]' - }, - { - name: 'InCJK_Unified_Ideographs_Extension_D', - astral: '\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1F]' - }, - { - name: 'InCJK_Unified_Ideographs_Extension_E', - astral: '[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEAF]|\uD86E[\uDC20-\uDFFF]' - }, - { - name: 'InCarian', - astral: '\uD800[\uDEA0-\uDEDF]' - }, - { - name: 'InCaucasian_Albanian', - astral: '\uD801[\uDD30-\uDD6F]' - }, - { - name: 'InChakma', - astral: '\uD804[\uDD00-\uDD4F]' - }, - { - name: 'InCham', - bmp: '\uAA00-\uAA5F' - }, - { - name: 'InCherokee', - bmp: '\u13A0-\u13FF' - }, - { - name: 'InCherokee_Supplement', - bmp: '\uAB70-\uABBF' - }, - { - name: 'InCombining_Diacritical_Marks', - bmp: '\u0300-\u036F' - }, - { - name: 'InCombining_Diacritical_Marks_Extended', - bmp: '\u1AB0-\u1AFF' - }, - { - name: 'InCombining_Diacritical_Marks_Supplement', - bmp: '\u1DC0-\u1DFF' - }, - { - name: 'InCombining_Diacritical_Marks_for_Symbols', - bmp: '\u20D0-\u20FF' - }, - { - name: 'InCombining_Half_Marks', - bmp: '\uFE20-\uFE2F' - }, - { - name: 'InCommon_Indic_Number_Forms', - bmp: '\uA830-\uA83F' - }, - { - name: 'InControl_Pictures', - bmp: '\u2400-\u243F' - }, - { - name: 'InCoptic', - bmp: '\u2C80-\u2CFF' - }, - { - name: 'InCoptic_Epact_Numbers', - astral: '\uD800[\uDEE0-\uDEFF]' - }, - { - name: 'InCounting_Rod_Numerals', - astral: '\uD834[\uDF60-\uDF7F]' - }, - { - name: 'InCuneiform', - astral: '\uD808[\uDC00-\uDFFF]' - }, - { - name: 'InCuneiform_Numbers_and_Punctuation', - astral: '\uD809[\uDC00-\uDC7F]' - }, - { - name: 'InCurrency_Symbols', - bmp: '\u20A0-\u20CF' - }, - { - name: 'InCypriot_Syllabary', - astral: '\uD802[\uDC00-\uDC3F]' - }, - { - name: 'InCyrillic', - bmp: '\u0400-\u04FF' - }, - { - name: 'InCyrillic_Extended_A', - bmp: '\u2DE0-\u2DFF' - }, - { - name: 'InCyrillic_Extended_B', - bmp: '\uA640-\uA69F' - }, - { - name: 'InCyrillic_Supplement', - bmp: '\u0500-\u052F' - }, - { - name: 'InDeseret', - astral: '\uD801[\uDC00-\uDC4F]' - }, - { - name: 'InDevanagari', - bmp: '\u0900-\u097F' - }, - { - name: 'InDevanagari_Extended', - bmp: '\uA8E0-\uA8FF' - }, - { - name: 'InDingbats', - bmp: '\u2700-\u27BF' - }, - { - name: 'InDomino_Tiles', - astral: '\uD83C[\uDC30-\uDC9F]' - }, - { - name: 'InDuployan', - astral: '\uD82F[\uDC00-\uDC9F]' - }, - { - name: 'InEarly_Dynastic_Cuneiform', - astral: '\uD809[\uDC80-\uDD4F]' - }, - { - name: 'InEgyptian_Hieroglyphs', - astral: '\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F]' - }, - { - name: 'InElbasan', - astral: '\uD801[\uDD00-\uDD2F]' - }, - { - name: 'InEmoticons', - astral: '\uD83D[\uDE00-\uDE4F]' - }, - { - name: 'InEnclosed_Alphanumeric_Supplement', - astral: '\uD83C[\uDD00-\uDDFF]' - }, - { - name: 'InEnclosed_Alphanumerics', - bmp: '\u2460-\u24FF' - }, - { - name: 'InEnclosed_CJK_Letters_and_Months', - bmp: '\u3200-\u32FF' - }, - { - name: 'InEnclosed_Ideographic_Supplement', - astral: '\uD83C[\uDE00-\uDEFF]' - }, - { - name: 'InEthiopic', - bmp: '\u1200-\u137F' - }, - { - name: 'InEthiopic_Extended', - bmp: '\u2D80-\u2DDF' - }, - { - name: 'InEthiopic_Extended_A', - bmp: '\uAB00-\uAB2F' - }, - { - name: 'InEthiopic_Supplement', - bmp: '\u1380-\u139F' - }, - { - name: 'InGeneral_Punctuation', - bmp: '\u2000-\u206F' - }, - { - name: 'InGeometric_Shapes', - bmp: '\u25A0-\u25FF' - }, - { - name: 'InGeometric_Shapes_Extended', - astral: '\uD83D[\uDF80-\uDFFF]' - }, - { - name: 'InGeorgian', - bmp: '\u10A0-\u10FF' - }, - { - name: 'InGeorgian_Supplement', - bmp: '\u2D00-\u2D2F' - }, - { - name: 'InGlagolitic', - bmp: '\u2C00-\u2C5F' - }, - { - name: 'InGothic', - astral: '\uD800[\uDF30-\uDF4F]' - }, - { - name: 'InGrantha', - astral: '\uD804[\uDF00-\uDF7F]' - }, - { - name: 'InGreek_Extended', - bmp: '\u1F00-\u1FFF' - }, - { - name: 'InGreek_and_Coptic', - bmp: '\u0370-\u03FF' - }, - { - name: 'InGujarati', - bmp: '\u0A80-\u0AFF' - }, - { - name: 'InGurmukhi', - bmp: '\u0A00-\u0A7F' - }, - { - name: 'InHalfwidth_and_Fullwidth_Forms', - bmp: '\uFF00-\uFFEF' - }, - { - name: 'InHangul_Compatibility_Jamo', - bmp: '\u3130-\u318F' - }, - { - name: 'InHangul_Jamo', - bmp: '\u1100-\u11FF' - }, - { - name: 'InHangul_Jamo_Extended_A', - bmp: '\uA960-\uA97F' - }, - { - name: 'InHangul_Jamo_Extended_B', - bmp: '\uD7B0-\uD7FF' - }, - { - name: 'InHangul_Syllables', - bmp: '\uAC00-\uD7AF' - }, - { - name: 'InHanunoo', - bmp: '\u1720-\u173F' - }, - { - name: 'InHatran', - astral: '\uD802[\uDCE0-\uDCFF]' - }, - { - name: 'InHebrew', - bmp: '\u0590-\u05FF' - }, - { - name: 'InHigh_Private_Use_Surrogates', - bmp: '\uDB80-\uDBFF' - }, - { - name: 'InHigh_Surrogates', - bmp: '\uD800-\uDB7F' - }, - { - name: 'InHiragana', - bmp: '\u3040-\u309F' - }, - { - name: 'InIPA_Extensions', - bmp: '\u0250-\u02AF' - }, - { - name: 'InIdeographic_Description_Characters', - bmp: '\u2FF0-\u2FFF' - }, - { - name: 'InImperial_Aramaic', - astral: '\uD802[\uDC40-\uDC5F]' - }, - { - name: 'InInscriptional_Pahlavi', - astral: '\uD802[\uDF60-\uDF7F]' - }, - { - name: 'InInscriptional_Parthian', - astral: '\uD802[\uDF40-\uDF5F]' - }, - { - name: 'InJavanese', - bmp: '\uA980-\uA9DF' - }, - { - name: 'InKaithi', - astral: '\uD804[\uDC80-\uDCCF]' - }, - { - name: 'InKana_Supplement', - astral: '\uD82C[\uDC00-\uDCFF]' - }, - { - name: 'InKanbun', - bmp: '\u3190-\u319F' - }, - { - name: 'InKangxi_Radicals', - bmp: '\u2F00-\u2FDF' - }, - { - name: 'InKannada', - bmp: '\u0C80-\u0CFF' - }, - { - name: 'InKatakana', - bmp: '\u30A0-\u30FF' - }, - { - name: 'InKatakana_Phonetic_Extensions', - bmp: '\u31F0-\u31FF' - }, - { - name: 'InKayah_Li', - bmp: '\uA900-\uA92F' - }, - { - name: 'InKharoshthi', - astral: '\uD802[\uDE00-\uDE5F]' - }, - { - name: 'InKhmer', - bmp: '\u1780-\u17FF' - }, - { - name: 'InKhmer_Symbols', - bmp: '\u19E0-\u19FF' - }, - { - name: 'InKhojki', - astral: '\uD804[\uDE00-\uDE4F]' - }, - { - name: 'InKhudawadi', - astral: '\uD804[\uDEB0-\uDEFF]' - }, - { - name: 'InLao', - bmp: '\u0E80-\u0EFF' - }, - { - name: 'InLatin_Extended_Additional', - bmp: '\u1E00-\u1EFF' - }, - { - name: 'InLatin_Extended_A', - bmp: '\u0100-\u017F' - }, - { - name: 'InLatin_Extended_B', - bmp: '\u0180-\u024F' - }, - { - name: 'InLatin_Extended_C', - bmp: '\u2C60-\u2C7F' - }, - { - name: 'InLatin_Extended_D', - bmp: '\uA720-\uA7FF' - }, - { - name: 'InLatin_Extended_E', - bmp: '\uAB30-\uAB6F' - }, - { - name: 'InLatin_1_Supplement', - bmp: '\x80-\xFF' - }, - { - name: 'InLepcha', - bmp: '\u1C00-\u1C4F' - }, - { - name: 'InLetterlike_Symbols', - bmp: '\u2100-\u214F' - }, - { - name: 'InLimbu', - bmp: '\u1900-\u194F' - }, - { - name: 'InLinear_A', - astral: '\uD801[\uDE00-\uDF7F]' - }, - { - name: 'InLinear_B_Ideograms', - astral: '\uD800[\uDC80-\uDCFF]' - }, - { - name: 'InLinear_B_Syllabary', - astral: '\uD800[\uDC00-\uDC7F]' - }, - { - name: 'InLisu', - bmp: '\uA4D0-\uA4FF' - }, - { - name: 'InLow_Surrogates', - bmp: '\uDC00-\uDFFF' - }, - { - name: 'InLycian', - astral: '\uD800[\uDE80-\uDE9F]' - }, - { - name: 'InLydian', - astral: '\uD802[\uDD20-\uDD3F]' - }, - { - name: 'InMahajani', - astral: '\uD804[\uDD50-\uDD7F]' - }, - { - name: 'InMahjong_Tiles', - astral: '\uD83C[\uDC00-\uDC2F]' - }, - { - name: 'InMalayalam', - bmp: '\u0D00-\u0D7F' - }, - { - name: 'InMandaic', - bmp: '\u0840-\u085F' - }, - { - name: 'InManichaean', - astral: '\uD802[\uDEC0-\uDEFF]' - }, - { - name: 'InMathematical_Alphanumeric_Symbols', - astral: '\uD835[\uDC00-\uDFFF]' - }, - { - name: 'InMathematical_Operators', - bmp: '\u2200-\u22FF' - }, - { - name: 'InMeetei_Mayek', - bmp: '\uABC0-\uABFF' - }, - { - name: 'InMeetei_Mayek_Extensions', - bmp: '\uAAE0-\uAAFF' - }, - { - name: 'InMende_Kikakui', - astral: '\uD83A[\uDC00-\uDCDF]' - }, - { - name: 'InMeroitic_Cursive', - astral: '\uD802[\uDDA0-\uDDFF]' - }, - { - name: 'InMeroitic_Hieroglyphs', - astral: '\uD802[\uDD80-\uDD9F]' - }, - { - name: 'InMiao', - astral: '\uD81B[\uDF00-\uDF9F]' - }, - { - name: 'InMiscellaneous_Mathematical_Symbols_A', - bmp: '\u27C0-\u27EF' - }, - { - name: 'InMiscellaneous_Mathematical_Symbols_B', - bmp: '\u2980-\u29FF' - }, - { - name: 'InMiscellaneous_Symbols', - bmp: '\u2600-\u26FF' - }, - { - name: 'InMiscellaneous_Symbols_and_Arrows', - bmp: '\u2B00-\u2BFF' - }, - { - name: 'InMiscellaneous_Symbols_and_Pictographs', - astral: '\uD83D[\uDC00-\uDDFF]|\uD83C[\uDF00-\uDFFF]' - }, - { - name: 'InMiscellaneous_Technical', - bmp: '\u2300-\u23FF' - }, - { - name: 'InModi', - astral: '\uD805[\uDE00-\uDE5F]' - }, - { - name: 'InModifier_Tone_Letters', - bmp: '\uA700-\uA71F' - }, - { - name: 'InMongolian', - bmp: '\u1800-\u18AF' - }, - { - name: 'InMro', - astral: '\uD81A[\uDE40-\uDE6F]' - }, - { - name: 'InMultani', - astral: '\uD804[\uDE80-\uDEAF]' - }, - { - name: 'InMusical_Symbols', - astral: '\uD834[\uDD00-\uDDFF]' - }, - { - name: 'InMyanmar', - bmp: '\u1000-\u109F' - }, - { - name: 'InMyanmar_Extended_A', - bmp: '\uAA60-\uAA7F' - }, - { - name: 'InMyanmar_Extended_B', - bmp: '\uA9E0-\uA9FF' - }, - { - name: 'InNKo', - bmp: '\u07C0-\u07FF' - }, - { - name: 'InNabataean', - astral: '\uD802[\uDC80-\uDCAF]' - }, - { - name: 'InNew_Tai_Lue', - bmp: '\u1980-\u19DF' - }, - { - name: 'InNumber_Forms', - bmp: '\u2150-\u218F' - }, - { - name: 'InOgham', - bmp: '\u1680-\u169F' - }, - { - name: 'InOl_Chiki', - bmp: '\u1C50-\u1C7F' - }, - { - name: 'InOld_Hungarian', - astral: '\uD803[\uDC80-\uDCFF]' - }, - { - name: 'InOld_Italic', - astral: '\uD800[\uDF00-\uDF2F]' - }, - { - name: 'InOld_North_Arabian', - astral: '\uD802[\uDE80-\uDE9F]' - }, - { - name: 'InOld_Permic', - astral: '\uD800[\uDF50-\uDF7F]' - }, - { - name: 'InOld_Persian', - astral: '\uD800[\uDFA0-\uDFDF]' - }, - { - name: 'InOld_South_Arabian', - astral: '\uD802[\uDE60-\uDE7F]' - }, - { - name: 'InOld_Turkic', - astral: '\uD803[\uDC00-\uDC4F]' - }, - { - name: 'InOptical_Character_Recognition', - bmp: '\u2440-\u245F' - }, - { - name: 'InOriya', - bmp: '\u0B00-\u0B7F' - }, - { - name: 'InOrnamental_Dingbats', - astral: '\uD83D[\uDE50-\uDE7F]' - }, - { - name: 'InOsmanya', - astral: '\uD801[\uDC80-\uDCAF]' - }, - { - name: 'InPahawh_Hmong', - astral: '\uD81A[\uDF00-\uDF8F]' - }, - { - name: 'InPalmyrene', - astral: '\uD802[\uDC60-\uDC7F]' - }, - { - name: 'InPau_Cin_Hau', - astral: '\uD806[\uDEC0-\uDEFF]' - }, - { - name: 'InPhags_pa', - bmp: '\uA840-\uA87F' - }, - { - name: 'InPhaistos_Disc', - astral: '\uD800[\uDDD0-\uDDFF]' - }, - { - name: 'InPhoenician', - astral: '\uD802[\uDD00-\uDD1F]' - }, - { - name: 'InPhonetic_Extensions', - bmp: '\u1D00-\u1D7F' - }, - { - name: 'InPhonetic_Extensions_Supplement', - bmp: '\u1D80-\u1DBF' - }, - { - name: 'InPlaying_Cards', - astral: '\uD83C[\uDCA0-\uDCFF]' - }, - { - name: 'InPrivate_Use_Area', - bmp: '\uE000-\uF8FF' - }, - { - name: 'InPsalter_Pahlavi', - astral: '\uD802[\uDF80-\uDFAF]' - }, - { - name: 'InRejang', - bmp: '\uA930-\uA95F' - }, - { - name: 'InRumi_Numeral_Symbols', - astral: '\uD803[\uDE60-\uDE7F]' - }, - { - name: 'InRunic', - bmp: '\u16A0-\u16FF' - }, - { - name: 'InSamaritan', - bmp: '\u0800-\u083F' - }, - { - name: 'InSaurashtra', - bmp: '\uA880-\uA8DF' - }, - { - name: 'InSharada', - astral: '\uD804[\uDD80-\uDDDF]' - }, - { - name: 'InShavian', - astral: '\uD801[\uDC50-\uDC7F]' - }, - { - name: 'InShorthand_Format_Controls', - astral: '\uD82F[\uDCA0-\uDCAF]' - }, - { - name: 'InSiddham', - astral: '\uD805[\uDD80-\uDDFF]' - }, - { - name: 'InSinhala', - bmp: '\u0D80-\u0DFF' - }, - { - name: 'InSinhala_Archaic_Numbers', - astral: '\uD804[\uDDE0-\uDDFF]' - }, - { - name: 'InSmall_Form_Variants', - bmp: '\uFE50-\uFE6F' - }, - { - name: 'InSora_Sompeng', - astral: '\uD804[\uDCD0-\uDCFF]' - }, - { - name: 'InSpacing_Modifier_Letters', - bmp: '\u02B0-\u02FF' - }, - { - name: 'InSpecials', - bmp: '\uFFF0-\uFFFF' - }, - { - name: 'InSundanese', - bmp: '\u1B80-\u1BBF' - }, - { - name: 'InSundanese_Supplement', - bmp: '\u1CC0-\u1CCF' - }, - { - name: 'InSuperscripts_and_Subscripts', - bmp: '\u2070-\u209F' - }, - { - name: 'InSupplemental_Arrows_A', - bmp: '\u27F0-\u27FF' - }, - { - name: 'InSupplemental_Arrows_B', - bmp: '\u2900-\u297F' - }, - { - name: 'InSupplemental_Arrows_C', - astral: '\uD83E[\uDC00-\uDCFF]' - }, - { - name: 'InSupplemental_Mathematical_Operators', - bmp: '\u2A00-\u2AFF' - }, - { - name: 'InSupplemental_Punctuation', - bmp: '\u2E00-\u2E7F' - }, - { - name: 'InSupplemental_Symbols_and_Pictographs', - astral: '\uD83E[\uDD00-\uDDFF]' - }, - { - name: 'InSupplementary_Private_Use_Area_A', - astral: '[\uDB80-\uDBBF][\uDC00-\uDFFF]' - }, - { - name: 'InSupplementary_Private_Use_Area_B', - astral: '[\uDBC0-\uDBFF][\uDC00-\uDFFF]' - }, - { - name: 'InSutton_SignWriting', - astral: '\uD836[\uDC00-\uDEAF]' - }, - { - name: 'InSyloti_Nagri', - bmp: '\uA800-\uA82F' - }, - { - name: 'InSyriac', - bmp: '\u0700-\u074F' - }, - { - name: 'InTagalog', - bmp: '\u1700-\u171F' - }, - { - name: 'InTagbanwa', - bmp: '\u1760-\u177F' - }, - { - name: 'InTags', - astral: '\uDB40[\uDC00-\uDC7F]' - }, - { - name: 'InTai_Le', - bmp: '\u1950-\u197F' - }, - { - name: 'InTai_Tham', - bmp: '\u1A20-\u1AAF' - }, - { - name: 'InTai_Viet', - bmp: '\uAA80-\uAADF' - }, - { - name: 'InTai_Xuan_Jing_Symbols', - astral: '\uD834[\uDF00-\uDF5F]' - }, - { - name: 'InTakri', - astral: '\uD805[\uDE80-\uDECF]' - }, - { - name: 'InTamil', - bmp: '\u0B80-\u0BFF' - }, - { - name: 'InTelugu', - bmp: '\u0C00-\u0C7F' - }, - { - name: 'InThaana', - bmp: '\u0780-\u07BF' - }, - { - name: 'InThai', - bmp: '\u0E00-\u0E7F' - }, - { - name: 'InTibetan', - bmp: '\u0F00-\u0FFF' - }, - { - name: 'InTifinagh', - bmp: '\u2D30-\u2D7F' - }, - { - name: 'InTirhuta', - astral: '\uD805[\uDC80-\uDCDF]' - }, - { - name: 'InTransport_and_Map_Symbols', - astral: '\uD83D[\uDE80-\uDEFF]' - }, - { - name: 'InUgaritic', - astral: '\uD800[\uDF80-\uDF9F]' - }, - { - name: 'InUnified_Canadian_Aboriginal_Syllabics', - bmp: '\u1400-\u167F' - }, - { - name: 'InUnified_Canadian_Aboriginal_Syllabics_Extended', - bmp: '\u18B0-\u18FF' - }, - { - name: 'InVai', - bmp: '\uA500-\uA63F' - }, - { - name: 'InVariation_Selectors', - bmp: '\uFE00-\uFE0F' - }, - { - name: 'InVariation_Selectors_Supplement', - astral: '\uDB40[\uDD00-\uDDEF]' - }, - { - name: 'InVedic_Extensions', - bmp: '\u1CD0-\u1CFF' - }, - { - name: 'InVertical_Forms', - bmp: '\uFE10-\uFE1F' - }, - { - name: 'InWarang_Citi', - astral: '\uD806[\uDCA0-\uDCFF]' - }, - { - name: 'InYi_Radicals', - bmp: '\uA490-\uA4CF' - }, - { - name: 'InYi_Syllables', - bmp: '\uA000-\uA48F' - }, - { - name: 'InYijing_Hexagram_Symbols', - bmp: '\u4DC0-\u4DFF' - } - ]); - -}; diff --git a/node_modules/xregexp/src/addons/unicode-categories.js b/node_modules/xregexp/src/addons/unicode-categories.js deleted file mode 100644 index 6da732f..0000000 --- a/node_modules/xregexp/src/addons/unicode-categories.js +++ /dev/null @@ -1,235 +0,0 @@ -/*! - * XRegExp Unicode Categories 3.1.0 - * - * Steven Levithan (c) 2010-2016 MIT License - * Unicode data by Mathias Bynens - */ - -/** - * Adds support for Unicode's general categories. E.g., `\p{Lu}` or `\p{Uppercase Letter}`. See - * category descriptions in UAX #44 . Token names - * are case insensitive, and any spaces, hyphens, and underscores are ignored. - * - * Uses Unicode 8.0.0. - * - * @requires XRegExp, Unicode Base - */ -module.exports = function(XRegExp) { - 'use strict'; - - if (!XRegExp.addUnicodeData) { - throw new ReferenceError('Unicode Base must be loaded before Unicode Categories'); - } - - XRegExp.addUnicodeData([ - { - name: 'C', - alias: 'Other', - isBmpLast: true, - bmp: '\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u0380-\u0383\u038B\u038D\u03A2\u0530\u0557\u0558\u0560\u0588\u058B\u058C\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08B5-\u08E2\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0AF8\u0AFA-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0BFF\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D00\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5E\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F6\u13F7\u13FE\u13FF\u169D-\u169F\u16F9-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180E\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE\u1AAF\u1ABF-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7\u1CFA-\u1CFF\u1DF6-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BF-\u20CF\u20F1-\u20FF\u218C-\u218F\u23FB-\u23FF\u2427-\u243F\u244B-\u245F\u2B74\u2B75\u2B96\u2B97\u2BBA-\u2BBC\u2BC9\u2BD2-\u2BEB\u2BF0-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E43-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FD6-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA6F8-\uA6FF\uA7AE\uA7AF\uA7B8-\uA7F6\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FE\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB66-\uAB6F\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF', - astral: '\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD73-\uDD7A\uDDE9-\uDDFF\uDE46-\uDEFF\uDF57-\uDF5F\uDF72-\uDFFF]|\uD836[\uDE8C-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD6F\uDD9B-\uDDE5\uDE03-\uDE0F\uDE3B-\uDE3F\uDE49-\uDE4F\uDE52-\uDEFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6D\uDE70-\uDECF\uDEEE\uDEEF\uDEF6-\uDEFF\uDF46-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD809[\uDC6F\uDC75-\uDC7F\uDD44-\uDFFF]|\uD81B[\uDC00-\uDEFF\uDF45-\uDF4F\uDF7F-\uDF8E\uDFA0-\uDFFF]|\uD86E[\uDC1E\uDC1F]|\uD83D[\uDD7A\uDDA4\uDED1-\uDEDF\uDEED-\uDEEF\uDEF4-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD70-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8D-\uDD8F\uDD9C-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2F\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD869[\uDED7-\uDEFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC70-\uDC7E\uDCBD\uDCC2-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD44-\uDD4F\uDD77-\uDD7F\uDDCE\uDDCF\uDDE0\uDDF5-\uDDFF\uDE12\uDE3E-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF3B\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD86D[\uDF35-\uDF3F]|[\uD807\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD81C-\uD82B\uD82D\uD82E\uD830-\uD833\uD837-\uD839\uD83F\uD874-\uD87D\uD87F-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD806[\uDC00-\uDC9F\uDCF3-\uDCFE\uDD00-\uDEBF\uDEF9-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD00-\uDE5F\uDE7F-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD805[\uDC00-\uDC7F\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDDE-\uDDFF\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB8-\uDEBF\uDECA-\uDEFF\uDF1A-\uDF1C\uDF2C-\uDF2F\uDF40-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE34-\uDE37\uDE3B-\uDE3E\uDE48-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A\uDC9B\uDCA0-\uDFFF]|\uD82C[\uDC02-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDD0F\uDD19-\uDD7F\uDD85-\uDDBF\uDDC1-\uDFFF]|\uD873[\uDEA2-\uDFFF]' - }, - { - name: 'Cc', - alias: 'Control', - bmp: '\0-\x1F\x7F-\x9F' - }, - { - name: 'Cf', - alias: 'Format', - bmp: '\xAD\u0600-\u0605\u061C\u06DD\u070F\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB', - astral: '\uDB40[\uDC01\uDC20-\uDC7F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uD804\uDCBD' - }, - { - name: 'Cn', - alias: 'Unassigned', - bmp: '\u0378\u0379\u0380-\u0383\u038B\u038D\u03A2\u0530\u0557\u0558\u0560\u0588\u058B\u058C\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u05FF\u061D\u070E\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08B5-\u08E2\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0AF8\u0AFA-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0BFF\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D00\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5E\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F6\u13F7\u13FE\u13FF\u169D-\u169F\u16F9-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE\u1AAF\u1ABF-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7\u1CFA-\u1CFF\u1DF6-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u2065\u2072\u2073\u208F\u209D-\u209F\u20BF-\u20CF\u20F1-\u20FF\u218C-\u218F\u23FB-\u23FF\u2427-\u243F\u244B-\u245F\u2B74\u2B75\u2B96\u2B97\u2BBA-\u2BBC\u2BC9\u2BD2-\u2BEB\u2BF0-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E43-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FD6-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA6F8-\uA6FF\uA7AE\uA7AF\uA7B8-\uA7F6\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FE\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB66-\uAB6F\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD\uFEFE\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFF8\uFFFE\uFFFF', - astral: '\uDB40[\uDC00\uDC02-\uDC1F\uDC80-\uDCFF\uDDF0-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDDE9-\uDDFF\uDE46-\uDEFF\uDF57-\uDF5F\uDF72-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD6F\uDD9B-\uDDE5\uDE03-\uDE0F\uDE3B-\uDE3F\uDE49-\uDE4F\uDE52-\uDEFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6D\uDE70-\uDECF\uDEEE\uDEEF\uDEF6-\uDEFF\uDF46-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD809[\uDC6F\uDC75-\uDC7F\uDD44-\uDFFF]|\uD81B[\uDC00-\uDEFF\uDF45-\uDF4F\uDF7F-\uDF8E\uDFA0-\uDFFF]|\uD86E[\uDC1E\uDC1F]|\uD83D[\uDD7A\uDDA4\uDED1-\uDEDF\uDEED-\uDEEF\uDEF4-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD70-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8D-\uDD8F\uDD9C-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2F\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD869[\uDED7-\uDEFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|[\uDBBF\uDBFF][\uDFFE\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A\uDC9B\uDCA4-\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD86D[\uDF35-\uDF3F]|[\uD807\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD81C-\uD82B\uD82D\uD82E\uD830-\uD833\uD837-\uD839\uD83F\uD874-\uD87D\uD87F-\uDB3F\uDB41-\uDB7F][\uDC00-\uDFFF]|\uD806[\uDC00-\uDC9F\uDCF3-\uDCFE\uDD00-\uDEBF\uDEF9-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD00-\uDE5F\uDE7F-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD836[\uDE8C-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD805[\uDC00-\uDC7F\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDDE-\uDDFF\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB8-\uDEBF\uDECA-\uDEFF\uDF1A-\uDF1C\uDF2C-\uDF2F\uDF40-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE34-\uDE37\uDE3B-\uDE3E\uDE48-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC70-\uDC7E\uDCC2-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD44-\uDD4F\uDD77-\uDD7F\uDDCE\uDDCF\uDDE0\uDDF5-\uDDFF\uDE12\uDE3E-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF3B\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD82C[\uDC02-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDD0F\uDD19-\uDD7F\uDD85-\uDDBF\uDDC1-\uDFFF]|\uD873[\uDEA2-\uDFFF]' - }, - { - name: 'Co', - alias: 'Private_Use', - bmp: '\uE000-\uF8FF', - astral: '[\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uDBBF\uDBFF][\uDC00-\uDFFD]' - }, - { - name: 'Cs', - alias: 'Surrogate', - bmp: '\uD800-\uDFFF' - }, - { - name: 'L', - alias: 'Letter', - bmp: 'A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC', - astral: '\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD83A[\uDC00-\uDCC4]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD80D[\uDC00-\uDC2E]|\uD87E[\uDC00-\uDE1D]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD809[\uDC80-\uDD43]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD808[\uDC00-\uDF99]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD811[\uDC00-\uDE46]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD82C[\uDC00\uDC01]|\uD873[\uDC00-\uDEA1]' - }, - { - name: 'Ll', - alias: 'Lowercase_Letter', - bmp: 'a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0561-\u0587\u13F8-\u13FD\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7B5\uA7B7\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A', - astral: '\uD803[\uDCC0-\uDCF2]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD801[\uDC28-\uDC4F]|\uD806[\uDCC0-\uDCDF]' - }, - { - name: 'Lm', - alias: 'Modifier_Letter', - bmp: '\u02B0-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0374\u037A\u0559\u0640\u06E5\u06E6\u07F4\u07F5\u07FA\u081A\u0824\u0828\u0971\u0E46\u0EC6\u10FC\u17D7\u1843\u1AA7\u1C78-\u1C7D\u1D2C-\u1D6A\u1D78\u1D9B-\u1DBF\u2071\u207F\u2090-\u209C\u2C7C\u2C7D\u2D6F\u2E2F\u3005\u3031-\u3035\u303B\u309D\u309E\u30FC-\u30FE\uA015\uA4F8-\uA4FD\uA60C\uA67F\uA69C\uA69D\uA717-\uA71F\uA770\uA788\uA7F8\uA7F9\uA9CF\uA9E6\uAA70\uAADD\uAAF3\uAAF4\uAB5C-\uAB5F\uFF70\uFF9E\uFF9F', - astral: '\uD81A[\uDF40-\uDF43]|\uD81B[\uDF93-\uDF9F]' - }, - { - name: 'Lo', - alias: 'Other_Letter', - bmp: '\xAA\xBA\u01BB\u01C0-\u01C3\u0294\u05D0-\u05EA\u05F0-\u05F2\u0620-\u063F\u0641-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u0800-\u0815\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0972-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E45\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10D0-\u10FA\u10FD-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17DC\u1820-\u1842\u1844-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C77\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u2135-\u2138\u2D30-\u2D67\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3006\u303C\u3041-\u3096\u309F\u30A1-\u30FA\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA014\uA016-\uA48C\uA4D0-\uA4F7\uA500-\uA60B\uA610-\uA61F\uA62A\uA62B\uA66E\uA6A0-\uA6E5\uA78F\uA7F7\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9E0-\uA9E4\uA9E7-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA6F\uAA71-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB\uAADC\uAAE0-\uAAEA\uAAF2\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF66-\uFF6F\uFF71-\uFF9D\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC', - astral: '\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD83A[\uDC00-\uDCC4]|\uD803[\uDC00-\uDC48]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD80D[\uDC00-\uDC2E]|\uD87E[\uDC00-\uDE1D]|\uD81B[\uDF00-\uDF44\uDF50]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCFF\uDEC0-\uDEF8]|\uD809[\uDC80-\uDD43]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD808[\uDC00-\uDF99]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF63-\uDF77\uDF7D-\uDF8F]|\uD801[\uDC50-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD811[\uDC00-\uDE46]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD82C[\uDC00\uDC01]|\uD873[\uDC00-\uDEA1]' - }, - { - name: 'Lt', - alias: 'Titlecase_Letter', - bmp: '\u01C5\u01C8\u01CB\u01F2\u1F88-\u1F8F\u1F98-\u1F9F\u1FA8-\u1FAF\u1FBC\u1FCC\u1FFC' - }, - { - name: 'Lu', - alias: 'Uppercase_Letter', - bmp: 'A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A', - astral: '\uD806[\uDCA0-\uDCBF]|\uD803[\uDC80-\uDCB2]|\uD801[\uDC00-\uDC27]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]' - }, - { - name: 'M', - alias: 'Mark', - bmp: '\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F', - astral: '\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDCA-\uDDCC\uDE2C-\uDE37\uDEDF-\uDEEA\uDF00-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD82F[\uDC9D\uDC9E]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]' - }, - { - name: 'Mc', - alias: 'Spacing_Mark', - bmp: '\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BE-\u09C0\u09C7\u09C8\u09CB\u09CC\u09D7\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD7\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0-\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0D02\u0D03\u0D3E-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D57\u0D82\u0D83\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DF2\u0DF3\u0F3E\u0F3F\u0F7F\u102B\u102C\u1031\u1038\u103B\u103C\u1056\u1057\u1062-\u1064\u1067-\u106D\u1083\u1084\u1087-\u108C\u108F\u109A-\u109C\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1B04\u1B35\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF2\u1CF3\u302E\u302F\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BD-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAA7B\uAA7D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC', - astral: '\uD834[\uDD65\uDD66\uDD6D-\uDD72]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3E\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63]|\uD805[\uDCB0-\uDCB2\uDCB9\uDCBB-\uDCBE\uDCC1\uDDAF-\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF20\uDF21\uDF26]|\uD81B[\uDF51-\uDF7E]' - }, - { - name: 'Me', - alias: 'Enclosing_Mark', - bmp: '\u0488\u0489\u1ABE\u20DD-\u20E0\u20E2-\u20E4\uA670-\uA672' - }, - { - name: 'Mn', - alias: 'Nonspacing_Mark', - bmp: '\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D01\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABD\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F', - astral: '\uD805[\uDCB3-\uDCB8\uDCBA\uDCBF\uDCC0\uDCC2\uDCC3\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDCA-\uDDCC\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3C\uDF40\uDF66-\uDF6C\uDF70-\uDF74]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]' - }, - { - name: 'N', - alias: 'Number', - bmp: '0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19', - astral: '\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD803[\uDCFA-\uDCFF\uDE60-\uDE7E]|\uD835[\uDFCE-\uDFFF]|\uD83A[\uDCC7-\uDCCF]|\uD81A[\uDE60-\uDE69\uDF50-\uDF59\uDF5B-\uDF61]|\uD806[\uDCE0-\uDCF2]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD834[\uDF60-\uDF71]|\uD83C[\uDD00-\uDD0C]|\uD809[\uDC00-\uDC6E]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE47\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD805[\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]' - }, - { - name: 'Nd', - alias: 'Decimal_Number', - bmp: '0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19', - astral: '\uD801[\uDCA0-\uDCA9]|\uD835[\uDFCE-\uDFFF]|\uD805[\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF39]|\uD806[\uDCE0-\uDCE9]|\uD804[\uDC66-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDEF0-\uDEF9]|\uD81A[\uDE60-\uDE69\uDF50-\uDF59]' - }, - { - name: 'Nl', - alias: 'Letter_Number', - bmp: '\u16EE-\u16F0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303A\uA6E6-\uA6EF', - astral: '\uD809[\uDC00-\uDC6E]|\uD800[\uDD40-\uDD74\uDF41\uDF4A\uDFD1-\uDFD5]' - }, - { - name: 'No', - alias: 'Other_Number', - bmp: '\xB2\xB3\xB9\xBC-\xBE\u09F4-\u09F9\u0B72-\u0B77\u0BF0-\u0BF2\u0C78-\u0C7E\u0D70-\u0D75\u0F2A-\u0F33\u1369-\u137C\u17F0-\u17F9\u19DA\u2070\u2074-\u2079\u2080-\u2089\u2150-\u215F\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA830-\uA835', - astral: '\uD804[\uDC52-\uDC65\uDDE1-\uDDF4]|\uD803[\uDCFA-\uDCFF\uDE60-\uDE7E]|\uD83C[\uDD00-\uDD0C]|\uD806[\uDCEA-\uDCF2]|\uD83A[\uDCC7-\uDCCF]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE47\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD805[\uDF3A\uDF3B]|\uD81A[\uDF5B-\uDF61]|\uD834[\uDF60-\uDF71]|\uD800[\uDD07-\uDD33\uDD75-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23]' - }, - { - name: 'P', - alias: 'Punctuation', - bmp: '\x21-\x23\x25-\\x2A\x2C-\x2F\x3A\x3B\\x3F\x40\\x5B-\\x5D\x5F\\x7B\x7D\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65', - astral: '\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD809[\uDC70-\uDC74]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD836[\uDE87-\uDE8B]|\uD801\uDD6F|\uD82F\uDC9F|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]' - }, - { - name: 'Pc', - alias: 'Connector_Punctuation', - bmp: '\x5F\u203F\u2040\u2054\uFE33\uFE34\uFE4D-\uFE4F\uFF3F' - }, - { - name: 'Pd', - alias: 'Dash_Punctuation', - bmp: '\\x2D\u058A\u05BE\u1400\u1806\u2010-\u2015\u2E17\u2E1A\u2E3A\u2E3B\u2E40\u301C\u3030\u30A0\uFE31\uFE32\uFE58\uFE63\uFF0D' - }, - { - name: 'Pe', - alias: 'Close_Punctuation', - bmp: '\\x29\\x5D\x7D\u0F3B\u0F3D\u169C\u2046\u207E\u208E\u2309\u230B\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E23\u2E25\u2E27\u2E29\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFD3E\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF3D\uFF5D\uFF60\uFF63' - }, - { - name: 'Pf', - alias: 'Final_Punctuation', - bmp: '\xBB\u2019\u201D\u203A\u2E03\u2E05\u2E0A\u2E0D\u2E1D\u2E21' - }, - { - name: 'Pi', - alias: 'Initial_Punctuation', - bmp: '\xAB\u2018\u201B\u201C\u201F\u2039\u2E02\u2E04\u2E09\u2E0C\u2E1C\u2E20' - }, - { - name: 'Po', - alias: 'Other_Punctuation', - bmp: '\x21-\x23\x25-\x27\\x2A\x2C\\x2E\x2F\x3A\x3B\\x3F\x40\\x5C\xA1\xA7\xB6\xB7\xBF\u037E\u0387\u055A-\u055F\u0589\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u166D\u166E\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u1805\u1807-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2016\u2017\u2020-\u2027\u2030-\u2038\u203B-\u203E\u2041-\u2043\u2047-\u2051\u2053\u2055-\u205E\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00\u2E01\u2E06-\u2E08\u2E0B\u2E0E-\u2E16\u2E18\u2E19\u2E1B\u2E1E\u2E1F\u2E2A-\u2E2E\u2E30-\u2E39\u2E3C-\u2E3F\u2E41\u3001-\u3003\u303D\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFE10-\uFE16\uFE19\uFE30\uFE45\uFE46\uFE49-\uFE4C\uFE50-\uFE52\uFE54-\uFE57\uFE5F-\uFE61\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF07\uFF0A\uFF0C\uFF0E\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3C\uFF61\uFF64\uFF65', - astral: '\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD809[\uDC70-\uDC74]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD836[\uDE87-\uDE8B]|\uD801\uDD6F|\uD82F\uDC9F|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]' - }, - { - name: 'Ps', - alias: 'Open_Punctuation', - bmp: '\\x28\\x5B\\x7B\u0F3A\u0F3C\u169B\u201A\u201E\u2045\u207D\u208D\u2308\u230A\u2329\u2768\u276A\u276C\u276E\u2770\u2772\u2774\u27C5\u27E6\u27E8\u27EA\u27EC\u27EE\u2983\u2985\u2987\u2989\u298B\u298D\u298F\u2991\u2993\u2995\u2997\u29D8\u29DA\u29FC\u2E22\u2E24\u2E26\u2E28\u2E42\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u3018\u301A\u301D\uFD3F\uFE17\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE47\uFE59\uFE5B\uFE5D\uFF08\uFF3B\uFF5B\uFF5F\uFF62' - }, - { - name: 'S', - alias: 'Symbol', - bmp: '\\x24\\x2B\x3C-\x3E\\x5E\x60\\x7C\x7E\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BE\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u23FA\u2400-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B98-\u2BB9\u2BBD-\u2BC8\u2BCA-\u2BD1\u2BEC-\u2BEF\u2CE5-\u2CEA\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u32FE\u3300-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD', - astral: '\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD10-\uDD2E\uDD30-\uDD6B\uDD70-\uDD9A\uDDE6-\uDE02\uDE10-\uDE3A\uDE40-\uDE48\uDE50\uDE51\uDF00-\uDFFF]|\uD83D[\uDC00-\uDD79\uDD7B-\uDDA3\uDDA5-\uDED0\uDEE0-\uDEEC\uDEF0-\uDEF3\uDF00-\uDF73\uDF80-\uDFD4]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C\uDD90-\uDD9B\uDDA0\uDDD0-\uDDFC]|\uD82F\uDC9C|\uD805\uDF3F|\uD802[\uDC77\uDC78\uDEC8]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD83B[\uDEF0\uDEF1]' - }, - { - name: 'Sc', - alias: 'Currency_Symbol', - bmp: '\\x24\xA2-\xA5\u058F\u060B\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20BE\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6' - }, - { - name: 'Sk', - alias: 'Modifier_Symbol', - bmp: '\\x5E\x60\xA8\xAF\xB4\xB8\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u309B\u309C\uA700-\uA716\uA720\uA721\uA789\uA78A\uAB5B\uFBB2-\uFBC1\uFF3E\uFF40\uFFE3', - astral: '\uD83C[\uDFFB-\uDFFF]' - }, - { - name: 'Sm', - alias: 'Math_Symbol', - bmp: '\\x2B\x3C-\x3E\\x7C\x7E\xAC\xB1\xD7\xF7\u03F6\u0606-\u0608\u2044\u2052\u207A-\u207C\u208A-\u208C\u2118\u2140-\u2144\u214B\u2190-\u2194\u219A\u219B\u21A0\u21A3\u21A6\u21AE\u21CE\u21CF\u21D2\u21D4\u21F4-\u22FF\u2320\u2321\u237C\u239B-\u23B3\u23DC-\u23E1\u25B7\u25C1\u25F8-\u25FF\u266F\u27C0-\u27C4\u27C7-\u27E5\u27F0-\u27FF\u2900-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2AFF\u2B30-\u2B44\u2B47-\u2B4C\uFB29\uFE62\uFE64-\uFE66\uFF0B\uFF1C-\uFF1E\uFF5C\uFF5E\uFFE2\uFFE9-\uFFEC', - astral: '\uD83B[\uDEF0\uDEF1]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]' - }, - { - name: 'So', - alias: 'Other_Symbol', - bmp: '\xA6\xA9\xAE\xB0\u0482\u058D\u058E\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u09FA\u0B70\u0BF3-\u0BF8\u0BFA\u0C7F\u0D79\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116\u2117\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u214A\u214C\u214D\u214F\u218A\u218B\u2195-\u2199\u219C-\u219F\u21A1\u21A2\u21A4\u21A5\u21A7-\u21AD\u21AF-\u21CD\u21D0\u21D1\u21D3\u21D5-\u21F3\u2300-\u2307\u230C-\u231F\u2322-\u2328\u232B-\u237B\u237D-\u239A\u23B4-\u23DB\u23E2-\u23FA\u2400-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u25B6\u25B8-\u25C0\u25C2-\u25F7\u2600-\u266E\u2670-\u2767\u2794-\u27BF\u2800-\u28FF\u2B00-\u2B2F\u2B45\u2B46\u2B4D-\u2B73\u2B76-\u2B95\u2B98-\u2BB9\u2BBD-\u2BC8\u2BCA-\u2BD1\u2BEC-\u2BEF\u2CE5-\u2CEA\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u32FE\u3300-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA828-\uA82B\uA836\uA837\uA839\uAA77-\uAA79\uFDFD\uFFE4\uFFE8\uFFED\uFFEE\uFFFC\uFFFD', - astral: '\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83D[\uDC00-\uDD79\uDD7B-\uDDA3\uDDA5-\uDED0\uDEE0-\uDEEC\uDEF0-\uDEF3\uDF00-\uDF73\uDF80-\uDFD4]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD10-\uDD2E\uDD30-\uDD6B\uDD70-\uDD9A\uDDE6-\uDE02\uDE10-\uDE3A\uDE40-\uDE48\uDE50\uDE51\uDF00-\uDFFA]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C\uDD90-\uDD9B\uDDA0\uDDD0-\uDDFC]|\uD82F\uDC9C|\uD805\uDF3F|\uD802[\uDC77\uDC78\uDEC8]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]' - }, - { - name: 'Z', - alias: 'Separator', - bmp: '\x20\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000' - }, - { - name: 'Zl', - alias: 'Line_Separator', - bmp: '\u2028' - }, - { - name: 'Zp', - alias: 'Paragraph_Separator', - bmp: '\u2029' - }, - { - name: 'Zs', - alias: 'Space_Separator', - bmp: '\x20\xA0\u1680\u2000-\u200A\u202F\u205F\u3000' - } - ]); - -}; diff --git a/node_modules/xregexp/src/addons/unicode-properties.js b/node_modules/xregexp/src/addons/unicode-properties.js deleted file mode 100644 index 92a041b..0000000 --- a/node_modules/xregexp/src/addons/unicode-properties.js +++ /dev/null @@ -1,105 +0,0 @@ -/*! - * XRegExp Unicode Properties 3.1.0 - * - * Steven Levithan (c) 2012-2016 MIT License - * Unicode data by Mathias Bynens - */ - -/** - * Adds properties to meet the UTS #18 Level 1 RL1.2 requirements for Unicode regex support. See - * . Following are definitions of these properties from UAX - * #44 : - * - * - Alphabetic - * Characters with the Alphabetic property. Generated from: Lowercase + Uppercase + Lt + Lm + Lo + - * Nl + Other_Alphabetic. - * - * - Default_Ignorable_Code_Point - * For programmatic determination of default ignorable code points. New characters that should be - * ignored in rendering (unless explicitly supported) will be assigned in these ranges, permitting - * programs to correctly handle the default rendering of such characters when not otherwise - * supported. - * - * - Lowercase - * Characters with the Lowercase property. Generated from: Ll + Other_Lowercase. - * - * - Noncharacter_Code_Point - * Code points permanently reserved for internal use. - * - * - Uppercase - * Characters with the Uppercase property. Generated from: Lu + Other_Uppercase. - * - * - White_Space - * Spaces, separator characters and other control characters which should be treated by - * programming languages as "white space" for the purpose of parsing elements. - * - * The properties ASCII, Any, and Assigned are also included but are not defined in UAX #44. UTS #18 - * RL1.2 additionally requires support for Unicode scripts and general categories. These are - * included in XRegExp's Unicode Categories and Unicode Scripts addons. - * - * Token names are case insensitive, and any spaces, hyphens, and underscores are ignored. - * - * Uses Unicode 8.0.0. - * - * @requires XRegExp, Unicode Base - */ -module.exports = function(XRegExp) { - 'use strict'; - - if (!XRegExp.addUnicodeData) { - throw new ReferenceError('Unicode Base must be loaded before Unicode Properties'); - } - - var unicodeData = [ - { - name: 'ASCII', - bmp: '\0-\x7F' - }, - { - name: 'Alphabetic', - bmp: 'A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0345\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05B0-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0657\u0659-\u065F\u066E-\u06D3\u06D5-\u06DC\u06E1-\u06E8\u06ED-\u06EF\u06FA-\u06FC\u06FF\u0710-\u073F\u074D-\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0817\u081A-\u082C\u0840-\u0858\u08A0-\u08B4\u08E3-\u08E9\u08F0-\u093B\u093D-\u094C\u094E-\u0950\u0955-\u0963\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C4\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09F0\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A42\u0A47\u0A48\u0A4B\u0A4C\u0A51\u0A59-\u0A5C\u0A5E\u0A70-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC5\u0AC7-\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0-\u0AE3\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D-\u0B44\u0B47\u0B48\u0B4B\u0B4C\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4C\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCC\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D57\u0D5F-\u0D63\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E46\u0E4D\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0ECD\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F71-\u0F81\u0F88-\u0F97\u0F99-\u0FBC\u1000-\u1036\u1038\u103B-\u103F\u1050-\u1062\u1065-\u1068\u106E-\u1086\u108E\u109C\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1713\u1720-\u1733\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17B3\u17B6-\u17C8\u17D7\u17DC\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u1938\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A1B\u1A20-\u1A5E\u1A61-\u1A74\u1AA7\u1B00-\u1B33\u1B35-\u1B43\u1B45-\u1B4B\u1B80-\u1BA9\u1BAC-\u1BAF\u1BBA-\u1BE5\u1BE7-\u1BF1\u1C00-\u1C35\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1D00-\u1DBF\u1DE7-\u1DF4\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u24B6-\u24E9\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA674-\uA67B\uA67F-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA827\uA840-\uA873\uA880-\uA8C3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA92A\uA930-\uA952\uA960-\uA97C\uA980-\uA9B2\uA9B4-\uA9BF\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA60-\uAA76\uAA7A\uAA7E-\uAABE\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC', - astral: '\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD804[\uDC00-\uDC45\uDC82-\uDCB8\uDCD0-\uDCE8\uDD00-\uDD32\uDD50-\uDD72\uDD76\uDD80-\uDDBF\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE34\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEE8\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D-\uDF44\uDF47\uDF48\uDF4B\uDF4C\uDF50\uDF57\uDF5D-\uDF63]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD83A[\uDC00-\uDCC4]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF36\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]|\uD80D[\uDC00-\uDC2E]|\uD87E[\uDC00-\uDE1D]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9E]|\uD808[\uDC00-\uDF99]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD805[\uDC80-\uDCC1\uDCC4\uDCC5\uDCC7\uDD80-\uDDB5\uDDB8-\uDDBE\uDDD8-\uDDDD\uDE00-\uDE3E\uDE40\uDE44\uDE80-\uDEB5\uDF00-\uDF19\uDF1D-\uDF2A]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD811[\uDC00-\uDE46]|\uD82C[\uDC00\uDC01]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF93-\uDF9F]|\uD873[\uDC00-\uDEA1]' - }, - { - name: 'Any', - isBmpLast: true, - bmp: '\0-\uFFFF', - astral: '[\uD800-\uDBFF][\uDC00-\uDFFF]' - }, - { - name: 'Default_Ignorable_Code_Point', - bmp: '\xAD\u034F\u061C\u115F\u1160\u17B4\u17B5\u180B-\u180E\u200B-\u200F\u202A-\u202E\u2060-\u206F\u3164\uFE00-\uFE0F\uFEFF\uFFA0\uFFF0-\uFFF8', - astral: '[\uDB40-\uDB43][\uDC00-\uDFFF]|\uD834[\uDD73-\uDD7A]|\uD82F[\uDCA0-\uDCA3]' - }, - { - name: 'Lowercase', - bmp: 'a-z\xAA\xB5\xBA\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02B8\u02C0\u02C1\u02E0-\u02E4\u0345\u0371\u0373\u0377\u037A-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0561-\u0587\u13F8-\u13FD\u1D00-\u1DBF\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u2071\u207F\u2090-\u209C\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2170-\u217F\u2184\u24D0-\u24E9\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7D\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B-\uA69D\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7B5\uA7B7\uA7F8-\uA7FA\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A', - astral: '\uD803[\uDCC0-\uDCF2]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD801[\uDC28-\uDC4F]|\uD806[\uDCC0-\uDCDF]' - }, - { - name: 'Noncharacter_Code_Point', - bmp: '\uFDD0-\uFDEF\uFFFE\uFFFF', - astral: '[\uDB3F\uDB7F\uDBBF\uDBFF\uD83F\uD87F\uD8BF\uDAFF\uD97F\uD9BF\uD9FF\uDA3F\uD8FF\uDABF\uDA7F\uD93F][\uDFFE\uDFFF]' - }, - { - name: 'Uppercase', - bmp: 'A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2160-\u216F\u2183\u24B6-\u24CF\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A', - astral: '\uD806[\uDCA0-\uDCBF]|\uD803[\uDC80-\uDCB2]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD801[\uDC00-\uDC27]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]' - }, - { - name: 'White_Space', - bmp: '\x09-\x0D\x20\x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000' - } - ]; - - // Add non-generated data - unicodeData.push({ - name: 'Assigned', - // Since this is defined as the inverse of Unicode category Cn (Unassigned), the Unicode - // Categories addon is required to use this property - inverseOf: 'Cn' - }); - - XRegExp.addUnicodeData(unicodeData); - -}; diff --git a/node_modules/xregexp/src/addons/unicode-scripts.js b/node_modules/xregexp/src/addons/unicode-scripts.js deleted file mode 100644 index bb28ec3..0000000 --- a/node_modules/xregexp/src/addons/unicode-scripts.js +++ /dev/null @@ -1,559 +0,0 @@ -/*! - * XRegExp Unicode Scripts 3.1.0 - * - * Steven Levithan (c) 2010-2016 MIT License - * Unicode data by Mathias Bynens - */ - -/** - * Adds support for all Unicode scripts. E.g., `\p{Latin}`. Token names are case insensitive, and - * any spaces, hyphens, and underscores are ignored. - * - * Uses Unicode 8.0.0. - * - * @requires XRegExp, Unicode Base - */ -module.exports = function(XRegExp) { - 'use strict'; - - if (!XRegExp.addUnicodeData) { - throw new ReferenceError('Unicode Base must be loaded before Unicode Scripts'); - } - - XRegExp.addUnicodeData([ - { - name: 'Ahom', - astral: '\uD805[\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF3F]' - }, - { - name: 'Anatolian_Hieroglyphs', - astral: '\uD811[\uDC00-\uDE46]' - }, - { - name: 'Arabic', - bmp: '\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u06FF\u0750-\u077F\u08A0-\u08B4\u08E3-\u08FF\uFB50-\uFBC1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFD\uFE70-\uFE74\uFE76-\uFEFC', - astral: '\uD803[\uDE60-\uDE7E]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]' - }, - { - name: 'Armenian', - bmp: '\u0531-\u0556\u0559-\u055F\u0561-\u0587\u058A\u058D-\u058F\uFB13-\uFB17' - }, - { - name: 'Avestan', - astral: '\uD802[\uDF00-\uDF35\uDF39-\uDF3F]' - }, - { - name: 'Balinese', - bmp: '\u1B00-\u1B4B\u1B50-\u1B7C' - }, - { - name: 'Bamum', - bmp: '\uA6A0-\uA6F7', - astral: '\uD81A[\uDC00-\uDE38]' - }, - { - name: 'Bassa_Vah', - astral: '\uD81A[\uDED0-\uDEED\uDEF0-\uDEF5]' - }, - { - name: 'Batak', - bmp: '\u1BC0-\u1BF3\u1BFC-\u1BFF' - }, - { - name: 'Bengali', - bmp: '\u0980-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FB' - }, - { - name: 'Bopomofo', - bmp: '\u02EA\u02EB\u3105-\u312D\u31A0-\u31BA' - }, - { - name: 'Brahmi', - astral: '\uD804[\uDC00-\uDC4D\uDC52-\uDC6F\uDC7F]' - }, - { - name: 'Braille', - bmp: '\u2800-\u28FF' - }, - { - name: 'Buginese', - bmp: '\u1A00-\u1A1B\u1A1E\u1A1F' - }, - { - name: 'Buhid', - bmp: '\u1740-\u1753' - }, - { - name: 'Canadian_Aboriginal', - bmp: '\u1400-\u167F\u18B0-\u18F5' - }, - { - name: 'Carian', - astral: '\uD800[\uDEA0-\uDED0]' - }, - { - name: 'Caucasian_Albanian', - astral: '\uD801[\uDD30-\uDD63\uDD6F]' - }, - { - name: 'Chakma', - astral: '\uD804[\uDD00-\uDD34\uDD36-\uDD43]' - }, - { - name: 'Cham', - bmp: '\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA5C-\uAA5F' - }, - { - name: 'Cherokee', - bmp: '\u13A0-\u13F5\u13F8-\u13FD\uAB70-\uABBF' - }, - { - name: 'Common', - bmp: '\0-\x40\\x5B-\x60\\x7B-\xA9\xAB-\xB9\xBB-\xBF\xD7\xF7\u02B9-\u02DF\u02E5-\u02E9\u02EC-\u02FF\u0374\u037E\u0385\u0387\u0589\u0605\u060C\u061B\u061C\u061F\u0640\u06DD\u0964\u0965\u0E3F\u0FD5-\u0FD8\u10FB\u16EB-\u16ED\u1735\u1736\u1802\u1803\u1805\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u2000-\u200B\u200E-\u2064\u2066-\u2070\u2074-\u207E\u2080-\u208E\u20A0-\u20BE\u2100-\u2125\u2127-\u2129\u212C-\u2131\u2133-\u214D\u214F-\u215F\u2189-\u218B\u2190-\u23FA\u2400-\u2426\u2440-\u244A\u2460-\u27FF\u2900-\u2B73\u2B76-\u2B95\u2B98-\u2BB9\u2BBD-\u2BC8\u2BCA-\u2BD1\u2BEC-\u2BEF\u2E00-\u2E42\u2FF0-\u2FFB\u3000-\u3004\u3006\u3008-\u3020\u3030-\u3037\u303C-\u303F\u309B\u309C\u30A0\u30FB\u30FC\u3190-\u319F\u31C0-\u31E3\u3220-\u325F\u327F-\u32CF\u3358-\u33FF\u4DC0-\u4DFF\uA700-\uA721\uA788-\uA78A\uA830-\uA839\uA92E\uA9CF\uAB5B\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFF70\uFF9E\uFF9F\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD', - astral: '\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD82F[\uDCA0-\uDCA3]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDFCB\uDFCE-\uDFFF]|\uDB40[\uDC01\uDC20-\uDC7F]|\uD83D[\uDC00-\uDD79\uDD7B-\uDDA3\uDDA5-\uDED0\uDEE0-\uDEEC\uDEF0-\uDEF3\uDF00-\uDF73\uDF80-\uDFD4]|\uD800[\uDD00-\uDD02\uDD07-\uDD33\uDD37-\uDD3F\uDD90-\uDD9B\uDDD0-\uDDFC\uDEE1-\uDEFB]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD66\uDD6A-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDF00-\uDF56\uDF60-\uDF71]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD00-\uDD0C\uDD10-\uDD2E\uDD30-\uDD6B\uDD70-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE10-\uDE3A\uDE40-\uDE48\uDE50\uDE51\uDF00-\uDFFF]' - }, - { - name: 'Coptic', - bmp: '\u03E2-\u03EF\u2C80-\u2CF3\u2CF9-\u2CFF' - }, - { - name: 'Cuneiform', - astral: '\uD809[\uDC00-\uDC6E\uDC70-\uDC74\uDC80-\uDD43]|\uD808[\uDC00-\uDF99]' - }, - { - name: 'Cypriot', - astral: '\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F]' - }, - { - name: 'Cyrillic', - bmp: '\u0400-\u0484\u0487-\u052F\u1D2B\u1D78\u2DE0-\u2DFF\uA640-\uA69F\uFE2E\uFE2F' - }, - { - name: 'Deseret', - astral: '\uD801[\uDC00-\uDC4F]' - }, - { - name: 'Devanagari', - bmp: '\u0900-\u0950\u0953-\u0963\u0966-\u097F\uA8E0-\uA8FD' - }, - { - name: 'Duployan', - astral: '\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9C-\uDC9F]' - }, - { - name: 'Egyptian_Hieroglyphs', - astral: '\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]' - }, - { - name: 'Elbasan', - astral: '\uD801[\uDD00-\uDD27]' - }, - { - name: 'Ethiopic', - bmp: '\u1200-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E' - }, - { - name: 'Georgian', - bmp: '\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u10FF\u2D00-\u2D25\u2D27\u2D2D' - }, - { - name: 'Glagolitic', - bmp: '\u2C00-\u2C2E\u2C30-\u2C5E' - }, - { - name: 'Gothic', - astral: '\uD800[\uDF30-\uDF4A]' - }, - { - name: 'Grantha', - astral: '\uD804[\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]' - }, - { - name: 'Greek', - bmp: '\u0370-\u0373\u0375-\u0377\u037A-\u037D\u037F\u0384\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03E1\u03F0-\u03FF\u1D26-\u1D2A\u1D5D-\u1D61\u1D66-\u1D6A\u1DBF\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u2126\uAB65', - astral: '\uD800[\uDD40-\uDD8C\uDDA0]|\uD834[\uDE00-\uDE45]' - }, - { - name: 'Gujarati', - bmp: '\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9' - }, - { - name: 'Gurmukhi', - bmp: '\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75' - }, - { - name: 'Han', - bmp: '\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3400-\u4DB5\u4E00-\u9FD5\uF900-\uFA6D\uFA70-\uFAD9', - astral: '\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD87E[\uDC00-\uDE1D]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD873[\uDC00-\uDEA1]' - }, - { - name: 'Hangul', - bmp: '\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC' - }, - { - name: 'Hanunoo', - bmp: '\u1720-\u1734' - }, - { - name: 'Hatran', - astral: '\uD802[\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDCFF]' - }, - { - name: 'Hebrew', - bmp: '\u0591-\u05C7\u05D0-\u05EA\u05F0-\u05F4\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4F' - }, - { - name: 'Hiragana', - bmp: '\u3041-\u3096\u309D-\u309F', - astral: '\uD82C\uDC01|\uD83C\uDE00' - }, - { - name: 'Imperial_Aramaic', - astral: '\uD802[\uDC40-\uDC55\uDC57-\uDC5F]' - }, - { - name: 'Inherited', - bmp: '\u0300-\u036F\u0485\u0486\u064B-\u0655\u0670\u0951\u0952\u1AB0-\u1ABE\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u200C\u200D\u20D0-\u20F0\u302A-\u302D\u3099\u309A\uFE00-\uFE0F\uFE20-\uFE2D', - astral: '\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD]|\uD800[\uDDFD\uDEE0]|\uDB40[\uDD00-\uDDEF]' - }, - { - name: 'Inscriptional_Pahlavi', - astral: '\uD802[\uDF60-\uDF72\uDF78-\uDF7F]' - }, - { - name: 'Inscriptional_Parthian', - astral: '\uD802[\uDF40-\uDF55\uDF58-\uDF5F]' - }, - { - name: 'Javanese', - bmp: '\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE\uA9DF' - }, - { - name: 'Kaithi', - astral: '\uD804[\uDC80-\uDCC1]' - }, - { - name: 'Kannada', - bmp: '\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2' - }, - { - name: 'Katakana', - bmp: '\u30A1-\u30FA\u30FD-\u30FF\u31F0-\u31FF\u32D0-\u32FE\u3300-\u3357\uFF66-\uFF6F\uFF71-\uFF9D', - astral: '\uD82C\uDC00' - }, - { - name: 'Kayah_Li', - bmp: '\uA900-\uA92D\uA92F' - }, - { - name: 'Kharoshthi', - astral: '\uD802[\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F-\uDE47\uDE50-\uDE58]' - }, - { - name: 'Khmer', - bmp: '\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u19E0-\u19FF' - }, - { - name: 'Khojki', - astral: '\uD804[\uDE00-\uDE11\uDE13-\uDE3D]' - }, - { - name: 'Khudawadi', - astral: '\uD804[\uDEB0-\uDEEA\uDEF0-\uDEF9]' - }, - { - name: 'Lao', - bmp: '\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF' - }, - { - name: 'Latin', - bmp: 'A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A' - }, - { - name: 'Lepcha', - bmp: '\u1C00-\u1C37\u1C3B-\u1C49\u1C4D-\u1C4F' - }, - { - name: 'Limbu', - bmp: '\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1940\u1944-\u194F' - }, - { - name: 'Linear_A', - astral: '\uD801[\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]' - }, - { - name: 'Linear_B', - astral: '\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA]' - }, - { - name: 'Lisu', - bmp: '\uA4D0-\uA4FF' - }, - { - name: 'Lycian', - astral: '\uD800[\uDE80-\uDE9C]' - }, - { - name: 'Lydian', - astral: '\uD802[\uDD20-\uDD39\uDD3F]' - }, - { - name: 'Mahajani', - astral: '\uD804[\uDD50-\uDD76]' - }, - { - name: 'Malayalam', - bmp: '\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D75\u0D79-\u0D7F' - }, - { - name: 'Mandaic', - bmp: '\u0840-\u085B\u085E' - }, - { - name: 'Manichaean', - astral: '\uD802[\uDEC0-\uDEE6\uDEEB-\uDEF6]' - }, - { - name: 'Meetei_Mayek', - bmp: '\uAAE0-\uAAF6\uABC0-\uABED\uABF0-\uABF9' - }, - { - name: 'Mende_Kikakui', - astral: '\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6]' - }, - { - name: 'Meroitic_Cursive', - astral: '\uD802[\uDDA0-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDDFF]' - }, - { - name: 'Meroitic_Hieroglyphs', - astral: '\uD802[\uDD80-\uDD9F]' - }, - { - name: 'Miao', - astral: '\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]' - }, - { - name: 'Modi', - astral: '\uD805[\uDE00-\uDE44\uDE50-\uDE59]' - }, - { - name: 'Mongolian', - bmp: '\u1800\u1801\u1804\u1806-\u180E\u1810-\u1819\u1820-\u1877\u1880-\u18AA' - }, - { - name: 'Mro', - astral: '\uD81A[\uDE40-\uDE5E\uDE60-\uDE69\uDE6E\uDE6F]' - }, - { - name: 'Multani', - astral: '\uD804[\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA9]' - }, - { - name: 'Myanmar', - bmp: '\u1000-\u109F\uA9E0-\uA9FE\uAA60-\uAA7F' - }, - { - name: 'Nabataean', - astral: '\uD802[\uDC80-\uDC9E\uDCA7-\uDCAF]' - }, - { - name: 'New_Tai_Lue', - bmp: '\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u19DE\u19DF' - }, - { - name: 'Nko', - bmp: '\u07C0-\u07FA' - }, - { - name: 'Ogham', - bmp: '\u1680-\u169C' - }, - { - name: 'Ol_Chiki', - bmp: '\u1C50-\u1C7F' - }, - { - name: 'Old_Hungarian', - astral: '\uD803[\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDCFF]' - }, - { - name: 'Old_Italic', - astral: '\uD800[\uDF00-\uDF23]' - }, - { - name: 'Old_North_Arabian', - astral: '\uD802[\uDE80-\uDE9F]' - }, - { - name: 'Old_Permic', - astral: '\uD800[\uDF50-\uDF7A]' - }, - { - name: 'Old_Persian', - astral: '\uD800[\uDFA0-\uDFC3\uDFC8-\uDFD5]' - }, - { - name: 'Old_South_Arabian', - astral: '\uD802[\uDE60-\uDE7F]' - }, - { - name: 'Old_Turkic', - astral: '\uD803[\uDC00-\uDC48]' - }, - { - name: 'Oriya', - bmp: '\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B77' - }, - { - name: 'Osmanya', - astral: '\uD801[\uDC80-\uDC9D\uDCA0-\uDCA9]' - }, - { - name: 'Pahawh_Hmong', - astral: '\uD81A[\uDF00-\uDF45\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]' - }, - { - name: 'Palmyrene', - astral: '\uD802[\uDC60-\uDC7F]' - }, - { - name: 'Pau_Cin_Hau', - astral: '\uD806[\uDEC0-\uDEF8]' - }, - { - name: 'Phags_Pa', - bmp: '\uA840-\uA877' - }, - { - name: 'Phoenician', - astral: '\uD802[\uDD00-\uDD1B\uDD1F]' - }, - { - name: 'Psalter_Pahlavi', - astral: '\uD802[\uDF80-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]' - }, - { - name: 'Rejang', - bmp: '\uA930-\uA953\uA95F' - }, - { - name: 'Runic', - bmp: '\u16A0-\u16EA\u16EE-\u16F8' - }, - { - name: 'Samaritan', - bmp: '\u0800-\u082D\u0830-\u083E' - }, - { - name: 'Saurashtra', - bmp: '\uA880-\uA8C4\uA8CE-\uA8D9' - }, - { - name: 'Sharada', - astral: '\uD804[\uDD80-\uDDCD\uDDD0-\uDDDF]' - }, - { - name: 'Shavian', - astral: '\uD801[\uDC50-\uDC7F]' - }, - { - name: 'Siddham', - astral: '\uD805[\uDD80-\uDDB5\uDDB8-\uDDDD]' - }, - { - name: 'SignWriting', - astral: '\uD836[\uDC00-\uDE8B\uDE9B-\uDE9F\uDEA1-\uDEAF]' - }, - { - name: 'Sinhala', - bmp: '\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4', - astral: '\uD804[\uDDE1-\uDDF4]' - }, - { - name: 'Sora_Sompeng', - astral: '\uD804[\uDCD0-\uDCE8\uDCF0-\uDCF9]' - }, - { - name: 'Sundanese', - bmp: '\u1B80-\u1BBF\u1CC0-\u1CC7' - }, - { - name: 'Syloti_Nagri', - bmp: '\uA800-\uA82B' - }, - { - name: 'Syriac', - bmp: '\u0700-\u070D\u070F-\u074A\u074D-\u074F' - }, - { - name: 'Tagalog', - bmp: '\u1700-\u170C\u170E-\u1714' - }, - { - name: 'Tagbanwa', - bmp: '\u1760-\u176C\u176E-\u1770\u1772\u1773' - }, - { - name: 'Tai_Le', - bmp: '\u1950-\u196D\u1970-\u1974' - }, - { - name: 'Tai_Tham', - bmp: '\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD' - }, - { - name: 'Tai_Viet', - bmp: '\uAA80-\uAAC2\uAADB-\uAADF' - }, - { - name: 'Takri', - astral: '\uD805[\uDE80-\uDEB7\uDEC0-\uDEC9]' - }, - { - name: 'Tamil', - bmp: '\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA' - }, - { - name: 'Telugu', - bmp: '\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C78-\u0C7F' - }, - { - name: 'Thaana', - bmp: '\u0780-\u07B1' - }, - { - name: 'Thai', - bmp: '\u0E01-\u0E3A\u0E40-\u0E5B' - }, - { - name: 'Tibetan', - bmp: '\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA' - }, - { - name: 'Tifinagh', - bmp: '\u2D30-\u2D67\u2D6F\u2D70\u2D7F' - }, - { - name: 'Tirhuta', - astral: '\uD805[\uDC80-\uDCC7\uDCD0-\uDCD9]' - }, - { - name: 'Ugaritic', - astral: '\uD800[\uDF80-\uDF9D\uDF9F]' - }, - { - name: 'Vai', - bmp: '\uA500-\uA62B' - }, - { - name: 'Warang_Citi', - astral: '\uD806[\uDCA0-\uDCF2\uDCFF]' - }, - { - name: 'Yi', - bmp: '\uA000-\uA48C\uA490-\uA4C6' - } - ]); - -}; diff --git a/node_modules/xregexp/src/index.js b/node_modules/xregexp/src/index.js deleted file mode 100644 index 0d0bd45..0000000 --- a/node_modules/xregexp/src/index.js +++ /dev/null @@ -1,11 +0,0 @@ -var XRegExp = require('./xregexp'); - -require('./addons/build')(XRegExp); -require('./addons/matchrecursive')(XRegExp); -require('./addons/unicode-base')(XRegExp); -require('./addons/unicode-blocks')(XRegExp); -require('./addons/unicode-categories')(XRegExp); -require('./addons/unicode-properties')(XRegExp); -require('./addons/unicode-scripts')(XRegExp); - -module.exports = XRegExp; diff --git a/node_modules/xregexp/src/xregexp.js b/node_modules/xregexp/src/xregexp.js deleted file mode 100644 index 91c60b6..0000000 --- a/node_modules/xregexp/src/xregexp.js +++ /dev/null @@ -1,1871 +0,0 @@ -/*! - * XRegExp 3.1.0 - * - * Steven Levithan (c) 2007-2016 MIT License - */ - -/** - * XRegExp provides augmented, extensible regular expressions. You get additional regex syntax and - * flags, beyond what browsers support natively. XRegExp is also a regex utility belt with tools to - * make your client-side grepping simpler and more powerful, while freeing you from related - * cross-browser inconsistencies. - */ - - 'use strict'; - -/* ============================== - * Private stuff - * ============================== */ - - // Property name used for extended regex instance data - var REGEX_DATA = 'xregexp'; - // Optional features that can be installed and uninstalled - var features = { - astral: false, - natives: false - }; - // Native methods to use and restore ('native' is an ES3 reserved keyword) - var nativ = { - exec: RegExp.prototype.exec, - test: RegExp.prototype.test, - match: String.prototype.match, - replace: String.prototype.replace, - split: String.prototype.split - }; - // Storage for fixed/extended native methods - var fixed = {}; - // Storage for regexes cached by `XRegExp.cache` - var regexCache = {}; - // Storage for pattern details cached by the `XRegExp` constructor - var patternCache = {}; - // Storage for regex syntax tokens added internally or by `XRegExp.addToken` - var tokens = []; - // Token scopes - var defaultScope = 'default'; - var classScope = 'class'; - // Regexes that match native regex syntax, including octals - var nativeTokens = { - // Any native multicharacter token in default scope, or any single character - 'default': /\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/, - // Any native multicharacter token in character class scope, or any single character - 'class': /\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/ - }; - // Any backreference or dollar-prefixed character in replacement strings - var replacementToken = /\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g; - // Check for correct `exec` handling of nonparticipating capturing groups - var correctExecNpcg = nativ.exec.call(/()??/, '')[1] === undefined; - // Check for ES6 `flags` prop support - var hasFlagsProp = /x/.flags !== undefined; - // Shortcut to `Object.prototype.toString` - var toString = {}.toString; - - function hasNativeFlag(flag) { - // Can't check based on the presense of properties/getters since - // browsers might support such properties even when don't support the - // corresponding flag in regex construction (tested in Chrome 48, where - // `'unicode' in /x/` is true but trying to construct a regex with flag - // `u` throws an error). - var isSupported = true; - try { - new RegExp('', flag); - } catch (exception) { - isSupported = false; - } - return isSupported; - } - // Check for ES6 `u` flag support - var hasNativeU = hasNativeFlag('u'); - // Check for ES6 `y` flag support - var hasNativeY = hasNativeFlag('y'); - // Tracker for known flags, including addon flags - var registeredFlags = { - g: true, - i: true, - m: true, - u: hasNativeU, - y: hasNativeY - }; - -/** - * Attaches extended data and `XRegExp.prototype` properties to a regex object. - * - * @private - * @param {RegExp} regex Regex to augment. - * @param {Array} captureNames Array with capture names, or `null`. - * @param {String} xSource XRegExp pattern used to generate `regex`, or `null` if N/A. - * @param {String} xFlags XRegExp flags used to generate `regex`, or `null` if N/A. - * @param {Boolean} [isInternalOnly=false] Whether the regex will be used only for internal - * operations, and never exposed to users. For internal-only regexes, we can improve perf by - * skipping some operations like attaching `XRegExp.prototype` properties. - * @returns {RegExp} Augmented regex. - */ - function augment(regex, captureNames, xSource, xFlags, isInternalOnly) { - var p; - - regex[REGEX_DATA] = { - captureNames: captureNames - }; - - if (isInternalOnly) { - return regex; - } - - // Can't auto-inherit these since the XRegExp constructor returns a nonprimitive value - if (regex.__proto__) { - regex.__proto__ = XRegExp.prototype; - } else { - for (p in XRegExp.prototype) { - // An `XRegExp.prototype.hasOwnProperty(p)` check wouldn't be worth it here, since - // this is performance sensitive, and enumerable `Object.prototype` or - // `RegExp.prototype` extensions exist on `regex.prototype` anyway - regex[p] = XRegExp.prototype[p]; - } - } - - regex[REGEX_DATA].source = xSource; - // Emulate the ES6 `flags` prop by ensuring flags are in alphabetical order - regex[REGEX_DATA].flags = xFlags ? xFlags.split('').sort().join('') : xFlags; - - return regex; - } - -/** - * Removes any duplicate characters from the provided string. - * - * @private - * @param {String} str String to remove duplicate characters from. - * @returns {String} String with any duplicate characters removed. - */ - function clipDuplicates(str) { - return nativ.replace.call(str, /([\s\S])(?=[\s\S]*\1)/g, ''); - } - -/** - * Copies a regex object while preserving extended data and augmenting with `XRegExp.prototype` - * properties. The copy has a fresh `lastIndex` property (set to zero). Allows adding and removing - * flags g and y while copying the regex. - * - * @private - * @param {RegExp} regex Regex to copy. - * @param {Object} [options] Options object with optional properties: - *
  • `addG` {Boolean} Add flag g while copying the regex. - *
  • `addY` {Boolean} Add flag y while copying the regex. - *
  • `removeG` {Boolean} Remove flag g while copying the regex. - *
  • `removeY` {Boolean} Remove flag y while copying the regex. - *
  • `isInternalOnly` {Boolean} Whether the copied regex will be used only for internal - * operations, and never exposed to users. For internal-only regexes, we can improve perf by - * skipping some operations like attaching `XRegExp.prototype` properties. - * @returns {RegExp} Copy of the provided regex, possibly with modified flags. - */ - function copyRegex(regex, options) { - if (!XRegExp.isRegExp(regex)) { - throw new TypeError('Type RegExp expected'); - } - - var xData = regex[REGEX_DATA] || {}, - flags = getNativeFlags(regex), - flagsToAdd = '', - flagsToRemove = '', - xregexpSource = null, - xregexpFlags = null; - - options = options || {}; - - if (options.removeG) {flagsToRemove += 'g';} - if (options.removeY) {flagsToRemove += 'y';} - if (flagsToRemove) { - flags = nativ.replace.call(flags, new RegExp('[' + flagsToRemove + ']+', 'g'), ''); - } - - if (options.addG) {flagsToAdd += 'g';} - if (options.addY) {flagsToAdd += 'y';} - if (flagsToAdd) { - flags = clipDuplicates(flags + flagsToAdd); - } - - if (!options.isInternalOnly) { - if (xData.source !== undefined) { - xregexpSource = xData.source; - } - // null or undefined; don't want to add to `flags` if the previous value was null, since - // that indicates we're not tracking original precompilation flags - if (xData.flags != null) { - // Flags are only added for non-internal regexes by `XRegExp.globalize`. Flags are - // never removed for non-internal regexes, so don't need to handle it - xregexpFlags = flagsToAdd ? clipDuplicates(xData.flags + flagsToAdd) : xData.flags; - } - } - - // Augment with `XRegExp.prototype` properties, but use the native `RegExp` constructor to - // avoid searching for special tokens. That would be wrong for regexes constructed by - // `RegExp`, and unnecessary for regexes constructed by `XRegExp` because the regex has - // already undergone the translation to native regex syntax - regex = augment( - new RegExp(regex.source, flags), - hasNamedCapture(regex) ? xData.captureNames.slice(0) : null, - xregexpSource, - xregexpFlags, - options.isInternalOnly - ); - - return regex; - } - -/** - * Converts hexadecimal to decimal. - * - * @private - * @param {String} hex - * @returns {Number} - */ - function dec(hex) { - return parseInt(hex, 16); - } - -/** - * Returns native `RegExp` flags used by a regex object. - * - * @private - * @param {RegExp} regex Regex to check. - * @returns {String} Native flags in use. - */ - function getNativeFlags(regex) { - return hasFlagsProp ? - regex.flags : - // Explicitly using `RegExp.prototype.toString` (rather than e.g. `String` or - // concatenation with an empty string) allows this to continue working predictably when - // `XRegExp.proptotype.toString` is overriden - nativ.exec.call(/\/([a-z]*)$/i, RegExp.prototype.toString.call(regex))[1]; - } - -/** - * Determines whether a regex has extended instance data used to track capture names. - * - * @private - * @param {RegExp} regex Regex to check. - * @returns {Boolean} Whether the regex uses named capture. - */ - function hasNamedCapture(regex) { - return !!(regex[REGEX_DATA] && regex[REGEX_DATA].captureNames); - } - -/** - * Converts decimal to hexadecimal. - * - * @private - * @param {Number|String} dec - * @returns {String} - */ - function hex(dec) { - return parseInt(dec, 10).toString(16); - } - -/** - * Returns the first index at which a given value can be found in an array. - * - * @private - * @param {Array} array Array to search. - * @param {*} value Value to locate in the array. - * @returns {Number} Zero-based index at which the item is found, or -1. - */ - function indexOf(array, value) { - var len = array.length, i; - - for (i = 0; i < len; ++i) { - if (array[i] === value) { - return i; - } - } - - return -1; - } - -/** - * Determines whether a value is of the specified type, by resolving its internal [[Class]]. - * - * @private - * @param {*} value Object to check. - * @param {String} type Type to check for, in TitleCase. - * @returns {Boolean} Whether the object matches the type. - */ - function isType(value, type) { - return toString.call(value) === '[object ' + type + ']'; - } - -/** - * Checks whether the next nonignorable token after the specified position is a quantifier. - * - * @private - * @param {String} pattern Pattern to search within. - * @param {Number} pos Index in `pattern` to search at. - * @param {String} flags Flags used by the pattern. - * @returns {Boolean} Whether the next token is a quantifier. - */ - function isQuantifierNext(pattern, pos, flags) { - return nativ.test.call( - flags.indexOf('x') > -1 ? - // Ignore any leading whitespace, line comments, and inline comments - /^(?:\s+|#.*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/ : - // Ignore any leading inline comments - /^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/, - pattern.slice(pos) - ); - } - -/** - * Pads the provided string with as many leading zeros as needed to get to length 4. Used to produce - * fixed-length hexadecimal values. - * - * @private - * @param {String} str - * @returns {String} - */ - function pad4(str) { - while (str.length < 4) { - str = '0' + str; - } - return str; - } - -/** - * Checks for flag-related errors, and strips/applies flags in a leading mode modifier. Offloads - * the flag preparation logic from the `XRegExp` constructor. - * - * @private - * @param {String} pattern Regex pattern, possibly with a leading mode modifier. - * @param {String} flags Any combination of flags. - * @returns {Object} Object with properties `pattern` and `flags`. - */ - function prepareFlags(pattern, flags) { - var i; - - // Recent browsers throw on duplicate flags, so copy this behavior for nonnative flags - if (clipDuplicates(flags) !== flags) { - throw new SyntaxError('Invalid duplicate regex flag ' + flags); - } - - // Strip and apply a leading mode modifier with any combination of flags except g or y - pattern = nativ.replace.call(pattern, /^\(\?([\w$]+)\)/, function($0, $1) { - if (nativ.test.call(/[gy]/, $1)) { - throw new SyntaxError('Cannot use flag g or y in mode modifier ' + $0); - } - // Allow duplicate flags within the mode modifier - flags = clipDuplicates(flags + $1); - return ''; - }); - - // Throw on unknown native or nonnative flags - for (i = 0; i < flags.length; ++i) { - if (!registeredFlags[flags.charAt(i)]) { - throw new SyntaxError('Unknown regex flag ' + flags.charAt(i)); - } - } - - return { - pattern: pattern, - flags: flags - }; - } - -/** - * Prepares an options object from the given value. - * - * @private - * @param {String|Object} value Value to convert to an options object. - * @returns {Object} Options object. - */ - function prepareOptions(value) { - var options = {}; - - if (isType(value, 'String')) { - XRegExp.forEach(value, /[^\s,]+/, function(match) { - options[match] = true; - }); - - return options; - } - - return value; - } - -/** - * Registers a flag so it doesn't throw an 'unknown flag' error. - * - * @private - * @param {String} flag Single-character flag to register. - */ - function registerFlag(flag) { - if (!/^[\w$]$/.test(flag)) { - throw new Error('Flag must be a single character A-Za-z0-9_$'); - } - - registeredFlags[flag] = true; - } - -/** - * Runs built-in and custom regex syntax tokens in reverse insertion order at the specified - * position, until a match is found. - * - * @private - * @param {String} pattern Original pattern from which an XRegExp object is being built. - * @param {String} flags Flags being used to construct the regex. - * @param {Number} pos Position to search for tokens within `pattern`. - * @param {Number} scope Regex scope to apply: 'default' or 'class'. - * @param {Object} context Context object to use for token handler functions. - * @returns {Object} Object with properties `matchLength`, `output`, and `reparse`; or `null`. - */ - function runTokens(pattern, flags, pos, scope, context) { - var i = tokens.length, - leadChar = pattern.charAt(pos), - result = null, - match, - t; - - // Run in reverse insertion order - while (i--) { - t = tokens[i]; - if ( - (t.leadChar && t.leadChar !== leadChar) || - (t.scope !== scope && t.scope !== 'all') || - (t.flag && flags.indexOf(t.flag) === -1) - ) { - continue; - } - - match = XRegExp.exec(pattern, t.regex, pos, 'sticky'); - if (match) { - result = { - matchLength: match[0].length, - output: t.handler.call(context, match, scope, flags), - reparse: t.reparse - }; - // Finished with token tests - break; - } - } - - return result; - } - -/** - * Enables or disables implicit astral mode opt-in. When enabled, flag A is automatically added to - * all new regexes created by XRegExp. This causes an error to be thrown when creating regexes if - * the Unicode Base addon is not available, since flag A is registered by that addon. - * - * @private - * @param {Boolean} on `true` to enable; `false` to disable. - */ - function setAstral(on) { - features.astral = on; - } - -/** - * Enables or disables native method overrides. - * - * @private - * @param {Boolean} on `true` to enable; `false` to disable. - */ - function setNatives(on) { - RegExp.prototype.exec = (on ? fixed : nativ).exec; - RegExp.prototype.test = (on ? fixed : nativ).test; - String.prototype.match = (on ? fixed : nativ).match; - String.prototype.replace = (on ? fixed : nativ).replace; - String.prototype.split = (on ? fixed : nativ).split; - - features.natives = on; - } - -/** - * Returns the object, or throws an error if it is `null` or `undefined`. This is used to follow - * the ES5 abstract operation `ToObject`. - * - * @private - * @param {*} value Object to check and return. - * @returns {*} The provided object. - */ - function toObject(value) { - // null or undefined - if (value == null) { - throw new TypeError('Cannot convert null or undefined to object'); - } - - return value; - } - -/* ============================== - * Constructor - * ============================== */ - -/** - * Creates an extended regular expression object for matching text with a pattern. Differs from a - * native regular expression in that additional syntax and flags are supported. The returned object - * is in fact a native `RegExp` and works with all native methods. - * - * @class XRegExp - * @constructor - * @param {String|RegExp} pattern Regex pattern string, or an existing regex object to copy. - * @param {String} [flags] Any combination of flags. - * Native flags: - *
  • `g` - global - *
  • `i` - ignore case - *
  • `m` - multiline anchors - *
  • `u` - unicode (ES6) - *
  • `y` - sticky (Firefox 3+, ES6) - * Additional XRegExp flags: - *
  • `n` - explicit capture - *
  • `s` - dot matches all (aka singleline) - *
  • `x` - free-spacing and line comments (aka extended) - *
  • `A` - astral (requires the Unicode Base addon) - * Flags cannot be provided when constructing one `RegExp` from another. - * @returns {RegExp} Extended regular expression object. - * @example - * - * // With named capture and flag x - * XRegExp('(? [0-9]{4} ) -? # year \n\ - * (? [0-9]{2} ) -? # month \n\ - * (? [0-9]{2} ) # day ', 'x'); - * - * // Providing a regex object copies it. Native regexes are recompiled using native (not XRegExp) - * // syntax. Copies maintain extended data, are augmented with `XRegExp.prototype` properties, and - * // have fresh `lastIndex` properties (set to zero). - * XRegExp(/regex/); - */ - function XRegExp(pattern, flags) { - var context = { - hasNamedCapture: false, - captureNames: [] - }, - scope = defaultScope, - output = '', - pos = 0, - result, - token, - generated, - appliedPattern, - appliedFlags; - - if (XRegExp.isRegExp(pattern)) { - if (flags !== undefined) { - throw new TypeError('Cannot supply flags when copying a RegExp'); - } - return copyRegex(pattern); - } - - // Copy the argument behavior of `RegExp` - pattern = pattern === undefined ? '' : String(pattern); - flags = flags === undefined ? '' : String(flags); - - if (XRegExp.isInstalled('astral') && flags.indexOf('A') === -1) { - // This causes an error to be thrown if the Unicode Base addon is not available - flags += 'A'; - } - - if (!patternCache[pattern]) { - patternCache[pattern] = {}; - } - - if (!patternCache[pattern][flags]) { - // Check for flag-related errors, and strip/apply flags in a leading mode modifier - result = prepareFlags(pattern, flags); - appliedPattern = result.pattern; - appliedFlags = result.flags; - - // Use XRegExp's tokens to translate the pattern to a native regex pattern. - // `appliedPattern.length` may change on each iteration if tokens use `reparse` - while (pos < appliedPattern.length) { - do { - // Check for custom tokens at the current position - result = runTokens(appliedPattern, appliedFlags, pos, scope, context); - // If the matched token used the `reparse` option, splice its output into the - // pattern before running tokens again at the same position - if (result && result.reparse) { - appliedPattern = appliedPattern.slice(0, pos) + - result.output + - appliedPattern.slice(pos + result.matchLength); - } - } while (result && result.reparse); - - if (result) { - output += result.output; - pos += (result.matchLength || 1); - } else { - // Get the native token at the current position - token = XRegExp.exec(appliedPattern, nativeTokens[scope], pos, 'sticky')[0]; - output += token; - pos += token.length; - if (token === '[' && scope === defaultScope) { - scope = classScope; - } else if (token === ']' && scope === classScope) { - scope = defaultScope; - } - } - } - - patternCache[pattern][flags] = { - pattern: output, - // Strip all but native flags - flags: nativ.replace.call(appliedFlags, /[^gimuy]+/g, ''), - // `context.captureNames` has an item for each capturing group, even if unnamed - captures: context.hasNamedCapture ? context.captureNames : null - }; - } - - generated = patternCache[pattern][flags]; - return augment( - new RegExp(generated.pattern, generated.flags), - generated.captures, - pattern, - flags - ); - }; - -// Add `RegExp.prototype` to the prototype chain - XRegExp.prototype = new RegExp(); - -/* ============================== - * Public properties - * ============================== */ - -/** - * The XRegExp version number as a string containing three dot-separated parts. For example, - * '2.0.0-beta-3'. - * - * @static - * @memberOf XRegExp - * @type String - */ - XRegExp.version = '3.1.0'; - -/* ============================== - * Public methods - * ============================== */ - -// Intentionally undocumented - XRegExp._hasNativeFlag = hasNativeFlag; - -/** - * Extends XRegExp syntax and allows custom flags. This is used internally and can be used to - * create XRegExp addons. If more than one token can match the same string, the last added wins. - * - * @memberOf XRegExp - * @param {RegExp} regex Regex object that matches the new token. - * @param {Function} handler Function that returns a new pattern string (using native regex syntax) - * to replace the matched token within all future XRegExp regexes. Has access to persistent - * properties of the regex being built, through `this`. Invoked with three arguments: - *
  • The match array, with named backreference properties. - *
  • The regex scope where the match was found: 'default' or 'class'. - *
  • The flags used by the regex, including any flags in a leading mode modifier. - * The handler function becomes part of the XRegExp construction process, so be careful not to - * construct XRegExps within the function or you will trigger infinite recursion. - * @param {Object} [options] Options object with optional properties: - *
  • `scope` {String} Scope where the token applies: 'default', 'class', or 'all'. - *
  • `flag` {String} Single-character flag that triggers the token. This also registers the - * flag, which prevents XRegExp from throwing an 'unknown flag' error when the flag is used. - *
  • `optionalFlags` {String} Any custom flags checked for within the token `handler` that are - * not required to trigger the token. This registers the flags, to prevent XRegExp from - * throwing an 'unknown flag' error when any of the flags are used. - *
  • `reparse` {Boolean} Whether the `handler` function's output should not be treated as - * final, and instead be reparseable by other tokens (including the current token). Allows - * token chaining or deferring. - *
  • `leadChar` {String} Single character that occurs at the beginning of any successful match - * of the token (not always applicable). This doesn't change the behavior of the token unless - * you provide an erroneous value. However, providing it can increase the token's performance - * since the token can be skipped at any positions where this character doesn't appear. - * @example - * - * // Basic usage: Add \a for the ALERT control code - * XRegExp.addToken( - * /\\a/, - * function() {return '\\x07';}, - * {scope: 'all'} - * ); - * XRegExp('\\a[\\a-\\n]+').test('\x07\n\x07'); // -> true - * - * // Add the U (ungreedy) flag from PCRE and RE2, which reverses greedy and lazy quantifiers. - * // Since `scope` is not specified, it uses 'default' (i.e., transformations apply outside of - * // character classes only) - * XRegExp.addToken( - * /([?*+]|{\d+(?:,\d*)?})(\??)/, - * function(match) {return match[1] + (match[2] ? '' : '?');}, - * {flag: 'U'} - * ); - * XRegExp('a+', 'U').exec('aaa')[0]; // -> 'a' - * XRegExp('a+?', 'U').exec('aaa')[0]; // -> 'aaa' - */ - XRegExp.addToken = function(regex, handler, options) { - options = options || {}; - var optionalFlags = options.optionalFlags, i; - - if (options.flag) { - registerFlag(options.flag); - } - - if (optionalFlags) { - optionalFlags = nativ.split.call(optionalFlags, ''); - for (i = 0; i < optionalFlags.length; ++i) { - registerFlag(optionalFlags[i]); - } - } - - // Add to the private list of syntax tokens - tokens.push({ - regex: copyRegex(regex, { - addG: true, - addY: hasNativeY, - isInternalOnly: true - }), - handler: handler, - scope: options.scope || defaultScope, - flag: options.flag, - reparse: options.reparse, - leadChar: options.leadChar - }); - - // Reset the pattern cache used by the `XRegExp` constructor, since the same pattern and - // flags might now produce different results - XRegExp.cache.flush('patterns'); - }; - -/** - * Caches and returns the result of calling `XRegExp(pattern, flags)`. On any subsequent call with - * the same pattern and flag combination, the cached copy of the regex is returned. - * - * @memberOf XRegExp - * @param {String} pattern Regex pattern string. - * @param {String} [flags] Any combination of XRegExp flags. - * @returns {RegExp} Cached XRegExp object. - * @example - * - * while (match = XRegExp.cache('.', 'gs').exec(str)) { - * // The regex is compiled once only - * } - */ - XRegExp.cache = function(pattern, flags) { - if (!regexCache[pattern]) { - regexCache[pattern] = {}; - } - return regexCache[pattern][flags] || ( - regexCache[pattern][flags] = XRegExp(pattern, flags) - ); - }; - -// Intentionally undocumented - XRegExp.cache.flush = function(cacheName) { - if (cacheName === 'patterns') { - // Flush the pattern cache used by the `XRegExp` constructor - patternCache = {}; - } else { - // Flush the regex cache populated by `XRegExp.cache` - regexCache = {}; - } - }; - -/** - * Escapes any regular expression metacharacters, for use when matching literal strings. The result - * can safely be used at any point within a regex that uses any flags. - * - * @memberOf XRegExp - * @param {String} str String to escape. - * @returns {String} String with regex metacharacters escaped. - * @example - * - * XRegExp.escape('Escaped? <.>'); - * // -> 'Escaped\?\ <\.>' - */ - XRegExp.escape = function(str) { - return nativ.replace.call(toObject(str), /[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); - }; - -/** - * Executes a regex search in a specified string. Returns a match array or `null`. If the provided - * regex uses named capture, named backreference properties are included on the match array. - * Optional `pos` and `sticky` arguments specify the search start position, and whether the match - * must start at the specified position only. The `lastIndex` property of the provided regex is not - * used, but is updated for compatibility. Also fixes browser bugs compared to the native - * `RegExp.prototype.exec` and can be used reliably cross-browser. - * - * @memberOf XRegExp - * @param {String} str String to search. - * @param {RegExp} regex Regex to search with. - * @param {Number} [pos=0] Zero-based index at which to start the search. - * @param {Boolean|String} [sticky=false] Whether the match must start at the specified position - * only. The string `'sticky'` is accepted as an alternative to `true`. - * @returns {Array} Match array with named backreference properties, or `null`. - * @example - * - * // Basic use, with named backreference - * var match = XRegExp.exec('U+2620', XRegExp('U\\+(?[0-9A-F]{4})')); - * match.hex; // -> '2620' - * - * // With pos and sticky, in a loop - * var pos = 2, result = [], match; - * while (match = XRegExp.exec('<1><2><3><4>5<6>', /<(\d)>/, pos, 'sticky')) { - * result.push(match[1]); - * pos = match.index + match[0].length; - * } - * // result -> ['2', '3', '4'] - */ - XRegExp.exec = function(str, regex, pos, sticky) { - var cacheKey = 'g', - addY = false, - match, - r2; - - addY = hasNativeY && !!(sticky || (regex.sticky && sticky !== false)); - if (addY) { - cacheKey += 'y'; - } - - regex[REGEX_DATA] = regex[REGEX_DATA] || {}; - - // Shares cached copies with `XRegExp.match`/`replace` - r2 = regex[REGEX_DATA][cacheKey] || ( - regex[REGEX_DATA][cacheKey] = copyRegex(regex, { - addG: true, - addY: addY, - removeY: sticky === false, - isInternalOnly: true - }) - ); - - r2.lastIndex = pos = pos || 0; - - // Fixed `exec` required for `lastIndex` fix, named backreferences, etc. - match = fixed.exec.call(r2, str); - - if (sticky && match && match.index !== pos) { - match = null; - } - - if (regex.global) { - regex.lastIndex = match ? r2.lastIndex : 0; - } - - return match; - }; - -/** - * Executes a provided function once per regex match. Searches always start at the beginning of the - * string and continue until the end, regardless of the state of the regex's `global` property and - * initial `lastIndex`. - * - * @memberOf XRegExp - * @param {String} str String to search. - * @param {RegExp} regex Regex to search with. - * @param {Function} callback Function to execute for each match. Invoked with four arguments: - *
  • The match array, with named backreference properties. - *
  • The zero-based match index. - *
  • The string being traversed. - *
  • The regex object being used to traverse the string. - * @example - * - * // Extracts every other digit from a string - * var evens = []; - * XRegExp.forEach('1a2345', /\d/, function(match, i) { - * if (i % 2) evens.push(+match[0]); - * }); - * // evens -> [2, 4] - */ - XRegExp.forEach = function(str, regex, callback) { - var pos = 0, - i = -1, - match; - - while ((match = XRegExp.exec(str, regex, pos))) { - // Because `regex` is provided to `callback`, the function could use the deprecated/ - // nonstandard `RegExp.prototype.compile` to mutate the regex. However, since - // `XRegExp.exec` doesn't use `lastIndex` to set the search position, this can't lead - // to an infinite loop, at least. Actually, because of the way `XRegExp.exec` caches - // globalized versions of regexes, mutating the regex will not have any effect on the - // iteration or matched strings, which is a nice side effect that brings extra safety - callback(match, ++i, str, regex); - - pos = match.index + (match[0].length || 1); - } - }; - -/** - * Copies a regex object and adds flag `g`. The copy maintains extended data, is augmented with - * `XRegExp.prototype` properties, and has a fresh `lastIndex` property (set to zero). Native - * regexes are not recompiled using XRegExp syntax. - * - * @memberOf XRegExp - * @param {RegExp} regex Regex to globalize. - * @returns {RegExp} Copy of the provided regex with flag `g` added. - * @example - * - * var globalCopy = XRegExp.globalize(/regex/); - * globalCopy.global; // -> true - */ - XRegExp.globalize = function(regex) { - return copyRegex(regex, {addG: true}); - }; - -/** - * Installs optional features according to the specified options. Can be undone using - * `XRegExp.uninstall`. - * - * @memberOf XRegExp - * @param {Object|String} options Options object or string. - * @example - * - * // With an options object - * XRegExp.install({ - * // Enables support for astral code points in Unicode addons (implicitly sets flag A) - * astral: true, - * - * // DEPRECATED: Overrides native regex methods with fixed/extended versions - * natives: true - * }); - * - * // With an options string - * XRegExp.install('astral natives'); - */ - XRegExp.install = function(options) { - options = prepareOptions(options); - - if (!features.astral && options.astral) { - setAstral(true); - } - - if (!features.natives && options.natives) { - setNatives(true); - } - }; - -/** - * Checks whether an individual optional feature is installed. - * - * @memberOf XRegExp - * @param {String} feature Name of the feature to check. One of: - *
  • `astral` - *
  • `natives` - * @returns {Boolean} Whether the feature is installed. - * @example - * - * XRegExp.isInstalled('astral'); - */ - XRegExp.isInstalled = function(feature) { - return !!(features[feature]); - }; - -/** - * Returns `true` if an object is a regex; `false` if it isn't. This works correctly for regexes - * created in another frame, when `instanceof` and `constructor` checks would fail. - * - * @memberOf XRegExp - * @param {*} value Object to check. - * @returns {Boolean} Whether the object is a `RegExp` object. - * @example - * - * XRegExp.isRegExp('string'); // -> false - * XRegExp.isRegExp(/regex/i); // -> true - * XRegExp.isRegExp(RegExp('^', 'm')); // -> true - * XRegExp.isRegExp(XRegExp('(?s).')); // -> true - */ - XRegExp.isRegExp = function(value) { - return toString.call(value) === '[object RegExp]'; - //return isType(value, 'RegExp'); - }; - -/** - * Returns the first matched string, or in global mode, an array containing all matched strings. - * This is essentially a more convenient re-implementation of `String.prototype.match` that gives - * the result types you actually want (string instead of `exec`-style array in match-first mode, - * and an empty array instead of `null` when no matches are found in match-all mode). It also lets - * you override flag g and ignore `lastIndex`, and fixes browser bugs. - * - * @memberOf XRegExp - * @param {String} str String to search. - * @param {RegExp} regex Regex to search with. - * @param {String} [scope='one'] Use 'one' to return the first match as a string. Use 'all' to - * return an array of all matched strings. If not explicitly specified and `regex` uses flag g, - * `scope` is 'all'. - * @returns {String|Array} In match-first mode: First match as a string, or `null`. In match-all - * mode: Array of all matched strings, or an empty array. - * @example - * - * // Match first - * XRegExp.match('abc', /\w/); // -> 'a' - * XRegExp.match('abc', /\w/g, 'one'); // -> 'a' - * XRegExp.match('abc', /x/g, 'one'); // -> null - * - * // Match all - * XRegExp.match('abc', /\w/g); // -> ['a', 'b', 'c'] - * XRegExp.match('abc', /\w/, 'all'); // -> ['a', 'b', 'c'] - * XRegExp.match('abc', /x/, 'all'); // -> [] - */ - XRegExp.match = function(str, regex, scope) { - var global = (regex.global && scope !== 'one') || scope === 'all', - cacheKey = ((global ? 'g' : '') + (regex.sticky ? 'y' : '')) || 'noGY', - result, - r2; - - regex[REGEX_DATA] = regex[REGEX_DATA] || {}; - - // Shares cached copies with `XRegExp.exec`/`replace` - r2 = regex[REGEX_DATA][cacheKey] || ( - regex[REGEX_DATA][cacheKey] = copyRegex(regex, { - addG: !!global, - removeG: scope === 'one', - isInternalOnly: true - }) - ); - - result = nativ.match.call(toObject(str), r2); - - if (regex.global) { - regex.lastIndex = ( - (scope === 'one' && result) ? - // Can't use `r2.lastIndex` since `r2` is nonglobal in this case - (result.index + result[0].length) : 0 - ); - } - - return global ? (result || []) : (result && result[0]); - }; - -/** - * Retrieves the matches from searching a string using a chain of regexes that successively search - * within previous matches. The provided `chain` array can contain regexes and or objects with - * `regex` and `backref` properties. When a backreference is specified, the named or numbered - * backreference is passed forward to the next regex or returned. - * - * @memberOf XRegExp - * @param {String} str String to search. - * @param {Array} chain Regexes that each search for matches within preceding results. - * @returns {Array} Matches by the last regex in the chain, or an empty array. - * @example - * - * // Basic usage; matches numbers within tags - * XRegExp.matchChain('1 2 3 4 a 56', [ - * XRegExp('(?is).*?'), - * /\d+/ - * ]); - * // -> ['2', '4', '56'] - * - * // Passing forward and returning specific backreferences - * html = 'XRegExp\ - * Google'; - * XRegExp.matchChain(html, [ - * {regex: //i, backref: 1}, - * {regex: XRegExp('(?i)^https?://(?[^/?#]+)'), backref: 'domain'} - * ]); - * // -> ['xregexp.com', 'www.google.com'] - */ - XRegExp.matchChain = function(str, chain) { - return (function recurseChain(values, level) { - var item = chain[level].regex ? chain[level] : {regex: chain[level]}, - matches = [], - addMatch = function(match) { - if (item.backref) { - /* Safari 4.0.5 (but not 5.0.5+) inappropriately uses sparse arrays to hold - * the `undefined`s for backreferences to nonparticipating capturing - * groups. In such cases, a `hasOwnProperty` or `in` check on its own would - * inappropriately throw the exception, so also check if the backreference - * is a number that is within the bounds of the array. - */ - if (!(match.hasOwnProperty(item.backref) || +item.backref < match.length)) { - throw new ReferenceError('Backreference to undefined group: ' + item.backref); - } - - matches.push(match[item.backref] || ''); - } else { - matches.push(match[0]); - } - }, - i; - - for (i = 0; i < values.length; ++i) { - XRegExp.forEach(values[i], item.regex, addMatch); - } - - return ((level === chain.length - 1) || !matches.length) ? - matches : - recurseChain(matches, level + 1); - }([str], 0)); - }; - -/** - * Returns a new string with one or all matches of a pattern replaced. The pattern can be a string - * or regex, and the replacement can be a string or a function to be called for each match. To - * perform a global search and replace, use the optional `scope` argument or include flag g if using - * a regex. Replacement strings can use `${n}` for named and numbered backreferences. Replacement - * functions can use named backreferences via `arguments[0].name`. Also fixes browser bugs compared - * to the native `String.prototype.replace` and can be used reliably cross-browser. - * - * @memberOf XRegExp - * @param {String} str String to search. - * @param {RegExp|String} search Search pattern to be replaced. - * @param {String|Function} replacement Replacement string or a function invoked to create it. - * Replacement strings can include special replacement syntax: - *
  • $$ - Inserts a literal $ character. - *
  • $&, $0 - Inserts the matched substring. - *
  • $` - Inserts the string that precedes the matched substring (left context). - *
  • $' - Inserts the string that follows the matched substring (right context). - *
  • $n, $nn - Where n/nn are digits referencing an existent capturing group, inserts - * backreference n/nn. - *
  • ${n} - Where n is a name or any number of digits that reference an existent capturing - * group, inserts backreference n. - * Replacement functions are invoked with three or more arguments: - *
  • The matched substring (corresponds to $& above). Named backreferences are accessible as - * properties of this first argument. - *
  • 0..n arguments, one for each backreference (corresponding to $1, $2, etc. above). - *
  • The zero-based index of the match within the total search string. - *
  • The total string being searched. - * @param {String} [scope='one'] Use 'one' to replace the first match only, or 'all'. If not - * explicitly specified and using a regex with flag g, `scope` is 'all'. - * @returns {String} New string with one or all matches replaced. - * @example - * - * // Regex search, using named backreferences in replacement string - * var name = XRegExp('(?\\w+) (?\\w+)'); - * XRegExp.replace('John Smith', name, '${last}, ${first}'); - * // -> 'Smith, John' - * - * // Regex search, using named backreferences in replacement function - * XRegExp.replace('John Smith', name, function(match) { - * return match.last + ', ' + match.first; - * }); - * // -> 'Smith, John' - * - * // String search, with replace-all - * XRegExp.replace('RegExp builds RegExps', 'RegExp', 'XRegExp', 'all'); - * // -> 'XRegExp builds XRegExps' - */ - XRegExp.replace = function(str, search, replacement, scope) { - var isRegex = XRegExp.isRegExp(search), - global = (search.global && scope !== 'one') || scope === 'all', - cacheKey = ((global ? 'g' : '') + (search.sticky ? 'y' : '')) || 'noGY', - s2 = search, - result; - - if (isRegex) { - search[REGEX_DATA] = search[REGEX_DATA] || {}; - - // Shares cached copies with `XRegExp.exec`/`match`. Since a copy is used, `search`'s - // `lastIndex` isn't updated *during* replacement iterations - s2 = search[REGEX_DATA][cacheKey] || ( - search[REGEX_DATA][cacheKey] = copyRegex(search, { - addG: !!global, - removeG: scope === 'one', - isInternalOnly: true - }) - ); - } else if (global) { - s2 = new RegExp(XRegExp.escape(String(search)), 'g'); - } - - // Fixed `replace` required for named backreferences, etc. - result = fixed.replace.call(toObject(str), s2, replacement); - - if (isRegex && search.global) { - // Fixes IE, Safari bug (last tested IE 9, Safari 5.1) - search.lastIndex = 0; - } - - return result; - }; - -/** - * Performs batch processing of string replacements. Used like `XRegExp.replace`, but accepts an - * array of replacement details. Later replacements operate on the output of earlier replacements. - * Replacement details are accepted as an array with a regex or string to search for, the - * replacement string or function, and an optional scope of 'one' or 'all'. Uses the XRegExp - * replacement text syntax, which supports named backreference properties via `${name}`. - * - * @memberOf XRegExp - * @param {String} str String to search. - * @param {Array} replacements Array of replacement detail arrays. - * @returns {String} New string with all replacements. - * @example - * - * str = XRegExp.replaceEach(str, [ - * [XRegExp('(?a)'), 'z${name}'], - * [/b/gi, 'y'], - * [/c/g, 'x', 'one'], // scope 'one' overrides /g - * [/d/, 'w', 'all'], // scope 'all' overrides lack of /g - * ['e', 'v', 'all'], // scope 'all' allows replace-all for strings - * [/f/g, function($0) { - * return $0.toUpperCase(); - * }] - * ]); - */ - XRegExp.replaceEach = function(str, replacements) { - var i, r; - - for (i = 0; i < replacements.length; ++i) { - r = replacements[i]; - str = XRegExp.replace(str, r[0], r[1], r[2]); - } - - return str; - }; - -/** - * Splits a string into an array of strings using a regex or string separator. Matches of the - * separator are not included in the result array. However, if `separator` is a regex that contains - * capturing groups, backreferences are spliced into the result each time `separator` is matched. - * Fixes browser bugs compared to the native `String.prototype.split` and can be used reliably - * cross-browser. - * - * @memberOf XRegExp - * @param {String} str String to split. - * @param {RegExp|String} separator Regex or string to use for separating the string. - * @param {Number} [limit] Maximum number of items to include in the result array. - * @returns {Array} Array of substrings. - * @example - * - * // Basic use - * XRegExp.split('a b c', ' '); - * // -> ['a', 'b', 'c'] - * - * // With limit - * XRegExp.split('a b c', ' ', 2); - * // -> ['a', 'b'] - * - * // Backreferences in result array - * XRegExp.split('..word1..', /([a-z]+)(\d+)/i); - * // -> ['..', 'word', '1', '..'] - */ - XRegExp.split = function(str, separator, limit) { - return fixed.split.call(toObject(str), separator, limit); - }; - -/** - * Executes a regex search in a specified string. Returns `true` or `false`. Optional `pos` and - * `sticky` arguments specify the search start position, and whether the match must start at the - * specified position only. The `lastIndex` property of the provided regex is not used, but is - * updated for compatibility. Also fixes browser bugs compared to the native - * `RegExp.prototype.test` and can be used reliably cross-browser. - * - * @memberOf XRegExp - * @param {String} str String to search. - * @param {RegExp} regex Regex to search with. - * @param {Number} [pos=0] Zero-based index at which to start the search. - * @param {Boolean|String} [sticky=false] Whether the match must start at the specified position - * only. The string `'sticky'` is accepted as an alternative to `true`. - * @returns {Boolean} Whether the regex matched the provided value. - * @example - * - * // Basic use - * XRegExp.test('abc', /c/); // -> true - * - * // With pos and sticky - * XRegExp.test('abc', /c/, 0, 'sticky'); // -> false - * XRegExp.test('abc', /c/, 2, 'sticky'); // -> true - */ - XRegExp.test = function(str, regex, pos, sticky) { - // Do this the easy way :-) - return !!XRegExp.exec(str, regex, pos, sticky); - }; - -/** - * Uninstalls optional features according to the specified options. All optional features start out - * uninstalled, so this is used to undo the actions of `XRegExp.install`. - * - * @memberOf XRegExp - * @param {Object|String} options Options object or string. - * @example - * - * // With an options object - * XRegExp.uninstall({ - * // Disables support for astral code points in Unicode addons - * astral: true, - * - * // DEPRECATED: Restores native regex methods - * natives: true - * }); - * - * // With an options string - * XRegExp.uninstall('astral natives'); - */ - XRegExp.uninstall = function(options) { - options = prepareOptions(options); - - if (features.astral && options.astral) { - setAstral(false); - } - - if (features.natives && options.natives) { - setNatives(false); - } - }; - -/** - * Returns an XRegExp object that is the union of the given patterns. Patterns can be provided as - * regex objects or strings. Metacharacters are escaped in patterns provided as strings. - * Backreferences in provided regex objects are automatically renumbered to work correctly within - * the larger combined pattern. Native flags used by provided regexes are ignored in favor of the - * `flags` argument. - * - * @memberOf XRegExp - * @param {Array} patterns Regexes and strings to combine. - * @param {String} [flags] Any combination of XRegExp flags. - * @returns {RegExp} Union of the provided regexes and strings. - * @example - * - * XRegExp.union(['a+b*c', /(dogs)\1/, /(cats)\1/], 'i'); - * // -> /a\+b\*c|(dogs)\1|(cats)\2/i - */ - XRegExp.union = function(patterns, flags) { - var parts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g, - output = [], - numCaptures = 0, - numPriorCaptures, - captureNames, - pattern, - rewrite = function(match, paren, backref) { - var name = captureNames[numCaptures - numPriorCaptures]; - - // Capturing group - if (paren) { - ++numCaptures; - // If the current capture has a name, preserve the name - if (name) { - return '(?<' + name + '>'; - } - // Backreference - } else if (backref) { - // Rewrite the backreference - return '\\' + (+backref + numPriorCaptures); - } - - return match; - }, - i; - - if (!(isType(patterns, 'Array') && patterns.length)) { - throw new TypeError('Must provide a nonempty array of patterns to merge'); - } - - for (i = 0; i < patterns.length; ++i) { - pattern = patterns[i]; - - if (XRegExp.isRegExp(pattern)) { - numPriorCaptures = numCaptures; - captureNames = (pattern[REGEX_DATA] && pattern[REGEX_DATA].captureNames) || []; - - // Rewrite backreferences. Passing to XRegExp dies on octals and ensures patterns - // are independently valid; helps keep this simple. Named captures are put back - output.push(nativ.replace.call(XRegExp(pattern.source).source, parts, rewrite)); - } else { - output.push(XRegExp.escape(pattern)); - } - } - - return XRegExp(output.join('|'), flags); - }; - -/* ============================== - * Fixed/extended native methods - * ============================== */ - -/** - * Adds named capture support (with backreferences returned as `result.name`), and fixes browser - * bugs in the native `RegExp.prototype.exec`. Calling `XRegExp.install('natives')` uses this to - * override the native method. Use via `XRegExp.exec` without overriding natives. - * - * @private - * @param {String} str String to search. - * @returns {Array} Match array with named backreference properties, or `null`. - */ - fixed.exec = function(str) { - var origLastIndex = this.lastIndex, - match = nativ.exec.apply(this, arguments), - name, - r2, - i; - - if (match) { - // Fix browsers whose `exec` methods don't return `undefined` for nonparticipating - // capturing groups. This fixes IE 5.5-8, but not IE 9's quirks mode or emulation of - // older IEs. IE 9 in standards mode follows the spec - if (!correctExecNpcg && match.length > 1 && indexOf(match, '') > -1) { - r2 = copyRegex(this, { - removeG: true, - isInternalOnly: true - }); - // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed - // matching due to characters outside the match - nativ.replace.call(String(str).slice(match.index), r2, function() { - var len = arguments.length, i; - // Skip index 0 and the last 2 - for (i = 1; i < len - 2; ++i) { - if (arguments[i] === undefined) { - match[i] = undefined; - } - } - }); - } - - // Attach named capture properties - if (this[REGEX_DATA] && this[REGEX_DATA].captureNames) { - // Skip index 0 - for (i = 1; i < match.length; ++i) { - name = this[REGEX_DATA].captureNames[i - 1]; - if (name) { - match[name] = match[i]; - } - } - } - - // Fix browsers that increment `lastIndex` after zero-length matches - if (this.global && !match[0].length && (this.lastIndex > match.index)) { - this.lastIndex = match.index; - } - } - - if (!this.global) { - // Fixes IE, Opera bug (last tested IE 9, Opera 11.6) - this.lastIndex = origLastIndex; - } - - return match; - }; - -/** - * Fixes browser bugs in the native `RegExp.prototype.test`. Calling `XRegExp.install('natives')` - * uses this to override the native method. - * - * @private - * @param {String} str String to search. - * @returns {Boolean} Whether the regex matched the provided value. - */ - fixed.test = function(str) { - // Do this the easy way :-) - return !!fixed.exec.call(this, str); - }; - -/** - * Adds named capture support (with backreferences returned as `result.name`), and fixes browser - * bugs in the native `String.prototype.match`. Calling `XRegExp.install('natives')` uses this to - * override the native method. - * - * @private - * @param {RegExp|*} regex Regex to search with. If not a regex object, it is passed to `RegExp`. - * @returns {Array} If `regex` uses flag g, an array of match strings or `null`. Without flag g, - * the result of calling `regex.exec(this)`. - */ - fixed.match = function(regex) { - var result; - - if (!XRegExp.isRegExp(regex)) { - // Use the native `RegExp` rather than `XRegExp` - regex = new RegExp(regex); - } else if (regex.global) { - result = nativ.match.apply(this, arguments); - // Fixes IE bug - regex.lastIndex = 0; - - return result; - } - - return fixed.exec.call(regex, toObject(this)); - }; - -/** - * Adds support for `${n}` tokens for named and numbered backreferences in replacement text, and - * provides named backreferences to replacement functions as `arguments[0].name`. Also fixes browser - * bugs in replacement text syntax when performing a replacement using a nonregex search value, and - * the value of a replacement regex's `lastIndex` property during replacement iterations and upon - * completion. Calling `XRegExp.install('natives')` uses this to override the native method. Note - * that this doesn't support SpiderMonkey's proprietary third (`flags`) argument. Use via - * `XRegExp.replace` without overriding natives. - * - * @private - * @param {RegExp|String} search Search pattern to be replaced. - * @param {String|Function} replacement Replacement string or a function invoked to create it. - * @returns {String} New string with one or all matches replaced. - */ - fixed.replace = function(search, replacement) { - var isRegex = XRegExp.isRegExp(search), - origLastIndex, - captureNames, - result; - - if (isRegex) { - if (search[REGEX_DATA]) { - captureNames = search[REGEX_DATA].captureNames; - } - // Only needed if `search` is nonglobal - origLastIndex = search.lastIndex; - } else { - search += ''; // Type-convert - } - - // Don't use `typeof`; some older browsers return 'function' for regex objects - if (isType(replacement, 'Function')) { - // Stringifying `this` fixes a bug in IE < 9 where the last argument in replacement - // functions isn't type-converted to a string - result = nativ.replace.call(String(this), search, function() { - var args = arguments, i; - if (captureNames) { - // Change the `arguments[0]` string primitive to a `String` object that can - // store properties. This really does need to use `String` as a constructor - args[0] = new String(args[0]); - // Store named backreferences on the first argument - for (i = 0; i < captureNames.length; ++i) { - if (captureNames[i]) { - args[0][captureNames[i]] = args[i + 1]; - } - } - } - // Update `lastIndex` before calling `replacement`. Fixes IE, Chrome, Firefox, - // Safari bug (last tested IE 9, Chrome 17, Firefox 11, Safari 5.1) - if (isRegex && search.global) { - search.lastIndex = args[args.length - 2] + args[0].length; - } - // ES6 specs the context for replacement functions as `undefined` - return replacement.apply(undefined, args); - }); - } else { - // Ensure that the last value of `args` will be a string when given nonstring `this`, - // while still throwing on null or undefined context - result = nativ.replace.call(this == null ? this : String(this), search, function() { - // Keep this function's `arguments` available through closure - var args = arguments; - return nativ.replace.call(String(replacement), replacementToken, function($0, $1, $2) { - var n; - // Named or numbered backreference with curly braces - if ($1) { - // XRegExp behavior for `${n}`: - // 1. Backreference to numbered capture, if `n` is an integer. Use `0` for - // for the entire match. Any number of leading zeros may be used. - // 2. Backreference to named capture `n`, if it exists and is not an - // integer overridden by numbered capture. In practice, this does not - // overlap with numbered capture since XRegExp does not allow named - // capture to use a bare integer as the name. - // 3. If the name or number does not refer to an existing capturing group, - // it's an error. - n = +$1; // Type-convert; drop leading zeros - if (n <= args.length - 3) { - return args[n] || ''; - } - // Groups with the same name is an error, else would need `lastIndexOf` - n = captureNames ? indexOf(captureNames, $1) : -1; - if (n < 0) { - throw new SyntaxError('Backreference to undefined group ' + $0); - } - return args[n + 1] || ''; - } - // Else, special variable or numbered backreference without curly braces - if ($2 === '$') { // $$ - return '$'; - } - if ($2 === '&' || +$2 === 0) { // $&, $0 (not followed by 1-9), $00 - return args[0]; - } - if ($2 === '`') { // $` (left context) - return args[args.length - 1].slice(0, args[args.length - 2]); - } - if ($2 === "'") { // $' (right context) - return args[args.length - 1].slice(args[args.length - 2] + args[0].length); - } - // Else, numbered backreference without curly braces - $2 = +$2; // Type-convert; drop leading zero - // XRegExp behavior for `$n` and `$nn`: - // - Backrefs end after 1 or 2 digits. Use `${..}` for more digits. - // - `$1` is an error if no capturing groups. - // - `$10` is an error if less than 10 capturing groups. Use `${1}0` instead. - // - `$01` is `$1` if at least one capturing group, else it's an error. - // - `$0` (not followed by 1-9) and `$00` are the entire match. - // Native behavior, for comparison: - // - Backrefs end after 1 or 2 digits. Cannot reference capturing group 100+. - // - `$1` is a literal `$1` if no capturing groups. - // - `$10` is `$1` followed by a literal `0` if less than 10 capturing groups. - // - `$01` is `$1` if at least one capturing group, else it's a literal `$01`. - // - `$0` is a literal `$0`. - if (!isNaN($2)) { - if ($2 > args.length - 3) { - throw new SyntaxError('Backreference to undefined group ' + $0); - } - return args[$2] || ''; - } - // `$` followed by an unsupported char is an error, unlike native JS - throw new SyntaxError('Invalid token ' + $0); - }); - }); - } - - if (isRegex) { - if (search.global) { - // Fixes IE, Safari bug (last tested IE 9, Safari 5.1) - search.lastIndex = 0; - } else { - // Fixes IE, Opera bug (last tested IE 9, Opera 11.6) - search.lastIndex = origLastIndex; - } - } - - return result; - }; - -/** - * Fixes browser bugs in the native `String.prototype.split`. Calling `XRegExp.install('natives')` - * uses this to override the native method. Use via `XRegExp.split` without overriding natives. - * - * @private - * @param {RegExp|String} separator Regex or string to use for separating the string. - * @param {Number} [limit] Maximum number of items to include in the result array. - * @returns {Array} Array of substrings. - */ - fixed.split = function(separator, limit) { - if (!XRegExp.isRegExp(separator)) { - // Browsers handle nonregex split correctly, so use the faster native method - return nativ.split.apply(this, arguments); - } - - var str = String(this), - output = [], - origLastIndex = separator.lastIndex, - lastLastIndex = 0, - lastLength; - - // Values for `limit`, per the spec: - // If undefined: pow(2,32) - 1 - // If 0, Infinity, or NaN: 0 - // If positive number: limit = floor(limit); if (limit >= pow(2,32)) limit -= pow(2,32); - // If negative number: pow(2,32) - floor(abs(limit)) - // If other: Type-convert, then use the above rules - // This line fails in very strange ways for some values of `limit` in Opera 10.5-10.63, - // unless Opera Dragonfly is open (go figure). It works in at least Opera 9.5-10.1 and 11+ - limit = (limit === undefined ? -1 : limit) >>> 0; - - XRegExp.forEach(str, separator, function(match) { - // This condition is not the same as `if (match[0].length)` - if ((match.index + match[0].length) > lastLastIndex) { - output.push(str.slice(lastLastIndex, match.index)); - if (match.length > 1 && match.index < str.length) { - Array.prototype.push.apply(output, match.slice(1)); - } - lastLength = match[0].length; - lastLastIndex = match.index + lastLength; - } - }); - - if (lastLastIndex === str.length) { - if (!nativ.test.call(separator, '') || lastLength) { - output.push(''); - } - } else { - output.push(str.slice(lastLastIndex)); - } - - separator.lastIndex = origLastIndex; - return output.length > limit ? output.slice(0, limit) : output; - }; - -/* ============================== - * Built-in syntax/flag tokens - * ============================== */ - -/* - * Letter escapes that natively match literal characters: `\a`, `\A`, etc. These should be - * SyntaxErrors but are allowed in web reality. XRegExp makes them errors for cross-browser - * consistency and to reserve their syntax, but lets them be superseded by addons. - */ - XRegExp.addToken( - /\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/, - function(match, scope) { - // \B is allowed in default scope only - if (match[1] === 'B' && scope === defaultScope) { - return match[0]; - } - throw new SyntaxError('Invalid escape ' + match[0]); - }, - { - scope: 'all', - leadChar: '\\' - } - ); - -/* - * Unicode code point escape with curly braces: `\u{N..}`. `N..` is any one or more digit - * hexadecimal number from 0-10FFFF, and can include leading zeros. Requires the native ES6 `u` flag - * to support code points greater than U+FFFF. Avoids converting code points above U+FFFF to - * surrogate pairs (which could be done without flag `u`), since that could lead to broken behavior - * if you follow a `\u{N..}` token that references a code point above U+FFFF with a quantifier, or - * if you use the same in a character class. - */ - XRegExp.addToken( - /\\u{([\dA-Fa-f]+)}/, - function(match, scope, flags) { - var code = dec(match[1]); - if (code > 0x10FFFF) { - throw new SyntaxError('Invalid Unicode code point ' + match[0]); - } - if (code <= 0xFFFF) { - // Converting to \uNNNN avoids needing to escape the literal character and keep it - // separate from preceding tokens - return '\\u' + pad4(hex(code)); - } - // If `code` is between 0xFFFF and 0x10FFFF, require and defer to native handling - if (hasNativeU && flags.indexOf('u') > -1) { - return match[0]; - } - throw new SyntaxError('Cannot use Unicode code point above \\u{FFFF} without flag u'); - }, - { - scope: 'all', - leadChar: '\\' - } - ); - -/* - * Empty character class: `[]` or `[^]`. This fixes a critical cross-browser syntax inconsistency. - * Unless this is standardized (per the ES spec), regex syntax can't be accurately parsed because - * character class endings can't be determined. - */ - XRegExp.addToken( - /\[(\^?)]/, - function(match) { - // For cross-browser compatibility with ES3, convert [] to \b\B and [^] to [\s\S]. - // (?!) should work like \b\B, but is unreliable in some versions of Firefox - return match[1] ? '[\\s\\S]' : '\\b\\B'; - }, - {leadChar: '['} - ); - -/* - * Comment pattern: `(?# )`. Inline comments are an alternative to the line comments allowed in - * free-spacing mode (flag x). - */ - XRegExp.addToken( - /\(\?#[^)]*\)/, - function(match, scope, flags) { - // Keep tokens separated unless the following token is a quantifier - return isQuantifierNext(match.input, match.index + match[0].length, flags) ? - '' : '(?:)'; - }, - {leadChar: '('} - ); - -/* - * Whitespace and line comments, in free-spacing mode (aka extended mode, flag x) only. - */ - XRegExp.addToken( - /\s+|#.*/, - function(match, scope, flags) { - // Keep tokens separated unless the following token is a quantifier - return isQuantifierNext(match.input, match.index + match[0].length, flags) ? - '' : '(?:)'; - }, - {flag: 'x'} - ); - -/* - * Dot, in dotall mode (aka singleline mode, flag s) only. - */ - XRegExp.addToken( - /\./, - function() { - return '[\\s\\S]'; - }, - { - flag: 's', - leadChar: '.' - } - ); - -/* - * Named backreference: `\k`. Backreference names can use the characters A-Z, a-z, 0-9, _, - * and $ only. Also allows numbered backreferences as `\k`. - */ - XRegExp.addToken( - /\\k<([\w$]+)>/, - function(match) { - // Groups with the same name is an error, else would need `lastIndexOf` - var index = isNaN(match[1]) ? (indexOf(this.captureNames, match[1]) + 1) : +match[1], - endIndex = match.index + match[0].length; - if (!index || index > this.captureNames.length) { - throw new SyntaxError('Backreference to undefined group ' + match[0]); - } - // Keep backreferences separate from subsequent literal numbers - return '\\' + index + ( - endIndex === match.input.length || isNaN(match.input.charAt(endIndex)) ? - '' : '(?:)' - ); - }, - {leadChar: '\\'} - ); - -/* - * Numbered backreference or octal, plus any following digits: `\0`, `\11`, etc. Octals except `\0` - * not followed by 0-9 and backreferences to unopened capture groups throw an error. Other matches - * are returned unaltered. IE < 9 doesn't support backreferences above `\99` in regex syntax. - */ - XRegExp.addToken( - /\\(\d+)/, - function(match, scope) { - if ( - !( - scope === defaultScope && - /^[1-9]/.test(match[1]) && - +match[1] <= this.captureNames.length - ) && - match[1] !== '0' - ) { - throw new SyntaxError('Cannot use octal escape or backreference to undefined group ' + - match[0]); - } - return match[0]; - }, - { - scope: 'all', - leadChar: '\\' - } - ); - -/* - * Named capturing group; match the opening delimiter only: `(?`. Capture names can use the - * characters A-Z, a-z, 0-9, _, and $ only. Names can't be integers. Supports Python-style - * `(?P` as an alternate syntax to avoid issues in some older versions of Opera which natively - * supported the Python-style syntax. Otherwise, XRegExp might treat numbered backreferences to - * Python-style named capture as octals. - */ - XRegExp.addToken( - /\(\?P?<([\w$]+)>/, - function(match) { - // Disallow bare integers as names because named backreferences are added to match - // arrays and therefore numeric properties may lead to incorrect lookups - if (!isNaN(match[1])) { - throw new SyntaxError('Cannot use integer as capture name ' + match[0]); - } - if (match[1] === 'length' || match[1] === '__proto__') { - throw new SyntaxError('Cannot use reserved word as capture name ' + match[0]); - } - if (indexOf(this.captureNames, match[1]) > -1) { - throw new SyntaxError('Cannot use same name for multiple groups ' + match[0]); - } - this.captureNames.push(match[1]); - this.hasNamedCapture = true; - return '('; - }, - {leadChar: '('} - ); - -/* - * Capturing group; match the opening parenthesis only. Required for support of named capturing - * groups. Also adds explicit capture mode (flag n). - */ - XRegExp.addToken( - /\((?!\?)/, - function(match, scope, flags) { - if (flags.indexOf('n') > -1) { - return '(?:'; - } - this.captureNames.push(null); - return '('; - }, - { - optionalFlags: 'n', - leadChar: '(' - } - ); - -/* ============================== - * Expose XRegExp - * ============================== */ - - module.exports = XRegExp; diff --git a/node_modules/xtend/package.json b/node_modules/xtend/package.json index 8b37a85..3a92e49 100644 --- a/node_modules/xtend/package.json +++ b/node_modules/xtend/package.json @@ -1,46 +1,26 @@ { - "_args": [ - [ - "xtend@^4.0.0", - "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\is-my-json-valid" - ] - ], - "_from": "xtend@>=4.0.0 <5.0.0", - "_id": "xtend@4.0.1", - "_inCache": true, - "_installable": true, - "_location": "/xtend", - "_nodeVersion": "0.10.32", - "_npmUser": { - "email": "raynos2@gmail.com", - "name": "raynos" - }, - "_npmVersion": "2.14.1", - "_phantomChildren": {}, - "_requested": { - "name": "xtend", - "raw": "xtend@^4.0.0", - "rawSpec": "^4.0.0", - "scope": null, - "spec": ">=4.0.0 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/is-my-json-valid" + "name": "xtend", + "version": "4.0.1", + "description": "extend like a boss", + "keywords": [ + "extend", + "merge", + "options", + "opts", + "object", + "array" ], - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af", - "_shrinkwrap": null, - "_spec": "xtend@^4.0.0", - "_where": "D:\\Koodaus\\brackets\\src\\extensions\\dev\\brackets-sass-lint\\node_modules\\is-my-json-valid", - "author": { - "email": "raynos2@gmail.com", - "name": "Raynos" + "author": "Raynos ", + "repository": "git://github.com/Raynos/xtend.git", + "main": "immutable", + "scripts": { + "test": "node test" }, - "bugs": { - "email": "raynos2@gmail.com", - "url": "https://github.com/Raynos/xtend/issues" + "dependencies": {}, + "devDependencies": { + "tape": "~1.1.0" }, + "homepage": "https://github.com/Raynos/xtend", "contributors": [ { "name": "Jake Verbaten" @@ -49,61 +29,27 @@ "name": "Matt Esch" } ], - "dependencies": {}, - "description": "extend like a boss", - "devDependencies": { - "tape": "~1.1.0" - }, - "directories": {}, - "dist": { - "shasum": "a5c6d532be656e23db820efb943a1f04998d63af", - "tarball": "http://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" - }, - "engines": { - "node": ">=0.4" + "bugs": { + "url": "https://github.com/Raynos/xtend/issues", + "email": "raynos2@gmail.com" }, - "gitHead": "23dc302a89756da89c1897bc732a752317e35390", - "homepage": "https://github.com/Raynos/xtend", - "keywords": [ - "array", - "extend", - "merge", - "object", - "options", - "opts" - ], "license": "MIT", - "main": "immutable", - "maintainers": [ - { - "name": "raynos", - "email": "raynos2@gmail.com" - } - ], - "name": "xtend", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "scripts": { - "test": "node test" - }, "testling": { + "files": "test.js", "browsers": [ - "chrome/22..latest", - "chrome/canary", + "ie/7..latest", "firefox/16..latest", "firefox/nightly", - "ie/7..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", + "chrome/22..latest", + "chrome/canary", "opera/12..latest", "opera/next", - "safari/5.1..latest" - ], - "files": "test.js" + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest" + ] }, - "version": "4.0.1" + "engines": { + "node": ">=0.4" + } } diff --git a/package.json b/package.json index a6928ba..bf7b046 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "brackets-sass-lint", - "version": "1.0.0", + "version": "1.10.0", "description": "Brackets extension for pure Node.js Sass linting", "main": "main.js", "scripts": { @@ -26,7 +26,7 @@ }, "homepage": "https://github.com/petetnt/brackets-sass-lint#readme", "dependencies": { - "sass-lint": "^1.7.0" + "sass-lint": "^1.10.0" }, "engines": { "brackets": ">=1.4.0" diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..734b3b6 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,851 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +acorn-jsx@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + dependencies: + acorn "^3.0.4" + +acorn@^3.0.4: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + +acorn@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.3.tgz#1a3e850b428e73ba6b09d1cc527f5aaad4d03ef1" + +ajv-keywords@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.1.1.tgz#02550bc605a3e576041565628af972e06c549d50" + +ajv@^4.7.0: + version "4.9.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.9.0.tgz#5a358085747b134eb567d6d15e015f1d7802f45c" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +ansi-escapes@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + +ansi-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +balanced-match@^0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +brace-expansion@^1.0.0: + version "1.1.6" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" + dependencies: + balanced-match "^0.4.1" + concat-map "0.0.1" + +caller-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + dependencies: + callsites "^0.2.0" + +callsites@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + +chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +circular-json@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" + +cli-cursor@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" + dependencies: + restore-cursor "^1.0.1" + +cli-width@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +commander@^2.8.1: + version "2.9.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" + dependencies: + graceful-readlink ">= 1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@^1.4.6: + version "1.5.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266" + dependencies: + inherits "~2.0.1" + readable-stream "~2.0.0" + typedarray "~0.0.5" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +d@^0.1.1, d@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309" + dependencies: + es5-ext "~0.10.2" + +debug@^2.1.1: + version "2.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c" + dependencies: + ms "0.7.2" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + +del@^2.0.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + +doctrine@^1.2.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0.10.7: + version "0.10.12" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047" + dependencies: + es6-iterator "2" + es6-symbol "~3.1" + +es6-iterator@2: + version "2.0.0" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac" + dependencies: + d "^0.1.1" + es5-ext "^0.10.7" + es6-symbol "3" + +es6-map@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.4.tgz#a34b147be224773a4d7da8072794cefa3632b897" + dependencies: + d "~0.1.1" + es5-ext "~0.10.11" + es6-iterator "2" + es6-set "~0.1.3" + es6-symbol "~3.1.0" + event-emitter "~0.3.4" + +es6-set@~0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.4.tgz#9516b6761c2964b92ff479456233a247dc707ce8" + dependencies: + d "~0.1.1" + es5-ext "~0.10.11" + es6-iterator "2" + es6-symbol "3" + event-emitter "~0.3.4" + +es6-symbol@3, es6-symbol@~3.1, es6-symbol@~3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" + dependencies: + d "~0.1.1" + es5-ext "~0.10.11" + +es6-weak-map@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.1.tgz#0d2bbd8827eb5fb4ba8f97fbfea50d43db21ea81" + dependencies: + d "^0.1.1" + es5-ext "^0.10.8" + es6-iterator "2" + es6-symbol "3" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +escope@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + dependencies: + es6-map "^0.1.3" + es6-weak-map "^2.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint@^2.7.0: + version "2.13.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-2.13.1.tgz#e4cc8fa0f009fb829aaae23855a29360be1f6c11" + dependencies: + chalk "^1.1.3" + concat-stream "^1.4.6" + debug "^2.1.1" + doctrine "^1.2.2" + es6-map "^0.1.3" + escope "^3.6.0" + espree "^3.1.6" + estraverse "^4.2.0" + esutils "^2.0.2" + file-entry-cache "^1.1.1" + glob "^7.0.3" + globals "^9.2.0" + ignore "^3.1.2" + imurmurhash "^0.1.4" + inquirer "^0.12.0" + is-my-json-valid "^2.10.0" + is-resolvable "^1.0.0" + js-yaml "^3.5.1" + json-stable-stringify "^1.0.0" + levn "^0.3.0" + lodash "^4.0.0" + mkdirp "^0.5.0" + optionator "^0.8.1" + path-is-absolute "^1.0.0" + path-is-inside "^1.0.1" + pluralize "^1.2.1" + progress "^1.1.8" + require-uncached "^1.0.2" + shelljs "^0.6.0" + strip-json-comments "~1.0.1" + table "^3.7.8" + text-table "~0.2.0" + user-home "^2.0.0" + +espree@^3.1.6: + version "3.3.2" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.3.2.tgz#dbf3fadeb4ecb4d4778303e50103b3d36c88b89c" + dependencies: + acorn "^4.0.1" + acorn-jsx "^3.0.0" + +esprima@^2.6.0: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esrecurse@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" + dependencies: + estraverse "~4.1.0" + object-assign "^4.0.1" + +estraverse@^4.1.1, estraverse@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + +estraverse@~4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +event-emitter@~0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.4.tgz#8d63ddfb4cfe1fae3b32ca265c4c720222080bb5" + dependencies: + d "~0.1.1" + es5-ext "~0.10.7" + +exit-hook@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" + +fast-levenshtein@~2.0.4: + version "2.0.5" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz#bd33145744519ab1c36c3ee9f31f08e9079b67f2" + +figures@^1.3.5: + version "1.7.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + dependencies: + escape-string-regexp "^1.0.5" + object-assign "^4.1.0" + +file-entry-cache@^1.1.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-1.3.1.tgz#44c61ea607ae4be9c1402f41f44270cbfe334ff8" + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + +flat-cache@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.1.tgz#6c837d6225a7de5659323740b36d5361f71691ff" + dependencies: + circular-json "^0.3.0" + del "^2.0.2" + graceful-fs "^4.1.2" + write "^0.2.1" + +front-matter@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/front-matter/-/front-matter-2.1.0.tgz#0bdff42cbad2b35c07ac7085811789759f9858c0" + dependencies: + js-yaml "^3.4.6" + +fs-extra@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@~7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^9.2.0: + version "9.14.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034" + +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +globule@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/globule/-/globule-1.1.0.tgz#c49352e4dc183d85893ee825385eb994bb6df45f" + dependencies: + glob "~7.1.1" + lodash "~4.16.4" + minimatch "~3.0.2" + +gonzales-pe@3.4.7: + version "3.4.7" + resolved "https://registry.yarnpkg.com/gonzales-pe/-/gonzales-pe-3.4.7.tgz#17c7be67ad6caff6277a3e387ac736e983d280ec" + dependencies: + minimist "1.1.x" + +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +ignore@^3.1.2: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.0.tgz#8d88f03c3002a0ac52114db25d2c673b0bf1e435" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.1, inherits@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + +inquirer@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" + dependencies: + ansi-escapes "^1.1.0" + ansi-regex "^2.0.0" + chalk "^1.0.0" + cli-cursor "^1.0.1" + cli-width "^2.0.0" + figures "^1.3.5" + lodash "^4.3.0" + readline2 "^1.0.1" + run-async "^0.1.0" + rx-lite "^3.1.2" + string-width "^1.0.1" + strip-ansi "^3.0.0" + through "^2.3.6" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-my-json-valid@^2.10.0: + version "2.15.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + +is-path-in-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" + dependencies: + path-is-inside "^1.0.1" + +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-resolvable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" + dependencies: + tryit "^1.0.1" + +isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +js-yaml@^3.4.6, js-yaml@^3.5.1, js-yaml@^3.5.4: + version "3.7.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + +json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsonpointer@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.0.tgz#6661e161d2fc445f19f98430231343722e1fcbd5" + +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + optionalDependencies: + graceful-fs "^4.1.9" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +lodash.capitalize@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/lodash.capitalize/-/lodash.capitalize-4.2.1.tgz#f826c9b4e2a8511d84e3aca29db05e1a4f3b72a9" + +lodash.kebabcase@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36" + +lodash@^4.0.0, lodash@^4.3.0: + version "4.17.2" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42" + +lodash@~4.16.4: + version "4.16.6" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.16.6.tgz#d22c9ac660288f3843e16ba7d2b5d06cca27d777" + +merge@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + +minimatch@^3.0.2, minimatch@~3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" + dependencies: + brace-expansion "^1.0.0" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@1.1.x: + version "1.1.3" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.1.3.tgz#3bedfd91a92d39016fcfaa1c681e8faa1a1efda8" + +mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + +mute-stream@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +object-assign@^4.0.1, object-assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +onetime@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" + +optionator@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-is-inside@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +pluralize@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +progress@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" + +readable-stream@~2.0.0: + version "2.0.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readline2@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + mute-stream "0.0.5" + +require-uncached@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + +resolve-from@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + +restore-cursor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" + dependencies: + exit-hook "^1.0.0" + onetime "^1.0.0" + +rimraf@^2.2.8: + version "2.5.4" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" + dependencies: + glob "^7.0.5" + +run-async@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" + dependencies: + once "^1.3.0" + +rx-lite@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" + +sass-lint@^1.10.0: + version "1.10.2" + resolved "https://registry.yarnpkg.com/sass-lint/-/sass-lint-1.10.2.tgz#825bd6b0da79ddd36a42ffae5b6d44ac4922502b" + dependencies: + commander "^2.8.1" + eslint "^2.7.0" + front-matter "2.1.0" + fs-extra "^1.0.0" + glob "^7.0.0" + globule "^1.0.0" + gonzales-pe "3.4.7" + js-yaml "^3.5.4" + lodash.capitalize "^4.1.0" + lodash.kebabcase "^4.0.0" + merge "^1.2.0" + path-is-absolute "^1.0.0" + util "^0.10.3" + +shelljs@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.6.1.tgz#ec6211bed1920442088fe0f70b2837232ed2c8a8" + +slice-ansi@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string-width@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^3.0.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +strip-ansi@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-json-comments@~1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +table@^3.7.8: + version "3.8.3" + resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" + dependencies: + ajv "^4.7.0" + ajv-keywords "^1.0.0" + chalk "^1.1.1" + lodash "^4.0.0" + slice-ansi "0.0.4" + string-width "^2.0.0" + +text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +tryit@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + +typedarray@~0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +user-home@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" + dependencies: + os-homedir "^1.0.0" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +util@^0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + dependencies: + inherits "2.0.1" + +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +write@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + dependencies: + mkdirp "^0.5.1" + +xtend@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"