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

glslify

Package Overview
Dependencies
Maintainers
17
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glslify - npm Package Compare versions

Comparing version 6.1.1 to 6.2.1

5

index.js

@@ -9,8 +9,9 @@ var glslifyBundle = require('glslify-bundle')

module.exports = function(arg, opts) {
var isShaderString = /(void\s+main\s?\(.*\)|\n)/.test(arg)
if (Array.isArray(arg)) { // template string
return iface().tag.apply(null, arguments)
} else if (typeof arg === 'string' && !/\n/.test(arg) && opts && opts._flags) {
} else if (typeof arg === 'string' && !isShaderString && opts && opts._flags) {
// browserify transform
return require('./transform.js').apply(this, arguments)
} else if (typeof arg === 'string' && /\n/.test(arg)) { // source string
} else if (typeof arg === 'string' && isShaderString) { // source string
return iface().compile(arg, opts)

@@ -17,0 +18,0 @@ } else if (typeof arg === 'string') { // source file

2

package.json
{
"name": "glslify",
"version": "6.1.1",
"version": "6.2.1",
"description": "A node.js-style module system for GLSL!",

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

@@ -141,3 +141,3 @@ var falafel = require('falafel')

var d = createDeps(extend({ cwd: mdir }, mopts))
if (/\n/.test(marg)) { // source string
if (/(void\s+main\s?\(.*\)|\n)/.test(marg)) { // source string
d.inline(marg, mdir, ondeps)

@@ -144,0 +144,0 @@ } else gresolve(marg, { basedir: mdir }, function (err, res) {

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