
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
fleck
is a functional styled library for string inflection that doesn't pollute String.prototype
.
All the inflections are stored inside fleck
. They are:
// Capitals fleck.capitalize('acme') == 'Acme'
// CamelCase and camelCase fleck.camelize('border-radius') == 'borderRadius' fleck.camelize('border-radius', true) == 'BorderRadius' // alias for upperCamelize fleck.upperCamelize('we-the-people') == 'WeThePeople'
// Changes underscores and spaces into dashes fleck.dasherize('we_the_people') == 'we-the-people'
// Underscore // Converts camelCase, CamelCase, dash-es, and Name::Spaced to underscores fleck.underscore("camelCase") == 'camel_case' fleck.underscore("CamelCase") == 'camel_case' fleck.underscore("dash-es") == 'dash_es' fleck.underscore("Name::Spaced") == 'name_spaced'
// Plurals and Singular, even strange ones fleck.pluralize('dog') == 'dogs' fleck.pluralize('person') == 'people' fleck.pluralize('sheep') == 'sheep' fleck.singularize('dogs') == 'dog' fleck.singularize('people') == 'person'
// Whitespace stripping fleck.strip(' hello! ') == 'hello!'
// Ordinals fleck.ordinalize(4) == "4th" fleck.ordinalize("13") == "13th" fleck.ordinalize("122") == "122nd"
fleck
doesn't contain any unpredictable javascript object orientation. Feel free to combine
with other functional libraries at will; no new anonymous functions, no silly bind
s:
// underscore.js _.each(['dog','cat','mouse'], fleck.pluralize) == ["dogs", "cats", "mice"]
// jQuery.js $.ajax({ url:'/data/sync_from_server/new/uncountablewords', success: fleck.uncountable })
Inflections can be chained using fleck.inflect
fleck.inflect(' posts', 'strip', 'singularize', 'capitalize') == 'Post'
FAQs
a functional-style string inflection library
The npm package fleck receives a total of 368 weekly downloads. As such, fleck popularity was classified as not popular.
We found that fleck demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.