This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// JavaScript Code Snippet | |
// Convert integer to Rupiah & vice versa | |
// https://gist.github.com/845309 | |
// | |
// Copyright 2011-2012, Faisalman | |
// Licensed under The MIT License | |
// http://www.opensource.org/licenses/mit-license | |
/** | |
* Convert a number to a string of its equivalent in rupiah |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Composer; | |
use Symfony\Component\Finder\Finder; | |
use Illuminate\Filesystem\Filesystem; | |
use Symfony\Component\Console\Input\InputArgument; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Convert a string to a URL slug | |
* @param {string} str - The string to be slugified. | |
* @returns {string} The slugified string. | |
*/ | |
function toSlug(str) { | |
str = str.replace(/^\s+|\s+$/g, ""); // trim | |
str = str.toLowerCase(); | |
// remove accents, swap ñ for n, etc |