function complement(fn) {
  if (typeof fn !== 'function') {
    throw new Error('complement received argument that is not function');
  }

  return (...args) => !fn(...args);
}
/**
 * Creates new function that returns the negated value of provided function
 *
 * @since v1.0.0
 * @category Function
 *
 * @param {Function} fn function to negate
 * @return {boolean} negated result of calling fn
 *
 * @example
 * N.negate(() => true)(); // -> false
 * N.negate(() => false)(); // -> true
 * const notString = N.complement((value) => typeof value === 'string');
 * notString('nier'); // -> false
 * notString(1000); // -> true
 */
Creates new function that returns the negated value of provided function
@since v1.0.0
@category Function

@param {Function} fn function to negate
@return {boolean} negated result of calling fn


Creates new function that returns the negated value of provided function @since v1 . 0 . 0 @category Function @param { Function } fn function to negate @return { boolean } negated result of calling fn
function complement(fn) {
  if (typeof fn !== 'function') {
    throw new Error('complement received argument that is not function');
  }
  return (...args) => !fn(...args);
}
function complement ( fn ) { if ( typeof fn !== 'function' ) { throw new Error ( 'complement received argument that is not function' ) ; } return ( ... args ) => ! fn ( ... args ) ; }
Creates new function that returns the negated value of provided function
 @since v1.0.0
 @category Function
Creates new function that returns the negated value of provided function @since v1 . 0 . 0 @category Function