diff options
author | Kat Marchán <kzm@zkat.tech> | 2019-01-29 14:43:00 -0800 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2019-02-12 00:06:29 -0800 |
commit | 43dd49c9782848c25e5b03448c8a0f923f13c158 (patch) | |
tree | f7ac5d645019b2b844f26be66c291bbae734d097 /deps/npm/node_modules/protoduck/index.js | |
parent | b361f9577fbd72e518438d3fa0b01f7d34d814a5 (diff) | |
download | android-node-v8-43dd49c9782848c25e5b03448c8a0f923f13c158.tar.gz android-node-v8-43dd49c9782848c25e5b03448c8a0f923f13c158.tar.bz2 android-node-v8-43dd49c9782848c25e5b03448c8a0f923f13c158.zip |
deps: upgrade npm to 6.7.0
PR-URL: https://github.com/nodejs/node/pull/25804
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/npm/node_modules/protoduck/index.js')
-rw-r--r-- | deps/npm/node_modules/protoduck/index.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/deps/npm/node_modules/protoduck/index.js b/deps/npm/node_modules/protoduck/index.js index 3596bb3299..b6a83e1f79 100644 --- a/deps/npm/node_modules/protoduck/index.js +++ b/deps/npm/node_modules/protoduck/index.js @@ -52,8 +52,8 @@ class Duck extends Function { gf = arg[fns[i]] if (!gf || (gf.hasMethod - ? !gf.hasMethod.apply(gf, args) - : typeof gf === 'function')) { + ? !gf.hasMethod.apply(gf, args) + : typeof gf === 'function')) { return false } } @@ -81,7 +81,7 @@ Duck.prototype.isProtocol = true const Protoduck = module.exports = define(['duck'], { createGenfun: ['duck', _metaCreateGenfun], addMethod: ['duck', _metaAddMethod] -}, {name: 'Protoduck'}) +}, { name: 'Protoduck' }) const noImplFound = module.exports.noImplFound = genfun.noApplicableMethod @@ -168,22 +168,22 @@ function defineMethod (duck, name, target, types, impls) { if (!Object.prototype.hasOwnProperty.call(target, name)) { // Make a genfun if there's nothing there const gf = useMetaobject - ? duck._metaobject.createGenfun(duck, target, name, null) - : _metaCreateGenfun(duck, target, name, null) + ? duck._metaobject.createGenfun(duck, target, name, null) + : _metaCreateGenfun(duck, target, name, null) target[name] = gf } else if (typeof target[name] === 'function' && !target[name].isGenfun) { // Turn non-gf functions into genfuns const gf = useMetaobject - ? duck._metaobject.createGenfun(duck, target, name, target[name]) - : _metaCreateGenfun(duck, target, name, target[name]) + ? duck._metaobject.createGenfun(duck, target, name, target[name]) + : _metaCreateGenfun(duck, target, name, target[name]) target[name] = gf } const fn = impls[name] || duck._defaultImpls[name] if (fn) { // checkImpls made sure this is safe useMetaobject - ? duck._metaobject.addMethod(duck, target, name, methodTypes, fn) - : _metaAddMethod(duck, target, name, methodTypes, fn) + ? duck._metaobject.addMethod(duck, target, name, methodTypes, fn) + : _metaAddMethod(duck, target, name, methodTypes, fn) } } @@ -256,8 +256,8 @@ function installMethodErrorMessage (proto, gf, target, name) { proto.name ? `${proto.name}#` : '' }${name}(${[].map.call(args, typeName).join(', ')}). You must implement ${ proto.name - ? formatMethod(proto, name, true) - : `the protocol ${formatMethod(proto, name)} belongs to` + ? formatMethod(proto, name, true) + : `the protocol ${formatMethod(proto, name)} belongs to` } in order to call ${typeName(thisArg)}#${name}(${ [].map.call(args, typeName).join(', ') }).` @@ -330,8 +330,8 @@ class Constraint { const thisType = ( this.thisIdx === 'this' || this.thisIdx == null ) - ? target - : types[this.thisIdx] + ? target + : types[this.thisIdx] const parentTypes = this.indices.map(idx => { if (idx === 'this') { return target |