circlecell / jscompress.com

Site to minify/compress javascript and combine multiple files into a single compressed file
http://jscompress.com
ISC License
304 stars 101 forks source link

Array not recognized as JS #102

Open kentikKB opened 1 year ago

kentikKB commented 1 year ago

When trying to compress a source .js file whose contents are solely a JS array like the below, the resulting compressed file is completely empty: "Stats: 100% compression"

[
    {
        "article":"About Kentik",
        "heading":"About Kentik",
        "file":"Ab01",
        "id":"Ab01-About_Kentik",
        "text":"About Kentik This article provides a basic introduction to Kentik, with answers to the following questions:   "
    },
    {
        "article":"About Kentik",
        "heading":"What is Kentik?",
        "file":"Ab01",
        "id":"Ab01-What_is_Kentik",
        "text":"What is Kentik? Kentik is an open, scalable platform for collecting, analyzing, and visualizing data about the health and performance of your organization's networks. Kentik covers both on-prem infrastructure (e.g. data centers) and cloud resources, correlates data from both actual traffic and synthetic testing, and provides instant answers based on both real-time and historical data.  Kentik's purpose-built data platform sets up in minutes and provides fast, simple tools that help isolate, identify, and explain unusual activity or behavior, alerting you in real time to performance issues and attacks. The Kentik portal is a Web-based user interface that allows you to run sophisticated analytics on traffic data, monitor availability with synthetic testing, and protect your network with alerts and mitigation. The Kentik platform also integrates with your own tools and systems using Kentik REST APIs. "
    }
]
plasma4 commented 11 months ago

I believe this is because the array is not "evaluated" in any way. This can easily be solved by adding a variable in front of the array, and then copying the array part that you need.