Package Exports
- write-file-trim
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (write-file-trim) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
write-file-trim

Write the content in a file after removing the trailing spaces.
☁️ Installation
$ npm i --save write-file-trim
📋 Example
const writeFileTrim = require("write-file-trim");
writeFileTrim("test.txt", "foo \nbar \t \t", (err, data) => {
console.log(err || "Saved.");
// File content (without any trailing spaces/tabs):
// foo
// bar
});
📝 Documentation
writeFileTrim(filePath, content, cb)
Write the content in a file after removing the trailing spaces.
Params
- String
filePath
: The file path. - String
content
: The content to write. - Function
cb
: The callback function.
😋 How to contribute
Have an idea? Found a bug? See how to contribute.