-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from tareqdayya/dev
Dev 1.4.1
- Loading branch information
Showing
6 changed files
with
145 additions
and
145 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
module.exports = { | ||
env: { | ||
commonjs: true, | ||
es6: true, | ||
node: true, | ||
}, | ||
extends: [ | ||
'standard', 'eslint', | ||
], | ||
parserOptions: { | ||
ecmaVersion: 11, | ||
}, | ||
rules: { | ||
'require-jsdoc': 'off', | ||
'jsdoc/require-returns': 'off', | ||
'jsdoc/require-description': 'off', | ||
'jsdoc/require-jsdoc': 'off', | ||
quotes: ['error', 'single'], | ||
strict: 'off', | ||
'valid-jsdoc': 'off', | ||
'comma-dangle': ['error', { | ||
arrays: 'always-multiline', | ||
objects: 'always-multiline', | ||
imports: 'always-multiline', | ||
exports: 'always-multiline', | ||
functions: 'always-multiline', | ||
}], | ||
semi: ['error', 'always'], | ||
'prefer-template': 'error', | ||
curly: ['error', 'multi-line'], | ||
}, | ||
env: { | ||
commonjs: true, | ||
es6: true, | ||
node: true, | ||
}, | ||
extends: [ | ||
'standard', | ||
], | ||
parserOptions: { | ||
ecmaVersion: 11, | ||
}, | ||
rules: { | ||
'require-jsdoc': 'off', | ||
'jsdoc/require-returns': 'off', | ||
'jsdoc/require-description': 'off', | ||
'jsdoc/require-jsdoc': 'off', | ||
quotes: ['error', 'single'], | ||
strict: 'off', | ||
'valid-jsdoc': 'off', | ||
'comma-dangle': ['error', { | ||
arrays: 'always-multiline', | ||
objects: 'always-multiline', | ||
imports: 'always-multiline', | ||
exports: 'always-multiline', | ||
functions: 'always-multiline', | ||
}], | ||
semi: ['error', 'always'], | ||
'prefer-template': 'error', | ||
curly: ['error', 'multi-line'], | ||
}, | ||
}; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
const stylesheetType = { | ||
cssBased: 'cssBased', | ||
styledComponents: 'styledComponents', | ||
reactNative: 'reactNativeStyles', | ||
cssBased: 'cssBased', | ||
styledComponents: 'styledComponents', | ||
reactNative: 'reactNativeStyles', | ||
}; | ||
|
||
module.exports = { stylesheetType }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
function convertCamelCaseToSpinal(string) { | ||
if (!(typeof string === 'string')) return string; | ||
let convertedString = ''; | ||
let character = ''; | ||
function convertCamelCaseToSpinal (string) { | ||
if (!(typeof string === 'string')) return string; | ||
let convertedString = ''; | ||
let character = ''; | ||
|
||
// LOOP OVER CHARACTERS | ||
for (let i = 0; i < string.length; i++) { | ||
character = string.charAt(i); | ||
// LOOP OVER CHARACTERS | ||
for (let i = 0; i < string.length; i++) { | ||
character = string.charAt(i); | ||
|
||
// NUMERIC CHARACTER: KEEP AS IS | ||
if (!isNaN(parseInt(character, 10))) convertedString += String(character); | ||
// NUMERIC CHARACTER: KEEP AS IS | ||
if (!isNaN(parseInt(character, 10))) convertedString += String(character); | ||
|
||
// ALPHA CHARACTER | ||
else { // SEPARATE AT UPPERCASE WITH '-' | ||
if (character === character.toUpperCase() && i > 0) convertedString += '-'; | ||
// ALPHA CHARACTER | ||
else { // SEPARATE AT UPPERCASE WITH '-' | ||
if (character === character.toUpperCase() && i > 0) convertedString += '-'; | ||
|
||
convertedString += character.toLowerCase(); | ||
} | ||
convertedString += character.toLowerCase(); | ||
} | ||
} | ||
|
||
return convertedString; | ||
return convertedString; | ||
} | ||
|
||
module.exports = { convertCamelCaseToSpinal }; |
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
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