@neovici/cosmoz-utils 6.7.0 → 6.8.1

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.
@@ -1,7 +1,7 @@
1
1
  import { Context } from '@pionjs/pion/lib/create-context';
2
2
  import { AttributePart } from 'lit-html';
3
3
  import { AsyncDirective } from 'lit-html/async-directive.js';
4
- import { ChildPart, DirectiveParameters } from 'lit-html/directive.js';
4
+ import { ChildPart, DirectiveParameters, DirectiveResult } from 'lit-html/directive.js';
5
5
  declare class ConsumeDirective<T> extends AsyncDirective {
6
6
  value: T;
7
7
  context: Context<T>;
@@ -14,5 +14,8 @@ declare class ConsumeDirective<T> extends AsyncDirective {
14
14
  updater(value: T): void;
15
15
  protected disconnected(): void;
16
16
  }
17
- export declare const consume: (context: Context<unknown>, pluck: (value: unknown) => unknown) => import("lit-html/directive.js").DirectiveResult<typeof ConsumeDirective>;
17
+ interface Consume {
18
+ <T>(consume: Context<T>, pluck: (value: T) => unknown): DirectiveResult<typeof ConsumeDirective<T>>;
19
+ }
20
+ export declare const consume: Consume;
18
21
  export {};
package/dist/object.js CHANGED
@@ -4,7 +4,7 @@ export function prop(key) {
4
4
  if (!key) {
5
5
  return identity;
6
6
  }
7
- return (obj) => obj[key];
7
+ return (obj) => obj?.[key];
8
8
  }
9
9
  export const strProp = (key) => {
10
10
  const p = prop(key);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-utils",
3
- "version": "6.7.0",
3
+ "version": "6.8.1",
4
4
  "description": "Date, money and template management functions commonly needed in Cosmoz views.",
5
5
  "keywords": [
6
6
  "polymer",