- Updated dependencies, base files, and editions using boundation
- Thank you to the sponsors: Andrew Nesbitt, Balsa, Codecov, Poonacha Medappa, Rob Morris, Sentry, Syntax
- Updated dependencies, base files, and editions using boundation
- Thank you to the sponsors: Andrew Nesbitt, Balsa, Codecov, Poonacha Medappa, Rob Morris, Sentry, Syntax
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Minimum required Node.js version changed from
node: >=10
tonode: >=4
adapting to ecosystem changes
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Minimum required Node.js version changed from
node: >=14
tonode: >=10
adapting to ecosystem changes
- Updated dependencies, base files, and editions using boundation
- Updated license from
MIT
toArtistic-2.0
- Minimum required node version changed from
node: >=10
tonode: >=14
to keep up with mandatory ecosystem changes
- Thanks to Kukhyeon Heo for pull request #214
istextorbinary
can now speak UTF8 multibyte characters, now understanding that Crilly, CJK, Emoji, etc. are not binary. This is a big win.- Closes issue #13 reported by dlsgusrn7577
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Potential Breaking Change: Removed the long-standing deprecated sync, callback, and promise wrappers, now the only exports are
isText
,isBinary
, andgetEncoding
- Potential Breaking Change:
getEncoding
now checks start, middle, and end ifcheckBegin
was not provided. Prior functionality only checked start, middle, and end, ifopts
were not provided. This new functionality allows customcheckLength
for start, middle, and end. - Converted to TypeScript, and provided proper documentation for
isBinary
instead of just referencingisText
, so your intellisense is now more helpful - Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Minimum required node version changed from
node: >=8
tonode: >=10
to keep up with mandatory ecosystem changes
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Minimum required node version changed from
node: >=0.12
tonode: >=8
to keep up with mandatory ecosystem changes
- Updated dependencies, base files, and editions using boundation
-
Fixed a readme documentation inconsistency
-
Fixed node v0.12 and v4 support (regression since v2.5.0)
As the detection algorithms are result returns, with the asynchronous signatures just wrappers, we have changed isText
, isBinary
, and getEncoding
to return the result if no callback was provided to them, maintaining backwards compatibility, but encouraging intuitive usage of the methods with the least overhead.
-
The following methods have had return signatures added to them, which should be the preferable usage:
isText
, which you should use instead ofisTextSync
(a method which only lingers for backwards compatibility)isBinary
, which you should use instead ofisBinarySync
(a method which only lingers for backwards compatibility)getEncoding
, which you should use instead ofgetEncoding
(a method which only lingers for backwards compatibility)
-
If you require callback usage, the following callback wrapper methods have been added:
isTextCallback
, which you should use instead ofisText
's callback signature (a signature which only lingers for backwards compatibility)isBinaryCallback
, which you should use instead ofisBinary
's callback signature (a signature which only lingers for backwards compatibility)getEncodingCallback
, which you should use instead ofgetEncoding
's callback signature (a signature which only lingers for backwards compatibility)
-
If you require promise usage, the following promise wrapper methods have been added:
isTextPromise
which wrapsisText
with a promise signatureisBinaryPromise
which wrapsisBinary
with a promise signaturegetEncodingPromise
which wrapsgetEncoding
with a promise signature
-
isBinary
method now correctly returnsnull
instead oftrue
when no inputs are provided -
Added tests for all methods
- Added more keywords to
package.json
- README now elaborates on the operation of this package
- Asynchronous methods now
try...catch
the synchronous methods to ensure an error from invalid inputs would be given to the callback.- Before they would not do any
try...catch
so if invalid inputs were given, the error would throw.
- Before they would not do any
- The JSDoc documentation has been updated for accuracy.
- It previously indicated that the return types of the sync methods could have been an error instance, this was incorrect, they would throw if received invalid inputs.
- It previously indicated that the result for of the async
getEncoding
callback was a boolean, this was incorrect, it would be the string result ofgetEncodingSync
.
- Updated base files and editions using boundation
- Ensure that textextensions and binaryextensions are the latest versions at the time of publishing
- Updated base files and editions using boundation
- Added missing development dependency
- Fixed invalid
package.json
error- Thanks to Sean for pull request #8
- Updated base files
- Support v2 of textextensions and binaryextensions
- Converted from CoffeeScript to JavaScript
- Fixed
getEncoding
andisText
not handling errors correctly - Right-most extension takes preference, instead of left-most
- Thanks to Ian Sibner for pull request #5
- This has bumped the major as it changes the output result, which could potentially break some apps, despite the API remaining exactly the same
- Fixed build
- Added test for text files
- Cleaned up thanks to Shunnosuke Watanabe for pull request #2
- Initial release extracted from bal-util where it was introduced 2012 September 24.