mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-12-23 05:37:23 +00:00
Package string utils.
This commit is contained in:
parent
8f6c639851
commit
ad653e70dd
@ -13,12 +13,9 @@ module.exports = function () {
|
||||
, path = require( 'path' )
|
||||
, extend = require( './utils/extend' )
|
||||
, _ = require('underscore')
|
||||
, unused = require('./utils/string')
|
||||
, FLUENT = require('fluentlib');
|
||||
|
||||
String.prototype.endsWith = function(suffix) {
|
||||
return this.indexOf(suffix, this.length - suffix.length) !== -1;
|
||||
};
|
||||
|
||||
var rez;
|
||||
|
||||
/**
|
||||
@ -35,10 +32,6 @@ module.exports = function () {
|
||||
_opts.theme = theme;
|
||||
dst = (dst && dst.length && dst) || ['resume.all'];
|
||||
|
||||
// console.log( src );
|
||||
// console.log( dst );
|
||||
// console.log( theme );
|
||||
|
||||
// Assemble output resume targets
|
||||
var targets = [];
|
||||
dst.forEach( function(t) {
|
||||
|
18
src/utils/string.js
Normal file
18
src/utils/string.js
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
String utility functions.
|
||||
@license Copyright (c) 2015 by James M. Devlin. All rights reserved.
|
||||
*/
|
||||
|
||||
/**
|
||||
Determine if the string is null, empty, or whitespace.
|
||||
See: http://stackoverflow.com/a/32800728/4942583
|
||||
@method isNullOrWhitespace
|
||||
*/
|
||||
|
||||
String.isNullOrWhitespace = function( input ) {
|
||||
return !input || !input.trim();
|
||||
};
|
||||
|
||||
String.prototype.endsWith = function(suffix) {
|
||||
return this.indexOf(suffix, this.length - suffix.length) !== -1;
|
||||
};
|
Loading…
Reference in New Issue
Block a user