prebid.js 6.8.0 → 6.12.0
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.
- package/.babelrc.js +2 -1
- package/.circleci/config.yml +3 -3
- package/.eslintrc.js +8 -1
- package/README.md +11 -5
- package/dist/33acrossBidAdapter.js +1 -0
- package/dist/a4gBidAdapter.js +1 -0
- package/dist/ablidaBidAdapter.js +1 -0
- package/dist/adWMGAnalyticsAdapter.js +1 -0
- package/dist/adWMGBidAdapter.js +1 -0
- package/dist/adagioAnalyticsAdapter.js +1 -0
- package/dist/adagioBidAdapter.js +1 -0
- package/dist/adbookpspBidAdapter.js +1 -0
- package/dist/addefendBidAdapter.js +1 -0
- package/dist/adfBidAdapter.js +1 -0
- package/dist/adgenerationBidAdapter.js +1 -0
- package/dist/adhashBidAdapter.js +1 -0
- package/dist/adheseBidAdapter.js +1 -0
- package/dist/adkernelAdnAnalyticsAdapter.js +1 -0
- package/dist/adkernelAdnBidAdapter.js +1 -0
- package/dist/adkernelBidAdapter.js +1 -0
- package/dist/adlooxAdServerVideo.js +1 -0
- package/dist/adlooxAnalyticsAdapter.js +1 -0
- package/dist/adlooxRtdProvider.js +1 -0
- package/dist/admanBidAdapter.js +1 -0
- package/dist/admixerBidAdapter.js +1 -0
- package/dist/admixerIdSystem.js +1 -0
- package/dist/adnowBidAdapter.js +1 -0
- package/dist/adnuntiusBidAdapter.js +1 -0
- package/dist/adnuntiusRtdProvider.js +1 -0
- package/dist/adoceanBidAdapter.js +1 -0
- package/dist/adomikAnalyticsAdapter.js +1 -0
- package/dist/adotBidAdapter.js +1 -0
- package/dist/adpartnerBidAdapter.js +1 -0
- package/dist/adplusBidAdapter.js +1 -0
- package/dist/adpod.js +1 -0
- package/dist/adponeBidAdapter.js +1 -0
- package/dist/adprimeBidAdapter.js +1 -0
- package/dist/adqueryBidAdapter.js +1 -0
- package/dist/adqueryIdSystem.js +1 -0
- package/dist/adrelevantisBidAdapter.js +1 -0
- package/dist/adriverBidAdapter.js +1 -0
- package/dist/adtargetBidAdapter.js +1 -0
- package/dist/adtelligentBidAdapter.js +1 -0
- package/dist/adtelligentIdSystem.js +1 -0
- package/dist/adtrueBidAdapter.js +1 -0
- package/dist/aduptechBidAdapter.js +1 -0
- package/dist/advangelistsBidAdapter.js +1 -0
- package/dist/adxcgAnalyticsAdapter.js +1 -0
- package/dist/adxcgBidAdapter.js +1 -0
- package/dist/adxpremiumAnalyticsAdapter.js +1 -0
- package/dist/adyoulikeBidAdapter.js +1 -0
- package/dist/afpBidAdapter.js +1 -0
- package/dist/airgridRtdProvider.js +1 -0
- package/dist/ajaBidAdapter.js +1 -0
- package/dist/akamaiDAPIdSystem.js +1 -0
- package/dist/akamaiDapRtdProvider.js +1 -0
- package/dist/amxBidAdapter.js +1 -0
- package/dist/amxIdSystem.js +1 -0
- package/dist/aniviewBidAdapter.js +1 -0
- package/dist/aolBidAdapter.js +1 -0
- package/dist/apacdexBidAdapter.js +1 -0
- package/dist/appierAnalyticsAdapter.js +1 -0
- package/dist/appierBidAdapter.js +1 -0
- package/dist/appnexusAnalyticsAdapter.js +1 -0
- package/dist/appnexusBidAdapter.js +1 -0
- package/dist/apstreamBidAdapter.js +1 -0
- package/dist/asealBidAdapter.js +1 -0
- package/dist/asoBidAdapter.js +1 -0
- package/dist/astraoneBidAdapter.js +1 -0
- package/dist/atsAnalyticsAdapter.js +1 -0
- package/dist/audiencerunBidAdapter.js +1 -0
- package/dist/automatadBidAdapter.js +1 -0
- package/dist/axonixBidAdapter.js +1 -0
- package/dist/beachfrontBidAdapter.js +1 -0
- package/dist/beopBidAdapter.js +1 -0
- package/dist/betweenBidAdapter.js +1 -0
- package/dist/bidViewability.js +1 -0
- package/dist/bidViewabilityIO.js +1 -0
- package/dist/bidglassBidAdapter.js +1 -0
- package/dist/bidscubeBidAdapter.js +1 -0
- package/dist/big-richmediaBidAdapter.js +1 -0
- package/dist/bizzclickBidAdapter.js +1 -0
- package/dist/bliinkBidAdapter.js +1 -0
- package/dist/bluebillywigBidAdapter.js +1 -0
- package/dist/boldwinBidAdapter.js +1 -0
- package/dist/brandmetricsRtdProvider.js +1 -0
- package/dist/braveBidAdapter.js +1 -0
- package/dist/bridgewellBidAdapter.js +1 -0
- package/dist/brightMountainMediaBidAdapter.js +1 -0
- package/dist/brightcomBidAdapter.js +1 -0
- package/dist/britepoolIdSystem.js +1 -0
- package/dist/browsiRtdProvider.js +1 -0
- package/dist/bucksenseBidAdapter.js +1 -0
- package/dist/buzzoolaBidAdapter.js +1 -0
- package/dist/byDataAnalyticsAdapter.js +1 -0
- package/dist/categoryTranslation.js +1 -0
- package/dist/ccxBidAdapter.js +1 -0
- package/dist/cleanioRtdProvider.js +1 -0
- package/dist/cleanmedianetBidAdapter.js +1 -0
- package/dist/clickforceBidAdapter.js +1 -0
- package/dist/codefuelBidAdapter.js +1 -0
- package/dist/cointrafficBidAdapter.js +1 -0
- package/dist/coinzillaBidAdapter.js +1 -0
- package/dist/colossussspBidAdapter.js +1 -0
- package/dist/compassBidAdapter.js +1 -0
- package/dist/concertAnalyticsAdapter.js +1 -0
- package/dist/concertBidAdapter.js +1 -0
- package/dist/connectIdSystem.js +1 -0
- package/dist/connectadBidAdapter.js +1 -0
- package/dist/consentManagement.js +1 -0
- package/dist/consentManagementUsp.js +1 -0
- package/dist/consumableBidAdapter.js +1 -0
- package/dist/contentexchangeBidAdapter.js +1 -0
- package/dist/conversantBidAdapter.js +1 -0
- package/dist/cpmstarBidAdapter.js +1 -0
- package/dist/craftBidAdapter.js +1 -0
- package/dist/criteoBidAdapter.js +1 -0
- package/dist/criteoIdSystem.js +1 -0
- package/dist/currency.js +1 -0
- package/dist/cwireBidAdapter.js +1 -0
- package/dist/dailyhuntBidAdapter.js +1 -0
- package/dist/datablocksAnalyticsAdapter.js +1 -0
- package/dist/datablocksBidAdapter.js +1 -0
- package/dist/dchain.js +1 -0
- package/dist/debugging.js +1 -0
- package/dist/deepintentBidAdapter.js +1 -0
- package/dist/deepintentDpesIdSystem.js +1 -0
- package/dist/deltaprojectsBidAdapter.js +1 -0
- package/dist/dfpAdServerVideo.js +1 -0
- package/dist/dgkeywordRtdProvider.js +1 -0
- package/dist/displayioBidAdapter.js +1 -0
- package/dist/districtmDMXBidAdapter.js +1 -0
- package/dist/dmdIdSystem.js +1 -0
- package/dist/docereeBidAdapter.js +1 -0
- package/dist/dspxBidAdapter.js +1 -0
- package/dist/e_volutionBidAdapter.js +1 -0
- package/dist/ebdrBidAdapter.js +1 -0
- package/dist/emx_digitalBidAdapter.js +1 -0
- package/dist/engageyaBidAdapter.js +1 -0
- package/dist/enrichmentFpdModule.js +1 -0
- package/dist/eplanningAnalyticsAdapter.js +1 -0
- package/dist/eplanningBidAdapter.js +1 -0
- package/dist/etargetBidAdapter.js +1 -0
- package/dist/express.js +1 -0
- package/dist/fabrickIdSystem.js +1 -0
- package/dist/feedadBidAdapter.js +1 -0
- package/dist/fintezaAnalyticsAdapter.js +1 -0
- package/dist/flocIdSystem.js +1 -0
- package/dist/fluctBidAdapter.js +1 -0
- package/dist/fpdModule.js +1 -0
- package/dist/freeWheelAdserverVideo.js +1 -0
- package/dist/freewheel-sspBidAdapter.js +1 -0
- package/dist/gammaBidAdapter.js +1 -0
- package/dist/gamoshiBidAdapter.js +1 -0
- package/dist/gdprEnforcement.js +1 -0
- package/dist/geoedgeRtdProvider.js +1 -0
- package/dist/getintentBidAdapter.js +1 -0
- package/dist/gjirafaBidAdapter.js +1 -0
- package/dist/glimpseBidAdapter.js +1 -0
- package/dist/glomexBidAdapter.js +1 -0
- package/dist/gmosspBidAdapter.js +1 -0
- package/dist/gnetBidAdapter.js +1 -0
- package/dist/goldbachBidAdapter.js +1 -0
- package/dist/googleAnalyticsAdapter.js +1 -0
- package/dist/gothamadsBidAdapter.js +1 -0
- package/dist/gptPreAuction.js +1 -0
- package/dist/gridBidAdapter.js +1 -0
- package/dist/gridNMBidAdapter.js +1 -0
- package/dist/growadvertisingBidAdapter.js +1 -0
- package/dist/gumgumBidAdapter.js +1 -0
- package/dist/h12mediaBidAdapter.js +1 -0
- package/dist/hadronIdSystem.js +1 -0
- package/dist/hadronRtdProvider.js +1 -0
- package/dist/haloIdSystem.js +1 -0
- package/dist/haloRtdProvider.js +1 -0
- package/dist/hybridBidAdapter.js +1 -0
- package/dist/iasRtdProvider.js +1 -0
- package/dist/id5AnalyticsAdapter.js +1 -0
- package/dist/id5IdSystem.js +1 -0
- package/dist/idImportLibrary.js +1 -0
- package/dist/identityLinkIdSystem.js +1 -0
- package/dist/idxIdSystem.js +1 -0
- package/dist/imRtdProvider.js +1 -0
- package/dist/impactifyBidAdapter.js +1 -0
- package/dist/improvedigitalBidAdapter.js +1 -0
- package/dist/imuIdSystem.js +1 -0
- package/dist/inmarBidAdapter.js +1 -0
- package/dist/innityBidAdapter.js +1 -0
- package/dist/inskinBidAdapter.js +1 -0
- package/dist/insticatorBidAdapter.js +1 -0
- package/dist/instreamTracking.js +1 -0
- package/dist/integr8BidAdapter.js +1 -0
- package/dist/intentIqIdSystem.js +1 -0
- package/dist/interactiveOffersBidAdapter.js +1 -0
- package/dist/intersectionRtdProvider.js +1 -0
- package/dist/invamiaBidAdapter.js +1 -0
- package/dist/invibesBidAdapter.js +1 -0
- package/dist/invisiblyAnalyticsAdapter.js +1 -0
- package/dist/ipromBidAdapter.js +1 -0
- package/dist/iqmBidAdapter.js +1 -0
- package/dist/iqzoneBidAdapter.js +1 -0
- package/dist/ixBidAdapter.js +1 -0
- package/dist/jixieBidAdapter.js +1 -0
- package/dist/justIdSystem.js +1 -0
- package/dist/justpremiumBidAdapter.js +1 -0
- package/dist/jwplayerRtdProvider.js +1 -0
- package/dist/kargoAnalyticsAdapter.js +1 -0
- package/dist/kargoBidAdapter.js +1 -0
- package/dist/kinessoIdSystem.js +1 -0
- package/dist/koblerBidAdapter.js +1 -0
- package/dist/konduitAnalyticsAdapter.js +1 -0
- package/dist/konduitWrapper.js +1 -0
- package/dist/krushmediaBidAdapter.js +1 -0
- package/dist/kubientBidAdapter.js +1 -0
- package/dist/limelightDigitalBidAdapter.js +1 -0
- package/dist/liveIntentIdSystem.js +1 -0
- package/dist/livewrappedAnalyticsAdapter.js +1 -0
- package/dist/livewrappedBidAdapter.js +1 -0
- package/dist/liveyieldAnalyticsAdapter.js +1 -0
- package/dist/lkqdBidAdapter.js +1 -0
- package/dist/lockerdomeBidAdapter.js +1 -0
- package/dist/loganBidAdapter.js +1 -0
- package/dist/logicadBidAdapter.js +1 -0
- package/dist/loglyliftBidAdapter.js +1 -0
- package/dist/lotamePanoramaIdSystem.js +1 -0
- package/dist/lunamediahbBidAdapter.js +1 -0
- package/dist/luponmediaBidAdapter.js +1 -0
- package/dist/madvertiseBidAdapter.js +1 -0
- package/dist/malltvAnalyticsAdapter.js +1 -0
- package/dist/malltvBidAdapter.js +1 -0
- package/dist/mantisBidAdapter.js +1 -0
- package/dist/marsmediaAnalyticsAdapter.js +1 -0
- package/dist/marsmediaBidAdapter.js +1 -0
- package/dist/mass.js +1 -0
- package/dist/mathildeadsBidAdapter.js +1 -0
- package/dist/mediaforceBidAdapter.js +1 -0
- package/dist/mediakeysBidAdapter.js +1 -0
- package/dist/medianetAnalyticsAdapter.js +1 -0
- package/dist/medianetBidAdapter.js +1 -0
- package/dist/medianetRtdProvider.js +1 -0
- package/dist/mediasquareBidAdapter.js +1 -0
- package/dist/merkleIdSystem.js +1 -0
- package/dist/mgidBidAdapter.js +1 -0
- package/dist/microadBidAdapter.js +1 -0
- package/dist/missenaBidAdapter.js +1 -0
- package/dist/multibid.js +1 -0
- package/dist/mwOpenLinkIdSystem.js +1 -0
- package/dist/my6senseBidAdapter.js +1 -0
- package/dist/mytargetBidAdapter.js +1 -0
- package/dist/nativoBidAdapter.js +1 -0
- package/dist/naveggIdSystem.js +1 -0
- package/dist/netIdSystem.js +1 -0
- package/dist/nextMillenniumBidAdapter.js +1 -0
- package/dist/nextrollBidAdapter.js +1 -0
- package/dist/nextrollIdSystem.js +1 -0
- package/dist/nexx360BidAdapter.js +1 -0
- package/dist/nobidBidAdapter.js +1 -0
- package/dist/not-for-prod/prebid.js +418 -0
- package/dist/novatiqIdSystem.js +1 -0
- package/dist/oguryBidAdapter.js +1 -0
- package/dist/oneVideoBidAdapter.js +1 -0
- package/dist/onetagBidAdapter.js +1 -0
- package/dist/onomagicBidAdapter.js +1 -0
- package/dist/ooloAnalyticsAdapter.js +1 -0
- package/dist/openwebBidAdapter.js +1 -0
- package/dist/openxAnalyticsAdapter.js +1 -0
- package/dist/openxBidAdapter.js +1 -0
- package/dist/operaadsBidAdapter.js +1 -0
- package/dist/optimeraRtdProvider.js +1 -0
- package/dist/optimonAnalyticsAdapter.js +1 -0
- package/dist/optoutBidAdapter.js +1 -0
- package/dist/orbidderBidAdapter.js +1 -0
- package/dist/otmBidAdapter.js +1 -0
- package/dist/outbrainBidAdapter.js +1 -0
- package/dist/ozoneBidAdapter.js +1 -0
- package/dist/padsquadBidAdapter.js +1 -0
- package/dist/parrableIdSystem.js +1 -0
- package/dist/permutiveRtdProvider.js +1 -0
- package/dist/pilotxBidAdapter.js +1 -0
- package/dist/pixfutureBidAdapter.js +1 -0
- package/dist/prebid-core.js +9 -0
- package/dist/prebidServerBidAdapter.js +1 -0
- package/dist/prebidmanagerAnalyticsAdapter.js +1 -0
- package/dist/priceFloors.js +1 -0
- package/dist/proxistoreBidAdapter.js +1 -0
- package/dist/pubCommonId.js +1 -0
- package/dist/pubProvidedIdSystem.js +1 -0
- package/dist/pubgeniusBidAdapter.js +1 -0
- package/dist/publinkIdSystem.js +1 -0
- package/dist/pubmaticAnalyticsAdapter.js +1 -0
- package/dist/pubmaticBidAdapter.js +1 -0
- package/dist/pubperfAnalyticsAdapter.js +1 -0
- package/dist/pubstackAnalyticsAdapter.js +1 -0
- package/dist/pubwiseAnalyticsAdapter.js +1 -0
- package/dist/pubwiseBidAdapter.js +1 -0
- package/dist/pubxBidAdapter.js +1 -0
- package/dist/pubxaiAnalyticsAdapter.js +1 -0
- package/dist/pulsepointAnalyticsAdapter.js +1 -0
- package/dist/pulsepointBidAdapter.js +1 -0
- package/dist/pxyzBidAdapter.js +1 -0
- package/dist/quantcastBidAdapter.js +1 -0
- package/dist/quantcastIdSystem.js +1 -0
- package/dist/qwarryBidAdapter.js +1 -0
- package/dist/radsBidAdapter.js +1 -0
- package/dist/rakutenBidAdapter.js +1 -0
- package/dist/readpeakBidAdapter.js +1 -0
- package/dist/realvuAnalyticsAdapter.js +1 -0
- package/dist/reconciliationRtdProvider.js +1 -0
- package/dist/relaidoBidAdapter.js +1 -0
- package/dist/relevantAnalyticsAdapter.js +1 -0
- package/dist/resetdigitalBidAdapter.js +1 -0
- package/dist/revcontentBidAdapter.js +1 -0
- package/dist/rhythmoneBidAdapter.js +1 -0
- package/dist/richaudienceBidAdapter.js +1 -0
- package/dist/riseBidAdapter.js +1 -0
- package/dist/rivrAnalyticsAdapter.js +1 -0
- package/dist/roxotAnalyticsAdapter.js +1 -0
- package/dist/rtbhouseBidAdapter.js +1 -0
- package/dist/rtbsapeBidAdapter.js +1 -0
- package/dist/rtdModule.js +1 -0
- package/dist/rubiconAnalyticsAdapter.js +1 -0
- package/dist/rubiconBidAdapter.js +1 -0
- package/dist/s2sTesting.js +1 -0
- package/dist/saambaaBidAdapter.js +1 -0
- package/dist/scaleableAnalyticsAdapter.js +1 -0
- package/dist/schain.js +1 -0
- package/dist/seedingAllianceBidAdapter.js +1 -0
- package/dist/seedtagBidAdapter.js +1 -0
- package/dist/sharedIdSystem.js +1 -0
- package/dist/sharethroughAnalyticsAdapter.js +1 -0
- package/dist/sharethroughBidAdapter.js +1 -0
- package/dist/showheroes-bsBidAdapter.js +1 -0
- package/dist/sigmoidAnalyticsAdapter.js +1 -0
- package/dist/sirdataRtdProvider.js +1 -0
- package/dist/sizeMappingV2.js +1 -0
- package/dist/slimcutBidAdapter.js +1 -0
- package/dist/smaatoBidAdapter.js +1 -0
- package/dist/smartadserverBidAdapter.js +1 -0
- package/dist/smarticoBidAdapter.js +1 -0
- package/dist/smartxBidAdapter.js +1 -0
- package/dist/smartyadsBidAdapter.js +1 -0
- package/dist/smilewantedBidAdapter.js +1 -0
- package/dist/sonobiAnalyticsAdapter.js +1 -0
- package/dist/sonobiBidAdapter.js +1 -0
- package/dist/sortableAnalyticsAdapter.js +1 -0
- package/dist/sortableBidAdapter.js +1 -0
- package/dist/sovrnAnalyticsAdapter.js +1 -0
- package/dist/sovrnBidAdapter.js +1 -0
- package/dist/spotxBidAdapter.js +1 -0
- package/dist/sspBCBidAdapter.js +1 -0
- package/dist/staqAnalyticsAdapter.js +1 -0
- package/dist/stroeerCoreBidAdapter.js +1 -0
- package/dist/sublimeBidAdapter.js +1 -0
- package/dist/synacormediaBidAdapter.js +1 -0
- package/dist/talkadsBidAdapter.js +1 -0
- package/dist/tapadIdSystem.js +1 -0
- package/dist/tappxBidAdapter.js +1 -0
- package/dist/targetVideoBidAdapter.js +1 -0
- package/dist/teadsBidAdapter.js +1 -0
- package/dist/telariaBidAdapter.js +1 -0
- package/dist/temedyaBidAdapter.js +1 -0
- package/dist/terceptAnalyticsAdapter.js +1 -0
- package/dist/theAdxBidAdapter.js +1 -0
- package/dist/timeoutRtdProvider.js +1 -0
- package/dist/tpmnBidAdapter.js +1 -0
- package/dist/trionBidAdapter.js +1 -0
- package/dist/tripleliftBidAdapter.js +1 -0
- package/dist/truereachBidAdapter.js +1 -0
- package/dist/trustpidSystem.js +1 -0
- package/dist/trustxBidAdapter.js +1 -0
- package/dist/ucfunnelAnalyticsAdapter.js +1 -0
- package/dist/ucfunnelBidAdapter.js +1 -0
- package/dist/uid2IdSystem.js +1 -0
- package/dist/underdogmediaBidAdapter.js +1 -0
- package/dist/undertoneBidAdapter.js +1 -0
- package/dist/unicornBidAdapter.js +1 -0
- package/dist/unifiedIdSystem.js +1 -0
- package/dist/unrulyBidAdapter.js +1 -0
- package/dist/userId.js +1 -0
- package/dist/userIdTargeting.js +1 -0
- package/dist/validationFpdModule.js +1 -0
- package/dist/vdoaiBidAdapter.js +1 -0
- package/dist/ventesBidAdapter.js +1 -0
- package/dist/verizonMediaIdSystem.js +1 -0
- package/dist/vibrantmediaBidAdapter.js +1 -0
- package/dist/vidazooBidAdapter.js +1 -0
- package/dist/videobyteBidAdapter.js +1 -0
- package/dist/videoreachBidAdapter.js +1 -0
- package/dist/vidoomyBidAdapter.js +1 -0
- package/dist/viewability.js +1 -0
- package/dist/viewdeosDXBidAdapter.js +1 -0
- package/dist/visxBidAdapter.js +1 -0
- package/dist/vlybyBidAdapter.js +1 -0
- package/dist/voxBidAdapter.js +1 -0
- package/dist/vrtcalBidAdapter.js +1 -0
- package/dist/vuukleBidAdapter.js +1 -0
- package/dist/waardexBidAdapter.js +1 -0
- package/dist/weboramaRtdProvider.js +1 -0
- package/dist/welectBidAdapter.js +1 -0
- package/dist/widespaceBidAdapter.js +1 -0
- package/dist/winrBidAdapter.js +1 -0
- package/dist/wipesBidAdapter.js +1 -0
- package/dist/yahoosspBidAdapter.js +1 -0
- package/dist/yieldlabBidAdapter.js +1 -0
- package/dist/yieldliftBidAdapter.js +1 -0
- package/dist/yieldmoBidAdapter.js +1 -0
- package/dist/yieldmoSyntheticInventoryModule.js +1 -0
- package/dist/yieldoneAnalyticsAdapter.js +1 -0
- package/dist/yieldoneBidAdapter.js +1 -0
- package/dist/yuktamediaAnalyticsAdapter.js +1 -0
- package/dist/zeotapIdPlusIdSystem.js +1 -0
- package/dist/zetaBidAdapter.js +1 -0
- package/dist/zeta_global_sspAnalyticsAdapter.js +1 -0
- package/dist/zeta_global_sspBidAdapter.js +1 -0
- package/integrationExamples/gpt/{haloRtdProvider_example.html → hadronRtdProvider_example.html} +9 -9
- package/integrationExamples/gpt/idImportLibrary_example.html +2 -2
- package/integrationExamples/gpt/userId_example.html +2 -2
- package/integrationExamples/gpt/weboramaRtdProvider_example.html +154 -115
- package/integrationExamples/gpt/x-domain/creative.html +13 -6
- package/modules/.submodules.json +4 -0
- package/modules/adkernelBidAdapter.js +2 -1
- package/modules/adnuntiusRtdProvider.js +96 -0
- package/modules/adnuntiusRtdProvider.md +41 -0
- package/modules/adotBidAdapter.js +516 -567
- package/modules/adotBidAdapter.md +6 -44
- package/modules/adpod.js +12 -14
- package/modules/adyoulikeBidAdapter.js +3 -1
- package/modules/appnexusBidAdapter.js +3 -2
- package/modules/asealBidAdapter.js +58 -0
- package/modules/asealBidAdapter.md +52 -0
- package/modules/automatadBidAdapter.js +10 -7
- package/modules/big-richmediaBidAdapter.js +117 -0
- package/modules/big-richmediaBidAdapter.md +82 -0
- package/modules/bizzclickBidAdapter.js +5 -3
- package/modules/conversantBidAdapter.js +7 -0
- package/modules/currency.js +1 -4
- package/modules/debugging/bidInterceptor.js +229 -0
- package/modules/debugging/index.js +62 -0
- package/modules/debugging/pbsInterceptor.js +38 -0
- package/modules/dspxBidAdapter.js +69 -29
- package/modules/dspxBidAdapter.md +2 -1
- package/modules/fluctBidAdapter.js +18 -1
- package/modules/googleAnalyticsAdapter.js +22 -4
- package/modules/googleAnalyticsAdapter.md +1 -0
- package/modules/gridBidAdapter.js +26 -7
- package/modules/hadronIdSystem.js +96 -0
- package/modules/hadronIdSystem.md +35 -0
- package/modules/hadronRtdProvider.js +254 -0
- package/modules/hadronRtdProvider.md +126 -0
- package/modules/haloIdSystem.md +4 -35
- package/modules/haloRtdProvider.md +3 -126
- package/modules/imRtdProvider.js +10 -0
- package/modules/improvedigitalBidAdapter.js +5 -0
- package/modules/iqzoneBidAdapter.js +10 -3
- package/modules/iqzoneBidAdapter.md +16 -0
- package/modules/ixBidAdapter.js +35 -21
- package/modules/justIdSystem.js +206 -0
- package/modules/justIdSystem.md +70 -0
- package/modules/kubientBidAdapter.js +60 -28
- package/modules/lkqdBidAdapter.js +234 -0
- package/modules/lkqdBidAdapter.md +1 -1
- package/modules/lunamediahbBidAdapter.js +32 -4
- package/modules/malltvBidAdapter.js +7 -3
- package/modules/malltvBidAdapter.md +64 -51
- package/modules/mass.js +3 -5
- package/modules/mediakeysBidAdapter.js +0 -5
- package/modules/medianetAnalyticsAdapter.js +1 -1
- package/modules/mediasquareBidAdapter.js +9 -1
- package/modules/nextMillenniumBidAdapter.js +1 -0
- package/modules/nexx360BidAdapter.js +149 -0
- package/modules/nexx360BidAdapter.md +35 -0
- package/modules/novatiqIdSystem.js +68 -15
- package/modules/novatiqIdSystem.md +69 -7
- package/modules/oguryBidAdapter.js +7 -14
- package/modules/prebidServerBidAdapter/index.js +128 -90
- package/modules/priceFloors.js +20 -12
- package/modules/pubmaticBidAdapter.js +1 -1
- package/modules/richaudienceBidAdapter.js +15 -3
- package/modules/riseBidAdapter.js +17 -6
- package/modules/rtbhouseBidAdapter.js +2 -0
- package/modules/rubiconAnalyticsAdapter.js +5 -0
- package/modules/rubiconBidAdapter.js +2 -2
- package/modules/sizeMappingV2.js +1 -8
- package/modules/sortableAnalyticsAdapter.js +5 -4
- package/modules/sspBCBidAdapter.js +53 -20
- package/modules/telariaBidAdapter.js +22 -29
- package/modules/trustpidSystem.js +197 -0
- package/modules/trustpidSystem.md +45 -0
- package/modules/trustxBidAdapter.js +11 -6
- package/modules/userId/eids.js +22 -1
- package/modules/userId/eids.md +18 -2
- package/modules/userId/userId.md +17 -2
- package/modules/vibrantmediaBidAdapter.js +220 -0
- package/modules/vibrantmediaBidAdapter.md +92 -0
- package/modules/vidazooBidAdapter.js +3 -2
- package/modules/vidoomyBidAdapter.js +8 -0
- package/modules/vidoomyBidAdapter.md +4 -2
- package/modules/weboramaRtdProvider.js +264 -34
- package/modules/weboramaRtdProvider.md +110 -40
- package/modules/yahoosspBidAdapter.js +1 -1
- package/modules/yieldoneBidAdapter.js +6 -0
- package/package.json +2 -1
- package/plugins/eslint/node_modules/ansi-regex/index.js +4 -0
- package/plugins/eslint/node_modules/ansi-regex/license +21 -0
- package/plugins/eslint/node_modules/ansi-regex/package.json +56 -0
- package/plugins/eslint/node_modules/ansi-regex/readme.md +33 -0
- package/plugins/eslint/node_modules/ansi-styles/index.js +65 -0
- package/plugins/eslint/node_modules/ansi-styles/license +21 -0
- package/plugins/eslint/node_modules/ansi-styles/package.json +50 -0
- package/plugins/eslint/node_modules/ansi-styles/readme.md +86 -0
- package/plugins/eslint/node_modules/argparse/CHANGELOG.md +185 -0
- package/plugins/eslint/node_modules/argparse/LICENSE +21 -0
- package/plugins/eslint/node_modules/argparse/README.md +257 -0
- package/plugins/eslint/node_modules/argparse/index.js +3 -0
- package/plugins/eslint/node_modules/argparse/lib/action/append/constant.js +47 -0
- package/plugins/eslint/node_modules/argparse/lib/action/append.js +53 -0
- package/plugins/eslint/node_modules/argparse/lib/action/count.js +40 -0
- package/plugins/eslint/node_modules/argparse/lib/action/help.js +47 -0
- package/plugins/eslint/node_modules/argparse/lib/action/store/constant.js +43 -0
- package/plugins/eslint/node_modules/argparse/lib/action/store/false.js +27 -0
- package/plugins/eslint/node_modules/argparse/lib/action/store/true.js +26 -0
- package/plugins/eslint/node_modules/argparse/lib/action/store.js +50 -0
- package/plugins/eslint/node_modules/argparse/lib/action/subparsers.js +149 -0
- package/plugins/eslint/node_modules/argparse/lib/action/version.js +47 -0
- package/plugins/eslint/node_modules/argparse/lib/action.js +146 -0
- package/plugins/eslint/node_modules/argparse/lib/action_container.js +482 -0
- package/plugins/eslint/node_modules/argparse/lib/argparse.js +14 -0
- package/plugins/eslint/node_modules/argparse/lib/argument/error.js +50 -0
- package/plugins/eslint/node_modules/argparse/lib/argument/exclusive.js +54 -0
- package/plugins/eslint/node_modules/argparse/lib/argument/group.js +75 -0
- package/plugins/eslint/node_modules/argparse/lib/argument_parser.js +1161 -0
- package/plugins/eslint/node_modules/argparse/lib/const.js +21 -0
- package/plugins/eslint/node_modules/argparse/lib/help/added_formatters.js +87 -0
- package/plugins/eslint/node_modules/argparse/lib/help/formatter.js +795 -0
- package/plugins/eslint/node_modules/argparse/lib/namespace.js +76 -0
- package/plugins/eslint/node_modules/argparse/lib/utils.js +57 -0
- package/plugins/eslint/node_modules/argparse/package.json +34 -0
- package/plugins/eslint/node_modules/asn1/LICENSE +19 -0
- package/plugins/eslint/node_modules/asn1/README.md +50 -0
- package/plugins/eslint/node_modules/asn1/lib/ber/errors.js +13 -0
- package/plugins/eslint/node_modules/asn1/lib/ber/index.js +27 -0
- package/plugins/eslint/node_modules/asn1/lib/ber/reader.js +267 -0
- package/plugins/eslint/node_modules/asn1/lib/ber/types.js +36 -0
- package/plugins/eslint/node_modules/asn1/lib/ber/writer.js +317 -0
- package/plugins/eslint/node_modules/asn1/lib/index.js +20 -0
- package/plugins/eslint/node_modules/asn1/package.json +26 -0
- package/plugins/eslint/node_modules/asn1/tst/ber/reader.test.js +172 -0
- package/plugins/eslint/node_modules/asn1/tst/ber/writer.test.js +296 -0
- package/plugins/eslint/node_modules/assert-plus/README.md +126 -0
- package/plugins/eslint/node_modules/assert-plus/assert.js +245 -0
- package/plugins/eslint/node_modules/assert-plus/package.json +16 -0
- package/plugins/eslint/node_modules/assertion-error/History.md +14 -0
- package/plugins/eslint/node_modules/assertion-error/README.md +41 -0
- package/plugins/eslint/node_modules/assertion-error/index.js +110 -0
- package/plugins/eslint/node_modules/assertion-error/package.json +27 -0
- package/plugins/eslint/node_modules/async/CHANGELOG.md +125 -0
- package/plugins/eslint/node_modules/async/LICENSE +19 -0
- package/plugins/eslint/node_modules/async/README.md +1877 -0
- package/plugins/eslint/node_modules/async/dist/async.js +1265 -0
- package/plugins/eslint/node_modules/async/dist/async.min.js +2 -0
- package/plugins/eslint/node_modules/async/lib/async.js +1265 -0
- package/plugins/eslint/node_modules/async/package.json +85 -0
- package/plugins/eslint/node_modules/aws-sign2/LICENSE +55 -0
- package/plugins/eslint/node_modules/aws-sign2/README.md +4 -0
- package/plugins/eslint/node_modules/aws-sign2/index.js +202 -0
- package/plugins/eslint/node_modules/aws-sign2/package.json +16 -0
- package/plugins/eslint/node_modules/camelcase/index.js +56 -0
- package/plugins/eslint/node_modules/camelcase/license +21 -0
- package/plugins/eslint/node_modules/camelcase/package.json +39 -0
- package/plugins/eslint/node_modules/camelcase/readme.md +57 -0
- package/plugins/eslint/node_modules/camelcase-keys/index.js +12 -0
- package/plugins/eslint/node_modules/camelcase-keys/license +21 -0
- package/plugins/eslint/node_modules/camelcase-keys/package.json +52 -0
- package/plugins/eslint/node_modules/camelcase-keys/readme.md +54 -0
- package/plugins/eslint/node_modules/chai/CONTRIBUTING.md +173 -0
- package/plugins/eslint/node_modules/chai/History.md +937 -0
- package/plugins/eslint/node_modules/chai/README.md +109 -0
- package/plugins/eslint/node_modules/chai/ReleaseNotes.md +587 -0
- package/plugins/eslint/node_modules/chai/bower.json +27 -0
- package/plugins/eslint/node_modules/chai/chai.js +4800 -0
- package/plugins/eslint/node_modules/chai/index.js +1 -0
- package/plugins/eslint/node_modules/chai/karma.conf.js +28 -0
- package/plugins/eslint/node_modules/chai/karma.sauce.js +41 -0
- package/plugins/eslint/node_modules/chai/lib/chai/assertion.js +135 -0
- package/plugins/eslint/node_modules/chai/lib/chai/config.js +50 -0
- package/plugins/eslint/node_modules/chai/lib/chai/core/assertions.js +1359 -0
- package/plugins/eslint/node_modules/chai/lib/chai/interface/assert.js +1056 -0
- package/plugins/eslint/node_modules/chai/lib/chai/interface/expect.js +12 -0
- package/plugins/eslint/node_modules/chai/lib/chai/interface/should.js +78 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/addChainableMethod.js +111 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/addMethod.js +43 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/addProperty.js +40 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/flag.js +32 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/getActual.js +18 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/getEnumerableProperties.js +25 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/getMessage.js +50 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/getName.js +20 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/getPathValue.js +102 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/getProperties.js +35 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/index.js +114 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/inspect.js +333 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/objDisplay.js +49 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js +53 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/overwriteMethod.js +51 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/overwriteProperty.js +54 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/test.js +26 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/transferFlags.js +44 -0
- package/plugins/eslint/node_modules/chai/lib/chai/utils/type.js +45 -0
- package/plugins/eslint/node_modules/chai/lib/chai.js +87 -0
- package/plugins/eslint/node_modules/chai/package.json +42 -0
- package/plugins/eslint/node_modules/chai/sauce.browsers.js +128 -0
- package/plugins/eslint/node_modules/chalk/index.js +116 -0
- package/plugins/eslint/node_modules/chalk/license +21 -0
- package/plugins/eslint/node_modules/chalk/package.json +70 -0
- package/plugins/eslint/node_modules/chalk/readme.md +213 -0
- package/plugins/eslint/node_modules/cli-width/.travis.yml +11 -0
- package/plugins/eslint/node_modules/cli-width/LICENSE +13 -0
- package/plugins/eslint/node_modules/cli-width/README.md +36 -0
- package/plugins/eslint/node_modules/cli-width/coverage/coverage.json +1 -0
- package/plugins/eslint/node_modules/cli-width/coverage/lcov-report/base.css +182 -0
- package/plugins/eslint/node_modules/cli-width/coverage/lcov-report/cli-width/index.html +73 -0
- package/plugins/eslint/node_modules/cli-width/coverage/lcov-report/cli-width/index.js.html +129 -0
- package/plugins/eslint/node_modules/cli-width/coverage/lcov-report/index.html +73 -0
- package/plugins/eslint/node_modules/cli-width/coverage/lcov-report/prettify.css +1 -0
- package/plugins/eslint/node_modules/cli-width/coverage/lcov-report/prettify.js +1 -0
- package/plugins/eslint/node_modules/cli-width/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/plugins/eslint/node_modules/cli-width/coverage/lcov-report/sorter.js +156 -0
- package/plugins/eslint/node_modules/cli-width/coverage/lcov.info +32 -0
- package/plugins/eslint/node_modules/cli-width/index.js +28 -0
- package/plugins/eslint/node_modules/cli-width/package.json +29 -0
- package/plugins/eslint/node_modules/combined-stream/License +19 -0
- package/plugins/eslint/node_modules/combined-stream/Readme.md +132 -0
- package/plugins/eslint/node_modules/combined-stream/lib/combined_stream.js +188 -0
- package/plugins/eslint/node_modules/combined-stream/package.json +24 -0
- package/plugins/eslint/node_modules/commander/Readme.md +208 -0
- package/plugins/eslint/node_modules/commander/index.js +876 -0
- package/plugins/eslint/node_modules/commander/package.json +13 -0
- package/plugins/eslint/node_modules/coveralls/.travis.yml +6 -0
- package/plugins/eslint/node_modules/coveralls/Makefile +20 -0
- package/plugins/eslint/node_modules/coveralls/README.md +129 -0
- package/plugins/eslint/node_modules/coveralls/fixtures/istanbul.lcov +131 -0
- package/plugins/eslint/node_modules/coveralls/fixtures/lib/index.js +172 -0
- package/plugins/eslint/node_modules/coveralls/fixtures/onefile.lcov +116 -0
- package/plugins/eslint/node_modules/coveralls/index.js +7 -0
- package/plugins/eslint/node_modules/coveralls/lib/convertLcovToCoveralls.js +111 -0
- package/plugins/eslint/node_modules/coveralls/lib/detectLocalGit.js +27 -0
- package/plugins/eslint/node_modules/coveralls/lib/fetchGitData.js +108 -0
- package/plugins/eslint/node_modules/coveralls/lib/getOptions.js +125 -0
- package/plugins/eslint/node_modules/coveralls/lib/handleInput.js +39 -0
- package/plugins/eslint/node_modules/coveralls/lib/logger.js +18 -0
- package/plugins/eslint/node_modules/coveralls/lib/sendToCoveralls.js +11 -0
- package/plugins/eslint/node_modules/coveralls/package.json +56 -0
- package/plugins/eslint/node_modules/coveralls/test/convertLcovToCoveralls.js +82 -0
- package/plugins/eslint/node_modules/coveralls/test/fetchGitData.js +182 -0
- package/plugins/eslint/node_modules/coveralls/test/getOptions.js +403 -0
- package/plugins/eslint/node_modules/coveralls/test/handleInput.js +78 -0
- package/plugins/eslint/node_modules/coveralls/test/logger.js +32 -0
- package/plugins/eslint/node_modules/coveralls/test/sendToCoveralls.js +27 -0
- package/plugins/eslint/node_modules/dateformat/.travis.yml +4 -0
- package/plugins/eslint/node_modules/dateformat/LICENSE +20 -0
- package/plugins/eslint/node_modules/dateformat/Readme.md +82 -0
- package/plugins/eslint/node_modules/dateformat/lib/dateformat.js +226 -0
- package/plugins/eslint/node_modules/dateformat/package.json +36 -0
- package/plugins/eslint/node_modules/dateformat/test/test_dayofweek.js +15 -0
- package/plugins/eslint/node_modules/dateformat/test/test_formats.js +76 -0
- package/plugins/eslint/node_modules/dateformat/test/test_isoutcdatetime.js +11 -0
- package/plugins/eslint/node_modules/dateformat/test/weekofyear/test_weekofyear.js +4 -0
- package/plugins/eslint/node_modules/dateformat/test/weekofyear/test_weekofyear.sh +27 -0
- package/plugins/eslint/node_modules/debug/.jshintrc +3 -0
- package/plugins/eslint/node_modules/debug/History.md +195 -0
- package/plugins/eslint/node_modules/debug/Makefile +36 -0
- package/plugins/eslint/node_modules/debug/Readme.md +188 -0
- package/plugins/eslint/node_modules/debug/bower.json +28 -0
- package/plugins/eslint/node_modules/debug/browser.js +168 -0
- package/plugins/eslint/node_modules/debug/component.json +19 -0
- package/plugins/eslint/node_modules/debug/debug.js +197 -0
- package/plugins/eslint/node_modules/debug/node.js +209 -0
- package/plugins/eslint/node_modules/debug/package.json +34 -0
- package/plugins/eslint/node_modules/decamelize/index.js +13 -0
- package/plugins/eslint/node_modules/decamelize/license +21 -0
- package/plugins/eslint/node_modules/decamelize/package.json +38 -0
- package/plugins/eslint/node_modules/decamelize/readme.md +48 -0
- package/plugins/eslint/node_modules/deep-eql/History.md +28 -0
- package/plugins/eslint/node_modules/deep-eql/README.md +52 -0
- package/plugins/eslint/node_modules/deep-eql/index.js +1 -0
- package/plugins/eslint/node_modules/deep-eql/karma.conf.js +20 -0
- package/plugins/eslint/node_modules/deep-eql/lib/eql.js +257 -0
- package/plugins/eslint/node_modules/deep-eql/package.json +37 -0
- package/plugins/eslint/node_modules/delayed-stream/License +19 -0
- package/plugins/eslint/node_modules/delayed-stream/Makefile +7 -0
- package/plugins/eslint/node_modules/delayed-stream/Readme.md +154 -0
- package/plugins/eslint/node_modules/delayed-stream/lib/delayed_stream.js +99 -0
- package/plugins/eslint/node_modules/delayed-stream/package.json +20 -0
- package/plugins/eslint/node_modules/delayed-stream/test/common.js +6 -0
- package/plugins/eslint/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js +38 -0
- package/plugins/eslint/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js +21 -0
- package/plugins/eslint/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js +14 -0
- package/plugins/eslint/node_modules/delayed-stream/test/integration/test-delayed-stream.js +48 -0
- package/plugins/eslint/node_modules/delayed-stream/test/integration/test-handle-source-errors.js +15 -0
- package/plugins/eslint/node_modules/delayed-stream/test/integration/test-max-data-size.js +18 -0
- package/plugins/eslint/node_modules/delayed-stream/test/integration/test-pipe-resumes.js +13 -0
- package/plugins/eslint/node_modules/delayed-stream/test/integration/test-proxy-readable.js +13 -0
- package/plugins/eslint/node_modules/delayed-stream/test/run.js +7 -0
- package/plugins/eslint/node_modules/diff/README.md +181 -0
- package/plugins/eslint/node_modules/diff/diff.js +619 -0
- package/plugins/eslint/node_modules/diff/package.json +44 -0
- package/plugins/eslint/node_modules/doctrine/.jshintrc +28 -0
- package/plugins/eslint/node_modules/doctrine/.scripted +6 -0
- package/plugins/eslint/node_modules/doctrine/.travis.yml +7 -0
- package/plugins/eslint/node_modules/doctrine/CONTRIBUTING.md +5 -0
- package/plugins/eslint/node_modules/doctrine/LICENSE.BSD +19 -0
- package/plugins/eslint/node_modules/doctrine/LICENSE.closure-compiler +202 -0
- package/plugins/eslint/node_modules/doctrine/LICENSE.esprima +19 -0
- package/plugins/eslint/node_modules/doctrine/README.md +176 -0
- package/plugins/eslint/node_modules/doctrine/coverage/coverage-final.json +2 -0
- package/plugins/eslint/node_modules/doctrine/coverage/lcov-report/base.css +182 -0
- package/plugins/eslint/node_modules/doctrine/coverage/lcov-report/index.html +72 -0
- package/plugins/eslint/node_modules/doctrine/coverage/lcov-report/prettify.css +1 -0
- package/plugins/eslint/node_modules/doctrine/coverage/lcov-report/prettify.js +1 -0
- package/plugins/eslint/node_modules/doctrine/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/plugins/eslint/node_modules/doctrine/coverage/lcov-report/sorter.js +156 -0
- package/plugins/eslint/node_modules/doctrine/coverage/lcov.info +0 -0
- package/plugins/eslint/node_modules/doctrine/eslint.json +22 -0
- package/plugins/eslint/node_modules/doctrine/gulpfile.js +120 -0
- package/plugins/eslint/node_modules/doctrine/lib/doctrine.js +809 -0
- package/plugins/eslint/node_modules/doctrine/lib/typed.js +1261 -0
- package/plugins/eslint/node_modules/doctrine/lib/utility.js +54 -0
- package/plugins/eslint/node_modules/doctrine/package.json +54 -0
- package/plugins/eslint/node_modules/doctrine/test/midstream.js +61 -0
- package/plugins/eslint/node_modules/doctrine/test/parse.js +2219 -0
- package/plugins/eslint/node_modules/doctrine/test/strict.js +168 -0
- package/plugins/eslint/node_modules/doctrine/test/stringify.js +413 -0
- package/plugins/eslint/node_modules/doctrine/test/test.html +31 -0
- package/plugins/eslint/node_modules/doctrine/test/unwrap.js +60 -0
- package/plugins/eslint/node_modules/escodegen/LICENSE.BSD +19 -0
- package/plugins/eslint/node_modules/escodegen/LICENSE.source-map +27 -0
- package/plugins/eslint/node_modules/escodegen/README.md +116 -0
- package/plugins/eslint/node_modules/escodegen/escodegen.js +2578 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/esprima/ChangeLog +77 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/esprima/LICENSE.BSD +19 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/esprima/README.md +24 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/esprima/esprima.js +3772 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/esprima/package.json +83 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/esprima/test/compat.js +241 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/esprima/test/reflect.js +422 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/esprima/test/run.js +67 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/esprima/test/runner.js +495 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/esprima/test/test.js +25593 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/estraverse/.editorconfig +10 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/estraverse/.jshintrc +16 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/estraverse/LICENSE.BSD +19 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/estraverse/README.md +124 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/estraverse/estraverse.js +845 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/estraverse/gulpfile.js +70 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/estraverse/package.json +43 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/esutils/LICENSE.BSD +19 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/esutils/README.md +174 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/esutils/lib/ast.js +144 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/esutils/lib/code.js +135 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/esutils/lib/keyword.js +165 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/esutils/lib/utils.js +33 -0
- package/plugins/eslint/node_modules/escodegen/node_modules/esutils/package.json +44 -0
- package/plugins/eslint/node_modules/escodegen/package.json +62 -0
- package/plugins/eslint/node_modules/espree/README.md +232 -0
- package/plugins/eslint/node_modules/espree/espree.js +5533 -0
- package/plugins/eslint/node_modules/espree/lib/ast-node-factory.js +964 -0
- package/plugins/eslint/node_modules/espree/lib/ast-node-types.js +119 -0
- package/plugins/eslint/node_modules/espree/lib/comment-attachment.js +183 -0
- package/plugins/eslint/node_modules/espree/lib/features.js +117 -0
- package/plugins/eslint/node_modules/espree/lib/messages.js +99 -0
- package/plugins/eslint/node_modules/espree/lib/string-map.js +55 -0
- package/plugins/eslint/node_modules/espree/lib/syntax.js +189 -0
- package/plugins/eslint/node_modules/espree/lib/token-info.js +90 -0
- package/plugins/eslint/node_modules/espree/lib/xhtml-entities.js +293 -0
- package/plugins/eslint/node_modules/espree/package.json +83 -0
- package/plugins/eslint/node_modules/espree/test/compat.js +255 -0
- package/plugins/eslint/node_modules/espree/test/reflect.js +422 -0
- package/plugins/eslint/node_modules/espree/test/run.js +68 -0
- package/plugins/eslint/node_modules/espree/test/runner.js +492 -0
- package/plugins/eslint/node_modules/espree/test/test.js +34 -0
- package/plugins/eslint/node_modules/esprima/ChangeLog +174 -0
- package/plugins/eslint/node_modules/esprima/LICENSE.BSD +21 -0
- package/plugins/eslint/node_modules/esprima/README.md +27 -0
- package/plugins/eslint/node_modules/esprima/esprima.js +5740 -0
- package/plugins/eslint/node_modules/esprima/package.json +99 -0
- package/plugins/eslint/node_modules/esutils/LICENSE.BSD +19 -0
- package/plugins/eslint/node_modules/esutils/README.md +169 -0
- package/plugins/eslint/node_modules/esutils/lib/ast.js +144 -0
- package/plugins/eslint/node_modules/esutils/lib/code.js +101 -0
- package/plugins/eslint/node_modules/esutils/lib/keyword.js +137 -0
- package/plugins/eslint/node_modules/esutils/lib/utils.js +33 -0
- package/plugins/eslint/node_modules/esutils/package.json +49 -0
- package/plugins/eslint/node_modules/fast-levenshtein/LICENSE.md +25 -0
- package/plugins/eslint/node_modules/fast-levenshtein/README.md +120 -0
- package/plugins/eslint/node_modules/fast-levenshtein/levenshtein.js +198 -0
- package/plugins/eslint/node_modules/fast-levenshtein/package.json +36 -0
- package/plugins/eslint/node_modules/figures/index.js +147 -0
- package/plugins/eslint/node_modules/figures/license +21 -0
- package/plugins/eslint/node_modules/figures/node_modules/object-assign/index.js +90 -0
- package/plugins/eslint/node_modules/figures/node_modules/object-assign/license +21 -0
- package/plugins/eslint/node_modules/figures/node_modules/object-assign/package.json +42 -0
- package/plugins/eslint/node_modules/figures/node_modules/object-assign/readme.md +61 -0
- package/plugins/eslint/node_modules/figures/package.json +45 -0
- package/plugins/eslint/node_modules/figures/readme.md +115 -0
- package/plugins/eslint/node_modules/forever-agent/LICENSE +55 -0
- package/plugins/eslint/node_modules/forever-agent/README.md +4 -0
- package/plugins/eslint/node_modules/forever-agent/index.js +119 -0
- package/plugins/eslint/node_modules/forever-agent/package.json +16 -0
- package/plugins/eslint/node_modules/form-data/License +19 -0
- package/plugins/eslint/node_modules/form-data/Readme.md +175 -0
- package/plugins/eslint/node_modules/form-data/lib/form_data.js +351 -0
- package/plugins/eslint/node_modules/form-data/node_modules/async/.travis.yml +5 -0
- package/plugins/eslint/node_modules/form-data/node_modules/async/LICENSE +19 -0
- package/plugins/eslint/node_modules/form-data/node_modules/async/README.md +1647 -0
- package/plugins/eslint/node_modules/form-data/node_modules/async/bower.json +38 -0
- package/plugins/eslint/node_modules/form-data/node_modules/async/component.json +16 -0
- package/plugins/eslint/node_modules/form-data/node_modules/async/lib/async.js +1123 -0
- package/plugins/eslint/node_modules/form-data/node_modules/async/package.json +54 -0
- package/plugins/eslint/node_modules/form-data/node_modules/async/support/sync-package-managers.js +53 -0
- package/plugins/eslint/node_modules/form-data/package.json +34 -0
- package/plugins/eslint/node_modules/glob/.travis.yml +3 -0
- package/plugins/eslint/node_modules/glob/LICENSE +27 -0
- package/plugins/eslint/node_modules/glob/README.md +250 -0
- package/plugins/eslint/node_modules/glob/examples/g.js +9 -0
- package/plugins/eslint/node_modules/glob/examples/usr-local.js +9 -0
- package/plugins/eslint/node_modules/glob/glob.js +728 -0
- package/plugins/eslint/node_modules/glob/node_modules/minimatch/LICENSE +23 -0
- package/plugins/eslint/node_modules/glob/node_modules/minimatch/README.md +218 -0
- package/plugins/eslint/node_modules/glob/node_modules/minimatch/minimatch.js +1061 -0
- package/plugins/eslint/node_modules/glob/node_modules/minimatch/package.json +28 -0
- package/plugins/eslint/node_modules/glob/node_modules/minimatch/test/basic.js +399 -0
- package/plugins/eslint/node_modules/glob/node_modules/minimatch/test/brace-expand.js +33 -0
- package/plugins/eslint/node_modules/glob/node_modules/minimatch/test/caching.js +14 -0
- package/plugins/eslint/node_modules/glob/node_modules/minimatch/test/defaults.js +274 -0
- package/plugins/eslint/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
- package/plugins/eslint/node_modules/glob/package.json +28 -0
- package/plugins/eslint/node_modules/glob/test/00-setup.js +176 -0
- package/plugins/eslint/node_modules/glob/test/bash-comparison.js +63 -0
- package/plugins/eslint/node_modules/glob/test/bash-results.json +351 -0
- package/plugins/eslint/node_modules/glob/test/cwd-test.js +55 -0
- package/plugins/eslint/node_modules/glob/test/globstar-match.js +19 -0
- package/plugins/eslint/node_modules/glob/test/mark.js +118 -0
- package/plugins/eslint/node_modules/glob/test/new-glob-optional-options.js +10 -0
- package/plugins/eslint/node_modules/glob/test/nocase-nomagic.js +113 -0
- package/plugins/eslint/node_modules/glob/test/pause-resume.js +73 -0
- package/plugins/eslint/node_modules/glob/test/readme-issue.js +36 -0
- package/plugins/eslint/node_modules/glob/test/root-nomount.js +39 -0
- package/plugins/eslint/node_modules/glob/test/root.js +46 -0
- package/plugins/eslint/node_modules/glob/test/stat.js +32 -0
- package/plugins/eslint/node_modules/glob/test/zz-cleanup.js +11 -0
- package/plugins/eslint/node_modules/globals/globals.json +1245 -0
- package/plugins/eslint/node_modules/globals/index.js +1 -0
- package/plugins/eslint/node_modules/globals/license +21 -0
- package/plugins/eslint/node_modules/globals/package.json +35 -0
- package/plugins/eslint/node_modules/globals/readme.md +39 -0
- package/plugins/eslint/node_modules/growl/History.md +63 -0
- package/plugins/eslint/node_modules/growl/Readme.md +108 -0
- package/plugins/eslint/node_modules/growl/lib/growl.js +290 -0
- package/plugins/eslint/node_modules/growl/package.json +15 -0
- package/plugins/eslint/node_modules/growl/test.js +31 -0
- package/plugins/eslint/node_modules/has-flag/index.js +10 -0
- package/plugins/eslint/node_modules/has-flag/license +21 -0
- package/plugins/eslint/node_modules/has-flag/package.json +48 -0
- package/plugins/eslint/node_modules/has-flag/readme.md +64 -0
- package/plugins/eslint/node_modules/http-signature/.dir-locals.el +6 -0
- package/plugins/eslint/node_modules/http-signature/LICENSE +18 -0
- package/plugins/eslint/node_modules/http-signature/README.md +79 -0
- package/plugins/eslint/node_modules/http-signature/http_signing.md +296 -0
- package/plugins/eslint/node_modules/http-signature/lib/index.js +26 -0
- package/plugins/eslint/node_modules/http-signature/lib/parser.js +304 -0
- package/plugins/eslint/node_modules/http-signature/lib/signer.js +178 -0
- package/plugins/eslint/node_modules/http-signature/lib/util.js +304 -0
- package/plugins/eslint/node_modules/http-signature/lib/verify.js +42 -0
- package/plugins/eslint/node_modules/http-signature/package.json +37 -0
- package/plugins/eslint/node_modules/indent-string/index.js +20 -0
- package/plugins/eslint/node_modules/indent-string/license +21 -0
- package/plugins/eslint/node_modules/indent-string/package.json +36 -0
- package/plugins/eslint/node_modules/indent-string/readme.md +58 -0
- package/plugins/eslint/node_modules/inquirer/README.md +295 -0
- package/plugins/eslint/node_modules/inquirer/lib/inquirer.js +79 -0
- package/plugins/eslint/node_modules/inquirer/lib/objects/choice.js +44 -0
- package/plugins/eslint/node_modules/inquirer/lib/objects/choices.js +180 -0
- package/plugins/eslint/node_modules/inquirer/lib/objects/separator.js +47 -0
- package/plugins/eslint/node_modules/inquirer/lib/prompts/base.js +231 -0
- package/plugins/eslint/node_modules/inquirer/lib/prompts/checkbox.js +258 -0
- package/plugins/eslint/node_modules/inquirer/lib/prompts/confirm.js +105 -0
- package/plugins/eslint/node_modules/inquirer/lib/prompts/expand.js +258 -0
- package/plugins/eslint/node_modules/inquirer/lib/prompts/input.js +106 -0
- package/plugins/eslint/node_modules/inquirer/lib/prompts/list.js +194 -0
- package/plugins/eslint/node_modules/inquirer/lib/prompts/password.js +153 -0
- package/plugins/eslint/node_modules/inquirer/lib/prompts/rawlist.js +191 -0
- package/plugins/eslint/node_modules/inquirer/lib/ui/baseUI.js +83 -0
- package/plugins/eslint/node_modules/inquirer/lib/ui/bottom-bar.js +77 -0
- package/plugins/eslint/node_modules/inquirer/lib/ui/prompt.js +136 -0
- package/plugins/eslint/node_modules/inquirer/lib/utils/events.js +32 -0
- package/plugins/eslint/node_modules/inquirer/lib/utils/tty.js +130 -0
- package/plugins/eslint/node_modules/inquirer/lib/utils/utils.js +123 -0
- package/plugins/eslint/node_modules/inquirer/package.json +44 -0
- package/plugins/eslint/node_modules/isarray/README.md +54 -0
- package/plugins/eslint/node_modules/isarray/component.json +19 -0
- package/plugins/eslint/node_modules/isarray/index.js +3 -0
- package/plugins/eslint/node_modules/isarray/package.json +25 -0
- package/plugins/eslint/node_modules/istanbul/CHANGELOG.md +304 -0
- package/plugins/eslint/node_modules/istanbul/LICENSE +24 -0
- package/plugins/eslint/node_modules/istanbul/README.md +269 -0
- package/plugins/eslint/node_modules/istanbul/index.js +153 -0
- package/plugins/eslint/node_modules/istanbul/lib/assets/base.css +182 -0
- package/plugins/eslint/node_modules/istanbul/lib/assets/sort-arrow-sprite.png +0 -0
- package/plugins/eslint/node_modules/istanbul/lib/assets/sorter.js +156 -0
- package/plugins/eslint/node_modules/istanbul/lib/assets/vendor/prettify.css +1 -0
- package/plugins/eslint/node_modules/istanbul/lib/assets/vendor/prettify.js +1 -0
- package/plugins/eslint/node_modules/istanbul/lib/cli.js +94 -0
- package/plugins/eslint/node_modules/istanbul/lib/collector.js +122 -0
- package/plugins/eslint/node_modules/istanbul/lib/command/check-coverage.js +195 -0
- package/plugins/eslint/node_modules/istanbul/lib/command/common/run-with-cover.js +261 -0
- package/plugins/eslint/node_modules/istanbul/lib/command/cover.js +33 -0
- package/plugins/eslint/node_modules/istanbul/lib/command/help.js +102 -0
- package/plugins/eslint/node_modules/istanbul/lib/command/index.js +33 -0
- package/plugins/eslint/node_modules/istanbul/lib/command/instrument.js +261 -0
- package/plugins/eslint/node_modules/istanbul/lib/command/report.js +123 -0
- package/plugins/eslint/node_modules/istanbul/lib/command/test.js +31 -0
- package/plugins/eslint/node_modules/istanbul/lib/config.js +483 -0
- package/plugins/eslint/node_modules/istanbul/lib/hook.js +198 -0
- package/plugins/eslint/node_modules/istanbul/lib/instrumenter.js +1040 -0
- package/plugins/eslint/node_modules/istanbul/lib/object-utils.js +425 -0
- package/plugins/eslint/node_modules/istanbul/lib/register-plugins.js +15 -0
- package/plugins/eslint/node_modules/istanbul/lib/report/clover.js +227 -0
- package/plugins/eslint/node_modules/istanbul/lib/report/cobertura.js +221 -0
- package/plugins/eslint/node_modules/istanbul/lib/report/common/defaults.js +49 -0
- package/plugins/eslint/node_modules/istanbul/lib/report/html.js +567 -0
- package/plugins/eslint/node_modules/istanbul/lib/report/index.js +104 -0
- package/plugins/eslint/node_modules/istanbul/lib/report/json-summary.js +75 -0
- package/plugins/eslint/node_modules/istanbul/lib/report/json.js +69 -0
- package/plugins/eslint/node_modules/istanbul/lib/report/lcov.js +65 -0
- package/plugins/eslint/node_modules/istanbul/lib/report/lcovonly.js +103 -0
- package/plugins/eslint/node_modules/istanbul/lib/report/none.js +41 -0
- package/plugins/eslint/node_modules/istanbul/lib/report/teamcity.js +92 -0
- package/plugins/eslint/node_modules/istanbul/lib/report/templates/foot.txt +18 -0
- package/plugins/eslint/node_modules/istanbul/lib/report/templates/head.txt +36 -0
- package/plugins/eslint/node_modules/istanbul/lib/report/text-lcov.js +50 -0
- package/plugins/eslint/node_modules/istanbul/lib/report/text-summary.js +93 -0
- package/plugins/eslint/node_modules/istanbul/lib/report/text.js +234 -0
- package/plugins/eslint/node_modules/istanbul/lib/reporter.js +111 -0
- package/plugins/eslint/node_modules/istanbul/lib/store/fslookup.js +61 -0
- package/plugins/eslint/node_modules/istanbul/lib/store/index.js +123 -0
- package/plugins/eslint/node_modules/istanbul/lib/store/memory.js +56 -0
- package/plugins/eslint/node_modules/istanbul/lib/store/tmp.js +81 -0
- package/plugins/eslint/node_modules/istanbul/lib/util/factory.js +88 -0
- package/plugins/eslint/node_modules/istanbul/lib/util/file-matcher.js +76 -0
- package/plugins/eslint/node_modules/istanbul/lib/util/file-writer.js +154 -0
- package/plugins/eslint/node_modules/istanbul/lib/util/help-formatter.js +30 -0
- package/plugins/eslint/node_modules/istanbul/lib/util/input-error.js +12 -0
- package/plugins/eslint/node_modules/istanbul/lib/util/insertion-text.js +109 -0
- package/plugins/eslint/node_modules/istanbul/lib/util/meta.js +13 -0
- package/plugins/eslint/node_modules/istanbul/lib/util/tree-summarizer.js +213 -0
- package/plugins/eslint/node_modules/istanbul/lib/util/writer.js +92 -0
- package/plugins/eslint/node_modules/istanbul/lib/util/yui-load-hook.js +49 -0
- package/plugins/eslint/node_modules/istanbul/node_modules/esprima/ChangeLog +143 -0
- package/plugins/eslint/node_modules/istanbul/node_modules/esprima/LICENSE.BSD +21 -0
- package/plugins/eslint/node_modules/istanbul/node_modules/esprima/README.md +22 -0
- package/plugins/eslint/node_modules/istanbul/node_modules/esprima/esprima.js +5637 -0
- package/plugins/eslint/node_modules/istanbul/node_modules/esprima/package.json +87 -0
- package/plugins/eslint/node_modules/istanbul/node_modules/supports-color/browser.js +2 -0
- package/plugins/eslint/node_modules/istanbul/node_modules/supports-color/index.js +84 -0
- package/plugins/eslint/node_modules/istanbul/node_modules/supports-color/license +21 -0
- package/plugins/eslint/node_modules/istanbul/node_modules/supports-color/package.json +66 -0
- package/plugins/eslint/node_modules/istanbul/node_modules/supports-color/readme.md +60 -0
- package/plugins/eslint/node_modules/istanbul/package.json +117 -0
- package/plugins/eslint/node_modules/js-yaml/CHANGELOG.md +557 -0
- package/plugins/eslint/node_modules/js-yaml/LICENSE +21 -0
- package/plugins/eslint/node_modules/js-yaml/README.md +299 -0
- package/plugins/eslint/node_modules/js-yaml/dist/js-yaml.js +3989 -0
- package/plugins/eslint/node_modules/js-yaml/dist/js-yaml.min.js +1 -0
- package/plugins/eslint/node_modules/js-yaml/index.js +7 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/common.js +59 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/dumper.js +850 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/exception.js +43 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/loader.js +1644 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/mark.js +76 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/schema/core.js +18 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +25 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +28 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +17 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/schema/json.js +25 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/schema.js +108 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/type/binary.js +138 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/type/bool.js +35 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/type/float.js +116 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/type/int.js +173 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/type/js/function.js +93 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +60 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +28 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/type/map.js +8 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/type/merge.js +12 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/type/null.js +34 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/type/omap.js +44 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/type/pairs.js +53 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/type/seq.js +8 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/type/set.js +29 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/type/str.js +8 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +88 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml/type.js +61 -0
- package/plugins/eslint/node_modules/js-yaml/lib/js-yaml.js +39 -0
- package/plugins/eslint/node_modules/js-yaml/node_modules/esprima/ChangeLog +235 -0
- package/plugins/eslint/node_modules/js-yaml/node_modules/esprima/LICENSE.BSD +21 -0
- package/plugins/eslint/node_modules/js-yaml/node_modules/esprima/README.md +46 -0
- package/plugins/eslint/node_modules/js-yaml/node_modules/esprima/dist/esprima.js +6709 -0
- package/plugins/eslint/node_modules/js-yaml/node_modules/esprima/package.json +112 -0
- package/plugins/eslint/node_modules/js-yaml/package.json +49 -0
- package/plugins/eslint/node_modules/lcov-parse/.travis.yml +5 -0
- package/plugins/eslint/node_modules/lcov-parse/LICENSE +25 -0
- package/plugins/eslint/node_modules/lcov-parse/README.md +79 -0
- package/plugins/eslint/node_modules/lcov-parse/lib/index.js +122 -0
- package/plugins/eslint/node_modules/lcov-parse/package.json +39 -0
- package/plugins/eslint/node_modules/lcov-parse/tests/info/parts.info +415 -0
- package/plugins/eslint/node_modules/lcov-parse/tests/parse.js +115 -0
- package/plugins/eslint/node_modules/levn/LICENSE +22 -0
- package/plugins/eslint/node_modules/levn/README.md +195 -0
- package/plugins/eslint/node_modules/levn/lib/cast.js +298 -0
- package/plugins/eslint/node_modules/levn/lib/coerce.js +285 -0
- package/plugins/eslint/node_modules/levn/lib/index.js +22 -0
- package/plugins/eslint/node_modules/levn/lib/parse-string.js +113 -0
- package/plugins/eslint/node_modules/levn/lib/parse.js +102 -0
- package/plugins/eslint/node_modules/levn/package.json +52 -0
- package/plugins/eslint/node_modules/lodash/LICENSE +22 -0
- package/plugins/eslint/node_modules/lodash/README.md +121 -0
- package/plugins/eslint/node_modules/lodash/array/chunk.js +46 -0
- package/plugins/eslint/node_modules/lodash/array/compact.js +30 -0
- package/plugins/eslint/node_modules/lodash/array/difference.js +29 -0
- package/plugins/eslint/node_modules/lodash/array/drop.js +39 -0
- package/plugins/eslint/node_modules/lodash/array/dropRight.js +40 -0
- package/plugins/eslint/node_modules/lodash/array/dropRightWhile.js +59 -0
- package/plugins/eslint/node_modules/lodash/array/dropWhile.js +59 -0
- package/plugins/eslint/node_modules/lodash/array/fill.js +44 -0
- package/plugins/eslint/node_modules/lodash/array/findIndex.js +53 -0
- package/plugins/eslint/node_modules/lodash/array/findLastIndex.js +53 -0
- package/plugins/eslint/node_modules/lodash/array/first.js +22 -0
- package/plugins/eslint/node_modules/lodash/array/flatten.js +32 -0
- package/plugins/eslint/node_modules/lodash/array/flattenDeep.js +21 -0
- package/plugins/eslint/node_modules/lodash/array/head.js +1 -0
- package/plugins/eslint/node_modules/lodash/array/indexOf.js +53 -0
- package/plugins/eslint/node_modules/lodash/array/initial.js +20 -0
- package/plugins/eslint/node_modules/lodash/array/intersection.js +58 -0
- package/plugins/eslint/node_modules/lodash/array/last.js +19 -0
- package/plugins/eslint/node_modules/lodash/array/lastIndexOf.js +60 -0
- package/plugins/eslint/node_modules/lodash/array/object.js +1 -0
- package/plugins/eslint/node_modules/lodash/array/pull.js +52 -0
- package/plugins/eslint/node_modules/lodash/array/pullAt.js +40 -0
- package/plugins/eslint/node_modules/lodash/array/remove.js +64 -0
- package/plugins/eslint/node_modules/lodash/array/rest.js +21 -0
- package/plugins/eslint/node_modules/lodash/array/slice.js +30 -0
- package/plugins/eslint/node_modules/lodash/array/sortedIndex.js +53 -0
- package/plugins/eslint/node_modules/lodash/array/sortedLastIndex.js +25 -0
- package/plugins/eslint/node_modules/lodash/array/tail.js +1 -0
- package/plugins/eslint/node_modules/lodash/array/take.js +39 -0
- package/plugins/eslint/node_modules/lodash/array/takeRight.js +40 -0
- package/plugins/eslint/node_modules/lodash/array/takeRightWhile.js +59 -0
- package/plugins/eslint/node_modules/lodash/array/takeWhile.js +59 -0
- package/plugins/eslint/node_modules/lodash/array/union.js +24 -0
- package/plugins/eslint/node_modules/lodash/array/uniq.js +71 -0
- package/plugins/eslint/node_modules/lodash/array/unique.js +1 -0
- package/plugins/eslint/node_modules/lodash/array/unzip.js +47 -0
- package/plugins/eslint/node_modules/lodash/array/unzipWith.js +41 -0
- package/plugins/eslint/node_modules/lodash/array/without.js +27 -0
- package/plugins/eslint/node_modules/lodash/array/xor.js +35 -0
- package/plugins/eslint/node_modules/lodash/array/zip.js +21 -0
- package/plugins/eslint/node_modules/lodash/array/zipObject.js +43 -0
- package/plugins/eslint/node_modules/lodash/array/zipWith.js +36 -0
- package/plugins/eslint/node_modules/lodash/array.js +44 -0
- package/plugins/eslint/node_modules/lodash/chain/chain.js +35 -0
- package/plugins/eslint/node_modules/lodash/chain/commit.js +1 -0
- package/plugins/eslint/node_modules/lodash/chain/concat.js +1 -0
- package/plugins/eslint/node_modules/lodash/chain/lodash.js +125 -0
- package/plugins/eslint/node_modules/lodash/chain/plant.js +1 -0
- package/plugins/eslint/node_modules/lodash/chain/reverse.js +1 -0
- package/plugins/eslint/node_modules/lodash/chain/run.js +1 -0
- package/plugins/eslint/node_modules/lodash/chain/tap.js +29 -0
- package/plugins/eslint/node_modules/lodash/chain/thru.js +26 -0
- package/plugins/eslint/node_modules/lodash/chain/toJSON.js +1 -0
- package/plugins/eslint/node_modules/lodash/chain/toString.js +1 -0
- package/plugins/eslint/node_modules/lodash/chain/value.js +1 -0
- package/plugins/eslint/node_modules/lodash/chain/valueOf.js +1 -0
- package/plugins/eslint/node_modules/lodash/chain/wrapperChain.js +32 -0
- package/plugins/eslint/node_modules/lodash/chain/wrapperCommit.js +32 -0
- package/plugins/eslint/node_modules/lodash/chain/wrapperConcat.js +34 -0
- package/plugins/eslint/node_modules/lodash/chain/wrapperPlant.js +45 -0
- package/plugins/eslint/node_modules/lodash/chain/wrapperReverse.js +43 -0
- package/plugins/eslint/node_modules/lodash/chain/wrapperToString.js +17 -0
- package/plugins/eslint/node_modules/lodash/chain/wrapperValue.js +20 -0
- package/plugins/eslint/node_modules/lodash/chain.js +16 -0
- package/plugins/eslint/node_modules/lodash/collection/all.js +1 -0
- package/plugins/eslint/node_modules/lodash/collection/any.js +1 -0
- package/plugins/eslint/node_modules/lodash/collection/at.js +29 -0
- package/plugins/eslint/node_modules/lodash/collection/collect.js +1 -0
- package/plugins/eslint/node_modules/lodash/collection/contains.js +1 -0
- package/plugins/eslint/node_modules/lodash/collection/countBy.js +54 -0
- package/plugins/eslint/node_modules/lodash/collection/detect.js +1 -0
- package/plugins/eslint/node_modules/lodash/collection/each.js +1 -0
- package/plugins/eslint/node_modules/lodash/collection/eachRight.js +1 -0
- package/plugins/eslint/node_modules/lodash/collection/every.js +66 -0
- package/plugins/eslint/node_modules/lodash/collection/filter.js +61 -0
- package/plugins/eslint/node_modules/lodash/collection/find.js +56 -0
- package/plugins/eslint/node_modules/lodash/collection/findLast.js +25 -0
- package/plugins/eslint/node_modules/lodash/collection/findWhere.js +37 -0
- package/plugins/eslint/node_modules/lodash/collection/foldl.js +1 -0
- package/plugins/eslint/node_modules/lodash/collection/foldr.js +1 -0
- package/plugins/eslint/node_modules/lodash/collection/forEach.js +37 -0
- package/plugins/eslint/node_modules/lodash/collection/forEachRight.js +26 -0
- package/plugins/eslint/node_modules/lodash/collection/groupBy.js +59 -0
- package/plugins/eslint/node_modules/lodash/collection/include.js +1 -0
- package/plugins/eslint/node_modules/lodash/collection/includes.js +57 -0
- package/plugins/eslint/node_modules/lodash/collection/indexBy.js +53 -0
- package/plugins/eslint/node_modules/lodash/collection/inject.js +1 -0
- package/plugins/eslint/node_modules/lodash/collection/invoke.js +42 -0
- package/plugins/eslint/node_modules/lodash/collection/map.js +68 -0
- package/plugins/eslint/node_modules/lodash/collection/max.js +1 -0
- package/plugins/eslint/node_modules/lodash/collection/min.js +1 -0
- package/plugins/eslint/node_modules/lodash/collection/partition.js +66 -0
- package/plugins/eslint/node_modules/lodash/collection/pluck.js +31 -0
- package/plugins/eslint/node_modules/lodash/collection/reduce.js +44 -0
- package/plugins/eslint/node_modules/lodash/collection/reduceRight.js +29 -0
- package/plugins/eslint/node_modules/lodash/collection/reject.js +50 -0
- package/plugins/eslint/node_modules/lodash/collection/sample.js +50 -0
- package/plugins/eslint/node_modules/lodash/collection/select.js +1 -0
- package/plugins/eslint/node_modules/lodash/collection/shuffle.js +24 -0
- package/plugins/eslint/node_modules/lodash/collection/size.js +30 -0
- package/plugins/eslint/node_modules/lodash/collection/some.js +67 -0
- package/plugins/eslint/node_modules/lodash/collection/sortBy.js +71 -0
- package/plugins/eslint/node_modules/lodash/collection/sortByAll.js +52 -0
- package/plugins/eslint/node_modules/lodash/collection/sortByOrder.js +55 -0
- package/plugins/eslint/node_modules/lodash/collection/sum.js +1 -0
- package/plugins/eslint/node_modules/lodash/collection/where.js +37 -0
- package/plugins/eslint/node_modules/lodash/collection.js +44 -0
- package/plugins/eslint/node_modules/lodash/date/now.js +24 -0
- package/plugins/eslint/node_modules/lodash/date.js +3 -0
- package/plugins/eslint/node_modules/lodash/function/after.js +48 -0
- package/plugins/eslint/node_modules/lodash/function/ary.js +34 -0
- package/plugins/eslint/node_modules/lodash/function/backflow.js +1 -0
- package/plugins/eslint/node_modules/lodash/function/before.js +42 -0
- package/plugins/eslint/node_modules/lodash/function/bind.js +56 -0
- package/plugins/eslint/node_modules/lodash/function/bindAll.js +50 -0
- package/plugins/eslint/node_modules/lodash/function/bindKey.js +66 -0
- package/plugins/eslint/node_modules/lodash/function/compose.js +1 -0
- package/plugins/eslint/node_modules/lodash/function/curry.js +51 -0
- package/plugins/eslint/node_modules/lodash/function/curryRight.js +48 -0
- package/plugins/eslint/node_modules/lodash/function/debounce.js +181 -0
- package/plugins/eslint/node_modules/lodash/function/defer.js +25 -0
- package/plugins/eslint/node_modules/lodash/function/delay.js +26 -0
- package/plugins/eslint/node_modules/lodash/function/flow.js +25 -0
- package/plugins/eslint/node_modules/lodash/function/flowRight.js +25 -0
- package/plugins/eslint/node_modules/lodash/function/memoize.js +80 -0
- package/plugins/eslint/node_modules/lodash/function/modArgs.js +58 -0
- package/plugins/eslint/node_modules/lodash/function/negate.js +32 -0
- package/plugins/eslint/node_modules/lodash/function/once.js +24 -0
- package/plugins/eslint/node_modules/lodash/function/partial.js +43 -0
- package/plugins/eslint/node_modules/lodash/function/partialRight.js +42 -0
- package/plugins/eslint/node_modules/lodash/function/rearg.js +40 -0
- package/plugins/eslint/node_modules/lodash/function/restParam.js +58 -0
- package/plugins/eslint/node_modules/lodash/function/spread.js +44 -0
- package/plugins/eslint/node_modules/lodash/function/throttle.js +62 -0
- package/plugins/eslint/node_modules/lodash/function/wrap.js +33 -0
- package/plugins/eslint/node_modules/lodash/function.js +28 -0
- package/plugins/eslint/node_modules/lodash/index.js +12351 -0
- package/plugins/eslint/node_modules/lodash/internal/LazyWrapper.js +26 -0
- package/plugins/eslint/node_modules/lodash/internal/LodashWrapper.js +21 -0
- package/plugins/eslint/node_modules/lodash/internal/MapCache.js +24 -0
- package/plugins/eslint/node_modules/lodash/internal/SetCache.js +29 -0
- package/plugins/eslint/node_modules/lodash/internal/arrayConcat.js +25 -0
- package/plugins/eslint/node_modules/lodash/internal/arrayCopy.js +20 -0
- package/plugins/eslint/node_modules/lodash/internal/arrayEach.js +22 -0
- package/plugins/eslint/node_modules/lodash/internal/arrayEachRight.js +21 -0
- package/plugins/eslint/node_modules/lodash/internal/arrayEvery.js +23 -0
- package/plugins/eslint/node_modules/lodash/internal/arrayExtremum.js +30 -0
- package/plugins/eslint/node_modules/lodash/internal/arrayFilter.js +25 -0
- package/plugins/eslint/node_modules/lodash/internal/arrayMap.js +21 -0
- package/plugins/eslint/node_modules/lodash/internal/arrayPush.js +20 -0
- package/plugins/eslint/node_modules/lodash/internal/arrayReduce.js +26 -0
- package/plugins/eslint/node_modules/lodash/internal/arrayReduceRight.js +24 -0
- package/plugins/eslint/node_modules/lodash/internal/arraySome.js +23 -0
- package/plugins/eslint/node_modules/lodash/internal/arraySum.js +20 -0
- package/plugins/eslint/node_modules/lodash/internal/assignDefaults.js +13 -0
- package/plugins/eslint/node_modules/lodash/internal/assignOwnDefaults.js +26 -0
- package/plugins/eslint/node_modules/lodash/internal/assignWith.js +32 -0
- package/plugins/eslint/node_modules/lodash/internal/baseAssign.js +19 -0
- package/plugins/eslint/node_modules/lodash/internal/baseAt.js +32 -0
- package/plugins/eslint/node_modules/lodash/internal/baseCallback.js +35 -0
- package/plugins/eslint/node_modules/lodash/internal/baseClone.js +128 -0
- package/plugins/eslint/node_modules/lodash/internal/baseCompareAscending.js +34 -0
- package/plugins/eslint/node_modules/lodash/internal/baseCopy.js +23 -0
- package/plugins/eslint/node_modules/lodash/internal/baseCreate.js +23 -0
- package/plugins/eslint/node_modules/lodash/internal/baseDelay.js +21 -0
- package/plugins/eslint/node_modules/lodash/internal/baseDifference.js +55 -0
- package/plugins/eslint/node_modules/lodash/internal/baseEach.js +15 -0
- package/plugins/eslint/node_modules/lodash/internal/baseEachRight.js +15 -0
- package/plugins/eslint/node_modules/lodash/internal/baseEvery.js +22 -0
- package/plugins/eslint/node_modules/lodash/internal/baseExtremum.js +29 -0
- package/plugins/eslint/node_modules/lodash/internal/baseFill.js +31 -0
- package/plugins/eslint/node_modules/lodash/internal/baseFilter.js +22 -0
- package/plugins/eslint/node_modules/lodash/internal/baseFind.js +25 -0
- package/plugins/eslint/node_modules/lodash/internal/baseFindIndex.js +23 -0
- package/plugins/eslint/node_modules/lodash/internal/baseFlatten.js +41 -0
- package/plugins/eslint/node_modules/lodash/internal/baseFor.js +17 -0
- package/plugins/eslint/node_modules/lodash/internal/baseForIn.js +17 -0
- package/plugins/eslint/node_modules/lodash/internal/baseForOwn.js +17 -0
- package/plugins/eslint/node_modules/lodash/internal/baseForOwnRight.js +17 -0
- package/plugins/eslint/node_modules/lodash/internal/baseForRight.js +15 -0
- package/plugins/eslint/node_modules/lodash/internal/baseFunctions.js +27 -0
- package/plugins/eslint/node_modules/lodash/internal/baseGet.js +29 -0
- package/plugins/eslint/node_modules/lodash/internal/baseIndexOf.js +27 -0
- package/plugins/eslint/node_modules/lodash/internal/baseIsEqual.js +28 -0
- package/plugins/eslint/node_modules/lodash/internal/baseIsEqualDeep.js +102 -0
- package/plugins/eslint/node_modules/lodash/internal/baseIsFunction.js +15 -0
- package/plugins/eslint/node_modules/lodash/internal/baseIsMatch.js +52 -0
- package/plugins/eslint/node_modules/lodash/internal/baseLodash.js +10 -0
- package/plugins/eslint/node_modules/lodash/internal/baseMap.js +23 -0
- package/plugins/eslint/node_modules/lodash/internal/baseMatches.js +30 -0
- package/plugins/eslint/node_modules/lodash/internal/baseMatchesProperty.js +45 -0
- package/plugins/eslint/node_modules/lodash/internal/baseMerge.js +56 -0
- package/plugins/eslint/node_modules/lodash/internal/baseMergeDeep.js +67 -0
- package/plugins/eslint/node_modules/lodash/internal/baseProperty.js +14 -0
- package/plugins/eslint/node_modules/lodash/internal/basePropertyDeep.js +19 -0
- package/plugins/eslint/node_modules/lodash/internal/basePullAt.js +30 -0
- package/plugins/eslint/node_modules/lodash/internal/baseRandom.js +18 -0
- package/plugins/eslint/node_modules/lodash/internal/baseReduce.js +24 -0
- package/plugins/eslint/node_modules/lodash/internal/baseSetData.js +17 -0
- package/plugins/eslint/node_modules/lodash/internal/baseSlice.js +32 -0
- package/plugins/eslint/node_modules/lodash/internal/baseSome.js +23 -0
- package/plugins/eslint/node_modules/lodash/internal/baseSortBy.js +21 -0
- package/plugins/eslint/node_modules/lodash/internal/baseSortByOrder.js +31 -0
- package/plugins/eslint/node_modules/lodash/internal/baseSum.js +20 -0
- package/plugins/eslint/node_modules/lodash/internal/baseToString.js +13 -0
- package/plugins/eslint/node_modules/lodash/internal/baseUniq.js +60 -0
- package/plugins/eslint/node_modules/lodash/internal/baseValues.js +22 -0
- package/plugins/eslint/node_modules/lodash/internal/baseWhile.js +24 -0
- package/plugins/eslint/node_modules/lodash/internal/baseWrapperValue.js +29 -0
- package/plugins/eslint/node_modules/lodash/internal/binaryIndex.js +39 -0
- package/plugins/eslint/node_modules/lodash/internal/binaryIndexBy.js +57 -0
- package/plugins/eslint/node_modules/lodash/internal/bindCallback.js +39 -0
- package/plugins/eslint/node_modules/lodash/internal/bufferClone.js +20 -0
- package/plugins/eslint/node_modules/lodash/internal/cacheIndexOf.js +19 -0
- package/plugins/eslint/node_modules/lodash/internal/cachePush.js +20 -0
- package/plugins/eslint/node_modules/lodash/internal/charsLeftIndex.js +18 -0
- package/plugins/eslint/node_modules/lodash/internal/charsRightIndex.js +17 -0
- package/plugins/eslint/node_modules/lodash/internal/compareAscending.js +16 -0
- package/plugins/eslint/node_modules/lodash/internal/compareMultiple.js +44 -0
- package/plugins/eslint/node_modules/lodash/internal/composeArgs.js +34 -0
- package/plugins/eslint/node_modules/lodash/internal/composeArgsRight.js +36 -0
- package/plugins/eslint/node_modules/lodash/internal/createAggregator.js +35 -0
- package/plugins/eslint/node_modules/lodash/internal/createAssigner.js +41 -0
- package/plugins/eslint/node_modules/lodash/internal/createBaseEach.js +31 -0
- package/plugins/eslint/node_modules/lodash/internal/createBaseFor.js +27 -0
- package/plugins/eslint/node_modules/lodash/internal/createBindWrapper.js +22 -0
- package/plugins/eslint/node_modules/lodash/internal/createCache.js +21 -0
- package/plugins/eslint/node_modules/lodash/internal/createCompounder.js +26 -0
- package/plugins/eslint/node_modules/lodash/internal/createCtorWrapper.js +37 -0
- package/plugins/eslint/node_modules/lodash/internal/createCurry.js +23 -0
- package/plugins/eslint/node_modules/lodash/internal/createDefaults.js +22 -0
- package/plugins/eslint/node_modules/lodash/internal/createExtremum.js +33 -0
- package/plugins/eslint/node_modules/lodash/internal/createFind.js +25 -0
- package/plugins/eslint/node_modules/lodash/internal/createFindIndex.js +21 -0
- package/plugins/eslint/node_modules/lodash/internal/createFindKey.js +18 -0
- package/plugins/eslint/node_modules/lodash/internal/createFlow.js +74 -0
- package/plugins/eslint/node_modules/lodash/internal/createForEach.js +20 -0
- package/plugins/eslint/node_modules/lodash/internal/createForIn.js +20 -0
- package/plugins/eslint/node_modules/lodash/internal/createForOwn.js +19 -0
- package/plugins/eslint/node_modules/lodash/internal/createHybridWrapper.js +111 -0
- package/plugins/eslint/node_modules/lodash/internal/createObjectMapper.js +26 -0
- package/plugins/eslint/node_modules/lodash/internal/createPadDir.js +18 -0
- package/plugins/eslint/node_modules/lodash/internal/createPadding.js +29 -0
- package/plugins/eslint/node_modules/lodash/internal/createPartial.js +20 -0
- package/plugins/eslint/node_modules/lodash/internal/createPartialWrapper.js +43 -0
- package/plugins/eslint/node_modules/lodash/internal/createReduce.js +22 -0
- package/plugins/eslint/node_modules/lodash/internal/createRound.js +23 -0
- package/plugins/eslint/node_modules/lodash/internal/createSortedIndex.js +20 -0
- package/plugins/eslint/node_modules/lodash/internal/createWrapper.js +86 -0
- package/plugins/eslint/node_modules/lodash/internal/deburrLetter.js +33 -0
- package/plugins/eslint/node_modules/lodash/internal/equalArrays.js +51 -0
- package/plugins/eslint/node_modules/lodash/internal/equalByTag.js +48 -0
- package/plugins/eslint/node_modules/lodash/internal/equalObjects.js +67 -0
- package/plugins/eslint/node_modules/lodash/internal/escapeHtmlChar.js +22 -0
- package/plugins/eslint/node_modules/lodash/internal/escapeRegExpChar.js +38 -0
- package/plugins/eslint/node_modules/lodash/internal/escapeStringChar.js +22 -0
- package/plugins/eslint/node_modules/lodash/internal/getData.js +15 -0
- package/plugins/eslint/node_modules/lodash/internal/getFuncName.js +25 -0
- package/plugins/eslint/node_modules/lodash/internal/getLength.js +15 -0
- package/plugins/eslint/node_modules/lodash/internal/getMatchData.js +21 -0
- package/plugins/eslint/node_modules/lodash/internal/getNative.js +16 -0
- package/plugins/eslint/node_modules/lodash/internal/getView.js +33 -0
- package/plugins/eslint/node_modules/lodash/internal/indexOfNaN.js +23 -0
- package/plugins/eslint/node_modules/lodash/internal/initCloneArray.js +26 -0
- package/plugins/eslint/node_modules/lodash/internal/initCloneByTag.js +63 -0
- package/plugins/eslint/node_modules/lodash/internal/initCloneObject.js +16 -0
- package/plugins/eslint/node_modules/lodash/internal/invokePath.js +26 -0
- package/plugins/eslint/node_modules/lodash/internal/isArrayLike.js +15 -0
- package/plugins/eslint/node_modules/lodash/internal/isIndex.js +24 -0
- package/plugins/eslint/node_modules/lodash/internal/isIterateeCall.js +28 -0
- package/plugins/eslint/node_modules/lodash/internal/isKey.js +28 -0
- package/plugins/eslint/node_modules/lodash/internal/isLaziable.js +27 -0
- package/plugins/eslint/node_modules/lodash/internal/isLength.js +20 -0
- package/plugins/eslint/node_modules/lodash/internal/isObjectLike.js +12 -0
- package/plugins/eslint/node_modules/lodash/internal/isSpace.js +14 -0
- package/plugins/eslint/node_modules/lodash/internal/isStrictComparable.js +15 -0
- package/plugins/eslint/node_modules/lodash/internal/lazyClone.js +23 -0
- package/plugins/eslint/node_modules/lodash/internal/lazyReverse.js +23 -0
- package/plugins/eslint/node_modules/lodash/internal/lazyValue.js +72 -0
- package/plugins/eslint/node_modules/lodash/internal/mapDelete.js +14 -0
- package/plugins/eslint/node_modules/lodash/internal/mapGet.js +14 -0
- package/plugins/eslint/node_modules/lodash/internal/mapHas.js +20 -0
- package/plugins/eslint/node_modules/lodash/internal/mapSet.js +18 -0
- package/plugins/eslint/node_modules/lodash/internal/mergeData.js +89 -0
- package/plugins/eslint/node_modules/lodash/internal/mergeDefaults.js +15 -0
- package/plugins/eslint/node_modules/lodash/internal/metaMap.js +9 -0
- package/plugins/eslint/node_modules/lodash/internal/pickByArray.js +28 -0
- package/plugins/eslint/node_modules/lodash/internal/pickByCallback.js +22 -0
- package/plugins/eslint/node_modules/lodash/internal/reEscape.js +4 -0
- package/plugins/eslint/node_modules/lodash/internal/reEvaluate.js +4 -0
- package/plugins/eslint/node_modules/lodash/internal/reInterpolate.js +4 -0
- package/plugins/eslint/node_modules/lodash/internal/realNames.js +4 -0
- package/plugins/eslint/node_modules/lodash/internal/reorder.js +29 -0
- package/plugins/eslint/node_modules/lodash/internal/replaceHolders.js +28 -0
- package/plugins/eslint/node_modules/lodash/internal/setData.js +41 -0
- package/plugins/eslint/node_modules/lodash/internal/shimKeys.js +41 -0
- package/plugins/eslint/node_modules/lodash/internal/sortedUniq.js +29 -0
- package/plugins/eslint/node_modules/lodash/internal/toIterable.js +22 -0
- package/plugins/eslint/node_modules/lodash/internal/toObject.js +14 -0
- package/plugins/eslint/node_modules/lodash/internal/toPath.js +28 -0
- package/plugins/eslint/node_modules/lodash/internal/trimmedLeftIndex.js +19 -0
- package/plugins/eslint/node_modules/lodash/internal/trimmedRightIndex.js +18 -0
- package/plugins/eslint/node_modules/lodash/internal/unescapeHtmlChar.js +22 -0
- package/plugins/eslint/node_modules/lodash/internal/wrapperClone.js +18 -0
- package/plugins/eslint/node_modules/lodash/lang/clone.js +70 -0
- package/plugins/eslint/node_modules/lodash/lang/cloneDeep.js +55 -0
- package/plugins/eslint/node_modules/lodash/lang/eq.js +1 -0
- package/plugins/eslint/node_modules/lodash/lang/gt.js +25 -0
- package/plugins/eslint/node_modules/lodash/lang/gte.js +25 -0
- package/plugins/eslint/node_modules/lodash/lang/isArguments.js +34 -0
- package/plugins/eslint/node_modules/lodash/lang/isArray.js +40 -0
- package/plugins/eslint/node_modules/lodash/lang/isBoolean.js +35 -0
- package/plugins/eslint/node_modules/lodash/lang/isDate.js +35 -0
- package/plugins/eslint/node_modules/lodash/lang/isElement.js +24 -0
- package/plugins/eslint/node_modules/lodash/lang/isEmpty.js +47 -0
- package/plugins/eslint/node_modules/lodash/lang/isEqual.js +54 -0
- package/plugins/eslint/node_modules/lodash/lang/isError.js +36 -0
- package/plugins/eslint/node_modules/lodash/lang/isFinite.js +35 -0
- package/plugins/eslint/node_modules/lodash/lang/isFunction.js +38 -0
- package/plugins/eslint/node_modules/lodash/lang/isMatch.js +49 -0
- package/plugins/eslint/node_modules/lodash/lang/isNaN.js +34 -0
- package/plugins/eslint/node_modules/lodash/lang/isNative.js +48 -0
- package/plugins/eslint/node_modules/lodash/lang/isNull.js +21 -0
- package/plugins/eslint/node_modules/lodash/lang/isNumber.js +41 -0
- package/plugins/eslint/node_modules/lodash/lang/isObject.js +28 -0
- package/plugins/eslint/node_modules/lodash/lang/isPlainObject.js +71 -0
- package/plugins/eslint/node_modules/lodash/lang/isRegExp.js +35 -0
- package/plugins/eslint/node_modules/lodash/lang/isString.js +35 -0
- package/plugins/eslint/node_modules/lodash/lang/isTypedArray.js +74 -0
- package/plugins/eslint/node_modules/lodash/lang/isUndefined.js +21 -0
- package/plugins/eslint/node_modules/lodash/lang/lt.js +25 -0
- package/plugins/eslint/node_modules/lodash/lang/lte.js +25 -0
- package/plugins/eslint/node_modules/lodash/lang/toArray.js +32 -0
- package/plugins/eslint/node_modules/lodash/lang/toPlainObject.js +31 -0
- package/plugins/eslint/node_modules/lodash/lang.js +32 -0
- package/plugins/eslint/node_modules/lodash/math/add.js +19 -0
- package/plugins/eslint/node_modules/lodash/math/ceil.js +25 -0
- package/plugins/eslint/node_modules/lodash/math/floor.js +25 -0
- package/plugins/eslint/node_modules/lodash/math/max.js +56 -0
- package/plugins/eslint/node_modules/lodash/math/min.js +56 -0
- package/plugins/eslint/node_modules/lodash/math/round.js +25 -0
- package/plugins/eslint/node_modules/lodash/math/sum.js +50 -0
- package/plugins/eslint/node_modules/lodash/math.js +9 -0
- package/plugins/eslint/node_modules/lodash/number/inRange.js +47 -0
- package/plugins/eslint/node_modules/lodash/number/random.js +70 -0
- package/plugins/eslint/node_modules/lodash/number.js +4 -0
- package/plugins/eslint/node_modules/lodash/object/assign.js +43 -0
- package/plugins/eslint/node_modules/lodash/object/create.js +47 -0
- package/plugins/eslint/node_modules/lodash/object/defaults.js +25 -0
- package/plugins/eslint/node_modules/lodash/object/defaultsDeep.js +25 -0
- package/plugins/eslint/node_modules/lodash/object/extend.js +1 -0
- package/plugins/eslint/node_modules/lodash/object/findKey.js +54 -0
- package/plugins/eslint/node_modules/lodash/object/findLastKey.js +54 -0
- package/plugins/eslint/node_modules/lodash/object/forIn.js +33 -0
- package/plugins/eslint/node_modules/lodash/object/forInRight.js +31 -0
- package/plugins/eslint/node_modules/lodash/object/forOwn.js +33 -0
- package/plugins/eslint/node_modules/lodash/object/forOwnRight.js +31 -0
- package/plugins/eslint/node_modules/lodash/object/functions.js +23 -0
- package/plugins/eslint/node_modules/lodash/object/get.js +33 -0
- package/plugins/eslint/node_modules/lodash/object/has.js +57 -0
- package/plugins/eslint/node_modules/lodash/object/invert.js +60 -0
- package/plugins/eslint/node_modules/lodash/object/keys.js +45 -0
- package/plugins/eslint/node_modules/lodash/object/keysIn.js +64 -0
- package/plugins/eslint/node_modules/lodash/object/mapKeys.js +25 -0
- package/plugins/eslint/node_modules/lodash/object/mapValues.js +46 -0
- package/plugins/eslint/node_modules/lodash/object/merge.js +54 -0
- package/plugins/eslint/node_modules/lodash/object/methods.js +1 -0
- package/plugins/eslint/node_modules/lodash/object/omit.js +47 -0
- package/plugins/eslint/node_modules/lodash/object/pairs.js +33 -0
- package/plugins/eslint/node_modules/lodash/object/pick.js +42 -0
- package/plugins/eslint/node_modules/lodash/object/result.js +49 -0
- package/plugins/eslint/node_modules/lodash/object/set.js +55 -0
- package/plugins/eslint/node_modules/lodash/object/transform.js +61 -0
- package/plugins/eslint/node_modules/lodash/object/values.js +33 -0
- package/plugins/eslint/node_modules/lodash/object/valuesIn.js +31 -0
- package/plugins/eslint/node_modules/lodash/object.js +31 -0
- package/plugins/eslint/node_modules/lodash/package.json +20 -0
- package/plugins/eslint/node_modules/lodash/string/camelCase.js +27 -0
- package/plugins/eslint/node_modules/lodash/string/capitalize.js +21 -0
- package/plugins/eslint/node_modules/lodash/string/deburr.js +29 -0
- package/plugins/eslint/node_modules/lodash/string/endsWith.js +40 -0
- package/plugins/eslint/node_modules/lodash/string/escape.js +48 -0
- package/plugins/eslint/node_modules/lodash/string/escapeRegExp.js +32 -0
- package/plugins/eslint/node_modules/lodash/string/kebabCase.js +26 -0
- package/plugins/eslint/node_modules/lodash/string/pad.js +47 -0
- package/plugins/eslint/node_modules/lodash/string/padLeft.js +27 -0
- package/plugins/eslint/node_modules/lodash/string/padRight.js +27 -0
- package/plugins/eslint/node_modules/lodash/string/parseInt.js +46 -0
- package/plugins/eslint/node_modules/lodash/string/repeat.js +47 -0
- package/plugins/eslint/node_modules/lodash/string/snakeCase.js +26 -0
- package/plugins/eslint/node_modules/lodash/string/startCase.js +26 -0
- package/plugins/eslint/node_modules/lodash/string/startsWith.js +36 -0
- package/plugins/eslint/node_modules/lodash/string/template.js +226 -0
- package/plugins/eslint/node_modules/lodash/string/templateSettings.js +67 -0
- package/plugins/eslint/node_modules/lodash/string/trim.js +42 -0
- package/plugins/eslint/node_modules/lodash/string/trimLeft.js +36 -0
- package/plugins/eslint/node_modules/lodash/string/trimRight.js +36 -0
- package/plugins/eslint/node_modules/lodash/string/trunc.js +105 -0
- package/plugins/eslint/node_modules/lodash/string/unescape.js +33 -0
- package/plugins/eslint/node_modules/lodash/string/words.js +38 -0
- package/plugins/eslint/node_modules/lodash/string.js +25 -0
- package/plugins/eslint/node_modules/lodash/support.js +10 -0
- package/plugins/eslint/node_modules/lodash/utility/attempt.js +32 -0
- package/plugins/eslint/node_modules/lodash/utility/callback.js +53 -0
- package/plugins/eslint/node_modules/lodash/utility/constant.js +23 -0
- package/plugins/eslint/node_modules/lodash/utility/identity.js +20 -0
- package/plugins/eslint/node_modules/lodash/utility/iteratee.js +1 -0
- package/plugins/eslint/node_modules/lodash/utility/matches.js +33 -0
- package/plugins/eslint/node_modules/lodash/utility/matchesProperty.js +32 -0
- package/plugins/eslint/node_modules/lodash/utility/method.js +33 -0
- package/plugins/eslint/node_modules/lodash/utility/methodOf.js +32 -0
- package/plugins/eslint/node_modules/lodash/utility/mixin.js +82 -0
- package/plugins/eslint/node_modules/lodash/utility/noop.js +19 -0
- package/plugins/eslint/node_modules/lodash/utility/property.js +31 -0
- package/plugins/eslint/node_modules/lodash/utility/propertyOf.js +30 -0
- package/plugins/eslint/node_modules/lodash/utility/range.js +66 -0
- package/plugins/eslint/node_modules/lodash/utility/times.js +60 -0
- package/plugins/eslint/node_modules/lodash/utility/uniqueId.js +27 -0
- package/plugins/eslint/node_modules/lodash/utility.js +18 -0
- package/plugins/eslint/node_modules/lodash.clonedeep/LICENSE +22 -0
- package/plugins/eslint/node_modules/lodash.clonedeep/README.md +20 -0
- package/plugins/eslint/node_modules/lodash.clonedeep/index.js +63 -0
- package/plugins/eslint/node_modules/lodash.clonedeep/package.json +23 -0
- package/plugins/eslint/node_modules/lodash.isplainobject/LICENSE +22 -0
- package/plugins/eslint/node_modules/lodash.isplainobject/README.md +20 -0
- package/plugins/eslint/node_modules/lodash.isplainobject/index.js +103 -0
- package/plugins/eslint/node_modules/lodash.isplainobject/package.json +24 -0
- package/plugins/eslint/node_modules/lodash.keys/LICENSE +22 -0
- package/plugins/eslint/node_modules/lodash.keys/README.md +20 -0
- package/plugins/eslint/node_modules/lodash.keys/index.js +236 -0
- package/plugins/eslint/node_modules/lodash.keys/package.json +24 -0
- package/plugins/eslint/node_modules/lodash.merge/LICENSE +22 -0
- package/plugins/eslint/node_modules/lodash.merge/README.md +20 -0
- package/plugins/eslint/node_modules/lodash.merge/index.js +266 -0
- package/plugins/eslint/node_modules/lodash.merge/package.json +32 -0
- package/plugins/eslint/node_modules/log-driver/.travis.yml +6 -0
- package/plugins/eslint/node_modules/log-driver/Makefile +20 -0
- package/plugins/eslint/node_modules/log-driver/README.md +99 -0
- package/plugins/eslint/node_modules/log-driver/coverage/coverage.json +1 -0
- package/plugins/eslint/node_modules/log-driver/coverage/lcov-report/index.html +350 -0
- package/plugins/eslint/node_modules/log-driver/coverage/lcov-report/logdriver/index.html +350 -0
- package/plugins/eslint/node_modules/log-driver/coverage/lcov-report/logdriver/index.js.html +502 -0
- package/plugins/eslint/node_modules/log-driver/coverage/lcov-report/prettify.css +1 -0
- package/plugins/eslint/node_modules/log-driver/coverage/lcov-report/prettify.js +1 -0
- package/plugins/eslint/node_modules/log-driver/coverage/lcov.info +77 -0
- package/plugins/eslint/node_modules/log-driver/index.js +60 -0
- package/plugins/eslint/node_modules/log-driver/package.json +40 -0
- package/plugins/eslint/node_modules/lolex/.min-wd +13 -0
- package/plugins/eslint/node_modules/lolex/LICENSE +27 -0
- package/plugins/eslint/node_modules/lolex/Readme.md +161 -0
- package/plugins/eslint/node_modules/lolex/lolex.js +428 -0
- package/plugins/eslint/node_modules/lolex/package.json +35 -0
- package/plugins/eslint/node_modules/lolex/src/lolex.js +422 -0
- package/plugins/eslint/node_modules/lolex/test/lolex-test.js +1089 -0
- package/plugins/eslint/node_modules/lru-cache/.travis.yml +8 -0
- package/plugins/eslint/node_modules/lru-cache/CONTRIBUTORS +14 -0
- package/plugins/eslint/node_modules/lru-cache/LICENSE +15 -0
- package/plugins/eslint/node_modules/lru-cache/README.md +137 -0
- package/plugins/eslint/node_modules/lru-cache/lib/lru-cache.js +334 -0
- package/plugins/eslint/node_modules/lru-cache/package.json +21 -0
- package/plugins/eslint/node_modules/lru-cache/test/basic.js +396 -0
- package/plugins/eslint/node_modules/lru-cache/test/foreach.js +120 -0
- package/plugins/eslint/node_modules/lru-cache/test/memory-leak.js +51 -0
- package/plugins/eslint/node_modules/lru-cache/test/serialize.js +216 -0
- package/plugins/eslint/node_modules/meow/index.js +82 -0
- package/plugins/eslint/node_modules/meow/license +21 -0
- package/plugins/eslint/node_modules/meow/node_modules/object-assign/index.js +90 -0
- package/plugins/eslint/node_modules/meow/node_modules/object-assign/license +21 -0
- package/plugins/eslint/node_modules/meow/node_modules/object-assign/package.json +42 -0
- package/plugins/eslint/node_modules/meow/node_modules/object-assign/readme.md +61 -0
- package/plugins/eslint/node_modules/meow/package.json +58 -0
- package/plugins/eslint/node_modules/meow/readme.md +159 -0
- package/plugins/eslint/node_modules/mime/LICENSE +19 -0
- package/plugins/eslint/node_modules/mime/README.md +66 -0
- package/plugins/eslint/node_modules/mime/mime.js +114 -0
- package/plugins/eslint/node_modules/mime/package.json +22 -0
- package/plugins/eslint/node_modules/mime/test.js +84 -0
- package/plugins/eslint/node_modules/mime/types/mime.types +1588 -0
- package/plugins/eslint/node_modules/mime/types/node.types +77 -0
- package/plugins/eslint/node_modules/mime-types/.travis.yml +12 -0
- package/plugins/eslint/node_modules/mime-types/LICENSE +22 -0
- package/plugins/eslint/node_modules/mime-types/Makefile +9 -0
- package/plugins/eslint/node_modules/mime-types/README.md +101 -0
- package/plugins/eslint/node_modules/mime-types/SOURCES.md +17 -0
- package/plugins/eslint/node_modules/mime-types/component.json +16 -0
- package/plugins/eslint/node_modules/mime-types/lib/custom.json +27 -0
- package/plugins/eslint/node_modules/mime-types/lib/index.js +75 -0
- package/plugins/eslint/node_modules/mime-types/lib/mime.json +3317 -0
- package/plugins/eslint/node_modules/mime-types/lib/node.json +55 -0
- package/plugins/eslint/node_modules/mime-types/package.json +34 -0
- package/plugins/eslint/node_modules/minimatch/LICENSE +15 -0
- package/plugins/eslint/node_modules/minimatch/README.md +216 -0
- package/plugins/eslint/node_modules/minimatch/browser.js +1159 -0
- package/plugins/eslint/node_modules/minimatch/minimatch.js +912 -0
- package/plugins/eslint/node_modules/minimatch/package.json +32 -0
- package/plugins/eslint/node_modules/mkdirp/LICENSE +21 -0
- package/plugins/eslint/node_modules/mkdirp/index.js +99 -0
- package/plugins/eslint/node_modules/mkdirp/package.json +34 -0
- package/plugins/eslint/node_modules/mkdirp/readme.markdown +100 -0
- package/plugins/eslint/node_modules/mocha/CHANGELOG.md +1262 -0
- package/plugins/eslint/node_modules/mocha/LICENSE +22 -0
- package/plugins/eslint/node_modules/mocha/images/error.png +0 -0
- package/plugins/eslint/node_modules/mocha/images/ok.png +0 -0
- package/plugins/eslint/node_modules/mocha/index.js +3 -0
- package/plugins/eslint/node_modules/mocha/lib/browser/debug.js +4 -0
- package/plugins/eslint/node_modules/mocha/lib/browser/events.js +193 -0
- package/plugins/eslint/node_modules/mocha/lib/browser/progress.js +117 -0
- package/plugins/eslint/node_modules/mocha/lib/browser/tty.js +11 -0
- package/plugins/eslint/node_modules/mocha/lib/context.js +104 -0
- package/plugins/eslint/node_modules/mocha/lib/hook.js +46 -0
- package/plugins/eslint/node_modules/mocha/lib/interfaces/bdd.js +117 -0
- package/plugins/eslint/node_modules/mocha/lib/interfaces/common.js +85 -0
- package/plugins/eslint/node_modules/mocha/lib/interfaces/exports.js +61 -0
- package/plugins/eslint/node_modules/mocha/lib/interfaces/index.js +4 -0
- package/plugins/eslint/node_modules/mocha/lib/interfaces/qunit.js +94 -0
- package/plugins/eslint/node_modules/mocha/lib/interfaces/tdd.js +106 -0
- package/plugins/eslint/node_modules/mocha/lib/mocha.js +503 -0
- package/plugins/eslint/node_modules/mocha/lib/ms.js +128 -0
- package/plugins/eslint/node_modules/mocha/lib/pending.js +15 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/base.js +487 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/doc.js +62 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/dot.js +66 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/html-cov.js +56 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/html.js +343 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/index.js +19 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/json-cov.js +151 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/json-stream.js +60 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/json.js +90 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/landing.js +92 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/list.js +61 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/markdown.js +97 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/min.js +36 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/nyan.js +261 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/progress.js +89 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/spec.js +83 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/tap.js +68 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/templates/coverage.jade +51 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/templates/menu.jade +13 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/templates/script.html +34 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/templates/style.html +324 -0
- package/plugins/eslint/node_modules/mocha/lib/reporters/xunit.js +166 -0
- package/plugins/eslint/node_modules/mocha/lib/runnable.js +363 -0
- package/plugins/eslint/node_modules/mocha/lib/runner.js +894 -0
- package/plugins/eslint/node_modules/mocha/lib/suite.js +395 -0
- package/plugins/eslint/node_modules/mocha/lib/template.html +18 -0
- package/plugins/eslint/node_modules/mocha/lib/test.js +44 -0
- package/plugins/eslint/node_modules/mocha/lib/utils.js +750 -0
- package/plugins/eslint/node_modules/mocha/mocha.css +314 -0
- package/plugins/eslint/node_modules/mocha/mocha.js +13149 -0
- package/plugins/eslint/node_modules/mocha/node_modules/escape-string-regexp/index.js +11 -0
- package/plugins/eslint/node_modules/mocha/node_modules/escape-string-regexp/package.json +36 -0
- package/plugins/eslint/node_modules/mocha/node_modules/escape-string-regexp/readme.md +27 -0
- package/plugins/eslint/node_modules/mocha/node_modules/minimist/.travis.yml +4 -0
- package/plugins/eslint/node_modules/mocha/node_modules/minimist/LICENSE +18 -0
- package/plugins/eslint/node_modules/mocha/node_modules/minimist/example/parse.js +2 -0
- package/plugins/eslint/node_modules/mocha/node_modules/minimist/index.js +187 -0
- package/plugins/eslint/node_modules/mocha/node_modules/minimist/package.json +40 -0
- package/plugins/eslint/node_modules/mocha/node_modules/minimist/readme.markdown +73 -0
- package/plugins/eslint/node_modules/mocha/node_modules/minimist/test/dash.js +24 -0
- package/plugins/eslint/node_modules/mocha/node_modules/minimist/test/default_bool.js +20 -0
- package/plugins/eslint/node_modules/mocha/node_modules/minimist/test/dotted.js +16 -0
- package/plugins/eslint/node_modules/mocha/node_modules/minimist/test/long.js +31 -0
- package/plugins/eslint/node_modules/mocha/node_modules/minimist/test/parse.js +318 -0
- package/plugins/eslint/node_modules/mocha/node_modules/minimist/test/parse_modified.js +9 -0
- package/plugins/eslint/node_modules/mocha/node_modules/minimist/test/short.js +67 -0
- package/plugins/eslint/node_modules/mocha/node_modules/minimist/test/whitespace.js +8 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/.travis.yml +8 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/LICENSE +21 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/examples/pow.js +6 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/index.js +98 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/package.json +27 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/readme.markdown +100 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/test/chmod.js +41 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/test/clobber.js +38 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/test/mkdirp.js +28 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/test/opts_fs.js +29 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/test/opts_fs_sync.js +27 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/test/perm.js +32 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/test/perm_sync.js +36 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/test/race.js +37 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/test/rel.js +32 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/test/return.js +25 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/test/return_sync.js +24 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/test/root.js +19 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/test/sync.js +32 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/test/umask.js +28 -0
- package/plugins/eslint/node_modules/mocha/node_modules/mkdirp/test/umask_sync.js +32 -0
- package/plugins/eslint/node_modules/mocha/node_modules/supports-color/cli.js +29 -0
- package/plugins/eslint/node_modules/mocha/node_modules/supports-color/index.js +39 -0
- package/plugins/eslint/node_modules/mocha/node_modules/supports-color/package.json +51 -0
- package/plugins/eslint/node_modules/mocha/node_modules/supports-color/readme.md +44 -0
- package/plugins/eslint/node_modules/mocha/package.json +374 -0
- package/plugins/eslint/node_modules/ms/LICENSE +20 -0
- package/plugins/eslint/node_modules/ms/README.md +35 -0
- package/plugins/eslint/node_modules/ms/index.js +125 -0
- package/plugins/eslint/node_modules/ms/package.json +20 -0
- package/plugins/eslint/node_modules/oauth-sign/LICENSE +55 -0
- package/plugins/eslint/node_modules/oauth-sign/README.md +4 -0
- package/plugins/eslint/node_modules/oauth-sign/index.js +43 -0
- package/plugins/eslint/node_modules/oauth-sign/package.json +19 -0
- package/plugins/eslint/node_modules/oauth-sign/test.js +49 -0
- package/plugins/eslint/node_modules/object-assign/index.js +26 -0
- package/plugins/eslint/node_modules/object-assign/license +21 -0
- package/plugins/eslint/node_modules/object-assign/package.json +38 -0
- package/plugins/eslint/node_modules/object-assign/readme.md +51 -0
- package/plugins/eslint/node_modules/optionator/LICENSE +22 -0
- package/plugins/eslint/node_modules/optionator/README.md +200 -0
- package/plugins/eslint/node_modules/optionator/lib/coerce.js +367 -0
- package/plugins/eslint/node_modules/optionator/lib/help.js +242 -0
- package/plugins/eslint/node_modules/optionator/lib/index.js +417 -0
- package/plugins/eslint/node_modules/optionator/lib/parse-type.js +143 -0
- package/plugins/eslint/node_modules/optionator/lib/util.js +46 -0
- package/plugins/eslint/node_modules/optionator/node_modules/wordwrap/LICENSE +18 -0
- package/plugins/eslint/node_modules/optionator/node_modules/wordwrap/README.markdown +70 -0
- package/plugins/eslint/node_modules/optionator/node_modules/wordwrap/example/center.js +10 -0
- package/plugins/eslint/node_modules/optionator/node_modules/wordwrap/example/meat.js +3 -0
- package/plugins/eslint/node_modules/optionator/node_modules/wordwrap/index.js +76 -0
- package/plugins/eslint/node_modules/optionator/node_modules/wordwrap/package.json +37 -0
- package/plugins/eslint/node_modules/optionator/node_modules/wordwrap/test/break.js +30 -0
- package/plugins/eslint/node_modules/optionator/node_modules/wordwrap/test/idleness.txt +63 -0
- package/plugins/eslint/node_modules/optionator/node_modules/wordwrap/test/wrap.js +31 -0
- package/plugins/eslint/node_modules/optionator/package.json +44 -0
- package/plugins/eslint/node_modules/prelude-ls/CHANGELOG.md +99 -0
- package/plugins/eslint/node_modules/prelude-ls/LICENSE +22 -0
- package/plugins/eslint/node_modules/prelude-ls/README.md +15 -0
- package/plugins/eslint/node_modules/prelude-ls/lib/Func.js +65 -0
- package/plugins/eslint/node_modules/prelude-ls/lib/List.js +686 -0
- package/plugins/eslint/node_modules/prelude-ls/lib/Num.js +130 -0
- package/plugins/eslint/node_modules/prelude-ls/lib/Obj.js +154 -0
- package/plugins/eslint/node_modules/prelude-ls/lib/Str.js +92 -0
- package/plugins/eslint/node_modules/prelude-ls/lib/index.js +178 -0
- package/plugins/eslint/node_modules/prelude-ls/package.json +52 -0
- package/plugins/eslint/node_modules/qs/.jshintignore +1 -0
- package/plugins/eslint/node_modules/qs/.jshintrc +10 -0
- package/plugins/eslint/node_modules/qs/.travis.yml +4 -0
- package/plugins/eslint/node_modules/qs/LICENSE +28 -0
- package/plugins/eslint/node_modules/qs/Makefile +8 -0
- package/plugins/eslint/node_modules/qs/README.md +120 -0
- package/plugins/eslint/node_modules/qs/index.js +1 -0
- package/plugins/eslint/node_modules/qs/lib/index.js +15 -0
- package/plugins/eslint/node_modules/qs/lib/parse.js +151 -0
- package/plugins/eslint/node_modules/qs/lib/stringify.js +52 -0
- package/plugins/eslint/node_modules/qs/lib/utils.js +131 -0
- package/plugins/eslint/node_modules/qs/package.json +29 -0
- package/plugins/eslint/node_modules/qs/test/parse.js +236 -0
- package/plugins/eslint/node_modules/qs/test/stringify.js +123 -0
- package/plugins/eslint/node_modules/redent/index.js +7 -0
- package/plugins/eslint/node_modules/redent/license +21 -0
- package/plugins/eslint/node_modules/redent/package.json +43 -0
- package/plugins/eslint/node_modules/redent/readme.md +48 -0
- package/plugins/eslint/node_modules/request/.travis.yml +12 -0
- package/plugins/eslint/node_modules/request/CHANGELOG.md +954 -0
- package/plugins/eslint/node_modules/request/LICENSE +55 -0
- package/plugins/eslint/node_modules/request/README.md +421 -0
- package/plugins/eslint/node_modules/request/index.js +166 -0
- package/plugins/eslint/node_modules/request/lib/cookies.js +40 -0
- package/plugins/eslint/node_modules/request/lib/copy.js +8 -0
- package/plugins/eslint/node_modules/request/lib/debug.js +7 -0
- package/plugins/eslint/node_modules/request/lib/getSafe.js +34 -0
- package/plugins/eslint/node_modules/request/lib/optional.js +5 -0
- package/plugins/eslint/node_modules/request/package.json +44 -0
- package/plugins/eslint/node_modules/request/request.js +1428 -0
- package/plugins/eslint/node_modules/resolve/.travis.yml +4 -0
- package/plugins/eslint/node_modules/resolve/LICENSE +18 -0
- package/plugins/eslint/node_modules/resolve/example/async.js +5 -0
- package/plugins/eslint/node_modules/resolve/example/sync.js +3 -0
- package/plugins/eslint/node_modules/resolve/index.js +5 -0
- package/plugins/eslint/node_modules/resolve/lib/async.js +192 -0
- package/plugins/eslint/node_modules/resolve/lib/caller.js +8 -0
- package/plugins/eslint/node_modules/resolve/lib/core.js +4 -0
- package/plugins/eslint/node_modules/resolve/lib/core.json +38 -0
- package/plugins/eslint/node_modules/resolve/lib/node-modules-paths.js +38 -0
- package/plugins/eslint/node_modules/resolve/lib/sync.js +81 -0
- package/plugins/eslint/node_modules/resolve/package.json +29 -0
- package/plugins/eslint/node_modules/resolve/readme.markdown +148 -0
- package/plugins/eslint/node_modules/resolve/test/core.js +12 -0
- package/plugins/eslint/node_modules/resolve/test/dotdot/abc/index.js +2 -0
- package/plugins/eslint/node_modules/resolve/test/dotdot/index.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/dotdot.js +29 -0
- package/plugins/eslint/node_modules/resolve/test/faulty_basedir.js +17 -0
- package/plugins/eslint/node_modules/resolve/test/filter.js +18 -0
- package/plugins/eslint/node_modules/resolve/test/filter_sync.js +15 -0
- package/plugins/eslint/node_modules/resolve/test/mock.js +142 -0
- package/plugins/eslint/node_modules/resolve/test/mock_sync.js +68 -0
- package/plugins/eslint/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +3 -0
- package/plugins/eslint/node_modules/resolve/test/module_dir.js +56 -0
- package/plugins/eslint/node_modules/resolve/test/node_path/x/aaa/index.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/node_path/x/ccc/index.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/node_path/y/bbb/index.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/node_path/y/ccc/index.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/node_path.js +48 -0
- package/plugins/eslint/node_modules/resolve/test/nonstring.js +9 -0
- package/plugins/eslint/node_modules/resolve/test/pathfilter/deep_ref/main.js +0 -0
- package/plugins/eslint/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/alt.js +0 -0
- package/plugins/eslint/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/deeper/ref.js +0 -0
- package/plugins/eslint/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/package.json +4 -0
- package/plugins/eslint/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/ref.js +0 -0
- package/plugins/eslint/node_modules/resolve/test/pathfilter.js +35 -0
- package/plugins/eslint/node_modules/resolve/test/precedence/aaa/index.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/precedence/aaa/main.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/precedence/aaa.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/precedence/bbb/main.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/precedence/bbb.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/precedence.js +23 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/baz/doom.js +0 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/baz/package.json +3 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/baz/quux.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json +3 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/cup.coffee +1 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/foo.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/incorrect_main/index.js +2 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/incorrect_main/package.json +3 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/mug.coffee +0 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/mug.js +0 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/punycode/node_modules/punycode/index.js +0 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/quux/foo/index.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/without_basedir/main.js +6 -0
- package/plugins/eslint/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js +1 -0
- package/plugins/eslint/node_modules/resolve/test/resolver.js +281 -0
- package/plugins/eslint/node_modules/resolve/test/resolver_sync.js +180 -0
- package/plugins/eslint/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json +1 -0
- package/plugins/eslint/node_modules/resolve/test/subdirs/node_modules/a/package.json +1 -0
- package/plugins/eslint/node_modules/resolve/test/subdirs.js +13 -0
- package/plugins/eslint/node_modules/semver/.travis.yml +5 -0
- package/plugins/eslint/node_modules/semver/LICENSE +15 -0
- package/plugins/eslint/node_modules/semver/Makefile +24 -0
- package/plugins/eslint/node_modules/semver/README.md +303 -0
- package/plugins/eslint/node_modules/semver/foot.js.txt +6 -0
- package/plugins/eslint/node_modules/semver/head.js.txt +2 -0
- package/plugins/eslint/node_modules/semver/package.json +21 -0
- package/plugins/eslint/node_modules/semver/semver.browser.js +1201 -0
- package/plugins/eslint/node_modules/semver/semver.browser.js.gz +0 -0
- package/plugins/eslint/node_modules/semver/semver.js +1205 -0
- package/plugins/eslint/node_modules/semver/semver.min.js +1 -0
- package/plugins/eslint/node_modules/semver/semver.min.js.gz +0 -0
- package/plugins/eslint/node_modules/semver/test/amd.js +15 -0
- package/plugins/eslint/node_modules/semver/test/big-numbers.js +31 -0
- package/plugins/eslint/node_modules/semver/test/clean.js +29 -0
- package/plugins/eslint/node_modules/semver/test/gtr.js +173 -0
- package/plugins/eslint/node_modules/semver/test/index.js +685 -0
- package/plugins/eslint/node_modules/semver/test/ltr.js +181 -0
- package/plugins/eslint/node_modules/semver/test/major-minor-patch.js +72 -0
- package/plugins/eslint/node_modules/semver/test/no-module.js +19 -0
- package/plugins/eslint/node_modules/shelljs/.documentup.json +6 -0
- package/plugins/eslint/node_modules/shelljs/.jshintrc +7 -0
- package/plugins/eslint/node_modules/shelljs/.travis.yml +5 -0
- package/plugins/eslint/node_modules/shelljs/LICENSE +26 -0
- package/plugins/eslint/node_modules/shelljs/README.md +569 -0
- package/plugins/eslint/node_modules/shelljs/global.js +3 -0
- package/plugins/eslint/node_modules/shelljs/make.js +47 -0
- package/plugins/eslint/node_modules/shelljs/package.json +35 -0
- package/plugins/eslint/node_modules/shelljs/scripts/generate-docs.js +21 -0
- package/plugins/eslint/node_modules/shelljs/scripts/run-tests.js +50 -0
- package/plugins/eslint/node_modules/shelljs/shell.js +157 -0
- package/plugins/eslint/node_modules/shelljs/src/cat.js +43 -0
- package/plugins/eslint/node_modules/shelljs/src/cd.js +19 -0
- package/plugins/eslint/node_modules/shelljs/src/chmod.js +208 -0
- package/plugins/eslint/node_modules/shelljs/src/common.js +203 -0
- package/plugins/eslint/node_modules/shelljs/src/cp.js +201 -0
- package/plugins/eslint/node_modules/shelljs/src/dirs.js +191 -0
- package/plugins/eslint/node_modules/shelljs/src/echo.js +20 -0
- package/plugins/eslint/node_modules/shelljs/src/error.js +10 -0
- package/plugins/eslint/node_modules/shelljs/src/exec.js +181 -0
- package/plugins/eslint/node_modules/shelljs/src/find.js +51 -0
- package/plugins/eslint/node_modules/shelljs/src/grep.js +52 -0
- package/plugins/eslint/node_modules/shelljs/src/ln.js +53 -0
- package/plugins/eslint/node_modules/shelljs/src/ls.js +126 -0
- package/plugins/eslint/node_modules/shelljs/src/mkdir.js +68 -0
- package/plugins/eslint/node_modules/shelljs/src/mv.js +80 -0
- package/plugins/eslint/node_modules/shelljs/src/popd.js +1 -0
- package/plugins/eslint/node_modules/shelljs/src/pushd.js +1 -0
- package/plugins/eslint/node_modules/shelljs/src/pwd.js +11 -0
- package/plugins/eslint/node_modules/shelljs/src/rm.js +145 -0
- package/plugins/eslint/node_modules/shelljs/src/sed.js +43 -0
- package/plugins/eslint/node_modules/shelljs/src/tempdir.js +56 -0
- package/plugins/eslint/node_modules/shelljs/src/test.js +85 -0
- package/plugins/eslint/node_modules/shelljs/src/to.js +29 -0
- package/plugins/eslint/node_modules/shelljs/src/toEnd.js +29 -0
- package/plugins/eslint/node_modules/shelljs/src/which.js +83 -0
- package/plugins/eslint/node_modules/sinon/.editorconfig +17 -0
- package/plugins/eslint/node_modules/sinon/.jscsrc +13 -0
- package/plugins/eslint/node_modules/sinon/CONTRIBUTING.md +124 -0
- package/plugins/eslint/node_modules/sinon/GPATH +0 -0
- package/plugins/eslint/node_modules/sinon/GRTAGS +0 -0
- package/plugins/eslint/node_modules/sinon/GSYMS +0 -0
- package/plugins/eslint/node_modules/sinon/GTAGS +0 -0
- package/plugins/eslint/node_modules/sinon/LICENSE +27 -0
- package/plugins/eslint/node_modules/sinon/README.md +46 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/assert.js +214 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/behavior.js +359 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/call.js +219 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/collection.js +167 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/extend.js +103 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/format.js +88 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/log_error.js +68 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/match.js +254 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/mock.js +456 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/sandbox.js +162 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/spy.js +454 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/stub.js +180 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/test.js +101 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/test_case.js +103 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/times_in_words.js +43 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/typeOf.js +50 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/util/core.js +390 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/util/event.js +111 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/util/fake_server.js +240 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/util/fake_server_with_clock.js +101 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/util/fake_timers.js +77 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/util/fake_xdomain_request.js +223 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/util/fake_xml_http_request.js +620 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/util/timers_ie.js +30 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/util/xdr_ie.js +13 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon/util/xhr_ie.js +18 -0
- package/plugins/eslint/node_modules/sinon/lib/sinon.js +46 -0
- package/plugins/eslint/node_modules/sinon/package.json +44 -0
- package/plugins/eslint/node_modules/sinon/pkg/sinon-1.14.1.js +5931 -0
- package/plugins/eslint/node_modules/sinon/pkg/sinon-ie-1.14.1.js +97 -0
- package/plugins/eslint/node_modules/sinon/pkg/sinon-ie.js +97 -0
- package/plugins/eslint/node_modules/sinon/pkg/sinon-server-1.14.1.js +2104 -0
- package/plugins/eslint/node_modules/sinon/pkg/sinon-timers-1.14.1.js +111 -0
- package/plugins/eslint/node_modules/sinon/pkg/sinon-timers-ie-1.14.1.js +65 -0
- package/plugins/eslint/node_modules/sinon/pkg/sinon.js +5931 -0
- package/plugins/eslint/node_modules/source-map/.travis.yml +4 -0
- package/plugins/eslint/node_modules/source-map/CHANGELOG.md +201 -0
- package/plugins/eslint/node_modules/source-map/LICENSE +28 -0
- package/plugins/eslint/node_modules/source-map/Makefile.dryice.js +166 -0
- package/plugins/eslint/node_modules/source-map/README.md +479 -0
- package/plugins/eslint/node_modules/source-map/lib/source-map/array-set.js +97 -0
- package/plugins/eslint/node_modules/source-map/lib/source-map/base64-vlq.js +142 -0
- package/plugins/eslint/node_modules/source-map/lib/source-map/base64.js +42 -0
- package/plugins/eslint/node_modules/source-map/lib/source-map/basic-source-map-consumer.js +420 -0
- package/plugins/eslint/node_modules/source-map/lib/source-map/binary-search.js +80 -0
- package/plugins/eslint/node_modules/source-map/lib/source-map/indexed-source-map-consumer.js +303 -0
- package/plugins/eslint/node_modules/source-map/lib/source-map/mapping-list.js +86 -0
- package/plugins/eslint/node_modules/source-map/lib/source-map/source-map-consumer.js +222 -0
- package/plugins/eslint/node_modules/source-map/lib/source-map/source-map-generator.js +400 -0
- package/plugins/eslint/node_modules/source-map/lib/source-map/source-node.js +414 -0
- package/plugins/eslint/node_modules/source-map/lib/source-map/util.js +319 -0
- package/plugins/eslint/node_modules/source-map/lib/source-map.js +8 -0
- package/plugins/eslint/node_modules/source-map/package.json +66 -0
- package/plugins/eslint/node_modules/source-map/test/run-tests.js +62 -0
- package/plugins/eslint/node_modules/source-map/test/source-map/test-api.js +26 -0
- package/plugins/eslint/node_modules/source-map/test/source-map/test-array-set.js +104 -0
- package/plugins/eslint/node_modules/source-map/test/source-map/test-base64-vlq.js +23 -0
- package/plugins/eslint/node_modules/source-map/test/source-map/test-base64.js +35 -0
- package/plugins/eslint/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
- package/plugins/eslint/node_modules/source-map/test/source-map/test-dog-fooding.js +84 -0
- package/plugins/eslint/node_modules/source-map/test/source-map/test-source-map-consumer.js +874 -0
- package/plugins/eslint/node_modules/source-map/test/source-map/test-source-map-generator.js +679 -0
- package/plugins/eslint/node_modules/source-map/test/source-map/test-source-node.js +612 -0
- package/plugins/eslint/node_modules/source-map/test/source-map/test-util.js +216 -0
- package/plugins/eslint/node_modules/source-map/test/source-map/util.js +299 -0
- package/plugins/eslint/node_modules/strip-ansi/index.js +6 -0
- package/plugins/eslint/node_modules/strip-ansi/license +21 -0
- package/plugins/eslint/node_modules/strip-ansi/node_modules/ansi-regex/index.js +4 -0
- package/plugins/eslint/node_modules/strip-ansi/node_modules/ansi-regex/license +21 -0
- package/plugins/eslint/node_modules/strip-ansi/node_modules/ansi-regex/package.json +64 -0
- package/plugins/eslint/node_modules/strip-ansi/node_modules/ansi-regex/readme.md +39 -0
- package/plugins/eslint/node_modules/strip-ansi/package.json +57 -0
- package/plugins/eslint/node_modules/strip-ansi/readme.md +33 -0
- package/plugins/eslint/node_modules/strip-indent/cli.js +49 -0
- package/plugins/eslint/node_modules/strip-indent/index.js +16 -0
- package/plugins/eslint/node_modules/strip-indent/license +21 -0
- package/plugins/eslint/node_modules/strip-indent/package.json +46 -0
- package/plugins/eslint/node_modules/strip-indent/readme.md +61 -0
- package/plugins/eslint/node_modules/strip-json-comments/cli.js +41 -0
- package/plugins/eslint/node_modules/strip-json-comments/license +21 -0
- package/plugins/eslint/node_modules/strip-json-comments/package.json +46 -0
- package/plugins/eslint/node_modules/strip-json-comments/readme.md +80 -0
- package/plugins/eslint/node_modules/strip-json-comments/strip-json-comments.js +73 -0
- package/plugins/eslint/node_modules/supports-color/index.js +50 -0
- package/plugins/eslint/node_modules/supports-color/license +21 -0
- package/plugins/eslint/node_modules/supports-color/package.json +49 -0
- package/plugins/eslint/node_modules/supports-color/readme.md +36 -0
- package/plugins/eslint/node_modules/trim-newlines/index.js +13 -0
- package/plugins/eslint/node_modules/trim-newlines/license +21 -0
- package/plugins/eslint/node_modules/trim-newlines/package.json +42 -0
- package/plugins/eslint/node_modules/trim-newlines/readme.md +46 -0
- package/plugins/eslint/node_modules/tunnel-agent/LICENSE +55 -0
- package/plugins/eslint/node_modules/tunnel-agent/README.md +4 -0
- package/plugins/eslint/node_modules/tunnel-agent/index.js +243 -0
- package/plugins/eslint/node_modules/tunnel-agent/package.json +20 -0
- package/plugins/eslint/node_modules/type-check/LICENSE +22 -0
- package/plugins/eslint/node_modules/type-check/README.md +210 -0
- package/plugins/eslint/node_modules/type-check/lib/check.js +126 -0
- package/plugins/eslint/node_modules/type-check/lib/index.js +16 -0
- package/plugins/eslint/node_modules/type-check/lib/parse-type.js +196 -0
- package/plugins/eslint/node_modules/type-check/package.json +40 -0
- package/plugins/eslint/node_modules/type-detect/History.md +18 -0
- package/plugins/eslint/node_modules/type-detect/README.md +193 -0
- package/plugins/eslint/node_modules/type-detect/index.js +1 -0
- package/plugins/eslint/node_modules/type-detect/lib/type.js +142 -0
- package/plugins/eslint/node_modules/type-detect/package.json +31 -0
- package/plugins/eslint/node_modules/underscore/LICENSE +23 -0
- package/plugins/eslint/node_modules/underscore/README.md +22 -0
- package/plugins/eslint/node_modules/underscore/package.json +41 -0
- package/plugins/eslint/node_modules/underscore/underscore-min.js +6 -0
- package/plugins/eslint/node_modules/underscore/underscore.js +1415 -0
- package/plugins/eslint/node_modules/which/CHANGELOG.md +152 -0
- package/plugins/eslint/node_modules/which/LICENSE +15 -0
- package/plugins/eslint/node_modules/which/README.md +51 -0
- package/plugins/eslint/node_modules/which/package.json +30 -0
- package/plugins/eslint/node_modules/which/which.js +135 -0
- package/plugins/pbjsGlobals.js +1 -1
- package/src/adapterManager.js +24 -19
- package/src/adapters/bidderFactory.js +155 -131
- package/src/adloader.js +3 -1
- package/src/auction.js +111 -123
- package/src/auctionIndex.js +85 -0
- package/src/auctionManager.js +3 -0
- package/src/bidderSettings.js +69 -0
- package/src/bidfactory.js +18 -6
- package/src/debugging.js +31 -19
- package/src/native.js +29 -21
- package/src/secureCreatives.js +26 -12
- package/src/targeting.js +11 -2
- package/src/utils.js +24 -17
- package/src/video.js +10 -11
- package/src/videoCache.js +10 -9
- package/test/fixtures/fixtures.js +2 -1
- package/test/helpers/indexStub.js +28 -0
- package/test/spec/auctionmanager_spec.js +145 -98
- package/test/spec/config_spec.js +24 -1
- package/test/spec/debugging_spec.js +29 -6
- package/test/spec/modules/adnuntiusRtdProvider_spec.js +145 -0
- package/test/spec/modules/adotBidAdapter_spec.js +294 -3124
- package/test/spec/modules/adpod_spec.js +91 -156
- package/test/spec/modules/adyoulikeBidAdapter_spec.js +15 -1
- package/test/spec/modules/asealBidAdapter_spec.js +144 -0
- package/test/spec/modules/automatadBidAdapter_spec.js +23 -7
- package/test/spec/modules/big-richmediaBidAdapter_spec.js +310 -0
- package/test/spec/modules/bizzclickBidAdapter_spec.js +16 -0
- package/test/spec/modules/conversantBidAdapter_spec.js +54 -2
- package/test/spec/modules/currency_spec.js +15 -9
- package/test/spec/modules/debugging_mod_spec.js +451 -0
- package/test/spec/modules/dspxBidAdapter_spec.js +20 -15
- package/test/spec/modules/eids_spec.js +2 -2
- package/test/spec/modules/fluctBidAdapter_spec.js +92 -0
- package/test/spec/modules/gridBidAdapter_spec.js +44 -0
- package/test/spec/modules/gumgumBidAdapter_spec.js +3 -3
- package/test/spec/modules/hadronIdSystem_spec.js +57 -0
- package/test/spec/modules/hadronRtdProvider_spec.js +762 -0
- package/test/spec/modules/imRtdProvider_spec.js +30 -1
- package/test/spec/modules/improvedigitalBidAdapter_spec.js +19 -0
- package/test/spec/modules/iqzoneBidAdapter_spec.js +1 -0
- package/test/spec/modules/ixBidAdapter_spec.js +75 -2
- package/test/spec/modules/justIdSystem_spec.js +216 -0
- package/test/spec/modules/kubientBidAdapter_spec.js +183 -87
- package/test/spec/modules/lkqdBidAdapter_spec.js +323 -0
- package/test/spec/modules/lunamediahbBidAdapter_spec.js +27 -1
- package/test/spec/modules/mass_spec.js +2 -14
- package/test/spec/modules/mediakeysBidAdapter_spec.js +9 -5
- package/test/spec/modules/mediasquareBidAdapter_spec.js +25 -1
- package/test/spec/modules/nexx360BidAdapter_spec.js +140 -0
- package/test/spec/modules/novatiqIdSystem_spec.js +18 -0
- package/test/spec/modules/oguryBidAdapter_spec.js +63 -5
- package/test/spec/modules/prebidServerBidAdapter_spec.js +43 -6
- package/test/spec/modules/priceFloors_spec.js +83 -24
- package/test/spec/modules/pubmaticBidAdapter_spec.js +40 -0
- package/test/spec/modules/riseBidAdapter_spec.js +30 -4
- package/test/spec/modules/rubiconAnalyticsAdapter_spec.js +31 -1
- package/test/spec/modules/rubiconBidAdapter_spec.js +1 -1
- package/test/spec/modules/sortableAnalyticsAdapter_spec.js +2 -3
- package/test/spec/modules/sspBCBidAdapter_spec.js +7 -7
- package/test/spec/modules/telariaBidAdapter_spec.js +1 -3
- package/test/spec/modules/trustpidSystem_spec.js +232 -0
- package/test/spec/modules/trustxBidAdapter_spec.js +33 -0
- package/test/spec/modules/userId_spec.js +39 -39
- package/test/spec/modules/vibrantmediaBidAdapter_spec.js +1237 -0
- package/test/spec/modules/vidazooBidAdapter_spec.js +3 -1
- package/test/spec/modules/vidoomyBidAdapter_spec.js +7 -1
- package/test/spec/modules/weboramaRtdProvider_spec.js +536 -20
- package/test/spec/modules/yieldoneBidAdapter_spec.js +33 -0
- package/test/spec/native_spec.js +62 -40
- package/test/spec/unit/core/adapterManager_spec.js +22 -0
- package/test/spec/unit/core/auctionIndex_spec.js +129 -0
- package/test/spec/unit/core/bidderFactory_spec.js +65 -12
- package/test/spec/unit/core/bidderSettings_spec.js +123 -0
- package/test/spec/unit/core/targeting_spec.js +93 -0
- package/test/spec/unit/pbjs_api_spec.js +63 -41
- package/test/spec/unit/secureCreatives_spec.js +66 -32
- package/test/spec/utils_spec.js +8 -1
- package/test/spec/videoCache_spec.js +18 -19
- package/test/spec/video_spec.js +51 -61
|
@@ -0,0 +1,2578 @@
|
|
|
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) {
|
|
984
|
+
var result = [];
|
|
985
|
+
|
|
986
|
+
if (computed) {
|
|
987
|
+
result.push('[');
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
result.push(this.generateExpression(expr, Precedence.Sequence, E_TTT));
|
|
991
|
+
if (computed) {
|
|
992
|
+
result.push(']');
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
return result;
|
|
996
|
+
};
|
|
997
|
+
|
|
998
|
+
CodeGenerator.prototype.generateAssignment = function (left, right, operator, precedence, flags) {
|
|
999
|
+
if (Precedence.Assignment < precedence) {
|
|
1000
|
+
flags |= F_ALLOW_IN;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
return parenthesize(
|
|
1004
|
+
[
|
|
1005
|
+
this.generateExpression(left, Precedence.Call, flags),
|
|
1006
|
+
space + operator + space,
|
|
1007
|
+
this.generateExpression(right, Precedence.Assignment, flags)
|
|
1008
|
+
],
|
|
1009
|
+
Precedence.Assignment,
|
|
1010
|
+
precedence
|
|
1011
|
+
);
|
|
1012
|
+
};
|
|
1013
|
+
|
|
1014
|
+
CodeGenerator.prototype.semicolon = function (flags) {
|
|
1015
|
+
if (!semicolons && flags & F_SEMICOLON_OPT) {
|
|
1016
|
+
return '';
|
|
1017
|
+
}
|
|
1018
|
+
return ';';
|
|
1019
|
+
};
|
|
1020
|
+
|
|
1021
|
+
// Statements.
|
|
1022
|
+
|
|
1023
|
+
CodeGenerator.Statement = {
|
|
1024
|
+
|
|
1025
|
+
BlockStatement: function (stmt, flags) {
|
|
1026
|
+
var range, content, result = ['{', newline], that = this;
|
|
1027
|
+
|
|
1028
|
+
withIndent(function () {
|
|
1029
|
+
// handle functions without any code
|
|
1030
|
+
if (stmt.body.length === 0 && preserveBlankLines) {
|
|
1031
|
+
range = stmt.range;
|
|
1032
|
+
if (range[1] - range[0] > 2) {
|
|
1033
|
+
content = sourceCode.substring(range[0] + 1, range[1] - 1);
|
|
1034
|
+
if (content[0] === '\n') {
|
|
1035
|
+
result = ['{'];
|
|
1036
|
+
}
|
|
1037
|
+
result.push(content);
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
var i, iz, fragment, bodyFlags;
|
|
1042
|
+
bodyFlags = S_TFFF;
|
|
1043
|
+
if (flags & F_FUNC_BODY) {
|
|
1044
|
+
bodyFlags |= F_DIRECTIVE_CTX;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
for (i = 0, iz = stmt.body.length; i < iz; ++i) {
|
|
1048
|
+
if (preserveBlankLines) {
|
|
1049
|
+
// handle spaces before the first line
|
|
1050
|
+
if (i === 0) {
|
|
1051
|
+
if (stmt.body[0].leadingComments) {
|
|
1052
|
+
range = stmt.body[0].leadingComments[0].extendedRange;
|
|
1053
|
+
content = sourceCode.substring(range[0], range[1]);
|
|
1054
|
+
if (content[0] === '\n') {
|
|
1055
|
+
result = ['{'];
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
if (!stmt.body[0].leadingComments) {
|
|
1059
|
+
generateBlankLines(stmt.range[0], stmt.body[0].range[0], result);
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
// handle spaces between lines
|
|
1064
|
+
if (i > 0) {
|
|
1065
|
+
if (!stmt.body[i - 1].trailingComments && !stmt.body[i].leadingComments) {
|
|
1066
|
+
generateBlankLines(stmt.body[i - 1].range[1], stmt.body[i].range[0], result);
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
if (i === iz - 1) {
|
|
1072
|
+
bodyFlags |= F_SEMICOLON_OPT;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
if (stmt.body[i].leadingComments && preserveBlankLines) {
|
|
1076
|
+
fragment = that.generateStatement(stmt.body[i], bodyFlags);
|
|
1077
|
+
} else {
|
|
1078
|
+
fragment = addIndent(that.generateStatement(stmt.body[i], bodyFlags));
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
result.push(fragment);
|
|
1082
|
+
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
|
|
1083
|
+
if (preserveBlankLines && i < iz - 1) {
|
|
1084
|
+
// don't add a new line if there are leading coments
|
|
1085
|
+
// in the next statement
|
|
1086
|
+
if (!stmt.body[i + 1].leadingComments) {
|
|
1087
|
+
result.push(newline);
|
|
1088
|
+
}
|
|
1089
|
+
} else {
|
|
1090
|
+
result.push(newline);
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
if (preserveBlankLines) {
|
|
1095
|
+
// handle spaces after the last line
|
|
1096
|
+
if (i === iz - 1) {
|
|
1097
|
+
if (!stmt.body[i].trailingComments) {
|
|
1098
|
+
generateBlankLines(stmt.body[i].range[1], stmt.range[1], result);
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
});
|
|
1104
|
+
|
|
1105
|
+
result.push(addIndent('}'));
|
|
1106
|
+
return result;
|
|
1107
|
+
},
|
|
1108
|
+
|
|
1109
|
+
BreakStatement: function (stmt, flags) {
|
|
1110
|
+
if (stmt.label) {
|
|
1111
|
+
return 'break ' + stmt.label.name + this.semicolon(flags);
|
|
1112
|
+
}
|
|
1113
|
+
return 'break' + this.semicolon(flags);
|
|
1114
|
+
},
|
|
1115
|
+
|
|
1116
|
+
ContinueStatement: function (stmt, flags) {
|
|
1117
|
+
if (stmt.label) {
|
|
1118
|
+
return 'continue ' + stmt.label.name + this.semicolon(flags);
|
|
1119
|
+
}
|
|
1120
|
+
return 'continue' + this.semicolon(flags);
|
|
1121
|
+
},
|
|
1122
|
+
|
|
1123
|
+
ClassBody: function (stmt, flags) {
|
|
1124
|
+
var result = [ '{', newline], that = this;
|
|
1125
|
+
|
|
1126
|
+
withIndent(function (indent) {
|
|
1127
|
+
var i, iz;
|
|
1128
|
+
|
|
1129
|
+
for (i = 0, iz = stmt.body.length; i < iz; ++i) {
|
|
1130
|
+
result.push(indent);
|
|
1131
|
+
result.push(that.generateExpression(stmt.body[i], Precedence.Sequence, E_TTT));
|
|
1132
|
+
if (i + 1 < iz) {
|
|
1133
|
+
result.push(newline);
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
});
|
|
1137
|
+
|
|
1138
|
+
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
|
|
1139
|
+
result.push(newline);
|
|
1140
|
+
}
|
|
1141
|
+
result.push(base);
|
|
1142
|
+
result.push('}');
|
|
1143
|
+
return result;
|
|
1144
|
+
},
|
|
1145
|
+
|
|
1146
|
+
ClassDeclaration: function (stmt, flags) {
|
|
1147
|
+
var result, fragment;
|
|
1148
|
+
result = ['class ' + stmt.id.name];
|
|
1149
|
+
if (stmt.superClass) {
|
|
1150
|
+
fragment = join('extends', this.generateExpression(stmt.superClass, Precedence.Assignment, E_TTT));
|
|
1151
|
+
result = join(result, fragment);
|
|
1152
|
+
}
|
|
1153
|
+
result.push(space);
|
|
1154
|
+
result.push(this.generateStatement(stmt.body, S_TFFT));
|
|
1155
|
+
return result;
|
|
1156
|
+
},
|
|
1157
|
+
|
|
1158
|
+
DirectiveStatement: function (stmt, flags) {
|
|
1159
|
+
if (extra.raw && stmt.raw) {
|
|
1160
|
+
return stmt.raw + this.semicolon(flags);
|
|
1161
|
+
}
|
|
1162
|
+
return escapeDirective(stmt.directive) + this.semicolon(flags);
|
|
1163
|
+
},
|
|
1164
|
+
|
|
1165
|
+
DoWhileStatement: function (stmt, flags) {
|
|
1166
|
+
// Because `do 42 while (cond)` is Syntax Error. We need semicolon.
|
|
1167
|
+
var result = join('do', this.maybeBlock(stmt.body, S_TFFF));
|
|
1168
|
+
result = this.maybeBlockSuffix(stmt.body, result);
|
|
1169
|
+
return join(result, [
|
|
1170
|
+
'while' + space + '(',
|
|
1171
|
+
this.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
|
|
1172
|
+
')' + this.semicolon(flags)
|
|
1173
|
+
]);
|
|
1174
|
+
},
|
|
1175
|
+
|
|
1176
|
+
CatchClause: function (stmt, flags) {
|
|
1177
|
+
var result, that = this;
|
|
1178
|
+
withIndent(function () {
|
|
1179
|
+
var guard;
|
|
1180
|
+
|
|
1181
|
+
result = [
|
|
1182
|
+
'catch' + space + '(',
|
|
1183
|
+
that.generateExpression(stmt.param, Precedence.Sequence, E_TTT),
|
|
1184
|
+
')'
|
|
1185
|
+
];
|
|
1186
|
+
|
|
1187
|
+
if (stmt.guard) {
|
|
1188
|
+
guard = that.generateExpression(stmt.guard, Precedence.Sequence, E_TTT);
|
|
1189
|
+
result.splice(2, 0, ' if ', guard);
|
|
1190
|
+
}
|
|
1191
|
+
});
|
|
1192
|
+
result.push(this.maybeBlock(stmt.body, S_TFFF));
|
|
1193
|
+
return result;
|
|
1194
|
+
},
|
|
1195
|
+
|
|
1196
|
+
DebuggerStatement: function (stmt, flags) {
|
|
1197
|
+
return 'debugger' + this.semicolon(flags);
|
|
1198
|
+
},
|
|
1199
|
+
|
|
1200
|
+
EmptyStatement: function (stmt, flags) {
|
|
1201
|
+
return ';';
|
|
1202
|
+
},
|
|
1203
|
+
|
|
1204
|
+
ExportDeclaration: function (stmt, flags) {
|
|
1205
|
+
var result = [ 'export' ], bodyFlags, that = this;
|
|
1206
|
+
|
|
1207
|
+
bodyFlags = (flags & F_SEMICOLON_OPT) ? S_TFFT : S_TFFF;
|
|
1208
|
+
|
|
1209
|
+
// export default HoistableDeclaration[Default]
|
|
1210
|
+
// export default AssignmentExpression[In] ;
|
|
1211
|
+
if (stmt['default']) {
|
|
1212
|
+
result = join(result, 'default');
|
|
1213
|
+
if (isStatement(stmt.declaration)) {
|
|
1214
|
+
result = join(result, this.generateStatement(stmt.declaration, bodyFlags));
|
|
1215
|
+
} else {
|
|
1216
|
+
result = join(result, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags));
|
|
1217
|
+
}
|
|
1218
|
+
return result;
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
// export VariableStatement
|
|
1222
|
+
// export Declaration[Default]
|
|
1223
|
+
if (stmt.declaration) {
|
|
1224
|
+
return join(result, this.generateStatement(stmt.declaration, bodyFlags));
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
// export * FromClause ;
|
|
1228
|
+
// export ExportClause[NoReference] FromClause ;
|
|
1229
|
+
// export ExportClause ;
|
|
1230
|
+
if (stmt.specifiers) {
|
|
1231
|
+
if (stmt.specifiers.length === 0) {
|
|
1232
|
+
result = join(result, '{' + space + '}');
|
|
1233
|
+
} else if (stmt.specifiers[0].type === Syntax.ExportBatchSpecifier) {
|
|
1234
|
+
result = join(result, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT));
|
|
1235
|
+
} else {
|
|
1236
|
+
result = join(result, '{');
|
|
1237
|
+
withIndent(function (indent) {
|
|
1238
|
+
var i, iz;
|
|
1239
|
+
result.push(newline);
|
|
1240
|
+
for (i = 0, iz = stmt.specifiers.length; i < iz; ++i) {
|
|
1241
|
+
result.push(indent);
|
|
1242
|
+
result.push(that.generateExpression(stmt.specifiers[i], Precedence.Sequence, E_TTT));
|
|
1243
|
+
if (i + 1 < iz) {
|
|
1244
|
+
result.push(',' + newline);
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
});
|
|
1248
|
+
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
|
|
1249
|
+
result.push(newline);
|
|
1250
|
+
}
|
|
1251
|
+
result.push(base + '}');
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
if (stmt.source) {
|
|
1255
|
+
result = join(result, [
|
|
1256
|
+
'from' + space,
|
|
1257
|
+
// ModuleSpecifier
|
|
1258
|
+
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
|
|
1259
|
+
this.semicolon(flags)
|
|
1260
|
+
]);
|
|
1261
|
+
} else {
|
|
1262
|
+
result.push(this.semicolon(flags));
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
return result;
|
|
1266
|
+
},
|
|
1267
|
+
|
|
1268
|
+
ExportDefaultDeclaration: function (stmt, flags) {
|
|
1269
|
+
stmt.default = true;
|
|
1270
|
+
return this.ExportDeclaration(stmt, flags);
|
|
1271
|
+
},
|
|
1272
|
+
|
|
1273
|
+
ExportNamedDeclaration: function (stmt, flags) {
|
|
1274
|
+
return this.ExportDeclaration(stmt, flags);
|
|
1275
|
+
},
|
|
1276
|
+
|
|
1277
|
+
ExpressionStatement: function (stmt, flags) {
|
|
1278
|
+
var result, fragment;
|
|
1279
|
+
|
|
1280
|
+
function isClassPrefixed(fragment) {
|
|
1281
|
+
var code;
|
|
1282
|
+
if (fragment.slice(0, 5) !== 'class') {
|
|
1283
|
+
return false;
|
|
1284
|
+
}
|
|
1285
|
+
code = fragment.charCodeAt(5);
|
|
1286
|
+
return code === 0x7B /* '{' */ || esutils.code.isWhiteSpace(code) || esutils.code.isLineTerminator(code);
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
function isFunctionPrefixed(fragment) {
|
|
1290
|
+
var code;
|
|
1291
|
+
if (fragment.slice(0, 8) !== 'function') {
|
|
1292
|
+
return false;
|
|
1293
|
+
}
|
|
1294
|
+
code = fragment.charCodeAt(8);
|
|
1295
|
+
return code === 0x28 /* '(' */ || esutils.code.isWhiteSpace(code) || code === 0x2A /* '*' */ || esutils.code.isLineTerminator(code);
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
function isAsyncPrefixed(fragment) {
|
|
1299
|
+
var code, i, iz;
|
|
1300
|
+
if (fragment.slice(0, 5) !== 'async') {
|
|
1301
|
+
return false;
|
|
1302
|
+
}
|
|
1303
|
+
if (!esutils.code.isWhiteSpace(fragment.charCodeAt(5))) {
|
|
1304
|
+
return false;
|
|
1305
|
+
}
|
|
1306
|
+
for (i = 6, iz = fragment.length; i < iz; ++i) {
|
|
1307
|
+
if (!esutils.code.isWhiteSpace(fragment.charCodeAt(i))) {
|
|
1308
|
+
break;
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
if (i === iz) {
|
|
1312
|
+
return false;
|
|
1313
|
+
}
|
|
1314
|
+
if (fragment.slice(i, i + 8) !== 'function') {
|
|
1315
|
+
return false;
|
|
1316
|
+
}
|
|
1317
|
+
code = fragment.charCodeAt(i + 8);
|
|
1318
|
+
return code === 0x28 /* '(' */ || esutils.code.isWhiteSpace(code) || code === 0x2A /* '*' */ || esutils.code.isLineTerminator(code);
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
result = [this.generateExpression(stmt.expression, Precedence.Sequence, E_TTT)];
|
|
1322
|
+
// 12.4 '{', 'function', 'class' is not allowed in this position.
|
|
1323
|
+
// wrap expression with parentheses
|
|
1324
|
+
fragment = toSourceNodeWhenNeeded(result).toString();
|
|
1325
|
+
if (fragment.charCodeAt(0) === 0x7B /* '{' */ || // ObjectExpression
|
|
1326
|
+
isClassPrefixed(fragment) ||
|
|
1327
|
+
isFunctionPrefixed(fragment) ||
|
|
1328
|
+
isAsyncPrefixed(fragment) ||
|
|
1329
|
+
(directive && (flags & F_DIRECTIVE_CTX) && stmt.expression.type === Syntax.Literal && typeof stmt.expression.value === 'string')) {
|
|
1330
|
+
result = ['(', result, ')' + this.semicolon(flags)];
|
|
1331
|
+
} else {
|
|
1332
|
+
result.push(this.semicolon(flags));
|
|
1333
|
+
}
|
|
1334
|
+
return result;
|
|
1335
|
+
},
|
|
1336
|
+
|
|
1337
|
+
ImportDeclaration: function (stmt, flags) {
|
|
1338
|
+
// ES6: 15.2.1 valid import declarations:
|
|
1339
|
+
// - import ImportClause FromClause ;
|
|
1340
|
+
// - import ModuleSpecifier ;
|
|
1341
|
+
var result, cursor, that = this;
|
|
1342
|
+
|
|
1343
|
+
// If no ImportClause is present,
|
|
1344
|
+
// this should be `import ModuleSpecifier` so skip `from`
|
|
1345
|
+
// ModuleSpecifier is StringLiteral.
|
|
1346
|
+
if (stmt.specifiers.length === 0) {
|
|
1347
|
+
// import ModuleSpecifier ;
|
|
1348
|
+
return [
|
|
1349
|
+
'import',
|
|
1350
|
+
space,
|
|
1351
|
+
// ModuleSpecifier
|
|
1352
|
+
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
|
|
1353
|
+
this.semicolon(flags)
|
|
1354
|
+
];
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
// import ImportClause FromClause ;
|
|
1358
|
+
result = [
|
|
1359
|
+
'import'
|
|
1360
|
+
];
|
|
1361
|
+
cursor = 0;
|
|
1362
|
+
|
|
1363
|
+
// ImportedBinding
|
|
1364
|
+
if (stmt.specifiers[cursor].type === Syntax.ImportDefaultSpecifier) {
|
|
1365
|
+
result = join(result, [
|
|
1366
|
+
this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)
|
|
1367
|
+
]);
|
|
1368
|
+
++cursor;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
if (stmt.specifiers[cursor]) {
|
|
1372
|
+
if (cursor !== 0) {
|
|
1373
|
+
result.push(',');
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
if (stmt.specifiers[cursor].type === Syntax.ImportNamespaceSpecifier) {
|
|
1377
|
+
// NameSpaceImport
|
|
1378
|
+
result = join(result, [
|
|
1379
|
+
space,
|
|
1380
|
+
this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)
|
|
1381
|
+
]);
|
|
1382
|
+
} else {
|
|
1383
|
+
// NamedImports
|
|
1384
|
+
result.push(space + '{');
|
|
1385
|
+
|
|
1386
|
+
if ((stmt.specifiers.length - cursor) === 1) {
|
|
1387
|
+
// import { ... } from "...";
|
|
1388
|
+
result.push(space);
|
|
1389
|
+
result.push(this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT));
|
|
1390
|
+
result.push(space + '}' + space);
|
|
1391
|
+
} else {
|
|
1392
|
+
// import {
|
|
1393
|
+
// ...,
|
|
1394
|
+
// ...,
|
|
1395
|
+
// } from "...";
|
|
1396
|
+
withIndent(function (indent) {
|
|
1397
|
+
var i, iz;
|
|
1398
|
+
result.push(newline);
|
|
1399
|
+
for (i = cursor, iz = stmt.specifiers.length; i < iz; ++i) {
|
|
1400
|
+
result.push(indent);
|
|
1401
|
+
result.push(that.generateExpression(stmt.specifiers[i], Precedence.Sequence, E_TTT));
|
|
1402
|
+
if (i + 1 < iz) {
|
|
1403
|
+
result.push(',' + newline);
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
});
|
|
1407
|
+
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
|
|
1408
|
+
result.push(newline);
|
|
1409
|
+
}
|
|
1410
|
+
result.push(base + '}' + space);
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
result = join(result, [
|
|
1416
|
+
'from' + space,
|
|
1417
|
+
// ModuleSpecifier
|
|
1418
|
+
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
|
|
1419
|
+
this.semicolon(flags)
|
|
1420
|
+
]);
|
|
1421
|
+
return result;
|
|
1422
|
+
},
|
|
1423
|
+
|
|
1424
|
+
VariableDeclarator: function (stmt, flags) {
|
|
1425
|
+
var itemFlags = (flags & F_ALLOW_IN) ? E_TTT : E_FTT;
|
|
1426
|
+
if (stmt.init) {
|
|
1427
|
+
return [
|
|
1428
|
+
this.generateExpression(stmt.id, Precedence.Assignment, itemFlags),
|
|
1429
|
+
space,
|
|
1430
|
+
'=',
|
|
1431
|
+
space,
|
|
1432
|
+
this.generateExpression(stmt.init, Precedence.Assignment, itemFlags)
|
|
1433
|
+
];
|
|
1434
|
+
}
|
|
1435
|
+
return this.generatePattern(stmt.id, Precedence.Assignment, itemFlags);
|
|
1436
|
+
},
|
|
1437
|
+
|
|
1438
|
+
VariableDeclaration: function (stmt, flags) {
|
|
1439
|
+
// VariableDeclarator is typed as Statement,
|
|
1440
|
+
// but joined with comma (not LineTerminator).
|
|
1441
|
+
// So if comment is attached to target node, we should specialize.
|
|
1442
|
+
var result, i, iz, node, bodyFlags, that = this;
|
|
1443
|
+
|
|
1444
|
+
result = [ stmt.kind ];
|
|
1445
|
+
|
|
1446
|
+
bodyFlags = (flags & F_ALLOW_IN) ? S_TFFF : S_FFFF;
|
|
1447
|
+
|
|
1448
|
+
function block() {
|
|
1449
|
+
node = stmt.declarations[0];
|
|
1450
|
+
if (extra.comment && node.leadingComments) {
|
|
1451
|
+
result.push('\n');
|
|
1452
|
+
result.push(addIndent(that.generateStatement(node, bodyFlags)));
|
|
1453
|
+
} else {
|
|
1454
|
+
result.push(noEmptySpace());
|
|
1455
|
+
result.push(that.generateStatement(node, bodyFlags));
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
for (i = 1, iz = stmt.declarations.length; i < iz; ++i) {
|
|
1459
|
+
node = stmt.declarations[i];
|
|
1460
|
+
if (extra.comment && node.leadingComments) {
|
|
1461
|
+
result.push(',' + newline);
|
|
1462
|
+
result.push(addIndent(that.generateStatement(node, bodyFlags)));
|
|
1463
|
+
} else {
|
|
1464
|
+
result.push(',' + space);
|
|
1465
|
+
result.push(that.generateStatement(node, bodyFlags));
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
if (stmt.declarations.length > 1) {
|
|
1471
|
+
withIndent(block);
|
|
1472
|
+
} else {
|
|
1473
|
+
block();
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
result.push(this.semicolon(flags));
|
|
1477
|
+
|
|
1478
|
+
return result;
|
|
1479
|
+
},
|
|
1480
|
+
|
|
1481
|
+
ThrowStatement: function (stmt, flags) {
|
|
1482
|
+
return [join(
|
|
1483
|
+
'throw',
|
|
1484
|
+
this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
|
|
1485
|
+
), this.semicolon(flags)];
|
|
1486
|
+
},
|
|
1487
|
+
|
|
1488
|
+
TryStatement: function (stmt, flags) {
|
|
1489
|
+
var result, i, iz, guardedHandlers;
|
|
1490
|
+
|
|
1491
|
+
result = ['try', this.maybeBlock(stmt.block, S_TFFF)];
|
|
1492
|
+
result = this.maybeBlockSuffix(stmt.block, result);
|
|
1493
|
+
|
|
1494
|
+
if (stmt.handlers) {
|
|
1495
|
+
// old interface
|
|
1496
|
+
for (i = 0, iz = stmt.handlers.length; i < iz; ++i) {
|
|
1497
|
+
result = join(result, this.generateStatement(stmt.handlers[i], S_TFFF));
|
|
1498
|
+
if (stmt.finalizer || i + 1 !== iz) {
|
|
1499
|
+
result = this.maybeBlockSuffix(stmt.handlers[i].body, result);
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
} else {
|
|
1503
|
+
guardedHandlers = stmt.guardedHandlers || [];
|
|
1504
|
+
|
|
1505
|
+
for (i = 0, iz = guardedHandlers.length; i < iz; ++i) {
|
|
1506
|
+
result = join(result, this.generateStatement(guardedHandlers[i], S_TFFF));
|
|
1507
|
+
if (stmt.finalizer || i + 1 !== iz) {
|
|
1508
|
+
result = this.maybeBlockSuffix(guardedHandlers[i].body, result);
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
// new interface
|
|
1513
|
+
if (stmt.handler) {
|
|
1514
|
+
if (isArray(stmt.handler)) {
|
|
1515
|
+
for (i = 0, iz = stmt.handler.length; i < iz; ++i) {
|
|
1516
|
+
result = join(result, this.generateStatement(stmt.handler[i], S_TFFF));
|
|
1517
|
+
if (stmt.finalizer || i + 1 !== iz) {
|
|
1518
|
+
result = this.maybeBlockSuffix(stmt.handler[i].body, result);
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
} else {
|
|
1522
|
+
result = join(result, this.generateStatement(stmt.handler, S_TFFF));
|
|
1523
|
+
if (stmt.finalizer) {
|
|
1524
|
+
result = this.maybeBlockSuffix(stmt.handler.body, result);
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
if (stmt.finalizer) {
|
|
1530
|
+
result = join(result, ['finally', this.maybeBlock(stmt.finalizer, S_TFFF)]);
|
|
1531
|
+
}
|
|
1532
|
+
return result;
|
|
1533
|
+
},
|
|
1534
|
+
|
|
1535
|
+
SwitchStatement: function (stmt, flags) {
|
|
1536
|
+
var result, fragment, i, iz, bodyFlags, that = this;
|
|
1537
|
+
withIndent(function () {
|
|
1538
|
+
result = [
|
|
1539
|
+
'switch' + space + '(',
|
|
1540
|
+
that.generateExpression(stmt.discriminant, Precedence.Sequence, E_TTT),
|
|
1541
|
+
')' + space + '{' + newline
|
|
1542
|
+
];
|
|
1543
|
+
});
|
|
1544
|
+
if (stmt.cases) {
|
|
1545
|
+
bodyFlags = S_TFFF;
|
|
1546
|
+
for (i = 0, iz = stmt.cases.length; i < iz; ++i) {
|
|
1547
|
+
if (i === iz - 1) {
|
|
1548
|
+
bodyFlags |= F_SEMICOLON_OPT;
|
|
1549
|
+
}
|
|
1550
|
+
fragment = addIndent(this.generateStatement(stmt.cases[i], bodyFlags));
|
|
1551
|
+
result.push(fragment);
|
|
1552
|
+
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
|
|
1553
|
+
result.push(newline);
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
result.push(addIndent('}'));
|
|
1558
|
+
return result;
|
|
1559
|
+
},
|
|
1560
|
+
|
|
1561
|
+
SwitchCase: function (stmt, flags) {
|
|
1562
|
+
var result, fragment, i, iz, bodyFlags, that = this;
|
|
1563
|
+
withIndent(function () {
|
|
1564
|
+
if (stmt.test) {
|
|
1565
|
+
result = [
|
|
1566
|
+
join('case', that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)),
|
|
1567
|
+
':'
|
|
1568
|
+
];
|
|
1569
|
+
} else {
|
|
1570
|
+
result = ['default:'];
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
i = 0;
|
|
1574
|
+
iz = stmt.consequent.length;
|
|
1575
|
+
if (iz && stmt.consequent[0].type === Syntax.BlockStatement) {
|
|
1576
|
+
fragment = that.maybeBlock(stmt.consequent[0], S_TFFF);
|
|
1577
|
+
result.push(fragment);
|
|
1578
|
+
i = 1;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
if (i !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
|
|
1582
|
+
result.push(newline);
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
bodyFlags = S_TFFF;
|
|
1586
|
+
for (; i < iz; ++i) {
|
|
1587
|
+
if (i === iz - 1 && flags & F_SEMICOLON_OPT) {
|
|
1588
|
+
bodyFlags |= F_SEMICOLON_OPT;
|
|
1589
|
+
}
|
|
1590
|
+
fragment = addIndent(that.generateStatement(stmt.consequent[i], bodyFlags));
|
|
1591
|
+
result.push(fragment);
|
|
1592
|
+
if (i + 1 !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
|
|
1593
|
+
result.push(newline);
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
});
|
|
1597
|
+
return result;
|
|
1598
|
+
},
|
|
1599
|
+
|
|
1600
|
+
IfStatement: function (stmt, flags) {
|
|
1601
|
+
var result, bodyFlags, semicolonOptional, that = this;
|
|
1602
|
+
withIndent(function () {
|
|
1603
|
+
result = [
|
|
1604
|
+
'if' + space + '(',
|
|
1605
|
+
that.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
|
|
1606
|
+
')'
|
|
1607
|
+
];
|
|
1608
|
+
});
|
|
1609
|
+
semicolonOptional = flags & F_SEMICOLON_OPT;
|
|
1610
|
+
bodyFlags = S_TFFF;
|
|
1611
|
+
if (semicolonOptional) {
|
|
1612
|
+
bodyFlags |= F_SEMICOLON_OPT;
|
|
1613
|
+
}
|
|
1614
|
+
if (stmt.alternate) {
|
|
1615
|
+
result.push(this.maybeBlock(stmt.consequent, S_TFFF));
|
|
1616
|
+
result = this.maybeBlockSuffix(stmt.consequent, result);
|
|
1617
|
+
if (stmt.alternate.type === Syntax.IfStatement) {
|
|
1618
|
+
result = join(result, ['else ', this.generateStatement(stmt.alternate, bodyFlags)]);
|
|
1619
|
+
} else {
|
|
1620
|
+
result = join(result, join('else', this.maybeBlock(stmt.alternate, bodyFlags)));
|
|
1621
|
+
}
|
|
1622
|
+
} else {
|
|
1623
|
+
result.push(this.maybeBlock(stmt.consequent, bodyFlags));
|
|
1624
|
+
}
|
|
1625
|
+
return result;
|
|
1626
|
+
},
|
|
1627
|
+
|
|
1628
|
+
ForStatement: function (stmt, flags) {
|
|
1629
|
+
var result, that = this;
|
|
1630
|
+
withIndent(function () {
|
|
1631
|
+
result = ['for' + space + '('];
|
|
1632
|
+
if (stmt.init) {
|
|
1633
|
+
if (stmt.init.type === Syntax.VariableDeclaration) {
|
|
1634
|
+
result.push(that.generateStatement(stmt.init, S_FFFF));
|
|
1635
|
+
} else {
|
|
1636
|
+
// F_ALLOW_IN becomes false.
|
|
1637
|
+
result.push(that.generateExpression(stmt.init, Precedence.Sequence, E_FTT));
|
|
1638
|
+
result.push(';');
|
|
1639
|
+
}
|
|
1640
|
+
} else {
|
|
1641
|
+
result.push(';');
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
if (stmt.test) {
|
|
1645
|
+
result.push(space);
|
|
1646
|
+
result.push(that.generateExpression(stmt.test, Precedence.Sequence, E_TTT));
|
|
1647
|
+
result.push(';');
|
|
1648
|
+
} else {
|
|
1649
|
+
result.push(';');
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
if (stmt.update) {
|
|
1653
|
+
result.push(space);
|
|
1654
|
+
result.push(that.generateExpression(stmt.update, Precedence.Sequence, E_TTT));
|
|
1655
|
+
result.push(')');
|
|
1656
|
+
} else {
|
|
1657
|
+
result.push(')');
|
|
1658
|
+
}
|
|
1659
|
+
});
|
|
1660
|
+
|
|
1661
|
+
result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF));
|
|
1662
|
+
return result;
|
|
1663
|
+
},
|
|
1664
|
+
|
|
1665
|
+
ForInStatement: function (stmt, flags) {
|
|
1666
|
+
return this.generateIterationForStatement('in', stmt, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF);
|
|
1667
|
+
},
|
|
1668
|
+
|
|
1669
|
+
ForOfStatement: function (stmt, flags) {
|
|
1670
|
+
return this.generateIterationForStatement('of', stmt, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF);
|
|
1671
|
+
},
|
|
1672
|
+
|
|
1673
|
+
LabeledStatement: function (stmt, flags) {
|
|
1674
|
+
return [stmt.label.name + ':', this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF)];
|
|
1675
|
+
},
|
|
1676
|
+
|
|
1677
|
+
Program: function (stmt, flags) {
|
|
1678
|
+
var result, fragment, i, iz, bodyFlags;
|
|
1679
|
+
iz = stmt.body.length;
|
|
1680
|
+
result = [safeConcatenation && iz > 0 ? '\n' : ''];
|
|
1681
|
+
bodyFlags = S_TFTF;
|
|
1682
|
+
for (i = 0; i < iz; ++i) {
|
|
1683
|
+
if (!safeConcatenation && i === iz - 1) {
|
|
1684
|
+
bodyFlags |= F_SEMICOLON_OPT;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
if (preserveBlankLines) {
|
|
1688
|
+
// handle spaces before the first line
|
|
1689
|
+
if (i === 0) {
|
|
1690
|
+
if (!stmt.body[0].leadingComments) {
|
|
1691
|
+
generateBlankLines(stmt.range[0], stmt.body[i].range[0], result);
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
// handle spaces between lines
|
|
1696
|
+
if (i > 0) {
|
|
1697
|
+
if (!stmt.body[i - 1].trailingComments && !stmt.body[i].leadingComments) {
|
|
1698
|
+
generateBlankLines(stmt.body[i - 1].range[1], stmt.body[i].range[0], result);
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
fragment = addIndent(this.generateStatement(stmt.body[i], bodyFlags));
|
|
1704
|
+
result.push(fragment);
|
|
1705
|
+
if (i + 1 < iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
|
|
1706
|
+
if (preserveBlankLines) {
|
|
1707
|
+
if (!stmt.body[i + 1].leadingComments) {
|
|
1708
|
+
result.push(newline);
|
|
1709
|
+
}
|
|
1710
|
+
} else {
|
|
1711
|
+
result.push(newline);
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
if (preserveBlankLines) {
|
|
1716
|
+
// handle spaces after the last line
|
|
1717
|
+
if (i === iz - 1) {
|
|
1718
|
+
if (!stmt.body[i].trailingComments) {
|
|
1719
|
+
generateBlankLines(stmt.body[i].range[1], stmt.range[1], result);
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
return result;
|
|
1725
|
+
},
|
|
1726
|
+
|
|
1727
|
+
FunctionDeclaration: function (stmt, flags) {
|
|
1728
|
+
return [
|
|
1729
|
+
generateAsyncPrefix(stmt, true),
|
|
1730
|
+
'function',
|
|
1731
|
+
generateStarSuffix(stmt) || noEmptySpace(),
|
|
1732
|
+
generateIdentifier(stmt.id),
|
|
1733
|
+
this.generateFunctionBody(stmt)
|
|
1734
|
+
];
|
|
1735
|
+
},
|
|
1736
|
+
|
|
1737
|
+
ReturnStatement: function (stmt, flags) {
|
|
1738
|
+
if (stmt.argument) {
|
|
1739
|
+
return [join(
|
|
1740
|
+
'return',
|
|
1741
|
+
this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
|
|
1742
|
+
), this.semicolon(flags)];
|
|
1743
|
+
}
|
|
1744
|
+
return ['return' + this.semicolon(flags)];
|
|
1745
|
+
},
|
|
1746
|
+
|
|
1747
|
+
WhileStatement: function (stmt, flags) {
|
|
1748
|
+
var result, that = this;
|
|
1749
|
+
withIndent(function () {
|
|
1750
|
+
result = [
|
|
1751
|
+
'while' + space + '(',
|
|
1752
|
+
that.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
|
|
1753
|
+
')'
|
|
1754
|
+
];
|
|
1755
|
+
});
|
|
1756
|
+
result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF));
|
|
1757
|
+
return result;
|
|
1758
|
+
},
|
|
1759
|
+
|
|
1760
|
+
WithStatement: function (stmt, flags) {
|
|
1761
|
+
var result, that = this;
|
|
1762
|
+
withIndent(function () {
|
|
1763
|
+
result = [
|
|
1764
|
+
'with' + space + '(',
|
|
1765
|
+
that.generateExpression(stmt.object, Precedence.Sequence, E_TTT),
|
|
1766
|
+
')'
|
|
1767
|
+
];
|
|
1768
|
+
});
|
|
1769
|
+
result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF));
|
|
1770
|
+
return result;
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
};
|
|
1774
|
+
|
|
1775
|
+
merge(CodeGenerator.prototype, CodeGenerator.Statement);
|
|
1776
|
+
|
|
1777
|
+
// Expressions.
|
|
1778
|
+
|
|
1779
|
+
CodeGenerator.Expression = {
|
|
1780
|
+
|
|
1781
|
+
SequenceExpression: function (expr, precedence, flags) {
|
|
1782
|
+
var result, i, iz;
|
|
1783
|
+
if (Precedence.Sequence < precedence) {
|
|
1784
|
+
flags |= F_ALLOW_IN;
|
|
1785
|
+
}
|
|
1786
|
+
result = [];
|
|
1787
|
+
for (i = 0, iz = expr.expressions.length; i < iz; ++i) {
|
|
1788
|
+
result.push(this.generateExpression(expr.expressions[i], Precedence.Assignment, flags));
|
|
1789
|
+
if (i + 1 < iz) {
|
|
1790
|
+
result.push(',' + space);
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
return parenthesize(result, Precedence.Sequence, precedence);
|
|
1794
|
+
},
|
|
1795
|
+
|
|
1796
|
+
AssignmentExpression: function (expr, precedence, flags) {
|
|
1797
|
+
return this.generateAssignment(expr.left, expr.right, expr.operator, precedence, flags);
|
|
1798
|
+
},
|
|
1799
|
+
|
|
1800
|
+
ArrowFunctionExpression: function (expr, precedence, flags) {
|
|
1801
|
+
return parenthesize(this.generateFunctionBody(expr), Precedence.ArrowFunction, precedence);
|
|
1802
|
+
},
|
|
1803
|
+
|
|
1804
|
+
ConditionalExpression: function (expr, precedence, flags) {
|
|
1805
|
+
if (Precedence.Conditional < precedence) {
|
|
1806
|
+
flags |= F_ALLOW_IN;
|
|
1807
|
+
}
|
|
1808
|
+
return parenthesize(
|
|
1809
|
+
[
|
|
1810
|
+
this.generateExpression(expr.test, Precedence.LogicalOR, flags),
|
|
1811
|
+
space + '?' + space,
|
|
1812
|
+
this.generateExpression(expr.consequent, Precedence.Assignment, flags),
|
|
1813
|
+
space + ':' + space,
|
|
1814
|
+
this.generateExpression(expr.alternate, Precedence.Assignment, flags)
|
|
1815
|
+
],
|
|
1816
|
+
Precedence.Conditional,
|
|
1817
|
+
precedence
|
|
1818
|
+
);
|
|
1819
|
+
},
|
|
1820
|
+
|
|
1821
|
+
LogicalExpression: function (expr, precedence, flags) {
|
|
1822
|
+
return this.BinaryExpression(expr, precedence, flags);
|
|
1823
|
+
},
|
|
1824
|
+
|
|
1825
|
+
BinaryExpression: function (expr, precedence, flags) {
|
|
1826
|
+
var result, currentPrecedence, fragment, leftSource;
|
|
1827
|
+
currentPrecedence = BinaryPrecedence[expr.operator];
|
|
1828
|
+
|
|
1829
|
+
if (currentPrecedence < precedence) {
|
|
1830
|
+
flags |= F_ALLOW_IN;
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
fragment = this.generateExpression(expr.left, currentPrecedence, flags);
|
|
1834
|
+
|
|
1835
|
+
leftSource = fragment.toString();
|
|
1836
|
+
|
|
1837
|
+
if (leftSource.charCodeAt(leftSource.length - 1) === 0x2F /* / */ && esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0))) {
|
|
1838
|
+
result = [fragment, noEmptySpace(), expr.operator];
|
|
1839
|
+
} else {
|
|
1840
|
+
result = join(fragment, expr.operator);
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
fragment = this.generateExpression(expr.right, currentPrecedence + 1, flags);
|
|
1844
|
+
|
|
1845
|
+
if (expr.operator === '/' && fragment.toString().charAt(0) === '/' ||
|
|
1846
|
+
expr.operator.slice(-1) === '<' && fragment.toString().slice(0, 3) === '!--') {
|
|
1847
|
+
// If '/' concats with '/' or `<` concats with `!--`, it is interpreted as comment start
|
|
1848
|
+
result.push(noEmptySpace());
|
|
1849
|
+
result.push(fragment);
|
|
1850
|
+
} else {
|
|
1851
|
+
result = join(result, fragment);
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
if (expr.operator === 'in' && !(flags & F_ALLOW_IN)) {
|
|
1855
|
+
return ['(', result, ')'];
|
|
1856
|
+
}
|
|
1857
|
+
return parenthesize(result, currentPrecedence, precedence);
|
|
1858
|
+
},
|
|
1859
|
+
|
|
1860
|
+
CallExpression: function (expr, precedence, flags) {
|
|
1861
|
+
var result, i, iz;
|
|
1862
|
+
// F_ALLOW_UNPARATH_NEW becomes false.
|
|
1863
|
+
result = [this.generateExpression(expr.callee, Precedence.Call, E_TTF)];
|
|
1864
|
+
result.push('(');
|
|
1865
|
+
for (i = 0, iz = expr['arguments'].length; i < iz; ++i) {
|
|
1866
|
+
result.push(this.generateExpression(expr['arguments'][i], Precedence.Assignment, E_TTT));
|
|
1867
|
+
if (i + 1 < iz) {
|
|
1868
|
+
result.push(',' + space);
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
result.push(')');
|
|
1872
|
+
|
|
1873
|
+
if (!(flags & F_ALLOW_CALL)) {
|
|
1874
|
+
return ['(', result, ')'];
|
|
1875
|
+
}
|
|
1876
|
+
return parenthesize(result, Precedence.Call, precedence);
|
|
1877
|
+
},
|
|
1878
|
+
|
|
1879
|
+
NewExpression: function (expr, precedence, flags) {
|
|
1880
|
+
var result, length, i, iz, itemFlags;
|
|
1881
|
+
length = expr['arguments'].length;
|
|
1882
|
+
|
|
1883
|
+
// F_ALLOW_CALL becomes false.
|
|
1884
|
+
// F_ALLOW_UNPARATH_NEW may become false.
|
|
1885
|
+
itemFlags = (flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0) ? E_TFT : E_TFF;
|
|
1886
|
+
|
|
1887
|
+
result = join(
|
|
1888
|
+
'new',
|
|
1889
|
+
this.generateExpression(expr.callee, Precedence.New, itemFlags)
|
|
1890
|
+
);
|
|
1891
|
+
|
|
1892
|
+
if (!(flags & F_ALLOW_UNPARATH_NEW) || parentheses || length > 0) {
|
|
1893
|
+
result.push('(');
|
|
1894
|
+
for (i = 0, iz = length; i < iz; ++i) {
|
|
1895
|
+
result.push(this.generateExpression(expr['arguments'][i], Precedence.Assignment, E_TTT));
|
|
1896
|
+
if (i + 1 < iz) {
|
|
1897
|
+
result.push(',' + space);
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
result.push(')');
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
return parenthesize(result, Precedence.New, precedence);
|
|
1904
|
+
},
|
|
1905
|
+
|
|
1906
|
+
MemberExpression: function (expr, precedence, flags) {
|
|
1907
|
+
var result, fragment;
|
|
1908
|
+
|
|
1909
|
+
// F_ALLOW_UNPARATH_NEW becomes false.
|
|
1910
|
+
result = [this.generateExpression(expr.object, Precedence.Call, (flags & F_ALLOW_CALL) ? E_TTF : E_TFF)];
|
|
1911
|
+
|
|
1912
|
+
if (expr.computed) {
|
|
1913
|
+
result.push('[');
|
|
1914
|
+
result.push(this.generateExpression(expr.property, Precedence.Sequence, flags & F_ALLOW_CALL ? E_TTT : E_TFT));
|
|
1915
|
+
result.push(']');
|
|
1916
|
+
} else {
|
|
1917
|
+
if (expr.object.type === Syntax.Literal && typeof expr.object.value === 'number') {
|
|
1918
|
+
fragment = toSourceNodeWhenNeeded(result).toString();
|
|
1919
|
+
// When the following conditions are all true,
|
|
1920
|
+
// 1. No floating point
|
|
1921
|
+
// 2. Don't have exponents
|
|
1922
|
+
// 3. The last character is a decimal digit
|
|
1923
|
+
// 4. Not hexadecimal OR octal number literal
|
|
1924
|
+
// we should add a floating point.
|
|
1925
|
+
if (
|
|
1926
|
+
fragment.indexOf('.') < 0 &&
|
|
1927
|
+
!/[eExX]/.test(fragment) &&
|
|
1928
|
+
esutils.code.isDecimalDigit(fragment.charCodeAt(fragment.length - 1)) &&
|
|
1929
|
+
!(fragment.length >= 2 && fragment.charCodeAt(0) === 48) // '0'
|
|
1930
|
+
) {
|
|
1931
|
+
result.push('.');
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
result.push('.');
|
|
1935
|
+
result.push(generateIdentifier(expr.property));
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
return parenthesize(result, Precedence.Member, precedence);
|
|
1939
|
+
},
|
|
1940
|
+
|
|
1941
|
+
UnaryExpression: function (expr, precedence, flags) {
|
|
1942
|
+
var result, fragment, rightCharCode, leftSource, leftCharCode;
|
|
1943
|
+
fragment = this.generateExpression(expr.argument, Precedence.Unary, E_TTT);
|
|
1944
|
+
|
|
1945
|
+
if (space === '') {
|
|
1946
|
+
result = join(expr.operator, fragment);
|
|
1947
|
+
} else {
|
|
1948
|
+
result = [expr.operator];
|
|
1949
|
+
if (expr.operator.length > 2) {
|
|
1950
|
+
// delete, void, typeof
|
|
1951
|
+
// get `typeof []`, not `typeof[]`
|
|
1952
|
+
result = join(result, fragment);
|
|
1953
|
+
} else {
|
|
1954
|
+
// Prevent inserting spaces between operator and argument if it is unnecessary
|
|
1955
|
+
// like, `!cond`
|
|
1956
|
+
leftSource = toSourceNodeWhenNeeded(result).toString();
|
|
1957
|
+
leftCharCode = leftSource.charCodeAt(leftSource.length - 1);
|
|
1958
|
+
rightCharCode = fragment.toString().charCodeAt(0);
|
|
1959
|
+
|
|
1960
|
+
if (((leftCharCode === 0x2B /* + */ || leftCharCode === 0x2D /* - */) && leftCharCode === rightCharCode) ||
|
|
1961
|
+
(esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode))) {
|
|
1962
|
+
result.push(noEmptySpace());
|
|
1963
|
+
result.push(fragment);
|
|
1964
|
+
} else {
|
|
1965
|
+
result.push(fragment);
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
return parenthesize(result, Precedence.Unary, precedence);
|
|
1970
|
+
},
|
|
1971
|
+
|
|
1972
|
+
YieldExpression: function (expr, precedence, flags) {
|
|
1973
|
+
var result;
|
|
1974
|
+
if (expr.delegate) {
|
|
1975
|
+
result = 'yield*';
|
|
1976
|
+
} else {
|
|
1977
|
+
result = 'yield';
|
|
1978
|
+
}
|
|
1979
|
+
if (expr.argument) {
|
|
1980
|
+
result = join(
|
|
1981
|
+
result,
|
|
1982
|
+
this.generateExpression(expr.argument, Precedence.Yield, E_TTT)
|
|
1983
|
+
);
|
|
1984
|
+
}
|
|
1985
|
+
return parenthesize(result, Precedence.Yield, precedence);
|
|
1986
|
+
},
|
|
1987
|
+
|
|
1988
|
+
AwaitExpression: function (expr, precedence, flags) {
|
|
1989
|
+
var result = join(
|
|
1990
|
+
expr.all ? 'await*' : 'await',
|
|
1991
|
+
this.generateExpression(expr.argument, Precedence.Await, E_TTT)
|
|
1992
|
+
);
|
|
1993
|
+
return parenthesize(result, Precedence.Await, precedence);
|
|
1994
|
+
},
|
|
1995
|
+
|
|
1996
|
+
UpdateExpression: function (expr, precedence, flags) {
|
|
1997
|
+
if (expr.prefix) {
|
|
1998
|
+
return parenthesize(
|
|
1999
|
+
[
|
|
2000
|
+
expr.operator,
|
|
2001
|
+
this.generateExpression(expr.argument, Precedence.Unary, E_TTT)
|
|
2002
|
+
],
|
|
2003
|
+
Precedence.Unary,
|
|
2004
|
+
precedence
|
|
2005
|
+
);
|
|
2006
|
+
}
|
|
2007
|
+
return parenthesize(
|
|
2008
|
+
[
|
|
2009
|
+
this.generateExpression(expr.argument, Precedence.Postfix, E_TTT),
|
|
2010
|
+
expr.operator
|
|
2011
|
+
],
|
|
2012
|
+
Precedence.Postfix,
|
|
2013
|
+
precedence
|
|
2014
|
+
);
|
|
2015
|
+
},
|
|
2016
|
+
|
|
2017
|
+
FunctionExpression: function (expr, precedence, flags) {
|
|
2018
|
+
var result = [
|
|
2019
|
+
generateAsyncPrefix(expr, true),
|
|
2020
|
+
'function'
|
|
2021
|
+
];
|
|
2022
|
+
if (expr.id) {
|
|
2023
|
+
result.push(generateStarSuffix(expr) || noEmptySpace());
|
|
2024
|
+
result.push(generateIdentifier(expr.id));
|
|
2025
|
+
} else {
|
|
2026
|
+
result.push(generateStarSuffix(expr) || space);
|
|
2027
|
+
}
|
|
2028
|
+
result.push(this.generateFunctionBody(expr));
|
|
2029
|
+
return result;
|
|
2030
|
+
},
|
|
2031
|
+
|
|
2032
|
+
ExportBatchSpecifier: function (expr, precedence, flags) {
|
|
2033
|
+
return '*';
|
|
2034
|
+
},
|
|
2035
|
+
|
|
2036
|
+
ArrayPattern: function (expr, precedence, flags) {
|
|
2037
|
+
return this.ArrayExpression(expr, precedence, flags, true);
|
|
2038
|
+
},
|
|
2039
|
+
|
|
2040
|
+
ArrayExpression: function (expr, precedence, flags, isPattern) {
|
|
2041
|
+
var result, multiline, that = this;
|
|
2042
|
+
if (!expr.elements.length) {
|
|
2043
|
+
return '[]';
|
|
2044
|
+
}
|
|
2045
|
+
multiline = isPattern ? false : expr.elements.length > 1;
|
|
2046
|
+
result = ['[', multiline ? newline : ''];
|
|
2047
|
+
withIndent(function (indent) {
|
|
2048
|
+
var i, iz;
|
|
2049
|
+
for (i = 0, iz = expr.elements.length; i < iz; ++i) {
|
|
2050
|
+
if (!expr.elements[i]) {
|
|
2051
|
+
if (multiline) {
|
|
2052
|
+
result.push(indent);
|
|
2053
|
+
}
|
|
2054
|
+
if (i + 1 === iz) {
|
|
2055
|
+
result.push(',');
|
|
2056
|
+
}
|
|
2057
|
+
} else {
|
|
2058
|
+
result.push(multiline ? indent : '');
|
|
2059
|
+
result.push(that.generateExpression(expr.elements[i], Precedence.Assignment, E_TTT));
|
|
2060
|
+
}
|
|
2061
|
+
if (i + 1 < iz) {
|
|
2062
|
+
result.push(',' + (multiline ? newline : space));
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
});
|
|
2066
|
+
if (multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
|
|
2067
|
+
result.push(newline);
|
|
2068
|
+
}
|
|
2069
|
+
result.push(multiline ? base : '');
|
|
2070
|
+
result.push(']');
|
|
2071
|
+
return result;
|
|
2072
|
+
},
|
|
2073
|
+
|
|
2074
|
+
RestElement: function(expr, precedence, flags) {
|
|
2075
|
+
return '...' + this.generatePattern(expr.argument);
|
|
2076
|
+
},
|
|
2077
|
+
|
|
2078
|
+
ClassExpression: function (expr, precedence, flags) {
|
|
2079
|
+
var result, fragment;
|
|
2080
|
+
result = ['class'];
|
|
2081
|
+
if (expr.id) {
|
|
2082
|
+
result = join(result, this.generateExpression(expr.id, Precedence.Sequence, E_TTT));
|
|
2083
|
+
}
|
|
2084
|
+
if (expr.superClass) {
|
|
2085
|
+
fragment = join('extends', this.generateExpression(expr.superClass, Precedence.Assignment, E_TTT));
|
|
2086
|
+
result = join(result, fragment);
|
|
2087
|
+
}
|
|
2088
|
+
result.push(space);
|
|
2089
|
+
result.push(this.generateStatement(expr.body, S_TFFT));
|
|
2090
|
+
return result;
|
|
2091
|
+
},
|
|
2092
|
+
|
|
2093
|
+
MethodDefinition: function (expr, precedence, flags) {
|
|
2094
|
+
var result, fragment;
|
|
2095
|
+
if (expr['static']) {
|
|
2096
|
+
result = ['static' + space];
|
|
2097
|
+
} else {
|
|
2098
|
+
result = [];
|
|
2099
|
+
}
|
|
2100
|
+
if (expr.kind === 'get' || expr.kind === 'set') {
|
|
2101
|
+
fragment = [
|
|
2102
|
+
join(expr.kind, this.generatePropertyKey(expr.key, expr.computed)),
|
|
2103
|
+
this.generateFunctionBody(expr.value)
|
|
2104
|
+
];
|
|
2105
|
+
} else {
|
|
2106
|
+
fragment = [
|
|
2107
|
+
generateMethodPrefix(expr),
|
|
2108
|
+
this.generatePropertyKey(expr.key, expr.computed),
|
|
2109
|
+
this.generateFunctionBody(expr.value)
|
|
2110
|
+
];
|
|
2111
|
+
}
|
|
2112
|
+
return join(result, fragment);
|
|
2113
|
+
},
|
|
2114
|
+
|
|
2115
|
+
Property: function (expr, precedence, flags) {
|
|
2116
|
+
if (expr.kind === 'get' || expr.kind === 'set') {
|
|
2117
|
+
return [
|
|
2118
|
+
expr.kind, noEmptySpace(),
|
|
2119
|
+
this.generatePropertyKey(expr.key, expr.computed),
|
|
2120
|
+
this.generateFunctionBody(expr.value)
|
|
2121
|
+
];
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
if (expr.shorthand) {
|
|
2125
|
+
return this.generatePropertyKey(expr.key, expr.computed);
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
if (expr.method) {
|
|
2129
|
+
return [
|
|
2130
|
+
generateMethodPrefix(expr),
|
|
2131
|
+
this.generatePropertyKey(expr.key, expr.computed),
|
|
2132
|
+
this.generateFunctionBody(expr.value)
|
|
2133
|
+
];
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
return [
|
|
2137
|
+
this.generatePropertyKey(expr.key, expr.computed),
|
|
2138
|
+
':' + space,
|
|
2139
|
+
this.generateExpression(expr.value, Precedence.Assignment, E_TTT)
|
|
2140
|
+
];
|
|
2141
|
+
},
|
|
2142
|
+
|
|
2143
|
+
ObjectExpression: function (expr, precedence, flags) {
|
|
2144
|
+
var multiline, result, fragment, that = this;
|
|
2145
|
+
|
|
2146
|
+
if (!expr.properties.length) {
|
|
2147
|
+
return '{}';
|
|
2148
|
+
}
|
|
2149
|
+
multiline = expr.properties.length > 1;
|
|
2150
|
+
|
|
2151
|
+
withIndent(function () {
|
|
2152
|
+
fragment = that.generateExpression(expr.properties[0], Precedence.Sequence, E_TTT);
|
|
2153
|
+
});
|
|
2154
|
+
|
|
2155
|
+
if (!multiline) {
|
|
2156
|
+
// issues 4
|
|
2157
|
+
// Do not transform from
|
|
2158
|
+
// dejavu.Class.declare({
|
|
2159
|
+
// method2: function () {}
|
|
2160
|
+
// });
|
|
2161
|
+
// to
|
|
2162
|
+
// dejavu.Class.declare({method2: function () {
|
|
2163
|
+
// }});
|
|
2164
|
+
if (!hasLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
|
|
2165
|
+
return [ '{', space, fragment, space, '}' ];
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
withIndent(function (indent) {
|
|
2170
|
+
var i, iz;
|
|
2171
|
+
result = [ '{', newline, indent, fragment ];
|
|
2172
|
+
|
|
2173
|
+
if (multiline) {
|
|
2174
|
+
result.push(',' + newline);
|
|
2175
|
+
for (i = 1, iz = expr.properties.length; i < iz; ++i) {
|
|
2176
|
+
result.push(indent);
|
|
2177
|
+
result.push(that.generateExpression(expr.properties[i], Precedence.Sequence, E_TTT));
|
|
2178
|
+
if (i + 1 < iz) {
|
|
2179
|
+
result.push(',' + newline);
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
});
|
|
2184
|
+
|
|
2185
|
+
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
|
|
2186
|
+
result.push(newline);
|
|
2187
|
+
}
|
|
2188
|
+
result.push(base);
|
|
2189
|
+
result.push('}');
|
|
2190
|
+
return result;
|
|
2191
|
+
},
|
|
2192
|
+
|
|
2193
|
+
ObjectPattern: function (expr, precedence, flags) {
|
|
2194
|
+
var result, i, iz, multiline, property, that = this;
|
|
2195
|
+
if (!expr.properties.length) {
|
|
2196
|
+
return '{}';
|
|
2197
|
+
}
|
|
2198
|
+
|
|
2199
|
+
multiline = false;
|
|
2200
|
+
if (expr.properties.length === 1) {
|
|
2201
|
+
property = expr.properties[0];
|
|
2202
|
+
if (property.value.type !== Syntax.Identifier) {
|
|
2203
|
+
multiline = true;
|
|
2204
|
+
}
|
|
2205
|
+
} else {
|
|
2206
|
+
for (i = 0, iz = expr.properties.length; i < iz; ++i) {
|
|
2207
|
+
property = expr.properties[i];
|
|
2208
|
+
if (!property.shorthand) {
|
|
2209
|
+
multiline = true;
|
|
2210
|
+
break;
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
}
|
|
2214
|
+
result = ['{', multiline ? newline : '' ];
|
|
2215
|
+
|
|
2216
|
+
withIndent(function (indent) {
|
|
2217
|
+
var i, iz;
|
|
2218
|
+
for (i = 0, iz = expr.properties.length; i < iz; ++i) {
|
|
2219
|
+
result.push(multiline ? indent : '');
|
|
2220
|
+
result.push(that.generateExpression(expr.properties[i], Precedence.Sequence, E_TTT));
|
|
2221
|
+
if (i + 1 < iz) {
|
|
2222
|
+
result.push(',' + (multiline ? newline : space));
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
2225
|
+
});
|
|
2226
|
+
|
|
2227
|
+
if (multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
|
|
2228
|
+
result.push(newline);
|
|
2229
|
+
}
|
|
2230
|
+
result.push(multiline ? base : '');
|
|
2231
|
+
result.push('}');
|
|
2232
|
+
return result;
|
|
2233
|
+
},
|
|
2234
|
+
|
|
2235
|
+
ThisExpression: function (expr, precedence, flags) {
|
|
2236
|
+
return 'this';
|
|
2237
|
+
},
|
|
2238
|
+
|
|
2239
|
+
Super: function (expr, precedence, flags) {
|
|
2240
|
+
return 'super';
|
|
2241
|
+
},
|
|
2242
|
+
|
|
2243
|
+
Identifier: function (expr, precedence, flags) {
|
|
2244
|
+
return generateIdentifier(expr);
|
|
2245
|
+
},
|
|
2246
|
+
|
|
2247
|
+
ImportDefaultSpecifier: function (expr, precedence, flags) {
|
|
2248
|
+
return generateIdentifier(expr.id || expr.local);
|
|
2249
|
+
},
|
|
2250
|
+
|
|
2251
|
+
ImportNamespaceSpecifier: function (expr, precedence, flags) {
|
|
2252
|
+
var result = ['*'];
|
|
2253
|
+
var id = expr.id || expr.local;
|
|
2254
|
+
if (id) {
|
|
2255
|
+
result.push(space + 'as' + noEmptySpace() + generateIdentifier(id));
|
|
2256
|
+
}
|
|
2257
|
+
return result;
|
|
2258
|
+
},
|
|
2259
|
+
|
|
2260
|
+
ImportSpecifier: function (expr, precedence, flags) {
|
|
2261
|
+
return this.ExportSpecifier(expr, precedence, flags);
|
|
2262
|
+
},
|
|
2263
|
+
|
|
2264
|
+
ExportSpecifier: function (expr, precedence, flags) {
|
|
2265
|
+
var exported = (expr.id || expr.imported).name;
|
|
2266
|
+
var result = [ exported ];
|
|
2267
|
+
var id = expr.name || expr.local;
|
|
2268
|
+
if (id && id.name !== exported) {
|
|
2269
|
+
result.push(noEmptySpace() + 'as' + noEmptySpace() + generateIdentifier(id));
|
|
2270
|
+
}
|
|
2271
|
+
return result;
|
|
2272
|
+
},
|
|
2273
|
+
|
|
2274
|
+
Literal: function (expr, precedence, flags) {
|
|
2275
|
+
var raw;
|
|
2276
|
+
if (expr.hasOwnProperty('raw') && parse && extra.raw) {
|
|
2277
|
+
try {
|
|
2278
|
+
raw = parse(expr.raw).body[0].expression;
|
|
2279
|
+
if (raw.type === Syntax.Literal) {
|
|
2280
|
+
if (raw.value === expr.value) {
|
|
2281
|
+
return expr.raw;
|
|
2282
|
+
}
|
|
2283
|
+
}
|
|
2284
|
+
} catch (e) {
|
|
2285
|
+
// not use raw property
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
if (expr.value === null) {
|
|
2290
|
+
return 'null';
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
if (typeof expr.value === 'string') {
|
|
2294
|
+
return escapeString(expr.value);
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
if (typeof expr.value === 'number') {
|
|
2298
|
+
return generateNumber(expr.value);
|
|
2299
|
+
}
|
|
2300
|
+
|
|
2301
|
+
if (typeof expr.value === 'boolean') {
|
|
2302
|
+
return expr.value ? 'true' : 'false';
|
|
2303
|
+
}
|
|
2304
|
+
|
|
2305
|
+
return generateRegExp(expr.value);
|
|
2306
|
+
},
|
|
2307
|
+
|
|
2308
|
+
GeneratorExpression: function (expr, precedence, flags) {
|
|
2309
|
+
return this.ComprehensionExpression(expr, precedence, flags);
|
|
2310
|
+
},
|
|
2311
|
+
|
|
2312
|
+
ComprehensionExpression: function (expr, precedence, flags) {
|
|
2313
|
+
// GeneratorExpression should be parenthesized with (...), ComprehensionExpression with [...]
|
|
2314
|
+
// Due to https://bugzilla.mozilla.org/show_bug.cgi?id=883468 position of expr.body can differ in Spidermonkey and ES6
|
|
2315
|
+
|
|
2316
|
+
var result, i, iz, fragment, that = this;
|
|
2317
|
+
result = (expr.type === Syntax.GeneratorExpression) ? ['('] : ['['];
|
|
2318
|
+
|
|
2319
|
+
if (extra.moz.comprehensionExpressionStartsWithAssignment) {
|
|
2320
|
+
fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT);
|
|
2321
|
+
result.push(fragment);
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
if (expr.blocks) {
|
|
2325
|
+
withIndent(function () {
|
|
2326
|
+
for (i = 0, iz = expr.blocks.length; i < iz; ++i) {
|
|
2327
|
+
fragment = that.generateExpression(expr.blocks[i], Precedence.Sequence, E_TTT);
|
|
2328
|
+
if (i > 0 || extra.moz.comprehensionExpressionStartsWithAssignment) {
|
|
2329
|
+
result = join(result, fragment);
|
|
2330
|
+
} else {
|
|
2331
|
+
result.push(fragment);
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
});
|
|
2335
|
+
}
|
|
2336
|
+
|
|
2337
|
+
if (expr.filter) {
|
|
2338
|
+
result = join(result, 'if' + space);
|
|
2339
|
+
fragment = this.generateExpression(expr.filter, Precedence.Sequence, E_TTT);
|
|
2340
|
+
result = join(result, [ '(', fragment, ')' ]);
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
if (!extra.moz.comprehensionExpressionStartsWithAssignment) {
|
|
2344
|
+
fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT);
|
|
2345
|
+
|
|
2346
|
+
result = join(result, fragment);
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2349
|
+
result.push((expr.type === Syntax.GeneratorExpression) ? ')' : ']');
|
|
2350
|
+
return result;
|
|
2351
|
+
},
|
|
2352
|
+
|
|
2353
|
+
ComprehensionBlock: function (expr, precedence, flags) {
|
|
2354
|
+
var fragment;
|
|
2355
|
+
if (expr.left.type === Syntax.VariableDeclaration) {
|
|
2356
|
+
fragment = [
|
|
2357
|
+
expr.left.kind, noEmptySpace(),
|
|
2358
|
+
this.generateStatement(expr.left.declarations[0], S_FFFF)
|
|
2359
|
+
];
|
|
2360
|
+
} else {
|
|
2361
|
+
fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT);
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
fragment = join(fragment, expr.of ? 'of' : 'in');
|
|
2365
|
+
fragment = join(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT));
|
|
2366
|
+
|
|
2367
|
+
return [ 'for' + space + '(', fragment, ')' ];
|
|
2368
|
+
},
|
|
2369
|
+
|
|
2370
|
+
SpreadElement: function (expr, precedence, flags) {
|
|
2371
|
+
return [
|
|
2372
|
+
'...',
|
|
2373
|
+
this.generateExpression(expr.argument, Precedence.Assignment, E_TTT)
|
|
2374
|
+
];
|
|
2375
|
+
},
|
|
2376
|
+
|
|
2377
|
+
TaggedTemplateExpression: function (expr, precedence, flags) {
|
|
2378
|
+
var itemFlags = E_TTF;
|
|
2379
|
+
if (!(flags & F_ALLOW_CALL)) {
|
|
2380
|
+
itemFlags = E_TFF;
|
|
2381
|
+
}
|
|
2382
|
+
var result = [
|
|
2383
|
+
this.generateExpression(expr.tag, Precedence.Call, itemFlags),
|
|
2384
|
+
this.generateExpression(expr.quasi, Precedence.Primary, E_FFT)
|
|
2385
|
+
];
|
|
2386
|
+
return parenthesize(result, Precedence.TaggedTemplate, precedence);
|
|
2387
|
+
},
|
|
2388
|
+
|
|
2389
|
+
TemplateElement: function (expr, precedence, flags) {
|
|
2390
|
+
// Don't use "cooked". Since tagged template can use raw template
|
|
2391
|
+
// representation. So if we do so, it breaks the script semantics.
|
|
2392
|
+
return expr.value.raw;
|
|
2393
|
+
},
|
|
2394
|
+
|
|
2395
|
+
TemplateLiteral: function (expr, precedence, flags) {
|
|
2396
|
+
var result, i, iz;
|
|
2397
|
+
result = [ '`' ];
|
|
2398
|
+
for (i = 0, iz = expr.quasis.length; i < iz; ++i) {
|
|
2399
|
+
result.push(this.generateExpression(expr.quasis[i], Precedence.Primary, E_TTT));
|
|
2400
|
+
if (i + 1 < iz) {
|
|
2401
|
+
result.push('${' + space);
|
|
2402
|
+
result.push(this.generateExpression(expr.expressions[i], Precedence.Sequence, E_TTT));
|
|
2403
|
+
result.push(space + '}');
|
|
2404
|
+
}
|
|
2405
|
+
}
|
|
2406
|
+
result.push('`');
|
|
2407
|
+
return result;
|
|
2408
|
+
},
|
|
2409
|
+
|
|
2410
|
+
ModuleSpecifier: function (expr, precedence, flags) {
|
|
2411
|
+
return this.Literal(expr, precedence, flags);
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2414
|
+
};
|
|
2415
|
+
|
|
2416
|
+
merge(CodeGenerator.prototype, CodeGenerator.Expression);
|
|
2417
|
+
|
|
2418
|
+
CodeGenerator.prototype.generateExpression = function (expr, precedence, flags) {
|
|
2419
|
+
var result, type;
|
|
2420
|
+
|
|
2421
|
+
type = expr.type || Syntax.Property;
|
|
2422
|
+
|
|
2423
|
+
if (extra.verbatim && expr.hasOwnProperty(extra.verbatim)) {
|
|
2424
|
+
return generateVerbatim(expr, precedence);
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
result = this[type](expr, precedence, flags);
|
|
2428
|
+
|
|
2429
|
+
|
|
2430
|
+
if (extra.comment) {
|
|
2431
|
+
result = addComments(expr, result);
|
|
2432
|
+
}
|
|
2433
|
+
return toSourceNodeWhenNeeded(result, expr);
|
|
2434
|
+
};
|
|
2435
|
+
|
|
2436
|
+
CodeGenerator.prototype.generateStatement = function (stmt, flags) {
|
|
2437
|
+
var result,
|
|
2438
|
+
fragment;
|
|
2439
|
+
|
|
2440
|
+
result = this[stmt.type](stmt, flags);
|
|
2441
|
+
|
|
2442
|
+
// Attach comments
|
|
2443
|
+
|
|
2444
|
+
if (extra.comment) {
|
|
2445
|
+
result = addComments(stmt, result);
|
|
2446
|
+
}
|
|
2447
|
+
|
|
2448
|
+
fragment = toSourceNodeWhenNeeded(result).toString();
|
|
2449
|
+
if (stmt.type === Syntax.Program && !safeConcatenation && newline === '' && fragment.charAt(fragment.length - 1) === '\n') {
|
|
2450
|
+
result = sourceMap ? toSourceNodeWhenNeeded(result).replaceRight(/\s+$/, '') : fragment.replace(/\s+$/, '');
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
return toSourceNodeWhenNeeded(result, stmt);
|
|
2454
|
+
};
|
|
2455
|
+
|
|
2456
|
+
function generateInternal(node) {
|
|
2457
|
+
var codegen;
|
|
2458
|
+
|
|
2459
|
+
codegen = new CodeGenerator();
|
|
2460
|
+
if (isStatement(node)) {
|
|
2461
|
+
return codegen.generateStatement(node, S_TFFF);
|
|
2462
|
+
}
|
|
2463
|
+
|
|
2464
|
+
if (isExpression(node)) {
|
|
2465
|
+
return codegen.generateExpression(node, Precedence.Sequence, E_TTT);
|
|
2466
|
+
}
|
|
2467
|
+
|
|
2468
|
+
throw new Error('Unknown node type: ' + node.type);
|
|
2469
|
+
}
|
|
2470
|
+
|
|
2471
|
+
function generate(node, options) {
|
|
2472
|
+
var defaultOptions = getDefaultOptions(), result, pair;
|
|
2473
|
+
|
|
2474
|
+
if (options != null) {
|
|
2475
|
+
// Obsolete options
|
|
2476
|
+
//
|
|
2477
|
+
// `options.indent`
|
|
2478
|
+
// `options.base`
|
|
2479
|
+
//
|
|
2480
|
+
// Instead of them, we can use `option.format.indent`.
|
|
2481
|
+
if (typeof options.indent === 'string') {
|
|
2482
|
+
defaultOptions.format.indent.style = options.indent;
|
|
2483
|
+
}
|
|
2484
|
+
if (typeof options.base === 'number') {
|
|
2485
|
+
defaultOptions.format.indent.base = options.base;
|
|
2486
|
+
}
|
|
2487
|
+
options = updateDeeply(defaultOptions, options);
|
|
2488
|
+
indent = options.format.indent.style;
|
|
2489
|
+
if (typeof options.base === 'string') {
|
|
2490
|
+
base = options.base;
|
|
2491
|
+
} else {
|
|
2492
|
+
base = stringRepeat(indent, options.format.indent.base);
|
|
2493
|
+
}
|
|
2494
|
+
} else {
|
|
2495
|
+
options = defaultOptions;
|
|
2496
|
+
indent = options.format.indent.style;
|
|
2497
|
+
base = stringRepeat(indent, options.format.indent.base);
|
|
2498
|
+
}
|
|
2499
|
+
json = options.format.json;
|
|
2500
|
+
renumber = options.format.renumber;
|
|
2501
|
+
hexadecimal = json ? false : options.format.hexadecimal;
|
|
2502
|
+
quotes = json ? 'double' : options.format.quotes;
|
|
2503
|
+
escapeless = options.format.escapeless;
|
|
2504
|
+
newline = options.format.newline;
|
|
2505
|
+
space = options.format.space;
|
|
2506
|
+
if (options.format.compact) {
|
|
2507
|
+
newline = space = indent = base = '';
|
|
2508
|
+
}
|
|
2509
|
+
parentheses = options.format.parentheses;
|
|
2510
|
+
semicolons = options.format.semicolons;
|
|
2511
|
+
safeConcatenation = options.format.safeConcatenation;
|
|
2512
|
+
directive = options.directive;
|
|
2513
|
+
parse = json ? null : options.parse;
|
|
2514
|
+
sourceMap = options.sourceMap;
|
|
2515
|
+
sourceCode = options.sourceCode;
|
|
2516
|
+
preserveBlankLines = options.format.preserveBlankLines && sourceCode !== null;
|
|
2517
|
+
extra = options;
|
|
2518
|
+
|
|
2519
|
+
if (sourceMap) {
|
|
2520
|
+
if (!exports.browser) {
|
|
2521
|
+
// We assume environment is node.js
|
|
2522
|
+
// And prevent from including source-map by browserify
|
|
2523
|
+
SourceNode = require('source-map').SourceNode;
|
|
2524
|
+
} else {
|
|
2525
|
+
SourceNode = global.sourceMap.SourceNode;
|
|
2526
|
+
}
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2529
|
+
result = generateInternal(node);
|
|
2530
|
+
|
|
2531
|
+
if (!sourceMap) {
|
|
2532
|
+
pair = {code: result.toString(), map: null};
|
|
2533
|
+
return options.sourceMapWithCode ? pair : pair.code;
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2536
|
+
|
|
2537
|
+
pair = result.toStringWithSourceMap({
|
|
2538
|
+
file: options.file,
|
|
2539
|
+
sourceRoot: options.sourceMapRoot
|
|
2540
|
+
});
|
|
2541
|
+
|
|
2542
|
+
if (options.sourceContent) {
|
|
2543
|
+
pair.map.setSourceContent(options.sourceMap,
|
|
2544
|
+
options.sourceContent);
|
|
2545
|
+
}
|
|
2546
|
+
|
|
2547
|
+
if (options.sourceMapWithCode) {
|
|
2548
|
+
return pair;
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
return pair.map.toString();
|
|
2552
|
+
}
|
|
2553
|
+
|
|
2554
|
+
FORMAT_MINIFY = {
|
|
2555
|
+
indent: {
|
|
2556
|
+
style: '',
|
|
2557
|
+
base: 0
|
|
2558
|
+
},
|
|
2559
|
+
renumber: true,
|
|
2560
|
+
hexadecimal: true,
|
|
2561
|
+
quotes: 'auto',
|
|
2562
|
+
escapeless: true,
|
|
2563
|
+
compact: true,
|
|
2564
|
+
parentheses: false,
|
|
2565
|
+
semicolons: false
|
|
2566
|
+
};
|
|
2567
|
+
|
|
2568
|
+
FORMAT_DEFAULTS = getDefaultOptions().format;
|
|
2569
|
+
|
|
2570
|
+
exports.version = require('./package.json').version;
|
|
2571
|
+
exports.generate = generate;
|
|
2572
|
+
exports.attachComments = estraverse.attachComments;
|
|
2573
|
+
exports.Precedence = updateDeeply({}, Precedence);
|
|
2574
|
+
exports.browser = false;
|
|
2575
|
+
exports.FORMAT_MINIFY = FORMAT_MINIFY;
|
|
2576
|
+
exports.FORMAT_DEFAULTS = FORMAT_DEFAULTS;
|
|
2577
|
+
}());
|
|
2578
|
+
/* vim: set sw=4 ts=4 et tw=80 : */
|