@thisisagile/easy
Advanced tools
Comparing version 1.3.2 to 1.3.3
@@ -7,1 +7,3 @@ export declare type Constructor<T> = { | ||
export declare const ofGet: <P, T>(g: Get<P, T>, ...params: P[]) => T; | ||
export declare type GetProperty<T, U> = keyof T | ((t: T) => U); | ||
export declare const ofProperty: <T, U>(t: T, p: GetProperty<T, U>) => U; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ofGet = void 0; | ||
exports.ofProperty = exports.ofGet = void 0; | ||
const Is_1 = require("./Is"); | ||
exports.ofGet = (g, ...params) => Is_1.isFunction(g) ? g(...params) : g; | ||
exports.ofProperty = (t, p) => Is_1.isFunction(p) ? p(t) : t[p]; | ||
//# sourceMappingURL=Constructor.js.map |
@@ -5,2 +5,3 @@ export declare const toArray: <T>(...items: (T | T[])[]) => T[]; | ||
} | ||
export declare const array: <T>(...items: (T | T[])[]) => List<T>; | ||
export declare const list: <T>(...items: (T | T[])[]) => List<T>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.list = exports.List = exports.toReduceDefined = exports.toArray = void 0; | ||
exports.list = exports.array = exports.List = exports.toReduceDefined = exports.toArray = void 0; | ||
const types_1 = require("../types"); | ||
@@ -10,3 +10,4 @@ exports.toArray = (...items) => (items.length > 1) ? items : types_1.isArray(items[0]) ? items[0] : types_1.isDefined(items[0]) ? [items[0]] : []; | ||
exports.List = List; | ||
exports.array = (...items) => new Array(...exports.toArray(...items)); | ||
exports.list = (...items) => new List(...exports.toArray(...items)); | ||
//# sourceMappingURL=Array.js.map |
{ | ||
"name": "@thisisagile/easy", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "Straightforward library for building domain-driven microservice architectures", | ||
@@ -5,0 +5,0 @@ "author": "Sander Hoogendoorn", |
@@ -7,3 +7,5 @@ import { isFunction } from './Is'; | ||
export type Predicate<P> = Get<P, boolean>; | ||
export const ofGet = <P, T>(g: Get<P, T>, ...params: P[]): T => isFunction(g) ? g(...params) : g; | ||
export const ofGet = <P, T>(g: Get<P, T>, ...params: P[]): T => isFunction(g) ? g(...params) : g; | ||
export type GetProperty<T, U> = keyof T | ((t: T) => U); | ||
export const ofProperty = <T, U>(t: T, p: GetProperty<T, U>): U => isFunction(p) ? p(t) : t[p] as unknown as U; |
@@ -12,2 +12,3 @@ import { isArray, isDefined } from "../types"; | ||
export const list = <T>(...items: (T | T[])[]): List<T> => new List(...toArray(...items)); | ||
export const array = <T>(...items: (T | T[])[]): List<T> => new Array<T>(...toArray(...items)); | ||
export const list = <T>(...items: (T | T[])[]): List<T> => new List<T>(...toArray(...items)); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64006
920