Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

string-tool

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string-tool - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc