Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 591 Bytes

File metadata and controls

33 lines (25 loc) · 591 Bytes

Example Using Pipeline Operator

import { omitProperty } from '@ducto/modifiers';

const movies = [
  {title: 'The Shawshank Redemption', year: 1994},
  {title: 'The Godfather', year: 1972},
];

const newMovies = movies.map(movie => (
  movie
    |> omitProperty('title')(#)
));

Example Without Pipeline Operator

import { omitProperty } from '@ducto/modifiers';

const movies = [
  {title: 'The Shawshank Redemption', year: 1994},
  {title: 'The Godfather', year: 1972},
];

const newMovies = movies.map(
  omitProperty(
    'title',
  ),
);