src/gandi.js
function defaultApikey(apikey) {
    if (typeof apikey !== 'undefined') {
        if (typeof apikey !== 'string') {
            throw new TypeError('`apikey` argument must be a string');
        }

        if (apikey.length !== 24) {
            throw new TypeError('`apikey` argument must be 24 characters long');
        }

        return apikey;
    }
    throw new TypeError('Gandi client needs an apikey as a first argument');
}
function defaultApikey(apikey) {
    if (typeof apikey !== 'undefined') {
        if (typeof apikey !== 'string') {
            throw new TypeError('`apikey` argument must be a string');
        }

        if (apikey.length !== 24) {
            throw new TypeError('`apikey` argument must be 24 characters long');
        }

        return apikey;
    }
    throw new TypeError('Gandi client needs an apikey as a first argument');
}
function defaultApikey ( apikey ) { if ( typeof apikey !== 'undefined' ) { if ( typeof apikey !== 'string' ) { throw new TypeError ( '`apikey` argument must be a string' ) ; } if ( apikey . length !== 24 ) { throw new TypeError ( '`apikey` argument must be 24 characters long' ) ; } return apikey ; } throw new TypeError ( 'Gandi client needs an apikey as a first argument' ) ; }
Returns apikey to constructor after some validation.

@param {string} apikey - Apikey passed onto the constructor.
@private
Returns apikey to constructor after some validation .