Skip to content

Commit

Permalink
Return to argument (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
lamansky authored and sindresorhus committed Feb 2, 2018
1 parent 3703ef8 commit 8b5104f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.js
Expand Up @@ -4,4 +4,5 @@ module.exports = (to, from) => {
for (const prop of Object.getOwnPropertyNames(from).concat(Object.getOwnPropertySymbols(from))) {
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
}
return to;
};
2 changes: 2 additions & 0 deletions readme.md
Expand Up @@ -43,6 +43,8 @@ It will copy over the properties `name`, `length`, `displayName`, and any custom

### mimicFn(to, from)

It will modify `to` and return it.

#### to

Type: `Function`
Expand Down
2 changes: 1 addition & 1 deletion test.js
Expand Up @@ -12,7 +12,7 @@ test(t => {

t.is(foo.name, 'foo');

m(wrapper, foo);
t.is(m(wrapper, foo), wrapper);

t.is(wrapper.name, 'foo');
t.is(wrapper.length, 1);
Expand Down

0 comments on commit 8b5104f

Please sign in to comment.