@jdeighan/coffee-utils 4.0.14 → 4.0.15
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/fs_utils.coffee +1 -4
- package/src/fs_utils.js +3 -9
package/package.json
CHANGED
package/src/fs_utils.coffee
CHANGED
@@ -119,10 +119,7 @@ export barf = (filepath, contents) ->
|
|
119
119
|
|
120
120
|
debug "enter barf('#{filepath}')", contents
|
121
121
|
contents = rtrim(contents) + "\n"
|
122
|
-
|
123
|
-
fs.writeFileSync(filepath, contents, {encoding: 'utf8'})
|
124
|
-
catch err
|
125
|
-
log "barf(): write failed: #{err.message}"
|
122
|
+
fs.writeFileSync(filepath, contents, {encoding: 'utf8'})
|
126
123
|
debug "return from barf()"
|
127
124
|
return
|
128
125
|
|
package/src/fs_utils.js
CHANGED
@@ -138,17 +138,11 @@ export var slurp = function(filepath) {
|
|
138
138
|
// ---------------------------------------------------------------------------
|
139
139
|
// barf - write a string to a file
|
140
140
|
export var barf = function(filepath, contents) {
|
141
|
-
var err;
|
142
141
|
debug(`enter barf('${filepath}')`, contents);
|
143
142
|
contents = rtrim(contents) + "\n";
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
});
|
148
|
-
} catch (error1) {
|
149
|
-
err = error1;
|
150
|
-
log(`barf(): write failed: ${err.message}`);
|
151
|
-
}
|
143
|
+
fs.writeFileSync(filepath, contents, {
|
144
|
+
encoding: 'utf8'
|
145
|
+
});
|
152
146
|
debug("return from barf()");
|
153
147
|
};
|
154
148
|
|