Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return extra boolean variable "is_binary" from via_content #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JoshuaS3
Copy link

@JoshuaS3 JoshuaS3 commented Jan 3, 2021

With this, via_content will return two variables: mimetype and is_binary.

tests.lua has been updated to reflect this change.

Library function via_content will return a second new variable
is_binary. `true` if mime type is for binary format, `false` if not.

This shouldn't break any old code.
Also uses xpcall to get and report an error message and stack trace of
any puremagic library errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant