Socket
Socket
Sign inDemoInstall

underscore.string

Package Overview
Dependencies
0
Maintainers
3
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.4.0 to 3.0.0

.editorconfig

2

bower.json

@@ -20,3 +20,3 @@ {

],
"main": "./lib/underscore.string.js",
"main": "./dist/underscore.string.js",
"repository": {

@@ -23,0 +23,0 @@ "type": "git",

@@ -5,8 +5,13 @@ {

"description": "String manipulation extensions for Underscore.js javascript library",
"version": "2.4.0",
"keywords": ["underscore", "string"],
"version": "3.0.0",
"keywords": [
"underscore",
"string"
],
"dependencies": {},
"development": {},
"main": "lib/underscore.string.js",
"scripts": ["lib/underscore.string.js"]
"main": "index.js",
"scripts": [
"index.js"
]
}
function boolMatch(s, matchers) {
var i, matcher, down = s.toLowerCase();
matchers = [].concat(matchers);
for (i = 0; i < matchers.length; i += 1) {
matcher = matchers[i];
if (matcher.test && matcher.test(s)) return true;
if (matcher && matcher.toLowerCase() === down) return true;
}
}
var camelBack = require("./camelback");

@@ -1,26 +0,62 @@

var gulp = require('gulp'),
qunit = require("gulp-qunit"),
uglify = require('gulp-uglify'),
clean = require('gulp-clean'),
rename = require('gulp-rename'),
SRC = 'lib/underscore.string.js',
DEST = 'dist',
MIN_FILE = 'underscore.string.min.js',
TEST_SUITES = ['test/test.html', 'test/test_underscore/index.html'];
var gulp = require('gulp-param')(require('gulp'), process.argv),
qunit = require("gulp-qunit"),
uglify = require('gulp-uglify'),
clean = require('gulp-clean'),
bump = require('gulp-bump'),
replace = require('gulp-replace'),
rename = require('gulp-rename'),
browserify = require('gulp-browserify'),
SRC = 'index.js',
DEST = 'dist',
SRC_COMPILED = 'underscore.string.js',
MIN_FILE = 'underscore.string.min.js',
TEST_SUITES = ['test/test.html', 'test/test_standalone.html', 'test/test_underscore/index.html'],
VERSION_FILES = ['./package.json', './component.json'];
gulp.task('test', function() {
return gulp.src(TEST_SUITES)
.pipe(qunit());
gulp.task('test', ['browserify'], function() {
return gulp.src(TEST_SUITES)
.pipe(qunit());
});
gulp.task('browserify', function() {
return gulp.src(SRC)
.pipe(browserify({
detectGlobals: true,
standalone: 's'
}))
.pipe(rename('underscore.string.js'))
.pipe(gulp.dest(DEST));
});
gulp.task('clean', function() {
return gulp.src(DEST)
.pipe(clean());
return gulp.src(DEST)
.pipe(clean());
});
gulp.task('bump-in-js', function(semver) {
return gulp.src(SRC)
.pipe(replace(/(version\s?=?\s\')([\d\.]*)\'/gi, '$1' + semver + "'"))
.pipe(gulp.dest('./'));
});
// usage: gulp bump -s <% Version %>
// usage: gulp bump --semver <% Version %>
gulp.task('bump', ['bump-in-js'], function(semver) {
if (typeof semver !== 'string' || semver.length <= 0) {
console.error('pass a new version `gulp bump --semver 2.4.1`');
process.exit(1);
}
return gulp.src(VERSION_FILES)
.pipe(bump({
version: semver
}))
.pipe(gulp.dest('./'));
});
gulp.task('build', ['test', 'clean'], function() {
return gulp.src(SRC)
.pipe(uglify())
.pipe(rename(MIN_FILE))
.pipe(gulp.dest(DEST));
gulp.src(DEST + '/' + SRC_COMPILED)
.pipe(uglify())
.pipe(rename(MIN_FILE))
.pipe(gulp.dest(DEST));
});
{
"name": "underscore.string",
"version": "2.4.0",
"version": "3.0.0",
"description": "String manipulation extensions for Underscore.js javascript library.",

@@ -20,5 +20,5 @@ "homepage": "http://epeli.github.com/underscore.string/",

],
"main": "./lib/underscore.string.js",
"main": "./index.js",
"directories": {
"lib": "./lib"
"lib": "./"
},

@@ -45,7 +45,19 @@ "engines": {

"gulp": "~3.8.10",
"gulp-clean": "~0.3.1",
"gulp-qunit": "~1.1.0",
"gulp-rename": "~1.2.0",
"gulp-uglify": "~1.0.1",
"gulp-qunit": "~1.0.0",
"gulp-clean": "~0.3.1",
"gulp-rename": "~1.2.0"
"gulp-param": "~0.6.3",
"gulp-bump": "~0.1.11",
"gulp-replace": "~0.5.0",
"gulp-browserify": "~0.5.0"
},
"jshintConfig": {
"node": true,
"browser": true,
"qunit": true,
"globals": {
"s": true
}
}
}

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc