Skip to content

Commit

Permalink
0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
richrdkng committed Aug 19, 2016
0 parents commit a4abfd2
Show file tree
Hide file tree
Showing 31 changed files with 1,442 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .doclets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
packageJson: package.json

dir: src

articles:
- Overview: readme.md

branches:
- master
- develop
- feature/*
- release/*
- hotfix/*
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{json,yml}]
indent_size = 2
144 changes: 144 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
module.exports = {
extends : [
'eslint:all'
],
globals : {
'define': true,
'module': true,
'require' : true,
'console' : true,

'Symbol' : true,

// typed arrays
'Int8Array' : true,
'Uint8Array' : true,
'Uint8ClampedArray' : true,
'Int16Array' : true,
'Uint16Array' : true,
'Int32Array' : true,
'Uint32Array' : true,
'Float32Array' : true,
'Float64Array' : true
},
'parserOptions': {
'ecmaVersion': 5
},
rules : {
'strict': 'off',
'padded-blocks': 'off',
'func-names': 'off',
'no-var' : 'off',
'sort-vars' : 'off',
'no-multi-spaces': 'off',
'init-declarations': 'off',
'prefer-arrow-callback' : 'off',
'func-style': 'off',
'no-plusplus': 'off',
'no-continue': 'off',
'no-prototype-builtins': 'off',
'vars-on-top': 'error',
'prefer-reflect': 'off',
'space-unary-ops': 'off',
'key-spacing' : 'off',
'callback-return' : 'off',
'no-implicit-coercion' : 'off',
'no-negated-condition' : 'off',
'guard-for-in' : 'off',
'no-lonely-if' : 'off',
'no-self-compare': 'off',
'no-inline-comments' : 'off',
'lines-around-comment' : 'off',
'no-underscore-dangle': 'off',
'no-unused-expressions': 'off',
'one-var': 'off',
'indent': 'off',
'arrow-body-style' : 'off',
'wrap-regex' : 'off',
'prefer-spread' : 'off',
'prefer-rest-params' : 'off',
'no-invalid-this' : 'off',
'newline-before-return': 'off',
'no-console': [
'error', {
allow: [
'warn',
'error'
]
}
],
'new-cap': [
'error', {
'newIsCap': false,
'capIsNew': true,
}
],
'comma-dangle' : [
'error', 'always-multiline'
],
'max-params': [
'error', 5
],
'max-lines': [
'error', {
'max' : 999,
'skipBlankLines' : true,
'skipComments' : true
}
],
'quote-props': [
'error',
'as-needed', {
'keywords': false
}
],
'space-in-parens': 'off',
'id-length': [
'error', {
'exceptions': [
'i', 'j', 'p', 'n', 'x', 'y', 'w', 'e', 'h'
]
}
],
'linebreak-style': [
'error', 'unix'
],
'complexity': [
'error', 50
],
'max-statements': [
'error', 40
],
'max-len': [
'error', 120, 4
],
'camelcase': [
'error', {
'properties': 'never'
}
],
'quotes' : [
'error', 'single', {
'avoidEscape' : true,
'allowTemplateLiterals' : true
}
],
'default-case': [
'error', {
'commentPattern' : '^skip\\sdefault'
}
],
'no-magic-numbers': [
'error', {
'ignore' : [-1, 0, 1, 2],
'ignoreArrayIndexes' : true
}
],
'space-before-function-paren': [
'error', {
'anonymous' : 'never',
'named' : 'never'
}
]
}
};
59 changes: 59 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# General .gitattributes v1.0.0

# Auto detect text files and perform LF normalization
* text=auto
* eol=lf

# These files are text and should be normalized (Convert crlf => lf)
*.php text
*.css text
*.scss text
*.sass text
*.js text
*.htm text
*.html text
*.xml text
*.txt text
*.ini text
*.inc text
.htaccess text

# These files are binary and should be left untouched
# images
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.psd binary
*.ai binary

# fonts
*.ttf binary
*.woff binary
*.woff2 binary
*.eot binary

# documents
*.pdf binary
*.doc binary
*.docx binary

# compressed formats
*.zip binary
*.tar binary
*.gz binary
*.rar binary
*.7z binary

# executables
*.phar binary
*.exe binary

# media formats
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.fla binary
*.swf binary
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# IntelliJ project directory
.idea/

# Vagrant VM directory
.vagrant/

# Node project dependencies
/node_modules/

# Code coverage report
/cov/

# Logs
/npm-debug.log

# Required data for publishing project
/.publish.json
26 changes: 26 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# IntelliJ project directory
/.idea/

# Vagrant VM directory
/.vagrant/

# coverage directory (for development)
/cov/

# scripts directory (for development)
/scripts/

# source directory (for development)
/src/

# tests directory (for development)
/tests/

.doclets.yml
.editorconfig
.eslintrc.js
.gitattributes
.npmignore
.publish.json
.travis.yml
vagrantfile
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: node_js

node_js:
- stable
- "6"
- "6.1"
- "5"
- "5.1"
- "4"
- "4.2"
- "4.1"
- "4.0"

script:
- npm run ci
54 changes: 54 additions & 0 deletions dist/js-partial-is-empty-string.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
|----------------------------------------------------------------------------------------------------------------------
| A partial to check whether a string is empty.
|----------------------------------------------------------------------------------------------------------------------
*/

/**
* More information on [JavaScript Open Standards]{@link https://github.com/jsopenstd/jsopenstd}.
*
* @namespace js.partial
* @version 0.0.1
*
* @author Richard King <richrdkng@gmail.com> [GitHub]{@link https://github.com/richrdkng}
* @license [MIT]{@link https://github.com/jsopenstd/js-partial-foreach/blob/master/license.md}
*/

/**
* UMD - [returnExports.js pattern]{@link https://github.com/umdjs/umd/blob/master/templates/returnExports.js}
* For more information and license, check the link below:
* [UMD GitHub Repository]{@link https://github.com/umdjs/umd}
*/
(function(root, factory) {
// AMD
/* istanbul ignore next: ignore coverage test for UMD */
if (typeof define === 'function' && define.amd) {
define([], factory);

// CommonJS
} else if (typeof module === 'object' && module.exports) {
module.exports = factory();

// Browser
} else {
root.js_partial_isEmptyString = factory();
}
}(this, function() {
'use strict';

/**
* Determines whether a string is empty.
* A string is considered empty or blank, when its **.length === 0**, or it **contains only whitespaces**.
*
* @memberOf js.partial
* @function isEmptyString
*
* @param {string} string - The string to check.
*
* @returns {boolean} If the string is empty or blank, it will return true.
*/
return function isEmptyString(string) {
return string.length === 0 ||
/^\s+$/.test(string) === true;
};
}));
2 changes: 2 additions & 0 deletions dist/js-partial-is-empty-string.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions license.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
**The MIT License (MIT)**

Copyright (c) 2016 **Richard King** [richrdkng@gmail.com](richrdkng@gmail.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading

0 comments on commit a4abfd2

Please sign in to comment.