File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 " fixture*"
99 ],
1010 "rules" : {
11- "package-json/add-type" : " off" ,
12- "esm/add-index-to-import" : " off"
11+ "package-json/add-type" : " off"
1312 },
1413 "match" : {
1514 ".filesystem.json" : {
Original file line number Diff line number Diff line change 1+ const difference = ( a , b ) => new Set ( a ) . difference ( new Set ( b ) ) ;
2+ const { keys} = Object ;
3+
4+ export const omit = ( a , list ) => {
5+ const result = { } ;
6+
7+ for ( const key of difference ( keys ( a ) , list ) ) {
8+ result [ key ] = a [ key ] ;
9+ }
10+
11+ return result ;
12+ } ;
Original file line number Diff line number Diff line change 1+ import { test } from 'supertape' ;
2+ import { omit } from '#common/omit' ;
3+
4+ test ( 'cloudcmd: common: omit' , ( t ) => {
5+ const a = {
6+ hello : 1 ,
7+ world : 2 ,
8+ } ;
9+
10+ const result = omit ( a , [ 'world' ] ) ;
11+
12+ const expected = {
13+ hello : 1 ,
14+ } ;
15+
16+ t . deepEqual ( result , expected ) ;
17+ t . end ( ) ;
18+ } ) ;
Original file line number Diff line number Diff line change 122122 "montag" : " ^1.2.1" ,
123123 "nano-memoize" : " ^3.0.16" ,
124124 "nomine" : " ^4.0.0" ,
125- "object.omit" : " ^3.0.0" ,
126125 "once" : " ^1.4.0" ,
127126 "onezip" : " ^6.0.1" ,
128127 "open" : " ^11.0.0" ,
232231 "#dom/storage" : " ./client/dom/storage.js" ,
233232 "#dom/rest" : " ./client/dom/rest.js" ,
234233 "#common/util" : " ./common/util.js" ,
234+ "#common/omit" : " ./common/omit.js" ,
235235 "#common/cloudfunc" : " ./common/cloudfunc.js" ,
236236 "#common/entity" : " ./common/entity.js" ,
237237 "#server/cloudcmd" : " ./server/cloudcmd.js"
Original file line number Diff line number Diff line change 11import currify from 'currify' ;
22import wraptile from 'wraptile' ;
33import squad from 'squad' ;
4- import omit from 'object. omit' ;
4+ import { omit } from '#common/ omit' ;
55import log , {
66 exportStr ,
77 connectedStr ,
You can’t perform that action at this time.
0 commit comments