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

es-string-utils

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es-string-utils - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

dist/index.d.mts

14

dist/index.js

@@ -1,1 +0,13 @@

"use strict";var f=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var l=(t,r)=>{for(var o in r)f(t,o,{get:r[o],enumerable:!0})},m=(t,r,o,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of p(r))!g.call(t,i)&&i!==o&&f(t,i,{get:()=>r[i],enumerable:!(n=a(r,i))||n.enumerable});return t};var c=t=>m(f({},"__esModule",{value:!0}),t);var E={};l(E,{camelize:()=>x,capitalize:()=>h,compare:()=>b,concat:()=>y,contains:()=>s,containsAny:()=>k,containsAnyIgnoreCase:()=>w,containsIgnoreCase:()=>C,containsNone:()=>u});module.exports=c(E);var x=t=>{if(typeof t!="string")throw new Error(`Expected string but got ${typeof t}`);return t.replace(/[-_\s]+(.)?/g,r=>{var o;return(o=r==null?void 0:r.toUpperCase())!=null?o:""})};var h=(t,r=" ")=>{if(typeof t!="string")throw new Error(`Expected string but got ${typeof t}`);return t==null?void 0:t.split(r).map(o=>{var n,i;return((n=o.slice(0,1))==null?void 0:n.toUpperCase())+((i=o.slice(1))==null?void 0:i.toLowerCase())}).join(r)};var e=(...t)=>{for(let r of t)if(typeof r!="string")throw new Error(`Expected string but got ${typeof r}`)};var b=(t,r)=>{if(e(t,r),t.length!==r.length)return t.length-r.length;for(let o=0;o<t.length&&o<r.length;o++){let n=t.charCodeAt(o),i=r.charCodeAt(o);if(n!==i)return n-i}return 0};var y=(...t)=>{let r="";for(let o of t)r+=o||"";return r};var s=(t,r,o=!0)=>(e(t,r),(o?t:t.toLocaleLowerCase()).indexOf(o?r:r.toLocaleLowerCase()));var C=(t,r)=>(e(t,r),s(t,r,!1));var k=(t,...r)=>{e(t);let o=!1;for(let n of r)if(s(t,n)!==-1){o=!0;break}return o};var w=(t,...r)=>{e(t);let o=!1;for(let n of r)if(s(t,n,!1)!==-1){o=!0;break}return o};var u=(t,...r)=>{e(t);let o=!0;for(let n of r)if(s(t,n)!==-1){o=!1;break}return o};0&&(module.exports={camelize,capitalize,compare,concat,contains,containsAny,containsAnyIgnoreCase,containsIgnoreCase,containsNone});
'use strict';
var f=t=>{if(typeof t!="string")throw new Error(`Expected string but got ${typeof t}`);return t.replace(/[-_\s]+(.)?/g,r=>{var o;return (o=r==null?void 0:r.toUpperCase())!=null?o:""})};var p=(t,r=" ")=>{if(typeof t!="string")throw new Error(`Expected string but got ${typeof t}`);return t==null?void 0:t.split(r).map(o=>{var e,s;return ((e=o.slice(0,1))==null?void 0:e.toUpperCase())+((s=o.slice(1))==null?void 0:s.toLowerCase())}).join(r)};var n=(...t)=>{for(let r of t)if(typeof r!="string")throw new Error(`Expected string but got ${typeof r}`)};var c=(t,r)=>{if(n(t,r),t.length!==r.length)return t.length-r.length;for(let o=0;o<t.length&&o<r.length;o++){let e=t.charCodeAt(o),s=r.charCodeAt(o);if(e!==s)return e-s}return 0};var h=(...t)=>{let r="";for(let o of t)r+=o||"";return r};var i=(t,r,o=!0)=>(n(t,r),(o?t:t.toLocaleLowerCase()).indexOf(o?r:r.toLocaleLowerCase()));var u=(t,r)=>(n(t,r),i(t,r,!1));var A=(t,...r)=>{n(t);let o=!1;for(let e of r)if(i(t,e)!==-1){o=!0;break}return o};var U=(t,...r)=>{n(t);let o=!1;for(let e of r)if(i(t,e,!1)!==-1){o=!0;break}return o};var _=(t,...r)=>{n(t);let o=!0;for(let e of r)if(i(t,e)!==-1){o=!1;break}return o};
exports.camelize = f;
exports.capitalize = p;
exports.compare = c;
exports.concat = h;
exports.contains = i;
exports.containsAny = A;
exports.containsAnyIgnoreCase = U;
exports.containsIgnoreCase = u;
exports.containsNone = _;

18

package.json
{
"name": "es-string-utils",
"version": "0.0.4",
"version": "0.0.5",
"description": "A collection of utility functions to manipulate string in javascript and typescript",
"main": "./dist/esm/index.js",
"module": "./dist/esm/index.js",
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"author": "Aman Kumar Sharma",

@@ -11,3 +11,3 @@ "license": "MIT",

"repository": {
"url": "https://github.com/iaman0004/es-string"
"url": "https://github.com/iaman0004/es-string-utils"
},

@@ -18,3 +18,3 @@ "files": [

"scripts": {
"build": "rm -rf /dist && tsup",
"build": "rm -rf dist && tsup",
"dev": "tsup index.ts --watch"

@@ -30,7 +30,7 @@ },

"default": "./dist/index.js",
"import": "./dist/esm/index.js",
"require": "./dist/index.js",
"node": "./dist/index.js"
"import": "./dist/index.mjs",
"require": "./dist/index.mjs",
"node": "./dist/index.mjs"
},
"type": "module",
"type": "commonjs",
"publishConfig": {

@@ -37,0 +37,0 @@ "access": "public"

@@ -18,7 +18,7 @@ ### ES String Utils

```ts
import { containsAnyIgnoreCase, camelize } from 'es-string-utils';
import { containsAnyIgnoreCase, capitalize } from 'es-string-utils';
const contains = containsAnyIgnoreCase('This is the source string', 'tocheck'); //false
const camelizedText = camelize('camelize This strinG'); //Camelize This String
const capitalizedText = capitalize('capitalize This strinG'); //Capitalize This String
```

@@ -32,3 +32,3 @@

const camelizedText = stringUtils.camelize('camelize This strinG'); //Camelize This String
const capitalizedText = stringUtils.capitalize('capitalize This strinG'); //Capitalize This String
```

@@ -35,0 +35,0 @@

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