Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@teleology/fp

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teleology/fp - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

lib/set.d.ts

8

lib/dot.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.dot = void 0;
const LEADING_ARRAY = /\[/g;
const TRAILING_ARRAY = /^\[|\]/g;
const dot = (path) => path.replace(TRAILING_ARRAY, '').replace(LEADING_ARRAY, '.').split('.');
const dot = (path) => {
const LEADING_ARRAY = /\[/g;
const TRAILING_ARRAY = /^\[|\]/g;
return path.replace(TRAILING_ARRAY, '').replace(LEADING_ARRAY, '.').split('.');
};
exports.dot = dot;

@@ -17,1 +17,2 @@ export * from './parallel';

export * from './poll';
export * from './set';

@@ -33,1 +33,2 @@ "use strict";

__exportStar(require("./poll"), exports);
__exportStar(require("./set"), exports);
export declare type Iterable = {
[key: string | number]: any;
[key: string | number | symbol]: any;
};

@@ -4,0 +4,0 @@ export declare type Equalizer = (v: any, i: number) => boolean | Object;

{
"name": "@teleology/fp",
"version": "3.0.1",
"version": "3.0.2",
"description": "A small collection of functional programming utils",

@@ -5,0 +5,0 @@ "author": "Chris Sullivan <chrissullivan.dev@gmail.com>",

@@ -85,3 +85,14 @@ # @teleology/fp

## set
Sets a value at a dot notation path within an object or array, can be curried.
Example:
```javascript
const { set } = require('@teleology/fp');
set('a.b.c[1].z', 'hello')({}) // {"a":{"b":{"c":[null,{"z":"hello"}]}}}
set('[0].z', 'hello', []) // [ { z: 'hello' } ]
```
## get

@@ -88,0 +99,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc