UNPKG

adventure-engine

Version:

Simple text based adventure game library.

42 lines (40 loc) 1.58 kB
//========================================================= // utils.js: Primary module for adventure-engine utility functions //========================================================= // ______ _ ______ // (____ \ | | (_____ \ // ____) )| | _____) ) // | __ ( | | | ____/ // | |__) )| |_____ _| | // |______(_)_______|_)_| // // Description: // Library of miscellaneous utility and helper functions to be accessible app-wide // // Author: Brian Piltin // // Copyright: (C) 2019 Brian Piltin. // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice appear in all copies. // // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY // SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. // // Version: 0.1.0 // History: // 0.1.0: Initial version //========================================================= "use strict"; function repeatStr(str, num) { return Array.from(str.repeat(num)).join(""); } module.exports = { repeatStr }