Anysols Utils - common utility functions used across anysols projects

Usage no npm install needed!

<script type="module">
  import anysolsUtils from '';


Anysols Utils

Common utility functions used across anysols projects

Coverage Status CodeFactor

File Utils

//  Read a json file
const utils = require('anysols-utils');
let obj = utils.readJsonFileSync('test/resources/sample.json');
console.log(JSON.stringify(obj)); // prints content of sample.json

//  Write to a json file
utils.writeJsonFileSync('test/resources/_temp_/write.json', {title: 'Write'});
let obj = utils.readJsonFileSync('test/resources/_temp_/write.json');
console.log(JSON.stringify(obj)); // prints {title: 'Write'}

String Utils

const utils = require('anysols-utils');
const temp = utils.underscoreToCamelCase('hello_world');
console.log(temp); // prints 'Hello World'

Code of Conduct

Contributor Covenant


Apache License 2.0