Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
liquidless
Advanced tools
Readme
Shopify's Liquid template engine, but less powerful. Perfect for configuration files
Install the dependency from npm:
npm i liquidless
Import the renderString
function
import { renderString } from 'liquidless'
Example: Rendering a string
renderString('Hello, {{ world }}', { world: 'world!' })
Outputs:
Hello, world!
Example: Using filters
renderString('Hello, {{ world | upcase }}', { world: 'world!' })
Outputs:
Hello, WORLD!
Example: Supplying custom filters
renderString('Hello, {{ world | something: 1, 2, 3 }}', { world: 'world!' }, {
filters: {
something: (value, args, variable) => `${value} ${args.join(', ')} (${variable})`
}
})
Outputs:
Hello, world! 1, 2, 3 (world)
Example: Rending values in an object
import { renderObject } from 'liquidless'
renderObject([{hello: {world: '{{ world }}'}}], { world: 'world!' })
Outputs
[{hello: {world: 'world!'}}]
append
- Adds a given string to the end of a string.base64_decode
- Decodes a string in Base64 format.base64_encode
- Encodes a string to Base64 format.camelize
- Converts a string to CamelCase.capitalize
- Capitalizes the first word in a string and downcases the remaining characters.downcase
- Converts a string to all lowercase characters.escape
- Escapes special characters in HTML, such as <>
, ', and &
, and converts characters into escape sequences.hmac_sha1
- Converts a string into an SHA-1 hash using a hash message authentication code (HMAC).hmac_sha256
- Converts a string into an SHA-256 hash using a hash message authentication code (HMAC).lstrip
- Strips all whitespace from the left of a string.md5
- Converts a string into an MD5 hash.newline_to_br
- Converts newlines (\n
) in a string to HTML line breaks (<br>
).pluralize
- Outputs the singular or plural version of a string based on a given number.prepend
- Adds a given string to the beginning of a string.remove
- Removes any instance of a substring inside a string.remove_first
- Removes the first instance of a substring inside a string.remove_last
- Removes the last instance of a substring inside a string.replace
- Replaces any instance of a substring inside a string with a given string.replace_first
- Replaces the first instance of a substring inside a string with a given string.replace_last
- Replaces the last instance of a substring inside a string with a given string.rstrip
- Strips all whitespace from the right of a string.sha1
- Converts a string into an SHA-1 hash using a hash message authentication code (HMAC).sha256
- Converts a string into an SHA-256 hash using a hash message authentication code (HMAC).slice
- Returns a substring or series of array items, starting at a given 0-based index.split
- Splits a string into an array of substrings based on a given separator.strip
- Strips all whitespace from the left and right of a string.strip_html
- Strips all HTML tags from a string.strip_newlines
- Strips all newline characters (line breaks) from a string.toInt
- Converts a value to InttoFloat
- Converts a value to FloattoString
- Converts a value to Stringupcase
- Converts a string to all uppercase characters.url_decode
- Decodes a string to URL-safe format by converting percent-encoded characters to special characters.url_encode
- Encodes a string to URL-safe format by converting special characters to percent-encoded characters.FAQs
Shopify's Liquid template engine, but less powerful
The npm package liquidless receives a total of 3,996 weekly downloads. As such, liquidless popularity was classified as popular.
We found that liquidless demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.