Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

istextorbinary

Package Overview
Dependencies
Maintainers
1
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

istextorbinary - npm Package Versions

1
911

3.0.0-next.1574052962.e6c63c6493b333bf1a5d738eef3dbb5b197fa503

Diff

bevryme
published 2.6.0-next.1573691633.52a194a07434de7c75cb5441a8c5a29b28ea8dbd •

bevryme
published 2.6.0 •

Changelog

Source

v2.6.0 2019 November 13

  • Updated dependencies, base files, and editions using boundation
bevryme
published 2.6.0-next.1573617145.5cfe16592e36be8a7aeb014e2b0fb5544af540f1 •

bevryme
published 2.5.1 •

Changelog

Source

v2.5.1 2019 January 21

  • Fixed a readme documentation inconsistency

  • Fixed node v0.12 and v4 support (regression since v2.5.0)

bevryme
published 2.5.0 •

Changelog

Source

v2.5.0 2019 January 21

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 of isTextSync (a method which only lingers for backwards compatibility)
    • isBinary, which you should use instead of isBinarySync (a method which only lingers for backwards compatibility)
    • getEncoding, which you should use instead of getEncoding (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 of isText's callback signature (a signature which only lingers for backwards compatibility)
    • isBinaryCallback, which you should use instead of isBinary's callback signature (a signature which only lingers for backwards compatibility)
    • getEncodingCallback, which you should use instead of getEncoding'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 wraps isText with a promise signature
    • isBinaryPromise which wraps isBinary with a promise signature
    • getEncodingPromise which wraps getEncoding with a promise signature
  • isBinary method now correctly returns null instead of true when no inputs are provided

  • Added tests for all methods

bevryme
published 2.4.2 •

Changelog

Source

v2.4.2 2019 January 21

  • Added more keywords to package.json
bevryme
published 2.4.1 •

Changelog

Source

v2.4.1 2019 January 21

  • README now elaborates on the operation of this package
bevryme
published 2.4.0 •

Changelog

Source

v2.4.0 2019 January 20

  • 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.
  • 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 of getEncodingSync.
  • Updated base files and editions using boundation
bevryme
published 2.3.0 •

Changelog

Source

v2.3.0 2018 November 7

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc