Reid  Rohan

Reid Rohan

1643110320

A Lightweight Vanilla ES6 Cookies and Local Storage JavaScript Library

🍪 CrumbsJS 🍪

A lightweight, intuitive, vanilla ES6 fueled JS cookie and local storage library.

Quick Start

Adding a single cookie or a local storage key

// Cookie
crumbs.set("Operating System","Win10"); // => true

// Local storage key
crumbs.ls.set("Operating System","Win10") // => true

Adding a single cookie that will expire in 7 days for a specific path

// The "expires" parameter is capable of taking a number, and will default as days.
crumbs.set("Name","Roy Azaeev",{type:"day",value:7},"/crumbsjs"); // => true

Adding a few cookies at once

const my_cookies = [];
my_cookies.push({name:"Operating System",value:"Win10"});
my_cookies.push({name:"Age",value:"29"});

crumbs.set(my_cookies); // => [{name:"Operating System",value:"Win10"},{name:"Age",value:"29"}]

Adding a few local storage keys at once

const my_localstorage_array = [];
my_localstorage_array.push({"key":"Operating System","value":"Win10"});
my_localstorage_array.push({"key":"Age","value":"29"});

crumbs.ls.set(my_localstorage_array); // => [{key:"Operating System",value:"Win10"},{key:"Age",value:"29"}]

Get a cookie or a local storage key value

// Cookie
let age = crumbs.get("Age"); // => "29"

// Local storage
let age = crumbs.ls.get("Age"); // => "29"

Get all cookies or all local storage keys in a key-value pair object

// Cookies
let all_cookies = crumbs.getAll(); // => [{name:"Operating System",value:"Win10"},{name:"Age",value:"29"}]

// Local storage
let all_localstorage = crumbs.ls.getAll(); // => [{key:"Operating System",value:"Win10"},{key:"Age",value:"29"}]

Delete a single cookie or local storage key

// Cookie
crumbs.delete("Operating system"); // => true

// Local storage
crumbs.ls.delete("Operating system"); // => true

Delete a few cookies at once

const my_cookies = [];
my_cookies.push("Operating system");
my_cookies.push("Age");

crumbs.delete(my_cookies); // => true

Features

  • NO DEPENDENCIES - Yup, no jQuery.
  • ES5 compatible.
  • Tested, using Jest.
  • Add one or multiple cookies or local storage keys at once
  • Update cookies or local storage keys using the set method
  • Delete one or multiple cookies at once
  • Delete local storage keys easily
  • Display a cookie or a local storage key value
  • Display all cookies or local storage keys in a key-value easy to read object
  • Fallback to cookies when localstorage is not available (Safari private browsing)

Methods

set(name, value, [expires], [domain])

Sets one or more cookies or local storage keys.

name can be set as an array of key-pair objects in the format of {name:"Age",value:29} for mass cookie set


get(name)

Gets a cookie or a local storage value by its name.


getAll()

Gets all the cookies or local storage keys in a key-pair object array.


delete(name)

Deletes a cookie or local storage key by its name.

name can be set as an array of strings for mass delete of cookies


deleteAll()

Deletes all cookies or local storage keys.

Getting Started

Install On your local PC

Using a bundler ?

You can import CrumbsJS like that

import crumbs from 'crumbsjs';

Download Sources

use npm

npm install crumbsjs

use git

git clone https://github.com/nirtz89/crumbsjs.git

What's next

  • IndexDB support
  • Session storage support

Author: Nirtz89
Source Code: https://github.com/nirtz89/crumbsjs 
License: MIT License

#javascript #es6 

What is GEEK

Buddha Community

A Lightweight Vanilla ES6 Cookies and Local Storage JavaScript Library
Reid  Rohan

Reid Rohan

1643110320

A Lightweight Vanilla ES6 Cookies and Local Storage JavaScript Library

🍪 CrumbsJS 🍪

A lightweight, intuitive, vanilla ES6 fueled JS cookie and local storage library.

Quick Start

Adding a single cookie or a local storage key

// Cookie
crumbs.set("Operating System","Win10"); // => true

// Local storage key
crumbs.ls.set("Operating System","Win10") // => true

Adding a single cookie that will expire in 7 days for a specific path

// The "expires" parameter is capable of taking a number, and will default as days.
crumbs.set("Name","Roy Azaeev",{type:"day",value:7},"/crumbsjs"); // => true

Adding a few cookies at once

const my_cookies = [];
my_cookies.push({name:"Operating System",value:"Win10"});
my_cookies.push({name:"Age",value:"29"});

crumbs.set(my_cookies); // => [{name:"Operating System",value:"Win10"},{name:"Age",value:"29"}]

Adding a few local storage keys at once

const my_localstorage_array = [];
my_localstorage_array.push({"key":"Operating System","value":"Win10"});
my_localstorage_array.push({"key":"Age","value":"29"});

crumbs.ls.set(my_localstorage_array); // => [{key:"Operating System",value:"Win10"},{key:"Age",value:"29"}]

Get a cookie or a local storage key value

// Cookie
let age = crumbs.get("Age"); // => "29"

// Local storage
let age = crumbs.ls.get("Age"); // => "29"

Get all cookies or all local storage keys in a key-value pair object

// Cookies
let all_cookies = crumbs.getAll(); // => [{name:"Operating System",value:"Win10"},{name:"Age",value:"29"}]

// Local storage
let all_localstorage = crumbs.ls.getAll(); // => [{key:"Operating System",value:"Win10"},{key:"Age",value:"29"}]

Delete a single cookie or local storage key

// Cookie
crumbs.delete("Operating system"); // => true

// Local storage
crumbs.ls.delete("Operating system"); // => true

Delete a few cookies at once

const my_cookies = [];
my_cookies.push("Operating system");
my_cookies.push("Age");

crumbs.delete(my_cookies); // => true

Features

  • NO DEPENDENCIES - Yup, no jQuery.
  • ES5 compatible.
  • Tested, using Jest.
  • Add one or multiple cookies or local storage keys at once
  • Update cookies or local storage keys using the set method
  • Delete one or multiple cookies at once
  • Delete local storage keys easily
  • Display a cookie or a local storage key value
  • Display all cookies or local storage keys in a key-value easy to read object
  • Fallback to cookies when localstorage is not available (Safari private browsing)

Methods

set(name, value, [expires], [domain])

Sets one or more cookies or local storage keys.

name can be set as an array of key-pair objects in the format of {name:"Age",value:29} for mass cookie set


get(name)

Gets a cookie or a local storage value by its name.


getAll()

Gets all the cookies or local storage keys in a key-pair object array.


delete(name)

Deletes a cookie or local storage key by its name.

name can be set as an array of strings for mass delete of cookies


deleteAll()

Deletes all cookies or local storage keys.

Getting Started

Install On your local PC

Using a bundler ?

You can import CrumbsJS like that

import crumbs from 'crumbsjs';

Download Sources

use npm

npm install crumbsjs

use git

git clone https://github.com/nirtz89/crumbsjs.git

What's next

  • IndexDB support
  • Session storage support

Author: Nirtz89
Source Code: https://github.com/nirtz89/crumbsjs 
License: MIT License

#javascript #es6 

Rahul Jangid

1622207074

What is JavaScript - Stackfindover - Blog

Who invented JavaScript, how it works, as we have given information about Programming language in our previous article ( What is PHP ), but today we will talk about what is JavaScript, why JavaScript is used The Answers to all such questions and much other information about JavaScript, you are going to get here today. Hope this information will work for you.

Who invented JavaScript?

JavaScript language was invented by Brendan Eich in 1995. JavaScript is inspired by Java Programming Language. The first name of JavaScript was Mocha which was named by Marc Andreessen, Marc Andreessen is the founder of Netscape and in the same year Mocha was renamed LiveScript, and later in December 1995, it was renamed JavaScript which is still in trend.

What is JavaScript?

JavaScript is a client-side scripting language used with HTML (Hypertext Markup Language). JavaScript is an Interpreted / Oriented language called JS in programming language JavaScript code can be run on any normal web browser. To run the code of JavaScript, we have to enable JavaScript of Web Browser. But some web browsers already have JavaScript enabled.

Today almost all websites are using it as web technology, mind is that there is maximum scope in JavaScript in the coming time, so if you want to become a programmer, then you can be very beneficial to learn JavaScript.

