@folklore/utils 0.1.1 → 0.1.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/dist/cjs.js +1 -7
- package/package.json +3 -3
package/dist/cjs.js
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var isString = require('lodash/isString');
|
|
6
4
|
var pascalCase = require('pascal-case');
|
|
7
5
|
|
|
8
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
-
|
|
10
|
-
var isString__default = /*#__PURE__*/_interopDefaultLegacy(isString);
|
|
11
|
-
|
|
12
6
|
function getComponentFromName(components, name) {
|
|
13
7
|
let defaultComponentName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
14
|
-
const defaultComponent = (
|
|
8
|
+
const defaultComponent = (isString(defaultComponentName) ? components[pascalCase.pascalCase(defaultComponentName)] : defaultComponentName) || null;
|
|
15
9
|
if (name === null) {
|
|
16
10
|
return defaultComponent;
|
|
17
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@folklore/utils",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Utilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
],
|
|
36
36
|
"scripts": {
|
|
37
37
|
"clean": "rm -rf dist",
|
|
38
|
-
"build": "rollup --config ../../rollup.config.js",
|
|
38
|
+
"build": "rollup --bundleConfigAsCjs --config ../../rollup.config.js",
|
|
39
39
|
"prepare": "npm run clean && npm run build"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"lodash": "^4.17.4",
|
|
44
44
|
"pascal-case": "^3.1.2"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "c13ef70b8126b3182b3e3365f34f9231fa9b1535"
|
|
47
47
|
}
|