num-only 1.1.1 → 1.2.0

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,9 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020-2022 Julio L. Muller
3
+ Copyright (c) 2020-2025 Julio L. Muller
4
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:
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
11
6
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
14
8
 
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.
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,15 +1,15 @@
1
1
  /**
2
- * num-only v1.1.1
2
+ * num-only v1.2.0
3
3
  *
4
4
  * @author Julio L. Muller.
5
- * @license MIT - 2020-2022
5
+ * @license MIT - 2020-2025
6
6
  */
7
7
 
8
8
  'use strict';
9
9
 
10
- function numOnly(target) {
11
- return String(target).replace(/\D/g, '');
10
+ function numOnly(target) {
11
+ return String(target).replace(/\D/g, "");
12
12
  }
13
13
 
14
14
  module.exports = numOnly;
15
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguY2pzLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OyJ9
15
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguY2pzLmpzIiwic291cmNlcyI6WyIuLi9zcmMvbnVtLW9ubHkudHMiXSwic291cmNlc0NvbnRlbnQiOlsiXG5mdW5jdGlvbiBudW1Pbmx5KHRhcmdldDogYW55KSB7XG4gIHJldHVybiBTdHJpbmcodGFyZ2V0KS5yZXBsYWNlKC9cXEQvZywgJycpXG59XG5cbmV4cG9ydCBkZWZhdWx0IG51bU9ubHlcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFDQSxTQUFTLFFBQVEsTUFBYSxFQUFBO0FBQzVCLEVBQUEsT0FBTyxNQUFPLENBQUEsTUFBTSxDQUFFLENBQUEsT0FBQSxDQUFRLE9BQU8sRUFBRSxDQUFBO0FBQ3pDOzs7OyJ9
@@ -1,13 +1,13 @@
1
1
  /**
2
- * num-only v1.1.1
2
+ * num-only v1.2.0
3
3
  *
4
4
  * @author Julio L. Muller.
5
- * @license MIT - 2020-2022
5
+ * @license MIT - 2020-2025
6
6
  */
7
7
 
8
- function numOnly(target) {
9
- return String(target).replace(/\D/g, '');
8
+ function numOnly(target) {
9
+ return String(target).replace(/\D/g, "");
10
10
  }
11
11
 
12
12
  export { numOnly as default };
13
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZXNtLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OzsifQ==
13
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZXNtLmpzIiwic291cmNlcyI6WyIuLi9zcmMvbnVtLW9ubHkudHMiXSwic291cmNlc0NvbnRlbnQiOlsiXG5mdW5jdGlvbiBudW1Pbmx5KHRhcmdldDogYW55KSB7XG4gIHJldHVybiBTdHJpbmcodGFyZ2V0KS5yZXBsYWNlKC9cXEQvZywgJycpXG59XG5cbmV4cG9ydCBkZWZhdWx0IG51bU9ubHlcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQ0EsU0FBUyxRQUFRLE1BQWEsRUFBQTtBQUM1QixFQUFBLE9BQU8sTUFBTyxDQUFBLE1BQU0sQ0FBRSxDQUFBLE9BQUEsQ0FBUSxPQUFPLEVBQUUsQ0FBQTtBQUN6Qzs7OzsifQ==
package/dist/num-only.js CHANGED
@@ -1,21 +1,21 @@
1
1
  /**
2
- * num-only v1.1.1
2
+ * num-only v1.2.0
3
3
  *
4
4
  * @author Julio L. Muller.
5
- * @license MIT - 2020-2022
5
+ * @license MIT - 2020-2025
6
6
  */
7
7
 
8
8
  (function (global, factory) {
9
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
10
- typeof define === 'function' && define.amd ? define(factory) :
11
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.numOnly = factory());
9
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
10
+ typeof define === 'function' && define.amd ? define(factory) :
11
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.numOnly = factory());
12
12
  })(this, (function () { 'use strict';
13
13
 
14
- function numOnly(target) {
15
- return String(target).replace(/\D/g, '');
16
- }
14
+ function numOnly(target) {
15
+ return String(target).replace(/\D/g, '');
16
+ }
17
17
 
18
- return numOnly;
18
+ return numOnly;
19
19
 
20
20
  }));
