Skip to content

Commit d24fa13

Browse files
committed
rename to named import
1 parent eca307d commit d24fa13

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

DEV_ONLY/App.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import cloneDeep from 'lodash/cloneDeep';
33

4-
import copy, { copyStrict, createCopier, createStrictCopier } from '../src';
4+
import { copy, copyStrict, createCopier, createStrictCopier } from '../src';
55

66
// import '../benchmarks';
77

__tests__/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import copy, { copyStrict } from '../src';
3+
import { copy, copyStrict } from '../src';
44

55
interface PlainObject {
66
[key: string]: any;

benchmark/index.cjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const packages = {
100100
clone: require('clone'),
101101
deepclone: require('deepclone'),
102102
'fast-clone': require('fast-clone'),
103-
'fast-copy': require('../dist/cjs/index.cjs').default,
103+
'fast-copy': require('../dist/cjs/index.cjs').copy,
104104
'fast-copy (strict)': require('../dist/cjs/index.cjs').copyStrict,
105105
// deactivated while it cannot build on linux
106106
// 'fast-deepclone': require('fast-deepclone'),
@@ -117,7 +117,7 @@ const suite = createSuite({
117117

118118
return groupResults.map(({ name, stats }) => {
119119
const existingRowIndex = combined.findIndex(
120-
({ name: rowName }) => name === rowName
120+
({ name: rowName }) => name === rowName,
121121
);
122122

123123
return ~existingRowIndex
@@ -178,7 +178,7 @@ const suite = createSuite({
178178
},
179179
onResult({ name, stats }) {
180180
console.log(
181-
`Benchmark completed for ${name}: ${stats.ops.toLocaleString()} ops/sec`
181+
`Benchmark completed for ${name}: ${stats.ops.toLocaleString()} ops/sec`,
182182
);
183183
},
184184
});

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,4 +177,4 @@ export const copyStrict = createStrictCopier({});
177177
/**
178178
* Copy an value deeply as much as possible.
179179
*/
180-
export default createCopier({});
180+
export const copy = createCopier({});

0 commit comments

Comments
 (0)