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

rtlcss

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rtlcss - npm Package Compare versions

Comparing version 1.5.1 to 1.5.2

.gitattributes

2

bin/rtlcss.js

@@ -13,3 +13,3 @@ #!/usr/bin/env node

var input, output, directory, ext,
config, silent, currentErrorcode,
config, currentErrorcode,
arg, args = process.argv.slice(2),

@@ -16,0 +16,0 @@ shouldBreak = false

function main(options, rules, declarations, properties) {
if (!options)
options = {}
options = {};

@@ -34,3 +34,3 @@ function optionOrDefault(option, def) {

urlFlag = optionOrDefault('swapLtrRtlInUrl', true)
urlFlag = optionOrDefault('swapLtrRtlInUrl', true);
if (!config.stringMap.some(function (map) { return map.name == 'ltr-rtl'; }))

@@ -44,3 +44,3 @@ config.stringMap.push({

urlFlag = optionOrDefault('swapWestEastInUrl', true)
urlFlag = optionOrDefault('swapWestEastInUrl', true);
if (!config.stringMap.some(function (map) { return map.name == 'west-east'; }))

@@ -47,0 +47,0 @@ config.stringMap.push({

@@ -54,3 +54,3 @@ function main(configuration) {

else
decl.value = decl._value.raw.replace(this.replace, newValue);;
decl.value = decl._value.raw.replace(this.replace, newValue);
return true;

@@ -57,0 +57,0 @@ }

@@ -73,4 +73,2 @@ (function () {

}
return;
});

@@ -138,3 +136,3 @@

return new RTLCSS(options, rules, declarations, properties).process(css).css;
}
};

@@ -151,3 +149,3 @@ /**

return new RTLCSS(config.options, config.rules, config.declarations, config.properties);
}
};

@@ -154,0 +152,0 @@ module.exports = exports;

@@ -25,2 +25,5 @@ function main(configuration) {

return dest;
},
escapeRegExp = function(string){
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}

@@ -62,3 +65,3 @@ ;

swap: function (value, a, b, options) {
var expr = a + "|" + b;
var expr = escapeRegExp(a) + "|" + escapeRegExp(b);
options = options || DEFAULT_STRING_MAP_OPTIONS;

@@ -120,5 +123,5 @@ var greedy = options.hasOwnProperty('greedy') ? options.greedy : config.greedy;

}
}
};
return util;
}
module.exports.configure = main;
{
"author": "Mohammad Younes",
"name": "rtlcss",
"version": "1.5.1",
"version": "1.5.2",
"description": "Framework for transforming cascading style sheets (CSS) from left-to-right (LTR) to right-to-left (RTL)",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/MohammadYounes/rtlcss/issues?state=open",

@@ -22,3 +22,3 @@ <img title="RTL CSS" src="https://cloud.githubusercontent.com/assets/4712046/5889219/190f366a-a425-11e4-8ef5-8b5f60a9e903.png" align="right"/>

* [Semantic] a UI component library implemented using a set of specifications designed around natural language. ([RTL Version])
* [Semantic] a UI component library implemented using a set of specifications designed around natural language.
* [AlertifyJS] a javascript framework for developing pretty browser dialogs and notifications.

@@ -28,3 +28,2 @@ * [WebEssentials2013] Web Essentials extends Visual Studio with a lot of new features that web developers have been missing for many years (now uses RTLCSS for converting LTR CSS to RTL).

[Semantic]:http://www.semantic-ui.com/
[RTL Version]:http://semantic-ui.me/
[AlertifyJS]:http://www.alertifyjs.com/

@@ -254,3 +253,3 @@ [WebEssentials2013]:http://vswebessentials.com

|:--------------|:----------|:--------------|:--------------
| **`scope`** | `string` | `*` | Defines the scope in which this map is allowed, 'selector' for selector renaming, 'url' for url updates and '*' for both.
| **`scope`** | `string` | `*` | Defines the scope in which this map is allowed, `'selector'` for selector renaming, `'url'` for url updates and `'*'` for both.
| **`ignoreCase`** | `Boolean` | `true` | Indicates if the search is case-insensitive or not.

@@ -292,3 +291,3 @@ | **`greedy`** | `Boolean` | reverts to `options.greedy` | A false value forces selector renaming and url updates to respect word boundaries.

Visit [PostCSS] to find out more about [`rule`](https://github.com/ai/postcss#rule-node) node.
Visit [PostCSS] to find out more about [`rule`](https://github.com/postcss/postcss/blob/master/API.md#rule-node) node.

@@ -320,3 +319,3 @@ ##### **Example**

Visit [PostCSS] to find out more about [`decl`](https://github.com/ai/postcss#declaration-node) node.
Visit [PostCSS] to find out more about [`decl`](https://github.com/postcss/postcss/blob/master/API.md#declaration-node) node.

@@ -370,2 +369,5 @@ ##### **Example**

## Release Notes
* **v1.5.2** [28 Feb. 2015]
* Fix flipping string maps containing regular expressions special characters (Fixes [#24](https://github.com/MohammadYounes/rtlcss/issues/24)).
* **v1.5.1** [14 Feb. 2015]

@@ -458,2 +460,2 @@ * Fix flipping multiple shadows when a hex color was used. **Thanks @ocean90**

[PostCSS]: https://github.com/ai/postcss
[PostCSS]: https://github.com/postcss/postcss

@@ -353,8 +353,2 @@ var assert = require("assert");

{
'should': 'Should mirror property value: box-shadow',
'expected': 'div { box-shadow: -60px -16px rgba(0, 128, 128, 0.98), -10px 5px 5px #ff0, inset -5em 1em 0 white; }',
'input': 'div { box-shadow: 60px -16px rgba(0, 128, 128, 0.98), 10px 5px 5px #ff0, inset 5em 1em 0 white; }',
'reversable': true
},
{
'should': 'Should mirror property value: text-shadow',

@@ -364,3 +358,3 @@ 'expected': 'div { text-shadow: -60px -16px rgba(0, 128, 128, 0.98), -10px 5px 5px #ff0, inset -5em 1em 0 white; }',

'reversable': true
},
}
],

@@ -463,3 +457,3 @@ 'Transform Origin:': [

'reversable': true
},
}
],

@@ -538,3 +532,3 @@ 'Transforms:': [

'reversable': true
},
}
],

@@ -579,3 +573,3 @@ 'RTLCSS (Options):': [

'input': '/*rtl:ignore*/div { left:0; }',
'reversable': false,
'reversable': false
},

@@ -704,3 +698,3 @@ {

'input': '/*rtl:ignore*/ .right .rtl .east .bright .ultra .least { display:block; }',
'reversable': false,
'reversable': false
},

@@ -718,3 +712,3 @@ {

'input': '/*!rtl:ignore*/ .right .rtl .east .bright .ultra .least { display:block; }',
'reversable': false,
'reversable': false
},

@@ -788,3 +782,3 @@ {

'input': 'div { font-family: "Droid Sans", Tahoma/*rtl:prepend:"Droid Arabic Kufi", */; }',
'reversable': false,
'reversable': false
},

@@ -802,3 +796,3 @@ {

'input': 'div { font-family: "Droid Sans", Tahoma/*!rtl:prepend:"Droid Arabic Kufi", */; }',
'reversable': false,
'reversable': false
},

@@ -816,3 +810,3 @@ {

'input': 'div { font-family: "Droid Sans", Tahoma/*rtl:"Droid Arabic Kufi"*/; }',
'reversable': false,
'reversable': false
},

@@ -830,3 +824,3 @@ {

'input': 'div { font-family: "Droid Sans", Tahoma/*!rtl:"Droid Arabic Kufi"*/; }',
'reversable': false,
'reversable': false
},

@@ -844,3 +838,3 @@ {

'input': 'div { font-family: "Droid Sans", Tahoma/*rtl:append:, "Droid Arabic Kufi"*/; }',
'reversable': false,
'reversable': false
},

@@ -858,3 +852,3 @@ {

'input': 'div { font-family: "Droid Sans", Tahoma/*!rtl:append:, "Droid Arabic Kufi"*/; }',
'reversable': false,
'reversable': false
},

@@ -872,3 +866,3 @@ {

'input': 'div { font-family: "Droid Sans"/*rtl:insert:, "Droid Arabic Kufi"*/, Tahoma; }',
'reversable': false,
'reversable': false
},

@@ -886,3 +880,3 @@ {

'input': 'div { font-family: "Droid Sans"/*!rtl:insert:, "Droid Arabic Kufi"*/, Tahoma; }',
'reversable': false,
'reversable': false
},

@@ -900,3 +894,3 @@ {

'input': '/*rtl:ignore*/div { left:10px; text-align:right;}',
'reversable': false,
'reversable': false
},

@@ -914,3 +908,3 @@ {

'input': '/*!rtl:ignore*/div { left:10px; text-align:right;}',
'reversable': false,
'reversable': false
},

@@ -928,3 +922,3 @@ {

'input': 'div { left:10px/*rtl:ignore*/;text-align:right;}',
'reversable': false,
'reversable': false
},

@@ -942,3 +936,3 @@ {

'input': 'div { left:10px/*!rtl:ignore*/;text-align:right;}',
'reversable': false,
'reversable': false
},

@@ -950,3 +944,3 @@ {

'options': { 'preserveDirectives': true }
},
}
],

@@ -1026,2 +1020,9 @@ 'RTLCSS (String Map):': [

'options': { 'stringMap': [{ "name": "prev-next", "search": "prev", "replace": "next", options: { greedy: true } }] }
},
{
'should': 'Should escape strings used in stringMap',
'expected': '@import url("//a.b/c-rtl.css"); @import url("//a.b/css");',
'input': '@import url("//a.b/c.css"); @import url("//a.b/css");',
'reversable': true,
'options': { 'swapLtrRtlInUrl': false, 'stringMap': [ { name: 'import-rtl-stylesheet', search: [ '.css' ], replace: [ '-rtl.css' ], options: { scope: 'url'} }] }
}

@@ -1049,5 +1050,5 @@ ]

}
};
}
});
}
})();
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