21
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtLW9ubHkuanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
21
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtLW9ubHkuanMiLCJzb3VyY2VzIjpbIi4uL3NyYy9udW0tb25seS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJcbmZ1bmN0aW9uIG51bU9ubHkodGFyZ2V0OiBhbnkpIHtcbiAgcmV0dXJuIFN0cmluZyh0YXJnZXQpLnJlcGxhY2UoL1xcRC9nLCAnJylcbn1cblxuZXhwb3J0IGRlZmF1bHQgbnVtT25seVxuIl0sIm5hbWVzIjpbIm51bU9ubHkiLCJ0YXJnZXQiLCJTdHJpbmciLCJyZXBsYWNlIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7O0lBQ0EsU0FBU0EsT0FBT0EsQ0FBQ0MsTUFBVyxFQUFBO01BQzFCLE9BQU9DLE1BQU0sQ0FBQ0QsTUFBTSxDQUFDLENBQUNFLE9BQU8sQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDO0lBQzFDOzs7Ozs7OzsifQ==
@@ -1,8 +1,8 @@
1
1
  /**
2
- * num-only v1.1.1
2
+ * num-only v1.2.0
3
3
  *
4
4
  * @author Julio L. Muller.
5
- * @license MIT - 2020-2022
5
+ * @license MIT - 2020-2025
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
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtLW9ubHkubWluLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OyJ9
8
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtLW9ubHkubWluLmpzIiwic291cmNlcyI6WyIuLi9zcmMvbnVtLW9ubHkudHMiXSwic291cmNlc0NvbnRlbnQiOlsiXG5mdW5jdGlvbiBudW1Pbmx5KHRhcmdldDogYW55KSB7XG4gIHJldHVybiBTdHJpbmcodGFyZ2V0KS5yZXBsYWNlKC9cXEQvZywgJycpXG59XG5cbmV4cG9ydCBkZWZhdWx0IG51bU9ubHlcbiJdLCJuYW1lcyI6WyJ0YXJnZXQiLCJTdHJpbmciLCJyZXBsYWNlIl0sIm1hcHBpbmdzIjoiOzs7Ozs7K09BQ0EsU0FBaUJBLEdBQ2YsT0FBT0MsT0FBT0QsR0FBUUUsUUFBUSxNQUFPLEdBQ3ZDIn0=
package/package.json CHANGED
@@ -1,16 +1,19 @@
1
1
  {
2
2
  "name": "num-only",
3
- "version": "1.1.1",
4
- "description": "Function to stringify and remove non-numeric characters of items.",
3
+ "version": "1.2.0",
4
+ "description": "Utility function to remove non-numeric characters of input.",
5
5
  "author": "Julio L. Muller",
6
6
  "license": "MIT",
7
7
  "keywords": [
8
8
  "strip",
9
9
  "remove",
10
10
  "extract",
11
+ "escape",
11
12
  "numbers",
12
13
  "only",
13
- "strings"
14
+ "strings",
15
+ "utility",
16
+ "utils"
14
17
  ],
15
18
  "repository": {
16
19
  "type": "git",
@@ -23,29 +26,34 @@
23
26
  "main": "build/index.cjs.js",
24
27
  "types": "build/index.d.ts",
25
28
  "scripts": {
29
+ "prepare": "husky",
30
+ "commit": "git-cz",
26
31
  "build": "rollup --config",
27
32
  "lint": "eslint src/ --fix",
28
- "pretest": "npm run build",
29
- "test": "jest",
30
- "prepublish": "npm test"
33
+ "pretest": "bun run build",
34
+ "test": "bun test --coverage --coverage-reporter=lcov --coverage-dir=test/__coverage__",
35
+ "prepublish": "bun run test"
31
36
  },
32
37
  "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",
38
+ "@babel/preset-env": "^7.26.9",
39
+ "@commitlint/cli": "^19.7.1",
40
+ "@commitlint/config-conventional": "^19.7.1",
41
+ "@rollup/plugin-babel": "^6.0.4",
42
+ "@rollup/plugin-commonjs": "^28.0.2",
43
+ "@rollup/plugin-node-resolve": "^16.0.0",
44
+ "@rollup/plugin-terser": "~0.4.4",
45
+ "@rollup/plugin-typescript": "^12.1.2",
46
+ "@types/node": "^22.13.4",
47
+ "commitizen": "^4.3.1",
48
+ "cz-conventional-changelog": "^3.3.0",
40
49
  "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
+ "eslint-config-lacussoft": "^2.3.0",
51
+ "husky": "^9.1.7",
52
+ "lint-staged": "^15.4.3",
53
+ "rollup": "^4.34.7",
54
+ "rollup-plugin-delete": "^2.1.0",
55
+ "rollup-plugin-dts": "^6.1.1",
56
+ "rollup-plugin-esbuild": "^6.2.0",
57
+ "typescript": "^5.7.3"
50
58
  }
51
59
  }
package/tsconfig.json DELETED
@@ -1,27 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "rootDir": ".",
4
- "baseUrl": ".",
5
- "paths": {},
6
- // "lib": [],
7
- // "types": [],
8
- "sourceMap": false,
9
- "target": "ES5",
10
- "module": "esnext",
11
- "moduleResolution": "node",
12
- "useDefineForClassFields": false,
13
- "allowSyntheticDefaultImports": true,
14
- "esModuleInterop": true,
15
- "skipLibCheck": true, /* Skip type checking of declaration files. */
16
- "declaration": false,
17
- "allowJs": false,
18
- "noEmit": false,
19
- "strict": true,
20
- "noUnusedLocals": true,
21
- "resolveJsonModule": true,
22
- "removeComments": false
23
- },
24
- "include": [
25
- "src/"
26
- ]
27
- }