@vpmedia/simplify 1.0.0 → 1.0.2

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/CHANGES.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## 1.0.1
7
+
8
+ - Changed export name, fixed input check
9
+
6
10
  ## 1.0.0
7
11
 
8
12
  - Initial release
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @vpmedia/simplify
2
2
 
3
- [![npm version](https://badge.fury.io/js/@vpmedia%2Fsimplify.svg?v=1.0.0)](https://badge.fury.io/js/@vpmedia%2Fsimplify)
3
+ [![npm version](https://badge.fury.io/js/@vpmedia%2Fsimplify.svg?v=1.0.2)](https://badge.fury.io/js/@vpmedia%2Fsimplify)
4
4
  [![Node.js CI](https://github.com/vpmedia/simplify/actions/workflows/node.js.yml/badge.svg)](https://github.com/vpmedia/simplify/actions/workflows/node.js.yml)
5
5
 
6
6
  @vpmedia/simplify TBD
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vpmedia/simplify",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "@vpmedia/simplify",
5
5
  "author": "Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)",
6
6
  "license": "MIT",
package/src/index.js CHANGED
@@ -3,6 +3,6 @@ import { capitalize } from './util/capitalize.js';
3
3
  import { getRandomInt } from './util/getRandomInt.js';
4
4
  import { getURLParam } from './util/getURLParam.js';
5
5
  import { sanitizeURLParam } from './util/sanitizeURLParam.js';
6
- import { underscoreToCamelcase } from './util/underscoreToCamelCase.js';
6
+ import { underscoreToCamelCase } from './util/underscoreToCamelCase.js';
7
7
  // exports
8
- export { capitalize, getRandomInt, getURLParam, sanitizeURLParam, underscoreToCamelcase };
8
+ export { capitalize, getRandomInt, getURLParam, sanitizeURLParam, underscoreToCamelCase };
@@ -4,7 +4,7 @@
4
4
  * @returns {string} TBD.
5
5
  */
6
6
  export function capitalize(value) {
7
- if (!value || value.length === 0) {
7
+ if (!value || value?.length === 0) {
8
8
  return value;
9
9
  }
10
10
  const normValue = value.toLowerCase();
@@ -3,7 +3,7 @@
3
3
  * @param {string} value - The input string in underscore case.
4
4
  * @returns {string} The output string in camel case.
5
5
  */
6
- export function underscoreToCamelcase(value) {
6
+ export function underscoreToCamelCase(value) {
7
7
  return value.replace(/(_\w)/g, function (m) {
8
8
  return m[1].toUpperCase();
9
9
  });
@@ -1,7 +1,7 @@
1
- import { underscoreToCamelcase } from './underscoreToCamelCase.js';
1
+ import { underscoreToCamelCase } from './underscoreToCamelCase.js';
2
2
 
3
3
  test('TBD', () => {
4
- expect(underscoreToCamelcase('test')).toBe('test');
5
- expect(underscoreToCamelcase('test_variable')).toBe('testVariable');
6
- expect(underscoreToCamelcase('test_variable_name')).toBe('testVariableName');
4
+ expect(underscoreToCamelCase('test')).toBe('test');
5
+ expect(underscoreToCamelCase('test_variable')).toBe('testVariable');
6
+ expect(underscoreToCamelCase('test_variable_name')).toBe('testVariableName');
7
7
  });
package/types/index.d.ts CHANGED
@@ -1,3 +1,7 @@
1
- export { capitalize };
2
1
  import { capitalize } from './util/capitalize.js';
2
+ import { getRandomInt } from './util/getRandomInt.js';
3
+ import { getURLParam } from './util/getURLParam.js';
4
+ import { sanitizeURLParam } from './util/sanitizeURLParam.js';
5
+ import { underscoreToCamelCase } from './util/underscoreToCamelCase.js';
6
+ export { capitalize, getRandomInt, getURLParam, sanitizeURLParam, underscoreToCamelCase };
3
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";2BAC2B,sBAAsB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"2BAC2B,sBAAsB;6BACpB,wBAAwB;4BACzB,uBAAuB;iCAClB,4BAA4B;sCACvB,iCAAiC"}
@@ -3,5 +3,5 @@
3
3
  * @param {string} value - The input string in underscore case.
4
4
  * @returns {string} The output string in camel case.
5
5
  */
6
- export function underscoreToCamelcase(value: string): string;
6
+ export function underscoreToCamelCase(value: string): string;
7
7
  //# sourceMappingURL=underscoreToCamelCase.d.ts.map