File tree Expand file tree Collapse file tree 5 files changed +14
-7
lines changed Expand file tree Collapse file tree 5 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 1+ <a name =" 2.0.0 " ></a >
2+ # [ 2.0.0] ( https://github.com/faker-javascript/ip ) (2022-01-09)
3+
4+ ### BREAKING CHANGES
5+
6+ * New function ` ip ` istead of ` fakeIP `
7+
18<a name =" 1.0.0 " ></a >
29# [ 1.0.0] ( https://github.com/faker-javascript/ip ) (2022-01-08)
310* Initial release
Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ $ npm install --save @fakerjs/ip
1515## Usage
1616
1717``` js
18- import fakeIP from ' @fakerjs/ip' ;
18+ import ip from ' @fakerjs/ip' ;
1919
20- fakeIP ();
20+ ip ();
2121// => 168.195.165.81
2222```
2323
Original file line number Diff line number Diff line change 1- export default function fakeIP ( ) {
1+ export default function ip ( ) {
22 return Math . floor ( Math . random ( ) * 255 ) + '.' +
33 Math . floor ( Math . random ( ) * 255 ) + '.' +
44 Math . floor ( Math . random ( ) * 255 ) + '.' +
Original file line number Diff line number Diff line change 11{
22 "name" : " @fakerjs/ip" ,
3- "version" : " 1 .0.0" ,
3+ "version" : " 2 .0.0" ,
44 "description" : " IP package provides functionality to generate a fake ip value." ,
55 "license" : " MIT" ,
66 "repository" : " faker-javascript/ip" ,
Original file line number Diff line number Diff line change 1- import fakeIP from './index.js' ;
1+ import ip from './index.js' ;
22import test from 'ava' ;
33
4- test ( 'fakeIP return type to be string' , t => {
5- t . is ( typeof fakeIP ( ) , 'string' ) ;
4+ test ( 'ip return type to be string' , t => {
5+ t . is ( typeof ip ( ) , 'string' ) ;
66} ) ;
77
You can’t perform that action at this time.
0 commit comments