@selkirk-systems/selkirk-utils 1.0.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/README.md ADDED
@@ -0,0 +1,9 @@
1
+ # `Selkirk Utils`
2
+
3
+ Utils often used in our web apps
4
+
5
+ ## Usage
6
+
7
+ ```
8
+
9
+ ```
@@ -0,0 +1,14 @@
1
+ export const formatStr = (str, options) => {
2
+ options = {
3
+ initial: '',
4
+ append: '',
5
+ prepend: '',
6
+ ...options
7
+ };
8
+ if (str === null || str === undefined) return `${options.prepend}${options.initial}${options.append}`;
9
+ return `${options.prepend}${str}${options.append}`;
10
+ };
11
+ export const capitalize = str => {
12
+ let result = str.charAt(0).toUpperCase() + str.slice(1);
13
+ return result;
14
+ };
@@ -0,0 +1,22 @@
1
+
2
+ export const formatStr = ( str, options ) => {
3
+
4
+ options = {
5
+ initial: '',
6
+ append: '',
7
+ prepend: '',
8
+ ...options
9
+ }
10
+
11
+ if ( str === null || str === undefined ) return `${options.prepend}${options.initial}${options.append}`;
12
+
13
+ return `${options.prepend}${str}${options.append}`;
14
+
15
+
16
+ }
17
+ export const capitalize = ( str ) => {
18
+
19
+ let result = str.charAt( 0 ).toUpperCase() + str.slice( 1 );
20
+ return result;
21
+
22
+ }
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@selkirk-systems/selkirk-utils",
3
+ "version": "1.0.0",
4
+ "description": "Utils we often use in our web projects",
5
+ "keywords": [],
6
+ "author": "Marcos Bernal <mbernal@selkirksystems.com>",
7
+ "license": "ISC",
8
+ "main": "dist/index.js",
9
+ "module": "dist/index.js",
10
+ "directories": {
11
+ "dist": "dist",
12
+ "lib": "lib"
13
+ },
14
+ "files": [
15
+ "dist/**",
16
+ "lib/**"
17
+ ],
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://galderak@bitbucket.org/selkirk/web-component-library.git"
24
+ },
25
+ "scripts": {
26
+ "docs": "jsdoc --configure ../../jsdoc.json -r ./lib -d docs",
27
+ "build": "del dist /Q && cross-env CI=false NODE_ENV=production babel lib --out-dir dist --copy-files --ignore __tests__,spec.js,test.js,__snapshots__",
28
+ "prepublishOnly": "npm run build"
29
+ },
30
+ "bugs": {
31
+ "url": "https://bitbucket.org/selkirk/web-component-library/issues"
32
+ },
33
+ "homepage": "https://bitbucket.org/selkirk/web-component-library#readme",
34
+ "peerDependencies": {
35
+ "@selkirk-systems/layout": "^1.3.1",
36
+ "primereact": "^10.9.4",
37
+ "react": "^19.0.0",
38
+ "wouter": "^3.6.0"
39
+ },
40
+ "dependencies": {
41
+ "clsx": "^2.1.1"
42
+ },
43
+ "gitHead": "5300c233d7df9102c73b0e738aa76e1d2d053f4d"
44
+ }