select_all-rails 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +6 -0
- data/README.md +8 -7
- data/lib/select_all/rails/version.rb +1 -1
- data/node_modules/.bin/acorn +71 -0
- data/node_modules/.bin/escodegen +77 -0
- data/node_modules/.bin/esgenerate +64 -0
- data/node_modules/.bin/esparse +126 -0
- data/node_modules/.bin/esvalidate +199 -0
- data/node_modules/.bin/har-validator +56 -0
- data/node_modules/.bin/sshpk-conv +201 -0
- data/node_modules/.bin/sshpk-sign +191 -0
- data/node_modules/.bin/sshpk-verify +166 -0
- data/node_modules/.bin/uuid +26 -0
- data/node_modules/abab/CHANGELOG.md +11 -0
- data/node_modules/abab/README.md +52 -0
- data/node_modules/abab/index.js +9 -0
- data/node_modules/abab/lib/atob.js +109 -0
- data/node_modules/abab/lib/btoa.js +65 -0
- data/node_modules/abab/package.json +106 -0
- data/node_modules/acorn-globals/LICENSE +19 -0
- data/node_modules/acorn-globals/README.md +76 -0
- data/node_modules/acorn-globals/index.js +180 -0
- data/node_modules/acorn-globals/package.json +100 -0
- data/node_modules/acorn/.editorconfig +7 -0
- data/node_modules/acorn/.gitattributes +1 -0
- data/node_modules/acorn/.npmignore +3 -0
- data/node_modules/acorn/.tern-project +6 -0
- data/node_modules/acorn/.travis.yml +6 -0
- data/node_modules/acorn/AUTHORS +43 -0
- data/node_modules/acorn/LICENSE +19 -0
- data/node_modules/acorn/README.md +396 -0
- data/node_modules/acorn/bin/acorn +71 -0
- data/node_modules/acorn/bin/build-acorn.js +82 -0
- data/node_modules/acorn/bin/generate-identifier-regex.js +47 -0
- data/node_modules/acorn/bin/update_authors.sh +6 -0
- data/node_modules/acorn/dist/.keep +0 -0
- data/node_modules/acorn/dist/acorn.js +3340 -0
- data/node_modules/acorn/dist/acorn_loose.js +1300 -0
- data/node_modules/acorn/dist/walk.js +377 -0
- data/node_modules/acorn/package.json +222 -0
- data/node_modules/acorn/src/bin/acorn.js +59 -0
- data/node_modules/acorn/src/expression.js +707 -0
- data/node_modules/acorn/src/identifier.js +90 -0
- data/node_modules/acorn/src/index.js +67 -0
- data/node_modules/acorn/src/location.js +24 -0
- data/node_modules/acorn/src/locutil.js +42 -0
- data/node_modules/acorn/src/loose/acorn_loose.js +0 -0
- data/node_modules/acorn/src/loose/expression.js +501 -0
- data/node_modules/acorn/src/loose/index.js +50 -0
- data/node_modules/acorn/src/loose/parseutil.js +1 -0
- data/node_modules/acorn/src/loose/state.js +160 -0
- data/node_modules/acorn/src/loose/statement.js +420 -0
- data/node_modules/acorn/src/loose/tokenize.js +108 -0
- data/node_modules/acorn/src/lval.js +215 -0
- data/node_modules/acorn/src/node.js +50 -0
- data/node_modules/acorn/src/options.js +121 -0
- data/node_modules/acorn/src/parseutil.js +102 -0
- data/node_modules/acorn/src/state.js +104 -0
- data/node_modules/acorn/src/statement.js +626 -0
- data/node_modules/acorn/src/tokencontext.js +109 -0
- data/node_modules/acorn/src/tokenize.js +682 -0
- data/node_modules/acorn/src/tokentype.js +147 -0
- data/node_modules/acorn/src/util.js +9 -0
- data/node_modules/acorn/src/walk/index.js +340 -0
- data/node_modules/acorn/src/whitespace.js +12 -0
- data/node_modules/amdefine/LICENSE +58 -0
- data/node_modules/amdefine/README.md +171 -0
- data/node_modules/amdefine/amdefine.js +301 -0
- data/node_modules/amdefine/intercept.js +36 -0
- data/node_modules/amdefine/package.json +86 -0
- data/node_modules/ansi-regex/index.js +4 -0
- data/node_modules/ansi-regex/license +21 -0
- data/node_modules/ansi-regex/package.json +121 -0
- data/node_modules/ansi-regex/readme.md +31 -0
- data/node_modules/ansi-styles/index.js +65 -0
- data/node_modules/ansi-styles/license +21 -0
- data/node_modules/ansi-styles/package.json +114 -0
- data/node_modules/ansi-styles/readme.md +86 -0
- data/node_modules/array-equal/.npmignore +1 -0
- data/node_modules/array-equal/LICENSE +22 -0
- data/node_modules/array-equal/README.md +11 -0
- data/node_modules/array-equal/component.json +10 -0
- data/node_modules/array-equal/index.js +9 -0
- data/node_modules/array-equal/package.json +75 -0
- data/node_modules/asn1/.npmignore +2 -0
- data/node_modules/asn1/.travis.yml +4 -0
- data/node_modules/asn1/LICENSE +19 -0
- data/node_modules/asn1/README.md +50 -0
- data/node_modules/asn1/lib/ber/errors.js +13 -0
- data/node_modules/asn1/lib/ber/index.js +27 -0
- data/node_modules/asn1/lib/ber/reader.js +261 -0
- data/node_modules/asn1/lib/ber/types.js +36 -0
- data/node_modules/asn1/lib/ber/writer.js +316 -0
- data/node_modules/asn1/lib/index.js +20 -0
- data/node_modules/asn1/package.json +98 -0
- data/node_modules/asn1/tst/ber/reader.test.js +208 -0
- data/node_modules/asn1/tst/ber/writer.test.js +370 -0
- data/node_modules/assert-plus/AUTHORS +6 -0
- data/node_modules/assert-plus/CHANGES.md +8 -0
- data/node_modules/assert-plus/README.md +155 -0
- data/node_modules/assert-plus/assert.js +206 -0
- data/node_modules/assert-plus/package.json +115 -0
- data/node_modules/assertion-error/.npmignore +11 -0
- data/node_modules/assertion-error/History.md +19 -0
- data/node_modules/assertion-error/README.md +41 -0
- data/node_modules/assertion-error/index.js +116 -0
- data/node_modules/assertion-error/package.json +95 -0
- data/node_modules/asynckit/LICENSE +21 -0
- data/node_modules/asynckit/README.md +233 -0
- data/node_modules/asynckit/bench.js +76 -0
- data/node_modules/asynckit/index.js +6 -0
- data/node_modules/asynckit/lib/abort.js +29 -0
- data/node_modules/asynckit/lib/async.js +34 -0
- data/node_modules/asynckit/lib/defer.js +26 -0
- data/node_modules/asynckit/lib/iterate.js +75 -0
- data/node_modules/asynckit/lib/readable_asynckit.js +91 -0
- data/node_modules/asynckit/lib/readable_parallel.js +25 -0
- data/node_modules/asynckit/lib/readable_serial.js +25 -0
- data/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
- data/node_modules/asynckit/lib/state.js +37 -0
- data/node_modules/asynckit/lib/streamify.js +141 -0
- data/node_modules/asynckit/lib/terminator.js +29 -0
- data/node_modules/asynckit/package.json +126 -0
- data/node_modules/asynckit/parallel.js +43 -0
- data/node_modules/asynckit/serial.js +17 -0
- data/node_modules/asynckit/serialOrdered.js +75 -0
- data/node_modules/asynckit/stream.js +21 -0
- data/node_modules/aws-sign2/LICENSE +55 -0
- data/node_modules/aws-sign2/README.md +4 -0
- data/node_modules/aws-sign2/index.js +212 -0
- data/node_modules/aws-sign2/package.json +81 -0
- data/node_modules/aws4/.npmignore +4 -0
- data/node_modules/aws4/.tern-port +1 -0
- data/node_modules/aws4/.travis.yml +5 -0
- data/node_modules/aws4/LICENSE +19 -0
- data/node_modules/aws4/README.md +523 -0
- data/node_modules/aws4/aws4.js +323 -0
- data/node_modules/aws4/lru.js +96 -0
- data/node_modules/aws4/package.json +140 -0
- data/node_modules/bcrypt-pbkdf/README.md +39 -0
- data/node_modules/bcrypt-pbkdf/index.js +559 -0
- data/node_modules/bcrypt-pbkdf/package.json +72 -0
- data/node_modules/boom/.npmignore +18 -0
- data/node_modules/boom/.travis.yml +8 -0
- data/node_modules/boom/CONTRIBUTING.md +1 -0
- data/node_modules/boom/LICENSE +28 -0
- data/node_modules/boom/README.md +652 -0
- data/node_modules/boom/images/boom.png +0 -0
- data/node_modules/boom/lib/index.js +318 -0
- data/node_modules/boom/package.json +98 -0
- data/node_modules/boom/test/index.js +654 -0
- data/node_modules/caseless/LICENSE +28 -0
- data/node_modules/caseless/README.md +45 -0
- data/node_modules/caseless/index.js +66 -0
- data/node_modules/caseless/package.json +96 -0
- data/node_modules/caseless/test.js +40 -0
- data/node_modules/chai/.npmignore +14 -0
- data/node_modules/chai/CODE_OF_CONDUCT.md +58 -0
- data/node_modules/chai/CONTRIBUTING.md +214 -0
- data/node_modules/chai/History.md +1059 -0
- data/node_modules/chai/README.md +83 -0
- data/node_modules/chai/ReleaseNotes.md +737 -0
- data/node_modules/chai/bower.json +26 -0
- data/node_modules/chai/chai.js +6142 -0
- data/node_modules/chai/index.js +1 -0
- data/node_modules/chai/karma.conf.js +28 -0
- data/node_modules/chai/karma.sauce.js +41 -0
- data/node_modules/chai/lib/chai.js +93 -0
- data/node_modules/chai/lib/chai/assertion.js +131 -0
- data/node_modules/chai/lib/chai/config.js +55 -0
- data/node_modules/chai/lib/chai/core/assertions.js +1860 -0
- data/node_modules/chai/lib/chai/interface/assert.js +1645 -0
- data/node_modules/chai/lib/chai/interface/expect.js +34 -0
- data/node_modules/chai/lib/chai/interface/should.js +201 -0
- data/node_modules/chai/lib/chai/utils/addChainableMethod.js +112 -0
- data/node_modules/chai/lib/chai/utils/addMethod.js +44 -0
- data/node_modules/chai/lib/chai/utils/addProperty.js +48 -0
- data/node_modules/chai/lib/chai/utils/expectTypes.js +42 -0
- data/node_modules/chai/lib/chai/utils/flag.js +33 -0
- data/node_modules/chai/lib/chai/utils/getActual.js +20 -0
- data/node_modules/chai/lib/chai/utils/getEnumerableProperties.js +26 -0
- data/node_modules/chai/lib/chai/utils/getMessage.js +51 -0
- data/node_modules/chai/lib/chai/utils/getName.js +22 -0
- data/node_modules/chai/lib/chai/utils/getPathInfo.js +111 -0
- data/node_modules/chai/lib/chai/utils/getPathValue.js +43 -0
- data/node_modules/chai/lib/chai/utils/getProperties.js +36 -0
- data/node_modules/chai/lib/chai/utils/hasProperty.js +64 -0
- data/node_modules/chai/lib/chai/utils/index.js +130 -0
- data/node_modules/chai/lib/chai/utils/inspect.js +335 -0
- data/node_modules/chai/lib/chai/utils/objDisplay.js +50 -0
- data/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js +54 -0
- data/node_modules/chai/lib/chai/utils/overwriteMethod.js +52 -0
- data/node_modules/chai/lib/chai/utils/overwriteProperty.js +55 -0
- data/node_modules/chai/lib/chai/utils/test.js +28 -0
- data/node_modules/chai/lib/chai/utils/transferFlags.js +45 -0
- data/node_modules/chai/package.json +128 -0
- data/node_modules/chai/sauce.browsers.js +128 -0
- data/node_modules/chalk/index.js +116 -0
- data/node_modules/chalk/license +21 -0
- data/node_modules/chalk/package.json +140 -0
- data/node_modules/chalk/readme.md +213 -0
- data/node_modules/combined-stream/License +19 -0
- data/node_modules/combined-stream/Readme.md +138 -0
- data/node_modules/combined-stream/lib/combined_stream.js +188 -0
- data/node_modules/combined-stream/package.json +101 -0
- data/node_modules/commander/History.md +261 -0
- data/node_modules/commander/LICENSE +22 -0
- data/node_modules/commander/Readme.md +351 -0
- data/node_modules/commander/index.js +1110 -0
- data/node_modules/commander/package.json +104 -0
- data/node_modules/content-type-parser/LICENSE.txt +19 -0
- data/node_modules/content-type-parser/README.md +60 -0
- data/node_modules/content-type-parser/lib/content-type-parser.js +103 -0
- data/node_modules/content-type-parser/package.json +96 -0
- data/node_modules/cryptiles/.npmignore +18 -0
- data/node_modules/cryptiles/.travis.yml +8 -0
- data/node_modules/cryptiles/LICENSE +28 -0
- data/node_modules/cryptiles/README.md +16 -0
- data/node_modules/cryptiles/lib/index.js +68 -0
- data/node_modules/cryptiles/package.json +94 -0
- data/node_modules/cryptiles/test/index.js +102 -0
- data/node_modules/cssom/LICENSE.txt +20 -0
- data/node_modules/cssom/README.mdown +69 -0
- data/node_modules/cssom/lib/CSSDocumentRule.js +39 -0
- data/node_modules/cssom/lib/CSSFontFaceRule.js +36 -0
- data/node_modules/cssom/lib/CSSImportRule.js +132 -0
- data/node_modules/cssom/lib/CSSKeyframeRule.js +37 -0
- data/node_modules/cssom/lib/CSSKeyframesRule.js +39 -0
- data/node_modules/cssom/lib/CSSMediaRule.js +41 -0
- data/node_modules/cssom/lib/CSSRule.js +43 -0
- data/node_modules/cssom/lib/CSSStyleDeclaration.js +148 -0
- data/node_modules/cssom/lib/CSSStyleRule.js +190 -0
- data/node_modules/cssom/lib/CSSStyleSheet.js +88 -0
- data/node_modules/cssom/lib/CSSValue.js +43 -0
- data/node_modules/cssom/lib/CSSValueExpression.js +344 -0
- data/node_modules/cssom/lib/MatcherList.js +62 -0
- data/node_modules/cssom/lib/MediaList.js +61 -0
- data/node_modules/cssom/lib/StyleSheet.js +17 -0
- data/node_modules/cssom/lib/clone.js +76 -0
- data/node_modules/cssom/lib/index.js +19 -0
- data/node_modules/cssom/lib/parse.js +381 -0
- data/node_modules/cssom/package.json +96 -0
- data/node_modules/cssstyle/.npmignore +1 -0
- data/node_modules/cssstyle/MIT-LICENSE.txt +20 -0
- data/node_modules/cssstyle/README.md +27 -0
- data/node_modules/cssstyle/lib/CSSStyleDeclaration.js +233 -0
- data/node_modules/cssstyle/lib/parsers.js +670 -0
- data/node_modules/cssstyle/lib/properties.js +5858 -0
- data/node_modules/cssstyle/lib/properties/alignmentBaseline.js +12 -0
- data/node_modules/cssstyle/lib/properties/azimuth.js +65 -0
- data/node_modules/cssstyle/lib/properties/background.js +24 -0
- data/node_modules/cssstyle/lib/properties/backgroundAttachment.js +22 -0
- data/node_modules/cssstyle/lib/properties/backgroundClip.js +12 -0
- data/node_modules/cssstyle/lib/properties/backgroundColor.js +33 -0
- data/node_modules/cssstyle/lib/properties/backgroundImage.js +29 -0
- data/node_modules/cssstyle/lib/properties/backgroundOrigin.js +12 -0
- data/node_modules/cssstyle/lib/properties/backgroundPosition.js +56 -0
- data/node_modules/cssstyle/lib/properties/backgroundPositionX.js +12 -0
- data/node_modules/cssstyle/lib/properties/backgroundPositionY.js +12 -0
- data/node_modules/cssstyle/lib/properties/backgroundRepeat.js +25 -0
- data/node_modules/cssstyle/lib/properties/backgroundRepeatX.js +12 -0
- data/node_modules/cssstyle/lib/properties/backgroundRepeatY.js +12 -0
- data/node_modules/cssstyle/lib/properties/backgroundSize.js +12 -0
- data/node_modules/cssstyle/lib/properties/baselineShift.js +12 -0
- data/node_modules/cssstyle/lib/properties/border.js +49 -0
- data/node_modules/cssstyle/lib/properties/borderBottom.js +23 -0
- data/node_modules/cssstyle/lib/properties/borderBottomColor.js +16 -0
- data/node_modules/cssstyle/lib/properties/borderBottomLeftRadius.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderBottomRightRadius.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderBottomStyle.js +21 -0
- data/node_modules/cssstyle/lib/properties/borderBottomWidth.js +16 -0
- data/node_modules/cssstyle/lib/properties/borderCollapse.js +25 -0
- data/node_modules/cssstyle/lib/properties/borderColor.js +28 -0
- data/node_modules/cssstyle/lib/properties/borderImage.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderImageOutset.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderImageRepeat.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderImageSlice.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderImageSource.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderImageWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderLeft.js +23 -0
- data/node_modules/cssstyle/lib/properties/borderLeftColor.js +16 -0
- data/node_modules/cssstyle/lib/properties/borderLeftStyle.js +21 -0
- data/node_modules/cssstyle/lib/properties/borderLeftWidth.js +16 -0
- data/node_modules/cssstyle/lib/properties/borderRadius.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderRight.js +23 -0
- data/node_modules/cssstyle/lib/properties/borderRightColor.js +16 -0
- data/node_modules/cssstyle/lib/properties/borderRightStyle.js +21 -0
- data/node_modules/cssstyle/lib/properties/borderRightWidth.js +16 -0
- data/node_modules/cssstyle/lib/properties/borderSpacing.js +42 -0
- data/node_modules/cssstyle/lib/properties/borderStyle.js +27 -0
- data/node_modules/cssstyle/lib/properties/borderTop.js +22 -0
- data/node_modules/cssstyle/lib/properties/borderTopColor.js +16 -0
- data/node_modules/cssstyle/lib/properties/borderTopLeftRadius.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderTopRightRadius.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderTopStyle.js +21 -0
- data/node_modules/cssstyle/lib/properties/borderTopWidth.js +17 -0
- data/node_modules/cssstyle/lib/properties/borderWidth.js +47 -0
- data/node_modules/cssstyle/lib/properties/bottom.js +14 -0
- data/node_modules/cssstyle/lib/properties/boxShadow.js +12 -0
- data/node_modules/cssstyle/lib/properties/boxSizing.js +12 -0
- data/node_modules/cssstyle/lib/properties/captionSide.js +12 -0
- data/node_modules/cssstyle/lib/properties/clear.js +16 -0
- data/node_modules/cssstyle/lib/properties/clip.js +49 -0
- data/node_modules/cssstyle/lib/properties/color.js +14 -0
- data/node_modules/cssstyle/lib/properties/colorInterpolation.js +12 -0
- data/node_modules/cssstyle/lib/properties/colorInterpolationFilters.js +12 -0
- data/node_modules/cssstyle/lib/properties/colorProfile.js +12 -0
- data/node_modules/cssstyle/lib/properties/colorRendering.js +12 -0
- data/node_modules/cssstyle/lib/properties/content.js +12 -0
- data/node_modules/cssstyle/lib/properties/counterIncrement.js +12 -0
- data/node_modules/cssstyle/lib/properties/counterReset.js +12 -0
- data/node_modules/cssstyle/lib/properties/cssFloat.js +12 -0
- data/node_modules/cssstyle/lib/properties/cue.js +12 -0
- data/node_modules/cssstyle/lib/properties/cueAfter.js +12 -0
- data/node_modules/cssstyle/lib/properties/cueBefore.js +12 -0
- data/node_modules/cssstyle/lib/properties/cursor.js +12 -0
- data/node_modules/cssstyle/lib/properties/direction.js +12 -0
- data/node_modules/cssstyle/lib/properties/display.js +12 -0
- data/node_modules/cssstyle/lib/properties/dominantBaseline.js +12 -0
- data/node_modules/cssstyle/lib/properties/elevation.js +12 -0
- data/node_modules/cssstyle/lib/properties/emptyCells.js +12 -0
- data/node_modules/cssstyle/lib/properties/enableBackground.js +12 -0
- data/node_modules/cssstyle/lib/properties/fill.js +12 -0
- data/node_modules/cssstyle/lib/properties/fillOpacity.js +12 -0
- data/node_modules/cssstyle/lib/properties/fillRule.js +12 -0
- data/node_modules/cssstyle/lib/properties/filter.js +12 -0
- data/node_modules/cssstyle/lib/properties/floodColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/floodOpacity.js +12 -0
- data/node_modules/cssstyle/lib/properties/font.js +40 -0
- data/node_modules/cssstyle/lib/properties/fontFamily.js +33 -0
- data/node_modules/cssstyle/lib/properties/fontSize.js +25 -0
- data/node_modules/cssstyle/lib/properties/fontSizeAdjust.js +12 -0
- data/node_modules/cssstyle/lib/properties/fontStretch.js +12 -0
- data/node_modules/cssstyle/lib/properties/fontStyle.js +18 -0
- data/node_modules/cssstyle/lib/properties/fontVariant.js +18 -0
- data/node_modules/cssstyle/lib/properties/fontWeight.js +18 -0
- data/node_modules/cssstyle/lib/properties/glyphOrientationHorizontal.js +12 -0
- data/node_modules/cssstyle/lib/properties/glyphOrientationVertical.js +12 -0
- data/node_modules/cssstyle/lib/properties/height.js +24 -0
- data/node_modules/cssstyle/lib/properties/imageRendering.js +12 -0
- data/node_modules/cssstyle/lib/properties/kerning.js +12 -0
- data/node_modules/cssstyle/lib/properties/left.js +14 -0
- data/node_modules/cssstyle/lib/properties/letterSpacing.js +12 -0
- data/node_modules/cssstyle/lib/properties/lightingColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/lineHeight.js +21 -0
- data/node_modules/cssstyle/lib/properties/listStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/listStyleImage.js +12 -0
- data/node_modules/cssstyle/lib/properties/listStylePosition.js +12 -0
- data/node_modules/cssstyle/lib/properties/listStyleType.js +12 -0
- data/node_modules/cssstyle/lib/properties/margin.js +59 -0
- data/node_modules/cssstyle/lib/properties/marginBottom.js +13 -0
- data/node_modules/cssstyle/lib/properties/marginLeft.js +13 -0
- data/node_modules/cssstyle/lib/properties/marginRight.js +13 -0
- data/node_modules/cssstyle/lib/properties/marginTop.js +13 -0
- data/node_modules/cssstyle/lib/properties/marker.js +12 -0
- data/node_modules/cssstyle/lib/properties/markerEnd.js +12 -0
- data/node_modules/cssstyle/lib/properties/markerMid.js +12 -0
- data/node_modules/cssstyle/lib/properties/markerOffset.js +12 -0
- data/node_modules/cssstyle/lib/properties/markerStart.js +12 -0
- data/node_modules/cssstyle/lib/properties/marks.js +12 -0
- data/node_modules/cssstyle/lib/properties/mask.js +12 -0
- data/node_modules/cssstyle/lib/properties/maxHeight.js +12 -0
- data/node_modules/cssstyle/lib/properties/maxWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/minHeight.js +12 -0
- data/node_modules/cssstyle/lib/properties/minWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/opacity.js +14 -0
- data/node_modules/cssstyle/lib/properties/orphans.js +12 -0
- data/node_modules/cssstyle/lib/properties/outline.js +12 -0
- data/node_modules/cssstyle/lib/properties/outlineColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/outlineOffset.js +12 -0
- data/node_modules/cssstyle/lib/properties/outlineStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/outlineWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/overflow.js +12 -0
- data/node_modules/cssstyle/lib/properties/overflowX.js +12 -0
- data/node_modules/cssstyle/lib/properties/overflowY.js +12 -0
- data/node_modules/cssstyle/lib/properties/padding.js +52 -0
- data/node_modules/cssstyle/lib/properties/paddingBottom.js +13 -0
- data/node_modules/cssstyle/lib/properties/paddingLeft.js +13 -0
- data/node_modules/cssstyle/lib/properties/paddingRight.js +13 -0
- data/node_modules/cssstyle/lib/properties/paddingTop.js +13 -0
- data/node_modules/cssstyle/lib/properties/page.js +12 -0
- data/node_modules/cssstyle/lib/properties/pageBreakAfter.js +12 -0
- data/node_modules/cssstyle/lib/properties/pageBreakBefore.js +12 -0
- data/node_modules/cssstyle/lib/properties/pageBreakInside.js +12 -0
- data/node_modules/cssstyle/lib/properties/pause.js +12 -0
- data/node_modules/cssstyle/lib/properties/pauseAfter.js +12 -0
- data/node_modules/cssstyle/lib/properties/pauseBefore.js +12 -0
- data/node_modules/cssstyle/lib/properties/pitch.js +12 -0
- data/node_modules/cssstyle/lib/properties/pitchRange.js +12 -0
- data/node_modules/cssstyle/lib/properties/playDuring.js +12 -0
- data/node_modules/cssstyle/lib/properties/pointerEvents.js +12 -0
- data/node_modules/cssstyle/lib/properties/position.js +12 -0
- data/node_modules/cssstyle/lib/properties/quotes.js +12 -0
- data/node_modules/cssstyle/lib/properties/resize.js +12 -0
- data/node_modules/cssstyle/lib/properties/richness.js +12 -0
- data/node_modules/cssstyle/lib/properties/right.js +14 -0
- data/node_modules/cssstyle/lib/properties/shapeRendering.js +12 -0
- data/node_modules/cssstyle/lib/properties/size.js +12 -0
- data/node_modules/cssstyle/lib/properties/speak.js +12 -0
- data/node_modules/cssstyle/lib/properties/speakHeader.js +12 -0
- data/node_modules/cssstyle/lib/properties/speakNumeral.js +12 -0
- data/node_modules/cssstyle/lib/properties/speakPunctuation.js +12 -0
- data/node_modules/cssstyle/lib/properties/speechRate.js +12 -0
- data/node_modules/cssstyle/lib/properties/src.js +12 -0
- data/node_modules/cssstyle/lib/properties/stopColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/stopOpacity.js +12 -0
- data/node_modules/cssstyle/lib/properties/stress.js +12 -0
- data/node_modules/cssstyle/lib/properties/stroke.js +12 -0
- data/node_modules/cssstyle/lib/properties/strokeDasharray.js +12 -0
- data/node_modules/cssstyle/lib/properties/strokeDashoffset.js +12 -0
- data/node_modules/cssstyle/lib/properties/strokeLinecap.js +12 -0
- data/node_modules/cssstyle/lib/properties/strokeLinejoin.js +12 -0
- data/node_modules/cssstyle/lib/properties/strokeMiterlimit.js +12 -0
- data/node_modules/cssstyle/lib/properties/strokeOpacity.js +12 -0
- data/node_modules/cssstyle/lib/properties/strokeWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/tableLayout.js +12 -0
- data/node_modules/cssstyle/lib/properties/textAlign.js +12 -0
- data/node_modules/cssstyle/lib/properties/textAnchor.js +12 -0
- data/node_modules/cssstyle/lib/properties/textDecoration.js +12 -0
- data/node_modules/cssstyle/lib/properties/textIndent.js +12 -0
- data/node_modules/cssstyle/lib/properties/textLineThrough.js +12 -0
- data/node_modules/cssstyle/lib/properties/textLineThroughColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/textLineThroughMode.js +12 -0
- data/node_modules/cssstyle/lib/properties/textLineThroughStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/textLineThroughWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/textOverflow.js +12 -0
- data/node_modules/cssstyle/lib/properties/textOverline.js +12 -0
- data/node_modules/cssstyle/lib/properties/textOverlineColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/textOverlineMode.js +12 -0
- data/node_modules/cssstyle/lib/properties/textOverlineStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/textOverlineWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/textRendering.js +12 -0
- data/node_modules/cssstyle/lib/properties/textShadow.js +12 -0
- data/node_modules/cssstyle/lib/properties/textTransform.js +12 -0
- data/node_modules/cssstyle/lib/properties/textUnderline.js +12 -0
- data/node_modules/cssstyle/lib/properties/textUnderlineColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/textUnderlineMode.js +12 -0
- data/node_modules/cssstyle/lib/properties/textUnderlineStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/textUnderlineWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/top.js +14 -0
- data/node_modules/cssstyle/lib/properties/unicodeBidi.js +12 -0
- data/node_modules/cssstyle/lib/properties/unicodeRange.js +12 -0
- data/node_modules/cssstyle/lib/properties/vectorEffect.js +12 -0
- data/node_modules/cssstyle/lib/properties/verticalAlign.js +12 -0
- data/node_modules/cssstyle/lib/properties/visibility.js +12 -0
- data/node_modules/cssstyle/lib/properties/voiceFamily.js +12 -0
- data/node_modules/cssstyle/lib/properties/volume.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAnimation.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAnimationDelay.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAnimationDirection.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAnimationDuration.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAnimationFillMode.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAnimationIterationCount.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAnimationName.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAnimationPlayState.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAnimationTimingFunction.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAppearance.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAspectRatio.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBackfaceVisibility.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBackgroundClip.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBackgroundComposite.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBackgroundOrigin.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBackgroundSize.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderAfter.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderAfterStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderAfterWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderBefore.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderBeforeStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderBeforeWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderEnd.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderEndColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderEndStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderEndWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderFit.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderHorizontalSpacing.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderImage.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderRadius.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderStart.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderStartColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderStartStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderStartWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderVerticalSpacing.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxAlign.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxDirection.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxFlex.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxFlexGroup.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxLines.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxOrdinalGroup.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxOrient.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxPack.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxReflect.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxShadow.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColorCorrection.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnAxis.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnBreakAfter.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnBreakBefore.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnBreakInside.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnCount.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnGap.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnRule.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnRuleStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnRuleWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnSpan.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumns.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFilter.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlexAlign.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlexDirection.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlexFlow.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlexItemAlign.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlexLinePack.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlexOrder.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlexPack.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlexWrap.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlowFrom.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlowInto.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFontFeatureSettings.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFontKerning.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFontSizeDelta.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFontSmoothing.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFontVariantLigatures.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitHighlight.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitHyphenateCharacter.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitHyphenateLimitAfter.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitHyphenateLimitBefore.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitHyphenateLimitLines.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitHyphens.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitLineAlign.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitLineBoxContain.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitLineBreak.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitLineClamp.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitLineGrid.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitLineSnap.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitLocale.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitLogicalHeight.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitLogicalWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarginAfter.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarginAfterCollapse.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarginBefore.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarginBeforeCollapse.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarginBottomCollapse.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarginCollapse.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarginEnd.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarginStart.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarginTopCollapse.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarquee.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarqueeDirection.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarqueeIncrement.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarqueeRepetition.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarqueeSpeed.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarqueeStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMask.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskAttachment.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskBoxImage.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskBoxImageOutset.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskBoxImageRepeat.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskBoxImageSlice.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskBoxImageSource.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskBoxImageWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskClip.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskComposite.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskImage.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskOrigin.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskPosition.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskPositionX.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskPositionY.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskRepeat.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskRepeatX.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskRepeatY.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskSize.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMatchNearestMailBlockquoteColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitMaxLogicalHeight.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaxLogicalWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMinLogicalHeight.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMinLogicalWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitNbspMode.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitOverflowScrolling.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitPaddingAfter.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitPaddingBefore.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitPaddingEnd.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitPaddingStart.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitPerspective.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitPerspectiveOrigin.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitPerspectiveOriginX.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitPerspectiveOriginY.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitPrintColorAdjust.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitRegionBreakAfter.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitRegionBreakBefore.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitRegionBreakInside.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitRegionOverflow.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitRtlOrdering.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitSvgShadow.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitTextCombine.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTextDecorationsInEffect.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTextEmphasis.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitTextEmphasisPosition.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTextEmphasisStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTextFillColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitTextOrientation.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTextSecurity.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTextSizeAdjust.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTextStroke.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitTextStrokeWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransform.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransformOrigin.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransformOriginX.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransformOriginY.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransformOriginZ.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransformStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransition.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransitionDelay.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransitionDuration.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransitionProperty.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransitionTimingFunction.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitUserDrag.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitUserModify.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitUserSelect.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitWrap.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitWrapFlow.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitWrapMargin.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitWrapPadding.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitWrapShapeInside.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitWrapShapeOutside.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitWrapThrough.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitWritingMode.js +12 -0
- data/node_modules/cssstyle/lib/properties/whiteSpace.js +12 -0
- data/node_modules/cssstyle/lib/properties/widows.js +12 -0
- data/node_modules/cssstyle/lib/properties/width.js +24 -0
- data/node_modules/cssstyle/lib/properties/wordBreak.js +12 -0
- data/node_modules/cssstyle/lib/properties/wordSpacing.js +12 -0
- data/node_modules/cssstyle/lib/properties/wordWrap.js +12 -0
- data/node_modules/cssstyle/lib/properties/writingMode.js +12 -0
- data/node_modules/cssstyle/lib/properties/zIndex.js +12 -0
- data/node_modules/cssstyle/lib/properties/zoom.js +12 -0
- data/node_modules/cssstyle/package.json +109 -0
- data/node_modules/cssstyle/scripts/generate_properties.js +302 -0
- data/node_modules/cssstyle/scripts/run_tests.sh +4 -0
- data/node_modules/cssstyle/tests/tests.js +405 -0
- data/node_modules/dashdash/CHANGES.md +364 -0
- data/node_modules/dashdash/LICENSE.txt +24 -0
- data/node_modules/dashdash/README.md +574 -0
- data/node_modules/dashdash/etc/dashdash.bash_completion.in +389 -0
- data/node_modules/dashdash/lib/dashdash.js +1055 -0
- data/node_modules/dashdash/node_modules/assert-plus/AUTHORS +6 -0
- data/node_modules/dashdash/node_modules/assert-plus/CHANGES.md +14 -0
- data/node_modules/dashdash/node_modules/assert-plus/README.md +162 -0
- data/node_modules/dashdash/node_modules/assert-plus/assert.js +211 -0
- data/node_modules/dashdash/node_modules/assert-plus/package.json +115 -0
- data/node_modules/dashdash/package.json +125 -0
- data/node_modules/deep-eql/.npmignore +11 -0
- data/node_modules/deep-eql/History.md +28 -0
- data/node_modules/deep-eql/README.md +52 -0
- data/node_modules/deep-eql/index.js +1 -0
- data/node_modules/deep-eql/karma.conf.js +20 -0
- data/node_modules/deep-eql/lib/eql.js +257 -0
- data/node_modules/deep-eql/node_modules/type-detect/.npmignore +11 -0
- data/node_modules/deep-eql/node_modules/type-detect/History.md +18 -0
- data/node_modules/deep-eql/node_modules/type-detect/README.md +193 -0
- data/node_modules/deep-eql/node_modules/type-detect/index.js +1 -0
- data/node_modules/deep-eql/node_modules/type-detect/lib/type.js +142 -0
- data/node_modules/deep-eql/node_modules/type-detect/package.json +91 -0
- data/node_modules/deep-eql/package.json +98 -0
- data/node_modules/deep-is/.npmignore +1 -0
- data/node_modules/deep-is/.travis.yml +6 -0
- data/node_modules/deep-is/LICENSE +22 -0
- data/node_modules/deep-is/README.markdown +70 -0
- data/node_modules/deep-is/example/cmp.js +11 -0
- data/node_modules/deep-is/index.js +102 -0
- data/node_modules/deep-is/package.json +120 -0
- data/node_modules/deep-is/test/NaN.js +16 -0
- data/node_modules/deep-is/test/cmp.js +23 -0
- data/node_modules/deep-is/test/neg-vs-pos-0.js +15 -0
- data/node_modules/delayed-stream/.npmignore +1 -0
- data/node_modules/delayed-stream/License +19 -0
- data/node_modules/delayed-stream/Makefile +7 -0
- data/node_modules/delayed-stream/Readme.md +141 -0
- data/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- data/node_modules/delayed-stream/package.json +97 -0
- data/node_modules/ecc-jsbn/.npmignore +15 -0
- data/node_modules/ecc-jsbn/LICENSE +21 -0
- data/node_modules/ecc-jsbn/README.md +8 -0
- data/node_modules/ecc-jsbn/index.js +57 -0
- data/node_modules/ecc-jsbn/lib/LICENSE-jsbn +40 -0
- data/node_modules/ecc-jsbn/lib/ec.js +561 -0
- data/node_modules/ecc-jsbn/lib/sec.js +170 -0
- data/node_modules/ecc-jsbn/package.json +90 -0
- data/node_modules/ecc-jsbn/test.js +14 -0
- data/node_modules/escape-string-regexp/index.js +11 -0
- data/node_modules/escape-string-regexp/license +21 -0
- data/node_modules/escape-string-regexp/package.json +109 -0
- data/node_modules/escape-string-regexp/readme.md +27 -0
- data/node_modules/escodegen/LICENSE.BSD +19 -0
- data/node_modules/escodegen/LICENSE.source-map +27 -0
- data/node_modules/escodegen/README.md +116 -0
- data/node_modules/escodegen/bin/escodegen.js +77 -0
- data/node_modules/escodegen/bin/esgenerate.js +64 -0
- data/node_modules/escodegen/escodegen.js +2607 -0
- data/node_modules/escodegen/package.json +122 -0
- data/node_modules/esprima/ChangeLog +174 -0
- data/node_modules/esprima/LICENSE.BSD +21 -0
- data/node_modules/esprima/README.md +27 -0
- data/node_modules/esprima/bin/esparse.js +126 -0
- data/node_modules/esprima/bin/esvalidate.js +199 -0
- data/node_modules/esprima/esprima.js +5740 -0
- data/node_modules/esprima/package.json +153 -0
- data/node_modules/estraverse/.editorconfig +10 -0
- data/node_modules/estraverse/.jshintrc +16 -0
- data/node_modules/estraverse/LICENSE.BSD +19 -0
- data/node_modules/estraverse/README.md +124 -0
- data/node_modules/estraverse/estraverse.js +845 -0
- data/node_modules/estraverse/gulpfile.js +70 -0
- data/node_modules/estraverse/package.json +95 -0
- data/node_modules/esutils/LICENSE.BSD +19 -0
- data/node_modules/esutils/README.md +169 -0
- data/node_modules/esutils/lib/ast.js +144 -0
- data/node_modules/esutils/lib/code.js +135 -0
- data/node_modules/esutils/lib/keyword.js +165 -0
- data/node_modules/esutils/lib/utils.js +33 -0
- data/node_modules/esutils/package.json +105 -0
- data/node_modules/extend/.eslintrc +192 -0
- data/node_modules/extend/.jscs.json +104 -0
- data/node_modules/extend/.npmignore +1 -0
- data/node_modules/extend/.travis.yml +44 -0
- data/node_modules/extend/CHANGELOG.md +69 -0
- data/node_modules/extend/LICENSE +23 -0
- data/node_modules/extend/README.md +62 -0
- data/node_modules/extend/component.json +32 -0
- data/node_modules/extend/index.js +86 -0
- data/node_modules/extend/package.json +106 -0
- data/node_modules/extsprintf/.gitmodules +6 -0
- data/node_modules/extsprintf/LICENSE +19 -0
- data/node_modules/extsprintf/Makefile +23 -0
- data/node_modules/extsprintf/Makefile.deps +39 -0
- data/node_modules/extsprintf/Makefile.targ +285 -0
- data/node_modules/extsprintf/README.md +39 -0
- data/node_modules/extsprintf/examples/simple.js +2 -0
- data/node_modules/extsprintf/jsl.node.conf +137 -0
- data/node_modules/extsprintf/lib/extsprintf.js +166 -0
- data/node_modules/extsprintf/package.json +74 -0
- data/node_modules/fast-levenshtein/LICENSE.md +25 -0
- data/node_modules/fast-levenshtein/README.md +104 -0
- data/node_modules/fast-levenshtein/levenshtein.js +102 -0
- data/node_modules/fast-levenshtein/package.json +108 -0
- data/node_modules/forever-agent/LICENSE +55 -0
- data/node_modules/forever-agent/README.md +4 -0
- data/node_modules/forever-agent/index.js +138 -0
- data/node_modules/forever-agent/package.json +88 -0
- data/node_modules/form-data/License +19 -0
- data/node_modules/form-data/README.md +217 -0
- data/node_modules/form-data/lib/browser.js +2 -0
- data/node_modules/form-data/lib/form_data.js +440 -0
- data/node_modules/form-data/lib/populate.js +10 -0
- data/node_modules/form-data/package.json +145 -0
- data/node_modules/generate-function/.npmignore +1 -0
- data/node_modules/generate-function/.travis.yml +3 -0
- data/node_modules/generate-function/README.md +72 -0
- data/node_modules/generate-function/example.js +27 -0
- data/node_modules/generate-function/index.js +61 -0
- data/node_modules/generate-function/package.json +87 -0
- data/node_modules/generate-function/test.js +33 -0
- data/node_modules/generate-object-property/.npmignore +1 -0
- data/node_modules/generate-object-property/.travis.yml +3 -0
- data/node_modules/generate-object-property/LICENSE +21 -0
- data/node_modules/generate-object-property/README.md +19 -0
- data/node_modules/generate-object-property/index.js +12 -0
- data/node_modules/generate-object-property/package.json +84 -0
- data/node_modules/generate-object-property/test.js +12 -0
- data/node_modules/getpass/.npmignore +8 -0
- data/node_modules/getpass/.travis.yml +9 -0
- data/node_modules/getpass/LICENSE +18 -0
- data/node_modules/getpass/README.md +32 -0
- data/node_modules/getpass/lib/index.js +123 -0
- data/node_modules/getpass/node_modules/assert-plus/AUTHORS +6 -0
- data/node_modules/getpass/node_modules/assert-plus/CHANGES.md +14 -0
- data/node_modules/getpass/node_modules/assert-plus/README.md +162 -0
- data/node_modules/getpass/node_modules/assert-plus/assert.js +211 -0
- data/node_modules/getpass/node_modules/assert-plus/package.json +115 -0
- data/node_modules/getpass/package.json +90 -0
- data/node_modules/graceful-readlink/.npmignore +3 -0
- data/node_modules/graceful-readlink/.travis.yml +5 -0
- data/node_modules/graceful-readlink/LICENSE +22 -0
- data/node_modules/graceful-readlink/README.md +17 -0
- data/node_modules/graceful-readlink/index.js +12 -0
- data/node_modules/graceful-readlink/package.json +83 -0
- data/node_modules/har-validator/LICENSE +13 -0
- data/node_modules/har-validator/README.md +309 -0
- data/node_modules/har-validator/bin/har-validator +56 -0
- data/node_modules/har-validator/lib/async.js +14 -0
- data/node_modules/har-validator/lib/error.js +10 -0
- data/node_modules/har-validator/lib/index.js +22 -0
- data/node_modules/har-validator/lib/runner.js +29 -0
- data/node_modules/har-validator/lib/schemas/cache.json +13 -0
- data/node_modules/har-validator/lib/schemas/cacheEntry.json +31 -0
- data/node_modules/har-validator/lib/schemas/content.json +27 -0
- data/node_modules/har-validator/lib/schemas/cookie.json +34 -0
- data/node_modules/har-validator/lib/schemas/creator.json +18 -0
- data/node_modules/har-validator/lib/schemas/entry.json +51 -0
- data/node_modules/har-validator/lib/schemas/har.json +11 -0
- data/node_modules/har-validator/lib/schemas/index.js +49 -0
- data/node_modules/har-validator/lib/schemas/log.json +34 -0
- data/node_modules/har-validator/lib/schemas/page.json +30 -0
- data/node_modules/har-validator/lib/schemas/pageTimings.json +16 -0
- data/node_modules/har-validator/lib/schemas/postData.json +41 -0
- data/node_modules/har-validator/lib/schemas/record.json +18 -0
- data/node_modules/har-validator/lib/schemas/request.json +55 -0
- data/node_modules/har-validator/lib/schemas/response.json +52 -0
- data/node_modules/har-validator/lib/schemas/timings.json +40 -0
- data/node_modules/har-validator/package.json +120 -0
- data/node_modules/has-ansi/index.js +4 -0
- data/node_modules/has-ansi/license +21 -0
- data/node_modules/has-ansi/package.json +118 -0
- data/node_modules/has-ansi/readme.md +36 -0
- data/node_modules/hawk/.npmignore +20 -0
- data/node_modules/hawk/.travis.yml +5 -0
- data/node_modules/hawk/LICENSE +28 -0
- data/node_modules/hawk/README.md +634 -0
- data/node_modules/hawk/bower.json +24 -0
- data/node_modules/hawk/component.json +19 -0
- data/node_modules/hawk/dist/client.js +343 -0
- data/node_modules/hawk/example/usage.js +78 -0
- data/node_modules/hawk/images/hawk.png +0 -0
- data/node_modules/hawk/images/logo.png +0 -0
- data/node_modules/hawk/lib/browser.js +637 -0
- data/node_modules/hawk/lib/client.js +369 -0
- data/node_modules/hawk/lib/crypto.js +126 -0
- data/node_modules/hawk/lib/index.js +15 -0
- data/node_modules/hawk/lib/server.js +548 -0
- data/node_modules/hawk/lib/utils.js +184 -0
- data/node_modules/hawk/package.json +101 -0
- data/node_modules/hawk/test/browser.js +1492 -0
- data/node_modules/hawk/test/client.js +440 -0
- data/node_modules/hawk/test/crypto.js +70 -0
- data/node_modules/hawk/test/index.js +378 -0
- data/node_modules/hawk/test/readme.js +95 -0
- data/node_modules/hawk/test/server.js +1329 -0
- data/node_modules/hawk/test/uri.js +838 -0
- data/node_modules/hawk/test/utils.js +149 -0
- data/node_modules/hoek/.npmignore +18 -0
- data/node_modules/hoek/.travis.yml +7 -0
- data/node_modules/hoek/CONTRIBUTING.md +1 -0
- data/node_modules/hoek/LICENSE +31 -0
- data/node_modules/hoek/README.md +584 -0
- data/node_modules/hoek/images/hoek.png +0 -0
- data/node_modules/hoek/lib/escape.js +132 -0
- data/node_modules/hoek/lib/index.js +993 -0
- data/node_modules/hoek/package.json +96 -0
- data/node_modules/hoek/test/escaper.js +88 -0
- data/node_modules/hoek/test/index.js +2513 -0
- data/node_modules/hoek/test/modules/ignore.txt +0 -0
- data/node_modules/hoek/test/modules/test1.js +1 -0
- data/node_modules/hoek/test/modules/test2.js +1 -0
- data/node_modules/hoek/test/modules/test3.js +1 -0
- data/node_modules/html-encoding-sniffer/LICENSE.txt +19 -0
- data/node_modules/html-encoding-sniffer/README.md +38 -0
- data/node_modules/html-encoding-sniffer/lib/html-encoding-sniffer.js +302 -0
- data/node_modules/html-encoding-sniffer/package.json +98 -0
- data/node_modules/http-signature/.dir-locals.el +6 -0
- data/node_modules/http-signature/.npmignore +7 -0
- data/node_modules/http-signature/CHANGES.md +46 -0
- data/node_modules/http-signature/LICENSE +18 -0
- data/node_modules/http-signature/README.md +79 -0
- data/node_modules/http-signature/http_signing.md +363 -0
- data/node_modules/http-signature/lib/index.js +29 -0
- data/node_modules/http-signature/lib/parser.js +318 -0
- data/node_modules/http-signature/lib/signer.js +399 -0
- data/node_modules/http-signature/lib/utils.js +112 -0
- data/node_modules/http-signature/lib/verify.js +88 -0
- data/node_modules/http-signature/package.json +116 -0
- data/node_modules/iconv-lite/.npmignore +6 -0
- data/node_modules/iconv-lite/.travis.yml +22 -0
- data/node_modules/iconv-lite/Changelog.md +108 -0
- data/node_modules/iconv-lite/LICENSE +21 -0
- data/node_modules/iconv-lite/README.md +159 -0
- data/node_modules/iconv-lite/encodings/dbcs-codec.js +554 -0
- data/node_modules/iconv-lite/encodings/dbcs-data.js +176 -0
- data/node_modules/iconv-lite/encodings/index.js +22 -0
- data/node_modules/iconv-lite/encodings/internal.js +187 -0
- data/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- data/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- data/node_modules/iconv-lite/encodings/sbcs-data.js +169 -0
- data/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- data/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- data/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- data/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- data/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- data/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- data/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
- data/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- data/node_modules/iconv-lite/encodings/utf16.js +176 -0
- data/node_modules/iconv-lite/encodings/utf7.js +289 -0
- data/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- data/node_modules/iconv-lite/lib/extend-node.js +214 -0
- data/node_modules/iconv-lite/lib/index.d.ts +31 -0
- data/node_modules/iconv-lite/lib/index.js +141 -0
- data/node_modules/iconv-lite/lib/streams.js +120 -0
- data/node_modules/iconv-lite/package.json +158 -0
- data/node_modules/is-my-json-valid/.npmignore +2 -0
- data/node_modules/is-my-json-valid/.travis.yml +3 -0
- data/node_modules/is-my-json-valid/LICENSE +21 -0
- data/node_modules/is-my-json-valid/README.md +173 -0
- data/node_modules/is-my-json-valid/example.js +18 -0
- data/node_modules/is-my-json-valid/formats.js +14 -0
- data/node_modules/is-my-json-valid/index.js +594 -0
- data/node_modules/is-my-json-valid/package.json +116 -0
- data/node_modules/is-my-json-valid/require.js +12 -0
- data/node_modules/is-my-json-valid/test/fixtures/cosmic.js +84 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/additionalItems.json +82 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/additionalProperties.json +88 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/allOf.json +112 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/anyOf.json +68 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/bignum.json +107 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/default.json +49 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/definitions.json +32 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/dependencies.json +113 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/enum.json +72 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/format.json +143 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/items.json +46 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/maxItems.json +28 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/maxLength.json +28 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/maxProperties.json +28 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/maximum.json +42 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/minItems.json +28 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/minLength.json +28 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/minProperties.json +28 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/minimum.json +42 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/multipleOf.json +96 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/not.json +96 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndFormat.json +18 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndObject.json +18 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/oneOf.json +68 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/pattern.json +23 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/patternProperties.json +110 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/properties.json +92 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/ref.json +128 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/refRemote.json +74 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/required.json +39 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/type.json +330 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/uniqueItems.json +79 -0
- data/node_modules/is-my-json-valid/test/json-schema.js +23 -0
- data/node_modules/is-my-json-valid/test/misc.js +471 -0
- data/node_modules/is-property/.npmignore +17 -0
- data/node_modules/is-property/LICENSE +22 -0
- data/node_modules/is-property/README.md +28 -0
- data/node_modules/is-property/is-property.js +5 -0
- data/node_modules/is-property/package.json +92 -0
- data/node_modules/is-typedarray/LICENSE.md +18 -0
- data/node_modules/is-typedarray/README.md +16 -0
- data/node_modules/is-typedarray/index.js +41 -0
- data/node_modules/is-typedarray/package.json +90 -0
- data/node_modules/is-typedarray/test.js +34 -0
- data/node_modules/isstream/.jshintrc +59 -0
- data/node_modules/isstream/.npmignore +1 -0
- data/node_modules/isstream/.travis.yml +12 -0
- data/node_modules/isstream/LICENSE.md +11 -0
- data/node_modules/isstream/README.md +66 -0
- data/node_modules/isstream/isstream.js +27 -0
- data/node_modules/isstream/package.json +93 -0
- data/node_modules/isstream/test.js +168 -0
- data/node_modules/jodid25519/.npmignore +11 -0
- data/node_modules/jodid25519/.travis.yml +7 -0
- data/node_modules/jodid25519/AUTHORS.md +3 -0
- data/node_modules/jodid25519/LICENSE +23 -0
- data/node_modules/jodid25519/README.md +51 -0
- data/node_modules/jodid25519/almond.0 +42 -0
- data/node_modules/jodid25519/almond.1 +13 -0
- data/node_modules/jodid25519/index.js +35 -0
- data/node_modules/jodid25519/jsdoc.json +19 -0
- data/node_modules/jodid25519/lib/core.js +481 -0
- data/node_modules/jodid25519/lib/curve255.js +221 -0
- data/node_modules/jodid25519/lib/dh.js +111 -0
- data/node_modules/jodid25519/lib/eddsa.js +573 -0
- data/node_modules/jodid25519/lib/utils.js +198 -0
- data/node_modules/jodid25519/package.json +104 -0
- data/node_modules/jquery/AUTHORS.txt +295 -0
- data/node_modules/jquery/LICENSE.txt +36 -0
- data/node_modules/jquery/README.md +65 -0
- data/node_modules/jquery/bower.json +14 -0
- data/node_modules/jquery/dist/core.js +482 -0
- data/node_modules/jquery/dist/jquery.js +10220 -0
- data/node_modules/jquery/dist/jquery.min.js +4 -0
- data/node_modules/jquery/dist/jquery.min.map +1 -0
- data/node_modules/jquery/dist/jquery.slim.js +8107 -0
- data/node_modules/jquery/dist/jquery.slim.min.js +4 -0
- data/node_modules/jquery/dist/jquery.slim.min.map +1 -0
- data/node_modules/jquery/external/sizzle/LICENSE.txt +36 -0
- data/node_modules/jquery/external/sizzle/dist/sizzle.js +2272 -0
- data/node_modules/jquery/external/sizzle/dist/sizzle.min.js +3 -0
- data/node_modules/jquery/external/sizzle/dist/sizzle.min.map +1 -0
- data/node_modules/jquery/package.json +169 -0
- data/node_modules/jquery/src/.eslintrc.json +18 -0
- data/node_modules/jquery/src/ajax.js +855 -0
- data/node_modules/jquery/src/ajax/jsonp.js +102 -0
- data/node_modules/jquery/src/ajax/load.js +76 -0
- data/node_modules/jquery/src/ajax/parseXML.js +30 -0
- data/node_modules/jquery/src/ajax/script.js +77 -0
- data/node_modules/jquery/src/ajax/var/location.js +5 -0
- data/node_modules/jquery/src/ajax/var/nonce.js +7 -0
- data/node_modules/jquery/src/ajax/var/rquery.js +5 -0
- data/node_modules/jquery/src/ajax/xhr.js +169 -0
- data/node_modules/jquery/src/attributes.js +13 -0
- data/node_modules/jquery/src/attributes/attr.js +140 -0
- data/node_modules/jquery/src/attributes/classes.js +174 -0
- data/node_modules/jquery/src/attributes/prop.js +143 -0
- data/node_modules/jquery/src/attributes/support.js +33 -0
- data/node_modules/jquery/src/attributes/val.js +188 -0
- data/node_modules/jquery/src/callbacks.js +234 -0
- data/node_modules/jquery/src/core.js +482 -0
- data/node_modules/jquery/src/core/DOMEval.js +16 -0
- data/node_modules/jquery/src/core/access.js +70 -0
- data/node_modules/jquery/src/core/init.js +127 -0
- data/node_modules/jquery/src/core/parseHTML.js +65 -0
- data/node_modules/jquery/src/core/ready-no-deferred.js +105 -0
- data/node_modules/jquery/src/core/ready.js +95 -0
- data/node_modules/jquery/src/core/readyException.js +13 -0
- data/node_modules/jquery/src/core/stripAndCollapse.js +14 -0
- data/node_modules/jquery/src/core/support.js +20 -0
- data/node_modules/jquery/src/core/var/rsingleTag.js +6 -0
- data/node_modules/jquery/src/css.js +426 -0
- data/node_modules/jquery/src/css/addGetHookIf.js +26 -0
- data/node_modules/jquery/src/css/adjustCSS.js +71 -0
- data/node_modules/jquery/src/css/curCSS.js +59 -0
- data/node_modules/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/node_modules/jquery/src/css/showHide.js +105 -0
- data/node_modules/jquery/src/css/support.js +89 -0
- data/node_modules/jquery/src/css/var/cssExpand.js +5 -0
- data/node_modules/jquery/src/css/var/getStyles.js +17 -0
- data/node_modules/jquery/src/css/var/isHiddenWithinTree.js +34 -0
- data/node_modules/jquery/src/css/var/rmargin.js +5 -0
- data/node_modules/jquery/src/css/var/rnumnonpx.js +7 -0
- data/node_modules/jquery/src/css/var/swap.js +26 -0
- data/node_modules/jquery/src/data.js +179 -0
- data/node_modules/jquery/src/data/Data.js +161 -0
- data/node_modules/jquery/src/data/var/acceptData.js +19 -0
- data/node_modules/jquery/src/data/var/dataPriv.js +7 -0
- data/node_modules/jquery/src/data/var/dataUser.js +7 -0
- data/node_modules/jquery/src/deferred.js +389 -0
- data/node_modules/jquery/src/deferred/exceptionHook.js +21 -0
- data/node_modules/jquery/src/deprecated.js +30 -0
- data/node_modules/jquery/src/dimensions.js +56 -0
- data/node_modules/jquery/src/effects.js +693 -0
- data/node_modules/jquery/src/effects/Tween.js +123 -0
- data/node_modules/jquery/src/effects/animatedSelector.js +15 -0
- data/node_modules/jquery/src/event.js +745 -0
- data/node_modules/jquery/src/event/ajax.js +22 -0
- data/node_modules/jquery/src/event/alias.js +29 -0
- data/node_modules/jquery/src/event/focusin.js +55 -0
- data/node_modules/jquery/src/event/support.js +11 -0
- data/node_modules/jquery/src/event/trigger.js +185 -0
- data/node_modules/jquery/src/exports/amd.js +26 -0
- data/node_modules/jquery/src/exports/global.js +34 -0
- data/node_modules/jquery/src/jquery.js +41 -0
- data/node_modules/jquery/src/manipulation.js +486 -0
- data/node_modules/jquery/src/manipulation/_evalUrl.js +23 -0
- data/node_modules/jquery/src/manipulation/buildFragment.js +104 -0
- data/node_modules/jquery/src/manipulation/getAll.js +31 -0
- data/node_modules/jquery/src/manipulation/setGlobalEval.js +22 -0
- data/node_modules/jquery/src/manipulation/support.js +35 -0
- data/node_modules/jquery/src/manipulation/var/rcheckableType.js +5 -0
- data/node_modules/jquery/src/manipulation/var/rscriptType.js +5 -0
- data/node_modules/jquery/src/manipulation/var/rtagName.js +5 -0
- data/node_modules/jquery/src/manipulation/wrapMap.js +29 -0
- data/node_modules/jquery/src/offset.js +232 -0
- data/node_modules/jquery/src/queue.js +145 -0
- data/node_modules/jquery/src/queue/delay.js +24 -0
- data/node_modules/jquery/src/selector-native.js +237 -0
- data/node_modules/jquery/src/selector-sizzle.js +19 -0
- data/node_modules/jquery/src/selector.js +3 -0
- data/node_modules/jquery/src/serialize.js +130 -0
- data/node_modules/jquery/src/traversing.js +178 -0
- data/node_modules/jquery/src/traversing/findFilter.js +106 -0
- data/node_modules/jquery/src/traversing/var/dir.js +22 -0
- data/node_modules/jquery/src/traversing/var/rneedsContext.js +8 -0
- data/node_modules/jquery/src/traversing/var/siblings.js +17 -0
- data/node_modules/jquery/src/var/ObjectFunctionString.js +7 -0
- data/node_modules/jquery/src/var/arr.js +5 -0
- data/node_modules/jquery/src/var/class2type.js +6 -0
- data/node_modules/jquery/src/var/concat.js +7 -0
- data/node_modules/jquery/src/var/document.js +5 -0
- data/node_modules/jquery/src/var/documentElement.js +7 -0
- data/node_modules/jquery/src/var/fnToString.js +7 -0
- data/node_modules/jquery/src/var/getProto.js +5 -0
- data/node_modules/jquery/src/var/hasOwn.js +7 -0
- data/node_modules/jquery/src/var/indexOf.js +7 -0
- data/node_modules/jquery/src/var/pnum.js +5 -0
- data/node_modules/jquery/src/var/push.js +7 -0
- data/node_modules/jquery/src/var/rcssNum.js +9 -0
- data/node_modules/jquery/src/var/rnothtmlwhite.js +8 -0
- data/node_modules/jquery/src/var/slice.js +7 -0
- data/node_modules/jquery/src/var/support.js +6 -0
- data/node_modules/jquery/src/var/toString.js +7 -0
- data/node_modules/jquery/src/wrap.js +77 -0
- data/node_modules/jsbn/.npmignore +2 -0
- data/node_modules/jsbn/LICENSE +40 -0
- data/node_modules/jsbn/README.md +175 -0
- data/node_modules/jsbn/example.html +12 -0
- data/node_modules/jsbn/example.js +3 -0
- data/node_modules/jsbn/index.js +1358 -0
- data/node_modules/jsbn/package.json +87 -0
- data/node_modules/jsdom-global/.npmignore +1 -0
- data/node_modules/jsdom-global/.travis.yml +6 -0
- data/node_modules/jsdom-global/HISTORY.md +85 -0
- data/node_modules/jsdom-global/README.md +137 -0
- data/node_modules/jsdom-global/browser.js +10 -0
- data/node_modules/jsdom-global/index.js +46 -0
- data/node_modules/jsdom-global/keys.js +187 -0
- data/node_modules/jsdom-global/package.json +95 -0
- data/node_modules/jsdom-global/register.js +1 -0
- data/node_modules/jsdom-global/test.js +22 -0
- data/node_modules/jsdom/Changelog.md +1254 -0
- data/node_modules/jsdom/LICENSE.txt +22 -0
- data/node_modules/jsdom/README.md +592 -0
- data/node_modules/jsdom/lib/jsdom.js +456 -0
- data/node_modules/jsdom/lib/jsdom/browser/Window.js +502 -0
- data/node_modules/jsdom/lib/jsdom/browser/default-stylesheet.js +1129 -0
- data/node_modules/jsdom/lib/jsdom/browser/documentAdapter.js +73 -0
- data/node_modules/jsdom/lib/jsdom/browser/documentfeatures.js +47 -0
- data/node_modules/jsdom/lib/jsdom/browser/domtohtml.js +19 -0
- data/node_modules/jsdom/lib/jsdom/browser/htmltodom.js +323 -0
- data/node_modules/jsdom/lib/jsdom/browser/not-implemented.js +13 -0
- data/node_modules/jsdom/lib/jsdom/browser/resource-loader.js +275 -0
- data/node_modules/jsdom/lib/jsdom/level2/style.js +69 -0
- data/node_modules/jsdom/lib/jsdom/level3/xpath.js +1874 -0
- data/node_modules/jsdom/lib/jsdom/living/attributes.js +468 -0
- data/node_modules/jsdom/lib/jsdom/living/attributes/Attr-impl.js +87 -0
- data/node_modules/jsdom/lib/jsdom/living/blob-symbols.js +6 -0
- data/node_modules/jsdom/lib/jsdom/living/blob.js +73 -0
- data/node_modules/jsdom/lib/jsdom/living/dom-token-list.js +222 -0
- data/node_modules/jsdom/lib/jsdom/living/domparsing/DOMParser-impl.js +61 -0
- data/node_modules/jsdom/lib/jsdom/living/events/CustomEvent-impl.js +18 -0
- data/node_modules/jsdom/lib/jsdom/living/events/ErrorEvent-impl.js +11 -0
- data/node_modules/jsdom/lib/jsdom/living/events/Event-impl.js +77 -0
- data/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js +303 -0
- data/node_modules/jsdom/lib/jsdom/living/events/FocusEvent-impl.js +4 -0
- data/node_modules/jsdom/lib/jsdom/living/events/HashChangeEvent-impl.js +11 -0
- data/node_modules/jsdom/lib/jsdom/living/events/KeyboardEvent-impl.js +21 -0
- data/node_modules/jsdom/lib/jsdom/living/events/MessageEvent-impl.js +22 -0
- data/node_modules/jsdom/lib/jsdom/living/events/MouseEvent-impl.js +28 -0
- data/node_modules/jsdom/lib/jsdom/living/events/PopStateEvent-impl.js +4 -0
- data/node_modules/jsdom/lib/jsdom/living/events/ProgressEvent-impl.js +11 -0
- data/node_modules/jsdom/lib/jsdom/living/events/TouchEvent-impl.js +11 -0
- data/node_modules/jsdom/lib/jsdom/living/events/UIEvent-impl.js +19 -0
- data/node_modules/jsdom/lib/jsdom/living/file-reader.js +133 -0
- data/node_modules/jsdom/lib/jsdom/living/file-symbols.js +4 -0
- data/node_modules/jsdom/lib/jsdom/living/file.js +22 -0
- data/node_modules/jsdom/lib/jsdom/living/filelist-symbols.js +3 -0
- data/node_modules/jsdom/lib/jsdom/living/filelist.js +21 -0
- data/node_modules/jsdom/lib/jsdom/living/form-data-symbols.js +3 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/.gitkeep +0 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/AddEventListenerOptions.js +34 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Attr.js +169 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/CharacterData.js +189 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ChildNode.js +92 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Comment.js +92 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/CustomEvent.js +122 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/CustomEventInit.js +34 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/DOMImplementation.js +143 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/DOMParser.js +97 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Document.js +712 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/DocumentFragment.js +91 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/DocumentType.js +110 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Element.js +552 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ElementCSSInlineStyle.js +88 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ElementContentEditable.js +77 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ErrorEvent.js +137 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ErrorEventInit.js +56 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Event.js +251 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/EventInit.js +40 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/EventListenerOptions.js +32 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/EventModifierInit.js +146 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js +130 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/FocusEvent.js +104 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/FocusEventInit.js +34 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/FormData.js +179 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/GlobalEventHandlers.js +770 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLAnchorElement.js +228 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLAppletElement.js +225 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLAreaElement.js +167 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLAudioElement.js +82 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLBRElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLBaseElement.js +107 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLBodyElement.js +164 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLButtonElement.js +189 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLCanvasElement.js +181 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDListElement.js +98 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDataElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDataListElement.js +82 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDialogElement.js +98 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDirectoryElement.js +98 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDivElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLElement.js +205 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLEmbedElement.js +159 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLFieldSetElement.js +119 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLFontElement.js +121 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLFormElement.js +211 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameElement.js +203 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameSetElement.js +112 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLHRElement.js +150 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLHeadElement.js +82 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLHeadingElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLHtmlElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLHyperlinkElementUtils.js +205 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLIFrameElement.js +278 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLImageElement.js +326 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLInputElement.js +583 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLLIElement.js +108 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLLabelElement.js +103 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLLegendElement.js +103 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLLinkElement.js +206 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLMapElement.js +103 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLMediaElement.js +505 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLMenuElement.js +124 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLMetaElement.js +134 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLMeterElement.js +82 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLModElement.js +108 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLOListElement.js +140 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLObjectElement.js +309 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLOptGroupElement.js +111 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLOptionElement.js +178 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLOutputElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLParagraphElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLParamElement.js +134 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLPreElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLProgressElement.js +82 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLQuoteElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLScriptElement.js +204 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLSelectElement.js +260 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLSourceElement.js +146 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLSpanElement.js +82 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLStyleElement.js +125 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableCaptionElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableCellElement.js +245 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableColElement.js +161 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableDataCellElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableElement.js +357 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableHeaderCellElement.js +121 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableRowElement.js +202 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableSectionElement.js +173 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTemplateElement.js +90 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTextAreaElement.js +415 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTimeElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTitleElement.js +94 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTrackElement.js +193 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLUListElement.js +111 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLUnknownElement.js +82 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLVideoElement.js +138 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HashChangeEvent.js +113 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HashChangeEventInit.js +38 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/History.js +179 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/KeyboardEvent.js +269 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/KeyboardEventInit.js +90 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/LinkStyle.js +85 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Location.js +227 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/MessageEvent.js +164 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/MessageEventInit.js +56 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/MouseEvent.js +234 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/MouseEventInit.js +82 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Navigator.js +96 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/NavigatorConcurrentHardware.js +85 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/NavigatorCookies.js +85 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/NavigatorID.js +149 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/NavigatorLanguage.js +93 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/NavigatorOnLine.js +85 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/NavigatorPlugins.js +88 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Node.js +512 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/NonDocumentTypeChildNode.js +93 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/NonElementParentNode.js +92 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ParentNode.js +139 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/PopStateEvent.js +105 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/PopStateEventInit.js +32 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ProcessingInstruction.js +90 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ProgressEvent.js +122 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ProgressEventInit.js +50 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ScrollIntoViewOptions.js +42 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ScrollOptions.js +32 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Text.js +107 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/TouchEvent.js +138 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/TreeWalker.js +189 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/UIEvent.js +134 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/UIEventInit.js +42 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Window.js +1 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/WindowEventHandlers.js +242 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/XMLDocument.js +82 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/utils.js +40 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/document-base-url.js +53 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/focusing.js +74 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/form-controls.js +43 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/internal-constants.js +13 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/ordered-set-parser.js +5 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/proxied-window-event-handlers.js +11 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js +68 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/selectors.js +30 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/stylesheets.js +78 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/traversal.js +51 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/validate-names.js +62 -0
- data/node_modules/jsdom/lib/jsdom/living/html-collection.js +109 -0
- data/node_modules/jsdom/lib/jsdom/living/index.js +57 -0
- data/node_modules/jsdom/lib/jsdom/living/named-properties-window.js +139 -0
- data/node_modules/jsdom/lib/jsdom/living/navigator/Navigator-impl.js +24 -0
- data/node_modules/jsdom/lib/jsdom/living/navigator/NavigatorConcurrentHardware-impl.js +8 -0
- data/node_modules/jsdom/lib/jsdom/living/navigator/NavigatorCookies-impl.js +7 -0
- data/node_modules/jsdom/lib/jsdom/living/navigator/NavigatorID-impl.js +37 -0
- data/node_modules/jsdom/lib/jsdom/living/navigator/NavigatorLanguage-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/navigator/NavigatorOnLine-impl.js +7 -0
- data/node_modules/jsdom/lib/jsdom/living/navigator/NavigatorPlugins-impl.js +7 -0
- data/node_modules/jsdom/lib/jsdom/living/node-document-position.js +10 -0
- data/node_modules/jsdom/lib/jsdom/living/node-filter.js +47 -0
- data/node_modules/jsdom/lib/jsdom/living/node-iterator.js +232 -0
- data/node_modules/jsdom/lib/jsdom/living/node-list.js +85 -0
- data/node_modules/jsdom/lib/jsdom/living/node-type.js +16 -0
- data/node_modules/jsdom/lib/jsdom/living/node.js +189 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/CharacterData-impl.js +78 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/ChildNode-impl.js +15 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/Comment-impl.js +17 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/DOMImplementation-impl.js +176 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js +777 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/DocumentFragment-impl.js +21 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/DocumentType-impl.js +26 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/Element-impl.js +491 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/ElementCSSInlineStyle-impl.js +7 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/ElementContentEditable-impl.js +7 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/GlobalEventHandlers-impl.js +7 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLAnchorElement-impl.js +25 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLAppletElement-impl.js +26 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLAreaElement-impl.js +18 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLAudioElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLBRElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLBaseElement-impl.js +27 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLBodyElement-impl.js +30 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLButtonElement-impl.js +58 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js +134 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDListElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDataElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDataListElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDialogElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDirectoryElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDivElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLElement-impl.js +144 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLEmbedElement-impl.js +18 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLFieldSetElement-impl.js +14 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLFontElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLFormElement-impl.js +125 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLFrameElement-impl.js +181 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLFrameSetElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLHRElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLHeadElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLHeadingElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLHtmlElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLHyperlinkElementUtils-impl.js +275 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLIFrameElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLImageElement-impl.js +93 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLInputElement-impl.js +396 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLLIElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLLabelElement-impl.js +72 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLLegendElement-impl.js +14 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLLinkElement-impl.js +76 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLMapElement-impl.js +13 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLMediaElement-impl.js +140 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLMenuElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLMetaElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLMeterElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLModElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLOListElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLObjectElement-impl.js +35 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptGroupElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptionElement-impl.js +122 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLOutputElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLParagraphElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLParamElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLPreElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLProgressElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLQuoteElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLScriptElement-impl.js +139 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLSelectElement-impl.js +174 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLSourceElement-impl.js +18 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLSpanElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLStyleElement-impl.js +33 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableCaptionElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableCellElement-impl.js +56 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableColElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableDataCellElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableElement-impl.js +148 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableHeaderCellElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableRowElement-impl.js +70 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableSectionElement-impl.js +54 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTemplateElement-impl.js +33 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTextAreaElement-impl.js +184 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTimeElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTitleElement-impl.js +18 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTrackElement-impl.js +21 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLUListElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLUnknownElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLVideoElement-impl.js +26 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/LinkStyle-impl.js +16 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js +475 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/NonDocumentTypeChildNode-impl.js +28 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/NonElementParentNode-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/ParentNode-impl.js +91 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/ProcessingInstruction-impl.js +22 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/Text-impl.js +48 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/WindowEventHandlers-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/XMLDocument-impl.js +4 -0
- data/node_modules/jsdom/lib/jsdom/living/post-message.js +36 -0
- data/node_modules/jsdom/lib/jsdom/living/register-elements.js +306 -0
- data/node_modules/jsdom/lib/jsdom/living/traversal/TreeWalker-impl.js +257 -0
- data/node_modules/jsdom/lib/jsdom/living/window/History-impl.js +145 -0
- data/node_modules/jsdom/lib/jsdom/living/window/History.idl +12 -0
- data/node_modules/jsdom/lib/jsdom/living/window/Location-impl.js +235 -0
- data/node_modules/jsdom/lib/jsdom/living/window/navigation.js +103 -0
- data/node_modules/jsdom/lib/jsdom/living/xhr-sync-worker.js +50 -0
- data/node_modules/jsdom/lib/jsdom/living/xhr-utils.js +327 -0
- data/node_modules/jsdom/lib/jsdom/living/xhr/FormData-impl.js +182 -0
- data/node_modules/jsdom/lib/jsdom/living/xmlhttprequest-event-target.js +23 -0
- data/node_modules/jsdom/lib/jsdom/living/xmlhttprequest-symbols.js +4 -0
- data/node_modules/jsdom/lib/jsdom/living/xmlhttprequest-upload.js +17 -0
- data/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js +1016 -0
- data/node_modules/jsdom/lib/jsdom/named-properties-tracker.js +156 -0
- data/node_modules/jsdom/lib/jsdom/utils.js +242 -0
- data/node_modules/jsdom/lib/jsdom/virtual-console.js +34 -0
- data/node_modules/jsdom/lib/jsdom/vm-shim.js +106 -0
- data/node_modules/jsdom/lib/jsdom/web-idl/DOMException.js +41 -0
- data/node_modules/jsdom/lib/jsdom/web-idl/dom-exception-table.json +134 -0
- data/node_modules/jsdom/node_modules/request/CHANGELOG.md +662 -0
- data/node_modules/jsdom/node_modules/request/LICENSE +55 -0
- data/node_modules/jsdom/node_modules/request/README.md +1098 -0
- data/node_modules/jsdom/node_modules/request/index.js +156 -0
- data/node_modules/jsdom/node_modules/request/lib/auth.js +168 -0
- data/node_modules/jsdom/node_modules/request/lib/cookies.js +39 -0
- data/node_modules/jsdom/node_modules/request/lib/getProxyFromURI.js +79 -0
- data/node_modules/jsdom/node_modules/request/lib/har.js +215 -0
- data/node_modules/jsdom/node_modules/request/lib/helpers.js +65 -0
- data/node_modules/jsdom/node_modules/request/lib/multipart.js +112 -0
- data/node_modules/jsdom/node_modules/request/lib/oauth.js +147 -0
- data/node_modules/jsdom/node_modules/request/lib/querystring.js +51 -0
- data/node_modules/jsdom/node_modules/request/lib/redirect.js +157 -0
- data/node_modules/jsdom/node_modules/request/lib/tunnel.js +176 -0
- data/node_modules/jsdom/node_modules/request/package.json +163 -0
- data/node_modules/jsdom/node_modules/request/request.js +1475 -0
- data/node_modules/jsdom/package.json +184 -0
- data/node_modules/json-schema/README.md +5 -0
- data/node_modules/json-schema/draft-00/hyper-schema +68 -0
- data/node_modules/json-schema/draft-00/json-ref +26 -0
- data/node_modules/json-schema/draft-00/links +33 -0
- data/node_modules/json-schema/draft-00/schema +155 -0
- data/node_modules/json-schema/draft-01/hyper-schema +68 -0
- data/node_modules/json-schema/draft-01/json-ref +26 -0
- data/node_modules/json-schema/draft-01/links +33 -0
- data/node_modules/json-schema/draft-01/schema +155 -0
- data/node_modules/json-schema/draft-02/hyper-schema +68 -0
- data/node_modules/json-schema/draft-02/json-ref +26 -0
- data/node_modules/json-schema/draft-02/links +35 -0
- data/node_modules/json-schema/draft-02/schema +166 -0
- data/node_modules/json-schema/draft-03/examples/address +20 -0
- data/node_modules/json-schema/draft-03/examples/calendar +53 -0
- data/node_modules/json-schema/draft-03/examples/card +105 -0
- data/node_modules/json-schema/draft-03/examples/geo +8 -0
- data/node_modules/json-schema/draft-03/examples/interfaces +23 -0
- data/node_modules/json-schema/draft-03/hyper-schema +60 -0
- data/node_modules/json-schema/draft-03/json-ref +26 -0
- data/node_modules/json-schema/draft-03/links +35 -0
- data/node_modules/json-schema/draft-03/schema +174 -0
- data/node_modules/json-schema/draft-04/hyper-schema +60 -0
- data/node_modules/json-schema/draft-04/links +41 -0
- data/node_modules/json-schema/draft-04/schema +189 -0
- data/node_modules/json-schema/draft-zyp-json-schema-03.xml +1120 -0
- data/node_modules/json-schema/draft-zyp-json-schema-04.xml +1072 -0
- data/node_modules/json-schema/lib/links.js +66 -0
- data/node_modules/json-schema/lib/validate.js +273 -0
- data/node_modules/json-schema/package.json +100 -0
- data/node_modules/json-schema/test/tests.js +95 -0
- data/node_modules/json-stringify-safe/.npmignore +1 -0
- data/node_modules/json-stringify-safe/CHANGELOG.md +14 -0
- data/node_modules/json-stringify-safe/LICENSE +15 -0
- data/node_modules/json-stringify-safe/Makefile +35 -0
- data/node_modules/json-stringify-safe/README.md +52 -0
- data/node_modules/json-stringify-safe/package.json +102 -0
- data/node_modules/json-stringify-safe/stringify.js +27 -0
- data/node_modules/json-stringify-safe/test/mocha.opts +2 -0
- data/node_modules/json-stringify-safe/test/stringify_test.js +246 -0
- data/node_modules/jsonpointer/.travis.yml +7 -0
- data/node_modules/jsonpointer/LICENSE.md +21 -0
- data/node_modules/jsonpointer/README.md +39 -0
- data/node_modules/jsonpointer/benchmark.js +56 -0
- data/node_modules/jsonpointer/jsonpointer.js +93 -0
- data/node_modules/jsonpointer/package.json +109 -0
- data/node_modules/jsonpointer/test.js +131 -0
- data/node_modules/jsprim/CHANGES.md +39 -0
- data/node_modules/jsprim/LICENSE +19 -0
- data/node_modules/jsprim/README.md +237 -0
- data/node_modules/jsprim/lib/jsprim.js +488 -0
- data/node_modules/jsprim/package.json +85 -0
- data/node_modules/levn/LICENSE +22 -0
- data/node_modules/levn/README.md +196 -0
- data/node_modules/levn/lib/cast.js +298 -0
- data/node_modules/levn/lib/coerce.js +285 -0
- data/node_modules/levn/lib/index.js +22 -0
- data/node_modules/levn/lib/parse-string.js +113 -0
- data/node_modules/levn/lib/parse.js +102 -0
- data/node_modules/levn/package.json +108 -0
- data/node_modules/mime-db/HISTORY.md +375 -0
- data/node_modules/mime-db/LICENSE +22 -0
- data/node_modules/mime-db/README.md +82 -0
- data/node_modules/mime-db/db.json +6712 -0
- data/node_modules/mime-db/index.js +11 -0
- data/node_modules/mime-db/package.json +137 -0
- data/node_modules/mime-types/HISTORY.md +210 -0
- data/node_modules/mime-types/LICENSE +23 -0
- data/node_modules/mime-types/README.md +103 -0
- data/node_modules/mime-types/index.js +188 -0
- data/node_modules/mime-types/package.json +127 -0
- data/node_modules/nwmatcher/LICENSE +22 -0
- data/node_modules/nwmatcher/README.md +107 -0
- data/node_modules/nwmatcher/package.json +99 -0
- data/node_modules/nwmatcher/src/modules/nwmatcher-cache.js +187 -0
- data/node_modules/nwmatcher/src/modules/nwmatcher-jquery.js +126 -0
- data/node_modules/nwmatcher/src/modules/nwmatcher-pseudos.js +273 -0
- data/node_modules/nwmatcher/src/modules/nwmatcher-shortcuts.js +35 -0
- data/node_modules/nwmatcher/src/modules/nwmatcher-traversal.js +90 -0
- data/node_modules/nwmatcher/src/modules/nwmatcher-webforms.js +104 -0
- data/node_modules/nwmatcher/src/nwmatcher-base.js +785 -0
- data/node_modules/nwmatcher/src/nwmatcher-noqsa.js +962 -0
- data/node_modules/nwmatcher/src/nwmatcher.js +1780 -0
- data/node_modules/oauth-sign/LICENSE +55 -0
- data/node_modules/oauth-sign/README.md +4 -0
- data/node_modules/oauth-sign/index.js +136 -0
- data/node_modules/oauth-sign/package.json +98 -0
- data/node_modules/optionator/CHANGELOG.md +52 -0
- data/node_modules/optionator/LICENSE +22 -0
- data/node_modules/optionator/README.md +236 -0
- data/node_modules/optionator/lib/help.js +247 -0
- data/node_modules/optionator/lib/index.js +465 -0
- data/node_modules/optionator/lib/util.js +54 -0
- data/node_modules/optionator/package.json +109 -0
- data/node_modules/parse5/CHANGELOG.md +69 -0
- data/node_modules/parse5/LICENSE +19 -0
- data/node_modules/parse5/README.md +247 -0
- data/node_modules/parse5/docs/build/index.md +963 -0
- data/node_modules/parse5/index.js +12 -0
- data/node_modules/parse5/lib/common/doctype.js +134 -0
- data/node_modules/parse5/lib/common/foreign_content.js +257 -0
- data/node_modules/parse5/lib/common/html.js +268 -0
- data/node_modules/parse5/lib/common/unicode.js +48 -0
- data/node_modules/parse5/lib/common/utils.js +13 -0
- data/node_modules/parse5/lib/jsdom/jsdom_parser.js +39 -0
- data/node_modules/parse5/lib/jsdom/parsing_unit.js +53 -0
- data/node_modules/parse5/lib/serialization/serializer.js +178 -0
- data/node_modules/parse5/lib/simple_api/simple_api_parser.js +107 -0
- data/node_modules/parse5/lib/simple_api/tokenizer_proxy.js +122 -0
- data/node_modules/parse5/lib/tokenization/location_info_mixin.js +80 -0
- data/node_modules/parse5/lib/tokenization/named_entity_trie.js +6 -0
- data/node_modules/parse5/lib/tokenization/preprocessor.js +115 -0
- data/node_modules/parse5/lib/tokenization/tokenizer.js +2317 -0
- data/node_modules/parse5/lib/tree_adapters/default.js +200 -0
- data/node_modules/parse5/lib/tree_adapters/htmlparser2.js +317 -0
- data/node_modules/parse5/lib/tree_construction/formatting_element_list.js +167 -0
- data/node_modules/parse5/lib/tree_construction/location_info_mixin.js +197 -0
- data/node_modules/parse5/lib/tree_construction/open_element_stack.js +379 -0
- data/node_modules/parse5/lib/tree_construction/parser.js +2827 -0
- data/node_modules/parse5/package.json +125 -0
- data/node_modules/pinkie-promise/index.js +3 -0
- data/node_modules/pinkie-promise/license +21 -0
- data/node_modules/pinkie-promise/package.json +102 -0
- data/node_modules/pinkie-promise/readme.md +28 -0
- data/node_modules/pinkie/index.js +292 -0
- data/node_modules/pinkie/license +21 -0
- data/node_modules/pinkie/package.json +100 -0
- data/node_modules/pinkie/readme.md +83 -0
- data/node_modules/prelude-ls/CHANGELOG.md +99 -0
- data/node_modules/prelude-ls/LICENSE +22 -0
- data/node_modules/prelude-ls/README.md +15 -0
- data/node_modules/prelude-ls/lib/Func.js +65 -0
- data/node_modules/prelude-ls/lib/List.js +686 -0
- data/node_modules/prelude-ls/lib/Num.js +130 -0
- data/node_modules/prelude-ls/lib/Obj.js +154 -0
- data/node_modules/prelude-ls/lib/Str.js +92 -0
- data/node_modules/prelude-ls/lib/index.js +178 -0
- data/node_modules/prelude-ls/package.json +116 -0
- data/node_modules/punycode/LICENSE-MIT.txt +20 -0
- data/node_modules/punycode/README.md +176 -0
- data/node_modules/punycode/package.json +127 -0
- data/node_modules/punycode/punycode.js +533 -0
- data/node_modules/qs/.eslintignore +1 -0
- data/node_modules/qs/.eslintrc +19 -0
- data/node_modules/qs/CHANGELOG.md +144 -0
- data/node_modules/qs/CONTRIBUTING.md +1 -0
- data/node_modules/qs/LICENSE +28 -0
- data/node_modules/qs/README.md +398 -0
- data/node_modules/qs/dist/qs.js +574 -0
- data/node_modules/qs/lib/formats.js +18 -0
- data/node_modules/qs/lib/index.js +11 -0
- data/node_modules/qs/lib/parse.js +166 -0
- data/node_modules/qs/lib/stringify.js +187 -0
- data/node_modules/qs/lib/utils.js +180 -0
- data/node_modules/qs/package.json +121 -0
- data/node_modules/qs/test/.eslintrc +9 -0
- data/node_modules/qs/test/index.js +7 -0
- data/node_modules/qs/test/parse.js +459 -0
- data/node_modules/qs/test/stringify.js +538 -0
- data/node_modules/qs/test/utils.js +22 -0
- data/node_modules/sax/LICENSE +41 -0
- data/node_modules/sax/LICENSE-W3C.html +188 -0
- data/node_modules/sax/README.md +225 -0
- data/node_modules/sax/lib/sax.js +1576 -0
- data/node_modules/sax/package.json +133 -0
- data/node_modules/sntp/.npmignore +18 -0
- data/node_modules/sntp/.travis.yml +5 -0
- data/node_modules/sntp/LICENSE +28 -0
- data/node_modules/sntp/Makefile +9 -0
- data/node_modules/sntp/README.md +68 -0
- data/node_modules/sntp/examples/offset.js +16 -0
- data/node_modules/sntp/examples/time.js +25 -0
- data/node_modules/sntp/index.js +1 -0
- data/node_modules/sntp/lib/index.js +412 -0
- data/node_modules/sntp/package.json +98 -0
- data/node_modules/sntp/test/index.js +435 -0
- data/node_modules/source-map/.npmignore +2 -0
- data/node_modules/source-map/.travis.yml +4 -0
- data/node_modules/source-map/CHANGELOG.md +201 -0
- data/node_modules/source-map/LICENSE +28 -0
- data/node_modules/source-map/Makefile.dryice.js +166 -0
- data/node_modules/source-map/README.md +479 -0
- data/node_modules/source-map/build/assert-shim.js +56 -0
- data/node_modules/source-map/build/mini-require.js +152 -0
- data/node_modules/source-map/build/prefix-source-map.jsm +20 -0
- data/node_modules/source-map/build/prefix-utils.jsm +18 -0
- data/node_modules/source-map/build/suffix-browser.js +8 -0
- data/node_modules/source-map/build/suffix-source-map.jsm +6 -0
- data/node_modules/source-map/build/suffix-utils.jsm +21 -0
- data/node_modules/source-map/build/test-prefix.js +8 -0
- data/node_modules/source-map/build/test-suffix.js +3 -0
- data/node_modules/source-map/lib/source-map.js +8 -0
- data/node_modules/source-map/lib/source-map/array-set.js +97 -0
- data/node_modules/source-map/lib/source-map/base64-vlq.js +142 -0
- data/node_modules/source-map/lib/source-map/base64.js +42 -0
- data/node_modules/source-map/lib/source-map/basic-source-map-consumer.js +420 -0
- data/node_modules/source-map/lib/source-map/binary-search.js +80 -0
- data/node_modules/source-map/lib/source-map/indexed-source-map-consumer.js +303 -0
- data/node_modules/source-map/lib/source-map/mapping-list.js +86 -0
- data/node_modules/source-map/lib/source-map/source-map-consumer.js +222 -0
- data/node_modules/source-map/lib/source-map/source-map-generator.js +400 -0
- data/node_modules/source-map/lib/source-map/source-node.js +414 -0
- data/node_modules/source-map/lib/source-map/util.js +319 -0
- data/node_modules/source-map/package.json +223 -0
- data/node_modules/source-map/test/run-tests.js +62 -0
- data/node_modules/source-map/test/source-map/test-api.js +26 -0
- data/node_modules/source-map/test/source-map/test-array-set.js +104 -0
- data/node_modules/source-map/test/source-map/test-base64-vlq.js +23 -0
- data/node_modules/source-map/test/source-map/test-base64.js +35 -0
- data/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
- data/node_modules/source-map/test/source-map/test-dog-fooding.js +84 -0
- data/node_modules/source-map/test/source-map/test-source-map-consumer.js +874 -0
- data/node_modules/source-map/test/source-map/test-source-map-generator.js +679 -0
- data/node_modules/source-map/test/source-map/test-source-node.js +612 -0
- data/node_modules/source-map/test/source-map/test-util.js +216 -0
- data/node_modules/source-map/test/source-map/util.js +299 -0
- data/node_modules/sshpk/.npmignore +9 -0
- data/node_modules/sshpk/.travis.yml +11 -0
- data/node_modules/sshpk/LICENSE +18 -0
- data/node_modules/sshpk/README.md +666 -0
- data/node_modules/sshpk/bin/sshpk-conv +201 -0
- data/node_modules/sshpk/bin/sshpk-sign +191 -0
- data/node_modules/sshpk/bin/sshpk-verify +166 -0
- data/node_modules/sshpk/lib/algs.js +168 -0
- data/node_modules/sshpk/lib/certificate.js +291 -0
- data/node_modules/sshpk/lib/dhe.js +311 -0
- data/node_modules/sshpk/lib/ed-compat.js +96 -0
- data/node_modules/sshpk/lib/errors.js +84 -0
- data/node_modules/sshpk/lib/fingerprint.js +161 -0
- data/node_modules/sshpk/lib/formats/auto.js +73 -0
- data/node_modules/sshpk/lib/formats/openssh-cert.js +289 -0
- data/node_modules/sshpk/lib/formats/pem.js +186 -0
- data/node_modules/sshpk/lib/formats/pkcs1.js +320 -0
- data/node_modules/sshpk/lib/formats/pkcs8.js +505 -0
- data/node_modules/sshpk/lib/formats/rfc4253.js +146 -0
- data/node_modules/sshpk/lib/formats/ssh-private.js +261 -0
- data/node_modules/sshpk/lib/formats/ssh.js +114 -0
- data/node_modules/sshpk/lib/formats/x509-pem.js +77 -0
- data/node_modules/sshpk/lib/formats/x509.js +484 -0
- data/node_modules/sshpk/lib/identity.js +255 -0
- data/node_modules/sshpk/lib/index.js +38 -0
- data/node_modules/sshpk/lib/key.js +270 -0
- data/node_modules/sshpk/lib/private-key.js +231 -0
- data/node_modules/sshpk/lib/signature.js +245 -0
- data/node_modules/sshpk/lib/ssh-buffer.js +148 -0
- data/node_modules/sshpk/lib/utils.js +288 -0
- data/node_modules/sshpk/man/man1/sshpk-conv.1 +135 -0
- data/node_modules/sshpk/man/man1/sshpk-sign.1 +81 -0
- data/node_modules/sshpk/man/man1/sshpk-verify.1 +68 -0
- data/node_modules/sshpk/node_modules/assert-plus/AUTHORS +6 -0
- data/node_modules/sshpk/node_modules/assert-plus/CHANGES.md +14 -0
- data/node_modules/sshpk/node_modules/assert-plus/README.md +162 -0
- data/node_modules/sshpk/node_modules/assert-plus/assert.js +211 -0
- data/node_modules/sshpk/node_modules/assert-plus/package.json +115 -0
- data/node_modules/sshpk/package.json +135 -0
- data/node_modules/stringstream/.npmignore +15 -0
- data/node_modules/stringstream/.travis.yml +4 -0
- data/node_modules/stringstream/LICENSE.txt +22 -0
- data/node_modules/stringstream/README.md +38 -0
- data/node_modules/stringstream/example.js +27 -0
- data/node_modules/stringstream/package.json +85 -0
- data/node_modules/stringstream/stringstream.js +102 -0
- data/node_modules/strip-ansi/index.js +6 -0
- data/node_modules/strip-ansi/license +21 -0
- data/node_modules/strip-ansi/package.json +123 -0
- data/node_modules/strip-ansi/readme.md +33 -0
- data/node_modules/supports-color/index.js +50 -0
- data/node_modules/supports-color/license +21 -0
- data/node_modules/supports-color/package.json +113 -0
- data/node_modules/supports-color/readme.md +36 -0
- data/node_modules/symbol-tree/.jscsrc +55 -0
- data/node_modules/symbol-tree/.npmignore +6 -0
- data/node_modules/symbol-tree/LICENSE +21 -0
- data/node_modules/symbol-tree/README.md +68 -0
- data/node_modules/symbol-tree/api.md +441 -0
- data/node_modules/symbol-tree/lib/SymbolTree.js +834 -0
- data/node_modules/symbol-tree/lib/SymbolTreeNode.js +54 -0
- data/node_modules/symbol-tree/lib/TreeIterator.js +69 -0
- data/node_modules/symbol-tree/lib/TreePosition.js +10 -0
- data/node_modules/symbol-tree/package.json +121 -0
- data/node_modules/symbol-tree/test/SymbolTree.js +1189 -0
- data/node_modules/tough-cookie/LICENSE +27 -0
- data/node_modules/tough-cookie/README.md +506 -0
- data/node_modules/tough-cookie/lib/cookie.js +1336 -0
- data/node_modules/tough-cookie/lib/memstore.js +170 -0
- data/node_modules/tough-cookie/lib/pathMatch.js +61 -0
- data/node_modules/tough-cookie/lib/permuteDomain.js +56 -0
- data/node_modules/tough-cookie/lib/pubsuffix.js +98 -0
- data/node_modules/tough-cookie/lib/store.js +71 -0
- data/node_modules/tough-cookie/package.json +136 -0
- data/node_modules/tr46/.npmignore +4 -0
- data/node_modules/tr46/index.js +193 -0
- data/node_modules/tr46/lib/.gitkeep +0 -0
- data/node_modules/tr46/lib/mappingTable.json +1 -0
- data/node_modules/tr46/package.json +91 -0
- data/node_modules/tunnel-agent/LICENSE +55 -0
- data/node_modules/tunnel-agent/README.md +4 -0
- data/node_modules/tunnel-agent/index.js +243 -0
- data/node_modules/tunnel-agent/package.json +100 -0
- data/node_modules/tweetnacl/.npmignore +4 -0
- data/node_modules/tweetnacl/CHANGELOG.md +209 -0
- data/node_modules/tweetnacl/COPYING.txt +9 -0
- data/node_modules/tweetnacl/ISSUE_TEMPLATE.md +3 -0
- data/node_modules/tweetnacl/README.md +477 -0
- data/node_modules/tweetnacl/nacl-fast.js +2388 -0
- data/node_modules/tweetnacl/nacl-fast.min.js +2 -0
- data/node_modules/tweetnacl/nacl.d.ts +98 -0
- data/node_modules/tweetnacl/nacl.js +1175 -0
- data/node_modules/tweetnacl/nacl.min.js +1 -0
- data/node_modules/tweetnacl/package.json +121 -0
- data/node_modules/type-check/LICENSE +22 -0
- data/node_modules/type-check/README.md +210 -0
- data/node_modules/type-check/lib/check.js +126 -0
- data/node_modules/type-check/lib/index.js +16 -0
- data/node_modules/type-check/lib/parse-type.js +196 -0
- data/node_modules/type-check/package.json +102 -0
- data/node_modules/type-detect/.npmignore +11 -0
- data/node_modules/type-detect/History.md +52 -0
- data/node_modules/type-detect/README.md +226 -0
- data/node_modules/type-detect/ReleaseNotes.md +46 -0
- data/node_modules/type-detect/index.js +1 -0
- data/node_modules/type-detect/lib/type.js +134 -0
- data/node_modules/type-detect/package.json +93 -0
- data/node_modules/uuid/.npmignore +8 -0
- data/node_modules/uuid/.travis.yml +5 -0
- data/node_modules/uuid/AUTHORS +5 -0
- data/node_modules/uuid/HISTORY.md +28 -0
- data/node_modules/uuid/LICENSE.md +21 -0
- data/node_modules/uuid/README.md +132 -0
- data/node_modules/uuid/bin/uuid +26 -0
- data/node_modules/uuid/index.js +8 -0
- data/node_modules/uuid/lib/bytesToUuid.js +23 -0
- data/node_modules/uuid/lib/rng-browser.js +33 -0
- data/node_modules/uuid/lib/rng.js +10 -0
- data/node_modules/uuid/package.json +122 -0
- data/node_modules/uuid/test/mocha.opts +3 -0
- data/node_modules/uuid/test/test.js +96 -0
- data/node_modules/uuid/v1.js +103 -0
- data/node_modules/uuid/v4.js +29 -0
- data/node_modules/verror/.gitmodules +0 -0
- data/node_modules/verror/.npmignore +1 -0
- data/node_modules/verror/LICENSE +19 -0
- data/node_modules/verror/Makefile +35 -0
- data/node_modules/verror/Makefile.targ +285 -0
- data/node_modules/verror/README.md +120 -0
- data/node_modules/verror/examples/levels-verror.js +36 -0
- data/node_modules/verror/examples/levels-werror.js +34 -0
- data/node_modules/verror/examples/varargs.js +6 -0
- data/node_modules/verror/examples/verror.js +13 -0
- data/node_modules/verror/examples/werror.js +14 -0
- data/node_modules/verror/jsl.node.conf +139 -0
- data/node_modules/verror/lib/verror.js +157 -0
- data/node_modules/verror/package.json +78 -0
- data/node_modules/verror/tests/tst.inherit.js +100 -0
- data/node_modules/verror/tests/tst.verror.js +156 -0
- data/node_modules/verror/tests/tst.werror.js +179 -0
- data/node_modules/webidl-conversions/LICENSE.md +12 -0
- data/node_modules/webidl-conversions/README.md +53 -0
- data/node_modules/webidl-conversions/lib/index.js +189 -0
- data/node_modules/webidl-conversions/package.json +96 -0
- data/node_modules/whatwg-encoding/LICENSE.txt +19 -0
- data/node_modules/whatwg-encoding/lib/labels-to-names.json +207 -0
- data/node_modules/whatwg-encoding/lib/supported-names.json +37 -0
- data/node_modules/whatwg-encoding/lib/whatwg-encoding.js +47 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/.npmignore +6 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/.travis.yml +20 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/Changelog.md +93 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/LICENSE +21 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/README.md +157 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-codec.js +554 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-data.js +170 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/index.js +22 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/internal.js +187 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data.js +169 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/utf16.js +174 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/utf7.js +289 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/lib/extend-node.js +214 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/lib/index.js +141 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/lib/streams.js +120 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/package.json +153 -0
- data/node_modules/whatwg-encoding/package.json +101 -0
- data/node_modules/whatwg-url/.eslintignore +3 -0
- data/node_modules/whatwg-url/LICENSE.txt +21 -0
- data/node_modules/whatwg-url/README.md +66 -0
- data/node_modules/whatwg-url/lib/URL-impl.js +216 -0
- data/node_modules/whatwg-url/lib/URL.js +209 -0
- data/node_modules/whatwg-url/lib/public-api.js +11 -0
- data/node_modules/whatwg-url/lib/url-state-machine.js +1173 -0
- data/node_modules/whatwg-url/lib/utils.js +20 -0
- data/node_modules/whatwg-url/package.json +103 -0
- data/node_modules/wordwrap/LICENSE +18 -0
- data/node_modules/wordwrap/README.markdown +70 -0
- data/node_modules/wordwrap/example/center.js +10 -0
- data/node_modules/wordwrap/example/meat.js +3 -0
- data/node_modules/wordwrap/index.js +76 -0
- data/node_modules/wordwrap/package.json +94 -0
- data/node_modules/wordwrap/test/break.js +32 -0
- data/node_modules/wordwrap/test/idleness.txt +63 -0
- data/node_modules/wordwrap/test/wrap.js +33 -0
- data/node_modules/xml-name-validator/LICENSE.txt +19 -0
- data/node_modules/xml-name-validator/README.md +36 -0
- data/node_modules/xml-name-validator/lib/generated-parser.js +504 -0
- data/node_modules/xml-name-validator/lib/grammar.pegjs +35 -0
- data/node_modules/xml-name-validator/lib/xml-name-validator.js +17 -0
- data/node_modules/xml-name-validator/package.json +97 -0
- data/node_modules/xtend/.jshintrc +30 -0
- data/node_modules/xtend/.npmignore +1 -0
- data/node_modules/xtend/LICENCE +19 -0
- data/node_modules/xtend/Makefile +4 -0
- data/node_modules/xtend/README.md +32 -0
- data/node_modules/xtend/immutable.js +19 -0
- data/node_modules/xtend/mutable.js +17 -0
- data/node_modules/xtend/package.json +117 -0
- data/node_modules/xtend/test.js +83 -0
- data/package.json +32 -0
- data/vendor/assets/javascripts/select_all.js +1 -1
- metadata +1870 -2
@@ -0,0 +1,19 @@
|
|
1
|
+
Redistribution and use in source and binary forms, with or without
|
2
|
+
modification, are permitted provided that the following conditions are met:
|
3
|
+
|
4
|
+
* Redistributions of source code must retain the above copyright
|
5
|
+
notice, this list of conditions and the following disclaimer.
|
6
|
+
* Redistributions in binary form must reproduce the above copyright
|
7
|
+
notice, this list of conditions and the following disclaimer in the
|
8
|
+
documentation and/or other materials provided with the distribution.
|
9
|
+
|
10
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
11
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
12
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
13
|
+
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
14
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
15
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
16
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
17
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
18
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
19
|
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@@ -0,0 +1,27 @@
|
|
1
|
+
Copyright (c) 2009-2011, Mozilla Foundation and contributors
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
* Redistributions of source code must retain the above copyright notice, this
|
8
|
+
list of conditions and the following disclaimer.
|
9
|
+
|
10
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
11
|
+
this list of conditions and the following disclaimer in the documentation
|
12
|
+
and/or other materials provided with the distribution.
|
13
|
+
|
14
|
+
* Neither the names of the Mozilla Foundation nor the names of project
|
15
|
+
contributors may be used to endorse or promote products derived from this
|
16
|
+
software without specific prior written permission.
|
17
|
+
|
18
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
19
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
20
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
21
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
22
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
23
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
24
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
25
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
26
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
27
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@@ -0,0 +1,116 @@
|
|
1
|
+
## Escodegen
|
2
|
+
[](http://badge.fury.io/js/escodegen)
|
3
|
+
[](http://travis-ci.org/estools/escodegen)
|
4
|
+
[](https://david-dm.org/estools/escodegen)
|
5
|
+
[](https://david-dm.org/estools/escodegen#info=devDependencies)
|
6
|
+
|
7
|
+
Escodegen ([escodegen](http://github.com/estools/escodegen)) is an
|
8
|
+
[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)
|
9
|
+
(also popularly known as [JavaScript](http://en.wikipedia.org/wiki/JavaScript))
|
10
|
+
code generator from [Mozilla's Parser API](https://developer.mozilla.org/en/SpiderMonkey/Parser_API)
|
11
|
+
AST. See the [online generator](https://estools.github.io/escodegen/demo/index.html)
|
12
|
+
for a demo.
|
13
|
+
|
14
|
+
|
15
|
+
### Install
|
16
|
+
|
17
|
+
Escodegen can be used in a web browser:
|
18
|
+
|
19
|
+
<script src="escodegen.browser.js"></script>
|
20
|
+
|
21
|
+
escodegen.browser.js can be found in tagged revisions on GitHub.
|
22
|
+
|
23
|
+
Or in a Node.js application via npm:
|
24
|
+
|
25
|
+
npm install escodegen
|
26
|
+
|
27
|
+
### Usage
|
28
|
+
|
29
|
+
A simple example: the program
|
30
|
+
|
31
|
+
escodegen.generate({
|
32
|
+
type: 'BinaryExpression',
|
33
|
+
operator: '+',
|
34
|
+
left: { type: 'Literal', value: 40 },
|
35
|
+
right: { type: 'Literal', value: 2 }
|
36
|
+
});
|
37
|
+
|
38
|
+
produces the string `'40 + 2'`.
|
39
|
+
|
40
|
+
See the [API page](https://github.com/estools/escodegen/wiki/API) for
|
41
|
+
options. To run the tests, execute `npm test` in the root directory.
|
42
|
+
|
43
|
+
### Building browser bundle / minified browser bundle
|
44
|
+
|
45
|
+
At first, execute `npm install` to install the all dev dependencies.
|
46
|
+
After that,
|
47
|
+
|
48
|
+
npm run-script build
|
49
|
+
|
50
|
+
will generate `escodegen.browser.js`, which can be used in browser environments.
|
51
|
+
|
52
|
+
And,
|
53
|
+
|
54
|
+
npm run-script build-min
|
55
|
+
|
56
|
+
will generate the minified file `escodegen.browser.min.js`.
|
57
|
+
|
58
|
+
### License
|
59
|
+
|
60
|
+
#### Escodegen
|
61
|
+
|
62
|
+
Copyright (C) 2012 [Yusuke Suzuki](http://github.com/Constellation)
|
63
|
+
(twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors.
|
64
|
+
|
65
|
+
Redistribution and use in source and binary forms, with or without
|
66
|
+
modification, are permitted provided that the following conditions are met:
|
67
|
+
|
68
|
+
* Redistributions of source code must retain the above copyright
|
69
|
+
notice, this list of conditions and the following disclaimer.
|
70
|
+
|
71
|
+
* Redistributions in binary form must reproduce the above copyright
|
72
|
+
notice, this list of conditions and the following disclaimer in the
|
73
|
+
documentation and/or other materials provided with the distribution.
|
74
|
+
|
75
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
76
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
77
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
78
|
+
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
79
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
80
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
81
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
82
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
83
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
84
|
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
85
|
+
|
86
|
+
#### source-map
|
87
|
+
|
88
|
+
SourceNodeMocks has a limited interface of mozilla/source-map SourceNode implementations.
|
89
|
+
|
90
|
+
Copyright (c) 2009-2011, Mozilla Foundation and contributors
|
91
|
+
All rights reserved.
|
92
|
+
|
93
|
+
Redistribution and use in source and binary forms, with or without
|
94
|
+
modification, are permitted provided that the following conditions are met:
|
95
|
+
|
96
|
+
* Redistributions of source code must retain the above copyright notice, this
|
97
|
+
list of conditions and the following disclaimer.
|
98
|
+
|
99
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
100
|
+
this list of conditions and the following disclaimer in the documentation
|
101
|
+
and/or other materials provided with the distribution.
|
102
|
+
|
103
|
+
* Neither the names of the Mozilla Foundation nor the names of project
|
104
|
+
contributors may be used to endorse or promote products derived from this
|
105
|
+
software without specific prior written permission.
|
106
|
+
|
107
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
108
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
109
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
110
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
111
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
112
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
113
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
114
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
115
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
116
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@@ -0,0 +1,77 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
/*
|
3
|
+
Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
|
4
|
+
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
7
|
+
|
8
|
+
* Redistributions of source code must retain the above copyright
|
9
|
+
notice, this list of conditions and the following disclaimer.
|
10
|
+
* Redistributions in binary form must reproduce the above copyright
|
11
|
+
notice, this list of conditions and the following disclaimer in the
|
12
|
+
documentation and/or other materials provided with the distribution.
|
13
|
+
|
14
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
15
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
16
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
17
|
+
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
18
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
19
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
20
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
21
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
22
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
23
|
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
24
|
+
*/
|
25
|
+
|
26
|
+
/*jslint sloppy:true node:true */
|
27
|
+
|
28
|
+
var fs = require('fs'),
|
29
|
+
path = require('path'),
|
30
|
+
root = path.join(path.dirname(fs.realpathSync(__filename)), '..'),
|
31
|
+
esprima = require('esprima'),
|
32
|
+
escodegen = require(root),
|
33
|
+
optionator = require('optionator')({
|
34
|
+
prepend: 'Usage: escodegen [options] file...',
|
35
|
+
options: [
|
36
|
+
{
|
37
|
+
option: 'config',
|
38
|
+
alias: 'c',
|
39
|
+
type: 'String',
|
40
|
+
description: 'configuration json for escodegen'
|
41
|
+
}
|
42
|
+
]
|
43
|
+
}),
|
44
|
+
args = optionator.parse(process.argv),
|
45
|
+
files = args._,
|
46
|
+
options,
|
47
|
+
esprimaOptions = {
|
48
|
+
raw: true,
|
49
|
+
tokens: true,
|
50
|
+
range: true,
|
51
|
+
comment: true
|
52
|
+
};
|
53
|
+
|
54
|
+
if (files.length === 0) {
|
55
|
+
console.log(optionator.generateHelp());
|
56
|
+
process.exit(1);
|
57
|
+
}
|
58
|
+
|
59
|
+
if (args.config) {
|
60
|
+
try {
|
61
|
+
options = JSON.parse(fs.readFileSync(args.config, 'utf-8'));
|
62
|
+
} catch (err) {
|
63
|
+
console.error('Error parsing config: ', err);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
files.forEach(function (filename) {
|
68
|
+
var content = fs.readFileSync(filename, 'utf-8'),
|
69
|
+
syntax = esprima.parse(content, esprimaOptions);
|
70
|
+
|
71
|
+
if (options.comment) {
|
72
|
+
escodegen.attachComments(syntax, syntax.comments, syntax.tokens);
|
73
|
+
}
|
74
|
+
|
75
|
+
console.log(escodegen.generate(syntax, options));
|
76
|
+
});
|
77
|
+
/* vim: set sw=4 ts=4 et tw=80 : */
|
@@ -0,0 +1,64 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
/*
|
3
|
+
Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
|
4
|
+
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
7
|
+
|
8
|
+
* Redistributions of source code must retain the above copyright
|
9
|
+
notice, this list of conditions and the following disclaimer.
|
10
|
+
* Redistributions in binary form must reproduce the above copyright
|
11
|
+
notice, this list of conditions and the following disclaimer in the
|
12
|
+
documentation and/or other materials provided with the distribution.
|
13
|
+
|
14
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
15
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
16
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
17
|
+
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
18
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
19
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
20
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
21
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
22
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
23
|
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
24
|
+
*/
|
25
|
+
|
26
|
+
/*jslint sloppy:true node:true */
|
27
|
+
|
28
|
+
var fs = require('fs'),
|
29
|
+
path = require('path'),
|
30
|
+
root = path.join(path.dirname(fs.realpathSync(__filename)), '..'),
|
31
|
+
escodegen = require(root),
|
32
|
+
optionator = require('optionator')({
|
33
|
+
prepend: 'Usage: esgenerate [options] file.json ...',
|
34
|
+
options: [
|
35
|
+
{
|
36
|
+
option: 'config',
|
37
|
+
alias: 'c',
|
38
|
+
type: 'String',
|
39
|
+
description: 'configuration json for escodegen'
|
40
|
+
}
|
41
|
+
]
|
42
|
+
}),
|
43
|
+
args = optionator.parse(process.argv),
|
44
|
+
files = args._,
|
45
|
+
options;
|
46
|
+
|
47
|
+
if (files.length === 0) {
|
48
|
+
console.log(optionator.generateHelp());
|
49
|
+
process.exit(1);
|
50
|
+
}
|
51
|
+
|
52
|
+
if (args.config) {
|
53
|
+
try {
|
54
|
+
options = JSON.parse(fs.readFileSync(args.config, 'utf-8'))
|
55
|
+
} catch (err) {
|
56
|
+
console.error('Error parsing config: ', err);
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
files.forEach(function (filename) {
|
61
|
+
var content = fs.readFileSync(filename, 'utf-8');
|
62
|
+
console.log(escodegen.generate(JSON.parse(content), options));
|
63
|
+
});
|
64
|
+
/* vim: set sw=4 ts=4 et tw=80 : */
|
@@ -0,0 +1,2607 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (C) 2012-2014 Yusuke Suzuki <utatane.tea@gmail.com>
|
3
|
+
Copyright (C) 2015 Ingvar Stepanyan <me@rreverser.com>
|
4
|
+
Copyright (C) 2014 Ivan Nikulin <ifaaan@gmail.com>
|
5
|
+
Copyright (C) 2012-2013 Michael Ficarra <escodegen.copyright@michael.ficarra.me>
|
6
|
+
Copyright (C) 2012-2013 Mathias Bynens <mathias@qiwi.be>
|
7
|
+
Copyright (C) 2013 Irakli Gozalishvili <rfobic@gmail.com>
|
8
|
+
Copyright (C) 2012 Robert Gust-Bardon <donate@robert.gust-bardon.org>
|
9
|
+
Copyright (C) 2012 John Freeman <jfreeman08@gmail.com>
|
10
|
+
Copyright (C) 2011-2012 Ariya Hidayat <ariya.hidayat@gmail.com>
|
11
|
+
Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
|
12
|
+
Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com>
|
13
|
+
Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>
|
14
|
+
|
15
|
+
Redistribution and use in source and binary forms, with or without
|
16
|
+
modification, are permitted provided that the following conditions are met:
|
17
|
+
|
18
|
+
* Redistributions of source code must retain the above copyright
|
19
|
+
notice, this list of conditions and the following disclaimer.
|
20
|
+
* Redistributions in binary form must reproduce the above copyright
|
21
|
+
notice, this list of conditions and the following disclaimer in the
|
22
|
+
documentation and/or other materials provided with the distribution.
|
23
|
+
|
24
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
25
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
26
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
27
|
+
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
28
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
29
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
30
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
31
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
32
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
33
|
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
34
|
+
*/
|
35
|
+
|
36
|
+
/*global exports:true, require:true, global:true*/
|
37
|
+
(function () {
|
38
|
+
'use strict';
|
39
|
+
|
40
|
+
var Syntax,
|
41
|
+
Precedence,
|
42
|
+
BinaryPrecedence,
|
43
|
+
SourceNode,
|
44
|
+
estraverse,
|
45
|
+
esutils,
|
46
|
+
isArray,
|
47
|
+
base,
|
48
|
+
indent,
|
49
|
+
json,
|
50
|
+
renumber,
|
51
|
+
hexadecimal,
|
52
|
+
quotes,
|
53
|
+
escapeless,
|
54
|
+
newline,
|
55
|
+
space,
|
56
|
+
parentheses,
|
57
|
+
semicolons,
|
58
|
+
safeConcatenation,
|
59
|
+
directive,
|
60
|
+
extra,
|
61
|
+
parse,
|
62
|
+
sourceMap,
|
63
|
+
sourceCode,
|
64
|
+
preserveBlankLines,
|
65
|
+
FORMAT_MINIFY,
|
66
|
+
FORMAT_DEFAULTS;
|
67
|
+
|
68
|
+
estraverse = require('estraverse');
|
69
|
+
esutils = require('esutils');
|
70
|
+
|
71
|
+
Syntax = estraverse.Syntax;
|
72
|
+
|
73
|
+
// Generation is done by generateExpression.
|
74
|
+
function isExpression(node) {
|
75
|
+
return CodeGenerator.Expression.hasOwnProperty(node.type);
|
76
|
+
}
|
77
|
+
|
78
|
+
// Generation is done by generateStatement.
|
79
|
+
function isStatement(node) {
|
80
|
+
return CodeGenerator.Statement.hasOwnProperty(node.type);
|
81
|
+
}
|
82
|
+
|
83
|
+
Precedence = {
|
84
|
+
Sequence: 0,
|
85
|
+
Yield: 1,
|
86
|
+
Await: 1,
|
87
|
+
Assignment: 1,
|
88
|
+
Conditional: 2,
|
89
|
+
ArrowFunction: 2,
|
90
|
+
LogicalOR: 3,
|
91
|
+
LogicalAND: 4,
|
92
|
+
BitwiseOR: 5,
|
93
|
+
BitwiseXOR: 6,
|
94
|
+
BitwiseAND: 7,
|
95
|
+
Equality: 8,
|
96
|
+
Relational: 9,
|
97
|
+
BitwiseSHIFT: 10,
|
98
|
+
Additive: 11,
|
99
|
+
Multiplicative: 12,
|
100
|
+
Unary: 13,
|
101
|
+
Postfix: 14,
|
102
|
+
Call: 15,
|
103
|
+
New: 16,
|
104
|
+
TaggedTemplate: 17,
|
105
|
+
Member: 18,
|
106
|
+
Primary: 19
|
107
|
+
};
|
108
|
+
|
109
|
+
BinaryPrecedence = {
|
110
|
+
'||': Precedence.LogicalOR,
|
111
|
+
'&&': Precedence.LogicalAND,
|
112
|
+
'|': Precedence.BitwiseOR,
|
113
|
+
'^': Precedence.BitwiseXOR,
|
114
|
+
'&': Precedence.BitwiseAND,
|
115
|
+
'==': Precedence.Equality,
|
116
|
+
'!=': Precedence.Equality,
|
117
|
+
'===': Precedence.Equality,
|
118
|
+
'!==': Precedence.Equality,
|
119
|
+
'is': Precedence.Equality,
|
120
|
+
'isnt': Precedence.Equality,
|
121
|
+
'<': Precedence.Relational,
|
122
|
+
'>': Precedence.Relational,
|
123
|
+
'<=': Precedence.Relational,
|
124
|
+
'>=': Precedence.Relational,
|
125
|
+
'in': Precedence.Relational,
|
126
|
+
'instanceof': Precedence.Relational,
|
127
|
+
'<<': Precedence.BitwiseSHIFT,
|
128
|
+
'>>': Precedence.BitwiseSHIFT,
|
129
|
+
'>>>': Precedence.BitwiseSHIFT,
|
130
|
+
'+': Precedence.Additive,
|
131
|
+
'-': Precedence.Additive,
|
132
|
+
'*': Precedence.Multiplicative,
|
133
|
+
'%': Precedence.Multiplicative,
|
134
|
+
'/': Precedence.Multiplicative
|
135
|
+
};
|
136
|
+
|
137
|
+
//Flags
|
138
|
+
var F_ALLOW_IN = 1,
|
139
|
+
F_ALLOW_CALL = 1 << 1,
|
140
|
+
F_ALLOW_UNPARATH_NEW = 1 << 2,
|
141
|
+
F_FUNC_BODY = 1 << 3,
|
142
|
+
F_DIRECTIVE_CTX = 1 << 4,
|
143
|
+
F_SEMICOLON_OPT = 1 << 5;
|
144
|
+
|
145
|
+
//Expression flag sets
|
146
|
+
//NOTE: Flag order:
|
147
|
+
// F_ALLOW_IN
|
148
|
+
// F_ALLOW_CALL
|
149
|
+
// F_ALLOW_UNPARATH_NEW
|
150
|
+
var E_FTT = F_ALLOW_CALL | F_ALLOW_UNPARATH_NEW,
|
151
|
+
E_TTF = F_ALLOW_IN | F_ALLOW_CALL,
|
152
|
+
E_TTT = F_ALLOW_IN | F_ALLOW_CALL | F_ALLOW_UNPARATH_NEW,
|
153
|
+
E_TFF = F_ALLOW_IN,
|
154
|
+
E_FFT = F_ALLOW_UNPARATH_NEW,
|
155
|
+
E_TFT = F_ALLOW_IN | F_ALLOW_UNPARATH_NEW;
|
156
|
+
|
157
|
+
//Statement flag sets
|
158
|
+
//NOTE: Flag order:
|
159
|
+
// F_ALLOW_IN
|
160
|
+
// F_FUNC_BODY
|
161
|
+
// F_DIRECTIVE_CTX
|
162
|
+
// F_SEMICOLON_OPT
|
163
|
+
var S_TFFF = F_ALLOW_IN,
|
164
|
+
S_TFFT = F_ALLOW_IN | F_SEMICOLON_OPT,
|
165
|
+
S_FFFF = 0x00,
|
166
|
+
S_TFTF = F_ALLOW_IN | F_DIRECTIVE_CTX,
|
167
|
+
S_TTFF = F_ALLOW_IN | F_FUNC_BODY;
|
168
|
+
|
169
|
+
function getDefaultOptions() {
|
170
|
+
// default options
|
171
|
+
return {
|
172
|
+
indent: null,
|
173
|
+
base: null,
|
174
|
+
parse: null,
|
175
|
+
comment: false,
|
176
|
+
format: {
|
177
|
+
indent: {
|
178
|
+
style: ' ',
|
179
|
+
base: 0,
|
180
|
+
adjustMultilineComment: false
|
181
|
+
},
|
182
|
+
newline: '\n',
|
183
|
+
space: ' ',
|
184
|
+
json: false,
|
185
|
+
renumber: false,
|
186
|
+
hexadecimal: false,
|
187
|
+
quotes: 'single',
|
188
|
+
escapeless: false,
|
189
|
+
compact: false,
|
190
|
+
parentheses: true,
|
191
|
+
semicolons: true,
|
192
|
+
safeConcatenation: false,
|
193
|
+
preserveBlankLines: false
|
194
|
+
},
|
195
|
+
moz: {
|
196
|
+
comprehensionExpressionStartsWithAssignment: false,
|
197
|
+
starlessGenerator: false
|
198
|
+
},
|
199
|
+
sourceMap: null,
|
200
|
+
sourceMapRoot: null,
|
201
|
+
sourceMapWithCode: false,
|
202
|
+
directive: false,
|
203
|
+
raw: true,
|
204
|
+
verbatim: null,
|
205
|
+
sourceCode: null
|
206
|
+
};
|
207
|
+
}
|
208
|
+
|
209
|
+
function stringRepeat(str, num) {
|
210
|
+
var result = '';
|
211
|
+
|
212
|
+
for (num |= 0; num > 0; num >>>= 1, str += str) {
|
213
|
+
if (num & 1) {
|
214
|
+
result += str;
|
215
|
+
}
|
216
|
+
}
|
217
|
+
|
218
|
+
return result;
|
219
|
+
}
|
220
|
+
|
221
|
+
isArray = Array.isArray;
|
222
|
+
if (!isArray) {
|
223
|
+
isArray = function isArray(array) {
|
224
|
+
return Object.prototype.toString.call(array) === '[object Array]';
|
225
|
+
};
|
226
|
+
}
|
227
|
+
|
228
|
+
function hasLineTerminator(str) {
|
229
|
+
return (/[\r\n]/g).test(str);
|
230
|
+
}
|
231
|
+
|
232
|
+
function endsWithLineTerminator(str) {
|
233
|
+
var len = str.length;
|
234
|
+
return len && esutils.code.isLineTerminator(str.charCodeAt(len - 1));
|
235
|
+
}
|
236
|
+
|
237
|
+
function merge(target, override) {
|
238
|
+
var key;
|
239
|
+
for (key in override) {
|
240
|
+
if (override.hasOwnProperty(key)) {
|
241
|
+
target[key] = override[key];
|
242
|
+
}
|
243
|
+
}
|
244
|
+
return target;
|
245
|
+
}
|
246
|
+
|
247
|
+
function updateDeeply(target, override) {
|
248
|
+
var key, val;
|
249
|
+
|
250
|
+
function isHashObject(target) {
|
251
|
+
return typeof target === 'object' && target instanceof Object && !(target instanceof RegExp);
|
252
|
+
}
|
253
|
+
|
254
|
+
for (key in override) {
|
255
|
+
if (override.hasOwnProperty(key)) {
|
256
|
+
val = override[key];
|
257
|
+
if (isHashObject(val)) {
|
258
|
+
if (isHashObject(target[key])) {
|
259
|
+
updateDeeply(target[key], val);
|
260
|
+
} else {
|
261
|
+
target[key] = updateDeeply({}, val);
|
262
|
+
}
|
263
|
+
} else {
|
264
|
+
target[key] = val;
|
265
|
+
}
|
266
|
+
}
|
267
|
+
}
|
268
|
+
return target;
|
269
|
+
}
|
270
|
+
|
271
|
+
function generateNumber(value) {
|
272
|
+
var result, point, temp, exponent, pos;
|
273
|
+
|
274
|
+
if (value !== value) {
|
275
|
+
throw new Error('Numeric literal whose value is NaN');
|
276
|
+
}
|
277
|
+
if (value < 0 || (value === 0 && 1 / value < 0)) {
|
278
|
+
throw new Error('Numeric literal whose value is negative');
|
279
|
+
}
|
280
|
+
|
281
|
+
if (value === 1 / 0) {
|
282
|
+
return json ? 'null' : renumber ? '1e400' : '1e+400';
|
283
|
+
}
|
284
|
+
|
285
|
+
result = '' + value;
|
286
|
+
if (!renumber || result.length < 3) {
|
287
|
+
return result;
|
288
|
+
}
|
289
|
+
|
290
|
+
point = result.indexOf('.');
|
291
|
+
if (!json && result.charCodeAt(0) === 0x30 /* 0 */ && point === 1) {
|
292
|
+
point = 0;
|
293
|
+
result = result.slice(1);
|
294
|
+
}
|
295
|
+
temp = result;
|
296
|
+
result = result.replace('e+', 'e');
|
297
|
+
exponent = 0;
|
298
|
+
if ((pos = temp.indexOf('e')) > 0) {
|
299
|
+
exponent = +temp.slice(pos + 1);
|
300
|
+
temp = temp.slice(0, pos);
|
301
|
+
}
|
302
|
+
if (point >= 0) {
|
303
|
+
exponent -= temp.length - point - 1;
|
304
|
+
temp = +(temp.slice(0, point) + temp.slice(point + 1)) + '';
|
305
|
+
}
|
306
|
+
pos = 0;
|
307
|
+
while (temp.charCodeAt(temp.length + pos - 1) === 0x30 /* 0 */) {
|
308
|
+
--pos;
|
309
|
+
}
|
310
|
+
if (pos !== 0) {
|
311
|
+
exponent -= pos;
|
312
|
+
temp = temp.slice(0, pos);
|
313
|
+
}
|
314
|
+
if (exponent !== 0) {
|
315
|
+
temp += 'e' + exponent;
|
316
|
+
}
|
317
|
+
if ((temp.length < result.length ||
|
318
|
+
(hexadecimal && value > 1e12 && Math.floor(value) === value && (temp = '0x' + value.toString(16)).length < result.length)) &&
|
319
|
+
+temp === value) {
|
320
|
+
result = temp;
|
321
|
+
}
|
322
|
+
|
323
|
+
return result;
|
324
|
+
}
|
325
|
+
|
326
|
+
// Generate valid RegExp expression.
|
327
|
+
// This function is based on https://github.com/Constellation/iv Engine
|
328
|
+
|
329
|
+
function escapeRegExpCharacter(ch, previousIsBackslash) {
|
330
|
+
// not handling '\' and handling \u2028 or \u2029 to unicode escape sequence
|
331
|
+
if ((ch & ~1) === 0x2028) {
|
332
|
+
return (previousIsBackslash ? 'u' : '\\u') + ((ch === 0x2028) ? '2028' : '2029');
|
333
|
+
} else if (ch === 10 || ch === 13) { // \n, \r
|
334
|
+
return (previousIsBackslash ? '' : '\\') + ((ch === 10) ? 'n' : 'r');
|
335
|
+
}
|
336
|
+
return String.fromCharCode(ch);
|
337
|
+
}
|
338
|
+
|
339
|
+
function generateRegExp(reg) {
|
340
|
+
var match, result, flags, i, iz, ch, characterInBrack, previousIsBackslash;
|
341
|
+
|
342
|
+
result = reg.toString();
|
343
|
+
|
344
|
+
if (reg.source) {
|
345
|
+
// extract flag from toString result
|
346
|
+
match = result.match(/\/([^/]*)$/);
|
347
|
+
if (!match) {
|
348
|
+
return result;
|
349
|
+
}
|
350
|
+
|
351
|
+
flags = match[1];
|
352
|
+
result = '';
|
353
|
+
|
354
|
+
characterInBrack = false;
|
355
|
+
previousIsBackslash = false;
|
356
|
+
for (i = 0, iz = reg.source.length; i < iz; ++i) {
|
357
|
+
ch = reg.source.charCodeAt(i);
|
358
|
+
|
359
|
+
if (!previousIsBackslash) {
|
360
|
+
if (characterInBrack) {
|
361
|
+
if (ch === 93) { // ]
|
362
|
+
characterInBrack = false;
|
363
|
+
}
|
364
|
+
} else {
|
365
|
+
if (ch === 47) { // /
|
366
|
+
result += '\\';
|
367
|
+
} else if (ch === 91) { // [
|
368
|
+
characterInBrack = true;
|
369
|
+
}
|
370
|
+
}
|
371
|
+
result += escapeRegExpCharacter(ch, previousIsBackslash);
|
372
|
+
previousIsBackslash = ch === 92; // \
|
373
|
+
} else {
|
374
|
+
// if new RegExp("\\\n') is provided, create /\n/
|
375
|
+
result += escapeRegExpCharacter(ch, previousIsBackslash);
|
376
|
+
// prevent like /\\[/]/
|
377
|
+
previousIsBackslash = false;
|
378
|
+
}
|
379
|
+
}
|
380
|
+
|
381
|
+
return '/' + result + '/' + flags;
|
382
|
+
}
|
383
|
+
|
384
|
+
return result;
|
385
|
+
}
|
386
|
+
|
387
|
+
function escapeAllowedCharacter(code, next) {
|
388
|
+
var hex;
|
389
|
+
|
390
|
+
if (code === 0x08 /* \b */) {
|
391
|
+
return '\\b';
|
392
|
+
}
|
393
|
+
|
394
|
+
if (code === 0x0C /* \f */) {
|
395
|
+
return '\\f';
|
396
|
+
}
|
397
|
+
|
398
|
+
if (code === 0x09 /* \t */) {
|
399
|
+
return '\\t';
|
400
|
+
}
|
401
|
+
|
402
|
+
hex = code.toString(16).toUpperCase();
|
403
|
+
if (json || code > 0xFF) {
|
404
|
+
return '\\u' + '0000'.slice(hex.length) + hex;
|
405
|
+
} else if (code === 0x0000 && !esutils.code.isDecimalDigit(next)) {
|
406
|
+
return '\\0';
|
407
|
+
} else if (code === 0x000B /* \v */) { // '\v'
|
408
|
+
return '\\x0B';
|
409
|
+
} else {
|
410
|
+
return '\\x' + '00'.slice(hex.length) + hex;
|
411
|
+
}
|
412
|
+
}
|
413
|
+
|
414
|
+
function escapeDisallowedCharacter(code) {
|
415
|
+
if (code === 0x5C /* \ */) {
|
416
|
+
return '\\\\';
|
417
|
+
}
|
418
|
+
|
419
|
+
if (code === 0x0A /* \n */) {
|
420
|
+
return '\\n';
|
421
|
+
}
|
422
|
+
|
423
|
+
if (code === 0x0D /* \r */) {
|
424
|
+
return '\\r';
|
425
|
+
}
|
426
|
+
|
427
|
+
if (code === 0x2028) {
|
428
|
+
return '\\u2028';
|
429
|
+
}
|
430
|
+
|
431
|
+
if (code === 0x2029) {
|
432
|
+
return '\\u2029';
|
433
|
+
}
|
434
|
+
|
435
|
+
throw new Error('Incorrectly classified character');
|
436
|
+
}
|
437
|
+
|
438
|
+
function escapeDirective(str) {
|
439
|
+
var i, iz, code, quote;
|
440
|
+
|
441
|
+
quote = quotes === 'double' ? '"' : '\'';
|
442
|
+
for (i = 0, iz = str.length; i < iz; ++i) {
|
443
|
+
code = str.charCodeAt(i);
|
444
|
+
if (code === 0x27 /* ' */) {
|
445
|
+
quote = '"';
|
446
|
+
break;
|
447
|
+
} else if (code === 0x22 /* " */) {
|
448
|
+
quote = '\'';
|
449
|
+
break;
|
450
|
+
} else if (code === 0x5C /* \ */) {
|
451
|
+
++i;
|
452
|
+
}
|
453
|
+
}
|
454
|
+
|
455
|
+
return quote + str + quote;
|
456
|
+
}
|
457
|
+
|
458
|
+
function escapeString(str) {
|
459
|
+
var result = '', i, len, code, singleQuotes = 0, doubleQuotes = 0, single, quote;
|
460
|
+
|
461
|
+
for (i = 0, len = str.length; i < len; ++i) {
|
462
|
+
code = str.charCodeAt(i);
|
463
|
+
if (code === 0x27 /* ' */) {
|
464
|
+
++singleQuotes;
|
465
|
+
} else if (code === 0x22 /* " */) {
|
466
|
+
++doubleQuotes;
|
467
|
+
} else if (code === 0x2F /* / */ && json) {
|
468
|
+
result += '\\';
|
469
|
+
} else if (esutils.code.isLineTerminator(code) || code === 0x5C /* \ */) {
|
470
|
+
result += escapeDisallowedCharacter(code);
|
471
|
+
continue;
|
472
|
+
} else if (!esutils.code.isIdentifierPartES5(code) && (json && code < 0x20 /* SP */ || !json && !escapeless && (code < 0x20 /* SP */ || code > 0x7E /* ~ */))) {
|
473
|
+
result += escapeAllowedCharacter(code, str.charCodeAt(i + 1));
|
474
|
+
continue;
|
475
|
+
}
|
476
|
+
result += String.fromCharCode(code);
|
477
|
+
}
|
478
|
+
|
479
|
+
single = !(quotes === 'double' || (quotes === 'auto' && doubleQuotes < singleQuotes));
|
480
|
+
quote = single ? '\'' : '"';
|
481
|
+
|
482
|
+
if (!(single ? singleQuotes : doubleQuotes)) {
|
483
|
+
return quote + result + quote;
|
484
|
+
}
|
485
|
+
|
486
|
+
str = result;
|
487
|
+
result = quote;
|
488
|
+
|
489
|
+
for (i = 0, len = str.length; i < len; ++i) {
|
490
|
+
code = str.charCodeAt(i);
|
491
|
+
if ((code === 0x27 /* ' */ && single) || (code === 0x22 /* " */ && !single)) {
|
492
|
+
result += '\\';
|
493
|
+
}
|
494
|
+
result += String.fromCharCode(code);
|
495
|
+
}
|
496
|
+
|
497
|
+
return result + quote;
|
498
|
+
}
|
499
|
+
|
500
|
+
/**
|
501
|
+
* flatten an array to a string, where the array can contain
|
502
|
+
* either strings or nested arrays
|
503
|
+
*/
|
504
|
+
function flattenToString(arr) {
|
505
|
+
var i, iz, elem, result = '';
|
506
|
+
for (i = 0, iz = arr.length; i < iz; ++i) {
|
507
|
+
elem = arr[i];
|
508
|
+
result += isArray(elem) ? flattenToString(elem) : elem;
|
509
|
+
}
|
510
|
+
return result;
|
511
|
+
}
|
512
|
+
|
513
|
+
/**
|
514
|
+
* convert generated to a SourceNode when source maps are enabled.
|
515
|
+
*/
|
516
|
+
function toSourceNodeWhenNeeded(generated, node) {
|
517
|
+
if (!sourceMap) {
|
518
|
+
// with no source maps, generated is either an
|
519
|
+
// array or a string. if an array, flatten it.
|
520
|
+
// if a string, just return it
|
521
|
+
if (isArray(generated)) {
|
522
|
+
return flattenToString(generated);
|
523
|
+
} else {
|
524
|
+
return generated;
|
525
|
+
}
|
526
|
+
}
|
527
|
+
if (node == null) {
|
528
|
+
if (generated instanceof SourceNode) {
|
529
|
+
return generated;
|
530
|
+
} else {
|
531
|
+
node = {};
|
532
|
+
}
|
533
|
+
}
|
534
|
+
if (node.loc == null) {
|
535
|
+
return new SourceNode(null, null, sourceMap, generated, node.name || null);
|
536
|
+
}
|
537
|
+
return new SourceNode(node.loc.start.line, node.loc.start.column, (sourceMap === true ? node.loc.source || null : sourceMap), generated, node.name || null);
|
538
|
+
}
|
539
|
+
|
540
|
+
function noEmptySpace() {
|
541
|
+
return (space) ? space : ' ';
|
542
|
+
}
|
543
|
+
|
544
|
+
function join(left, right) {
|
545
|
+
var leftSource,
|
546
|
+
rightSource,
|
547
|
+
leftCharCode,
|
548
|
+
rightCharCode;
|
549
|
+
|
550
|
+
leftSource = toSourceNodeWhenNeeded(left).toString();
|
551
|
+
if (leftSource.length === 0) {
|
552
|
+
return [right];
|
553
|
+
}
|
554
|
+
|
555
|
+
rightSource = toSourceNodeWhenNeeded(right).toString();
|
556
|
+
if (rightSource.length === 0) {
|
557
|
+
return [left];
|
558
|
+
}
|
559
|
+
|
560
|
+
leftCharCode = leftSource.charCodeAt(leftSource.length - 1);
|
561
|
+
rightCharCode = rightSource.charCodeAt(0);
|
562
|
+
|
563
|
+
if ((leftCharCode === 0x2B /* + */ || leftCharCode === 0x2D /* - */) && leftCharCode === rightCharCode ||
|
564
|
+
esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode) ||
|
565
|
+
leftCharCode === 0x2F /* / */ && rightCharCode === 0x69 /* i */) { // infix word operators all start with `i`
|
566
|
+
return [left, noEmptySpace(), right];
|
567
|
+
} else if (esutils.code.isWhiteSpace(leftCharCode) || esutils.code.isLineTerminator(leftCharCode) ||
|
568
|
+
esutils.code.isWhiteSpace(rightCharCode) || esutils.code.isLineTerminator(rightCharCode)) {
|
569
|
+
return [left, right];
|
570
|
+
}
|
571
|
+
return [left, space, right];
|
572
|
+
}
|
573
|
+
|
574
|
+
function addIndent(stmt) {
|
575
|
+
return [base, stmt];
|
576
|
+
}
|
577
|
+
|
578
|
+
function withIndent(fn) {
|
579
|
+
var previousBase;
|
580
|
+
previousBase = base;
|
581
|
+
base += indent;
|
582
|
+
fn(base);
|
583
|
+
base = previousBase;
|
584
|
+
}
|
585
|
+
|
586
|
+
function calculateSpaces(str) {
|
587
|
+
var i;
|
588
|
+
for (i = str.length - 1; i >= 0; --i) {
|
589
|
+
if (esutils.code.isLineTerminator(str.charCodeAt(i))) {
|
590
|
+
break;
|
591
|
+
}
|
592
|
+
}
|
593
|
+
return (str.length - 1) - i;
|
594
|
+
}
|
595
|
+
|
596
|
+
function adjustMultilineComment(value, specialBase) {
|
597
|
+
var array, i, len, line, j, spaces, previousBase, sn;
|
598
|
+
|
599
|
+
array = value.split(/\r\n|[\r\n]/);
|
600
|
+
spaces = Number.MAX_VALUE;
|
601
|
+
|
602
|
+
// first line doesn't have indentation
|
603
|
+
for (i = 1, len = array.length; i < len; ++i) {
|
604
|
+
line = array[i];
|
605
|
+
j = 0;
|
606
|
+
while (j < line.length && esutils.code.isWhiteSpace(line.charCodeAt(j))) {
|
607
|
+
++j;
|
608
|
+
}
|
609
|
+
if (spaces > j) {
|
610
|
+
spaces = j;
|
611
|
+
}
|
612
|
+
}
|
613
|
+
|
614
|
+
if (typeof specialBase !== 'undefined') {
|
615
|
+
// pattern like
|
616
|
+
// {
|
617
|
+
// var t = 20; /*
|
618
|
+
// * this is comment
|
619
|
+
// */
|
620
|
+
// }
|
621
|
+
previousBase = base;
|
622
|
+
if (array[1][spaces] === '*') {
|
623
|
+
specialBase += ' ';
|
624
|
+
}
|
625
|
+
base = specialBase;
|
626
|
+
} else {
|
627
|
+
if (spaces & 1) {
|
628
|
+
// /*
|
629
|
+
// *
|
630
|
+
// */
|
631
|
+
// If spaces are odd number, above pattern is considered.
|
632
|
+
// We waste 1 space.
|
633
|
+
--spaces;
|
634
|
+
}
|
635
|
+
previousBase = base;
|
636
|
+
}
|
637
|
+
|
638
|
+
for (i = 1, len = array.length; i < len; ++i) {
|
639
|
+
sn = toSourceNodeWhenNeeded(addIndent(array[i].slice(spaces)));
|
640
|
+
array[i] = sourceMap ? sn.join('') : sn;
|
641
|
+
}
|
642
|
+
|
643
|
+
base = previousBase;
|
644
|
+
|
645
|
+
return array.join('\n');
|
646
|
+
}
|
647
|
+
|
648
|
+
function generateComment(comment, specialBase) {
|
649
|
+
if (comment.type === 'Line') {
|
650
|
+
if (endsWithLineTerminator(comment.value)) {
|
651
|
+
return '//' + comment.value;
|
652
|
+
} else {
|
653
|
+
// Always use LineTerminator
|
654
|
+
var result = '//' + comment.value;
|
655
|
+
if (!preserveBlankLines) {
|
656
|
+
result += '\n';
|
657
|
+
}
|
658
|
+
return result;
|
659
|
+
}
|
660
|
+
}
|
661
|
+
if (extra.format.indent.adjustMultilineComment && /[\n\r]/.test(comment.value)) {
|
662
|
+
return adjustMultilineComment('/*' + comment.value + '*/', specialBase);
|
663
|
+
}
|
664
|
+
return '/*' + comment.value + '*/';
|
665
|
+
}
|
666
|
+
|
667
|
+
function addComments(stmt, result) {
|
668
|
+
var i, len, comment, save, tailingToStatement, specialBase, fragment,
|
669
|
+
extRange, range, prevRange, prefix, infix, suffix, count;
|
670
|
+
|
671
|
+
if (stmt.leadingComments && stmt.leadingComments.length > 0) {
|
672
|
+
save = result;
|
673
|
+
|
674
|
+
if (preserveBlankLines) {
|
675
|
+
comment = stmt.leadingComments[0];
|
676
|
+
result = [];
|
677
|
+
|
678
|
+
extRange = comment.extendedRange;
|
679
|
+
range = comment.range;
|
680
|
+
|
681
|
+
prefix = sourceCode.substring(extRange[0], range[0]);
|
682
|
+
count = (prefix.match(/\n/g) || []).length;
|
683
|
+
if (count > 0) {
|
684
|
+
result.push(stringRepeat('\n', count));
|
685
|
+
result.push(addIndent(generateComment(comment)));
|
686
|
+
} else {
|
687
|
+
result.push(prefix);
|
688
|
+
result.push(generateComment(comment));
|
689
|
+
}
|
690
|
+
|
691
|
+
prevRange = range;
|
692
|
+
|
693
|
+
for (i = 1, len = stmt.leadingComments.length; i < len; i++) {
|
694
|
+
comment = stmt.leadingComments[i];
|
695
|
+
range = comment.range;
|
696
|
+
|
697
|
+
infix = sourceCode.substring(prevRange[1], range[0]);
|
698
|
+
count = (infix.match(/\n/g) || []).length;
|
699
|
+
result.push(stringRepeat('\n', count));
|
700
|
+
result.push(addIndent(generateComment(comment)));
|
701
|
+
|
702
|
+
prevRange = range;
|
703
|
+
}
|
704
|
+
|
705
|
+
suffix = sourceCode.substring(range[1], extRange[1]);
|
706
|
+
count = (suffix.match(/\n/g) || []).length;
|
707
|
+
result.push(stringRepeat('\n', count));
|
708
|
+
} else {
|
709
|
+
comment = stmt.leadingComments[0];
|
710
|
+
result = [];
|
711
|
+
if (safeConcatenation && stmt.type === Syntax.Program && stmt.body.length === 0) {
|
712
|
+
result.push('\n');
|
713
|
+
}
|
714
|
+
result.push(generateComment(comment));
|
715
|
+
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
|
716
|
+
result.push('\n');
|
717
|
+
}
|
718
|
+
|
719
|
+
for (i = 1, len = stmt.leadingComments.length; i < len; ++i) {
|
720
|
+
comment = stmt.leadingComments[i];
|
721
|
+
fragment = [generateComment(comment)];
|
722
|
+
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
|
723
|
+
fragment.push('\n');
|
724
|
+
}
|
725
|
+
result.push(addIndent(fragment));
|
726
|
+
}
|
727
|
+
}
|
728
|
+
|
729
|
+
result.push(addIndent(save));
|
730
|
+
}
|
731
|
+
|
732
|
+
if (stmt.trailingComments) {
|
733
|
+
|
734
|
+
if (preserveBlankLines) {
|
735
|
+
comment = stmt.trailingComments[0];
|
736
|
+
extRange = comment.extendedRange;
|
737
|
+
range = comment.range;
|
738
|
+
|
739
|
+
prefix = sourceCode.substring(extRange[0], range[0]);
|
740
|
+
count = (prefix.match(/\n/g) || []).length;
|
741
|
+
|
742
|
+
if (count > 0) {
|
743
|
+
result.push(stringRepeat('\n', count));
|
744
|
+
result.push(addIndent(generateComment(comment)));
|
745
|
+
} else {
|
746
|
+
result.push(prefix);
|
747
|
+
result.push(generateComment(comment));
|
748
|
+
}
|
749
|
+
} else {
|
750
|
+
tailingToStatement = !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString());
|
751
|
+
specialBase = stringRepeat(' ', calculateSpaces(toSourceNodeWhenNeeded([base, result, indent]).toString()));
|
752
|
+
for (i = 0, len = stmt.trailingComments.length; i < len; ++i) {
|
753
|
+
comment = stmt.trailingComments[i];
|
754
|
+
if (tailingToStatement) {
|
755
|
+
// We assume target like following script
|
756
|
+
//
|
757
|
+
// var t = 20; /**
|
758
|
+
// * This is comment of t
|
759
|
+
// */
|
760
|
+
if (i === 0) {
|
761
|
+
// first case
|
762
|
+
result = [result, indent];
|
763
|
+
} else {
|
764
|
+
result = [result, specialBase];
|
765
|
+
}
|
766
|
+
result.push(generateComment(comment, specialBase));
|
767
|
+
} else {
|
768
|
+
result = [result, addIndent(generateComment(comment))];
|
769
|
+
}
|
770
|
+
if (i !== len - 1 && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
|
771
|
+
result = [result, '\n'];
|
772
|
+
}
|
773
|
+
}
|
774
|
+
}
|
775
|
+
}
|
776
|
+
|
777
|
+
return result;
|
778
|
+
}
|
779
|
+
|
780
|
+
function generateBlankLines(start, end, result) {
|
781
|
+
var j, newlineCount = 0;
|
782
|
+
|
783
|
+
for (j = start; j < end; j++) {
|
784
|
+
if (sourceCode[j] === '\n') {
|
785
|
+
newlineCount++;
|
786
|
+
}
|
787
|
+
}
|
788
|
+
|
789
|
+
for (j = 1; j < newlineCount; j++) {
|
790
|
+
result.push(newline);
|
791
|
+
}
|
792
|
+
}
|
793
|
+
|
794
|
+
function parenthesize(text, current, should) {
|
795
|
+
if (current < should) {
|
796
|
+
return ['(', text, ')'];
|
797
|
+
}
|
798
|
+
return text;
|
799
|
+
}
|
800
|
+
|
801
|
+
function generateVerbatimString(string) {
|
802
|
+
var i, iz, result;
|
803
|
+
result = string.split(/\r\n|\n/);
|
804
|
+
for (i = 1, iz = result.length; i < iz; i++) {
|
805
|
+
result[i] = newline + base + result[i];
|
806
|
+
}
|
807
|
+
return result;
|
808
|
+
}
|
809
|
+
|
810
|
+
function generateVerbatim(expr, precedence) {
|
811
|
+
var verbatim, result, prec;
|
812
|
+
verbatim = expr[extra.verbatim];
|
813
|
+
|
814
|
+
if (typeof verbatim === 'string') {
|
815
|
+
result = parenthesize(generateVerbatimString(verbatim), Precedence.Sequence, precedence);
|
816
|
+
} else {
|
817
|
+
// verbatim is object
|
818
|
+
result = generateVerbatimString(verbatim.content);
|
819
|
+
prec = (verbatim.precedence != null) ? verbatim.precedence : Precedence.Sequence;
|
820
|
+
result = parenthesize(result, prec, precedence);
|
821
|
+
}
|
822
|
+
|
823
|
+
return toSourceNodeWhenNeeded(result, expr);
|
824
|
+
}
|
825
|
+
|
826
|
+
function CodeGenerator() {
|
827
|
+
}
|
828
|
+
|
829
|
+
// Helpers.
|
830
|
+
|
831
|
+
CodeGenerator.prototype.maybeBlock = function(stmt, flags) {
|
832
|
+
var result, noLeadingComment, that = this;
|
833
|
+
|
834
|
+
noLeadingComment = !extra.comment || !stmt.leadingComments;
|
835
|
+
|
836
|
+
if (stmt.type === Syntax.BlockStatement && noLeadingComment) {
|
837
|
+
return [space, this.generateStatement(stmt, flags)];
|
838
|
+
}
|
839
|
+
|
840
|
+
if (stmt.type === Syntax.EmptyStatement && noLeadingComment) {
|
841
|
+
return ';';
|
842
|
+
}
|
843
|
+
|
844
|
+
withIndent(function () {
|
845
|
+
result = [
|
846
|
+
newline,
|
847
|
+
addIndent(that.generateStatement(stmt, flags))
|
848
|
+
];
|
849
|
+
});
|
850
|
+
|
851
|
+
return result;
|
852
|
+
};
|
853
|
+
|
854
|
+
CodeGenerator.prototype.maybeBlockSuffix = function (stmt, result) {
|
855
|
+
var ends = endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString());
|
856
|
+
if (stmt.type === Syntax.BlockStatement && (!extra.comment || !stmt.leadingComments) && !ends) {
|
857
|
+
return [result, space];
|
858
|
+
}
|
859
|
+
if (ends) {
|
860
|
+
return [result, base];
|
861
|
+
}
|
862
|
+
return [result, newline, base];
|
863
|
+
};
|
864
|
+
|
865
|
+
function generateIdentifier(node) {
|
866
|
+
return toSourceNodeWhenNeeded(node.name, node);
|
867
|
+
}
|
868
|
+
|
869
|
+
function generateAsyncPrefix(node, spaceRequired) {
|
870
|
+
return node.async ? 'async' + (spaceRequired ? noEmptySpace() : space) : '';
|
871
|
+
}
|
872
|
+
|
873
|
+
function generateStarSuffix(node) {
|
874
|
+
var isGenerator = node.generator && !extra.moz.starlessGenerator;
|
875
|
+
return isGenerator ? '*' + space : '';
|
876
|
+
}
|
877
|
+
|
878
|
+
function generateMethodPrefix(prop) {
|
879
|
+
var func = prop.value;
|
880
|
+
if (func.async) {
|
881
|
+
return generateAsyncPrefix(func, !prop.computed);
|
882
|
+
} else {
|
883
|
+
// avoid space before method name
|
884
|
+
return generateStarSuffix(func) ? '*' : '';
|
885
|
+
}
|
886
|
+
}
|
887
|
+
|
888
|
+
CodeGenerator.prototype.generatePattern = function (node, precedence, flags) {
|
889
|
+
if (node.type === Syntax.Identifier) {
|
890
|
+
return generateIdentifier(node);
|
891
|
+
}
|
892
|
+
return this.generateExpression(node, precedence, flags);
|
893
|
+
};
|
894
|
+
|
895
|
+
CodeGenerator.prototype.generateFunctionParams = function (node) {
|
896
|
+
var i, iz, result, hasDefault;
|
897
|
+
|
898
|
+
hasDefault = false;
|
899
|
+
|
900
|
+
if (node.type === Syntax.ArrowFunctionExpression &&
|
901
|
+
!node.rest && (!node.defaults || node.defaults.length === 0) &&
|
902
|
+
node.params.length === 1 && node.params[0].type === Syntax.Identifier) {
|
903
|
+
// arg => { } case
|
904
|
+
result = [generateAsyncPrefix(node, true), generateIdentifier(node.params[0])];
|
905
|
+
} else {
|
906
|
+
result = node.type === Syntax.ArrowFunctionExpression ? [generateAsyncPrefix(node, false)] : [];
|
907
|
+
result.push('(');
|
908
|
+
if (node.defaults) {
|
909
|
+
hasDefault = true;
|
910
|
+
}
|
911
|
+
for (i = 0, iz = node.params.length; i < iz; ++i) {
|
912
|
+
if (hasDefault && node.defaults[i]) {
|
913
|
+
// Handle default values.
|
914
|
+
result.push(this.generateAssignment(node.params[i], node.defaults[i], '=', Precedence.Assignment, E_TTT));
|
915
|
+
} else {
|
916
|
+
result.push(this.generatePattern(node.params[i], Precedence.Assignment, E_TTT));
|
917
|
+
}
|
918
|
+
if (i + 1 < iz) {
|
919
|
+
result.push(',' + space);
|
920
|
+
}
|
921
|
+
}
|
922
|
+
|
923
|
+
if (node.rest) {
|
924
|
+
if (node.params.length) {
|
925
|
+
result.push(',' + space);
|
926
|
+
}
|
927
|
+
result.push('...');
|
928
|
+
result.push(generateIdentifier(node.rest));
|
929
|
+
}
|
930
|
+
|
931
|
+
result.push(')');
|
932
|
+
}
|
933
|
+
|
934
|
+
return result;
|
935
|
+
};
|
936
|
+
|
937
|
+
CodeGenerator.prototype.generateFunctionBody = function (node) {
|
938
|
+
var result, expr;
|
939
|
+
|
940
|
+
result = this.generateFunctionParams(node);
|
941
|
+
|
942
|
+
if (node.type === Syntax.ArrowFunctionExpression) {
|
943
|
+
result.push(space);
|
944
|
+
result.push('=>');
|
945
|
+
}
|
946
|
+
|
947
|
+
if (node.expression) {
|
948
|
+
result.push(space);
|
949
|
+
expr = this.generateExpression(node.body, Precedence.Assignment, E_TTT);
|
950
|
+
if (expr.toString().charAt(0) === '{') {
|
951
|
+
expr = ['(', expr, ')'];
|
952
|
+
}
|
953
|
+
result.push(expr);
|
954
|
+
} else {
|
955
|
+
result.push(this.maybeBlock(node.body, S_TTFF));
|
956
|
+
}
|
957
|
+
|
958
|
+
return result;
|
959
|
+
};
|
960
|
+
|
961
|
+
CodeGenerator.prototype.generateIterationForStatement = function (operator, stmt, flags) {
|
962
|
+
var result = ['for' + space + '('], that = this;
|
963
|
+
withIndent(function () {
|
964
|
+
if (stmt.left.type === Syntax.VariableDeclaration) {
|
965
|
+
withIndent(function () {
|
966
|
+
result.push(stmt.left.kind + noEmptySpace());
|
967
|
+
result.push(that.generateStatement(stmt.left.declarations[0], S_FFFF));
|
968
|
+
});
|
969
|
+
} else {
|
970
|
+
result.push(that.generateExpression(stmt.left, Precedence.Call, E_TTT));
|
971
|
+
}
|
972
|
+
|
973
|
+
result = join(result, operator);
|
974
|
+
result = [join(
|
975
|
+
result,
|
976
|
+
that.generateExpression(stmt.right, Precedence.Sequence, E_TTT)
|
977
|
+
), ')'];
|
978
|
+
});
|
979
|
+
result.push(this.maybeBlock(stmt.body, flags));
|
980
|
+
return result;
|
981
|
+
};
|
982
|
+
|
983
|
+
CodeGenerator.prototype.generatePropertyKey = function (expr, computed, value) {
|
984
|
+
var result = [];
|
985
|
+
|
986
|
+
if (computed) {
|
987
|
+
result.push('[');
|
988
|
+
}
|
989
|
+
|
990
|
+
if (value.type === 'AssignmentPattern') {
|
991
|
+
result.push(this.AssignmentPattern(value, Precedence.Sequence, E_TTT));
|
992
|
+
} else {
|
993
|
+
result.push(this.generateExpression(expr, Precedence.Sequence, E_TTT));
|
994
|
+
}
|
995
|
+
|
996
|
+
if (computed) {
|
997
|
+
result.push(']');
|
998
|
+
}
|
999
|
+
|
1000
|
+
return result;
|
1001
|
+
};
|
1002
|
+
|
1003
|
+
CodeGenerator.prototype.generateAssignment = function (left, right, operator, precedence, flags) {
|
1004
|
+
if (Precedence.Assignment < precedence) {
|
1005
|
+
flags |= F_ALLOW_IN;
|
1006
|
+
}
|
1007
|
+
|
1008
|
+
return parenthesize(
|
1009
|
+
[
|
1010
|
+
this.generateExpression(left, Precedence.Call, flags),
|
1011
|
+
space + operator + space,
|
1012
|
+
this.generateExpression(right, Precedence.Assignment, flags)
|
1013
|
+
],
|
1014
|
+
Precedence.Assignment,
|
1015
|
+
precedence
|
1016
|
+
);
|
1017
|
+
};
|
1018
|
+
|
1019
|
+
CodeGenerator.prototype.semicolon = function (flags) {
|
1020
|
+
if (!semicolons && flags & F_SEMICOLON_OPT) {
|
1021
|
+
return '';
|
1022
|
+
}
|
1023
|
+
return ';';
|
1024
|
+
};
|
1025
|
+
|
1026
|
+
// Statements.
|
1027
|
+
|
1028
|
+
CodeGenerator.Statement = {
|
1029
|
+
|
1030
|
+
BlockStatement: function (stmt, flags) {
|
1031
|
+
var range, content, result = ['{', newline], that = this;
|
1032
|
+
|
1033
|
+
withIndent(function () {
|
1034
|
+
// handle functions without any code
|
1035
|
+
if (stmt.body.length === 0 && preserveBlankLines) {
|
1036
|
+
range = stmt.range;
|
1037
|
+
if (range[1] - range[0] > 2) {
|
1038
|
+
content = sourceCode.substring(range[0] + 1, range[1] - 1);
|
1039
|
+
if (content[0] === '\n') {
|
1040
|
+
result = ['{'];
|
1041
|
+
}
|
1042
|
+
result.push(content);
|
1043
|
+
}
|
1044
|
+
}
|
1045
|
+
|
1046
|
+
var i, iz, fragment, bodyFlags;
|
1047
|
+
bodyFlags = S_TFFF;
|
1048
|
+
if (flags & F_FUNC_BODY) {
|
1049
|
+
bodyFlags |= F_DIRECTIVE_CTX;
|
1050
|
+
}
|
1051
|
+
|
1052
|
+
for (i = 0, iz = stmt.body.length; i < iz; ++i) {
|
1053
|
+
if (preserveBlankLines) {
|
1054
|
+
// handle spaces before the first line
|
1055
|
+
if (i === 0) {
|
1056
|
+
if (stmt.body[0].leadingComments) {
|
1057
|
+
range = stmt.body[0].leadingComments[0].extendedRange;
|
1058
|
+
content = sourceCode.substring(range[0], range[1]);
|
1059
|
+
if (content[0] === '\n') {
|
1060
|
+
result = ['{'];
|
1061
|
+
}
|
1062
|
+
}
|
1063
|
+
if (!stmt.body[0].leadingComments) {
|
1064
|
+
generateBlankLines(stmt.range[0], stmt.body[0].range[0], result);
|
1065
|
+
}
|
1066
|
+
}
|
1067
|
+
|
1068
|
+
// handle spaces between lines
|
1069
|
+
if (i > 0) {
|
1070
|
+
if (!stmt.body[i - 1].trailingComments && !stmt.body[i].leadingComments) {
|
1071
|
+
generateBlankLines(stmt.body[i - 1].range[1], stmt.body[i].range[0], result);
|
1072
|
+
}
|
1073
|
+
}
|
1074
|
+
}
|
1075
|
+
|
1076
|
+
if (i === iz - 1) {
|
1077
|
+
bodyFlags |= F_SEMICOLON_OPT;
|
1078
|
+
}
|
1079
|
+
|
1080
|
+
if (stmt.body[i].leadingComments && preserveBlankLines) {
|
1081
|
+
fragment = that.generateStatement(stmt.body[i], bodyFlags);
|
1082
|
+
} else {
|
1083
|
+
fragment = addIndent(that.generateStatement(stmt.body[i], bodyFlags));
|
1084
|
+
}
|
1085
|
+
|
1086
|
+
result.push(fragment);
|
1087
|
+
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
|
1088
|
+
if (preserveBlankLines && i < iz - 1) {
|
1089
|
+
// don't add a new line if there are leading coments
|
1090
|
+
// in the next statement
|
1091
|
+
if (!stmt.body[i + 1].leadingComments) {
|
1092
|
+
result.push(newline);
|
1093
|
+
}
|
1094
|
+
} else {
|
1095
|
+
result.push(newline);
|
1096
|
+
}
|
1097
|
+
}
|
1098
|
+
|
1099
|
+
if (preserveBlankLines) {
|
1100
|
+
// handle spaces after the last line
|
1101
|
+
if (i === iz - 1) {
|
1102
|
+
if (!stmt.body[i].trailingComments) {
|
1103
|
+
generateBlankLines(stmt.body[i].range[1], stmt.range[1], result);
|
1104
|
+
}
|
1105
|
+
}
|
1106
|
+
}
|
1107
|
+
}
|
1108
|
+
});
|
1109
|
+
|
1110
|
+
result.push(addIndent('}'));
|
1111
|
+
return result;
|
1112
|
+
},
|
1113
|
+
|
1114
|
+
BreakStatement: function (stmt, flags) {
|
1115
|
+
if (stmt.label) {
|
1116
|
+
return 'break ' + stmt.label.name + this.semicolon(flags);
|
1117
|
+
}
|
1118
|
+
return 'break' + this.semicolon(flags);
|
1119
|
+
},
|
1120
|
+
|
1121
|
+
ContinueStatement: function (stmt, flags) {
|
1122
|
+
if (stmt.label) {
|
1123
|
+
return 'continue ' + stmt.label.name + this.semicolon(flags);
|
1124
|
+
}
|
1125
|
+
return 'continue' + this.semicolon(flags);
|
1126
|
+
},
|
1127
|
+
|
1128
|
+
ClassBody: function (stmt, flags) {
|
1129
|
+
var result = [ '{', newline], that = this;
|
1130
|
+
|
1131
|
+
withIndent(function (indent) {
|
1132
|
+
var i, iz;
|
1133
|
+
|
1134
|
+
for (i = 0, iz = stmt.body.length; i < iz; ++i) {
|
1135
|
+
result.push(indent);
|
1136
|
+
result.push(that.generateExpression(stmt.body[i], Precedence.Sequence, E_TTT));
|
1137
|
+
if (i + 1 < iz) {
|
1138
|
+
result.push(newline);
|
1139
|
+
}
|
1140
|
+
}
|
1141
|
+
});
|
1142
|
+
|
1143
|
+
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
|
1144
|
+
result.push(newline);
|
1145
|
+
}
|
1146
|
+
result.push(base);
|
1147
|
+
result.push('}');
|
1148
|
+
return result;
|
1149
|
+
},
|
1150
|
+
|
1151
|
+
ClassDeclaration: function (stmt, flags) {
|
1152
|
+
var result, fragment;
|
1153
|
+
result = ['class'];
|
1154
|
+
if (stmt.id) {
|
1155
|
+
result = join(result, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT));
|
1156
|
+
}
|
1157
|
+
if (stmt.superClass) {
|
1158
|
+
fragment = join('extends', this.generateExpression(stmt.superClass, Precedence.Assignment, E_TTT));
|
1159
|
+
result = join(result, fragment);
|
1160
|
+
}
|
1161
|
+
result.push(space);
|
1162
|
+
result.push(this.generateStatement(stmt.body, S_TFFT));
|
1163
|
+
return result;
|
1164
|
+
},
|
1165
|
+
|
1166
|
+
DirectiveStatement: function (stmt, flags) {
|
1167
|
+
if (extra.raw && stmt.raw) {
|
1168
|
+
return stmt.raw + this.semicolon(flags);
|
1169
|
+
}
|
1170
|
+
return escapeDirective(stmt.directive) + this.semicolon(flags);
|
1171
|
+
},
|
1172
|
+
|
1173
|
+
DoWhileStatement: function (stmt, flags) {
|
1174
|
+
// Because `do 42 while (cond)` is Syntax Error. We need semicolon.
|
1175
|
+
var result = join('do', this.maybeBlock(stmt.body, S_TFFF));
|
1176
|
+
result = this.maybeBlockSuffix(stmt.body, result);
|
1177
|
+
return join(result, [
|
1178
|
+
'while' + space + '(',
|
1179
|
+
this.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
|
1180
|
+
')' + this.semicolon(flags)
|
1181
|
+
]);
|
1182
|
+
},
|
1183
|
+
|
1184
|
+
CatchClause: function (stmt, flags) {
|
1185
|
+
var result, that = this;
|
1186
|
+
withIndent(function () {
|
1187
|
+
var guard;
|
1188
|
+
|
1189
|
+
result = [
|
1190
|
+
'catch' + space + '(',
|
1191
|
+
that.generateExpression(stmt.param, Precedence.Sequence, E_TTT),
|
1192
|
+
')'
|
1193
|
+
];
|
1194
|
+
|
1195
|
+
if (stmt.guard) {
|
1196
|
+
guard = that.generateExpression(stmt.guard, Precedence.Sequence, E_TTT);
|
1197
|
+
result.splice(2, 0, ' if ', guard);
|
1198
|
+
}
|
1199
|
+
});
|
1200
|
+
result.push(this.maybeBlock(stmt.body, S_TFFF));
|
1201
|
+
return result;
|
1202
|
+
},
|
1203
|
+
|
1204
|
+
DebuggerStatement: function (stmt, flags) {
|
1205
|
+
return 'debugger' + this.semicolon(flags);
|
1206
|
+
},
|
1207
|
+
|
1208
|
+
EmptyStatement: function (stmt, flags) {
|
1209
|
+
return ';';
|
1210
|
+
},
|
1211
|
+
|
1212
|
+
ExportDefaultDeclaration: function (stmt, flags) {
|
1213
|
+
var result = [ 'export' ], bodyFlags;
|
1214
|
+
|
1215
|
+
bodyFlags = (flags & F_SEMICOLON_OPT) ? S_TFFT : S_TFFF;
|
1216
|
+
|
1217
|
+
// export default HoistableDeclaration[Default]
|
1218
|
+
// export default AssignmentExpression[In] ;
|
1219
|
+
result = join(result, 'default');
|
1220
|
+
if (isStatement(stmt.declaration)) {
|
1221
|
+
result = join(result, this.generateStatement(stmt.declaration, bodyFlags));
|
1222
|
+
} else {
|
1223
|
+
result = join(result, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags));
|
1224
|
+
}
|
1225
|
+
return result;
|
1226
|
+
},
|
1227
|
+
|
1228
|
+
ExportNamedDeclaration: function (stmt, flags) {
|
1229
|
+
var result = [ 'export' ], bodyFlags, that = this;
|
1230
|
+
|
1231
|
+
bodyFlags = (flags & F_SEMICOLON_OPT) ? S_TFFT : S_TFFF;
|
1232
|
+
|
1233
|
+
// export VariableStatement
|
1234
|
+
// export Declaration[Default]
|
1235
|
+
if (stmt.declaration) {
|
1236
|
+
return join(result, this.generateStatement(stmt.declaration, bodyFlags));
|
1237
|
+
}
|
1238
|
+
|
1239
|
+
// export ExportClause[NoReference] FromClause ;
|
1240
|
+
// export ExportClause ;
|
1241
|
+
if (stmt.specifiers) {
|
1242
|
+
if (stmt.specifiers.length === 0) {
|
1243
|
+
result = join(result, '{' + space + '}');
|
1244
|
+
} else if (stmt.specifiers[0].type === Syntax.ExportBatchSpecifier) {
|
1245
|
+
result = join(result, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT));
|
1246
|
+
} else {
|
1247
|
+
result = join(result, '{');
|
1248
|
+
withIndent(function (indent) {
|
1249
|
+
var i, iz;
|
1250
|
+
result.push(newline);
|
1251
|
+
for (i = 0, iz = stmt.specifiers.length; i < iz; ++i) {
|
1252
|
+
result.push(indent);
|
1253
|
+
result.push(that.generateExpression(stmt.specifiers[i], Precedence.Sequence, E_TTT));
|
1254
|
+
if (i + 1 < iz) {
|
1255
|
+
result.push(',' + newline);
|
1256
|
+
}
|
1257
|
+
}
|
1258
|
+
});
|
1259
|
+
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
|
1260
|
+
result.push(newline);
|
1261
|
+
}
|
1262
|
+
result.push(base + '}');
|
1263
|
+
}
|
1264
|
+
|
1265
|
+
if (stmt.source) {
|
1266
|
+
result = join(result, [
|
1267
|
+
'from' + space,
|
1268
|
+
// ModuleSpecifier
|
1269
|
+
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
|
1270
|
+
this.semicolon(flags)
|
1271
|
+
]);
|
1272
|
+
} else {
|
1273
|
+
result.push(this.semicolon(flags));
|
1274
|
+
}
|
1275
|
+
}
|
1276
|
+
return result;
|
1277
|
+
},
|
1278
|
+
|
1279
|
+
ExportAllDeclaration: function (stmt, flags) {
|
1280
|
+
// export * FromClause ;
|
1281
|
+
return [
|
1282
|
+
'export' + space,
|
1283
|
+
'*' + space,
|
1284
|
+
'from' + space,
|
1285
|
+
// ModuleSpecifier
|
1286
|
+
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
|
1287
|
+
this.semicolon(flags)
|
1288
|
+
];
|
1289
|
+
},
|
1290
|
+
|
1291
|
+
ExpressionStatement: function (stmt, flags) {
|
1292
|
+
var result, fragment;
|
1293
|
+
|
1294
|
+
function isClassPrefixed(fragment) {
|
1295
|
+
var code;
|
1296
|
+
if (fragment.slice(0, 5) !== 'class') {
|
1297
|
+
return false;
|
1298
|
+
}
|
1299
|
+
code = fragment.charCodeAt(5);
|
1300
|
+
return code === 0x7B /* '{' */ || esutils.code.isWhiteSpace(code) || esutils.code.isLineTerminator(code);
|
1301
|
+
}
|
1302
|
+
|
1303
|
+
function isFunctionPrefixed(fragment) {
|
1304
|
+
var code;
|
1305
|
+
if (fragment.slice(0, 8) !== 'function') {
|
1306
|
+
return false;
|
1307
|
+
}
|
1308
|
+
code = fragment.charCodeAt(8);
|
1309
|
+
return code === 0x28 /* '(' */ || esutils.code.isWhiteSpace(code) || code === 0x2A /* '*' */ || esutils.code.isLineTerminator(code);
|
1310
|
+
}
|
1311
|
+
|
1312
|
+
function isAsyncPrefixed(fragment) {
|
1313
|
+
var code, i, iz;
|
1314
|
+
if (fragment.slice(0, 5) !== 'async') {
|
1315
|
+
return false;
|
1316
|
+
}
|
1317
|
+
if (!esutils.code.isWhiteSpace(fragment.charCodeAt(5))) {
|
1318
|
+
return false;
|
1319
|
+
}
|
1320
|
+
for (i = 6, iz = fragment.length; i < iz; ++i) {
|
1321
|
+
if (!esutils.code.isWhiteSpace(fragment.charCodeAt(i))) {
|
1322
|
+
break;
|
1323
|
+
}
|
1324
|
+
}
|
1325
|
+
if (i === iz) {
|
1326
|
+
return false;
|
1327
|
+
}
|
1328
|
+
if (fragment.slice(i, i + 8) !== 'function') {
|
1329
|
+
return false;
|
1330
|
+
}
|
1331
|
+
code = fragment.charCodeAt(i + 8);
|
1332
|
+
return code === 0x28 /* '(' */ || esutils.code.isWhiteSpace(code) || code === 0x2A /* '*' */ || esutils.code.isLineTerminator(code);
|
1333
|
+
}
|
1334
|
+
|
1335
|
+
result = [this.generateExpression(stmt.expression, Precedence.Sequence, E_TTT)];
|
1336
|
+
// 12.4 '{', 'function', 'class' is not allowed in this position.
|
1337
|
+
// wrap expression with parentheses
|
1338
|
+
fragment = toSourceNodeWhenNeeded(result).toString();
|
1339
|
+
if (fragment.charCodeAt(0) === 0x7B /* '{' */ || // ObjectExpression
|
1340
|
+
isClassPrefixed(fragment) ||
|
1341
|
+
isFunctionPrefixed(fragment) ||
|
1342
|
+
isAsyncPrefixed(fragment) ||
|
1343
|
+
(directive && (flags & F_DIRECTIVE_CTX) && stmt.expression.type === Syntax.Literal && typeof stmt.expression.value === 'string')) {
|
1344
|
+
result = ['(', result, ')' + this.semicolon(flags)];
|
1345
|
+
} else {
|
1346
|
+
result.push(this.semicolon(flags));
|
1347
|
+
}
|
1348
|
+
return result;
|
1349
|
+
},
|
1350
|
+
|
1351
|
+
ImportDeclaration: function (stmt, flags) {
|
1352
|
+
// ES6: 15.2.1 valid import declarations:
|
1353
|
+
// - import ImportClause FromClause ;
|
1354
|
+
// - import ModuleSpecifier ;
|
1355
|
+
var result, cursor, that = this;
|
1356
|
+
|
1357
|
+
// If no ImportClause is present,
|
1358
|
+
// this should be `import ModuleSpecifier` so skip `from`
|
1359
|
+
// ModuleSpecifier is StringLiteral.
|
1360
|
+
if (stmt.specifiers.length === 0) {
|
1361
|
+
// import ModuleSpecifier ;
|
1362
|
+
return [
|
1363
|
+
'import',
|
1364
|
+
space,
|
1365
|
+
// ModuleSpecifier
|
1366
|
+
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
|
1367
|
+
this.semicolon(flags)
|
1368
|
+
];
|
1369
|
+
}
|
1370
|
+
|
1371
|
+
// import ImportClause FromClause ;
|
1372
|
+
result = [
|
1373
|
+
'import'
|
1374
|
+
];
|
1375
|
+
cursor = 0;
|
1376
|
+
|
1377
|
+
// ImportedBinding
|
1378
|
+
if (stmt.specifiers[cursor].type === Syntax.ImportDefaultSpecifier) {
|
1379
|
+
result = join(result, [
|
1380
|
+
this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)
|
1381
|
+
]);
|
1382
|
+
++cursor;
|
1383
|
+
}
|
1384
|
+
|
1385
|
+
if (stmt.specifiers[cursor]) {
|
1386
|
+
if (cursor !== 0) {
|
1387
|
+
result.push(',');
|
1388
|
+
}
|
1389
|
+
|
1390
|
+
if (stmt.specifiers[cursor].type === Syntax.ImportNamespaceSpecifier) {
|
1391
|
+
// NameSpaceImport
|
1392
|
+
result = join(result, [
|
1393
|
+
space,
|
1394
|
+
this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)
|
1395
|
+
]);
|
1396
|
+
} else {
|
1397
|
+
// NamedImports
|
1398
|
+
result.push(space + '{');
|
1399
|
+
|
1400
|
+
if ((stmt.specifiers.length - cursor) === 1) {
|
1401
|
+
// import { ... } from "...";
|
1402
|
+
result.push(space);
|
1403
|
+
result.push(this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT));
|
1404
|
+
result.push(space + '}' + space);
|
1405
|
+
} else {
|
1406
|
+
// import {
|
1407
|
+
// ...,
|
1408
|
+
// ...,
|
1409
|
+
// } from "...";
|
1410
|
+
withIndent(function (indent) {
|
1411
|
+
var i, iz;
|
1412
|
+
result.push(newline);
|
1413
|
+
for (i = cursor, iz = stmt.specifiers.length; i < iz; ++i) {
|
1414
|
+
result.push(indent);
|
1415
|
+
result.push(that.generateExpression(stmt.specifiers[i], Precedence.Sequence, E_TTT));
|
1416
|
+
if (i + 1 < iz) {
|
1417
|
+
result.push(',' + newline);
|
1418
|
+
}
|
1419
|
+
}
|
1420
|
+
});
|
1421
|
+
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
|
1422
|
+
result.push(newline);
|
1423
|
+
}
|
1424
|
+
result.push(base + '}' + space);
|
1425
|
+
}
|
1426
|
+
}
|
1427
|
+
}
|
1428
|
+
|
1429
|
+
result = join(result, [
|
1430
|
+
'from' + space,
|
1431
|
+
// ModuleSpecifier
|
1432
|
+
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
|
1433
|
+
this.semicolon(flags)
|
1434
|
+
]);
|
1435
|
+
return result;
|
1436
|
+
},
|
1437
|
+
|
1438
|
+
VariableDeclarator: function (stmt, flags) {
|
1439
|
+
var itemFlags = (flags & F_ALLOW_IN) ? E_TTT : E_FTT;
|
1440
|
+
if (stmt.init) {
|
1441
|
+
return [
|
1442
|
+
this.generateExpression(stmt.id, Precedence.Assignment, itemFlags),
|
1443
|
+
space,
|
1444
|
+
'=',
|
1445
|
+
space,
|
1446
|
+
this.generateExpression(stmt.init, Precedence.Assignment, itemFlags)
|
1447
|
+
];
|
1448
|
+
}
|
1449
|
+
return this.generatePattern(stmt.id, Precedence.Assignment, itemFlags);
|
1450
|
+
},
|
1451
|
+
|
1452
|
+
VariableDeclaration: function (stmt, flags) {
|
1453
|
+
// VariableDeclarator is typed as Statement,
|
1454
|
+
// but joined with comma (not LineTerminator).
|
1455
|
+
// So if comment is attached to target node, we should specialize.
|
1456
|
+
var result, i, iz, node, bodyFlags, that = this;
|
1457
|
+
|
1458
|
+
result = [ stmt.kind ];
|
1459
|
+
|
1460
|
+
bodyFlags = (flags & F_ALLOW_IN) ? S_TFFF : S_FFFF;
|
1461
|
+
|
1462
|
+
function block() {
|
1463
|
+
node = stmt.declarations[0];
|
1464
|
+
if (extra.comment && node.leadingComments) {
|
1465
|
+
result.push('\n');
|
1466
|
+
result.push(addIndent(that.generateStatement(node, bodyFlags)));
|
1467
|
+
} else {
|
1468
|
+
result.push(noEmptySpace());
|
1469
|
+
result.push(that.generateStatement(node, bodyFlags));
|
1470
|
+
}
|
1471
|
+
|
1472
|
+
for (i = 1, iz = stmt.declarations.length; i < iz; ++i) {
|
1473
|
+
node = stmt.declarations[i];
|
1474
|
+
if (extra.comment && node.leadingComments) {
|
1475
|
+
result.push(',' + newline);
|
1476
|
+
result.push(addIndent(that.generateStatement(node, bodyFlags)));
|
1477
|
+
} else {
|
1478
|
+
result.push(',' + space);
|
1479
|
+
result.push(that.generateStatement(node, bodyFlags));
|
1480
|
+
}
|
1481
|
+
}
|
1482
|
+
}
|
1483
|
+
|
1484
|
+
if (stmt.declarations.length > 1) {
|
1485
|
+
withIndent(block);
|
1486
|
+
} else {
|
1487
|
+
block();
|
1488
|
+
}
|
1489
|
+
|
1490
|
+
result.push(this.semicolon(flags));
|
1491
|
+
|
1492
|
+
return result;
|
1493
|
+
},
|
1494
|
+
|
1495
|
+
ThrowStatement: function (stmt, flags) {
|
1496
|
+
return [join(
|
1497
|
+
'throw',
|
1498
|
+
this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
|
1499
|
+
), this.semicolon(flags)];
|
1500
|
+
},
|
1501
|
+
|
1502
|
+
TryStatement: function (stmt, flags) {
|
1503
|
+
var result, i, iz, guardedHandlers;
|
1504
|
+
|
1505
|
+
result = ['try', this.maybeBlock(stmt.block, S_TFFF)];
|
1506
|
+
result = this.maybeBlockSuffix(stmt.block, result);
|
1507
|
+
|
1508
|
+
if (stmt.handlers) {
|
1509
|
+
// old interface
|
1510
|
+
for (i = 0, iz = stmt.handlers.length; i < iz; ++i) {
|
1511
|
+
result = join(result, this.generateStatement(stmt.handlers[i], S_TFFF));
|
1512
|
+
if (stmt.finalizer || i + 1 !== iz) {
|
1513
|
+
result = this.maybeBlockSuffix(stmt.handlers[i].body, result);
|
1514
|
+
}
|
1515
|
+
}
|
1516
|
+
} else {
|
1517
|
+
guardedHandlers = stmt.guardedHandlers || [];
|
1518
|
+
|
1519
|
+
for (i = 0, iz = guardedHandlers.length; i < iz; ++i) {
|
1520
|
+
result = join(result, this.generateStatement(guardedHandlers[i], S_TFFF));
|
1521
|
+
if (stmt.finalizer || i + 1 !== iz) {
|
1522
|
+
result = this.maybeBlockSuffix(guardedHandlers[i].body, result);
|
1523
|
+
}
|
1524
|
+
}
|
1525
|
+
|
1526
|
+
// new interface
|
1527
|
+
if (stmt.handler) {
|
1528
|
+
if (isArray(stmt.handler)) {
|
1529
|
+
for (i = 0, iz = stmt.handler.length; i < iz; ++i) {
|
1530
|
+
result = join(result, this.generateStatement(stmt.handler[i], S_TFFF));
|
1531
|
+
if (stmt.finalizer || i + 1 !== iz) {
|
1532
|
+
result = this.maybeBlockSuffix(stmt.handler[i].body, result);
|
1533
|
+
}
|
1534
|
+
}
|
1535
|
+
} else {
|
1536
|
+
result = join(result, this.generateStatement(stmt.handler, S_TFFF));
|
1537
|
+
if (stmt.finalizer) {
|
1538
|
+
result = this.maybeBlockSuffix(stmt.handler.body, result);
|
1539
|
+
}
|
1540
|
+
}
|
1541
|
+
}
|
1542
|
+
}
|
1543
|
+
if (stmt.finalizer) {
|
1544
|
+
result = join(result, ['finally', this.maybeBlock(stmt.finalizer, S_TFFF)]);
|
1545
|
+
}
|
1546
|
+
return result;
|
1547
|
+
},
|
1548
|
+
|
1549
|
+
SwitchStatement: function (stmt, flags) {
|
1550
|
+
var result, fragment, i, iz, bodyFlags, that = this;
|
1551
|
+
withIndent(function () {
|
1552
|
+
result = [
|
1553
|
+
'switch' + space + '(',
|
1554
|
+
that.generateExpression(stmt.discriminant, Precedence.Sequence, E_TTT),
|
1555
|
+
')' + space + '{' + newline
|
1556
|
+
];
|
1557
|
+
});
|
1558
|
+
if (stmt.cases) {
|
1559
|
+
bodyFlags = S_TFFF;
|
1560
|
+
for (i = 0, iz = stmt.cases.length; i < iz; ++i) {
|
1561
|
+
if (i === iz - 1) {
|
1562
|
+
bodyFlags |= F_SEMICOLON_OPT;
|
1563
|
+
}
|
1564
|
+
fragment = addIndent(this.generateStatement(stmt.cases[i], bodyFlags));
|
1565
|
+
result.push(fragment);
|
1566
|
+
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
|
1567
|
+
result.push(newline);
|
1568
|
+
}
|
1569
|
+
}
|
1570
|
+
}
|
1571
|
+
result.push(addIndent('}'));
|
1572
|
+
return result;
|
1573
|
+
},
|
1574
|
+
|
1575
|
+
SwitchCase: function (stmt, flags) {
|
1576
|
+
var result, fragment, i, iz, bodyFlags, that = this;
|
1577
|
+
withIndent(function () {
|
1578
|
+
if (stmt.test) {
|
1579
|
+
result = [
|
1580
|
+
join('case', that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)),
|
1581
|
+
':'
|
1582
|
+
];
|
1583
|
+
} else {
|
1584
|
+
result = ['default:'];
|
1585
|
+
}
|
1586
|
+
|
1587
|
+
i = 0;
|
1588
|
+
iz = stmt.consequent.length;
|
1589
|
+
if (iz && stmt.consequent[0].type === Syntax.BlockStatement) {
|
1590
|
+
fragment = that.maybeBlock(stmt.consequent[0], S_TFFF);
|
1591
|
+
result.push(fragment);
|
1592
|
+
i = 1;
|
1593
|
+
}
|
1594
|
+
|
1595
|
+
if (i !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
|
1596
|
+
result.push(newline);
|
1597
|
+
}
|
1598
|
+
|
1599
|
+
bodyFlags = S_TFFF;
|
1600
|
+
for (; i < iz; ++i) {
|
1601
|
+
if (i === iz - 1 && flags & F_SEMICOLON_OPT) {
|
1602
|
+
bodyFlags |= F_SEMICOLON_OPT;
|
1603
|
+
}
|
1604
|
+
fragment = addIndent(that.generateStatement(stmt.consequent[i], bodyFlags));
|
1605
|
+
result.push(fragment);
|
1606
|
+
if (i + 1 !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
|
1607
|
+
result.push(newline);
|
1608
|
+
}
|
1609
|
+
}
|
1610
|
+
});
|
1611
|
+
return result;
|
1612
|
+
},
|
1613
|
+
|
1614
|
+
IfStatement: function (stmt, flags) {
|
1615
|
+
var result, bodyFlags, semicolonOptional, that = this;
|
1616
|
+
withIndent(function () {
|
1617
|
+
result = [
|
1618
|
+
'if' + space + '(',
|
1619
|
+
that.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
|
1620
|
+
')'
|
1621
|
+
];
|
1622
|
+
});
|
1623
|
+
semicolonOptional = flags & F_SEMICOLON_OPT;
|
1624
|
+
bodyFlags = S_TFFF;
|
1625
|
+
if (semicolonOptional) {
|
1626
|
+
bodyFlags |= F_SEMICOLON_OPT;
|
1627
|
+
}
|
1628
|
+
if (stmt.alternate) {
|
1629
|
+
result.push(this.maybeBlock(stmt.consequent, S_TFFF));
|
1630
|
+
result = this.maybeBlockSuffix(stmt.consequent, result);
|
1631
|
+
if (stmt.alternate.type === Syntax.IfStatement) {
|
1632
|
+
result = join(result, ['else ', this.generateStatement(stmt.alternate, bodyFlags)]);
|
1633
|
+
} else {
|
1634
|
+
result = join(result, join('else', this.maybeBlock(stmt.alternate, bodyFlags)));
|
1635
|
+
}
|
1636
|
+
} else {
|
1637
|
+
result.push(this.maybeBlock(stmt.consequent, bodyFlags));
|
1638
|
+
}
|
1639
|
+
return result;
|
1640
|
+
},
|
1641
|
+
|
1642
|
+
ForStatement: function (stmt, flags) {
|
1643
|
+
var result, that = this;
|
1644
|
+
withIndent(function () {
|
1645
|
+
result = ['for' + space + '('];
|
1646
|
+
if (stmt.init) {
|
1647
|
+
if (stmt.init.type === Syntax.VariableDeclaration) {
|
1648
|
+
result.push(that.generateStatement(stmt.init, S_FFFF));
|
1649
|
+
} else {
|
1650
|
+
// F_ALLOW_IN becomes false.
|
1651
|
+
result.push(that.generateExpression(stmt.init, Precedence.Sequence, E_FTT));
|
1652
|
+
result.push(';');
|
1653
|
+
}
|
1654
|
+
} else {
|
1655
|
+
result.push(';');
|
1656
|
+
}
|
1657
|
+
|
1658
|
+
if (stmt.test) {
|
1659
|
+
result.push(space);
|
1660
|
+
result.push(that.generateExpression(stmt.test, Precedence.Sequence, E_TTT));
|
1661
|
+
result.push(';');
|
1662
|
+
} else {
|
1663
|
+
result.push(';');
|
1664
|
+
}
|
1665
|
+
|
1666
|
+
if (stmt.update) {
|
1667
|
+
result.push(space);
|
1668
|
+
result.push(that.generateExpression(stmt.update, Precedence.Sequence, E_TTT));
|
1669
|
+
result.push(')');
|
1670
|
+
} else {
|
1671
|
+
result.push(')');
|
1672
|
+
}
|
1673
|
+
});
|
1674
|
+
|
1675
|
+
result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF));
|
1676
|
+
return result;
|
1677
|
+
},
|
1678
|
+
|
1679
|
+
ForInStatement: function (stmt, flags) {
|
1680
|
+
return this.generateIterationForStatement('in', stmt, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF);
|
1681
|
+
},
|
1682
|
+
|
1683
|
+
ForOfStatement: function (stmt, flags) {
|
1684
|
+
return this.generateIterationForStatement('of', stmt, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF);
|
1685
|
+
},
|
1686
|
+
|
1687
|
+
LabeledStatement: function (stmt, flags) {
|
1688
|
+
return [stmt.label.name + ':', this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF)];
|
1689
|
+
},
|
1690
|
+
|
1691
|
+
Program: function (stmt, flags) {
|
1692
|
+
var result, fragment, i, iz, bodyFlags;
|
1693
|
+
iz = stmt.body.length;
|
1694
|
+
result = [safeConcatenation && iz > 0 ? '\n' : ''];
|
1695
|
+
bodyFlags = S_TFTF;
|
1696
|
+
for (i = 0; i < iz; ++i) {
|
1697
|
+
if (!safeConcatenation && i === iz - 1) {
|
1698
|
+
bodyFlags |= F_SEMICOLON_OPT;
|
1699
|
+
}
|
1700
|
+
|
1701
|
+
if (preserveBlankLines) {
|
1702
|
+
// handle spaces before the first line
|
1703
|
+
if (i === 0) {
|
1704
|
+
if (!stmt.body[0].leadingComments) {
|
1705
|
+
generateBlankLines(stmt.range[0], stmt.body[i].range[0], result);
|
1706
|
+
}
|
1707
|
+
}
|
1708
|
+
|
1709
|
+
// handle spaces between lines
|
1710
|
+
if (i > 0) {
|
1711
|
+
if (!stmt.body[i - 1].trailingComments && !stmt.body[i].leadingComments) {
|
1712
|
+
generateBlankLines(stmt.body[i - 1].range[1], stmt.body[i].range[0], result);
|
1713
|
+
}
|
1714
|
+
}
|
1715
|
+
}
|
1716
|
+
|
1717
|
+
fragment = addIndent(this.generateStatement(stmt.body[i], bodyFlags));
|
1718
|
+
result.push(fragment);
|
1719
|
+
if (i + 1 < iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
|
1720
|
+
if (preserveBlankLines) {
|
1721
|
+
if (!stmt.body[i + 1].leadingComments) {
|
1722
|
+
result.push(newline);
|
1723
|
+
}
|
1724
|
+
} else {
|
1725
|
+
result.push(newline);
|
1726
|
+
}
|
1727
|
+
}
|
1728
|
+
|
1729
|
+
if (preserveBlankLines) {
|
1730
|
+
// handle spaces after the last line
|
1731
|
+
if (i === iz - 1) {
|
1732
|
+
if (!stmt.body[i].trailingComments) {
|
1733
|
+
generateBlankLines(stmt.body[i].range[1], stmt.range[1], result);
|
1734
|
+
}
|
1735
|
+
}
|
1736
|
+
}
|
1737
|
+
}
|
1738
|
+
return result;
|
1739
|
+
},
|
1740
|
+
|
1741
|
+
FunctionDeclaration: function (stmt, flags) {
|
1742
|
+
return [
|
1743
|
+
generateAsyncPrefix(stmt, true),
|
1744
|
+
'function',
|
1745
|
+
generateStarSuffix(stmt) || noEmptySpace(),
|
1746
|
+
stmt.id ? generateIdentifier(stmt.id) : '',
|
1747
|
+
this.generateFunctionBody(stmt)
|
1748
|
+
];
|
1749
|
+
},
|
1750
|
+
|
1751
|
+
ReturnStatement: function (stmt, flags) {
|
1752
|
+
if (stmt.argument) {
|
1753
|
+
return [join(
|
1754
|
+
'return',
|
1755
|
+
this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
|
1756
|
+
), this.semicolon(flags)];
|
1757
|
+
}
|
1758
|
+
return ['return' + this.semicolon(flags)];
|
1759
|
+
},
|
1760
|
+
|
1761
|
+
WhileStatement: function (stmt, flags) {
|
1762
|
+
var result, that = this;
|
1763
|
+
withIndent(function () {
|
1764
|
+
result = [
|
1765
|
+
'while' + space + '(',
|
1766
|
+
that.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
|
1767
|
+
')'
|
1768
|
+
];
|
1769
|
+
});
|
1770
|
+
result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF));
|
1771
|
+
return result;
|
1772
|
+
},
|
1773
|
+
|
1774
|
+
WithStatement: function (stmt, flags) {
|
1775
|
+
var result, that = this;
|
1776
|
+
withIndent(function () {
|
1777
|
+
result = [
|
1778
|
+
'with' + space + '(',
|
1779
|
+
that.generateExpression(stmt.object, Precedence.Sequence, E_TTT),
|
1780
|
+
')'
|
1781
|
+
];
|
1782
|
+
});
|
1783
|
+
result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF));
|
1784
|
+
return result;
|
1785
|
+
}
|
1786
|
+
|
1787
|
+
};
|
1788
|
+
|
1789
|
+
merge(CodeGenerator.prototype, CodeGenerator.Statement);
|
1790
|
+
|
1791
|
+
// Expressions.
|
1792
|
+
|
1793
|
+
CodeGenerator.Expression = {
|
1794
|
+
|
1795
|
+
SequenceExpression: function (expr, precedence, flags) {
|
1796
|
+
var result, i, iz;
|
1797
|
+
if (Precedence.Sequence < precedence) {
|
1798
|
+
flags |= F_ALLOW_IN;
|
1799
|
+
}
|
1800
|
+
result = [];
|
1801
|
+
for (i = 0, iz = expr.expressions.length; i < iz; ++i) {
|
1802
|
+
result.push(this.generateExpression(expr.expressions[i], Precedence.Assignment, flags));
|
1803
|
+
if (i + 1 < iz) {
|
1804
|
+
result.push(',' + space);
|
1805
|
+
}
|
1806
|
+
}
|
1807
|
+
return parenthesize(result, Precedence.Sequence, precedence);
|
1808
|
+
},
|
1809
|
+
|
1810
|
+
AssignmentExpression: function (expr, precedence, flags) {
|
1811
|
+
return this.generateAssignment(expr.left, expr.right, expr.operator, precedence, flags);
|
1812
|
+
},
|
1813
|
+
|
1814
|
+
ArrowFunctionExpression: function (expr, precedence, flags) {
|
1815
|
+
return parenthesize(this.generateFunctionBody(expr), Precedence.ArrowFunction, precedence);
|
1816
|
+
},
|
1817
|
+
|
1818
|
+
ConditionalExpression: function (expr, precedence, flags) {
|
1819
|
+
if (Precedence.Conditional < precedence) {
|
1820
|
+
flags |= F_ALLOW_IN;
|
1821
|
+
}
|
1822
|
+
return parenthesize(
|
1823
|
+
[
|
1824
|
+
this.generateExpression(expr.test, Precedence.LogicalOR, flags),
|
1825
|
+
space + '?' + space,
|
1826
|
+
this.generateExpression(expr.consequent, Precedence.Assignment, flags),
|
1827
|
+
space + ':' + space,
|
1828
|
+
this.generateExpression(expr.alternate, Precedence.Assignment, flags)
|
1829
|
+
],
|
1830
|
+
Precedence.Conditional,
|
1831
|
+
precedence
|
1832
|
+
);
|
1833
|
+
},
|
1834
|
+
|
1835
|
+
LogicalExpression: function (expr, precedence, flags) {
|
1836
|
+
return this.BinaryExpression(expr, precedence, flags);
|
1837
|
+
},
|
1838
|
+
|
1839
|
+
BinaryExpression: function (expr, precedence, flags) {
|
1840
|
+
var result, currentPrecedence, fragment, leftSource;
|
1841
|
+
currentPrecedence = BinaryPrecedence[expr.operator];
|
1842
|
+
|
1843
|
+
if (currentPrecedence < precedence) {
|
1844
|
+
flags |= F_ALLOW_IN;
|
1845
|
+
}
|
1846
|
+
|
1847
|
+
fragment = this.generateExpression(expr.left, currentPrecedence, flags);
|
1848
|
+
|
1849
|
+
leftSource = fragment.toString();
|
1850
|
+
|
1851
|
+
if (leftSource.charCodeAt(leftSource.length - 1) === 0x2F /* / */ && esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0))) {
|
1852
|
+
result = [fragment, noEmptySpace(), expr.operator];
|
1853
|
+
} else {
|
1854
|
+
result = join(fragment, expr.operator);
|
1855
|
+
}
|
1856
|
+
|
1857
|
+
fragment = this.generateExpression(expr.right, currentPrecedence + 1, flags);
|
1858
|
+
|
1859
|
+
if (expr.operator === '/' && fragment.toString().charAt(0) === '/' ||
|
1860
|
+
expr.operator.slice(-1) === '<' && fragment.toString().slice(0, 3) === '!--') {
|
1861
|
+
// If '/' concats with '/' or `<` concats with `!--`, it is interpreted as comment start
|
1862
|
+
result.push(noEmptySpace());
|
1863
|
+
result.push(fragment);
|
1864
|
+
} else {
|
1865
|
+
result = join(result, fragment);
|
1866
|
+
}
|
1867
|
+
|
1868
|
+
if (expr.operator === 'in' && !(flags & F_ALLOW_IN)) {
|
1869
|
+
return ['(', result, ')'];
|
1870
|
+
}
|
1871
|
+
return parenthesize(result, currentPrecedence, precedence);
|
1872
|
+
},
|
1873
|
+
|
1874
|
+
CallExpression: function (expr, precedence, flags) {
|
1875
|
+
var result, i, iz;
|
1876
|
+
// F_ALLOW_UNPARATH_NEW becomes false.
|
1877
|
+
result = [this.generateExpression(expr.callee, Precedence.Call, E_TTF)];
|
1878
|
+
result.push('(');
|
1879
|
+
for (i = 0, iz = expr['arguments'].length; i < iz; ++i) {
|
1880
|
+
result.push(this.generateExpression(expr['arguments'][i], Precedence.Assignment, E_TTT));
|
1881
|
+
if (i + 1 < iz) {
|
1882
|
+
result.push(',' + space);
|
1883
|
+
}
|
1884
|
+
}
|
1885
|
+
result.push(')');
|
1886
|
+
|
1887
|
+
if (!(flags & F_ALLOW_CALL)) {
|
1888
|
+
return ['(', result, ')'];
|
1889
|
+
}
|
1890
|
+
return parenthesize(result, Precedence.Call, precedence);
|
1891
|
+
},
|
1892
|
+
|
1893
|
+
NewExpression: function (expr, precedence, flags) {
|
1894
|
+
var result, length, i, iz, itemFlags;
|
1895
|
+
length = expr['arguments'].length;
|
1896
|
+
|
1897
|
+
// F_ALLOW_CALL becomes false.
|
1898
|
+
// F_ALLOW_UNPARATH_NEW may become false.
|
1899
|
+
itemFlags = (flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0) ? E_TFT : E_TFF;
|
1900
|
+
|
1901
|
+
result = join(
|
1902
|
+
'new',
|
1903
|
+
this.generateExpression(expr.callee, Precedence.New, itemFlags)
|
1904
|
+
);
|
1905
|
+
|
1906
|
+
if (!(flags & F_ALLOW_UNPARATH_NEW) || parentheses || length > 0) {
|
1907
|
+
result.push('(');
|
1908
|
+
for (i = 0, iz = length; i < iz; ++i) {
|
1909
|
+
result.push(this.generateExpression(expr['arguments'][i], Precedence.Assignment, E_TTT));
|
1910
|
+
if (i + 1 < iz) {
|
1911
|
+
result.push(',' + space);
|
1912
|
+
}
|
1913
|
+
}
|
1914
|
+
result.push(')');
|
1915
|
+
}
|
1916
|
+
|
1917
|
+
return parenthesize(result, Precedence.New, precedence);
|
1918
|
+
},
|
1919
|
+
|
1920
|
+
MemberExpression: function (expr, precedence, flags) {
|
1921
|
+
var result, fragment;
|
1922
|
+
|
1923
|
+
// F_ALLOW_UNPARATH_NEW becomes false.
|
1924
|
+
result = [this.generateExpression(expr.object, Precedence.Call, (flags & F_ALLOW_CALL) ? E_TTF : E_TFF)];
|
1925
|
+
|
1926
|
+
if (expr.computed) {
|
1927
|
+
result.push('[');
|
1928
|
+
result.push(this.generateExpression(expr.property, Precedence.Sequence, flags & F_ALLOW_CALL ? E_TTT : E_TFT));
|
1929
|
+
result.push(']');
|
1930
|
+
} else {
|
1931
|
+
if (expr.object.type === Syntax.Literal && typeof expr.object.value === 'number') {
|
1932
|
+
fragment = toSourceNodeWhenNeeded(result).toString();
|
1933
|
+
// When the following conditions are all true,
|
1934
|
+
// 1. No floating point
|
1935
|
+
// 2. Don't have exponents
|
1936
|
+
// 3. The last character is a decimal digit
|
1937
|
+
// 4. Not hexadecimal OR octal number literal
|
1938
|
+
// we should add a floating point.
|
1939
|
+
if (
|
1940
|
+
fragment.indexOf('.') < 0 &&
|
1941
|
+
!/[eExX]/.test(fragment) &&
|
1942
|
+
esutils.code.isDecimalDigit(fragment.charCodeAt(fragment.length - 1)) &&
|
1943
|
+
!(fragment.length >= 2 && fragment.charCodeAt(0) === 48) // '0'
|
1944
|
+
) {
|
1945
|
+
result.push('.');
|
1946
|
+
}
|
1947
|
+
}
|
1948
|
+
result.push('.');
|
1949
|
+
result.push(generateIdentifier(expr.property));
|
1950
|
+
}
|
1951
|
+
|
1952
|
+
return parenthesize(result, Precedence.Member, precedence);
|
1953
|
+
},
|
1954
|
+
|
1955
|
+
MetaProperty: function (expr, precedence, flags) {
|
1956
|
+
var result;
|
1957
|
+
result = [];
|
1958
|
+
result.push(expr.meta);
|
1959
|
+
result.push('.');
|
1960
|
+
result.push(expr.property);
|
1961
|
+
return parenthesize(result, Precedence.Member, precedence);
|
1962
|
+
},
|
1963
|
+
|
1964
|
+
UnaryExpression: function (expr, precedence, flags) {
|
1965
|
+
var result, fragment, rightCharCode, leftSource, leftCharCode;
|
1966
|
+
fragment = this.generateExpression(expr.argument, Precedence.Unary, E_TTT);
|
1967
|
+
|
1968
|
+
if (space === '') {
|
1969
|
+
result = join(expr.operator, fragment);
|
1970
|
+
} else {
|
1971
|
+
result = [expr.operator];
|
1972
|
+
if (expr.operator.length > 2) {
|
1973
|
+
// delete, void, typeof
|
1974
|
+
// get `typeof []`, not `typeof[]`
|
1975
|
+
result = join(result, fragment);
|
1976
|
+
} else {
|
1977
|
+
// Prevent inserting spaces between operator and argument if it is unnecessary
|
1978
|
+
// like, `!cond`
|
1979
|
+
leftSource = toSourceNodeWhenNeeded(result).toString();
|
1980
|
+
leftCharCode = leftSource.charCodeAt(leftSource.length - 1);
|
1981
|
+
rightCharCode = fragment.toString().charCodeAt(0);
|
1982
|
+
|
1983
|
+
if (((leftCharCode === 0x2B /* + */ || leftCharCode === 0x2D /* - */) && leftCharCode === rightCharCode) ||
|
1984
|
+
(esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode))) {
|
1985
|
+
result.push(noEmptySpace());
|
1986
|
+
result.push(fragment);
|
1987
|
+
} else {
|
1988
|
+
result.push(fragment);
|
1989
|
+
}
|
1990
|
+
}
|
1991
|
+
}
|
1992
|
+
return parenthesize(result, Precedence.Unary, precedence);
|
1993
|
+
},
|
1994
|
+
|
1995
|
+
YieldExpression: function (expr, precedence, flags) {
|
1996
|
+
var result;
|
1997
|
+
if (expr.delegate) {
|
1998
|
+
result = 'yield*';
|
1999
|
+
} else {
|
2000
|
+
result = 'yield';
|
2001
|
+
}
|
2002
|
+
if (expr.argument) {
|
2003
|
+
result = join(
|
2004
|
+
result,
|
2005
|
+
this.generateExpression(expr.argument, Precedence.Yield, E_TTT)
|
2006
|
+
);
|
2007
|
+
}
|
2008
|
+
return parenthesize(result, Precedence.Yield, precedence);
|
2009
|
+
},
|
2010
|
+
|
2011
|
+
AwaitExpression: function (expr, precedence, flags) {
|
2012
|
+
var result = join(
|
2013
|
+
expr.all ? 'await*' : 'await',
|
2014
|
+
this.generateExpression(expr.argument, Precedence.Await, E_TTT)
|
2015
|
+
);
|
2016
|
+
return parenthesize(result, Precedence.Await, precedence);
|
2017
|
+
},
|
2018
|
+
|
2019
|
+
UpdateExpression: function (expr, precedence, flags) {
|
2020
|
+
if (expr.prefix) {
|
2021
|
+
return parenthesize(
|
2022
|
+
[
|
2023
|
+
expr.operator,
|
2024
|
+
this.generateExpression(expr.argument, Precedence.Unary, E_TTT)
|
2025
|
+
],
|
2026
|
+
Precedence.Unary,
|
2027
|
+
precedence
|
2028
|
+
);
|
2029
|
+
}
|
2030
|
+
return parenthesize(
|
2031
|
+
[
|
2032
|
+
this.generateExpression(expr.argument, Precedence.Postfix, E_TTT),
|
2033
|
+
expr.operator
|
2034
|
+
],
|
2035
|
+
Precedence.Postfix,
|
2036
|
+
precedence
|
2037
|
+
);
|
2038
|
+
},
|
2039
|
+
|
2040
|
+
FunctionExpression: function (expr, precedence, flags) {
|
2041
|
+
var result = [
|
2042
|
+
generateAsyncPrefix(expr, true),
|
2043
|
+
'function'
|
2044
|
+
];
|
2045
|
+
if (expr.id) {
|
2046
|
+
result.push(generateStarSuffix(expr) || noEmptySpace());
|
2047
|
+
result.push(generateIdentifier(expr.id));
|
2048
|
+
} else {
|
2049
|
+
result.push(generateStarSuffix(expr) || space);
|
2050
|
+
}
|
2051
|
+
result.push(this.generateFunctionBody(expr));
|
2052
|
+
return result;
|
2053
|
+
},
|
2054
|
+
|
2055
|
+
ArrayPattern: function (expr, precedence, flags) {
|
2056
|
+
return this.ArrayExpression(expr, precedence, flags, true);
|
2057
|
+
},
|
2058
|
+
|
2059
|
+
ArrayExpression: function (expr, precedence, flags, isPattern) {
|
2060
|
+
var result, multiline, that = this;
|
2061
|
+
if (!expr.elements.length) {
|
2062
|
+
return '[]';
|
2063
|
+
}
|
2064
|
+
multiline = isPattern ? false : expr.elements.length > 1;
|
2065
|
+
result = ['[', multiline ? newline : ''];
|
2066
|
+
withIndent(function (indent) {
|
2067
|
+
var i, iz;
|
2068
|
+
for (i = 0, iz = expr.elements.length; i < iz; ++i) {
|
2069
|
+
if (!expr.elements[i]) {
|
2070
|
+
if (multiline) {
|
2071
|
+
result.push(indent);
|
2072
|
+
}
|
2073
|
+
if (i + 1 === iz) {
|
2074
|
+
result.push(',');
|
2075
|
+
}
|
2076
|
+
} else {
|
2077
|
+
result.push(multiline ? indent : '');
|
2078
|
+
result.push(that.generateExpression(expr.elements[i], Precedence.Assignment, E_TTT));
|
2079
|
+
}
|
2080
|
+
if (i + 1 < iz) {
|
2081
|
+
result.push(',' + (multiline ? newline : space));
|
2082
|
+
}
|
2083
|
+
}
|
2084
|
+
});
|
2085
|
+
if (multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
|
2086
|
+
result.push(newline);
|
2087
|
+
}
|
2088
|
+
result.push(multiline ? base : '');
|
2089
|
+
result.push(']');
|
2090
|
+
return result;
|
2091
|
+
},
|
2092
|
+
|
2093
|
+
RestElement: function(expr, precedence, flags) {
|
2094
|
+
return '...' + this.generatePattern(expr.argument);
|
2095
|
+
},
|
2096
|
+
|
2097
|
+
ClassExpression: function (expr, precedence, flags) {
|
2098
|
+
var result, fragment;
|
2099
|
+
result = ['class'];
|
2100
|
+
if (expr.id) {
|
2101
|
+
result = join(result, this.generateExpression(expr.id, Precedence.Sequence, E_TTT));
|
2102
|
+
}
|
2103
|
+
if (expr.superClass) {
|
2104
|
+
fragment = join('extends', this.generateExpression(expr.superClass, Precedence.Assignment, E_TTT));
|
2105
|
+
result = join(result, fragment);
|
2106
|
+
}
|
2107
|
+
result.push(space);
|
2108
|
+
result.push(this.generateStatement(expr.body, S_TFFT));
|
2109
|
+
return result;
|
2110
|
+
},
|
2111
|
+
|
2112
|
+
MethodDefinition: function (expr, precedence, flags) {
|
2113
|
+
var result, fragment;
|
2114
|
+
if (expr['static']) {
|
2115
|
+
result = ['static' + space];
|
2116
|
+
} else {
|
2117
|
+
result = [];
|
2118
|
+
}
|
2119
|
+
if (expr.kind === 'get' || expr.kind === 'set') {
|
2120
|
+
fragment = [
|
2121
|
+
join(expr.kind, this.generatePropertyKey(expr.key, expr.computed, expr.value)),
|
2122
|
+
this.generateFunctionBody(expr.value)
|
2123
|
+
];
|
2124
|
+
} else {
|
2125
|
+
fragment = [
|
2126
|
+
generateMethodPrefix(expr),
|
2127
|
+
this.generatePropertyKey(expr.key, expr.computed, expr.value),
|
2128
|
+
this.generateFunctionBody(expr.value)
|
2129
|
+
];
|
2130
|
+
}
|
2131
|
+
return join(result, fragment);
|
2132
|
+
},
|
2133
|
+
|
2134
|
+
Property: function (expr, precedence, flags) {
|
2135
|
+
if (expr.kind === 'get' || expr.kind === 'set') {
|
2136
|
+
return [
|
2137
|
+
expr.kind, noEmptySpace(),
|
2138
|
+
this.generatePropertyKey(expr.key, expr.computed, expr.value),
|
2139
|
+
this.generateFunctionBody(expr.value)
|
2140
|
+
];
|
2141
|
+
}
|
2142
|
+
|
2143
|
+
if (expr.shorthand) {
|
2144
|
+
return this.generatePropertyKey(expr.key, expr.computed, expr.value);
|
2145
|
+
}
|
2146
|
+
|
2147
|
+
if (expr.method) {
|
2148
|
+
return [
|
2149
|
+
generateMethodPrefix(expr),
|
2150
|
+
this.generatePropertyKey(expr.key, expr.computed, expr.value),
|
2151
|
+
this.generateFunctionBody(expr.value)
|
2152
|
+
];
|
2153
|
+
}
|
2154
|
+
|
2155
|
+
return [
|
2156
|
+
this.generatePropertyKey(expr.key, expr.computed, expr.value),
|
2157
|
+
':' + space,
|
2158
|
+
this.generateExpression(expr.value, Precedence.Assignment, E_TTT)
|
2159
|
+
];
|
2160
|
+
},
|
2161
|
+
|
2162
|
+
ObjectExpression: function (expr, precedence, flags) {
|
2163
|
+
var multiline, result, fragment, that = this;
|
2164
|
+
|
2165
|
+
if (!expr.properties.length) {
|
2166
|
+
return '{}';
|
2167
|
+
}
|
2168
|
+
multiline = expr.properties.length > 1;
|
2169
|
+
|
2170
|
+
withIndent(function () {
|
2171
|
+
fragment = that.generateExpression(expr.properties[0], Precedence.Sequence, E_TTT);
|
2172
|
+
});
|
2173
|
+
|
2174
|
+
if (!multiline) {
|
2175
|
+
// issues 4
|
2176
|
+
// Do not transform from
|
2177
|
+
// dejavu.Class.declare({
|
2178
|
+
// method2: function () {}
|
2179
|
+
// });
|
2180
|
+
// to
|
2181
|
+
// dejavu.Class.declare({method2: function () {
|
2182
|
+
// }});
|
2183
|
+
if (!hasLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
|
2184
|
+
return [ '{', space, fragment, space, '}' ];
|
2185
|
+
}
|
2186
|
+
}
|
2187
|
+
|
2188
|
+
withIndent(function (indent) {
|
2189
|
+
var i, iz;
|
2190
|
+
result = [ '{', newline, indent, fragment ];
|
2191
|
+
|
2192
|
+
if (multiline) {
|
2193
|
+
result.push(',' + newline);
|
2194
|
+
for (i = 1, iz = expr.properties.length; i < iz; ++i) {
|
2195
|
+
result.push(indent);
|
2196
|
+
result.push(that.generateExpression(expr.properties[i], Precedence.Sequence, E_TTT));
|
2197
|
+
if (i + 1 < iz) {
|
2198
|
+
result.push(',' + newline);
|
2199
|
+
}
|
2200
|
+
}
|
2201
|
+
}
|
2202
|
+
});
|
2203
|
+
|
2204
|
+
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
|
2205
|
+
result.push(newline);
|
2206
|
+
}
|
2207
|
+
result.push(base);
|
2208
|
+
result.push('}');
|
2209
|
+
return result;
|
2210
|
+
},
|
2211
|
+
|
2212
|
+
AssignmentPattern: function(expr, precedence, flags) {
|
2213
|
+
return this.generateAssignment(expr.left, expr.right, '=', precedence, flags);
|
2214
|
+
},
|
2215
|
+
|
2216
|
+
ObjectPattern: function (expr, precedence, flags) {
|
2217
|
+
var result, i, iz, multiline, property, that = this;
|
2218
|
+
if (!expr.properties.length) {
|
2219
|
+
return '{}';
|
2220
|
+
}
|
2221
|
+
|
2222
|
+
multiline = false;
|
2223
|
+
if (expr.properties.length === 1) {
|
2224
|
+
property = expr.properties[0];
|
2225
|
+
if (property.value.type !== Syntax.Identifier) {
|
2226
|
+
multiline = true;
|
2227
|
+
}
|
2228
|
+
} else {
|
2229
|
+
for (i = 0, iz = expr.properties.length; i < iz; ++i) {
|
2230
|
+
property = expr.properties[i];
|
2231
|
+
if (!property.shorthand) {
|
2232
|
+
multiline = true;
|
2233
|
+
break;
|
2234
|
+
}
|
2235
|
+
}
|
2236
|
+
}
|
2237
|
+
result = ['{', multiline ? newline : '' ];
|
2238
|
+
|
2239
|
+
withIndent(function (indent) {
|
2240
|
+
var i, iz;
|
2241
|
+
for (i = 0, iz = expr.properties.length; i < iz; ++i) {
|
2242
|
+
result.push(multiline ? indent : '');
|
2243
|
+
result.push(that.generateExpression(expr.properties[i], Precedence.Sequence, E_TTT));
|
2244
|
+
if (i + 1 < iz) {
|
2245
|
+
result.push(',' + (multiline ? newline : space));
|
2246
|
+
}
|
2247
|
+
}
|
2248
|
+
});
|
2249
|
+
|
2250
|
+
if (multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
|
2251
|
+
result.push(newline);
|
2252
|
+
}
|
2253
|
+
result.push(multiline ? base : '');
|
2254
|
+
result.push('}');
|
2255
|
+
return result;
|
2256
|
+
},
|
2257
|
+
|
2258
|
+
ThisExpression: function (expr, precedence, flags) {
|
2259
|
+
return 'this';
|
2260
|
+
},
|
2261
|
+
|
2262
|
+
Super: function (expr, precedence, flags) {
|
2263
|
+
return 'super';
|
2264
|
+
},
|
2265
|
+
|
2266
|
+
Identifier: function (expr, precedence, flags) {
|
2267
|
+
return generateIdentifier(expr);
|
2268
|
+
},
|
2269
|
+
|
2270
|
+
ImportDefaultSpecifier: function (expr, precedence, flags) {
|
2271
|
+
return generateIdentifier(expr.id || expr.local);
|
2272
|
+
},
|
2273
|
+
|
2274
|
+
ImportNamespaceSpecifier: function (expr, precedence, flags) {
|
2275
|
+
var result = ['*'];
|
2276
|
+
var id = expr.id || expr.local;
|
2277
|
+
if (id) {
|
2278
|
+
result.push(space + 'as' + noEmptySpace() + generateIdentifier(id));
|
2279
|
+
}
|
2280
|
+
return result;
|
2281
|
+
},
|
2282
|
+
|
2283
|
+
ImportSpecifier: function (expr, precedence, flags) {
|
2284
|
+
var imported = expr.imported;
|
2285
|
+
var result = [ imported.name ];
|
2286
|
+
var local = expr.local;
|
2287
|
+
if (local && local.name !== imported.name) {
|
2288
|
+
result.push(noEmptySpace() + 'as' + noEmptySpace() + generateIdentifier(local));
|
2289
|
+
}
|
2290
|
+
return result;
|
2291
|
+
},
|
2292
|
+
|
2293
|
+
ExportSpecifier: function (expr, precedence, flags) {
|
2294
|
+
var local = expr.local;
|
2295
|
+
var result = [ local.name ];
|
2296
|
+
var exported = expr.exported;
|
2297
|
+
if (exported && exported.name !== local.name) {
|
2298
|
+
result.push(noEmptySpace() + 'as' + noEmptySpace() + generateIdentifier(exported));
|
2299
|
+
}
|
2300
|
+
return result;
|
2301
|
+
},
|
2302
|
+
|
2303
|
+
Literal: function (expr, precedence, flags) {
|
2304
|
+
var raw;
|
2305
|
+
if (expr.hasOwnProperty('raw') && parse && extra.raw) {
|
2306
|
+
try {
|
2307
|
+
raw = parse(expr.raw).body[0].expression;
|
2308
|
+
if (raw.type === Syntax.Literal) {
|
2309
|
+
if (raw.value === expr.value) {
|
2310
|
+
return expr.raw;
|
2311
|
+
}
|
2312
|
+
}
|
2313
|
+
} catch (e) {
|
2314
|
+
// not use raw property
|
2315
|
+
}
|
2316
|
+
}
|
2317
|
+
|
2318
|
+
if (expr.value === null) {
|
2319
|
+
return 'null';
|
2320
|
+
}
|
2321
|
+
|
2322
|
+
if (typeof expr.value === 'string') {
|
2323
|
+
return escapeString(expr.value);
|
2324
|
+
}
|
2325
|
+
|
2326
|
+
if (typeof expr.value === 'number') {
|
2327
|
+
return generateNumber(expr.value);
|
2328
|
+
}
|
2329
|
+
|
2330
|
+
if (typeof expr.value === 'boolean') {
|
2331
|
+
return expr.value ? 'true' : 'false';
|
2332
|
+
}
|
2333
|
+
|
2334
|
+
return generateRegExp(expr.value);
|
2335
|
+
},
|
2336
|
+
|
2337
|
+
GeneratorExpression: function (expr, precedence, flags) {
|
2338
|
+
return this.ComprehensionExpression(expr, precedence, flags);
|
2339
|
+
},
|
2340
|
+
|
2341
|
+
ComprehensionExpression: function (expr, precedence, flags) {
|
2342
|
+
// GeneratorExpression should be parenthesized with (...), ComprehensionExpression with [...]
|
2343
|
+
// Due to https://bugzilla.mozilla.org/show_bug.cgi?id=883468 position of expr.body can differ in Spidermonkey and ES6
|
2344
|
+
|
2345
|
+
var result, i, iz, fragment, that = this;
|
2346
|
+
result = (expr.type === Syntax.GeneratorExpression) ? ['('] : ['['];
|
2347
|
+
|
2348
|
+
if (extra.moz.comprehensionExpressionStartsWithAssignment) {
|
2349
|
+
fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT);
|
2350
|
+
result.push(fragment);
|
2351
|
+
}
|
2352
|
+
|
2353
|
+
if (expr.blocks) {
|
2354
|
+
withIndent(function () {
|
2355
|
+
for (i = 0, iz = expr.blocks.length; i < iz; ++i) {
|
2356
|
+
fragment = that.generateExpression(expr.blocks[i], Precedence.Sequence, E_TTT);
|
2357
|
+
if (i > 0 || extra.moz.comprehensionExpressionStartsWithAssignment) {
|
2358
|
+
result = join(result, fragment);
|
2359
|
+
} else {
|
2360
|
+
result.push(fragment);
|
2361
|
+
}
|
2362
|
+
}
|
2363
|
+
});
|
2364
|
+
}
|
2365
|
+
|
2366
|
+
if (expr.filter) {
|
2367
|
+
result = join(result, 'if' + space);
|
2368
|
+
fragment = this.generateExpression(expr.filter, Precedence.Sequence, E_TTT);
|
2369
|
+
result = join(result, [ '(', fragment, ')' ]);
|
2370
|
+
}
|
2371
|
+
|
2372
|
+
if (!extra.moz.comprehensionExpressionStartsWithAssignment) {
|
2373
|
+
fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT);
|
2374
|
+
|
2375
|
+
result = join(result, fragment);
|
2376
|
+
}
|
2377
|
+
|
2378
|
+
result.push((expr.type === Syntax.GeneratorExpression) ? ')' : ']');
|
2379
|
+
return result;
|
2380
|
+
},
|
2381
|
+
|
2382
|
+
ComprehensionBlock: function (expr, precedence, flags) {
|
2383
|
+
var fragment;
|
2384
|
+
if (expr.left.type === Syntax.VariableDeclaration) {
|
2385
|
+
fragment = [
|
2386
|
+
expr.left.kind, noEmptySpace(),
|
2387
|
+
this.generateStatement(expr.left.declarations[0], S_FFFF)
|
2388
|
+
];
|
2389
|
+
} else {
|
2390
|
+
fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT);
|
2391
|
+
}
|
2392
|
+
|
2393
|
+
fragment = join(fragment, expr.of ? 'of' : 'in');
|
2394
|
+
fragment = join(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT));
|
2395
|
+
|
2396
|
+
return [ 'for' + space + '(', fragment, ')' ];
|
2397
|
+
},
|
2398
|
+
|
2399
|
+
SpreadElement: function (expr, precedence, flags) {
|
2400
|
+
return [
|
2401
|
+
'...',
|
2402
|
+
this.generateExpression(expr.argument, Precedence.Assignment, E_TTT)
|
2403
|
+
];
|
2404
|
+
},
|
2405
|
+
|
2406
|
+
TaggedTemplateExpression: function (expr, precedence, flags) {
|
2407
|
+
var itemFlags = E_TTF;
|
2408
|
+
if (!(flags & F_ALLOW_CALL)) {
|
2409
|
+
itemFlags = E_TFF;
|
2410
|
+
}
|
2411
|
+
var result = [
|
2412
|
+
this.generateExpression(expr.tag, Precedence.Call, itemFlags),
|
2413
|
+
this.generateExpression(expr.quasi, Precedence.Primary, E_FFT)
|
2414
|
+
];
|
2415
|
+
return parenthesize(result, Precedence.TaggedTemplate, precedence);
|
2416
|
+
},
|
2417
|
+
|
2418
|
+
TemplateElement: function (expr, precedence, flags) {
|
2419
|
+
// Don't use "cooked". Since tagged template can use raw template
|
2420
|
+
// representation. So if we do so, it breaks the script semantics.
|
2421
|
+
return expr.value.raw;
|
2422
|
+
},
|
2423
|
+
|
2424
|
+
TemplateLiteral: function (expr, precedence, flags) {
|
2425
|
+
var result, i, iz;
|
2426
|
+
result = [ '`' ];
|
2427
|
+
for (i = 0, iz = expr.quasis.length; i < iz; ++i) {
|
2428
|
+
result.push(this.generateExpression(expr.quasis[i], Precedence.Primary, E_TTT));
|
2429
|
+
if (i + 1 < iz) {
|
2430
|
+
result.push('${' + space);
|
2431
|
+
result.push(this.generateExpression(expr.expressions[i], Precedence.Sequence, E_TTT));
|
2432
|
+
result.push(space + '}');
|
2433
|
+
}
|
2434
|
+
}
|
2435
|
+
result.push('`');
|
2436
|
+
return result;
|
2437
|
+
},
|
2438
|
+
|
2439
|
+
ModuleSpecifier: function (expr, precedence, flags) {
|
2440
|
+
return this.Literal(expr, precedence, flags);
|
2441
|
+
}
|
2442
|
+
|
2443
|
+
};
|
2444
|
+
|
2445
|
+
merge(CodeGenerator.prototype, CodeGenerator.Expression);
|
2446
|
+
|
2447
|
+
CodeGenerator.prototype.generateExpression = function (expr, precedence, flags) {
|
2448
|
+
var result, type;
|
2449
|
+
|
2450
|
+
type = expr.type || Syntax.Property;
|
2451
|
+
|
2452
|
+
if (extra.verbatim && expr.hasOwnProperty(extra.verbatim)) {
|
2453
|
+
return generateVerbatim(expr, precedence);
|
2454
|
+
}
|
2455
|
+
|
2456
|
+
result = this[type](expr, precedence, flags);
|
2457
|
+
|
2458
|
+
|
2459
|
+
if (extra.comment) {
|
2460
|
+
result = addComments(expr, result);
|
2461
|
+
}
|
2462
|
+
return toSourceNodeWhenNeeded(result, expr);
|
2463
|
+
};
|
2464
|
+
|
2465
|
+
CodeGenerator.prototype.generateStatement = function (stmt, flags) {
|
2466
|
+
var result,
|
2467
|
+
fragment;
|
2468
|
+
|
2469
|
+
result = this[stmt.type](stmt, flags);
|
2470
|
+
|
2471
|
+
// Attach comments
|
2472
|
+
|
2473
|
+
if (extra.comment) {
|
2474
|
+
result = addComments(stmt, result);
|
2475
|
+
}
|
2476
|
+
|
2477
|
+
fragment = toSourceNodeWhenNeeded(result).toString();
|
2478
|
+
if (stmt.type === Syntax.Program && !safeConcatenation && newline === '' && fragment.charAt(fragment.length - 1) === '\n') {
|
2479
|
+
result = sourceMap ? toSourceNodeWhenNeeded(result).replaceRight(/\s+$/, '') : fragment.replace(/\s+$/, '');
|
2480
|
+
}
|
2481
|
+
|
2482
|
+
return toSourceNodeWhenNeeded(result, stmt);
|
2483
|
+
};
|
2484
|
+
|
2485
|
+
function generateInternal(node) {
|
2486
|
+
var codegen;
|
2487
|
+
|
2488
|
+
codegen = new CodeGenerator();
|
2489
|
+
if (isStatement(node)) {
|
2490
|
+
return codegen.generateStatement(node, S_TFFF);
|
2491
|
+
}
|
2492
|
+
|
2493
|
+
if (isExpression(node)) {
|
2494
|
+
return codegen.generateExpression(node, Precedence.Sequence, E_TTT);
|
2495
|
+
}
|
2496
|
+
|
2497
|
+
throw new Error('Unknown node type: ' + node.type);
|
2498
|
+
}
|
2499
|
+
|
2500
|
+
function generate(node, options) {
|
2501
|
+
var defaultOptions = getDefaultOptions(), result, pair;
|
2502
|
+
|
2503
|
+
if (options != null) {
|
2504
|
+
// Obsolete options
|
2505
|
+
//
|
2506
|
+
// `options.indent`
|
2507
|
+
// `options.base`
|
2508
|
+
//
|
2509
|
+
// Instead of them, we can use `option.format.indent`.
|
2510
|
+
if (typeof options.indent === 'string') {
|
2511
|
+
defaultOptions.format.indent.style = options.indent;
|
2512
|
+
}
|
2513
|
+
if (typeof options.base === 'number') {
|
2514
|
+
defaultOptions.format.indent.base = options.base;
|
2515
|
+
}
|
2516
|
+
options = updateDeeply(defaultOptions, options);
|
2517
|
+
indent = options.format.indent.style;
|
2518
|
+
if (typeof options.base === 'string') {
|
2519
|
+
base = options.base;
|
2520
|
+
} else {
|
2521
|
+
base = stringRepeat(indent, options.format.indent.base);
|
2522
|
+
}
|
2523
|
+
} else {
|
2524
|
+
options = defaultOptions;
|
2525
|
+
indent = options.format.indent.style;
|
2526
|
+
base = stringRepeat(indent, options.format.indent.base);
|
2527
|
+
}
|
2528
|
+
json = options.format.json;
|
2529
|
+
renumber = options.format.renumber;
|
2530
|
+
hexadecimal = json ? false : options.format.hexadecimal;
|
2531
|
+
quotes = json ? 'double' : options.format.quotes;
|
2532
|
+
escapeless = options.format.escapeless;
|
2533
|
+
newline = options.format.newline;
|
2534
|
+
space = options.format.space;
|
2535
|
+
if (options.format.compact) {
|
2536
|
+
newline = space = indent = base = '';
|
2537
|
+
}
|
2538
|
+
parentheses = options.format.parentheses;
|
2539
|
+
semicolons = options.format.semicolons;
|
2540
|
+
safeConcatenation = options.format.safeConcatenation;
|
2541
|
+
directive = options.directive;
|
2542
|
+
parse = json ? null : options.parse;
|
2543
|
+
sourceMap = options.sourceMap;
|
2544
|
+
sourceCode = options.sourceCode;
|
2545
|
+
preserveBlankLines = options.format.preserveBlankLines && sourceCode !== null;
|
2546
|
+
extra = options;
|
2547
|
+
|
2548
|
+
if (sourceMap) {
|
2549
|
+
if (!exports.browser) {
|
2550
|
+
// We assume environment is node.js
|
2551
|
+
// And prevent from including source-map by browserify
|
2552
|
+
SourceNode = require('source-map').SourceNode;
|
2553
|
+
} else {
|
2554
|
+
SourceNode = global.sourceMap.SourceNode;
|
2555
|
+
}
|
2556
|
+
}
|
2557
|
+
|
2558
|
+
result = generateInternal(node);
|
2559
|
+
|
2560
|
+
if (!sourceMap) {
|
2561
|
+
pair = {code: result.toString(), map: null};
|
2562
|
+
return options.sourceMapWithCode ? pair : pair.code;
|
2563
|
+
}
|
2564
|
+
|
2565
|
+
|
2566
|
+
pair = result.toStringWithSourceMap({
|
2567
|
+
file: options.file,
|
2568
|
+
sourceRoot: options.sourceMapRoot
|
2569
|
+
});
|
2570
|
+
|
2571
|
+
if (options.sourceContent) {
|
2572
|
+
pair.map.setSourceContent(options.sourceMap,
|
2573
|
+
options.sourceContent);
|
2574
|
+
}
|
2575
|
+
|
2576
|
+
if (options.sourceMapWithCode) {
|
2577
|
+
return pair;
|
2578
|
+
}
|
2579
|
+
|
2580
|
+
return pair.map.toString();
|
2581
|
+
}
|
2582
|
+
|
2583
|
+
FORMAT_MINIFY = {
|
2584
|
+
indent: {
|
2585
|
+
style: '',
|
2586
|
+
base: 0
|
2587
|
+
},
|
2588
|
+
renumber: true,
|
2589
|
+
hexadecimal: true,
|
2590
|
+
quotes: 'auto',
|
2591
|
+
escapeless: true,
|
2592
|
+
compact: true,
|
2593
|
+
parentheses: false,
|
2594
|
+
semicolons: false
|
2595
|
+
};
|
2596
|
+
|
2597
|
+
FORMAT_DEFAULTS = getDefaultOptions().format;
|
2598
|
+
|
2599
|
+
exports.version = require('./package.json').version;
|
2600
|
+
exports.generate = generate;
|
2601
|
+
exports.attachComments = estraverse.attachComments;
|
2602
|
+
exports.Precedence = updateDeeply({}, Precedence);
|
2603
|
+
exports.browser = false;
|
2604
|
+
exports.FORMAT_MINIFY = FORMAT_MINIFY;
|
2605
|
+
exports.FORMAT_DEFAULTS = FORMAT_DEFAULTS;
|
2606
|
+
}());
|
2607
|
+
/* vim: set sw=4 ts=4 et tw=80 : */
|