Kohl's (NYSE:KSS) has proven to be one of the retail companies that understand how to operate in a changing market. The company, which at one point looked like it would fall victim to the so-called retail apocalypse, has posted some strong results recently.

The company posted a 3.1% increase in comparable-store sales, and increased its total revenue from $4.3 billion in the second quarter of 2017 to $4.5 billion in the same period this year. That's the chain's fourth straight quarter of positive comparable-store sales growth. The chain also saw its digital comp sales grow in the mid-teens, and its earnings per share rose to $1.76, from $1.22 in the year-ago period.

"We saw strength across the business -- both our store and digital channels, all regions of the country, and our proprietary and national brands," said CEO Michelle Gass in the Q2 earnings release. "Our men's and women's apparel businesses led the company, followed closely by footwear. We also reported higher gross margin as a result of our ongoing focus on inventory management."

A person holds a smartphone with the Kohl's app loaded.

Kohl's has been investing in its digital operations. Image source: Kohl's.

Is Kohl's on solid ground?

The retailer certainly seems to have found its niche. It has made moves not only to perfect its merchandise but also to rightsize its store portfolio. That has included subleasing space at some locations, making a deal to take Amazon returns in select locations, and devoting more space to digital fulfillment.

Two of those moves -- the subleasing and the Amazon deal -- work in multiple ways. Yes, they bring in revenue. But they also drive traffic to Kohl's stores, something that remains important even as the company moves to a more omnichannel model.

Kohl's has done a very good job of strengthening its retail stores while also building its digital capacity. The company has also made some behind-the-scenes moves to strengthen its position in the long term.

"For the first time, we repurchased debt in the open market during the quarter. We repurchased $28 million of our debt at slightly below par," said CFO Bruce Besanko during the Q2 earnings call. "We plan to monitor the market for future opportunities to repurchase more of our debt."

The company has also improved its cash position ending the quarter; its $1.1 billion in cash and cash equivalents are "an increase of $514 million over the prior-year quarter-end," according to Besanko. That was achieved partly by inventory management reducing per-store inventory by 8%.

Kohl's looks prepared

The retailer is in a solid cash position, and it has moves it can make to conserve cash if the market takes a major downturn. Kohl's repurchased 1.4 million shares in Q1, and 2.5 million shares to date. It also will pay a $0.61 dividend in Q2. Both of those programs could be lessened or turned off if things truly went bad.

That, however, is not likely. Kohl's has invested in its business and made important transformations. The company has even raised its earnings guidance for 2018 to a range of $4.96 to $5.36 per share, compared to its earlier prediction of $4.86 to $5.31.

Kohl's has runway. There's no reason to believe the company will struggle anytime soon, but its leaders have positioned it well to deal with a downturn in the market or a continued change in consumer behavior.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Daniel B. Kline has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends AMZN. The Motley Fool has a disclosure policy.