@brazilian-utils/helper-only-numbers
Advanced tools
Comparing version 0.1.5 to 1.0.0-alpha.0
@@ -1,2 +0,8 @@ | ||
module.exports=function(e){return String(e).replace(/[^\d]/g,"")}; | ||
//# sourceMappingURL=index.js.map | ||
'use strict' | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./helper-only-numbers.cjs.production.min.js') | ||
} else { | ||
module.exports = require('./helper-only-numbers.cjs.development.js') | ||
} |
{ | ||
"name": "@brazilian-utils/helper-only-numbers", | ||
"description": "Strips all non numeric characters.", | ||
"version": "0.1.5", | ||
"version": "1.0.0-alpha.0", | ||
"author": "Hyan Mandian <hyanmandian@hotmail.com>", | ||
"repository": "https://github.com/hyanmandian/brazilian-utils/tree/master/packages/helper-only-numbers", | ||
"repository": "https://github.com/brazilian-utils/brazilian-utils/tree/master/packages/helper-only-numbers", | ||
"bugs": { | ||
"url": "https://github.com/brazilian-utils/brazilian-utils/issues" | ||
}, | ||
"license": "MIT", | ||
"main": "dist/index.js", | ||
"umd:main": "dist/index.umd.js", | ||
"module": "dist/index.m.js", | ||
"source": "src/index.js", | ||
"module": "dist/helper-only-numbers.esm.js", | ||
"typings": "dist/index.d.ts", | ||
"files": [ | ||
@@ -15,10 +17,26 @@ "dist" | ||
"scripts": { | ||
"build": "microbundle" | ||
"start": "tsdx watch", | ||
"build": "tsdx build", | ||
"test": "tsdx test" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/hyanmandian/brazilian-utils/issues" | ||
"prettier": { | ||
"printWidth": 80, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "es5" | ||
}, | ||
"license": "MIT", | ||
"jest": { | ||
"moduleNameMapper": { | ||
"^@brazilian-utils/helper-(.*)$": "<rootDir>/../../helpers/$1/src", | ||
"^@brazilian-utils/(.*)$": "<rootDir>/../../packages/$1/src" | ||
} | ||
}, | ||
"devDependencies": { | ||
"microbundle": "^0.6.0" | ||
"@types/jest": "^24.0.15", | ||
"husky": "^3.0.1", | ||
"prettier": "^1.18.2", | ||
"pretty-quick": "^1.11.1", | ||
"tsdx": "^0.7.2", | ||
"tslib": "^1.10.0", | ||
"typescript": "^3.5.3" | ||
}, | ||
@@ -28,3 +46,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "be32f1e24005a065474b554e05bbc1d38cc12323" | ||
"gitHead": "535d813c516ae01d2307a42a29354608fdbc8951" | ||
} |
# @brazilian-utils/helper-only-numbers | ||
Strips all non numeric characters. | ||
> Strips all non numeric characters. | ||
## Installation | ||
See our website [http://brazilian-utils.github.io](http://brazilian-utils.github.io) for more information or the [issues](https://github.com/brazilian-utils/brazilian-utils/issues?q=is%3Aissue+helper-only-numbers) associated with this package. | ||
## Install | ||
Using NPM: | ||
```sh | ||
# Yarn | ||
npm install @brazilian-utils/helper-only-numbers --save | ||
``` | ||
using Yarn | ||
```sh | ||
yarn add @brazilian-utils/helper-only-numbers | ||
``` | ||
# npm | ||
npm install @brazilian-utils/helper-only-numbers --save | ||
or using <script> tag | ||
# UMD | ||
<script type='text/javascript' src='https://unpkg.com/@brazilian-utils/helper-only-numbers/dist/index.umd.js'></script> | ||
```html | ||
<script | ||
type="text/javascript" | ||
src="https://unpkg.com/@brazilian-utils/helper-only-numbers/dist/helper-only-numbers.umd.production.js" | ||
></script> | ||
``` | ||
@@ -21,6 +33,4 @@ | ||
```js | ||
import onlyNumbers from '@brazilian-utils/helper-only-numbers'; | ||
onlyNumbers('123abc456?.#789xyz 0') // 1234567890 | ||
onlyNumbers('527.328.336-12'); // 52732833612 | ||
onlyNumbers('123abc456?.#789xyz 0'); // 1234567890 | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
5392
12
20
36
0
7
2