New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jsonresume-theme-paper-plus-plus

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonresume-theme-paper-plus-plus - npm Package Compare versions

Comparing version 0.3.3 to 0.4.1

resources/countryCodes.js

52

index.js
var fs = require("fs");
var Handlebars = require("handlebars");
var countries = require('country-data').countries;
var countries = require('./resources/countryCodes.js');

@@ -13,18 +13,4 @@ function render(resume) {

// Get a country from the country code
resume.basics.location.country = countries[resume.basics.location.countryCode].name;
resume.basics.location.country = countries[resume.basics.location.countryCode];
// http://stackoverflow.com/a/12002281/1263876
Handlebars.registerHelper("foreach",function(arr,options) {
if(options.inverse && !arr.length)
return options.inverse(this);
return arr.map(function(item,index) {
item.$index = index;
item.$first = index === 0;
item.$notfirst = index !== 0;
item.$last = index === arr.length-1;
return options.fn(item);
}).join('');
});
// Remove http and www from url

@@ -41,25 +27,11 @@ Handlebars.registerHelper('no-http', function(options) {

// http://stackoverflow.com/a/16315366
Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) {
switch (operator) {
case '==':
return (v1 == v2) ? options.fn(this) : options.inverse(this);
case '===':
return (v1 === v2) ? options.fn(this) : options.inverse(this);
case '<':
return (v1 < v2) ? options.fn(this) : options.inverse(this);
case '<=':
return (v1 <= v2) ? options.fn(this) : options.inverse(this);
case '>':
return (v1 > v2) ? options.fn(this) : options.inverse(this);
case '>=':
return (v1 >= v2) ? options.fn(this) : options.inverse(this);
case '&&':
return (v1 && v2) ? options.fn(this) : options.inverse(this);
case '||':
return (v1 || v2) ? options.fn(this) : options.inverse(this);
default:
return options.inverse(this);
}
});
// http://stackoverflow.com/a/31632215/838789
Handlebars.registerHelper({
and: function (v1, v2) {
return v1 && v2;
},
or: function (v1, v2) {
return v1 || v2;
}
});

@@ -71,3 +43,3 @@ // http://stackoverflow.com/a/18831911

//Uncomment this for printing as .pdf
// Send all necessary resources to the handlebars template and compile it
return Handlebars.compile(template)({

@@ -74,0 +46,0 @@ resume: resume,

{
"name": "jsonresume-theme-paper-plus-plus",
"version": "0.3.3",
"version": "0.4.1",
"description": "A theme for JSON Resume",

@@ -12,4 +12,3 @@ "author": "Johan Lindell",

"dependencies": {
"country-codes": "0.0.3",
"handlebars": "^2.0.0-alpha.4"
"handlebars": ">=4.0.0"
},

@@ -16,0 +15,0 @@ "homepage": "https://github.com/lindell/jsonresume-theme-paper",

@@ -10,9 +10,9 @@ # JSON Resume Paper++ theme

### Desktop
![Desktop](http://i.imgur.com/YIkqf3w.png)
![Desktop](http://i.imgur.com/k9qpO6U.png)
### Phone
![Desktop](http://i.imgur.com/YiVCi40.png)
![Desktop](http://i.imgur.com/BBoDaI7.png)
### Print
![Desktop](http://i.imgur.com/2cnlNPO.png)
![Desktop](http://i.imgur.com/0JgaUWO.png)

@@ -19,0 +19,0 @@ ## License

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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