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

block

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

block - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

27

index.js

@@ -19,5 +19,30 @@ var regex = /(\{\{\s*\w+\s*\}\})/

Block.prototype.local = function (name, value) {
var names = this.names
var j
for (var i in names)
if (names[i] === name && names.hasOwnProperty(i))
j = i
if (j == null)
throw new Error('Name ' + name + ' is not defined.')
delete names[j]
this.blocks[j] = value || ''
return this
}
Block.prototype.locals = function (object) {
for (var name in object)
if (object.hasOwnProperty(name))
this.local(name, object[name])
return this
}
Block.prototype.render = function (locals) {
locals = locals || {}
var blocks = this.blocks

@@ -24,0 +49,0 @@ var names = this.names

2

package.json
{
"name": "block",
"description": "Block-based HTML templating",
"version": "0.0.2",
"version": "0.0.3",
"devDependencies": {

@@ -6,0 +6,0 @@ "mocha": "*",

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