JavaScript Hello World Program

In JavaScript, ‘document.write‘ is used to represent a string on a browser.

<script type="text/javascript">
	document.write("Hello World!");
</script>

How to comment JavaScript code?

  • For single line comment in JavaScript we have to use // (double slashes)
  • For multiple line comments we have to use / * – – * /
<script type="text/javascript">

//single line comment

/* document.write("Hello"); */

</script>

Advantages and Disadvantages of JavaScript

#javascript #javascript code #javascript hello world #what is javascript #who invented javascript

Hire Dedicated JavaScript Developers -Hire JavaScript Developers

It is said that a digital resource a business has must be interactive in nature, so the website or the business app should be interactive. How do you make the app interactive? With the use of JavaScript.

Does your business need an interactive website or app?

Hire Dedicated JavaScript Developer from WebClues Infotech as the developer we offer is highly skilled and expert in what they do. Our developers are collaborative in nature and work with complete transparency with the customers.

The technology used to develop the overall app by the developers from WebClues Infotech is at par with the latest available technology.

Get your business app with JavaScript

For more inquiry click here https://bit.ly/31eZyDZ

Book Free Interview: https://bit.ly/3dDShFg

#hire dedicated javascript developers #hire javascript developers #top javascript developers for hire #hire javascript developer #hire a freelancer for javascript developer #hire the best javascript developers

Localization - Laravel Localization Example

In this example i will show you localization - laravel localization example.

Laravel’s localization features provide a convenient way to retrieve text in different languages, allowing you to easily support multiple languages within your application. So here i will show you how to create localization or laravel dynamic language.

Read More : Localization - Laravel Localization Example

https://websolutionstuff.com/post/localization-laravel-localization-example


Read Also : How To Integrate Paypal Payment Gateway In Laravel

https://websolutionstuff.com/post/how-to-integrate-paypal-payment-gateway-in-laravel

#localization - laravel localization example #localization tutorial #localization #laravel multi languag #laravel documentation #laravel localization

Mya  Lynch

Mya Lynch

1598065860

Top 5 JavaScript Libraries to Create an Organizational Chart

In this article, we’ll review five JavaScript libraries that allow you to create online organizational charts. To make this info useful for different categories of readers, we’ve gathered together libraries with different functionality and pricing policy. To help you decide whether one of them is worthy of your attention or not, we’ll take a look at the main features and check if the documentation is user-friendly.

DHTMLX Diagram Library

The DHTMLX diagram library allows creating easily configurable graphs for visualization of hierarchical data. Besides org charts, you can create almost any type of hierarchical diagrams. You can choose from organizational charts, flowcharts, block and network diagrams, decision trees, mind maps, UML Class diagrams, mixed diagrams, and any other types of diagrams. This variety of diagrams can be generated using a built-in set of shapes or with the help of custom shapes.

You can set up any diagram shape you need with text, icons, images, and any other custom content via templates in a few lines of code. All these parameters can be later changed from the UI via the sidebar options in the editor.

Top 9 JavaScript Charting Libraries

The edit mode gives an opportunity to make changes on-the-fly without messing with the source code. An interactive interface of the editor supports drag-and-drop and permits you to change each item of your diagram. You can drag diagram items with your mouse and set the size and position property of an item via the editor. The multiselection feature can help to speed up your work in the editor, as it enables you to manipulate several shapes.

The library has an exporting feature. You can export your diagram to a PDF, PNG, or JSON format. Zooming and scrolling options will be useful in case you work with diagrams containing a big number of items. There is also a search feature that helps you to quickly find the necessary shape and make your work with complex diagrams even more convenient by expanding and collapsing shapes when necessary. To show the structure of an organization compactly, you can use the vertical mode.

The documentation page will appeal both to beginners and experienced developers. A well-written beginner’s guide contains the source code with explanations. A bunch of guides will help with further configuration, so you’ll be able to create a diagram that better suits your needs. At the moment, there are three types of licenses available. The commercial license for the team of five or fewer developers costs $599, the enterprise license goes for $1299 per company, and the ultimate license has a price tag of $2899.

#javascript #web dev #data visualization #libraries #web app development #front end development #javascript libraries #org chart creator