Socket
Socket
Sign inDemoInstall

case

Package Overview
Dependencies
0
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.6.1 to 1.6.2

5

dist/Case.js

@@ -1,2 +0,2 @@

/*! Case - v1.6.1 - 2019-01-11
/*! Case - v1.6.2 - 2019-07-26
* Copyright (c) 2019 Nathan Bubna; Licensed MIT, GPL */

@@ -160,2 +160,5 @@ (function() {

types.squish = types.pascal;
// Allow import default
Case.default = Case;

@@ -162,0 +165,0 @@ for (var type in types) {

4

dist/Case.min.js

@@ -1,5 +0,5 @@

/*! Case - v1.6.1 - 2019-01-11
/*! Case - v1.6.2 - 2019-07-26
* Copyright (c) 2019 Nathan Bubna; Licensed MIT, GPL */
(function(){"use strict";var a=function(a,b){return b=b||"",a.replace(/(^|-)/g,"$1\\u"+b).replace(/,/g,"\\u"+b)},b=a("20-26,28-2F,3A-40,5B-60,7B-7E,A0-BF,D7,F7","00"),c="a-z"+a("DF-F6,F8-FF","00"),d="A-Z"+a("C0-D6,D8-DE","00"),e=function(a,e,f,g){return a=a||b,e=e||c,f=f||d,g=g||"A|An|And|As|At|But|By|En|For|If|In|Of|On|Or|The|To|Vs?\\.?|Via",{capitalize:new RegExp("(^|["+a+"])(["+e+"])","g"),pascal:new RegExp("(^|["+a+"])+(["+e+f+"])","g"),fill:new RegExp("["+a+"]+(.|$)","g"),sentence:new RegExp('(^\\s*|[\\?\\!\\.]+"?\\s+"?|,\\s+")(['+e+"])","g"),improper:new RegExp("\\b("+g+")\\b","g"),relax:new RegExp("([^"+f+"])(["+f+"]*)(["+f+"])(?=[^"+f+"]|$)","g"),upper:new RegExp("^[^"+e+"]+$"),hole:/[^\s]\s[^\s]/,apostrophe:/'/g,room:new RegExp("["+a+"]")}},f=e(),g={re:f,unicodes:a,regexps:e,types:[],up:String.prototype.toUpperCase,low:String.prototype.toLowerCase,cap:function(a){return g.up.call(a.charAt(0))+a.slice(1)},decap:function(a){return g.low.call(a.charAt(0))+a.slice(1)},deapostrophe:function(a){return a.replace(f.apostrophe,"")},fill:function(a,b,c){return null!=b&&(a=a.replace(f.fill,function(a,c){return c?b+c:""})),c&&(a=g.deapostrophe(a)),a},prep:function(a,b,c,d){if(a=null==a?"":a+"",!d&&f.upper.test(a)&&(a=g.low.call(a)),!b&&!f.hole.test(a)){var e=g.fill(a," ");f.hole.test(e)&&(a=e)}return c||f.room.test(a)||(a=a.replace(f.relax,g.relax)),a},relax:function(a,b,c,d){return b+" "+(c?c+" ":"")+d}},h={_:g,of:function(a){for(var b=0,c=g.types.length;b<c;b++)if(h[g.types[b]].apply(h,arguments)===a)return g.types[b]},flip:function(a){return a.replace(/\w/g,function(a){return(a==g.up.call(a)?g.low:g.up).call(a)})},random:function(a){return a.replace(/\w/g,function(a){return(Math.round(Math.random())?g.up:g.low).call(a)})},type:function(a,b){h[a]=b,g.types.push(a)}},i={lower:function(a,b,c){return g.fill(g.low.call(g.prep(a,b)),b,c)},snake:function(a){return h.lower(a,"_",!0)},constant:function(a){return h.upper(a,"_",!0)},camel:function(a){return g.decap(h.pascal(a))},kebab:function(a){return h.lower(a,"-",!0)},upper:function(a,b,c){return g.fill(g.up.call(g.prep(a,b,!1,!0)),b,c)},capital:function(a,b,c){return g.fill(g.prep(a).replace(f.capitalize,function(a,b,c){return b+g.up.call(c)}),b,c)},header:function(a){return h.capital(a,"-",!0)},pascal:function(a){return g.fill(g.prep(a,!1,!0).replace(f.pascal,function(a,b,c){return g.up.call(c)}),"",!0)},title:function(a){return h.capital(a).replace(f.improper,function(a,b,c,d){return c>0&&c<d.lastIndexOf(" ")?g.low.call(a):a})},sentence:function(a,b,c){return a=h.lower(a).replace(f.sentence,function(a,b,c){return b+g.up.call(c)}),b&&b.forEach(function(b){a=a.replace(new RegExp("\\b"+h.lower(b)+"\\b","g"),g.cap)}),c&&c.forEach(function(b){a=a.replace(new RegExp("(\\b"+h.lower(b)+"\\. +)(\\w)"),function(a,b,c){return b+g.low.call(c)})}),a}};i.squish=i.pascal;for(var j in i)h.type(j,i[j]);var k="function"==typeof k?k:function(){};k("object"==typeof module&&module.exports?module.exports=h:this.Case=h)}).call(this);
(function(){"use strict";var a=function(a,b){return b=b||"",a.replace(/(^|-)/g,"$1\\u"+b).replace(/,/g,"\\u"+b)},b=a("20-26,28-2F,3A-40,5B-60,7B-7E,A0-BF,D7,F7","00"),c="a-z"+a("DF-F6,F8-FF","00"),d="A-Z"+a("C0-D6,D8-DE","00"),e=function(a,e,f,g){return a=a||b,e=e||c,f=f||d,g=g||"A|An|And|As|At|But|By|En|For|If|In|Of|On|Or|The|To|Vs?\\.?|Via",{capitalize:new RegExp("(^|["+a+"])(["+e+"])","g"),pascal:new RegExp("(^|["+a+"])+(["+e+f+"])","g"),fill:new RegExp("["+a+"]+(.|$)","g"),sentence:new RegExp('(^\\s*|[\\?\\!\\.]+"?\\s+"?|,\\s+")(['+e+"])","g"),improper:new RegExp("\\b("+g+")\\b","g"),relax:new RegExp("([^"+f+"])(["+f+"]*)(["+f+"])(?=[^"+f+"]|$)","g"),upper:new RegExp("^[^"+e+"]+$"),hole:/[^\s]\s[^\s]/,apostrophe:/'/g,room:new RegExp("["+a+"]")}},f=e(),g={re:f,unicodes:a,regexps:e,types:[],up:String.prototype.toUpperCase,low:String.prototype.toLowerCase,cap:function(a){return g.up.call(a.charAt(0))+a.slice(1)},decap:function(a){return g.low.call(a.charAt(0))+a.slice(1)},deapostrophe:function(a){return a.replace(f.apostrophe,"")},fill:function(a,b,c){return null!=b&&(a=a.replace(f.fill,function(a,c){return c?b+c:""})),c&&(a=g.deapostrophe(a)),a},prep:function(a,b,c,d){if(a=null==a?"":a+"",!d&&f.upper.test(a)&&(a=g.low.call(a)),!b&&!f.hole.test(a)){var e=g.fill(a," ");f.hole.test(e)&&(a=e)}return c||f.room.test(a)||(a=a.replace(f.relax,g.relax)),a},relax:function(a,b,c,d){return b+" "+(c?c+" ":"")+d}},h={_:g,of:function(a){for(var b=0,c=g.types.length;b<c;b++)if(h[g.types[b]].apply(h,arguments)===a)return g.types[b]},flip:function(a){return a.replace(/\w/g,function(a){return(a==g.up.call(a)?g.low:g.up).call(a)})},random:function(a){return a.replace(/\w/g,function(a){return(Math.round(Math.random())?g.up:g.low).call(a)})},type:function(a,b){h[a]=b,g.types.push(a)}},i={lower:function(a,b,c){return g.fill(g.low.call(g.prep(a,b)),b,c)},snake:function(a){return h.lower(a,"_",!0)},constant:function(a){return h.upper(a,"_",!0)},camel:function(a){return g.decap(h.pascal(a))},kebab:function(a){return h.lower(a,"-",!0)},upper:function(a,b,c){return g.fill(g.up.call(g.prep(a,b,!1,!0)),b,c)},capital:function(a,b,c){return g.fill(g.prep(a).replace(f.capitalize,function(a,b,c){return b+g.up.call(c)}),b,c)},header:function(a){return h.capital(a,"-",!0)},pascal:function(a){return g.fill(g.prep(a,!1,!0).replace(f.pascal,function(a,b,c){return g.up.call(c)}),"",!0)},title:function(a){return h.capital(a).replace(f.improper,function(a,b,c,d){return c>0&&c<d.lastIndexOf(" ")?g.low.call(a):a})},sentence:function(a,b,c){return a=h.lower(a).replace(f.sentence,function(a,b,c){return b+g.up.call(c)}),b&&b.forEach(function(b){a=a.replace(new RegExp("\\b"+h.lower(b)+"\\b","g"),g.cap)}),c&&c.forEach(function(b){a=a.replace(new RegExp("(\\b"+h.lower(b)+"\\. +)(\\w)"),function(a,b,c){return b+g.low.call(c)})}),a}};i.squish=i.pascal,h.default=h;for(var j in i)h.type(j,i[j]);var k="function"==typeof k?k:function(){};k("object"==typeof module&&module.exports?module.exports=h:this.Case=h)}).call(this);
//# sourceMappingURL=Case.min.js.map

@@ -1,2 +0,2 @@

/*! Case - v1.6.1 - 2019-01-11
/*! Case - v1.6.2 - 2019-07-26
* Copyright (c) 2019 Nathan Bubna; Licensed MIT, GPL */

@@ -160,2 +160,5 @@ (function() {

types.squish = types.pascal;
// Allow import default
Case.default = Case;

@@ -162,0 +165,0 @@ for (var type in types) {

@@ -1,5 +0,5 @@

/*! Case - v1.6.1 - 2019-01-11
/*! Case - v1.6.2 - 2019-07-26
* Copyright (c) 2019 Nathan Bubna; Licensed MIT, GPL */
(function(){"use strict";var a=function(a,b){return b=b||"",a.replace(/(^|-)/g,"$1\\u"+b).replace(/,/g,"\\u"+b)},b=a("20-26,28-2F,3A-40,5B-60,7B-7E,A0-BF,D7,F7","00"),c="a-z"+a("DF-F6,F8-FF","00"),d="A-Z"+a("C0-D6,D8-DE","00"),e=function(a,e,f,g){return a=a||b,e=e||c,f=f||d,g=g||"A|An|And|As|At|But|By|En|For|If|In|Of|On|Or|The|To|Vs?\\.?|Via",{capitalize:new RegExp("(^|["+a+"])(["+e+"])","g"),pascal:new RegExp("(^|["+a+"])+(["+e+f+"])","g"),fill:new RegExp("["+a+"]+(.|$)","g"),sentence:new RegExp('(^\\s*|[\\?\\!\\.]+"?\\s+"?|,\\s+")(['+e+"])","g"),improper:new RegExp("\\b("+g+")\\b","g"),relax:new RegExp("([^"+f+"])(["+f+"]*)(["+f+"])(?=[^"+f+"]|$)","g"),upper:new RegExp("^[^"+e+"]+$"),hole:/[^\s]\s[^\s]/,apostrophe:/'/g,room:new RegExp("["+a+"]")}},f=e(),g={re:f,unicodes:a,regexps:e,types:[],up:String.prototype.toUpperCase,low:String.prototype.toLowerCase,cap:function(a){return g.up.call(a.charAt(0))+a.slice(1)},decap:function(a){return g.low.call(a.charAt(0))+a.slice(1)},deapostrophe:function(a){return a.replace(f.apostrophe,"")},fill:function(a,b,c){return null!=b&&(a=a.replace(f.fill,function(a,c){return c?b+c:""})),c&&(a=g.deapostrophe(a)),a},prep:function(a,b,c,d){if(a=null==a?"":a+"",!d&&f.upper.test(a)&&(a=g.low.call(a)),!b&&!f.hole.test(a)){var e=g.fill(a," ");f.hole.test(e)&&(a=e)}return c||f.room.test(a)||(a=a.replace(f.relax,g.relax)),a},relax:function(a,b,c,d){return b+" "+(c?c+" ":"")+d}},h={_:g,of:function(a){for(var b=0,c=g.types.length;b<c;b++)if(h[g.types[b]].apply(h,arguments)===a)return g.types[b]},flip:function(a){return a.replace(/\w/g,function(a){return(a==g.up.call(a)?g.low:g.up).call(a)})},random:function(a){return a.replace(/\w/g,function(a){return(Math.round(Math.random())?g.up:g.low).call(a)})},type:function(a,b){h[a]=b,g.types.push(a)}},i={lower:function(a,b,c){return g.fill(g.low.call(g.prep(a,b)),b,c)},snake:function(a){return h.lower(a,"_",!0)},constant:function(a){return h.upper(a,"_",!0)},camel:function(a){return g.decap(h.pascal(a))},kebab:function(a){return h.lower(a,"-",!0)},upper:function(a,b,c){return g.fill(g.up.call(g.prep(a,b,!1,!0)),b,c)},capital:function(a,b,c){return g.fill(g.prep(a).replace(f.capitalize,function(a,b,c){return b+g.up.call(c)}),b,c)},header:function(a){return h.capital(a,"-",!0)},pascal:function(a){return g.fill(g.prep(a,!1,!0).replace(f.pascal,function(a,b,c){return g.up.call(c)}),"",!0)},title:function(a){return h.capital(a).replace(f.improper,function(a,b,c,d){return c>0&&c<d.lastIndexOf(" ")?g.low.call(a):a})},sentence:function(a,b,c){return a=h.lower(a).replace(f.sentence,function(a,b,c){return b+g.up.call(c)}),b&&b.forEach(function(b){a=a.replace(new RegExp("\\b"+h.lower(b)+"\\b","g"),g.cap)}),c&&c.forEach(function(b){a=a.replace(new RegExp("(\\b"+h.lower(b)+"\\. +)(\\w)"),function(a,b,c){return b+g.low.call(c)})}),a}};i.squish=i.pascal;for(var j in i)h.type(j,i[j]);var k="function"==typeof k?k:function(){};k("object"==typeof module&&module.exports?module.exports=h:this.Case=h)}).call(this),function(a,b){function c(c){var d="to"+b.cap(c)+"Case";String.prototype[d]=function(){return Array.prototype.unshift.call(arguments,this),a[c].apply(a,arguments)}}for(var d=0,e=b.types.length;d<e;d++)c(b.types[d]);var f=a.type;a.type=function(a,b){f(a,b),c(a)}}(Case,Case._);
(function(){"use strict";var a=function(a,b){return b=b||"",a.replace(/(^|-)/g,"$1\\u"+b).replace(/,/g,"\\u"+b)},b=a("20-26,28-2F,3A-40,5B-60,7B-7E,A0-BF,D7,F7","00"),c="a-z"+a("DF-F6,F8-FF","00"),d="A-Z"+a("C0-D6,D8-DE","00"),e=function(a,e,f,g){return a=a||b,e=e||c,f=f||d,g=g||"A|An|And|As|At|But|By|En|For|If|In|Of|On|Or|The|To|Vs?\\.?|Via",{capitalize:new RegExp("(^|["+a+"])(["+e+"])","g"),pascal:new RegExp("(^|["+a+"])+(["+e+f+"])","g"),fill:new RegExp("["+a+"]+(.|$)","g"),sentence:new RegExp('(^\\s*|[\\?\\!\\.]+"?\\s+"?|,\\s+")(['+e+"])","g"),improper:new RegExp("\\b("+g+")\\b","g"),relax:new RegExp("([^"+f+"])(["+f+"]*)(["+f+"])(?=[^"+f+"]|$)","g"),upper:new RegExp("^[^"+e+"]+$"),hole:/[^\s]\s[^\s]/,apostrophe:/'/g,room:new RegExp("["+a+"]")}},f=e(),g={re:f,unicodes:a,regexps:e,types:[],up:String.prototype.toUpperCase,low:String.prototype.toLowerCase,cap:function(a){return g.up.call(a.charAt(0))+a.slice(1)},decap:function(a){return g.low.call(a.charAt(0))+a.slice(1)},deapostrophe:function(a){return a.replace(f.apostrophe,"")},fill:function(a,b,c){return null!=b&&(a=a.replace(f.fill,function(a,c){return c?b+c:""})),c&&(a=g.deapostrophe(a)),a},prep:function(a,b,c,d){if(a=null==a?"":a+"",!d&&f.upper.test(a)&&(a=g.low.call(a)),!b&&!f.hole.test(a)){var e=g.fill(a," ");f.hole.test(e)&&(a=e)}return c||f.room.test(a)||(a=a.replace(f.relax,g.relax)),a},relax:function(a,b,c,d){return b+" "+(c?c+" ":"")+d}},h={_:g,of:function(a){for(var b=0,c=g.types.length;b<c;b++)if(h[g.types[b]].apply(h,arguments)===a)return g.types[b]},flip:function(a){return a.replace(/\w/g,function(a){return(a==g.up.call(a)?g.low:g.up).call(a)})},random:function(a){return a.replace(/\w/g,function(a){return(Math.round(Math.random())?g.up:g.low).call(a)})},type:function(a,b){h[a]=b,g.types.push(a)}},i={lower:function(a,b,c){return g.fill(g.low.call(g.prep(a,b)),b,c)},snake:function(a){return h.lower(a,"_",!0)},constant:function(a){return h.upper(a,"_",!0)},camel:function(a){return g.decap(h.pascal(a))},kebab:function(a){return h.lower(a,"-",!0)},upper:function(a,b,c){return g.fill(g.up.call(g.prep(a,b,!1,!0)),b,c)},capital:function(a,b,c){return g.fill(g.prep(a).replace(f.capitalize,function(a,b,c){return b+g.up.call(c)}),b,c)},header:function(a){return h.capital(a,"-",!0)},pascal:function(a){return g.fill(g.prep(a,!1,!0).replace(f.pascal,function(a,b,c){return g.up.call(c)}),"",!0)},title:function(a){return h.capital(a).replace(f.improper,function(a,b,c,d){return c>0&&c<d.lastIndexOf(" ")?g.low.call(a):a})},sentence:function(a,b,c){return a=h.lower(a).replace(f.sentence,function(a,b,c){return b+g.up.call(c)}),b&&b.forEach(function(b){a=a.replace(new RegExp("\\b"+h.lower(b)+"\\b","g"),g.cap)}),c&&c.forEach(function(b){a=a.replace(new RegExp("(\\b"+h.lower(b)+"\\. +)(\\w)"),function(a,b,c){return b+g.low.call(c)})}),a}};i.squish=i.pascal,h.default=h;for(var j in i)h.type(j,i[j]);var k="function"==typeof k?k:function(){};k("object"==typeof module&&module.exports?module.exports=h:this.Case=h)}).call(this),function(a,b){function c(c){var d="to"+b.cap(c)+"Case";String.prototype[d]=function(){return Array.prototype.unshift.call(arguments,this),a[c].apply(a,arguments)}}for(var d=0,e=b.types.length;d<e;d++)c(b.types[d]);var f=a.type;a.type=function(a,b){f(a,b),c(a)}}(Case,Case._);
//# sourceMappingURL=Case.plus.min.js.map

@@ -19,3 +19,3 @@ {

],
"version": "1.6.1",
"version": "1.6.2",
"author": {

@@ -56,16 +56,14 @@ "name": "Nathan Bubna",

"devDependencies": {
"grunt": "^1.0.1",
"grunt-cli": "^1.2.0",
"grunt": "^1.0.4",
"grunt-cli": "^1.3.2",
"grunt-component-build": "^0.5.3",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-clean": "^2.0.0",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-jasmine": "^1.1.0",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-qunit": "^1.3.0",
"grunt-contrib-uglify": "^2.2.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-notify": "^0.4.5",
"grunt-nuget": "~0.2.0"
"grunt-contrib-jshint": "^2.1.0",
"grunt-contrib-qunit": "^3.1.0",
"grunt-contrib-uglify": "^4.0.1",
"grunt-contrib-watch": "^1.1.0",
"grunt-nuget": "~0.3.1"
},
"typings": "case.d.ts"
}

@@ -5,4 +5,2 @@ ### Case: An extensible utility to convert, identify, and flip string case.

[NPM][npm]: `npm install case` (little 'c' due to NPM restrictions)
Bower: `bower install Case` (note the big 'C')
[Component][component]: `component install nbubna/Case`
[NuGet][]: `Install-Package Case`

@@ -19,3 +17,2 @@

[npm]: https://npmjs.org/package/case
[component]: https://github.com/componentjs/guide

@@ -122,2 +119,3 @@ ## Documentation

* 2019-01-11 [v1.6.1][] (PR #30, update typings to include 'abbreviations' argument for Case.sentence)
* 2019-07-26 [v1.6.2][] (PR #31, allow importing as default)

@@ -142,1 +140,2 @@ [v1.0.0]: https://github.com/nbubna/store/tree/1.0.0

[v1.6.1]: https://github.com/nbubna/store/tree/1.6.1
[v1.6.2]: https://github.com/nbubna/store/tree/1.6.2

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc