From 6c6c51320b83b364b9806a26136f10270d8035ed Mon Sep 17 00:00:00 2001 From: Dominick Gendill Date: Mon, 22 May 2017 09:25:09 -0600 Subject: [PATCH] code cleanup. Docs. --- README.md | 14 +++++++------- package.json | 4 ++-- src/Data/YAML/Foreign/Decode.js | 20 +++++++------------- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 4392dd2..532c686 100644 --- a/README.md +++ b/README.md @@ -2,22 +2,22 @@ ## Install -This repo depends on js-yaml. It is not compatible with YAML 1.1. +First install [js-yaml](https://github.com/connec/yaml-js). Note, purescript-yaml is not compatible with YAML 1.1. + ``` npm install js-yaml@^3.4.6 ``` -If you're using bower, add this repo as a project dependency, e.g. + +Then add purescript-yaml-next as a project dependency. ``` -bower install --save git://github.com/dgendill/purescript-yaml#v0.1.0 +bower install --save purescript-yaml-next ``` -Or you can manually add the github repo as a project dependency, e.g. +Alternatively, you can add the repo itself as a project dependency, e.g. ``` -"dependencies": { - "purescript-yaml" : git://github.com/dgendill/purescript-yaml#tagOrBranch -} +bower install --save git://github.com/archaeron/purescript-yaml#tagOrBranch ``` ## YAML to Data Type Usage diff --git a/package.json b/package.json index 08e3466..1002b60 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "purescript-yaml", - "license": "Apache 2.0", + "name": "purescript-yaml-next", + "license": "SEE LICENSE FILE", "repository": "", "private": true, "contributors": [ ], diff --git a/src/Data/YAML/Foreign/Decode.js b/src/Data/YAML/Foreign/Decode.js index 508a030..0e62920 100644 --- a/src/Data/YAML/Foreign/Decode.js +++ b/src/Data/YAML/Foreign/Decode.js @@ -1,17 +1,11 @@ "use strict"; -// module Data.YAML.Foreign.Decode - var yaml = require('js-yaml'); -exports.parseYAMLImpl = function(left, right, str) - { - try - { - return right(yaml.safeLoad(str)); - } - catch (e) - { - return left(e.toString()); - } - }; +exports.parseYAMLImpl = function(left, right, str) { + try { + return right(yaml.safeLoad(str)); + } catch (e) { + return left(e.toString()); + } +};