<commit_before>var o = require('maker').o(module);
var oo = require('maker').oo(module);

/******************************************************************************
 * @class Endpoint
 *
 *
 * Example:
 * {
 *   _type: 'datanode/Endpoint',
 *   
 *   get: function(req, res) { ... },
 *   post: function(req, res) { ... }
 *   put: {
 *      params: { ...
 *      }, 
 *      ...
 *      service: function(req, res) { ... }
 *   } 
 * }
 */
module.exports = oo({

  /**********************************************************************
   * ALL_METHODS
   */        
  ALL_METHODS: ['get', 'post', 'put', 'delete', 'head', 'options'], // XXX create or would that only be for Collections? patch?
  
  /**********************************************************************
   * _C
   */
  _C: function() {
    this.path = '' // Can be URI pattern (e.g.: "widgets/:id")
    this.parent = null
    this.objectserver = null
    this.acl = null // XXX add to docs
    this.endpoints = {}
  },
  
  /**********************************************************************
   * options
   */       
  options: function(req, res) {
    // XXX have no idea if this is what options is supposed to return
    var self = this
    var methods = []
    this.ALL_METHODS.forEach(function(method) {
      if (self[method]) {
        methods.push(method)<commit_msg>removing comment<commit_after>var o = require('maker').o(module);
var oo = require('maker').oo(module);

/******************************************************************************
 * @class Endpoint
 *
 *
 * Example:
 * {
 *   _type: 'datanode/Endpoint',
 *   
 *   get: function(req, res) { ... },
 *   post: function(req, res) { ... }
 *   put: {
 *      params: { ...
 *      }, 
 *      ...
 *      service: function(req, res) { ... }
 *   } 
 * }
 */
module.exports = oo({

  /**********************************************************************
   * ALL_METHODS
   */        
  ALL_METHODS: ['get', 'post', 'put', 'delete', 'head', 'options'], // XXX create or would that only be for Collections? patch?
  
  /**********************************************************************
   * _C
   */
  _C: function() {
    this.path = '' // Can be URI pattern (e.g.: "widgets/:id")
    this.parent = null
    this.objectserver = null
    this.acl = null // XXX add to docs
    this.endpoints = {}
  },
  
  /**********************************************************************
   * options
   */       
  options: function(req, res) {
    var self = this
    var methods = []
    this.ALL_METHODS.forEach(function(method) {
      if (self[method]) {
        methods.push(method)
{'fraction_non_alphanumeric': 0.3601967461218313, 'fraction_numerical': 0.0, 'mean_word_length': 2.7988505747126435, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1404946', 'n_tokens_mistral': 769, 'n_tokens_neox': 735, 'n_words': 165}