JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 47
  • Score
    100M100P100Q73344F
  • License MIT

Write the content in a file after removing the trailing spaces.

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 PayPal Version Downloads Get help on Codementor

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.

📜 License

MIT © Ionică Bizău