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

etc2tc

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

etc2tc - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

4

dist/etc2tc.js

@@ -29,2 +29,6 @@ 'use strict';

_.each(srcJson, function(c) {
if (c.domain.charAt(0) === '.') {
c.domain = c.domain.slice(1);
}
var dst = {

@@ -31,0 +35,0 @@ 'domain': c.domain,

2

dist/etc2tc.min.js

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

"use strict";function createObj(e,t){return void 0===e[t]&&(e[t]={}),e[t]}function pushValue(e,t,a){void 0!==e[t]&&(a[t]=e[t])}function etc2tc(e,t){if(!e||!t)return null;var a=JSON.parse(Fs.readFileSync(e,"utf8")),n={};return _.each(a,function(e){var t={domain:e.domain,path:e.path,key:e.name,creation:Moment(),lastAccessed:Moment()};pushValue(e,"value",t),pushValue(e,"maxAge",t),pushValue(e,"secure",t),pushValue(e,"httpOnly",t),pushValue(e,"extensions",t),pushValue(e,"creationIndex",t),pushValue(e,"hostOnly",t),pushValue(e,"pathIsDefault",t),void 0!==e.expirationDate&&(t.expires=Moment(parseInt(1e3*e.expirationDate))),createObj(createObj(createObj(n,e.domain),e.path),e.name),n[e.domain][e.path][e.name]=t}),Fs.writeFileSync(t,JSON.stringify(n),"utf8"),t}const Fs=require("fs"),_=require("lodash"),Moment=require("moment");module.exports=etc2tc;
"use strict";function createObj(e,t){return void 0===e[t]&&(e[t]={}),e[t]}function pushValue(e,t,a){void 0!==e[t]&&(a[t]=e[t])}function etc2tc(e,t){if(!e||!t)return null;var a=JSON.parse(Fs.readFileSync(e,"utf8")),n={};return _.each(a,function(e){"."===e.domain.charAt(0)&&(e.domain=e.domain.slice(1));var t={domain:e.domain,path:e.path,key:e.name,creation:Moment(),lastAccessed:Moment()};pushValue(e,"value",t),pushValue(e,"maxAge",t),pushValue(e,"secure",t),pushValue(e,"httpOnly",t),pushValue(e,"extensions",t),pushValue(e,"creationIndex",t),pushValue(e,"hostOnly",t),pushValue(e,"pathIsDefault",t),void 0!==e.expirationDate&&(t.expires=Moment(parseInt(1e3*e.expirationDate))),createObj(createObj(createObj(n,e.domain),e.path),e.name),n[e.domain][e.path][e.name]=t}),Fs.writeFileSync(t,JSON.stringify(n),"utf8"),t}const Fs=require("fs"),_=require("lodash"),Moment=require("moment");module.exports=etc2tc;

@@ -5,3 +5,3 @@ {

"description": "Convert EditThisCookie json format to ToughCookie json file",
"version": "0.0.3",
"version": "0.0.4",
"main": "dist/etc2tc.js",

@@ -8,0 +8,0 @@ "files": [

@@ -29,2 +29,6 @@ 'use strict';

_.each(srcJson, function(c) {
if (c.domain.charAt(0) === '.') {
c.domain = c.domain.slice(1);
}
var dst = {

@@ -31,0 +35,0 @@ 'domain': c.domain,

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