File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " usbabynames" ,
3- "version" : " 2.1.1 " ,
3+ "version" : " 2.1.2 " ,
44 "description" : " Returns data about baby names used in the United States 1880-2021" ,
55 "main" : " lib/usBabyNames.mjs" ,
66 "scripts" : {
Original file line number Diff line number Diff line change 11// unpack the state baby name data
22import { fileURLToPath } from 'url' ;
33import { dirname , join } from 'path' ;
4+ import fs from 'fs' ;
45
56const __filename = fileURLToPath ( import . meta. url ) ;
67const __dirname = dirname ( __filename ) ;
@@ -19,14 +20,18 @@ const unzip = async () => {
1920 const usNameDetailsZip = new AdmZip ( usNameDetailsZipFilePath ) ;
2021 usNameDetailsZip . extractAllTo ( outputDir , true ) ;
2122 console . log ( '...usNameDetailsZip unpacked' ) ;
23+ fs . unlinkSync ( usNameDetailsZipFilePath ) ;
24+
2225
2326 const stateNameZip = new AdmZip ( stateNameZipFilePath ) ;
2427 stateNameZip . extractAllTo ( outputDir , true ) ;
2528 console . log ( '...stateNameZip unpacked' ) ;
29+ fs . unlinkSync ( stateNameZipFilePath ) ;
2630
2731 const usNameZip = new AdmZip ( usNameZipFilePath ) ;
2832 usNameZip . extractAllTo ( outputDir , true ) ;
2933 console . log ( '...usNameZip unpacked' ) ;
34+ fs . unlinkSync ( usNameZipFilePath ) ;
3035
3136 console . log ( '\n\nus baby names unpacked!\n\n' ) ;
3237} ;
You can’t perform that action at this time.
0 commit comments