{"id":23156498,"url":"https://github.com/thecreation/jquery-strength","last_synced_at":"2025-12-12T04:03:37.632Z","repository":{"id":25022969,"uuid":"28442350","full_name":"thecreation/jquery-strength","owner":"thecreation","description":"A jquery plugin that indicate strength for password field.","archived":false,"fork":false,"pushed_at":"2017-09-19T11:59:51.000Z","size":279,"stargazers_count":9,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-27T07:56:25.734Z","etag":null,"topics":["form-input","jquery-plugin","password-strength"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thecreation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-24T08:28:34.000Z","updated_at":"2024-08-03T05:22:59.000Z","dependencies_parsed_at":"2022-08-31T04:50:42.499Z","dependency_job_id":null,"html_url":"https://github.com/thecreation/jquery-strength","commit_stats":null,"previous_names":["amazingsurge/jquery-strength"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/thecreation/jquery-strength","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-strength","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-strength/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-strength/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-strength/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecreation","download_url":"https://codeload.github.com/thecreation/jquery-strength/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-strength/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269201128,"owners_count":24377447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["form-input","jquery-plugin","password-strength"],"created_at":"2024-12-17T21:13:49.923Z","updated_at":"2025-12-12T04:03:37.275Z","avatar_url":"https://github.com/thecreation.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [jQuery strength](https://github.com/amazingSurge/jquery-strength) ![bower][bower-image] [![NPM version][npm-image]][npm-url] [![Dependency Status][daviddm-image]][daviddm-url] [![prs-welcome]](#contributing)\n\n\u003e jQuery strength provides a toggle feature for password input fields that allows the user to view or asterisk the password. It also features a strength indicator to show how secure a users password is.\n\nIt base on Nando Vieira's [password_strength](https://github.com/fnando/password_strength) which validates the strength of a password according to several rules.\n\n## Table of contents\n- [Main files](#main-files)\n- [Quick start](#quick-start)\n- [Requirements](#requirements)\n- [Usage](#usage)\n- [Examples](#examples)\n- [Options](#options)\n- [Methods](#methods)\n- [Events](#events)\n- [No conflict](#no-conflict)\n- [Browser support](#browser-support)\n- [Contributing](#contributing)\n- [Development](#development)\n- [Changelog](#changelog)\n- [Copyright and license](#copyright-and-license)\n\n## Main files\n```\ndist/\n├── jquery-strength.js\n├── jquery-strength.es.js\n├── jquery-strength.min.js\n└── css/\n    ├── strength.css\n    └── strength.min.css\n```\n\n## Quick start\nSeveral quick start options are available:\n#### Download the latest build\n\n * [Development](https://raw.githubusercontent.com/amazingSurge/jquery-strength/master/dist/jquery-strength.js) - unminified\n * [Production](https://raw.githubusercontent.com/amazingSurge/jquery-strength/master/dist/jquery-strength.min.js) - minified\n\n#### Install From Bower\n```sh\nbower install jquery-strength --save\n```\n\n#### Install From Npm\n```sh\nnpm install jquery-strength --save\n```\n\n#### Install From Yarn\n```sh\nyarn add jquery-strength\n```\n\n#### Build From Source\nIf you want build from source:\n\n```sh\ngit clone git@github.com:amazingSurge/jquery-strength.git\ncd jquery-strength\nnpm install\nnpm install -g gulp-cli babel-cli\ngulp build\n```\n\nDone!\n\n## Requirements\n`jquery-strength` requires the latest version of [`jQuery`](https://jquery.com/download/).\n\n## Usage\n#### Including files:\n\n```html\n\u003clink rel=\"stylesheet\" href=\"/path/to/strength.css\"\u003e\n\u003cscript src=\"/path/to/jquery.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"/path/to/jquery-strength.js\"\u003e\u003c/script\u003e\n```\n\n#### Required HTML structure\n\n```html\n\u003cinput type=\"password\" class=\"password-input form-control\" name=\"password\" value=\"\" /\u003e\n```\n\n#### Initialization\nAll you need to do is call the plugin on the element:\n\n```javascript\njQuery(function($) {\n  $('.example').strength(); \n});\n```\n\n## Examples\nThere are some example usages that you can look at to get started. They can be found in the\n[examples folder](https://github.com/amazingSurge/jquery-strength/tree/master/examples).\n\n## Options\n`jquery-strength` can accept an options object to alter the way it behaves. You can see the default options by call `$.strength.setDefaults()`. The structure of an options object is as follows:\n\n```\n{\n  namespace: 'strength',\n  skin: null,\n\n  showMeter: true,\n  showToggle: true,\n\n  usernameField: '',\n\n  templates: {\n    toggle: '\u003cspan class=\"input-group-addon\"\u003e\u003cinput type=\"checkbox\" class=\"{toggleClass}\" title=\"Show/Hide Password\" /\u003e\u003c/span\u003e',\n    meter: '\u003cdiv class=\"{meterClass}\"\u003e{score}\u003c/div\u003e',\n    score: '\u003cspan class=\"label {scoreClass}\"\u003e\u003c/span\u003e',\n    main: '\u003cdiv class=\"{containerClass}\"\u003e\u003cdiv class=\"input-group\"\u003e{input}{toggle}\u003c/div\u003e{meter}\u003c/div\u003e'\n  },\n\n  classes: {\n    container: 'strength-container',\n    status: 'strength-{status}',\n    input: 'strength-input',\n    toggle: 'strength-toggle',\n    meter: 'strength-meter',\n    score: 'strength-score'\n  },\n\n  scoreLables: {\n    empty: 'Empty',\n    invalid: 'Invalid',\n    weak: 'Weak',\n    good: 'Good',\n    strong: 'Strong'\n  },\n\n  scoreClasses: {\n    empty: '',\n    invalid: 'label-danger',\n    weak: 'label-warning',\n    good: 'label-info',\n    strong: 'label-success'\n  },\n\n  emptyStatus: true,\n\n  scoreCallback: null,\n  statusCallback: null\n}\n```\n\n## Methods\nMethods are called on strength instances through the strength method itself.\nYou can also save the instances to variable for further use.\n\n```javascript\n// call directly\n$().strength('destroy');\n\n// or\nvar api = $().data('strength');\napi.destroy();\n```\n\n#### getScore()\nGet the password score.\n```javascript\nvar score = $().strength('getScore');\n```\n\n#### getStatus()\nGet the input status.\n```javascript\nvar status = $().strength('getStatus');\n```\n\n#### toggle()\nToggle to show or hide the password.\n```javascript\n$().strength('toggle');\n```\n\n\n#### destroy()\nDestroy the strength instance.\n```javascript\n$().strength('destroy');\n```\n\n## Events\n`jquery-strength` provides custom events for the plugin’s unique actions. \n\n```javascript\n$('.the-element').on('strength::ready', function (e) {\n  // on instance ready\n});\n\n```\n\nEvent        | Description\n------------ | -----------\ninit         | Fires when the instance is setup for the first time.\nready        | Fires when the instance is ready for API use.\ntoggle       | Fired immediately when the `toggle` instance method has been called.\nstatusChange | Fires when the input status changed.\ncheck        | Fired immediately when the `check` instance method has been called.\ndestroy      | Fires when an instance is destroyed. \n\n## No conflict\nIf you have to use other plugin with the same namespace, just call the `$.strength.noConflict` method to revert to it.\n\n```html\n\u003cscript src=\"other-plugin.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"jquery-strength.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  $.strength.noConflict();\n  // Code that uses other plugin's \"$().strength\" can follow here.\n\u003c/script\u003e\n```\n\n## Browser support\n\nTested on all major browsers.\n\n| \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/safari/safari_32x32.png\" alt=\"Safari\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/chrome/chrome_32x32.png\" alt=\"Chrome\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/firefox/firefox_32x32.png\" alt=\"Firefox\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/edge/edge_32x32.png\" alt=\"Edge\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/internet-explorer/internet-explorer_32x32.png\" alt=\"IE\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/opera/opera_32x32.png\" alt=\"Opera\"\u003e |\n|:--:|:--:|:--:|:--:|:--:|:--:|\n| Latest ✓ | Latest ✓ | Latest ✓ | Latest ✓ | 9-11 ✓ | Latest ✓ |\n\nAs a jQuery plugin, you also need to see the [jQuery Browser Support](http://jquery.com/browser-support/).\n\n## Contributing\nAnyone and everyone is welcome to contribute. Please take a moment to\nreview the [guidelines for contributing](CONTRIBUTING.md). Make sure you're using the latest version of `jquery-strength` before submitting an issue. There are several ways to help out:\n\n* [Bug reports](CONTRIBUTING.md#bug-reports)\n* [Feature requests](CONTRIBUTING.md#feature-requests)\n* [Pull requests](CONTRIBUTING.md#pull-requests)\n* Write test cases for open bug issues\n* Contribute to the documentation\n\n## Development\n`jquery-strength` is built modularly and uses Gulp as a build system to build its distributable files. To install the necessary dependencies for the build system, please run:\n\n```sh\nnpm install -g gulp\nnpm install -g babel-cli\nnpm install\n```\n\nThen you can generate new distributable files from the sources, using:\n```\ngulp build\n```\n\nMore gulp tasks can be found [here](CONTRIBUTING.md#available-tasks).\n\n## Changelog\nTo see the list of recent changes, see [Releases section](https://github.com/amazingSurge/jquery-strength/releases).\n\n## Copyright and license\nCopyright (C) 2016 amazingSurge.\n\nLicensed under [the LGPL license](LICENSE).\n\n[⬆ back to top](#table-of-contents)\n\n[bower-image]: https://img.shields.io/bower/v/jquery-strength.svg?style=flat\n[bower-link]: https://david-dm.org/amazingSurge/jquery-strength/dev-status.svg\n[npm-image]: https://badge.fury.io/js/jquery-strength.svg?style=flat\n[npm-url]: https://npmjs.org/package/jquery-strength\n[license]: https://img.shields.io/npm/l/jquery-strength.svg?style=flat\n[prs-welcome]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg\n[daviddm-image]: https://david-dm.org/amazingSurge/jquery-strength.svg?style=flat\n[daviddm-url]: https://david-dm.org/amazingSurge/jquery-strength","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecreation%2Fjquery-strength","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecreation%2Fjquery-strength","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecreation%2Fjquery-strength/lists"}