string-tool
Advanced tools
Comparing version 1.1.0 to 1.2.0
{ | ||
"name": "string-tool", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Useful functions for handling Strings", | ||
@@ -5,0 +5,0 @@ "main": "string-tool.es5.js", |
@@ -1,7 +0,6 @@ | ||
var startsWith = require('../string-tool.es5').startsWith; | ||
var capitalize = require('../string-tool.es5').capitalize; | ||
import { startsWith, capitalize } from '../string-tool.es5'; | ||
describe('startsWith', function() { | ||
describe('startsWith', () => { | ||
it('should return true when the String starts with that other String', function() { | ||
it('should return true when the string starts with another string', () => { | ||
expect(startsWith('A test', 'A t')).toBe(true); | ||
@@ -11,3 +10,3 @@ expect(startsWith('A test', 'A test')).toBe(true); | ||
it('should return false when the String starts with something else', function() { | ||
it('should return false when the string starts with something else', () => { | ||
expect(startsWith('something', 'nothing')).toBe(false); | ||
@@ -18,5 +17,7 @@ }); | ||
describe('capitalize', function() { | ||
describe('capitalize', () => { | ||
it('should return true when the String was capitalized correctly', function() { | ||
it('should return true when the first letter was capitalized correctly', () => { | ||
expect(capitalize('a')).toEqual('A'); | ||
expect(capitalize('ß')).toEqual('SS'); | ||
expect(capitalize('über')).toEqual('Über'); | ||
@@ -26,3 +27,3 @@ expect(capitalize('égalité')).toEqual('Égalité'); | ||
it('should return an empty String when the input is empty', function() { | ||
it('should return an empty string when the input is empty', () => { | ||
expect(capitalize('')).toEqual(''); | ||
@@ -29,0 +30,0 @@ }); |
{ | ||
"spec_dir": "spec", | ||
"spec_files": [ | ||
"**/*[sS]pec.js" | ||
"**/*[sS]pec.es5.js" | ||
], | ||
@@ -6,0 +6,0 @@ "helpers": [ |
/** | ||
* Check if the string starts with a specific string | ||
* Check if the string starts with another string | ||
*/ | ||
@@ -4,0 +4,0 @@ export function startsWith(str, searchString) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1808
40