top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is Sifter.js?

+1 vote
634 views

What is Sifter.js?

Sifter is a client and server-side library (via UMD) for textually searching arrays and hashes of objects by property – or multiple properties. It's designed specifically for autocomplete. The process is three-step: score, filter, sort.

Sifter comes with a command line interface that's useful for testing on datasets. It accepts JSON and CSV data, either from a file or from stdin (unix pipes). If using CSV data, the first line of the file must be a header row.

Usind below function you can make search

search(query, options)

Example Code for Searching Data using Sifter.js

var sifter = new Sifter([
    {title: 'Annapurna I', location: 'Nepal', continent: 'Asia'},
    {title: 'Annapurna II', location: 'Nepal', continent: 'Asia'},
    {title: 'Annapurna III', location: 'Nepal', continent: 'Asia'},
    {title: 'Eiger', location: 'Switzerland', continent: 'Europe'},
    {title: 'Everest', location: 'Nepal', continent: 'Asia'},
    {title: 'Gannett', location: 'Wyoming', continent: 'North America'},
    {title: 'Denali', location: 'Alaska', continent: 'North America'}
]);

var result = sifter.search('anna', {
    fields: ['title', 'location', 'continent'],
    sort: [{field: 'title', direction: 'asc'}],
    limit: 3
});

 

Video Tutorial

posted Feb 1, 2016 by Parampreet Kaur

  Promote This Article
Facebook Share Button Twitter Share Button LinkedIn Share Button


Related Articles

What is fullPage.Js?

fullPage.js is use library to create fullscreen scrolling websites (also known as single page websites or one page sites). It allows the creation of fullscreen scrolling websites, as well as adding some landscape sliders inside the sections of the site

fullPage.js is fully functional on all modern browsers, as well as some old ones such as Internet Explorer 8, 9, Opera 12, etc. It works with browsers with CSS3 support and with the ones which don't have it, making it ideal for old browsers compatibility. It also provides touch support for mobile phones, tablets and touch screen computer

Bower Command

bower install fullpage.js

 

NPM Command

npm install fullpage.js

 

Example

<div id="fullpage">

<div class="section">Some section</div>

<div class="section">Some section</div>

<div class="section">Some section</div>

<div class="section">Some section</div>

</div>

 

Script for activate

$(document).ready(function() {

$('#fullpage').fullpage();

});

 Video for Fullpage.js

https://www.youtube.com/watch?v=tTh-pz1Pii0​

READ MORE

What is Svelte.Js?

In Svelte, an application is composed from one or more components. A component is a reusable self-contained block of code that encapsulates markup, styles and behaviours that belong together.

Like Ractive and Vue, Svelte promotes the concept of single-file components: a component is just an .html file. 

Here's a simple example:

<h1>Hello {{name}}!</h1>

NPM Command

npm install -g svelte-cli

Some of the Svelte Tools

  • svelte-cli – Command line interface for compiling components
  • rollup-plugin-svelte – Rollup plugin
  • sveltify - Browserify transform
  • gulp-svelte - gulp plugin
  • metalsmith-svelte - Metalsmith plugin
  • system-svelte – System.js loader
  • svelte-loader – Webpack loader
  • meteor-svelte – Meteor build plugin

Video for Svelte.Js

https://www.youtube.com/watch?v=wtL3SP7bu5Q

READ MORE

What is scrollReveal.Js?

scrollReveal.js is a library to easily reveal elements as they enter the viewport. It’s very small in size, as its weight is roughly 3Kb if minified and gzipped. It has no dependencies, so you don’t need to add other libraries to use it like jQuery. In addition to the nice effects it supports, what I really like about this library is that you can use natural language to define the animation you want to run.

Bower Install

bower install scrollReveal.js

Specifically, scrollReveal.js searches for elements on the page with an attribute named data-sr.

<body>
   <div data-sr>This is the first div</div>
   <div data-sr>This is the second div</div>
   <div data-sr>This is yet another div</div>
</body>


By default scrollReveal.js lets your elements enter the viewport from the bottom of the page but you can change this effect on a per-element basis by using the enter keyword followed by the direction. So, you can write enter left. You can also specify how many pixels a given element has to be moved using the move keyword followed by the number of pixels, for example move 15px.

<div data-sr="please, can you enter left and then move 15px ?">This is the first div</div>

Video for ScrollReveal.Js 

https://www.youtube.com/watch?v=gwxWmsw2rAo

READ MORE

What is Heatmap.js?

Heatmap.js is a lightweight, easy to use JavaScript library to help you visualize your three dimensional data! 

Use it to add new value to your project, build a business based on it, study and visualize user behaviour

Whether you want to have an aggregated overview of your users behaviour, or look at thousands of events distributed on a map...

Features:

  • faster, with a new rendering module
  • stronger, to handle even more datapoints (40k+)
  • easier to use so you can get up to speed quickly
  • easier to extend for custom functionality


"h337" is the name of the global object registered by heatmap.js. You can use it to create heatmap instances

Video for Heatmap Evolution
https://www.youtube.com/watch?v=lbS_C95Cyw8

READ MORE
...