pax_global_header00006660000000000000000000000064130710266450014516gustar00rootroot0000000000000052 comment=98a1310b385d24dd8cf1a67aa258e91ec03743e4 https-browserify-1.0.0/000077500000000000000000000000001307102664500150475ustar00rootroot00000000000000https-browserify-1.0.0/LICENSE000066400000000000000000000021171307102664500160550ustar00rootroot00000000000000This software is released under the MIT license: Copyright (c) James Halliday 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. https-browserify-1.0.0/index.js000066400000000000000000000013151307102664500165140ustar00rootroot00000000000000var http = require('http') var url = require('url') var https = module.exports for (var key in http) { if (http.hasOwnProperty(key)) https[key] = http[key] } https.request = function (params, cb) { params = validateParams(params) return http.request.call(this, params, cb) } https.get = function (params, cb) { params = validateParams(params) return http.get.call(this, params, cb) } function validateParams (params) { if (typeof params === 'string') { params = url.parse(params) } if (!params.protocol) { params.protocol = 'https:' } if (params.protocol !== 'https:') { throw new Error('Protocol "' + params.protocol + '" not supported. Expected "https:"') } return params } https-browserify-1.0.0/package.json000066400000000000000000000011311307102664500173310ustar00rootroot00000000000000{ "name": "https-browserify", "description": "https module compatability for browserify", "version": "1.0.0", "author": { "name": "James Halliday", "email": "mail@substack.net", "url": "http://substack.net" }, "devDependencies": { "standard": "^9.0.2" }, "homepage": "https://github.com/substack/https-browserify", "keywords": [ "browser", "browserify", "https" ], "license": "MIT", "main": "index.js", "repository": { "type": "git", "url": "git://github.com/substack/https-browserify.git" }, "scripts": { "test": "standard" } } https-browserify-1.0.0/readme.markdown000066400000000000000000000005651307102664500200560ustar00rootroot00000000000000# https-browserify https module compatability for browserify # example ``` js var https = require('https-browserify') var r = https.request('https://github.com') r.on('request', function (res) { console.log(res) }) ``` # methods The API is the same as the client portion of the [node core https module](http://nodejs.org/docs/latest/api/https.html). # license MIT