From dd3b8d588559734ad49b5285ce3355ed835d9125 Mon Sep 17 00:00:00 2001 From: Dan Heberden Date: Wed, 7 Jun 2017 10:40:15 -0500 Subject: [PATCH] Add npm package.json to install globally --- README.md | 10 +++++++++- package.json | 23 +++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 package.json diff --git a/README.md b/README.md index b2b940d..98ac09b 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,18 @@ jsoneval ======== -Simple utility for evaluating JavaScript against a JSON object +## Simple utility for evaluating JavaScript against a JSON object # Extracts the token definitions $ c2013.sh fdefs |jsoneval 'input.contentTemplateTokens' |jsonpp # Extracts a specific feature from feature definitions: $ c2013.sh fdefs |jsoneval 'function findFeature(id) {if (input.features) {return input.features[id];} var result; input.categories.forEach(function (category) {category.groups.forEach(function (group) {group.features.forEach(function (feature) {if (feature.id === id) {result = feature}})})}); return result}; findFeature("emailTemplatesEditor")' |jsonpp + +## Install + +```bash +git clone git@github.com:robbytx/jsoneval.git +cd jsoneval +npm install -g . +``` diff --git a/package.json b/package.json new file mode 100644 index 0000000..89aba3a --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "name": "jsoneval", + "version": "1.0.0", + "description": "Eval JSON input", + "main": "jsoneval.js", + "bin": { + "jsoneval": "./jsoneval.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/robbytx/jsoneval.git" + }, + "keywords": [ + "json", + "eval" + ], + "author": "Robby Morgan", + "license": "ISC", + "bugs": { + "url": "https://github.com/robbytx/jsoneval/issues" + }, + "homepage": "https://github.com/robbytx/jsoneval#readme" +}