1.0.0 • Published 7 years ago
idealjs v1.0.0
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
Date Functions
- Date.isLeapYear(2020)
- Date.isvalid('29/02/2020')
1.0.0
7 years ago