sc-pick

0.0.1 • Public • Published

TOC

pick(object:Object, keys:Array)

example.

var testObject = {
	name: "David",
	__privateProperty: "booya",
	country: "Australia"
};
var newObject = pick( testObject, [ "name", "country" ] );
Object.keys( newObject ).should.have.lengthOf( 2 );
newObject.should.have.a.property( "name", testObject.name );
newObject.should.have.a.property( "country", testObject.country );
newObject.should.not.have.a.property( "__privateProperty" );

/sc-pick/

    Package Sidebar

    Install

    npm i sc-pick

    Weekly Downloads

    0

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • sc-yarikfedin
    • sitecorecorporation
    • sc-maximnakhod
    • appadmin-svc