pax_global_header00006660000000000000000000000064123561340250014513gustar00rootroot0000000000000052 comment=2a4dd325d18436c33356e6be19e32e08a7c877ab node-methods-1.1.0/000077500000000000000000000000001235613402500141005ustar00rootroot00000000000000node-methods-1.1.0/.gitignore000066400000000000000000000000161235613402500160650ustar00rootroot00000000000000node_modules/ node-methods-1.1.0/History.md000066400000000000000000000004231235613402500160620ustar00rootroot00000000000000 1.1.0 / 2014-07-05 ================== * add CONNECT 1.0.1 / 2014-06-02 ================== * fix index.js to work with harmony transform 1.0.0 / 2014-05-08 ================== * add PURGE. Closes #9 0.1.0 / 2013-10-28 ================== * add http.METHODS support node-methods-1.1.0/LICENSE000066400000000000000000000021201235613402500151000ustar00rootroot00000000000000(The MIT License) Copyright (c) 2013-2014 TJ Holowaychuk 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. node-methods-1.1.0/Readme.md000066400000000000000000000000731235613402500156170ustar00rootroot00000000000000 # Methods HTTP verbs that node core's parser supports. node-methods-1.1.0/index.js000066400000000000000000000010451235613402500155450ustar00rootroot00000000000000 var http = require('http'); if (http.METHODS) { module.exports = http.METHODS.map(function(method){ return method.toLowerCase(); }); } else { module.exports = [ 'get', 'post', 'put', 'head', 'delete', 'options', 'trace', 'copy', 'lock', 'mkcol', 'move', 'purge', 'propfind', 'proppatch', 'unlock', 'report', 'mkactivity', 'checkout', 'merge', 'm-search', 'notify', 'subscribe', 'unsubscribe', 'patch', 'search', 'connect' ]; } node-methods-1.1.0/package.json000066400000000000000000000007031235613402500163660ustar00rootroot00000000000000{ "name": "methods", "version": "1.1.0", "description": "HTTP methods that node supports", "main": "index.js", "scripts": { "test": "./node_modules/mocha/bin/mocha" }, "keywords": [ "http", "methods" ], "author": { "name": "TJ Holowaychuk" }, "license": "MIT", "repository": { "type": "git", "url": "git://github.com/visionmedia/node-methods.git" }, "devDependencies": { "mocha": "1.17.x" } } node-methods-1.1.0/test/000077500000000000000000000000001235613402500150575ustar00rootroot00000000000000node-methods-1.1.0/test/methods.js000066400000000000000000000015261235613402500170640ustar00rootroot00000000000000var http = require('http'); var assert = require('assert'); var methods = require('..'); describe('methods', function() { if (http.METHODS) { it('is a lowercased http.METHODS', function() { var lowercased = http.METHODS.map(function(method) { return method.toLowerCase(); }); assert.deepEqual(lowercased, methods); }); } else { it('contains GET, POST, PUT, and DELETE', function() { assert.notEqual(methods.indexOf('get'), -1); assert.notEqual(methods.indexOf('post'), -1); assert.notEqual(methods.indexOf('put'), -1); assert.notEqual(methods.indexOf('delete'), -1); }); it('is all lowercase', function() { for (var i = 0; i < methods.length; i ++) { assert(methods[i], methods[i].toLowerCase(), methods[i] + " isn't all lowercase"); } }); } });