1.5.0 • Published 3 years ago

replace-spaces-with-dashes v1.5.0

Weekly downloads
5
License
ISC
Repository
github
Last release
3 years ago

add-dashes

This is a npm package that will replace all whitespaces in a string with dashes (-).

How to use

  1. Initialize a node application and create js file:
$ npm init -y
$ touch index.js
  1. Install this npm package:
$ npm install replace-spaces-with-dashes
  1. Require this npm package at the top of index.js file as shown in the example below

Example

const replaceSpacesWithDashes = require('replace-spaces-with-dashes');

console.log(replaceSpacesWithDashes("This sentence shouldnt have spaces."));

------- ------ ------ or ------ ------ ------ ------

const {addDashes} = require('replace-spaces-with-dashes');

console.log(addDashes("This sentence shouldnt have spaces.))
$ node index.js
$ > This-sentence-shouldnt-have-spaces.

Notes for myself:

  • Make updates to npm package
$ npm version minor 
and then 
$ npm publish 
to update npm package
1.5.0

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago