istextorbinary
Advanced tools
Comparing version 2.2.1 to 2.3.0
# History | ||
## v2.3.0 2018 November 7 | ||
- Ensure that [textextensions](https://github.com/bevry/textextensions) and [binaryextensions](https://github.com/bevry/binaryextensions) are the latest versions at the time of publishing | ||
- Updated [base files](https://github.com/bevry/base) and [editions](https://github.com/bevry/editions) using [boundation](https://github.com/bevry/boundation) | ||
## v2.2.1 2018 January 24 | ||
@@ -4,0 +8,0 @@ - Added missing development dependency |
@@ -1,5 +0,4 @@ | ||
// 2016 December 29 | ||
// https://github.com/bevry/editions | ||
'use strict' | ||
/** @type {typeof import("./source/index.js") } */ | ||
module.exports = require('editions').requirePackage(__dirname, require) |
148
package.json
{ | ||
"title": "Is Text or Binary?", | ||
"name": "istextorbinary", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"description": "Determines if a buffer is comprised of text or binary", | ||
@@ -32,20 +32,21 @@ "homepage": "https://github.com/bevry/istextorbinary", | ||
"patreon", | ||
"flattr", | ||
"liberapay", | ||
"thanksapp", | ||
"boostlab", | ||
"buymeacoffee", | ||
"opencollective", | ||
"gratipay", | ||
"flattr", | ||
"crypto", | ||
"paypal", | ||
"bitcoin", | ||
"wishlist", | ||
"---", | ||
"slackin" | ||
"wishlist" | ||
], | ||
"config": { | ||
"buymeacoffeeUsername": "balupton", | ||
"cryptoURL": "https://bevry.me/crypto", | ||
"flattrUsername": "balupton", | ||
"liberapayUsername": "bevry", | ||
"opencollectiveUsername": "bevry", | ||
"patreonUsername": "bevry", | ||
"opencollectiveUsername": "bevry", | ||
"gratipayUsername": "bevry", | ||
"flattrUsername": "balupton", | ||
"paypalURL": "https://bevry.me/paypal", | ||
"bitcoinURL": "https://bevry.me/bitcoin", | ||
"wishlistURL": "https://bevry.me/wishlist", | ||
"slackinURL": "https://slack.bevry.me" | ||
"wishlistURL": "https://bevry.me/wishlist" | ||
} | ||
@@ -63,3 +64,3 @@ }, | ||
"Ian Sibner <sibnerian@gmail.com> (http://www.sibnerian.com/)", | ||
"Sean <albinodrought@gmail.com> (https://github.com/AlbinoDrought)" | ||
"Sean <albinodrought@gmail.com> (http://albinodrought.com/)" | ||
], | ||
@@ -78,66 +79,113 @@ "bugs": { | ||
{ | ||
"description": "Source + ESNext + Require", | ||
"description": "esnext source code with require for modules", | ||
"directory": "source", | ||
"entry": "index.js", | ||
"directory": "source", | ||
"syntaxes": [ | ||
"javascript", | ||
"esnext", | ||
"require", | ||
"const", | ||
"let", | ||
"forof", | ||
"destructuring", | ||
"defaults" | ||
] | ||
"require" | ||
], | ||
"engines": { | ||
"node": ">=6", | ||
"browsers": false | ||
} | ||
}, | ||
{ | ||
"description": "Babel Compiled + ES2015 + Require", | ||
"description": "esnext compiled for browsers with require for modules", | ||
"directory": "edition-browsers", | ||
"entry": "index.js", | ||
"directory": "es2015", | ||
"syntaxes": [ | ||
"javascript", | ||
"es2015", | ||
"require" | ||
] | ||
], | ||
"engines": { | ||
"node": false, | ||
"browsers": "defaults" | ||
} | ||
}, | ||
{ | ||
"description": "esnext compiled for node.js >=0.12 with require for modules", | ||
"directory": "edition-node-0.12", | ||
"entry": "index.js", | ||
"syntaxes": [ | ||
"javascript", | ||
"require" | ||
], | ||
"engines": { | ||
"node": "0.12 || 4 || 6 || 8 || 10", | ||
"browsers": false | ||
} | ||
} | ||
], | ||
"main": "index.js", | ||
"browser": "es2015/index.js", | ||
"browser": "edition-browsers/index.js", | ||
"dependencies": { | ||
"binaryextensions": "2", | ||
"editions": "^1.3.3", | ||
"textextensions": "2" | ||
"binaryextensions": "^2.1.2", | ||
"editions": "^2.0.2", | ||
"textextensions": "^2.4.0" | ||
}, | ||
"devDependencies": { | ||
"assert-helpers": "^4.5.0", | ||
"assert-helpers": "^4.5.1", | ||
"babel-cli": "^6.26.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"documentation": "^5.3.5", | ||
"eslint": "^4.16.0", | ||
"babel-preset-env": "^1.7.0", | ||
"documentation": "^8.1.2", | ||
"eslint": "^5.8.0", | ||
"joe": "^2.0.2", | ||
"joe-reporter-console": "^2.0.1", | ||
"joe-reporter-console": "^2.0.2", | ||
"projectz": "^1.4.0", | ||
"surge": "^0.19.0" | ||
"surge": "^0.20.1", | ||
"valid-directory": "^1.0.0" | ||
}, | ||
"optionalDependencies": {}, | ||
"scripts": { | ||
"our:setup": "npm run our:setup:npm", | ||
"our:setup:npm": "npm install", | ||
"our:clean": "rm -Rf ./docs ./es2015 ./es5 ./out", | ||
"our:compile": "npm run our:compile:es2015", | ||
"our:compile:es2015": "babel ./source --out-dir ./es2015 --presets es2015", | ||
"our:clean": "rm -Rf ./docs ./edition* ./es2015 ./es5 ./out", | ||
"our:compile": "npm run our:compile:edition-browsers && npm run our:compile:edition-node-0.12", | ||
"our:compile:edition-browsers": "env BABEL_ENV=edition-browsers babel --out-dir ./edition-browsers ./source", | ||
"our:compile:edition-node-0.12": "env BABEL_ENV=edition-node-0.12 babel --out-dir ./edition-node-0.12 ./source", | ||
"our:deploy": "echo no need for this project", | ||
"our:meta": "npm run our:meta:docs && npm run our:meta:projectz", | ||
"our:meta:docs": "documentation build -f html -o ./docs -g --shallow ./source/**.js", | ||
"our:meta:projectz": "projectz compile", | ||
"our:verify": "npm run our:verify:eslint", | ||
"our:verify:eslint": "eslint --fix ./source", | ||
"our:test": "npm run our:verify && npm test", | ||
"our:release": "npm run our:release:prepare && npm run our:release:check && npm run our:release:tag && npm run our:release:push", | ||
"our:release": "npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push", | ||
"our:release:check-changelog": "cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)", | ||
"our:release:check-dirty": "git diff --exit-code", | ||
"our:release:prepare": "npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta", | ||
"our:release:check": "npm run our:release:check:changelog && npm run our:release:check:dirty", | ||
"our:release:check:changelog": "cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)", | ||
"our:release:check:dirty": "git diff --exit-code", | ||
"our:release:push": "git push origin master && git push origin --tags", | ||
"our:release:tag": "export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"", | ||
"our:release:push": "git push origin master && git push origin --tags", | ||
"our:setup": "npm run our:setup:npm", | ||
"our:setup:npm": "npm install", | ||
"our:test": "npm run our:verify && npm test", | ||
"our:verify": "npm run our:verify:directory && npm run our:verify:eslint", | ||
"our:verify:directory": "npx valid-directory", | ||
"our:verify:eslint": "eslint --fix ./source", | ||
"test": "node --harmony ./test.js --joe-reporter=console" | ||
}, | ||
"babel": { | ||
"env": { | ||
"edition-browsers": { | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"targets": { | ||
"browsers": "defaults" | ||
} | ||
} | ||
] | ||
] | ||
}, | ||
"edition-node-0.12": { | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"targets": { | ||
"node": "0.12" | ||
} | ||
} | ||
] | ||
] | ||
} | ||
} | ||
} | ||
} |
@@ -17,10 +17,11 @@ <!-- TITLE/ --> | ||
<span class="badge-patreon"><a href="https://patreon.com/bevry" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a></span> | ||
<span class="badge-flattr"><a href="https://flattr.com/profile/balupton" title="Donate to this project using Flattr"><img src="https://img.shields.io/badge/flattr-donate-yellow.svg" alt="Flattr donate button" /></a></span> | ||
<span class="badge-liberapay"><a href="https://liberapay.com/bevry" title="Donate to this project using Liberapay"><img src="https://img.shields.io/badge/liberapay-donate-yellow.svg" alt="Liberapay donate button" /></a></span> | ||
<span class="badge-thanksapp"><a href="https://givethanks.app/donate/npm/istextorbinary" title="Donate to this project using Thanks App"><img src="https://img.shields.io/badge/thanksapp-donate-yellow.svg" alt="Thanks App donate button" /></a></span> | ||
<span class="badge-boostlab"><a href="https://boost-lab.app/bevry/istextorbinary" title="Donate to this project using Boost Lab"><img src="https://img.shields.io/badge/boostlab-donate-yellow.svg" alt="Boost Lab donate button" /></a></span> | ||
<span class="badge-buymeacoffee"><a href="https://buymeacoffee.com/balupton" title="Donate to this project using Buy Me A Coffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg" alt="Buy Me A Coffee donate button" /></a></span> | ||
<span class="badge-opencollective"><a href="https://opencollective.com/bevry" title="Donate to this project using Open Collective"><img src="https://img.shields.io/badge/open%20collective-donate-yellow.svg" alt="Open Collective donate button" /></a></span> | ||
<span class="badge-gratipay"><a href="https://www.gratipay.com/bevry" title="Donate weekly to this project using Gratipay"><img src="https://img.shields.io/badge/gratipay-donate-yellow.svg" alt="Gratipay donate button" /></a></span> | ||
<span class="badge-flattr"><a href="https://flattr.com/profile/balupton" title="Donate to this project using Flattr"><img src="https://img.shields.io/badge/flattr-donate-yellow.svg" alt="Flattr donate button" /></a></span> | ||
<span class="badge-crypto"><a href="https://bevry.me/crypto" title="Donate to this project using Cryptocurrency"><img src="https://img.shields.io/badge/crypto-donate-yellow.svg" alt="crypto donate button" /></a></span> | ||
<span class="badge-paypal"><a href="https://bevry.me/paypal" title="Donate to this project using Paypal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" alt="PayPal donate button" /></a></span> | ||
<span class="badge-bitcoin"><a href="https://bevry.me/bitcoin" title="Donate once-off to this project using Bitcoin"><img src="https://img.shields.io/badge/bitcoin-donate-yellow.svg" alt="Bitcoin donate button" /></a></span> | ||
<span class="badge-wishlist"><a href="https://bevry.me/wishlist" title="Buy an item on our wishlist for us"><img src="https://img.shields.io/badge/wishlist-donate-yellow.svg" alt="Wishlist browse button" /></a></span> | ||
<br class="badge-separator" /> | ||
<span class="badge-slackin"><a href="https://slack.bevry.me" title="Join this project's slack community"><img src="https://slack.bevry.me/badge.svg" alt="Slack community badge" /></a></span> | ||
@@ -48,3 +49,3 @@ <!-- /BADGES --> | ||
<li>Module: <code>require('istextorbinary')</code></li> | ||
<li>CDN URL: <code>//wzrd.in/bundle/istextorbinary@2.2.1</code></li></ul> | ||
<li>CDN URL: <code>//wzrd.in/bundle/istextorbinary@2.3.0</code></li></ul> | ||
@@ -60,7 +61,6 @@ <a href="http://enderjs.com" title="Ender is a full featured package manager for your browser"><h3>Ender</h3></a><ul> | ||
<ul><li><code>istextorbinary</code> aliases <code>istextorbinary/index.js</code> which uses <a href="https://github.com/bevry/editions" title="Editions are the best way to produce and consume packages you care about.">Editions</a> to automatically select the correct edition for the consumers environment</li> | ||
<li><code>istextorbinary/source/index.js</code> is Source + <a href="https://babeljs.io/docs/learn-es2015/" title="ECMAScript Next">ESNext</a> + <a href="https://nodejs.org/dist/latest-v5.x/docs/api/modules.html" title="Node/CJS Modules">Require</a></li> | ||
<li><code>istextorbinary/es2015/index.js</code> is <a href="https://babeljs.io" title="The compiler for writing next generation JavaScript">Babel</a> Compiled + <a href="http://babeljs.io/docs/plugins/preset-es2015/" title="ECMAScript 2015">ES2015</a> + <a href="https://nodejs.org/dist/latest-v5.x/docs/api/modules.html" title="Node/CJS Modules">Require</a></li></ul> | ||
<li><code>istextorbinary/source/index.js</code> is esnext source code with require for modules</li> | ||
<li><code>istextorbinary/edition-browsers/index.js</code> is esnext compiled for browsers with require for modules</li> | ||
<li><code>istextorbinary/edition-node-0.12/index.js</code> is esnext compiled for node.js >=0.12 with require for modules</li></ul> | ||
<p>Older environments may need <a href="https://babeljs.io/docs/usage/polyfill/" title="A polyfill that emulates missing ECMAScript environment features">Babel's Polyfill</a> or something similar.</p> | ||
<!-- /INSTALL --> | ||
@@ -112,3 +112,3 @@ | ||
<ul><li><a href="http://balupton.com">Benjamin Lupton</a></li> | ||
<ul><li><a href="http://balupton.com">Benjamin Lupton</a> — <a href="https://github.com/bevry/istextorbinary/commits?author=balupton" title="View the GitHub contributions of Benjamin Lupton on repository bevry/istextorbinary">view contributions</a></li> | ||
<li><a href="https://github.com/robloach">Rob Loach</a> — <a href="https://github.com/bevry/istextorbinary/commits?author=robloach" title="View the GitHub contributions of Rob Loach on repository bevry/istextorbinary">view contributions</a></li> | ||
@@ -122,7 +122,10 @@ <li><a href="https://github.com/mikeumus">Michael Mooring</a> — <a href="https://github.com/bevry/istextorbinary/commits?author=mikeumus" title="View the GitHub contributions of Michael Mooring on repository bevry/istextorbinary">view contributions</a></li></ul> | ||
<span class="badge-patreon"><a href="https://patreon.com/bevry" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a></span> | ||
<span class="badge-flattr"><a href="https://flattr.com/profile/balupton" title="Donate to this project using Flattr"><img src="https://img.shields.io/badge/flattr-donate-yellow.svg" alt="Flattr donate button" /></a></span> | ||
<span class="badge-liberapay"><a href="https://liberapay.com/bevry" title="Donate to this project using Liberapay"><img src="https://img.shields.io/badge/liberapay-donate-yellow.svg" alt="Liberapay donate button" /></a></span> | ||
<span class="badge-thanksapp"><a href="https://givethanks.app/donate/npm/istextorbinary" title="Donate to this project using Thanks App"><img src="https://img.shields.io/badge/thanksapp-donate-yellow.svg" alt="Thanks App donate button" /></a></span> | ||
<span class="badge-boostlab"><a href="https://boost-lab.app/bevry/istextorbinary" title="Donate to this project using Boost Lab"><img src="https://img.shields.io/badge/boostlab-donate-yellow.svg" alt="Boost Lab donate button" /></a></span> | ||
<span class="badge-buymeacoffee"><a href="https://buymeacoffee.com/balupton" title="Donate to this project using Buy Me A Coffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg" alt="Buy Me A Coffee donate button" /></a></span> | ||
<span class="badge-opencollective"><a href="https://opencollective.com/bevry" title="Donate to this project using Open Collective"><img src="https://img.shields.io/badge/open%20collective-donate-yellow.svg" alt="Open Collective donate button" /></a></span> | ||
<span class="badge-gratipay"><a href="https://www.gratipay.com/bevry" title="Donate weekly to this project using Gratipay"><img src="https://img.shields.io/badge/gratipay-donate-yellow.svg" alt="Gratipay donate button" /></a></span> | ||
<span class="badge-flattr"><a href="https://flattr.com/profile/balupton" title="Donate to this project using Flattr"><img src="https://img.shields.io/badge/flattr-donate-yellow.svg" alt="Flattr donate button" /></a></span> | ||
<span class="badge-crypto"><a href="https://bevry.me/crypto" title="Donate to this project using Cryptocurrency"><img src="https://img.shields.io/badge/crypto-donate-yellow.svg" alt="crypto donate button" /></a></span> | ||
<span class="badge-paypal"><a href="https://bevry.me/paypal" title="Donate to this project using Paypal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" alt="PayPal donate button" /></a></span> | ||
<span class="badge-bitcoin"><a href="https://bevry.me/bitcoin" title="Donate once-off to this project using Bitcoin"><img src="https://img.shields.io/badge/bitcoin-donate-yellow.svg" alt="Bitcoin donate button" /></a></span> | ||
<span class="badge-wishlist"><a href="https://bevry.me/wishlist" title="Buy an item on our wishlist for us"><img src="https://img.shields.io/badge/wishlist-donate-yellow.svg" alt="Wishlist browse button" /></a></span> | ||
@@ -134,6 +137,6 @@ | ||
<ul><li><a href="http://balupton.com">Benjamin Lupton</a></li> | ||
<li><a href="http://shinnn.github.io">Shinnosuke Watanabe</a></li> | ||
<li><a href="http://www.sibnerian.com/">Ian Sibner</a></li> | ||
<li><a href="https://github.com/AlbinoDrought">Sean</a> — <a href="https://github.com/bevry/istextorbinary/commits?author=AlbinoDrought" title="View the GitHub contributions of Sean on repository bevry/istextorbinary">view contributions</a></li></ul> | ||
<ul><li><a href="http://balupton.com">Benjamin Lupton</a> — <a href="https://github.com/bevry/istextorbinary/commits?author=balupton" title="View the GitHub contributions of Benjamin Lupton on repository bevry/istextorbinary">view contributions</a></li> | ||
<li><a href="http://shinnn.github.io">Shinnosuke Watanabe</a> — <a href="https://github.com/bevry/istextorbinary/commits?author=shinnn" title="View the GitHub contributions of Shinnosuke Watanabe on repository bevry/istextorbinary">view contributions</a></li> | ||
<li><a href="http://www.sibnerian.com/">Ian Sibner</a> — <a href="https://github.com/bevry/istextorbinary/commits?author=sibnerian" title="View the GitHub contributions of Ian Sibner on repository bevry/istextorbinary">view contributions</a></li> | ||
<li><a href="http://albinodrought.com/">Sean</a> — <a href="https://github.com/bevry/istextorbinary/commits?author=AlbinoDrought" title="View the GitHub contributions of Sean on repository bevry/istextorbinary">view contributions</a></li></ul> | ||
@@ -140,0 +143,0 @@ <a href="https://github.com/bevry/istextorbinary/blob/master/CONTRIBUTING.md#files">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a> |
@@ -13,5 +13,6 @@ /* eslint no-use-before-define:0 */ | ||
* Determined by extension checks first, then if unknown extension, will fallback on encoding detection. | ||
* We do that as encoding detection cannot guarantee everything, especially for chars between utf8 and utf16 | ||
* @param {?string} filename - the filename for the file/buffer if available | ||
* @param {?Buffer} buffer - the buffer for the file if available | ||
* We do that as encoding detection cannot guarantee everything, especially for chars between utf8 and utf16. | ||
* We use the extensions from https://github.com/bevry/textextensions and https://github.com/bevry/binaryextensions | ||
* @param {string?} filename - the filename for the file/buffer if available | ||
* @param {Buffer?} buffer - the buffer for the file if available | ||
* @returns {Error|boolean} | ||
@@ -53,4 +54,4 @@ */ | ||
* Uses `isTextSync` behind the scenes. | ||
* @param {?string} filename - forwarded to `isTextSync` | ||
* @param {?Buffer} buffer - forwarded to `isTextSync` | ||
* @param {string?} filename - forwarded to `isTextSync` | ||
* @param {Buffer?} buffer - forwarded to `isTextSync` | ||
* @param {Function} next - accepts arguments: (error: Error, result: Boolean) | ||
@@ -72,4 +73,4 @@ * @returns {nothing} | ||
* Uses `isTextSync` behind the scenes. | ||
* @param {?string} filename - forwarded to `isTextSync` | ||
* @param {?Buffer} buffer - forwarded to `isTextSync` | ||
* @param {string?} filename - forwarded to `isTextSync` | ||
* @param {Buffer?} buffer - forwarded to `isTextSync` | ||
* @returns {Error|boolean} | ||
@@ -86,4 +87,4 @@ */ | ||
* Uses `isText` behind the scenes. | ||
* @param {?string} filename - forwarded to `isText` | ||
* @param {?Buffer} buffer - forwarded to `isText` | ||
* @param {string?} filename - forwarded to `isText` | ||
* @param {Buffer?} buffer - forwarded to `isText` | ||
* @param {Function} next - accepts arguments: (error: Error, result: Boolean) | ||
@@ -105,5 +106,5 @@ * @returns {nothing} | ||
* @param {Buffer} buffer | ||
* @param {?Object} [opts] | ||
* @param {?number} [opts.chunkLength = 24] | ||
* @param {?number} [opts.chunkBegin = 0] | ||
* @param {Object?} [opts] | ||
* @param {number?} [opts.chunkLength = 24] | ||
* @param {number?} [opts.chunkBegin = 0] | ||
* @returns {Error|string} either an Error instance if something went wrong, or if successful "utf8" or "binary" | ||
@@ -110,0 +111,0 @@ */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
37520
8
516
156
1
10
+ Addededitions@2.3.1(transitive)
+ Addederrlop@2.2.0(transitive)
+ Addedsemver@6.3.1(transitive)
- Removededitions@1.3.4(transitive)
Updatedbinaryextensions@^2.1.2
Updatededitions@^2.0.2
Updatedtextextensions@^2.4.0