Comparing version 0.2.17 to 0.2.18
@@ -5,8 +5,12 @@ export as namespace likeAr; | ||
declare function likeAr<T>(o:{[K in keyof T]: T[K]}):T extends (infer U)[] ? likeAr.ObjectWithArrayFunctions<{[key in number]:U}> : likeAr.ObjectWithArrayFunctions<T> | ||
declare namespace likeAr{ | ||
export type Mapper<T, U> = U extends {[K in keyof T]: infer W} ? | ||
( callback:(value:T[keyof T], key?:keyof T, original?:{[K in keyof T]:T[K]}, pos?:number)=>U) => ObjectWithArrayFunctions<U> | ||
: never; | ||
export type ObjectWithArrayFunctions<T>={ | ||
forEach: ( callback:(value:T[keyof T], key?:keyof T, original?:{[K in keyof T]:T[K]}, pos?:number)=>void ) => ObjectWithArrayFunctions<T> | ||
map :<U>( callback:(value:T[keyof T], key?:keyof T, original?:{[K in keyof T]:T[K]}, pos?:number)=>U) => ObjectWithArrayFunctions<{[K in keyof T]:U}> | ||
filter : ( callback:(value:T[keyof T], key?:keyof T, original?:{[K in keyof T]:T[K]}, pos?:number)=>boolean) => ObjectWithArrayFunctions<T> | ||
build :<U>( callback:(value:T[keyof T], key?:keyof T, original?:{[K in keyof T]:T[K]}, pos?:number)=>{[K2 in keyof U]:U[K2]}) => ObjectWithArrayFunctions<U> | ||
forEach: ( callback:(value:T[keyof T], key:keyof T, original:{[K in keyof T]:T[K]}, pos:number)=>void ) => ObjectWithArrayFunctions<T> | ||
map :<U>( callback:(value:T[keyof T], key:keyof T, original:{[K in keyof T]:T[K]}, pos:number)=>U) => ObjectWithArrayFunctions<{[K in keyof T]:U}> | ||
filter : ( callback:(value:T[keyof T], key:keyof T, original:{[K in keyof T]:T[K]}, pos:number)=>boolean) => ObjectWithArrayFunctions<T> | ||
build :<U>( callback:(value:T[keyof T], key:keyof T, original:{[K in keyof T]:T[K]}, pos:number)=>{[K2 in keyof U]:U[K2]}) => ObjectWithArrayFunctions<U> | ||
keys :() => (keyof T)[] | ||
@@ -25,2 +29,4 @@ array :() => T[keyof T][] | ||
export var testingLikeOldJs:boolean | ||
export const Optimized:typeof likeAr | ||
export const nonOptimized:typeof likeAr | ||
} |
{ | ||
"name": "like-ar", | ||
"description": "Using objects like arrays with map, filter, forEach and others coming soon.", | ||
"version": "0.2.17", | ||
"version": "0.2.18", | ||
"author": "Codenautas <codenautas@googlegroups.com>", | ||
@@ -6,0 +6,0 @@ "repository": "codenautas/like-ar", |
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
15879
210