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

rtl-css-js

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rtl-css-js - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

6

dist/index.js

@@ -174,3 +174,7 @@ 'use strict';

function getValueDoppelganger(key, originalValue) {
/* eslint complexity:[2, 7] */ // let's try to keep the complexity down... If we have to do this much more, let's break this up
/* eslint complexity:[2, 8] */ // let's try to keep the complexity down... If we have to do this much more, let's break this up
if (originalValue === null || typeof originalValue === 'undefined') {
return originalValue;
}
if (isObject(originalValue)) {

@@ -177,0 +181,0 @@ return convert(originalValue); // recurssion 🌀

@@ -245,3 +245,7 @@ (function webpackUniversalModuleDefinition(root, factory) {

function getValueDoppelganger(key, originalValue) {
/* eslint complexity:[2, 7] */ // let's try to keep the complexity down... If we have to do this much more, let's break this up
/* eslint complexity:[2, 8] */ // let's try to keep the complexity down... If we have to do this much more, let's break this up
if (originalValue === null || typeof originalValue === 'undefined') {
return originalValue;
}
if (isObject(originalValue)) {

@@ -248,0 +252,0 @@ return convert(originalValue); // recurssion 🌀

2

dist/index.umd.min.js

@@ -1,2 +0,2 @@

!function(r,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.rtlCSSJS=t():r.rtlCSSJS=t()}(this,function(){return function(r){function t(n){if(e[n])return e[n].exports;var o=e[n]={exports:{},id:n,loaded:!1};return r[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var e={};return t.m=r,t.c=e,t.p="",t(0)}([function(r,t,e){"use strict";var n=e(1);r.exports=n.default;for(var o in n)n.hasOwnProperty(o)&&(r.exports[o]=n[o])},function(r,t){"use strict";function e(r){return Object.keys(r).reduce(function(t,e){var o=r[e];s(o)&&(o=o.trim());var i=n(e,o),u=i.key,a=i.value;return t[u]=a,t},{})}function n(r,t){var e=/\/\*\s?@noflip\s?\*\//.test(t),n=e?r:o(r),u=e?t:i(n,t);return{key:n,value:u}}function o(r){return h[r]||r}function i(r,t){if(l(t))return e(t);var n=d(t),o=n?t:t.replace(/ !important.*?$/,""),i=!n&&o.length!==t.length,u=m[r],a=void 0;return a=u?u(o):y[o]||o,i?a+" !important":a}function u(r){return r.replace(/ +/g," ").split(" ").map(function(r){return r.trim()}).filter(Boolean).reduce(function(r,t){var e=r.list,n=r.state,o=(t.match(/\(/g)||[]).length,i=(t.match(/\)/g)||[]).length;return n.parensDepth>0?e[e.length-1]=e[e.length-1]+" "+t:e.push(t),n.parensDepth+=o-i,{list:e,state:n}},{list:[],state:{parensDepth:0}}).list}function a(r){var t=u(r);if(t.length<=3||t.length>4)return r;var e=b(t,4),n=e[0],o=e[1],i=e[2],a=e[3];return[n,a,i,o].join(" ")}function f(r){var t=r.indexOf(".");if(t===-1)r=100-parseFloat(r)+"%";else{var e=r.length-t-2;r=100-parseFloat(r),r=r.toFixed(e)+"%"}return r}function c(r){return r.reduce(function(r,t){var e=b(t,2),n=e[0],o=e[1];return r[n]=o,r[o]=n,r},{})}function d(r){return"number"==typeof r}function l(r){return r&&"object"===("undefined"==typeof r?"undefined":g(r))}function s(r){return"string"==typeof r}function p(r,t){return r.indexOf(t)!==-1}Object.defineProperty(t,"__esModule",{value:!0});var g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},b=function(){function r(r,t){var e=[],n=!0,o=!1,i=void 0;try{for(var u,a=r[Symbol.iterator]();!(n=(u=a.next()).done)&&(e.push(u.value),!t||e.length!==t);n=!0);}catch(r){o=!0,i=r}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return e}return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return r(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=c([["paddingLeft","paddingRight"],["marginLeft","marginRight"],["left","right"],["borderLeft","borderRight"],["borderLeftColor","borderRightColor"],["borderLeftStyle","borderRightStyle"],["borderTopLeftRadius","borderTopRightRadius"],["borderBottomLeftRadius","borderBottomRightRadius"]]),y=c([["ltr","rtl"],["left","right"],["w-resize","e-resize"],["sw-resize","se-resize"],["nw-resize","ne-resize"]]),m={padding:function(r){return d(r)?r:a(r)},textShadow:function(r){return r.replace(/(-*)([.|\d]+)/,function(r,t,e){if("0"===e)return r;var n=""===t?"-":"";return""+n+e})},borderColor:function(r){return a(r)},borderRadius:function(r){if(d(r))return r;if(p(r,"/")){var t=r.split("/"),e=b(t,2),n=e[0],o=e[1],i=m.borderRadius(n.trim()),a=m.borderRadius(o.trim());return i+" / "+a}var f=u(r);switch(f.length){case 2:return f.reverse().join(" ");case 4:var c=b(f,4),l=c[0],s=c[1],g=c[2],h=c[3];return[s,l,h,g].join(" ");default:return r}},background:function(r){var t=r.replace(/(url\(.*?\))|(rgba?\(.*?\))|(hsl\(.*?\))|(#[a-fA-F0-9]+)|((^| )(\D)+( |$))/g,"").trim();return r=r.replace(t,m.backgroundPosition(t)),m.backgroundImage(r)},backgroundImage:function(r){return p(r,"url(")?r.replace(/(^|\W|_)((ltr)|(rtl)|(left)|(right))(\W|_|$)/g,function(r,t,e){return r.replace(e,y[e])}):r},backgroundPosition:function(r){return r.replace(/^((-|\d|\.)+%)/,function(r,t){return f(t)}).replace(/(left)|(right)/,function(r){return y[r]})},backgroundPositionX:function(r){return d(r)?r:m.backgroundPosition(r)}};m.margin=m.padding,m.borderWidth=m.padding,m.boxShadow=m.textShadow,m.webkitBoxShadow=m.textShadow,m.mozBoxShadow=m.textShadow,m.borderStyle=m.borderColor,t.default=e}])});
!function(r,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.rtlCSSJS=t():r.rtlCSSJS=t()}(this,function(){return function(r){function t(n){if(e[n])return e[n].exports;var o=e[n]={exports:{},id:n,loaded:!1};return r[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var e={};return t.m=r,t.c=e,t.p="",t(0)}([function(r,t,e){"use strict";var n=e(1);r.exports=n.default;for(var o in n)n.hasOwnProperty(o)&&(r.exports[o]=n[o])},function(r,t){"use strict";function e(r){return Object.keys(r).reduce(function(t,e){var o=r[e];s(o)&&(o=o.trim());var i=n(e,o),u=i.key,a=i.value;return t[u]=a,t},{})}function n(r,t){var e=/\/\*\s?@noflip\s?\*\//.test(t),n=e?r:o(r),u=e?t:i(n,t);return{key:n,value:u}}function o(r){return h[r]||r}function i(r,t){if(null===t||"undefined"==typeof t)return t;if(l(t))return e(t);var n=c(t),o=n?t:t.replace(/ !important.*?$/,""),i=!n&&o.length!==t.length,u=m[r],a=void 0;return a=u?u(o):y[o]||o,i?a+" !important":a}function u(r){return r.replace(/ +/g," ").split(" ").map(function(r){return r.trim()}).filter(Boolean).reduce(function(r,t){var e=r.list,n=r.state,o=(t.match(/\(/g)||[]).length,i=(t.match(/\)/g)||[]).length;return n.parensDepth>0?e[e.length-1]=e[e.length-1]+" "+t:e.push(t),n.parensDepth+=o-i,{list:e,state:n}},{list:[],state:{parensDepth:0}}).list}function a(r){var t=u(r);if(t.length<=3||t.length>4)return r;var e=b(t,4),n=e[0],o=e[1],i=e[2],a=e[3];return[n,a,i,o].join(" ")}function f(r){var t=r.indexOf(".");if(t===-1)r=100-parseFloat(r)+"%";else{var e=r.length-t-2;r=100-parseFloat(r),r=r.toFixed(e)+"%"}return r}function d(r){return r.reduce(function(r,t){var e=b(t,2),n=e[0],o=e[1];return r[n]=o,r[o]=n,r},{})}function c(r){return"number"==typeof r}function l(r){return r&&"object"===("undefined"==typeof r?"undefined":g(r))}function s(r){return"string"==typeof r}function p(r,t){return r.indexOf(t)!==-1}Object.defineProperty(t,"__esModule",{value:!0});var g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},b=function(){function r(r,t){var e=[],n=!0,o=!1,i=void 0;try{for(var u,a=r[Symbol.iterator]();!(n=(u=a.next()).done)&&(e.push(u.value),!t||e.length!==t);n=!0);}catch(r){o=!0,i=r}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return e}return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return r(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=d([["paddingLeft","paddingRight"],["marginLeft","marginRight"],["left","right"],["borderLeft","borderRight"],["borderLeftColor","borderRightColor"],["borderLeftStyle","borderRightStyle"],["borderTopLeftRadius","borderTopRightRadius"],["borderBottomLeftRadius","borderBottomRightRadius"]]),y=d([["ltr","rtl"],["left","right"],["w-resize","e-resize"],["sw-resize","se-resize"],["nw-resize","ne-resize"]]),m={padding:function(r){return c(r)?r:a(r)},textShadow:function(r){return r.replace(/(-*)([.|\d]+)/,function(r,t,e){if("0"===e)return r;var n=""===t?"-":"";return""+n+e})},borderColor:function(r){return a(r)},borderRadius:function(r){if(c(r))return r;if(p(r,"/")){var t=r.split("/"),e=b(t,2),n=e[0],o=e[1],i=m.borderRadius(n.trim()),a=m.borderRadius(o.trim());return i+" / "+a}var f=u(r);switch(f.length){case 2:return f.reverse().join(" ");case 4:var d=b(f,4),l=d[0],s=d[1],g=d[2],h=d[3];return[s,l,h,g].join(" ");default:return r}},background:function(r){var t=r.replace(/(url\(.*?\))|(rgba?\(.*?\))|(hsl\(.*?\))|(#[a-fA-F0-9]+)|((^| )(\D)+( |$))/g,"").trim();return r=r.replace(t,m.backgroundPosition(t)),m.backgroundImage(r)},backgroundImage:function(r){return p(r,"url(")?r.replace(/(^|\W|_)((ltr)|(rtl)|(left)|(right))(\W|_|$)/g,function(r,t,e){return r.replace(e,y[e])}):r},backgroundPosition:function(r){return r.replace(/^((-|\d|\.)+%)/,function(r,t){return f(t)}).replace(/(left)|(right)/,function(r){return y[r]})},backgroundPositionX:function(r){return c(r)?r:m.backgroundPosition(r)}};m.margin=m.padding,m.borderWidth=m.padding,m.boxShadow=m.textShadow,m.webkitBoxShadow=m.textShadow,m.mozBoxShadow=m.textShadow,m.borderStyle=m.borderColor,t.default=e}])});
//# sourceMappingURL=index.umd.min.js.map
{
"name": "rtl-css-js",
"version": "1.1.2",
"version": "1.1.3",
"description": "RTL conversion for CSS in JS objects",

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

@@ -12,3 +12,3 @@ # rtl-css-js

[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors)
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors)
[![PRs Welcome][prs-badge]][prs]

@@ -98,4 +98,4 @@ [![Donate][donate-badge]][donate]

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
| [<img src="https://avatars.githubusercontent.com/u/1500684?v=3" width="100px;"/><br /><sub>Kent C. Dodds</sub>](https://kentcdodds.com)<br />[💻](https://github.com/kentcdodds/rtl-css-js/commits?author=kentcdodds) [⚠️](https://github.com/kentcdodds/rtl-css-js/commits?author=kentcdodds) 🚇 | [<img src="https://avatars.githubusercontent.com/u/63876?v=3" width="100px;"/><br /><sub>Ahmed El Gabri</sub>](https://gabri.me)<br />[💻](https://github.com/kentcdodds/rtl-css-js/commits?author=ahmedelgabri) [📖](https://github.com/kentcdodds/rtl-css-js/commits?author=ahmedelgabri) [⚠️](https://github.com/kentcdodds/rtl-css-js/commits?author=ahmedelgabri) |
| :---: | :---: |
| [<img src="https://avatars.githubusercontent.com/u/1500684?v=3" width="100px;"/><br /><sub>Kent C. Dodds</sub>](https://kentcdodds.com)<br />[💻](https://github.com/kentcdodds/rtl-css-js/commits?author=kentcdodds) [⚠️](https://github.com/kentcdodds/rtl-css-js/commits?author=kentcdodds) 🚇 | [<img src="https://avatars.githubusercontent.com/u/63876?v=3" width="100px;"/><br /><sub>Ahmed El Gabri</sub>](https://gabri.me)<br />[💻](https://github.com/kentcdodds/rtl-css-js/commits?author=ahmedelgabri) [📖](https://github.com/kentcdodds/rtl-css-js/commits?author=ahmedelgabri) [⚠️](https://github.com/kentcdodds/rtl-css-js/commits?author=ahmedelgabri) | [<img src="https://avatars1.githubusercontent.com/u/1383861?v=4" width="100px;"/><br /><sub>Maja Wichrowska</sub>](https://github.com/majapw)<br /> |
| :---: | :---: | :---: |
<!-- ALL-CONTRIBUTORS-LIST:END -->

@@ -102,0 +102,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