diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f3539f..7541858 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ + +# [2.0.0](https://github.com/faker-javascript/ip) (2022-01-09) + +### BREAKING CHANGES + +* New function `ip` istead of `fakeIP` + # [1.0.0](https://github.com/faker-javascript/ip) (2022-01-08) * Initial release diff --git a/README.md b/README.md index e5379b4..eddf88e 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,9 @@ $ npm install --save @fakerjs/ip ## Usage ```js -import fakeIP from '@fakerjs/ip'; +import ip from '@fakerjs/ip'; -fakeIP(); +ip(); //=> 168.195.165.81 ``` diff --git a/index.js b/index.js index 7f8f770..e455175 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ -export default function fakeIP() { +export default function ip() { return Math.floor(Math.random() * 255) + '.' + Math.floor(Math.random() * 255) + '.' + Math.floor(Math.random() * 255) + '.' + diff --git a/package.json b/package.json index e4f01c8..76ffe29 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fakerjs/ip", - "version": "1.0.0", + "version": "2.0.0", "description": "IP package provides functionality to generate a fake ip value.", "license": "MIT", "repository": "faker-javascript/ip", diff --git a/test.js b/test.js index 89a28a1..dc2018f 100644 --- a/test.js +++ b/test.js @@ -1,7 +1,7 @@ -import fakeIP from './index.js'; +import ip from './index.js'; import test from 'ava'; -test('fakeIP return type to be string', t => { - t.is(typeof fakeIP(), 'string'); +test('ip return type to be string', t => { + t.is(typeof ip(), 'string'); });