Socket
Socket
Sign inDemoInstall

ecstacy

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ecstacy - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

46

lib/transforms.js

@@ -5,2 +5,24 @@

var chrome = /\bchrome\b/i
var ios = /\bmobile safari\b/i
var safari = /\bsafari\b/i
var opera = /\bopera\b/i
var ff = /\bfirefox\b/i
var ie = /\bie\b/i
var android = /\bandroid\b/i
/*
function (agent) {
var family = agent.family
if (ie.test(family)) return agent.satisfies('< ')
if (ff.test(family)) return agent.satisfies('< ')
if (chrome.test(family)) return agent.satisfies('< ')
if (ios.test(family)) return agent.satisfies('< ')
if (safari.test(family)) return agent.satisfies('< ')
if (android.test(family)) return agent.satisfies('< ')
if (opera.test(family)) return agent.satisfies('< ')
return true
}
*/
module.exports = Transform

@@ -53,3 +75,3 @@

},
filter: ff('22')
filter: ffv('22')
})

@@ -65,4 +87,10 @@

filter: function (agent) {
if (/chrome/i.test(agent.family)) return agent.satisfies('< 29')
if (/firefox/i.test(agent.family)) return agent.satisfies('< 26')
var family = agent.family
// if (ie.test(family)) return agent.satisfies('< ')
if (ff.test(family)) return agent.satisfies('< 26')
if (chrome.test(family)) return agent.satisfies('< 29')
// if (ios.test(family)) return agent.satisfies('< ')
// if (safari.test(family)) return agent.satisfies('< ')
// if (android.test(family)) return agent.satisfies('< ')
// if (opera.test(family)) return agent.satisfies('< ')
return true

@@ -88,3 +116,3 @@ }

},
filter: ff('15')
filter: ffv('15')
})

@@ -98,3 +126,3 @@

},
filter: ff('15')
filter: ffv('15')
})

@@ -109,3 +137,3 @@

},
filter: ff('27')
filter: ffv('27')
})

@@ -119,3 +147,3 @@

},
filter: ff('30')
filter: ffv('30')
})

@@ -127,7 +155,7 @@

function ff(version) {
function ffv(version) {
return function (agent) {
if (/firefox/i.test(agent.family)) return agent.satisfies('< ' + version)
if (ff.test(agent.family)) return agent.satisfies('< ' + version)
return true
}
}

13

package.json
{
"name": "ecstacy",
"description": "",
"version": "0.0.0",
"description": "transpile JS based on user agents ",
"version": "0.0.1",
"author": {

@@ -18,14 +18,9 @@ "name": "Jonathan Ong",

"strip-comments": "0",
"mkdirp": "0",
"rimraf": "2",
"source-map": "0",
"convert-source-map": "0",
"useragent": "2",
"semver": "3",
"recast": "0",
"regenerator": "0",

@@ -55,3 +50,5 @@ "es6-class": "0",

"main": "lib",
"files": ["lib"]
"files": [
"lib"
]
}

@@ -9,6 +9,8 @@

The ideal JS development environment. Write your JS in the latest ES syntax,
then serve compiled JS specific to the browser. In other words,
if your code as generators, it compiles your JS to ES6 using [regenerator](https://github.com/facebook/regenerator),
otherwise it just serves it.
The ideal JS development environment that'll make writing JS actually fun.
Write your JS in the latest ES syntax,
then serve compiled JS specific to the browser.
If your code as generators,
it compiles your JS to ES6 using [regenerator](https://github.com/facebook/regenerator),
otherwise it just serves it as is.

@@ -21,2 +23,4 @@ The end goal of this project is to create a frontend flow where:

There's no build step to transpile your JS or a deploy step to create builds for every supported platform.
Features:

@@ -52,2 +56,3 @@

These cache `useragent -> transforms` lookups per instance.
Each cached object is pretty low memory since they are simply references to objects already in memory.

@@ -54,0 +59,0 @@ ### var ecstacy = new Ecstacy(js, [map])

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