@poppinss/utils 6.0.0-0 → 6.0.0-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { safeParse } from './safe_parse.js';
2
2
  import { safeStringify } from './safe_stringify.js';
3
- declare const _default: {
3
+ declare const json: {
4
4
  safeParse: typeof safeParse;
5
5
  safeStringify: typeof safeStringify;
6
6
  };
7
- export default _default;
7
+ export default json;
@@ -1,6 +1,7 @@
1
1
  import { safeParse } from './safe_parse.js';
2
2
  import { safeStringify } from './safe_stringify.js';
3
- export default {
3
+ const json = {
4
4
  safeParse,
5
5
  safeStringify,
6
6
  };
7
+ export default json;
@@ -2,12 +2,12 @@ import { random } from './random.js';
2
2
  import { excerpt } from './excerpt.js';
3
3
  import { ordinal } from './ordinal.js';
4
4
  import { truncate } from './truncate.js';
5
- import { toSentence } from './to_sentence.js';
5
+ import { sentence } from './sentence.js';
6
6
  import { interpolate } from './interpolate.js';
7
7
  import { pluralize } from './pluralize.js';
8
8
  import { noCase, dotCase, dashCase, camelCase, snakeCase, titleCase, pascalCase, capitalCase, sentenceCase } from './change_case.js';
9
9
  declare function condenseWhitespace(value: string): string;
10
- declare const _default: {
10
+ declare const string: {
11
11
  excerpt: typeof excerpt;
12
12
  truncate: typeof truncate;
13
13
  slug: typeof import("slugify").default;
@@ -27,7 +27,7 @@ declare const _default: {
27
27
  snakeCase: typeof snakeCase;
28
28
  titleCase: typeof titleCase;
29
29
  random: typeof random;
30
- toSentence: typeof toSentence;
30
+ sentence: typeof sentence;
31
31
  condenseWhitespace: typeof condenseWhitespace;
32
32
  seconds: {
33
33
  format(seconds: number, long?: boolean | undefined): string;
@@ -43,4 +43,4 @@ declare const _default: {
43
43
  };
44
44
  ordinal: typeof ordinal;
45
45
  };
46
- export default _default;
46
+ export default string;
@@ -6,14 +6,14 @@ import { excerpt } from './excerpt.js';
6
6
  import { ordinal } from './ordinal.js';
7
7
  import { truncate } from './truncate.js';
8
8
  import milliseconds from './milliseconds.js';
9
- import { toSentence } from './to_sentence.js';
9
+ import { sentence } from './sentence.js';
10
10
  import { interpolate } from './interpolate.js';
11
11
  import { plural, pluralize, singular, isPlural, isSingular } from './pluralize.js';
12
12
  import { noCase, dotCase, dashCase, camelCase, snakeCase, titleCase, pascalCase, capitalCase, sentenceCase, } from './change_case.js';
13
13
  function condenseWhitespace(value) {
14
14
  return value.trim().replace(/\s{2,}/g, ' ');
15
15
  }
16
- export default {
16
+ const string = {
17
17
  excerpt,
18
18
  truncate,
19
19
  slug,
@@ -33,10 +33,11 @@ export default {
33
33
  snakeCase,
34
34
  titleCase,
35
35
  random,
36
- toSentence,
36
+ sentence,
37
37
  condenseWhitespace,
38
38
  seconds,
39
39
  milliseconds,
40
40
  bytes,
41
41
  ordinal,
42
42
  };
43
+ export default string;
@@ -1,4 +1,4 @@
1
- export declare function toSentence(values: any[], options?: {
1
+ export declare function sentence(values: any[], options?: {
2
2
  separator?: string;
3
3
  pairSeparator?: string;
4
4
  lastSeparator?: string;
@@ -1,4 +1,4 @@
1
- export function toSentence(values, options) {
1
+ export function sentence(values, options) {
2
2
  if (values.length === 0) {
3
3
  return '';
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poppinss/utils",
3
- "version": "6.0.0-0",
3
+ "version": "6.0.0-1",
4
4
  "description": "Handy utilities for repetitive work",
5
5
  "main": "build/index.js",
6
6
  "type": "module",