Skip to content
Subhajit Sahu edited this page Jun 11, 2020 · 12 revisions

Removes first n entries. 🏃 📼 📦 🌔 📒

Alternatives: drop, drop$.
Similar: take, drop.

object.drop$(x, [n]);
// x: an object (updated)
// n: number of entries (1)
// --> x
const object = require('extra-object');

var x = {a: 1, b: 2, c: 3, d: 4, e: 5};
object.drop$(x, 2);
// { c: 3, d: 4, e: 5 }

x;
// { c: 3, d: 4, e: 5 }

var x = {a: 1, b: 2, c: 3, d: 4, e: 5};
object.drop$(x, 3);
// { d: 4, e: 5 }

references

Clone this wiki locally