Init
This commit is contained in:
commit
4e066bffc9
10017 changed files with 1322084 additions and 0 deletions
39
node_modules/istextorbinary/.npmignore
generated
vendored
Normal file
39
node_modules/istextorbinary/.npmignore
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# v1.3.23 October 11, 2014
|
||||
# https://github.com/bevry/base
|
||||
|
||||
# Temp Files
|
||||
**/*.log
|
||||
**/.docpad.db
|
||||
|
||||
# Build Files
|
||||
build/
|
||||
components/
|
||||
bower_components/
|
||||
node_modules/
|
||||
|
||||
# Private Files
|
||||
.env
|
||||
|
||||
# Development Files
|
||||
.editorconfig
|
||||
.eslintrc
|
||||
.jshintrc
|
||||
coffeelint.json
|
||||
.travis*
|
||||
Cakefile
|
||||
Makefile
|
||||
BACKERS.md
|
||||
CONTRIBUTING.md
|
||||
HISTORY.md
|
||||
**/src/
|
||||
**/test/
|
||||
|
||||
# Other Package Definitions
|
||||
template.js
|
||||
component.json
|
||||
bower.json
|
||||
|
||||
# =====================================
|
||||
# CUSTOM MODIFICATIONS
|
||||
|
||||
# None
|
||||
12
node_modules/istextorbinary/HISTORY.md
generated
vendored
Normal file
12
node_modules/istextorbinary/HISTORY.md
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# History
|
||||
|
||||
## v1.0.2 January 16, 2015
|
||||
- Fixed build
|
||||
- Added test for text files
|
||||
|
||||
## v1.0.1 January 16, 2015
|
||||
- Cleaned up thanks to [Shunnosuke Watanabe](https://github.com/shinnn) for [pull request #2](https://github.com/bevry/istextorbinary/pull/2)
|
||||
|
||||
## v1.0.0 October 25, 2013
|
||||
- Initial release extracted from [balupton/bal-util](https://github.com/balupton/bal-util/blob/6501d51bc0244fce3781fc0150136f7493099237/src/lib/paths.coffee#L100-L201)
|
||||
|
||||
18
node_modules/istextorbinary/LICENSE.md
generated
vendored
Normal file
18
node_modules/istextorbinary/LICENSE.md
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
|
||||
<!-- LICENSEFILE/ -->
|
||||
|
||||
# License
|
||||
|
||||
Copyright © 2012+ Bevry Pty Ltd <us@bevry.me> (http://bevry.me)
|
||||
<br/>Copyright © 2011 Benjamin Lupton <b@lupton.cc> (http://balupton.com)
|
||||
|
||||
## The MIT License
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
<!-- /LICENSEFILE -->
|
||||
|
||||
|
||||
119
node_modules/istextorbinary/README.md
generated
vendored
Normal file
119
node_modules/istextorbinary/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
|
||||
<!-- TITLE/ -->
|
||||
|
||||
# Is Text or Binary?
|
||||
|
||||
<!-- /TITLE -->
|
||||
|
||||
|
||||
<!-- BADGES/ -->
|
||||
|
||||
[](http://travis-ci.org/bevry/istextorbinary "Check this project's build status on TravisCI")
|
||||
[](https://npmjs.org/package/istextorbinary "View this project on NPM")
|
||||
[](https://npmjs.org/package/istextorbinary "View this project on NPM")
|
||||
[](https://david-dm.org/bevry/istextorbinary)
|
||||
[](https://david-dm.org/bevry/istextorbinary#info=devDependencies)<br/>
|
||||
[](https://www.gratipay.com/bevry/ "Donate weekly to this project using Gratipay")
|
||||
[](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr")
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6 "Donate once-off to this project using Paypal")
|
||||
[](https://coinbase.com/checkouts/9ef59f5479eec1d97d63382c9ebcb93a "Donate once-off to this project using BitCoin")
|
||||
[](http://amzn.com/w/2F8TXKSNAFG4V "Buy an item on our wishlist for us")
|
||||
|
||||
<!-- /BADGES -->
|
||||
|
||||
|
||||
<!-- DESCRIPTION/ -->
|
||||
|
||||
Determines if a buffer is comprised of text or binary
|
||||
|
||||
<!-- /DESCRIPTION -->
|
||||
|
||||
|
||||
<!-- INSTALL/ -->
|
||||
|
||||
## Install
|
||||
|
||||
### [NPM](http://npmjs.org/)
|
||||
- Use: `require('istextorbinary')`
|
||||
- Install: `npm install --save istextorbinary`
|
||||
|
||||
<!-- /INSTALL -->
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
``` javascript
|
||||
// Sync
|
||||
var result = require('istextorbinary').isTextSync(filename, buffer);
|
||||
|
||||
// Async
|
||||
require('istextorbinary').isText(filename, buffer, function(err, result){
|
||||
// ...
|
||||
});
|
||||
|
||||
// You can supply text or buffer, or both text and buffer, the more provided, the more accurate the result
|
||||
// isBinary, and isBinarySync methods also provided
|
||||
```
|
||||
|
||||
|
||||
<!-- HISTORY/ -->
|
||||
|
||||
## History
|
||||
[Discover the change history by heading on over to the `HISTORY.md` file.](https://github.com/bevry/istextorbinary/blob/master/HISTORY.md#files)
|
||||
|
||||
<!-- /HISTORY -->
|
||||
|
||||
|
||||
<!-- CONTRIBUTE/ -->
|
||||
|
||||
## Contribute
|
||||
|
||||
[Discover how you can contribute by heading on over to the `CONTRIBUTING.md` file.](https://github.com/bevry/istextorbinary/blob/master/CONTRIBUTING.md#files)
|
||||
|
||||
<!-- /CONTRIBUTE -->
|
||||
|
||||
|
||||
<!-- BACKERS/ -->
|
||||
|
||||
## Backers
|
||||
|
||||
### Maintainers
|
||||
|
||||
These amazing people are maintaining this project:
|
||||
|
||||
- Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)
|
||||
|
||||
### Sponsors
|
||||
|
||||
No sponsors yet! Will you be the first?
|
||||
|
||||
[](https://www.gratipay.com/bevry/ "Donate weekly to this project using Gratipay")
|
||||
[](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr")
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6 "Donate once-off to this project using Paypal")
|
||||
[](https://coinbase.com/checkouts/9ef59f5479eec1d97d63382c9ebcb93a "Donate once-off to this project using BitCoin")
|
||||
[](http://amzn.com/w/2F8TXKSNAFG4V "Buy an item on our wishlist for us")
|
||||
|
||||
### Contributors
|
||||
|
||||
These amazing people have contributed code to this project:
|
||||
|
||||
- [Benjamin Lupton](https://github.com/balupton) <b@lupton.cc> — [view contributions](https://github.com/bevry/istextorbinary/commits?author=balupton)
|
||||
- [shinnn](https://github.com/shinnn) — [view contributions](https://github.com/bevry/istextorbinary/commits?author=shinnn)
|
||||
|
||||
[Become a contributor!](https://github.com/bevry/istextorbinary/blob/master/CONTRIBUTING.md#files)
|
||||
|
||||
<!-- /BACKERS -->
|
||||
|
||||
|
||||
<!-- LICENSE/ -->
|
||||
|
||||
## License
|
||||
|
||||
Licensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT license](http://creativecommons.org/licenses/MIT/)
|
||||
|
||||
Copyright © 2012+ Bevry Pty Ltd <us@bevry.me> (http://bevry.me)
|
||||
<br/>Copyright © 2011 Benjamin Lupton <b@lupton.cc> (http://balupton.com)
|
||||
|
||||
<!-- /LICENSE -->
|
||||
|
||||
|
||||
123
node_modules/istextorbinary/out/lib/istextorbinary.js
generated
vendored
Normal file
123
node_modules/istextorbinary/out/lib/istextorbinary.js
generated
vendored
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
// Generated by CoffeeScript 1.8.0
|
||||
(function() {
|
||||
var binaryExtensions, isTextOrBinary, pathUtil, textExtensions,
|
||||
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
||||
|
||||
pathUtil = require('path');
|
||||
|
||||
textExtensions = require('textextensions');
|
||||
|
||||
binaryExtensions = require('binaryextensions');
|
||||
|
||||
isTextOrBinary = {
|
||||
isTextSync: function(filename, buffer) {
|
||||
var extension, isText, _i, _len;
|
||||
isText = null;
|
||||
if (filename) {
|
||||
filename = pathUtil.basename(filename).split('.');
|
||||
for (_i = 0, _len = filename.length; _i < _len; _i++) {
|
||||
extension = filename[_i];
|
||||
if (__indexOf.call(textExtensions, extension) >= 0) {
|
||||
isText = true;
|
||||
break;
|
||||
}
|
||||
if (__indexOf.call(binaryExtensions, extension) >= 0) {
|
||||
isText = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (buffer && isText === null) {
|
||||
isText = isTextOrBinary.getEncodingSync(buffer) === 'utf8';
|
||||
}
|
||||
return isText;
|
||||
},
|
||||
isText: function(filename, buffer, next) {
|
||||
var result;
|
||||
result = isTextOrBinary.isTextSync(filename, buffer);
|
||||
if (result instanceof Error) {
|
||||
next(err);
|
||||
} else {
|
||||
next(null, result);
|
||||
}
|
||||
return this;
|
||||
},
|
||||
isBinarySync: function(filename, buffer, next) {
|
||||
var result;
|
||||
result = isTextOrBinary.isTextSync(filename, buffer);
|
||||
if (result instanceof Error) {
|
||||
return result;
|
||||
} else {
|
||||
return !result;
|
||||
}
|
||||
return this;
|
||||
},
|
||||
isBinary: function(filename, buffer, next) {
|
||||
isTextOrBinary.isText(filename, buffer, function(err, result) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
return next(null, !result);
|
||||
});
|
||||
return this;
|
||||
},
|
||||
getEncodingSync: function(buffer, opts) {
|
||||
var binaryEncoding, charCode, chunkBegin, chunkEnd, chunkLength, contentChunkUTF8, encoding, i, textEncoding, _i, _ref;
|
||||
textEncoding = 'utf8';
|
||||
binaryEncoding = 'binary';
|
||||
if (opts == null) {
|
||||
chunkLength = 24;
|
||||
encoding = isTextOrBinary.getEncodingSync(buffer, {
|
||||
chunkLength: chunkLength,
|
||||
chunkBegin: chunkBegin
|
||||
});
|
||||
if (encoding === textEncoding) {
|
||||
chunkBegin = Math.max(0, Math.floor(buffer.length / 2) - chunkLength);
|
||||
encoding = isTextOrBinary.getEncodingSync(buffer, {
|
||||
chunkLength: chunkLength,
|
||||
chunkBegin: chunkBegin
|
||||
});
|
||||
if (encoding === textEncoding) {
|
||||
chunkBegin = Math.max(0, buffer.length - chunkLength);
|
||||
encoding = isTextOrBinary.getEncodingSync(buffer, {
|
||||
chunkLength: chunkLength,
|
||||
chunkBegin: chunkBegin
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
chunkLength = opts.chunkLength, chunkBegin = opts.chunkBegin;
|
||||
if (chunkLength == null) {
|
||||
chunkLength = 24;
|
||||
}
|
||||
if (chunkBegin == null) {
|
||||
chunkBegin = 0;
|
||||
}
|
||||
chunkEnd = Math.min(buffer.length, chunkBegin + chunkLength);
|
||||
contentChunkUTF8 = buffer.toString(textEncoding, chunkBegin, chunkEnd);
|
||||
encoding = textEncoding;
|
||||
for (i = _i = 0, _ref = contentChunkUTF8.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
|
||||
charCode = contentChunkUTF8.charCodeAt(i);
|
||||
if (charCode === 65533 || charCode <= 8) {
|
||||
encoding = binaryEncoding;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return encoding;
|
||||
},
|
||||
getEncoding: function(buffer, opts, next) {
|
||||
var result;
|
||||
result = isTextOrBinary.getEncodingSync(buffer, opts);
|
||||
if (result instanceof Error) {
|
||||
next(err);
|
||||
} else {
|
||||
next(null, result);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = isTextOrBinary;
|
||||
|
||||
}).call(this);
|
||||
129
node_modules/istextorbinary/package.json
generated
vendored
Normal file
129
node_modules/istextorbinary/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "istextorbinary@1.0.2",
|
||||
"scope": null,
|
||||
"escapedName": "istextorbinary",
|
||||
"name": "istextorbinary",
|
||||
"rawSpec": "1.0.2",
|
||||
"spec": "1.0.2",
|
||||
"type": "version"
|
||||
},
|
||||
"/Users/jose/Documents/GitHub/About/node_modules/gulp-replace"
|
||||
]
|
||||
],
|
||||
"_from": "istextorbinary@1.0.2",
|
||||
"_id": "istextorbinary@1.0.2",
|
||||
"_inCache": true,
|
||||
"_location": "/istextorbinary",
|
||||
"_nodeVersion": "0.10.33",
|
||||
"_npmUser": {
|
||||
"name": "balupton",
|
||||
"email": "b@lupton.cc"
|
||||
},
|
||||
"_npmVersion": "2.1.9",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "istextorbinary@1.0.2",
|
||||
"scope": null,
|
||||
"escapedName": "istextorbinary",
|
||||
"name": "istextorbinary",
|
||||
"rawSpec": "1.0.2",
|
||||
"spec": "1.0.2",
|
||||
"type": "version"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-replace"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-1.0.2.tgz",
|
||||
"_shasum": "ace19354d1a9a0173efeb1084ce0f87b0ad7decf",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "istextorbinary@1.0.2",
|
||||
"_where": "/Users/jose/Documents/GitHub/About/node_modules/gulp-replace",
|
||||
"author": {
|
||||
"name": "2012+ Bevry Pty Ltd",
|
||||
"email": "us@bevry.me",
|
||||
"url": "http://bevry.me"
|
||||
},
|
||||
"badges": {
|
||||
"travis": true,
|
||||
"npm": true,
|
||||
"npmdownloads": true,
|
||||
"david": true,
|
||||
"daviddev": true,
|
||||
"gratipay": "bevry",
|
||||
"flattr": "344188/balupton-on-Flattr",
|
||||
"paypal": "QB8GQPZAH84N6",
|
||||
"bitcoin": "https://coinbase.com/checkouts/9ef59f5479eec1d97d63382c9ebcb93a",
|
||||
"wishlist": "http://amzn.com/w/2F8TXKSNAFG4V"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/bevry/istextorbinary/issues"
|
||||
},
|
||||
"cakeConfiguration": {
|
||||
"COFFEE_SRC_PATH": "src"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Benjamin Lupton",
|
||||
"email": "b@lupton.cc",
|
||||
"url": "https://github.com/balupton"
|
||||
},
|
||||
{
|
||||
"name": "shinnn",
|
||||
"url": "https://github.com/shinnn"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"binaryextensions": "~1.0.0",
|
||||
"textextensions": "~1.0.0"
|
||||
},
|
||||
"description": "Determines if a buffer is comprised of text or binary",
|
||||
"devDependencies": {
|
||||
"chai": "~1.10.0",
|
||||
"coffee-script": "~1.8.0",
|
||||
"joe": "~1.5.0",
|
||||
"joe-reporter-console": "~1.2.1",
|
||||
"projectz": "~0.3.17"
|
||||
},
|
||||
"directories": {
|
||||
"lib": "./out/lib"
|
||||
},
|
||||
"dist": {
|
||||
"shasum": "ace19354d1a9a0173efeb1084ce0f87b0ad7decf",
|
||||
"tarball": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-1.0.2.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.4"
|
||||
},
|
||||
"gitHead": "e7606ca61f12814cb1ddd139442cc0f1dc6bbbb4",
|
||||
"homepage": "https://github.com/bevry/istextorbinary",
|
||||
"keywords": [
|
||||
"text",
|
||||
"binary",
|
||||
"encoding"
|
||||
],
|
||||
"license": {
|
||||
"type": "MIT"
|
||||
},
|
||||
"main": "./out/lib/istextorbinary.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "balupton",
|
||||
"email": "b@lupton.cc"
|
||||
}
|
||||
],
|
||||
"name": "istextorbinary",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/bevry/istextorbinary.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node ./out/test/istextorbinary-test.js"
|
||||
},
|
||||
"title": "Is Text or Binary?",
|
||||
"version": "1.0.2"
|
||||
}
|
||||
Loading…
Reference in a new issue