Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@dikolab/basic

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dikolab/basic

Basic Javascript helpers

Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

@dikolab/basic

Motivation

So tired of reinventing the wheel every time there's new Javascript project.

And now, I'm feeling lazy and just want to create a Javascript Object using the code below.

import { query } from "@dikolab/basic";
import * as package from "./package.json";

export const packageInfo = query(
  `
  /* define @package */
  package from ?;

  /* define @package */
  dependencies from keys(@package.dependencies);

  // I want to get my package information
  {
    name: @package.name,
    version: @package.version,

    deps: @dependencies
  }
  `,
  [
    package
  ]
);

Usage

Install using NPM


npm install --save @dikolab/basic

May import functions using ES6 module import.


import {
  object,
  contains
} from "@dikolab/basic";

export function hasProperty(param, name) {
  return object(param) && contains(param, name);
}

Or, CommonJS import.


const basic = require("@dikolab/basic");

function hasProperty(param, name) {
  return basic.object(param) && basic.contains(param, name);
}

exports.hasProperty = hasProperty;

Contributors

None.

Backers

None.

Sponsors

None.

I just enjoy my hobby

Stay tune for more documentation and functionality.

Keywords

NodeJS

FAQs

Package last updated on 26 Jun 2020

Did you know?

Socket

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.

Install

Related posts