Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tinytim

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tinytim - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0

lib/index.js

2

index.js

@@ -1,1 +0,1 @@

module.exports = require("./lib/tinytim")
module.exports = require("./lib/index")

@@ -53,3 +53,2 @@ /*!

if (lookup === undef){
console.error('undef',path[i])
throw new Error("tim: '" + path[i] + "' not found in " + tag);

@@ -56,0 +55,0 @@ }

@@ -5,3 +5,3 @@ {

"homepage": "http://github.com/baryon/node-tinytim",
"version": "0.0.2",
"version": "0.1.0",
"author": "LI Long <lilong@gmail.com>",

@@ -16,3 +16,3 @@ "contributors": [

},
"main": "./lib/tinytim",
"main": "./lib/index",
"keywords": ["template", "micro template", "tim"],

@@ -19,0 +19,0 @@ "scripts": { "test": "expresso test/*" },

@@ -21,5 +21,23 @@ #tinytim for node.js [![Build Status](https://secure.travis-ci.org/baryon/node-tinytim.png)](http://travis-ci.org/baryon/node-tinytim)

See [test/test.js](https://github.com/baryon/node-tinytim/blob/master/test/test.js) for example
See [test/test.js](https://github.com/baryon/node-tinytim/blob/master/test/test.js) as example
and support render and renderFile methods.
See [test/render.js](https://github.com/baryon/node-tinytim/blob/master/test/render.js) and [test/renderFile.js](https://github.com/baryon/node-tinytim/blob/master/test/renderFile.js) for details.
```javascript
var tinytim = require('tinytim');
var result = tinytim.render("Hello {{place}}", {place: "world"});
console.log(result); // Hello world
```
```javascript
var tinytim = require('tinytim');
var result1 = tinytim.renderFile("./hello.tim", {place: "world"});
console.log(result1); // Hello world
var result2 = tinytim.renderFile("./hello.tim", {place: "world"}, true); //use cache to render
console.log(result2); // Hello world
```
# Tim

@@ -153,2 +171,6 @@

### 0.1.0
* support render and renderFile methods.
### 0.0.2

@@ -155,0 +177,0 @@

@@ -63,3 +63,3 @@ var assert = require("assert");

exports["exception"] = function() {
var tinytim = require('../');
var tim = require('../').tim;
assert.throws(function() {

@@ -66,0 +66,0 @@ var result = tim("Hello {{config.foo.bar}}", {config: {moo: "blah"}});

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc