diff --git a/README.md b/README.md index a7a53d3..20fee54 100755 --- a/README.md +++ b/README.md @@ -24,6 +24,14 @@ The easiest way to pull Iodine into your project is via a CDN: ``` +You can also pull Iodine into your project via NPM: + +```js +npm i @kingshott/iodine + +import Iodine from '@kingshott/iodine'; +``` + ## Usage Iodine is automatically added to the `window` namespace, making it available anywhere on the page / within your application. @@ -103,7 +111,7 @@ Iodine.getErrorMessage('minimum', 7); // string ## Custom messages (localisation) -You can easily replace the default error messages with your own via the `setErrorMessages` method. This method requires a single parameter, which is an `object` containing the messages. See the [_defaultMessages](src/iodine.js) method for an example of this object. +You can easily replace the default error messages with your own via the `setErrorMessages` method. This method requires a single parameter, which is an `object` containing the messages. See the [_defaultMessages](src/iodine.js) method for an example of this. Iodine will automatically swap `[PARAM]` placeholders with the parameters supplied in the `getErrorMessage` method. As such, you should insert this placeholder at the appropriate position in your new error message e.g. diff --git a/package.json b/package.json index 84e19f7..a828af0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "iodine", - "version": "1.0.0", + "name": "@kingshott/iodine", + "version": "2.0.1", "description": "A micro client-side validation library", "repository": { "type": "git", diff --git a/resources/example.png b/resources/example.png index badf8b8..be6a081 100644 Binary files a/resources/example.png and b/resources/example.png differ diff --git a/resources/version.svg b/resources/version.svg index edd22e6..593c008 100644 --- a/resources/version.svg +++ b/resources/version.svg @@ -14,7 +14,7 @@ stable stable - v2.0.0 - v2.0.0 + v2.0.1 + v2.0.1 \ No newline at end of file