num-only 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2020-2021 Julio L. Muller
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2020-2022 Julio L. Muller
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,48 +1,48 @@
1
- # num-only
2
-
3
- ![NPM Latest Version](https://img.shields.io/npm/v/num-only)
4
- ![Downloads Count](https://img.shields.io/npm/dm/num-only.svg)
5
- ![Bundle Size](https://packagephobia.now.sh/badge?p=num-only)
6
- ![Test Status](https://img.shields.io/travis/juliolmuller/num-only-js/main.svg)
7
- ![Last Update Date](https://img.shields.io/github/last-commit/juliolmuller/num-only-js)
8
- ![Project License](https://img.shields.io/github/license/juliolmuller/num-only-js)
9
-
10
- Node package with a function to stringify and remove non-numeric characters of items.
11
-
12
- ## Browser Support
13
-
14
- ![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) |
15
- --- | --- | --- | --- | --- | --- |
16
- Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
17
-
18
- ## Installation
19
-
20
- ```bash
21
- $ npm install num-only
22
- ```
23
-
24
- ## Import
25
-
26
- ```js
27
- // ES Modules
28
- import numOnly from 'num-only'
29
-
30
- // Common JS
31
- const numOnly = require('num-only')
32
- ```
33
-
34
- or import it through your HTML file, using CDN:
35
-
36
- ```html
37
- <script src="https://cdn.jsdelivr.net/npm/num-only@latest/dist/num-only.min.js"></script>
38
- ```
39
-
40
- ## Usage
41
-
42
- ```js
43
- numOnly('12345') // returns '12345'
44
- numOnly('abc123') // returns '123'
45
- numOnly(['a', 'b', 'c', 1, 2, 3]) // returns '123'
46
- numOnly(true) // returns ''
47
- numOnly(() => 5 + 3) // returns '53'
48
- ```
1
+ # num-only
2
+
3
+ ![NPM Latest Version](https://img.shields.io/npm/v/num-only)
4
+ ![Downloads Count](https://img.shields.io/npm/dm/num-only.svg)
5
+ ![Bundle Size](https://packagephobia.now.sh/badge?p=num-only)
6
+ ![Test Status](https://img.shields.io/travis/juliolmuller/num-only-js/main.svg)
7
+ ![Last Update Date](https://img.shields.io/github/last-commit/juliolmuller/num-only-js)
8
+ ![Project License](https://img.shields.io/github/license/juliolmuller/num-only-js)
9
+
10
+ Node package with a function to stringify and remove non-numeric characters of items.
11
+
12
+ ## Browser Support
13
+
14
+ ![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) |
15
+ --- | --- | --- | --- | --- | --- |
16
+ Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ $ npm install num-only
22
+ ```
23
+
24
+ ## Import
25
+
26
+ ```js
27
+ // ES Modules
28
+ import numOnly from 'num-only'
29
+
30
+ // Common JS
31
+ const numOnly = require('num-only')
32
+ ```
33
+
34
+ or import it through your HTML file, using CDN:
35
+
36
+ ```html
37
+ <script src="https://cdn.jsdelivr.net/npm/num-only@latest/dist/num-only.min.js"></script>
38
+ ```
39
+
40
+ ## Usage
41
+
42
+ ```js
43
+ numOnly('12345') // returns '12345'
44
+ numOnly('abc123') // returns '123'
45
+ numOnly(['a', 'b', 'c', 1, 2, 3]) // returns '123'
46
+ numOnly(true) // returns ''
47
+ numOnly(() => 5 + 3) // returns '53'
48
+ ```
@@ -1,8 +1,8 @@
1
1
  /**
2
- * num-only v1.1.0
2
+ * num-only v1.1.1
3
3
  *
4
4
  * @author Julio L. Muller.
5
- * @license MIT - 2020-2021
5
+ * @license MIT - 2020-2022
6
6
  */
7
7
 
8
8
  'use strict';
package/build/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  declare function numOnly(target: any): string;
2
2
 
3
- export default numOnly;
3
+ export { numOnly as default };
@@ -1,13 +1,13 @@
1
1
  /**
2
- * num-only v1.1.0
2
+ * num-only v1.1.1
3
3
  *
4
4
  * @author Julio L. Muller.
5
- * @license MIT - 2020-2021
5
+ * @license MIT - 2020-2022
6
6
  */
7
7
 
8
8
  function numOnly(target) {
9
9
  return String(target).replace(/\D/g, '');
10
10
  }
11
11
 
12
- export default numOnly;
12
+ export { numOnly as default };
13
13
  //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZXNtLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OzsifQ==
package/dist/num-only.js CHANGED
@@ -1,15 +1,15 @@
1
1
  /**
2
- * num-only v1.1.0
2
+ * num-only v1.1.1
3
3
  *
4
4
  * @author Julio L. Muller.
5
- * @license MIT - 2020-2021
5
+ * @license MIT - 2020-2022
6
6
  */
7
7
 
8
8
  (function (global, factory) {
9
9
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
10
10
  typeof define === 'function' && define.amd ? define(factory) :
11
11
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.numOnly = factory());
12
- }(this, (function () { 'use strict';
12
+ })(this, (function () { 'use strict';
13
13
 
14
14
  function numOnly(target) {
15
15
  return String(target).replace(/\D/g, '');
@@ -17,5 +17,5 @@
17
17
 
18
18
  return numOnly;
19
19
 
20
- })));
20
+ }));
21
21
  //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtLW9ubHkuanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
@@ -1,8 +1,8 @@
1
1
  /**
2
- * num-only v1.1.0
2
+ * num-only v1.1.1
3
3
  *
4
4
  * @author Julio L. Muller.
5
- * @license MIT - 2020-2021
5
+ * @license MIT - 2020-2022
6
6
  */
7
7
  !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).numOnly=n()}(this,(function(){"use strict";return function(e){return String(e).replace(/\D/g,"")}}));
8
8
  //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtLW9ubHkubWluLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OyJ9
package/package.json CHANGED
@@ -1,51 +1,51 @@
1
- {
2
- "name": "num-only",
3
- "version": "1.1.0",
4
- "description": "Function to stringify and remove non-numeric characters of items.",
5
- "author": "Julio L. Muller",
6
- "license": "MIT",
7
- "keywords": [
8
- "strip",
9
- "remove",
10
- "extract",
11
- "numbers",
12
- "only",
13
- "strings"
14
- ],
15
- "repository": {
16
- "type": "git",
17
- "url": "git+https://github.com/juliolmuller/num-only-js.git"
18
- },
19
- "bugs": {
20
- "url": "https://github.com/juliolmuller/num-only-js/issues"
21
- },
22
- "homepage": "https://github.com/juliolmuller/num-only-js#readme",
23
- "main": "build/index.cjs.js",
24
- "types": "build/index.d.ts",
25
- "scripts": {
26
- "build": "rollup --config",
27
- "lint": "eslint src/ --fix",
28
- "pretest": "npm run build",
29
- "test": "jest",
30
- "prepublish": "npm test"
31
- },
32
- "devDependencies": {
33
- "@babel/core": "^7.14.6",
34
- "@babel/preset-env": "^7.14.7",
35
- "@rollup/plugin-babel": "^5.3.0",
36
- "@rollup/plugin-commonjs": "^19.0.1",
37
- "@rollup/plugin-node-resolve": "^13.0.1",
38
- "@types/node": "^14.17.5",
39
- "babel-loader": "^8.2.2",
40
- "eslint": "^7.31.0",
41
- "eslint-config-lacussoft": "^2.0.3",
42
- "jest": "^27.0.6",
43
- "rollup": "^2.53.3",
44
- "rollup-plugin-delete": "^2.0.0",
45
- "rollup-plugin-dts": "^3.0.2",
46
- "rollup-plugin-terser": "^7.0.2",
47
- "rollup-plugin-typescript2": "~0.30.0",
48
- "tslib": "^2.3.0",
49
- "typescript": "^4.3.5"
50
- }
51
- }
1
+ {
2
+ "name": "num-only",
3
+ "version": "1.1.1",
4
+ "description": "Function to stringify and remove non-numeric characters of items.",
5
+ "author": "Julio L. Muller",
6
+ "license": "MIT",
7
+ "keywords": [
8
+ "strip",
9
+ "remove",
10
+ "extract",
11
+ "numbers",
12
+ "only",
13
+ "strings"
14
+ ],
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/juliolmuller/num-only-js.git"
18
+ },
19
+ "bugs": {
20
+ "url": "https://github.com/juliolmuller/num-only-js/issues"
21
+ },
22
+ "homepage": "https://github.com/juliolmuller/num-only-js#readme",
23
+ "main": "build/index.cjs.js",
24
+ "types": "build/index.d.ts",
25
+ "scripts": {
26
+ "build": "rollup --config",
27
+ "lint": "eslint src/ --fix",
28
+ "pretest": "npm run build",
29
+ "test": "jest",
30
+ "prepublish": "npm test"
31
+ },
32
+ "devDependencies": {
33
+ "@babel/core": "^7.17.2",
34
+ "@babel/preset-env": "^7.16.11",
35
+ "@rollup/plugin-babel": "^5.3.0",
36
+ "@rollup/plugin-commonjs": "^21.0.1",
37
+ "@rollup/plugin-node-resolve": "^13.1.3",
38
+ "@types/node": "^14.17.5",
39
+ "babel-loader": "^8.2.3",
40
+ "eslint": "^7.32.0",
41
+ "eslint-config-lacussoft": "^2.1.1",
42
+ "jest": "^27.5.1",
43
+ "rollup": "^2.67.2",
44
+ "rollup-plugin-delete": "^2.0.0",
45
+ "rollup-plugin-dts": "^4.1.0",
46
+ "rollup-plugin-terser": "^7.0.2",
47
+ "rollup-plugin-typescript2": "~0.31.2",
48
+ "tslib": "^2.3.1",
49
+ "typescript": "^4.5.5"
50
+ }
51
+ }