Code Monkey home page Code Monkey logo

hyphenex's Introduction

hyphenex

Separate words from a string and convert them into a single string using hyphens. work in progress.

You can hyphenate and dehyphanate strings dynamically also!

const hyphenex = require('hyphenex');

console.log(hyphenex.hyphenate('This is hyphenating stuff'));
console.log(hyphenex.deHyphenate('hyphenating-this-this'));
console.log(hyphenex.hyphenateDynamically("This is dehyphanted string which is phenomenal", "-"))
console.log(hyphenex.deHyphenateDynamically("hyphenated+this+this+that", "+"));

the results must be:

This-is-hyphenating-stuff
hyphenating this this
This-is-dehyphanted-string-which-is-phenomenal
hyphenated this this that

pretty cool ha!

Documentation


Welcome to the documentation of hyphenex! After having a glance at this, you will be able to hyphenate strings like a pro!

Method 1 - hyphenate

This method will hyphenate your string using normal hyphens.

Example:

hyphenex.hyphenate("This is a long string");

// The results must be 'This-is-a-long-string'

Method 2 - hyphenateDynamically

Using this method you can hyphenate rather separate your strings with a custom separator!

Example:

hyphenex.hyphenateDynamically('This string will be hyphenated dynamically');

// The results must be 'This_string_will_be_hyphenated_dynamically'

Method 3 - deHyphenate

This will allow you to dehyphenate any string with ease.

Example:

hyphenex.deHyphenate("dehyphenate-this-string");

// The result must be 'dehyphenate this string'

Method 4 - deHyphenateDynamically

Remove custom separators from a string.

Example:

hyphenex.deHyphenateDynamically("This+string+will+be+dehyphenated+dynamically", "+")

// Expect result to be 'This string will be dehyphenated dynamically'

If you face any issues or have any comeplaints about this, kindly report an issue or to resolve and existing issue, please make a pull request or else I will not hyphenate your name :) Just kidding!

hyphenex's People

Contributors

zaidajani avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.