@poppinss/utils
Advanced tools
Comparing version 2.3.0 to 2.4.0
{ | ||
"name": "@poppinss/utils", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "Handy utilities for repetitive work", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -0,1 +1,3 @@ | ||
<div align="center"><img src="https://res.cloudinary.com/adonisjs/image/upload/q_100/v1557762307/poppinss_iftxlt.jpg" width="600px"></div> | ||
# Utils | ||
@@ -19,2 +21,3 @@ > Collection of reusable scripts used by AdonisJS core team | ||
- [resolveFrom](#resolvefrom) | ||
- [interpolate](#interpolate) | ||
- [Lodash utilities](#lodash-utilities) | ||
@@ -160,2 +163,14 @@ - [Exported methods](#exported-methods) | ||
## interpolate | ||
A small utility function to interpolate values inside a string. | ||
``` | ||
import { interpolate } from '@poppinss/utils' | ||
interpolate('hello {username}', { username: 'virk' }) | ||
interpolate('hello {users.0.username}', { users: [{ username: 'virk' }] }) | ||
``` | ||
If value is missing, it will be replaced with an `undefined` string. | ||
## Lodash utilities | ||
@@ -162,0 +177,0 @@ Lodash itself is a bulky library and most of the times, we don't need all the functions from it. For this purpose, the lodash team decided to publish individual methods to npm as packages. However, most of those individual packages are outdated. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65263
36
916
318