New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

idealjs

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

idealjs

Just a prototype JavaScript/ES6 framework

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Ideal.js — Just another prototype JavaScript framework

How it works?

<div id="gallery"></div>
var $gallery = $e('gallery')
$gallery.append('<img src="[...]" />')

var $images = $gallery.findAll('img')

Including Ideal.js framework to my all.js using Gulp

var ideal = require('idealjs')
var gulp = require('gulp')
var concat = require('gulp-concat')

gulp.src('src/*')
  .pipe(ideal({
    include: ['http']
  }))
  .pipe(concat('all.js'))
  .pipe(gulp.dest('js'))

Import a function in Node JS

var ideal = require('idealjs')

ideal.import('Date.isLeapYear')

console.log(Date.isLeapYear(2020))

Core Functions

  • $ -> $('menu a') / $findAll('menu a') / Element.findAll('')
  • $find([query]) -> same as document.querySelector()
  • $findAll([query]) -> same as document.querySelectorAll()
  • $all([className]) -> same as document.getElementsByTagName()

Element Functions

  • .append()
  • .prepend()
  • .after()
  • .before()

Ajax Functions

  • http()
  • http.post()
  • http.put()
  • http.delete()
  • http.file()

URL Functions

  • location.getQueryParam([paramName], [query])
  • location.getQueryParams([query])

Date Functions

  • Date.isLeapYear(2020)
  • Date.isvalid('29/02/2020')

FAQs

Package last updated on 24 Feb 2017

Related posts