lodash fill

import assert from "assert"; import lodashStable from "lodash"; import { falsey } from "./utils.js"; import fill from "../fill.js"; describe("fill", function() { it("should use a default `start` of `0` and a default `end` of `length`", function() {

pino basic

"use strict"const os = require("os")const { readFileSync } = require("fs")const { test } = require("tap")const { sink, check, once, watchFileCreated, file } = require("./helper")const pino = require("../")const { version } = require("../package.jso
  • Views: 1
  • Keywords: pino,

Ramda symmetricDifferenceWith

var R = require("../source/index.js"); var eq = require("./shared/eq.js"); describe("symmetricDifferenceWith", function() { var Ro = [{a: 1}, {a: 2}, {a: 3}, {a: 4}]; var Ro2 = [{a: 1}, {a: 2}, {a: 3}, {a: 4}, {a: 1}, {a: 2}, {a: 3}, {a: 4}]; var
  • Views: 1
  • Keywords: Ramda,

swagger-stats petstore3

openapi: "3.0.0" info: version: 1.0.0 title: Swagger Petstore description: A sample API that uses a petstore as an example to demonstrate features in the OpenAPI 3.0 specification termsOfService: http://swagger.io/terms/ contact: name: Swag

swagger-stats 200_apicore

"use strict"; var chai = require("chai"); chai.should(); var expect = chai.expect; var http = require("http"); var supertest = require("supertest"); var cuid = require("cuid"); var swaggerParser = require("swagger-parser"); var debug = require("debug")

cli-table3 original cli table newlines test

describe("@api original-cli-table newline tests", function () { const Table = require("../src/table"); it("test table with newlines in headers", function () { let table = new Table({ head: ["Test", "1\n2\n3"], style: { "paddi

Ramda partial

var R = require("../source/index.js"); var eq = require("./shared/eq.js"); describe("partial", function() { var disc = function(a, b, c) { // note disc(3, 7, 4) => 1 return b * b - 4 * a * c; }; it("caches the initially supplied arguments",
  • Views: 3
  • Keywords: Ramda,

Ramda propIs

var R = require("../source/index.js"); var eq = require("./shared/eq.js"); describe("propIs", function() { it("returns true if the specified object property is of the given type", function() { eq(R.propIs(Number, "value", {value: 1}), true); }
  • Views: 0
  • Keywords: Ramda,

yargs divide

#!/usr/bin/env node var argv = require("yargs/yargs")(process.argv.slice(2)) .usage("Usage: $0 -x [num] -y [num]") .demand(["x","y"]) .argv; console.log(argv.x / argv.y);
  • Views: 6
  • Keywords: yargs,

webpack custom parser for json-modules

This is a simple example that shows the usage of a custom parser for json-modules.Toml, yaml and json5 files can be imported like other modules without toml-loader.# data.toml```tomltitle = "TOML Example"[owner]name = "Tom Preston-Werner"organ