{"analyzedAt":"2022-10-17T15:57:27.415Z","collected":{"metadata":{"name":"vue-cleave-component","scope":"unscoped","version":"3.0.2","description":"Vue.js component for cleave.js","keywords":["vue","cleave","formatting","phone","currency","date","masking"],"date":"2022-10-17T06:13:51.816Z","author":{"name":"ankurk91"},"publisher":{"username":"ankurk91","email":"pro.ankurk1@gmail.com"},"maintainers":[{"username":"ankurk91","email":"pro.ankurk1@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/ankurk91/vue-cleave-component.git"},"links":{"npm":"https://www.npmjs.com/package/vue-cleave-component","homepage":"https://github.com/ankurk91/vue-cleave-component","repository":"https://github.com/ankurk91/vue-cleave-component","bugs":"https://github.com/ankurk91/vue-cleave-component/issues"},"license":"MIT","dependencies":{"cleave.js":"^1.6.0"},"devDependencies":{"@babel/core":"^7.19.3","@babel/preset-env":"^7.19.4","@vue/compiler-sfc":"^3.2.41","@vue/test-utils":"^2.1.0","babel-jest":"^29.2.0","babel-loader":"^8.2.5","bootstrap":"^4.6","cross-env":"^7.0.3","css-loader":"^6.7.1","file-loader":"^6.2.0","html-webpack-plugin":"^5.5.0","jest":"^29.2.0","jest-environment-jsdom":"^29.2.0","style-loader":"^3.3.1","vue":"^3.2.41","vue-loader":"^17.0.0","webpack":"^5.74.0","webpack-cli":"^4.10.0","webpack-dev-server":"^4.11.1"},"peerDependencies":{"vue":"^3.2.0"},"releases":[{"from":"2022-09-17T00:00:00.000Z","to":"2022-10-17T00:00:00.000Z","count":0},{"from":"2022-07-19T00:00:00.000Z","to":"2022-10-17T00:00:00.000Z","count":0},{"from":"2022-04-20T00:00:00.000Z","to":"2022-10-17T00:00:00.000Z","count":0},{"from":"2021-10-17T00:00:00.000Z","to":"2022-10-17T00:00:00.000Z","count":0},{"from":"2020-10-17T00:00:00.000Z","to":"2022-10-17T00:00:00.000Z","count":2}],"hasTestScript":true,"hasSelectiveFiles":true,"readme":"# Vue Cleave Component\n\n[![downloads](https://badgen.net/npm/dt/vue-cleave-component)](https://npm-stat.com/charts.html?package=vue-cleave-component&from=2018-01-01)\n[![npm-version](https://badgen.net/npm/v/vue-cleave-component)](https://www.npmjs.com/package/vue-cleave-component)\n[![github-tag](https://badgen.net/github/tag/ankurk91/vue-cleave-component)](https://github.com/ankurk91/vue-cleave-component/)\n[![license](https://badgen.net/github/license/ankurk91/vue-cleave-component)](https://yarnpkg.com/en/package/vue-cleave-component)\n[![build](https://github.com/ankurk91/vue-cleave-component/workflows/build/badge.svg)](https://github.com/ankurk91/vue-cleave-component/actions)\n[![codecov](https://codecov.io/gh/ankurk91/vue-cleave-component/branch/master/graph/badge.svg)](https://codecov.io/gh/ankurk91/vue-cleave-component)\n\nVue.js component for [Cleave.js](http://nosir.github.io/cleave.js/)\n\n## Demo on [JSFiddle](https://jsfiddle.net/ankurk91/aza302c7/)\n\n### Version matrix\n\n| Vue.js version | Package version | Branch          |\n| :---           | :---:           | ---:           | \n| 2.x            | 2.x             | [2.x](https://github.com/ankurk91/vue-cleave-component/tree/v2.x) |\n| 3.x            | 3.x             | master          |\n\n## Features\n\n* Reactive `v-model` value\n    - You can change input value programmatically\n* Reactive [options](https://github.com/nosir/cleave.js/blob/master/doc/options.md)\n    - You can change config options dynamically\n    - Component will watch for any changes and redraw itself\n* Compatible with [Bootstrap](http://getbootstrap.com/), [Bulma](http://bulma.io/) or any other CSS framework\n* Works with validation libraries\n* Option to disable `raw` mode to get masked value\n\n## Installation\n\n```bash\nnpm install vue-cleave-component --save\n```\n\n## Usage\n\n```html\n\n<template>\n    <div>\n        <cleave v-model=\"cardNumber\"\n                :options=\"options\"\n                class=\"form-control\"\n                name=\"card\"/>\n    </div>\n</template>\n\n<script>\n    import Cleave from 'vue-cleave-component';\n\n    export default {\n        data() {\n            return {\n                cardNumber: null,\n                options: {\n                    creditCard: true,\n                    delimiter: '-',\n                }\n            }\n        },\n        components: {\n            Cleave\n        }\n    }\n</script>\n```\n\n### As plugin\n\n```js\nimport {createApp} from 'vue';\nimport Cleave from 'vue-cleave-component';\n// your app initilization logic goes here\nconst app = createApp({});\napp.use(Cleave);\napp.mount('#app');\n```\n\nThis will register a global component `<cleave>`\n\n## Available props\n\nThe component accepts these props:\n\n| Attribute        | Type                   | Default     | Description      |\n| :---             | :---:                  | :---:       | :---             |\n| v-model          | String / Number / `null` | `null`    | Set or Get input value (required) |\n| options          | Object                 | `{}`        | Cleave.js [options](https://github.com/nosir/cleave.js/blob/master/doc/options.md) |\n| raw              | Boolean                | `true`      | When set to `false`; emits formatted value with format pattern and delimiter |\n\n## Install in non-module environments (without webpack)\n\n* Include required files\n\n```html\n<!-- cleave.js -->\n<script src=\"https://cdn.jsdelivr.net/npm/cleave.js@1\"></script>\n<!-- Vue.js -->\n<script src=\"https://cdn.jsdelivr.net/npm/vue@3.2\"></script>\n<!-- Lastly add this package -->\n<script src=\"https://cdn.jsdelivr.net/npm/vue-cleave-component@3\"></script>\n<script>\n    const app = Vue.createApp({});\n    app.use(VueCleave);\n    app.mount('#app');\n</script>\n```\n\n## Run examples on your localhost\n\n* Clone this repo\n* Make sure you have node-js `>=18.9` and [pnpm](https://pnpm.io/) `>=7.x` pre-installed\n* Install dependencies `pnpm install`\n* Run webpack dev server `npm start`\n* This should open the demo page in your default web browser\n\n### Testing\n\n* This package is using [Jest](https://github.com/facebook/jest)\n  and [vue-test-utils](https://github.com/vuejs/vue-test-utils-next) for testing.\n* Tests can be found in `__test__` folder\n* Execute tests with this command `npm test`\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Alternatives\n\nIf you feel this component heavy, then you can consider these packages.\n\n* [v-mask](https://github.com/probil/v-mask)\n* [vue-input-facade](https://github.com/RonaldJerez/vue-input-facade)\n* [maska](https://github.com/beholdr/maska)\n\n## License\n\n[MIT](LICENSE.txt) License"},"npm":{"downloads":[{"from":"2022-10-16T00:00:00.000Z","to":"2022-10-17T00:00:00.000Z","count":506},{"from":"2022-10-10T00:00:00.000Z","to":"2022-10-17T00:00:00.000Z","count":11490},{"from":"2022-09-17T00:00:00.000Z","to":"2022-10-17T00:00:00.000Z","count":50187},{"from":"2022-07-19T00:00:00.000Z","to":"2022-10-17T00:00:00.000Z","count":168331},{"from":"2022-04-20T00:00:00.000Z","to":"2022-10-17T00:00:00.000Z","count":344119},{"from":"2021-10-17T00:00:00.000Z","to":"2022-10-17T00:00:00.000Z","count":699883}],"starsCount":1},"github":{"starsCount":282,"forksCount":36,"subscribersCount":4,"issues":{"count":39,"openCount":0,"distribution":{"3600":8,"10800":7,"32400":8,"97200":7,"291600":1,"874800":2,"2624400":3,"7873200":3,"23619600":0,"70858800":0,"212576400":0},"isDisabled":false},"contributors":[{"username":"ankurk91","commitsCount":82},{"username":"JorgenVatle","commitsCount":1},{"username":"JapSeyz","commitsCount":1}],"commits":[{"from":"2022-10-10T00:00:00.000Z","to":"2022-10-17T00:00:00.000Z","count":4},{"from":"2022-09-17T00:00:00.000Z","to":"2022-10-17T00:00:00.000Z","count":4},{"from":"2022-07-19T00:00:00.000Z","to":"2022-10-17T00:00:00.000Z","count":4},{"from":"2022-04-20T00:00:00.000Z","to":"2022-10-17T00:00:00.000Z","count":4},{"from":"2021-10-17T00:00:00.000Z","to":"2022-10-17T00:00:00.000Z","count":4}],"statuses":[{"context":"codecov/patch","state":"success"},{"context":"codecov/project","state":"success"}]},"source":{"files":{"readmeSize":4611,"testsSize":0,"hasChangelog":true},"linters":["editorconfig"],"coverage":0.92}},"evaluation":{"quality":{"carefulness":0.9999999999999999,"tests":0.388,"health":1,"branding":0},"popularity":{"communityInterest":326,"downloadsCount":56110.333333333336,"downloadsAcceleration":-62.57578006088278,"dependentsCount":0},"maintenance":{"releasesFrequency":0.9,"commitsFrequency":0.9,"openIssues":1,"issuesDistribution":1}},"score":{"final":0.6628803761947923,"detail":{"quality":0.8101013080703221,"popularity":0.19962694476980852,"maintenance":0.9999444374407507}}}