Giter VIP home page Giter VIP logo

solidcode's Introduction

SolidCode - sc.js

sc.js is a versatile utility library written in pure JavaScript, designed to simplify common tasks and enhance productivity. With a wide array of methods, sc.js is your go-to solution for handling various operations seamlessly.

Key Features

Paths and Initialization

  • assetsPath: Manage asset paths easily.
  • globalImgPath: Set and retrieve global image paths.
  • init: Initialize the library.

Data Type Checks

  • isString: Check if a value is a string.
  • isNumber: Check if a value is a number.
  • isObject: Check if a value is an object.
  • isTrue: Check if a value is true.
  • isFalse: Check if a value is false.
  • isInt: Check if a value is an integer.

DOM Manipulation

  • block: Block UI elements.
  • unblock: Unblock UI elements.
  • openModal: Open a modal dialog.

Data Operations

  • sendDataToController: Send data to a controller.
  • postData: Post data to a server.
  • getData: Retrieve data from a server.

String and Number Utilities

  • stringFormat: Format strings.
  • extractNumberFromString: Extract numbers from a string.
  • isAlphaNumeric: Check if a string is alphanumeric.
  • getFileNameFromPath: Get file name from a path.
  • getFileNameFromUrl: Get file name from a URL.
  • splitUrlBySlash: Split URL by slashes.

Validation and Formatting

  • isValid: Validate data.
  • isJsonString: Check if a string is a valid JSON string.
  • isHtmlString: Check if a string is a valid HTML string.
  • formatBytes: Format bytes to a readable format.

Date and Time

  • getNow: Get the current date and time.
  • getGmt: Get the current GMT time.
  • startTimer: Start a timer.
  • resetTimer: Reset a timer.
  • IdleTimeout: Set idle timeout.

UI Enhancements

  • addAsteriskForRequiredFields: Add an asterisk for required fields.
  • setButtonDisabledCountdown: Disable a button with a countdown.
  • activateSelectFocus: Activate focus on select elements.
  • activateTooltip: Activate tooltips.
  • activatePopover: Activate popovers.
  • bindExcelButton: Bind an Excel export button.

Miscellaneous

  • getRandomNum: Generate a random number.
  • getRandomColor: Generate a random color.
  • contains: Check if an array contains a value.
  • goUp: Scroll to the top of the page.

DataTables Integration

  • getDatatableLanguage: Get DataTables language settings.
  • getDatatableButtonArray: Get DataTables button array.
  • bindDatatable: Bind a DataTable.

Localization and Conversion

  • localizer: Localize data.
  • jsonToList: Convert JSON to a list.
  • jsonToTable: Convert JSON to a table.

Getting Started

To get started with sc.js, include the library in your project and start using the methods as needed. Refer to the documentation for detailed usage and examples.

Contributing

Contributions are welcome! Feel free to submit issues and pull requests to improve the library.

License

This project is licensed under the MIT License.

solidcode's People

Contributors

scbodeon avatar sabricihan 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.