Skip to content

Commit 8df5ef4

Browse files
💥 BREAKING CHANGE(Integer): Rename copy to clone.
1 parent a28a5c0 commit 8df5ef4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Integer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class Integer {
2323
return other ;
2424
}
2525

26-
copy ( ) {
26+
clone ( ) {
2727
return new Integer( this.base , this.is_negative , this.limbs ) ;
2828
}
2929

@@ -101,7 +101,7 @@ export class Integer {
101101
const bj = b.length ;
102102
const bi = _trim_positive( b , 0 , bj ) ;
103103

104-
if ( bi >= bj ) return this.copy() ;
104+
if ( bi >= bj ) return this.clone() ;
105105

106106
if ( cmp( a , ai , aj , b , bi , bj ) < 0 ) {
107107

test/src/Integer/copy.js renamed to test/src/Integer/clone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ test ( 'Integer#copy' , t => {
66
const s = '34998403804830' ;
77

88
const a = ZZ.from(s) ;
9-
const b = a.copy();
9+
const b = a.clone();
1010

1111
t.is(a.toString(), s);
1212
t.is(b.toString(), s);

0 commit comments

Comments
 (0)