smartfile/ts/test.ts
2015-11-24 18:52:24 +01:00

7 lines
399 B
TypeScript

/// <reference path="typings/tsd.d.ts" />
var smartfile = require("./index.js");
var beautylog = require("beautylog")("os");
beautylog.info(smartfile.readFileToString("./test/mytest.txt"));
console.log(smartfile.readFileToObject("./test/mytest.yaml"));
console.log(smartfile.readFileToObject("./test/mytest.json"));
//var thisIsAnError = smartfile.readFileToObject("./test/mytestDoesNotExist.json");