Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
ndla-audio-search
Advanced tools
A simple library for selecting NDLA audio files.
$ npm install ndla-audio-search
/* Your project's main .scss import file */
@import '~ndla-audio-search/scss/audio-search'; // with webpack and sass-loader
@import '../path/to/node_modules/ndla-audio-search/scss/audio-search'; // direct reference
To use the AudioSearch
component, some functions for handling search and fetching audios are needed. In addition, some translations are needed.
import AudioSearch from 'ndla-audio-search';
const searchAudios = queryObject => {
// Return new Promise of audio objects
};
const fetchAudio = id => {
// Return new Promise of a single audio object
};
const onError = err => {
// Handle error
};
const audioSelect = audio => {
// Handle audio selection
};
const translations = {
searchPlaceholder: /* Translated string */,
searchButtonTitle: /* Translated string */,
useAudio: /* Translated string */,
noResults: /* Translated string */,
};
<AudioSearch
translations={translations}
fetchAudio={fetchAudio}
searchAudios={searchAudios}
onAudioSelect={audioSelect}
onError={onError}
queryObject={defaultQueryObject}
/>
A queryObject
must look like this:
{
query: /* Query string */,
page: /* Page number */,
pageSize: /* Page size (elements per page) */,
locale: /* The search language; usually provided by the front-end */,
}
FAQs
A simple library for searching for audio files from NDLA
The npm package ndla-audio-search receives a total of 5 weekly downloads. As such, ndla-audio-search popularity was classified as not popular.
We found that ndla-audio-search demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.