@jdeighan/coffee-utils 4.0.14 → 4.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jdeighan/coffee-utils",
3
3
  "type": "module",
4
- "version": "4.0.14",
4
+ "version": "4.0.15",
5
5
  "description": "A set of utility functions for CoffeeScript",
6
6
  "main": "coffee_utils.js",
7
7
  "exports": {
@@ -119,10 +119,7 @@ export barf = (filepath, contents) ->
119
119
 
120
120
  debug "enter barf('#{filepath}')", contents
121
121
  contents = rtrim(contents) + "\n"
122
- try
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
- try {
145
- fs.writeFileSync(filepath, contents, {
146
- encoding: 'utf8'
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