@loczer/storefront-sdk 0.1.0 → 0.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/package.json +3 -3
- package/dist/index.d.ts +0 -13
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -23
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loczer/storefront-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"publishConfig": {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"access": "public",
|
|
6
|
+
"registry": "https://registry.npmjs.org/"
|
|
7
7
|
},
|
|
8
8
|
"type": "module",
|
|
9
9
|
"files": [
|
package/dist/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface GreetingOptions {
|
|
2
|
-
/** Custom punctuation to use when building the greeting. */
|
|
3
|
-
punctuation?: string;
|
|
4
|
-
/** When true, ensures the greeting ends with an exclamation mark. */
|
|
5
|
-
excited?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare function createGreeting(name?: string, options?: GreetingOptions): string;
|
|
8
|
-
export declare class StorefrontSdk {
|
|
9
|
-
#private;
|
|
10
|
-
greet(name?: string, options?: GreetingOptions): string;
|
|
11
|
-
getLastGreeting(): string | null;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAUD,wBAAgB,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,MAAM,CAInF;AAED,qBAAa,aAAa;;IAGxB,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,MAAM;IAMvD,eAAe,IAAI,MAAM,GAAG,IAAI;CAGjC"}
|
package/dist/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
const o = "Storefront SDK";
|
|
2
|
-
function c(e) {
|
|
3
|
-
const t = e?.trim();
|
|
4
|
-
return t && t.length > 0 ? t : o;
|
|
5
|
-
}
|
|
6
|
-
function s(e, t = {}) {
|
|
7
|
-
const r = c(e), n = t.punctuation ?? (t.excited, "!");
|
|
8
|
-
return `Hello, ${r}${n}`;
|
|
9
|
-
}
|
|
10
|
-
class i {
|
|
11
|
-
#t = null;
|
|
12
|
-
greet(t, r) {
|
|
13
|
-
const n = s(t, r);
|
|
14
|
-
return this.#t = n, n;
|
|
15
|
-
}
|
|
16
|
-
getLastGreeting() {
|
|
17
|
-
return this.#t;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
i as StorefrontSdk,
|
|
22
|
-
s as createGreeting
|
|
23
|
-
};
|