New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

temple-loader

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

temple-loader - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

3

index.js

@@ -31,3 +31,4 @@ var loaderUtils = require("loader-utils");

}
return 'module.exports = {' + templates_code.join(',') + '};';
return 'var temple_utils = require("temple-wat");' +
'module.exports = { ' + templates_code.join(',') + '};';
};
{
"name": "temple-loader",
"version": "1.0.1",
"version": "1.0.2",
"description": "Temple loader for webpack",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -22,6 +22,19 @@ # temple-loader

### Your JS making use of the templates
```files_list.temple
<div>
<forall name="files" key="files">
<div>{{name}}
</forall>
<div>
```
```javascript
var template = require("./file.temple");
// => returns file.temple content as a template function
var temple_utils = require('temple-wat');
var template = require("./files_list.temple");
var pool = temple_utils.pool(template);
var data = {
files: [{name: 'foo'}]
};
var temple_data = pool.get('files_list'); // => returns file.temple content as a temple obj
document.body.appendChild(temple_data[0]);
temple_data.update(data);
```

@@ -28,0 +41,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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