CoolFace
Apppublic

opusdev/vector-similarity-api

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes
index.js70 linesDownload Raw Back to methods
1/*!2 * methods3 * Copyright(c) 2013-2014 TJ Holowaychuk4 * Copyright(c) 2015-2016 Douglas Christopher Wilson5 * MIT Licensed6 */7 8'use strict';9 10/**11 * Module dependencies.12 * @private13 */14 15var http = require('http');16 17/**18 * Module exports.19 * @public20 */21 22module.exports = getCurrentNodeMethods() || getBasicNodeMethods();23 24/**25 * Get the current Node.js methods.26 * @private27 */28 29function getCurrentNodeMethods() {30  return http.METHODS && http.METHODS.map(function lowerCaseMethod(method) {31    return method.toLowerCase();32  });33}34 35/**36 * Get the "basic" Node.js methods, a snapshot from Node.js 0.10.37 * @private38 */39 40function getBasicNodeMethods() {41  return [42    'get',43    'post',44    'put',45    'head',46    'delete',47    'options',48    'trace',49    'copy',50    'lock',51    'mkcol',52    'move',53    'purge',54    'propfind',55    'proppatch',56    'unlock',57    'report',58    'mkactivity',59    'checkout',60    'merge',61    'm-search',62    'notify',63    'subscribe',64    'unsubscribe',65    'patch',66    'search',67    'connect'68  ];69}70