0.1.2 • Published 2 years ago

@itemku/fe-core v0.1.2

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

Design and implement React apps. itemku-fe-core is a collection of various function & commonly used React component

Installation

itemku fe-core is available as an npm package.

Usage

Here is a quick example to get you started, it's all you need:

import React from 'react';
import ReactDOM from 'react-dom';
import { COMMON_HELPER } from '@itemku/fe-core';

function App() {
  return (
    <div>
      <p>{
        // convert string to title case
        COMMON_HELPER.titleCase('this string should be converted to title case') // expected output: This String Should Be Converted To Title Case
      }</p>
      <p>{
        // convert string to slug
        COMMON_HELPER.convertToSlug('this string should be converted to slug') // expected output: this-string-should-be-converted-to-slug
      }</p>
      <p>{
        // get 2nd day of the week in bahasa indonesia
        COMMON_HELPER.numberToDayOfWeek(2) // expected output: Selasa
      }</p>
      <p>{
        // combine array of string to a sentence in bahasa indonesia
        COMMON_HELPER.arrayToSentence(['jeruk', 'anggur', 'apel', 'kentang', 'pepaya']) //expected output: jeruk, anggur, apel, kentang dan pepaya
      }</p>
    </div>
  );
}

ReactDOM.render(<App />, document.querySelector('#app'));

Yes, it's really all you need to get started as you can see in this live and interactive demo:

Documentation

Check out our documentation website.

Changelog

If you have recently updated, please read the changelog for details of what has changed.

License

This project is licensed under the terms of the MIT license.

0.1.2

2 years ago

0.1.1

2 years ago