LuisEnMarroquin / json-as-xlsx

Create excel from json npm package
https://www.npmjs.com/package/json-as-xlsx
MIT License
159 stars 26 forks source link

fix: append `null` type under `IContent` #79

Closed cjxe closed 1 year ago

cjxe commented 1 year ago

We can extend the IContent type with null for more flexibility

Why?

APIs return the null value when they return nothing. In this case, the browser can receive a key-value pair with null value. Then, we can store this null value in a new Excel sheet (even if it's null); and then we won't receive a type error just because some key's value of some content is null

How?

In this PR, I appended the null type under IContent type