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

grunt-json5-to-json

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-json5-to-json - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

package.json
{
"name": "grunt-json5-to-json",
"description": "Convert json5 to json.",
"version": "0.1.1",
"version": "0.1.2",
"homepage": "https://github.com/leader22/grunt-json5-to-json",

@@ -6,0 +6,0 @@ "author": {

@@ -64,1 +64,3 @@ # grunt-json5-to-json

- 0.1.0: pre release.
- 0.1.1: npm publish.
- 0.1.2: Refactor some code.

@@ -25,2 +25,7 @@ /*

var JSON5 = require('json5');
var cnst = {
windows: 'win32',
file: 'file',
directory: 'directory'
};

@@ -50,3 +55,3 @@ grunt.registerMultiTask('json5_to_json', 'Convert json5 to json.', function() {

filePair.src.forEach(function(src) {
if (detectDestType(filePair.dest) === 'directory') {
if (detectDestType(filePair.dest) === cnst.directory) {
dest = (isExpandedPair) ? filePair.dest : unixifyPath(path.join(filePair.dest, src));

@@ -92,12 +97,14 @@ } else {

var detectDestType = function(dest) {
// Private functions.
function detectDestType(dest) {
if (grunt.util._.endsWith(dest, '/')) {
return 'directory';
return cnst.directory;
} else {
return 'file';
return cnst.file;
}
};
var unixifyPath = function(filepath) {
if (process.platform === 'win32') {
function unixifyPath(filepath) {
if (process.platform === cnst.win32) {
return filepath.replace(/\\/g, '/');

@@ -104,0 +111,0 @@ } else {

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