File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ type P = {
99type R = unknown ;
1010
1111export const module : ModuleDefinition < P , R > = {
12- version : '1.1.0 ' ,
12+ version : '1.1.1 ' ,
1313 moduleName : 'Error' ,
1414 description : 'Raise an error with specified name and message.' ,
1515 params : {
@@ -34,6 +34,7 @@ export const module: ModuleDefinition<P, R> = {
3434export const compute : ModuleCompute < P , R > = params => {
3535 const error = new Error ( params . message ) ;
3636 error . name = params . name ;
37+ ( error as any ) . message = params . message ;
3738 ( error as any ) . status = params . status ;
3839 ( error as any ) . details = params . details ;
3940 throw error ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ type P = {
88type R = unknown ;
99
1010export const module : ModuleDefinition < P , R > = {
11- version : '1.0.3 ' ,
11+ version : '1.0.4 ' ,
1212 moduleName : 'Object / Omit' ,
1313 description : `
1414 Creates a shallow copy of an object with specified keys removed.
@@ -37,9 +37,9 @@ export const module: ModuleDefinition<P, R> = {
3737} ;
3838
3939export const compute : ModuleCompute < P , R > = params => {
40- const { object, keys } = params ;
40+ const object = typeof params . object === 'object' ? params . object : { } ;
4141 const res : any = { ...object } ;
42- for ( const key of keys ) {
42+ for ( const key of params . keys ) {
4343 delete res [ key ] ;
4444 }
4545 return res ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ type P = {
88type R = unknown ;
99
1010export const module : ModuleDefinition < P , R > = {
11- version : '1.4.4 ' ,
11+ version : '1.4.5 ' ,
1212 moduleName : 'Object / Pick' ,
1313 description : `
1414 Picks specified keys from an object.
@@ -37,9 +37,9 @@ export const module: ModuleDefinition<P, R> = {
3737} ;
3838
3939export const compute : ModuleCompute < P , R > = params => {
40- const { object, keys } = params ;
40+ const object = typeof params . object === 'object' ? params . object : { } ;
4141 const res : any = { } ;
42- for ( const key of keys ) {
42+ for ( const key of params . keys ) {
4343 const value = ( object as any ) [ key ] ;
4444 if ( value !== undefined ) {
4545 res [ key ] = value ;
You can’t perform that action at this time.
0 commit comments