A collection of functions and methods to make it easier for you to create applications.

Overview

def-helper

A collection of functions and methods to make it easier for you to create applications.

NPM JavaScript Style Guide

Install

npm install --save def-helper

Usage

import {
  slugify,
  validateEmail,
  validatePhone,
  getNumberInFirstString,
  validateURL,
  imageUrlToBase64,
  getNumber,
  compareObject
} from 'def-helper'

const slug = slugify('Hello World')
// result will be "hello-world"

const email = validateEmail('[email protected]')
// result will be true

const phone = validatePhone('08123456789')
// result will be true

const number = getNumberInFirstString('17676-Hello 123 World')
// result will be 17676

const url = validateURL('https://google.com')
// result will be true

// imageUrlToBase64([url image -> convert to base64],[url image if url image target is error], (result base64) => {
//
// })
const base64 = imageUrlToBase64(
  'https://google.com/logo.png',
  'https://img.kpopmap.com/2018/07/mbc-rebel.jpg',
  (base64) => {
    // result will be base64 string
  }
)

const number = getNumber('17676-Hello 123 World')
// result will be 17676123

const compare = compareObject({ a: 1, b: 2 }, { a: 1, b: 2 })
// result will be true
const compare = compareObject({ a: 1, b: 2 }, { a: 1, b: 3 })
// result will be false

License

MIT © defuj

Contributor

Thanks to all amazing contributors

You might also like...

A collection of Aurelia 2 example applications showcasing how to build Aurelia 2 applications and other tasks.

Aurelia 2 Examples A monorepository of a treasure trove of Aurelia 2 example applications you can use as a guide to help you build your own applicatio

Dec 29, 2022

A framework dedicated to making it easier for you to build enterprise-grade PWA applications.

 A framework dedicated to making it easier for you to build enterprise-grade PWA applications.

A framework dedicated to making it easier for you to build enterprise-grade PWA applications.

Oct 6, 2022

In this project, I implement a Simple To Do List with the CRUD (create, read, update, delete) methods. I followed the JavaScript, CSS, HTML, DRY, KISS and YAGNI Best practices.

In this project, I implement a Simple To Do List with the CRUD (create, read, update, delete) methods. I followed the JavaScript, CSS, HTML, DRY, KISS and YAGNI Best practices.

To Do list: add & remove In this project, I implement a Simple To Do List with the CRUD (create, read, update, delete) methods. All the elements of th

Nov 20, 2022

In this project, I implement a Simple To Do List with the CRUD (create, read, update, delete) methods. All the elements of the user interface are fully functional.

In this project, I implement a Simple To Do List with the CRUD (create, read, update, delete) methods. All the elements of the user interface are fully functional.

To Do list: add & remove In this project, I implement a Simple To Do List with the CRUD (create, read, update, delete) methods. All the elements of th

Jan 3, 2023

A curated collection of all country flags in SVG — plus the CSS for easier integration

flag-icons A curated collection of all country flags in SVG — plus the CSS for easier integration. See the demo. Install You can either download the w

Jan 4, 2023

Github Actions and Workflows that make maintaining Magento2 projects and modules easier.

Magento 2 GitHub Actions Opinionated Github Actions and Workflows to make building, testing, and maintaining Magento 2 Modules easier. README if you a

Dec 21, 2022

Make drag-and-drop easier using DropPoint. Drag content without having to open side-by-side windows

Make drag-and-drop easier using DropPoint. Drag content without having to open side-by-side windows

Make drag-and-drop easier using DropPoint! DropPoint helps you drag content without having to open side-by-side windows Works on Windows, Linux and Ma

Dec 29, 2022

The Easel Javascript library provides a full, hierarchical display list, a core interaction model, and helper classes to make working with the HTML5 Canvas element much easier.

EaselJS EaselJS is a library for building high-performance interactive 2D content in HTML5. It provides a feature-rich display list to allow you to ma

Dec 29, 2022

A library for boolean aliases to help you make your code more confusing and make your coworkers hate you.

yup-nope A library for boolean aliases to help you make your code more confusing and make your coworkers hate you. Installation Using npm: npm install

Dec 10, 2022
Comments
  • Function 1

    Function 1

    Create function slugify to convert string as slug support, Create function validateEmail to validate string is Email, Create function validatePhone to validate string is Phone

    hacktoberfest-accepted

    hacktoberfest-accepted 
    opened by defuj 0
Releases(1.0.2)
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Functions and objects that make it easier to add fields to Portable Text editors for accessibility meta information, like language changes or abbreviations.

Porta11y Porta11y is a collection of accessibility-focused annotations, decorators and validators for Sanity’s Portable Text editor. Portable Text is

Hidde de Vries 21 Aug 25, 2022
Boiler is a utility library that makes every day tasks in JavaScript easier by providing over 115 methods

Boiler is a utility library that makes every day tasks in JavaScript easier by providing over 115 methods that work on arrays, collections, functions, numbers, objects, and strings. It's the JavaScript equivalent of a Swiss Army Knife.

Wil 42 Nov 1, 2022
The invoker based on event model provides an elegant way to call your methods in another container via promisify functions

The invoker based on event model provides an elegant way to call your methods in another container via promisify functions. (like child-processes, iframe, web worker etc).

尹挚 7 Dec 29, 2022
A set of useful helper methods for writing functions to handle Cloudflare Pub/Sub messages (https://developers.cloudflare.com/pub-sub/)

pubsub A set of useful helper methods for writing functions to handle Cloudflare Pub/Sub messages. This includes: A isValidBrokerRequest helper for au

Cloudflare 18 Dec 4, 2022
This branch is created to make receive and send data to api using async and await methods

Microverse-Leader-Board Project from module 2 week 4 This branch is created to make receive and send data to api using async and await methods Screens

Akshitha Reddy 6 Apr 22, 2022
Functions Recipes is a library of examples to help you getting started with Salesforce Functions and get used to their main features.

Functions Recipes Introduction Salesforce Functions lets you use the Salesforce Platform for building event-driven, elastically scalable apps and expe

Trailhead Apps 172 Dec 29, 2022
A CLI tool to create a NodeJS project with TypeScript CTSP is a CLI tool to make easier to start a new NodeJS project and configure Typescript on it.

CTSP- Create TS Project A CLI tool to create a NodeJS project with TypeScript CTSP is a CLI tool to make easier to start a new NodeJS project and conf

Jean Rodríguez 7 Sep 13, 2022