Giter VIP home page Giter VIP logo

helm.js's Introduction

helm.js

(jQuery and friends) DOM Factory Wrapper

Overview

$div === $('<div>'); //in the jQuery version OR $div === document.createElement('div'); //in the vanilla Javascript version

This applies to any html tag we can use. ( or at least listed here ) You also can use it with another $ libraries like Zepto or Ender.

Installation

Just paste or include the helm.js code before writing your own code and after any dependency if needed (as in the jQuery version)

Look inside the example files of each version to find the specific use.

More

For a deeper explanation ( with code review included ) go read my blog post about helmjs.

Found any typo or grammar misuse? please report it.

And this is a Helm-et:

                                              ..,:::;;;;:::,,.                                          
                                        .,;riSS5SSiisssssiiiiiSisr:,.                                   
                                     ,;i55ir;:,..         .    ..,,.,r,.                                
                                  ,rS5s;,.                          :@Xrs:.                             
                               .;S5s:.                               @r ;iS;.                           
                             ,r5i;.                     .......      @s   :iS;.                         
                           .r5r,                       ,,........    #S ..  :Si,                        
                          ;5r,                          .,........   Si .... .r5;.                      
                         si:                              .........  ;i ...... :5r.                     
                       .ir.                                .......     ........ ,Si.                    
                      .i;                                   .......    r........ .ii.                   
                      s;                                     .......  ,,......... .is.                  
                     ;;                       ,S#@@A.         .......,,........... .5;                  
                    ,;                     :sAhsi2@@@s   ...........,,........   .. :S.                 
                    ;. .             .r2HXGB#s ,.  r@@  ...................        . r;                 
                   .:....         ,,:iXssXH3G, ,   ,@@  .................           .,s.                
                   ,    .,,.,:s;;sisr..,  iASXr:..;@@;  ................            ..r,                
                  .2   .;25,r5hr;rr;;:;, .H@9X&amp;AM@@@i  .................             .;:                
                  :S   .;Sr.;sS::;;;;::sX@@@@@99@@@X  ..................              ;:                
                  ;r   .;S:.;ss,:;;;::,r5s2H@M2H#@G  ..................               :;                
                  s;   .;i,,;sr,;;;;::,rirrrrrA#@&amp;  ..,...............                :;                
                  i,   ,;i.,;ir,;;;:::,sisssSA#@X  .,.................   ,:,          ;:                
                  5.   ,rr.:;i;,;;;;:,:iis5&amp;@@@;   ,................   ,:;rA@r        ;,                
                 .5   .:sr.:ri::;;;::,,i2A@@#r   .,................  .;:;;:,G@r      .;.                
                 :i   .:i:.;ri,:;;;::,5M@@#;    .,.................  ;:;: s.,@@      .;                 
                 ;r   .;S,.;rs,:;;:::2@@A:    .,,.................. ,;:;::; i@A   .. ;:                 
                 s:   .;i,,;rr.:;;;rs#H,    .,,....................  ;r;;;:A@M  .....;.                 
                 S.   ,;s.,r2;;S23GAX.    .,,.......................  :2AM@A:   ... :,                  
                 S    :3S:X#@h&amp;H9S;     .,,,........................           .....,;X;                
                :@. ;s9@9sSr:.        ..,,............................        .,:;Sh#@s,                
                ;#isr;.            ..,,,...............................   .,:r2B@@@@Bs                  
               :.          .....,,,,,..................................,;ih#@@@#hr.                     
               :.  ............................................   .:;2H@@@@M2:                          
               :,     .. ..                 ............     .,;ih#@@@@As,                              
               ::..                          ...         .;s9M@@@@#2;                                   
               .;..                                 .:i9#@@@@@&amp;s,                                       
                ,:..                           .:sG@@@@@@B5;                                            
                 :,..                      ,r3@@@@@@#3r,                                                
                 .:..                  ,iB@@@@@@Gs:                                                     
                  .:..             ,sM@@@@@BS;                                                          
                   ,,..        .rM@@@@#3r,                                                              
                    ,,     .rA@@@@BS;,      ..,,,,,,,,.....                                             
                      .:iM@@@@Ai:,...,:::;;;;;;;;;;::::,,,,.....                                        
                     .2@@@3r:,,,,::;;;;;;;;;;;;;::::::,,,,,,,....                                       
                           ..,,,:::::::::::::::::,,,,,,,,,......                                        
                               ........,,,.,,,,..........       

helm.js's People

Contributors

wixo avatar geowa4 avatar

Watchers

 avatar James Cloos avatar

helm.js's Issues

Help with English Improvement.

Since English is not my natural language, there may be lots of grammar mistakes in the documentation.
I am always trying to improve my writing skills, but please do not hesitate to point out and fix these mistakes.

thanks.

Using __defineGetter__

I've just found that one way to define global properties ( instead of functions ) would be to use window.defineGetter

so we could finish with something like:

$div instead of $div() to represent one div element. ( 2 strokes less )

I may be updating the repo soon, but first I will ask how safe this technique is.

Duplicated Code

I also saw that there are two files that were nearly identical. There really only needs to be one file. I've forked the repository and will work on this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.