jso2jade

0.0.2 • Public • Published

jso2jade

prepare some js object and render as jade template to html

Install

npm install jso2jade [--save]

Usage

 
var jso2jade = require('jso2jade');
var jade = require('jade');
 
var arr = [{
  'div.content': [{
    'h3': 'Hello, ' + user.name
    },
    'p Congratulations for you!',
    'p You win more than life on Earth',
    { 
      'div.conditions': {
        'h5.attention': 'Attention',
        'p': 'New conditions',
        'div' :
        [
          'hr',
          'br'
        ]
      }
    }
    ]
  },
  'div.contacts Send me email'];
 
 
var html = jade.render(jso2jade(arr));
 
console.log(html);
 
 

Readme

Keywords

none

Package Sidebar

Install

npm i jso2jade

Weekly Downloads

1

Version

0.0.2

License

ISC

Last publish

Collaborators

  • antirek