Skip to content

Commit

Permalink
break: export named function
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed Aug 12, 2020
1 parent b3cfc11 commit 88f7ec5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions dequal.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
declare const dequal: (foo: any, bar: any) => boolean;
export default dequal;
export function dequal(foo: any, bar: any): boolean;
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var has = Object.prototype.hasOwnProperty;

export default function dequal(foo, bar) {
export function dequal(foo, bar) {
var ctor, len;
if (foo === bar) return true;

Expand Down
8 changes: 4 additions & 4 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { suite } from 'uvu';
import * as assert from 'uvu/assert';
import fn from '../src';
import { dequal } from '../src';

function same(a, b) {
assert.is(fn(a, b), true);
assert.is(dequal(a, b), true);
}

function different(a, b) {
assert.is(fn(a, b), false);
assert.is(dequal(a, b), false);
}

const API = suite('exports');

API('exports', () => {
assert.type(fn, 'function');
assert.type(dequal, 'function');
});

API.run();
Expand Down

0 comments on commit 88f7ec5

Please sign in to comment.