Socket
Socket
Sign inDemoInstall

@olton/string

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@olton/string - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

__tests__/truncate.test.js

0

.eslintrc.json

@@ -0,0 +0,0 @@ {

447

dist/string.js

@@ -5,36 +5,36 @@ /**

const digit = '\\d';
/**
* A regular expression string matching whitespace
*/
const whitespace = '\\s\\uFEFF\\xA0';
const whitespace = '\\s\\uFEFF\\xA0';
/**
* A regular expression string matching diacritical mark
*/
const diacriticalMark = '\\u0300-\\u036F\\u1AB0-\\u1AFF\\u1DC0-\\u1DFF\\u20D0-\\u20FF\\uFE20-\\uFE2F';
const diacriticalMark = '\\u0300-\\u036F\\u1AB0-\\u1AFF\\u1DC0-\\u1DFF\\u20D0-\\u20FF\\uFE20-\\uFE2F';
/**
* A regular expression to match the General Punctuation Unicode block
*/
const generalPunctuationBlock = '\\u2000-\\u206F';
const generalPunctuationBlock = '\\u2000-\\u206F';
/**
* A regular expression to match non characters from from Basic Latin and Latin-1 Supplement Unicode blocks
*/
const nonCharacter = '\\x00-\\x2F\\x3A-\\x40\\x5B-\\x60\\x7b-\\xBF\\xD7\\xF7';
const nonCharacter = '\\x00-\\x2F\\x3A-\\x40\\x5B-\\x60\\x7b-\\xBF\\xD7\\xF7';
/**
* A regular expression to match the dingbat Unicode block
*/
const dingbatBlock = '\\u2700-\\u27BF';
const dingbatBlock = '\\u2700-\\u27BF';
/**
* A regular expression string that matches lower case letters: LATIN
*/
const lowerCaseLetter = 'a-z\\xB5\\xDF-\\xF6\\xF8-\\xFF\\u0101\\u0103\\u0105\\u0107\\u0109\\u010B\\u010D\\u010F\\u0111\\u0113\\u0115\\u0117\\u0119\\u011B\\u011D\\u011F\\u0121\\u0123\\u0125\\u0127\\u0129\\u012B\\u012D\\u012F\\u0131\\u0133\\u0135\\u0137\\u0138\\u013A\\u013C\\u013E\\u0140\\u0142\\u0144\\u0146\\u0148\\u0149\\u014B\\u014D\\u014F\\u0151\\u0153\\u0155\\u0157\\u0159\\u015B\\u015D\\u015F\\u0161\\u0163\\u0165\\u0167\\u0169\\u016B\\u016D\\u016F\\u0171\\u0173\\u0175\\u0177\\u017A\\u017C\\u017E-\\u0180\\u0183\\u0185\\u0188\\u018C\\u018D\\u0192\\u0195\\u0199-\\u019B\\u019E\\u01A1\\u01A3\\u01A5\\u01A8\\u01AA\\u01AB\\u01AD\\u01B0\\u01B4\\u01B6\\u01B9\\u01BA\\u01BD-\\u01BF\\u01C6\\u01C9\\u01CC\\u01CE\\u01D0\\u01D2\\u01D4\\u01D6\\u01D8\\u01DA\\u01DC\\u01DD\\u01DF\\u01E1\\u01E3\\u01E5\\u01E7\\u01E9\\u01EB\\u01ED\\u01EF\\u01F0\\u01F3\\u01F5\\u01F9\\u01FB\\u01FD\\u01FF\\u0201\\u0203\\u0205\\u0207\\u0209\\u020B\\u020D\\u020F\\u0211\\u0213\\u0215\\u0217\\u0219\\u021B\\u021D\\u021F\\u0221\\u0223\\u0225\\u0227\\u0229\\u022B\\u022D\\u022F\\u0231\\u0233-\\u0239\\u023C\\u023F\\u0240\\u0242\\u0247\\u0249\\u024B\\u024D\\u024F';
const lowerCaseLetter = 'a-z\\xB5\\xDF-\\xF6\\xF8-\\xFF\\u0101\\u0103\\u0105\\u0107\\u0109\\u010B\\u010D\\u010F\\u0111\\u0113\\u0115\\u0117\\u0119\\u011B\\u011D\\u011F\\u0121\\u0123\\u0125\\u0127\\u0129\\u012B\\u012D\\u012F\\u0131\\u0133\\u0135\\u0137\\u0138\\u013A\\u013C\\u013E\\u0140\\u0142\\u0144\\u0146\\u0148\\u0149\\u014B\\u014D\\u014F\\u0151\\u0153\\u0155\\u0157\\u0159\\u015B\\u015D\\u015F\\u0161\\u0163\\u0165\\u0167\\u0169\\u016B\\u016D\\u016F\\u0171\\u0173\\u0175\\u0177\\u017A\\u017C\\u017E-\\u0180\\u0183\\u0185\\u0188\\u018C\\u018D\\u0192\\u0195\\u0199-\\u019B\\u019E\\u01A1\\u01A3\\u01A5\\u01A8\\u01AA\\u01AB\\u01AD\\u01B0\\u01B4\\u01B6\\u01B9\\u01BA\\u01BD-\\u01BF\\u01C6\\u01C9\\u01CC\\u01CE\\u01D0\\u01D2\\u01D4\\u01D6\\u01D8\\u01DA\\u01DC\\u01DD\\u01DF\\u01E1\\u01E3\\u01E5\\u01E7\\u01E9\\u01EB\\u01ED\\u01EF\\u01F0\\u01F3\\u01F5\\u01F9\\u01FB\\u01FD\\u01FF\\u0201\\u0203\\u0205\\u0207\\u0209\\u020B\\u020D\\u020F\\u0211\\u0213\\u0215\\u0217\\u0219\\u021B\\u021D\\u021F\\u0221\\u0223\\u0225\\u0227\\u0229\\u022B\\u022D\\u022F\\u0231\\u0233-\\u0239\\u023C\\u023F\\u0240\\u0242\\u0247\\u0249\\u024B\\u024D\\u024F';
/**
* A regular expression string that matches upper case letters: LATIN
*/
const upperCaseLetter = '\\x41-\\x5a\\xc0-\\xd6\\xd8-\\xde\\u0100\\u0102\\u0104\\u0106\\u0108\\u010a\\u010c\\u010e\\u0110\\u0112\\u0114\\u0116\\u0118\\u011a\\u011c\\u011e\\u0120\\u0122\\u0124\\u0126\\u0128\\u012a\\u012c\\u012e\\u0130\\u0132\\u0134\\u0136\\u0139\\u013b\\u013d\\u013f\\u0141\\u0143\\u0145\\u0147\\u014a\\u014c\\u014e\\u0150\\u0152\\u0154\\u0156\\u0158\\u015a\\u015c\\u015e\\u0160\\u0162\\u0164\\u0166\\u0168\\u016a\\u016c\\u016e\\u0170\\u0172\\u0174\\u0176\\u0178\\u0179\\u017b\\u017d\\u0181\\u0182\\u0184\\u0186\\u0187\\u0189-\\u018b\\u018e-\\u0191\\u0193\\u0194\\u0196-\\u0198\\u019c\\u019d\\u019f\\u01a0\\u01a2\\u01a4\\u01a6\\u01a7\\u01a9\\u01ac\\u01ae\\u01af\\u01b1-\\u01b3\\u01b5\\u01b7\\u01b8\\u01bc\\u01c4\\u01c5\\u01c7\\u01c8\\u01ca\\u01cb\\u01cd\\u01cf\\u01d1\\u01d3\\u01d5\\u01d7\\u01d9\\u01db\\u01de\\u01e0\\u01e2\\u01e4\\u01e6\\u01e8\\u01ea\\u01ec\\u01ee\\u01f1\\u01f2\\u01f4\\u01f6-\\u01f8\\u01fa\\u01fc\\u01fe\\u0200\\u0202\\u0204\\u0206\\u0208\\u020a\\u020c\\u020e\\u0210\\u0212\\u0214\\u0216\\u0218\\u021a\\u021c\\u021e\\u0220\\u0222\\u0224\\u0226\\u0228\\u022a\\u022c\\u022e\\u0230\\u0232\\u023a\\u023b\\u023d\\u023e\\u0241\\u0243-\\u0246\\u0248\\u024a\\u024c\\u024e';

@@ -45,24 +45,23 @@

*/
const REGEXP_TRIM_LEFT = new RegExp('^[' + whitespace + ']+');
const REGEXP_TRIM_LEFT = new RegExp('^[' + whitespace + ']+');
/**
* Regular expression to match whitespaces from the right side
*/
const REGEXP_TRIM_RIGHT = new RegExp('[' + whitespace + ']+$');
const REGEXP_TRIM_RIGHT = new RegExp('[' + whitespace + ']+$');
/**
* Regular expression to match digit characters
*/
const REGEXP_DIGIT = new RegExp('^' + digit + '+$');
const REGEXP_DIGIT = new RegExp('^' + digit + '+$');
/**
* Regular expression to match HTML special characters.
*/
const REGEXP_HTML_SPECIAL_CHARACTERS = /[<>&"'`]/g;
const REGEXP_TAGS = /(<([^>]+)>)/ig;
/**
* Regular expression to match Unicode words
*/
const REGEXP_WORD = new RegExp('(?:[' + upperCaseLetter + '][' + diacriticalMark + ']*)?(?:[' + lowerCaseLetter + '][' + diacriticalMark + ']*)+|\

@@ -73,25 +72,24 @@ (?:[' + upperCaseLetter + '][' + diacriticalMark + ']*)+(?![' + lowerCaseLetter + '])|\

[^' + nonCharacter + generalPunctuationBlock + whitespace + ']+', 'g');
/**
* Regular expression to match words from Basic Latin and Latin-1 Supplement blocks
*/
const REGEXP_LATIN_WORD = /[A-Z\xC0-\xD6\xD8-\xDE]?[a-z\xDF-\xF6\xF8-\xFF]+|[A-Z\xC0-\xD6\xD8-\xDE]+(?![a-z\xDF-\xF6\xF8-\xFF])|\d+/g;
const REGEXP_LATIN_WORD = /[A-Z\xC0-\xD6\xD8-\xDE]?[a-z\xDF-\xF6\xF8-\xFF]+|[A-Z\xC0-\xD6\xD8-\xDE]+(?![a-z\xDF-\xF6\xF8-\xFF])|\d+/g;
/**
* Regular expression to match alpha characters
*/
const REGEXP_ALPHA = new RegExp('^(?:[' + lowerCaseLetter + upperCaseLetter + '][' + diacriticalMark + ']*)+$');
const REGEXP_ALPHA = new RegExp('^(?:[' + lowerCaseLetter + upperCaseLetter + '][' + diacriticalMark + ']*)+$');
/**
* Regular expression to match alpha and digit characters
*/
const REGEXP_ALPHA_DIGIT = new RegExp('^((?:[' + lowerCaseLetter + upperCaseLetter + '][' + diacriticalMark + ']*)|[' + digit + '])+$');
const REGEXP_ALPHA_DIGIT = new RegExp('^((?:[' + lowerCaseLetter + upperCaseLetter + '][' + diacriticalMark + ']*)|[' + digit + '])+$');
/**
* Regular expression to match Extended ASCII characters, i.e. the first 255
*/
const REGEXP_EXTENDED_ASCII = /^[\x01-\xFF]*$/;
const toStr = function (val) {
let def = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
const toStr = (val, def = "") => {
if (!val) return def;

@@ -110,6 +108,4 @@ if (typeof val === "string") return val;

* */
const words = (s, pattern, flags) => {
let regexp;
if (!pattern) {

@@ -122,13 +118,8 @@ regexp = REGEXP_EXTENDED_ASCII.test(s) ? REGEXP_LATIN_WORD : REGEXP_WORD;

}
return nvl(toStr(s).match(regexp), []);
};
const capitalize = function (s) {
let strong = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
const capitalize = (s, strong = false) => {
let _s = toStr(s);
let last = _s.substr(1);
return _s.substr(0, 1).toUpperCase() + (strong ? last.toLowerCase() : last);

@@ -147,10 +138,6 @@ };

let _s = toStr(s);
return _s.substr(0, 1).toLowerCase() + _s.substr(1);
};
const kebab = function (s) {
let joinWith = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '-';
return words(toStr(s)).map(el => el.toLowerCase()).join(joinWith);
};
const kebab = (s, joinWith = '-') => words(toStr(s)).map(el => el.toLowerCase()).join(joinWith);

@@ -162,17 +149,11 @@ const lower = s => toStr(s).toLowerCase();

* */
const chars$1 = (s, ignore = []) => toStr(s).split("").filter(el => !ignore.includes(el));
const chars$1 = function (s) {
let ignore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
return toStr(s).split("").filter(el => !ignore.includes(el));
};
const reverse = (s, ignore) => chars$1(toStr(s), ignore).reverse().join("");
const shuffleArray = function () {
let a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
const shuffleArray = (a = []) => {
let _a = [...a];
let i = _a.length,
t,
r;
t,
r;
while (0 !== i) {

@@ -185,3 +166,2 @@ r = Math.floor(Math.random() * i);

}
return _a;

@@ -199,10 +179,6 @@ };

};
const swap = s => toStr(s).split("").reduce(_swap, '');
const title = function (s, noSplit) {
let sep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
const title = (s, noSplit, sep = "") => {
let _s = toStr(s);
const regexp = REGEXP_EXTENDED_ASCII.test(_s) ? REGEXP_LATIN_WORD : REGEXP_WORD;

@@ -221,9 +197,6 @@ const noSplitArray = Array.isArray(noSplit) ? noSplit : typeof noSplit !== "string" ? [] : noSplit.split(sep);

* */
const count = s => toStr(s).length;
const uniqueArray = function () {
let a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
const uniqueArray = (a = []) => {
let _a = [...a];
for (let i = 0; i < _a.length; ++i) {

@@ -234,3 +207,2 @@ for (let j = i + 1; j < _a.length; ++j) {

}
return _a;

@@ -242,9 +214,5 @@ };

const countSubstr = function (s) {
let sub = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
const countSubstr = (s, sub = "") => {
let _s = toStr(s);
let _sub = toStr(sub);
return _s === '' || _sub === '' ? 0 : _s.split(_sub).length - 1;

@@ -264,7 +232,5 @@ };

};
function replaceSpecialCharacter(character) {
return escapeCharactersMap[character];
}
const escapeHtml = s => toStr(s).replace(REGEXP_HTML_SPECIAL_CHARACTERS, replaceSpecialCharacter);

@@ -281,7 +247,5 @@

const chars = Object.keys(unescapeCharsMap);
function reduceUnescapedString(string, key) {
return string.replace(unescapeCharsMap[key], key);
}
const unescapeHtml = s => chars.reduce(reduceUnescapedString, toStr(s));

@@ -296,24 +260,15 @@

* */
const substring = (s, start, len) => toStr(s).substring(start, len);
const substr = (s, start, len) => toStr(s).substr(start, len);
/*
* Get N first chars from string.
* */
const first = (s, len = 0) => substring(toStr(s), 0, len);
const first = function (s) {
let len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
return substr(toStr(s), 0, len);
};
/*
* Get N last chars from string.
* */
const last = function (s) {
let len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
const last = (s, len = 0) => {
let _s = toStr(s);
return _s ? substr(_s, _s.length - len) : '';
return _s ? substring(_s, _s.length - len) : '';
};

@@ -324,4 +279,3 @@

const clip = function (val, min) {
let max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : MAX_SAFE_INTEGER;
const clip = (val, min, max = MAX_SAFE_INTEGER) => {
if (val < min) return min;

@@ -341,13 +295,11 @@ if (val > max) return max;

* */
const truncate = function (s) {
let len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
let end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '...';
const truncate = (s, len = 0, end = '...') => {
let _s = toStr(s);
let _len = !len ? _s.length : clip(toInt(len), 0, MAX_SAFE_INTEGER);
return substr(_s, 0, _len) + (_s.length === _len ? '' : end);
return substring(_s, 0, _len) + (_s.length === _len ? '' : end);
};
const truncateWithAlign = (s, len = 0, end = '...') => {
const truncatedText = truncate(s, len, '');
return truncatedText.slice(s, truncatedText.lastIndexOf(" ")) + end;
};

@@ -357,15 +309,9 @@ /*

* */
const slice = function (s) {
let parts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
const slice = (s, parts = 1) => {
let _s = toStr(s);
let res = [];
let len = Math.round(_s.length / parts);
for (let i = 0; i < parts; i++) {
res.push(substr(_s, i * len, len));
res.push(substring(_s, i * len, len));
}
return res;

@@ -377,17 +323,9 @@ };

* */
const prune = function (s) {
let len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
let end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
const prune = (s, len = 0, end = "") => {
let _s = toStr(s);
let _len = !len ? _s.length : clip(toInt(len), 0, MAX_SAFE_INTEGER);
let _truncatedLen = 0;
const pattern = REGEXP_EXTENDED_ASCII.test(_s) ? REGEXP_LATIN_WORD : REGEXP_WORD;
_s.replace(pattern, (word, offset) => {
const wordLength = offset + word.length;
if (wordLength <= _len - end.length) {

@@ -397,98 +335,58 @@ _truncatedLen = wordLength;

});
return _s.substr(0, _truncatedLen) + end;
return _s.substring(0, _truncatedLen) + end;
};
const repeat = function (s) {
let times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
const repeat = (s, times = 0) => {
let _s = toStr(s);
let _times = !times ? _s.length : clip(toInt(times), 0, MAX_SAFE_INTEGER);
const _origin = _s;
if (times === 0) {
return "";
}
for (let i = 0; i < _times - 1; i++) {
_s += _origin;
}
return _s;
};
const padBuilder = function (pad) {
let len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
const padBuilder = (pad, len = 0) => {
const padLength = pad.length;
const length = len - padLength;
return repeat(pad, length + 1).substr(0, len);
return repeat(pad, length + 1).substring(0, len);
};
const _pad = function (s) {
let pad = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
let len = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
let left = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
const _pad = (s, pad = "", len = 0, left = false) => {
let _s = toStr(s);
let _len = !len ? _s.length : clip(toInt(len), 0, MAX_SAFE_INTEGER);
let _padLen = pad.length;
let _paddingLen = _len - _s.length;
let _sideLen = _paddingLen;
if (_paddingLen <= 0 || _padLen === 0) {
return _s;
}
let pads = padBuilder(pad, _sideLen);
return left ? pads + _s : _s + pads;
};
const lpad = function (s) {
let pad = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
let len = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
const lpad = (s, pad = ' ', len = 0) => {
return _pad(s, pad, len, true);
};
const rpad = function (s) {
let pad = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
let len = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
const rpad = (s, pad = ' ', len = 0) => {
return _pad(s, pad, len, false);
};
const pad = function (s) {
let pad = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
let len = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
const pad = (s, pad = '', len = 0) => {
let _s = toStr(s);
let _len = !len ? _s.length : clip(toInt(len), 0, MAX_SAFE_INTEGER);
let _padLen = pad.length;
let _paddingLen = _len - _s.length;
let _sideLen = toInt(_paddingLen / 2); //?
let _remainingLen = _paddingLen % 2; //?
if (_paddingLen <= 0 || _padLen === 0) {
return _s;
}
return padBuilder(pad, _sideLen) + _s + padBuilder(pad, _sideLen + _remainingLen); //?
};
const insert = function (s) {
let sbj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
let pos = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
const insert = (s, sbj = '', pos = 0) => {
let _s = toStr(s);
return _s.substr(0, pos) + sbj + _s.substr(pos);
return _s.substring(0, pos) + sbj + _s.substring(pos);
};

@@ -501,15 +399,11 @@

let _s = toStr(s);
if (!ws) {
return _s.replace(REGEXP_TRIM_LEFT, '');
}
if (ws === '' || _s === '') {
return _s;
}
if (typeof ws !== "string") {
ws = '';
}
let match = true;

@@ -520,3 +414,2 @@ return reduce.call(_s, (trimmed, char) => {

}
match = false;

@@ -528,15 +421,11 @@ return trimmed + char;

let _s = toStr(s);
if (!ws) {
return _s.replace(REGEXP_TRIM_RIGHT, '');
}
if (ws === '' || _s === '') {
return _s;
}
if (typeof ws !== "string") {
ws = '';
}
let match = true;

@@ -547,3 +436,2 @@ return reduceRight.call(_s, (trimmed, char) => {

}
match = false;

@@ -562,6 +450,3 @@ return char + trimmed;

const isBlank = function (s) {
let strong = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
return strong ? toStr(s).length === 0 : trim(s).length === 0;
};
const isBlank = (s, strong = true) => strong ? toStr(s).length === 0 : trim(s).length === 0;

@@ -574,10 +459,7 @@ const isEmpty = s => trim(s).length === 0;

const startWith = (s, start, pos) => toStr(s).startsWith(start, pos);
const startsWith = (s, start, pos) => toStr(s).startsWith(start, pos);
const stripTagsAll = s => toStr(s).replace(REGEXP_TAGS, '');
const stripTags = function (s) {
let allowed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
const stripTags = (s, allowed = []) => {
let _s = toStr(s);
let tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi;

@@ -595,2 +477,3 @@ return _s.replace(tags, ($0, $1) => {

* */
const re = {

@@ -613,15 +496,13 @@ not_string: /[^s]/,

};
function sprintf_format(parse_tree, argv) {
let cursor = 1,
tree_length = parse_tree.length,
arg,
output = '',
ph,
pad,
pad_character,
pad_length,
is_positive,
sign;
tree_length = parse_tree.length,
arg,
output = '',
ph,
pad,
pad_character,
pad_length,
is_positive,
sign;
for (let i = 0; i < tree_length; i++) {

@@ -632,7 +513,5 @@ if (typeof parse_tree[i] === 'string') {

ph = parse_tree[i]; // convenience purposes only
if (ph.keys) {
// keyword argument
arg = argv[cursor];
for (let k = 0; k < ph.keys.length; k++) {

@@ -642,3 +521,2 @@ if (typeof arg === "undefined") {

}
arg = arg[ph.keys[k]];

@@ -653,15 +531,11 @@ }

}
if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {
arg = arg();
}
if (re.numeric_arg.test(ph.type) && typeof arg !== 'number' && isNaN(arg)) {
throw new TypeError(sprintf('[sprintf] expecting number but found %T'));
}
if (re.number.test(ph.type)) {
is_positive = arg >= 0;
}
switch (ph.type) {

@@ -671,7 +545,5 @@ case 'b':

break;
case 'c':
arg = String.fromCharCode(parseInt(arg, 10));
break;
case 'd':

@@ -681,23 +553,17 @@ case 'i':

break;
case 'j':
arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0);
break;
case 'e':
arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential();
break;
case 'f':
arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg);
break;
case 'g':
arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg);
break;
case 'o':
arg = (parseInt(arg, 10) >>> 0).toString(8);
break;
case 's':

@@ -707,3 +573,2 @@ arg = String(arg);

break;
case 't':

@@ -713,3 +578,2 @@ arg = String(!!arg);

break;
case 'T':

@@ -719,7 +583,5 @@ arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase();

break;
case 'u':
arg = parseInt(arg, 10) >>> 0;
break;
case 'v':

@@ -729,7 +591,5 @@ arg = arg.valueOf();

break;
case 'x':
arg = (parseInt(arg, 10) >>> 0).toString(16);
break;
case 'X':

@@ -739,3 +599,2 @@ arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase();

}
if (re.json.test(ph.type)) {

@@ -750,3 +609,2 @@ output += arg;

}
pad_character = ph.pad_char ? ph.pad_char === '0' ? '0' : ph.pad_char.charAt(1) : ' ';

@@ -759,8 +617,5 @@ pad_length = ph.width - (sign + arg).length;

}
return output;
}
const sprintf_cache = Object.create(null);
function sprintf_parse(fmt) {

@@ -770,8 +625,6 @@ if (sprintf_cache[fmt]) {

}
let _fmt = fmt,
match,
parse_tree = [],
arg_names = 0;
match,
parse_tree = [],
arg_names = 0;
while (_fmt) {

@@ -786,8 +639,6 @@ if ((match = re.text.exec(_fmt)) !== null) {

let field_list = [],
replacement_field = match[2],
field_match = [];
replacement_field = match[2],
field_match = [];
if ((field_match = re.key.exec(replacement_field)) !== null) {
field_list.push(field_match[1]);
while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {

@@ -805,3 +656,2 @@ if ((field_match = re.key_access.exec(replacement_field)) !== null) {

}
match[2] = field_list;

@@ -811,7 +661,5 @@ } else {

}
if (arg_names === 3) {
throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported');
}
parse_tree.push({

@@ -831,9 +679,6 @@ placeholder: match[0],

}
_fmt = _fmt.substring(match[0].length);
}
return sprintf_cache[fmt] = parse_tree;
}
const sprintf = key => sprintf_format(sprintf_parse(key), arguments);

@@ -844,15 +689,8 @@ const vsprintf = (fmt, argv) => sprintf.apply(null, [fmt].concat(argv || []));

const split = function (str) {
let sep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
let limit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
let trim = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
const split = (str, sep = undefined, limit = undefined, trim = true) => {
return toStr(str).split(sep, limit).map(el => trim ? el.trim() : el).filter(el => trim ? !isEmpty(el) : true);
};
const strip = function (str) {
let what = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
let replace = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
const strip = (str, what = null, replace = "") => {
let _str = toStr(str);
let regexp;

@@ -864,58 +702,31 @@ if (!what) return _str;

const wrapTag = function (s) {
let tag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "div";
return `<${tag}>${toStr(s)}</${tag}>`;
};
const wrap = function (s) {
let before = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
let after = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
return before + toStr(s) + after;
};
const wrapTag = (s, tag = "div") => `<${tag}>${toStr(s)}</${tag}>`;
const wrap = (s, before = "", after = "") => before + toStr(s) + after;
const isString = s => typeof s === "string";
const matches = function (s, pattern) {
let flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
const matches = (s, pattern, flags = '') => {
let _s = toStr(s);
let patternStr;
if (!(pattern instanceof RegExp)) {
patternStr = pattern ? trim(toStr(pattern)) : '';
if (!patternStr) {
return false;
}
pattern = new RegExp(patternStr, flags);
}
return pattern.test(_s);
};
const append = function (s) {
let what = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
let times = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
return toStr(s) + repeat(what, times);
};
const append = (s, what = '', times = 1) => toStr(s) + repeat(what, times);
const prepend = function (s) {
let what = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
let times = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
return repeat(what, times) + toStr(s);
};
const prepend = (s, what = '', times = 1) => repeat(what, times) + toStr(s);
const stripBoom = s => {
let _s = toStr(s);
if (_s === '') return _s;
return _s[0] === BYTE_ORDER_MARK ? _s.substr(1) : _s;
return _s[0] === BYTE_ORDER_MARK ? _s.substring(1) : _s;
};
const shorten = function (v) {
let l = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5;
let d = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '...';
return !v ? v : `${v.substring(0, l)}${d}${v.substring(v.length - l)}`;
};
const shorten = (v, l = 5, d = '...') => !v ? v : `${v.substring(0, l)}${d}${v.substring(v.length - l)}`;

@@ -949,6 +760,7 @@ var f = {

uniqueWords,
substr,
substring,
first,
last,
truncate,
truncateWithAlign,
slice,

@@ -972,3 +784,3 @@ prune,

isUpper,
startWith,
startsWith,
stripTags,

@@ -990,11 +802,8 @@ stripTagsAll,

class Str {
constructor() {
let v = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
let {
mutable = true
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
constructor(v = "", {
mutable = true
} = {}) {
this.value = v.toString();
this.mutable = mutable;
}
[Symbol.toPrimitive](hint) {

@@ -1004,10 +813,7 @@ if (hint === "number") {

}
return this.value;
}
get [Symbol.toStringTag]() {
return "Str";
}
val(v) {

@@ -1018,16 +824,11 @@ if (typeof v === "undefined" || v === null) return this.value;

}
get length() {
return this.value.length;
}
immutable() {
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
immutable(state = true) {
this.mutable = !state;
}
toString() {
return this.value;
}
_result(v) {

@@ -1037,269 +838,195 @@ if (!this.mutable) {

}
this.value = v;
return this;
}
camelCase() {
return this._result(f.camelCase(this.value));
}
capitalize(strong) {
return this._result(f.capitalize(this.value, strong));
}
chars(ignore) {
return this._result(f.chars(this.value, ignore));
}
count() {
return f.count(this.value);
}
countChars(ignore) {
return f.countChars(this.value, ignore);
}
countUniqueChars(ignore) {
return f.countUniqueChars(this.value, ignore);
}
countSubstr(sub) {
return f.countSubstr(this.value, sub);
}
countWords(pattern, flags) {
return f.countChars(this.value, pattern, flags);
}
countUniqueWords(pattern, flags) {
return f.countUniqueChars(this.value, pattern, flags);
}
dashedName() {
return this._result(f.dashedName(this.value));
}
decapitalize() {
return this._result(f.decapitalize(this.value));
}
endsWith(str, pos) {
return f.endsWith(this.value, str, pos);
}
escapeHtml() {
return this._result(f.escapeHtml(this.value));
}
first() {
return this._result(f.first(this.value));
}
includes(sub, pos) {
return f.includes(this.value, sub, pos);
}
insert(str, pos) {
return this._result(f.insert(this.value, str, pos));
}
isAlpha() {
return f.isAlpha(this.value);
}
isAlphaDigit() {
return f.isAlphaDigit(this.value);
}
isBlank(strong) {
return f.isBlank(this.value, strong);
}
isDigit() {
return f.isDigit(this.value);
}
isEmpty() {
return f.isEmpty(this.value);
}
isLower() {
return f.isLower(this.value);
}
static isString(v) {
return f.isString(v);
}
isUpper() {
return f.isUpper(this.value);
}
kebab(joinWith) {
return this._result(f.kebab(this.value, joinWith));
}
last(len) {
return this._result(f.last(this.value, len));
}
lower() {
return this._result(f.lower(this.value));
}
matches(pattern, flags) {
return f.matches(this.value, pattern, flags);
}
pad(pad, len) {
return this._result(f.pad(this.value, pad, len));
}
lpad(pad, len) {
return this._result(f.lpad(this.value, pad, len));
}
rpad(pad, len) {
return this._result(f.rpad(this.value, pad, len));
}
prune(len, end) {
return this._result(f.prune(this.value, len, end));
}
repeat(times) {
return this._result(f.repeat(this.value, times));
}
append(str, times) {
return this._result(f.append(this.value, str, times));
}
prepend(str, times) {
return this._result(f.prepend(this.value, str, times));
}
reverse(ignore) {
return this._result(f.reverse(this.value, ignore));
}
shuffle() {
return this._result(f.shuffle(this.value));
}
slice(parts) {
return this._result(f.slice(this.value, parts));
}
snake() {
return this._result(f.snake(this.value));
}
split(sep, limit, trim) {
return this._result(f.split(this.value, sep, limit, trim));
}
sprintf() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
sprintf(...args) {
return this._result(f.sprintf(this.value, ...args));
}
vsprintf() {
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
vsprintf(...args) {
return this._result(f.vsprintf(this.value, ...args));
}
startWith(str, pos) {
return f.startWith(this.value, str, pos);
startsWith(str, pos) {
return f.startsWith(this.value, str, pos);
}
stripBoom() {
return this._result(f.stripBoom(this.value));
}
stripTags(allowed) {
return this._result(f.stripTags(this.value, allowed));
}
stripTagsAll() {
return this._result(f.stripTagsAll(this.value));
}
strip(str, replace) {
return this._result(f.strip(this.value, str, replace));
}
substr(start, len) {
return this._result(f.substr(this.value, start, len));
}
swap() {
return this._result(f.swap(this.value));
}
title(noSplit, sep) {
return this._result(f.title(this.value, noSplit, sep));
}
trim(ws) {
return this._result(f.trim(this.value, ws));
}
ltrim(ws) {
return this._result(f.ltrim(this.value, ws));
}
rtrim(ws) {
return this._result(f.rtrim(this.value, ws));
}
truncate(len, end) {
return this._result(f.truncate(this.value, len, end));
}
unescapeHtml() {
return this._result(f.unescapeHtml(this.value));
}
unique(ignore) {
return this._result(f.unique(this.value, ignore));
}
uniqueWords(pattern, flags) {
return this._result(f.uniqueWords(this.value, pattern, flags));
}
upper() {
return this._result(f.upper(this.value));
}
words(pattern, flags) {
return f.words(this.value, pattern, flags);
}
wrap(before, after) {
return this._result(f.wrap(this.value, before, after));
}
wrapTag(tag) {
return this._result(f.wrapTag(this.value, tag));
}
shorten(l, d) {
return this._result(f.shorten(this.value, l, d));
}
}
Object.assign(Str, f);
const str = v => new Str(v);
export { Str, str };
{
"name": "@olton/string",
"version": "0.4.1",
"version": "0.4.2",
"description": "String is a minimalist JavaScript library for manipulating with strings for node and modern browsers with a comfortable modern API.",

@@ -39,12 +39,12 @@ "main": "dist/string.js",

"devDependencies": {
"@babel/cli": "^7.17.10",
"@babel/core": "^7.18.2",
"@babel/plugin-proposal-throw-expressions": "^7.16.7",
"@babel/preset-env": "^7.18.2",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-json": "^4.1.0",
"chai": "^4.3.6",
"jest": "^28.1.0",
"rollup": "^2.75.5",
"@babel/cli": "^7.23.4",
"@babel/core": "^7.23.6",
"@babel/plugin-proposal-throw-expressions": "^7.23.3",
"@babel/preset-env": "^7.23.6",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.1.0",
"chai": "^4.3.10",
"jest": "^29.7.0",
"rollup": "^4.9.0",
"rollup-plugin-terser": "^7.0.2",

@@ -51,0 +51,0 @@ "shx": "^0.3.4"

@@ -213,4 +213,4 @@ import f from "./functions"

startWith(str, pos){
return f.startWith(this.value, str, pos)
startsWith(str, pos){
return f.startsWith(this.value, str, pos)
}

@@ -217,0 +217,0 @@

@@ -1,53 +0,53 @@

import {camelCase} from "../plugins/camel_case"
import {capitalize} from "../plugins/capitalize"
import {dashedName} from "../plugins/dashed_name"
import {decapitalize} from "../plugins/decapitalize"
import {kebab} from "../plugins/kebab_case"
import {lower} from "../plugins/lower_case"
import {reverse} from "../plugins/reverse"
import {shuffle} from "../plugins/shuffle"
import {snake} from "../plugins/snake_case"
import {swap} from "../plugins/swap"
import {title} from "../plugins/title_case"
import {upper} from "../plugins/upper_case"
import {chars} from "../plugins/chars"
import {count} from "../plugins/count"
import {countChars, countUniqueChars} from "../plugins/count_chars"
import {countSubstr} from "../plugins/count_substrings"
import {countWords, countUniqueWords} from "../plugins/count_words"
import {escapeHtml} from "../plugins/escape_html"
import {unescapeHtml} from "../plugins/unescape_html"
import {unique} from "../plugins/unique"
import {uniqueWords} from "../plugins/uniqueWords"
import {substr} from "../plugins/substr"
import {first} from "../plugins/first"
import {last} from "../plugins/last"
import {truncate} from "../plugins/truncate"
import {slice} from "../plugins/slice"
import {prune} from "../plugins/prune"
import {repeat} from "../plugins/repeat"
import { pad, lpad, rpad } from "../plugins/pad"
import {insert} from "../plugins/insert"
import {trim, rtrim, ltrim} from "../plugins/trim"
import {endsWith} from "../plugins/ends_with"
import {isAlpha} from "../plugins/is_alpha"
import {isAlphaDigit} from "../plugins/is_alpha_digit"
import {isDigit} from "../plugins/is_digit"
import {isBlank} from "../plugins/is_blank"
import {isEmpty} from "../plugins/is_empty"
import {isLower} from "../plugins/is_lower"
import {isUpper} from "../plugins/is_upper"
import {startWith} from "../plugins/start_with"
import {stripTags, stripTagsAll} from "../plugins/strip_tags"
import {sprintf, vsprintf} from "../plugins/sprintf"
import {includes} from "../plugins/includes"
import {split} from "../plugins/split"
import {strip} from "../plugins/strip"
import {wrap, wrapTag} from "../plugins/wrap"
import {words} from "../plugins/words"
import {isString} from "../plugins/is_string"
import {matches} from "../plugins/matches"
import {append} from "../plugins/append"
import {prepend} from "../plugins/prepend"
import {stripBoom} from "../plugins/strip_bom"
import {camelCase} from "../plugins/camel_case.js"
import {capitalize} from "../plugins/capitalize.js"
import {dashedName} from "../plugins/dashed_name.js"
import {decapitalize} from "../plugins/decapitalize.js"
import {kebab} from "../plugins/kebab_case.js"
import {lower} from "../plugins/lower_case.js"
import {reverse} from "../plugins/reverse.js"
import {shuffle} from "../plugins/shuffle.js"
import {snake} from "../plugins/snake_case.js"
import {swap} from "../plugins/swap.js"
import {title} from "../plugins/title_case.js"
import {upper} from "../plugins/upper_case.js"
import {chars} from "../plugins/chars.js"
import {count} from "../plugins/count.js"
import {countChars, countUniqueChars} from "../plugins/count_chars.js"
import {countSubstr} from "../plugins/count_substrings.js"
import {countWords, countUniqueWords} from "../plugins/count_words.js"
import {escapeHtml} from "../plugins/escape_html.js"
import {unescapeHtml} from "../plugins/unescape_html.js"
import {unique} from "../plugins/unique.js"
import {uniqueWords} from "../plugins/unique_words.js"
import {substring} from "../plugins/substr.js"
import {first} from "../plugins/first.js"
import {last} from "../plugins/last.js"
import {truncate, truncateWithAlign} from "../plugins/truncate.js"
import {slice} from "../plugins/slice.js"
import {prune} from "../plugins/prune.js"
import {repeat} from "../plugins/repeat.js"
import { pad, lpad, rpad } from "../plugins/pad.js"
import {insert} from "../plugins/insert.js"
import {trim, rtrim, ltrim} from "../plugins/trim.js"
import {endsWith} from "../plugins/ends_with.js"
import {isAlpha} from "../plugins/is_alpha.js"
import {isAlphaDigit} from "../plugins/is_alpha_digit.js"
import {isDigit} from "../plugins/is_digit.js"
import {isBlank} from "../plugins/is_blank.js"
import {isEmpty} from "../plugins/is_empty.js"
import {isLower} from "../plugins/is_lower.js"
import {isUpper} from "../plugins/is_upper.js"
import {startsWith} from "../plugins/starts_with.js"
import {stripTags, stripTagsAll} from "../plugins/strip_tags.js"
import {sprintf, vsprintf} from "../plugins/sprintf.js"
import {includes} from "../plugins/includes.js"
import {split} from "../plugins/split.js"
import {strip} from "../plugins/strip.js"
import {wrap, wrapTag} from "../plugins/wrap.js"
import {words} from "../plugins/words.js"
import {isString} from "../plugins/is_string.js"
import {matches} from "../plugins/matches.js"
import {append} from "../plugins/append.js"
import {prepend} from "../plugins/prepend.js"
import {stripBoom} from "../plugins/strip_bom.js"
import {shorten} from "../plugins/shorten.js"

@@ -82,6 +82,7 @@

uniqueWords,
substr,
substring,
first,
last,
truncate,
truncateWithAlign,
slice,

@@ -105,3 +106,3 @@ prune,

isUpper,
startWith,
startsWith,
stripTags,

@@ -108,0 +109,0 @@ stripTagsAll,

@@ -1,3 +0,3 @@

import {toStr} from "../helpers/string/to_string";
import {substr} from "./substr";
import {toStr} from "../helpers/string/to_string.js";
import {substring} from "./substr.js";

@@ -7,2 +7,2 @@ /*

* */
export const first = (s, len = 0) => substr(toStr(s), 0, len);
export const first = (s, len = 0) => substring(toStr(s), 0, len);

@@ -5,3 +5,3 @@ import {toStr} from "../helpers/string/to_string";

let _s = toStr(s);
return _s.substr(0, pos) + sbj + _s.substr(pos)
return _s.substring(0, pos) + sbj + _s.substring(pos)
}

@@ -1,3 +0,3 @@

import {toStr} from "../helpers/string/to_string";
import {substr} from "./substr";
import {toStr} from "../helpers/string/to_string.js";
import {substring} from "./substr.js";

@@ -9,3 +9,3 @@ /*

let _s = toStr(s);
return _s ? substr(_s, _s.length - len) : '';
return _s ? substring(_s, _s.length - len) : '';
}

@@ -11,3 +11,3 @@ import {toStr} from "../helpers/string/to_string"

return repeat(pad, length + 1).substr(0, len)
return repeat(pad, length + 1).substring(0, len)
}

@@ -14,0 +14,0 @@

@@ -23,3 +23,3 @@ import {toStr} from "../helpers/string/to_string"

return _s.substr(0, _truncatedLen) + end;
return _s.substring(0, _truncatedLen) + end;
}

@@ -1,3 +0,3 @@

import {toStr} from "../helpers/string/to_string";
import {substr} from "./substr";
import {toStr} from "../helpers/string/to_string.js";
import {substring} from "./substr.js";

@@ -14,3 +14,3 @@ /*

res.push(
substr(_s, i * len, len)
substring(_s, i * len, len)
)

@@ -17,0 +17,0 @@ }

@@ -7,3 +7,3 @@ import {toStr} from "../helpers/string/to_string";

if (_s === '') return _s
return _s[0] === BYTE_ORDER_MARK ? _s.substr(1) : _s
return _s[0] === BYTE_ORDER_MARK ? _s.substring(1) : _s
}

@@ -6,2 +6,2 @@ import {toStr} from "../helpers/string/to_string";

* */
export const substr = (s, start, len) => toStr(s).substr(start, len);
export const substring = (s, start, len) => toStr(s).substring(start, len);
import {toStr} from "../helpers/string/to_string";
import {substr} from "./substr";
import {substring} from "./substr";
import {clip} from "../helpers/number/clip"

@@ -14,3 +14,8 @@ import {toInt} from "../helpers/number/to_integer";

return substr(_s, 0, _len) + (_s.length === _len ? '' : end)
return substring(_s, 0, _len) + (_s.length === _len ? '' : end)
}
export const truncateWithAlign = (s, len = 0, end = '...') => {
const truncatedText = truncate(s, len, '')
return truncatedText.slice(s, truncatedText.lastIndexOf(" ")) + end
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc