Nurturing Palpable Magnificence

    saad-utils

    3.0.2 • Public • Published

    saad-utils


    a small library provides set of helper functions, might be needed for every project

    installation

    npm install saad-utils --save
    

    Version: 3.0.0

    Usage:

    require module

    var myUtil = require('saad-utils');
    

    use module

    // trim text
    console.log( myUtil.trimText('Hi There', 0, 2) ); // Hi
    
    console.log( myUtil.trimText('Hi There', 0, 2, '...') ); // Hi ...
    
    
    // convert string to camel case
    console.log( myUtil.toCamelCase( 'Ahmed saad' ) ); // ahmedSaad
    

    Methods:

    • toNumber( num )
    • uCFirst( str )
    • toCamelCase( str )
    • trimText( str, startIndex, length, tail )
    • getDayName( day_index, locale )
    • getFormattedDate( day, month, year, locale, withYear )
    • getBrowserInfo()
    • getSystemInfo()
    • cssSupport( property )
    • getPageOffsets()
    • hasVerticalScroll()
    • hasHorizontalScroll()
    • getScrollBarWidth()
    • getScrollBarHalfWidth
    • loadJsFile( filePath )
    • loadCssFile( filePath )
    • getUrlParameters()
    • getUrlParameter( key, defaultValue )
    • buildQueryString( obj )
    • updateBrowserQueryString( queryObj )

    Install

    npm i saad-utils

    DownloadsWeekly Downloads

    16

    Version

    3.0.2

    License

    none

    Last publish

    Collaborators

    • a7mad.sa3d