1.0.12 • Published 2 years ago

react-extension-methods v1.0.12

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

react-extension-methods

This package contains few string utility methods

NPM Documents

This utility contains few extension methods are are useful for everyday coding.

How to Install

npm install react-extension-methods

How To Use

  1. Use in the App.js

    import ExtensionMethods from "react-extension-methods";
    
    function App() {
    	let city = "i live in new york"
    	return (
    		<div>
    			<ExtensionMethods>
    					<h1>{city.toCapitalCase()}</h1>
    					<h1>{city.slug()}</h1>
    			</ExtensionMethods>
    		</div>
    	)
    }
  2. You can also import and use this in index.js

    import React from "react";
    import ReactDOM from "react-dom";
    import "./index.css";
    import App from "./App";
    import reportWebVitals from "./reportWebVitals";
    import ExtensionMethods from "react-extension-methods";
    
    ReactDOM.render(
    	<React.StrictMode>
    		<ExtensionMethods>
    			<App />
    		</ExtensionMethods>
    	</React.StrictMode>,
    	document.getElementById("root")
    );
    
    // If you want to start measuring performance in your app, pass a function
    // to log results (for example: reportWebVitals(console.log))
    // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
    reportWebVitals();

Current List of Available Methods

Method NameData Type That It Works onSample InputSample Output
toCapitalCaseStringi live in new yorkI Live In New York
slugStringi live in new yorki-live-in-new-york
1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago