Socket
Socket
Sign inDemoInstall

stylus

Package Overview
Dependencies
Maintainers
0
Versions
182
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylus - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

6

._History.md

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

Mac OS X  2��ATTR��"�"com.macromates.caret{
column = 46;
line = 7;
Mac OS X  2��ATTR���!�!com.macromates.caret{
column = 0;
line = 6;
}

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

Mac OS X  2��ATTR��"�"com.macromates.caret{
Mac OS X  2��ATTR��"�"com.macromates.caret{
column = 21;
line = 2;
}

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

Mac OS X  2��ATTR��#�#com.macromates.caret{
column = 53;
line = 76;
}
Mac OS X  2��ATTR�� � com.macromates.caretx���R������<[k0?'3/«��
0.3.0 / 2011-02-04
==================
* Added more assignment operators. Closes #77
+=, -=, *=, /=, and %=
0.2.1 / 2011-02-02

@@ -3,0 +9,0 @@ ==================

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

Mac OS X  2��ATTR$��#�#com.macromates.caret{
Mac OS X  2��ATTR��#�#com.macromates.caret{
column = 24;
line = 25;
}

@@ -350,6 +350,11 @@

* | '+'
* | '+='
* | '-'
* | '-='
* | '*'
* | '*='
* | '/'
* | '/='
* | '%'
* | '%='
* | '**'

@@ -380,3 +385,3 @@ * | '!'

var captures;
if (captures = /^([.]{2,3}|&&|\|\||[!<>=?]=|\*\*|[-,=?:!~+<>*\/%&\[\]])( *)/.exec(this.str)) {
if (captures = /^([.]{2,3}|&&|\|\||[!<>=?]=|\*\*|[-+*\/%]=?|[,=?:!~<>&\[\]])( *)/.exec(this.str)) {
var op = captures[1];

@@ -383,0 +388,0 @@ this.skip(captures);

@@ -499,3 +499,8 @@

case '?=':
return this.assignment;
case '-=':
case '+=':
case '*=':
case '/=':
case '%=':
return this.assignment
// Operation

@@ -679,16 +684,33 @@ case '-':

get assignment() {
var name = this.id.name
, op = this.accept('=') || this.accept('?=');
var node
, name = this.id.name;
this.state.push('assignment');
var expr = this.list;
if (expr.isEmpty) this.error('invalid right-hand side operand in assignment, got {peek}')
var node = new nodes.Ident(name, expr);
this.state.pop();
if (op =
this.accept('=')
|| this.accept('?=')
|| this.accept('+=')
|| this.accept('-=')
|| this.accept('*=')
|| this.accept('/=')
|| this.accept('%=')) {
this.state.push('assignment');
var expr = this.list;
if (expr.isEmpty) this.error('invalid right-hand side operand in assignment, got {peek}')
node = new nodes.Ident(name, expr);
this.state.pop();
// Conditional assignment
if ('?=' == op) {
var defined = new nodes.BinOp('is defined', node)
, lookup = new nodes.Ident(name);
node = new nodes.Ternary(defined, lookup, node);
switch (op.type) {
case '?=':
var defined = new nodes.BinOp('is defined', node)
, lookup = new nodes.Ident(name);
node = new nodes.Ternary(defined, lookup, node);
break;
case '+=':
case '-=':
case '*=':
case '/=':
case '%=':
node.val = new nodes.BinOp(op.type[0], new nodes.Ident(name), expr);
break;
}
}

@@ -695,0 +717,0 @@

@@ -26,3 +26,3 @@

exports.version = '0.2.1';
exports.version = '0.3.0';

@@ -29,0 +29,0 @@ /**

@@ -77,3 +77,4 @@

|| node instanceof nodes.Expression
|| node instanceof nodes.Function) continue;
|| node instanceof nodes.Function
|| node instanceof nodes.Unit) continue;
var ret = this.visit(node);

@@ -99,3 +100,4 @@ if (ret) this.buf += ret + '\n';

|| node instanceof nodes.Function
|| node instanceof nodes.Group) continue;
|| node instanceof nodes.Group
|| node instanceof nodes.Unit) continue;
arr.push(this.visit(node));

@@ -102,0 +104,0 @@ }

{ "name": "stylus"
, "description": "Robust, expressive language which compiles to CSS"
, "version": "0.2.1"
, "version": "0.3.0"
, "author": "TJ Holowaychuk <tj@vision-media.ca>"

@@ -5,0 +5,0 @@ , "keywords": ["css", "parser", "style", "stylesheets", "jade", "language"]

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