first commit
This commit is contained in:
1
frontend/node_modules/string-convert/.npmignore
generated
vendored
Normal file
1
frontend/node_modules/string-convert/.npmignore
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
node_modules
|
||||
21
frontend/node_modules/string-convert/LICENSE
generated
vendored
Normal file
21
frontend/node_modules/string-convert/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Kiran Abburi
|
||||
|
||||
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.
|
||||
37
frontend/node_modules/string-convert/README.md
generated
vendored
Normal file
37
frontend/node_modules/string-convert/README.md
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
string-convert
|
||||
==============
|
||||
|
||||
Set of string conversion functions
|
||||
|
||||
Installation
|
||||
------------
|
||||
npm install string-convert --save
|
||||
|
||||
Methods
|
||||
-------
|
||||
|
||||
### hyphen2camel
|
||||
|
||||
Converts hyphenated string to camelcase string
|
||||
|
||||
Example:
|
||||
|
||||
```javascript
|
||||
var hyphen2camel = require('string-convert/hyphen2camel');
|
||||
hyphen2camel('min-width'); // minWidth
|
||||
hyphen2camel('-moz-transition'); // MozTransition
|
||||
```
|
||||
|
||||
### camel2hyphen
|
||||
|
||||
Converts camel case string to hyphenated string
|
||||
|
||||
Example:
|
||||
|
||||
```javascript
|
||||
var camel2hyphen = require('string-convert/camel2hyphen');
|
||||
camel2hyphen('minWidth'); // min-width
|
||||
camel2hyphen('MozTransition'); //-moz-transition
|
||||
```
|
||||
|
||||
|
||||
9
frontend/node_modules/string-convert/camel2hyphen.js
generated
vendored
Normal file
9
frontend/node_modules/string-convert/camel2hyphen.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
var camel2hyphen = function (str) {
|
||||
return str
|
||||
.replace(/[A-Z]/g, function (match) {
|
||||
return '-' + match.toLowerCase();
|
||||
})
|
||||
.toLowerCase();
|
||||
};
|
||||
|
||||
module.exports = camel2hyphen;
|
||||
9
frontend/node_modules/string-convert/hyphen2camel.js
generated
vendored
Normal file
9
frontend/node_modules/string-convert/hyphen2camel.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
var hyphen2camel = function (str) {
|
||||
return str
|
||||
.toLowerCase()
|
||||
.replace(/-[a-z]/g, function (match) {
|
||||
return match.slice(1).toUpperCase() ;
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = hyphen2camel;
|
||||
6
frontend/node_modules/string-convert/index.js
generated
vendored
Normal file
6
frontend/node_modules/string-convert/index.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
var stringConvert = {
|
||||
hyphen2camel: require('./hyphen2camel'),
|
||||
camel2hyphen : require('./camel2hyphen')
|
||||
};
|
||||
|
||||
module.exports = stringConvert;
|
||||
19
frontend/node_modules/string-convert/package.json
generated
vendored
Normal file
19
frontend/node_modules/string-convert/package.json
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "string-convert",
|
||||
"version": "0.2.1",
|
||||
"description": "String convertions",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "./node_modules/.bin/mocha test"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/akiran/string-convert"
|
||||
},
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"mocha": "^2.0.1",
|
||||
"should": "^4.3.0"
|
||||
}
|
||||
}
|
||||
17
frontend/node_modules/string-convert/test/test.camel2hyphen.js
generated
vendored
Normal file
17
frontend/node_modules/string-convert/test/test.camel2hyphen.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
var should = require('should');
|
||||
var camel2hyphen = require('../camel2hyphen');
|
||||
|
||||
describe('camel2hyphen', function () {
|
||||
it('should convert minWith to min-width', function () {
|
||||
camel2hyphen('minWidth').should.equal('min-width');
|
||||
});
|
||||
|
||||
it('should convert deviceMinWith to device-min-width', function () {
|
||||
camel2hyphen('deviceMinWidth').should.equal('device-min-width');
|
||||
});
|
||||
|
||||
it('should convert MozTransition to -moz-transition', function () {
|
||||
camel2hyphen('MozTransition').should.equal('-moz-transition');
|
||||
});
|
||||
|
||||
});
|
||||
17
frontend/node_modules/string-convert/test/test.hyphen2camel.js
generated
vendored
Normal file
17
frontend/node_modules/string-convert/test/test.hyphen2camel.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
var should = require('should');
|
||||
var hyphen2camel = require('../hyphen2camel');
|
||||
|
||||
describe('hyphen2camel', function () {
|
||||
it('should convert min-width to minWidth', function () {
|
||||
hyphen2camel('min-width').should.equal('minWidth');
|
||||
});
|
||||
|
||||
it('should convert device-min-width to deviceMinWidth', function () {
|
||||
hyphen2camel('device-min-width').should.equal('deviceMinWidth');
|
||||
});
|
||||
|
||||
it('should convert -moz-transition to MozTransition', function () {
|
||||
hyphen2camel('-moz-transition').should.equal('MozTransition');
|
||||
});
|
||||
|
||||
});
|
||||
11
frontend/node_modules/string-convert/test/test.index.js
generated
vendored
Normal file
11
frontend/node_modules/string-convert/test/test.index.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
var convert = require('../');
|
||||
|
||||
describe('string-convert', function () {
|
||||
it('convert.hyphen2camel should convert min-width to minWidth', function () {
|
||||
convert.hyphen2camel('min-width').should.equal('minWidth');
|
||||
});
|
||||
|
||||
it('convert.camel2hyphen should convert minWidth to min-width', function () {
|
||||
convert.camel2hyphen('minWidth').should.equal('min-width');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user