Skip to content

Commit

Permalink
Extensions. Add 'use strict' for object and string
Browse files Browse the repository at this point in the history
  • Loading branch information
Yegor authored and Yegor committed Oct 26, 2018
1 parent 96db719 commit 9c75f1d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
https://github.com/Yegorich555/ytech-js-extensions
*/
/* global define */
'use strict'

require('./lib/array/index.js');
require('./lib/date/index.js');
Expand Down
1 change: 1 addition & 0 deletions lib/object/equal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @return {Boolean} true if equal
*/
module.exports = function(v1, v2, options) {
'use strict'
var EqualFalseResult = require('./equalFalseResult.js')
var EqualOptions = require('./equalOptions.js');

Expand Down
1 change: 1 addition & 0 deletions lib/string/equal.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* @return {Boolean} true if equal
*/
module.exports = function(v) {
'use strict'
if (!this && !v)
return true;
if (!this || !v)
Expand Down
13 changes: 8 additions & 5 deletions lib/string/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
String.prototype.equal = require('./equal')
String.prototype.toUpperCaseFirst = require('./toUpperCaseFirst')
String.prototype.toLowerCaseFirst = require('./toLowerCaseFirst')
String.prototype.toCamelCase = require('./toCamelCase')
String.prototype.fromCamelCase = require('./fromCamelCase')
(function() {
'use strict'
String.prototype.equal = require('./equal')
String.prototype.toUpperCaseFirst = require('./toUpperCaseFirst')
String.prototype.toLowerCaseFirst = require('./toLowerCaseFirst')
String.prototype.toCamelCase = require('./toCamelCase')
String.prototype.fromCamelCase = require('./fromCamelCase')
}())

0 comments on commit 9c75f1d

Please sign in to comment.