New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

require-one

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

require-one - npm Package Compare versions

Comparing version 0.0.1 to 0.1.2

.editorconfig

2

package.json
{
"name": "require-one",
"version": "0.0.1",
"version": "0.1.2",
"description": "Require the first found package from an array.",

@@ -5,0 +5,0 @@ "main": "require-one.js",

# Require One
[![Build Status](https://img.shields.io/travis/RobLoach/require-one/master.svg)](http://travis-ci.org/RobLoach/jquery-once "Check this project's build status on TravisCI")
[![NPM version](https://img.shields.io/npm/v/require-one.svg)](https://npmjs.org/package/require-one "View this project on NPM")
[![NPM downloads](https://img.shields.io/npm/dm/require-one.svg)](https://npmjs.org/package/require-one "View this project on NPM")
[![Dependency Status](https://img.shields.io/david/RobLoach/jquery-once.svg)](https://david-dm.org/RobLoach/jquery-once)
Load the first package found from the given array.
## API
## Install
Method | Installation
------ | ------------
[npm](http://npmjs.com/package/jquery-once) | `npm install require-one --save`
[Composer](https://packagist.org/packages/robloach/require-one) | `composer require require-one`
[Bower](http://bower.io/search/?q=require-one) | `bower install require-one`
## Usage
This works across CommonJS/Node, AMD and with global variables.

@@ -37,2 +52,6 @@

<script type="text/javascript" src="../require-one.js"></script>
<script>
var con = requireOne(['nope', 'nopers', 'nopes', 'console']);
con.log('Hello World! Found the console?');
</script>
</head>

@@ -42,2 +61,2 @@ <body>

</body>
</html>
</html>

@@ -16,3 +16,3 @@ /*!

define(function(require) {
// We will use AMD's require() wrapper.
// Use AMD's require() wrapper.
return (root.requireOne = factory(require));

@@ -19,0 +19,0 @@ });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc