@@ -4,19 +4,19 @@ const errors = require('./errors')
44const transports = require ( './transports' )
55const utils = require ( './utils' )
66
7- function lookupLink ( node , schema_keys ) {
8- for ( let key of schema_keys ) {
7+ function lookupLink ( node , schemaKeys ) {
8+ for ( let key of schemaKeys ) {
99 if ( node instanceof document . Document ) {
1010 node = node . content [ key ]
1111 } else {
1212 node = node [ key ]
1313 }
1414 if ( node === undefined ) {
15- throw new errors . LinkLookupError ( `Invalid link lookup: ${ JSON . stringify ( schema_keys ) } ` )
15+ throw new errors . LinkLookupError ( `Invalid link lookup: ${ JSON . stringify ( schemaKeys ) } ` )
1616 }
1717 }
1818 if ( ! ( node instanceof document . Link ) ) {
19- throw new errors . LinkLookupError ( `Invalid link lookup: ${ JSON . stringify ( schema_keys ) } ` )
19+ throw new errors . LinkLookupError ( `Invalid link lookup: ${ JSON . stringify ( schemaKeys ) } ` )
2020 }
2121 return node
2222}
@@ -34,8 +34,8 @@ class Client {
3434 this . transports = options . transports || [ new transports . HTTPTransport ( transportOptions ) ]
3535 }
3636
37- action ( document , schema_keys , params = { } ) {
38- const link = lookupLink ( document , schema_keys )
37+ action ( document , schemaKeys , params = { } ) {
38+ const link = lookupLink ( document , schemaKeys )
3939 const transport = utils . determineTransport ( this . transports , link . url )
4040 return transport . action ( link , this . decoders , params )
4141 }
0 commit comments