
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
feliz.util
Advanced tools
Various utilities ready to use for any project, but if you use feliz.js you'll be extra happy.
checkers
booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanactions
objectactions
checkersType checker for feliz.util
Kind: static method of util
Returns: checkers - Functions that will validate the target.
| Param | Type | Description |
|---|---|---|
| target | mixed | The target value to be checked. |
Example
const is = require('feliz.util/is');
const str = 'hello world';
if (is(str).string()) console.log(str); // will log 'hello world'
checkers
booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanAvailable type-checkers for given target.
Kind: inner class of is
booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanKind: instance method of checkers
Example
is({}).object() // true
is(new Object()).object() // true
is(new String()).object() // true
booleanKind: instance method of checkers
Example
is('').string() // true
is(newString()).string() // true
is('hello').string() // true
is(new String('hola')).string() // true
booleanKind: instance method of checkers
Example
is([]).array() // true
is(['hola']).array() // true
is(new Array()).array() // true
booleanKind: instance method of checkers
booleanKind: instance method of checkers
booleanKind: instance method of checkers
booleanKind: instance method of checkers
booleanKind: instance method of checkers
booleanKind: instance method of checkers
booleanAn array, but not strictly an array.
Kind: instance method of checkers
Example
const ex1 = [];
const ex2 = new Array();
const ex3 = new (class Test extends Array {});
const is = require('feliz.util/is');
// prints: true true false
console.log(is(ex1).array(), is(ex2).array(), is(ex3).array())
// prints: true true true
console.log(is(ex1).arrayish(), is(ex2).arrayish(), is(ex3).arrayish())
booleanAn object, but not strictly an object.
Kind: instance method of checkers
Example
const ex1 = {};
const ex2 = new Object();
const ex3 = new (class Test extends Object {});
const is = require('feliz.util/is');
// prints: true true false
console.log(is(ex1).object(), is(ex2).object(), is(ex3).object())
// prints: true true true
console.log(is(ex1).objectish(), is(ex2).objectish(), is(ex3).objectish())
booleanA feliz instance.
Kind: instance method of checkers
actionsGiven a target, operate using actions
Kind: static method of util
| Param | Type | Description |
|---|---|---|
| target | object | The object used as target/source. |
actions
objectAvailable actions for the target object.
Kind: inner class of object
objectRecursively merge reference(s) with target.
Kind: instance method of actions
Returns: object - The resulting object.
| Param | Type | Description |
|---|---|---|
| ...reference | object | Objects to be merged with target. |
actionsString utilities for feliz.util
Kind: static method of util
| Param | Type | Description |
|---|---|---|
| target | string | The string to target. |
Example
const str = require('feliz.util/string');
const ops = str('hello world');
// returns object with actions for target string
Actions to be applied to given string target.
Kind: inner class of string
Allows given string to be converted according to a context.
Kind: instance method of actions
| Param | Type | Description |
|---|---|---|
| context | object | The object defining the context to resolve. |
Example
const str = require('feliz.util/string');
const foo = str('Hello ${name}').template({name:'Bar'}); // Hello Bar
The MIT License (MIT)
Copyright (c) 2016 Héctor Adán Menéndez Rivera
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Various (standalone) utilities for feliz.js projects
We found that feliz.util 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.