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

cartocc

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cartocc - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

bin/cartocc

7

package.json
{
"name": "cartocc",
"desciption": "Carto Config Customizer is a very simple tool for customizing layers values of a `.mml` config file ",
"version": "0.0.1",
"version": "0.0.2",
"url": "https://github.com/yohanboniface/cartocc",

@@ -21,4 +21,5 @@ "engines": {

"bin": {
"cartocc": "./lib/cartocc.js"
}
"cartocc": "./bin/cartocc"
},
"main": "./lib/cartocc/index"
}

@@ -7,2 +7,8 @@ # CartoCC — Carto Config Customizer

### Install
```
npm intall cartocc
```
### Usage

@@ -77,3 +83,3 @@

"if": {
"class": "shp"
"Datasource.type": "shape"
},

@@ -96,3 +102,3 @@ "then": {

```
node cartocc.js <path-to-project.mml> <path-to-custom-rules.json> > local_project.mml
cartocc <path-to-project.mml> <path-to-custom-rules.json> > local_project.mml
```

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

require('../lib/cartocc.js');
var cartocc = require('../lib/cartocc');
var assert = require('assert');

@@ -10,3 +10,3 @@

function _testOutput (mml, rules, output) {
var c = new C(JSON.stringify(mml), JSON.stringify(rules));
var c = new cartocc.CartoCC(JSON.stringify(mml), JSON.stringify(rules));
c.process();

@@ -16,2 +16,18 @@ assert.deepEqual(c.mml, output, "match");

function test_init_args_can_be_JSON () {
var mml = {"Layer": {}};
var rules = {};
var c = new cartocc.CartoCC(mml, rules);
assert(typeof c.mml === "object");
assert(typeof c.rules === "object");
}
function test_init_args_can_be_string () {
var mml = '{"Layer": {}}';
var rules = '{}';
var c = new cartocc.CartoCC(mml, rules);
assert(typeof c.mml === "object");
assert(typeof c.rules === "object");
}
function test_simple_output() {

@@ -266,2 +282,4 @@ var mml = {"Layer":[

var to_run = [
test_init_args_can_be_JSON,
test_init_args_can_be_string,
test_simple_output,

@@ -268,0 +286,0 @@ test_fieldpath_in_if_block_should_work,

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