Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v0.15.0
-------

Support ESM Modules

v0.14.3
-------
Expand Down
1 change: 1 addition & 0 deletions esm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "module"}
29 changes: 29 additions & 0 deletions esm/wrapper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import mod from "../lib/string.js";

export default mod;
export const StringNumber = mod.StringNumber;
export const ansi = mod.ansi;
export const camelCaseToDash = mod.camelCaseToDash;
export const camelCaseToDashed = mod.camelCaseToDashed;
export const camelCaseToSeparated = mod.camelCaseToSeparated;
export const createFormatter = mod.createFormatter;
export const createMarkup = mod.createMarkup;
export const escape = mod.escape;
export const format = mod.format;
export const formatMethod = mod.formatMethod;
export const fuzzy = mod.fuzzy;
export const inspect = mod.inspect;
export const inspectError = mod.inspectError;
export const inspectStack = mod.inspectStack;
export const latinize = mod.latinize;
export const markup = mod.markup;
export const markupMethod = mod.markupMethod;
export const naturalSort = mod.naturalSort;
export const occurrenceCount = mod.occurrenceCount;
export const regexp = mod.regexp;
export const resize = mod.resize;
export const stripMarkup = mod.stripMarkup;
export const toCamelCase = mod.toCamelCase;
export const toTitleCase = mod.toTitleCase;
export const unicode = mod.unicode;
export const wordwrap = mod.wordwrap;
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "string-kit",
"version": "0.14.3",
"version": "0.15.0",
"engines": {
"node": ">=14.15.0"
},
Expand All @@ -10,9 +10,16 @@
"test": "test",
"bench": "bench"
},
"dependencies": {},
"exports": {
"require": "./lib/string.js",
"import": "./esm/wrapper.js"
},
"devDependencies": {
"gen-esm-wrapper": "^1.1.3"
},
"scripts": {
"test": "tea-time -R dot"
"test": "tea-time -R dot",
"updateesm": "gen-esm-wrapper . ./esm/wrapper.js"
},
"repository": {
"type": "git",
Expand Down